This commit is contained in:
Timothee Guerin 2021-09-03 10:58:11 -07:00 коммит произвёл GitHub
Родитель 392344f60c
Коммит 55646b8200
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
180 изменённых файлов: 610 добавлений и 564 удалений

Просмотреть файл

@ -6,6 +6,7 @@ plugins:
- unicorn
- node
- jest
- import
env:
es6: true
@ -16,6 +17,9 @@ extends:
- plugin:@typescript-eslint/recommended
- plugin:node/recommended
- plugin:jest/recommended
- plugin:jest/recommended
- plugin:import/recommended
- plugin:import/typescript
globals:
Atomics: readonly
@ -27,30 +31,30 @@ parserOptions:
project: ./tsconfig.json
rules:
"@typescript-eslint/no-this-alias": "off"
"@typescript-eslint/interface-name-prefix": "off"
"@typescript-eslint/explicit-function-return-type": "off"
"@typescript-eslint/no-explicit-any": "off"
"@typescript-eslint/no-empty-interface": "off"
"@typescript-eslint/no-namespace": "off"
"@typescript-eslint/explicit-member-accessibility": "off"
"@typescript-eslint/no-unused-vars": "off"
"@typescript-eslint/no-parameter-properties": "off"
"@typescript-eslint/no-angle-bracket-type-assertion": "off"
"@typescript-eslint/no-use-before-define": "off"
"@typescript-eslint/no-var-requires": "off"
"@typescript-eslint/no-empty-function": "off"
"@typescript-eslint/explicit-module-boundary-types": "off"
"@typescript-eslint/ban-types": "off"
"@typescript-eslint/consistent-type-assertions": "off"
"@typescript-eslint/no-floating-promises": "warn"
"@typescript-eslint/no-this-alias": off
"@typescript-eslint/interface-name-prefix": off
"@typescript-eslint/explicit-function-return-type": off
"@typescript-eslint/no-explicit-any": off
"@typescript-eslint/no-empty-interface": off
"@typescript-eslint/no-namespace": off
"@typescript-eslint/explicit-member-accessibility": off
"@typescript-eslint/no-unused-vars": off
"@typescript-eslint/no-parameter-properties": off
"@typescript-eslint/no-angle-bracket-type-assertion": off
"@typescript-eslint/no-use-before-define": off
"@typescript-eslint/no-var-requires": off
"@typescript-eslint/no-empty-function": off
"@typescript-eslint/explicit-module-boundary-types": off
"@typescript-eslint/ban-types": off
"@typescript-eslint/consistent-type-assertions": off
"@typescript-eslint/no-floating-promises": warn
"require-atomic-updates": "off"
"require-atomic-updates": off
# Prettier config https://github.com/prettier/eslint-plugin-prettier#recommended-configuration
prettier/prettier: "warn"
arrow-body-style: "off"
prefer-arrow-callback: "off"
prettier/prettier: warn
arrow-body-style: off
prefer-arrow-callback: off
# Unicorn plugin config
unicorn/filename-case: warn
@ -75,10 +79,24 @@ rules:
jest/no-focused-tests: warn
jest/no-identical-title: warn
# =================================================
# Import plugin
# =================================================
import/no-default-export: warn
import/no-self-import: warn # This cause many circular dependency issues with index files.
import/no-internal-modules: off
import/no-unresolved: off
import/order:
- warn
- groups: ["builtin", "external", "parent", "sibling", "index"]
alphabetize:
order: "asc"
caseInsensitive: true
# Basic config
no-console: warn
no-undef: "off"
no-unused-vars: "off"
no-undef: off
no-unused-vars: off
no-multiple-empty-lines:
- warn
- max: 2

Просмотреть файл

