cdk-ecr-deployment 3.3.0 → 3.3.1
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/.jsii +2 -6
- package/lib/index.js +3 -3
- package/package.json +1 -13
- package/build-lambda.sh +0 -12
- package/node_modules/@sindresorhus/is/dist/index.d.ts +0 -232
- package/node_modules/@sindresorhus/is/dist/index.js +0 -434
- package/node_modules/@sindresorhus/is/dist/types.d.ts +0 -25
- package/node_modules/@sindresorhus/is/dist/types.js +0 -3
- package/node_modules/@sindresorhus/is/license +0 -9
- package/node_modules/@sindresorhus/is/package.json +0 -96
- package/node_modules/@sindresorhus/is/readme.md +0 -669
- package/node_modules/@szmarczak/http-timer/LICENSE +0 -21
- package/node_modules/@szmarczak/http-timer/README.md +0 -93
- package/node_modules/@szmarczak/http-timer/dist/source/index.d.ts +0 -32
- package/node_modules/@szmarczak/http-timer/dist/source/index.js +0 -126
- package/node_modules/@szmarczak/http-timer/package.json +0 -72
- package/node_modules/@types/cacheable-request/LICENSE +0 -21
- package/node_modules/@types/cacheable-request/README.md +0 -16
- package/node_modules/@types/cacheable-request/index.d.ts +0 -137
- package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +0 -1095
- package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +0 -541
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.buffer.d.ts +0 -460
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +0 -1926
- package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +0 -1549
- package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +0 -579
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +0 -452
- package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +0 -21
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +0 -4510
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +0 -599
- package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +0 -476
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +0 -865
- package/node_modules/@types/cacheable-request/node_modules/@types/node/dom-events.d.ts +0 -124
- package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +0 -170
- package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +0 -931
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +0 -1275
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +0 -4343
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +0 -511
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.typedarray.d.ts +0 -21
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +0 -1959
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +0 -2558
- package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +0 -543
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +0 -92
- package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +0 -3966
- package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +0 -702
- package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +0 -1029
- package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +0 -495
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +0 -220
- package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +0 -200
- package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +0 -970
- package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +0 -2013
- package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +0 -117
- package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +0 -153
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +0 -162
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +0 -589
- package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +0 -430
- package/node_modules/@types/cacheable-request/node_modules/@types/node/sea.d.ts +0 -153
- package/node_modules/@types/cacheable-request/node_modules/@types/node/sqlite.d.ts +0 -439
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +0 -12
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +0 -90
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +0 -614
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +0 -1662
- package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +0 -2150
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +0 -97
- package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +0 -240
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +0 -1226
- package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +0 -197
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/index.d.ts +0 -92
- package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +0 -208
- package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +0 -972
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +0 -2439
- package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +0 -808
- package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +0 -976
- package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +0 -181
- package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +0 -745
- package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +0 -539
- package/node_modules/@types/cacheable-request/node_modules/undici-types/LICENSE +0 -21
- package/node_modules/@types/cacheable-request/node_modules/undici-types/README.md +0 -6
- package/node_modules/@types/cacheable-request/node_modules/undici-types/agent.d.ts +0 -31
- package/node_modules/@types/cacheable-request/node_modules/undici-types/api.d.ts +0 -43
- package/node_modules/@types/cacheable-request/node_modules/undici-types/balanced-pool.d.ts +0 -29
- package/node_modules/@types/cacheable-request/node_modules/undici-types/cache.d.ts +0 -36
- package/node_modules/@types/cacheable-request/node_modules/undici-types/client.d.ts +0 -108
- package/node_modules/@types/cacheable-request/node_modules/undici-types/connector.d.ts +0 -34
- package/node_modules/@types/cacheable-request/node_modules/undici-types/content-type.d.ts +0 -21
- package/node_modules/@types/cacheable-request/node_modules/undici-types/cookies.d.ts +0 -28
- package/node_modules/@types/cacheable-request/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
- package/node_modules/@types/cacheable-request/node_modules/undici-types/dispatcher.d.ts +0 -255
- package/node_modules/@types/cacheable-request/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
- package/node_modules/@types/cacheable-request/node_modules/undici-types/errors.d.ts +0 -149
- package/node_modules/@types/cacheable-request/node_modules/undici-types/eventsource.d.ts +0 -61
- package/node_modules/@types/cacheable-request/node_modules/undici-types/fetch.d.ts +0 -209
- package/node_modules/@types/cacheable-request/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/@types/cacheable-request/node_modules/undici-types/filereader.d.ts +0 -54
- package/node_modules/@types/cacheable-request/node_modules/undici-types/formdata.d.ts +0 -108
- package/node_modules/@types/cacheable-request/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/node_modules/@types/cacheable-request/node_modules/undici-types/global-origin.d.ts +0 -7
- package/node_modules/@types/cacheable-request/node_modules/undici-types/handlers.d.ts +0 -15
- package/node_modules/@types/cacheable-request/node_modules/undici-types/header.d.ts +0 -4
- package/node_modules/@types/cacheable-request/node_modules/undici-types/index.d.ts +0 -71
- package/node_modules/@types/cacheable-request/node_modules/undici-types/interceptors.d.ts +0 -17
- package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-client.d.ts +0 -25
- package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/node_modules/@types/cacheable-request/node_modules/undici-types/package.json +0 -55
- package/node_modules/@types/cacheable-request/node_modules/undici-types/patch.d.ts +0 -33
- package/node_modules/@types/cacheable-request/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/node_modules/@types/cacheable-request/node_modules/undici-types/pool.d.ts +0 -39
- package/node_modules/@types/cacheable-request/node_modules/undici-types/proxy-agent.d.ts +0 -28
- package/node_modules/@types/cacheable-request/node_modules/undici-types/readable.d.ts +0 -60
- package/node_modules/@types/cacheable-request/node_modules/undici-types/retry-agent.d.ts +0 -8
- package/node_modules/@types/cacheable-request/node_modules/undici-types/retry-handler.d.ts +0 -116
- package/node_modules/@types/cacheable-request/node_modules/undici-types/util.d.ts +0 -18
- package/node_modules/@types/cacheable-request/node_modules/undici-types/webidl.d.ts +0 -222
- package/node_modules/@types/cacheable-request/node_modules/undici-types/websocket.d.ts +0 -150
- package/node_modules/@types/cacheable-request/package.json +0 -35
- package/node_modules/@types/http-cache-semantics/LICENSE +0 -21
- package/node_modules/@types/http-cache-semantics/README.md +0 -15
- package/node_modules/@types/http-cache-semantics/index.d.ts +0 -165
- package/node_modules/@types/http-cache-semantics/package.json +0 -25
- package/node_modules/@types/keyv/LICENSE +0 -21
- package/node_modules/@types/keyv/README.md +0 -16
- package/node_modules/@types/keyv/index.d.ts +0 -90
- package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +0 -1095
- package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +0 -541
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.buffer.d.ts +0 -460
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +0 -1926
- package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +0 -1549
- package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +0 -579
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +0 -452
- package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +0 -21
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +0 -4510
- package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +0 -599
- package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
- package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +0 -476
- package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +0 -865
- package/node_modules/@types/keyv/node_modules/@types/node/dom-events.d.ts +0 -124
- package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +0 -170
- package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +0 -931
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +0 -1275
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +0 -4343
- package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +0 -511
- package/node_modules/@types/keyv/node_modules/@types/node/globals.typedarray.d.ts +0 -21
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +0 -1959
- package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +0 -2558
- package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +0 -543
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +0 -92
- package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +0 -3966
- package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +0 -702
- package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +0 -1029
- package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +0 -495
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +0 -220
- package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +0 -200
- package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +0 -970
- package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +0 -2013
- package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +0 -117
- package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +0 -153
- package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +0 -162
- package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +0 -589
- package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +0 -430
- package/node_modules/@types/keyv/node_modules/@types/node/sea.d.ts +0 -153
- package/node_modules/@types/keyv/node_modules/@types/node/sqlite.d.ts +0 -439
- package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +0 -12
- package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +0 -90
- package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +0 -614
- package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +0 -1662
- package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +0 -2150
- package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +0 -97
- package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +0 -240
- package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +0 -1226
- package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +0 -197
- package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
- package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
- package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/index.d.ts +0 -92
- package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +0 -208
- package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +0 -972
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +0 -2439
- package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +0 -808
- package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +0 -976
- package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +0 -181
- package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +0 -745
- package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +0 -539
- package/node_modules/@types/keyv/node_modules/undici-types/LICENSE +0 -21
- package/node_modules/@types/keyv/node_modules/undici-types/README.md +0 -6
- package/node_modules/@types/keyv/node_modules/undici-types/agent.d.ts +0 -31
- package/node_modules/@types/keyv/node_modules/undici-types/api.d.ts +0 -43
- package/node_modules/@types/keyv/node_modules/undici-types/balanced-pool.d.ts +0 -29
- package/node_modules/@types/keyv/node_modules/undici-types/cache.d.ts +0 -36
- package/node_modules/@types/keyv/node_modules/undici-types/client.d.ts +0 -108
- package/node_modules/@types/keyv/node_modules/undici-types/connector.d.ts +0 -34
- package/node_modules/@types/keyv/node_modules/undici-types/content-type.d.ts +0 -21
- package/node_modules/@types/keyv/node_modules/undici-types/cookies.d.ts +0 -28
- package/node_modules/@types/keyv/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
- package/node_modules/@types/keyv/node_modules/undici-types/dispatcher.d.ts +0 -255
- package/node_modules/@types/keyv/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
- package/node_modules/@types/keyv/node_modules/undici-types/errors.d.ts +0 -149
- package/node_modules/@types/keyv/node_modules/undici-types/eventsource.d.ts +0 -61
- package/node_modules/@types/keyv/node_modules/undici-types/fetch.d.ts +0 -209
- package/node_modules/@types/keyv/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/@types/keyv/node_modules/undici-types/filereader.d.ts +0 -54
- package/node_modules/@types/keyv/node_modules/undici-types/formdata.d.ts +0 -108
- package/node_modules/@types/keyv/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/node_modules/@types/keyv/node_modules/undici-types/global-origin.d.ts +0 -7
- package/node_modules/@types/keyv/node_modules/undici-types/handlers.d.ts +0 -15
- package/node_modules/@types/keyv/node_modules/undici-types/header.d.ts +0 -4
- package/node_modules/@types/keyv/node_modules/undici-types/index.d.ts +0 -71
- package/node_modules/@types/keyv/node_modules/undici-types/interceptors.d.ts +0 -17
- package/node_modules/@types/keyv/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/node_modules/@types/keyv/node_modules/undici-types/mock-client.d.ts +0 -25
- package/node_modules/@types/keyv/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/node_modules/@types/keyv/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/node_modules/@types/keyv/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/node_modules/@types/keyv/node_modules/undici-types/package.json +0 -55
- package/node_modules/@types/keyv/node_modules/undici-types/patch.d.ts +0 -33
- package/node_modules/@types/keyv/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/node_modules/@types/keyv/node_modules/undici-types/pool.d.ts +0 -39
- package/node_modules/@types/keyv/node_modules/undici-types/proxy-agent.d.ts +0 -28
- package/node_modules/@types/keyv/node_modules/undici-types/readable.d.ts +0 -60
- package/node_modules/@types/keyv/node_modules/undici-types/retry-agent.d.ts +0 -8
- package/node_modules/@types/keyv/node_modules/undici-types/retry-handler.d.ts +0 -116
- package/node_modules/@types/keyv/node_modules/undici-types/util.d.ts +0 -18
- package/node_modules/@types/keyv/node_modules/undici-types/webidl.d.ts +0 -222
- package/node_modules/@types/keyv/node_modules/undici-types/websocket.d.ts +0 -150
- package/node_modules/@types/keyv/package.json +0 -32
- package/node_modules/@types/responselike/LICENSE +0 -21
- package/node_modules/@types/responselike/README.md +0 -48
- package/node_modules/@types/responselike/index.d.ts +0 -29
- package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +0 -8
- package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +0 -1095
- package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +0 -541
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.buffer.d.ts +0 -460
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +0 -1926
- package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +0 -1549
- package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +0 -579
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +0 -452
- package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +0 -21
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +0 -4510
- package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +0 -599
- package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
- package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +0 -476
- package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +0 -865
- package/node_modules/@types/responselike/node_modules/@types/node/dom-events.d.ts +0 -124
- package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +0 -170
- package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +0 -931
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +0 -1275
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +0 -4343
- package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +0 -511
- package/node_modules/@types/responselike/node_modules/@types/node/globals.typedarray.d.ts +0 -21
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +0 -1959
- package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +0 -2558
- package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +0 -543
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +0 -92
- package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +0 -3966
- package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +0 -702
- package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +0 -1029
- package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +0 -495
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +0 -220
- package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +0 -200
- package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +0 -970
- package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +0 -2013
- package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +0 -117
- package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +0 -153
- package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +0 -162
- package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +0 -589
- package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +0 -430
- package/node_modules/@types/responselike/node_modules/@types/node/sea.d.ts +0 -153
- package/node_modules/@types/responselike/node_modules/@types/node/sqlite.d.ts +0 -439
- package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +0 -12
- package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +0 -90
- package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +0 -614
- package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +0 -1662
- package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +0 -2150
- package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +0 -97
- package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +0 -240
- package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +0 -1226
- package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +0 -197
- package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
- package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
- package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/index.d.ts +0 -92
- package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +0 -208
- package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +0 -972
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +0 -2439
- package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +0 -808
- package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +0 -976
- package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +0 -181
- package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +0 -745
- package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +0 -539
- package/node_modules/@types/responselike/node_modules/undici-types/LICENSE +0 -21
- package/node_modules/@types/responselike/node_modules/undici-types/README.md +0 -6
- package/node_modules/@types/responselike/node_modules/undici-types/agent.d.ts +0 -31
- package/node_modules/@types/responselike/node_modules/undici-types/api.d.ts +0 -43
- package/node_modules/@types/responselike/node_modules/undici-types/balanced-pool.d.ts +0 -29
- package/node_modules/@types/responselike/node_modules/undici-types/cache.d.ts +0 -36
- package/node_modules/@types/responselike/node_modules/undici-types/client.d.ts +0 -108
- package/node_modules/@types/responselike/node_modules/undici-types/connector.d.ts +0 -34
- package/node_modules/@types/responselike/node_modules/undici-types/content-type.d.ts +0 -21
- package/node_modules/@types/responselike/node_modules/undici-types/cookies.d.ts +0 -28
- package/node_modules/@types/responselike/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
- package/node_modules/@types/responselike/node_modules/undici-types/dispatcher.d.ts +0 -255
- package/node_modules/@types/responselike/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
- package/node_modules/@types/responselike/node_modules/undici-types/errors.d.ts +0 -149
- package/node_modules/@types/responselike/node_modules/undici-types/eventsource.d.ts +0 -61
- package/node_modules/@types/responselike/node_modules/undici-types/fetch.d.ts +0 -209
- package/node_modules/@types/responselike/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/@types/responselike/node_modules/undici-types/filereader.d.ts +0 -54
- package/node_modules/@types/responselike/node_modules/undici-types/formdata.d.ts +0 -108
- package/node_modules/@types/responselike/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/node_modules/@types/responselike/node_modules/undici-types/global-origin.d.ts +0 -7
- package/node_modules/@types/responselike/node_modules/undici-types/handlers.d.ts +0 -15
- package/node_modules/@types/responselike/node_modules/undici-types/header.d.ts +0 -4
- package/node_modules/@types/responselike/node_modules/undici-types/index.d.ts +0 -71
- package/node_modules/@types/responselike/node_modules/undici-types/interceptors.d.ts +0 -17
- package/node_modules/@types/responselike/node_modules/undici-types/mock-agent.d.ts +0 -50
- package/node_modules/@types/responselike/node_modules/undici-types/mock-client.d.ts +0 -25
- package/node_modules/@types/responselike/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/node_modules/@types/responselike/node_modules/undici-types/mock-interceptor.d.ts +0 -93
- package/node_modules/@types/responselike/node_modules/undici-types/mock-pool.d.ts +0 -25
- package/node_modules/@types/responselike/node_modules/undici-types/package.json +0 -55
- package/node_modules/@types/responselike/node_modules/undici-types/patch.d.ts +0 -33
- package/node_modules/@types/responselike/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/node_modules/@types/responselike/node_modules/undici-types/pool.d.ts +0 -39
- package/node_modules/@types/responselike/node_modules/undici-types/proxy-agent.d.ts +0 -28
- package/node_modules/@types/responselike/node_modules/undici-types/readable.d.ts +0 -60
- package/node_modules/@types/responselike/node_modules/undici-types/retry-agent.d.ts +0 -8
- package/node_modules/@types/responselike/node_modules/undici-types/retry-handler.d.ts +0 -116
- package/node_modules/@types/responselike/node_modules/undici-types/util.d.ts +0 -18
- package/node_modules/@types/responselike/node_modules/undici-types/webidl.d.ts +0 -222
- package/node_modules/@types/responselike/node_modules/undici-types/websocket.d.ts +0 -150
- package/node_modules/@types/responselike/package.json +0 -27
- package/node_modules/cacheable-lookup/LICENSE +0 -21
- package/node_modules/cacheable-lookup/README.md +0 -240
- package/node_modules/cacheable-lookup/index.d.ts +0 -139
- package/node_modules/cacheable-lookup/package.json +0 -45
- package/node_modules/cacheable-lookup/source/index.js +0 -436
- package/node_modules/cacheable-request/LICENSE +0 -21
- package/node_modules/cacheable-request/README.md +0 -206
- package/node_modules/cacheable-request/package.json +0 -56
- package/node_modules/cacheable-request/src/index.js +0 -251
- package/node_modules/clone-response/LICENSE +0 -21
- package/node_modules/clone-response/README.md +0 -62
- package/node_modules/clone-response/node_modules/mimic-response/index.js +0 -32
- package/node_modules/clone-response/node_modules/mimic-response/license +0 -9
- package/node_modules/clone-response/node_modules/mimic-response/package.json +0 -37
- package/node_modules/clone-response/node_modules/mimic-response/readme.md +0 -54
- package/node_modules/clone-response/package.json +0 -41
- package/node_modules/clone-response/src/index.js +0 -17
- package/node_modules/decompress-response/index.d.ts +0 -22
- package/node_modules/decompress-response/index.js +0 -58
- package/node_modules/decompress-response/license +0 -9
- package/node_modules/decompress-response/package.json +0 -56
- package/node_modules/decompress-response/readme.md +0 -48
- package/node_modules/defer-to-connect/LICENSE +0 -21
- package/node_modules/defer-to-connect/README.md +0 -38
- package/node_modules/defer-to-connect/dist/source/index.d.ts +0 -10
- package/node_modules/defer-to-connect/dist/source/index.js +0 -47
- package/node_modules/defer-to-connect/package.json +0 -71
- package/node_modules/end-of-stream/LICENSE +0 -21
- package/node_modules/end-of-stream/README.md +0 -54
- package/node_modules/end-of-stream/index.js +0 -94
- package/node_modules/end-of-stream/package.json +0 -37
- package/node_modules/get-stream/buffer-stream.js +0 -52
- package/node_modules/get-stream/index.d.ts +0 -108
- package/node_modules/get-stream/index.js +0 -60
- package/node_modules/get-stream/license +0 -9
- package/node_modules/get-stream/package.json +0 -50
- package/node_modules/get-stream/readme.md +0 -124
- package/node_modules/got/dist/source/as-promise/create-rejection.d.ts +0 -2
- package/node_modules/got/dist/source/as-promise/create-rejection.js +0 -30
- package/node_modules/got/dist/source/as-promise/index.d.ts +0 -3
- package/node_modules/got/dist/source/as-promise/index.js +0 -176
- package/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts +0 -3
- package/node_modules/got/dist/source/as-promise/normalize-arguments.js +0 -78
- package/node_modules/got/dist/source/as-promise/parse-body.d.ts +0 -3
- package/node_modules/got/dist/source/as-promise/parse-body.js +0 -25
- package/node_modules/got/dist/source/as-promise/types.d.ts +0 -256
- package/node_modules/got/dist/source/as-promise/types.js +0 -42
- package/node_modules/got/dist/source/core/calculate-retry-delay.d.ts +0 -5
- package/node_modules/got/dist/source/core/calculate-retry-delay.js +0 -29
- package/node_modules/got/dist/source/core/index.d.ts +0 -1124
- package/node_modules/got/dist/source/core/index.js +0 -1505
- package/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts +0 -5
- package/node_modules/got/dist/source/core/utils/dns-ip-version.js +0 -17
- package/node_modules/got/dist/source/core/utils/get-body-size.d.ts +0 -3
- package/node_modules/got/dist/source/core/utils/get-body-size.js +0 -32
- package/node_modules/got/dist/source/core/utils/get-buffer.d.ts +0 -4
- package/node_modules/got/dist/source/core/utils/get-buffer.js +0 -16
- package/node_modules/got/dist/source/core/utils/is-form-data.d.ts +0 -8
- package/node_modules/got/dist/source/core/utils/is-form-data.js +0 -4
- package/node_modules/got/dist/source/core/utils/is-response-ok.d.ts +0 -2
- package/node_modules/got/dist/source/core/utils/is-response-ok.js +0 -8
- package/node_modules/got/dist/source/core/utils/options-to-url.d.ts +0 -14
- package/node_modules/got/dist/source/core/utils/options-to-url.js +0 -53
- package/node_modules/got/dist/source/core/utils/proxy-events.d.ts +0 -3
- package/node_modules/got/dist/source/core/utils/proxy-events.js +0 -17
- package/node_modules/got/dist/source/core/utils/timed-out.d.ts +0 -29
- package/node_modules/got/dist/source/core/utils/timed-out.js +0 -121
- package/node_modules/got/dist/source/core/utils/unhandle.d.ts +0 -11
- package/node_modules/got/dist/source/core/utils/unhandle.js +0 -22
- package/node_modules/got/dist/source/core/utils/url-to-options.d.ts +0 -15
- package/node_modules/got/dist/source/core/utils/url-to-options.js +0 -24
- package/node_modules/got/dist/source/core/utils/weakable-map.d.ts +0 -8
- package/node_modules/got/dist/source/core/utils/weakable-map.js +0 -29
- package/node_modules/got/dist/source/create.d.ts +0 -5
- package/node_modules/got/dist/source/create.js +0 -240
- package/node_modules/got/dist/source/index.d.ts +0 -4
- package/node_modules/got/dist/source/index.js +0 -132
- package/node_modules/got/dist/source/types.d.ts +0 -344
- package/node_modules/got/dist/source/types.js +0 -2
- package/node_modules/got/dist/source/utils/deep-freeze.d.ts +0 -1
- package/node_modules/got/dist/source/utils/deep-freeze.js +0 -12
- package/node_modules/got/dist/source/utils/deprecation-warning.d.ts +0 -2
- package/node_modules/got/dist/source/utils/deprecation-warning.js +0 -13
- package/node_modules/got/license +0 -9
- package/node_modules/got/package.json +0 -131
- package/node_modules/got/readme.md +0 -2477
- package/node_modules/hpagent/.github/dependabot.yml +0 -8
- package/node_modules/hpagent/.github/workflows/build.yml +0 -29
- package/node_modules/hpagent/LICENSE +0 -21
- package/node_modules/hpagent/README.md +0 -138
- package/node_modules/hpagent/index.d.ts +0 -26
- package/node_modules/hpagent/index.js +0 -101
- package/node_modules/hpagent/index.mjs +0 -5
- package/node_modules/hpagent/package.json +0 -49
- package/node_modules/hpagent/test/got.test.js +0 -111
- package/node_modules/hpagent/test/http-http.test.js +0 -351
- package/node_modules/hpagent/test/http-https.test.js +0 -313
- package/node_modules/hpagent/test/https-http.test.js +0 -313
- package/node_modules/hpagent/test/https-https.test.js +0 -313
- package/node_modules/hpagent/test/index.test-d.ts +0 -45
- package/node_modules/hpagent/test/needle.test.js +0 -103
- package/node_modules/hpagent/test/node-fetch.test.js +0 -103
- package/node_modules/hpagent/test/simple-get.test.js +0 -139
- package/node_modules/hpagent/test/ssl.cert +0 -19
- package/node_modules/hpagent/test/ssl.key +0 -27
- package/node_modules/hpagent/test/utils.js +0 -59
- package/node_modules/http-cache-semantics/LICENSE +0 -9
- package/node_modules/http-cache-semantics/README.md +0 -203
- package/node_modules/http-cache-semantics/index.js +0 -674
- package/node_modules/http-cache-semantics/package.json +0 -18
- package/node_modules/http2-wrapper/LICENSE +0 -21
- package/node_modules/http2-wrapper/README.md +0 -470
- package/node_modules/http2-wrapper/package.json +0 -54
- package/node_modules/http2-wrapper/source/agent.js +0 -670
- package/node_modules/http2-wrapper/source/auto.js +0 -149
- package/node_modules/http2-wrapper/source/client-request.js +0 -445
- package/node_modules/http2-wrapper/source/incoming-message.js +0 -58
- package/node_modules/http2-wrapper/source/index.js +0 -28
- package/node_modules/http2-wrapper/source/utils/calculate-server-name.js +0 -27
- package/node_modules/http2-wrapper/source/utils/errors.js +0 -45
- package/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +0 -13
- package/node_modules/http2-wrapper/source/utils/proxy-events.js +0 -7
- package/node_modules/http2-wrapper/source/utils/url-to-options.js +0 -25
- package/node_modules/json-buffer/.travis.yml +0 -3
- package/node_modules/json-buffer/LICENSE +0 -22
- package/node_modules/json-buffer/README.md +0 -24
- package/node_modules/json-buffer/index.js +0 -58
- package/node_modules/json-buffer/package.json +0 -34
- package/node_modules/json-buffer/test/index.js +0 -63
- package/node_modules/keyv/README.md +0 -429
- package/node_modules/keyv/package.json +0 -57
- package/node_modules/keyv/src/index.d.ts +0 -112
- package/node_modules/keyv/src/index.js +0 -259
- package/node_modules/lowercase-keys/index.d.ts +0 -16
- package/node_modules/lowercase-keys/index.js +0 -10
- package/node_modules/lowercase-keys/license +0 -9
- package/node_modules/lowercase-keys/package.json +0 -38
- package/node_modules/lowercase-keys/readme.md +0 -32
- package/node_modules/mimic-response/index.d.ts +0 -17
- package/node_modules/mimic-response/index.js +0 -77
- package/node_modules/mimic-response/license +0 -9
- package/node_modules/mimic-response/package.json +0 -42
- package/node_modules/mimic-response/readme.md +0 -78
- package/node_modules/normalize-url/index.d.ts +0 -267
- package/node_modules/normalize-url/index.js +0 -216
- package/node_modules/normalize-url/license +0 -9
- package/node_modules/normalize-url/package.json +0 -50
- package/node_modules/normalize-url/readme.md +0 -286
- package/node_modules/once/LICENSE +0 -15
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -33
- package/node_modules/p-cancelable/index.d.ts +0 -176
- package/node_modules/p-cancelable/index.js +0 -111
- package/node_modules/p-cancelable/license +0 -9
- package/node_modules/p-cancelable/package.json +0 -49
- package/node_modules/p-cancelable/readme.md +0 -153
- package/node_modules/pump/.github/FUNDING.yml +0 -2
- package/node_modules/pump/.travis.yml +0 -5
- package/node_modules/pump/LICENSE +0 -21
- package/node_modules/pump/README.md +0 -74
- package/node_modules/pump/SECURITY.md +0 -5
- package/node_modules/pump/index.js +0 -86
- package/node_modules/pump/package.json +0 -24
- package/node_modules/pump/test-browser.js +0 -66
- package/node_modules/pump/test-node.js +0 -53
- package/node_modules/quick-lru/index.d.ts +0 -97
- package/node_modules/quick-lru/index.js +0 -123
- package/node_modules/quick-lru/license +0 -9
- package/node_modules/quick-lru/package.json +0 -43
- package/node_modules/quick-lru/readme.md +0 -111
- package/node_modules/resolve-alpn/LICENSE +0 -22
- package/node_modules/resolve-alpn/README.md +0 -60
- package/node_modules/resolve-alpn/index.js +0 -43
- package/node_modules/resolve-alpn/package.json +0 -34
- package/node_modules/responselike/LICENSE +0 -19
- package/node_modules/responselike/README.md +0 -77
- package/node_modules/responselike/package.json +0 -39
- package/node_modules/responselike/src/index.js +0 -34
- package/node_modules/wrappy/LICENSE +0 -15
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -29
- package/node_modules/wrappy/wrappy.js +0 -33
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
# normalize-url [](https://codecov.io/gh/sindresorhus/normalize-url)
|
|
2
|
-
|
|
3
|
-
> [Normalize](https://en.wikipedia.org/wiki/URL_normalization) a URL
|
|
4
|
-
|
|
5
|
-
Useful when you need to display, store, deduplicate, sort, compare, etc, URLs.
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
$ npm install normalize-url
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
*If you need to use this in the browser, use version 4: `npm i normalize-url@4`*
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
```js
|
|
18
|
-
const normalizeUrl = require('normalize-url');
|
|
19
|
-
|
|
20
|
-
normalizeUrl('sindresorhus.com');
|
|
21
|
-
//=> 'http://sindresorhus.com'
|
|
22
|
-
|
|
23
|
-
normalizeUrl('//www.sindresorhus.com:80/../baz?b=bar&a=foo');
|
|
24
|
-
//=> 'http://sindresorhus.com/baz?a=foo&b=bar'
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## API
|
|
28
|
-
|
|
29
|
-
### normalizeUrl(url, options?)
|
|
30
|
-
|
|
31
|
-
#### url
|
|
32
|
-
|
|
33
|
-
Type: `string`
|
|
34
|
-
|
|
35
|
-
URL to normalize, including [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs).
|
|
36
|
-
|
|
37
|
-
#### options
|
|
38
|
-
|
|
39
|
-
Type: `object`
|
|
40
|
-
|
|
41
|
-
##### defaultProtocol
|
|
42
|
-
|
|
43
|
-
Type: `string`\
|
|
44
|
-
Default: `http:`
|
|
45
|
-
|
|
46
|
-
##### normalizeProtocol
|
|
47
|
-
|
|
48
|
-
Type: `boolean`\
|
|
49
|
-
Default: `true`
|
|
50
|
-
|
|
51
|
-
Prepend `defaultProtocol` to the URL if it's protocol-relative.
|
|
52
|
-
|
|
53
|
-
```js
|
|
54
|
-
normalizeUrl('//sindresorhus.com:80/');
|
|
55
|
-
//=> 'http://sindresorhus.com'
|
|
56
|
-
|
|
57
|
-
normalizeUrl('//sindresorhus.com:80/', {normalizeProtocol: false});
|
|
58
|
-
//=> '//sindresorhus.com'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
##### forceHttp
|
|
62
|
-
|
|
63
|
-
Type: `boolean`\
|
|
64
|
-
Default: `false`
|
|
65
|
-
|
|
66
|
-
Normalize `https:` to `http:`.
|
|
67
|
-
|
|
68
|
-
```js
|
|
69
|
-
normalizeUrl('https://sindresorhus.com:80/');
|
|
70
|
-
//=> 'https://sindresorhus.com'
|
|
71
|
-
|
|
72
|
-
normalizeUrl('https://sindresorhus.com:80/', {forceHttp: true});
|
|
73
|
-
//=> 'http://sindresorhus.com'
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
##### forceHttps
|
|
77
|
-
|
|
78
|
-
Type: `boolean`\
|
|
79
|
-
Default: `false`
|
|
80
|
-
|
|
81
|
-
Normalize `http:` to `https:`.
|
|
82
|
-
|
|
83
|
-
```js
|
|
84
|
-
normalizeUrl('https://sindresorhus.com:80/');
|
|
85
|
-
//=> 'https://sindresorhus.com'
|
|
86
|
-
|
|
87
|
-
normalizeUrl('http://sindresorhus.com:80/', {forceHttps: true});
|
|
88
|
-
//=> 'https://sindresorhus.com'
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
This option can't be used with the `forceHttp` option at the same time.
|
|
92
|
-
|
|
93
|
-
##### stripAuthentication
|
|
94
|
-
|
|
95
|
-
Type: `boolean`\
|
|
96
|
-
Default: `true`
|
|
97
|
-
|
|
98
|
-
Strip the [authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) part of the URL.
|
|
99
|
-
|
|
100
|
-
```js
|
|
101
|
-
normalizeUrl('user:password@sindresorhus.com');
|
|
102
|
-
//=> 'https://sindresorhus.com'
|
|
103
|
-
|
|
104
|
-
normalizeUrl('user:password@sindresorhus.com', {stripAuthentication: false});
|
|
105
|
-
//=> 'https://user:password@sindresorhus.com'
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
##### stripHash
|
|
109
|
-
|
|
110
|
-
Type: `boolean`\
|
|
111
|
-
Default: `false`
|
|
112
|
-
|
|
113
|
-
Strip the hash part of the URL.
|
|
114
|
-
|
|
115
|
-
```js
|
|
116
|
-
normalizeUrl('sindresorhus.com/about.html#contact');
|
|
117
|
-
//=> 'http://sindresorhus.com/about.html#contact'
|
|
118
|
-
|
|
119
|
-
normalizeUrl('sindresorhus.com/about.html#contact', {stripHash: true});
|
|
120
|
-
//=> 'http://sindresorhus.com/about.html'
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
##### stripProtocol
|
|
124
|
-
|
|
125
|
-
Type: `boolean`\
|
|
126
|
-
Default: `false`
|
|
127
|
-
|
|
128
|
-
Remove HTTP(S) protocol from the URL: `http://sindresorhus.com` → `sindresorhus.com`.
|
|
129
|
-
|
|
130
|
-
```js
|
|
131
|
-
normalizeUrl('https://sindresorhus.com');
|
|
132
|
-
//=> 'https://sindresorhus.com'
|
|
133
|
-
|
|
134
|
-
normalizeUrl('https://sindresorhus.com', {stripProtocol: true});
|
|
135
|
-
//=> 'sindresorhus.com'
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
##### stripTextFragment
|
|
139
|
-
|
|
140
|
-
Type: `boolean`\
|
|
141
|
-
Default: `true`
|
|
142
|
-
|
|
143
|
-
Strip the [text fragment](https://web.dev/text-fragments/) part of the URL.
|
|
144
|
-
|
|
145
|
-
**Note:** The text fragment will always be removed if the `stripHash` option is set to `true`, as the hash contains the text fragment.
|
|
146
|
-
|
|
147
|
-
```js
|
|
148
|
-
normalizeUrl('http://sindresorhus.com/about.html#:~:text=hello');
|
|
149
|
-
//=> 'http://sindresorhus.com/about.html#'
|
|
150
|
-
|
|
151
|
-
normalizeUrl('http://sindresorhus.com/about.html#section:~:text=hello');
|
|
152
|
-
//=> 'http://sindresorhus.com/about.html#section'
|
|
153
|
-
|
|
154
|
-
normalizeUrl('http://sindresorhus.com/about.html#:~:text=hello', {stripTextFragment: false});
|
|
155
|
-
//=> 'http://sindresorhus.com/about.html#:~:text=hello'
|
|
156
|
-
|
|
157
|
-
normalizeUrl('http://sindresorhus.com/about.html#section:~:text=hello', {stripTextFragment: false});
|
|
158
|
-
//=> 'http://sindresorhus.com/about.html#section:~:text=hello'
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
##### stripWWW
|
|
162
|
-
|
|
163
|
-
Type: `boolean`\
|
|
164
|
-
Default: `true`
|
|
165
|
-
|
|
166
|
-
Remove `www.` from the URL.
|
|
167
|
-
|
|
168
|
-
```js
|
|
169
|
-
normalizeUrl('http://www.sindresorhus.com');
|
|
170
|
-
//=> 'http://sindresorhus.com'
|
|
171
|
-
|
|
172
|
-
normalizeUrl('http://www.sindresorhus.com', {stripWWW: false});
|
|
173
|
-
//=> 'http://www.sindresorhus.com'
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
##### removeQueryParameters
|
|
177
|
-
|
|
178
|
-
Type: `Array<RegExp | string> | boolean`\
|
|
179
|
-
Default: `[/^utm_\w+/i]`
|
|
180
|
-
|
|
181
|
-
Remove query parameters that matches any of the provided strings or regexes.
|
|
182
|
-
|
|
183
|
-
```js
|
|
184
|
-
normalizeUrl('www.sindresorhus.com?foo=bar&ref=test_ref', {
|
|
185
|
-
removeQueryParameters: ['ref']
|
|
186
|
-
});
|
|
187
|
-
//=> 'http://sindresorhus.com/?foo=bar'
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
If a boolean is provided, `true` will remove all the query parameters.
|
|
191
|
-
|
|
192
|
-
```js
|
|
193
|
-
normalizeUrl('www.sindresorhus.com?foo=bar', {
|
|
194
|
-
removeQueryParameters: true
|
|
195
|
-
});
|
|
196
|
-
//=> 'http://sindresorhus.com'
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
`false` will not remove any query parameter.
|
|
200
|
-
|
|
201
|
-
```js
|
|
202
|
-
normalizeUrl('www.sindresorhus.com?foo=bar&utm_medium=test&ref=test_ref', {
|
|
203
|
-
removeQueryParameters: false
|
|
204
|
-
});
|
|
205
|
-
//=> 'http://www.sindresorhus.com/?foo=bar&ref=test_ref&utm_medium=test'
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
##### removeTrailingSlash
|
|
209
|
-
|
|
210
|
-
Type: `boolean`\
|
|
211
|
-
Default: `true`
|
|
212
|
-
|
|
213
|
-
Remove trailing slash.
|
|
214
|
-
|
|
215
|
-
**Note:** Trailing slash is always removed if the URL doesn't have a pathname unless the `removeSingleSlash` option is set to `false`.
|
|
216
|
-
|
|
217
|
-
```js
|
|
218
|
-
normalizeUrl('http://sindresorhus.com/redirect/');
|
|
219
|
-
//=> 'http://sindresorhus.com/redirect'
|
|
220
|
-
|
|
221
|
-
normalizeUrl('http://sindresorhus.com/redirect/', {removeTrailingSlash: false});
|
|
222
|
-
//=> 'http://sindresorhus.com/redirect/'
|
|
223
|
-
|
|
224
|
-
normalizeUrl('http://sindresorhus.com/', {removeTrailingSlash: false});
|
|
225
|
-
//=> 'http://sindresorhus.com'
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
##### removeSingleSlash
|
|
229
|
-
|
|
230
|
-
Type: `boolean`\
|
|
231
|
-
Default: `true`
|
|
232
|
-
|
|
233
|
-
Remove a sole `/` pathname in the output. This option is independant of `removeTrailingSlash`.
|
|
234
|
-
|
|
235
|
-
```js
|
|
236
|
-
normalizeUrl('https://sindresorhus.com/');
|
|
237
|
-
//=> 'https://sindresorhus.com'
|
|
238
|
-
|
|
239
|
-
normalizeUrl('https://sindresorhus.com/', {removeSingleSlash: false});
|
|
240
|
-
//=> 'https://sindresorhus.com/'
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
##### removeDirectoryIndex
|
|
245
|
-
|
|
246
|
-
Type: `boolean | Array<RegExp | string>`\
|
|
247
|
-
Default: `false`
|
|
248
|
-
|
|
249
|
-
Removes the default directory index file from path that matches any of the provided strings or regexes. When `true`, the regex `/^index\.[a-z]+$/` is used.
|
|
250
|
-
|
|
251
|
-
```js
|
|
252
|
-
normalizeUrl('www.sindresorhus.com/foo/default.php', {
|
|
253
|
-
removeDirectoryIndex: [/^default\.[a-z]+$/]
|
|
254
|
-
});
|
|
255
|
-
//=> 'http://sindresorhus.com/foo'
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
##### sortQueryParameters
|
|
259
|
-
|
|
260
|
-
Type: `boolean`\
|
|
261
|
-
Default: `true`
|
|
262
|
-
|
|
263
|
-
Sorts the query parameters alphabetically by key.
|
|
264
|
-
|
|
265
|
-
```js
|
|
266
|
-
normalizeUrl('www.sindresorhus.com?b=two&a=one&c=three', {
|
|
267
|
-
sortQueryParameters: false
|
|
268
|
-
});
|
|
269
|
-
//=> 'http://sindresorhus.com/?b=two&a=one&c=three'
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
## Related
|
|
273
|
-
|
|
274
|
-
- [compare-urls](https://github.com/sindresorhus/compare-urls) - Compare URLs by first normalizing them
|
|
275
|
-
|
|
276
|
-
---
|
|
277
|
-
|
|
278
|
-
<div align="center">
|
|
279
|
-
<b>
|
|
280
|
-
<a href="https://tidelift.com/subscription/pkg/npm-normalize-url?utm_source=npm-normalize-url&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
|
281
|
-
</b>
|
|
282
|
-
<br>
|
|
283
|
-
<sub>
|
|
284
|
-
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
|
285
|
-
</sub>
|
|
286
|
-
</div>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
The ISC License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
-
copyright notice and this permission notice appear in all copies.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
15
|
-
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# once
|
|
2
|
-
|
|
3
|
-
Only call a function once.
|
|
4
|
-
|
|
5
|
-
## usage
|
|
6
|
-
|
|
7
|
-
```javascript
|
|
8
|
-
var once = require('once')
|
|
9
|
-
|
|
10
|
-
function load (file, cb) {
|
|
11
|
-
cb = once(cb)
|
|
12
|
-
loader.load('file')
|
|
13
|
-
loader.once('load', cb)
|
|
14
|
-
loader.once('error', cb)
|
|
15
|
-
}
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Or add to the Function.prototype in a responsible way:
|
|
19
|
-
|
|
20
|
-
```javascript
|
|
21
|
-
// only has to be done once
|
|
22
|
-
require('once').proto()
|
|
23
|
-
|
|
24
|
-
function load (file, cb) {
|
|
25
|
-
cb = cb.once()
|
|
26
|
-
loader.load('file')
|
|
27
|
-
loader.once('load', cb)
|
|
28
|
-
loader.once('error', cb)
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Ironically, the prototype feature makes this module twice as
|
|
33
|
-
complicated as necessary.
|
|
34
|
-
|
|
35
|
-
To check whether you function has been called, use `fn.called`. Once the
|
|
36
|
-
function is called for the first time the return value of the original
|
|
37
|
-
function is saved in `fn.value` and subsequent calls will continue to
|
|
38
|
-
return this value.
|
|
39
|
-
|
|
40
|
-
```javascript
|
|
41
|
-
var once = require('once')
|
|
42
|
-
|
|
43
|
-
function load (cb) {
|
|
44
|
-
cb = once(cb)
|
|
45
|
-
var stream = createStream()
|
|
46
|
-
stream.once('data', cb)
|
|
47
|
-
stream.once('end', function () {
|
|
48
|
-
if (!cb.called) cb(new Error('not found'))
|
|
49
|
-
})
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## `once.strict(func)`
|
|
54
|
-
|
|
55
|
-
Throw an error if the function is called twice.
|
|
56
|
-
|
|
57
|
-
Some functions are expected to be called only once. Using `once` for them would
|
|
58
|
-
potentially hide logical errors.
|
|
59
|
-
|
|
60
|
-
In the example below, the `greet` function has to call the callback only once:
|
|
61
|
-
|
|
62
|
-
```javascript
|
|
63
|
-
function greet (name, cb) {
|
|
64
|
-
// return is missing from the if statement
|
|
65
|
-
// when no name is passed, the callback is called twice
|
|
66
|
-
if (!name) cb('Hello anonymous')
|
|
67
|
-
cb('Hello ' + name)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function log (msg) {
|
|
71
|
-
console.log(msg)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// this will print 'Hello anonymous' but the logical error will be missed
|
|
75
|
-
greet(null, once(msg))
|
|
76
|
-
|
|
77
|
-
// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time
|
|
78
|
-
greet(null, once.strict(msg))
|
|
79
|
-
```
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var wrappy = require('wrappy')
|
|
2
|
-
module.exports = wrappy(once)
|
|
3
|
-
module.exports.strict = wrappy(onceStrict)
|
|
4
|
-
|
|
5
|
-
once.proto = once(function () {
|
|
6
|
-
Object.defineProperty(Function.prototype, 'once', {
|
|
7
|
-
value: function () {
|
|
8
|
-
return once(this)
|
|
9
|
-
},
|
|
10
|
-
configurable: true
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
Object.defineProperty(Function.prototype, 'onceStrict', {
|
|
14
|
-
value: function () {
|
|
15
|
-
return onceStrict(this)
|
|
16
|
-
},
|
|
17
|
-
configurable: true
|
|
18
|
-
})
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
function once (fn) {
|
|
22
|
-
var f = function () {
|
|
23
|
-
if (f.called) return f.value
|
|
24
|
-
f.called = true
|
|
25
|
-
return f.value = fn.apply(this, arguments)
|
|
26
|
-
}
|
|
27
|
-
f.called = false
|
|
28
|
-
return f
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function onceStrict (fn) {
|
|
32
|
-
var f = function () {
|
|
33
|
-
if (f.called)
|
|
34
|
-
throw new Error(f.onceError)
|
|
35
|
-
f.called = true
|
|
36
|
-
return f.value = fn.apply(this, arguments)
|
|
37
|
-
}
|
|
38
|
-
var name = fn.name || 'Function wrapped with `once`'
|
|
39
|
-
f.onceError = name + " shouldn't be called more than once"
|
|
40
|
-
f.called = false
|
|
41
|
-
return f
|
|
42
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "once",
|
|
3
|
-
"version": "1.4.0",
|
|
4
|
-
"description": "Run a function exactly one time",
|
|
5
|
-
"main": "once.js",
|
|
6
|
-
"directories": {
|
|
7
|
-
"test": "test"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"wrappy": "1"
|
|
11
|
-
},
|
|
12
|
-
"devDependencies": {
|
|
13
|
-
"tap": "^7.0.1"
|
|
14
|
-
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"test": "tap test/*.js"
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"once.js"
|
|
20
|
-
],
|
|
21
|
-
"repository": {
|
|
22
|
-
"type": "git",
|
|
23
|
-
"url": "git://github.com/isaacs/once"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [
|
|
26
|
-
"once",
|
|
27
|
-
"function",
|
|
28
|
-
"one",
|
|
29
|
-
"single"
|
|
30
|
-
],
|
|
31
|
-
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
|
|
32
|
-
"license": "ISC"
|
|
33
|
-
}
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
declare class CancelErrorClass extends Error {
|
|
2
|
-
readonly name: 'CancelError';
|
|
3
|
-
readonly isCanceled: true;
|
|
4
|
-
|
|
5
|
-
constructor(reason?: string);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
declare namespace PCancelable {
|
|
9
|
-
/**
|
|
10
|
-
Accepts a function that is called when the promise is canceled.
|
|
11
|
-
|
|
12
|
-
You're not required to call this function. You can call this function multiple times to add multiple cancel handlers.
|
|
13
|
-
*/
|
|
14
|
-
interface OnCancelFunction {
|
|
15
|
-
(cancelHandler: () => void): void;
|
|
16
|
-
shouldReject: boolean;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
type CancelError = CancelErrorClass;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
declare class PCancelable<ValueType> extends Promise<ValueType> {
|
|
23
|
-
/**
|
|
24
|
-
Convenience method to make your promise-returning or async function cancelable.
|
|
25
|
-
|
|
26
|
-
@param fn - A promise-returning function. The function you specify will have `onCancel` appended to its parameters.
|
|
27
|
-
|
|
28
|
-
@example
|
|
29
|
-
```
|
|
30
|
-
import PCancelable = require('p-cancelable');
|
|
31
|
-
|
|
32
|
-
const fn = PCancelable.fn((input, onCancel) => {
|
|
33
|
-
const job = new Job();
|
|
34
|
-
|
|
35
|
-
onCancel(() => {
|
|
36
|
-
job.cleanup();
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
return job.start(); //=> Promise
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
const cancelablePromise = fn('input'); //=> PCancelable
|
|
43
|
-
|
|
44
|
-
// …
|
|
45
|
-
|
|
46
|
-
cancelablePromise.cancel();
|
|
47
|
-
```
|
|
48
|
-
*/
|
|
49
|
-
static fn<ReturnType>(
|
|
50
|
-
userFn: (onCancel: PCancelable.OnCancelFunction) => PromiseLike<ReturnType>
|
|
51
|
-
): () => PCancelable<ReturnType>;
|
|
52
|
-
static fn<Agument1Type, ReturnType>(
|
|
53
|
-
userFn: (
|
|
54
|
-
argument1: Agument1Type,
|
|
55
|
-
onCancel: PCancelable.OnCancelFunction
|
|
56
|
-
) => PromiseLike<ReturnType>
|
|
57
|
-
): (argument1: Agument1Type) => PCancelable<ReturnType>;
|
|
58
|
-
static fn<Agument1Type, Agument2Type, ReturnType>(
|
|
59
|
-
userFn: (
|
|
60
|
-
argument1: Agument1Type,
|
|
61
|
-
argument2: Agument2Type,
|
|
62
|
-
onCancel: PCancelable.OnCancelFunction
|
|
63
|
-
) => PromiseLike<ReturnType>
|
|
64
|
-
): (
|
|
65
|
-
argument1: Agument1Type,
|
|
66
|
-
argument2: Agument2Type
|
|
67
|
-
) => PCancelable<ReturnType>;
|
|
68
|
-
static fn<Agument1Type, Agument2Type, Agument3Type, ReturnType>(
|
|
69
|
-
userFn: (
|
|
70
|
-
argument1: Agument1Type,
|
|
71
|
-
argument2: Agument2Type,
|
|
72
|
-
argument3: Agument3Type,
|
|
73
|
-
onCancel: PCancelable.OnCancelFunction
|
|
74
|
-
) => PromiseLike<ReturnType>
|
|
75
|
-
): (
|
|
76
|
-
argument1: Agument1Type,
|
|
77
|
-
argument2: Agument2Type,
|
|
78
|
-
argument3: Agument3Type
|
|
79
|
-
) => PCancelable<ReturnType>;
|
|
80
|
-
static fn<Agument1Type, Agument2Type, Agument3Type, Agument4Type, ReturnType>(
|
|
81
|
-
userFn: (
|
|
82
|
-
argument1: Agument1Type,
|
|
83
|
-
argument2: Agument2Type,
|
|
84
|
-
argument3: Agument3Type,
|
|
85
|
-
argument4: Agument4Type,
|
|
86
|
-
onCancel: PCancelable.OnCancelFunction
|
|
87
|
-
) => PromiseLike<ReturnType>
|
|
88
|
-
): (
|
|
89
|
-
argument1: Agument1Type,
|
|
90
|
-
argument2: Agument2Type,
|
|
91
|
-
argument3: Agument3Type,
|
|
92
|
-
argument4: Agument4Type
|
|
93
|
-
) => PCancelable<ReturnType>;
|
|
94
|
-
static fn<
|
|
95
|
-
Agument1Type,
|
|
96
|
-
Agument2Type,
|
|
97
|
-
Agument3Type,
|
|
98
|
-
Agument4Type,
|
|
99
|
-
Agument5Type,
|
|
100
|
-
ReturnType
|
|
101
|
-
>(
|
|
102
|
-
userFn: (
|
|
103
|
-
argument1: Agument1Type,
|
|
104
|
-
argument2: Agument2Type,
|
|
105
|
-
argument3: Agument3Type,
|
|
106
|
-
argument4: Agument4Type,
|
|
107
|
-
argument5: Agument5Type,
|
|
108
|
-
onCancel: PCancelable.OnCancelFunction
|
|
109
|
-
) => PromiseLike<ReturnType>
|
|
110
|
-
): (
|
|
111
|
-
argument1: Agument1Type,
|
|
112
|
-
argument2: Agument2Type,
|
|
113
|
-
argument3: Agument3Type,
|
|
114
|
-
argument4: Agument4Type,
|
|
115
|
-
argument5: Agument5Type
|
|
116
|
-
) => PCancelable<ReturnType>;
|
|
117
|
-
static fn<ReturnType>(
|
|
118
|
-
userFn: (...arguments: unknown[]) => PromiseLike<ReturnType>
|
|
119
|
-
): (...arguments: unknown[]) => PCancelable<ReturnType>;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
Create a promise that can be canceled.
|
|
123
|
-
|
|
124
|
-
Can be constructed in the same was as a [`Promise` constructor](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), but with an appended `onCancel` parameter in `executor`. `PCancelable` is a subclass of `Promise`.
|
|
125
|
-
|
|
126
|
-
Cancelling will reject the promise with `CancelError`. To avoid that, set `onCancel.shouldReject` to `false`.
|
|
127
|
-
|
|
128
|
-
@example
|
|
129
|
-
```
|
|
130
|
-
import PCancelable = require('p-cancelable');
|
|
131
|
-
|
|
132
|
-
const cancelablePromise = new PCancelable((resolve, reject, onCancel) => {
|
|
133
|
-
const job = new Job();
|
|
134
|
-
|
|
135
|
-
onCancel.shouldReject = false;
|
|
136
|
-
onCancel(() => {
|
|
137
|
-
job.stop();
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
job.on('finish', resolve);
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
cancelablePromise.cancel(); // Doesn't throw an error
|
|
144
|
-
```
|
|
145
|
-
*/
|
|
146
|
-
constructor(
|
|
147
|
-
executor: (
|
|
148
|
-
resolve: (value?: ValueType | PromiseLike<ValueType>) => void,
|
|
149
|
-
reject: (reason?: unknown) => void,
|
|
150
|
-
onCancel: PCancelable.OnCancelFunction
|
|
151
|
-
) => void
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
Whether the promise is canceled.
|
|
156
|
-
*/
|
|
157
|
-
readonly isCanceled: boolean;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
Cancel the promise and optionally provide a reason.
|
|
161
|
-
|
|
162
|
-
The cancellation is synchronous. Calling it after the promise has settled or multiple times does nothing.
|
|
163
|
-
|
|
164
|
-
@param reason - The cancellation reason to reject the promise with.
|
|
165
|
-
*/
|
|
166
|
-
cancel: (reason?: string) => void;
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
Rejection reason when `.cancel()` is called.
|
|
170
|
-
|
|
171
|
-
It includes a `.isCanceled` property for convenience.
|
|
172
|
-
*/
|
|
173
|
-
static CancelError: typeof CancelErrorClass;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export = PCancelable;
|