Skip to content

Commit e7907f3

Browse files
author
Chris Dayne
committed
Merge branch 'main' into feat/publish-filtering
2 parents 76bf0e6 + b327e63 commit e7907f3

67 files changed

Lines changed: 7172 additions & 166 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.copilot/skills/release-apiops-version/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Skill: Release apiops-cli Version
22

33
**Confidence:** high
4-
**Scope:** Any agent (or human) cutting a new release of `@peterhauge/apiops-cli`
4+
**Scope:** Any agent (or human) cutting a new release of `@azure-tools/apiops-cli`
55

66
## What
77

‎.github/ISSUE_TEMPLATE/bug-report.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ body:
3131
id: version
3232
attributes:
3333
label: apiops CLI version
34-
description: "Run `apiops --version` (or `npm list -g @peterhauge/apiops-cli`) to find the installed version."
34+
description: "Run `apiops --version` (or `npm list -g @azure-tools/apiops-cli`) to find the installed version."
3535
validations:
3636
required: true
3737

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ Desktop.ini
3535
*~
3636
.idea/
3737

38+
# VS Code local debug config (may contain local subscription IDs / paths)
39+
.vscode/launch.json
40+
3841
# Local testing output (use --output .local-extract for local runs)
3942
.local-extract*/
4043

@@ -61,3 +64,4 @@ tests/integration/**/bicep/source-apim-post-activation.bicep
6164
# Temporary files created by build process
6265
src/templates/generated/
6366
.squad/.cache/
67+
/.vs

‎.squad/agents/nodejsdev/charter.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ These are the concrete conventions I enforce in this project.
4141
- CLI commands wire Commander options to service functions — thin layer, no business logic in commands
4242

4343
#### Dual-Mode Package Consumption (Decision: 2026-04-29)
44-
- **Public npm mode** (default): `--cli-package` omitted → generates `package.json` referencing `"@peterhauge/apiops-cli": "latest"` from npm
44+
- **Public npm mode** (default): `--cli-package` omitted → generates `package.json` referencing `"@azure-tools/apiops-cli": "latest"` from npm
4545
- **Local tarball mode**: `--cli-package <path>` → copies tarball to `.apiops/` directory, generates `package.json` with `"apiops": "file:.apiops/{tarball}"`
4646
- Both modes must work — backward compatibility is non-negotiable
4747

‎.squad/agents/nodejsdev/history.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ program.version(packageJson.version);
122122

123123
### 2026-04-29: Dual-Mode Init — Public npm vs Local Tarball
124124

125-
**Problem:** After publishing `@peterhauge/apiops-cli` to npm, `apiops init` still required `--cli-package <path>` pointing to a local .tgz tarball, making the workflow cumbersome for users who just want to use the public package.
125+
**Problem:** After publishing `@azure-tools/apiops-cli` to npm, `apiops init` still required `--cli-package <path>` pointing to a local .tgz tarball, making the workflow cumbersome for users who just want to use the public package.
126126

127127
**Solution:** Made `--cli-package` optional and implemented two modes:
128128

@@ -133,7 +133,7 @@ program.version(packageJson.version);
133133

134134
2. **Public npm mode** (when `--cli-package` NOT provided):
135135
- No tarball copy, no `.apiops/` directory
136-
- Generates package.json with `"@peterhauge/apiops-cli": "latest"`
136+
- Generates package.json with `"@azure-tools/apiops-cli": "latest"`
137137
- Use case: Standard consumption after publishing to npm
138138

139139
**Implementation Details:**

‎.squad/agents/testengineer/history.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
- Updated local mode tests to use `{ mode: 'local', tarballRelPath: '...' }`
131131
- Added 6 new tests for npm mode covering:
132132
- Valid JSON generation
133-
- `@peterhauge/apiops-cli` dependency with `latest` version
133+
- `@azure-tools/apiops-cli` dependency with `latest` version
134134
- No `apiops` dependency (should be undefined)
135135
- Standard package.json properties (private, name, version)
136136
- Newline termination

‎.squad/config.json‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
{
22
"version": 1,
3-
"defaultModel": "claude-opus-4.6",
4-
"agentModelOverrides": {
5-
"ralph": "claude-haiku-4.5",
6-
"scribe": "claude-haiku-4.5"
7-
}
3+
"defaultModel": "gpt-5.6-sol"
84
}