@ -65,7 +65,7 @@ dependencies:
deep-equal: 2.0.5
diff: 4.0.2
eslint: 7.21.0
eslint-plugin-import: 2.22.1_eslint@7.21.0
eslint-plugin-import: 2.24.2_eslint@7.21.0
eslint-plugin-jest: 24.3.2_0a8bb714dcb5eb15815cf9c1a5256ac7
eslint-plugin-node: 11.1.0_eslint@7.21.0
eslint-plugin-prettier: 3.4.0_eslint@7.21.0+prettier@2.3.1
@ -2391,12 +2391,6 @@ packages:
dev: false
resolution:
integrity: sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
/contains-path/0.1.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=
/content-disposition/0.5.3:
dependencies:
safe-buffer: 5.1.2
@ -2796,15 +2790,14 @@ packages:
node: '>=8'
resolution:
integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
/doctrine/1.5.0:
/doctrine/2.1.0:
dependencies:
esutils: 2.0.3
isarray: 1.0.0
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=
integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==
/doctrine/3.0.0:
dependencies:
esutils: 2.0.3
@ -2954,6 +2947,30 @@ packages:
node: '>= 0.4'
resolution:
integrity: sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==
/es-abstract/1.18.5:
dependencies:
call-bind: 1.0.2
es-to-primitive: 1.2.1
function-bind: 1.1.1
get-intrinsic: 1.1.1
has: 1.0.3
has-symbols: 1.0.2
internal-slot: 1.0.3
is-callable: 1.2.3
is-negative-zero: 2.0.1
is-regex: 1.1.4
is-string: 1.0.7
object-inspect: 1.11.0
object-keys: 1.1.1
object.assign: 4.1.2
string.prototype.trimend: 1.0.4
string.prototype.trimstart: 1.0.4
unbox-primitive: 1.0.1
dev: false
engines:
node: '>= 0.4'
resolution:
integrity: sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==
/es-get-iterator/1.1.2:
dependencies:
call-bind: 1.0.2
@ -3053,22 +3070,22 @@ packages:
source-map: 0.6.1
resolution:
integrity: sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==
/eslint-import-resolver-node/0.3.4:
/eslint-import-resolver-node/0.3.6:
dependencies:
debug: 2.6.9
debug: 3.2.7
resolve: 1.20.0
dev: false
resolution:
integrity: sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==
/eslint-module-utils/2.6.0:
integrity: sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==
/eslint-module-utils/2.6.2:
dependencies:
debug: 2.6.9
debug: 3.2.7
pkg-dir: 2.0.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==
integrity: sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==
/eslint-plugin-es/3.0.1_eslint@7.21.0:
dependencies:
eslint: 7.21.0
@ -3081,29 +3098,31 @@ packages:
eslint: '>=4.19.1'
resolution:
integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==
/eslint-plugin-import/2.22.1_eslint@7.21.0:
/eslint-plugin-import/2.24.2_eslint@7.21.0:
dependencies:
array-includes: 3.1.3
array.prototype.flat: 1.2.4
contains-path: 0.1.0
debug: 2.6.9
doctrine: 1.5.0
doctrine: 2.1.0
eslint: 7.21.0
eslint-import-resolver-node: 0.3.4
eslint-module-utils: 2.6.0
eslint-import-resolver-node: 0.3.6
eslint-module-utils: 2.6.2
find-up: 2.1.0
has: 1.0.3
is-core-module: 2.6.0
minimatch: 3.0.4
object.values: 1.1.3
read-pkg-up: 2.0.0
object.values: 1.1.4
pkg-up: 2.0.0
read-pkg-up: 3.0.0
resolve: 1.20.0
tsconfig-paths: 3.9.0
tsconfig-paths: 3.11.0
dev: false
engines:
node: '>=4'
peerDependencies:
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0
resolution:
integrity: sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==
integrity: sha512-hNVtyhiEtZmpsabL4neEj+6M5DCLgpYyG9nzJY8lZQeQXEn5UPW1DpUdsMHMXsq98dbNm7nt1w9ZMSVpfJdi8Q==
/eslint-plugin-jest/24.3.2_0a8bb714dcb5eb15815cf9c1a5256ac7:
dependencies:
'@typescript-eslint/eslint-plugin': 4.17.0_8b165b9e54250ab9ac320f8b5af3f123
@ -4025,6 +4044,14 @@ packages:
node: '>= 0.4'
resolution:
integrity: sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==
/has-tostringtag/1.0.0:
dependencies:
has-symbols: 1.0.2
dev: false
engines:
node: '>= 0.4'
resolution:
integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==
/has-unicode/2.0.1:
dev: false
resolution:
@ -4276,6 +4303,16 @@ packages:
dev: false
resolution:
integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
/internal-slot/1.0.3:
dependencies:
get-intrinsic: 1.1.1
has: 1.0.3
side-channel: 1.0.4
dev: false
engines:
node: '>= 0.4'
resolution:
integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==
/interpret/2.2.0:
dev: false
engines:
@ -4383,12 +4420,12 @@ packages:
hasBin: true
resolution:
integrity: sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ==
/is-core-module/2.2.0:
/is-core-module/2.6.0:
dependencies:
has: 1.0.3
dev: false
resolution:
integrity: sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==
integrity: sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==
/is-data-descriptor/0.1.4:
dependencies:
kind-of: 3.2.2
@ -4556,6 +4593,15 @@ packages:
node: '>= 0.4'
resolution:
integrity: sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==
/is-regex/1.1.4:
dependencies:
call-bind: 1.0.2
has-tostringtag: 1.0.0
dev: false
engines:
node: '>= 0.4'
resolution:
integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==
/is-relative/1.0.0:
dependencies:
is-unc-path: 1.0.0
@ -4586,6 +4632,14 @@ packages:
node: '>= 0.4'
resolution:
integrity: sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==
/is-string/1.0.7:
dependencies:
has-tostringtag: 1.0.0
dev: false
engines:
node: '>= 0.4'
resolution:
integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==
/is-symbol/1.0.3:
dependencies:
has-symbols: 1.0.2
@ -5576,17 +5630,6 @@ packages:
dev: false
resolution:
integrity: sha512-s9TWOlKxS78mTWrL8zIdqm53YXJ+yjVSXCdvCGnYWtRjRlK2dG0wW+sYrffnw/qveAjY2jM0Y6x2ZteNlrsjXA==
/load-json-file/2.0.0:
dependencies:
graceful-fs: 4.2.6
parse-json: 2.2.0
pify: 2.3.0
strip-bom: 3.0.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=
/load-json-file/4.0.0:
dependencies:
graceful-fs: 4.2.6
@ -6424,6 +6467,10 @@ packages:
node: '>=0.10.0'
resolution:
integrity: sha1-fn2Fi3gb18mRpBupde04EnVOmYw=
/object-inspect/1.11.0:
dev: false
resolution:
integrity: sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==
/object-inspect/1.9.0:
dev: false
resolution:
@ -6491,17 +6538,16 @@ packages:
node: '>=0.10.0'
resolution:
integrity: sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=
/object.values/1.1.3:
/object.values/1.1.4:
dependencies:
call-bind: 1.0.2
define-properties: 1.1.3
es-abstract: 1.18.0
has: 1.0.3
es-abstract: 1.18.5
dev: false
engines:
node: '>= 0.4'
resolution:
integrity: sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw==
integrity: sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==
/on-finished/2.3.0:
dependencies:
ee-first: 1.1.1
@ -6701,14 +6747,6 @@ packages:
node: '>=6'
resolution:
integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
/parse-json/2.2.0:
dependencies:
error-ex: 1.3.2
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=
/parse-json/4.0.0:
dependencies:
error-ex: 1.3.2
@ -6787,14 +6825,6 @@ packages:
dev: false
resolution:
integrity: sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
/path-type/2.0.0:
dependencies:
pify: 2.3.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=
/path-type/3.0.0:
dependencies:
pify: 3.0.0
@ -6821,12 +6851,6 @@ packages:
node: '>=8.6'
resolution:
integrity: sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
/pify/2.3.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
/pify/3.0.0:
dev: false
engines:
@ -6863,6 +6887,14 @@ packages:
node: '>=8'
resolution:
integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
/pkg-up/2.0.0:
dependencies:
find-up: 2.1.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-yBmscoBZpGHKscOImivjxJoATX8=
/pluralize/8.0.0:
dev: false
engines:
@ -7105,15 +7137,6 @@ packages:
dev: false
resolution:
integrity: sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==
/read-pkg-up/2.0.0:
dependencies:
find-up: 2.1.0
read-pkg: 2.0.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=
/read-pkg-up/3.0.0:
dependencies:
find-up: 2.1.0
@ -7133,16 +7156,6 @@ packages:
node: '>=8'
resolution:
integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==
/read-pkg/2.0.0:
dependencies:
load-json-file: 2.0.0
normalize-package-data: 2.5.0
path-type: 2.0.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=
/read-pkg/3.0.0:
dependencies:
load-json-file: 4.0.0
@ -7308,7 +7321,7 @@ packages:
integrity: sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
/resolve/1.20.0:
dependencies:
is-core-module: 2.2.0
is-core-module: 2.6.0
path-parse: 1.0.6
dev: false
resolution:
@ -7545,7 +7558,7 @@ packages:
dependencies:
call-bind: 1.0.2
get-intrinsic: 1.1.1
object-inspect: 1.9.0
object-inspect: 1.11.0
dev: false
resolution:
integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==
@ -8333,6 +8346,15 @@ packages:
typescript: '>=2.7'
resolution:
integrity: sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==
/tsconfig-paths/3.11.0:
dependencies:
'@types/json5': 0.0.29
json5: 1.0.1
minimist: 1.2.5
strip-bom: 3.0.0
dev: false
resolution:
integrity: sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA==
/tsconfig-paths/3.9.0:
dependencies:
'@types/json5': 0.0.29
@ -8340,6 +8362,7 @@ packages:
minimist: 1.2.5
strip-bom: 3.0.0
dev: false
optional: true
resolution:
integrity: sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==
/tslib/1.14.1:
@ -8460,6 +8483,15 @@ packages:
dev: false
resolution:
integrity: sha512-P/51NX+JXyxK/aigg1/ZgyccdAxm5K1+n8+tvqSntjOivPt19gvm1VC49RWYetsiub8WViUchdxl/KWHHB0kzA==
/unbox-primitive/1.0.1:
dependencies:
function-bind: 1.1.1
has-bigints: 1.0.1
has-symbols: 1.0.2
which-boxed-primitive: 1.0.2
dev: false
resolution:
integrity: sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==
/unc-path-regex/0.1.2:
dev: false
engines:
@ -8815,7 +8847,7 @@ packages:
is-bigint: 1.0.1
is-boolean-object: 1.1.0
is-number-object: 1.0.4
is-string: 1.0.5
is-string: 1.0.7
is-symbol: 1.0.3
dev: false
resolution:
@ -9609,7 +9641,7 @@ packages:
commonmark: 0.27.0
deep-equal: 2.0.5
eslint: 7.21.0
eslint-plugin-import: 2.22.1_eslint@7.21.0
eslint-plugin-import: 2.24.2_eslint@7.21.0
eslint-plugin-jest: 24.3.2_0a8bb714dcb5eb15815cf9c1a5256ac7
eslint-plugin-node: 11.1.0_eslint@7.21.0
eslint-plugin-prettier: 3.4.0_eslint@7.21.0+prettier@2.3.1
@ -9632,7 +9664,7 @@ packages:
peerDependencies:
ts-node: '*'
resolution:
integrity: sha512-XJl3yCgzS08OY5jfzAcjZsm+cyOGJCh0pKyX7H07x7KKy6SQVS4ZatI7eW36OiBxwG00nvt/bbgPUbHFZ7TC2Q==
integrity: sha512-grjTCGc9nHmVHbEGtUNz3+6lA9xo9NEtpf+Hx3RP/td8rOQYXx6x1Wq3epAQzR7n13dPAlM4SSMlM/QTyCZ3gA==
tarball: file:projects/md-mock-api.tgz
version: 0.0.0
file:projects/modelerfour.tgz_ts-node@9.1.1:
@ -9738,6 +9770,7 @@ packages:
'@types/node': 14.14.34
'@types/source-map-support': 0.5.3
eslint: 7.21.0
eslint-plugin-import: 2.24.2_eslint@7.21.0
eslint-plugin-prettier: 3.4.0_eslint@7.21.0+prettier@2.3.1
eslint-plugin-unicorn: 33.0.1_eslint@7.21.0
rimraf: 3.0.2
@ -9748,7 +9781,7 @@ packages:
peerDependencies:
prettier: '*'
resolution:
integrity: sha512-q4eWVN2JgEqV44q37qKt2J5sz7T3XDAMZuk7VJZKuQyc+v6pmFke8a/0QnqXEbuajSCTJ7SGuRK5+JG9DtBA/g==
integrity: sha512-eTDjZSb7zXm6+9CygL2dBAZnmpWyDjzUtGIykQ6ZV7LYy7496AwpZBpnlFQQOBnx30ovGKgnBXCfujua/829Cw==
tarball: file:projects/test-public-packages.tgz
version: 0.0.0
file:projects/test-utils.tgz_prettier@2.3.1+ts-node@9.1.1:
@ -9869,7 +9902,7 @@ specifiers:
deep-equal: ^2.0.5
diff: ^4.0.1
eslint: ^7.17.0
eslint-plugin-import: ~2.22.1
eslint-plugin-import: ~2.24.2
eslint-plugin-jest: ~24.3.2
eslint-plugin-node: ~11.1.0
eslint-plugin-prettier: ~3.4.0

Просмотреть файл

@ -61,6 +61,7 @@
"eslint-plugin-node": "~11.1.0",
"eslint-plugin-prettier": "~3.4.0",
"eslint-plugin-unicorn": "~33.0.1",
"eslint-plugin-import": "~2.24.2",
"eslint": "^7.17.0",
"jest": "^27.0.4",
"jsonpath": "1.0.0",

Просмотреть файл

@ -1,5 +1,5 @@
import { Package } from "@azure-tools/extension";
import { color } from "@autorest/common";
import { Package } from "@azure-tools/extension";
import { gt } from "semver";
import { AutorestArgs } from "../args";
import { extensionManager, networkEnabled } from "../autorest-as-a-service";

Просмотреть файл

