@sfdxy/anypoint-connect 0.11.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -114
- package/dist/api/DesignCenterApi.d.ts +22 -5
- package/dist/api/DesignCenterApi.d.ts.map +1 -1
- package/dist/api/DesignCenterApi.js +80 -46
- package/dist/api/DesignCenterApi.js.map +1 -1
- package/dist/api/DesignCenterWorkflow.d.ts +65 -0
- package/dist/api/DesignCenterWorkflow.d.ts.map +1 -0
- package/dist/api/DesignCenterWorkflow.js +186 -0
- package/dist/api/DesignCenterWorkflow.js.map +1 -0
- package/dist/api/ExchangeApi.d.ts +6 -0
- package/dist/api/ExchangeApi.d.ts.map +1 -1
- package/dist/api/ExchangeApi.js +16 -0
- package/dist/api/ExchangeApi.js.map +1 -1
- package/dist/api/GovernanceApi.d.ts +26 -0
- package/dist/api/GovernanceApi.d.ts.map +1 -0
- package/dist/api/GovernanceApi.js +27 -0
- package/dist/api/GovernanceApi.js.map +1 -0
- package/dist/api/index.d.ts +3 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/auth/OAuthCallbackPage.d.ts +23 -0
- package/dist/auth/OAuthCallbackPage.d.ts.map +1 -0
- package/dist/auth/OAuthCallbackPage.js +155 -0
- package/dist/auth/OAuthCallbackPage.js.map +1 -0
- package/dist/auth/OAuthFlow.d.ts +7 -1
- package/dist/auth/OAuthFlow.d.ts.map +1 -1
- package/dist/auth/OAuthFlow.js +42 -32
- package/dist/auth/OAuthFlow.js.map +1 -1
- package/dist/auth/TokenManager.d.ts +2 -0
- package/dist/auth/TokenManager.d.ts.map +1 -1
- package/dist/auth/TokenManager.js +34 -9
- package/dist/auth/TokenManager.js.map +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/client/AnypointClient.d.ts +4 -0
- package/dist/client/AnypointClient.d.ts.map +1 -1
- package/dist/client/AnypointClient.js +6 -0
- package/dist/client/AnypointClient.js.map +1 -1
- package/dist/commands/auth.js +1 -1
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/config.d.ts +1 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +13 -3
- package/dist/commands/config.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/tools/design-center.d.ts.map +1 -1
- package/dist/mcp/tools/design-center.js +182 -6
- package/dist/mcp/tools/design-center.js.map +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -1,196 +1,183 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="docs/assets/logo.svg" alt="Anypoint Connect
|
|
2
|
+
<img src="docs/assets/logo.svg" alt="Anypoint Connect — CLI and MCP toolkit for Anypoint Platform" width="640" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<a href="https://www.npmjs.com/package/@sfdxy/anypoint-connect"><img src="https://img.shields.io/npm/v/@sfdxy/anypoint-connect?style=flat-square&color=
|
|
7
|
-
<a href="https://github.com/Avinava/anypoint-connect/actions"><img src="https://img.shields.io/github/actions/workflow/status/Avinava/anypoint-connect/ci.yml?style=flat-square
|
|
8
|
-
<a href="https://github.com/Avinava/anypoint-connect/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@sfdxy/anypoint-connect?style=flat-square
|
|
9
|
-
<a href="https://www.npmjs.com/package/@sfdxy/anypoint-connect"><img src="https://img.shields.io/npm/dm/@sfdxy/anypoint-connect?style=flat-square&color=fbbf24" alt="Downloads" /></a>
|
|
6
|
+
<a href="https://www.npmjs.com/package/@sfdxy/anypoint-connect"><img src="https://img.shields.io/npm/v/@sfdxy/anypoint-connect?style=flat-square&color=087ea4" alt="npm version" /></a>
|
|
7
|
+
<a href="https://github.com/Avinava/anypoint-connect/actions"><img src="https://img.shields.io/github/actions/workflow/status/Avinava/anypoint-connect/ci.yml?style=flat-square" alt="CI status" /></a>
|
|
8
|
+
<a href="https://github.com/Avinava/anypoint-connect/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@sfdxy/anypoint-connect?style=flat-square" alt="MIT license" /></a>
|
|
10
9
|
</p>
|
|
11
10
|
|
|
12
11
|
<p align="center">
|
|
13
|
-
<strong>
|
|
12
|
+
<strong>Operate Anypoint Platform from a CLI, an MCP client, or JavaScript—with guarded mutations and one shared authentication layer.</strong>
|
|
14
13
|
</p>
|
|
15
14
|
|
|
16
15
|
<p align="center">
|
|
17
|
-
<a href="https://avinava.github.io/anypoint-connect/">Documentation</a>
|
|
18
|
-
<a href="
|
|
19
|
-
<a href="
|
|
20
|
-
<a href="
|
|
21
|
-
<a href="#safety">Safety</a> •
|
|
22
|
-
<a href="#ecosystem">Ecosystem</a>
|
|
16
|
+
<a href="https://avinava.github.io/anypoint-connect/">Documentation</a> ·
|
|
17
|
+
<a href="https://avinava.github.io/anypoint-connect/getting-started/">Getting started</a> ·
|
|
18
|
+
<a href="https://avinava.github.io/anypoint-connect/credentials/">Credentials</a> ·
|
|
19
|
+
<a href="https://avinava.github.io/anypoint-connect/recipes/">Recipes</a>
|
|
23
20
|
</p>
|
|
24
21
|
|
|
25
22
|
---
|
|
26
23
|
|
|
27
|
-
##
|
|
24
|
+
## Start here
|
|
25
|
+
|
|
26
|
+
You need Node.js `>=22`; Node.js 24 LTS is recommended. If Node and npm are unfamiliar, follow the
|
|
27
|
+
[15-minute setup](https://avinava.github.io/anypoint-connect/getting-started/) instead of guessing through
|
|
28
|
+
the commands below.
|
|
28
29
|
|
|
29
30
|
```bash
|
|
30
|
-
#
|
|
31
|
-
npm install
|
|
31
|
+
# Install
|
|
32
|
+
npm install --global @sfdxy/anypoint-connect
|
|
32
33
|
|
|
33
|
-
#
|
|
34
|
+
# Save a Connected App Client ID and Secret
|
|
34
35
|
anc config init
|
|
35
36
|
|
|
36
|
-
#
|
|
37
|
+
# Authorize your Anypoint user in the browser
|
|
37
38
|
anc auth login
|
|
38
39
|
|
|
39
|
-
#
|
|
40
|
+
# Verify the local session and one visible environment
|
|
40
41
|
anc auth status
|
|
42
|
+
anc apps list --env Sandbox
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
The Connected App must be **App acts on behalf of a user**, use Authorization Code, redirect to
|
|
46
|
+
`http://localhost:3000/api/callback`, and include **Full Access** plus **Background Access**. The
|
|
47
|
+
[credential guide](https://avinava.github.io/anypoint-connect/credentials/) gives the exact UI fields,
|
|
48
|
+
administrator handoff, storage model, rotation steps, and troubleshooting.
|
|
46
49
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
## Credential model
|
|
51
|
+
|
|
52
|
+
| Item | Purpose | Storage |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| Client ID | Identifies the Connected App | Profile `config.json` |
|
|
55
|
+
| Client Secret | Authenticates the local client | Profile `config.json`, restricted to the current OS user |
|
|
56
|
+
| OAuth tokens | Represent the user-authorized session | AES-256-GCM encrypted `tokens.enc` |
|
|
52
57
|
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
The ID and Secret do not provide access without a browser-authorized user session. Environment variables
|
|
59
|
+
can override where app credentials come from, but they do not implement headless CI authentication. This
|
|
60
|
+
release does not support the `client_credentials` grant, and its encrypted token file is machine-bound.
|
|
55
61
|
|
|
56
62
|
## What it does
|
|
57
63
|
|
|
58
64
|
| Area | Examples |
|
|
59
65
|
| --- | --- |
|
|
60
66
|
| Applications | Status, deployment spec, resources, settings, deploy, redeploy, rollback, restart, scale, stop, start, delete |
|
|
61
|
-
| Logs | Tail, download, error clustering with context
|
|
62
|
-
| Monitoring | Request metrics, percentiles, time series, per-replica, JVM memory and GC, freeform AMQL |
|
|
63
|
-
| Exchange | Search, asset
|
|
67
|
+
| Logs | Tail, download, error clustering with context, recurring patterns, statistical health |
|
|
68
|
+
| Monitoring | Request metrics, percentiles, time series, per-replica metrics, JVM memory and GC, freeform AMQL |
|
|
69
|
+
| Exchange | Search, asset details, spec download, JAR publication, environment comparison |
|
|
64
70
|
| API Manager | Instances, policies, SLA tiers, alerts |
|
|
65
|
-
| Design Center | Projects,
|
|
66
|
-
| Platform | Environments, entitlements, audit log |
|
|
67
|
-
| Anypoint MQ | Queues, depth and throughput, dead-letter browsing, test publishing |
|
|
68
|
-
| Object Store v2 | Stores, keys, values |
|
|
71
|
+
| Design Center | Projects, branches, conflict-safe file synchronization, governed publication |
|
|
72
|
+
| Platform services | Environments, entitlements, audit log, Anypoint MQ, Object Store v2 |
|
|
69
73
|
|
|
70
|
-
|
|
71
|
-
[CLI reference](https://avinava.github.io/anypoint-connect/cli-reference/).
|
|
74
|
+
Copyable task flows are in [Common recipes](https://avinava.github.io/anypoint-connect/recipes/); every CLI
|
|
75
|
+
command is in the [CLI reference](https://avinava.github.io/anypoint-connect/cli-reference/).
|
|
72
76
|
|
|
73
77
|
## MCP server
|
|
74
78
|
|
|
75
|
-
|
|
76
|
-
session.
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
anc config init
|
|
80
|
-
anc auth login
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Every host runs the same command; only the file and the wrapping key differ.
|
|
84
|
-
|
|
85
|
-
| Host | Where it goes | Wrapping key |
|
|
86
|
-
| --- | --- | --- |
|
|
87
|
-
| Claude Code | `.mcp.json`, or `claude mcp add` | `mcpServers` |
|
|
88
|
-
| Claude Desktop | `claude_desktop_config.json` | `mcpServers` |
|
|
89
|
-
| Codex | `.codex/config.toml`, or `codex mcp add` | `[mcp_servers.anypoint-connect]` |
|
|
90
|
-
| VS Code, Copilot Chat | `.vscode/mcp.json` | `servers`, plus `"type": "stdio"` |
|
|
91
|
-
| Copilot CLI, Gemini, other MCP clients | `.mcp.json` | `mcpServers` |
|
|
79
|
+
Authenticate in a terminal before starting the server. The MCP host never receives the Client Secret or
|
|
80
|
+
OAuth tokens; it sends tool calls to the local server that owns the session.
|
|
92
81
|
|
|
93
82
|
```json
|
|
94
83
|
{
|
|
95
84
|
"mcpServers": {
|
|
96
85
|
"anypoint-connect": {
|
|
97
86
|
"command": "npx",
|
|
98
|
-
"args": ["-y", "@sfdxy/anypoint-connect@0.
|
|
87
|
+
"args": ["-y", "@sfdxy/anypoint-connect@0.13.0", "mcp"]
|
|
99
88
|
}
|
|
100
89
|
}
|
|
101
90
|
}
|
|
102
91
|
```
|
|
103
92
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
`
|
|
107
|
-
tools.
|
|
93
|
+
VS Code uses a `servers` wrapper and Codex uses TOML. See the
|
|
94
|
+
[MCP guide](https://avinava.github.io/anypoint-connect/mcp/) or copy a checked-in configuration from
|
|
95
|
+
[`examples/mcp`](examples/mcp).
|
|
108
96
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
97
|
+
Example requests use synthetic names:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
What applications are visible in Sandbox? Read only.
|
|
101
|
+
Analyze errors for sample-orders-api in Sandbox over the last two hours.
|
|
102
|
+
Preview a deployment of target/sample-orders-api-1.3.0-mule-application.jar to Sandbox; do not apply it.
|
|
103
|
+
```
|
|
112
104
|
|
|
113
105
|
## Safety
|
|
114
106
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
capacity. `update_app_settings` PATCHes only application properties, merging protected values rather than
|
|
119
|
-
blanking them. Deletion requires a deployment-ID-bound confirmation — plus a separate acknowledgement in
|
|
120
|
-
production — so it fails closed if the deployment changed since you looked.
|
|
107
|
+
Mutating MCP tools are previews until `confirm: true` is supplied. Artifact updates preserve runtime,
|
|
108
|
+
target, replicas, and settings. Deletion requires the deployment ID returned by the preview, and
|
|
109
|
+
production operations require an additional acknowledgement.
|
|
121
110
|
|
|
122
111
|
```jsonc
|
|
123
|
-
//
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
112
|
+
// Preview only
|
|
113
|
+
update_app_artifact({
|
|
114
|
+
"appName": "sample-orders-api",
|
|
115
|
+
"environment": "Sandbox",
|
|
116
|
+
"version": "1.3.0"
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
// Apply the reviewed change
|
|
120
|
+
update_app_artifact({
|
|
121
|
+
"appName": "sample-orders-api",
|
|
122
|
+
"environment": "Sandbox",
|
|
123
|
+
"version": "1.3.0",
|
|
124
|
+
"confirm": true
|
|
125
|
+
})
|
|
127
126
|
```
|
|
128
127
|
|
|
129
|
-
|
|
130
|
-
and rollback path in [Deploying a JAR](https://avinava.github.io/anypoint-connect/deployment-tools/).
|
|
131
|
-
|
|
132
|
-
## When something fails
|
|
133
|
-
|
|
134
|
-
Access problems come in six distinct states — not configured, not authenticated, environment not visible,
|
|
135
|
-
not permitted, transient, and ready — and they have different fixes. The error text names which one you
|
|
136
|
-
are in. See [Access readiness](https://avinava.github.io/anypoint-connect/readiness/) and
|
|
137
|
-
[Troubleshooting](https://avinava.github.io/anypoint-connect/troubleshooting/).
|
|
128
|
+
The complete contract is in the [safety model](https://avinava.github.io/anypoint-connect/safety/).
|
|
138
129
|
|
|
139
130
|
## Library
|
|
140
131
|
|
|
141
|
-
|
|
132
|
+
The library reuses a profile authenticated with `anc auth login`. The Client ID and Secret construct the
|
|
133
|
+
client; the profile selects the encrypted token store.
|
|
134
|
+
|
|
135
|
+
```javascript
|
|
142
136
|
import { AnypointClient } from '@sfdxy/anypoint-connect';
|
|
143
137
|
|
|
144
138
|
const client = new AnypointClient({
|
|
145
|
-
clientId: process.env.ANYPOINT_CLIENT_ID
|
|
146
|
-
clientSecret: process.env.ANYPOINT_CLIENT_SECRET
|
|
139
|
+
clientId: process.env.ANYPOINT_CLIENT_ID,
|
|
140
|
+
clientSecret: process.env.ANYPOINT_CLIENT_SECRET,
|
|
141
|
+
profileName: process.env.ANYPOINT_PROFILE || 'default',
|
|
147
142
|
});
|
|
148
143
|
|
|
149
|
-
const
|
|
150
|
-
const
|
|
144
|
+
const identity = await client.whoami();
|
|
145
|
+
const environments = await client.accessManagement.getEnvironments(identity.organization.id);
|
|
146
|
+
console.log(`Authenticated; ${environments.length} environment(s) visible.`);
|
|
151
147
|
```
|
|
152
148
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
[library guide](https://avinava.github.io/anypoint-connect/library/).
|
|
149
|
+
Direct API clients include bearer injection, refresh, rate limiting, and caching. They do not include the
|
|
150
|
+
CLI/MCP confirmation gates. Start with the runnable JavaScript example in
|
|
151
|
+
[`examples/library`](examples/library) and read the [library guide](https://avinava.github.io/anypoint-connect/library/).
|
|
156
152
|
|
|
157
|
-
##
|
|
153
|
+
## Profiles and multiple organizations
|
|
158
154
|
|
|
159
|
-
|
|
155
|
+
Use neutral profile names rather than customer names:
|
|
160
156
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
| [Deploying a JAR](docs/deployment-tools.md) | Build, publish, deploy, roll back |
|
|
171
|
-
| [Library API](docs/library.md) | Programmatic use |
|
|
172
|
-
| [Troubleshooting](docs/troubleshooting.md) | Symptoms and causes |
|
|
173
|
-
| [Architecture](docs/architecture.md) | Layers and design notes |
|
|
174
|
-
|
|
175
|
-
## Ecosystem
|
|
176
|
-
|
|
177
|
-
The canonical package matrix and supported combination live in the
|
|
178
|
-
[`mule-skills` ecosystem hub](https://avinava.github.io/mule-skills/ecosystem/). This is the only tool
|
|
179
|
-
in the set that needs Anypoint credentials. A complete release crosses two boundaries: `mule-build`
|
|
180
|
-
produces and versions the artifact, while this package puts it in an environment. More detail is on
|
|
181
|
-
the local [ecosystem page](docs/ecosystem.md).
|
|
157
|
+
```bash
|
|
158
|
+
anc config init --profile team-a
|
|
159
|
+
anc auth login --profile team-a
|
|
160
|
+
anc config use team-a
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
The directory binding contains only a local profile label, but it can still reveal internal context. Add
|
|
164
|
+
`.anypoint-connect.json` to the project's `.gitignore`. Resolution rules and storage layout are in
|
|
165
|
+
[Profiles](https://avinava.github.io/anypoint-connect/profiles/).
|
|
182
166
|
|
|
183
167
|
## Development
|
|
184
168
|
|
|
185
169
|
```bash
|
|
170
|
+
nvm use
|
|
186
171
|
npm install
|
|
187
172
|
npm run build
|
|
188
173
|
npm test
|
|
189
174
|
npm run lint
|
|
175
|
+
npm run docs:check
|
|
176
|
+
mkdocs build --strict
|
|
190
177
|
```
|
|
191
178
|
|
|
192
|
-
|
|
193
|
-
|
|
179
|
+
CI tests Node 22, 24, and 26. Documentation is built with MkDocs Material and published through GitHub
|
|
180
|
+
Pages. Releases are tag-triggered and published to npm with provenance.
|
|
194
181
|
|
|
195
182
|
## License
|
|
196
183
|
|
|
@@ -31,6 +31,10 @@ export interface DesignCenterBranch {
|
|
|
31
31
|
commitId?: string;
|
|
32
32
|
isDefault?: boolean;
|
|
33
33
|
}
|
|
34
|
+
export interface DesignCenterSaveFile {
|
|
35
|
+
path: string;
|
|
36
|
+
content: string;
|
|
37
|
+
}
|
|
34
38
|
export interface PublishToExchangeOptions {
|
|
35
39
|
name: string;
|
|
36
40
|
apiVersion: string;
|
|
@@ -56,24 +60,25 @@ export declare class DesignCenterApi {
|
|
|
56
60
|
/**
|
|
57
61
|
* List all Design Center projects in the organization.
|
|
58
62
|
*/
|
|
59
|
-
getProjects(orgId: string): Promise<DesignCenterProject[]>;
|
|
63
|
+
getProjects(orgId: string, refresh?: boolean): Promise<DesignCenterProject[]>;
|
|
60
64
|
/**
|
|
61
65
|
* Get project details by ID.
|
|
62
66
|
*/
|
|
63
67
|
getProject(orgId: string, projectId: string): Promise<DesignCenterProject>;
|
|
64
|
-
/**
|
|
65
|
-
* Find a project by name (case-insensitive partial match).
|
|
66
|
-
*/
|
|
68
|
+
/** Find a project by exact name. Partial project matching is intentionally unsafe. */
|
|
67
69
|
findByName(orgId: string, name: string): Promise<DesignCenterProject | null>;
|
|
68
70
|
/**
|
|
69
71
|
* Find a project by name, throwing if not found.
|
|
70
72
|
* Preferred over findByName when the project must exist.
|
|
71
73
|
*/
|
|
72
74
|
findByNameOrThrow(orgId: string, name: string): Promise<DesignCenterProject>;
|
|
75
|
+
/** Create a new API design project after an exact collision check. */
|
|
76
|
+
createProject(orgId: string, name: string, classifier: 'raml' | 'oas'): Promise<DesignCenterProject>;
|
|
73
77
|
/**
|
|
74
78
|
* List branches for a project.
|
|
75
79
|
*/
|
|
76
80
|
getBranches(orgId: string, projectId: string): Promise<DesignCenterBranch[]>;
|
|
81
|
+
createBranch(orgId: string, projectId: string, name: string, commitId?: string): Promise<DesignCenterBranch>;
|
|
77
82
|
/**
|
|
78
83
|
* List all files in a project branch.
|
|
79
84
|
*/
|
|
@@ -97,10 +102,15 @@ export declare class DesignCenterApi {
|
|
|
97
102
|
* Release the write lock on a project branch.
|
|
98
103
|
*/
|
|
99
104
|
releaseLock(orgId: string, projectId: string, branch?: string): Promise<void>;
|
|
105
|
+
/** Refresh a branch lock before the service's approximately one-minute expiry. */
|
|
106
|
+
maintainLock(orgId: string, projectId: string, branch?: string): Promise<void>;
|
|
100
107
|
/**
|
|
101
108
|
* Save a file to a project branch. Requires the lock to be held.
|
|
102
109
|
*/
|
|
103
110
|
saveFile(orgId: string, projectId: string, filePath: string, content: string, branch?: string, commitMessage?: string): Promise<void>;
|
|
111
|
+
/** Save multiple files in the API's single batch operation. Requires a held lock. */
|
|
112
|
+
saveFiles(orgId: string, projectId: string, files: DesignCenterSaveFile[], branch?: string, commitMessage?: string): Promise<void>;
|
|
113
|
+
withLock<T>(orgId: string, projectId: string, branch: string, operation: () => Promise<T>): Promise<T>;
|
|
104
114
|
/**
|
|
105
115
|
* Atomically update a file: acquires lock → saves → releases lock.
|
|
106
116
|
* Uses try/finally to always release the lock, even on failure.
|
|
@@ -112,7 +122,8 @@ export declare class DesignCenterApi {
|
|
|
112
122
|
*/
|
|
113
123
|
getExchangeJson(orgId: string, projectId: string, branch?: string): Promise<Record<string, unknown> | null>;
|
|
114
124
|
/**
|
|
115
|
-
*
|
|
125
|
+
* Legacy direct publication path retained for compatibility.
|
|
126
|
+
* New callers should use the preview-bound DesignCenterWorkflow.
|
|
116
127
|
*
|
|
117
128
|
* The DC XP API expects all publish parameters in the JSON body, NOT in the URL path.
|
|
118
129
|
* Endpoint: POST /designcenter/api-designer/projects/{projectId}/branches/{branch}/publish/exchange
|
|
@@ -125,5 +136,11 @@ export declare class DesignCenterApi {
|
|
|
125
136
|
assetId: string;
|
|
126
137
|
version: string;
|
|
127
138
|
}>;
|
|
139
|
+
/** Publish while the caller holds the branch lock. */
|
|
140
|
+
publishToExchangeLocked(orgId: string, projectId: string, options: PublishToExchangeOptions, branch?: string): Promise<{
|
|
141
|
+
groupId: string;
|
|
142
|
+
assetId: string;
|
|
143
|
+
version: string;
|
|
144
|
+
}>;
|
|
128
145
|
}
|
|
129
146
|
//# sourceMappingURL=DesignCenterApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesignCenterApi.d.ts","sourceRoot":"","sources":["../../src/api/DesignCenterApi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAKhD,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM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iB,CACnB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,wBAAwB,EACjC,MAAM,SAAW,GAClB,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAMjE,sDAAsD;IAChD,uBAAuB,CACzB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,wBAAwB,EACjC,MAAM,SAAW,GAClB,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CA8BpE"}
|
|
@@ -40,9 +40,11 @@ export class DesignCenterApi {
|
|
|
40
40
|
/**
|
|
41
41
|
* List all Design Center projects in the organization.
|
|
42
42
|
*/
|
|
43
|
-
async getProjects(orgId) {
|
|
43
|
+
async getProjects(orgId, refresh = false) {
|
|
44
44
|
const ownerId = await this.getOwnerId();
|
|
45
45
|
const cacheKey = `dc:projects:${orgId}`;
|
|
46
|
+
if (refresh)
|
|
47
|
+
this.cache.delete(cacheKey);
|
|
46
48
|
return this.cache.getOrCompute(cacheKey, async () => {
|
|
47
49
|
return this.http.get(`${BASE}/projects`, {
|
|
48
50
|
headers: this.dcHeaders(orgId, ownerId),
|
|
@@ -58,25 +60,42 @@ export class DesignCenterApi {
|
|
|
58
60
|
headers: this.dcHeaders(orgId, ownerId),
|
|
59
61
|
});
|
|
60
62
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Find a project by name (case-insensitive partial match).
|
|
63
|
-
*/
|
|
63
|
+
/** Find a project by exact name. Partial project matching is intentionally unsafe. */
|
|
64
64
|
async findByName(orgId, name) {
|
|
65
65
|
const projects = await this.getProjects(orgId);
|
|
66
|
-
const
|
|
67
|
-
|
|
66
|
+
const exact = projects.find((project) => project.name === name);
|
|
67
|
+
if (exact)
|
|
68
|
+
return exact;
|
|
69
|
+
const insensitive = projects.filter((project) => project.name.toLowerCase() === name.toLowerCase());
|
|
70
|
+
if (insensitive.length > 1) {
|
|
71
|
+
throw new Error(`Multiple projects have the same case-insensitive name "${name}"; use the project ID.`);
|
|
72
|
+
}
|
|
73
|
+
return insensitive[0] || null;
|
|
68
74
|
}
|
|
69
75
|
/**
|
|
70
76
|
* Find a project by name, throwing if not found.
|
|
71
77
|
* Preferred over findByName when the project must exist.
|
|
72
78
|
*/
|
|
73
79
|
async findByNameOrThrow(orgId, name) {
|
|
74
|
-
const
|
|
80
|
+
const projects = await this.getProjects(orgId);
|
|
81
|
+
const byId = projects.find((candidate) => candidate.id === name);
|
|
82
|
+
const project = byId || (await this.findByName(orgId, name));
|
|
75
83
|
if (!project) {
|
|
76
84
|
throw new Error(`Project "${name}" not found. Use list_design_center_projects to see available projects.`);
|
|
77
85
|
}
|
|
78
86
|
return project;
|
|
79
87
|
}
|
|
88
|
+
/** Create a new API design project after an exact collision check. */
|
|
89
|
+
async createProject(orgId, name, classifier) {
|
|
90
|
+
const projects = await this.getProjects(orgId, true);
|
|
91
|
+
if (projects.some((project) => project.name.toLowerCase() === name.toLowerCase())) {
|
|
92
|
+
throw new Error(`A Design Center project named "${name}" already exists.`);
|
|
93
|
+
}
|
|
94
|
+
const ownerId = await this.getOwnerId();
|
|
95
|
+
const project = await this.http.post(`${BASE}/projects`, { name, classifier }, { headers: this.dcHeaders(orgId, ownerId, { Accept: 'application/json' }) });
|
|
96
|
+
this.cache.delete(`dc:projects:${orgId}`);
|
|
97
|
+
return project;
|
|
98
|
+
}
|
|
80
99
|
// ── Branches ───────────────────────────────────
|
|
81
100
|
/**
|
|
82
101
|
* List branches for a project.
|
|
@@ -87,6 +106,10 @@ export class DesignCenterApi {
|
|
|
87
106
|
headers: this.dcHeaders(orgId, ownerId),
|
|
88
107
|
});
|
|
89
108
|
}
|
|
109
|
+
async createBranch(orgId, projectId, name, commitId) {
|
|
110
|
+
const ownerId = await this.getOwnerId();
|
|
111
|
+
return this.http.post(`${BASE}/projects/${projectId}/branches`, { name, ...(commitId ? { commitId } : {}) }, { headers: this.dcHeaders(orgId, ownerId, { Accept: 'application/json' }) });
|
|
112
|
+
}
|
|
90
113
|
// ── Files ──────────────────────────────────────
|
|
91
114
|
/**
|
|
92
115
|
* List all files in a project branch.
|
|
@@ -182,24 +205,44 @@ export class DesignCenterApi {
|
|
|
182
205
|
throw new Error(`Failed to release lock: ${errorMessage(e)}`);
|
|
183
206
|
}
|
|
184
207
|
}
|
|
208
|
+
/** Refresh a branch lock before the service's approximately one-minute expiry. */
|
|
209
|
+
async maintainLock(orgId, projectId, branch = 'master') {
|
|
210
|
+
const ownerId = await this.getOwnerId();
|
|
211
|
+
await this.http.post(`${BASE}/projects/${projectId}/branches/${branch}/status`, {}, { headers: this.dcHeaders(orgId, ownerId) });
|
|
212
|
+
}
|
|
185
213
|
/**
|
|
186
214
|
* Save a file to a project branch. Requires the lock to be held.
|
|
187
215
|
*/
|
|
188
216
|
async saveFile(orgId, projectId, filePath, content, branch = 'master', commitMessage) {
|
|
217
|
+
await this.saveFiles(orgId, projectId, [{ path: filePath, content }], branch, commitMessage);
|
|
218
|
+
}
|
|
219
|
+
/** Save multiple files in the API's single batch operation. Requires a held lock. */
|
|
220
|
+
async saveFiles(orgId, projectId, files, branch = 'master', commitMessage) {
|
|
189
221
|
const ownerId = await this.getOwnerId();
|
|
190
222
|
try {
|
|
191
|
-
await this.http.post(`${BASE}/projects/${projectId}/branches/${branch}/save`,
|
|
192
|
-
{
|
|
193
|
-
path: filePath,
|
|
194
|
-
content,
|
|
195
|
-
type: 'file',
|
|
196
|
-
},
|
|
197
|
-
], {
|
|
223
|
+
await this.http.post(`${BASE}/projects/${projectId}/branches/${branch}/save`, files.map((file) => ({ path: file.path, content: file.content, type: 'FILE' })), {
|
|
198
224
|
headers: this.dcHeaders(orgId, ownerId, commitMessage ? { 'x-commit-message': commitMessage } : {}),
|
|
199
225
|
});
|
|
200
226
|
}
|
|
201
227
|
catch (e) {
|
|
202
|
-
throw new Error(`Failed to save
|
|
228
|
+
throw new Error(`Failed to save files: ${errorMessage(e)}`);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
async withLock(orgId, projectId, branch, operation) {
|
|
232
|
+
await this.acquireLock(orgId, projectId, branch);
|
|
233
|
+
try {
|
|
234
|
+
const result = await operation();
|
|
235
|
+
await this.releaseLock(orgId, projectId, branch);
|
|
236
|
+
return result;
|
|
237
|
+
}
|
|
238
|
+
catch (operationError) {
|
|
239
|
+
try {
|
|
240
|
+
await this.releaseLock(orgId, projectId, branch);
|
|
241
|
+
}
|
|
242
|
+
catch {
|
|
243
|
+
// Preserve the operation failure; the branch lock expires server-side.
|
|
244
|
+
}
|
|
245
|
+
throw operationError;
|
|
203
246
|
}
|
|
204
247
|
}
|
|
205
248
|
/**
|
|
@@ -209,13 +252,7 @@ export class DesignCenterApi {
|
|
|
209
252
|
async updateFile(orgId, projectId, filePath, content, branch = 'master', commitMessage) {
|
|
210
253
|
// Clear project cache since we're modifying
|
|
211
254
|
this.cache.delete(`dc:projects:${orgId}`);
|
|
212
|
-
await this.
|
|
213
|
-
try {
|
|
214
|
-
await this.saveFile(orgId, projectId, filePath, content, branch, commitMessage);
|
|
215
|
-
}
|
|
216
|
-
finally {
|
|
217
|
-
await this.releaseLock(orgId, projectId, branch);
|
|
218
|
-
}
|
|
255
|
+
await this.withLock(orgId, projectId, branch, () => this.saveFile(orgId, projectId, filePath, content, branch, commitMessage));
|
|
219
256
|
}
|
|
220
257
|
// ── Publish ────────────────────────────────────
|
|
221
258
|
/**
|
|
@@ -232,7 +269,8 @@ export class DesignCenterApi {
|
|
|
232
269
|
}
|
|
233
270
|
}
|
|
234
271
|
/**
|
|
235
|
-
*
|
|
272
|
+
* Legacy direct publication path retained for compatibility.
|
|
273
|
+
* New callers should use the preview-bound DesignCenterWorkflow.
|
|
236
274
|
*
|
|
237
275
|
* The DC XP API expects all publish parameters in the JSON body, NOT in the URL path.
|
|
238
276
|
* Endpoint: POST /designcenter/api-designer/projects/{projectId}/branches/{branch}/publish/exchange
|
|
@@ -241,35 +279,31 @@ export class DesignCenterApi {
|
|
|
241
279
|
* If assetId or main file aren't specified, we auto-detect them from exchange.json.
|
|
242
280
|
*/
|
|
243
281
|
async publishToExchange(orgId, projectId, options, branch = 'master') {
|
|
282
|
+
return this.withLock(orgId, projectId, branch, () => this.publishToExchangeLocked(orgId, projectId, options, branch));
|
|
283
|
+
}
|
|
284
|
+
/** Publish while the caller holds the branch lock. */
|
|
285
|
+
async publishToExchangeLocked(orgId, projectId, options, branch = 'master') {
|
|
244
286
|
const ownerId = await this.getOwnerId();
|
|
245
287
|
// Read exchange.json for defaults (assetId, main file, etc.)
|
|
246
288
|
const exchangeMeta = await this.getExchangeJson(orgId, projectId, branch);
|
|
247
289
|
const groupId = options.groupId || exchangeMeta?.groupId || orgId;
|
|
248
290
|
const assetId = options.assetId || exchangeMeta?.assetId || options.name;
|
|
249
291
|
const mainFile = options.main || exchangeMeta?.main;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
.catch((e) => {
|
|
266
|
-
throw new Error(`Failed to publish: ${errorMessage(e)}`);
|
|
267
|
-
});
|
|
268
|
-
return response;
|
|
269
|
-
}
|
|
270
|
-
finally {
|
|
271
|
-
await this.releaseLock(orgId, projectId, branch);
|
|
272
|
-
}
|
|
292
|
+
return this.http
|
|
293
|
+
.post(`${BASE}/projects/${projectId}/branches/${branch}/publish/exchange`, {
|
|
294
|
+
name: options.name,
|
|
295
|
+
apiVersion: options.apiVersion,
|
|
296
|
+
version: options.version,
|
|
297
|
+
classifier: options.classifier,
|
|
298
|
+
main: mainFile,
|
|
299
|
+
assetId,
|
|
300
|
+
groupId,
|
|
301
|
+
}, {
|
|
302
|
+
headers: this.dcHeaders(orgId, ownerId),
|
|
303
|
+
})
|
|
304
|
+
.catch((e) => {
|
|
305
|
+
throw new Error(`Failed to publish: ${errorMessage(e)}`);
|
|
306
|
+
});
|
|
273
307
|
}
|
|
274
308
|
}
|
|
275
309
|
//# sourceMappingURL=DesignCenterApi.js.map
|