fodec 1.0.1 → 1.0.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.
package/bin/fodec.js CHANGED
@@ -2,14 +2,4 @@
2
2
 
3
3
  const {app} = require("../lib/cli/index.js");
4
4
 
5
- app.run(process.argv).then((res) => {
6
- if(!res) {
7
- return;
8
- }
9
-
10
- process.stdout.write(res);
11
- process.stdout.write("\n");
12
- }).catch((err) => {
13
- process.stderr.write(err.message);
14
- process.stdout.write("\n");
15
- });
5
+ app.run();
package/lib/Fodec.d.ts CHANGED
@@ -3,6 +3,6 @@ export declare class Fodec {
3
3
  constructor(key: string);
4
4
  transformText(str: string): string;
5
5
  transformJson(data: any): Promise<any>;
6
- transformFont(fontPath: string): Promise<string | ArrayBuffer | undefined>;
7
- transformFontV1(fontPath: string): Promise<string | ArrayBuffer | undefined>;
6
+ transformFont(fontPath: string): Promise<import("fonteditor-core").FontEditor.FontOutput | undefined>;
7
+ transformFontV1(fontPath: string): Promise<import("fonteditor-core").FontEditor.FontOutput | undefined>;
8
8
  }
package/lib/cli/App.d.ts CHANGED
@@ -8,5 +8,5 @@ export declare class App {
8
8
  init(): Promise<void>;
9
9
  generate(): Promise<void>;
10
10
  build(): Promise<void>;
11
- run(): Promise<string | void>;
11
+ run(): Promise<void>;
12
12
  }
package/lib/cli/App.js CHANGED
@@ -110,7 +110,17 @@ class App {
110
110
  }
111
111
  }
112
112
  async run() {
113
- return this.cli.run(process.argv);
113
+ try {
114
+ const res = await this.cli.run(process.argv);
115
+ if (res) {
116
+ process.stdout.write(res);
117
+ process.stdout.write("\n");
118
+ }
119
+ }
120
+ catch (err) {
121
+ process.stderr.write(err.message);
122
+ process.stdout.write("\n");
123
+ }
114
124
  }
115
125
  }
116
126
  exports.App = App;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fodec",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "author": "Kris Papercut <krispcut@gmail.com>",
5
5
  "description": "Font encoder",
6
6
  "license": "MIT",
@@ -27,14 +27,14 @@
27
27
  "url": "https://github.com/kearisp/fodec/issues"
28
28
  },
29
29
  "dependencies": {
30
- "@kearisp/cli": "^2.0.0",
30
+ "@kearisp/cli": "^2.0.4",
31
31
  "@wocker/utils": "^1.0.2",
32
32
  "fonteditor-core": "^2.3.2",
33
33
  "fs": "^0.0.1-security",
34
34
  "path": "^0.12.7"
35
35
  },
36
36
  "devDependencies": {
37
- "@types/node": "^20.11.5",
37
+ "@types/node": "^22.10.2",
38
38
  "typescript": "^5.3.3"
39
39
  }
40
40
  }