Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to m4 4.23.1 #923

Draft
wants to merge 1 commit into
base: main-v3
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion powershell/autorest-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ modelerfour:
additional-checks: false
always-create-content-type-parameter: false
always-seal-x-ms-enums: true
treat-type-object-as-anything: true
```

> if the modeler is loaded already, use that one, otherwise grab it.

``` yaml !isLoaded('@autorest/modelerfour')
use-extension:
"@autorest/modelerfour": "4.15.414"
"@autorest/modelerfour": "4.23.1"

# will use highest 2.0.x
```
Expand Down
4 changes: 2 additions & 2 deletions powershell/cmdlets/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { Schema as NewSchema, SchemaType, ArraySchema, SchemaResponse, HttpParameter, ObjectSchema, BinaryResponse, DictionarySchema, ChoiceSchema, SealedChoiceSchema } from '@azure-tools/codemodel';
import { Schema as NewSchema, SchemaType, ArraySchema, SchemaResponse, HttpParameter, ObjectSchema, BinaryResponse, DictionarySchema, ChoiceSchema, SealedChoiceSchema } from '@autorest/codemodel';
import { command, getAllProperties, JsonType, http, getAllPublicVirtualProperties, getVirtualPropertyFromPropertyName, ParameterLocation, getAllVirtualProperties, VirtualParameter, VirtualProperty } from '@azure-tools/codemodel-v3';
import { CommandOperation, VirtualParameter as NewVirtualParameter } from '../utils/command-operation';
import { getAllProperties as NewGetAllProperties, getAllPublicVirtualProperties as NewGetAllPublicVirtualProperties, getVirtualPropertyFromPropertyName as NewGetVirtualPropertyFromPropertyName, VirtualProperty as NewVirtualProperty } from '../utils/schema';
Expand All @@ -16,7 +16,7 @@ import {
import { ClientRuntime, EventListener, Schema, ArrayOf, EnumImplementation } from '../llcsharp/exports';
import { Alias, ArgumentCompleterAttribute, AsyncCommandRuntime, AsyncJob, CmdletAttribute, ErrorCategory, ErrorRecord, Events, InvocationInfo, OutputTypeAttribute, ParameterAttribute, PSCmdlet, PSCredential, SwitchParameter, ValidateNotNull, verbEnum, GeneratedAttribute, DescriptionAttribute, CategoryAttribute, ParameterCategory, ProfileAttribute, PSObject, InternalExportAttribute, ExportAsAttribute, DefaultRunspace, RunspaceFactory, AllowEmptyCollectionAttribute, DoNotExportAttribute } from '../internal/powershell-declarations';
import { State } from '../internal/state';
import { Channel } from '@azure-tools/autorest-extension-base';
import { Channel } from '@autorest/extension-base';
import { IParameter } from '@azure-tools/codemodel-v3/dist/code-model/components';
import { IParameter as NewIParameter } from '../utils/components';
import { Variable, Local, ParameterModifier } from '@azure-tools/codegen-csharp';
Expand Down
2 changes: 1 addition & 1 deletion powershell/generators/gitignore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { Host } from '@azure-tools/autorest-extension-base';
import { Host } from '@autorest/extension-base';
import { Project } from '../internal/project';

export async function generateGitIgnore(project: Project) {
Expand Down
2 changes: 1 addition & 1 deletion powershell/generators/nuspec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { Host } from '@azure-tools/autorest-extension-base';
import { Host } from '@autorest/extension-base';
import { Project } from '../internal/project';

function removeCd(path: string): string {
Expand Down
2 changes: 1 addition & 1 deletion powershell/generators/psm1.custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { Host } from '@azure-tools/autorest-extension-base';
import { Host } from '@autorest/extension-base';
import { Project } from '../internal/project';
import { PSScriptFile } from '../file-formats/psscript-file';
import { relative } from 'path';
Expand Down
2 changes: 1 addition & 1 deletion powershell/generators/psm1.internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { Host } from '@azure-tools/autorest-extension-base';
import { Host } from '@autorest/extension-base';
import { Project } from '../internal/project';
import { PSScriptFile } from '../file-formats/psscript-file';
import { relative } from 'path';
Expand Down
2 changes: 1 addition & 1 deletion powershell/internal/name-inferrer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { pascalCase, EnglishPluralizationService } from '@azure-tools/codegen';
import { Channel, Message } from '@azure-tools/autorest-extension-base';
import { Channel, Message } from '@autorest/extension-base';
import { length } from '@azure-tools/linq';

function getPluralizationService(): EnglishPluralizationService {
Expand Down
4 changes: 2 additions & 2 deletions powershell/internal/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import { pwshHeaderText } from '../utils/powershell-comment';

import { ModuleNamespace } from '../module/module-namespace';
import { CmdletNamespace } from '../cmdlets/namespace';
import { Host } from '@azure-tools/autorest-extension-base';
import { Host } from '@autorest/extension-base';
import { codemodel, PropertyDetails, exportedModels as T } from '@azure-tools/codemodel-v3';
import { DeepPartial, comment } from '@azure-tools/codegen';
import { PwshModel } from '../utils/PwshModel';
import { ModelState } from '../utils/model-state';
import { BooleanSchema, ChoiceSchema, ConstantSchema, Schema as NewSchema, SchemaType } from '@azure-tools/codemodel';
import { BooleanSchema, ChoiceSchema, ConstantSchema, Schema as NewSchema, SchemaType } from '@autorest/codemodel';

export type Schema = T.SchemaT<LanguageDetails<SchemaDetails>, LanguageDetails<PropertyDetails>>;

Expand Down
2 changes: 1 addition & 1 deletion powershell/internal/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { codemodel } from '@azure-tools/codemodel-v3';

import { Host, JsonPath, Session } from '@azure-tools/autorest-extension-base';
import { Host, JsonPath, Session } from '@autorest/extension-base';
import { Project } from './project';
import { DeepPartial } from '@azure-tools/codegen';
import { PwshModel } from '../utils/PwshModel';
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/enums/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { EnhancedTypeDeclaration } from '../schema/extended-type-declaration';
import { State } from '../generator';
import { DeepPartial } from '@azure-tools/codegen';

import { Schema as NewSchema } from '@azure-tools/codemodel';
import { Schema as NewSchema } from '@autorest/codemodel';

export class EnumClass extends Struct implements EnhancedTypeDeclaration {
implementation: EnumImplementation;
Expand Down
4 changes: 2 additions & 2 deletions powershell/llcsharp/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { codeModelSchema } from '@azure-tools/codemodel';
import { codeModelSchema } from '@autorest/codemodel';
import { Model } from './code-model';
import { Host, JsonPath, Session, startSession } from '@azure-tools/autorest-extension-base';
import { Host, JsonPath, Session, startSession } from '@autorest/extension-base';

import { Project } from './project';
import { Dictionary } from '@azure-tools/linq';
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/model/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { KnownMediaType, JsonType, getPolymorphicBases } from '@azure-tools/code
import { Expression, ExpressionOrLiteral, Interface, Namespace, OneOrMoreStatements, Variable, Access, InterfaceProperty, Attribute, StringExpression, LiteralExpression, Property, TypeDeclaration } from '@azure-tools/codegen-csharp';
import { ClientRuntime } from '../clientruntime';
import { Schema } from '../code-model';
import { Schema as NewSchema, Language, ObjectSchema } from '@azure-tools/codemodel';
import { Schema as NewSchema, Language, ObjectSchema } from '@autorest/codemodel';
import { State } from '../generator';
import { EnhancedTypeDeclaration } from '../schema/extended-type-declaration';
import { ModelClass } from './model-class';
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/model/model-class-dictionary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { EnhancedTypeDeclaration } from '../schema/extended-type-declaration';
import { ClientRuntime } from '../clientruntime';
import { getAllVirtualProperties } from '@azure-tools/codemodel-v3';
import { DeepPartial } from '@azure-tools/codegen';
import { DictionarySchema, ObjectSchema, SchemaType, Schema } from '@azure-tools/codemodel';
import { DictionarySchema, ObjectSchema, SchemaType, Schema } from '@autorest/codemodel';

export class DictionaryImplementation extends Class {
private get state() { return this.modelClass.state; }
Expand Down
4 changes: 2 additions & 2 deletions powershell/llcsharp/model/model-class-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Schema as NewSchema, ObjectSchema, SchemaType } from '@azure-tools/codemodel';
import { Schema as NewSchema, ObjectSchema, SchemaType } from '@autorest/codemodel';
import { KnownMediaType, HeaderProperty, HeaderPropertyType, getAllProperties } from '@azure-tools/codemodel-v3';
import { getAllProperties as newGetAllProperties } from '@azure-tools/codemodel';
import { getAllProperties as newGetAllProperties } from '@autorest/codemodel';
import { EOL, DeepPartial, } from '@azure-tools/codegen';
import { items, values, keys, Dictionary, length } from '@azure-tools/linq';
import { Access, Modifier, StringExpression, Expression, System } from '@azure-tools/codegen-csharp';
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/model/model-class-serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { popTempVar, pushTempVar } from '../schema/primitive';

import { ObjectImplementation } from '../schema/object';
import { Schema } from '../code-model';
import { DictionarySchema, ObjectSchema, Schema as NewSchema, SchemaType } from '@azure-tools/codemodel';
import { DictionarySchema, ObjectSchema, Schema as NewSchema, SchemaType } from '@autorest/codemodel';

import { getVirtualPropertyName } from './model-class';
import { VirtualProperty as NewVirtualProperty } from '../../utils/schema';
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/model/model-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { ModelProperty } from './property';
import { PropertyOriginAttribute, DoNotFormatAttribute, FormatTableAttribute } from '../csharp-declarations';
import { Schema } from '../code-model';
import { DictionaryImplementation } from './model-class-dictionary';
import { Languages, Language, Schema as NewSchema, SchemaType, ObjectSchema, DictionarySchema } from '@azure-tools/codemodel';
import { Languages, Language, Schema as NewSchema, SchemaType, ObjectSchema, DictionarySchema } from '@autorest/codemodel';
import { VirtualProperty as NewVirtualProperty, getAllVirtualProperties as newGetAllVirtualProperties } from '../../utils/schema';

export function getVirtualPropertyName(vp?: NewVirtualProperty): string {
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/model/namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { Schema as NewSchema, Schemas as NewSchemas, Language } from '@azure-tools/codemodel';
import { Schema as NewSchema, Schemas as NewSchemas, Language } from '@autorest/codemodel';
import { items, values, keys, Dictionary, length } from '@azure-tools/linq';
import { ImportDirective, Namespace } from '@azure-tools/codegen-csharp';
import { ClientRuntime } from '../clientruntime';
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/model/property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { EnhancedTypeDeclaration } from '../schema/extended-type-declaration';

import { State } from '../generator';
import { DeepPartial } from '@azure-tools/codegen';
import { Schema as NewSchema, SchemaType } from '@azure-tools/codemodel';
import { Schema as NewSchema, SchemaType } from '@autorest/codemodel';

export class ModelProperty extends BackedProperty implements EnhancedVariable {
/** emits an expression to deserialize a property from a member inside a container */
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/operation/method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { NewResponse, ParameterLocation } from '@azure-tools/codemodel-v3';
import { Operation, SchemaResponse, BinaryResponse, Schema as NewSchema, Response, BinarySchema } from '@azure-tools/codemodel';
import { Operation, SchemaResponse, BinaryResponse, Schema as NewSchema, Response, BinarySchema } from '@autorest/codemodel';
import { items, values, keys, Dictionary, length } from '@azure-tools/linq';
import { EOL, DeepPartial } from '@azure-tools/codegen';
import { Access, Modifier } from '@azure-tools/codegen-csharp';
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/operation/parameter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { Method } from '@azure-tools/codegen-csharp';
import { Parameter as NewHttpOperationParameter, Schema as NewSchema } from '@azure-tools/codemodel';
import { Parameter as NewHttpOperationParameter, Schema as NewSchema } from '@autorest/codemodel';
import { KnownMediaType } from '@azure-tools/codemodel-v3';
import { System } from '@azure-tools/codegen-csharp';
import { Expression, ExpressionOrLiteral } from '@azure-tools/codegen-csharp';
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { Host } from '@azure-tools/autorest-extension-base';
import { Host } from '@autorest/extension-base';
import { items, values, keys, Dictionary, length } from '@azure-tools/linq';
import { Project as codeDomProject } from '@azure-tools/codegen-csharp';

Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/schema/Uuid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { nameof } from '@azure-tools/codegen';
import { Variable } from '@azure-tools/codegen-csharp';
import { Schema } from '../code-model';
import { StringSchema } from '@azure-tools/codemodel';
import { StringSchema } from '@autorest/codemodel';
import { String } from './string';


Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/schema/array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Ternery } from '@azure-tools/codegen-csharp';
import { LocalVariable, Variable } from '@azure-tools/codegen-csharp';
import { ClientRuntime } from '../clientruntime';
import { Schema } from '../code-model';
import { Schema as NewSchema } from '@azure-tools/codemodel';
import { Schema as NewSchema } from '@autorest/codemodel';


import { popTempVar, pushTempVar } from '../schema/primitive';
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/schema/binary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { OneOrMoreStatements } from '@azure-tools/codegen-csharp';
import { Variable } from '@azure-tools/codegen-csharp';
import { Schema } from '../code-model';
import { EnhancedTypeDeclaration } from './extended-type-declaration';
import { BinarySchema } from '@azure-tools/codemodel';
import { BinarySchema } from '@autorest/codemodel';


export class Binary implements EnhancedTypeDeclaration {
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/schema/boolean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { Variable } from '@azure-tools/codegen-csharp';
import { ClientRuntime } from '../clientruntime';
import { Schema } from '../code-model';
import { Schema as NewSchema, BooleanSchema } from '@azure-tools/codemodel';
import { Schema as NewSchema, BooleanSchema } from '@autorest/codemodel';
import { NewPrimitive } from './primitive';

export class Boolean extends NewPrimitive {
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/schema/byte-array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { If } from '@azure-tools/codegen-csharp';
import { OneOrMoreStatements } from '@azure-tools/codegen-csharp';
import { Variable } from '@azure-tools/codegen-csharp';
import { Schema } from '../code-model';
import { Schema as NewSchema, ByteArraySchema } from '@azure-tools/codemodel';
import { Schema as NewSchema, ByteArraySchema } from '@autorest/codemodel';
import { popTempVar, pushTempVar } from './primitive';
import { EnhancedTypeDeclaration } from './extended-type-declaration';
import { ClientRuntime } from '../clientruntime';
Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/schema/char.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { Variable } from '@azure-tools/codegen-csharp';
import { ClientRuntime } from '../clientruntime';
import { Schema } from '../code-model';
import { Schema as NewSchema, SchemaType, ChoiceSchema, ChoiceValue } from '@azure-tools/codemodel';
import { Schema as NewSchema, SchemaType, ChoiceSchema, ChoiceValue } from '@autorest/codemodel';
import { NewPrimitive } from './primitive';
import { length } from '@azure-tools/linq';

Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/schema/date-time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { OneOrMoreStatements } from '@azure-tools/codegen-csharp';
import { Variable } from '@azure-tools/codegen-csharp';
import { ClientRuntime } from '../clientruntime';
import { Schema } from '../code-model';
import { Schema as NewSchema, DateTimeSchema, UnixTimeSchema, DateSchema } from '@azure-tools/codemodel';
import { Schema as NewSchema, DateTimeSchema, UnixTimeSchema, DateSchema } from '@autorest/codemodel';
import { NewPrimitive } from './primitive';


Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/schema/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { StringExpression } from '@azure-tools/codegen-csharp';
import { Schema } from '../code-model';
import { DateSchema } from '@azure-tools/codemodel';
import { DateSchema } from '@autorest/codemodel';
import { DateTime } from './date-time';


Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/schema/duration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Expression, ExpressionOrLiteral, toExpression, System, valueOf } from '
import { OneOrMoreStatements } from '@azure-tools/codegen-csharp';
import { Variable } from '@azure-tools/codegen-csharp';
import { Schema } from '../code-model';
import { Schema as NewSchema, DurationSchema } from '@azure-tools/codemodel';
import { Schema as NewSchema, DurationSchema } from '@autorest/codemodel';
import { NewPrimitive } from './primitive';
import { ClientRuntime } from '../clientruntime';

Expand Down
2 changes: 1 addition & 1 deletion powershell/llcsharp/schema/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { Schema } from '../code-model';
import { Schema as NewSchema } from '@azure-tools/codemodel';
import { Schema as NewSchema } from '@autorest/codemodel';
import { String } from './string';
import { dotnet, toExpression } from '@azure-tools/codegen-csharp';

Expand Down
Loading