@preship/core 1.0.0 → 1.0.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/dist/index.js +15 -15
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -65,7 +65,7 @@ function validateConfig(config, filePath) {
|
|
|
65
65
|
throw new Error(
|
|
66
66
|
`Invalid preship-config at ${filePath}:
|
|
67
67
|
'policy' must be one of: ${VALID_POLICIES.join(", ")}, got '${config.policy}'.
|
|
68
|
-
See https://github.com/
|
|
68
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -74,7 +74,7 @@ function validateConfig(config, filePath) {
|
|
|
74
74
|
throw new Error(
|
|
75
75
|
`Invalid preship-config at ${filePath}:
|
|
76
76
|
'output' must be one of: ${VALID_OUTPUTS.join(", ")}, got '${config.output}'.
|
|
77
|
-
See https://github.com/
|
|
77
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -84,7 +84,7 @@ function validateConfig(config, filePath) {
|
|
|
84
84
|
throw new Error(
|
|
85
85
|
`Invalid preship-config at ${filePath}:
|
|
86
86
|
'${field}' must be an array of strings, got ${typeof config[field]}.
|
|
87
|
-
See https://github.com/
|
|
87
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
for (const item of config[field]) {
|
|
@@ -92,7 +92,7 @@ function validateConfig(config, filePath) {
|
|
|
92
92
|
throw new Error(
|
|
93
93
|
`Invalid preship-config at ${filePath}:
|
|
94
94
|
'${field}' must contain only strings, found ${typeof item}.
|
|
95
|
-
See https://github.com/
|
|
95
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
@@ -102,14 +102,14 @@ function validateConfig(config, filePath) {
|
|
|
102
102
|
throw new Error(
|
|
103
103
|
`Invalid preship-config at ${filePath}:
|
|
104
104
|
'flagUnknown' must be a boolean, got ${typeof config.flagUnknown}.
|
|
105
|
-
See https://github.com/
|
|
105
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
106
106
|
);
|
|
107
107
|
}
|
|
108
108
|
if (config.scanDevDependencies !== void 0 && typeof config.scanDevDependencies !== "boolean") {
|
|
109
109
|
throw new Error(
|
|
110
110
|
`Invalid preship-config at ${filePath}:
|
|
111
111
|
'scanDevDependencies' must be a boolean, got ${typeof config.scanDevDependencies}.
|
|
112
|
-
See https://github.com/
|
|
112
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
if (config.exceptions !== void 0) {
|
|
@@ -117,7 +117,7 @@ function validateConfig(config, filePath) {
|
|
|
117
117
|
throw new Error(
|
|
118
118
|
`Invalid preship-config at ${filePath}:
|
|
119
119
|
'exceptions' must be an array, got ${typeof config.exceptions}.
|
|
120
|
-
See https://github.com/
|
|
120
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
for (const entry of config.exceptions) {
|
|
@@ -125,7 +125,7 @@ function validateConfig(config, filePath) {
|
|
|
125
125
|
throw new Error(
|
|
126
126
|
`Invalid preship-config at ${filePath}:
|
|
127
127
|
Each entry in 'exceptions' must be an object with 'package' and 'reason' fields.
|
|
128
|
-
See https://github.com/
|
|
128
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
129
129
|
);
|
|
130
130
|
}
|
|
131
131
|
const e = entry;
|
|
@@ -133,7 +133,7 @@ function validateConfig(config, filePath) {
|
|
|
133
133
|
throw new Error(
|
|
134
134
|
`Invalid preship-config at ${filePath}:
|
|
135
135
|
Each exception must have 'package' (string) and 'reason' (string) fields.
|
|
136
|
-
See https://github.com/
|
|
136
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -143,7 +143,7 @@ function validateConfig(config, filePath) {
|
|
|
143
143
|
throw new Error(
|
|
144
144
|
`Invalid preship-config at ${filePath}:
|
|
145
145
|
'mode' must be one of: ${VALID_MODES.join(", ")}, got '${config.mode}'.
|
|
146
|
-
See https://github.com/
|
|
146
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
@@ -152,7 +152,7 @@ function validateConfig(config, filePath) {
|
|
|
152
152
|
throw new Error(
|
|
153
153
|
`Invalid preship-config at ${filePath}:
|
|
154
154
|
'networkTimeout' must be a positive number (milliseconds), got '${config.networkTimeout}'.
|
|
155
|
-
See https://github.com/
|
|
155
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
156
156
|
);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
@@ -161,7 +161,7 @@ function validateConfig(config, filePath) {
|
|
|
161
161
|
throw new Error(
|
|
162
162
|
`Invalid preship-config at ${filePath}:
|
|
163
163
|
'networkConcurrency' must be a positive integer, got '${config.networkConcurrency}'.
|
|
164
|
-
See https://github.com/
|
|
164
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
165
165
|
);
|
|
166
166
|
}
|
|
167
167
|
}
|
|
@@ -169,7 +169,7 @@ function validateConfig(config, filePath) {
|
|
|
169
169
|
throw new Error(
|
|
170
170
|
`Invalid preship-config at ${filePath}:
|
|
171
171
|
'cache' must be a boolean, got ${typeof config.cache}.
|
|
172
|
-
See https://github.com/
|
|
172
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
173
173
|
);
|
|
174
174
|
}
|
|
175
175
|
if (config.cacheTTL !== void 0) {
|
|
@@ -177,7 +177,7 @@ function validateConfig(config, filePath) {
|
|
|
177
177
|
throw new Error(
|
|
178
178
|
`Invalid preship-config at ${filePath}:
|
|
179
179
|
'cacheTTL' must be a positive number (seconds), got '${config.cacheTTL}'.
|
|
180
|
-
See https://github.com/
|
|
180
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
181
181
|
);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
@@ -186,7 +186,7 @@ function validateConfig(config, filePath) {
|
|
|
186
186
|
throw new Error(
|
|
187
187
|
`Invalid preship-config at ${filePath}:
|
|
188
188
|
'scanTimeout' must be a non-negative number (milliseconds, 0 = disabled), got '${config.scanTimeout}'.
|
|
189
|
-
See https://github.com/
|
|
189
|
+
See https://github.com/dipen-code/preship for config docs.`
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
192
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@preship/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Core infrastructure for PreShip — types, config, detection, parsing, caching, and rate limiting",
|
|
5
5
|
"author": "Cyfox Inc.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"lint": "tsc --noEmit"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"glob": "^10.5.0",
|
|
25
24
|
"js-yaml": "^4.1.1",
|
|
26
25
|
"spdx-expression-parse": "^4.0.0",
|
|
27
26
|
"spdx-license-list": "^6.11.0"
|