ts-graphviz 1.5.2-dev.2db2ba0c3 → 1.5.3-dev.3abfe14cf
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/lib/adapter/browser/index.cjs +0 -2
- package/lib/adapter/node/index.cjs +0 -2
- package/lib/adapter/utils/index.cjs +0 -2
- package/lib/ast/index.cjs +10 -12
- package/lib/ast/index.d.ts +25 -25
- package/lib/ast/index.js +10 -10
- package/lib/common/index.cjs +0 -2
- package/lib/core/index.cjs +0 -2
- package/lib/index.cjs +0 -2
- package/lib/utils/index.cjs +0 -2
- package/media/adapter-state-machine.svg +1 -1
- package/package.json +17 -17
package/lib/ast/index.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var index_js = require('../utils/index.cjs');
|
|
6
4
|
var index_js$1 = require('../common/index.cjs');
|
|
7
5
|
|
|
@@ -323,7 +321,7 @@ function peg$padEnd(str, targetLength, padString) {
|
|
|
323
321
|
padString += padString.repeat(targetLength);
|
|
324
322
|
return str + padString.slice(0, targetLength);
|
|
325
323
|
}
|
|
326
|
-
|
|
324
|
+
let DotSyntaxError$1 = class DotSyntaxError extends Error {
|
|
327
325
|
static buildMessage(expected, found) {
|
|
328
326
|
function hex(ch) {
|
|
329
327
|
return ch.charCodeAt(0).toString(16).toUpperCase();
|
|
@@ -408,14 +406,14 @@ class SyntaxError$1 extends Error {
|
|
|
408
406
|
this.expected = expected;
|
|
409
407
|
this.found = found;
|
|
410
408
|
this.location = location;
|
|
411
|
-
this.name = '
|
|
409
|
+
this.name = 'DotSyntaxError';
|
|
412
410
|
if (typeof Object.setPrototypeOf === 'function') {
|
|
413
|
-
Object.setPrototypeOf(this,
|
|
411
|
+
Object.setPrototypeOf(this, DotSyntaxError$1.prototype);
|
|
414
412
|
} else {
|
|
415
|
-
this.__proto__ =
|
|
413
|
+
this.__proto__ = DotSyntaxError$1.prototype;
|
|
416
414
|
}
|
|
417
415
|
if (typeof Error.captureStackTrace === 'function') {
|
|
418
|
-
Error.captureStackTrace(this,
|
|
416
|
+
Error.captureStackTrace(this, DotSyntaxError$1);
|
|
419
417
|
}
|
|
420
418
|
}
|
|
421
419
|
format(sources) {
|
|
@@ -456,7 +454,7 @@ class SyntaxError$1 extends Error {
|
|
|
456
454
|
}
|
|
457
455
|
return str;
|
|
458
456
|
}
|
|
459
|
-
}
|
|
457
|
+
};
|
|
460
458
|
function peg$parse(input, options) {
|
|
461
459
|
options = options !== undefined ? options : {};
|
|
462
460
|
const peg$FAILED = {};
|
|
@@ -2494,10 +2492,10 @@ function peg$parse(input, options) {
|
|
|
2494
2492
|
peg$maxFailExpected.push(expected1);
|
|
2495
2493
|
}
|
|
2496
2494
|
function peg$buildSimpleError(message, location1) {
|
|
2497
|
-
return new
|
|
2495
|
+
return new DotSyntaxError$1(message, [], '', location1);
|
|
2498
2496
|
}
|
|
2499
2497
|
function peg$buildStructuredError(expected1, found, location1) {
|
|
2500
|
-
return new
|
|
2498
|
+
return new DotSyntaxError$1(DotSyntaxError$1.buildMessage(expected1, found), expected1, found, location1);
|
|
2501
2499
|
}
|
|
2502
2500
|
function peg$parseDot() {
|
|
2503
2501
|
let s0, s1, s2, s3;
|
|
@@ -5259,7 +5257,7 @@ function parse(input, options) {
|
|
|
5259
5257
|
/**
|
|
5260
5258
|
* @group Convert DOT to AST
|
|
5261
5259
|
*/
|
|
5262
|
-
const
|
|
5260
|
+
const DotSyntaxError = DotSyntaxError$1;
|
|
5263
5261
|
|
|
5264
5262
|
function convertAttribute(key, value) {
|
|
5265
5263
|
if (typeof value === 'string') {
|
|
@@ -5813,9 +5811,9 @@ function toModel(ast, options) {
|
|
|
5813
5811
|
}
|
|
5814
5812
|
|
|
5815
5813
|
exports.Builder = Builder;
|
|
5814
|
+
exports.DotSyntaxError = DotSyntaxError;
|
|
5816
5815
|
exports.FromModelConverter = FromModelConverter;
|
|
5817
5816
|
exports.Printer = Printer;
|
|
5818
|
-
exports.SyntaxError = SyntaxError;
|
|
5819
5817
|
exports.ToModelConverter = ToModelConverter;
|
|
5820
5818
|
exports.createElement = createElement;
|
|
5821
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
|
-
|
|
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 @@ class SyntaxError$1 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) {
|
|
@@ -447,7 +447,7 @@ class SyntaxError$1 extends Error {
|
|
|
447
447
|
}
|
|
448
448
|
return str;
|
|
449
449
|
}
|
|
450
|
-
}
|
|
450
|
+
};
|
|
451
451
|
function peg$parse(input, options) {
|
|
452
452
|
options = options !== undefined ? options : {};
|
|
453
453
|
const peg$FAILED = {};
|
|
@@ -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/lib/common/index.cjs
CHANGED
package/lib/core/index.cjs
CHANGED
package/lib/index.cjs
CHANGED
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg width="172pt" height="211pt" viewBox="0 0 172.44 211.09"
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="172pt" height="211pt" viewBox="0 0 172.44 211.09"><g class="graph" transform="translate(4 207.09)"><path fill="#fff" stroke="transparent" d="M-4 4v-211.09h172.44V4H-4z"/><g class="node"><circle cx="89.85" cy="-171.89" r="31.4" fill="none" stroke="#000"/><text x="89.85" y="-168.19" font-family="Times,serif" font-size="14" text-anchor="middle">DOT</text></g><g class="node"><circle cx="44.85" cy="-44.85" r="44.69" fill="none" stroke="#000"/><text x="44.85" y="-41.15" font-family="Times,serif" font-size="14" text-anchor="middle">Stream</text></g><g class="edge"><path fill="none" stroke="#000" d="M66.46-151.09c-7.72 7.95-15.4 17.76-19.61 28.4-2.87 7.24-4.54 15.17-5.4 23.11"/><path stroke="#000" d="m44.94-99.32-4.18 9.73-2.8-10.21 6.98.48z"/><text x="80.35" y="-111.49" font-family="Times,serif" font-size="14" text-anchor="middle">toStream</text></g><g class="node"><circle cx="135.85" cy="-44.85" r="28.7" fill="none" stroke="#000"/><text x="135.85" y="-41.15" font-family="Times,serif" font-size="14" text-anchor="middle">File</text></g><g class="edge"><path fill="none" stroke="#000" d="M104.32-144.01c3.38 6.84 6.79 14.26 9.53 21.32 4.95 12.76 9.35 27.09 12.89 39.89"/><path stroke="#000" d="m130.18-83.48-.79 10.56-5.97-8.75 6.76-1.81z"/><text x="139.85" y="-111.49" font-family="Times,serif" font-size="14" text-anchor="middle">toFile</text></g></g></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-graphviz",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3-dev.3abfe14cf",
|
|
4
4
|
"author": "kamiazya <yuki@kamiazya.tech>",
|
|
5
5
|
"description": "Graphviz library for TypeScript.",
|
|
6
6
|
"homepage": "https://ts-graphviz.github.io/ts-graphviz/",
|
|
@@ -97,28 +97,28 @@
|
|
|
97
97
|
"doc": "typedoc"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
|
-
"@rollup/plugin-replace": "^
|
|
101
|
-
"@types/jest": "^
|
|
100
|
+
"@rollup/plugin-replace": "^5.0.2",
|
|
101
|
+
"@types/jest": "^29.4.0",
|
|
102
102
|
"@types/jest-specific-snapshot": "^0.5.6",
|
|
103
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
104
|
-
"@typescript-eslint/parser": "^5.
|
|
105
|
-
"eslint": "^8.
|
|
106
|
-
"eslint-config-prettier": "^8.
|
|
107
|
-
"eslint-plugin-import": "^2.
|
|
108
|
-
"eslint-plugin-jest": "^
|
|
103
|
+
"@typescript-eslint/eslint-plugin": "^5.49.0",
|
|
104
|
+
"@typescript-eslint/parser": "^5.49.0",
|
|
105
|
+
"eslint": "^8.32.0",
|
|
106
|
+
"eslint-config-prettier": "^8.6.0",
|
|
107
|
+
"eslint-plugin-import": "^2.27.5",
|
|
108
|
+
"eslint-plugin-jest": "^27.2.1",
|
|
109
109
|
"eslint-plugin-prettier": "^4.2.1",
|
|
110
|
-
"jest": "^
|
|
110
|
+
"jest": "^29.4.1",
|
|
111
111
|
"jest-snapshot-serializer-raw": "^1.2.0",
|
|
112
|
-
"jest-specific-snapshot": "^
|
|
112
|
+
"jest-specific-snapshot": "^7.0.0",
|
|
113
113
|
"peggy": "^2.0.1",
|
|
114
|
-
"prettier": "^2.
|
|
114
|
+
"prettier": "^2.8.3",
|
|
115
115
|
"prettier-plugin-pegjs": "^0.5.0",
|
|
116
|
-
"rollup": "^
|
|
116
|
+
"rollup": "^3.11.0",
|
|
117
117
|
"rollup-plugin-delete": "^2.0.0",
|
|
118
|
-
"rollup-plugin-dts": "
|
|
119
|
-
"svgo": "^
|
|
120
|
-
"ts-jest": "^
|
|
121
|
-
"ts-pegjs": "^
|
|
118
|
+
"rollup-plugin-dts": "5.1.1",
|
|
119
|
+
"svgo": "^3.0.2",
|
|
120
|
+
"ts-jest": "^29.0.5",
|
|
121
|
+
"ts-pegjs": "^3.0.0",
|
|
122
122
|
"typedoc": "^0.23.15",
|
|
123
123
|
"typescript": "^4.7.4"
|
|
124
124
|
}
|