jostraca 0.31.0 → 0.31.2

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.
Files changed (67) hide show
  1. package/README.md +355 -0
  2. package/dist/build/BuildContext.d.ts +1 -0
  3. package/dist/build/BuildContext.js +10 -0
  4. package/dist/build/BuildContext.js.map +1 -1
  5. package/dist/build/BuildMeta.js +21 -4
  6. package/dist/build/BuildMeta.js.map +1 -1
  7. package/dist/build/FileHandler.d.ts +11 -4
  8. package/dist/build/FileHandler.js +468 -92
  9. package/dist/build/FileHandler.js.map +1 -1
  10. package/dist/cmp/Content.js.map +1 -1
  11. package/dist/cmp/Copy.js +5 -1
  12. package/dist/cmp/Copy.js.map +1 -1
  13. package/dist/cmp/File.js +2 -0
  14. package/dist/cmp/File.js.map +1 -1
  15. package/dist/cmp/Folder.js.map +1 -1
  16. package/dist/cmp/Fragment.js +36 -7
  17. package/dist/cmp/Fragment.js.map +1 -1
  18. package/dist/cmp/Inject.js +30 -1
  19. package/dist/cmp/Inject.js.map +1 -1
  20. package/dist/cmp/Line.js.map +1 -1
  21. package/dist/cmp/List.js.map +1 -1
  22. package/dist/cmp/None.js.map +1 -1
  23. package/dist/cmp/Project.js.map +1 -1
  24. package/dist/cmp/Slot.js.map +1 -1
  25. package/dist/diff.d.ts +36 -0
  26. package/dist/diff.js +446 -0
  27. package/dist/diff.js.map +1 -0
  28. package/dist/jostraca.d.ts +19 -18
  29. package/dist/jostraca.js +83 -24
  30. package/dist/jostraca.js.map +1 -1
  31. package/dist/op/ContentOp.js.map +1 -1
  32. package/dist/op/CopyOp.js +158 -22
  33. package/dist/op/CopyOp.js.map +1 -1
  34. package/dist/op/FileOp.js +26 -27
  35. package/dist/op/FileOp.js.map +1 -1
  36. package/dist/op/FolderOp.js +3 -0
  37. package/dist/op/FolderOp.js.map +1 -1
  38. package/dist/op/FragmentOp.js.map +1 -1
  39. package/dist/op/InjectOp.js +29 -7
  40. package/dist/op/InjectOp.js.map +1 -1
  41. package/dist/op/NoneOp.js.map +1 -1
  42. package/dist/op/ProjectOp.js.map +1 -1
  43. package/dist/op/SlotOp.js.map +1 -1
  44. package/dist/tsconfig.tsbuildinfo +1 -1
  45. package/dist/types.d.ts +1 -0
  46. package/dist/util/basic.d.ts +5 -1
  47. package/dist/util/basic.js +218 -9
  48. package/dist/util/basic.js.map +1 -1
  49. package/dist/util/point.d.ts +8 -7
  50. package/dist/util/point.js.map +1 -1
  51. package/package.json +19 -11
  52. package/src/build/BuildContext.ts +12 -0
  53. package/src/build/BuildMeta.ts +24 -5
  54. package/src/build/FileHandler.ts +489 -121
  55. package/src/cmp/Copy.ts +5 -1
  56. package/src/cmp/File.ts +3 -0
  57. package/src/cmp/Fragment.ts +41 -7
  58. package/src/cmp/Inject.ts +38 -1
  59. package/src/diff.ts +657 -0
  60. package/src/jostraca.ts +83 -20
  61. package/src/op/CopyOp.ts +173 -22
  62. package/src/op/FileOp.ts +29 -31
  63. package/src/op/FolderOp.ts +6 -0
  64. package/src/op/InjectOp.ts +39 -7
  65. package/src/tsconfig.json +3 -1
  66. package/src/types.ts +5 -0
  67. package/src/util/basic.ts +250 -10
