@stackone/cli 1.14.1 → 1.15.1

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`) or just `provider_key` to pull the latest version
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 or the latest version by omitting version number
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.
package/dist/cli.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const e=require(`./cliCore-CiHXnjR4.cjs`);new e.t().run();
2
+ const e=require(`./cliCore-DOB5rM16.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-RHF_Qqxe.mjs";new e().run();export{};
2
+ import{t as e}from"./cliCore-BDikKAKf.mjs";new e().run();export{};