@security-alert/share 1.10.4 → 1.10.9

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,9 +1,9 @@
1
- export declare type fetchVulnerabilityAlertsOptions = {
1
+ export type fetchVulnerabilityAlertsOptions = {
2
2
  token: string;
3
3
  owner: string;
4
4
  repo: string;
5
5
  };
6
- export declare type VulnerabilityAlertNode = {
6
+ export type VulnerabilityAlertNode = {
7
7
  id: string;
8
8
  vulnerableManifestFilename: string;
9
9
  vulnerableManifestPath: string;
@@ -1 +1 @@
1
- {"version":3,"file":"VulnerabilityAlerts.js","sourceRoot":"","sources":["../src/VulnerabilityAlerts.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA2C;AAuC3C,SAAsB,wBAAwB,CAC1C,OAAwC;;QAExC,iEAAiE;QACjE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,iBAAO,EAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA4CC,EACD;YACI,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE;gBACL,aAAa,EAAE,SAAS,OAAO,CAAC,KAAK,EAAE;gBACvC,MAAM,EAAE,2CAA2C;aACtD;SACJ,CACJ,CAAC;QACF,OAAO,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE;YAC1D,OAAO,IAAI,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC;CAAA;AA9DD,4DA8DC"}
1
+ {"version":3,"file":"VulnerabilityAlerts.js","sourceRoot":"","sources":["../src/VulnerabilityAlerts.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA2C;AAuC3C,SAAsB,wBAAwB,CAC1C,OAAwC;;QAExC,iEAAiE;QACjE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,iBAAO,EAShC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA4CC,EACD;YACI,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE;gBACL,aAAa,EAAE,SAAS,OAAO,CAAC,KAAK,EAAE;gBACvC,MAAM,EAAE,2CAA2C;aACtD;SACJ,CACJ,CAAC;QACF,OAAO,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE;YAC1D,OAAO,IAAI,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC;CAAA;AAtED,4DAsEC"}
@@ -1,12 +1,12 @@
1
1
  import { PackageDetails } from "./parser/Details";
2
- export declare type fetchPackageOptions = {
2
+ export type fetchPackageOptions = {
3
3
  token: string;
4
4
  owner: string;
5
5
  repo: string;
6
6
  packageName: string;
7
7
  packageFilePath: string;
8
8
  };
9
- export declare type fetchPackageDetails = PackageDetails & {
9
+ export type fetchPackageDetails = PackageDetails & {
10
10
  packageManifestUrl: string;
11
11
  };
12
12
  export declare function fetchPackageDetails(options: fetchPackageOptions): Promise<fetchPackageDetails>;
@@ -1,5 +1,5 @@
1
- export declare type DependenciesType = "dependencies" | "devDependencies" | "unknown";
2
- export declare type PackageDetails = {
1
+ export type DependenciesType = "dependencies" | "devDependencies" | "unknown";
2
+ export type PackageDetails = {
3
3
  name: string;
4
4
  version: string;
5
5
  packageFilePath: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@security-alert/share",
3
- "version": "1.10.4",
3
+ "version": "1.10.9",
4
4
  "description": "security alert shared lib",
5
5
  "keywords": [
6
6
  "cli",
@@ -39,29 +39,28 @@
39
39
  "watch": "tsc -p . --watch"
40
40
  },
41
41
  "devDependencies": {
42
- "@types/lodash": "^4.14.158",
42
+ "@types/lodash": "^4.14.191",
43
43
  "@types/meow": "^5.0.0",
44
- "@types/mocha": "^8.0.1",
44
+ "@types/mocha": "^10.0.1",
45
45
  "@types/nock": "^11.1.0",
46
- "@types/node": "^14.18.12",
46
+ "@types/node": "^18.11.18",
47
47
  "cross-env": "^7.0.2",
48
- "husky": "^4.2.5",
49
- "mocha": "^9.2.2",
50
- "nock": "^13.0.3",
51
- "rimraf": "^3.0.2",
52
- "ts-node": "^10.7.0",
48
+ "mocha": "^10.2.0",
49
+ "nock": "^13.3.0",
50
+ "rimraf": "^4.0.4",
51
+ "ts-node": "^10.9.1",
53
52
  "ts-node-test-register": "^10.0.0",
54
- "typescript": "^4.6.3"
53
+ "typescript": "^4.9.4"
55
54
  },
56
55
  "dependencies": {
57
- "@npm/types": "^1.0.1",
56
+ "@npm/types": "^1.0.2",
58
57
  "@octokit/graphql": "^4.5.3",
59
58
  "@octokit/rest": "^18.0.3",
60
59
  "@octokit/types": "^6.34.0",
61
60
  "@yarnpkg/lockfile": "^1.0.0",
62
61
  "meow": "^7.0.1"
63
62
  },
64
- "gitHead": "c362df11d1023f31c0a4342df87226e6fadf61e3",
63
+ "gitHead": "e39f24b9b4729ae26ab590906555d67270ae566d",
65
64
  "publishConfig": {
66
65
  "access": "public"
67
66
  }
@@ -41,7 +41,15 @@ export async function fetchVulnerabilityAlerts(
41
41
  options: fetchVulnerabilityAlertsOptions
42
42
  ): Promise<VulnerabilityAlertNode[]> {
43
43
  // https://developer.github.com/v4/object/repository/#connections
44
- const { repository } = await graphql(
44
+ const { repository } = await graphql<{
45
+ repository: {
46
+ vulnerabilityAlerts: {
47
+ edges: {
48
+ node: VulnerabilityAlertNode;
49
+ }[];
50
+ };
51
+ };
52
+ }>(
45
53
  `
46
54
  query vulnerabilityAlerts($owner: String!, $repo: String!) {
47
55
  repository(owner: $owner, name: $repo) {