ts-graphviz 1.5.3-dev.7e8cbd7ab → 1.5.4-dev.2cdf4fa1a
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 +4 -0
- package/lib/adapter/node/index.cjs +2 -0
- package/lib/adapter/node/index.js +2 -0
- package/lib/ast/index.cjs +9 -9
- package/lib/ast/index.d.ts +25 -25
- package/lib/ast/index.js +9 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -541,6 +541,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
541
541
|
<tr>
|
|
542
542
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/robross0606"><img src="https://avatars.githubusercontent.com/u/2965467?v=4?s=100" width="100px;" alt="robross0606"/><br /><sub><b>robross0606</b></sub></a><br /><a href="#ideas-robross0606" title="Ideas, Planning, & Feedback">🤔</a></td>
|
|
543
543
|
<td align="center" valign="top" width="14.28%"><a href="https://blake-regalia.net"><img src="https://avatars.githubusercontent.com/u/1456400?v=4?s=100" width="100px;" alt="Blake Regalia"/><br /><sub><b>Blake Regalia</b></sub></a><br /><a href="https://github.com/ts-graphviz/ts-graphviz/issues?q=author%3Ablake-regalia" title="Bug reports">🐛</a></td>
|
|
544
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bigbug"><img src="https://avatars.githubusercontent.com/u/27259?v=4?s=100" width="100px;" alt="bigbug"/><br /><sub><b>bigbug</b></sub></a><br /><a href="#question-bigbug" title="Answering Questions">💬</a></td>
|
|
545
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/murawakimitsuhiro"><img src="https://avatars.githubusercontent.com/u/13833242?v=4?s=100" width="100px;" alt="mrwk"/><br /><sub><b>mrwk</b></sub></a><br /><a href="#question-murawakimitsuhiro" title="Answering Questions">💬</a></td>
|
|
546
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/svdvonde"><img src="https://avatars.githubusercontent.com/u/2751783?v=4?s=100" width="100px;" alt="svdvonde"/><br /><sub><b>svdvonde</b></sub></a><br /><a href="#question-svdvonde" title="Answering Questions">💬</a></td>
|
|
547
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/seethroughdev"><img src="https://avatars.githubusercontent.com/u/203779?v=4?s=100" width="100px;" alt="Adam"/><br /><sub><b>Adam</b></sub></a><br /><a href="#question-seethroughdev" title="Answering Questions">💬</a></td>
|
|
544
548
|
</tr>
|
|
545
549
|
</tbody>
|
|
546
550
|
</table>
|
|
@@ -29,7 +29,9 @@ async function toStream(dot, options) {
|
|
|
29
29
|
);
|
|
30
30
|
});
|
|
31
31
|
const stderrChunks = [];
|
|
32
|
+
p.stdout.on('pause', () => p.stdout.resume());
|
|
32
33
|
p.stderr.on('data', (chunk) => stderrChunks.push(chunk));
|
|
34
|
+
p.stderr.on('pause', () => p.stderr.resume());
|
|
33
35
|
const dist = p.stdout.pipe(new node_stream.PassThrough());
|
|
34
36
|
p.on('close', async (code, signal) => {
|
|
35
37
|
if (code === 0) {
|
|
@@ -27,7 +27,9 @@ async function toStream(dot, options) {
|
|
|
27
27
|
);
|
|
28
28
|
});
|
|
29
29
|
const stderrChunks = [];
|
|
30
|
+
p.stdout.on('pause', () => p.stdout.resume());
|
|
30
31
|
p.stderr.on('data', (chunk) => stderrChunks.push(chunk));
|
|
32
|
+
p.stderr.on('pause', () => p.stderr.resume());
|
|
31
33
|
const dist = p.stdout.pipe(new PassThrough());
|
|
32
34
|
p.on('close', async (code, signal) => {
|
|
33
35
|
if (code === 0) {
|
package/lib/ast/index.cjs
CHANGED
|
@@ -321,7 +321,7 @@ function peg$padEnd(str, targetLength, padString) {
|
|
|
321
321
|
padString += padString.repeat(targetLength);
|
|
322
322
|
return str + padString.slice(0, targetLength);
|
|
323
323
|
}
|
|
324
|
-
let
|
|
324
|
+
let DotSyntaxError$1 = class DotSyntaxError extends Error {
|
|
325
325
|
static buildMessage(expected, found) {
|
|
326
326
|
function hex(ch) {
|
|
327
327
|
return ch.charCodeAt(0).toString(16).toUpperCase();
|
|
@@ -406,14 +406,14 @@ let SyntaxError$1 = class SyntaxError extends Error {
|
|
|
406
406
|
this.expected = expected;
|
|
407
407
|
this.found = found;
|
|
408
408
|
this.location = location;
|
|
409
|
-
this.name = '
|
|
409
|
+
this.name = 'DotSyntaxError';
|
|
410
410
|
if (typeof Object.setPrototypeOf === 'function') {
|
|
411
|
-
Object.setPrototypeOf(this,
|
|
411
|
+
Object.setPrototypeOf(this, DotSyntaxError$1.prototype);
|
|
412
412
|
} else {
|
|
413
|
-
this.__proto__ =
|
|
413
|
+
this.__proto__ = DotSyntaxError$1.prototype;
|
|
414
414
|
}
|
|
415
415
|
if (typeof Error.captureStackTrace === 'function') {
|
|
416
|
-
Error.captureStackTrace(this,
|
|
416
|
+
Error.captureStackTrace(this, DotSyntaxError$1);
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
419
|
format(sources) {
|
|
@@ -2492,10 +2492,10 @@ function peg$parse(input, options) {
|
|
|
2492
2492
|
peg$maxFailExpected.push(expected1);
|
|
2493
2493
|
}
|
|
2494
2494
|
function peg$buildSimpleError(message, location1) {
|
|
2495
|
-
return new
|
|
2495
|
+
return new DotSyntaxError$1(message, [], '', location1);
|
|
2496
2496
|
}
|
|
2497
2497
|
function peg$buildStructuredError(expected1, found, location1) {
|
|
2498
|
-
return new
|
|
2498
|
+
return new DotSyntaxError$1(DotSyntaxError$1.buildMessage(expected1, found), expected1, found, location1);
|
|
2499
2499
|
}
|
|
2500
2500
|
function peg$parseDot() {
|
|
2501
2501
|
let s0, s1, s2, s3;
|
|
@@ -5257,7 +5257,7 @@ function parse(input, options) {
|
|
|
5257
5257
|
/**
|
|
5258
5258
|
* @group Convert DOT to AST
|
|
5259
5259
|
*/
|
|
5260
|
-
const
|
|
5260
|
+
const DotSyntaxError = DotSyntaxError$1;
|
|
5261
5261
|
|
|
5262
5262
|
function convertAttribute(key, value) {
|
|
5263
5263
|
if (typeof value === 'string') {
|
|
@@ -5811,9 +5811,9 @@ function toModel(ast, options) {
|
|
|
5811
5811
|
}
|
|
5812
5812
|
|
|
5813
5813
|
exports.Builder = Builder;
|
|
5814
|
+
exports.DotSyntaxError = DotSyntaxError;
|
|
5814
5815
|
exports.FromModelConverter = FromModelConverter;
|
|
5815
5816
|
exports.Printer = Printer;
|
|
5816
|
-
exports.SyntaxError = SyntaxError;
|
|
5817
5817
|
exports.ToModelConverter = ToModelConverter;
|
|
5818
5818
|
exports.createElement = createElement;
|
|
5819
5819
|
exports.fromModel = fromModel;
|
package/lib/ast/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
/**
|
|
14
14
|
* @group AST
|
|
15
15
|
*/
|
|
16
|
-
interface FilePosition {
|
|
16
|
+
interface FilePosition$1 {
|
|
17
17
|
offset: number;
|
|
18
18
|
line: number;
|
|
19
19
|
column: number;
|
|
@@ -21,16 +21,16 @@ interface FilePosition {
|
|
|
21
21
|
/**
|
|
22
22
|
* @group AST
|
|
23
23
|
*/
|
|
24
|
-
interface FileRange {
|
|
25
|
-
start: FilePosition;
|
|
26
|
-
end: FilePosition;
|
|
24
|
+
interface FileRange$1 {
|
|
25
|
+
start: FilePosition$1;
|
|
26
|
+
end: FilePosition$1;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* AST common propaties.
|
|
30
30
|
* @group AST
|
|
31
31
|
*/
|
|
32
32
|
interface ASTCommonPropaties {
|
|
33
|
-
location?: FileRange;
|
|
33
|
+
location?: FileRange$1;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* @group AST
|
|
@@ -242,7 +242,7 @@ type ASTChildNode<T> = T extends ASTBaseParentNode<infer C> ? C : never;
|
|
|
242
242
|
* @alpha
|
|
243
243
|
*/
|
|
244
244
|
interface BuilderOptions {
|
|
245
|
-
locationFunction: () => FileRange;
|
|
245
|
+
locationFunction: () => FileRange$1;
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
248
248
|
* @group Create AST
|
|
@@ -351,47 +351,47 @@ declare class Printer {
|
|
|
351
351
|
*/
|
|
352
352
|
declare function stringify(ast: ASTNode, options?: PrintOptions): string;
|
|
353
353
|
|
|
354
|
-
interface
|
|
354
|
+
interface FilePosition {
|
|
355
355
|
offset: number;
|
|
356
356
|
line: number;
|
|
357
357
|
column: number;
|
|
358
358
|
}
|
|
359
|
-
interface
|
|
360
|
-
start:
|
|
361
|
-
end:
|
|
359
|
+
interface FileRange {
|
|
360
|
+
start: FilePosition;
|
|
361
|
+
end: FilePosition;
|
|
362
362
|
source: string;
|
|
363
363
|
}
|
|
364
|
-
interface
|
|
364
|
+
interface LiteralExpectation {
|
|
365
365
|
type: 'literal';
|
|
366
366
|
text: string;
|
|
367
367
|
ignoreCase: boolean;
|
|
368
368
|
}
|
|
369
|
-
interface
|
|
370
|
-
interface
|
|
369
|
+
interface ClassParts extends Array<string | ClassParts> {}
|
|
370
|
+
interface ClassExpectation {
|
|
371
371
|
type: 'class';
|
|
372
|
-
parts:
|
|
372
|
+
parts: ClassParts;
|
|
373
373
|
inverted: boolean;
|
|
374
374
|
ignoreCase: boolean;
|
|
375
375
|
}
|
|
376
|
-
interface
|
|
376
|
+
interface AnyExpectation {
|
|
377
377
|
type: 'any';
|
|
378
378
|
}
|
|
379
|
-
interface
|
|
379
|
+
interface EndExpectation {
|
|
380
380
|
type: 'end';
|
|
381
381
|
}
|
|
382
|
-
interface
|
|
382
|
+
interface OtherExpectation {
|
|
383
383
|
type: 'other';
|
|
384
384
|
description: string;
|
|
385
385
|
}
|
|
386
|
-
type Expectation =
|
|
387
|
-
declare class
|
|
386
|
+
type Expectation = LiteralExpectation | ClassExpectation | AnyExpectation | EndExpectation | OtherExpectation;
|
|
387
|
+
declare class DotSyntaxError$1 extends Error {
|
|
388
388
|
static buildMessage(expected: Expectation[], found: string | null): string;
|
|
389
389
|
message: string;
|
|
390
390
|
expected: Expectation[];
|
|
391
391
|
found: string | null;
|
|
392
|
-
location:
|
|
392
|
+
location: FileRange;
|
|
393
393
|
name: string;
|
|
394
|
-
constructor(message: string, expected: Expectation[], found: string | null, location:
|
|
394
|
+
constructor(message: string, expected: Expectation[], found: string | null, location: FileRange);
|
|
395
395
|
format(
|
|
396
396
|
sources: {
|
|
397
397
|
grammarSource?: string;
|
|
@@ -433,7 +433,7 @@ declare function parse(input: string, options?: ParseOptions<Rule>): ASTNode | C
|
|
|
433
433
|
/**
|
|
434
434
|
* @group Convert DOT to AST
|
|
435
435
|
*/
|
|
436
|
-
declare const
|
|
436
|
+
declare const DotSyntaxError: typeof DotSyntaxError$1;
|
|
437
437
|
|
|
438
438
|
/**
|
|
439
439
|
* @group AST
|
|
@@ -590,12 +590,13 @@ export {
|
|
|
590
590
|
CreateElement,
|
|
591
591
|
DotASTNode,
|
|
592
592
|
DotASTPropaties,
|
|
593
|
+
DotSyntaxError,
|
|
593
594
|
EdgeASTNode,
|
|
594
595
|
EdgeASTPropaties,
|
|
595
596
|
EdgeTargetASTNode,
|
|
596
597
|
EndOfLine,
|
|
597
|
-
FilePosition,
|
|
598
|
-
FileRange,
|
|
598
|
+
FilePosition$1 as FilePosition,
|
|
599
|
+
FileRange$1 as FileRange,
|
|
599
600
|
FromModelConverter,
|
|
600
601
|
GraphASTNode,
|
|
601
602
|
GraphASTPropaties,
|
|
@@ -619,7 +620,6 @@ export {
|
|
|
619
620
|
StatementASTNode,
|
|
620
621
|
SubgraphASTNode,
|
|
621
622
|
SubgraphASTPropaties,
|
|
622
|
-
SyntaxError,
|
|
623
623
|
ToModelConvertableASTNode,
|
|
624
624
|
ToModelConverter,
|
|
625
625
|
createElement,
|
package/lib/ast/index.js
CHANGED
|
@@ -314,7 +314,7 @@ function peg$padEnd(str, targetLength, padString) {
|
|
|
314
314
|
padString += padString.repeat(targetLength);
|
|
315
315
|
return str + padString.slice(0, targetLength);
|
|
316
316
|
}
|
|
317
|
-
let
|
|
317
|
+
let DotSyntaxError$1 = class DotSyntaxError extends Error {
|
|
318
318
|
static buildMessage(expected, found) {
|
|
319
319
|
function hex(ch) {
|
|
320
320
|
return ch.charCodeAt(0).toString(16).toUpperCase();
|
|
@@ -399,14 +399,14 @@ let SyntaxError$1 = class SyntaxError extends Error {
|
|
|
399
399
|
this.expected = expected;
|
|
400
400
|
this.found = found;
|
|
401
401
|
this.location = location;
|
|
402
|
-
this.name = '
|
|
402
|
+
this.name = 'DotSyntaxError';
|
|
403
403
|
if (typeof Object.setPrototypeOf === 'function') {
|
|
404
|
-
Object.setPrototypeOf(this,
|
|
404
|
+
Object.setPrototypeOf(this, DotSyntaxError$1.prototype);
|
|
405
405
|
} else {
|
|
406
|
-
this.__proto__ =
|
|
406
|
+
this.__proto__ = DotSyntaxError$1.prototype;
|
|
407
407
|
}
|
|
408
408
|
if (typeof Error.captureStackTrace === 'function') {
|
|
409
|
-
Error.captureStackTrace(this,
|
|
409
|
+
Error.captureStackTrace(this, DotSyntaxError$1);
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
format(sources) {
|
|
@@ -2485,10 +2485,10 @@ function peg$parse(input, options) {
|
|
|
2485
2485
|
peg$maxFailExpected.push(expected1);
|
|
2486
2486
|
}
|
|
2487
2487
|
function peg$buildSimpleError(message, location1) {
|
|
2488
|
-
return new
|
|
2488
|
+
return new DotSyntaxError$1(message, [], '', location1);
|
|
2489
2489
|
}
|
|
2490
2490
|
function peg$buildStructuredError(expected1, found, location1) {
|
|
2491
|
-
return new
|
|
2491
|
+
return new DotSyntaxError$1(DotSyntaxError$1.buildMessage(expected1, found), expected1, found, location1);
|
|
2492
2492
|
}
|
|
2493
2493
|
function peg$parseDot() {
|
|
2494
2494
|
let s0, s1, s2, s3;
|
|
@@ -5250,7 +5250,7 @@ function parse(input, options) {
|
|
|
5250
5250
|
/**
|
|
5251
5251
|
* @group Convert DOT to AST
|
|
5252
5252
|
*/
|
|
5253
|
-
const
|
|
5253
|
+
const DotSyntaxError = DotSyntaxError$1;
|
|
5254
5254
|
|
|
5255
5255
|
function convertAttribute(key, value) {
|
|
5256
5256
|
if (typeof value === 'string') {
|
|
@@ -5805,9 +5805,9 @@ function toModel(ast, options) {
|
|
|
5805
5805
|
|
|
5806
5806
|
export {
|
|
5807
5807
|
Builder,
|
|
5808
|
+
DotSyntaxError,
|
|
5808
5809
|
FromModelConverter,
|
|
5809
5810
|
Printer,
|
|
5810
|
-
SyntaxError,
|
|
5811
5811
|
ToModelConverter,
|
|
5812
5812
|
createElement,
|
|
5813
5813
|
fromModel,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-graphviz",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4-dev.2cdf4fa1a",
|
|
4
4
|
"author": "kamiazya <yuki@kamiazya.tech>",
|
|
5
5
|
"description": "Graphviz library for TypeScript.",
|
|
6
6
|
"homepage": "https://ts-graphviz.github.io/ts-graphviz/",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"rollup-plugin-dts": "5.1.1",
|
|
119
119
|
"svgo": "^3.0.2",
|
|
120
120
|
"ts-jest": "^29.0.5",
|
|
121
|
-
"ts-pegjs": "^
|
|
121
|
+
"ts-pegjs": "^3.0.0",
|
|
122
122
|
"typedoc": "^0.23.15",
|
|
123
123
|
"typescript": "^4.7.4"
|
|
124
124
|
}
|