@goast/core 0.3.6 → 0.3.8

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,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OpenApiGenerationProviderBase = exports.OpenApiGenerator = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const path_1 = require("path");
5
- const fs_extra_1 = require("fs-extra");
6
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
7
  const config_1 = require("./config");
7
8
  const parser_1 = require("../parse/parser");
8
9
  const action_provider_1 = require("../utils/action-provider");
@@ -29,10 +30,10 @@ class _OpenApiGenerator {
29
30
  async generate(data) {
30
31
  const absOutputPath = (0, path_1.resolve)(this._config.outputDir);
31
32
  if (this._config.clearOutputDir) {
32
- await (0, fs_extra_1.emptyDir)(absOutputPath);
33
+ await fs_extra_1.default.emptyDir(absOutputPath);
33
34
  }
34
35
  else {
35
- await (0, fs_extra_1.ensureDir)(absOutputPath);
36
+ await fs_extra_1.default.ensureDir(absOutputPath);
36
37
  }
37
38
  let input = {};
38
39
  for (const generator of this._providers) {
@@ -2,8 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultDirectoryScanOptions = void 0;
4
4
  exports.getFiles = getFiles;
5
+ const tslib_1 = require("tslib");
5
6
  const path_1 = require("path");
6
- const fs_extra_1 = require("fs-extra");
7
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
7
8
  exports.defaultDirectoryScanOptions = {
8
9
  recursive: false,
9
10
  maxDepth: 5,
@@ -15,10 +16,10 @@ async function getFiles(dir, options) {
15
16
  return files;
16
17
  }
17
18
  async function getFilesImpl(dir, options, files, currentDepth) {
18
- const dirFiles = await (0, fs_extra_1.readdir)(dir);
19
+ const dirFiles = await fs_extra_1.default.readdir(dir);
19
20
  for (const file of dirFiles) {
20
21
  const filePath = (0, path_1.resolve)(dir, file);
21
- const stat = await (0, fs_extra_1.lstat)(filePath);
22
+ const stat = await fs_extra_1.default.lstat(filePath);
22
23
  if (stat.isDirectory()) {
23
24
  if (options.recursive) {
24
25
  if (options.maxDepth && options.maxDepth > currentDepth) {
@@ -1,5 +1,5 @@
1
1
  import { resolve } from 'path';
2
- import { emptyDir, ensureDir } from 'fs-extra';
2
+ import fs from 'fs-extra';
3
3
  import { defaultOpenApiGeneratorConfig } from './config.js';
4
4
  import { OpenApiParser } from '../parse/parser.js';
5
5
  import { ActionProvider } from '../utils/action-provider.js';
@@ -26,10 +26,10 @@ class _OpenApiGenerator {
26
26
  async generate(data) {
27
27
  const absOutputPath = resolve(this._config.outputDir);
28
28
  if (this._config.clearOutputDir) {
29
- await emptyDir(absOutputPath);
29
+ await fs.emptyDir(absOutputPath);
30
30
  }
31
31
  else {
32
- await ensureDir(absOutputPath);
32
+ await fs.ensureDir(absOutputPath);
33
33
  }
34
34
  let input = {};
35
35
  for (const generator of this._providers) {
@@ -1,5 +1,5 @@
1
1
  import { resolve } from 'path';
2
- import { lstat, readdir } from 'fs-extra';
2
+ import fs from 'fs-extra';
3
3
  export const defaultDirectoryScanOptions = {
4
4
  recursive: false,
5
5
  maxDepth: 5,
@@ -11,10 +11,10 @@ export async function getFiles(dir, options) {
11
11
  return files;
12
12
  }
13
13
  async function getFilesImpl(dir, options, files, currentDepth) {
14
- const dirFiles = await readdir(dir);
14
+ const dirFiles = await fs.readdir(dir);
15
15
  for (const file of dirFiles) {
16
16
  const filePath = resolve(dir, file);
17
- const stat = await lstat(filePath);
17
+ const stat = await fs.lstat(filePath);
18
18
  if (stat.isDirectory()) {
19
19
  if (options.recursive) {
20
20
  if (options.maxDepth && options.maxDepth > currentDepth) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goast/core",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "repository": "https://github.com/MaSch0212/goast.git",
5
5
  "description": "A tool designed to transform OpenAPI specifications into various forms with flexibility and extensibility at its core.",
6
6
  "keywords": [
@@ -21,11 +21,10 @@
21
21
  "dependencies": {
22
22
  "fs-extra": "^11.2.0",
23
23
  "node-fetch": "^2.7.0",
24
- "yaml": "^2.4.5",
24
+ "yaml": "^2.6.0",
25
25
  "tslib": "2.6.3"
26
26
  },
27
27
  "packageManager": "pnpm@9.5.0",
28
- "module": "./esm/index.js",
29
28
  "main": "./cjs/index.js",
30
29
  "types": "./types/index.d.ts",
31
30
  "exports": {
@@ -40,5 +39,9 @@
40
39
  "types": "./types/lib/utils/index.d.ts"
41
40
  },
42
41
  "./package.json": "./package.json"
42
+ },
43
+ "module": "./esm/index.js",
44
+ "devDependencies": {
45
+ "@types/fs-extra": "^11.0.4"
43
46
  }
44
47
  }