From 342cf54dcddc673dfaf14cd4beedc96659294e5d Mon Sep 17 00:00:00 2001 From: Karsten Schmidt Date: Tue, 21 Sep 2021 00:57:44 +0200 Subject: [PATCH] refactor: update imports in various pkgs (rstream) --- packages/rdom/src/object.ts | 2 +- packages/rdom/src/sub.ts | 6 +++--- packages/rstream-csp/src/from/channel.ts | 2 +- packages/rstream-dot/src/index.ts | 4 ++-- packages/rstream-gestures/src/gesture-stream.ts | 4 ++-- packages/rstream-graph/src/graph.ts | 6 +++--- packages/rstream-log/src/logger.ts | 6 +++--- packages/rstream-log/src/output/console.ts | 2 +- packages/rstream-query/src/store.ts | 6 +++--- packages/rstream-query/src/xforms.ts | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/rdom/src/object.ts b/packages/rdom/src/object.ts index 771d9fa2cc..9a1555e412 100644 --- a/packages/rdom/src/object.ts +++ b/packages/rdom/src/object.ts @@ -1,6 +1,6 @@ import type { Fn, Keys } from "@thi.ng/api"; import type { ISubscribable, StreamObj, StreamObjOpts } from "@thi.ng/rstream"; -import { fromObject } from "@thi.ng/rstream/from/object"; +import { fromObject } from "@thi.ng/rstream/object"; import type { ComponentLike, IComponent, diff --git a/packages/rdom/src/sub.ts b/packages/rdom/src/sub.ts index 33ca3be177..9544cd4613 100644 --- a/packages/rdom/src/sub.ts +++ b/packages/rdom/src/sub.ts @@ -2,8 +2,8 @@ import type { Fn2, Path } from "@thi.ng/api"; import { isString } from "@thi.ng/checks/is-string"; import { defSetterUnsafe } from "@thi.ng/paths/setter"; import type { ISubscribable } from "@thi.ng/rstream"; +import { __nextID } from "@thi.ng/rstream/idgen"; import { Subscription } from "@thi.ng/rstream/subscription"; -import { nextID } from "@thi.ng/rstream/utils/idgen"; import type { IComponent, IMountWithState, NumOrElement } from "./api"; import { $attribs } from "./dom"; import { SCHEDULER } from "./scheduler"; @@ -55,7 +55,7 @@ export class $Sub extends Subscription { el?: Element; constructor(protected inner: IMountWithState) { - super(undefined, { id: `rdom$sub-${nextID()}` }); + super(undefined, { id: `rdom$sub-${__nextID()}` }); } async mount(parent: Element, index: NumOrElement = -1) { @@ -87,7 +87,7 @@ export class $SubA extends Subscription { protected attr: any = {}; constructor(protected comp: IComponent, path: Path) { - super(undefined, { id: `rdom$sub-${nextID()}` }); + super(undefined, { id: `rdom$sub-${__nextID()}` }); this.setter = defSetterUnsafe(path); } diff --git a/packages/rstream-csp/src/from/channel.ts b/packages/rstream-csp/src/from/channel.ts index 5f15319a04..f424d46b07 100644 --- a/packages/rstream-csp/src/from/channel.ts +++ b/packages/rstream-csp/src/from/channel.ts @@ -1,6 +1,6 @@ import type { Channel } from "@thi.ng/csp"; import type { CommonOpts } from "@thi.ng/rstream"; -import { LOGGER } from "@thi.ng/rstream/api"; +import { LOGGER } from "@thi.ng/rstream/logger"; import { Stream } from "@thi.ng/rstream/stream"; export interface FromChannelOpts extends CommonOpts { diff --git a/packages/rstream-dot/src/index.ts b/packages/rstream-dot/src/index.ts index 5d44b585f2..11c92d5a17 100644 --- a/packages/rstream-dot/src/index.ts +++ b/packages/rstream-dot/src/index.ts @@ -1,7 +1,7 @@ import type { ISubscribable } from "@thi.ng/rstream"; +import { StreamMerge } from "@thi.ng/rstream/merge"; import { Stream } from "@thi.ng/rstream/stream"; -import { StreamMerge } from "@thi.ng/rstream/stream-merge"; -import { StreamSync } from "@thi.ng/rstream/stream-sync"; +import { StreamSync } from "@thi.ng/rstream/sync"; import { truncate } from "@thi.ng/strings/truncate"; import { map } from "@thi.ng/transducers/map"; import type { DotOpts, Node, NodeType, WalkState } from "./api"; diff --git a/packages/rstream-gestures/src/gesture-stream.ts b/packages/rstream-gestures/src/gesture-stream.ts index 50d433d396..04e6978da4 100644 --- a/packages/rstream-gestures/src/gesture-stream.ts +++ b/packages/rstream-gestures/src/gesture-stream.ts @@ -2,8 +2,8 @@ import type { IObjectOf } from "@thi.ng/api"; import { isBoolean } from "@thi.ng/checks/is-boolean"; import { clamp } from "@thi.ng/math/interval"; import type { Stream } from "@thi.ng/rstream"; -import { fromDOMEvent } from "@thi.ng/rstream/from/event"; -import { merge } from "@thi.ng/rstream/stream-merge"; +import { fromDOMEvent } from "@thi.ng/rstream/event"; +import { merge } from "@thi.ng/rstream/merge"; import { map } from "@thi.ng/transducers/map"; import type { GestureEvent, diff --git a/packages/rstream-graph/src/graph.ts b/packages/rstream-graph/src/graph.ts index 2e67a0c8ee..c12cc4997d 100644 --- a/packages/rstream-graph/src/graph.ts +++ b/packages/rstream-graph/src/graph.ts @@ -7,9 +7,9 @@ import { illegalArgs } from "@thi.ng/errors/illegal-arguments"; import { getInUnsafe } from "@thi.ng/paths/get-in"; import { absPath, resolve, ResolveFn } from "@thi.ng/resolve-map"; import { CloseMode, ISubscription } from "@thi.ng/rstream/api"; -import { fromIterableSync } from "@thi.ng/rstream/from/iterable"; -import { fromViewUnsafe } from "@thi.ng/rstream/from/view"; -import { StreamSync, sync } from "@thi.ng/rstream/stream-sync"; +import { fromIterableSync } from "@thi.ng/rstream/iterable"; +import { StreamSync, sync } from "@thi.ng/rstream/sync"; +import { fromViewUnsafe } from "@thi.ng/rstream/view"; import type { Transducer } from "@thi.ng/transducers"; import { map } from "@thi.ng/transducers/map"; import type { diff --git a/packages/rstream-log/src/logger.ts b/packages/rstream-log/src/logger.ts index 3723d5320f..1f5a40ea19 100644 --- a/packages/rstream-log/src/logger.ts +++ b/packages/rstream-log/src/logger.ts @@ -1,8 +1,8 @@ import { illegalArity } from "@thi.ng/errors/illegal-arity"; import { LogLevel } from "@thi.ng/logger/api"; import { CloseMode, ISubscribable } from "@thi.ng/rstream/api"; -import { StreamMerge } from "@thi.ng/rstream/stream-merge"; -import { nextID } from "@thi.ng/rstream/utils/idgen"; +import { __nextID } from "@thi.ng/rstream/idgen"; +import { StreamMerge } from "@thi.ng/rstream/merge"; import type { ILogger, LogEntry } from "./api"; export class Logger extends StreamMerge implements ILogger { @@ -36,7 +36,7 @@ export class Logger extends StreamMerge implements ILogger { default: illegalArity(args.length); } - id = id || `logger-${nextID()}`; + id = id || `logger-${__nextID()}`; super({ src, id, closeIn: CloseMode.NEVER, closeOut: CloseMode.NEVER }); this.level = level; } diff --git a/packages/rstream-log/src/output/console.ts b/packages/rstream-log/src/output/console.ts index 8d93f3a145..ba8274e27f 100644 --- a/packages/rstream-log/src/output/console.ts +++ b/packages/rstream-log/src/output/console.ts @@ -1 +1 @@ -export { trace as writeConsole } from "@thi.ng/rstream"; +export { trace as writeConsole } from "@thi.ng/rstream/trace"; diff --git a/packages/rstream-query/src/store.ts b/packages/rstream-query/src/store.ts index 6c83ef2f6c..67884f1709 100644 --- a/packages/rstream-query/src/store.ts +++ b/packages/rstream-query/src/store.ts @@ -7,9 +7,9 @@ import { min3id } from "@thi.ng/math/interval"; import type { Subscription } from "@thi.ng/rstream"; import { DotOpts, IToDot, toDot, walk } from "@thi.ng/rstream-dot"; import { CloseMode, ISubscription } from "@thi.ng/rstream/api"; +import { __nextID } from "@thi.ng/rstream/idgen"; import { Stream } from "@thi.ng/rstream/stream"; -import { sync } from "@thi.ng/rstream/stream-sync"; -import { nextID } from "@thi.ng/rstream/utils/idgen"; +import { sync } from "@thi.ng/rstream/sync"; import type { Transducer } from "@thi.ng/transducers"; import { assocObj } from "@thi.ng/transducers/assoc-obj"; import { comp } from "@thi.ng/transducers/comp"; @@ -265,7 +265,7 @@ export class TripleStore implements Iterable, IToDot { if (!resolve) { illegalArgs("at least 1 query variable is required in pattern"); } - id || (id = `query-${nextID()}`); + id || (id = `query-${__nextID()}`); const query = >( this.addPatternQuery( [vs ? null : s, vp ? null : p, vo ? null : o], diff --git a/packages/rstream-query/src/xforms.ts b/packages/rstream-query/src/xforms.ts index 0cdfbad3d7..2321a5394f 100644 --- a/packages/rstream-query/src/xforms.ts +++ b/packages/rstream-query/src/xforms.ts @@ -2,7 +2,7 @@ import type { IObjectOf } from "@thi.ng/api"; import { intersection } from "@thi.ng/associative/intersection"; import { join } from "@thi.ng/associative/join"; import { equiv } from "@thi.ng/equiv"; -import { LOGGER } from "@thi.ng/rstream/api"; +import { LOGGER } from "@thi.ng/rstream/logger"; import type { Reducer, Transducer } from "@thi.ng/transducers"; import { comp } from "@thi.ng/transducers/comp"; import { compR } from "@thi.ng/transducers/compr";