Skip to content

Commit

Permalink
Merge branch 'main' into feature/generate-adaptive-cards
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome authored Jan 15, 2025
2 parents b3b7a8f + 56b335c commit 86ad2ba
Show file tree
Hide file tree
Showing 12 changed files with 113 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/policies/branch-protection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ configuration:
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
requireCodeOwnersReview: true
# Are commits required to be signed. boolean.
requiresCommitSignatures: true
requiresCommitSignatures: false
# Are conversations required to be resolved before merging? boolean
requiresConversationResolution: true
# Are merge commits prohibited from being pushed to this branch. boolean
Expand Down
106 changes: 53 additions & 53 deletions it/typescript/package-lock.json

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

8 changes: 4 additions & 4 deletions it/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"devDependencies": {
"@es-exec/esbuild-plugin-start": "^0.0.5",
"@stylistic/eslint-plugin-ts": "^2.13.0",
"@types/node": "^22.10.5",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.19.1",
"@types/node": "^22.10.6",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"esbuild": "^0.24.2",
"eslint": "^9.18.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-prettier": "^10.0.1",
"minimist": "^1.2.8",
"prettier": "^3.4.2",
"typescript": "^4.9.5"
Expand Down
5 changes: 3 additions & 2 deletions scripts/update-vscode-releases.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ if ($version -like "*-preview.*") {
$updatedPatchVersion += (Get-Date).ToString("yyMMdd") + $sequenceNumber
}
else {
if ($updatedPatchVersion -eq "1") {
$updatedPatchVersion = "100000002"
$updatedPatchVersionAsNumber = 0;
if ([int]::TryParse($updatedPatchVersion, [ref]$updatedPatchVersionAsNumber)) {
$updatedPatchVersion = "10000000$($updatedPatchVersionAsNumber + 1)"
}
elseif ([string]::IsNullOrWhiteSpace($updatedPatchVersion)) {
$updatedPatchVersion = "100000001"
Expand Down
4 changes: 4 additions & 0 deletions vscode/microsoft-kiota/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ All notable changes to this project will be documented in this file.

### Added

- Added dart generation to Visual Studio Code extension.

### Changed

- Fixed a bug in the VS Code extension deeplink with the API Center extension [#6004](https://github.com/microsoft/kiota/issues/6004)

## [1.22.100000001] - 2025-01-10

### Added
Expand Down
35 changes: 30 additions & 5 deletions vscode/microsoft-kiota/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,25 @@
],
"description": "%kiota.generate.deserializer.description%"
},
"kiota.generate.serializer.Dart": {
"type": "array",
"default": [
"microsoft_kiota_serialization_json/microsoft_kiota_serialization_json.JsonSerializationWriterFactory",
"microsoft_kiota_serialization_form/microsoft_kiota_serialization_form.FormSerializationWriterFactory",
"microsoft_kiota_serialization_text/microsoft_kiota_serialization_text.TextSerializationWriterFactory",
"microsoft_kiota_serialization_multipart/microsoft_kiota_serialization_multipart.MultipartSerializationWriterFactory"
],
"description": "%kiota.generate.serializer.description%"
},
"kiota.generate.deserializer.Dart": {
"type": "array",
"default": [
"microsoft_kiota_serialization_json/microsoft_kiota_serialization_json.JsonParseNodeFactory",
"microsoft_kiota_serialization_text/microsoft_kiota_serialization_text.TextParseNodeFactory",
"microsoft_kiota_serialization_form/microsoft_kiota_serialization_form.FormParseNodeFactory"
],
"description": "%kiota.generate.deserializer.description%"
},
"kiota.generate.serializer.Go": {
"type": "array",
"default": [
Expand Down Expand Up @@ -125,31 +144,37 @@
"type": "array",
"default": [
"Microsoft\\Kiota\\Serialization\\Json\\JsonSerializationWriterFactory",
"Microsoft\\Kiota\\Serialization\\Text\\TextSerializationWriterFactory"
"Microsoft\\Kiota\\Serialization\\Text\\TextSerializationWriterFactory",
"Microsoft\\Kiota\\Serialization\\Form\\FormSerializationWriterFactory",
"Microsoft\\Kiota\\Serialization\\Multipart\\MultipartSerializationWriterFactory"
],
"description": "%kiota.generate.serializer.description%"
},
"kiota.generate.deserializer.PHP": {
"type": "array",
"default": [
"Microsoft\\Kiota\\Serialization\\Json\\JsonParseNodeFactory",
"Microsoft\\Kiota\\Serialization\\Text\\TextParseNodeFactory"
"Microsoft\\Kiota\\Serialization\\Text\\TextParseNodeFactory",
"Microsoft\\Kiota\\Serialization\\Form\\FormParseNodeFactory"
],
"description": "%kiota.generate.deserializer.description%"
},
"kiota.generate.serializer.Python": {
"type": "array",
"default": [
"kiota_serialization_json.json_serialization_writer_factory.JsonSerializationWriterFactory",
"kiota_serialization_text.text_serialization_writer_factory.TextSerializationWriterFactory"
"kiota_serialization_text.text_serialization_writer_factory.TextSerializationWriterFactory",
"kiota_serialization_form.form_serialization_writer_factory.FormSerializationWriterFactory",
"kiota_serialization_multipart.multipart_serialization_writer_factory.MultipartSerializationWriterFactory"
],
"description": "%kiota.generate.serializer.description%"
},
"kiota.generate.deserializer.Python": {
"type": "array",
"default": [
"kiota_serialization_json.json_parse_node_factory.JsonParseNodeFactory",
"kiota_serialization_text.text_parse_node_factory.TextParseNodeFactory"
"kiota_serialization_text.text_parse_node_factory.TextParseNodeFactory",
"kiota_serialization_form.form_parse_node_factory.FormParseNodeFactory"
],
"description": "%kiota.generate.deserializer.description%"
},
Expand Down Expand Up @@ -547,4 +572,4 @@
"sha256": "2525D4A8C3ED4972C05E57E4DB2D244E1A708325CE4A5CFB24822D9FD7BB7ED3"
}
]
}
}
11 changes: 8 additions & 3 deletions vscode/microsoft-kiota/src/handlers/uriHandler.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as vscode from 'vscode';
import TelemetryReporter from '@vscode/extension-telemetry';
import * as vscode from 'vscode';

