@stryke/capnp 0.4.2 → 0.4.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/bin/capnpc.cjs CHANGED
@@ -1130,10 +1130,11 @@ async function compileAction(options) {
1130
1130
  const resolvedTsconfig = await readJsonFile(options.tsconfig);
1131
1131
  const tsconfig = import_typescript.default.parseJsonConfigFileContent(resolvedTsconfig, import_typescript.default.sys, findFilePath(options.tsconfig));
1132
1132
  tsconfig.options.configFilePath = options.tsconfig;
1133
+ tsconfig.options.noImplicitOverride = false;
1133
1134
  const schema = [];
1134
1135
  for (const schemaPath of options.schema) {
1135
1136
  if (!schemaPath || !schemaPath.includes("*") && !existsSync2(schemaPath)) {
1136
- (0, import_console.writeFatal)(`\u274C The schema path "${schemaPath}" is invalid. Please provide a valid path.`, {
1137
+ (0, import_console.writeFatal)(`\u2716 The schema path "${schemaPath}" is invalid. Please provide a valid path.`, {
1137
1138
  logLevel: "all"
1138
1139
  });
1139
1140
  return;
@@ -1141,7 +1142,7 @@ async function compileAction(options) {
1141
1142
  schema.push(...await listFiles(schemaPath));
1142
1143
  }
1143
1144
  if (schema.length === 0) {
1144
- (0, import_console.writeFatal)(`\u274C No Cap'n Proto schema files found in the specified source paths: ${options.schema.join(", ")}. Please ensure that the paths are correct and contain .capnp files.`, {
1145
+ (0, import_console.writeFatal)(`\u2716 No Cap'n Proto schema files found in the specified source paths: ${options.schema.join(", ")}. Please ensure that the paths are correct and contain .capnp files.`, {
1145
1146
  logLevel: "all"
1146
1147
  });
1147
1148
  return;
@@ -1149,8 +1150,7 @@ async function compileAction(options) {
1149
1150
  const result = await capnpc({
1150
1151
  ...options,
1151
1152
  tsconfig,
1152
- schema,
1153
- output: options.output ? options.output : schema.length > 0 && schema[0] ? findFilePath(schema[0]) : process.cwd()
1153
+ schema
1154
1154
  });
1155
1155
  if (result.files.size === 0) {
1156
1156
  (0, import_console.writeInfo)("\u26A0\uFE0F No files were generated. Please check your schema files.", {
@@ -1170,13 +1170,13 @@ void (async () => {
1170
1170
  await program.parseAsync(process.argv);
1171
1171
  (0, import_utilities.exitWithSuccess)();
1172
1172
  } catch (error) {
1173
- (0, import_console.writeFatal)(`A fatal error occurred while running the Storm Cap'n Proto compiler tool:
1174
- ${error?.message ? error.message : JSON.stringify(error)}${error?.stack ? `
1173
+ (0, import_console.writeFatal)(`\u2716 A fatal error occurred while running the Storm Cap'n Proto compiler tool:
1174
+ ${error?.message ? error?.name ? `[${error.name}]: ${error.message}` : error.message : JSON.stringify(error)}${error?.stack ? `
1175
+
1175
1176
  Stack Trace: ${error.stack}` : ""}`, {
1176
1177
  logLevel: "all"
1177
1178
  });
1178
1179
  (0, import_utilities.exitWithError)();
1179
- process.exit(1);
1180
1180
  }
1181
1181
  })();
1182
1182
  // Annotate the CommonJS export names for ESM import in node:
package/bin/capnpc.js CHANGED
@@ -1098,10 +1098,11 @@ async function compileAction(options) {
1098
1098
  const resolvedTsconfig = await readJsonFile(options.tsconfig);
1099
1099
  const tsconfig = ts.parseJsonConfigFileContent(resolvedTsconfig, ts.sys, findFilePath(options.tsconfig));
1100
1100
  tsconfig.options.configFilePath = options.tsconfig;
1101
+ tsconfig.options.noImplicitOverride = false;
1101
1102
  const schema = [];
1102
1103
  for (const schemaPath of options.schema) {
1103
1104
  if (!schemaPath || !schemaPath.includes("*") && !existsSync2(schemaPath)) {
1104
- writeFatal(`\u274C The schema path "${schemaPath}" is invalid. Please provide a valid path.`, {
1105
+ writeFatal(`\u2716 The schema path "${schemaPath}" is invalid. Please provide a valid path.`, {
1105
1106
  logLevel: "all"
1106
1107
  });
1107
1108
  return;
@@ -1109,7 +1110,7 @@ async function compileAction(options) {
1109
1110
  schema.push(...await listFiles(schemaPath));
1110
1111
  }
1111
1112
  if (schema.length === 0) {
1112
- writeFatal(`\u274C No Cap'n Proto schema files found in the specified source paths: ${options.schema.join(", ")}. Please ensure that the paths are correct and contain .capnp files.`, {
1113
+ writeFatal(`\u2716 No Cap'n Proto schema files found in the specified source paths: ${options.schema.join(", ")}. Please ensure that the paths are correct and contain .capnp files.`, {
1113
1114
  logLevel: "all"
1114
1115
  });
1115
1116
  return;
@@ -1117,8 +1118,7 @@ async function compileAction(options) {
1117
1118
  const result = await capnpc({
1118
1119
  ...options,
1119
1120
  tsconfig,
1120
- schema,
1121
- output: options.output ? options.output : schema.length > 0 && schema[0] ? findFilePath(schema[0]) : process.cwd()
1121
+ schema
1122
1122
  });
1123
1123
  if (result.files.size === 0) {
1124
1124
  writeInfo("\u26A0\uFE0F No files were generated. Please check your schema files.", {
@@ -1138,13 +1138,13 @@ void (async () => {
1138
1138
  await program.parseAsync(process.argv);
1139
1139
  exitWithSuccess();
1140
1140
  } catch (error) {
1141
- writeFatal(`A fatal error occurred while running the Storm Cap'n Proto compiler tool:
1142
- ${error?.message ? error.message : JSON.stringify(error)}${error?.stack ? `
1141
+ writeFatal(`\u2716 A fatal error occurred while running the Storm Cap'n Proto compiler tool:
1142
+ ${error?.message ? error?.name ? `[${error.name}]: ${error.message}` : error.message : JSON.stringify(error)}${error?.stack ? `
1143
+
1143
1144
  Stack Trace: ${error.stack}` : ""}`, {
1144
1145
  logLevel: "all"
1145
1146
  });
1146
1147
  exitWithError();
1147
- process.exit(1);
1148
1148
  }
1149
1149
  })();
1150
1150
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/capnp",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
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": {