@ -1,7 +1,7 @@
import { isDirectory, readdir, rmdir } from "@azure-tools/async-io";
import chalk from "chalk";
import { tmpdir } from "os";
import { join } from "path";
import { isDirectory, readdir, rmdir } from "@azure-tools/async-io";
import chalk from "chalk";
/**
* Clears out all autorest-temp folders from the temp folder.

Просмотреть файл

@ -10,12 +10,12 @@ declare const isDebuggerEnabled: boolean;
const cwd = process.cwd();
import chalk from "chalk";
import { newCorePackage, ensureAutorestHome, runCoreWithRequire, runCoreOutOfProc } from "./autorest-as-a-service";
import { parseAutorestArgs } from "./args";
import { resetAutorest, showAvailableCoreVersions, showInstalledExtensions } from "./commands";
import { clearTempData } from "./actions";
import { loadConfig, resolveCoreVersion } from "./utils";
import { parseAutorestArgs } from "./args";
import { newCorePackage, ensureAutorestHome, runCoreWithRequire, runCoreOutOfProc } from "./autorest-as-a-service";
import { resetAutorest, showAvailableCoreVersions, showInstalledExtensions } from "./commands";
import { VERSION } from "./constants";
import { loadConfig, resolveCoreVersion } from "./utils";
const launchCore = isDebuggerEnabled ? runCoreWithRequire : runCoreOutOfProc;

Просмотреть файл

@ -1,22 +1,21 @@
/* eslint-disable no-process-exit */
/* eslint-disable no-console */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { spawn } from "child_process";
import { lookup } from "dns";
import { Extension, ExtensionManager, Package } from "@azure-tools/extension";
import { homedir } from "os";
import { join } from "path";
import { mkdtempSync, rmdirSync } from "fs";
import { homedir, tmpdir } from "os";
import { Exception } from "@azure-tools/tasks";
import { join } from "path";
import { AutorestConfiguration } from "@autorest/configuration";
import { isFile, mkdir, isDirectory } from "@azure-tools/async-io";
import { Extension, ExtensionManager, Package } from "@azure-tools/extension";
import { Exception, When } from "@azure-tools/tasks";
import * as semver from "semver";
import { isFile, mkdir, isDirectory } from "@azure-tools/async-io";
import { When } from "@azure-tools/tasks";
import { mkdtempSync, rmdirSync } from "fs";
import { tmpdir } from "os";
import { spawn } from "child_process";
import { AutorestArgs } from "./args";
import { VERSION } from "./constants";
import { AutorestConfiguration } from "@autorest/configuration";
import { parseMemory } from "./utils";
const inWebpack = typeof __webpack_require__ === "function";

Просмотреть файл