import { treeViewId } from '../constants';
import { OpenApiTreeProvider } from "../providers/openApiTreeProvider";
import { updateTreeViewIcons } from '../util';
import { validateDeepLinkQueryParams } from '../utilities/deep-linking';
import { openTreeViewWithProgress } from '../utilities/progress';
import { setDeepLinkParams, getDeepLinkParams } from './deepLinkParamsHandler';
import { getDeepLinkParams, setDeepLinkParams } from './deepLinkParamsHandler';

export class UriHandler {
constructor(private context: vscode.ExtensionContext, private openApiTreeProvider: OpenApiTreeProvider) { }
Expand All @@ -26,7 +28,10 @@ export class UriHandler {

let deepLinkParams = getDeepLinkParams();
if (deepLinkParams.descriptionurl) {
await openTreeViewWithProgress(() => this.openApiTreeProvider.setDescriptionUrl(deepLinkParams.descriptionurl!));
await openTreeViewWithProgress(async () => {
await this.openApiTreeProvider.setDescriptionUrl(deepLinkParams.descriptionurl!);
await updateTreeViewIcons(treeViewId, true, false);
});
return;
}
}
Expand Down
3 changes: 3 additions & 0 deletions vscode/microsoft-kiota/src/kiotaInterop/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ export function generationLanguageToString(language: KiotaGenerationLanguage): s
return "Ruby";
case KiotaGenerationLanguage.CLI:
return "CLI";
case KiotaGenerationLanguage.Dart:
return "Dart";
default:
throw new Error("unknown language");
}
Expand All @@ -137,6 +139,7 @@ export const allGenerationLanguages = [
KiotaGenerationLanguage.CLI,
KiotaGenerationLanguage.Swift,
KiotaGenerationLanguage.TypeScript,
KiotaGenerationLanguage.Dart,
];

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ let extensionSettings = {
[KiotaGenerationLanguage.Python]: { serializers: [], deserializers: [] },
[KiotaGenerationLanguage.Ruby]: { serializers: [], deserializers: [] },
[KiotaGenerationLanguage.Swift]: { serializers: [], deserializers: [] },
[KiotaGenerationLanguage.TypeScript]: { serializers: [], deserializers: [] }
[KiotaGenerationLanguage.TypeScript]: { serializers: [], deserializers: [] },
[KiotaGenerationLanguage.Dart]: { serializers: [], deserializers: [] }
},
};

Expand Down
2 changes: 2 additions & 0 deletions vscode/microsoft-kiota/src/types/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export enum KiotaGenerationLanguage {
Ruby = 7,
// eslint-disable-next-line @typescript-eslint/naming-convention
CLI = 8,
// eslint-disable-next-line @typescript-eslint/naming-convention
Dart = 9,
};

export enum KiotaPluginType {
Expand Down
1 change: 1 addition & 0 deletions vscode/microsoft-kiota/src/types/extensionSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export function getExtensionSettings(extensionId: string): ExtensionSettings {
[KiotaGenerationLanguage.Ruby]: getLanguageSerializationConfiguration(extensionId, "Ruby"),
[KiotaGenerationLanguage.Swift]: getLanguageSerializationConfiguration(extensionId, "Swift"),
[KiotaGenerationLanguage.TypeScript]: getLanguageSerializationConfiguration(extensionId, "TypeScript"),
[KiotaGenerationLanguage.Dart]: getLanguageSerializationConfiguration(extensionId, "Dart"),
},
};
}
Expand Down
Loading

0 comments on commit 86ad2ba

Please sign in to comment.