@socketsecurity/config
Advanced tools
Comparing version 1.2.0 to 1.2.1
export type SocketYmlGitHub = { | ||
enabled?: boolean | undefined; | ||
projectReportsEnabled?: boolean | undefined; | ||
pullRequestAlertsEnabled?: boolean | undefined; | ||
enabled: boolean; | ||
projectReportsEnabled: boolean; | ||
pullRequestAlertsEnabled: boolean; | ||
}; | ||
export type SocketYml = { | ||
version: 2; | ||
projectIgnorePaths?: string[] | undefined; | ||
issueRules?: { | ||
projectIgnorePaths: string[]; | ||
issueRules: { | ||
[issueName: string]: boolean; | ||
} | undefined; | ||
githubApp?: SocketYmlGitHub | undefined; | ||
}; | ||
githubApp: SocketYmlGitHub; | ||
}; | ||
@@ -14,0 +14,0 @@ export function parseSocketConfig(fileContent: string): Promise<SocketYml>; |
32
index.js
@@ -13,5 +13,5 @@ 'use strict' | ||
* @typedef SocketYmlGitHub | ||
* @property {boolean} [enabled] enable/disable the Socket.dev GitHub app entirely | ||
* @property {boolean} [projectReportsEnabled] enable/disable Github app project report checks | ||
* @property {boolean} [pullRequestAlertsEnabled] enable/disable GitHub app pull request alert checks | ||
* @property {boolean} enabled enable/disable the Socket.dev GitHub app entirely | ||
* @property {boolean} projectReportsEnabled enable/disable Github app project report checks | ||
* @property {boolean} pullRequestAlertsEnabled enable/disable GitHub app pull request alert checks | ||
*/ | ||
@@ -22,5 +22,5 @@ | ||
* @property {2} version | ||
* @property {string[]} [projectIgnorePaths] | ||
* @property {{ [issueName: string]: boolean }} [issueRules] | ||
* @property {SocketYmlGitHub} [githubApp] | ||
* @property {string[]} projectIgnorePaths | ||
* @property {{ [issueName: string]: boolean }} issueRules | ||
* @property {SocketYmlGitHub} githubApp | ||
*/ | ||
@@ -37,20 +37,20 @@ | ||
items: { type: 'string' }, | ||
nullable: true | ||
default: [] | ||
}, | ||
issueRules: { | ||
type: 'object', | ||
nullable: true, | ||
required: [], | ||
additionalProperties: { type: 'boolean' } | ||
additionalProperties: { type: 'boolean' }, | ||
default: {} | ||
}, | ||
githubApp: { | ||
type: 'object', | ||
nullable: true, | ||
properties: { | ||
enabled: { type: 'boolean', nullable: true, default: true }, | ||
projectReportsEnabled: { type: 'boolean', nullable: true, default: true }, | ||
pullRequestAlertsEnabled: { type: 'boolean', nullable: true, default: true }, | ||
enabled: { type: 'boolean', default: true }, | ||
projectReportsEnabled: { type: 'boolean', default: true }, | ||
pullRequestAlertsEnabled: { type: 'boolean', default: true }, | ||
}, | ||
required: [], | ||
additionalProperties: false, | ||
default: { enabled: true, projectReportsEnabled: true, pullRequestAlertsEnabled: true } | ||
}, | ||
@@ -186,5 +186,5 @@ }, | ||
githubApp: { | ||
enabled: parsedV1Content?.enabled, | ||
pullRequestAlertsEnabled: parsedV1Content?.pullRequestAlertsEnabled, | ||
projectReportsEnabled: parsedV1Content?.projectReportsEnabled | ||
enabled: Boolean(parsedV1Content?.enabled), | ||
pullRequestAlertsEnabled: Boolean(parsedV1Content?.pullRequestAlertsEnabled), | ||
projectReportsEnabled: Boolean(parsedV1Content?.projectReportsEnabled) | ||
} | ||
@@ -191,0 +191,0 @@ } |
{ | ||
"name": "@socketsecurity/config", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Config parser for Socket.dev", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/SocketDev/socket-config-js", |
@@ -13,19 +13,17 @@ { | ||
}, | ||
"nullable": true | ||
"default": [] | ||
}, | ||
"issueRules": { | ||
"type": "object", | ||
"nullable": true, | ||
"required": [], | ||
"additionalProperties": { | ||
"type": "boolean" | ||
} | ||
}, | ||
"default": {} | ||
}, | ||
"githubApp": { | ||
"type": "object", | ||
"nullable": true, | ||
"properties": { | ||
"enabled": { | ||
"type": "boolean", | ||
"nullable": true, | ||
"default": true | ||
@@ -35,3 +33,2 @@ }, | ||
"type": "boolean", | ||
"nullable": true, | ||
"default": true | ||
@@ -41,3 +38,2 @@ }, | ||
"type": "boolean", | ||
"nullable": true, | ||
"default": true | ||
@@ -47,3 +43,8 @@ } | ||
"required": [], | ||
"additionalProperties": false | ||
"additionalProperties": false, | ||
"default": { | ||
"enabled": true, | ||
"projectReportsEnabled": true, | ||
"pullRequestAlertsEnabled": true | ||
} | ||
} | ||
@@ -50,0 +51,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15767
289