@pdfme/cli 6.1.12 → 6.1.13-dev.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.
@@ -1,43 +1,43 @@
1
1
  declare const _default: import("citty").CommandDef<{
2
2
  target: {
3
- type: "positional";
3
+ type: 'positional';
4
4
  description: string;
5
5
  required: boolean;
6
6
  };
7
7
  file: {
8
- type: "positional";
8
+ type: 'positional';
9
9
  description: string;
10
10
  required: boolean;
11
11
  };
12
12
  verbose: {
13
- type: "boolean";
13
+ type: 'boolean';
14
14
  alias: string;
15
15
  description: string;
16
16
  default: boolean;
17
17
  };
18
18
  json: {
19
- type: "boolean";
19
+ type: 'boolean';
20
20
  description: string;
21
21
  default: boolean;
22
22
  };
23
23
  noAutoFont: {
24
- type: "boolean";
24
+ type: 'boolean';
25
25
  description: string;
26
26
  default: boolean;
27
27
  };
28
28
  output: {
29
- type: "string";
29
+ type: 'string';
30
30
  alias: string;
31
31
  description: string;
32
32
  default: string;
33
33
  };
34
34
  force: {
35
- type: "boolean";
35
+ type: 'boolean';
36
36
  description: string;
37
37
  default: boolean;
38
38
  };
39
39
  image: {
40
- type: "boolean";
40
+ type: 'boolean';
41
41
  description: string;
42
42
  default: boolean;
43
43
  };
@@ -1,71 +1,71 @@
1
1
  declare const _default: import("citty").CommandDef<{
2
2
  file: {
3
- type: "positional";
3
+ type: 'positional';
4
4
  description: string;
5
5
  required: boolean;
6
6
  };
7
7
  template: {
8
- type: "string";
8
+ type: 'string';
9
9
  alias: string;
10
10
  description: string;
11
11
  };
12
12
  inputs: {
13
- type: "string";
13
+ type: 'string';
14
14
  alias: string;
15
15
  description: string;
16
16
  };
17
17
  output: {
18
- type: "string";
18
+ type: 'string';
19
19
  alias: string;
20
20
  description: string;
21
21
  default: string;
22
22
  };
23
23
  force: {
24
- type: "boolean";
24
+ type: 'boolean';
25
25
  description: string;
26
26
  default: boolean;
27
27
  };
28
28
  image: {
29
- type: "boolean";
29
+ type: 'boolean';
30
30
  description: string;
31
31
  default: boolean;
32
32
  };
33
33
  scale: {
34
- type: "string";
34
+ type: 'string';
35
35
  description: string;
36
36
  default: string;
37
37
  };
38
38
  grid: {
39
- type: "boolean";
39
+ type: 'boolean';
40
40
  description: string;
41
41
  default: boolean;
42
42
  };
43
43
  gridSize: {
44
- type: "string";
44
+ type: 'string';
45
45
  description: string;
46
46
  default: string;
47
47
  };
48
48
  font: {
49
- type: "string";
49
+ type: 'string';
50
50
  description: string;
51
51
  };
52
52
  basePdf: {
53
- type: "string";
53
+ type: 'string';
54
54
  description: string;
55
55
  };
56
56
  noAutoFont: {
57
- type: "boolean";
57
+ type: 'boolean';
58
58
  description: string;
59
59
  default: boolean;
60
60
  };
61
61
  verbose: {
62
- type: "boolean";
62
+ type: 'boolean';
63
63
  alias: string;
64
64
  description: string;
65
65
  default: boolean;
66
66
  };
67
67
  json: {
68
- type: "boolean";
68
+ type: 'boolean';
69
69
  description: string;
70
70
  default: boolean;
71
71
  };
@@ -1,41 +1,41 @@
1
1
  declare const _default: import("citty").CommandDef<{
2
2
  file: {
3
- type: "positional";
3
+ type: 'positional';
4
4
  description: string;
5
5
  required: boolean;
6
6
  };
7
7
  output: {
8
- type: "string";
8
+ type: 'string';
9
9
  alias: string;
10
10
  description: string;
11
11
  };
12
12
  grid: {
13
- type: "boolean";
13
+ type: 'boolean';
14
14
  description: string;
15
15
  default: boolean;
16
16
  };
17
17
  gridSize: {
18
- type: "string";
18
+ type: 'string';
19
19
  description: string;
20
20
  default: string;
21
21
  };
22
22
  scale: {
23
- type: "string";
23
+ type: 'string';
24
24
  description: string;
25
25
  default: string;
26
26
  };
27
27
  pages: {
28
- type: "string";
28
+ type: 'string';
29
29
  description: string;
30
30
  };
31
31
  verbose: {
32
- type: "boolean";
32
+ type: 'boolean';
33
33
  alias: string;
34
34
  description: string;
35
35
  default: boolean;
36
36
  };
37
37
  json: {
38
- type: "boolean";
38
+ type: 'boolean';
39
39
  description: string;
40
40
  default: boolean;
41
41
  };
@@ -1,17 +1,17 @@
1
1
  declare const _default: import("citty").CommandDef<{
2
2
  file: {
3
- type: "positional";
3
+ type: 'positional';
4
4
  description: string;
5
5
  required: boolean;
6
6
  };
7
7
  verbose: {
8
- type: "boolean";
8
+ type: 'boolean';
9
9
  alias: string;
10
10
  description: string;
11
11
  default: boolean;
12
12
  };
13
13
  json: {
14
- type: "boolean";
14
+ type: 'boolean';
15
15
  description: string;
16
16
  default: boolean;
17
17
  };
@@ -1,22 +1,22 @@
1
1
  declare const _default: import("citty").CommandDef<{
2
2
  file: {
3
- type: "positional";
3
+ type: 'positional';
4
4
  description: string;
5
5
  required: boolean;
6
6
  };
7
7
  verbose: {
8
- type: "boolean";
8
+ type: 'boolean';
9
9
  alias: string;
10
10
  description: string;
11
11
  default: boolean;
12
12
  };
13
13
  json: {
14
- type: "boolean";
14
+ type: 'boolean';
15
15
  description: string;
16
16
  default: boolean;
17
17
  };
18
18
  strict: {
19
- type: "boolean";
19
+ type: 'boolean';
20
20
  description: string;
21
21
  default: boolean;
22
22
  };
package/dist/index.js CHANGED
@@ -1172,7 +1172,7 @@ var CACHE_DIR = join(homedir(), ".pdfme", "fonts");
1172
1172
  var NOTO_SANS_JP_URL = "https://github.com/google/fonts/raw/main/ofl/notosansjp/NotoSansJP%5Bwght%5D.ttf";
1173
1173
  var NOTO_CACHE_FILE = join(CACHE_DIR, "NotoSansJP-Regular.ttf");
1174
1174
  var REMOTE_FONT_TIMEOUT_MS = 15e3;
1175
- var MAX_REMOTE_FONT_BYTES = 32 * 1024 * 1024;
1175
+ var MAX_REMOTE_FONT_BYTES = 33554432;
1176
1176
  function ensureCacheDir() {
1177
1177
  if (!existsSync(CACHE_DIR)) mkdirSync(CACHE_DIR, { recursive: true });
1178
1178
  }
@@ -1922,8 +1922,8 @@ var generate_default = defineCommand({
1922
1922
  });
1923
1923
  function formatBytes(bytes) {
1924
1924
  if (bytes < 1024) return `${bytes}B`;
1925
- if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)}KB`;
1926
- return `${(bytes / (1024 * 1024)).toFixed(1)}MB`;
1925
+ if (bytes < 1048576) return `${(bytes / 1024).toFixed(1)}KB`;
1926
+ return `${(bytes / 1048576).toFixed(1)}MB`;
1927
1927
  }
1928
1928
  function normalizeJobOptions(rawJobOptions) {
1929
1929
  if (rawJobOptions === void 0) return {};
@@ -2214,7 +2214,8 @@ var pdf2size_default = defineCommand({
2214
2214
  code: "EARG",
2215
2215
  exitCode: 1
2216
2216
  });
2217
- const sizes = await pdf2size(readPdfFile(args.file));
2217
+ const pdfData = readPdfFile(args.file);
2218
+ const sizes = await pdf2size(pdfData);
2218
2219
  if (args.verbose) {
2219
2220
  console.error(`Input: ${args.file}`);
2220
2221
  console.error(`Pages: ${sizes.length}`);
@@ -2241,7 +2242,7 @@ var pdf2size_default = defineCommand({
2241
2242
  });
2242
2243
  //#endregion
2243
2244
  //#region src/version.ts
2244
- var CLI_VERSION = "6.1.12";
2245
+ var CLI_VERSION = "6.1.13-dev.4";
2245
2246
  //#endregion
2246
2247
  //#region src/commands/doctor.ts
2247
2248
  var doctorArgs = {
@@ -2783,7 +2784,7 @@ function describeDoctorInput(file) {
2783
2784
  }
2784
2785
  //#endregion
2785
2786
  //#region src/index.ts
2786
- runMain(defineCommand({
2787
+ var main = defineCommand({
2787
2788
  meta: {
2788
2789
  name: "pdfme",
2789
2790
  version: CLI_VERSION,
@@ -2796,7 +2797,8 @@ runMain(defineCommand({
2796
2797
  pdf2size: pdf2size_default,
2797
2798
  doctor: doctor_default
2798
2799
  }
2799
- }));
2800
+ });
2801
+ runMain(main);
2800
2802
  //#endregion
2801
2803
 
2802
2804
  //# sourceMappingURL=index.js.map