@spotify/backstage-plugin-soundcheck-backend-module-github 0.8.0 → 0.8.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @spotify/backstage-plugin-soundcheck-backend-module-github
2
2
 
3
+ ## 0.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed Dependabot Fact Collector pagination error: Pagination using the page parameter is not supported.
8
+
9
+ ## 0.8.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependency `backstage` to `1.44.1`.
14
+ - Updated dependencies
15
+ - Updated dependencies
16
+ - Updated dependencies
17
+ - @spotify/backstage-plugin-soundcheck-common@0.19.2
18
+ - @spotify/backstage-plugin-soundcheck-node@0.10.2
19
+
3
20
  ## 0.8.0
4
21
 
5
22
  ### Minor Changes
@@ -1,2 +1,2 @@
1
- "use strict";var s=require("./helper/util.cjs.js"),y=require("./schema/dependabot_alerts.json.cjs.js"),g=require("./utils.cjs.js");class c{static TYPE="DependabotAlerts";#t;#e;type=c.TYPE;static factory=({logger:t,cache:i})=>{const a=new c(t,i);return{predicate:h=>h.type===a.type,extractor:a}};constructor(t,i){this.#t=t,this.#e=i}async extract(t,i,a,h,f){const l=[],u={owner:a.owner,repo:a.name,state:t.states?.join(","),severity:t.severities?.join(",")},w=100;let p=0,o=!0;for(;o;){const n=g.getCacheKey("github:dependabot_alerts",u,++p);try{const e=await h.rest.dependabot.listAlertsForRepo({...u,per_page:w,page:p,headers:f?void 0:await g.getCacheHeader(this.#e,n)});e.headers?.link?.includes('rel="next"')||(o=!1);const r=e.data;await this.#e.set(n,{etag:e.headers?.etag,lastModified:e.headers?.date,hasNext:o,data:r}),l.push(...r)}catch(e){if(s.isNotModifiedError(e)){const d=await this.#e.get(n);if(d){l.push(...d.data),o=d.hasNext,await this.#e.set(n,d);continue}else return}if(s.isNotFoundError(e))return{alerts:[]};if(s.isForbiddenError(e))return e.response.data;const r=`[DependabotAlerts] fact extraction failed with: ${s.buildOctokitErrorMessage(e)}. Request parameters: ${JSON.stringify(u)}`;throw s.handleRateLimitError(e,r),this.#t.error(r),new Error(r)}}return{alerts:l}}getDataSchema(t){return JSON.stringify(y.default)}}exports.DependabotAlertsFactExtractor=c;
1
+ "use strict";var o=require("./helper/util.cjs.js"),b=require("./schema/dependabot_alerts.json.cjs.js"),f=require("./utils.cjs.js");class c{static TYPE="DependabotAlerts";#t;#e;type=c.TYPE;static factory=({logger:t,cache:n})=>{const s=new c(t,n);return{predicate:h=>h.type===s.type,extractor:s}};constructor(t,n){this.#t=t,this.#e=n}async extract(t,n,s,h,g){const l=[],u={owner:s.owner,repo:s.name,state:t.states?.join(","),severity:t.severities?.join(",")},w=100;let y=0,i=!0,p;for(;i;){const d=f.getCacheKey("github:dependabot_alerts",u,++y);try{const e=await h.rest.dependabot.listAlertsForRepo({...u,per_page:w,after:p,headers:g?void 0:await f.getCacheHeader(this.#e,d)});if(!e.headers?.link?.includes('rel="next"'))i=!1;else{const r=e.headers.link.match(/<([^>]+)>;\s*rel="next"/);r&&(p=new URL(r[1]).searchParams.get("after")??void 0),p||(i=!1)}const a=e.data;await this.#e.set(d,{etag:e.headers?.etag,lastModified:e.headers?.date,hasNext:i,data:a}),l.push(...a)}catch(e){if(o.isNotModifiedError(e)){const r=await this.#e.get(d);if(r){l.push(...r.data),i=r.hasNext,await this.#e.set(d,r);continue}else return}if(o.isNotFoundError(e))return{alerts:[]};if(o.isForbiddenError(e))return e.response.data;const a=`[DependabotAlerts] fact extraction failed with: ${o.buildOctokitErrorMessage(e)}. Request parameters: ${JSON.stringify(u)}`;throw o.handleRateLimitError(e,a),this.#t.error(a),new Error(a)}}return{alerts:l}}getDataSchema(t){return JSON.stringify(b.default)}}exports.DependabotAlertsFactExtractor=c;
2
2
  //# sourceMappingURL=DependabotAlertsFactExtractor.cjs.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spotify/backstage-plugin-soundcheck-backend-module-github",
3
3
  "description": "Soundcheck 3rd party integration with Github",
4
- "version": "0.8.0",
4
+ "version": "0.8.2",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "homepage": "https://backstage.spotify.com",
7
7
  "main": "dist/index.cjs.js",
@@ -27,24 +27,24 @@
27
27
  "postpack": "backstage-cli package postpack"
28
28
  },
29
29
  "devDependencies": {
30
- "@backstage/backend-test-utils": "^1.8.0",
31
- "@backstage/cli": "^0.34.0",
32
- "@spotify/backstage-plugin-soundcheck-backend": "^0.22.0",
30
+ "@backstage/backend-test-utils": "^1.9.1",
31
+ "@backstage/cli": "^0.34.4",
32
+ "@spotify/backstage-plugin-soundcheck-backend": "^0.22.4",
33
33
  "@types/git-url-parse": "^16.0.0",
34
34
  "@types/luxon": "^3.0.1",
35
35
  "supertest": "^7.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@backstage/backend-plugin-api": "^1.4.2",
38
+ "@backstage/backend-plugin-api": "^1.4.4",
39
39
  "@backstage/catalog-model": "^1.7.5",
40
- "@backstage/config": "^1.3.3",
40
+ "@backstage/config": "^1.3.5",
41
41
  "@backstage/errors": "^1.2.7",
42
- "@backstage/integration": "^1.17.1",
43
- "@backstage/types": "^1.2.1",
42
+ "@backstage/integration": "^1.18.1",
43
+ "@backstage/types": "^1.2.2",
44
44
  "@octokit/request-error": "^5.0.0",
45
45
  "@octokit/rest": "^20.0.0",
46
- "@spotify/backstage-plugin-soundcheck-common": "^0.19.0",
47
- "@spotify/backstage-plugin-soundcheck-node": "^0.10.0",
46
+ "@spotify/backstage-plugin-soundcheck-common": "^0.19.2",
47
+ "@spotify/backstage-plugin-soundcheck-node": "^0.10.2",
48
48
  "git-url-parse": "^16.0.0",
49
49
  "lodash": "^4.17.21",
50
50
  "luxon": "^3.1.1",