@boltic/cli 1.0.16 → 1.0.17

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.
@@ -1,8 +1,8 @@
1
1
  import { confirm, input, search } from "@inquirer/prompts";
2
2
  import chalk from "chalk";
3
+ import { execSync } from "child_process";
3
4
  import fs from "fs";
4
5
  import path from "path";
5
- import { execSync } from "child_process";
6
6
 
7
7
  import {
8
8
  editIntegration,
@@ -170,6 +170,23 @@ async function handleSync(args) {
170
170
  return;
171
171
  }
172
172
 
173
+ const isPublished = await getIntegrationById(
174
+ apiUrl,
175
+ token,
176
+ accountId,
177
+ session,
178
+ specContent.id
179
+ );
180
+
181
+ if (isPublished.status === "published") {
182
+ console.error(
183
+ chalk.red(
184
+ `Error: Integration is already published. You cannot sync a published integration, please use the "edit" command to create a copy of the integration.`
185
+ )
186
+ );
187
+ return;
188
+ }
189
+
173
190
  const updatedIntegration = await updateIntegration(
174
191
  apiUrl,
175
192
  token,
@@ -289,6 +306,23 @@ async function handleSubmit(args) {
289
306
  return;
290
307
  }
291
308
 
309
+ const isPublished = await getIntegrationById(
310
+ apiUrl,
311
+ token,
312
+ accountId,
313
+ session,
314
+ specContent.id
315
+ );
316
+
317
+ if (isPublished.status === "published") {
318
+ console.error(
319
+ chalk.red(
320
+ `Error: Integration is already published. You cannot submit a published integration, please use the "edit" command to create a copy of the integration.`
321
+ )
322
+ );
323
+ return;
324
+ }
325
+
292
326
  const updatedIntegration = await updateIntegration(
293
327
  apiUrl,
294
328
  token,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boltic/cli",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "A powerful CLI tool for managing Boltic Workflow integrations - create, sync, test, and publish integrations with ease",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -43,12 +43,6 @@
43
43
  "url": "https://github.com/bolticio/cli/issues",
44
44
  "email": "support@boltic.io"
45
45
  },
46
- "funding": [
47
- {
48
- "type": "github",
49
- "url": "https://github.com/sponsors/bolticio"
50
- }
51
- ],
52
46
  "scripts": {
53
47
  "start": "node index.js",
54
48
  "dev": "nodemon index.js",