package/dist/diff.js ADDED
@@ -0,0 +1,446 @@
1
+ "use strict";
2
+ /* Copyright (c) 2024 Richard Rodger, MIT License */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.merge = merge;
5
+ exports.diff = diff;
6
+ exports.hasConflicts = hasConflicts;
7
+ exports.lines = lines;
8
+ exports.lcs = lcs;
9
+ exports.alignLcs = alignLcs;
10
+ exports.hunks = hunks;
11
+ // --- Markers --------------------------------------------------------------
12
+ const MARK_START = '<<<<<<< ';
13
+ const MARK_MID = '=======\n';
14
+ const MARK_END = '>>>>>>> ';
15
+ const LABEL_GENERATED = 'GENERATED';
16
+ const LABEL_EXISTING = 'EXISTING';
17
+ // The end-of-conflict marker for the EXISTING side. A file still holding
18
+ // this has an unresolved merge in it.
19
+ const UNRESOLVED_MARK = MARK_END + LABEL_EXISTING + ':';
20
+ // Whether text still holds an unresolved conflict from an earlier merge.
21
+ // Keyed on the closing EXISTING marker alone: a half-resolved file, where
22
+ // the opening marker was removed but the closing one was not, must still
23
+ // count as unresolved rather than being re-merged.
24
+ //
25
+ // The `existingLabel` argument matters when the caller supplied a custom
26
+ // one: `writeConflict` emits `>>>>>>> ` + whatever label was configured, so
27
+ // a file conflicted under `labels.existing = 'E'` does not contain the
28
+ // default sentinel at all. Without it, merge's unresolved guard did not
29
+ // fire and the markers nested one level deeper on every run — exactly what
30
+ // the guard exists to prevent.
31
+ //
32
+ // Detection only holds when the SAME existing label is used across runs. A
33
+ // caller that changes its labels between generations cannot expect an older
34
+ // conflict to be recognised, and the default is unchanged for callers that
35
+ // never set one.
36
+ function hasConflicts(text, existingLabel) {
37
+ // The default sentinel is a PREFIX (`>>>>>>> EXISTING:`), so it matches
38
+ // whatever timestamp follows. Checking the fully-formatted label instead
39
+ // would only match a conflict written in the same millisecond.
40
+ if (text.includes(UNRESOLVED_MARK)) {
41
+ return true;
42
+ }
43
+ // Match the COMPLETE emitted marker, including its newline. A bare
44
+ // substring check on `MARK_END + label` treats a custom label as a
45
+ // prefix, so label `E` matched an ordinary line `>>>>>>> Example` and
46
+ // merge returned `unresolved` — silently suppressing a legitimate
47
+ // regeneration over a marker the engine never emitted. writeConflict
48
+ // always appends '\n', so the newline is safe to require.
49
+ return null != existingLabel &&
50
+ text.includes(MARK_END + existingLabel + '\n');
51
+ }
52
+ function isoOf(when) {
53
+ return new Date(null == when ? 0 : when).toISOString();
54
+ }
55
+ function labelsOf(spec, defaultKind) {
56
+ const kind = null == spec?.kind ? defaultKind : spec.kind;
57
+ return {
58
+ generated: null == spec?.labels?.generated ?
59
+ LABEL_GENERATED + ': ' + isoOf(spec?.when) + '/' + kind :
60
+ spec.labels.generated,
61
+ existing: null == spec?.labels?.existing ?
62
+ LABEL_EXISTING + ': ' + isoOf(spec?.last) + '/' + kind :
63
+ spec.labels.existing,
64
+ };
65
+ }
66
+ // --- Line primitives ------------------------------------------------------
67
+ // Split on \n, keeping the newline on each line so join('') round-trips
68
+ // exactly, including a final line with no trailing newline.
69
+ function lines(text) {
70
+ if ('' === text) {
71
+ return [];
72
+ }
73
+ const out = [];
74
+ let rest = text;
75
+ for (;;) {
76
+ const at = rest.indexOf('\n');
77
+ if (at < 0) {
78
+ out.push(rest);
79
+ return out;
80
+ }
81
+ out.push(rest.substring(0, at + 1));
82
+ rest = rest.substring(at + 1);
83
+ if ('' === rest) {
84
+ return out;
85
+ }
86
+ }
87
+ }
88
+ // Longest common subsequence of two line arrays.
89
+ function lcs(a, b) {
90
+ if (0 === a.length || 0 === b.length) {
91
+ return [];
92
+ }
93
+ // Common prefix, then common suffix of what is left. Those lines are in
94
+ // every optimal LCS, and skipping them is what makes the realistic case
95
+ // (a mostly-unchanged regenerated file) fast.
96
+ let head = 0;
97
+ while (head < a.length && head < b.length && a[head] === b[head]) {
98
+ head++;
99
+ }
100
+ let tail = 0;
101
+ while (tail < a.length - head && tail < b.length - head &&
102
+ a[a.length - 1 - tail] === b[b.length - 1 - tail]) {
103
+ tail++;
104
+ }
105
+ const out = a.slice(0, head);
106
+ hirschberg(a.slice(head, a.length - tail), b.slice(head, b.length - tail), out);
107
+ for (let i = a.length - tail; i < a.length; i++) {
108
+ out.push(a[i]);
109
+ }
110
+ return out;
111
+ }
112
+ // Hirschberg's divide and conquer: recurse on the two halves of `a`, each
113
+ // step holding only two rows of the length table.
114
+ function hirschberg(a, b, out) {
115
+ if (0 === a.length || 0 === b.length) {
116
+ return;
117
+ }
118
+ if (1 === a.length) {
119
+ // Scanning backwards mirrors how a full-table walk recovers the LCS
120
+ // (it starts at the end of `b` and steps back), which keeps this
121
+ // readable against the oracle in the tests. It is not a tie-break:
122
+ // `a[0]` is pushed whichever position matched, so first and last
123
+ // occurrence produce the same string.
124
+ for (let i = b.length - 1; 0 <= i; i--) {
125
+ if (b[i] === a[0]) {
126
+ out.push(a[0]);
127
+ return;
128
+ }
129
+ }
130
+ return;
131
+ }
132
+ const mid = Math.floor(a.length / 2);
133
+ const headRow = lcsRow(a.slice(0, mid), b, false);
134
+ const tailRow = lcsRow(a.slice(mid), b, true);
135
+ // `>=` so a tie takes the LARGEST split. This is THE load-bearing
136
+ // tie-break: changing it to `>` changes the merged content on 658 of
137
+ // the differential corpus cases (`make mutation` prints the live
138
+ // number). See the note at the top of this file.
139
+ let best = -1;
140
+ let split = 0;
141
+ for (let k = 0; k <= b.length; k++) {
142
+ const sum = headRow[k] + tailRow[b.length - k];
143
+ if (sum >= best) {
144
+ best = sum;
145
+ split = k;
146
+ }
147
+ }
148
+ hirschberg(a.slice(0, mid), b.slice(0, split), out);
149
+ hirschberg(a.slice(mid), b.slice(split), out);
150
+ }
151
+ // Final row of the LCS length table for `a` against `b`. With `reverse`,
152
+ // both sequences are walked back to front, so the result is indexed by
153
+ // suffix length rather than prefix length.
154
+ function lcsRow(a, b, reverse) {
155
+ let prev = new Array(b.length + 1).fill(0);
156
+ let cur = new Array(b.length + 1).fill(0);
157
+ const at = (xs, i) => reverse ? xs[xs.length - 1 - i] : xs[i];
158
+ for (let i = 0; i < a.length; i++) {
159
+ const ai = at(a, i);
160
+ cur[0] = 0;
161
+ for (let j = 0; j < b.length; j++) {
162
+ if (ai === at(b, j)) {
163
+ cur[j + 1] = prev[j] + 1;
164
+ }
165
+ // max(prev[j+1], cur[j]). The `>=` is not a tie-break: on a tie both
166
+ // branches assign the same number.
167
+ else if (prev[j + 1] >= cur[j]) {
168
+ cur[j + 1] = prev[j + 1];
169
+ }
170
+ else {
171
+ cur[j + 1] = cur[j];
172
+ }
173
+ }
174
+ const swap = prev;
175
+ prev = cur;
176
+ cur = swap;
177
+ }
178
+ return prev;
179
+ }
180
+ // Anchor map: `m[i]` is the index in `target` where `base[i]` sits in the
181
+ // LCS of the two, or -1 when `base[i]` is not in it.
182
+ function alignLcs(base, target) {
183
+ const m = new Array(base.length).fill(-1);
184
+ if (0 === base.length || 0 === target.length) {
185
+ return m;
186
+ }
187
+ const common = lcs(base, target);
188
+ let ci = 0;
189
+ let ti = 0;
190
+ let bi = 0;
191
+ while (ci < common.length && bi < base.length && ti < target.length) {
192
+ while (bi < base.length && base[bi] !== common[ci]) {
193
+ bi++;
194
+ }
195
+ while (ti < target.length && target[ti] !== common[ci]) {
196
+ ti++;
197
+ }
198
+ if (bi < base.length && ti < target.length) {
199
+ m[bi] = ti;
200
+ bi++;
201
+ ti++;
202
+ ci++;
203
+ }
204
+ }
205
+ return m;
206
+ }
207
+ function sameLines(a, b) {
208
+ if (a.length !== b.length) {
209
+ return false;
210
+ }
211
+ for (let i = 0; i < a.length; i++) {
212
+ if (a[i] !== b[i]) {
213
+ return false;
214
+ }
215
+ }
216
+ return true;
217
+ }
218
+ // Whether the text accumulated so far ends with a newline, so a marker
219
+ // always starts on its own line.
220
+ //
221
+ // Precondition: `parts` is non-empty and holds no empty strings. Both hold
222
+ // at every call site — writeConflict pushes its opening marker first, and
223
+ // `lines` never yields an empty element.
224
+ function endsWithNewline(parts) {
225
+ return parts[parts.length - 1].endsWith('\n');
226
+ }
227
+ function writeConflict(out, generated, existing, labels) {
228
+ out.push(MARK_START + labels.generated + '\n');
229
+ out.push(...generated);
230
+ if (!endsWithNewline(out)) {
231
+ out.push('\n');
232
+ }
233
+ out.push(MARK_MID);
234
+ out.push(...existing);
235
+ if (!endsWithNewline(out)) {
236
+ out.push('\n');
237
+ }
238
+ out.push(MARK_END + labels.existing + '\n');
239
+ }
240
+ // --- Three-way merge ------------------------------------------------------
241
+ // Merge what was just generated with what is on disk, using the previous
242
+ // generate as the common ancestor.
243
+ //
244
+ // generated - what this run produced
245
+ // baseline - what the last run produced (the merge base)
246
+ // existing - what is on disk now, possibly hand-edited
247
+ //
248
+ // Taking the previous generate as the ancestor is what preserves manual
249
+ // edits: anything in `existing` that is not in `baseline` is the user's.
250
+ function merge(generated, baseline, existing, spec) {
251
+ // Fast paths, in order. Each is semantics-identical to running the full
252
+ // merge, and each avoids the quadratic core entirely.
253
+ // Nothing changed on either side.
254
+ if (generated === existing) {
255
+ return { content: existing, conflict: false, outcome: 'same' };
256
+ }
257
+ // The file is untouched since the last generate, so there is nothing of
258
+ // the user's to preserve: the new generate wins outright.
259
+ if (existing === baseline) {
260
+ return { content: generated, conflict: false, outcome: 'clean' };
261
+ }
262
+ const labels = labelsOf(spec, 'merge');
263
+ // Never merge into an unresolved merge — that stacks conflict markers
264
+ // inside conflict markers and is unreadable. Leave it for the user.
265
+ // Pass the EXPLICIT custom label, not the formatted one: the formatted
266
+ // default carries a timestamp and would never match an older conflict.
267
+ if (hasConflicts(existing, spec?.labels?.existing)) {
268
+ return { content: existing, conflict: false, outcome: 'unresolved' };
269
+ }
270
+ const gl = lines(generated);
271
+ const bl = lines(baseline);
272
+ const el = lines(existing);
273
+ const gMap = alignLcs(bl, gl);
274
+ const eMap = alignLcs(bl, el);
275
+ const out = [];
276
+ let conflict = false;
277
+ let bi = 0;
278
+ let gi = 0;
279
+ let ei = 0;
280
+ while (bi < bl.length) {
281
+ if (0 <= gMap[bi] && 0 <= eMap[bi]) {
282
+ // Anchor: this baseline line survives on both sides. Reconcile
283
+ // whatever each side inserted in front of it.
284
+ const gIns = gl.slice(gi, gMap[bi]);
285
+ const eIns = el.slice(ei, eMap[bi]);
286
+ if (sameLines(gIns, eIns)) {
287
+ out.push(...gIns);
288
+ }
289
+ else if (0 === gIns.length) {
290
+ out.push(...eIns);
291
+ }
292
+ else if (0 === eIns.length) {
293
+ out.push(...gIns);
294
+ }
295
+ else {
296
+ writeConflict(out, gIns, eIns, labels);
297
+ conflict = true;
298
+ }
299
+ out.push(bl[bi]);
300
+ gi = gMap[bi] + 1;
301
+ ei = eMap[bi] + 1;
302
+ bi++;
303
+ continue;
304
+ }
305
+ // Not an anchor: run forward to the next one and reconcile the whole
306
+ // region between.
307
+ let nextBi = bi;
308
+ while (nextBi < bl.length && (gMap[nextBi] < 0 || eMap[nextBi] < 0)) {
309
+ nextBi++;
310
+ }
311
+ const bRegion = bl.slice(bi, nextBi);
312
+ let gRegion;
313
+ let eRegion;
314
+ if (nextBi < bl.length) {
315
+ gRegion = gl.slice(gi, gMap[nextBi]);
316
+ eRegion = el.slice(ei, eMap[nextBi]);
317
+ }
318
+ else {
319
+ gRegion = gl.slice(gi);
320
+ eRegion = el.slice(ei);
321
+ }
322
+ if (sameLines(bRegion, gRegion)) {
323
+ // Only the user changed this region.
324
+ out.push(...eRegion);
325
+ }
326
+ else if (sameLines(bRegion, eRegion)) {
327
+ // Only the generator changed this region.
328
+ out.push(...gRegion);
329
+ }
330
+ else if (sameLines(gRegion, eRegion)) {
331
+ // Both made the same change.
332
+ out.push(...gRegion);
333
+ }
334
+ else {
335
+ writeConflict(out, gRegion, eRegion, labels);
336
+ conflict = true;
337
+ }
338
+ if (nextBi < bl.length) {
339
+ gi = gMap[nextBi];
340
+ ei = eMap[nextBi];
341
+ }
342
+ else {
343
+ gi = gl.length;
344
+ ei = el.length;
345
+ }
346
+ bi = nextBi;
347
+ }
348
+ // Anything after the last anchor.
349
+ if (gi < gl.length || ei < el.length) {
350
+ const gTail = gl.slice(gi);
351
+ const eTail = el.slice(ei);
352
+ if (sameLines(gTail, eTail)) {
353
+ out.push(...gTail);
354
+ }
355
+ else if (0 === gTail.length) {
356
+ out.push(...eTail);
357
+ }
358
+ else if (0 === eTail.length) {
359
+ out.push(...gTail);
360
+ }
361
+ else {
362
+ writeConflict(out, gTail, eTail, labels);
363
+ conflict = true;
364
+ }
365
+ }
366
+ return { content: out.join(''), conflict, outcome: 'merged' };
367
+ }
368
+ // --- Two-way diff ---------------------------------------------------------
369
+ const HUNK_SAME = 0;
370
+ const HUNK_CHANGE = 1;
371
+ // Hunks describing the difference between the two line arrays. Adjacent
372
+ // insertions and deletions merge into a single change hunk, so a modified
373
+ // region is reported once rather than as a delete followed by an add.
374
+ function hunks(generated, existing) {
375
+ const common = lcs(generated, existing);
376
+ const out = [];
377
+ let gi = 0;
378
+ let ei = 0;
379
+ // Two change hunks can never end up adjacent: every flush in the loop
380
+ // below is immediately followed by a same-hunk, and the trailing flush is
381
+ // the last thing to run. So there is nothing to merge into.
382
+ const flush = (g, e) => {
383
+ if (0 === g.length && 0 === e.length) {
384
+ return;
385
+ }
386
+ out.push({ kind: HUNK_CHANGE, generated: g, existing: e });
387
+ };
388
+ for (const line of common) {
389
+ const g = [];
390
+ const e = [];
391
+ while (gi < generated.length && generated[gi] !== line) {
392
+ g.push(generated[gi]);
393
+ gi++;
394
+ }
395
+ while (ei < existing.length && existing[ei] !== line) {
396
+ e.push(existing[ei]);
397
+ ei++;
398
+ }
399
+ flush(g, e);
400
+ const last = out[out.length - 1];
401
+ if (null != last && HUNK_SAME === last.kind) {
402
+ last.generated.push(line);
403
+ }
404
+ else {
405
+ out.push({ kind: HUNK_SAME, generated: [line], existing: [] });
406
+ }
407
+ gi++;
408
+ ei++;
409
+ }
410
+ flush(generated.slice(gi), existing.slice(ei));
411
+ return out;
412
+ }
413
+ // Annotated view of the difference between the new generate and what is on
414
+ // disk. Unchanged text passes through; each changed region becomes a pair
415
+ // of marked blocks, the existing side first.
416
+ function diff(generated, existing, spec) {
417
+ if (generated === existing) {
418
+ return { content: generated, conflict: false, outcome: 'same' };
419
+ }
420
+ const labels = labelsOf(spec, 'diff');
421
+ const out = [];
422
+ const block = (block_lines, label) => {
423
+ out.push(MARK_START + label + '\n');
424
+ for (const line of block_lines) {
425
+ out.push(line);
426
+ if (!line.endsWith('\n')) {
427
+ out.push('\n');
428
+ }
429
+ }
430
+ out.push(MARK_END + label + '\n');
431
+ };
432
+ for (const hunk of hunks(lines(generated), lines(existing))) {
433
+ if (HUNK_SAME === hunk.kind) {
434
+ out.push(...hunk.generated);
435
+ continue;
436
+ }
437
+ if (0 < hunk.existing.length) {
438
+ block(hunk.existing, labels.existing);
439
+ }
440
+ if (0 < hunk.generated.length) {
441
+ block(hunk.generated, labels.generated);
442
+ }
443
+ }
444
+ return { content: out.join(''), conflict: true, outcome: 'changed'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C,CAAA;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;QAC5D,IAAI,SAAS,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YAC5B,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAA;YAC3B,SAAQ;QACV,CAAC;QACD,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAA;QACvC,CAAC;QACD,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAA;QACzC,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAA;AACtE,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import type { Node, Component, JostracaResult } from './types';
2
2
  import { BuildContext } from './build/BuildContext';
3
- import { each, get, getx, camelify, snakify, kebabify, cmap, vmap, names, template, escre, indent, isbinext, partify, lcf, ucf } from './util/basic';
3
+ import { each, get, getx, camelify, snakify, kebabify, cmap, vmap, deep, omap, names, template, escre, indent, isbincontent, isbinext, partify, lcf, ucf } from './util/basic';
4
4
  import * as PointUtil from './util/point';
5
- declare const deep: (...args: any[]) => any;
6
- declare const omap: (...args: any[]) => any;
5
+ import * as DiffUtil from './diff';
7
6
  import { Content } from './cmp/Content';
8
7
  import { Line } from './cmp/Line';
9
8
  import { Slot } from './cmp/Slot';
@@ -91,8 +90,8 @@ declare const OptionsShape: {
91
90
  version: boolean;
92
91
  };
93
92
  };
94
- match(root?: any, ctx?: import("shape").Context): boolean;
95
- error(root?: any, ctx?: import("shape").Context): {
93
+ match: (root?: any, ctx?: import("shape").Context) => boolean;
94
+ error: (root?: any, ctx?: import("shape").Context) => {
96
95
  shape: boolean;
97
96
  code: string;
98
97
  gname: string;
@@ -110,6 +109,7 @@ declare const OptionsShape: {
110
109
  node: import("shape").Node<any>;
111
110
  value: any;
112
111
  path: string;
112
+ pathArr: (string | number)[];
113
113
  why: string;
114
114
  check: string;
115
115
  args: Record<string, any>;
@@ -129,8 +129,8 @@ declare const OptionsShape: {
129
129
  stack?: string;
130
130
  cause?: unknown;
131
131
  }[];
132
- spec(): any;
133
- node(): import("shape").Node<{
132
+ spec: () => any;
133
+ node: () => import("shape").Node<{
134
134
  folder: import("shape").Node<StringConstructor>;
135
135
  name: {
136
136
  file: {
@@ -168,9 +168,9 @@ declare const OptionsShape: {
168
168
  version: boolean;
169
169
  };
170
170
  }>;
171
- stringify(...rest: any[]): string;
172
- jsonify(): any;
173
- toString(this: any): string;
171
+ stringify: (...rest: any[]) => string;
172
+ jsonify: () => any;
173
+ toString: (this: any) => string;
174
174
  shape: {
175
175
  shape$: symbol;
176
176
  v$: string;
@@ -205,8 +205,8 @@ declare const ExistingShape: {
205
205
  present: boolean;
206
206
  };
207
207
  };
208
- match(root?: any, ctx?: import("shape").Context): boolean;
209
- error(root?: any, ctx?: import("shape").Context): {
208
+ match: (root?: any, ctx?: import("shape").Context) => boolean;
209
+ error: (root?: any, ctx?: import("shape").Context) => {
210
210
  shape: boolean;
211
211
  code: string;
212
212
  gname: string;
@@ -224,6 +224,7 @@ declare const ExistingShape: {
224
224
  node: import("shape").Node<any>;
225
225
  value: any;
226
226
  path: string;
227
+ pathArr: (string | number)[];
227
228
  why: string;
228
229
  check: string;
229
230
  args: Record<string, any>;
@@ -243,8 +244,8 @@ declare const ExistingShape: {
243
244
  stack?: string;
244
245
  cause?: unknown;
245
246
  }[];
246
- spec(): any;
247
- node(): import("shape").Node<{
247
+ spec: () => any;
248
+ node: () => import("shape").Node<{
248
249
  txt: {
249
250
  write: boolean;
250
251
  preserve: boolean;
@@ -258,9 +259,9 @@ declare const ExistingShape: {
258
259
  present: boolean;
259
260
  };
260
261
  }>;
261
- stringify(...rest: any[]): string;
262
- jsonify(): any;
263
- toString(this: any): string;
262
+ stringify: (...rest: any[]) => string;
263
+ jsonify: () => any;
264
+ toString: (this: any) => string;
264
265
  shape: {
265
266
  shape$: symbol;
266
267
  v$: string;
@@ -277,4 +278,4 @@ declare function Jostraca(gopts_in?: JostracaOptions | {}): {
277
278
  };
278
279
  declare function cmp(component: Function): Component;
279
280
  export type { JostracaResult, JostracaOptions, Component, Node, Existing, };
280
- export { Jostraca, BuildContext, cmp, each, get, getx, camelify, snakify, kebabify, cmap, vmap, names, template, escre, indent, isbinext, partify, lcf, ucf, deep, omap, Project, Content, File, Inject, Fragment, Folder, Copy, Line, Slot, List, PointUtil, };
281
+ export { Jostraca, BuildContext, cmp, each, get, getx, camelify, snakify, kebabify, cmap, vmap, names, template, escre, indent, isbincontent, isbinext, partify, lcf, ucf, deep, omap, Project, Content, File, Inject, Fragment, Folder, Copy, Line, Slot, List, PointUtil, DiffUtil, };