@revenexx/cli 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -19
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.mjs +20688 -9347
- package/dist/index.cjs +4 -64
- package/dist/index.js +4 -64
- package/dist/lib/client.d.ts +0 -46
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/commands/generators/base.d.ts +1 -1
- package/dist/lib/commands/generic.d.ts.map +1 -1
- package/dist/lib/commands/repl.d.ts.map +1 -1
- package/dist/lib/commands/services/carts-io.d.ts +3 -0
- package/dist/lib/commands/services/carts-io.d.ts.map +1 -0
- package/dist/lib/commands/services/carts-items.d.ts +3 -0
- package/dist/lib/commands/services/carts-items.d.ts.map +1 -0
- package/dist/lib/commands/services/customers-contacts.d.ts +3 -0
- package/dist/lib/commands/services/customers-contacts.d.ts.map +1 -0
- package/dist/lib/commands/services/customers-organizations.d.ts +3 -0
- package/dist/lib/commands/services/customers-organizations.d.ts.map +1 -0
- package/dist/lib/commands/services/customers-roles.d.ts +3 -0
- package/dist/lib/commands/services/customers-roles.d.ts.map +1 -0
- package/dist/lib/commands/services/customers-segments.d.ts +3 -0
- package/dist/lib/commands/services/customers-segments.d.ts.map +1 -0
- package/dist/lib/commands/services/customers-value-lists.d.ts +3 -0
- package/dist/lib/commands/services/customers-value-lists.d.ts.map +1 -0
- package/dist/lib/commands/services/customers.d.ts.map +1 -1
- package/dist/lib/commands/services/forms.d.ts.map +1 -1
- package/dist/lib/commands/services/health.d.ts +3 -0
- package/dist/lib/commands/services/health.d.ts.map +1 -0
- package/dist/lib/commands/services/inventories-locations.d.ts +3 -0
- package/dist/lib/commands/services/inventories-locations.d.ts.map +1 -0
- package/dist/lib/commands/services/inventories-reservations.d.ts +3 -0
- package/dist/lib/commands/services/inventories-reservations.d.ts.map +1 -0
- package/dist/lib/commands/services/inventories-stock.d.ts +3 -0
- package/dist/lib/commands/services/inventories-stock.d.ts.map +1 -0
- package/dist/lib/commands/services/io.d.ts.map +1 -1
- package/dist/lib/commands/services/orders.d.ts.map +1 -1
- package/dist/lib/commands/services/pages-collaboration.d.ts +3 -0
- package/dist/lib/commands/services/pages-collaboration.d.ts.map +1 -0
- package/dist/lib/commands/services/pages-delivery.d.ts +3 -0
- package/dist/lib/commands/services/pages-delivery.d.ts.map +1 -0
- package/dist/lib/commands/services/pages-editor.d.ts +3 -0
- package/dist/lib/commands/services/pages-editor.d.ts.map +1 -0
- package/dist/lib/commands/services/payments-ledger.d.ts +3 -0
- package/dist/lib/commands/services/payments-ledger.d.ts.map +1 -0
- package/dist/lib/commands/services/payments-methods.d.ts +3 -0
- package/dist/lib/commands/services/payments-methods.d.ts.map +1 -0
- package/dist/lib/commands/services/payments-providers.d.ts +3 -0
- package/dist/lib/commands/services/payments-providers.d.ts.map +1 -0
- package/dist/lib/commands/services/products-assets.d.ts +3 -0
- package/dist/lib/commands/services/products-assets.d.ts.map +1 -0
- package/dist/lib/commands/services/products-categories.d.ts +3 -0
- package/dist/lib/commands/services/products-categories.d.ts.map +1 -0
- package/dist/lib/commands/services/products-data-model.d.ts +3 -0
- package/dist/lib/commands/services/products-data-model.d.ts.map +1 -0
- package/dist/lib/commands/services/products-references.d.ts +3 -0
- package/dist/lib/commands/services/products-references.d.ts.map +1 -0
- package/dist/lib/commands/services/shipping-carriers.d.ts +3 -0
- package/dist/lib/commands/services/shipping-carriers.d.ts.map +1 -0
- package/dist/lib/commands/services/shipping-methods.d.ts +3 -0
- package/dist/lib/commands/services/shipping-methods.d.ts.map +1 -0
- package/dist/lib/commands/services/shipping-value-lists.d.ts +3 -0
- package/dist/lib/commands/services/shipping-value-lists.d.ts.map +1 -0
- package/dist/lib/commands/tui.d.ts.map +1 -1
- package/dist/lib/commands/update.d.ts +22 -0
- package/dist/lib/commands/update.d.ts.map +1 -1
- package/dist/lib/commands/watch.d.ts +23 -0
- package/dist/lib/commands/watch.d.ts.map +1 -0
- package/dist/lib/constants.d.ts +3 -1
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/sdks.d.ts.map +1 -1
- package/dist/lib/tui/app.d.ts.map +1 -1
- package/dist/lib/tui/command-tree.d.ts +3 -2
- package/dist/lib/tui/command-tree.d.ts.map +1 -1
- package/dist/lib/tui/executor.d.ts +0 -9
- package/dist/lib/tui/executor.d.ts.map +1 -1
- package/dist/lib/tui/slash-commands.d.ts +62 -0
- package/dist/lib/tui/slash-commands.d.ts.map +1 -0
- package/dist/lib/tui/watch-create.d.ts +17 -0
- package/dist/lib/tui/watch-create.d.ts.map +1 -0
- package/dist/lib/tui/watch-pane.d.ts +7 -0
- package/dist/lib/tui/watch-pane.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/csharp.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/dart.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/java.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/javascript.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/kotlin.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/php.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/swift.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/typescript.d.ts.map +1 -1
- package/dist/lib/watch/condition.d.ts +51 -0
- package/dist/lib/watch/condition.d.ts.map +1 -0
- package/dist/lib/watch/duration.d.ts +28 -0
- package/dist/lib/watch/duration.d.ts.map +1 -0
- package/dist/lib/watch/field-path.d.ts +54 -0
- package/dist/lib/watch/field-path.d.ts.map +1 -0
- package/dist/lib/watch/notify.d.ts +49 -0
- package/dist/lib/watch/notify.d.ts.map +1 -0
- package/dist/lib/watch/registry.d.ts +25 -0
- package/dist/lib/watch/registry.d.ts.map +1 -0
- package/dist/lib/watch/run-queue.d.ts +55 -0
- package/dist/lib/watch/run-queue.d.ts.map +1 -0
- package/dist/lib/watch/scheduler.d.ts +78 -0
- package/dist/lib/watch/scheduler.d.ts.map +1 -0
- package/dist/lib/watch/session.d.ts +17 -0
- package/dist/lib/watch/session.d.ts.map +1 -0
- package/dist/lib/watch/types.d.ts +144 -0
- package/dist/lib/watch/types.d.ts.map +1 -0
- package/dist/lib/watch/use-watchers.d.ts +25 -0
- package/dist/lib/watch/use-watchers.d.ts.map +1 -0
- package/dist/tests/executor.test.d.ts +2 -0
- package/dist/tests/executor.test.d.ts.map +1 -0
- package/dist/tests/watch-condition.test.d.ts +2 -0
- package/dist/tests/watch-condition.test.d.ts.map +1 -0
- package/dist/tests/watch-field-path.test.d.ts +2 -0
- package/dist/tests/watch-field-path.test.d.ts.map +1 -0
- package/dist/tests/watch-notify.test.d.ts +2 -0
- package/dist/tests/watch-notify.test.d.ts.map +1 -0
- package/dist/tests/watch-registry.test.d.ts +2 -0
- package/dist/tests/watch-registry.test.d.ts.map +1 -0
- package/dist/tests/watch-run-queue.test.d.ts +2 -0
- package/dist/tests/watch-run-queue.test.d.ts.map +1 -0
- package/dist/tests/watch-scheduler.test.d.ts +2 -0
- package/dist/tests/watch-scheduler.test.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/lib/commands/services/greetings.d.ts +0 -3
- package/dist/lib/commands/services/greetings.d.ts.map +0 -1
- package/dist/lib/commands/services/inventories.d.ts +0 -3
- package/dist/lib/commands/services/inventories.d.ts.map +0 -1
- package/dist/lib/commands/services/payments.d.ts +0 -3
- package/dist/lib/commands/services/payments.d.ts.map +0 -1
- package/dist/lib/commands/services/shipping.d.ts +0 -3
- package/dist/lib/commands/services/shipping.d.ts.map +0 -1
- package/dist/lib/commands/services/tokens.d.ts +0 -3
- package/dist/lib/commands/services/tokens.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../../lib/watch/scheduler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAmBH,OAAO,KAAK,EAAE,SAAS,EAAc,OAAO,EAAE,MAAM,YAAY,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AM,GAAG,OAAO,CAAC;IAC5B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B;0CACsC;IACtC,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACtC,WAAW,IAAI,MAAM,CAAC;CACvB,CAAC;AA+CF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,SAAS,EACf,SAAS,YAAY,KACpB,MAAM,EAkBR,CAAC;AAUF,eAAO,MAAM,oBAAoB,GAC/B,YAAW,OAAO,CAAC,aAAa,CAAM,KACrC,cAsRF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,cAAuC,CAAC;AAErE,4EAA4E;AAC5E,eAAO,MAAM,uBAAuB,GAClC,YAAW,OAAO,CAAC,aAAa,CAAM,KACrC;IAAE,SAAS,EAAE,cAAc,CAAC;IAAC,QAAQ,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,mBAAmB,CAAA;CAQlF,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether an interactive session is hosting watchers right now (DX-141).
|
|
3
|
+
*
|
|
4
|
+
* `watch add` means two different things depending on the answer. Inside the
|
|
5
|
+
* REPL or the TUI there is a process that outlives the command, so the watcher
|
|
6
|
+
* is registered and the prompt comes straight back. One-shot there is nothing
|
|
7
|
+
* to come back to, so the command blocks until the watcher settles and turns
|
|
8
|
+
* its outcome into an exit code.
|
|
9
|
+
*
|
|
10
|
+
* A tiny module of its own rather than a flag on cliConfig: repl.ts's
|
|
11
|
+
* resetCliConfig is a hand-maintained mirror of CliConfig with no compile-time
|
|
12
|
+
* link, and a field missing from it becomes silently sticky across REPL lines.
|
|
13
|
+
*/
|
|
14
|
+
export declare const beginWatchSession: () => void;
|
|
15
|
+
export declare const endWatchSession: () => void;
|
|
16
|
+
export declare const isWatchSessionActive: () => boolean;
|
|
17
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../lib/watch/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,eAAO,MAAM,iBAAiB,QAAO,IAEpC,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,IAElC,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAAO,OAAoB,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared vocabulary for the background watchlist (DX-141): a watcher polls one
|
|
3
|
+
* get-by-id command and reports when a field reaches a condition.
|
|
4
|
+
*
|
|
5
|
+
* Deliberately dependency-free. The REPL, the one-shot `watch` command and the
|
|
6
|
+
* TUI pane all import this tree, and every module under lib/tui/ pulls in ink —
|
|
7
|
+
* which initialises its yoga layout engine via top-level await (see the comment
|
|
8
|
+
* in lib/commands/tui.ts). Nothing in lib/watch/ may therefore import from
|
|
9
|
+
* lib/tui/ except as `import type`.
|
|
10
|
+
*/
|
|
11
|
+
export type WatchState =
|
|
12
|
+
/** Created; no successful poll yet. Also the `changed` baseline window. */
|
|
13
|
+
"pending"
|
|
14
|
+
/** At least one poll landed and the condition is not met yet. */
|
|
15
|
+
| "polling" | "satisfied" | "timeout"
|
|
16
|
+
/** Gave up: a fatal failure, or too many transient ones in a row. */
|
|
17
|
+
| "error" | "cancelled";
|
|
18
|
+
export declare const TERMINAL_WATCH_STATES: ReadonlySet<WatchState>;
|
|
19
|
+
export declare const isTerminalState: (state: WatchState) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The outcome of a field-path lookup. Tagged rather than `unknown | undefined`
|
|
22
|
+
* because the gateway legitimately returns `null`, and `equals null` has to be
|
|
23
|
+
* distinguishable from "there is no such path" — otherwise a typo'd path
|
|
24
|
+
* quietly satisfies a condition instead of reporting itself.
|
|
25
|
+
*/
|
|
26
|
+
export type Resolved = {
|
|
27
|
+
kind: "value";
|
|
28
|
+
value: unknown;
|
|
29
|
+
}
|
|
30
|
+
/** The path prefix that failed, so a surface can point at the bad segment. */
|
|
31
|
+
| {
|
|
32
|
+
kind: "missing";
|
|
33
|
+
at: string;
|
|
34
|
+
};
|
|
35
|
+
export type WatchCondition = {
|
|
36
|
+
kind: "changed";
|
|
37
|
+
}
|
|
38
|
+
/** `raw` is what the user typed (echoed back in the UI); `value` is the
|
|
39
|
+
* lower-cased comparand actually matched against. */
|
|
40
|
+
| {
|
|
41
|
+
kind: "equals";
|
|
42
|
+
raw: string;
|
|
43
|
+
value: string;
|
|
44
|
+
}
|
|
45
|
+
/** Source + flags, not a live RegExp: the record stays a plain value, so it
|
|
46
|
+
* compares structurally for duplicate detection and survives a snapshot. */
|
|
47
|
+
| {
|
|
48
|
+
kind: "matches";
|
|
49
|
+
source: string;
|
|
50
|
+
flags: string;
|
|
51
|
+
} | {
|
|
52
|
+
kind: "terminal";
|
|
53
|
+
done: readonly string[];
|
|
54
|
+
custom: boolean;
|
|
55
|
+
} | {
|
|
56
|
+
kind: "truthy";
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Structurally identical to lib/tui/form.tsx's FormValues. Re-declared rather
|
|
60
|
+
* than imported: form.tsx is a React module, and importing it here would drag
|
|
61
|
+
* ink onto the one-shot path.
|
|
62
|
+
*/
|
|
63
|
+
export type WatchFormValues = Record<string, string>;
|
|
64
|
+
export type Watcher = Readonly<{
|
|
65
|
+
id: string;
|
|
66
|
+
/** Short display label, e.g. "imports get-import". */
|
|
67
|
+
label: string;
|
|
68
|
+
/** The one-shot line (buildCommandLine), for display only. */
|
|
69
|
+
commandLine: string;
|
|
70
|
+
path: readonly string[];
|
|
71
|
+
values: WatchFormValues;
|
|
72
|
+
/** Frozen argv, resolved once at creation — see buildWatchTokens. */
|
|
73
|
+
tokens: readonly string[];
|
|
74
|
+
fieldPath: string;
|
|
75
|
+
condition: WatchCondition;
|
|
76
|
+
intervalMs: number;
|
|
77
|
+
timeoutMs: number;
|
|
78
|
+
/** 404 is fatal by default — a typo'd id should fail fast. Opt in when
|
|
79
|
+
* genuinely waiting for a resource that does not exist yet. */
|
|
80
|
+
treat404AsTransient: boolean;
|
|
81
|
+
createdAt: number;
|
|
82
|
+
state: WatchState;
|
|
83
|
+
lastValue: Resolved | null;
|
|
84
|
+
/** Baseline for `changed`. Seeded by the first successful poll unless the
|
|
85
|
+
* creator supplied one (the TUI wizard probes before creating). */
|
|
86
|
+
initialValue: Resolved | null;
|
|
87
|
+
pollCount: number;
|
|
88
|
+
/** Consecutive transient failures; any successful poll resets it. */
|
|
89
|
+
transientFailures: number;
|
|
90
|
+
lastPolledAt: number | null;
|
|
91
|
+
/** Also carries the soft "field not present yet" note, which is not a
|
|
92
|
+
* failure — see the scheduler. */
|
|
93
|
+
lastError: string | null;
|
|
94
|
+
satisfiedAt: number | null;
|
|
95
|
+
finishedAt: number | null;
|
|
96
|
+
/** Exit code of the last poll, so a blocking one-shot can propagate it. */
|
|
97
|
+
lastExitCode: number;
|
|
98
|
+
}>;
|
|
99
|
+
export type WatchSpec = {
|
|
100
|
+
path: string[];
|
|
101
|
+
values: WatchFormValues;
|
|
102
|
+
tokens: string[];
|
|
103
|
+
commandLine: string;
|
|
104
|
+
fieldPath: string;
|
|
105
|
+
condition: WatchCondition;
|
|
106
|
+
intervalMs?: number;
|
|
107
|
+
timeoutMs?: number;
|
|
108
|
+
/** Pre-seed the `changed` baseline from a payload already in hand. */
|
|
109
|
+
initialValue?: Resolved;
|
|
110
|
+
treat404AsTransient?: boolean;
|
|
111
|
+
label?: string;
|
|
112
|
+
/** Pin --tenant/--endpoint onto the argv at creation. Default true. */
|
|
113
|
+
pinContext?: boolean;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* A floor, not a suggestion. One poll can legitimately take a minute: the
|
|
117
|
+
* client's own timeout is 30 s and it retries idempotent GETs three times with
|
|
118
|
+
* full-jitter backoff (lib/client.ts). Below ~2 s the extra polls buy nothing
|
|
119
|
+
* but queue pressure and 429s the client then has to back off from anyway.
|
|
120
|
+
*/
|
|
121
|
+
export declare const MIN_INTERVAL_MS = 2000;
|
|
122
|
+
export declare const DEFAULT_INTERVAL_MS = 5000;
|
|
123
|
+
export declare const DEFAULT_WATCH_TIMEOUT_MS: number;
|
|
124
|
+
export declare const MAX_WATCH_TIMEOUT_MS: number;
|
|
125
|
+
/**
|
|
126
|
+
* Polls are serialized through one queue (see run-queue.ts), so N watchers make
|
|
127
|
+
* each one's effective period at best N × poll-duration. Past ~8 the advertised
|
|
128
|
+
* interval stops being true and the status-bar badge stops being readable.
|
|
129
|
+
*/
|
|
130
|
+
export declare const MAX_ACTIVE_WATCHERS = 8;
|
|
131
|
+
/**
|
|
132
|
+
* ±15 % decorrelation, not backoff. Watchers created in a burst would otherwise
|
|
133
|
+
* stay phase-locked forever and keep landing in the same queue slot.
|
|
134
|
+
*/
|
|
135
|
+
export declare const JITTER_RATIO = 0.15;
|
|
136
|
+
/**
|
|
137
|
+
* Applied on top of the client's own retries: by the time a poll comes back
|
|
138
|
+
* failed, the client has already spent its three attempts.
|
|
139
|
+
*/
|
|
140
|
+
export declare const TRANSIENT_BACKOFF_MS: readonly number[];
|
|
141
|
+
export declare const MAX_TRANSIENT_FAILURES: number;
|
|
142
|
+
/** Finished watchers stay visible; the oldest-finished are pruned past this. */
|
|
143
|
+
export declare const MAX_RETAINED_WATCHERS = 20;
|
|
144
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/watch/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,MAAM,UAAU;AACpB,2EAA2E;AACzE,SAAS;AACX,iEAAiE;GAC/D,SAAS,GACT,WAAW,GACX,SAAS;AACX,qEAAqE;GACnE,OAAO,GACP,WAAW,CAAC;AAEhB,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,UAAU,CAKxD,C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AM,mBAAmB,IAAI,CAAC;AAErC;;;GAGG;AACH,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAEjD,CAAC;AACF,eAAO,MAAM,sBAAsB,QAA8B,CAAC;AAElE,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,KAAK,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The only file under lib/watch/ that imports react (DX-141). Everything else
|
|
3
|
+
* in this directory has to stay loadable on the one-shot path, so the React
|
|
4
|
+
* binding lives here and is imported only from lib/tui/.
|
|
5
|
+
*/
|
|
6
|
+
import type { Watcher } from "./types.js";
|
|
7
|
+
/**
|
|
8
|
+
* useSyncExternalStore rather than subscribe + useState, for one concrete
|
|
9
|
+
* reason: with `useEffect(() => registry.subscribe(force), [])` a transition
|
|
10
|
+
* emitted between the first render and the effect commit is dropped, and the
|
|
11
|
+
* pane shows a stale watcher until something else happens to re-render it. That
|
|
12
|
+
* window is real here — a watcher flipping to `satisfied` 40 ms after the pane
|
|
13
|
+
* opens lands squarely in it. This hook re-reads the snapshot on subscribe and
|
|
14
|
+
* after every commit, so a missed emit self-heals. It also guarantees the pane
|
|
15
|
+
* and the status-bar badge read the same snapshot within a commit.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useWatchers: () => readonly Watcher[];
|
|
18
|
+
export type WatchCounts = {
|
|
19
|
+
active: number;
|
|
20
|
+
done: number;
|
|
21
|
+
failed: number;
|
|
22
|
+
};
|
|
23
|
+
/** Badge arithmetic, derived from the same snapshot the pane renders. */
|
|
24
|
+
export declare const useWatchCounts: () => WatchCounts;
|
|
25
|
+
//# sourceMappingURL=use-watchers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-watchers.d.ts","sourceRoot":"","sources":["../../../lib/watch/use-watchers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,QAAO,SAAS,OAAO,EACwB,CAAC;AAExE,MAAM,MAAM,WAAW,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3E,yEAAyE;AACzE,eAAO,MAAM,cAAc,QAAO,WAWjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.test.d.ts","sourceRoot":"","sources":["../../tests/executor.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-condition.test.d.ts","sourceRoot":"","sources":["../../tests/watch-condition.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-field-path.test.d.ts","sourceRoot":"","sources":["../../tests/watch-field-path.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-notify.test.d.ts","sourceRoot":"","sources":["../../tests/watch-notify.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-registry.test.d.ts","sourceRoot":"","sources":["../../tests/watch-registry.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-run-queue.test.d.ts","sourceRoot":"","sources":["../../tests/watch-run-queue.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-scheduler.test.d.ts","sourceRoot":"","sources":["../../tests/watch-scheduler.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"greetings.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/greetings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBpC,eAAO,MAAM,SAAS,SAOlB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inventories.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/inventories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,eAAO,MAAM,WAAW,SAOpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/payments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,eAAO,MAAM,QAAQ,SAOjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shipping.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/shipping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,eAAO,MAAM,QAAQ,SAOjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBpC,eAAO,MAAM,MAAM,SAOf,CAAC"}
|