ng-openapi 0.0.29 → 0.0.31

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.
Files changed (2) hide show
  1. package/cli.cjs +4 -12
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -2350,19 +2350,11 @@ async function generateFromConfig(config) {
2350
2350
  }
2351
2351
  __name(generateFromConfig, "generateFromConfig");
2352
2352
 
2353
+ // package.json
2354
+ var version = "0.0.30";
2355
+
2353
2356
  // src/lib/cli.ts
2354
2357
  var program = new import_commander.Command();
2355
- function getPackageVersion() {
2356
- try {
2357
- const packagePath = path9.join(__dirname, "../../package.json");
2358
- const packageJson = JSON.parse(fs4.readFileSync(packagePath, "utf-8"));
2359
- return packageJson.version;
2360
- } catch {
2361
- console.warn("Warning: Could not determine package version");
2362
- return "unknown";
2363
- }
2364
- }
2365
- __name(getPackageVersion, "getPackageVersion");
2366
2358
  async function loadConfigFile(configPath) {
2367
2359
  const resolvedPath = path9.resolve(configPath);
2368
2360
  if (!fs4.existsSync(resolvedPath)) {
@@ -2418,7 +2410,7 @@ async function generateFromOptions(options) {
2418
2410
  }
2419
2411
  }
2420
2412
  __name(generateFromOptions, "generateFromOptions");
2421
- program.name("ng-openapi").description("Generate Angular services and types from Swagger/OpenAPI spec").version(getPackageVersion()).option("-c, --config <path>", "Path to configuration file").option("-i, --input <path>", "Path to Swagger/OpenAPI specification file").option("-o, --output <path>", "Output directory", "./src/generated").option("--types-only", "Generate only TypeScript interfaces").option("--date-type <type>", "Date type to use (string | Date)", "Date").action(async (options) => {
2413
+ program.name("ng-openapi").description("Generate Angular services and types from Swagger/OpenAPI spec").version(version).option("-c, --config <path>", "Path to configuration file").option("-i, --input <path>", "Path to Swagger/OpenAPI specification file").option("-o, --output <path>", "Output directory", "./src/generated").option("--types-only", "Generate only TypeScript interfaces").option("--date-type <type>", "Date type to use (string | Date)", "Date").action(async (options) => {
2422
2414
  await generateFromOptions(options);
2423
2415
  });
2424
2416
  program.command("generate").alias("gen").description("Generate code from Swagger specification").option("-c, --config <path>", "Path to configuration file").option("-i, --input <path>", "Path to Swagger/OpenAPI specification file").option("-o, --output <path>", "Output directory", "./src/generated").option("--types-only", "Generate only TypeScript interfaces").option("--date-type <type>", "Date type to use (string | Date)", "Date").action(async (options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-openapi",
3
- "version": "0.0.29",
3
+ "version": "0.0.31",
4
4
  "description": "Generate Angular services and TypeScript types from OpenAPI/Swagger specifications",
5
5
  "keywords": [
6
6
  "angular",