@nodesecure/rc 1.1.0 → 1.2.1
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 +12 -3
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/projects/ci.d.ts +1 -1
- package/dist/rc.d.ts +4 -0
- package/dist/rc.js +10 -0
- package/dist/rc.js.map +1 -1
- package/package.json +20 -19
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# rc
|
|
2
2
|

|
|
3
3
|
[](https://github.com/NodeSecure/rc/commit-activity)
|
|
4
|
-
[](https://github.com/nodejs/security-wg/blob/master/processes/responsible_disclosure_template.md
|
|
5
|
-
)
|
|
6
4
|
[](https://github.com/NodeSecure/rc/blob/master/LICENSE)
|
|
7
5
|
|
|
8
6
|
NodeSecure runtime configuration.
|
|
@@ -111,6 +109,16 @@ export interface writePartialPayload {
|
|
|
111
109
|
export type writeOptions = writeCompletePayload | writePartialPayload;
|
|
112
110
|
```
|
|
113
111
|
|
|
112
|
+
### homedir(): string
|
|
113
|
+
|
|
114
|
+
Dedicated directory for NodeSecure to store the configuration in the os HOME directory.
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
import * as RC from "@nodesecure/rc";
|
|
118
|
+
|
|
119
|
+
const homedir = RC.homedir();
|
|
120
|
+
```
|
|
121
|
+
|
|
114
122
|
### CONSTANTS
|
|
115
123
|
|
|
116
124
|
```ts
|
|
@@ -152,7 +160,7 @@ console.log(RC.JSONSchema);
|
|
|
152
160
|
## Contributors ✨
|
|
153
161
|
|
|
154
162
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
155
|
-
[](#contributors-)
|
|
156
164
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
157
165
|
|
|
158
166
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
@@ -164,6 +172,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
164
172
|
<tr>
|
|
165
173
|
<td align="center"><a href="https://www.linkedin.com/in/thomas-gentilhomme/"><img src="https://avatars.githubusercontent.com/u/4438263?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gentilhomme</b></sub></a><br /><a href="https://github.com/NodeSecure/rc/commits?author=fraxken" title="Code">💻</a> <a href="https://github.com/NodeSecure/rc/issues?q=author%3Afraxken" title="Bug reports">🐛</a> <a href="https://github.com/NodeSecure/rc/pulls?q=is%3Apr+reviewed-by%3Afraxken" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/NodeSecure/rc/commits?author=fraxken" title="Documentation">📖</a> <a href="#security-fraxken" title="Security">🛡️</a></td>
|
|
166
174
|
<td align="center"><a href="https://dev.to/antoinecoulon"><img src="https://avatars.githubusercontent.com/u/43391199?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Antoine Coulon</b></sub></a><br /><a href="https://github.com/NodeSecure/rc/commits?author=antoine-coulon" title="Code">💻</a> <a href="https://github.com/NodeSecure/rc/issues?q=author%3Aantoine-coulon" title="Bug reports">🐛</a> <a href="https://github.com/NodeSecure/rc/pulls?q=is%3Apr+reviewed-by%3Aantoine-coulon" title="Reviewed Pull Requests">👀</a></td>
|
|
175
|
+
<td align="center"><a href="https://github.com/PierreDemailly"><img src="https://avatars.githubusercontent.com/u/39910767?v=4?s=100" width="100px;" alt=""/><br /><sub><b>PierreD</b></sub></a><br /><a href="https://github.com/NodeSecure/rc/commits?author=PierreDemailly" title="Code">💻</a></td>
|
|
167
176
|
</tr>
|
|
168
177
|
</table>
|
|
169
178
|
|
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAClD,MAAM,CAAC,MAAM,8BAA8B,GAAG,YAAY,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAM,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAM,UAAU,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/projects/ci.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface CiConfiguration {
|
|
|
17
17
|
* JS-X-Ray warnings configuration
|
|
18
18
|
* @see https://github.com/NodeSecure/js-x-ray#warnings-legends-v20
|
|
19
19
|
*/
|
|
20
|
-
warnings?: CiWarnings | Record<jsxray.
|
|
20
|
+
warnings?: CiWarnings | Record<jsxray.WarningName, CiWarnings>;
|
|
21
21
|
}
|
|
22
22
|
export declare type CiWarnings = "off" | "error" | "warning";
|
|
23
23
|
export declare function generateCIConfiguration(): {
|
package/dist/rc.d.ts
CHANGED
|
@@ -33,4 +33,8 @@ export declare type RCGenerationMode = "minimal" | "ci" | "report" | "complete";
|
|
|
33
33
|
* generateDefaultRC(["ci", "report"]); // minimal + ci + report
|
|
34
34
|
*/
|
|
35
35
|
export declare function generateDefaultRC(mode?: RCGenerationMode | RCGenerationMode[]): RC;
|
|
36
|
+
/**
|
|
37
|
+
* Dedicated directory for NodeSecure to store the configuration in the os HOME directory.
|
|
38
|
+
*/
|
|
39
|
+
export declare function homedir(): string;
|
|
36
40
|
export { generateCIConfiguration, CiConfiguration, CiWarnings, generateReportConfiguration, ReportConfiguration, ReportChart };
|
package/dist/rc.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
// Import Node.js Dependencies
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
1
4
|
// Import Internal Dependencies
|
|
5
|
+
import { GLOBAL_CONFIGURATION_DIRECTORY } from "./constants.js";
|
|
2
6
|
import { loadJSONSchemaSync } from "./schema/loader.js";
|
|
3
7
|
import { generateCIConfiguration } from "./projects/ci.js";
|
|
4
8
|
import { generateReportConfiguration } from "./projects/report.js";
|
|
@@ -19,5 +23,11 @@ export function generateDefaultRC(mode = "minimal") {
|
|
|
19
23
|
const complete = modes.has("complete");
|
|
20
24
|
return Object.assign(minimalRC, complete || modes.has("ci") ? generateCIConfiguration() : {}, complete || modes.has("report") ? generateReportConfiguration() : {});
|
|
21
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Dedicated directory for NodeSecure to store the configuration in the os HOME directory.
|
|
28
|
+
*/
|
|
29
|
+
export function homedir() {
|
|
30
|
+
return path.join(os.homedir(), GLOBAL_CONFIGURATION_DIRECTORY);
|
|
31
|
+
}
|
|
22
32
|
export { generateCIConfiguration, generateReportConfiguration };
|
|
23
33
|
//# sourceMappingURL=rc.js.map
|
package/dist/rc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rc.js","sourceRoot":"","sources":["../src/rc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rc.js","sourceRoot":"","sources":["../src/rc.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,O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
|
1
1
|
{
|
|
2
2
|
"name": "@nodesecure/rc",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "NodeSecure runtime configuration",
|
|
5
5
|
"exports": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -35,30 +35,31 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/NodeSecure/rc#readme",
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@nodesecure/eslint-config": "^1.
|
|
39
|
-
"@types/chai": "^4.3.
|
|
40
|
-
"@types/lodash.merge": "^4.6.
|
|
41
|
-
"@types/mocha": "^
|
|
42
|
-
"@types/node": "^
|
|
38
|
+
"@nodesecure/eslint-config": "^1.5.0",
|
|
39
|
+
"@types/chai": "^4.3.3",
|
|
40
|
+
"@types/lodash.merge": "^4.6.7",
|
|
41
|
+
"@types/mocha": "^10.0.0",
|
|
42
|
+
"@types/node": "^18.11.9",
|
|
43
43
|
"@types/zen-observable": "^0.8.3",
|
|
44
|
-
"ajv": "^8.
|
|
45
|
-
"c8": "^7.
|
|
44
|
+
"ajv": "^8.11.0",
|
|
45
|
+
"c8": "^7.12.0",
|
|
46
46
|
"chai": "^4.3.6",
|
|
47
|
-
"eslint": "^8.
|
|
47
|
+
"eslint": "^8.26.0",
|
|
48
48
|
"lodash.merge": "^4.6.2",
|
|
49
|
-
"mocha": "^
|
|
50
|
-
"tape": "^5.
|
|
51
|
-
"ts-node": "^10.
|
|
52
|
-
"tsd": "^0.
|
|
53
|
-
"typescript": "^4.
|
|
49
|
+
"mocha": "^10.1.0",
|
|
50
|
+
"tape": "^5.6.1",
|
|
51
|
+
"ts-node": "^10.9.1",
|
|
52
|
+
"tsd": "^0.24.1",
|
|
53
|
+
"typescript": "^4.8.4"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@nodesecure/i18n": "^1.
|
|
57
|
-
"@nodesecure/js-x-ray": "^
|
|
58
|
-
"@nodesecure/vuln": "^1.
|
|
59
|
-
"@slimio/config": "^1.0
|
|
56
|
+
"@nodesecure/i18n": "^1.5.0",
|
|
57
|
+
"@nodesecure/js-x-ray": "^5.1.0",
|
|
58
|
+
"@nodesecure/vuln": "^1.7.0",
|
|
59
|
+
"@slimio/config": "^1.1.0",
|
|
60
60
|
"ts-results": "^3.3.0",
|
|
61
|
-
"
|
|
61
|
+
"tslib": "^2.4.1",
|
|
62
|
+
"type-fest": "^3.2.0"
|
|
62
63
|
},
|
|
63
64
|
"tsd": {
|
|
64
65
|
"directory": "test/types",
|