@digipair/skill-logger 0.136.3 → 0.136.5
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/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { promises } from 'fs';
|
|
2
2
|
|
|
3
|
-
function _mergeNamespaces
|
|
3
|
+
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function(e) {
|
|
5
5
|
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
|
|
6
6
|
if (k !== 'default' && !(k in n)) {
|
|
@@ -20,7 +20,7 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof win
|
|
|
20
20
|
function getDefaultExportFromCjs(x) {
|
|
21
21
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
22
22
|
}
|
|
23
|
-
var handlebars_min = {
|
|
23
|
+
var handlebars_min$1 = {
|
|
24
24
|
exports: {}
|
|
25
25
|
};
|
|
26
26
|
/**!
|
|
@@ -48,7 +48,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
48
48
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
49
49
|
THE SOFTWARE.
|
|
50
50
|
|
|
51
|
-
*/ handlebars_min.exports;
|
|
51
|
+
*/ handlebars_min$1.exports;
|
|
52
52
|
(function(module1, exports1) {
|
|
53
53
|
function _instanceof(left, right) {
|
|
54
54
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
@@ -8129,12 +8129,12 @@ THE SOFTWARE.
|
|
|
8129
8129
|
}
|
|
8130
8130
|
]);
|
|
8131
8131
|
});
|
|
8132
|
-
})(handlebars_min, handlebars_min.exports);
|
|
8133
|
-
var handlebars_minExports = handlebars_min.exports;
|
|
8134
|
-
var
|
|
8135
|
-
var HandlebarsNamespace = /*#__PURE__*/ _mergeNamespaces
|
|
8132
|
+
})(handlebars_min$1, handlebars_min$1.exports);
|
|
8133
|
+
var handlebars_minExports = handlebars_min$1.exports;
|
|
8134
|
+
var handlebars_min = /*@__PURE__*/ getDefaultExportFromCjs(handlebars_minExports);
|
|
8135
|
+
var HandlebarsNamespace = /*#__PURE__*/ _mergeNamespaces({
|
|
8136
8136
|
__proto__: null,
|
|
8137
|
-
default:
|
|
8137
|
+
default: handlebars_min
|
|
8138
8138
|
}, [
|
|
8139
8139
|
handlebars_minExports
|
|
8140
8140
|
]);
|
|
@@ -17297,7 +17297,6 @@ class represent prop names.
|
|
|
17297
17297
|
this.deserialize = config.deserialize || function() {
|
|
17298
17298
|
throw new Error("This node type doesn't define a deserialize function");
|
|
17299
17299
|
};
|
|
17300
|
-
this.combine = config.combine || null;
|
|
17301
17300
|
}
|
|
17302
17301
|
_create_class$u(NodeProp, [
|
|
17303
17302
|
{
|
|
@@ -17410,16 +17409,10 @@ represented by another tree.
|
|
|
17410
17409
|
*/ overlay, /**
|
|
17411
17410
|
The parser used to create this subtree.
|
|
17412
17411
|
*/ parser) {
|
|
17413
|
-
var /**
|
|
17414
|
-
[Indicates](#common.IterMode.EnterBracketed) that the nested
|
|
17415
|
-
content is delineated with some kind
|
|
17416
|
-
of bracket token.
|
|
17417
|
-
*/ bracketed = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
|
|
17418
17412
|
_class_call_check$z(this, MountedTree);
|
|
17419
17413
|
this.tree = tree;
|
|
17420
17414
|
this.overlay = overlay;
|
|
17421
17415
|
this.parser = parser;
|
|
17422
|
-
this.bracketed = bracketed;
|
|
17423
17416
|
}
|
|
17424
17417
|
_create_class$u(MountedTree, null, [
|
|
17425
17418
|
{
|
|
@@ -17635,9 +17628,7 @@ types in it, so that the ids fit into 16-bit typed array slots.
|
|
|
17635
17628
|
var add = source(type);
|
|
17636
17629
|
if (add) {
|
|
17637
17630
|
if (!newProps) newProps = Object.assign({}, type.props);
|
|
17638
|
-
|
|
17639
|
-
if (prop.combine && prop.id in newProps) value = prop.combine(newProps[prop.id], value);
|
|
17640
|
-
newProps[prop.id] = value;
|
|
17631
|
+
newProps[add[0].id] = add[1];
|
|
17641
17632
|
}
|
|
17642
17633
|
}
|
|
17643
17634
|
} catch (err) {
|
|
@@ -17703,12 +17694,6 @@ operator to enable multiple ones.
|
|
|
17703
17694
|
library to not enter mounted overlays if one covers the given
|
|
17704
17695
|
position.
|
|
17705
17696
|
*/ IterMode[IterMode["IgnoreOverlays"] = 8] = "IgnoreOverlays";
|
|
17706
|
-
/**
|
|
17707
|
-
When set, positions on the boundary of a mounted overlay tree
|
|
17708
|
-
that has its [`bracketed`](#common.NestedParse.bracketed) flag
|
|
17709
|
-
set will enter that tree regardless of side. Only supported in
|
|
17710
|
-
[`enter`](#common.SyntaxNode.enter), not in cursors.
|
|
17711
|
-
*/ IterMode[IterMode["EnterBracketed"] = 16] = "EnterBracketed";
|
|
17712
17697
|
})(IterMode || (IterMode = {}));
|
|
17713
17698
|
/**
|
|
17714
17699
|
A piece of syntax tree. There are two ways to approach these
|
|
@@ -18267,17 +18252,17 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
18267
18252
|
var mode = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0;
|
|
18268
18253
|
for(var parent = this;;){
|
|
18269
18254
|
for(var _parent__tree = parent._tree, children = _parent__tree.children, positions = _parent__tree.positions, e = dir > 0 ? children.length : -1; i != e; i += dir){
|
|
18270
|
-
var next = children[i], start = positions[i] + parent.from
|
|
18271
|
-
if (!
|
|
18255
|
+
var next = children[i], start = positions[i] + parent.from;
|
|
18256
|
+
if (!checkSide(side, pos, start, start + next.length)) continue;
|
|
18272
18257
|
if (_instanceof$i(next, TreeBuffer)) {
|
|
18273
18258
|
if (mode & IterMode.ExcludeBuffers) continue;
|
|
18274
18259
|
var index = next.findChild(0, next.buffer.length, dir, pos - start, side);
|
|
18275
18260
|
if (index > -1) return new BufferNode(new BufferContext(parent, next, i, start), null, index);
|
|
18276
18261
|
} else if (mode & IterMode.IncludeAnonymous || !next.type.isAnonymous || hasChild(next)) {
|
|
18277
|
-
var
|
|
18278
|
-
if (!(mode & IterMode.IgnoreMounts) && (
|
|
18262
|
+
var mounted = void 0;
|
|
18263
|
+
if (!(mode & IterMode.IgnoreMounts) && (mounted = MountedTree.get(next)) && !mounted.overlay) return new TreeNode(mounted.tree, start, i, parent);
|
|
18279
18264
|
var inner = new TreeNode(next, start, i, parent);
|
|
18280
|
-
return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side
|
|
18265
|
+
return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side);
|
|
18281
18266
|
}
|
|
18282
18267
|
}
|
|
18283
18268
|
if (mode & IterMode.IncludeAnonymous || !parent.type.isAnonymous) return null;
|
|
@@ -18312,24 +18297,18 @@ var TreeNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
18312
18297
|
return this.nextChild(this._tree.children.length - 1, -1, pos, -2 /* Side.Before */ );
|
|
18313
18298
|
}
|
|
18314
18299
|
},
|
|
18315
|
-
{
|
|
18316
|
-
key: "prop",
|
|
18317
|
-
value: function prop(prop) {
|
|
18318
|
-
return this._tree.prop(prop);
|
|
18319
|
-
}
|
|
18320
|
-
},
|
|
18321
18300
|
{
|
|
18322
18301
|
key: "enter",
|
|
18323
18302
|
value: function enter(pos, side) {
|
|
18324
18303
|
var mode = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
18325
18304
|
var mounted;
|
|
18326
18305
|
if (!(mode & IterMode.IgnoreOverlays) && (mounted = MountedTree.get(this._tree)) && mounted.overlay) {
|
|
18327
|
-
var rPos = pos - this.from
|
|
18306
|
+
var rPos = pos - this.from;
|
|
18328
18307
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
18329
18308
|
try {
|
|
18330
18309
|
for(var _iterator = mounted.overlay[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
18331
18310
|
var _step_value = _step.value, from = _step_value.from, to = _step_value.to;
|
|
18332
|
-
if ((side > 0
|
|
18311
|
+
if ((side > 0 ? from <= rPos : from < rPos) && (side < 0 ? to >= rPos : to > rPos)) return new TreeNode(mounted.tree, mounted.overlay[0].from + this.from, -1, this);
|
|
18333
18312
|
}
|
|
18334
18313
|
} catch (err) {
|
|
18335
18314
|
_didIteratorError = true;
|
|
@@ -18493,12 +18472,6 @@ var BufferNode = /*#__PURE__*/ function(BaseNode) {
|
|
|
18493
18472
|
return this.child(-1, pos, -2 /* Side.Before */ );
|
|
18494
18473
|
}
|
|
18495
18474
|
},
|
|
18496
|
-
{
|
|
18497
|
-
key: "prop",
|
|
18498
|
-
value: function prop(prop) {
|
|
18499
|
-
return this.type.prop(prop);
|
|
18500
|
-
}
|
|
18501
|
-
},
|
|
18502
18475
|
{
|
|
18503
18476
|
key: "enter",
|
|
18504
18477
|
value: function enter(pos, side) {
|
|
@@ -18629,8 +18602,11 @@ A tree cursor object focuses on a given node in a syntax tree, and
|
|
|
18629
18602
|
allows you to move to adjacent nodes.
|
|
18630
18603
|
*/ var TreeCursor = /*#__PURE__*/ function() {
|
|
18631
18604
|
function TreeCursor(node) {
|
|
18632
|
-
var
|
|
18605
|
+
var /**
|
|
18606
|
+
@internal
|
|
18607
|
+
*/ mode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
18633
18608
|
_class_call_check$z(this, TreeCursor);
|
|
18609
|
+
this.mode = mode;
|
|
18634
18610
|
/**
|
|
18635
18611
|
@internal
|
|
18636
18612
|
*/ this.buffer = null;
|
|
@@ -18639,7 +18615,6 @@ allows you to move to adjacent nodes.
|
|
|
18639
18615
|
@internal
|
|
18640
18616
|
*/ this.index = 0;
|
|
18641
18617
|
this.bufferNode = null;
|
|
18642
|
-
this.mode = mode & ~IterMode.EnterBracketed;
|
|
18643
18618
|
if (_instanceof$i(node, TreeNode)) {
|
|
18644
18619
|
this.yieldNode(node);
|
|
18645
18620
|
} else {
|
|
@@ -18983,7 +18958,7 @@ function buildTree(data) {
|
|
|
18983
18958
|
function takeNode(parentStart, minPos, children, positions, inRepeat, depth) {
|
|
18984
18959
|
var id = cursor.id, start = cursor.start, end = cursor.end, size = cursor.size;
|
|
18985
18960
|
var lookAheadAtStart = lookAhead, contextAtStart = contextHash;
|
|
18986
|
-
|
|
18961
|
+
while(size < 0){
|
|
18987
18962
|
cursor.next();
|
|
18988
18963
|
if (size == -1 /* SpecialRecord.Reuse */ ) {
|
|
18989
18964
|
var node = reused[id];
|
|
@@ -19150,7 +19125,7 @@ function buildTree(data) {
|
|
|
19150
19125
|
fork.next();
|
|
19151
19126
|
while(fork.pos > startPos){
|
|
19152
19127
|
if (fork.size < 0) {
|
|
19153
|
-
if (fork.size == -3 /* SpecialRecord.ContextChange */
|
|
19128
|
+
if (fork.size == -3 /* SpecialRecord.ContextChange */ ) localSkipped += 4;
|
|
19154
19129
|
else break scan;
|
|
19155
19130
|
} else if (fork.id >= minRepeatType) {
|
|
19156
19131
|
localSkipped += 4;
|
|
@@ -19589,11 +19564,11 @@ about the parse state.
|
|
|
19589
19564
|
var _a;
|
|
19590
19565
|
var depth = action >> 19 /* Action.ReduceDepthShift */ , type = action & 65535 /* Action.ValueMask */ ;
|
|
19591
19566
|
var parser = this.p.parser;
|
|
19592
|
-
var lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */
|
|
19567
|
+
var lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */ ;
|
|
19568
|
+
if (lookaheadRecord) this.setLookAhead(this.pos);
|
|
19593
19569
|
var dPrec = parser.dynamicPrecedence(type);
|
|
19594
19570
|
if (dPrec) this.score += dPrec;
|
|
19595
19571
|
if (depth == 0) {
|
|
19596
|
-
if (type < parser.minRepeatTerm && this.reducePos < this.pos) this.reducePos = this.pos;
|
|
19597
19572
|
this.pushState(parser.getGoto(this.state, type, true), this.reducePos);
|
|
19598
19573
|
// Zero-depth reductions are a special case—they add stuff to
|
|
19599
19574
|
// the stack without popping anything off.
|
|
@@ -19607,9 +19582,7 @@ about the parse state.
|
|
|
19607
19582
|
// expression and the state that we'll be staying in, which should
|
|
19608
19583
|
// be moved to `this.state`).
|
|
19609
19584
|
var base = this.stack.length - (depth - 1) * 3 - (action & 262144 /* Action.StayFlag */ ? 6 : 0);
|
|
19610
|
-
var start = base ? this.stack[base - 2] : this.p.ranges[0].from;
|
|
19611
|
-
if (type < parser.minRepeatTerm && start == this.reducePos && this.reducePos < this.pos) this.reducePos = this.pos;
|
|
19612
|
-
var size = this.reducePos - start;
|
|
19585
|
+
var start = base ? this.stack[base - 2] : this.p.ranges[0].from, size = this.reducePos - start;
|
|
19613
19586
|
// This is a kludge to try and detect overly deep left-associative
|
|
19614
19587
|
// trees, which will not increase the parse stack depth and thus
|
|
19615
19588
|
// won't be caught by the regular stack-depth limit check.
|
|
@@ -19648,11 +19621,15 @@ about the parse state.
|
|
|
19648
19621
|
var size = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 4, mustSink = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
|
|
19649
19622
|
if (term == 0 /* Term.Err */ && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
|
|
19650
19623
|
// Try to omit/merge adjacent error nodes
|
|
19651
|
-
var top = this.buffer.length;
|
|
19652
|
-
if (top
|
|
19624
|
+
var cur = this, top = this.buffer.length;
|
|
19625
|
+
if (top == 0 && cur.parent) {
|
|
19626
|
+
top = cur.bufferBase - cur.parent.bufferBase;
|
|
19627
|
+
cur = cur.parent;
|
|
19628
|
+
}
|
|
19629
|
+
if (top > 0 && cur.buffer[top - 4] == 0 /* Term.Err */ && cur.buffer[top - 1] > -1) {
|
|
19653
19630
|
if (start == end) return;
|
|
19654
|
-
if (
|
|
19655
|
-
|
|
19631
|
+
if (cur.buffer[top - 2] >= start) {
|
|
19632
|
+
cur.buffer[top - 2] = end;
|
|
19656
19633
|
return;
|
|
19657
19634
|
}
|
|
19658
19635
|
}
|
|
@@ -19661,7 +19638,7 @@ about the parse state.
|
|
|
19661
19638
|
this.buffer.push(term, start, end, size);
|
|
19662
19639
|
} else {
|
|
19663
19640
|
var index = this.buffer.length;
|
|
19664
|
-
if (index > 0 &&
|
|
19641
|
+
if (index > 0 && this.buffer[index - 4] != 0 /* Term.Err */ ) {
|
|
19665
19642
|
var mustMove = false;
|
|
19666
19643
|
for(var scan = index; scan > 0 && this.buffer[scan - 2] > end; scan -= 4){
|
|
19667
19644
|
if (this.buffer[scan - 1] >= 0) {
|
|
@@ -19696,11 +19673,11 @@ about the parse state.
|
|
|
19696
19673
|
this.pushState(action & 65535 /* Action.ValueMask */ , this.pos);
|
|
19697
19674
|
} else if ((action & 262144 /* Action.StayFlag */ ) == 0) {
|
|
19698
19675
|
var nextState = action, parser = this.p.parser;
|
|
19699
|
-
this.pos
|
|
19700
|
-
|
|
19701
|
-
|
|
19702
|
-
|
|
19703
|
-
this.pushState(nextState,
|
|
19676
|
+
if (end > this.pos || type <= parser.maxNode) {
|
|
19677
|
+
this.pos = end;
|
|
19678
|
+
if (!parser.stateFlag(nextState, 1 /* StateFlag.Skipped */ )) this.reducePos = end;
|
|
19679
|
+
}
|
|
19680
|
+
this.pushState(nextState, start);
|
|
19704
19681
|
this.shiftContext(type, start);
|
|
19705
19682
|
if (type <= parser.maxNode) this.buffer.push(type, start, end, 4);
|
|
19706
19683
|
} else {
|
|
@@ -19748,9 +19725,6 @@ about the parse state.
|
|
|
19748
19725
|
value: function split() {
|
|
19749
19726
|
var parent = this;
|
|
19750
19727
|
var off = parent.buffer.length;
|
|
19751
|
-
// Leave off top error node, if there, because that might be
|
|
19752
|
-
// merged with other nodes.
|
|
19753
|
-
if (off && parent.buffer[off - 4] == 0 /* Term.Err */ ) off -= 4;
|
|
19754
19728
|
// Because the top of the buffer (after this.pos) may be mutated
|
|
19755
19729
|
// to reorder reductions and skipped tokens, and shared buffers
|
|
19756
19730
|
// should be immutable, this copies any outstanding skipped tokens
|
|
@@ -19994,10 +19968,10 @@ about the parse state.
|
|
|
19994
19968
|
@internal
|
|
19995
19969
|
*/ key: "setLookAhead",
|
|
19996
19970
|
value: function setLookAhead(lookAhead) {
|
|
19997
|
-
if (lookAhead
|
|
19998
|
-
|
|
19999
|
-
|
|
20000
|
-
|
|
19971
|
+
if (lookAhead > this.lookAhead) {
|
|
19972
|
+
this.emitLookAhead();
|
|
19973
|
+
this.lookAhead = lookAhead;
|
|
19974
|
+
}
|
|
20001
19975
|
}
|
|
20002
19976
|
},
|
|
20003
19977
|
{
|
|
@@ -20890,12 +20864,7 @@ var Parse = /*#__PURE__*/ function() {
|
|
|
20890
20864
|
}
|
|
20891
20865
|
}
|
|
20892
20866
|
}
|
|
20893
|
-
if (newStacks.length > 12 /* Rec.MaxStackCount */ )
|
|
20894
|
-
newStacks.sort(function(a, b) {
|
|
20895
|
-
return b.score - a.score;
|
|
20896
|
-
});
|
|
20897
|
-
newStacks.splice(12 /* Rec.MaxStackCount */ , newStacks.length - 12 /* Rec.MaxStackCount */ );
|
|
20898
|
-
}
|
|
20867
|
+
if (newStacks.length > 12 /* Rec.MaxStackCount */ ) newStacks.splice(12 /* Rec.MaxStackCount */ , newStacks.length - 12 /* Rec.MaxStackCount */ );
|
|
20899
20868
|
}
|
|
20900
20869
|
this.minStackPos = newStacks[0].pos;
|
|
20901
20870
|
for(var i2 = 1; i2 < newStacks.length; i2++)if (newStacks[i2].pos < this.minStackPos) this.minStackPos = newStacks[i2].pos;
|
|
@@ -20990,7 +20959,7 @@ var Parse = /*#__PURE__*/ function() {
|
|
|
20990
20959
|
if (done) continue;
|
|
20991
20960
|
}
|
|
20992
20961
|
var force = stack.split(), forceBase = base;
|
|
20993
|
-
for(var j = 0; j < 10 /* Rec.ForceReduceLimit */
|
|
20962
|
+
for(var j = 0; force.forceReduce() && j < 10 /* Rec.ForceReduceLimit */ ; j++){
|
|
20994
20963
|
if (verbose) console.log(forceBase + this.stackID(force) + " (via force-reduce)");
|
|
20995
20964
|
var done1 = this.advanceFully(force, newStacks);
|
|
20996
20965
|
if (done1) break;
|
|
@@ -21025,8 +20994,8 @@ var Parse = /*#__PURE__*/ function() {
|
|
|
21025
20994
|
stack.recoverByDelete(token, tokenEnd);
|
|
21026
20995
|
if (verbose) console.log(base + this.stackID(stack) + " (via recover-delete ".concat(this.parser.getName(token), ")"));
|
|
21027
20996
|
pushStackDedup(stack, newStacks);
|
|
21028
|
-
} else if (!finished || finished.score <
|
|
21029
|
-
finished =
|
|
20997
|
+
} else if (!finished || finished.score < stack.score) {
|
|
20998
|
+
finished = stack;
|
|
21030
20999
|
}
|
|
21031
21000
|
}
|
|
21032
21001
|
return finished;
|
|
@@ -21875,7 +21844,7 @@ must be quoted as JSON strings.
|
|
|
21875
21844
|
For example:
|
|
21876
21845
|
|
|
21877
21846
|
```javascript
|
|
21878
|
-
parser.
|
|
21847
|
+
parser.withProps(
|
|
21879
21848
|
styleTags({
|
|
21880
21849
|
// Style Number and BigNumber nodes
|
|
21881
21850
|
"Number BigNumber": tags.number,
|
|
@@ -21890,7 +21859,7 @@ parser.configure({props: [
|
|
|
21890
21859
|
// Style the node named "/" as punctuation
|
|
21891
21860
|
'"/"': tags.punctuation
|
|
21892
21861
|
})
|
|
21893
|
-
|
|
21862
|
+
)
|
|
21894
21863
|
```
|
|
21895
21864
|
*/ function styleTags(spec) {
|
|
21896
21865
|
var byName = Object.create(null);
|
|
@@ -21946,26 +21915,7 @@ parser.configure({props: [
|
|
|
21946
21915
|
}
|
|
21947
21916
|
return ruleNodeProp.add(byName);
|
|
21948
21917
|
}
|
|
21949
|
-
var ruleNodeProp = new NodeProp(
|
|
21950
|
-
combine: function combine(a, b) {
|
|
21951
|
-
var cur, root, take;
|
|
21952
|
-
while(a || b){
|
|
21953
|
-
if (!a || b && a.depth >= b.depth) {
|
|
21954
|
-
take = b;
|
|
21955
|
-
b = b.next;
|
|
21956
|
-
} else {
|
|
21957
|
-
take = a;
|
|
21958
|
-
a = a.next;
|
|
21959
|
-
}
|
|
21960
|
-
if (cur && cur.mode == take.mode && !take.context && !cur.context) continue;
|
|
21961
|
-
var copy = new Rule$1(take.tags, take.mode, take.context);
|
|
21962
|
-
if (cur) cur.next = copy;
|
|
21963
|
-
else root = copy;
|
|
21964
|
-
cur = copy;
|
|
21965
|
-
}
|
|
21966
|
-
return root;
|
|
21967
|
-
}
|
|
21968
|
-
});
|
|
21918
|
+
var ruleNodeProp = new NodeProp();
|
|
21969
21919
|
var Rule$1 = /*#__PURE__*/ function() {
|
|
21970
21920
|
function Rule(tags, mode, context, next) {
|
|
21971
21921
|
_class_call_check$x(this, Rule);
|
|
@@ -22890,14 +22840,14 @@ function indent(str, spaces) {
|
|
|
22890
22840
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
22891
22841
|
// match is required
|
|
22892
22842
|
if (!match) {
|
|
22893
|
-
return
|
|
22843
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
|
22894
22844
|
v: nextMatch1
|
|
22895
22845
|
};
|
|
22896
22846
|
}
|
|
22897
22847
|
var token = match.token, offset = match.offset;
|
|
22898
22848
|
i1 += offset;
|
|
22899
22849
|
if (token === ' ') {
|
|
22900
|
-
return
|
|
22850
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
22901
22851
|
}
|
|
22902
22852
|
tokens1 = _to_consumable_array$4(tokens1).concat([
|
|
22903
22853
|
token
|
|
@@ -22916,7 +22866,7 @@ function indent(str, spaces) {
|
|
|
22916
22866
|
if (contextKeys.some(function(el) {
|
|
22917
22867
|
return el.startsWith(name);
|
|
22918
22868
|
})) {
|
|
22919
|
-
return
|
|
22869
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
22920
22870
|
}
|
|
22921
22871
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22922
22872
|
return el === name;
|
|
@@ -22935,9 +22885,9 @@ function indent(str, spaces) {
|
|
|
22935
22885
|
if (dateTimeIdentifiers.some(function(el) {
|
|
22936
22886
|
return el.startsWith(name);
|
|
22937
22887
|
})) {
|
|
22938
|
-
return
|
|
22888
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
22939
22889
|
}
|
|
22940
|
-
return
|
|
22890
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
|
22941
22891
|
v: nextMatch1
|
|
22942
22892
|
};
|
|
22943
22893
|
};
|
|
@@ -42665,7 +42615,7 @@ var CelParser = /*#__PURE__*/ function(CstParser) {
|
|
|
42665
42615
|
var parserInstance$1 = new CelParser();
|
|
42666
42616
|
parserInstance$1.getBaseCstVisitorConstructor();
|
|
42667
42617
|
new CelParser();
|
|
42668
|
-
const Handlebars =
|
|
42618
|
+
const Handlebars = handlebars_min || HandlebarsNamespace;
|
|
42669
42619
|
Handlebars.registerHelper('JSONstringify', function(value) {
|
|
42670
42620
|
return JSON.stringify(value);
|
|
42671
42621
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PinsSettings } from '@digipair/engine';
|
|
2
|
+
export declare const initialize: (path?: string) => Promise<void>;
|
|
3
|
+
export declare const addLog: (context: any, type: string, message: string) => Promise<void>;
|
|
4
|
+
export declare const addConsumption: (context: any, service: string, model: string, promptTokens: number, completionTokens: number) => Promise<void>;
|
|
5
|
+
export declare const computeDailyConsumption: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
|
6
|
+
export declare const read: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any[]>;
|
|
7
|
+
export declare const list: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<string[]>;
|
|
8
|
+
export declare const cleaning: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
|
9
|
+
//# sourceMappingURL=skill-logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-logger.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAU,MAAM,kBAAkB,CAAC;AA0KxD,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,kBAAyC,CAAC;AAElF,eAAO,MAAM,MAAM,GAAI,SAAS,GAAG,EAAE,MAAM,MAAM,EAAE,SAAS,MAAM,kBACd,CAAC;AAErD,eAAO,MAAM,cAAc,GACzB,SAAS,GAAG,EACZ,SAAS,MAAM,EACf,OAAO,MAAM,EACb,cAAc,MAAM,EACpB,kBAAkB,MAAM,kBACsE,CAAC;AAMjG,eAAO,MAAM,uBAAuB,GAClC,QAAQ,GAAG,EACX,kBAAkB,YAAY,EAAE,EAChC,SAAS,GAAG,kBACqE,CAAC;AAEpF,eAAO,MAAM,IAAI,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,mBACnB,CAAC;AAE9D,eAAO,MAAM,IAAI,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,sBACnB,CAAC;AAE9D,eAAO,MAAM,QAAQ,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,kBACnB,CAAC"}
|