@bleedingdev/modern-js-utils 3.9.0-ultramodern.2 → 3.9.0-ultramodern.20
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/dist/cjs/cli/applyOptionsChain.js +1 -1
- package/dist/cjs/cli/get/config.js +1 -1
- package/dist/cjs/cli/require.js +13 -8
- package/dist/cjs/compiled.js +1 -9
- package/dist/cjs/universal/index.js +5 -25
- package/dist/compiled/browserslist/index.js +37 -35
- package/dist/compiled/chokidar/types/index.d.ts +1 -1
- package/dist/compiled/commander/index.js +2 -3
- package/dist/compiled/debug/index.js +1 -1
- package/dist/compiled/execa/index.js +8 -6
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts +1 -1
- package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts +1 -1
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts +1 -1
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts +1 -1
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts +1 -1
- package/dist/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts +1 -1
- package/dist/compiled/fast-glob/out/types/index.d.ts +1 -1
- package/dist/compiled/fs-extra/index.js +39 -35
- package/dist/compiled/glob/index.js +17 -15
- package/dist/compiled/inquirer/index.js +29 -25
- package/dist/compiled/inquirer/lib/prompts/base.d.ts +100 -0
- package/dist/compiled/inquirer/lib/prompts/checkbox.d.ts +116 -0
- package/dist/compiled/inquirer/lib/prompts/confirm.d.ts +53 -0
- package/dist/compiled/inquirer/lib/prompts/editor.d.ts +101 -0
- package/dist/compiled/inquirer/lib/prompts/expand.d.ts +149 -0
- package/dist/compiled/inquirer/lib/prompts/input.d.ts +82 -0
- package/dist/compiled/inquirer/lib/prompts/list.d.ts +89 -0
- package/dist/compiled/inquirer/lib/prompts/number.d.ts +32 -0
- package/dist/compiled/inquirer/lib/prompts/password.d.ts +82 -0
- package/dist/compiled/inquirer/lib/prompts/rawlist.d.ts +111 -0
- package/dist/compiled/inquirer/lib/utils/events.d.ts +72 -0
- package/dist/compiled/inquirer/lib/utils/incrementListIndex.d.ts +23 -0
- package/dist/compiled/inquirer/lib/utils/paginator.d.ts +55 -0
- package/dist/compiled/inquirer/lib/utils/readline.d.ts +56 -0
- package/dist/compiled/inquirer/lib/utils/screen-manager.d.ts +90 -0
- package/dist/compiled/inquirer/lib/utils/utils.d.ts +30 -0
- package/dist/compiled/inquirer/rxjs/LICENSE.txt +202 -0
- package/dist/compiled/inquirer/rxjs/ajax/index.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/fetch/index.d.ts +2 -0
- package/dist/compiled/inquirer/rxjs/index.d.ts +173 -0
- package/dist/compiled/inquirer/rxjs/internal/AnyCatcher.d.ts +10 -0
- package/dist/compiled/inquirer/rxjs/internal/AsyncSubject.d.ts +13 -0
- package/dist/compiled/inquirer/rxjs/internal/BehaviorSubject.d.ts +13 -0
- package/dist/compiled/inquirer/rxjs/internal/Notification.d.ts +175 -0
- package/dist/compiled/inquirer/rxjs/internal/NotificationFactories.d.ts +2 -0
- package/dist/compiled/inquirer/rxjs/internal/Observable.d.ts +121 -0
- package/dist/compiled/inquirer/rxjs/internal/Operator.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/ReplaySubject.d.ts +49 -0
- package/dist/compiled/inquirer/rxjs/internal/Scheduler.d.ts +53 -0
- package/dist/compiled/inquirer/rxjs/internal/Subject.d.ts +54 -0
- package/dist/compiled/inquirer/rxjs/internal/Subscriber.d.ts +72 -0
- package/dist/compiled/inquirer/rxjs/internal/Subscription.d.ts +92 -0
- package/dist/compiled/inquirer/rxjs/internal/ajax/AjaxResponse.d.ts +115 -0
- package/dist/compiled/inquirer/rxjs/internal/ajax/ajax.d.ts +227 -0
- package/dist/compiled/inquirer/rxjs/internal/ajax/errors.d.ts +65 -0
- package/dist/compiled/inquirer/rxjs/internal/ajax/getXHRResponse.d.ts +14 -0
- package/dist/compiled/inquirer/rxjs/internal/ajax/types.d.ts +200 -0
- package/dist/compiled/inquirer/rxjs/internal/config.d.ts +73 -0
- package/dist/compiled/inquirer/rxjs/internal/firstValueFrom.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/lastValueFrom.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/ConnectableObservable.d.ts +42 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/bindCallback.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/bindCallbackInternals.d.ts +4 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/bindNodeCallback.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/combineLatest.d.ts +33 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/concat.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/connectable.d.ts +27 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/defer.d.ts +51 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/dom/WebSocketSubject.d.ts +173 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/dom/animationFrames.d.ts +76 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/dom/fetch.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/dom/webSocket.d.ts +159 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/empty.d.ts +72 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/forkJoin.d.ts +24 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/from.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/fromEvent.d.ts +45 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/fromEventPattern.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/fromSubscribable.d.ts +14 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/generate.d.ts +314 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/iif.d.ts +82 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/innerFrom.d.ts +21 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/interval.d.ts +48 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/merge.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/never.d.ts +40 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/of.d.ts +14 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/onErrorResumeNext.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/pairs.d.ts +19 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/partition.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/race.d.ts +12 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/range.d.ts +8 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/throwError.d.ts +115 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/timer.d.ts +126 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/using.d.ts +30 -0
- package/dist/compiled/inquirer/rxjs/internal/observable/zip.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/OperatorSubscriber.d.ts +41 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/audit.d.ts +48 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/auditTime.d.ts +50 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/buffer.d.ts +41 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/bufferCount.d.ts +54 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/bufferTime.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/bufferToggle.d.ts +46 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/bufferWhen.d.ts +41 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/catchError.d.ts +4 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/combineAll.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/combineLatest.d.ts +10 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/combineLatestAll.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/combineLatestWith.d.ts +43 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/concat.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/concatAll.d.ts +59 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/concatMap.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/concatMapTo.d.ts +8 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/concatWith.d.ts +43 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/connect.d.ts +87 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/count.d.ts +58 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/debounce.d.ts +61 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/debounceTime.d.ts +59 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/defaultIfEmpty.d.ts +38 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/delay.d.ts +59 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/delayWhen.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/dematerialize.d.ts +51 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/distinct.d.ts +60 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/distinctUntilChanged.d.ts +4 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/distinctUntilKeyChanged.d.ts +4 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/elementAt.d.ts +51 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/endWith.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/every.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/exhaust.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/exhaustAll.d.ts +47 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/exhaustMap.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/expand.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/filter.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/finalize.d.ts +64 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/find.d.ts +12 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/findIndex.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/first.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/flatMap.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/groupBy.d.ts +119 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/ignoreElements.d.ts +38 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/isEmpty.d.ts +64 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/joinAllInternals.d.ts +14 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/last.d.ts +8 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/map.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/mapTo.d.ts +10 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/materialize.d.ts +52 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/max.d.ts +50 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/merge.d.ts +10 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/mergeAll.d.ts +62 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/mergeInternals.d.ts +18 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/mergeMap.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/mergeMapTo.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/mergeScan.d.ts +68 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/mergeWith.d.ts +44 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/min.d.ts +50 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/multicast.d.ts +63 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/observeOn.d.ts +56 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/onErrorResumeNextWith.d.ts +8 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/pairwise.d.ts +46 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/partition.d.ts +54 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/pluck.d.ts +18 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/publish.d.ts +30 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/publishBehavior.d.ts +19 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/publishLast.d.ts +69 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/publishReplay.d.ts +56 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/race.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/raceWith.d.ts +29 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/reduce.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/refCount.d.ts +61 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/repeat.d.ts +108 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/repeatWhen.d.ts +38 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/retry.d.ts +28 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/retryWhen.d.ts +61 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/sample.d.ts +43 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/sampleTime.d.ts +46 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/scan.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/scanInternals.d.ts +12 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/sequenceEqual.d.ts +60 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/share.d.ts +43 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/shareReplay.d.ts +10 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/single.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/skip.d.ts +36 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/skipLast.d.ts +45 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/skipUntil.d.ts +48 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/skipWhile.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/startWith.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/subscribeOn.d.ts +62 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/switchAll.d.ts +61 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/switchMap.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/switchMapTo.d.ts +8 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/switchScan.d.ts +20 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/take.d.ts +45 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/takeLast.d.ts +42 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/takeUntil.d.ts +41 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/takeWhile.d.ts +8 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/tap.d.ts +72 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/throttle.d.ts +78 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/throttleTime.d.ts +53 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/throwIfEmpty.d.ts +39 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/timeInterval.d.ts +50 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/timeout.d.ts +255 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/timeoutWith.d.ts +8 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/timestamp.d.ts +35 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/toArray.d.ts +33 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/window.d.ts +48 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/windowCount.d.ts +65 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/windowTime.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/windowToggle.d.ts +49 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/windowWhen.d.ts +49 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/withLatestFrom.d.ts +4 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/zip.d.ts +10 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/zipAll.d.ts +14 -0
- package/dist/compiled/inquirer/rxjs/internal/operators/zipWith.d.ts +26 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduled/scheduleArray.d.ts +4 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduled/scheduleAsyncIterable.d.ts +4 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduled/scheduleIterable.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduled/scheduleObservable.d.ts +3 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduled/schedulePromise.d.ts +3 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduled/scheduleReadableStreamLike.d.ts +4 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduled/scheduled.d.ts +15 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/Action.d.ts +30 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/AnimationFrameAction.d.ts +12 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/AnimationFrameScheduler.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/AsapAction.d.ts +12 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/AsapScheduler.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/AsyncAction.d.ts +24 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/AsyncScheduler.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/QueueAction.d.ts +14 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/QueueScheduler.d.ts +4 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/VirtualTimeScheduler.d.ts +48 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/animationFrame.d.ts +38 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/animationFrameProvider.d.ts +13 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/asap.d.ts +41 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/async.d.ts +53 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/dateTimestampProvider.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/immediateProvider.d.ts +14 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/intervalProvider.d.ts +14 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/performanceTimestampProvider.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/queue.d.ts +69 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/timeoutProvider.d.ts +14 -0
- package/dist/compiled/inquirer/rxjs/internal/scheduler/timerHandle.d.ts +2 -0
- package/dist/compiled/inquirer/rxjs/internal/symbol/iterator.d.ts +3 -0
- package/dist/compiled/inquirer/rxjs/internal/symbol/observable.d.ts +8 -0
- package/dist/compiled/inquirer/rxjs/internal/testing/ColdObservable.d.ts +16 -0
- package/dist/compiled/inquirer/rxjs/internal/testing/HotObservable.d.ts +15 -0
- package/dist/compiled/inquirer/rxjs/internal/testing/SubscriptionLog.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/testing/SubscriptionLoggable.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/testing/TestMessage.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/testing/TestScheduler.d.ts +88 -0
- package/dist/compiled/inquirer/rxjs/internal/types.d.ts +307 -0
- package/dist/compiled/inquirer/rxjs/internal/util/ArgumentOutOfRangeError.d.ts +19 -0
- package/dist/compiled/inquirer/rxjs/internal/util/EmptyError.d.ts +21 -0
- package/dist/compiled/inquirer/rxjs/internal/util/Immediate.d.ts +14 -0
- package/dist/compiled/inquirer/rxjs/internal/util/NotFoundError.d.ts +17 -0
- package/dist/compiled/inquirer/rxjs/internal/util/ObjectUnsubscribedError.d.ts +20 -0
- package/dist/compiled/inquirer/rxjs/internal/util/SequenceError.d.ts +17 -0
- package/dist/compiled/inquirer/rxjs/internal/util/UnsubscriptionError.d.ts +16 -0
- package/dist/compiled/inquirer/rxjs/internal/util/applyMixins.d.ts +2 -0
- package/dist/compiled/inquirer/rxjs/internal/util/args.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/util/argsArgArrayOrObject.d.ts +11 -0
- package/dist/compiled/inquirer/rxjs/internal/util/argsOrArgArray.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/util/arrRemove.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/util/createErrorClass.d.ts +11 -0
- package/dist/compiled/inquirer/rxjs/internal/util/createObject.d.ts +2 -0
- package/dist/compiled/inquirer/rxjs/internal/util/errorContext.d.ts +14 -0
- package/dist/compiled/inquirer/rxjs/internal/util/executeSchedule.d.ts +5 -0
- package/dist/compiled/inquirer/rxjs/internal/util/identity.d.ts +44 -0
- package/dist/compiled/inquirer/rxjs/internal/util/isArrayLike.d.ts +2 -0
- package/dist/compiled/inquirer/rxjs/internal/util/isAsyncIterable.d.ts +2 -0
- package/dist/compiled/inquirer/rxjs/internal/util/isDate.d.ts +9 -0
- package/dist/compiled/inquirer/rxjs/internal/util/isFunction.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/util/isInteropObservable.d.ts +4 -0
- package/dist/compiled/inquirer/rxjs/internal/util/isIterable.d.ts +3 -0
- package/dist/compiled/inquirer/rxjs/internal/util/isObservable.d.ts +8 -0
- package/dist/compiled/inquirer/rxjs/internal/util/isPromise.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/util/isReadableStreamLike.d.ts +4 -0
- package/dist/compiled/inquirer/rxjs/internal/util/isScheduler.d.ts +3 -0
- package/dist/compiled/inquirer/rxjs/internal/util/lift.d.ts +15 -0
- package/dist/compiled/inquirer/rxjs/internal/util/mapOneOrManyArgs.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/util/noop.d.ts +2 -0
- package/dist/compiled/inquirer/rxjs/internal/util/not.d.ts +2 -0
- package/dist/compiled/inquirer/rxjs/internal/util/pipe.d.ts +14 -0
- package/dist/compiled/inquirer/rxjs/internal/util/reportUnhandledError.d.ts +11 -0
- package/dist/compiled/inquirer/rxjs/internal/util/subscribeToArray.d.ts +7 -0
- package/dist/compiled/inquirer/rxjs/internal/util/throwUnobservableError.d.ts +6 -0
- package/dist/compiled/inquirer/rxjs/internal/util/workarounds.d.ts +2 -0
- package/dist/compiled/inquirer/rxjs/operators/index.d.ts +114 -0
- package/dist/compiled/inquirer/rxjs/testing/index.d.ts +2 -0
- package/dist/compiled/inquirer/rxjs/webSocket/index.d.ts +3 -0
- package/dist/compiled/inquirer/types-license +21 -0
- package/dist/compiled/js-yaml/index.js +1 -2
- package/dist/compiled/js-yaml/index.mjs +1 -2
- package/dist/compiled/lodash/index.d.ts +1 -11
- package/dist/compiled/minimist/index.js +1 -2
- package/dist/compiled/ora/index.js +17 -15
- package/dist/compiled/semver/index.js +12 -13
- package/dist/compiled/signale/index.js +3 -3
- package/dist/compiled/upath/index.js +15 -11
- package/dist/compiled/upath/upath.d.ts +2 -2
- package/dist/compiled/webpack-chain/index.js +5 -3
- package/dist/esm/cli/applyOptionsChain.mjs +1 -1
- package/dist/esm/cli/get/config.mjs +1 -1
- package/dist/esm/cli/require.mjs +14 -6
- package/dist/esm/compiled.mjs +1 -10
- package/dist/esm/universal/index.mjs +0 -2
- package/dist/esm-node/cli/applyOptionsChain.mjs +1 -1
- package/dist/esm-node/cli/get/config.mjs +1 -1
- package/dist/esm-node/cli/require.mjs +14 -6
- package/dist/esm-node/compiled.mjs +1 -9
- package/dist/esm-node/universal/index.mjs +0 -2
- package/dist/types/cli/require.d.ts +0 -1
- package/dist/types/compiled.d.ts +6 -6
- package/dist/types/universal/index.d.ts +0 -2
- package/package.json +7 -6
- package/rslib.config.mts +2 -0
- package/dist/cjs/universal/backend-federation-contract/build-artifact.js +0 -185
- package/dist/cjs/universal/backend-federation-contract/constants.js +0 -92
- package/dist/cjs/universal/backend-federation-contract/delivery-unit.js +0 -130
- package/dist/cjs/universal/backend-federation-contract/index.js +0 -137
- package/dist/cjs/universal/backend-federation-contract/metadata.js +0 -133
- package/dist/cjs/universal/backend-federation-contract/types.js +0 -18
- package/dist/cjs/universal/backend-federation-contract/validation-core.js +0 -85
- package/dist/cjs/universal/surface-resolution/env-static-provider.js +0 -318
- package/dist/cjs/universal/surface-resolution/index.js +0 -69
- package/dist/cjs/universal/surface-resolution/surface-ref.js +0 -132
- package/dist/cjs/universal/surface-resolution/types.js +0 -18
- package/dist/cjs/universal/surface-resolution/validation.js +0 -202
- package/dist/esm/rslib-runtime~1.mjs +0 -12
- package/dist/esm/universal/backend-federation-contract/build-artifact.mjs +0 -135
- package/dist/esm/universal/backend-federation-contract/constants.mjs +0 -18
- package/dist/esm/universal/backend-federation-contract/delivery-unit.mjs +0 -74
- package/dist/esm/universal/backend-federation-contract/index.mjs +0 -5
- package/dist/esm/universal/backend-federation-contract/metadata.mjs +0 -80
- package/dist/esm/universal/backend-federation-contract/types.mjs +0 -0
- package/dist/esm/universal/backend-federation-contract/validation-core.mjs +0 -29
- package/dist/esm/universal/surface-resolution/env-static-provider.mjs +0 -274
- package/dist/esm/universal/surface-resolution/index.mjs +0 -3
- package/dist/esm/universal/surface-resolution/surface-ref.mjs +0 -88
- package/dist/esm/universal/surface-resolution/types.mjs +0 -0
- package/dist/esm/universal/surface-resolution/validation.mjs +0 -155
- package/dist/esm-node/universal/backend-federation-contract/build-artifact.mjs +0 -136
- package/dist/esm-node/universal/backend-federation-contract/constants.mjs +0 -19
- package/dist/esm-node/universal/backend-federation-contract/delivery-unit.mjs +0 -75
- package/dist/esm-node/universal/backend-federation-contract/index.mjs +0 -6
- package/dist/esm-node/universal/backend-federation-contract/metadata.mjs +0 -81
- package/dist/esm-node/universal/backend-federation-contract/types.mjs +0 -1
- package/dist/esm-node/universal/backend-federation-contract/validation-core.mjs +0 -30
- package/dist/esm-node/universal/surface-resolution/env-static-provider.mjs +0 -275
- package/dist/esm-node/universal/surface-resolution/index.mjs +0 -4
- package/dist/esm-node/universal/surface-resolution/surface-ref.mjs +0 -89
- package/dist/esm-node/universal/surface-resolution/types.mjs +0 -1
- package/dist/esm-node/universal/surface-resolution/validation.mjs +0 -156
- package/dist/types/universal/backend-federation-contract/build-artifact.d.ts +0 -9
- package/dist/types/universal/backend-federation-contract/constants.d.ts +0 -14
- package/dist/types/universal/backend-federation-contract/delivery-unit.d.ts +0 -9
- package/dist/types/universal/backend-federation-contract/index.d.ts +0 -7
- package/dist/types/universal/backend-federation-contract/metadata.d.ts +0 -7
- package/dist/types/universal/backend-federation-contract/types.d.ts +0 -60
- package/dist/types/universal/backend-federation-contract/validation-core.d.ts +0 -8
- package/dist/types/universal/surface-resolution/env-static-provider.d.ts +0 -107
- package/dist/types/universal/surface-resolution/index.d.ts +0 -4
- package/dist/types/universal/surface-resolution/surface-ref.d.ts +0 -72
- package/dist/types/universal/surface-resolution/types.d.ts +0 -102
- package/dist/types/universal/surface-resolution/validation.d.ts +0 -53
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Observable } from '../../Observable';
|
|
2
|
+
import { TimestampProvider } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* An observable of animation frames
|
|
5
|
+
*
|
|
6
|
+
* Emits the amount of time elapsed since subscription and the timestamp on each animation frame.
|
|
7
|
+
* Defaults to milliseconds provided to the requestAnimationFrame's callback. Does not end on its own.
|
|
8
|
+
*
|
|
9
|
+
* Every subscription will start a separate animation loop. Since animation frames are always scheduled
|
|
10
|
+
* by the browser to occur directly before a repaint, scheduling more than one animation frame synchronously
|
|
11
|
+
* should not be much different or have more overhead than looping over an array of events during
|
|
12
|
+
* a single animation frame. However, if for some reason the developer would like to ensure the
|
|
13
|
+
* execution of animation-related handlers are all executed during the same task by the engine,
|
|
14
|
+
* the `share` operator can be used.
|
|
15
|
+
*
|
|
16
|
+
* This is useful for setting up animations with RxJS.
|
|
17
|
+
*
|
|
18
|
+
* ## Examples
|
|
19
|
+
*
|
|
20
|
+
* Tweening a div to move it on the screen
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* import { animationFrames, map, takeWhile, endWith } from '../../..';
|
|
24
|
+
*
|
|
25
|
+
* function tween(start: number, end: number, duration: number) {
|
|
26
|
+
* const diff = end - start;
|
|
27
|
+
* return animationFrames().pipe(
|
|
28
|
+
* // Figure out what percentage of time has passed
|
|
29
|
+
* map(({ elapsed }) => elapsed / duration),
|
|
30
|
+
* // Take the vector while less than 100%
|
|
31
|
+
* takeWhile(v => v < 1),
|
|
32
|
+
* // Finish with 100%
|
|
33
|
+
* endWith(1),
|
|
34
|
+
* // Calculate the distance traveled between start and end
|
|
35
|
+
* map(v => v * diff + start)
|
|
36
|
+
* );
|
|
37
|
+
* }
|
|
38
|
+
*
|
|
39
|
+
* // Setup a div for us to move around
|
|
40
|
+
* const div = document.createElement('div');
|
|
41
|
+
* document.body.appendChild(div);
|
|
42
|
+
* div.style.position = 'absolute';
|
|
43
|
+
* div.style.width = '40px';
|
|
44
|
+
* div.style.height = '40px';
|
|
45
|
+
* div.style.backgroundColor = 'lime';
|
|
46
|
+
* div.style.transform = 'translate3d(10px, 0, 0)';
|
|
47
|
+
*
|
|
48
|
+
* tween(10, 200, 4000).subscribe(x => {
|
|
49
|
+
* div.style.transform = `translate3d(${ x }px, 0, 0)`;
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* Providing a custom timestamp provider
|
|
54
|
+
*
|
|
55
|
+
* ```ts
|
|
56
|
+
* import { animationFrames, TimestampProvider } from '../../..';
|
|
57
|
+
*
|
|
58
|
+
* // A custom timestamp provider
|
|
59
|
+
* let now = 0;
|
|
60
|
+
* const customTSProvider: TimestampProvider = {
|
|
61
|
+
* now() { return now++; }
|
|
62
|
+
* };
|
|
63
|
+
*
|
|
64
|
+
* const source$ = animationFrames(customTSProvider);
|
|
65
|
+
*
|
|
66
|
+
* // Log increasing numbers 0...1...2... on every animation frame.
|
|
67
|
+
* source$.subscribe(({ elapsed }) => console.log(elapsed));
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* @param timestampProvider An object with a `now` method that provides a numeric timestamp
|
|
71
|
+
*/
|
|
72
|
+
export declare function animationFrames(timestampProvider?: TimestampProvider): Observable<{
|
|
73
|
+
timestamp: number;
|
|
74
|
+
elapsed: number;
|
|
75
|
+
}>;
|
|
76
|
+
//# sourceMappingURL=animationFrames.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Observable } from '../../Observable';
|
|
2
|
+
import { ObservableInput } from '../../types';
|
|
3
|
+
export declare function fromFetch<T>(input: string | Request, init: RequestInit & {
|
|
4
|
+
selector: (response: Response) => ObservableInput<T>;
|
|
5
|
+
}): Observable<T>;
|
|
6
|
+
export declare function fromFetch(input: string | Request, init?: RequestInit): Observable<Response>;
|
|
7
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { WebSocketSubject, WebSocketSubjectConfig } from './WebSocketSubject';
|
|
2
|
+
/**
|
|
3
|
+
* Wrapper around the w3c-compatible WebSocket object provided by the browser.
|
|
4
|
+
*
|
|
5
|
+
* <span class="informal">{@link Subject} that communicates with a server via WebSocket</span>
|
|
6
|
+
*
|
|
7
|
+
* `webSocket` is a factory function that produces a `WebSocketSubject`,
|
|
8
|
+
* which can be used to make WebSocket connection with an arbitrary endpoint.
|
|
9
|
+
* `webSocket` accepts as an argument either a string with url of WebSocket endpoint, or an
|
|
10
|
+
* {@link WebSocketSubjectConfig} object for providing additional configuration, as
|
|
11
|
+
* well as Observers for tracking lifecycle of WebSocket connection.
|
|
12
|
+
*
|
|
13
|
+
* When `WebSocketSubject` is subscribed, it attempts to make a socket connection,
|
|
14
|
+
* unless there is one made already. This means that many subscribers will always listen
|
|
15
|
+
* on the same socket, thus saving resources. If however, two instances are made of `WebSocketSubject`,
|
|
16
|
+
* even if these two were provided with the same url, they will attempt to make separate
|
|
17
|
+
* connections. When consumer of a `WebSocketSubject` unsubscribes, socket connection is closed,
|
|
18
|
+
* only if there are no more subscribers still listening. If after some time a consumer starts
|
|
19
|
+
* subscribing again, connection is reestablished.
|
|
20
|
+
*
|
|
21
|
+
* Once connection is made, whenever a new message comes from the server, `WebSocketSubject` will emit that
|
|
22
|
+
* message as a value in the stream. By default, a message from the socket is parsed via `JSON.parse`. If you
|
|
23
|
+
* want to customize how deserialization is handled (if at all), you can provide custom `resultSelector`
|
|
24
|
+
* function in {@link WebSocketSubject}. When connection closes, stream will complete, provided it happened without
|
|
25
|
+
* any errors. If at any point (starting, maintaining or closing a connection) there is an error,
|
|
26
|
+
* stream will also error with whatever WebSocket API has thrown.
|
|
27
|
+
*
|
|
28
|
+
* By virtue of being a {@link Subject}, `WebSocketSubject` allows for receiving and sending messages from the server. In order
|
|
29
|
+
* to communicate with a connected endpoint, use `next`, `error` and `complete` methods. `next` sends a value to the server, so bear in mind
|
|
30
|
+
* that this value will not be serialized beforehand. Because of This, `JSON.stringify` will have to be called on a value by hand,
|
|
31
|
+
* before calling `next` with a result. Note also that if at the moment of nexting value
|
|
32
|
+
* there is no socket connection (for example no one is subscribing), those values will be buffered, and sent when connection
|
|
33
|
+
* is finally established. `complete` method closes socket connection. `error` does the same,
|
|
34
|
+
* as well as notifying the server that something went wrong via status code and string with details of what happened.
|
|
35
|
+
* Since status code is required in WebSocket API, `WebSocketSubject` does not allow, like regular `Subject`,
|
|
36
|
+
* arbitrary values being passed to the `error` method. It needs to be called with an object that has `code`
|
|
37
|
+
* property with status code number and optional `reason` property with string describing details
|
|
38
|
+
* of an error.
|
|
39
|
+
*
|
|
40
|
+
* Calling `next` does not affect subscribers of `WebSocketSubject` - they have no
|
|
41
|
+
* information that something was sent to the server (unless of course the server
|
|
42
|
+
* responds somehow to a message). On the other hand, since calling `complete` triggers
|
|
43
|
+
* an attempt to close socket connection. If that connection is closed without any errors, stream will
|
|
44
|
+
* complete, thus notifying all subscribers. And since calling `error` closes
|
|
45
|
+
* socket connection as well, just with a different status code for the server, if closing itself proceeds
|
|
46
|
+
* without errors, subscribed Observable will not error, as one might expect, but complete as usual. In both cases
|
|
47
|
+
* (calling `complete` or `error`), if process of closing socket connection results in some errors, *then* stream
|
|
48
|
+
* will error.
|
|
49
|
+
*
|
|
50
|
+
* **Multiplexing**
|
|
51
|
+
*
|
|
52
|
+
* `WebSocketSubject` has an additional operator, not found in other Subjects. It is called `multiplex` and it is
|
|
53
|
+
* used to simulate opening several socket connections, while in reality maintaining only one.
|
|
54
|
+
* For example, an application has both chat panel and real-time notifications about sport news. Since these are two distinct functions,
|
|
55
|
+
* it would make sense to have two separate connections for each. Perhaps there could even be two separate services with WebSocket
|
|
56
|
+
* endpoints, running on separate machines with only GUI combining them together. Having a socket connection
|
|
57
|
+
* for each functionality could become too resource expensive. It is a common pattern to have single
|
|
58
|
+
* WebSocket endpoint that acts as a gateway for the other services (in this case chat and sport news services).
|
|
59
|
+
* Even though there is a single connection in a client app, having the ability to manipulate streams as if it
|
|
60
|
+
* were two separate sockets is desirable. This eliminates manually registering and unregistering in a gateway for
|
|
61
|
+
* given service and filter out messages of interest. This is exactly what `multiplex` method is for.
|
|
62
|
+
*
|
|
63
|
+
* Method accepts three parameters. First two are functions returning subscription and unsubscription messages
|
|
64
|
+
* respectively. These are messages that will be sent to the server, whenever consumer of resulting Observable
|
|
65
|
+
* subscribes and unsubscribes. Server can use them to verify that some kind of messages should start or stop
|
|
66
|
+
* being forwarded to the client. In case of the above example application, after getting subscription message with proper identifier,
|
|
67
|
+
* gateway server can decide that it should connect to real sport news service and start forwarding messages from it.
|
|
68
|
+
* Note that both messages will be sent as returned by the functions, they are by default serialized using JSON.stringify, just
|
|
69
|
+
* as messages pushed via `next`. Also bear in mind that these messages will be sent on *every* subscription and
|
|
70
|
+
* unsubscription. This is potentially dangerous, because one consumer of an Observable may unsubscribe and the server
|
|
71
|
+
* might stop sending messages, since it got unsubscription message. This needs to be handled
|
|
72
|
+
* on the server or using {@link publish} on a Observable returned from 'multiplex'.
|
|
73
|
+
*
|
|
74
|
+
* Last argument to `multiplex` is a `messageFilter` function which should return a boolean. It is used to filter out messages
|
|
75
|
+
* sent by the server to only those that belong to simulated WebSocket stream. For example, server might mark these
|
|
76
|
+
* messages with some kind of string identifier on a message object and `messageFilter` would return `true`
|
|
77
|
+
* if there is such identifier on an object emitted by the socket. Messages which returns `false` in `messageFilter` are simply skipped,
|
|
78
|
+
* and are not passed down the stream.
|
|
79
|
+
*
|
|
80
|
+
* Return value of `multiplex` is an Observable with messages incoming from emulated socket connection. Note that this
|
|
81
|
+
* is not a `WebSocketSubject`, so calling `next` or `multiplex` again will fail. For pushing values to the
|
|
82
|
+
* server, use root `WebSocketSubject`.
|
|
83
|
+
*
|
|
84
|
+
* ## Examples
|
|
85
|
+
*
|
|
86
|
+
* Listening for messages from the server
|
|
87
|
+
*
|
|
88
|
+
* ```ts
|
|
89
|
+
* import { webSocket } from 'rxjs/webSocket';
|
|
90
|
+
*
|
|
91
|
+
* const subject = webSocket('ws://localhost:8081');
|
|
92
|
+
*
|
|
93
|
+
* subject.subscribe({
|
|
94
|
+
* next: msg => console.log('message received: ' + msg), // Called whenever there is a message from the server.
|
|
95
|
+
* error: err => console.log(err), // Called if at any point WebSocket API signals some kind of error.
|
|
96
|
+
* complete: () => console.log('complete') // Called when connection is closed (for whatever reason).
|
|
97
|
+
* });
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* Pushing messages to the server
|
|
101
|
+
*
|
|
102
|
+
* ```ts
|
|
103
|
+
* import { webSocket } from 'rxjs/webSocket';
|
|
104
|
+
*
|
|
105
|
+
* const subject = webSocket('ws://localhost:8081');
|
|
106
|
+
*
|
|
107
|
+
* subject.subscribe();
|
|
108
|
+
* // Note that at least one consumer has to subscribe to the created subject - otherwise "nexted" values will be just buffered and not sent,
|
|
109
|
+
* // since no connection was established!
|
|
110
|
+
*
|
|
111
|
+
* subject.next({ message: 'some message' });
|
|
112
|
+
* // This will send a message to the server once a connection is made. Remember value is serialized with JSON.stringify by default!
|
|
113
|
+
*
|
|
114
|
+
* subject.complete(); // Closes the connection.
|
|
115
|
+
*
|
|
116
|
+
* subject.error({ code: 4000, reason: 'I think our app just broke!' });
|
|
117
|
+
* // Also closes the connection, but let's the server know that this closing is caused by some error.
|
|
118
|
+
* ```
|
|
119
|
+
*
|
|
120
|
+
* Multiplexing WebSocket
|
|
121
|
+
*
|
|
122
|
+
* ```ts
|
|
123
|
+
* import { webSocket } from 'rxjs/webSocket';
|
|
124
|
+
*
|
|
125
|
+
* const subject = webSocket('ws://localhost:8081');
|
|
126
|
+
*
|
|
127
|
+
* const observableA = subject.multiplex(
|
|
128
|
+
* () => ({ subscribe: 'A' }), // When server gets this message, it will start sending messages for 'A'...
|
|
129
|
+
* () => ({ unsubscribe: 'A' }), // ...and when gets this one, it will stop.
|
|
130
|
+
* message => message.type === 'A' // If the function returns `true` message is passed down the stream. Skipped if the function returns false.
|
|
131
|
+
* );
|
|
132
|
+
*
|
|
133
|
+
* const observableB = subject.multiplex( // And the same goes for 'B'.
|
|
134
|
+
* () => ({ subscribe: 'B' }),
|
|
135
|
+
* () => ({ unsubscribe: 'B' }),
|
|
136
|
+
* message => message.type === 'B'
|
|
137
|
+
* );
|
|
138
|
+
*
|
|
139
|
+
* const subA = observableA.subscribe(messageForA => console.log(messageForA));
|
|
140
|
+
* // At this moment WebSocket connection is established. Server gets '{"subscribe": "A"}' message and starts sending messages for 'A',
|
|
141
|
+
* // which we log here.
|
|
142
|
+
*
|
|
143
|
+
* const subB = observableB.subscribe(messageForB => console.log(messageForB));
|
|
144
|
+
* // Since we already have a connection, we just send '{"subscribe": "B"}' message to the server. It starts sending messages for 'B',
|
|
145
|
+
* // which we log here.
|
|
146
|
+
*
|
|
147
|
+
* subB.unsubscribe();
|
|
148
|
+
* // Message '{"unsubscribe": "B"}' is sent to the server, which stops sending 'B' messages.
|
|
149
|
+
*
|
|
150
|
+
* subA.unsubscribe();
|
|
151
|
+
* // Message '{"unsubscribe": "A"}' makes the server stop sending messages for 'A'. Since there is no more subscribers to root Subject,
|
|
152
|
+
* // socket connection closes.
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* @param urlConfigOrSource The WebSocket endpoint as an url or an object with configuration and additional Observers.
|
|
156
|
+
* @return Subject which allows to both send and receive messages via WebSocket connection.
|
|
157
|
+
*/
|
|
158
|
+
export declare function webSocket<T>(urlConfigOrSource: string | WebSocketSubjectConfig<T>): WebSocketSubject<T>;
|
|
159
|
+
//# sourceMappingURL=webSocket.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Observable } from '../Observable';
|
|
2
|
+
import { SchedulerLike } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* A simple Observable that emits no items to the Observer and immediately
|
|
5
|
+
* emits a complete notification.
|
|
6
|
+
*
|
|
7
|
+
* <span class="informal">Just emits 'complete', and nothing else.</span>
|
|
8
|
+
*
|
|
9
|
+
* 
|
|
10
|
+
*
|
|
11
|
+
* A simple Observable that only emits the complete notification. It can be used
|
|
12
|
+
* for composing with other Observables, such as in a {@link mergeMap}.
|
|
13
|
+
*
|
|
14
|
+
* ## Examples
|
|
15
|
+
*
|
|
16
|
+
* Log complete notification
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { EMPTY } from '../..';
|
|
20
|
+
*
|
|
21
|
+
* EMPTY.subscribe({
|
|
22
|
+
* next: () => console.log('Next'),
|
|
23
|
+
* complete: () => console.log('Complete!')
|
|
24
|
+
* });
|
|
25
|
+
*
|
|
26
|
+
* // Outputs
|
|
27
|
+
* // Complete!
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* Emit the number 7, then complete
|
|
31
|
+
*
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { EMPTY, startWith } from '../..';
|
|
34
|
+
*
|
|
35
|
+
* const result = EMPTY.pipe(startWith(7));
|
|
36
|
+
* result.subscribe(x => console.log(x));
|
|
37
|
+
*
|
|
38
|
+
* // Outputs
|
|
39
|
+
* // 7
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* Map and flatten only odd numbers to the sequence `'a'`, `'b'`, `'c'`
|
|
43
|
+
*
|
|
44
|
+
* ```ts
|
|
45
|
+
* import { interval, mergeMap, of, EMPTY } from '../..';
|
|
46
|
+
*
|
|
47
|
+
* const interval$ = interval(1000);
|
|
48
|
+
* const result = interval$.pipe(
|
|
49
|
+
* mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : EMPTY),
|
|
50
|
+
* );
|
|
51
|
+
* result.subscribe(x => console.log(x));
|
|
52
|
+
*
|
|
53
|
+
* // Results in the following to the console:
|
|
54
|
+
* // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...)
|
|
55
|
+
* // x will occur every 1000ms
|
|
56
|
+
* // if x % 2 is equal to 1, print a, b, c (each on its own)
|
|
57
|
+
* // if x % 2 is not equal to 1, nothing will be output
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @see {@link Observable}
|
|
61
|
+
* @see {@link NEVER}
|
|
62
|
+
* @see {@link of}
|
|
63
|
+
* @see {@link throwError}
|
|
64
|
+
*/
|
|
65
|
+
export declare const EMPTY: Observable<never>;
|
|
66
|
+
/**
|
|
67
|
+
* @param scheduler A {@link SchedulerLike} to use for scheduling
|
|
68
|
+
* the emission of the complete notification.
|
|
69
|
+
* @deprecated Replaced with the {@link EMPTY} constant or {@link scheduled} (e.g. `scheduled([], scheduler)`). Will be removed in v8.
|
|
70
|
+
*/
|
|
71
|
+
export declare function empty(scheduler?: SchedulerLike): Observable<never>;
|
|
72
|
+
//# sourceMappingURL=empty.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Observable } from '../Observable';
|
|
2
|
+
import { ObservedValueOf, ObservableInputTuple, ObservableInput } from '../types';
|
|
3
|
+
import { AnyCatcher } from '../AnyCatcher';
|
|
4
|
+
/**
|
|
5
|
+
* You have passed `any` here, we can't figure out if it is
|
|
6
|
+
* an array or an object, so you're getting `unknown`. Use better types.
|
|
7
|
+
* @param arg Something typed as `any`
|
|
8
|
+
*/
|
|
9
|
+
export declare function forkJoin<T extends AnyCatcher>(arg: T): Observable<unknown>;
|
|
10
|
+
export declare function forkJoin(scheduler: null | undefined): Observable<never>;
|
|
11
|
+
export declare function forkJoin(sources: readonly []): Observable<never>;
|
|
12
|
+
export declare function forkJoin<A extends readonly unknown[]>(sources: readonly [...ObservableInputTuple<A>]): Observable<A>;
|
|
13
|
+
export declare function forkJoin<A extends readonly unknown[], R>(sources: readonly [...ObservableInputTuple<A>], resultSelector: (...values: A) => R): Observable<R>;
|
|
14
|
+
/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */
|
|
15
|
+
export declare function forkJoin<A extends readonly unknown[]>(...sources: [...ObservableInputTuple<A>]): Observable<A>;
|
|
16
|
+
/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */
|
|
17
|
+
export declare function forkJoin<A extends readonly unknown[], R>(...sourcesAndResultSelector: [...ObservableInputTuple<A>, (...values: A) => R]): Observable<R>;
|
|
18
|
+
export declare function forkJoin(sourcesObject: {
|
|
19
|
+
[K in any]: never;
|
|
20
|
+
}): Observable<never>;
|
|
21
|
+
export declare function forkJoin<T extends Record<string, ObservableInput<any>>>(sourcesObject: T): Observable<{
|
|
22
|
+
[K in keyof T]: ObservedValueOf<T[K]>;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=forkJoin.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Observable } from '../Observable';
|
|
2
|
+
import { ObservableInput, SchedulerLike, ObservedValueOf } from '../types';
|
|
3
|
+
export declare function from<O extends ObservableInput<any>>(input: O): Observable<ObservedValueOf<O>>;
|
|
4
|
+
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */
|
|
5
|
+
export declare function from<O extends ObservableInput<any>>(input: O, scheduler: SchedulerLike | undefined): Observable<ObservedValueOf<O>>;
|
|
6
|
+
//# sourceMappingURL=from.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Observable } from '../Observable';
|
|
2
|
+
export interface NodeStyleEventEmitter {
|
|
3
|
+
addListener(eventName: string | symbol, handler: NodeEventHandler): this;
|
|
4
|
+
removeListener(eventName: string | symbol, handler: NodeEventHandler): this;
|
|
5
|
+
}
|
|
6
|
+
export declare type NodeEventHandler = (...args: any[]) => void;
|
|
7
|
+
export interface NodeCompatibleEventEmitter {
|
|
8
|
+
addListener(eventName: string, handler: NodeEventHandler): void | {};
|
|
9
|
+
removeListener(eventName: string, handler: NodeEventHandler): void | {};
|
|
10
|
+
}
|
|
11
|
+
export interface JQueryStyleEventEmitter<TContext, T> {
|
|
12
|
+
on(eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any): void;
|
|
13
|
+
off(eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any): void;
|
|
14
|
+
}
|
|
15
|
+
export interface EventListenerObject<E> {
|
|
16
|
+
handleEvent(evt: E): void;
|
|
17
|
+
}
|
|
18
|
+
export interface HasEventTargetAddRemove<E> {
|
|
19
|
+
addEventListener(type: string, listener: ((evt: E) => void) | EventListenerObject<E> | null, options?: boolean | AddEventListenerOptions): void;
|
|
20
|
+
removeEventListener(type: string, listener: ((evt: E) => void) | EventListenerObject<E> | null, options?: EventListenerOptions | boolean): void;
|
|
21
|
+
}
|
|
22
|
+
export interface EventListenerOptions {
|
|
23
|
+
capture?: boolean;
|
|
24
|
+
passive?: boolean;
|
|
25
|
+
once?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface AddEventListenerOptions extends EventListenerOptions {
|
|
28
|
+
once?: boolean;
|
|
29
|
+
passive?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare function fromEvent<T>(target: HasEventTargetAddRemove<T> | ArrayLike<HasEventTargetAddRemove<T>>, eventName: string): Observable<T>;
|
|
32
|
+
export declare function fromEvent<T, R>(target: HasEventTargetAddRemove<T> | ArrayLike<HasEventTargetAddRemove<T>>, eventName: string, resultSelector: (event: T) => R): Observable<R>;
|
|
33
|
+
export declare function fromEvent<T>(target: HasEventTargetAddRemove<T> | ArrayLike<HasEventTargetAddRemove<T>>, eventName: string, options: EventListenerOptions): Observable<T>;
|
|
34
|
+
export declare function fromEvent<T, R>(target: HasEventTargetAddRemove<T> | ArrayLike<HasEventTargetAddRemove<T>>, eventName: string, options: EventListenerOptions, resultSelector: (event: T) => R): Observable<R>;
|
|
35
|
+
export declare function fromEvent(target: NodeStyleEventEmitter | ArrayLike<NodeStyleEventEmitter>, eventName: string): Observable<unknown>;
|
|
36
|
+
/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */
|
|
37
|
+
export declare function fromEvent<T>(target: NodeStyleEventEmitter | ArrayLike<NodeStyleEventEmitter>, eventName: string): Observable<T>;
|
|
38
|
+
export declare function fromEvent<R>(target: NodeStyleEventEmitter | ArrayLike<NodeStyleEventEmitter>, eventName: string, resultSelector: (...args: any[]) => R): Observable<R>;
|
|
39
|
+
export declare function fromEvent(target: NodeCompatibleEventEmitter | ArrayLike<NodeCompatibleEventEmitter>, eventName: string): Observable<unknown>;
|
|
40
|
+
/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */
|
|
41
|
+
export declare function fromEvent<T>(target: NodeCompatibleEventEmitter | ArrayLike<NodeCompatibleEventEmitter>, eventName: string): Observable<T>;
|
|
42
|
+
export declare function fromEvent<R>(target: NodeCompatibleEventEmitter | ArrayLike<NodeCompatibleEventEmitter>, eventName: string, resultSelector: (...args: any[]) => R): Observable<R>;
|
|
43
|
+
export declare function fromEvent<T>(target: JQueryStyleEventEmitter<any, T> | ArrayLike<JQueryStyleEventEmitter<any, T>>, eventName: string): Observable<T>;
|
|
44
|
+
export declare function fromEvent<T, R>(target: JQueryStyleEventEmitter<any, T> | ArrayLike<JQueryStyleEventEmitter<any, T>>, eventName: string, resultSelector: (value: T, ...args: any[]) => R): Observable<R>;
|
|
45
|
+
//# sourceMappingURL=fromEvent.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Observable } from '../Observable';
|
|
2
|
+
import { NodeEventHandler } from './fromEvent';
|
|
3
|
+
export declare function fromEventPattern<T>(addHandler: (handler: NodeEventHandler) => any, removeHandler?: (handler: NodeEventHandler, signal?: any) => void): Observable<T>;
|
|
4
|
+
export declare function fromEventPattern<T>(addHandler: (handler: NodeEventHandler) => any, removeHandler?: (handler: NodeEventHandler, signal?: any) => void, resultSelector?: (...args: any[]) => T): Observable<T>;
|
|
5
|
+
//# sourceMappingURL=fromEventPattern.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Observable } from '../Observable';
|
|
2
|
+
import { Subscribable } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Used to convert a subscribable to an observable.
|
|
5
|
+
*
|
|
6
|
+
* Currently, this is only used within internals.
|
|
7
|
+
*
|
|
8
|
+
* TODO: Discuss ObservableInput supporting "Subscribable".
|
|
9
|
+
* https://github.com/ReactiveX/rxjs/issues/5909
|
|
10
|
+
*
|
|
11
|
+
* @param subscribable A subscribable
|
|
12
|
+
*/
|
|
13
|
+
export declare function fromSubscribable<T>(subscribable: Subscribable<T>): Observable<T>;
|
|
14
|
+
//# sourceMappingURL=fromSubscribable.d.ts.map
|