@ -1,7 +1,7 @@
/* eslint-disable no-console */
import { color } from "@autorest/common";
import { AutorestArgs } from "../args";
import { extensionManager, rootFolder } from "../autorest-as-a-service";
import { color } from "@autorest/common";
/**
* Reset autorest, this will:

Просмотреть файл

@ -2,8 +2,8 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from "path";
import { existsSync } from "fs";
import * as path from "path";
const resolveAppRoot = () => {
let current = path.resolve(__dirname);

Просмотреть файл

@ -8,13 +8,13 @@
/// <reference path="../definitions/vscode.d.ts" />
// everything else.
import { runCoreWithRequire, resolveEntrypoint, ensureAutorestHome, selectVersion } from "./autorest-as-a-service";
import { resolve } from "path";
import { GenerationResults, IFileSystem, AutoRest as IAutoRest } from "autorest-core";
import { LanguageClient } from "vscode-languageclient";
// exports the public AutoRest definitions
import { GenerationResults, IFileSystem, AutoRest as IAutoRest } from "autorest-core";
import { runCoreWithRequire, resolveEntrypoint, ensureAutorestHome, selectVersion } from "./autorest-as-a-service";
export { Message, Artifact, GenerationResults, IFileSystem } from "autorest-core";
// This is needed currently in autorest-as-service when starting @autorest/core out of proc for @autorest/core version older than 3.6.0

Просмотреть файл

@ -1,14 +1,14 @@
import { AutorestArgs } from "./args";
import { AutorestConfiguration, AutorestNormalizedConfiguration, ConfigurationLoader } from "@autorest/configuration";
import { AutorestSyncLogger, ConsoleLoggerSink } from "@autorest/common";
import { createFileOrFolderUri, createFolderUri, resolveUri } from "@azure-tools/uri";
import { AppRoot } from "./constants";
import { extensionManager, networkEnabled, selectVersion } from "./autorest-as-a-service";
import chalk from "chalk";
import { checkForAutoRestUpdate } from "./actions";
import { isFile } from "@azure-tools/async-io";
import { dirname, join, resolve } from "path";
import { AutorestSyncLogger, ConsoleLoggerSink } from "@autorest/common";
import { AutorestConfiguration, AutorestNormalizedConfiguration, ConfigurationLoader } from "@autorest/configuration";
import { isFile } from "@azure-tools/async-io";
import { createFileOrFolderUri, createFolderUri, resolveUri } from "@azure-tools/uri";
import chalk from "chalk";
import untildify from "untildify";
import { checkForAutoRestUpdate } from "./actions";
import { AutorestArgs } from "./args";
import { extensionManager, networkEnabled, selectVersion } from "./autorest-as-a-service";
import { AppRoot } from "./constants";
const inWebpack = typeof __webpack_require__ === "function";
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion

Просмотреть файл

@ -49,6 +49,7 @@
"eslint-plugin-node": "~11.1.0",
"eslint-plugin-prettier": "~3.4.0",
"eslint-plugin-unicorn": "~33.0.1",
"eslint-plugin-import": "~2.24.2",
"eslint": "^7.17.0",
"jest": "^27.0.4",
"lodash": "~4.17.20",

Просмотреть файл

@ -1,5 +1,5 @@
import { Channel, Host } from "@autorest/extension-base";
import { fileURLToPath } from "url";
import { Channel, Host } from "@autorest/extension-base";
import { compileAdl } from "./cadl-compiler.js";
export async function setupAdlCompilerPlugin(host: Host) {

Просмотреть файл

@ -1,7 +1,7 @@
import { CompilerHost, createProgram, Diagnostic, createSourceFile } from "@cadl-lang/compiler";
import { readFile, realpath, stat } from "fs/promises";
import { join, resolve } from "path";
import { fileURLToPath, pathToFileURL } from "url";
import { CompilerHost, createProgram, Diagnostic, createSourceFile } from "@cadl-lang/compiler";
export function createAdlHost(writeFile: (path: string, content: string) => Promise<void>): CompilerHost {
return {

Просмотреть файл

@ -78,6 +78,7 @@
"eslint-plugin-node": "~11.1.0",
"eslint-plugin-prettier": "~3.4.0",
"eslint-plugin-unicorn": "~33.0.1",
"eslint-plugin-import": "~2.24.2",
"eslint": "^7.17.0",
"jest": "^27.0.4",
"jsonpath": "1.0.0",

Просмотреть файл

@ -4,7 +4,8 @@
*--------------------------------------------------------------------------------------------*/
/* eslint-disable no-console */
import "source-map-support/register";
import { omit } from "lodash";
import { EventEmitter } from "events";
import { resolve as currentDirectory } from "path";
import {
configureLibrariesLogger,
color,
@ -12,8 +13,9 @@ import {
FilterLogger,
AutorestLogger,
AutorestSyncLogger,
Exception,
} from "@autorest/common";
import { EventEmitter } from "events";
import { AutorestCliArgs, parseAutorestCliArgs } from "@autorest/configuration";
EventEmitter.defaultMaxListeners = 100;
process.env["ELECTRON_RUN_AS_NODE"] = "1";
@ -23,7 +25,6 @@ delete process.env["ELECTRON_NO_ATTACH_CONSOLE"];
// the console app starts for real here.
import { EnhancedFileSystem, RealFileSystem } from "@azure-tools/datastore";
import { parseYAML } from "@azure-tools/yaml";
import {
clearFolder,
createFolderUri,
@ -33,13 +34,13 @@ import {
writeBinary,
writeString,
} from "@azure-tools/uri";
import { resolve as currentDirectory } from "path";
import { parseYAML } from "@azure-tools/yaml";
import { omit } from "lodash";
import { ArtifactWriter } from "./artifact-writer";
import { Help } from "./help";
import { Artifact } from "./lib/artifact";
import { AutoRest, IsOpenApiDocument, Shutdown } from "./lib/autorest-core";
import { Exception } from "@autorest/common";
import { VERSION } from "./lib/constants";
import { ArtifactWriter } from "./artifact-writer";
import { getLogLevel } from "./lib/context";
let verbose = false;

Просмотреть файл

@ -1,6 +1,6 @@
import { Artifact } from "./lib/artifact";
import { writeBinary, writeString } from "@azure-tools/uri";
import { AutorestConfiguration } from "@autorest/configuration";
import { writeBinary, writeString } from "@azure-tools/uri";
import { Artifact } from "./lib/artifact";
export class ArtifactWriter {
private tasks: Promise<void>[] = [];

Просмотреть файл

@ -2,26 +2,24 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AutorestContextLoader, AutorestContext, MessageEmitter } from "./context";
import { EventEmitter, IEvent } from "./events";
import { homedir } from "os";
import {
AutorestLoggingSession,
ConsoleLogger,
Exception,
LogInfo,
LoggerSink,
AutorestLoggerSourceEnhancer,
AutorestAsyncLogger,
AutorestLogger,
} from "@autorest/common";
import { isConfigurationDocument } from "@autorest/configuration";
import { IFileSystem, RealFileSystem } from "@azure-tools/datastore";
import { Artifact } from "./artifact";
import { AutorestContextLoader, AutorestContext, MessageEmitter } from "./context";
import { DocumentType } from "./document-type";
import { EventEmitter, IEvent } from "./events";
import { runPipeline } from "./pipeline/pipeline";
export { AutorestContext } from "./context";
import { isConfigurationDocument } from "@autorest/configuration";
import { homedir } from "os";
import { Artifact } from "./artifact";
import { DocumentType } from "./document-type";
import { StatsCollector } from "./stats";
function IsIterable(target: any) {

Просмотреть файл

@ -2,8 +2,8 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from "path";
import { existsSync } from "fs";
import * as path from "path";
const resolveAppRoot = () => {
let current = path.resolve(__dirname);

Просмотреть файл

@ -3,10 +3,9 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { CachingFileSystem, IFileSystem, LazyPromise, RealFileSystem } from "@azure-tools/datastore";
import { Extension, ExtensionManager } from "@azure-tools/extension";
import { homedir } from "os";
import { join } from "path";
import { AutoRestExtension } from "../pipeline/plugin-endpoint";
import { FilterLogger, AutorestLoggingSession, AutorestLogger } from "@autorest/common";
import {
AutorestConfiguration,
AutorestRawConfiguration,
@ -15,13 +14,14 @@ import {
mergeConfigurations,
ResolvedExtension,
} from "@autorest/configuration";
import { AutorestContext, getLogLevel } from "./autorest-context";
import { MessageEmitter } from "./message-emitter";
import { FilterLogger, AutorestLoggingSession, AutorestLogger } from "@autorest/common";
import { CachingFileSystem, IFileSystem, LazyPromise, RealFileSystem } from "@azure-tools/datastore";
import { Extension, ExtensionManager } from "@azure-tools/extension";
import { createFileOrFolderUri, createFolderUri, resolveUri } from "@azure-tools/uri";
import { AppRoot } from "../constants";
import { homedir } from "os";
import { AutoRestExtension } from "../pipeline/plugin-endpoint";
import { StatsCollector } from "../stats";
import { AutorestContext, getLogLevel } from "./autorest-context";
import { MessageEmitter } from "./message-emitter";
const inWebpack = typeof __webpack_require__ === "function";
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion

Просмотреть файл

@ -1,16 +1,4 @@
import { DataStore, CachingFileSystem } from "@azure-tools/datastore";
import { basename, dirname } from "path";
import { CancellationToken, CancellationTokenSource } from "vscode-jsonrpc";
import { Artifact } from "../artifact";
import {
AutorestNormalizedConfiguration,
getNestedConfiguration,
ResolvedDirective,
resolveDirectives,
} from "@autorest/configuration";
import { MessageEmitter } from "./message-emitter";
import { IEvent } from "../events";
import { AutorestConfiguration, arrayOf, extendAutorestConfiguration } from "@autorest/configuration";
import {
AutorestError,
FilterLogger,
@ -21,10 +9,25 @@ import {
LogSuppression,
IAutorestLogger,
} from "@autorest/common";
import { VERSION } from "../constants";
import { StatsCollector } from "../stats";
import { PipelinePluginDefinition } from "../pipeline/plugin-loader";
import {
AutorestNormalizedConfiguration,
getNestedConfiguration,
ResolvedDirective,
resolveDirectives,
AutorestConfiguration,
arrayOf,
extendAutorestConfiguration,
} from "@autorest/configuration";
import { DataStore, CachingFileSystem } from "@azure-tools/datastore";
import { cloneDeep } from "lodash";
import { CancellationToken, CancellationTokenSource } from "vscode-jsonrpc";
import { Artifact } from "../artifact";
import { VERSION } from "../constants";
import { IEvent } from "../events";
import { PipelinePluginDefinition } from "../pipeline/plugin-loader";
import { StatsCollector } from "../stats";
import { MessageEmitter } from "./message-emitter";
export class AutorestContext implements IAutorestLogger {
public config: AutorestConfiguration;

Просмотреть файл

@ -1,7 +1,7 @@
import { DataStore } from "@azure-tools/datastore";
import { CancellationToken, CancellationTokenSource } from "vscode-jsonrpc";
import { Artifact } from "../artifact";
import { EventEmitter, IEvent } from "../events";
import { CancellationToken, CancellationTokenSource } from "vscode-jsonrpc";
import { DataStore } from "@azure-tools/datastore";
export class MessageEmitter extends EventEmitter {
/**

Просмотреть файл

@ -3,8 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Position, RawSourceMap } from "source-map";
import { EnhancedPosition, Mapping } from "@azure-tools/datastore";
import { Position, RawSourceMap } from "source-map";
import { Artifact } from "./artifact";
/**

Просмотреть файл

@ -1,9 +1,9 @@
import { QuickDataSource, DataSource, DataHandle, DataSink } from "@azure-tools/datastore";
import { createHash } from "crypto";
import { tmpdir } from "os";
import { join } from "path";
import { isDirectory, readdir, mkdir, writeFile, readFile } from "@azure-tools/async-io";
import { createHash } from "crypto";
import { QuickDataSource, DataSource, DataHandle, DataSink } from "@azure-tools/datastore";
const md5 = (content: any) => createHash("md5").update(JSON.stringify(content)).digest("hex");

Просмотреть файл

@ -5,6 +5,8 @@
/* eslint-disable @typescript-eslint/no-use-before-define */
import { createHash } from "crypto";
import { promisify } from "util";
import {
DataHandle,
DataSource,
@ -16,15 +18,13 @@ import {
PipeState,
mergePipeStates,
} from "@azure-tools/datastore";
import { mapValues, omitBy } from "lodash";
import { AutorestContext } from "../context";
import { OutstandingTaskAwaiter } from "../outstanding-task-awaiter";
import { createArtifactEmitterPlugin } from "../plugins/emitter";
import { createHash } from "crypto";
import { isCached, readCache, writeCache } from "./pipeline-cache";
import { CORE_PLUGIN_MAP } from "../plugins";
import { createArtifactEmitterPlugin } from "../plugins/emitter";
import { isCached, readCache, writeCache } from "./pipeline-cache";
import { loadPlugins, PipelinePluginDefinition } from "./plugin-loader";
import { mapValues, omitBy } from "lodash";
import { promisify } from "util";
const safeEval = createSandbox();
const setImmediatePromise = promisify(setImmediate);

Просмотреть файл

@ -3,11 +3,11 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { RequestType0, RequestType2 } from "vscode-jsonrpc";
import { NotificationType2, NotificationType4 } from "vscode-jsonrpc";
import { Mapping, RawSourceMap } from "source-map";
import { Message } from "../message";
import { PathPosition } from "@azure-tools/datastore";
import { Mapping, RawSourceMap } from "source-map";
import { RequestType0, RequestType2, NotificationType2, NotificationType4 } from "vscode-jsonrpc";
import { Message } from "../message";
export namespace IAutoRestPluginTargetTypes {
export const GetPluginNames = new RequestType0<Array<string>, Error, void>("GetPluginNames");

Просмотреть файл

@ -3,16 +3,16 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ChildProcess } from "child_process";
import { Readable, Writable } from "stream";
import { Exception } from "@autorest/common";
import { DataHandle, DataSink, DataSource, LazyPromise, Mapping, PathPosition } from "@azure-tools/datastore";
import { ensureIsFolderUri } from "@azure-tools/uri";
import { ChildProcess } from "child_process";
import { RawSourceMap } from "source-map";
import { Readable, Writable } from "stream";
import { CancellationToken, createMessageConnection } from "vscode-jsonrpc";
import { Artifact } from "../artifact";
import { AutorestContext } from "../context";
import { EventEmitter } from "../events";
import { Exception } from "@autorest/common";
import { ArtifactMessage, Channel, Message } from "../message";
import { IAutoRestPluginInitiator, IAutoRestPluginInitiatorTypes, IAutoRestPluginTargetTypes } from "./plugin-api";

Просмотреть файл

@ -1,9 +1,9 @@
import { isDefined } from "@autorest/common";
import { DataHandle, DataSink, DataSource, QuickDataSource, Source } from "@azure-tools/datastore";
import { Model, isReference, Schema } from "@azure-tools/openapi";
import { cloneDeep } from "lodash";
import { AutorestContext } from "../context";
import { PipelinePlugin } from "../pipeline/common";
import { isDefined } from "@autorest/common";
import { cloneDeep } from "lodash";
async function cleanAllOfs(model: Model) {
const output = cloneDeep(model);

Просмотреть файл

@ -1,8 +1,8 @@
import { PipelinePlugin } from "../pipeline/common";
import { AutorestContext } from "../context";
import { DataSource, DataSink, DataHandle, QuickDataSource } from "@azure-tools/datastore";
import { execute, cmdlineToArray } from "@azure-tools/codegen";
import { DataSource, DataSink, DataHandle, QuickDataSource } from "@azure-tools/datastore";
import { FileUriToPath } from "@azure-tools/uri";
import { AutorestContext } from "../context";
import { PipelinePlugin } from "../pipeline/common";
async function command(context: AutorestContext, input: DataSource, sink: DataSink) {
const c = context.config.raw.run;

Просмотреть файл

@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/
import { mergeOverwriteOrAppend } from "@autorest/common";
import { createPerFilePlugin, PipelinePlugin } from "../pipeline/common";
import { cloneDeep } from "lodash";
import { createPerFilePlugin, PipelinePlugin } from "../pipeline/common";
function decorateSpecialProperties(o: any): void {
if (o["implementation"]) {

Просмотреть файл

@ -14,9 +14,9 @@ import {
Transformer,
} from "@azure-tools/datastore";
import * as oai from "@azure-tools/openapi";
import oai3 from "@azure-tools/openapi";
import { AutorestContext } from "../context";
import { PipelinePlugin } from "../pipeline/common";
import oai3 from "@azure-tools/openapi";
/**
* components-to-keep are the ones that:

Просмотреть файл

@ -1,9 +1,9 @@
import { AutorestDiagnostic } from "@autorest/common";
import { DataHandle, IFileSystem, QuickDataSource } from "@azure-tools/datastore";
import { PipelinePlugin } from "../pipeline/common";
import { parseJsonPointer } from "@azure-tools/json";
import { ConverterDiagnostic, ConverterLogger, convertOai2ToOai3Files } from "@azure-tools/oai2-to-oai3";
import { cloneDeep } from "lodash";
import { AutorestDiagnostic } from "@autorest/common";
import { parseJsonPointer } from "@azure-tools/json";
import { PipelinePlugin } from "../pipeline/common";
/* @internal */
export function createSwaggerToOpenApi3Plugin(fileSystem?: IFileSystem): PipelinePlugin {

Просмотреть файл

@ -1,6 +1,6 @@
import { DataHandle, DataSource, QuickDataSource, createSandbox } from "@azure-tools/datastore";
import { deepNormalize, Stringify } from "@azure-tools/yaml";
import { resolveUri } from "@azure-tools/uri";
import { deepNormalize, Stringify } from "@azure-tools/yaml";
import { AutorestContext } from "../context";
import { Channel } from "../message";
import { PipelinePlugin } from "../pipeline/common";

Просмотреть файл

@ -1,7 +1,7 @@
import { createDataHandle } from "@autorest/test-utils";
import { EnumDeduplicator } from "./enum-deduplicator";
import * as oai3 from "@azure-tools/openapi";
import { JsonType } from "@azure-tools/openapi";
import { EnumDeduplicator } from "./enum-deduplicator";
async function runEnumDeduplicator(data: Partial<oai3.Model>): Promise<oai3.Model> {
const source = createDataHandle(JSON.stringify(data));

Просмотреть файл

@ -1,7 +1,7 @@
import { AnyObject, Node, TransformerViaPointer, visit } from "@azure-tools/datastore";
import compareVersions from "compare-versions";
import { toSemver, maximum, pascalCase } from "@azure-tools/codegen";
import { AnyObject, Node, TransformerViaPointer, visit } from "@azure-tools/datastore";
import * as oai3 from "@azure-tools/openapi";
import compareVersions from "compare-versions";
import { cloneDeep } from "lodash";
export class EnumDeduplicator extends TransformerViaPointer<oai3.Model, oai3.Model> {

Просмотреть файл

@ -1,5 +1,5 @@
import { DataHandle, QuickDataSource, mergePipeStates } from "@azure-tools/datastore";
import { LogLevel } from "@autorest/common";
import { DataHandle, QuickDataSource, mergePipeStates } from "@azure-tools/datastore";
import { Channel, Message } from "../message";
import { PipelinePlugin } from "../pipeline/common";
import { AutoRestExtension } from "../pipeline/plugin-endpoint";

Просмотреть файл

@ -1,5 +1,5 @@
import { PipelinePlugin } from "../../pipeline/common";
import { QuickDataSource } from "@azure-tools/datastore";
import { PipelinePlugin } from "../../pipeline/common";
export function createIdentityPlugin(): PipelinePlugin {
return async (config, input) => input;

Просмотреть файл

@ -1,10 +1,10 @@
import { relative, dirname, basename } from "path";
import { URL } from "url";
import { DataHandle, DataSink, DataSource, QuickDataSource, visit } from "@azure-tools/datastore";
import { parseJsonRef, stringifyJsonRef, updateJsonRefs } from "@azure-tools/jsonschema";
import { cloneDeep } from "lodash";
import { AutorestContext } from "../../context";
import { PipelinePlugin } from "../../pipeline/common";
import { URL } from "url";
import { relative, dirname, basename } from "path";
function resolveRelativeRef(currentFile: string, newRef: string) {
return relative(dirname(currentFile), newRef).replace(/\\/g, "/");

Просмотреть файл

@ -1,8 +1,8 @@
import { PipelinePlugin } from "../../pipeline/common";
import { AutorestContext } from "../../context";
import { DataSource, DataSink, QuickDataSource } from "@azure-tools/datastore";
import { identitySourceMapping } from "@autorest/common";
import { DataSource, DataSink, QuickDataSource } from "@azure-tools/datastore";
import { uniqBy } from "lodash";
import { AutorestContext } from "../../context";
import { PipelinePlugin } from "../../pipeline/common";
/**
* Add the given suffix to the given filename before the file extension.

Просмотреть файл

@ -1,7 +1,9 @@
import { QuickDataSource } from "@azure-tools/datastore";
import { createAllOfCleaner } from "./allof-cleaner";
import { createCommandPlugin } from "./command";
import { createComponentKeyRenamerPlugin } from "./component-key-renamer";
import { createComponentModifierPlugin } from "./component-modifier";
import { createComponentsCleanerPlugin } from "./components-cleaner";
import { createSwaggerToOpenApi3Plugin } from "./conversion";
import { createDeduplicatorPlugin } from "./deduplicator";
@ -16,8 +18,12 @@ import {
} from "./identity";
import { createOpenApiLoaderPlugin, createSwaggerLoaderPlugin } from "./loaders";
import { createMultiApiMergerPlugin } from "./merger";
import { createCSharpReflectApiVersionPlugin } from "./metadata-generation";
import { createNewComposerPlugin } from "./new-composer";
import { createOpenAPIStatsCollectorPlugin } from "./openapi-stats-collector";
import { createProfileFilterPlugin } from "./profile-filter";
import { createOpenApiSchemaValidatorPlugin, createSwaggerSchemaValidatorPlugin } from "./schema-validation";
import { createSemanticValidationPlugin } from "./semantics-validation";
import { subsetSchemaDeduplicatorPlugin } from "./subset-schemas-deduplicator";
import {
createImmediateTransformerPlugin,
@ -27,12 +33,6 @@ import {
} from "./transformer";
import { createTreeShakerPlugin } from "./tree-shaker/tree-shaker";
import { createApiVersionParameterHandlerPlugin } from "./version-param-handler";
import { createOpenApiSchemaValidatorPlugin, createSwaggerSchemaValidatorPlugin } from "./schema-validation";
import { createOpenAPIStatsCollectorPlugin } from "./openapi-stats-collector";
import { QuickDataSource } from "@azure-tools/datastore";
import { createCSharpReflectApiVersionPlugin } from "./metadata-generation";
import { createComponentModifierPlugin } from "./component-modifier";
import { createSemanticValidationPlugin } from "./semantics-validation";
export const CORE_PLUGIN_MAP = {
help: createHelpPlugin(),

Просмотреть файл

@ -1,8 +1,8 @@
import { IAutorestLogger } from "@autorest/common";
import { createMockLogger } from "@autorest/test-utils";
import { DataStore, IFileSystem, RealFileSystem } from "@azure-tools/datastore";
import { createFolderUri, resolveUri } from "@azure-tools/uri";
import { AppRoot } from "../../constants";
import { createMockLogger } from "@autorest/test-utils";
import { IAutorestLogger } from "@autorest/common";
import { loadOpenAPIFiles } from "./openapi-loader";
describe("SwaggerLoading", () => {

Просмотреть файл

@ -1,8 +1,8 @@
import { PipelinePlugin } from "../../pipeline/common";
import { IAutorestLogger } from "@autorest/common";
import { DataHandle, DataSink, DataSource, QuickDataSource } from "@azure-tools/datastore";
import { PipelinePlugin } from "../../pipeline/common";
import { crawlReferences } from "../ref-crawling";
import { checkSyntaxFromData } from "./common";
import { IAutorestLogger } from "@autorest/common";
interface OpenAPI3Spec {
openapi?: string;

Просмотреть файл

@ -1,9 +1,9 @@
import { IAutorestLogger } from "@autorest/common";
import { createMockLogger } from "@autorest/test-utils";
import { DataStore, IFileSystem, RealFileSystem } from "@azure-tools/datastore";
import { createFolderUri, resolveUri } from "@azure-tools/uri";
import { loadSwaggerFiles } from "./swagger-loader";
import { AppRoot } from "../../constants";
import { createMockLogger } from "@autorest/test-utils";
import { IAutorestLogger } from "@autorest/common";
import { loadSwaggerFiles } from "./swagger-loader";
describe("SwaggerLoading", () => {
let dataStore: DataStore;

Просмотреть файл

@ -1,8 +1,8 @@
import { PipelinePlugin } from "../../pipeline/common";
import { IAutorestLogger } from "@autorest/common";
import { DataHandle, DataSink, DataSource, QuickDataSource } from "@azure-tools/datastore";
import { PipelinePlugin } from "../../pipeline/common";
import { crawlReferences } from "../ref-crawling";
import { checkSyntaxFromData } from "./common";
import { IAutorestLogger } from "@autorest/common";
export async function loadSwaggerFiles(
logger: IAutorestLogger,

Просмотреть файл

@ -1,3 +1,5 @@
import { URL } from "url";
import { isDefined } from "@autorest/common";
import {
AnyObject,
DataHandle,
@ -11,11 +13,9 @@ import {
} from "@azure-tools/datastore";
import { walk } from "@azure-tools/json";
import * as oai from "@azure-tools/openapi";
import { cloneDeep } from "lodash";
import { AutorestContext } from "../context";
import { PipelinePlugin } from "../pipeline/common";
import { URL } from "url";
import { isDefined } from "@autorest/common";
import { cloneDeep } from "lodash";
/**
* Takes multiple input OAI3 files and creates one merged one.

Просмотреть файл

@ -1,3 +1,4 @@
import { maximum, toSemver } from "@azure-tools/codegen";
import {
AnyObject,
DataSink,
@ -9,10 +10,9 @@ import {
visit,
} from "@azure-tools/datastore";
import { areSimilar } from "@azure-tools/object-comparison";
import { PipelinePlugin } from "../pipeline/common";
import { maximum, toSemver } from "@azure-tools/codegen";
import compareVersions from "compare-versions";
import { AutorestContext } from "../context";
import { PipelinePlugin } from "../pipeline/common";
/**
* Prepares an OpenAPI document for the generation-2 code generators

Просмотреть файл

@ -1,7 +1,7 @@
import { DataSource } from "@azure-tools/datastore";
import * as oai3 from "@azure-tools/openapi";
import { AutorestContext } from "../../context";
import { PipelinePlugin } from "../../pipeline/common";
import * as oai3 from "@azure-tools/openapi";
export async function collectOpenAPIStats(context: AutorestContext, dataSource: DataSource) {
const inputs = await dataSource.enum();

Просмотреть файл

@ -2,14 +2,14 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { DataHandle } from "@azure-tools/datastore";
import { OperationAbortedException } from "@autorest/common";
import { DataHandle } from "@azure-tools/datastore";
import { AutorestContext } from "../../context";
import { Channel } from "../../message";
import { createPerFilePlugin, PipelinePlugin } from "../../pipeline/common";
import { AutorestContext } from "../../context";
import { SwaggerSchemaValidator } from "./swagger-schema-validator";
import { OpenApi3SchemaValidator } from "./openapi3-schema-validator";
import { ValidationError } from "./json-schema-validator";
import { OpenApi3SchemaValidator } from "./openapi3-schema-validator";
import { SwaggerSchemaValidator } from "./swagger-schema-validator";
export const SCHEMA_VIOLATION_ERROR_CODE = "schema_violation";

Просмотреть файл

@ -1,7 +1,7 @@
import { createDataHandle } from "@autorest/test-utils";
import { DataHandle } from "@azure-tools/datastore";
import { omit } from "lodash";
import { SwaggerSchemaValidator } from "./swagger-schema-validator";
import { createDataHandle } from "@autorest/test-utils";
const baseSwaggerSpec = {
swagger: "2.0",
info: {

Просмотреть файл

@ -1,11 +1,11 @@
import { PipelinePlugin } from "../../pipeline/common";
import oai3, { dereference, Refable } from "@azure-tools/openapi";
import { validateOpenAPISemantics } from "./semantics-validation";
import { DataHandle } from "@azure-tools/datastore";
import { AutorestContext } from "../../context";
import util from "util";
import { SemanticError } from "./types";
import { DataHandle } from "@azure-tools/datastore";
import { JsonRef, parseJsonRef, stringifyJsonRef } from "@azure-tools/jsonschema";
import oai3, { dereference, Refable } from "@azure-tools/openapi";
import { AutorestContext } from "../../context";
import { PipelinePlugin } from "../../pipeline/common";
import { validateOpenAPISemantics } from "./semantics-validation";
import { SemanticError } from "./types";
export function createSemanticValidationPlugin(): PipelinePlugin {
return async (context, input, sink) => {

Просмотреть файл

@ -1,5 +1,5 @@
import { ResolveReferenceFn, SemanticError, SemanticErrorCodes } from "../types";
import oai3, { ParameterLocation, Refable } from "@azure-tools/openapi";
import { ResolveReferenceFn, SemanticError, SemanticErrorCodes } from "../types";
import { createReferenceResolver } from "../utils";
export const PATH_TEMPLATES_REGEX = /\{(.*?)\}/g;

Просмотреть файл

@ -1,3 +1,4 @@
import { maximum, gt, lt } from "@azure-tools/codegen";
import {
AnyObject,
DataHandle,
@ -13,7 +14,6 @@ import { areSimilar } from "@azure-tools/object-comparison";
import * as oai from "@azure-tools/openapi";
import { AutorestContext } from "../context";
import { PipelinePlugin } from "../pipeline/common";
import { maximum, gt, lt } from "@azure-tools/codegen";
/* eslint-disable @typescript-eslint/no-use-before-define */

Просмотреть файл

@ -3,14 +3,14 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ResolvedDirective, resolveDirectives } from "@autorest/configuration";
import { DataHandle, DataSink, nodes } from "@azure-tools/datastore";
import { YieldCPU } from "@azure-tools/tasks";
import { scrypt } from "node:crypto";
import { AutorestContext } from "../../autorest-core";
import { Channel, Message, SourceLocation } from "../../message";
import { manipulateObject } from "./object-manipulator";
import { evalDirectiveTest, evalDirectiveTransform } from "./eval";
import { ResolvedDirective, resolveDirectives } from "@autorest/configuration";
import { scrypt } from "node:crypto";
import { manipulateObject } from "./object-manipulator";
export class Manipulator {
private transformations: ResolvedDirective[];

Просмотреть файл

@ -2,9 +2,8 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { DataStore } from "@azure-tools/datastore";
import { DataStore, createSandbox } from "@azure-tools/datastore";
import { manipulateObject } from "./object-manipulator";
import { createSandbox } from "@azure-tools/datastore";
const safeEval = createSandbox();

Просмотреть файл

@ -3,6 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { inspect } from "util";
import { identitySourceMapping } from "@autorest/common";
import { DataHandle, DataSink, IsPrefix, JsonPath, nodes, PathPosition } from "@azure-tools/datastore";
import {
stringifyYamlAst,
@ -13,10 +15,8 @@ import {
getYamlNodeByPath,
replaceYamlAstNode,
} from "@azure-tools/yaml";
import { AutorestContext } from "../../autorest-core";
import { identitySourceMapping } from "@autorest/common";
import { inspect } from "util";
import { cloneDeep } from "lodash";
import { AutorestContext } from "../../autorest-core";
export async function manipulateObject(
src: DataHandle,

Просмотреть файл

@ -1,8 +1,8 @@
import { QuickDataSource, DataHandle, AnyObject, selectNodes } from "@azure-tools/datastore";
import { createPerFilePlugin, PipelinePlugin } from "../../pipeline/common";
import { Manipulator } from "./manipulation";
import { Channel } from "../../message";
import { createPerFilePlugin, PipelinePlugin } from "../../pipeline/common";
import { evalDirectiveTransform } from "./eval";
import { Manipulator } from "./manipulation";
/* @internal */
export function createGraphTransformerPlugin(): PipelinePlugin {

Просмотреть файл

@ -1,4 +1,5 @@
/* eslint-disable no-useless-escape */
import { createHash } from "crypto";
import {
AnyObject,
DataHandle,
@ -10,13 +11,12 @@ import {
JsonPath,
Source,
} from "@azure-tools/datastore";
import { parseJsonPointer } from "@azure-tools/json";
import { includeXDashProperties } from "@azure-tools/openapi";
import { partition } from "lodash";
import { AutorestContext } from "../../context";
import { PipelinePlugin } from "../../pipeline/common";
import { createHash } from "crypto";
import { SchemaStats } from "../../stats";
import { includeXDashProperties } from "@azure-tools/openapi";
import { parseJsonPointer } from "@azure-tools/json";
import { partition } from "lodash";
/**
* parses a json pointer, and inserts a string into the returned array

Просмотреть файл

@ -59,6 +59,7 @@
"eslint-plugin-node": "~11.1.0",
"eslint-plugin-prettier": "~3.4.0",
"eslint-plugin-unicorn": "~33.0.1",
"eslint-plugin-import": "~2.24.2",
"eslint": "^7.17.0",
"jest": "^27.0.4",
"lodash": "~4.17.20",

Просмотреть файл

@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { serialize } from "@azure-tools/codegen";
import { Host, startSession } from "@autorest/extension-base";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
import { Host, startSession } from "@autorest/extension-base";
import { serialize } from "@azure-tools/codegen";
import { Checker } from "./checker";
export async function processRequest(host: Host) {

Просмотреть файл

@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { serialize } from "@azure-tools/codegen";
import { Host, startSession } from "@autorest/extension-base";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
import { Host, startSession } from "@autorest/extension-base";
import { serialize } from "@azure-tools/codegen";
import { Example } from "./example";
export async function processRequest(host: Host) {

Просмотреть файл

@ -12,8 +12,8 @@ import {
Request,
} from "@autorest/codemodel";
import { Session } from "@autorest/extension-base";
import { isDefined } from "../utils";
import { ModelerFourOptions } from "../modeler/modelerfour-options";
import { isDefined } from "../utils";
const xmsThreshold = "x-ms-payload-flattening-threshold";
const xmsFlatten = "x-ms-client-flatten";

Просмотреть файл

@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { serialize } from "@azure-tools/codegen";
import { Host, startSession } from "@autorest/extension-base";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
import { Host, startSession } from "@autorest/extension-base";
import { serialize } from "@azure-tools/codegen";
import { Flattener } from "./flattener";
export async function processRequest(host: Host) {

Просмотреть файл

@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { serialize } from "@azure-tools/codegen";
import { Host, startSession } from "@autorest/extension-base";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
import { Host, startSession } from "@autorest/extension-base";
import { serialize } from "@azure-tools/codegen";
import { Grouper } from "./grouper";
export async function processRequest(host: Host) {

Просмотреть файл

@ -1,10 +1,10 @@
import "source-map-support/register";
import { AutoRestExtension } from "@autorest/extension-base";
import { processRequest as modelerfour } from "./modeler/plugin-modelerfour";
import { processRequest as preNamer } from "./prenamer/plugin-prenamer";
import { processRequest as checker } from "./checker/plugin-checker";
import { processRequest as flattener } from "./flattener/plugin-flattener";
import { processRequest as grouper } from "./grouper/plugin-grouper";
import { processRequest as checker } from "./checker/plugin-checker";
import { processRequest as modelerfour } from "./modeler/plugin-modelerfour";
import { processRequest as preNamer } from "./prenamer/plugin-prenamer";
import { processRequest as prechecker } from "./quality-precheck/prechecker";
export async function initializePlugins(pluginHost: AutoRestExtension) {

Просмотреть файл

@ -2,8 +2,8 @@ import { Session } from "@autorest/extension-base";
import { knownMediaType, KnownMediaType } from "@azure-tools/codegen";
import * as OpenAPI from "@azure-tools/openapi";
import { dereference, Dereferenced } from "@azure-tools/openapi";
import { isSchemaBinary } from "./schema-utils";
import { groupBy } from "lodash";
import { isSchemaBinary } from "./schema-utils";
export interface KnownMediaTypeGroupItem {
mediaType: string;

Просмотреть файл

@ -1,5 +1,3 @@
import { Session } from "@autorest/extension-base";
import * as OpenAPI from "@azure-tools/openapi";
import {
ChoiceSchema,
XmlSerlializationFormat,
@ -9,6 +7,9 @@ import {
ChoiceValue,
SetType,
} from "@autorest/codemodel";
import { Session } from "@autorest/extension-base";
import { getPascalIdentifier } from "@azure-tools/codegen";
import * as OpenAPI from "@azure-tools/openapi";
import {
StringFormat,
JsonType,
@ -16,7 +17,6 @@ import {
includeXDashKeys,
includeXDashProperties,
} from "@azure-tools/openapi";
import { getPascalIdentifier } from "@azure-tools/codegen";
import { keyBy } from "lodash";
export interface XMSEnum {
modelAsString?: boolean;

Просмотреть файл

@ -1,17 +1,3 @@
import {
Model as oai3,
Dereferenced,
dereference,
Refable,
JsonType,
IntegerFormat,
StringFormat,
NumberFormat,
MediaType,
omitXDashProperties,
} from "@azure-tools/openapi";
import { uniq, every } from "lodash";
import * as OpenAPI from "@azure-tools/openapi";
import {
HttpMethod,
HttpModel,
@ -73,14 +59,28 @@ import {
AnyObjectSchema,
} from "@autorest/codemodel";
import { Session, Channel } from "@autorest/extension-base";
import { Interpretations, XMSEnum } from "./interpretations";
import { fail, minimum, pascalCase, KnownMediaType } from "@azure-tools/codegen";
import { ModelerFourOptions } from "./modelerfour-options";
import { isContentTypeParameterDefined } from "./utils";
import {
Model as oai3,
Dereferenced,
dereference,
Refable,
JsonType,
IntegerFormat,
StringFormat,
NumberFormat,
MediaType,
omitXDashProperties,
} from "@azure-tools/openapi";
import * as OpenAPI from "@azure-tools/openapi";
import { uniq, every } from "lodash";
import { isDefined } from "../utils";
import { BodyProcessor } from "./body-processor";
import { Interpretations, XMSEnum } from "./interpretations";
import { ModelerFourOptions } from "./modelerfour-options";
import { isSchemaAnEnum, isSchemaBinary } from "./schema-utils";
import { SecurityProcessor } from "./security-processor";
import { isDefined } from "../utils";
import { isContentTypeParameterDefined } from "./utils";
/** adds only if the item is not in the collection already
*

Просмотреть файл

@ -3,11 +3,11 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { deserialize, serialize } from "@azure-tools/codegen";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
import { Host, startSession } from "@autorest/extension-base";
import { deserialize, serialize } from "@azure-tools/codegen";
import * as OpenAPI from "@azure-tools/openapi";
import { ModelerFour } from "./modelerfour";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
export async function processRequest(host: Host) {
const debug = (await host.GetValue("debug")) || false;

Просмотреть файл

@ -1,8 +1,8 @@
import { createTestSessionFromModel } from "../../test/utils";
import { SecurityProcessor } from "./security-processor";
import oai3, { ParameterLocation, SecurityType } from "@azure-tools/openapi";
import { Interpretations } from "./interpretations";
import { AADTokenSecurityScheme, AzureKeySecurityScheme } from "@autorest/codemodel";
import oai3, { ParameterLocation, SecurityType } from "@azure-tools/openapi";
import { createTestSessionFromModel } from "../../test/utils";
import { Interpretations } from "./interpretations";
import { SecurityProcessor } from "./security-processor";
const baseOpenapiSpec = {
openApi: "3.0.0",

Просмотреть файл

@ -1,6 +1,6 @@
import { Languages } from "@autorest/codemodel";
import { removeSequentialDuplicates, fixLeadingNumber, deconstruct, Style, Styler } from "@azure-tools/codegen";
import { Session } from "@autorest/extension-base";
import { removeSequentialDuplicates, fixLeadingNumber, deconstruct, Style, Styler } from "@azure-tools/codegen";
export function getNameOptions(typeName: string, components: Array<string>) {
const result = new Set<string>();

Просмотреть файл

@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { serialize } from "@azure-tools/codegen";
import { Host, startSession } from "@autorest/extension-base";
import { codeModelSchema, CodeModel } from "@autorest/codemodel";
import { Host, startSession } from "@autorest/extension-base";
import { serialize } from "@azure-tools/codegen";
import { PreNamer } from "./prenamer";
export async function processRequest(host: Host) {

Просмотреть файл

@ -17,9 +17,9 @@ import {
} from "@autorest/codemodel";
import { Session } from "@autorest/extension-base";
import { selectName, Style } from "@azure-tools/codegen";
import { partition } from "lodash";
import { ModelerFourOptions } from "../modeler/modelerfour-options";
import { getNameOptions, isUnassigned, ScopeNamer, setName, setNameAllowEmpty } from "./naming-utils";
import { partition } from "lodash";
export class PreNamer {
codeModel: CodeModel;

Просмотреть файл

@ -1,4 +1,6 @@
import { Session } from "@autorest/extension-base";
import { Session, Host, startSession } from "@autorest/extension-base";
import { serialize } from "@azure-tools/codegen";
import {
Model as oai3,
Refable,
@ -9,11 +11,9 @@ import {
StringFormat,
} from "@azure-tools/openapi";
import { serialize } from "@azure-tools/codegen";
import { Host, startSession } from "@autorest/extension-base";
import { getDiff } from "recursive-diff";
import { Interpretations } from "../modeler/interpretations";
import { getDiff } from "recursive-diff";
import { ModelerFourOptions } from "../modeler/modelerfour-options";
import { DuplicateSchemaMerger } from "./duplicate-schema-merger";

Просмотреть файл

@ -1,7 +1,7 @@
import { CodeModel } from "@autorest/codemodel";
import { Model } from "@azure-tools/openapi";
import { ModelerFour } from "../../src/modeler/modelerfour";
import { ModelerFourOptions } from "modeler/modelerfour-options";
import { ModelerFour } from "../../src/modeler/modelerfour";
import { createTestSessionFromModel } from "../utils";
const modelerfourOptions: ModelerFourOptions = {

Просмотреть файл

@ -1,12 +1,12 @@
/* eslint-disable jest/no-standalone-expect */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import assert from "assert";
import { CodeModel, DictionarySchema, HttpHeader, Operation, Parameter, SealedChoiceSchema } from "@autorest/codemodel";
import { HttpOperation, JsonType, ParameterLocation, RequestBody } from "@azure-tools/openapi";
import * as oai3 from "@azure-tools/openapi";
import { addOperation, createTestSpec, findByName } from "../utils";
import { runModeler } from "./modelerfour-utils";
import * as oai3 from "@azure-tools/openapi";
import assert from "assert";
async function runModelerWithOperation(
method: string,

Просмотреть файл

@ -1,6 +1,6 @@
import assert from "assert";
import { ChoiceSchema, ConstantSchema, SealedChoiceSchema } from "@autorest/codemodel";
import { JsonType } from "@azure-tools/openapi";
import assert from "assert";
import { addSchema, assertSchema, createTestSpec, findByName } from "../utils";
import { runModeler } from "./modelerfour-utils";

Просмотреть файл

@ -1,9 +1,9 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { addSchema, createTestSessionFromModel, createTestSpec } from "../utils";
import { QualityPreChecker } from "../../src/quality-precheck/prechecker";
import assert from "assert";
import { Model, Refable, Dereferenced, dereference, Schema } from "@azure-tools/openapi";
import { ModelerFourOptions } from "modeler/modelerfour-options";
import assert from "assert";
import { QualityPreChecker } from "../../src/quality-precheck/prechecker";
import { addSchema, createTestSessionFromModel, createTestSpec } from "../utils";
class PreCheckerClient {
private constructor(private input: Model, public result: Model) {}

Просмотреть файл

@ -1,9 +1,9 @@
import { createTestSessionFromFiles } from "../utils";
import { ModelerFour } from "../../src/modeler/modelerfour";
import { readdirSync } from "fs";
import { codeModelSchema } from "@autorest/codemodel";
import { serialize } from "@azure-tools/codegen";
import { Model } from "@azure-tools/openapi";
import { codeModelSchema } from "@autorest/codemodel";
import { ModelerFour } from "../../src/modeler/modelerfour";
import { createTestSessionFromFiles } from "../utils";
const cfg = {
modelerfour: {

Просмотреть файл

@ -1,6 +1,6 @@
import { Session, startSession } from "@autorest/extension-base";
import { readFile } from "@azure-tools/async-io";
import { deserialize, fail } from "@azure-tools/codegen";
import { Session, startSession } from "@autorest/extension-base";
import { Model } from "@azure-tools/openapi";
export interface TestSessionInput {

Просмотреть файл

@ -46,6 +46,7 @@
"eslint-plugin-node": "~11.1.0",
"eslint-plugin-prettier": "~3.4.0",
"eslint-plugin-unicorn": "~33.0.1",
"eslint-plugin-import": "~2.24.2",
"eslint": "^7.17.0",
"jest": "^27.0.4",
"rimraf": "^3.0.2",

Просмотреть файл

@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { isDirectory, isFile, readdir } from "@azure-tools/async-io";
import { spawn } from "child_process";
import * as path from "path";
import { isDirectory, isFile, readdir } from "@azure-tools/async-io";
export function cmdlineToArray(
text: string,

Просмотреть файл

@ -3,8 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as aio from "@azure-tools/async-io";
import { join } from "path";
import * as aio from "@azure-tools/async-io";
function getAllPropertyNames(obj: any) {
const props = new Array<string>();

Просмотреть файл

@ -44,6 +44,7 @@
"eslint-plugin-node": "~11.1.0",
"eslint-plugin-prettier": "~3.4.0",
"eslint-plugin-unicorn": "~33.0.1",
"eslint-plugin-import": "~2.24.2",
"eslint": "^7.17.0",
"glob": "~7.1.4",
"rimraf": "^3.0.2",

Просмотреть файл

@ -1,8 +1,8 @@
import { DeepPartial } from "@azure-tools/codegen";
import { ApiVersions } from "./api-version";
import { Deprecation } from "./deprecation";
import { ExternalDocumentation } from "./external-documentation";
import { Metadata } from "./metadata";
import { DeepPartial } from "@azure-tools/codegen";
/** the base interface that represents an aspect of the model. */
export interface Aspect extends Metadata {

Просмотреть файл

@ -1,9 +1,9 @@
import { Metadata } from "./metadata";
import { Schemas } from "./schemas";
import { Info } from "./info";
import { OperationGroup } from "./operation";
import { DeepPartial, enableSourceTracking } from "@azure-tools/codegen";
import { Info } from "./info";
import { Metadata } from "./metadata";
import { OperationGroup } from "./operation";
import { Parameter } from "./parameter";
import { Schemas } from "./schemas";
import { Security } from "./security";
/** the model that contains all the information required to generate a service api */

Просмотреть файл

@ -1,6 +1,6 @@
import { Initializer, DeepPartial } from "@azure-tools/codegen";
import { Extensions } from "./extensions";
import { uri } from "./uri";
import { Initializer, DeepPartial } from "@azure-tools/codegen";
/** a reference to external documentation */
export interface ExternalDocumentation extends Extensions {

Просмотреть файл

@ -3,10 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Extensions } from "./extensions";
import { uri } from "./uri";
import { ExternalDocumentation } from "./external-documentation";
import { Initializer, DeepPartial } from "@azure-tools/codegen";
import { Extensions } from "./extensions";
import { ExternalDocumentation } from "./external-documentation";
import { uri } from "./uri";
export type email = string;

Просмотреть файл

@ -1,8 +1,8 @@
import { Initializer, DeepPartial } from "@azure-tools/codegen";
import { SetType } from "../../tag";
import { Extensions } from "./extensions";
import { Languages } from "./languages";
import { Protocols } from "./protocols";
import { Initializer, DeepPartial } from "@azure-tools/codegen";
import { SetType } from "../../tag";
/** common pattern for Metadata on aspects */
export interface Metadata extends Extensions {

Просмотреть файл

@ -1,9 +1,9 @@
import { DeepPartial } from "@azure-tools/codegen";
import { ApiVersion } from "./api-version";
import { Aspect } from "./aspect";
import { Metadata } from "./metadata";
import { Parameter, ImplementationLocation } from "./parameter";
import { Response } from "./response";
import { Metadata } from "./metadata";
import { Aspect } from "./aspect";
import { ApiVersion } from "./api-version";
import { DeepPartial } from "@azure-tools/codegen";
import { SchemaType } from "./schema-type";
/** represents a single callable endpoint with a discrete set of inputs, and any number of output possibilities (responses or exceptions) */

Просмотреть файл

@ -3,10 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Value } from "./value";
import { DeepPartial } from "@azure-tools/codegen";
import { Schema } from "./schema";
import { Property } from "./property";
import { Schema } from "./schema";
import { Value } from "./value";
export enum ImplementationLocation {
/** should be exposed as a method parameter in the operation */

Просмотреть файл

@ -1,8 +1,8 @@
import { Initializer, DeepPartial } from "@azure-tools/codegen";
import { Schema } from "./schema";
import { uid } from "./uid";
import { Initializer, DeepPartial } from "@azure-tools/codegen";
import { Value } from "./value";
import { Schema } from "./schema";
/** a property is a child value in an object */
export interface Property extends Value {

Просмотреть файл

@ -1,6 +1,6 @@
import { Initializer, DeepPartial } from "@azure-tools/codegen";
import { Metadata } from "./metadata";
import { Schema } from "./schema";
import { Initializer, DeepPartial } from "@azure-tools/codegen";
/** a response from a service. */
export interface Response extends Metadata {}

Просмотреть файл

@ -1,9 +1,9 @@
import { Aspect } from "./aspect";
import { SerializationFormats } from "./formats";
import { AllSchemaTypes } from "./schema-type";
import { DeepPartial } from "@azure-tools/codegen";
import { Aspect } from "./aspect";
import { Extensions } from "./extensions";
import { SerializationFormats } from "./formats";
import { Languages } from "./languages";
import { AllSchemaTypes } from "./schema-type";
export interface SerializationFormat extends Extensions, Record<string, any> {}

Просмотреть файл

@ -1,21 +1,21 @@
import { ChoiceSchema, SealedChoiceSchema } from "./schemas/choice";
import { finished } from "stream";
import { camelCase } from "@azure-tools/codegen";
import { Schema, PrimitiveSchema } from "./schema";
import { SchemaType } from "./schema-type";
import { AnyObjectSchema, AnySchema } from "./schemas/any";
import { ArraySchema, ByteArraySchema } from "./schemas/array";
import { BinarySchema } from "./schemas/binary";
import { ChoiceSchema, SealedChoiceSchema } from "./schemas/choice";
import { ConditionalSchema, SealedConditionalSchema } from "./schemas/conditional";
import { ConstantSchema } from "./schemas/constant";
import { DictionarySchema } from "./schemas/dictionary";
import { BooleanSchema, CharSchema } from "./schemas/primitive";
import { FlagSchema } from "./schemas/flag";
import { NumberSchema } from "./schemas/number";
import { ObjectSchema, GroupSchema } from "./schemas/object";
import { BooleanSchema, CharSchema } from "./schemas/primitive";
import { OrSchema, XorSchema } from "./schemas/relationship";
import { StringSchema, UuidSchema, UriSchema, CredentialSchema, ODataQuerySchema } from "./schemas/string";
import { UnixTimeSchema, DateSchema, DateTimeSchema, DurationSchema, TimeSchema } from "./schemas/time";
import { Schema, PrimitiveSchema } from "./schema";
import { ConditionalSchema, SealedConditionalSchema } from "./schemas/conditional";
import { FlagSchema } from "./schemas/flag";
import { ConstantSchema } from "./schemas/constant";
import { OrSchema, XorSchema } from "./schemas/relationship";
import { BinarySchema } from "./schemas/binary";
import { finished } from "stream";
import { AnyObjectSchema, AnySchema } from "./schemas/any";
export { SchemaUsage, SchemaContext } from "./schemas/usage";

Просмотреть файл

@ -1,6 +1,6 @@
import { DeepPartial } from "@azure-tools/codegen";
import { Schema } from "../schema";
import { SchemaType } from "../schema-type";
import { DeepPartial } from "@azure-tools/codegen";
export interface AnySchema extends Schema {}

Просмотреть файл

@ -1,6 +1,6 @@
import { DeepPartial } from "@azure-tools/codegen";
import { Schema, ValueSchema } from "../schema";
import { SchemaType } from "../schema-type";
import { DeepPartial } from "@azure-tools/codegen";
/** a Schema that represents and array of values */
export interface ArraySchema<ElementType extends Schema = Schema> extends ValueSchema {

Просмотреть файл

@ -1,5 +1,5 @@
import { Schema } from "../schema";
import { DeepPartial } from "@azure-tools/codegen";
import { Schema } from "../schema";
import { SchemaType } from "../schema-type";
export interface BinarySchema extends Schema {}

Просмотреть файл

@ -1,9 +1,9 @@
import { SchemaType } from "../schema-type";
import { PrimitiveSchema, ValueSchema, Schema } from "../schema";
import { Languages } from "../languages";
import { Extensions } from "../extensions";
import { StringSchema } from "./string";
import { Initializer, DeepPartial } from "@azure-tools/codegen";
import { Extensions } from "../extensions";
import { Languages } from "../languages";
import { PrimitiveSchema, ValueSchema, Schema } from "../schema";
import { SchemaType } from "../schema-type";
import { StringSchema } from "./string";
/** a schema that represents a choice of several values (ie, an 'enum') */
export interface ChoiceSchema<ChoiceType extends PrimitiveSchema = StringSchema> extends ValueSchema {

Просмотреть файл

@ -1,10 +1,10 @@
import { SchemaType } from "../schema-type";
import { PrimitiveSchema, ValueSchema, Schema } from "../schema";
import { Languages } from "../languages";
import { Extensions } from "../extensions";
import { StringSchema } from "./string";
import { Initializer, DeepPartial } from "@azure-tools/codegen";
import { Extensions } from "../extensions";
import { Languages } from "../languages";
import { PrimitiveSchema, ValueSchema, Schema } from "../schema";
import { SchemaType } from "../schema-type";
import { Value } from "../value";
import { StringSchema } from "./string";
/** a schema that represents a value dependent on another */
export interface ConditionalSchema<ConditionalType extends PrimitiveSchema = StringSchema> extends ValueSchema {

Просмотреть файл

@ -1,8 +1,8 @@
import { SchemaType } from "../schema-type";
import { Schema, ValueSchema } from "../schema";
import { Languages } from "../languages";
import { Extensions } from "../extensions";
import { Initializer, DeepPartial } from "@azure-tools/codegen";
import { Extensions } from "../extensions";
import { Languages } from "../languages";
import { Schema, ValueSchema } from "../schema";
import { SchemaType } from "../schema-type";
/** a container for the actual constant value */
export interface ConstantValue extends Extensions {

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше