@stryke/capnp 0.10.5 → 0.10.7

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/capnpc.cjs CHANGED
@@ -47,20 +47,6 @@ var exists = /* @__PURE__ */ __name(async (filePath) => {
47
47
  return (0, import_promises.access)(filePath, import_promises.constants.F_OK).then(() => true).catch(() => false);
48
48
  }, "exists");
49
49
 
50
- // ../fs/src/helpers.ts
51
- var import_nanotar = require("nanotar");
52
- var import_node_fs2 = require("fs");
53
- var import_promises2 = require("fs/promises");
54
- async function createDirectory(path) {
55
- if (await exists(path)) {
56
- return;
57
- }
58
- return (0, import_promises2.mkdir)(path, {
59
- recursive: true
60
- });
61
- }
62
- __name(createDirectory, "createDirectory");
63
-
64
50
  // ../types/src/base.ts
65
51
  var EMPTY_STRING = "";
66
52
  var $NestedValue = Symbol("NestedValue");
@@ -69,7 +55,7 @@ var $NestedValue = Symbol("NestedValue");
69
55
  var import_node_path = require("path");
70
56
 
71
57
  // ../path/src/is-file.ts
72
- var import_node_fs3 = require("fs");
58
+ var import_node_fs2 = require("fs");
73
59
 
74
60
  // ../path/src/join-paths.ts
75
61
  var _DRIVE_LETTER_START_RE = /^[A-Z]:\//i;
@@ -212,13 +198,13 @@ __name(slash, "slash");
212
198
 
213
199
  // ../path/src/is-file.ts
214
200
  function isFile(path, additionalPath) {
215
- return Boolean((0, import_node_fs3.statSync)(additionalPath ? joinPaths(additionalPath, path) : path, {
201
+ return Boolean((0, import_node_fs2.statSync)(additionalPath ? joinPaths(additionalPath, path) : path, {
216
202
  throwIfNoEntry: false
217
203
  })?.isFile());
218
204
  }
219
205
  __name(isFile, "isFile");
220
206
  function isDirectory(path, additionalPath) {
221
- return Boolean((0, import_node_fs3.statSync)(additionalPath ? joinPaths(additionalPath, path) : path, {
207
+ return Boolean((0, import_node_fs2.statSync)(additionalPath ? joinPaths(additionalPath, path) : path, {
222
208
  throwIfNoEntry: false
223
209
  })?.isDirectory());
224
210
  }
@@ -362,6 +348,20 @@ var import_promises5 = require("fs/promises");
362
348
  // src/compile.ts
363
349
  var import_console2 = require("@storm-software/config-tools/logger/console");
364
350
 
351
+ // ../fs/src/helpers.ts
352
+ var import_nanotar = require("nanotar");
353
+ var import_node_fs3 = require("fs");
354
+ var import_promises2 = require("fs/promises");
355
+ async function createDirectory(path) {
356
+ if (await exists(path)) {
357
+ return;
358
+ }
359
+ return (0, import_promises2.mkdir)(path, {
360
+ recursive: true
361
+ });
362
+ }
363
+ __name(createDirectory, "createDirectory");
364
+
365
365
  // ../path/src/is-parent-path.ts
366
366
  function isParentPath(childPath, parentPath) {
367
367
  const normalizedChild = slash(childPath.replace(/\\/g, "/").replace(/\/$/, ""));
@@ -8235,9 +8235,9 @@ async function compileAction(options) {
8235
8235
  }
8236
8236
  if (options.output) {
8237
8237
  filePath = joinPaths(options.output, fileName);
8238
- }
8239
- if (!existsSync(findFilePath(filePath))) {
8240
- await createDirectory(findFilePath(filePath));
8238
+ if (!existsSync(findFilePath(options.output))) {
8239
+ (0, import_console3.writeWarning)(`Output directory "${findFilePath(options.output)}" does not exist, it will be created...`);
8240
+ }
8241
8241
  }
8242
8242
  await (0, import_promises5.writeFile)(
8243
8243
  filePath,
package/bin/capnpc.js CHANGED
@@ -16,20 +16,6 @@ var exists = /* @__PURE__ */ __name(async (filePath) => {
16
16
  return access(filePath, constants.F_OK).then(() => true).catch(() => false);
17
17
  }, "exists");
18
18
 
19
- // ../fs/src/helpers.ts
20
- import { parseTar, parseTarGzip } from "nanotar";
21
- import { createWriteStream, mkdirSync, rmSync } from "node:fs";
22
- import { mkdir, readFile, rm } from "node:fs/promises";
23
- async function createDirectory(path) {
24
- if (await exists(path)) {
25
- return;
26
- }
27
- return mkdir(path, {
28
- recursive: true
29
- });
30
- }
31
- __name(createDirectory, "createDirectory");
32
-
33
19
  // ../types/src/base.ts
34
20
  var EMPTY_STRING = "";
35
21
  var $NestedValue = Symbol("NestedValue");
@@ -331,6 +317,20 @@ import { writeFile as writeFile2 } from "node:fs/promises";
331
317
  // src/compile.ts
332
318
  import { writeWarning as writeWarning2 } from "@storm-software/config-tools/logger/console";
333
319
 
320
+ // ../fs/src/helpers.ts
321
+ import { parseTar, parseTarGzip } from "nanotar";
322
+ import { createWriteStream, mkdirSync, rmSync } from "node:fs";
323
+ import { mkdir, readFile, rm } from "node:fs/promises";
324
+ async function createDirectory(path) {
325
+ if (await exists(path)) {
326
+ return;
327
+ }
328
+ return mkdir(path, {
329
+ recursive: true
330
+ });
331
+ }
332
+ __name(createDirectory, "createDirectory");
333
+
334
334
  // ../path/src/is-parent-path.ts
335
335
  function isParentPath(childPath, parentPath) {
336
336
  const normalizedChild = slash(childPath.replace(/\\/g, "/").replace(/\/$/, ""));
@@ -8204,9 +8204,9 @@ async function compileAction(options) {
8204
8204
  }
8205
8205
  if (options.output) {
8206
8206
  filePath = joinPaths(options.output, fileName);
8207
- }
8208
- if (!existsSync(findFilePath(filePath))) {
8209
- await createDirectory(findFilePath(filePath));
8207
+ if (!existsSync(findFilePath(options.output))) {
8208
+ writeWarning3(`Output directory "${findFilePath(options.output)}" does not exist, it will be created...`);
8209
+ }
8210
8210
  }
8211
8211
  await writeFile2(
8212
8212
  filePath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/capnp",
3
- "version": "0.10.5",
3
+ "version": "0.10.7",
4
4
  "type": "module",
5
5
  "description": "A package to assist in running the Cap'n Proto compiler and creating Cap'n Proto serialization protocol schemas.",
6
6
  "repository": {
@@ -130,7 +130,7 @@
130
130
  "peerDependenciesMeta": { "typescript": { "optional": false } },
131
131
  "dependencies": {
132
132
  "@stryke/fs": "^0.23.3",
133
- "@stryke/path": "^0.12.3",
133
+ "@stryke/path": "^0.12.4",
134
134
  "defu": "^6.1.4",
135
135
  "hex2dec": "^1.1.2",
136
136
  "nanotar": "^0.2.0"
@@ -148,5 +148,5 @@
148
148
  "tsx": "^4.20.1"
149
149
  },
150
150
  "publishConfig": { "access": "public" },
151
- "gitHead": "3a6d5cb2d3de967d8f492cbab01e828c575a95e3"
151
+ "gitHead": "73e7e322ba240f2a3157568d55f8c2c6e125bf73"
152
152
  }