@stackone/cli 1.15.0 → 1.15.2
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
CHANGED
|
@@ -91,6 +91,88 @@ 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
|
+
### `pull`
|
|
95
|
+
|
|
96
|
+
Pull a connector from the StackOne API registry to your local filesystem. This command fetches a connector from the registry and saves it locally, with interactive conflict resolution when the connector already exists.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
stackone pull --connector my-provider@1.0.0 --profile <profile-label>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
or using direct credentials:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
stackone pull --connector my-provider@1.0.0 --api-key <your-api-key>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
or with custom API URL:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
stackone pull --connector my-provider@1.0.0 --api-key <your-api-key> --api-url <api-url>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
or pulling the latest version:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
stackone pull --connector my-provider --profile <profile-label>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Options:**
|
|
121
|
+
|
|
122
|
+
- `--connector <connector>` - Connector identifier in format `provider_key@version` (e.g., `my-provider@1.0.0`), `provider_key` to pull the latest version, or with version wildcards (e.g., `my-provider@1.x.x`, `my-provider@2.1.x` or `my-provider@latest`)
|
|
123
|
+
- `-o, --output-path <output-path>` - Directory path to save the connector to (defaults to `./connectors/<provider_key>/`)
|
|
124
|
+
- `-p, --profile <label>` - Configuration profile to use
|
|
125
|
+
- `--api-key <api-key>` - API key to use for authentication (alternative to using a profile)
|
|
126
|
+
- `--api-url <api-url>` - API URL to use (defaults to `https://api.stackone.com` if not specified)
|
|
127
|
+
|
|
128
|
+
**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.
|
|
129
|
+
|
|
130
|
+
**Usage Examples:**
|
|
131
|
+
|
|
132
|
+
1. **Pull specific version with profile:**
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
stackone pull --connector my-provider@1.0.0 --profile production
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
2. **Pull latest version with API key:**
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
stackone pull --connector my-provider --api-key your-api-key
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
3. **Pull to custom directory:**
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
stackone pull --connector my-provider@1.0.0 --profile production --output-path ./my-connectors
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
4. **Pull with custom API URL:**
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
stackone pull --connector my-provider@1.0.0 --api-key your-api-key --api-url https://staging.api.stackone.com
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Conflict Resolution:**
|
|
157
|
+
|
|
158
|
+
When pulling a connector that already exists locally, the command will:
|
|
159
|
+
|
|
160
|
+
1. Display a diff showing the differences between local and registry versions
|
|
161
|
+
2. Prompt you to choose how to resolve the conflict:
|
|
162
|
+
- **Override with registry version** - Replace local file with the registry version
|
|
163
|
+
- **Keep local version** - Discard changes and keep the local file
|
|
164
|
+
- **Interactive resolution** - Manually resolve conflicts line by line
|
|
165
|
+
|
|
166
|
+
**Features:**
|
|
167
|
+
|
|
168
|
+
- **Flexible authentication**: Use either a saved profile or provide credentials directly
|
|
169
|
+
- **Version flexibility**: Pull specific versions, use wildcards (e.g., `1.x.x`, `2.1.x`, `latest`), or omit version for latest
|
|
170
|
+
- **Interactive conflict resolution**: Smart diff-based conflict resolution when local changes exist
|
|
171
|
+
- **Profile validation**: Ensures the specified profile exists before fetching (when using `--profile`)
|
|
172
|
+
- **Automatic file organization**: Saves connectors in organized directory structure (`./connectors/<provider_key>/`)
|
|
173
|
+
- **Local validation**: Validates local connector before conflict resolution
|
|
174
|
+
- **Clear feedback**: Informative success and error messages with color-coded output
|
|
175
|
+
|
|
94
176
|
### `drop`
|
|
95
177
|
|
|
96
178
|
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.
|
|
@@ -138,6 +220,12 @@ Get (download) a connector from the StackOne registry. This command can use eith
|
|
|
138
220
|
stackone get --connector my-provider@1.0.0 --profile <profile-label>
|
|
139
221
|
```
|
|
140
222
|
|
|
223
|
+
or get the latest version:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
stackone get --connector my-provider --profile <profile-label>
|
|
227
|
+
```
|
|
228
|
+
|
|
141
229
|
or using direct credentials:
|
|
142
230
|
|
|
143
231
|
```bash
|
|
@@ -152,7 +240,7 @@ stackone get --account-id acc_123 --profile <profile-label>
|
|
|
152
240
|
|
|
153
241
|
**Options:**
|
|
154
242
|
|
|
155
|
-
- `--connector <connector>` - Connector identifier in format `provider_key@version` (e.g., `my-provider@1.0.0`)
|
|
243
|
+
- `--connector <connector>` - Connector identifier in format `provider_key@version` (e.g., `my-provider@1.0.0`), `provider_key` to get the latest version, or with version wildcards (e.g., `my-provider@1.x.x`, `my-provider@2.1.x` or `my-provider@latest`)
|
|
156
244
|
- `--account-id <account-id>` - Account ID to fetch the connector from
|
|
157
245
|
- `-f, --format <format>` - Output format: `yaml` or `json` (default: `yaml`)
|
|
158
246
|
- `-o, --output-file <output-file>` - File path to write the connector to (if not specified, outputs to stdout)
|
|
@@ -173,10 +261,10 @@ stackone get --account-id acc_123 --profile <profile-label>
|
|
|
173
261
|
stackone get --connector my-provider@1.0.0 --profile production
|
|
174
262
|
```
|
|
175
263
|
|
|
176
|
-
2. **Get
|
|
264
|
+
2. **Get latest version from registry with API key:**
|
|
177
265
|
|
|
178
266
|
```bash
|
|
179
|
-
stackone get --connector my-provider
|
|
267
|
+
stackone get --connector my-provider --api-key your-api-key
|
|
180
268
|
```
|
|
181
269
|
|
|
182
270
|
3. **Get connector from account:**
|
|
@@ -206,6 +294,7 @@ stackone get --account-id acc_123 --profile <profile-label>
|
|
|
206
294
|
**Features:**
|
|
207
295
|
|
|
208
296
|
- **Flexible authentication**: Use either a saved profile or provide credentials directly
|
|
297
|
+
- **Version flexibility**: Get specific versions, use wildcards (e.g., `1.x.x`, `2.1.x`, `latest`), or omit version for latest
|
|
209
298
|
- **Multiple sources**: Fetch connectors from registry by identifier or from specific accounts
|
|
210
299
|
- **Format conversion**: Output in YAML (default) or JSON format
|
|
211
300
|
- **File output**: Save to file or output to stdout for piping
|
|
@@ -248,7 +337,7 @@ stackone run --account-id <account-id> --api-key <your-api-key>
|
|
|
248
337
|
|
|
249
338
|
**Options:**
|
|
250
339
|
|
|
251
|
-
- `--connector <connector>` - Path to the connector file to run, inline connector YAML string, or connector identifier in format `provider_key@version` to fetch from registry (optional when using `--account-id`, the connector will be fetched from account API)
|
|
340
|
+
- `--connector <connector>` - Path to the connector file to run, inline connector YAML string, or connector identifier in format `provider_key@version`, `provider_key` for latest, or with version wildcards (e.g., `my-provider@1.x.x`, `my-provider@2.1.x` or `my-provider@latest`) to fetch from registry (optional when using `--account-id`, the connector will be fetched from account API)
|
|
252
341
|
- `--action <action>` - Path to an action file or inline action YAML code to add to the connector
|
|
253
342
|
- `--action-id <action-id>` - Specific action ID to execute. If not provided, the last action in the connector will be executed
|
|
254
343
|
- `--account <account>` - Path to a JSON file with account details or inline JSON string (see Account Format below)
|
|
@@ -390,7 +479,7 @@ All fields are optional and default to empty objects `{}`.
|
|
|
390
479
|
|
|
391
480
|
- Either `--account` or `--account-id` must be provided
|
|
392
481
|
- When using `--account-id`, either `--profile` or `--api-key` is required
|
|
393
|
-
- When using connector identifier format (`provider_key@version`), either `--profile` or `--api-key` is required
|
|
482
|
+
- When using connector identifier format (`provider_key@version` or `provider_key`), either `--profile` or `--api-key` is required
|
|
394
483
|
- You must provide either `--profile` or `--api-key`, not both
|
|
395
484
|
- When using `--action`, the `--connector` option is required
|
|
396
485
|
- A connector can be provided via:
|
|
@@ -400,7 +489,7 @@ All fields are optional and default to empty objects `{}`.
|
|
|
400
489
|
|
|
401
490
|
**Features:**
|
|
402
491
|
|
|
403
|
-
- **Flexible connector loading**: Load from file path, provide inline YAML, fetch from registry using `provider_key@version`
|
|
492
|
+
- **Flexible connector loading**: Load from file path, provide inline YAML, fetch from registry using `provider_key@version`, `provider_key` for latest, or version wildcards (e.g., `1.x.x` or `latest`), or auto-fetch from API using account ID
|
|
404
493
|
- **Flexible authentication**: Use either a saved profile or provide credentials directly via command-line options
|
|
405
494
|
- **Dynamic action injection**: Add custom actions to existing connectors on-the-fly
|
|
406
495
|
- **Multiple authentication methods**: Use API-fetched accounts or local account data
|
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-CrunTF_f.cjs`);new e.t().run();
|
package/dist/cli.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cliCore-
|
|
2
|
+
import{t as e}from"./cliCore-BgcnPiab.mjs";new e().run();export{};
|