‎.squad/decisions.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@
128128
### 2026-04-29T14:30:00Z: apiops init Dual-Mode Package Consumption
129129
**By:** NodeJsDev
130130
**Status:** Implemented
131-
**What:** Made `--cli-package` optional in `apiops init`. The command now supports two package consumption modes: (1) **Public npm mode** (default, when `--cli-package` NOT provided): generates package.json with `"@peterhauge/apiops-cli": "latest"`, no local tarball copy, no `.apiops/` directory created, standard consumption pattern after npm publish. (2) **Local tarball mode** (when `--cli-package <path>` provided): copies tarball to `.apiops/` directory, generates package.json with `"apiops": "file:.apiops/{tarball}"`, preserves existing behavior for local development/testing.
132-
**Why:** After publishing to npm as `@peterhauge/apiops-cli`, requiring users to download the package and run `apiops init --cli-package ./tarball.tgz` added unnecessary friction. Most users want to reference the public package directly. The change is backward compatible — existing workflows with `--cli-package` continue to work unchanged. Improves user experience with simpler onboarding.
131+
**What:** Made `--cli-package` optional in `apiops init`. The command now supports two package consumption modes: (1) **Public npm mode** (default, when `--cli-package` NOT provided): generates package.json with `"@azure-tools/apiops-cli": "latest"`, no local tarball copy, no `.apiops/` directory created, standard consumption pattern after npm publish. (2) **Local tarball mode** (when `--cli-package <path>` provided): copies tarball to `.apiops/` directory, generates package.json with `"apiops": "file:.apiops/{tarball}"`, preserves existing behavior for local development/testing.
132+
**Why:** After publishing to npm as `@azure-tools/apiops-cli`, requiring users to download the package and run `apiops init --cli-package ./tarball.tgz` added unnecessary friction. Most users want to reference the public package directly. The change is backward compatible — existing workflows with `--cli-package` continue to work unchanged. Improves user experience with simpler onboarding.
133133

134134
### 2026-04-21T19:35:00Z: SOAP/WADL spec extraction prefers link format with inline XML fallback
135135
**By:** ApimExpert (via Squad session with a user)

