@intellegens/cornerstone-cli 0.0.9 → 0.0.10

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.
@@ -35,10 +35,9 @@ exports.zodSchemaGeneratorCommand = {
35
35
  .readdirSync(inputPath)
36
36
  .filter((file) => file.endsWith('.json'));
37
37
  if (files.length === 0) {
38
- console.error('\u274c No JSON schema files found in the input directory.');
38
+ console.error('No JSON schema files found in the input directory.');
39
39
  process.exit(1);
40
40
  }
41
- var exports = {};
42
41
  for (const file of files) {
43
42
  const filePath = path_1.default.join(inputPath, file);
44
43
  const schemaContent = fs_extra_1.default.readFileSync(filePath, 'utf-8');
@@ -61,25 +60,15 @@ exports.zodSchemaGeneratorCommand = {
61
60
  depth: 5,
62
61
  });
63
62
  // Generate TypeScript file
64
- const fileName = typeName + '.ts';
63
+ const fileName = typeName;
65
64
  const outputFilePath = path_1.default.join(namespaceDir, fileName);
66
65
  fs_extra_1.default.writeFileSync(outputFilePath, zodSchema, 'utf-8');
67
- console.log(`\ud83d\udfe2 Generated Zod schema: ${outputFilePath}`);
68
- // Register for (re)export
69
- exports[typeName] = path_1.default.relative(outputPath, outputFilePath);
66
+ console.log(`Generated Zod schema: ${outputFilePath}`);
70
67
  }
71
- // Write (re)export file
72
- let exportFileContent = '';
73
- for (const typeName in exports) {
74
- const typePath = exports[typeName];
75
- exportFileContent += `export * from './${typePath}'; // .NET ${typeName} class\n`;
76
- }
77
- fs_extra_1.default.writeFileSync(path_1.default.join(outputPath, './index.ts'), exportFileContent, 'utf-8');
78
- // Prompt done
79
- console.log('\u2705 Zod schemas generated successfully!');
68
+ console.log('✅ Zod schemas generated successfully!');
80
69
  }
81
70
  catch (error) {
82
- console.error('\u274c Error generating Zod schemas:', error);
71
+ console.error(' Error generating Zod schemas:', error);
83
72
  process.exit(1);
84
73
  }
85
74
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intellegens/cornerstone-cli",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "main": "./index.js",
5
5
  "bin": {
6
6
  "cornerstone-ts": "./index.js"