ot-builder-cli 1.7.3 → 1.7.4
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/argv-parser/index.js +9 -7
- package/lib/create-grammar.js +1 -2
- package/lib/index.js +1 -2
- package/lib/sub-parsers/unicode-ranges/generated.js +2 -2
- package/lib/syntax/actions/intro.js +2 -2
- package/lib/syntax/actions/merge.js +1 -1
- package/lib/syntax/actions/save.js +2 -2
- package/package.json +7 -8
package/lib/argv-parser/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.ParseResult = ParseResult;
|
|
4
|
+
exports.StartParseArgv = StartParseArgv;
|
|
5
|
+
const cli_help_shower_1 = require("@ot-builder/cli-help-shower");
|
|
5
6
|
function ParseResult(progress, result) {
|
|
6
7
|
return { progress, result };
|
|
7
8
|
}
|
|
8
|
-
exports.ParseResult = ParseResult;
|
|
9
9
|
function StartParseArgv(argv, index = 0) {
|
|
10
10
|
return new ParseArgvImpl(argv, index);
|
|
11
11
|
}
|
|
12
|
-
exports.StartParseArgv = StartParseArgv;
|
|
13
12
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
14
13
|
class ParseArgvImpl {
|
|
15
14
|
constructor(argv, cp) {
|
|
@@ -25,7 +24,10 @@ class ParseArgvImpl {
|
|
|
25
24
|
return this.eof;
|
|
26
25
|
}
|
|
27
26
|
isOption(...options) {
|
|
28
|
-
|
|
27
|
+
return this.isOptionImpl(...options);
|
|
28
|
+
}
|
|
29
|
+
isOptionImpl(...options) {
|
|
30
|
+
if (this.eof)
|
|
29
31
|
return false;
|
|
30
32
|
const opt = this.argv[this.cp];
|
|
31
33
|
if (opt[0] !== "-" && opt[0] !== "+")
|
|
@@ -44,7 +46,7 @@ class ParseArgvImpl {
|
|
|
44
46
|
return this.option;
|
|
45
47
|
}
|
|
46
48
|
isArgument() {
|
|
47
|
-
return !this.
|
|
49
|
+
return !this.eof && !this.isOptionImpl();
|
|
48
50
|
}
|
|
49
51
|
expectArgument() {
|
|
50
52
|
if (!this.isArgument())
|
|
@@ -69,7 +71,7 @@ class ParseArgvImpl {
|
|
|
69
71
|
s += " ";
|
|
70
72
|
const segmentText = cp === 0 ? "node" : cp === 1 ? "otb-cli" : this.argv[cp];
|
|
71
73
|
if (cp === this.cp)
|
|
72
|
-
s +=
|
|
74
|
+
s += cli_help_shower_1.Style.ArgvParseError(segmentText);
|
|
73
75
|
else
|
|
74
76
|
s += segmentText;
|
|
75
77
|
}
|
package/lib/create-grammar.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createGrammar =
|
|
3
|
+
exports.createGrammar = createGrammar;
|
|
4
4
|
const consolidate_1 = require("./syntax/actions/consolidate");
|
|
5
5
|
const drop_1 = require("./syntax/actions/drop");
|
|
6
6
|
const gc_1 = require("./syntax/actions/gc");
|
|
@@ -50,5 +50,4 @@ function createGrammar() {
|
|
|
50
50
|
]));
|
|
51
51
|
return { element, start };
|
|
52
52
|
}
|
|
53
|
-
exports.createGrammar = createGrammar;
|
|
54
53
|
//# sourceMappingURL=create-grammar.js.map
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cliMain =
|
|
3
|
+
exports.cliMain = cliMain;
|
|
4
4
|
const argv_parser_1 = require("./argv-parser");
|
|
5
5
|
const create_grammar_1 = require("./create-grammar");
|
|
6
6
|
const state_1 = require("./state");
|
|
@@ -18,5 +18,4 @@ async function cliMain(argv) {
|
|
|
18
18
|
await prAction.result(state);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
exports.cliMain = cliMain;
|
|
22
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
* ___ := _ '(?:#[^\r\n]*)?[\r\n]' __
|
|
33
33
|
*/
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.SyntaxErr = exports.
|
|
35
|
+
exports.SyntaxErr = exports.Parser = exports.CodePoint = exports.Range_2 = exports.Range_1 = exports.Ranges_2 = exports.Ranges_1 = exports.start = exports.ASTKinds = void 0;
|
|
36
|
+
exports.parse = parse;
|
|
36
37
|
var ASTKinds;
|
|
37
38
|
(function (ASTKinds) {
|
|
38
39
|
ASTKinds[ASTKinds["start"] = 0] = "start";
|
|
@@ -449,7 +450,6 @@ function parse(s) {
|
|
|
449
450
|
const p = new Parser(s);
|
|
450
451
|
return p.parse();
|
|
451
452
|
}
|
|
452
|
-
exports.parse = parse;
|
|
453
453
|
class SyntaxErr {
|
|
454
454
|
constructor(pos, expmatches) {
|
|
455
455
|
this.pos = pos;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.IntroSyntax = void 0;
|
|
4
|
+
exports.loadFontFromFile = loadFontFromFile;
|
|
4
5
|
const Fs = require("fs");
|
|
5
6
|
const Path = require("path");
|
|
6
7
|
const cli_help_shower_1 = require("@ot-builder/cli-help-shower");
|
|
@@ -31,5 +32,4 @@ async function loadFontFromFile(path, gsf, cfg) {
|
|
|
31
32
|
const bufFont = await Fs.promises.readFile(Path.resolve(path));
|
|
32
33
|
return ot_builder_1.FontIo.readFont(ot_builder_1.FontIo.readSfntOtf(bufFont), gsf, cfg);
|
|
33
34
|
}
|
|
34
|
-
exports.loadFontFromFile = loadFontFromFile;
|
|
35
35
|
//# sourceMappingURL=intro.js.map
|
|
@@ -32,7 +32,7 @@ exports.MergeSyntax = {
|
|
|
32
32
|
.indent("")
|
|
33
33
|
.message("Merge the font on the stack top to the font below it.")
|
|
34
34
|
.message(`In a typical use like:`, cli_help_shower_1.Style.Cmd `otb-cli`, cli_help_shower_1.Style.Arg `a.ttf`, cli_help_shower_1.Style.Arg `b.ttf`, cli_help_shower_1.Style.Option `--merge`, cli_help_shower_1.Style.Option `-o`, cli_help_shower_1.Style.Arg `ab.ttf`, `, metadata and naming will follow`, cli_help_shower_1.Style.Arg `a.ttf`, `while glyphs from`, cli_help_shower_1.Style.Arg `b.ttf`, `will be added to it.`)
|
|
35
|
-
.message(`When`, cli_help_shower_1.Style.Option
|
|
35
|
+
.message(`When`, cli_help_shower_1.Style.Option `--override`, `is provided, characters from`, cli_help_shower_1.Style.Arg `b.ttf`, `will be preferred; otherwise, characters from`, cli_help_shower_1.Style.Arg `a.ttf`, `will be preferred.`);
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=merge.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SaveSyntax = void 0;
|
|
4
|
+
exports.saveFontToFile = saveFontToFile;
|
|
4
5
|
const Fs = require("fs");
|
|
5
6
|
const Path = require("path");
|
|
6
7
|
const cli_help_shower_1 = require("@ot-builder/cli-help-shower");
|
|
@@ -33,5 +34,4 @@ async function saveFontToFile(path, font, cfg) {
|
|
|
33
34
|
const buf1 = ot_builder_1.FontIo.writeSfntOtf(ot_builder_1.FontIo.writeFont(font, cfg));
|
|
34
35
|
await Fs.promises.writeFile(Path.resolve(path), buf1);
|
|
35
36
|
}
|
|
36
|
-
exports.saveFontToFile = saveFontToFile;
|
|
37
37
|
//# sourceMappingURL=save.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ot-builder-cli",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"bin": {
|
|
5
5
|
"otb-cli": "./bin/otb-cli"
|
|
6
6
|
},
|
|
@@ -26,14 +26,13 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"tslib": "^2.
|
|
30
|
-
"
|
|
31
|
-
"ot-builder": "1.7.
|
|
32
|
-
"@ot-builder/cli-
|
|
33
|
-
"@ot-builder/cli-shared": "1.7.3"
|
|
29
|
+
"tslib": "^2.6.3",
|
|
30
|
+
"ot-builder": "1.7.4",
|
|
31
|
+
"@ot-builder/cli-help-shower": "1.7.4",
|
|
32
|
+
"@ot-builder/cli-shared": "1.7.4"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
|
-
"@types/jest": "^29.5.
|
|
37
|
-
"jest": "^29.
|
|
35
|
+
"@types/jest": "^29.5.12",
|
|
36
|
+
"jest": "^29.7.0"
|
|
38
37
|
}
|
|
39
38
|
}
|