‎CHANGELOG.md‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ All notable changes to the APIOps CLI are documented in this file.
55
The format is inspired by [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66
This project uses [Semantic Versioning](https://semver.org/) with alpha pre-release tags.
77

8+
## [1.0.0] — 2026-08-27
9+
10+
### Breaking Changes
11+
12+
- **npm package moved to the Microsoft-owned scope** — install `@azure-tools/apiops-cli` instead of `@peterhauge/apiops-cli`; generated repositories, pipelines, documentation, and tarball names now use the new package name ([#239](https://github.com/Azure/apiops-cli/pull/239))
13+
14+
### Features
15+
16+
- **Azure API Center backup and restore** — new `apiops apic extract` and `apiops apic publish` commands round-trip API Center resources and API definition specifications ([#232](https://github.com/Azure/apiops-cli/pull/232))
17+
- **Filter exclusions** — filter entries can use a leading `!` to exclude exact names or wildcard patterns, including inside API and workspace sub-filters ([#222](https://github.com/Azure/apiops-cli/pull/222))
18+
- **Stale artifact cleanup** — `apiops extract --remove-stale` safely reconciles managed artifacts after a fully successful extraction, with generated pipelines opting into cleanup ([#246](https://github.com/Azure/apiops-cli/pull/246))
19+
20+
### Bug Fixes
21+
22+
- **Service-level policy filtering** — extraction now honors the `policies` filter for the service policy and documents the supported nested filter syntax ([#221](https://github.com/Azure/apiops-cli/pull/221))
23+
- **Operation schema links and dynamic authorization policies** — publishing preserves schema-bound OpenAPI request and response representations, while extraction no longer redacts dynamic `Authorization` policy expressions as secrets ([#239](https://github.com/Azure/apiops-cli/pull/239))
24+
- **HTTP 200 asynchronous updates** — trusted ARM async-operation responses are polled to completion even when the initial APIM response is HTTP 200 ([#243](https://github.com/Azure/apiops-cli/pull/243))
25+
- **GitHub secret preservation** — identity setup inventories existing repository and environment secrets and requires an explicit reuse, rename, or overwrite decision ([#244](https://github.com/Azure/apiops-cli/pull/244))
26+
27+
### Docs & Testing
28+
29+
- **Azure DevOps pipeline samples** — pipeline examples now live under `samples/pipelines/azure-devops` ([#241](https://github.com/Azure/apiops-cli/pull/241))
30+
- **Filter documentation alignment** — README and filter guides now cover wildcard exclusions, the singleton policy key, and supported nested API filter syntax ([#242](https://github.com/Azure/apiops-cli/pull/242))
31+
- **API Center command reference** — README and command documentation now describe `apiops apic` discovery, flags, defaults, examples, authentication, and output behavior ([#247](https://github.com/Azure/apiops-cli/pull/247))
32+
833
## [0.4.0-alpha.2] — 2026-07-02
934

1035
### Bug Fixes
@@ -140,7 +165,7 @@ This project uses [Semantic Versioning](https://semver.org/) with alpha pre-rele
140165
### Features
141166

142167
- **Azure DevOps `init`** — interactive Copilot prompt with managed identity / WIF support ([#31](https://github.com/Azure/apiops-cli/pull/31))
143-
- **Public npm registry support** — install directly from `@peterhauge/apiops-cli` on npmjs.com ([#28](https://github.com/Azure/apiops-cli/pull/28))
168+
- **Public npm registry support** — install directly from `@azure-tools/apiops-cli` on npmjs.com ([#28](https://github.com/Azure/apiops-cli/pull/28))
144169

145170
### Bug Fixes
146171

@@ -166,6 +191,7 @@ This project uses [Semantic Versioning](https://semver.org/) with alpha pre-rele
166191
- **Initial release** — core extract, publish, and init commands for Azure API Management ([#15](https://github.com/Azure/apiops-cli/pull/15))
167192
- **CodeQL analysis** — automated security scanning workflow ([#19](https://github.com/Azure/apiops-cli/pull/19))
168193

194+
[1.0.0]: https://github.com/Azure/apiops-cli/compare/v0.4.0-alpha.2...v1.0.0
169195
[0.4.0-alpha.2]: https://github.com/Azure/apiops-cli/compare/v0.4.0-alpha.0...v0.4.0-alpha.2
170196
[0.4.0-alpha.0]: https://github.com/Azure/apiops-cli/compare/v0.3.0-alpha.0...v0.4.0-alpha.0
171197
[0.3.0-alpha.0]: https://github.com/Azure/apiops-cli/compare/v0.2.1-alpha.0...v0.3.0-alpha.0

‎README.md‎

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
**Prerequisites:** An Azure subscription with an existing APIM resource, and Node.js ≥ 22.
1414

1515
```bash
16-
npm install -g @peterhauge/apiops-cli
16+
npm install -g @azure-tools/apiops-cli
1717
```
1818

1919
## Authentication
@@ -45,9 +45,11 @@ Extract APIM service configuration to local artifact files.
4545
| `--resource-group <rg>` | *(required)* | Azure resource group |
4646
| `--service-name <name>` | *(required)* | APIM service name |
4747
| `--output <dir>` | `./apim-artifacts` | Output directory |
48-
| `--filter <path>` | | Extract only matching resources |
48+
| `--filter <path>` | | Extract matching resources; supports wildcards and `!` exclusions |
4949
| `--no-transitive` | | Skip transitive dependencies |
5050

51+
Filter files support exact names, wildcards, quoted `!`-prefixed exclusions, and the singleton `policies` key. See the [extract command filter reference](docs/commands/extract.md#filter-configuration) for all 17 filter keys and the [filtering guide](docs/guides/filtering-resources.md) for detailed examples.
52+
5153
```bash
5254
apiops extract --help
5355

@@ -143,6 +145,30 @@ apiops init \
143145
--environments dev,prod
144146
```
145147

148+
### `apiops apic`
149+
150+
Back up and restore Azure API Center (`Microsoft.ApiCenter`) services. This command group is separate from the Azure API Management `extract` and `publish` commands.
151+
152+
| Command | Description |
153+
|---------|-------------|
154+
| `apiops apic extract` | Extract API Center configuration and API definition specifications to `./apic-artifacts` |
155+
| `apiops apic publish` | Publish API Center artifacts and specifications to an API Center service |
156+
157+
```bash
158+
# Back up an API Center service
159+
apiops apic extract \
160+
--resource-group <rg> \
161+
--service-name <name>
162+
163+
# Preview a restore without applying changes
164+
apiops apic publish \
165+
--resource-group <rg> \
166+
--service-name <name> \
167+
--dry-run
168+
```
169+
170+
See the [`apiops apic` command reference](docs/commands/apic.md) for flags, workspace extraction, and specification options.
171+
146172
## Global options
147173

148174
| Option | Default | Description |

0 commit comments

Comments
 (0)