Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Dec 17, 2023
1 parent 32841ae commit 722d939
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 109 deletions.
82 changes: 54 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,107 @@
# Azure CLI Tools

Scrapbooks for developing and running commands with the [Azure CLI](https://aka.ms/AzureCLI2).
Scrapbooks for developing and running commands with the
[Azure CLI](https://aka.ms/AzureCLI2).

Create `.azcli` files and use these features:
- IntelliSense for commands and their arguments.
- Snippets for commands, inserting required arguments automatically.
- Run the current command in the integrated terminal.
- Run the current command and show its output in a side-by-side editor.
- Show documentation on mouse hover.
- Display current subscription and defaults in status bar.

- IntelliSense for commands and their arguments.
- Snippets for commands, inserting required arguments automatically.
- Run the current command in the integrated terminal.
- Run the current command and show its output in a side-by-side editor.
- Show documentation on mouse hover.
- Display current subscription and defaults in status bar.

![Azure CLI Tools in Action](images/in_action.gif)

## Release Notes

### 0.5.0

- PR [Support multiline commands when running in editor](https://github.com/Microsoft/vscode-azurecli/pull/61) by [@mburleigh](https://github.com/mburleigh).
- PR
[Support multiline commands when running in editor](https://github.com/Microsoft/vscode-azurecli/pull/61)
by [@mburleigh](https://github.com/mburleigh).

### 0.4.6

- PR [Add status bar item to indicate progress](https://github.com/Microsoft/vscode-azurecli/pull/56) by [@mburleigh](https://github.com/mburleigh).
- PR [Open results in new editor](https://github.com/Microsoft/vscode-azurecli/pull/55) by [@mburleigh](https://github.com/mburleigh).
- Fix [Use CLIConfig](https://github.com/Microsoft/vscode-azurecli/issues/52).
- PR
[Add status bar item to indicate progress](https://github.com/Microsoft/vscode-azurecli/pull/56)
by [@mburleigh](https://github.com/mburleigh).
- PR
[Open results in new editor](https://github.com/Microsoft/vscode-azurecli/pull/55)
by [@mburleigh](https://github.com/mburleigh).
- Fix [Use CLIConfig](https://github.com/Microsoft/vscode-azurecli/issues/52).

### 0.4.5

- Fix [Read defaults_section_name from config](https://github.com/Microsoft/vscode-azurecli/issues/50).
- Fix
[Read defaults_section_name from config](https://github.com/Microsoft/vscode-azurecli/issues/50).

### 0.4.4

- Fix [wrong argument names](https://github.com/Microsoft/vscode-azurecli/issues/44).
- Fix
[wrong argument names](https://github.com/Microsoft/vscode-azurecli/issues/44).

### 0.4.3

- Fix [Extension complaining az not on PATH](https://github.com/Microsoft/vscode-azurecli/issues/46).
- Fix
[Extension complaining az not on PATH](https://github.com/Microsoft/vscode-azurecli/issues/46).

### 0.4.2

- Fix [no IntelliSense with latest Azure CLI](https://github.com/Microsoft/vscode-azurecli/issues/35).
- Fix
[no IntelliSense with latest Azure CLI](https://github.com/Microsoft/vscode-azurecli/issues/35).

### 0.4.1

- Fix [Azure CLI installed with Homebrew](https://github.com/Microsoft/vscode-azurecli/issues/25).
- Fix
[Azure CLI installed with Homebrew](https://github.com/Microsoft/vscode-azurecli/issues/25).

### 0.4.0

- Support for Azure CLI >=2.0.24
- Support for Azure CLI >=2.0.24

### 0.3.0

- Fix [delayed completion proposals on Windows](https://github.com/Microsoft/vscode-azurecli/issues/19).
- Fix [completion proposals hang when az crashes](https://github.com/Microsoft/vscode-azurecli/issues/20).
- Fix
[delayed completion proposals on Windows](https://github.com/Microsoft/vscode-azurecli/issues/19).
- Fix
[completion proposals hang when az crashes](https://github.com/Microsoft/vscode-azurecli/issues/20).

### 0.2.0

- Add 'Azure' marketplace category.
- Fix [failure when running commands in the Terminal](https://github.com/Microsoft/vscode-azurecli/issues/16).
- Add 'Azure' marketplace category.
- Fix
[failure when running commands in the Terminal](https://github.com/Microsoft/vscode-azurecli/issues/16).

### 0.1.0

- Improve argument sort order in IntelliSense.
- Fix handling of spaces in az's path on Windows. Did not work with MSI install.
- Fix version check for older versions. Should show a message asking to update az.
- Smaller bugfixes.
- Improve argument sort order in IntelliSense.
- Fix handling of spaces in az's path on Windows. Did not work with MSI
install.
- Fix version check for older versions. Should show a message asking to update
az.
- Smaller bugfixes.

### 0.0.1

Initial release.

## Contributing

File bugs and feature requests in [GitHub Issues](https://github.com/Microsoft/vscode-azurecli/issues).
File bugs and feature requests in
[GitHub Issues](https://github.com/Microsoft/vscode-azurecli/issues).

Checkout the source code in the [GitHub Repository](https://github.com/Microsoft/vscode-azurecli).
Checkout the source code in the
[GitHub Repository](https://github.com/Microsoft/vscode-azurecli).

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
This project has adopted the
[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the
[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any
additional questions or comments.

## License

[MIT](LICENSE)
20 changes: 10 additions & 10 deletions Source/azService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class AzService {
private listeners: {
[sequence: number]: (
err: undefined | any,
response: Message<any> | undefined,
response: Message<any> | undefined
) => void;
} = {};
private nextSequenceNumber = 1;
Expand All @@ -81,7 +81,7 @@ export class AzService {

async getCompletions(
query: CompletionQuery,
onCancel: (handle: () => void) => void,
onCancel: (handle: () => void) => void
): Promise<Completion[]> {
try {
return this.send<CompletionQuery, Completion[]>(query, onCancel);
Expand All @@ -97,20 +97,20 @@ export class AzService {

async getHover(
command: Command,
onCancel: (handle: () => void) => void,
onCancel: (handle: () => void) => void
): Promise<HoverText> {
return this.send<HoverQuery, HoverText>(
{
request: "hover",
command,
},
onCancel,
onCancel
);
}

private async send<T, R>(
data: T,
onCancel?: (handle: () => void) => void,
onCancel?: (handle: () => void) => void
): Promise<R> {
const process = await this.getProcess();
return new Promise<R>((resolve, reject) => {
Expand Down Expand Up @@ -161,7 +161,7 @@ export class AzService {
throw "wrongVersion";
}
const pythonLocation = (/^Python location '([^']*)'/m.exec(
stdout,
stdout
) || [])[1];
const processOptions = await this.getSpawnProcessOptions();
return this.spawn(pythonLocation, processOptions);
Expand All @@ -180,7 +180,7 @@ export class AzService {
if (binPath.startsWith(cellarBasePath)) {
const installPath = binPath.substr(
0,
binPath.indexOf("/", cellarBasePath.length),
binPath.indexOf("/", cellarBasePath.length)
);
const libPath = `${installPath}/libexec/lib`;
const entries = await readdir(libPath);
Expand All @@ -202,10 +202,10 @@ export class AzService {
const process = spawn(
join(
__dirname,
`../../service/az-service${isWindows ? ".bat" : ""}`,
`../../service/az-service${isWindows ? ".bat" : ""}`
),
[pythonLocation],
processOptions,
processOptions
);
process.stdout.setEncoding("utf8");
process.stdout.on("data", (data) => {
Expand Down Expand Up @@ -237,7 +237,7 @@ export class AzService {
delete this.listeners[sequence];
listener(
`Python process terminated with exit code ${code}, signal ${signal}.`,
undefined,
undefined
);
}
});
Expand Down
Loading

0 comments on commit 722d939

Please sign in to comment.