@stackone/cli 1.10.0 → 1.11.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 +171 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/{cliCore-D3gL-zoM.cjs → cliCore-CXBqMdiv.cjs} +6 -90
- package/dist/{cliCore-Bx4ZPYGH.js → cliCore-DRnQtnk3.js} +23 -107
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/CLAUDE_TEMPLATE.md +0 -634
- /package/dist/{esm-Wey0v-fi.js → esm-irRy3z25.js} +0 -0
package/README.md
CHANGED
|
@@ -91,6 +91,45 @@ stackone push --api-key <your-api-key> --api-url <api-url> path/to/connector.s1.
|
|
|
91
91
|
- **File validation**: Checks that the file exists and is a valid connector before attempting upload
|
|
92
92
|
- **Batch upload**: Supports uploading multiple connectors from a directory
|
|
93
93
|
|
|
94
|
+
### `drop`
|
|
95
|
+
|
|
96
|
+
Drop (delete) a specific connector version from the StackOne API registry. This command can use either a configuration profile created with the `init` command or provide credentials directly via command-line options.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
stackone drop <connector> --profile <profile-label>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
or using direct credentials:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
stackone drop <connector> --api-key <your-api-key>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
or with custom API URL:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
stackone drop <connector> --api-key <your-api-key> --api-url <api-url>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Arguments:**
|
|
115
|
+
|
|
116
|
+
- `<connector>` - The connector identifier in the format `provider_key@version` (e.g., `my-provider@1.0.0`)
|
|
117
|
+
|
|
118
|
+
**Options:**
|
|
119
|
+
|
|
120
|
+
- `-p, --profile <label>` - Configuration profile to use
|
|
121
|
+
- `--api-key <api-key>` - API key to use for authentication (alternative to using a profile)
|
|
122
|
+
- `--api-url <api-url>` - API URL to use (defaults to `https://api.stackone.com` if not specified)
|
|
123
|
+
|
|
124
|
+
**Note:** You must provide either `--profile` or `--api-key`. If using `--api-key`, the `--api-url` option is optional and will default to the production API URL.
|
|
125
|
+
|
|
126
|
+
**Features:**
|
|
127
|
+
|
|
128
|
+
- **Flexible authentication**: Use either a saved profile or provide credentials directly
|
|
129
|
+
- **Profile validation**: Ensures the specified profile exists before attempting deletion (when using `--profile`)
|
|
130
|
+
- **Precise targeting**: Delete specific connector versions without affecting other versions
|
|
131
|
+
- **Clear feedback**: Informative success and error messages with color-coded output
|
|
132
|
+
|
|
94
133
|
### `validate`
|
|
95
134
|
|
|
96
135
|
Validate a StackOne connector file:
|
|
@@ -111,6 +150,138 @@ Options:
|
|
|
111
150
|
|
|
112
151
|
Note: The file extension of a connector file needs to be `.s1.yaml`. The file extension can be omitted.
|
|
113
152
|
|
|
153
|
+
### `run`
|
|
154
|
+
|
|
155
|
+
Execute a connector action locally with full control over connector configuration, account details, and execution parameters. This command is ideal for testing and debugging connectors during development.
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
stackone run --connector path/to/connector.s1.yaml --account-id <account-id> --profile <profile-label>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Options:**
|
|
162
|
+
|
|
163
|
+
- `--connector <connector>` - Path to the connector file to run, or inline connector YAML string
|
|
164
|
+
- `--action <action>` - Path to an action file or inline action YAML code to add to the connector
|
|
165
|
+
- `--action-id <action-id>` - Specific action ID to execute. If not provided, the last action in the connector will be executed
|
|
166
|
+
- `--account <account>` - Path to a JSON file with account details or inline JSON string (see Account Format below)
|
|
167
|
+
- `--account-id <account-id>` - Account ID to fetch from StackOne API (requires `--profile`)
|
|
168
|
+
- `--params <params>` - Path to a JSON file with action parameters or inline JSON string (see Parameters Format below)
|
|
169
|
+
- `--credentials <credentials>` - Path to a JSON file with credentials or inline JSON string (see Credentials Format below)
|
|
170
|
+
- `-p, --profile <label>` - Configuration profile to use (required when using `--account-id`)
|
|
171
|
+
- `-o, --output-file <output-file>` - File path to write the execution output to (JSON format)
|
|
172
|
+
- `-d, --debug` - Enable debug mode to include execution steps and detailed information in the output
|
|
173
|
+
|
|
174
|
+
**Usage Examples:**
|
|
175
|
+
|
|
176
|
+
1. **Run with account from API:**
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
stackone run --connector connector.s1.yaml --account-id acc_123 --profile production
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
2. **Run with local account file & credentials:**
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
stackone run --connector connector.s1.yaml --account account.json --credentials credentials.json
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
3. **Run with inline account data:**
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
stackone run --connector connector.s1.yaml --account '{"auth_config_key":"basic","credentials":{"username":"user","password":"pass"}}'
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
4. **Run specific action with parameters:**
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
stackone run --connector connector.s1.yaml --action-id list_employees --account-id acc_123 --profile production --params params.json
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
5. **Run with custom action file:**
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
stackone run --connector connector.s1.yaml --action custom-action.yaml --account account.json
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
6. **Run with debug mode and output to file:**
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
stackone run --connector connector.s1.yaml --account-id acc_123 --profile production --debug --output-file result.json
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Account Format** (JSON):
|
|
213
|
+
|
|
214
|
+
When using `--account` with a file or inline JSON, use this structure:
|
|
215
|
+
|
|
216
|
+
```json
|
|
217
|
+
{
|
|
218
|
+
"auth_config_key": "basic",
|
|
219
|
+
"environment": "production",
|
|
220
|
+
"organization_id": "org_123",
|
|
221
|
+
"account_id": "acc_456",
|
|
222
|
+
"project_id": "proj_789"
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
All fields are optional except for `auth_config_key`.
|
|
227
|
+
|
|
228
|
+
**Credentials Format** (JSON):
|
|
229
|
+
|
|
230
|
+
When using `--credentials`, provide a key-value object:
|
|
231
|
+
|
|
232
|
+
```json
|
|
233
|
+
{
|
|
234
|
+
"api_key": "your_api_key",
|
|
235
|
+
"username": "your_username",
|
|
236
|
+
"password": "your_password"
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Note: Credentials provided via `--credentials` will merge with and override credentials from `--account` or `--account-id`.
|
|
241
|
+
|
|
242
|
+
**Parameters Format** (JSON):
|
|
243
|
+
|
|
244
|
+
When using `--params`, provide parameters for path, query, headers, and body:
|
|
245
|
+
|
|
246
|
+
```json
|
|
247
|
+
{
|
|
248
|
+
"path": {
|
|
249
|
+
"id": "employee_123"
|
|
250
|
+
},
|
|
251
|
+
"queryParams": {
|
|
252
|
+
"page": "1",
|
|
253
|
+
"page_size": "10"
|
|
254
|
+
},
|
|
255
|
+
"header": {
|
|
256
|
+
"X-Custom-Header": "value"
|
|
257
|
+
},
|
|
258
|
+
"body": {
|
|
259
|
+
"name": "John Doe",
|
|
260
|
+
"email": "john@example.com"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
All fields are optional and default to empty objects `{}`.
|
|
266
|
+
|
|
267
|
+
**Requirements:**
|
|
268
|
+
|
|
269
|
+
- Either `--account` or `--account-id` must be provided
|
|
270
|
+
- When using `--account-id`, the `--profile` option is required
|
|
271
|
+
- When using `--action`, the `--connector` option is required
|
|
272
|
+
- A valid connector is required (via `--connector` or inferred from action)
|
|
273
|
+
|
|
274
|
+
**Features:**
|
|
275
|
+
|
|
276
|
+
- **Flexible connector loading**: Load from file path or provide inline YAML
|
|
277
|
+
- **Dynamic action injection**: Add custom actions to existing connectors on-the-fly
|
|
278
|
+
- **Multiple authentication methods**: Use API-fetched accounts or local account data
|
|
279
|
+
- **Credential override**: Merge or override credentials at runtime
|
|
280
|
+
- **Comprehensive parameters**: Support for path params, query params, headers, and body
|
|
281
|
+
- **Debug mode**: Get detailed execution information including step-by-step processing
|
|
282
|
+
- **Output redirection**: Save results to file for further processing or analysis
|
|
283
|
+
- **Error handling**: Clear error messages with execution details when actions fail
|
|
284
|
+
|
|
114
285
|
### `version`
|
|
115
286
|
|
|
116
287
|
Show CLI version information. If a new version is available, it will prompt you to update:
|
package/dist/cli.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const e=require(`./cliCore-
|
|
2
|
+
const e=require(`./cliCore-CXBqMdiv.cjs`),t=new e.CLI;t.run();
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{CLI as e}from"./cliCore-
|
|
2
|
+
import{CLI as e}from"./cliCore-DRnQtnk3.js";const t=new e;t.run();
|