@kensio/quando 0.2.0 → 1.0.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 +18 -8
- package/dist/assigned.d.ts +68 -0
- package/dist/assigned.d.ts.map +1 -0
- package/dist/assigned.js +84 -0
- package/dist/assigned.js.map +1 -0
- package/dist/canonical-rule.d.ts +23 -0
- package/dist/canonical-rule.d.ts.map +1 -0
- package/dist/canonical-rule.js +139 -0
- package/dist/canonical-rule.js.map +1 -0
- package/dist/canonical.d.ts +44 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +53 -0
- package/dist/canonical.js.map +1 -0
- package/dist/cascade.d.ts +21 -0
- package/dist/cascade.d.ts.map +1 -1
- package/dist/cascade.js +13 -0
- package/dist/cascade.js.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/merge.d.ts +43 -0
- package/dist/merge.d.ts.map +1 -0
- package/dist/merge.js +79 -0
- package/dist/merge.js.map +1 -0
- package/dist/parse-cascade.d.ts +37 -0
- package/dist/parse-cascade.d.ts.map +1 -0
- package/dist/parse-cascade.js +105 -0
- package/dist/parse-cascade.js.map +1 -0
- package/dist/parse-fields.d.ts +7 -10
- package/dist/parse-fields.d.ts.map +1 -1
- package/dist/parse-fields.js +8 -36
- package/dist/parse-fields.js.map +1 -1
- package/dist/parse-shape.d.ts +39 -0
- package/dist/parse-shape.d.ts.map +1 -0
- package/dist/parse-shape.js +77 -0
- package/dist/parse-shape.js.map +1 -0
- package/dist/parse.d.ts.map +1 -1
- package/dist/parse.js +4 -26
- package/dist/parse.js.map +1 -1
- package/dist/query.d.ts +23 -17
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +25 -19
- package/dist/query.js.map +1 -1
- package/dist/resolve.d.ts +14 -8
- package/dist/resolve.d.ts.map +1 -1
- package/dist/resolve.js +41 -26
- package/dist/resolve.js.map +1 -1
- package/dist/rota.d.ts.map +1 -1
- package/dist/rota.js +2 -8
- package/dist/rota.js.map +1 -1
- package/dist/schedule.d.ts.map +1 -1
- package/dist/schedule.js +2 -7
- package/dist/schedule.js.map +1 -1
- package/dist/tally.d.ts +76 -0
- package/dist/tally.d.ts.map +1 -0
- package/dist/tally.js +80 -0
- package/dist/tally.js.map +1 -0
- package/dist/valued-stream.d.ts +19 -10
- package/dist/valued-stream.d.ts.map +1 -1
- package/dist/valued-stream.js +95 -24
- package/dist/valued-stream.js.map +1 -1
- package/package.json +22 -20
package/dist/tally.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How many, in the words people use for counting.
|
|
3
|
+
*
|
|
4
|
+
* The same relationship to [merging](./merge.ts) that a
|
|
5
|
+
* [schedule](./schedule.ts) has to a cascade. `merged("sum", layer(…),
|
|
6
|
+
* layer(…))` says what it does, and it asks the reader to know three things
|
|
7
|
+
* first: that layers overlap, that an overlap is what combines, and what a
|
|
8
|
+
* bare `"sum"` in the first argument governs. Nobody staffing a warehouse
|
|
9
|
+
* says any of that. They say three on weekdays, two more on the eleventh.
|
|
10
|
+
*
|
|
11
|
+
* A `Tally` *is* a `Cascade<number>` with `merge: "sum"`, so everything that
|
|
12
|
+
* takes a cascade takes one of these, and it serialises to the document a
|
|
13
|
+
* hand-written one would.
|
|
14
|
+
*/
|
|
15
|
+
import { valueAt } from "./assigned.js";
|
|
16
|
+
import { always } from "./build.js";
|
|
17
|
+
import { cascade, layer, replace, } from "./cascade.js";
|
|
18
|
+
import { duration } from "./interval.js";
|
|
19
|
+
import { asDays } from "./plain-forms.js";
|
|
20
|
+
import { resolve } from "./resolve.js";
|
|
21
|
+
/** Zero, as a duration to accumulate onto. */
|
|
22
|
+
const NOTHING = Temporal.Duration.from({ seconds: 0 });
|
|
23
|
+
/**
|
|
24
|
+
* A figure that claims its scope outright.
|
|
25
|
+
*
|
|
26
|
+
* The inner cascade covers the whole of the region this layer wins, which is
|
|
27
|
+
* what `always` means once it is resolved against that region rather than
|
|
28
|
+
* against the context.
|
|
29
|
+
*/
|
|
30
|
+
function fixed(scope, amount) {
|
|
31
|
+
const figure = cascade(layer(always(), amount));
|
|
32
|
+
return replace(asDays(scope), figure);
|
|
33
|
+
}
|
|
34
|
+
function build(layers) {
|
|
35
|
+
const self = {
|
|
36
|
+
type: "cascade",
|
|
37
|
+
merge: "sum",
|
|
38
|
+
layers,
|
|
39
|
+
plus: (scope, amount) => build([...layers, layer(asDays(scope), amount)]),
|
|
40
|
+
exactly: (scope, amount) => build([...layers, fixed(scope, amount)]),
|
|
41
|
+
at: (at) => valueAt(self, at) ?? 0,
|
|
42
|
+
least: (from, to) => {
|
|
43
|
+
let lowest;
|
|
44
|
+
let covered = NOTHING;
|
|
45
|
+
for (const span of resolve(self, { from, to })) {
|
|
46
|
+
lowest =
|
|
47
|
+
lowest === undefined ? span.value : Math.min(lowest, span.value);
|
|
48
|
+
const length = duration(span);
|
|
49
|
+
if (length !== undefined) {
|
|
50
|
+
covered = covered.add(length);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// Anything the layers left uncovered is nobody there, which is lower
|
|
54
|
+
// than any figure they assigned. Comparing what was covered against the
|
|
55
|
+
// window finds that without a second sweep for the gaps.
|
|
56
|
+
const window = from.until(to, { largestUnit: "hour" });
|
|
57
|
+
if (Temporal.Duration.compare(covered, window) < 0) {
|
|
58
|
+
return 0;
|
|
59
|
+
}
|
|
60
|
+
return lowest ?? 0;
|
|
61
|
+
},
|
|
62
|
+
counts: (from, to) => resolve(self, to === undefined ? { from } : { from, to }),
|
|
63
|
+
};
|
|
64
|
+
return self;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* An empty tally: nobody, until something says otherwise.
|
|
68
|
+
*
|
|
69
|
+
* ```ts
|
|
70
|
+
* const staff = tally()
|
|
71
|
+
* .plus(weekdays(), 3)
|
|
72
|
+
* .plus(weekends(), 1)
|
|
73
|
+
* .plus("2026-03-11", 2)
|
|
74
|
+
* .exactly("2026-12-24", 1);
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export function tally() {
|
|
78
|
+
return build([]);
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=tally.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tally.js","sourceRoot":"","sources":["../src/tally.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAEL,OAAO,EAEP,KAAK,EACL,OAAO,GACR,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAkB,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,8CAA8C;AAC9C,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AA2DvD;;;;;;GAMG;AACH,SAAS,KAAK,CAAC,KAAgB,EAAE,MAAc;IAC7C,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;IAChD,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;AACxC,CAAC;AAED,SAAS,KAAK,CAAC,MAAgC;IAC7C,MAAM,IAAI,GAAU;QAClB,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,KAAK;QACZ,MAAM;QAEN,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,C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AE,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;KAC5D,CAAC;IAEF,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,KAAK;IACnB,OAAO,KAAK,CAAC,EAAE,CAAC,CAAC;AACnB,CAAC"}
|
package/dist/valued-stream.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Streams of intervals that carry values, and the
|
|
3
|
-
*
|
|
2
|
+
* Streams of intervals that carry values, and the operations resolution needs
|
|
3
|
+
* over them.
|
|
4
4
|
*
|
|
5
5
|
* The same shape as `interval-stream.ts` one level down, and deliberately
|
|
6
|
-
* separate from it
|
|
7
|
-
* them has an opinion about values.
|
|
8
|
-
*
|
|
6
|
+
* separate from it. Those sweeps are set algebra over *when*, and nothing in
|
|
7
|
+
* them has an opinion about values. {@link overlay} is where an opinion is
|
|
8
|
+
* needed, and it is handed one rather than choosing.
|
|
9
9
|
*/
|
|
10
10
|
import type { Valued } from "./cascade.js";
|
|
11
|
+
import type { Merge } from "./merge.js";
|
|
11
12
|
/**
|
|
12
13
|
* A lazy sequence of valued intervals.
|
|
13
14
|
*
|
|
@@ -18,13 +19,21 @@ import type { Valued } from "./cascade.js";
|
|
|
18
19
|
*/
|
|
19
20
|
export type ValuedStream<V> = Iterable<Valued<V>>;
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
+
* Two streams laid over one another, with `merge` settling the overlap.
|
|
22
23
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
24
|
+
* Where only one covers a moment, its value comes through. Where both do, the
|
|
25
|
+
* two values go to `merge`, `under` first. Where neither does, the moment is
|
|
26
|
+
* absent, the same as everywhere else in the library.
|
|
27
|
+
*
|
|
28
|
+
* It walks both fronts and cuts whichever runs on at the other's boundary, so
|
|
29
|
+
* it pulls only as far as the next piece of the answer and stays lazy over
|
|
30
|
+
* endless sources.
|
|
31
|
+
*
|
|
32
|
+
* Output is not coalesced. Cutting at every boundary splits runs carrying the
|
|
33
|
+
* same value on both sides, and {@link coalesce} over the top puts them back.
|
|
34
|
+
* Teaching this sweep to look ahead instead would buy nothing.
|
|
26
35
|
*/
|
|
27
|
-
export declare function
|
|
36
|
+
export declare function overlay<V>(under: ValuedStream<V>, over: ValuedStream<V>, merge: Merge<V>): ValuedStream<V>;
|
|
28
37
|
/**
|
|
29
38
|
* Adjacent intervals carrying the same value are one interval.
|
|
30
39
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valued-stream.d.ts","sourceRoot":"","sources":["../src/valued-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"valued-stream.d.ts","sourceRoot":"","sources":["../src/valued-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGxC;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAElD;;;;;;;;;;;;;;GAcG;AACH,wBAAiB,OAAO,CAAC,CAAC,EACxB,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EACtB,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,EACrB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GACd,YAAY,CAAC,CAAC,CAAC,CAsDjB;AA+CD;;;;;;;;;;;;GAYG;AACH,wBAAiB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAmBrE"}
|
package/dist/valued-stream.js
CHANGED
|
@@ -1,41 +1,112 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Streams of intervals that carry values, and the
|
|
3
|
-
*
|
|
2
|
+
* Streams of intervals that carry values, and the operations resolution needs
|
|
3
|
+
* over them.
|
|
4
4
|
*
|
|
5
5
|
* The same shape as `interval-stream.ts` one level down, and deliberately
|
|
6
|
-
* separate from it
|
|
7
|
-
* them has an opinion about values.
|
|
8
|
-
*
|
|
6
|
+
* separate from it. Those sweeps are set algebra over *when*, and nothing in
|
|
7
|
+
* them has an opinion about values. {@link overlay} is where an opinion is
|
|
8
|
+
* needed, and it is handed one rather than choosing.
|
|
9
9
|
*/
|
|
10
|
-
import { compareStarts } from "./interval.js";
|
|
10
|
+
import { compareEnds, compareStarts, earlierEnd } from "./interval.js";
|
|
11
11
|
import { peekable } from "./stream.js";
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Two streams laid over one another, with `merge` settling the overlap.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* Where only one covers a moment, its value comes through. Where both do, the
|
|
16
|
+
* two values go to `merge`, `under` first. Where neither does, the moment is
|
|
17
|
+
* absent, the same as everywhere else in the library.
|
|
18
|
+
*
|
|
19
|
+
* It walks both fronts and cuts whichever runs on at the other's boundary, so
|
|
20
|
+
* it pulls only as far as the next piece of the answer and stays lazy over
|
|
21
|
+
* endless sources.
|
|
22
|
+
*
|
|
23
|
+
* Output is not coalesced. Cutting at every boundary splits runs carrying the
|
|
24
|
+
* same value on both sides, and {@link coalesce} over the top puts them back.
|
|
25
|
+
* Teaching this sweep to look ahead instead would buy nothing.
|
|
18
26
|
*/
|
|
19
|
-
export function*
|
|
20
|
-
const
|
|
27
|
+
export function* overlay(under, over, merge) {
|
|
28
|
+
const a = peekable(under);
|
|
29
|
+
const b = peekable(over);
|
|
30
|
+
// What is left of each front interval. A stretch already yielded is cut off
|
|
31
|
+
// the front rather than yielded twice, which is what keeps this to one pass
|
|
32
|
+
// over sources that can only be read forwards.
|
|
33
|
+
let restA = a.peek();
|
|
34
|
+
let restB = b.peek();
|
|
21
35
|
for (;;) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
if (restA === undefined || restB === undefined) {
|
|
37
|
+
yield* remainder(restA ?? restB, restA === undefined ? b : a);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const order = compareStarts(restA.start, restB.start);
|
|
41
|
+
if (order === 0) {
|
|
42
|
+
// Both cover the stretch up to whichever ends first, and that stretch is
|
|
43
|
+
// the only place `merge` is ever called.
|
|
44
|
+
const end = earlierEnd(restA.end, restB.end);
|
|
45
|
+
yield { start: restA.start, end, value: merge(restA.value, restB.value) };
|
|
46
|
+
const cutA = cut(restA, end, a);
|
|
47
|
+
restB = cut(restB, end, b);
|
|
48
|
+
restA = cutA;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
// One of them starts first and holds alone until the other begins. Its own
|
|
52
|
+
// end may come first, in which case the whole of it stands alone.
|
|
53
|
+
if (order < 0) {
|
|
54
|
+
const boundary = restB.start;
|
|
55
|
+
if (compareEnds(restA.end, boundary) <= 0) {
|
|
56
|
+
yield restA;
|
|
57
|
+
a.drop();
|
|
58
|
+
restA = a.peek();
|
|
59
|
+
continue;
|
|
31
60
|
}
|
|
61
|
+
yield { start: restA.start, end: boundary, value: restA.value };
|
|
62
|
+
restA = { ...restA, start: boundary };
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const boundary = restA.start;
|
|
66
|
+
if (compareEnds(restB.end, boundary) <= 0) {
|
|
67
|
+
yield restB;
|
|
68
|
+
b.drop();
|
|
69
|
+
restB = b.peek();
|
|
70
|
+
continue;
|
|
32
71
|
}
|
|
33
|
-
|
|
72
|
+
yield { start: restB.start, end: boundary, value: restB.value };
|
|
73
|
+
restB = { ...restB, start: boundary };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Whatever is left of one side once the other is spent, beginning with the
|
|
78
|
+
* piece already in hand.
|
|
79
|
+
*
|
|
80
|
+
* That piece may have been cut short, so it is yielded from the local rather
|
|
81
|
+
* than read again from the source, and the source's own copy of it dropped.
|
|
82
|
+
*/
|
|
83
|
+
function* remainder(held, source) {
|
|
84
|
+
if (held === undefined) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
yield held;
|
|
88
|
+
source.drop();
|
|
89
|
+
for (;;) {
|
|
90
|
+
const next = source.peek();
|
|
91
|
+
if (next === undefined) {
|
|
34
92
|
return;
|
|
35
93
|
}
|
|
36
|
-
|
|
37
|
-
yield
|
|
94
|
+
source.drop();
|
|
95
|
+
yield next;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* What is left of an interval once the stretch up to `end` has been yielded.
|
|
100
|
+
*
|
|
101
|
+
* An interval used up entirely is dropped and the next one pulled, so the
|
|
102
|
+
* front always holds something still to yield.
|
|
103
|
+
*/
|
|
104
|
+
function cut(interval, end, source) {
|
|
105
|
+
if (end === undefined || compareEnds(interval.end, end) <= 0) {
|
|
106
|
+
source.drop();
|
|
107
|
+
return source.peek();
|
|
38
108
|
}
|
|
109
|
+
return { ...interval, start: end };
|
|
39
110
|
}
|
|
40
111
|
/**
|
|
41
112
|
* Adjacent intervals carrying the same value are one interval.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valued-stream.js","sourceRoot":"","sources":["../src/valued-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"valued-stream.js","sourceRoot":"","sources":["../src/valued-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAA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IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,MAAM,IAAI,CAAC;IACb,CAAC;AACH,CAAC;AAED,+DAA+D;AAC/D,SAAS,OAAO,CAAC,IAAqB,EAAE,IAAqB;IAC3D,OAAO,CACL,IAAI,CAAC,GAAG,KAAK,SAAS;QACtB,IAAI,CAAC,KAAK,KAAK,SAAS;QACxB,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAC3D,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kensio/quando",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Declarative temporal rules for schedules, deadlines, constraints, and exceptions",
|
|
5
|
-
"repository":
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/KensioSoftware/quando"
|
|
8
|
+
},
|
|
6
9
|
"homepage": "https://quandojs.dev",
|
|
7
10
|
"bugs": "https://github.com/KensioSoftware/quando/issues",
|
|
8
11
|
"main": "./dist/index.js",
|
|
@@ -23,25 +26,11 @@
|
|
|
23
26
|
"imports": {
|
|
24
27
|
"#test/*": "./test/*"
|
|
25
28
|
},
|
|
26
|
-
"packageManager": "pnpm@11.21.0+sha512.521705bce689924eac72f5a3587122f362689ef6571e55ba80076fd637c11132ecffada26fad4ea79c485bfddbfd3d5a2a5b05805a77e893de71ec8a6cca3bb1",
|
|
27
29
|
"engines": {
|
|
28
30
|
"node": ">=26.0.0"
|
|
29
31
|
},
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
32
|
-
"prepack": "pnpm build",
|
|
33
|
-
"build:check": "tsc -p tsconfig.json --noEmit",
|
|
34
|
-
"fmt": "oxlint --fix . && oxfmt .",
|
|
35
|
-
"lint": "oxlint . && oxfmt --check .",
|
|
36
|
-
"lint:ci": "oxlint --format=github . && oxfmt --check .",
|
|
37
|
-
"docs:check": "./scripts/sh/docs-check.sh",
|
|
38
|
-
"fta": "./scripts/sh/fta.sh",
|
|
39
|
-
"test": "vitest run",
|
|
40
|
-
"test:coverage": "vitest run --coverage",
|
|
41
|
-
"pack:check": "./scripts/sh/pack-check.sh",
|
|
42
|
-
"check": "pnpm fmt && pnpm docs:check && pnpm fta && pnpm build:check && pnpm pack:check && pnpm test:coverage"
|
|
43
|
-
},
|
|
44
32
|
"devDependencies": {
|
|
33
|
+
"@faker-js/faker": "^10.6.0",
|
|
45
34
|
"@kensio/smartass": "^1.33.0",
|
|
46
35
|
"@semantic-release/exec": "7.1.0",
|
|
47
36
|
"@types/node": "^26.0.0",
|
|
@@ -49,7 +38,7 @@
|
|
|
49
38
|
"@vitest/coverage-v8": "^4.1.10",
|
|
50
39
|
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
51
40
|
"fta-cli": "^3.0.0",
|
|
52
|
-
"oxfmt": "^0.
|
|
41
|
+
"oxfmt": "^0.65.0",
|
|
53
42
|
"oxlint": "^1.77.0",
|
|
54
43
|
"oxlint-tsgolint": "^7.0.2001",
|
|
55
44
|
"semantic-release": "25.0.9",
|
|
@@ -67,5 +56,18 @@
|
|
|
67
56
|
},
|
|
68
57
|
"author": "Kensio Software",
|
|
69
58
|
"license": "Apache-2.0",
|
|
70
|
-
"type": "module"
|
|
71
|
-
|
|
59
|
+
"type": "module",
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
62
|
+
"build:check": "tsc -p tsconfig.json --noEmit",
|
|
63
|
+
"fmt": "oxlint --fix . && oxfmt .",
|
|
64
|
+
"lint": "oxlint . && oxfmt --check .",
|
|
65
|
+
"lint:ci": "oxlint --format=github . && oxfmt --check .",
|
|
66
|
+
"docs:check": "./scripts/sh/docs-check.sh",
|
|
67
|
+
"fta": "./scripts/sh/fta.sh",
|
|
68
|
+
"test": "vitest run",
|
|
69
|
+
"test:coverage": "vitest run --coverage",
|
|
70
|
+
"pack:check": "./scripts/sh/pack-check.sh",
|
|
71
|
+
"check": "pnpm fmt && pnpm docs:check && pnpm fta && pnpm build:check && pnpm pack:check && pnpm test:coverage"
|
|
72
|
+
}
|
|
73
|
+
}
|