@akinon/projectzero 1.8.0 → 1.10.0
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 +4 -0
- package/commands/create.ts +16 -0
- package/dist/commands/create.js +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/commands/create.ts
CHANGED
|
@@ -178,6 +178,22 @@ const updatePlugins = () => {
|
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
export default async () => {
|
|
181
|
+
const minNodeVersion = 18;
|
|
182
|
+
const currentNodeVersion = parseInt(
|
|
183
|
+
process.version.replace('v', '').split('.')[0]
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
if (currentNodeVersion < minNodeVersion) {
|
|
187
|
+
console.log(
|
|
188
|
+
'\x1b[31m%s\x1b[0m',
|
|
189
|
+
`Node version must be ${minNodeVersion} or higher.\n`.concat(
|
|
190
|
+
`Current version is ${currentNodeVersion}. Please update your Node version.`
|
|
191
|
+
)
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
process.exit(1);
|
|
195
|
+
}
|
|
196
|
+
|
|
181
197
|
const answers = await getAnswers();
|
|
182
198
|
|
|
183
199
|
loadingSpinner.start();
|
package/dist/commands/create.js
CHANGED
|
@@ -148,6 +148,12 @@ const updatePlugins = () => {
|
|
|
148
148
|
fs.writeFileSync(pluginsPath, 'module.exports = [];');
|
|
149
149
|
};
|
|
150
150
|
exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
151
|
+
const minNodeVersion = 18;
|
|
152
|
+
const currentNodeVersion = parseInt(process.version.replace('v', '').split('.')[0]);
|
|
153
|
+
if (currentNodeVersion < minNodeVersion) {
|
|
154
|
+
console.log('\x1b[31m%s\x1b[0m', `Node version must be ${minNodeVersion} or higher.\n`.concat(`Current version is ${currentNodeVersion}. Please update your Node version.`));
|
|
155
|
+
process.exit(1);
|
|
156
|
+
}
|
|
151
157
|
const answers = yield getAnswers();
|
|
152
158
|
loadingSpinner.start();
|
|
153
159
|
yield cloneRepository();
|