Skip to content
Merged
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
267 changes: 161 additions & 106 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions packages/typespec-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"type": "module",
"dependencies": {
"@azure-tools/typespec-ts": "workspace:^0.19.0",
"@typespec/openapi": ">=0.49.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.35.0 <1.0.0",
"@typespec/openapi3": ">=0.49.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.35.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.35.0 <1.0.0",
"@typespec/compiler": ">=0.49.0 <1.0.0",
"@typespec/http": ">=0.49.0 <1.0.0",
"@typespec/rest": ">=0.49.0 <1.0.0",
"@typespec/versioning": ">=0.49.0 <1.0.0",
"@typespec/openapi": ">=0.50.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.36.1 <1.0.0",
"@typespec/openapi3": ">=0.50.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.36.0 <1.0.0",
"@typespec/compiler": ">=0.50.0 <1.0.0",
"@typespec/http": ">=0.50.0 <1.0.0",
"@typespec/rest": ">=0.50.0 <1.0.0",
"@typespec/versioning": ">=0.50.0 <1.0.0",
"prettier": "2.7.1"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,8 @@
"type": "string",
"description": "Enum describing allowed operation states.",
"enum": [
"InProgress",
"NotStarted",
"Running",
"Succeeded",
"Failed",
"Canceled"
Expand All @@ -932,8 +933,13 @@
"modelAsString": true,
"values": [
{
"name": "InProgress",
"value": "InProgress",
"name": "NotStarted",
"value": "NotStarted",
"description": "The operation has not started."
},
{
"name": "Running",
"value": "Running",
"description": "The operation is in progress."
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface OperationStatusOutput {
/**
* The status of the operation
*
* Possible values: InProgress, Succeeded, Failed, Canceled
* Possible values: NotStarted, Running, Succeeded, Failed, Canceled
*/
status: string;
/** Error object that describes the error when status is "Failed". */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@
"type": "string",
"description": "Enum describing allowed operation states.",
"enum": [
"InProgress",
"NotStarted",
"Running",
"Succeeded",
"Failed",
"Canceled"
Expand All @@ -369,8 +370,13 @@
"modelAsString": true,
"values": [
{
"name": "InProgress",
"value": "InProgress",
"name": "NotStarted",
"value": "NotStarted",
"description": "The operation has not started."
},
{
"name": "Running",
"value": "Running",
"description": "The operation is in progress."
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface ResourceOperationStatusOutput {
/**
* The status of the operation
*
* Possible values: InProgress, Succeeded, Failed, Canceled
* Possible values: NotStarted, Running, Succeeded, Failed, Canceled
*/
status: string;
/** Error object that describes the error when status is "Failed". */
Expand All @@ -45,7 +45,7 @@ export interface OperationStatusOutput {
/**
* The status of the operation
*
* Possible values: InProgress, Succeeded, Failed, Canceled
* Possible values: NotStarted, Running, Succeeded, Failed, Canceled
*/
status: string;
/** Error object that describes the error when status is "Failed". */
Expand Down
12 changes: 6 additions & 6 deletions packages/typespec-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@
"@typespec/ts-http-runtime": "1.0.0-alpha.20231103.1"
},
"peerDependencies": {
"@azure-tools/typespec-azure-core": ">=0.35.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.35.0 <1.0.0",
"@typespec/compiler": ">=0.49.0 <1.0.0",
"@typespec/http": ">=0.49.0 <1.0.0",
"@typespec/rest": ">=0.49.0 <1.0.0",
"@typespec/versioning": ">=0.49.0 <1.0.0"
"@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.36.0 <1.0.0",
"@typespec/compiler": ">=0.50.0 <1.0.0",
"@typespec/http": ">=0.50.0 <1.0.0",
"@typespec/rest": ">=0.50.0 <1.0.0",
"@typespec/versioning": ">=0.50.0 <1.0.0"
},
"dependencies": {
"prettier": "^2.6.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/typespec-ts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export async function $onEmit(context: EmitContext) {
/** Shared status */
const program: Program = context.program;
const emitterOptions: RLCOptions = context.options;
const dpgContext = createSdkContext(context) as SdkContext;
const dpgContext = createSdkContext(context, "@azure-tools/typespec-ts") as SdkContext;
const needUnexpectedHelper: Map<string, boolean> = new Map<string, boolean>();
const serviceNameToRlcModelsMap: Map<string, RLCModel> = new Map<
string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface OperationStatusOutput {
/**
* The status of the operation
*
* Possible values: InProgress, Succeeded, Failed, Canceled
* Possible values: NotStarted, Running, Succeeded, Failed, Canceled
*/
status: string;
/** Error object that describes the error when status is "Failed". */
Expand All @@ -32,7 +32,7 @@ export interface ResourceOperationStatusOutput {
/**
* The status of the operation
*
* Possible values: InProgress, Succeeded, Failed, Canceled
* Possible values: NotStarted, Running, Succeeded, Failed, Canceled
*/
status: string;
/** Error object that describes the error when status is "Failed". */
Expand Down
5 changes: 3 additions & 2 deletions packages/typespec-ts/test/util/testUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function createDpgContextTestHelper(program: Program): SdkContext {
main: "@azure-tools/typespec-ts",
metadata: { name: "@azure-tools/typespec-ts" }
}
]
],
};
const resolvedOptions = { ...defaultOptions };
program.emitters = resolvedOptions.emitters as any;
Expand All @@ -85,7 +85,8 @@ export function createDpgContextTestHelper(program: Program): SdkContext {
generateProtocolMethods: resolvedOptions.generateProtocolMethods,
generateConvenienceMethods: resolvedOptions.generateConvenienceMethods,
rlcOptions: {},
generationPathDetail: {}
generationPathDetail: {},
emitterName: "@azure-tools/typespec-ts"
} as SdkContext;
}

Expand Down