-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b01ff5
commit 0b06a0b
Showing
671 changed files
with
16,316 additions
and
79,989 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "core"] | ||
path = core | ||
url = https://github.com/microsoft/typespec.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,39 @@ | ||
mvn clean install -P local,tsp -DskipTests "-Djacoco.skip" | ||
$ErrorActionPreference = "Stop" | ||
|
||
Write-Host "Apply diff to core" | ||
Push-Location ./core | ||
try { | ||
git checkout . | ||
git apply ../core.diff --ignore-whitespace | ||
} finally { | ||
Pop-Location | ||
} | ||
|
||
Write-Host "Build JAR" | ||
mvn clean install -P tsp --no-transfer-progress | ||
if ($LASTEXITCODE -ne 0) { | ||
exit $LASTEXITCODE | ||
} | ||
|
||
Write-Host "Copy JAR and TypeSpec code to './typespec-extension' directory" | ||
# Copy JAR | ||
New-Item -ItemType File -Path ./typespec-extension/generator/http-client-generator/target/emitter.jar -Force | ||
Copy-Item ./core/packages/http-client-java/generator/http-client-generator/target/emitter.jar ./typespec-extension/generator/http-client-generator/target/emitter.jar -Force | ||
# Copy TypeScript code | ||
Copy-Item -Path ./core/packages/http-client-java/emitter/src -Destination ./typespec-extension/ -Recurse -Force | ||
|
||
Write-Host "Build and Pack typespec-java" | ||
Push-Location ./typespec-extension/ | ||
try { | ||
npm ci | ||
npm run build | ||
npm run lint | ||
npm pack | ||
npm ci | ||
npm run build | ||
npm run lint | ||
# npm run check-format | ||
npm pack | ||
if ($LASTEXITCODE -ne 0) { | ||
exit $LASTEXITCODE | ||
} | ||
} | ||
finally { | ||
Pop-Location | ||
Pop-Location | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
diff --git a/packages/http-client-java/emitter/src/code-model-builder.ts b/packages/http-client-java/emitter/src/code-model-builder.ts | ||
index 263da6dd..121a62f2 100644 | ||
--- a/packages/http-client-java/emitter/src/code-model-builder.ts | ||
+++ b/packages/http-client-java/emitter/src/code-model-builder.ts | ||
@@ -240,7 +240,7 @@ export class CodeModelBuilder { | ||
} | ||
|
||
public async build(): Promise<CodeModel> { | ||
- this.sdkContext = await createSdkContext(this.emitterContext, "@typespec/http-client-java", { | ||
+ this.sdkContext = await createSdkContext(this.emitterContext, "@azure-tools/typespec-java", { | ||
versioning: { previewStringRegex: /$/ }, | ||
}); // include all versions and do the filter by ourselves | ||
|
||
diff --git a/packages/http-client-java/emitter/src/emitter.ts b/packages/http-client-java/emitter/src/emitter.ts | ||
index b3527bd6..1130efff 100644 | ||
--- a/packages/http-client-java/emitter/src/emitter.ts | ||
+++ b/packages/http-client-java/emitter/src/emitter.ts | ||
@@ -98,7 +98,7 @@ const EmitterOptionsSchema: JSONSchemaType<EmitterOptions> = { | ||
}; | ||
|
||
export const $lib = createTypeSpecLibrary({ | ||
- name: "@typespec/http-client-java", | ||
+ name: "@azure-tools/typespec-java", | ||
diagnostics: {}, | ||
emitter: { | ||
options: EmitterOptionsSchema, | ||
diff --git a/packages/http-client-java/generator/http-client-generator-core/pom.xml b/packages/http-client-java/generator/http-client-generator-core/pom.xml | ||
index 33442326..e57b77bb 100644 | ||
--- a/packages/http-client-java/generator/http-client-generator-core/pom.xml | ||
+++ b/packages/http-client-java/generator/http-client-generator-core/pom.xml | ||
@@ -19,6 +19,11 @@ | ||
</properties> | ||
|
||
<dependencies> | ||
+ <dependency> | ||
+ <groupId>com.azure.tools</groupId> | ||
+ <artifactId>azure-autorest-customization</artifactId> | ||
+ <version>1.0.0-beta.8</version> | ||
+ </dependency> | ||
<dependency> | ||
<groupId>com.azure</groupId> | ||
<artifactId>azure-core</artifactId> | ||
diff --git a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/postprocessor/Postprocessor.java b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/postprocessor/Postprocessor.java | ||
index 0ff22ae8..33e7b162 100644 | ||
--- a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/postprocessor/Postprocessor.java | ||
+++ b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/postprocessor/Postprocessor.java | ||
@@ -3,8 +3,8 @@ | ||
|
||
package com.microsoft.typespec.http.client.generator.core.postprocessor; | ||
|
||
-import com.microsoft.typespec.http.client.generator.core.customization.Customization; | ||
-import com.microsoft.typespec.http.client.generator.core.customization.implementation.Utils; | ||
+import com.azure.autorest.customization.Customization; | ||
+import com.azure.autorest.customization.implementation.Utils; | ||
import com.microsoft.typespec.http.client.generator.core.extension.plugin.JavaSettings; | ||
import com.microsoft.typespec.http.client.generator.core.extension.plugin.NewPlugin; | ||
import com.microsoft.typespec.http.client.generator.core.extension.plugin.PluginLogger; | ||
diff --git a/packages/http-client-java/generator/http-client-generator/src/main/resources/readme/pom.xml b/packages/http-client-java/generator/http-client-generator/src/main/resources/readme/pom.xml | ||
index b009d250..6ef31a2d 100644 | ||
--- a/packages/http-client-java/generator/http-client-generator/src/main/resources/readme/pom.xml | ||
+++ b/packages/http-client-java/generator/http-client-generator/src/main/resources/readme/pom.xml | ||
@@ -16,9 +16,9 @@ | ||
|
||
<dependencies> | ||
<dependency> | ||
- <groupId>com.microsoft.typespec</groupId> | ||
- <artifactId>http-client-generator-core</artifactId> | ||
- <version>1.0.0-beta.1</version> | ||
+ <groupId>com.azure.tools</groupId> | ||
+ <artifactId>azure-autorest-customization</artifactId> | ||
+ <version>1.0.0-beta.8</version> | ||
</dependency> | ||
</dependencies> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.