@jfrog/opencode-jfrog-plugin 0.0.2 → 0.0.3

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
@@ -27,7 +27,7 @@ Preferably set the plugin globally for all their developers using the Opencode r
27
27
  The plugin configuration looks like this:
28
28
  ```
29
29
  "plugin": [
30
- "@jfrog/opencode-jfrog-plugin@0.0.2"
30
+ "@jfrog/opencode-jfrog-plugin@0.0.3"
31
31
  ],
32
32
  ```
33
33
 
package/dist/index.js CHANGED
@@ -15,8 +15,8 @@ import { pipeline } from "stream/promises";
15
15
  import { dirname, join } from "path";
16
16
  var LOG_FILE = join(process.cwd(), ".opencode", "event-log.txt");
17
17
  var SKILLS_REGISTRY_URL = "https://releases.jfrog.io/artifactory/jfrog-skills";
18
- var INSTRUCTIONS_REGISTRY_URL = "https://releases.jfrog.io/artifactory/run/ai/integrations/opencode/JFROG-INTEGRATION-MANAGEMENT.md";
19
- var SKILLS_TO_INSTALL_URL = "https://releases.jfrog.io/artifactory/run/ai/integrations/opencode/JFROG-OPENCODE_SKILLS.json";
18
+ var INSTRUCTIONS_REGISTRY_URL = "https://releases.jfrog.io/artifactory/run/ai/integrations/opencode/opencode-JFROG-INTEGRATION-MANAGEMENT-[RELEASE].md";
19
+ var SKILLS_TO_INSTALL_URL = "https://releases.jfrog.io/artifactory/run/ai/integrations/opencode/opencode-JFROG-OPENCODE_SKILLS-[RELEASE].json";
20
20
  var fetchAndSaveFile = async (url, destPath, log) => {
21
21
  const dir = dirname(destPath);
22
22
  log("Fetching file from " + url + " and saving to " + destPath);
@@ -250,15 +250,17 @@ var jfrogOpencodePlugin = async ({ client, $, directory }) => {
250
250
  responses.push(pkgMngrResponse);
251
251
  }
252
252
  log("pkgMngrResponse=" + pkgMngrResponse?.message);
253
- await client.tui.showToast({
254
- body: {
255
- message: responses.filter((s) => !s.success).map((s) => s.message).join(`
253
+ if (responses.filter((s) => !s.success).length > 0) {
254
+ await client.tui.showToast({
255
+ body: {
256
+ message: responses.filter((s) => !s.success).map((s) => s.message).join(`
256
257
 
257
258
  `),
258
- variant: "error",
259
- duration: 1e4
260
- }
261
- });
259
+ variant: "error",
260
+ duration: 1e4
261
+ }
262
+ });
263
+ }
262
264
  }
263
265
  }
264
266
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jfrog/opencode-jfrog-plugin",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "JFrog Plugin for seamless integration to Opencode",
5
5
  "author": {
6
6
  "name": "JFrog",