diff --git a/package-lock.json b/package-lock.json index 71a9ecf5a4..5a1c79deba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,45 +4,53 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@autorest/extension-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@autorest/extension-base/-/extension-base-3.1.0.tgz", - "integrity": "sha512-LHSLvPDG0uoMsOmzh0wOtxHu0dvoTaqDRJkgJVAZFVz4VfLocXhFActkwQ31yoB0IO7phZnuvcG8NcvKObURAQ==", + "@autorest/codemodel": { + "version": "4.14.5", + "resolved": "https://registry.npmjs.org/@autorest/codemodel/-/codemodel-4.14.5.tgz", + "integrity": "sha512-x2fOQlBTuHige4aWe+df2btDaPH+nrSheb4qbaqow+QCh5b/A5NPK1voGSp8vZJ5QkkNE06xNrfRIdSatBB3/Q==", "requires": { - "@azure-tools/codegen": "~2.5.0", - "js-yaml": "3.13.1", - "vscode-jsonrpc": "^3.5.0" + "@azure-tools/codegen": "~2.5.293", + "@azure-tools/linq": "~3.1.0", + "js-yaml": "~4.0.0" }, "dependencies": { - "@azure-tools/async-io": { - "version": "3.0.253", - "resolved": "https://registry.npmjs.org/@azure-tools/async-io/-/async-io-3.0.253.tgz", - "integrity": "sha512-5Zo6Sr7ttnh6vaDhG1ESycJtOKzJCxo+bdJ68dmGgU/czm2HDptjKcVvenNuJNeWpvf0DmklXQDXZIkg11swzw==", + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "js-yaml": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", "requires": { - "@azure-tools/tasks": "~3.0.253", - "proper-lockfile": "~2.0.1" + "argparse": "^2.0.1" } + } + } + }, + "@autorest/extension-base": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@autorest/extension-base/-/extension-base-3.2.0.tgz", + "integrity": "sha512-/E9Mca2cB+ssTG08P72DOSU4hR/4BPtDEfvPuC61WUYtAPFIv4wG4D75QCLD+gixZsryEZvBGkj4Q0YyE1N87A==", + "requires": { + "@azure-tools/codegen": "~2.5.293", + "js-yaml": "~4.0.0", + "vscode-jsonrpc": "^3.5.0" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, - "@azure-tools/codegen": { - "version": "2.5.292", - "resolved": "https://registry.npmjs.org/@azure-tools/codegen/-/codegen-2.5.292.tgz", - "integrity": "sha512-UU9/OgJfd+br9C/M9R8k2r+pyWtanRfl/u865BvkX3yBbMLbDsj12QP/AcY3MoC40rHpWYUJVTBDB84X3zIiIw==", + "js-yaml": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", "requires": { - "@azure-tools/async-io": "~3.0.253", - "@azure-tools/linq": "~3.1.262", - "js-yaml": "3.13.1", - "semver": "^5.5.1" + "argparse": "^2.0.1" } - }, - "@azure-tools/linq": { - "version": "3.1.262", - "resolved": "https://registry.npmjs.org/@azure-tools/linq/-/linq-3.1.262.tgz", - "integrity": "sha512-7ctcSXYoGkTvWahsgnHh50D8+nT4hF6h+benQUKDQWdQHUFiV14QvLmGbPqux4Yp57OcX1NOwqKeA6JQDWsEuQ==" - }, - "@azure-tools/tasks": { - "version": "3.0.253", - "resolved": "https://registry.npmjs.org/@azure-tools/tasks/-/tasks-3.0.253.tgz", - "integrity": "sha512-ViYOxgal9iukwbebZUpj5hEnT6OjSLDFItqPXYfMkntm7BCM1OQbBVo49KMBqOyCu6o+M5EVC7KF8SldL3oGtg==" } } }, @@ -55,30 +63,14 @@ "wiremock": "2.25.0" } }, - "@azure-tools/async-io": { - "version": "3.0.247", - "resolved": "https://registry.npmjs.org/@azure-tools/async-io/-/async-io-3.0.247.tgz", - "integrity": "sha512-fbeLs77iNRjn30CEGHTOFWQdhTKJAkU+f+HPSz85Z9zg41Qu6oP77X1ZSbgQvTGO2Yq/88cn2QqRIs/myO9aLQ==", - "requires": { - "@azure-tools/tasks": "~3.0.247", - "proper-lockfile": "~2.0.1" - }, - "dependencies": { - "@azure-tools/tasks": { - "version": "3.0.247", - "resolved": "https://registry.npmjs.org/@azure-tools/tasks/-/tasks-3.0.247.tgz", - "integrity": "sha512-H9p+of/QnEIcT0Ea2mSz2MSt4eaTPm86ZpipLRsJoizafUKWmbCoG00awQxPRoIN/9ebVmqFPJ2eb4exs6G6AA==" - } - } - }, "@azure-tools/codegen": { - "version": "2.4.267", - "resolved": "https://registry.npmjs.org/@azure-tools/codegen/-/codegen-2.4.267.tgz", - "integrity": "sha512-8ek/CWqZ0VdLNqhX5jKroF+aw9q/XudmL6UIx+HPKBPPtYQIRiQzLCxdSIIbhoHdh66C0G7dAKTvFp0yvbcKQg==", + "version": "2.5.293", + "resolved": "https://registry.npmjs.org/@azure-tools/codegen/-/codegen-2.5.293.tgz", + "integrity": "sha512-d9rCCmBauvwruPYNPbZIh1lVjVFdTPRYID79G8A+IO9B8ERzuOPwjx2lkqjBr6w3GkqhiAVny3rKe9pipbyymw==", "requires": { - "@azure-tools/async-io": "~3.0.234", - "@azure-tools/linq": "~3.1.243", - "js-yaml": "3.13.1", + "@azure-tools/async-io": "~3.0.0", + "@azure-tools/linq": "~3.1.0", + "js-yaml": "~4.0.0", "semver": "^5.5.1" }, "dependencies": { @@ -95,38 +87,18 @@ "version": "3.1.254", "resolved": "https://registry.npmjs.org/@azure-tools/linq/-/linq-3.1.254.tgz", "integrity": "sha512-9sLKZTt+m1pzcBN2MyJojB1yxN+elkAXQ/AGpO1lYAp7TIp4pmYqZyDQuVNMMyvZQ8MtbCJnuE0gsA6GJlv0kg==" - } - } - }, - "@azure-tools/codemodel": { - "version": "4.13.339", - "resolved": "https://registry.npmjs.org/@azure-tools/codemodel/-/codemodel-4.13.339.tgz", - "integrity": "sha512-hqUEnTOFuUdPVIJa4xgNwT760fB7rFafqD5esUSLRWxVpwvk6ZNooPhjy23cvho3gGMMSsB9HdgZSqG5PxZEqw==", - "requires": { - "@azure-tools/autorest-extension-base": "~3.1.261", - "@azure-tools/codegen": "~2.5.284", - "@azure-tools/linq": "~3.1.256" - }, - "dependencies": { - "@azure-tools/autorest-extension-base": { - "version": "3.1.261", - "resolved": "https://registry.npmjs.org/@azure-tools/autorest-extension-base/-/autorest-extension-base-3.1.261.tgz", - "integrity": "sha512-zoHaj28ePt1p8mI05K+xZMg84CnvLgn1V1naMCLAwnnV2PQD5YramqmCgcH7SxnHnLZLDyKuqhs87L6pFrVljQ==", - "requires": { - "@azure-tools/codegen": "~2.5.284", - "js-yaml": "3.13.1", - "vscode-jsonrpc": "^3.5.0" - } }, - "@azure-tools/codegen": { - "version": "2.5.284", - "resolved": "https://registry.npmjs.org/@azure-tools/codegen/-/codegen-2.5.284.tgz", - "integrity": "sha512-M0568ui126E8xg7sB9a3FPqx/ThjhCcHLLRB0f63kaW+hYTHfkumo5HId1jFLF51AnoKd1lCqOEHS7Inr24now==", + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "js-yaml": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", "requires": { - "@azure-tools/async-io": "~3.0.247", - "@azure-tools/linq": "~3.1.256", - "js-yaml": "3.13.1", - "semver": "^5.5.1" + "argparse": "^2.0.1" } } } @@ -2365,6 +2337,7 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "requires": { "sprintf-js": "~1.0.2" } @@ -4529,7 +4502,8 @@ "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true }, "esquery": { "version": "1.0.1", @@ -6285,6 +6259,7 @@ "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -10075,7 +10050,8 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true }, "sshpk": { "version": "1.16.1", diff --git a/package.json b/package.json index 4205489bf6..62cf82fd51 100755 --- a/package.json +++ b/package.json @@ -30,9 +30,9 @@ "LICENSE" ], "dependencies": { - "@autorest/extension-base": "^3.1.0", + "@autorest/codemodel": "^4.14.5", + "@autorest/extension-base": "^3.2.0", "@azure-tools/codegen": "^2.4.267", - "@azure-tools/codemodel": "^4.13.339", "@azure/core-http": "^1.2.1-alpha.20201203.2", "@azure/core-lro": "^1.0.1", "@azure/core-paging": "^1.1.3", @@ -71,7 +71,7 @@ "karma-source-map-support": "^1.4.0", "karma-typescript": "^5.0.3", "karma-typescript-es6-transform": "^5.0.3", - "mocha": "6.2.1", + "mocha": "^6.2.1", "mocha-typescript": "1.1.17", "moment": "^2.24.0", "node-cmd": "^3.0.0", diff --git a/src/generators/clientContextFileGenerator.ts b/src/generators/clientContextFileGenerator.ts index 93e3592be3..71a0a6b104 100644 --- a/src/generators/clientContextFileGenerator.ts +++ b/src/generators/clientContextFileGenerator.ts @@ -13,7 +13,7 @@ import { normalizeName, NameType } from "../utils/nameUtils"; import { ClientDetails } from "../models/clientDetails"; import { PackageDetails } from "../models/packageDetails"; import { ParameterDetails } from "../models/parameterDetails"; -import { ImplementationLocation, SchemaType } from "@azure-tools/codemodel"; +import { ImplementationLocation, SchemaType } from "@autorest/codemodel"; import { EndpointDetails } from "../transforms/urlTransforms"; import { formatJsDocParam } from "./utils/parameterUtils"; @@ -50,11 +50,13 @@ export function generateClientContext( const contextClass = buildClass(sourceFile, clientContextClassName); - if(hideClients) { + if (hideClients) { contextClass.addJsDoc({ - tags: [{ + tags: [ + { tagName: "hidden" - }], + } + ] }); } diff --git a/src/generators/clientFileGenerator.ts b/src/generators/clientFileGenerator.ts index 06741abb49..785f46e290 100644 --- a/src/generators/clientFileGenerator.ts +++ b/src/generators/clientFileGenerator.ts @@ -14,7 +14,7 @@ import { writeGetOperationOptions } from "./operationGenerator"; import { normalizeName, NameType } from "../utils/nameUtils"; -import { ImplementationLocation, SchemaType } from "@azure-tools/codemodel"; +import { ImplementationLocation, SchemaType } from "@autorest/codemodel"; import { OperationDetails, OperationGroupDetails @@ -27,7 +27,11 @@ import { addPagingImports } from "./utils/pagingOperations"; type OperationDeclarationDetails = { name: string; typeName: string }; -export function generateClient(clientDetails: ClientDetails, project: Project, hideClients: boolean) { +export function generateClient( + clientDetails: ClientDetails, + project: Project, + hideClients: boolean +) { const clientContextClassName = `${clientDetails.className}Context`; const hasMappers = !!clientDetails.mappers.length; @@ -123,11 +127,13 @@ export function generateClient(clientDetails: ClientDetails, project: Project, h isExported: true }); - if(hideClients) { + if (hideClients) { clientClass.addJsDoc({ - tags: [{ + tags: [ + { tagName: "hidden" - }], + } + ] }); } diff --git a/src/generators/modelsGenerator.ts b/src/generators/modelsGenerator.ts index 809a81140e..295250cb14 100644 --- a/src/generators/modelsGenerator.ts +++ b/src/generators/modelsGenerator.ts @@ -32,7 +32,7 @@ import { ImplementationLocation, Parameter, SchemaType -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { KnownMediaType } from "@azure-tools/codegen"; import { getStringForValue } from "../utils/valueHelpers"; import { getLanguageMetadata } from "../utils/languageHelpers"; diff --git a/src/generators/operationGenerator.ts b/src/generators/operationGenerator.ts index bb40d61bb0..0093f6f922 100644 --- a/src/generators/operationGenerator.ts +++ b/src/generators/operationGenerator.ts @@ -32,7 +32,7 @@ import { ChoiceSchema, SealedChoiceSchema, ConstantSchema -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { getLanguageMetadata } from "../utils/languageHelpers"; import { shouldImportParameters } from "./utils/importUtils"; import { diff --git a/src/generators/parametersGenerator.ts b/src/generators/parametersGenerator.ts index 4858d3576f..7cc5938990 100644 --- a/src/generators/parametersGenerator.ts +++ b/src/generators/parametersGenerator.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ParameterLocation } from "@azure-tools/codemodel"; +import { ParameterLocation } from "@autorest/codemodel"; import { Project, VariableDeclarationKind, diff --git a/src/generators/utils/parameterUtils.ts b/src/generators/utils/parameterUtils.ts index 65704cb27d..04b5597345 100644 --- a/src/generators/utils/parameterUtils.ts +++ b/src/generators/utils/parameterUtils.ts @@ -11,7 +11,7 @@ import { SchemaType, ParameterLocation, Parameter -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { wrapString, IndentationType } from "./stringUtils"; import { ClassDeclaration } from "ts-morph"; import { ParameterWithDescription } from "./docsUtils"; diff --git a/src/main.ts b/src/main.ts index b11449b6f1..f5a55b671e 100755 --- a/src/main.ts +++ b/src/main.ts @@ -7,7 +7,7 @@ import { startSession } from "@autorest/extension-base"; import { generateTypeScriptLibrary } from "./typescriptGenerator"; -import { CodeModel, codeModelSchema } from "@azure-tools/codemodel"; +import { CodeModel, codeModelSchema } from "@autorest/codemodel"; export async function processRequest(host: Host) { try { diff --git a/src/models/modelDetails.ts b/src/models/modelDetails.ts index c5ae821f7d..a801d2b913 100644 --- a/src/models/modelDetails.ts +++ b/src/models/modelDetails.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ObjectSchema } from "@azure-tools/codemodel"; +import { ObjectSchema } from "@autorest/codemodel"; export type ObjectDetails = | BasicObjectDetails diff --git a/src/models/operationDetails.ts b/src/models/operationDetails.ts index 65c8089a66..e089076291 100644 --- a/src/models/operationDetails.ts +++ b/src/models/operationDetails.ts @@ -6,7 +6,7 @@ import { Language as ModelerLanguage, Parameter, VirtualParameter -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { KnownMediaType } from "@azure-tools/codegen"; import { Mapper } from "@azure/core-http"; import { ParameterDetails } from "./parameterDetails"; diff --git a/src/models/parameterDetails.ts b/src/models/parameterDetails.ts index 73e998a1c4..b9043ca5f4 100644 --- a/src/models/parameterDetails.ts +++ b/src/models/parameterDetails.ts @@ -7,7 +7,7 @@ import { AllSchemaTypes, ImplementationLocation, VirtualParameter -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { Mapper } from "@azure/core-http"; import { TypeDetails } from "./modelDetails"; import { KnownMediaType } from "@azure-tools/codegen"; diff --git a/src/models/unionDetails.ts b/src/models/unionDetails.ts index c77e426e5f..b98e64a88a 100644 --- a/src/models/unionDetails.ts +++ b/src/models/unionDetails.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SchemaType } from "@azure-tools/codemodel"; +import { SchemaType } from "@autorest/codemodel"; /** * Details of a typed value union, transformed from ChoiceSchema. diff --git a/src/transforms/extensions.ts b/src/transforms/extensions.ts index 2b3397ed7a..c73991adae 100644 --- a/src/transforms/extensions.ts +++ b/src/transforms/extensions.ts @@ -9,7 +9,7 @@ import { Protocol, ParameterLocation, ImplementationLocation -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { cloneOperation } from "../utils/cloneOperation"; import { extractPaginationDetails } from "../utils/extractPaginationDetails"; import { getLanguageMetadata } from "../utils/languageHelpers"; diff --git a/src/transforms/groupTransforms.ts b/src/transforms/groupTransforms.ts index acaa9178d8..8f4b2dd0a2 100644 --- a/src/transforms/groupTransforms.ts +++ b/src/transforms/groupTransforms.ts @@ -3,7 +3,7 @@ import { GroupSchema, GroupProperty, ObjectSchema -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { getLanguageMetadata } from "../utils/languageHelpers"; import { ObjectDetails, ObjectKind } from "../models/modelDetails"; import { transformProperty } from "./objectTransforms"; diff --git a/src/transforms/mapperTransforms.ts b/src/transforms/mapperTransforms.ts index cef1d669e9..a45949a529 100644 --- a/src/transforms/mapperTransforms.ts +++ b/src/transforms/mapperTransforms.ts @@ -16,7 +16,7 @@ import { DictionarySchema, DateTimeSchema, CodeModel -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { BaseMapper, Mapper, diff --git a/src/transforms/objectTransforms.ts b/src/transforms/objectTransforms.ts index 1048437dd5..f3590cb36f 100644 --- a/src/transforms/objectTransforms.ts +++ b/src/transforms/objectTransforms.ts @@ -5,10 +5,9 @@ import { CodeModel, ObjectSchema, ComplexSchema, - SchemaType, Property, GroupProperty -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { ObjectDetails, ObjectKind, diff --git a/src/transforms/operationTransforms.ts b/src/transforms/operationTransforms.ts index 981e0f8bcc..833e07c996 100644 --- a/src/transforms/operationTransforms.ts +++ b/src/transforms/operationTransforms.ts @@ -15,7 +15,7 @@ import { ConstantSchema, CodeModel, ObjectSchema -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { normalizeName, NameType, diff --git a/src/transforms/parameterTransforms.ts b/src/transforms/parameterTransforms.ts index bbbc1bd7f3..4955d5d2c0 100644 --- a/src/transforms/parameterTransforms.ts +++ b/src/transforms/parameterTransforms.ts @@ -11,7 +11,7 @@ import { SerializationStyle, ConstantSchema, VirtualParameter -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { QueryCollectionFormat } from "@azure/core-http"; import { getLanguageMetadata } from "../utils/languageHelpers"; import { diff --git a/src/transforms/transforms.ts b/src/transforms/transforms.ts index 7571168b8c..2a1a140d24 100644 --- a/src/transforms/transforms.ts +++ b/src/transforms/transforms.ts @@ -9,7 +9,7 @@ import { ChoiceSchema, SealedChoiceSchema, SchemaType -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { normalizeName, NameType } from "../utils/nameUtils"; import { getStringForValue } from "../utils/valueHelpers"; import { getLanguageMetadata } from "../utils/languageHelpers"; diff --git a/src/transforms/urlTransforms.ts b/src/transforms/urlTransforms.ts index abe71f8a23..940fdb1df6 100644 --- a/src/transforms/urlTransforms.ts +++ b/src/transforms/urlTransforms.ts @@ -1,4 +1,4 @@ -import { CodeModel } from "@azure-tools/codemodel"; +import { CodeModel } from "@autorest/codemodel"; import { getLanguageMetadata } from "../utils/languageHelpers"; export interface EndpointDetails { diff --git a/src/typescriptGenerator.ts b/src/typescriptGenerator.ts index f22265badc..442da21bf7 100755 --- a/src/typescriptGenerator.ts +++ b/src/typescriptGenerator.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import * as prettier from "prettier"; -import { CodeModel } from "@azure-tools/codemodel"; +import { CodeModel } from "@autorest/codemodel"; import { Project, IndentationText } from "ts-morph"; import { Host } from "@autorest/extension-base"; import { PackageDetails } from "./models/packageDetails"; diff --git a/src/utils/cloneOperation.ts b/src/utils/cloneOperation.ts index b5a4415169..c9f8332322 100644 --- a/src/utils/cloneOperation.ts +++ b/src/utils/cloneOperation.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { Operation } from "@azure-tools/codemodel"; +import { Operation } from "@autorest/codemodel"; import { cloneDeep } from "lodash"; import { getLanguageMetadata } from "./languageHelpers"; diff --git a/src/utils/extractHeaders.ts b/src/utils/extractHeaders.ts index 10a0e78540..f58069fee4 100644 --- a/src/utils/extractHeaders.ts +++ b/src/utils/extractHeaders.ts @@ -3,7 +3,7 @@ import { ObjectSchema, Operation, Response -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { getOperationFullName } from "./nameUtils"; import { headersToSchema } from "./headersToSchema"; import { getLanguageMetadata } from "./languageHelpers"; diff --git a/src/utils/extractPaginationDetails.ts b/src/utils/extractPaginationDetails.ts index 70c44de0a8..07d736dbc5 100644 --- a/src/utils/extractPaginationDetails.ts +++ b/src/utils/extractPaginationDetails.ts @@ -3,7 +3,7 @@ import { SchemaResponse, SchemaType, ObjectSchema -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { isEqual } from "lodash"; import { PaginationDetails } from "../models/operationDetails"; import { getLanguageMetadata, PaginationExtension } from "./languageHelpers"; diff --git a/src/utils/headersToSchema.ts b/src/utils/headersToSchema.ts index ba4f68877e..0a4db2b07f 100644 --- a/src/utils/headersToSchema.ts +++ b/src/utils/headersToSchema.ts @@ -1,4 +1,4 @@ -import { HttpHeader, ObjectSchema, Property } from "@azure-tools/codemodel"; +import { HttpHeader, ObjectSchema, Property } from "@autorest/codemodel"; import { getLanguageMetadata } from "../utils/languageHelpers"; export function headersToSchema( diff --git a/src/utils/languageHelpers.ts b/src/utils/languageHelpers.ts index 82e238a4d9..7525cbfec1 100644 --- a/src/utils/languageHelpers.ts +++ b/src/utils/languageHelpers.ts @@ -5,7 +5,7 @@ import { Languages, Language as ModelerLanguage, Operation -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; export interface PaginationExtension { /** diff --git a/src/utils/nameUtils.ts b/src/utils/nameUtils.ts index 3629d87b5b..22ac1cb846 100644 --- a/src/utils/nameUtils.ts +++ b/src/utils/nameUtils.ts @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { Operation, OperationGroup } from "@azure-tools/codemodel"; +import { Operation, OperationGroup } from "@autorest/codemodel"; import { getLanguageMetadata } from "./languageHelpers"; import { TypeDetails, PropertyKind } from "../models/modelDetails"; diff --git a/src/utils/schemaHelpers.ts b/src/utils/schemaHelpers.ts index 600a5b4acf..f98e02c569 100644 --- a/src/utils/schemaHelpers.ts +++ b/src/utils/schemaHelpers.ts @@ -12,7 +12,7 @@ import { DictionarySchema, SchemaResponse, ComplexSchema -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { getStringForValue } from "./valueHelpers"; import { getLanguageMetadata } from "./languageHelpers"; import { normalizeName, NameType, normalizeTypeName } from "./nameUtils"; diff --git a/src/utils/sortObjectSchemasHierarchically.ts b/src/utils/sortObjectSchemasHierarchically.ts index 90ec4b76a7..b1303e829e 100644 --- a/src/utils/sortObjectSchemasHierarchically.ts +++ b/src/utils/sortObjectSchemasHierarchically.ts @@ -1,4 +1,4 @@ -import { ObjectSchema, SchemaType, CodeModel } from "@azure-tools/codemodel"; +import { ObjectSchema, SchemaType, CodeModel } from "@autorest/codemodel"; import { getLanguageMetadata } from "./languageHelpers"; /** diff --git a/src/utils/valueHelpers.ts b/src/utils/valueHelpers.ts index 27db52e957..86e92d7b84 100644 --- a/src/utils/valueHelpers.ts +++ b/src/utils/valueHelpers.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { SchemaType, AllSchemaTypes } from "@azure-tools/codemodel"; +import { SchemaType, AllSchemaTypes } from "@autorest/codemodel"; import { isNil, isEmpty } from "lodash"; import { MapperType, SequenceMapperType } from "@azure/core-http"; diff --git a/test/unit/generators/utils/parameterUtils.spec.ts b/test/unit/generators/utils/parameterUtils.spec.ts index 152c9b7f9b..618902bec7 100644 --- a/test/unit/generators/utils/parameterUtils.spec.ts +++ b/test/unit/generators/utils/parameterUtils.spec.ts @@ -8,7 +8,7 @@ import { StringSchema, SchemaType, ImplementationLocation -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { PropertyKind } from "../../../../src/models/modelDetails"; describe("parameterUtils", () => { diff --git a/test/unit/transforms/mapperTransforms.spec.ts b/test/unit/transforms/mapperTransforms.spec.ts index f179d41e27..3cf51bbcc6 100644 --- a/test/unit/transforms/mapperTransforms.spec.ts +++ b/test/unit/transforms/mapperTransforms.spec.ts @@ -22,7 +22,7 @@ import { Property, ArraySchema, ChoiceValue -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { BaseMapper, EnumMapper, diff --git a/test/unit/transforms/operationTransforms.spec.ts b/test/unit/transforms/operationTransforms.spec.ts index 296adfdd9a..0a6bafde48 100644 --- a/test/unit/transforms/operationTransforms.spec.ts +++ b/test/unit/transforms/operationTransforms.spec.ts @@ -18,7 +18,7 @@ import { Parameter, StringSchema, ImplementationLocation -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { KnownMediaType } from "@azure-tools/codegen"; import { Mapper } from "@azure/core-http"; import { OperationSpecDetails } from "../../../src/models/operationDetails"; diff --git a/test/unit/transforms/parameterTransforms.spec.ts b/test/unit/transforms/parameterTransforms.spec.ts index fdffda2763..6b33927bf2 100644 --- a/test/unit/transforms/parameterTransforms.spec.ts +++ b/test/unit/transforms/parameterTransforms.spec.ts @@ -8,7 +8,7 @@ import { OperationGroup, Request, ParameterLocation -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { transformParameters } from "../../../src/transforms/parameterTransforms"; import { ParameterDetails } from "../../../src/models/parameterDetails"; import { ClientOptions } from "../../../src/models/clientDetails"; diff --git a/test/unit/transforms/transforms.spec.ts b/test/unit/transforms/transforms.spec.ts index 9f5efb320b..e78540417e 100644 --- a/test/unit/transforms/transforms.spec.ts +++ b/test/unit/transforms/transforms.spec.ts @@ -14,7 +14,7 @@ import { ChoiceSchema, ChoiceValue, BooleanSchema -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { transformProperty, transformObject diff --git a/test/unit/utils/schemaHelpers.spec.ts b/test/unit/utils/schemaHelpers.spec.ts index 5ff1fc4a1b..efa696dcf9 100644 --- a/test/unit/utils/schemaHelpers.spec.ts +++ b/test/unit/utils/schemaHelpers.spec.ts @@ -16,7 +16,7 @@ import { DurationSchema, ObjectSchema, Property -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import { getTypeForSchema } from "../../../src/utils/schemaHelpers"; import { PropertyKind } from "../../../src/models/modelDetails"; diff --git a/test/unit/utils/valueHelpers.spec.ts b/test/unit/utils/valueHelpers.spec.ts index 5799861076..4b40e1e630 100644 --- a/test/unit/utils/valueHelpers.spec.ts +++ b/test/unit/utils/valueHelpers.spec.ts @@ -8,7 +8,7 @@ import { NumberSchema, StringSchema, ByteArraySchema -} from "@azure-tools/codemodel"; +} from "@autorest/codemodel"; import * as assert from "assert"; describe("ValueHelpers", () => {