@fredlackey/devutils 0.0.9 → 0.0.11
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/package.json +1 -1
- package/src/commands/install.js +15 -0
- package/src/installs/installers.json +634 -136
- package/src/scripts/mkd.js +92 -45
package/package.json
CHANGED
package/src/commands/install.js
CHANGED
|
@@ -19,6 +19,7 @@ const { Command } = require('commander');
|
|
|
19
19
|
const fs = require('fs');
|
|
20
20
|
const path = require('path');
|
|
21
21
|
const readline = require('readline');
|
|
22
|
+
const os = require('../utils/common/os');
|
|
22
23
|
|
|
23
24
|
const INSTALLS_DIR = path.join(__dirname, '..', 'installs');
|
|
24
25
|
const INSTALLERS_JSON = path.join(INSTALLS_DIR, 'installers.json');
|
|
@@ -244,10 +245,24 @@ async function resolveDependencies(name, visited = new Set(), installing = new S
|
|
|
244
245
|
// Sort dependencies by priority (lower priority = install first)
|
|
245
246
|
const sortedDeps = [...dependencies].sort((a, b) => (a.priority || 0) - (b.priority || 0));
|
|
246
247
|
|
|
248
|
+
// Get current platform for filtering platform-specific dependencies
|
|
249
|
+
const currentPlatform = os.detect().type;
|
|
250
|
+
|
|
247
251
|
// Process each dependency
|
|
248
252
|
for (const dep of sortedDeps) {
|
|
249
253
|
const depName = dep.name.replace('.js', '');
|
|
250
254
|
|
|
255
|
+
// Check if dependency is platform-specific and applies to current platform
|
|
256
|
+
// If 'platforms' is not specified, the dependency applies to all platforms
|
|
257
|
+
if (dep.platforms && dep.platforms.length > 0) {
|
|
258
|
+
if (!dep.platforms.includes(currentPlatform)) {
|
|
259
|
+
if (options.verbose) {
|
|
260
|
+
console.log(` [Skipping ${depName}: not needed on ${currentPlatform}]`);
|
|
261
|
+
}
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
251
266
|
// Check if dependency is eligible for this platform
|
|
252
267
|
if (!checkIsEligible(depName)) {
|
|
253
268
|
if (options.verbose) {
|