@emulsify/cli 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -13
- package/dist/index.js +14 -6
- package/dist/node_modules/.package-lock.json +37 -24
- package/dist/node_modules/@types/node/README.md +5 -6
- package/dist/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/dist/node_modules/@types/node/assert.d.ts +955 -45
- package/dist/node_modules/@types/node/async_hooks.d.ts +391 -87
- package/dist/node_modules/@types/node/buffer.d.ts +2210 -17
- package/dist/node_modules/@types/node/child_process.d.ts +1051 -189
- package/dist/node_modules/@types/node/cluster.d.ts +421 -143
- package/dist/node_modules/@types/node/console.d.ts +359 -49
- package/dist/node_modules/@types/node/constants.d.ts +3 -3
- package/dist/node_modules/@types/node/crypto.d.ts +3528 -291
- package/dist/node_modules/@types/node/dgram.d.ts +446 -30
- package/dist/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
- package/dist/node_modules/@types/node/dns/promises.d.ts +476 -0
- package/dist/node_modules/@types/node/dns.d.ts +588 -240
- package/dist/node_modules/@types/node/dom-events.d.ts +124 -0
- package/dist/node_modules/@types/node/domain.d.ts +159 -16
- package/dist/node_modules/@types/node/events.d.ts +890 -41
- package/dist/node_modules/@types/node/fs/promises.d.ts +980 -369
- package/dist/node_modules/@types/node/fs.d.ts +2599 -869
- package/dist/node_modules/@types/node/globals.d.ts +374 -727
- package/dist/node_modules/@types/node/globals.global.d.ts +1 -1
- package/dist/node_modules/@types/node/http.d.ts +1459 -132
- package/dist/node_modules/@types/node/http2.d.ts +1333 -123
- package/dist/node_modules/@types/node/https.d.ts +289 -13
- package/dist/node_modules/@types/node/index.d.ts +37 -46
- package/dist/node_modules/@types/node/inspector.d.ts +367 -671
- package/dist/node_modules/@types/node/module.d.ts +273 -14
- package/dist/node_modules/@types/node/net.d.ts +741 -66
- package/dist/node_modules/@types/node/os.d.ts +275 -23
- package/dist/node_modules/@types/node/package.json +95 -110
- package/dist/node_modules/@types/node/path.d.ts +27 -4
- package/dist/node_modules/@types/node/perf_hooks.d.ts +756 -125
- package/dist/node_modules/@types/node/process.d.ts +1429 -127
- package/dist/node_modules/@types/node/punycode.d.ts +65 -26
- package/dist/node_modules/@types/node/querystring.d.ts +121 -9
- package/dist/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/dist/node_modules/@types/node/readline.d.ts +405 -49
- package/dist/node_modules/@types/node/repl.d.ts +99 -73
- package/dist/node_modules/@types/node/sea.d.ts +153 -0
- package/dist/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/dist/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/dist/node_modules/@types/node/stream/web.d.ts +367 -0
- package/dist/node_modules/@types/node/stream.d.ts +1462 -273
- package/dist/node_modules/@types/node/string_decoder.d.ts +59 -2
- package/dist/node_modules/@types/node/test.d.ts +1719 -0
- package/dist/node_modules/@types/node/timers/promises.d.ts +97 -0
- package/dist/node_modules/@types/node/timers.d.ts +233 -12
- package/dist/node_modules/@types/node/tls.d.ts +540 -189
- package/dist/node_modules/@types/node/trace_events.d.ts +143 -10
- package/dist/node_modules/@types/node/tty.d.ts +156 -17
- package/dist/node_modules/@types/node/url.d.ts +812 -47
- package/dist/node_modules/@types/node/util.d.ts +2159 -145
- package/dist/node_modules/@types/node/v8.d.ts +693 -74
- package/dist/node_modules/@types/node/vm.d.ts +813 -44
- package/dist/node_modules/@types/node/wasi.d.ts +121 -28
- package/dist/node_modules/@types/node/worker_threads.d.ts +514 -61
- package/dist/node_modules/@types/node/zlib.d.ts +220 -54
- package/dist/node_modules/ajv-formats/node_modules/ajv/README.md +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js +1 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/index.d.ts +3 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/json-schema.d.ts +10 -10
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js +5 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/codegen/code.ts +1 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/index.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/resolve.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/runtime/uri.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/index.ts +3 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/json-schema.ts +10 -10
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/discriminator/index.ts +4 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/package.json +5 -5
- package/dist/node_modules/commander/Readme.md +10 -8
- package/dist/node_modules/commander/esm.mjs +1 -1
- package/dist/node_modules/commander/lib/argument.js +9 -5
- package/dist/node_modules/commander/lib/command.js +406 -196
- package/dist/node_modules/commander/lib/error.js +0 -4
- package/dist/node_modules/commander/lib/help.js +101 -38
- package/dist/node_modules/commander/lib/option.js +11 -8
- package/dist/node_modules/commander/lib/suggestSimilar.js +5 -4
- package/dist/node_modules/commander/package.json +23 -19
- package/dist/node_modules/commander/typings/index.d.ts +110 -40
- package/dist/node_modules/debug/package.json +4 -3
- package/dist/node_modules/debug/src/browser.js +3 -1
- package/dist/node_modules/debug/src/node.js +2 -2
- package/dist/node_modules/fast-uri/.gitattributes +2 -0
- package/dist/node_modules/fast-uri/.github/.stale.yml +21 -0
- package/dist/node_modules/fast-uri/.github/dependabot.yml +13 -0
- package/dist/node_modules/fast-uri/.github/tests_checker.yml +8 -0
- package/dist/node_modules/fast-uri/.github/workflows/ci.yml +23 -0
- package/dist/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +20 -0
- package/dist/node_modules/fast-uri/.taprc +3 -0
- package/dist/node_modules/fast-uri/LICENSE +30 -0
- package/dist/node_modules/fast-uri/README.md +125 -0
- package/dist/node_modules/fast-uri/benchmark.js +105 -0
- package/dist/node_modules/fast-uri/index.js +309 -0
- package/dist/node_modules/fast-uri/lib/schemes.js +188 -0
- package/dist/node_modules/fast-uri/lib/scopedChars.js +30 -0
- package/dist/node_modules/fast-uri/lib/utils.js +242 -0
- package/dist/node_modules/fast-uri/package.json +39 -0
- package/dist/node_modules/fast-uri/test/.gitkeep +0 -0
- package/dist/node_modules/fast-uri/test/ajv.test.js +39 -0
- package/dist/node_modules/fast-uri/test/compatibility.test.js +130 -0
- package/dist/node_modules/fast-uri/test/equal.test.js +104 -0
- package/dist/node_modules/fast-uri/test/parse.test.js +319 -0
- package/dist/node_modules/fast-uri/test/resolve.test.js +76 -0
- package/dist/node_modules/fast-uri/test/serialize.test.js +144 -0
- package/dist/node_modules/fast-uri/test/uri-js.test.js +940 -0
- package/dist/node_modules/fast-uri/test/util.test.js +24 -0
- package/dist/node_modules/fast-uri/types/index.d.ts +53 -0
- package/dist/node_modules/fast-uri/types/index.test-d.ts +17 -0
- package/dist/node_modules/fs-extra/README.md +32 -2
- package/dist/node_modules/fs-extra/lib/copy/copy-sync.js +3 -11
- package/dist/node_modules/fs-extra/lib/copy/copy.js +120 -178
- package/dist/node_modules/fs-extra/lib/copy/index.js +1 -1
- package/dist/node_modules/fs-extra/lib/ensure/file.js +31 -34
- package/dist/node_modules/fs-extra/lib/ensure/link.js +27 -27
- package/dist/node_modules/fs-extra/lib/ensure/symlink-paths.js +57 -55
- package/dist/node_modules/fs-extra/lib/ensure/symlink-type.js +16 -13
- package/dist/node_modules/fs-extra/lib/ensure/symlink.js +29 -44
- package/dist/node_modules/fs-extra/lib/esm.mjs +68 -0
- package/dist/node_modules/fs-extra/lib/fs/index.js +29 -17
- package/dist/node_modules/fs-extra/lib/move/index.js +1 -1
- package/dist/node_modules/fs-extra/lib/move/move-sync.js +2 -1
- package/dist/node_modules/fs-extra/lib/move/move.js +38 -54
- package/dist/node_modules/fs-extra/lib/output-file/index.js +10 -19
- package/dist/node_modules/fs-extra/lib/remove/index.js +2 -7
- package/dist/node_modules/fs-extra/lib/util/stat.js +46 -42
- package/dist/node_modules/fs-extra/lib/util/utimes.js +21 -11
- package/dist/node_modules/fs-extra/package.json +11 -7
- package/dist/node_modules/simple-git/dist/cjs/index.js +4958 -0
- package/dist/node_modules/simple-git/dist/cjs/index.js.map +7 -0
- package/dist/node_modules/simple-git/dist/esm/index.js +4813 -0
- package/dist/node_modules/simple-git/dist/esm/index.js.map +7 -0
- package/dist/node_modules/simple-git/dist/esm/package.json +3 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/api.d.ts +3 -13
- package/dist/node_modules/simple-git/dist/src/lib/args/log-format.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/args/pathspec.d.ts +3 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/errors/git-error.d.ts +3 -2
- package/dist/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts +7 -0
- package/dist/node_modules/simple-git/dist/src/lib/git-factory.d.ts +15 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-branch.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts +3 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-list-log-summary.d.ts +2 -1
- package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-pull.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/abort-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/block-unsafe-operations-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/completion-detection.plugin.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/plugins/custom-binary.plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/index.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/plugin-store.d.ts +11 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/progress-monitor-plugin.d.ts +1 -1
- package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/simple-git-plugin.d.ts +10 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/suffix-paths.plugin.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/timout-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts +14 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/FileStatusSummary.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/responses/PullSummary.d.ts +25 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/StatusSummary.d.ts +2 -1
- package/dist/node_modules/simple-git/{src → dist/src}/lib/runners/git-executor-chain.d.ts +1 -1
- package/dist/node_modules/simple-git/{src → dist/src}/lib/runners/git-executor.d.ts +3 -4
- package/dist/node_modules/simple-git/dist/src/lib/tasks/checkout.d.ts +2 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/clone.d.ts +3 -2
- package/dist/node_modules/simple-git/dist/src/lib/tasks/commit.d.ts +4 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/config.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/count-objects.d.ts +12 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/diff-name-status.d.ts +12 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts +5 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/fetch.d.ts +2 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/first-commit.d.ts +2 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/log.d.ts +3 -3
- package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/remote.d.ts +3 -3
- package/dist/node_modules/simple-git/dist/src/lib/tasks/show.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts +4 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/task.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/version.d.ts +9 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/types/index.d.ts +64 -5
- package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/exit-codes.d.ts +1 -0
- package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/line-parser.d.ts +1 -1
- package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/task-parser.d.ts +2 -2
- package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/util.d.ts +3 -1
- package/dist/node_modules/simple-git/{typings → dist/typings}/errors.d.ts +0 -1
- package/dist/node_modules/simple-git/{typings → dist/typings}/index.d.ts +2 -1
- package/dist/node_modules/simple-git/{typings → dist/typings}/response.d.ts +68 -25
- package/dist/node_modules/simple-git/{typings → dist/typings}/simple-git.d.ts +493 -110
- package/dist/node_modules/simple-git/dist/typings/types.d.ts +23 -0
- package/dist/node_modules/simple-git/package.json +32 -35
- package/dist/node_modules/simple-git/promise.js +14 -4
- package/dist/node_modules/simple-git/readme.md +372 -389
- package/dist/node_modules/undici-types/README.md +6 -0
- package/dist/node_modules/undici-types/agent.d.ts +31 -0
- package/dist/node_modules/undici-types/api.d.ts +43 -0
- package/dist/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/dist/node_modules/undici-types/cache.d.ts +36 -0
- package/dist/node_modules/undici-types/client.d.ts +97 -0
- package/dist/node_modules/undici-types/connector.d.ts +34 -0
- package/dist/node_modules/undici-types/content-type.d.ts +21 -0
- package/dist/node_modules/undici-types/cookies.d.ts +28 -0
- package/dist/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/dist/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/dist/node_modules/undici-types/errors.d.ts +128 -0
- package/dist/node_modules/undici-types/fetch.d.ts +209 -0
- package/dist/node_modules/undici-types/file.d.ts +39 -0
- package/dist/node_modules/undici-types/filereader.d.ts +54 -0
- package/dist/node_modules/undici-types/formdata.d.ts +108 -0
- package/dist/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/dist/node_modules/undici-types/global-origin.d.ts +7 -0
- package/dist/node_modules/undici-types/handlers.d.ts +9 -0
- package/dist/node_modules/undici-types/header.d.ts +4 -0
- package/dist/node_modules/undici-types/index.d.ts +63 -0
- package/dist/node_modules/undici-types/interceptors.d.ts +5 -0
- package/dist/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/dist/node_modules/undici-types/mock-client.d.ts +25 -0
- package/dist/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/dist/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/dist/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/dist/node_modules/undici-types/package.json +55 -0
- package/dist/node_modules/undici-types/patch.d.ts +71 -0
- package/dist/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/dist/node_modules/undici-types/pool.d.ts +28 -0
- package/dist/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/dist/node_modules/undici-types/readable.d.ts +61 -0
- package/dist/node_modules/undici-types/webidl.d.ts +220 -0
- package/dist/node_modules/undici-types/websocket.d.ts +131 -0
- package/dist/package-lock.json +10146 -0
- package/dist/package.json +23 -23
- package/dist/schemas/variant.json +5 -21
- package/package.json +24 -24
- package/dist/node_modules/@types/node/ts4.8/assert.d.ts +0 -130
- package/dist/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -237
- package/dist/node_modules/@types/node/ts4.8/buffer.d.ts +0 -89
- package/dist/node_modules/@types/node/ts4.8/child_process.d.ts +0 -682
- package/dist/node_modules/@types/node/ts4.8/cluster.d.ts +0 -300
- package/dist/node_modules/@types/node/ts4.8/console.d.ts +0 -142
- package/dist/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
- package/dist/node_modules/@types/node/ts4.8/crypto.d.ts +0 -1287
- package/dist/node_modules/@types/node/ts4.8/dgram.d.ts +0 -180
- package/dist/node_modules/@types/node/ts4.8/dns.d.ts +0 -516
- package/dist/node_modules/@types/node/ts4.8/domain.d.ts +0 -27
- package/dist/node_modules/@types/node/ts4.8/events.d.ts +0 -82
- package/dist/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -634
- package/dist/node_modules/@types/node/ts4.8/fs.d.ts +0 -2587
- package/dist/node_modules/@types/node/ts4.8/globals.d.ts +0 -763
- package/dist/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
- package/dist/node_modules/@types/node/ts4.8/http.d.ts +0 -580
- package/dist/node_modules/@types/node/ts4.8/http2.d.ts +0 -1208
- package/dist/node_modules/@types/node/ts4.8/https.d.ts +0 -274
- package/dist/node_modules/@types/node/ts4.8/index.d.ts +0 -53
- package/dist/node_modules/@types/node/ts4.8/inspector.d.ts +0 -3050
- package/dist/node_modules/@types/node/ts4.8/module.d.ts +0 -56
- package/dist/node_modules/@types/node/ts4.8/net.d.ts +0 -324
- package/dist/node_modules/@types/node/ts4.8/os.d.ts +0 -243
- package/dist/node_modules/@types/node/ts4.8/path.d.ts +0 -168
- package/dist/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -274
- package/dist/node_modules/@types/node/ts4.8/process.d.ts +0 -452
- package/dist/node_modules/@types/node/ts4.8/punycode.d.ts +0 -78
- package/dist/node_modules/@types/node/ts4.8/querystring.d.ts +0 -41
- package/dist/node_modules/@types/node/ts4.8/readline.d.ts +0 -184
- package/dist/node_modules/@types/node/ts4.8/repl.d.ts +0 -404
- package/dist/node_modules/@types/node/ts4.8/stream.d.ts +0 -518
- package/dist/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -10
- package/dist/node_modules/@types/node/ts4.8/timers.d.ts +0 -19
- package/dist/node_modules/@types/node/ts4.8/tls.d.ts +0 -866
- package/dist/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -64
- package/dist/node_modules/@types/node/ts4.8/tty.d.ts +0 -69
- package/dist/node_modules/@types/node/ts4.8/url.d.ts +0 -187
- package/dist/node_modules/@types/node/ts4.8/util.d.ts +0 -278
- package/dist/node_modules/@types/node/ts4.8/v8.d.ts +0 -189
- package/dist/node_modules/@types/node/ts4.8/vm.d.ts +0 -155
- package/dist/node_modules/@types/node/ts4.8/wasi.d.ts +0 -88
- package/dist/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -241
- package/dist/node_modules/@types/node/ts4.8/zlib.d.ts +0 -364
- package/dist/node_modules/fs-extra/lib/remove/rimraf.js +0 -302
- package/dist/node_modules/simple-git/CHANGELOG.md +0 -529
- package/dist/node_modules/simple-git/LICENSE +0 -20
- package/dist/node_modules/simple-git/promise.d.ts +0 -46
- package/dist/node_modules/simple-git/src/git.js +0 -700
- package/dist/node_modules/simple-git/src/index.js +0 -7
- package/dist/node_modules/simple-git/src/lib/api.js +0 -26
- package/dist/node_modules/simple-git/src/lib/api.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/errors/git-construct-error.js +0 -21
- package/dist/node_modules/simple-git/src/lib/errors/git-construct-error.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/errors/git-error.js +0 -37
- package/dist/node_modules/simple-git/src/lib/errors/git-error.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/errors/git-plugin-error.d.ts +0 -6
- package/dist/node_modules/simple-git/src/lib/errors/git-plugin-error.js +0 -14
- package/dist/node_modules/simple-git/src/lib/errors/git-plugin-error.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/errors/git-response-error.js +0 -36
- package/dist/node_modules/simple-git/src/lib/errors/git-response-error.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/errors/task-configuration-error.js +0 -19
- package/dist/node_modules/simple-git/src/lib/errors/task-configuration-error.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/git-factory.d.ts +0 -25
- package/dist/node_modules/simple-git/src/lib/git-factory.js +0 -45
- package/dist/node_modules/simple-git/src/lib/git-factory.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/git-logger.js +0 -101
- package/dist/node_modules/simple-git/src/lib/git-logger.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/parsers/parse-branch-delete.js +0 -29
- package/dist/node_modules/simple-git/src/lib/parsers/parse-branch-delete.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/parsers/parse-branch.js +0 -18
- package/dist/node_modules/simple-git/src/lib/parsers/parse-branch.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/parsers/parse-commit.js +0 -53
- package/dist/node_modules/simple-git/src/lib/parsers/parse-commit.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/parsers/parse-diff-summary.d.ts +0 -2
- package/dist/node_modules/simple-git/src/lib/parsers/parse-diff-summary.js +0 -74
- package/dist/node_modules/simple-git/src/lib/parsers/parse-diff-summary.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/parsers/parse-fetch.js +0 -32
- package/dist/node_modules/simple-git/src/lib/parsers/parse-fetch.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.js +0 -35
- package/dist/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/parsers/parse-merge.js +0 -39
- package/dist/node_modules/simple-git/src/lib/parsers/parse-merge.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/parsers/parse-move.js +0 -14
- package/dist/node_modules/simple-git/src/lib/parsers/parse-move.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/parsers/parse-pull.js +0 -42
- package/dist/node_modules/simple-git/src/lib/parsers/parse-pull.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/parsers/parse-push.js +0 -58
- package/dist/node_modules/simple-git/src/lib/parsers/parse-push.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/parsers/parse-remote-messages.js +0 -33
- package/dist/node_modules/simple-git/src/lib/parsers/parse-remote-messages.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/parsers/parse-remote-objects.js +0 -41
- package/dist/node_modules/simple-git/src/lib/parsers/parse-remote-objects.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/plugins/command-config-prefixing-plugin.js +0 -15
- package/dist/node_modules/simple-git/src/lib/plugins/command-config-prefixing-plugin.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/plugins/completion-detection.plugin.js +0 -80
- package/dist/node_modules/simple-git/src/lib/plugins/completion-detection.plugin.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/plugins/error-detection.plugin.js +0 -39
- package/dist/node_modules/simple-git/src/lib/plugins/error-detection.plugin.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/plugins/index.js +0 -21
- package/dist/node_modules/simple-git/src/lib/plugins/index.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/plugins/plugin-store.d.ts +0 -6
- package/dist/node_modules/simple-git/src/lib/plugins/plugin-store.js +0 -28
- package/dist/node_modules/simple-git/src/lib/plugins/plugin-store.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/plugins/progress-monitor-plugin.js +0 -45
- package/dist/node_modules/simple-git/src/lib/plugins/progress-monitor-plugin.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/plugins/simple-git-plugin.js +0 -3
- package/dist/node_modules/simple-git/src/lib/plugins/simple-git-plugin.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/plugins/spawn-options-plugin.js +0 -15
- package/dist/node_modules/simple-git/src/lib/plugins/spawn-options-plugin.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/plugins/timout-plugin.d.ts +0 -3
- package/dist/node_modules/simple-git/src/lib/plugins/timout-plugin.js +0 -37
- package/dist/node_modules/simple-git/src/lib/plugins/timout-plugin.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.js +0 -31
- package/dist/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/BranchSummary.d.ts +0 -10
- package/dist/node_modules/simple-git/src/lib/responses/BranchSummary.js +0 -26
- package/dist/node_modules/simple-git/src/lib/responses/BranchSummary.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/CheckIgnore.js +0 -13
- package/dist/node_modules/simple-git/src/lib/responses/CheckIgnore.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/CleanSummary.js +0 -28
- package/dist/node_modules/simple-git/src/lib/responses/CleanSummary.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/ConfigList.js +0 -89
- package/dist/node_modules/simple-git/src/lib/responses/ConfigList.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/DiffSummary.js +0 -16
- package/dist/node_modules/simple-git/src/lib/responses/DiffSummary.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/FileStatusSummary.js +0 -18
- package/dist/node_modules/simple-git/src/lib/responses/FileStatusSummary.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/GetRemoteSummary.js +0 -30
- package/dist/node_modules/simple-git/src/lib/responses/GetRemoteSummary.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/InitSummary.js +0 -36
- package/dist/node_modules/simple-git/src/lib/responses/InitSummary.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/MergeSummary.js +0 -35
- package/dist/node_modules/simple-git/src/lib/responses/MergeSummary.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/PullSummary.d.ts +0 -12
- package/dist/node_modules/simple-git/src/lib/responses/PullSummary.js +0 -22
- package/dist/node_modules/simple-git/src/lib/responses/PullSummary.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/StatusSummary.js +0 -128
- package/dist/node_modules/simple-git/src/lib/responses/StatusSummary.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/responses/TagList.js +0 -56
- package/dist/node_modules/simple-git/src/lib/responses/TagList.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/runners/git-executor-chain.js +0 -173
- package/dist/node_modules/simple-git/src/lib/runners/git-executor-chain.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/runners/git-executor.js +0 -21
- package/dist/node_modules/simple-git/src/lib/runners/git-executor.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/runners/promise-wrapped.js +0 -133
- package/dist/node_modules/simple-git/src/lib/runners/promise-wrapped.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/runners/scheduler.js +0 -48
- package/dist/node_modules/simple-git/src/lib/runners/scheduler.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/runners/tasks-pending-queue.js +0 -64
- package/dist/node_modules/simple-git/src/lib/runners/tasks-pending-queue.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/simple-git-api.js +0 -80
- package/dist/node_modules/simple-git/src/lib/simple-git-api.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/task-callback.js +0 -39
- package/dist/node_modules/simple-git/src/lib/task-callback.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/apply-patch.js +0 -9
- package/dist/node_modules/simple-git/src/lib/tasks/apply-patch.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/branch.js +0 -76
- package/dist/node_modules/simple-git/src/lib/tasks/branch.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/change-working-directory.js +0 -15
- package/dist/node_modules/simple-git/src/lib/tasks/change-working-directory.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/check-ignore.js +0 -13
- package/dist/node_modules/simple-git/src/lib/tasks/check-ignore.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/check-is-repo.js +0 -61
- package/dist/node_modules/simple-git/src/lib/tasks/check-is-repo.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/clean.js +0 -85
- package/dist/node_modules/simple-git/src/lib/tasks/clean.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/clone.js +0 -22
- package/dist/node_modules/simple-git/src/lib/tasks/clone.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/commit.d.ts +0 -3
- package/dist/node_modules/simple-git/src/lib/tasks/commit.js +0 -16
- package/dist/node_modules/simple-git/src/lib/tasks/commit.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/config.js +0 -73
- package/dist/node_modules/simple-git/src/lib/tasks/config.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/diff.d.ts +0 -3
- package/dist/node_modules/simple-git/src/lib/tasks/diff.js +0 -15
- package/dist/node_modules/simple-git/src/lib/tasks/diff.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/fetch.js +0 -17
- package/dist/node_modules/simple-git/src/lib/tasks/fetch.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/grep.js +0 -76
- package/dist/node_modules/simple-git/src/lib/tasks/grep.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/hash-object.js +0 -16
- package/dist/node_modules/simple-git/src/lib/tasks/hash-object.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/init.js +0 -23
- package/dist/node_modules/simple-git/src/lib/tasks/init.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/log.js +0 -109
- package/dist/node_modules/simple-git/src/lib/tasks/log.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/merge.js +0 -24
- package/dist/node_modules/simple-git/src/lib/tasks/merge.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/move.js +0 -14
- package/dist/node_modules/simple-git/src/lib/tasks/move.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/pull.js +0 -19
- package/dist/node_modules/simple-git/src/lib/tasks/pull.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/push.js +0 -29
- package/dist/node_modules/simple-git/src/lib/tasks/push.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/remote.js +0 -42
- package/dist/node_modules/simple-git/src/lib/tasks/remote.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/reset.js +0 -38
- package/dist/node_modules/simple-git/src/lib/tasks/reset.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/stash-list.d.ts +0 -3
- package/dist/node_modules/simple-git/src/lib/tasks/stash-list.js +0 -16
- package/dist/node_modules/simple-git/src/lib/tasks/stash-list.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/status.js +0 -15
- package/dist/node_modules/simple-git/src/lib/tasks/status.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/sub-module.js +0 -25
- package/dist/node_modules/simple-git/src/lib/tasks/sub-module.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/tag.js +0 -45
- package/dist/node_modules/simple-git/src/lib/tasks/tag.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/tasks/task.js +0 -52
- package/dist/node_modules/simple-git/src/lib/tasks/task.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/types/handlers.js +0 -3
- package/dist/node_modules/simple-git/src/lib/types/handlers.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/types/index.js +0 -15
- package/dist/node_modules/simple-git/src/lib/types/index.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/types/tasks.js +0 -3
- package/dist/node_modules/simple-git/src/lib/types/tasks.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/utils/argument-filters.js +0 -47
- package/dist/node_modules/simple-git/src/lib/utils/argument-filters.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/utils/exit-codes.js +0 -14
- package/dist/node_modules/simple-git/src/lib/utils/exit-codes.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/utils/git-output-streams.js +0 -14
- package/dist/node_modules/simple-git/src/lib/utils/git-output-streams.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/utils/index.js +0 -21
- package/dist/node_modules/simple-git/src/lib/utils/index.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/utils/line-parser.js +0 -52
- package/dist/node_modules/simple-git/src/lib/utils/line-parser.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/utils/simple-git-options.js +0 -16
- package/dist/node_modules/simple-git/src/lib/utils/simple-git-options.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/utils/task-options.js +0 -58
- package/dist/node_modules/simple-git/src/lib/utils/task-options.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/utils/task-parser.js +0 -24
- package/dist/node_modules/simple-git/src/lib/utils/task-parser.js.map +0 -1
- package/dist/node_modules/simple-git/src/lib/utils/util.js +0 -146
- package/dist/node_modules/simple-git/src/lib/utils/util.js.map +0 -1
- package/dist/node_modules/simple-git/typings/types.d.ts +0 -14
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/errors/git-construct-error.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/errors/git-response-error.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/errors/task-configuration-error.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/git-logger.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-branch-delete.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-commit.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-fetch.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-merge.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-move.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-push.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-remote-messages.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/parsers/parse-remote-objects.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/command-config-prefixing-plugin.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/error-detection.plugin.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/plugins/spawn-options-plugin.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/BranchDeleteSummary.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/CheckIgnore.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/CleanSummary.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/ConfigList.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/DiffSummary.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/GetRemoteSummary.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/InitSummary.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/MergeSummary.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/responses/TagList.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/runners/promise-wrapped.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/runners/scheduler.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/runners/tasks-pending-queue.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/simple-git-api.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/task-callback.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/apply-patch.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/branch.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/change-working-directory.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/check-ignore.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/check-is-repo.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/clean.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/grep.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/hash-object.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/init.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/merge.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/move.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/pull.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/push.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/reset.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/status.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/sub-module.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/tasks/tag.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/types/handlers.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/types/tasks.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/argument-filters.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/git-output-streams.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/index.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/simple-git-options.d.ts +0 -0
- /package/dist/node_modules/simple-git/{src → dist/src}/lib/utils/task-options.d.ts +0 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const { HEX } = require('./scopedChars')
|
|
4
|
+
|
|
5
|
+
function normalizeIPv4 (host) {
|
|
6
|
+
if (findToken(host, '.') < 3) { return { host, isIPV4: false } }
|
|
7
|
+
const matches = host.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u) || []
|
|
8
|
+
const [address] = matches
|
|
9
|
+
if (address) {
|
|
10
|
+
return { host: stripLeadingZeros(address, '.'), isIPV4: true }
|
|
11
|
+
} else {
|
|
12
|
+
return { host, isIPV4: false }
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @param {string[]} input
|
|
18
|
+
* @param {boolean} [keepZero=false]
|
|
19
|
+
* @returns {string|undefined}
|
|
20
|
+
*/
|
|
21
|
+
function stringArrayToHexStripped (input, keepZero = false) {
|
|
22
|
+
let acc = ''
|
|
23
|
+
let strip = true
|
|
24
|
+
for (const c of input) {
|
|
25
|
+
if (HEX[c] === undefined) return undefined
|
|
26
|
+
if (c !== '0' && strip === true) strip = false
|
|
27
|
+
if (!strip) acc += c
|
|
28
|
+
}
|
|
29
|
+
if (keepZero && acc.length === 0) acc = '0'
|
|
30
|
+
return acc
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function getIPV6 (input) {
|
|
34
|
+
let tokenCount = 0
|
|
35
|
+
const output = { error: false, address: '', zone: '' }
|
|
36
|
+
const address = []
|
|
37
|
+
const buffer = []
|
|
38
|
+
let isZone = false
|
|
39
|
+
let endipv6Encountered = false
|
|
40
|
+
let endIpv6 = false
|
|
41
|
+
|
|
42
|
+
function consume () {
|
|
43
|
+
if (buffer.length) {
|
|
44
|
+
if (isZone === false) {
|
|
45
|
+
const hex = stringArrayToHexStripped(buffer)
|
|
46
|
+
if (hex !== undefined) {
|
|
47
|
+
address.push(hex)
|
|
48
|
+
} else {
|
|
49
|
+
output.error = true
|
|
50
|
+
return false
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
buffer.length = 0
|
|
54
|
+
}
|
|
55
|
+
return true
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
for (let i = 0; i < input.length; i++) {
|
|
59
|
+
const cursor = input[i]
|
|
60
|
+
if (cursor === '[' || cursor === ']') { continue }
|
|
61
|
+
if (cursor === ':') {
|
|
62
|
+
if (endipv6Encountered === true) {
|
|
63
|
+
endIpv6 = true
|
|
64
|
+
}
|
|
65
|
+
if (!consume()) { break }
|
|
66
|
+
tokenCount++
|
|
67
|
+
address.push(':')
|
|
68
|
+
if (tokenCount > 7) {
|
|
69
|
+
// not valid
|
|
70
|
+
output.error = true
|
|
71
|
+
break
|
|
72
|
+
}
|
|
73
|
+
if (i - 1 >= 0 && input[i - 1] === ':') {
|
|
74
|
+
endipv6Encountered = true
|
|
75
|
+
}
|
|
76
|
+
continue
|
|
77
|
+
} else if (cursor === '%') {
|
|
78
|
+
if (!consume()) { break }
|
|
79
|
+
// switch to zone detection
|
|
80
|
+
isZone = true
|
|
81
|
+
} else {
|
|
82
|
+
buffer.push(cursor)
|
|
83
|
+
continue
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (buffer.length) {
|
|
87
|
+
if (isZone) {
|
|
88
|
+
output.zone = buffer.join('')
|
|
89
|
+
} else if (endIpv6) {
|
|
90
|
+
address.push(buffer.join(''))
|
|
91
|
+
} else {
|
|
92
|
+
address.push(stringArrayToHexStripped(buffer))
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
output.address = address.join('')
|
|
96
|
+
return output
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function normalizeIPv6 (host, opts = {}) {
|
|
100
|
+
if (findToken(host, ':') < 2) { return { host, isIPV6: false } }
|
|
101
|
+
const ipv6 = getIPV6(host)
|
|
102
|
+
|
|
103
|
+
if (!ipv6.error) {
|
|
104
|
+
let newHost = ipv6.address
|
|
105
|
+
let escapedHost = ipv6.address
|
|
106
|
+
if (ipv6.zone) {
|
|
107
|
+
newHost += '%' + ipv6.zone
|
|
108
|
+
escapedHost += '%25' + ipv6.zone
|
|
109
|
+
}
|
|
110
|
+
return { host: newHost, escapedHost, isIPV6: true }
|
|
111
|
+
} else {
|
|
112
|
+
return { host, isIPV6: false }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function stripLeadingZeros (str, token) {
|
|
117
|
+
let out = ''
|
|
118
|
+
let skip = true
|
|
119
|
+
const l = str.length
|
|
120
|
+
for (let i = 0; i < l; i++) {
|
|
121
|
+
const c = str[i]
|
|
122
|
+
if (c === '0' && skip) {
|
|
123
|
+
if ((i + 1 <= l && str[i + 1] === token) || i + 1 === l) {
|
|
124
|
+
out += c
|
|
125
|
+
skip = false
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
if (c === token) {
|
|
129
|
+
skip = true
|
|
130
|
+
} else {
|
|
131
|
+
skip = false
|
|
132
|
+
}
|
|
133
|
+
out += c
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return out
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function findToken (str, token) {
|
|
140
|
+
let ind = 0
|
|
141
|
+
for (let i = 0; i < str.length; i++) {
|
|
142
|
+
if (str[i] === token) ind++
|
|
143
|
+
}
|
|
144
|
+
return ind
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const RDS1 = /^\.\.?\//u
|
|
148
|
+
const RDS2 = /^\/\.(?:\/|$)/u
|
|
149
|
+
const RDS3 = /^\/\.\.(?:\/|$)/u
|
|
150
|
+
const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u
|
|
151
|
+
|
|
152
|
+
function removeDotSegments (input) {
|
|
153
|
+
const output = []
|
|
154
|
+
|
|
155
|
+
while (input.length) {
|
|
156
|
+
if (input.match(RDS1)) {
|
|
157
|
+
input = input.replace(RDS1, '')
|
|
158
|
+
} else if (input.match(RDS2)) {
|
|
159
|
+
input = input.replace(RDS2, '/')
|
|
160
|
+
} else if (input.match(RDS3)) {
|
|
161
|
+
input = input.replace(RDS3, '/')
|
|
162
|
+
output.pop()
|
|
163
|
+
} else if (input === '.' || input === '..') {
|
|
164
|
+
input = ''
|
|
165
|
+
} else {
|
|
166
|
+
const im = input.match(RDS5)
|
|
167
|
+
if (im) {
|
|
168
|
+
const s = im[0]
|
|
169
|
+
input = input.slice(s.length)
|
|
170
|
+
output.push(s)
|
|
171
|
+
} else {
|
|
172
|
+
throw new Error('Unexpected dot segment condition')
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return output.join('')
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function normalizeComponentEncoding (components, esc) {
|
|
180
|
+
const func = esc !== true ? escape : unescape
|
|
181
|
+
if (components.scheme !== undefined) {
|
|
182
|
+
components.scheme = func(components.scheme)
|
|
183
|
+
}
|
|
184
|
+
if (components.userinfo !== undefined) {
|
|
185
|
+
components.userinfo = func(components.userinfo)
|
|
186
|
+
}
|
|
187
|
+
if (components.host !== undefined) {
|
|
188
|
+
components.host = func(components.host)
|
|
189
|
+
}
|
|
190
|
+
if (components.path !== undefined) {
|
|
191
|
+
components.path = func(components.path)
|
|
192
|
+
}
|
|
193
|
+
if (components.query !== undefined) {
|
|
194
|
+
components.query = func(components.query)
|
|
195
|
+
}
|
|
196
|
+
if (components.fragment !== undefined) {
|
|
197
|
+
components.fragment = func(components.fragment)
|
|
198
|
+
}
|
|
199
|
+
return components
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function recomposeAuthority (components, options) {
|
|
203
|
+
const uriTokens = []
|
|
204
|
+
|
|
205
|
+
if (components.userinfo !== undefined) {
|
|
206
|
+
uriTokens.push(components.userinfo)
|
|
207
|
+
uriTokens.push('@')
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (components.host !== undefined) {
|
|
211
|
+
let host = unescape(components.host)
|
|
212
|
+
const ipV4res = normalizeIPv4(host)
|
|
213
|
+
|
|
214
|
+
if (ipV4res.isIPV4) {
|
|
215
|
+
host = ipV4res.host
|
|
216
|
+
} else {
|
|
217
|
+
const ipV6res = normalizeIPv6(ipV4res.host, { isIPV4: false })
|
|
218
|
+
if (ipV6res.isIPV6 === true) {
|
|
219
|
+
host = `[${ipV6res.escapedHost}]`
|
|
220
|
+
} else {
|
|
221
|
+
host = components.host
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
uriTokens.push(host)
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (typeof components.port === 'number' || typeof components.port === 'string') {
|
|
228
|
+
uriTokens.push(':')
|
|
229
|
+
uriTokens.push(String(components.port))
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return uriTokens.length ? uriTokens.join('') : undefined
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
module.exports = {
|
|
236
|
+
recomposeAuthority,
|
|
237
|
+
normalizeComponentEncoding,
|
|
238
|
+
removeDotSegments,
|
|
239
|
+
normalizeIPv4,
|
|
240
|
+
normalizeIPv6,
|
|
241
|
+
stringArrayToHexStripped
|
|
242
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fast-uri",
|
|
3
|
+
"description": "Dependency free RFC 3986 URI toolbox",
|
|
4
|
+
"version": "3.0.1",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"types": "types/index.d.ts",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"author": "Vincent Le Goff <vince.legoff@gmail.com> (https://github.com/zekth)",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/fastify/fast-uri.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/fastify/fast-uri/issues"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/fastify/fast-uri",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"bench": "node benchmark.js",
|
|
20
|
+
"lint": "standard | snazzy",
|
|
21
|
+
"lint:fix": "standard --fix",
|
|
22
|
+
"test": "npm run lint && npm run test:unit && npm run test:typescript",
|
|
23
|
+
"test:ci": "npm run lint && npm run test:unit -- --coverage-report=lcovonly && npm run test:typescript",
|
|
24
|
+
"test:unit": "tap",
|
|
25
|
+
"test:unit:dev": "npm run test:unit -- --coverage-report=html",
|
|
26
|
+
"test:typescript": "tsd"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@fastify/pre-commit": "^2.1.0",
|
|
30
|
+
"ajv": "^8.16.0",
|
|
31
|
+
"benchmark": "^2.1.4",
|
|
32
|
+
"coveralls": "^3.1.1",
|
|
33
|
+
"snazzy": "^9.0.0",
|
|
34
|
+
"standard": "^17.1.0",
|
|
35
|
+
"tap": "^18.7.2",
|
|
36
|
+
"tsd": "^0.31.0",
|
|
37
|
+
"uri-js": "^4.4.1"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const AJV = require('ajv')
|
|
2
|
+
const fastUri = require('../')
|
|
3
|
+
const ajv = new AJV({
|
|
4
|
+
uriResolver: fastUri // comment this line to see it works with uri-js
|
|
5
|
+
})
|
|
6
|
+
const { test } = require('tap')
|
|
7
|
+
|
|
8
|
+
test('ajv', t => {
|
|
9
|
+
t.plan(1)
|
|
10
|
+
const schema = {
|
|
11
|
+
$ref: '#/definitions/Record%3Cstring%2CPerson%3E',
|
|
12
|
+
definitions: {
|
|
13
|
+
Person: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
firstName: {
|
|
17
|
+
type: 'string'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
'Record<string,Person>': {
|
|
22
|
+
type: 'object',
|
|
23
|
+
additionalProperties: {
|
|
24
|
+
$ref: '#/definitions/Person'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const data = {
|
|
31
|
+
joe: {
|
|
32
|
+
firstName: 'Joe'
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const validate = ajv.compile(schema)
|
|
38
|
+
t.ok(validate(data))
|
|
39
|
+
})
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const tap = require('tap')
|
|
4
|
+
const test = tap.test
|
|
5
|
+
const fastifyURI = require('../')
|
|
6
|
+
const urijs = require('uri-js')
|
|
7
|
+
|
|
8
|
+
test('compatibility Parse', (t) => {
|
|
9
|
+
const toParse = [
|
|
10
|
+
'//www.g.com/error\n/bleh/bleh',
|
|
11
|
+
'https://fastify.org',
|
|
12
|
+
'/definitions/Record%3Cstring%2CPerson%3E',
|
|
13
|
+
'//10.10.10.10',
|
|
14
|
+
// '//10.10.000.10', <-- not a valid URI per URI spec: https://datatracker.ietf.org/doc/html/rfc5954#section-4.1
|
|
15
|
+
'//[2001:db8::7%en0]',
|
|
16
|
+
'//[2001:dbZ::1]:80',
|
|
17
|
+
'//[2001:db8::1]:80',
|
|
18
|
+
'//[2001:db8::001]:80',
|
|
19
|
+
'uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body',
|
|
20
|
+
'http://user:pass@example.com:123/one/space in.url?q1=a1&q2=a2#body',
|
|
21
|
+
'//[::ffff:129.144.52.38]',
|
|
22
|
+
'uri://10.10.10.10.example.com/en/process',
|
|
23
|
+
'//[2606:2800:220:1:248:1893:25c8:1946]/test',
|
|
24
|
+
'ws://example.com/chat',
|
|
25
|
+
'ws://example.com/foo?bar=baz',
|
|
26
|
+
'wss://example.com/?bar=baz',
|
|
27
|
+
'wss://example.com/chat',
|
|
28
|
+
'wss://example.com/foo?bar=baz',
|
|
29
|
+
'wss://example.com/?bar=baz',
|
|
30
|
+
'urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6',
|
|
31
|
+
'urn:uuid:notauuid-7dec-11d0-a765-00a0c91e6bf6',
|
|
32
|
+
'urn:example:%D0%B0123,z456',
|
|
33
|
+
'//[2606:2800:220:1:248:1893:25c8:1946:43209]',
|
|
34
|
+
'http://foo.bar',
|
|
35
|
+
'http://',
|
|
36
|
+
'#/$defs/stringMap',
|
|
37
|
+
'#/$defs/string%20Map',
|
|
38
|
+
'#/$defs/string Map',
|
|
39
|
+
'//?json=%7B%22foo%22%3A%22bar%22%7D'
|
|
40
|
+
// 'mailto:chris@example.com'-203845,
|
|
41
|
+
// 'mailto:infobot@example.com?subject=current-issue',
|
|
42
|
+
// 'mailto:infobot@example.com?body=send%20current-issue',
|
|
43
|
+
// 'mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index',
|
|
44
|
+
// 'mailto:list@example.org?In-Reply-To=%3C3469A91.D10AF4C@example.com%3E',
|
|
45
|
+
// 'mailto:majordomo@example.com?body=subscribe%20bamboo-l',
|
|
46
|
+
// 'mailto:joe@example.com?cc=bob@example.com&body=hello',
|
|
47
|
+
// 'mailto:gorby%25kremvax@example.com',
|
|
48
|
+
// 'mailto:unlikely%3Faddress@example.com?blat=foop',
|
|
49
|
+
// 'mailto:Mike%26family@example.org',
|
|
50
|
+
// 'mailto:%22not%40me%22@example.org',
|
|
51
|
+
// 'mailto:%22oh%5C%5Cno%22@example.org',
|
|
52
|
+
// 'mailto:%22%5C%5C%5C%22it\'s%5C%20ugly%5C%5C%5C%22%22@example.org',
|
|
53
|
+
// 'mailto:user@example.org?subject=caf%C3%A9',
|
|
54
|
+
// 'mailto:user@example.org?subject=%3D%3Futf-8%3FQ%3Fcaf%3DC3%3DA9%3F%3D',
|
|
55
|
+
// 'mailto:user@example.org?subject=%3D%3Fiso-8859-1%3FQ%3Fcaf%3DE9%3F%3D',
|
|
56
|
+
// 'mailto:user@example.org?subject=caf%C3%A9&body=caf%C3%A9',
|
|
57
|
+
// 'mailto:user@%E7%B4%8D%E8%B1%86.example.org?subject=Test&body=NATTO'
|
|
58
|
+
]
|
|
59
|
+
toParse.forEach((x) => {
|
|
60
|
+
t.same(fastifyURI.parse(x), urijs.parse(x), 'Compatibility parse: ' + x)
|
|
61
|
+
})
|
|
62
|
+
t.end()
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
test('compatibility serialize', (t) => {
|
|
66
|
+
const toSerialize = [
|
|
67
|
+
{ host: '10.10.10.10.example.com' },
|
|
68
|
+
{ host: '2001:db8::7' },
|
|
69
|
+
{ host: '::ffff:129.144.52.38' },
|
|
70
|
+
{ host: '2606:2800:220:1:248:1893:25c8:1946' },
|
|
71
|
+
{ host: '10.10.10.10.example.com' },
|
|
72
|
+
{ host: '10.10.10.10' },
|
|
73
|
+
{ path: '?query' },
|
|
74
|
+
{ path: 'foo:bar' },
|
|
75
|
+
{ path: '//path' },
|
|
76
|
+
{
|
|
77
|
+
scheme: 'uri',
|
|
78
|
+
host: 'example.com',
|
|
79
|
+
port: '9000'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
scheme: 'uri',
|
|
83
|
+
userinfo: 'foo:bar',
|
|
84
|
+
host: 'example.com',
|
|
85
|
+
port: 1,
|
|
86
|
+
path: 'path',
|
|
87
|
+
query: 'query',
|
|
88
|
+
fragment: 'fragment'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
scheme: '',
|
|
92
|
+
userinfo: '',
|
|
93
|
+
host: '',
|
|
94
|
+
port: 0,
|
|
95
|
+
path: '',
|
|
96
|
+
query: '',
|
|
97
|
+
fragment: ''
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
scheme: undefined,
|
|
101
|
+
userinfo: undefined,
|
|
102
|
+
host: undefined,
|
|
103
|
+
port: undefined,
|
|
104
|
+
path: undefined,
|
|
105
|
+
query: undefined,
|
|
106
|
+
fragment: undefined
|
|
107
|
+
},
|
|
108
|
+
{ host: 'fe80::a%en1' },
|
|
109
|
+
{ host: 'fe80::a%25en1' },
|
|
110
|
+
{
|
|
111
|
+
scheme: 'ws',
|
|
112
|
+
host: 'example.com',
|
|
113
|
+
resourceName: '/foo?bar',
|
|
114
|
+
secure: true
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
scheme: 'scheme',
|
|
118
|
+
path: 'with:colon'
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
toSerialize.forEach((x) => {
|
|
122
|
+
const r = JSON.stringify(x)
|
|
123
|
+
t.same(
|
|
124
|
+
fastifyURI.serialize(x),
|
|
125
|
+
urijs.serialize(x),
|
|
126
|
+
'Compatibility serialize: ' + JSON.stringify(r)
|
|
127
|
+
)
|
|
128
|
+
})
|
|
129
|
+
t.end()
|
|
130
|
+
})
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const tap = require('tap')
|
|
4
|
+
const test = tap.test
|
|
5
|
+
const URI = require('../')
|
|
6
|
+
|
|
7
|
+
const fn = URI.equal
|
|
8
|
+
const runTest = (t, suite) => {
|
|
9
|
+
suite.forEach(s => {
|
|
10
|
+
const operator = s.result ? '==' : '!='
|
|
11
|
+
t.equal(fn(s.pair[0], s.pair[1]), s.result, `${s.pair[0]} ${operator} ${s.pair[1]}`)
|
|
12
|
+
t.equal(fn(s.pair[1], s.pair[0]), s.result, `${s.pair[1]} ${operator} ${s.pair[0]}`)
|
|
13
|
+
})
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
test('URI Equals', (t) => {
|
|
17
|
+
const suite = [
|
|
18
|
+
{ pair: ['example://a/b/c/%7Bfoo%7D', 'eXAMPLE://a/./b/../b/%63/%7bfoo%7d'], result: true }, // test from RFC 3986
|
|
19
|
+
{ pair: ['http://example.org/~user', 'http://example.org/%7euser'], result: true } // test from RFC 3987
|
|
20
|
+
]
|
|
21
|
+
runTest(t, suite)
|
|
22
|
+
t.end()
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
// test('IRI Equals', (t) => {
|
|
26
|
+
// // example from RFC 3987
|
|
27
|
+
// t.equal(URI.equal('example://a/b/c/%7Bfoo%7D/ros\xE9', 'eXAMPLE://a/./b/../b/%63/%7bfoo%7d/ros%C3%A9', IRI_OPTION), true)
|
|
28
|
+
// t.end()
|
|
29
|
+
// })
|
|
30
|
+
|
|
31
|
+
test('HTTP Equals', (t) => {
|
|
32
|
+
const suite = [
|
|
33
|
+
// test from RFC 2616
|
|
34
|
+
{ pair: ['http://abc.com:80/~smith/home.html', 'http://abc.com/~smith/home.html'], result: true },
|
|
35
|
+
{ pair: [{ scheme: 'http', host: 'abc.com', port: 80, path: '/~smith/home.html' }, 'http://abc.com/~smith/home.html'], result: true },
|
|
36
|
+
{ pair: ['http://ABC.com/%7Esmith/home.html', 'http://abc.com/~smith/home.html'], result: true },
|
|
37
|
+
{ pair: ['http://ABC.com:/%7esmith/home.html', 'http://abc.com/~smith/home.html'], result: true },
|
|
38
|
+
{ pair: ['HTTP://ABC.COM', 'http://abc.com/'], result: true },
|
|
39
|
+
// test from RFC 3986
|
|
40
|
+
{ pair: ['http://example.com:/', 'http://example.com:80/'], result: true }
|
|
41
|
+
]
|
|
42
|
+
runTest(t, suite)
|
|
43
|
+
t.end()
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
test('HTTPS Equals', (t) => {
|
|
47
|
+
const suite = [
|
|
48
|
+
{ pair: ['https://example.com', 'https://example.com:443/'], result: true },
|
|
49
|
+
{ pair: ['https://example.com:/', 'https://example.com:443/'], result: true }
|
|
50
|
+
]
|
|
51
|
+
runTest(t, suite)
|
|
52
|
+
t.end()
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
test('URN Equals', (t) => {
|
|
56
|
+
const suite = [
|
|
57
|
+
// test from RFC 2141
|
|
58
|
+
{ pair: ['urn:foo:a123,456', 'urn:foo:a123,456'], result: true },
|
|
59
|
+
{ pair: ['urn:foo:a123,456', 'URN:foo:a123,456'], result: true },
|
|
60
|
+
{ pair: ['urn:foo:a123,456', 'urn:FOO:a123,456'], result: true }
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
// Disabling for now as the whole equal logic might need
|
|
64
|
+
// to be refactored
|
|
65
|
+
// t.equal(URI.equal('urn:foo:a123,456', 'urn:foo:A123,456'), false)
|
|
66
|
+
// t.equal(URI.equal('urn:foo:a123%2C456', 'URN:FOO:a123%2c456'), true)
|
|
67
|
+
|
|
68
|
+
runTest(t, suite)
|
|
69
|
+
t.end()
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
test('UUID Equals', (t) => {
|
|
73
|
+
const suite = [
|
|
74
|
+
{ pair: ['URN:UUID:F81D4FAE-7DEC-11D0-A765-00A0C91E6BF6', 'urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6'], result: true }
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
runTest(t, suite)
|
|
78
|
+
t.end()
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
// test('Mailto Equals', (t) => {
|
|
82
|
+
// // tests from RFC 6068
|
|
83
|
+
// t.equal(URI.equal('mailto:addr1@an.example,addr2@an.example', 'mailto:?to=addr1@an.example,addr2@an.example'), true)
|
|
84
|
+
// t.equal(URI.equal('mailto:?to=addr1@an.example,addr2@an.example', 'mailto:addr1@an.example?to=addr2@an.example'), true)
|
|
85
|
+
// t.end()
|
|
86
|
+
// })
|
|
87
|
+
|
|
88
|
+
test('WS Equal', (t) => {
|
|
89
|
+
const suite = [
|
|
90
|
+
{ pair: ['WS://ABC.COM:80/chat#one', 'ws://abc.com/chat'], result: true }
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
runTest(t, suite)
|
|
94
|
+
t.end()
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
test('WSS Equal', (t) => {
|
|
98
|
+
const suite = [
|
|
99
|
+
{ pair: ['WSS://ABC.COM:443/chat#one', 'wss://abc.com/chat'], result: true }
|
|
100
|
+
]
|
|
101
|
+
|
|
102
|
+
runTest(t, suite)
|
|
103
|
+
t.end()
|
|
104
|
+
})
|