@easy-breezy/generator-api
Advanced tools
Comparing version 2.0.16 to 2.0.17
import { dirname, join, relative } from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
import { ESLint } from 'eslint'; | ||
import { cloneNode } from 'ts-clone-node'; | ||
@@ -21,7 +20,2 @@ import ts from 'typescript'; | ||
const __dirname = dirname(__filename); | ||
const eslint = new ESLint({ | ||
overrideConfigFile: join(__dirname, '../.eslintrc.yml'), | ||
fix: true, | ||
useEslintrc: false | ||
}); | ||
export default ({ i18n, config, fs, output, colors }) => { | ||
@@ -97,3 +91,3 @@ i18n.addResource('ru', ru); | ||
if (payload) { | ||
fs.updateFile(path, this.schemaStringify(deepSortObject(payload))); | ||
fs.updateFile(path, this.schemaStringify(deepSortObject(payload)), true); | ||
} | ||
@@ -341,3 +335,3 @@ }; | ||
imports.push(pathRelative); | ||
const typeFile = createTypes({ | ||
fs.updateFile(pathEndpoint, createTypes({ | ||
i18n, | ||
@@ -357,5 +351,3 @@ types, | ||
} | ||
}).print; | ||
const typeFileLint = await eslint.lintText(typeFile); | ||
fs.updateFile(pathEndpoint, typeFileLint[0].output || typeFile); | ||
}).print, true); | ||
endpointsAST.push(createEndpoint({ | ||
@@ -394,3 +386,3 @@ name: this.camelcase(this.path(path, method)), | ||
} | ||
const indexFile = createIndex({ | ||
fs.updateFile(this.path(pathAPI, 'index.ts'), createIndex({ | ||
i18n, | ||
@@ -401,8 +393,4 @@ name: this.answers.name, | ||
imports | ||
}).print; | ||
const indexFileLint = await eslint.lintText(indexFile); | ||
fs.updateFile(this.path(pathAPI, 'index.ts'), indexFileLint[0].output || indexFile); | ||
const extensionFile = createExtension({ i18n }).print; | ||
const extensionFileLint = await eslint.lintText(extensionFile); | ||
fs.createFile(this.path(pathAPI, 'extension.ts'), extensionFileLint[0].output || extensionFile); | ||
}).print, true); | ||
fs.createFile(this.path(pathAPI, 'extension.ts'), createExtension({ i18n }).print); | ||
}; | ||
@@ -409,0 +397,0 @@ } |
{ | ||
"name": "@easy-breezy/generator-api", | ||
"version": "2.0.16", | ||
"version": "2.0.17", | ||
"main": "dist/index.js", | ||
@@ -35,7 +35,4 @@ "type": "module", | ||
"@apidevtools/swagger-parser": "10.1.0", | ||
"@typescript-eslint/eslint-plugin": "5.55.0", | ||
"@typescript-eslint/parser": "5.55.0", | ||
"camelcase": "7.0.1", | ||
"enquirer": "2.3.6", | ||
"eslint": "8.36.0", | ||
"json-schema-to-typescript": "12.0.0", | ||
@@ -42,0 +39,0 @@ "lodash.get": "4.4.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8
64812
17
1076
- Removed@typescript-eslint/parser@5.55.0
- Removedeslint@8.36.0
- Removed@eslint-community/eslint-utils@4.4.1(transitive)
- Removed@eslint-community/regexpp@4.12.1(transitive)
- Removed@eslint/eslintrc@2.1.4(transitive)
- Removed@eslint/js@8.36.0(transitive)
- Removed@humanwhocodes/config-array@0.11.14(transitive)
- Removed@humanwhocodes/module-importer@1.0.1(transitive)
- Removed@humanwhocodes/object-schema@2.0.3(transitive)
- Removed@nodelib/fs.scandir@2.1.5(transitive)
- Removed@nodelib/fs.stat@2.0.5(transitive)
- Removed@nodelib/fs.walk@1.2.8(transitive)
- Removed@types/semver@7.5.8(transitive)
- Removed@typescript-eslint/eslint-plugin@5.55.0(transitive)
- Removed@typescript-eslint/parser@5.55.0(transitive)
- Removed@typescript-eslint/scope-manager@5.55.0(transitive)
- Removed@typescript-eslint/type-utils@5.55.0(transitive)
- Removed@typescript-eslint/types@5.55.0(transitive)
- Removed@typescript-eslint/typescript-estree@5.55.0(transitive)
- Removed@typescript-eslint/utils@5.55.0(transitive)
- Removed@typescript-eslint/visitor-keys@5.55.0(transitive)
- Removedacorn@8.14.0(transitive)
- Removedacorn-jsx@5.3.2(transitive)
- Removedajv@6.12.6(transitive)
- Removedansi-regex@5.0.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedarray-union@2.1.0(transitive)
- Removedbraces@3.0.3(transitive)
- Removedcallsites@3.1.0(transitive)
- Removedchalk@4.1.2(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removeddebug@4.4.0(transitive)
- Removeddeep-is@0.1.4(transitive)
- Removeddir-glob@3.0.1(transitive)
- Removeddoctrine@3.0.0(transitive)
- Removedescape-string-regexp@4.0.0(transitive)
- Removedeslint@8.36.0(transitive)
- Removedeslint-scope@5.1.17.2.2(transitive)
- Removedeslint-visitor-keys@3.4.3(transitive)
- Removedespree@9.6.1(transitive)
- Removedesquery@1.6.0(transitive)
- Removedesrecurse@4.3.0(transitive)
- Removedestraverse@4.3.05.3.0(transitive)
- Removedesutils@2.0.3(transitive)
- Removedfast-glob@3.3.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedfast-levenshtein@2.0.6(transitive)
- Removedfastq@1.18.0(transitive)
- Removedfile-entry-cache@6.0.1(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedfind-up@5.0.0(transitive)
- Removedflat-cache@3.2.0(transitive)
- Removedflatted@3.3.2(transitive)
- Removedglob-parent@5.1.26.0.2(transitive)
- Removedglobals@13.24.0(transitive)
- Removedglobby@11.1.0(transitive)
- Removedgrapheme-splitter@1.0.4(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedignore@5.3.2(transitive)
- Removedimport-fresh@3.3.0(transitive)
- Removedimurmurhash@0.1.4(transitive)
- Removedis-number@7.0.0(transitive)
- Removedis-path-inside@3.0.3(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjs-sdsl@4.4.2(transitive)
- Removedjson-buffer@3.0.1(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stable-stringify-without-jsonify@1.0.1(transitive)
- Removedkeyv@4.5.4(transitive)
- Removedlevn@0.4.1(transitive)
- Removedlocate-path@6.0.0(transitive)
- Removedlodash.merge@4.6.2(transitive)
- Removedmerge2@1.4.1(transitive)
- Removedmicromatch@4.0.8(transitive)
- Removedms@2.1.3(transitive)
- Removednatural-compare@1.4.0(transitive)
- Removednatural-compare-lite@1.4.0(transitive)
- Removedoptionator@0.9.4(transitive)
- Removedp-limit@3.1.0(transitive)
- Removedp-locate@5.0.0(transitive)
- Removedparent-module@1.0.1(transitive)
- Removedpath-exists@4.0.0(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedpath-type@4.0.0(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedprelude-ls@1.2.1(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqueue-microtask@1.2.3(transitive)
- Removedresolve-from@4.0.0(transitive)
- Removedreusify@1.0.4(transitive)
- Removedrimraf@3.0.2(transitive)
- Removedrun-parallel@1.2.0(transitive)
- Removedsemver@7.6.3(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedslash@3.0.0(transitive)
- Removedstrip-ansi@6.0.1(transitive)
- Removedstrip-json-comments@3.1.1(transitive)
- Removedsupports-color@7.2.0(transitive)
- Removedtext-table@0.2.0(transitive)
- Removedto-regex-range@5.0.1(transitive)
- Removedtslib@1.14.1(transitive)
- Removedtsutils@3.21.0(transitive)
- Removedtype-check@0.4.0(transitive)
- Removedtype-fest@0.20.2(transitive)
- Removeduri-js@4.4.1(transitive)
- Removedwhich@2.0.2(transitive)
- Removedword-wrap@1.2.5(transitive)
- Removedyocto-queue@0.1.0(transitive)