@ivy-apps/deslop 0.4.9 → 0.5.5
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 +7 -3
- package/wrapper.js +13 -17
- package/bin/deslop-darwin-arm64 +0 -0
- package/bin/deslop-linux-x64 +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ivy-apps/deslop",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "Deslop - remove slop from TypeScript projects.",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"repository": {
|
|
@@ -21,12 +21,16 @@
|
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
23
23
|
"bin": {
|
|
24
|
-
"deslop": "wrapper.js"
|
|
24
|
+
"deslop": "./wrapper.js"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
|
-
"bin",
|
|
28
27
|
"wrapper.js"
|
|
29
28
|
],
|
|
29
|
+
"optionalDependencies": {
|
|
30
|
+
"@ivy-apps/deslop-darwin-arm64": "0.5.5",
|
|
31
|
+
"@ivy-apps/deslop-linux-arm64": "0.5.5",
|
|
32
|
+
"@ivy-apps/deslop-linux-x64": "0.5.5"
|
|
33
|
+
},
|
|
30
34
|
"scripts": {},
|
|
31
35
|
"publishConfig": {
|
|
32
36
|
"access": "public",
|
package/wrapper.js
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const { spawnSync } = require('child_process');
|
|
3
|
-
const path = require('path');
|
|
4
3
|
const os = require('os');
|
|
5
4
|
|
|
6
|
-
const platform = os.platform();
|
|
7
|
-
const arch = os.arch();
|
|
5
|
+
const platform = os.platform();
|
|
6
|
+
const arch = os.arch();
|
|
8
7
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
const pkgName = `@ivy-apps/deslop-${platform}-${arch}`;
|
|
9
|
+
let binaryPath;
|
|
10
|
+
try {
|
|
11
|
+
binaryPath = require.resolve(`${pkgName}/bin/deslop`);
|
|
12
|
+
} catch {
|
|
13
|
+
console.error(`deslop: unsupported platform ${platform}-${arch}.`);
|
|
14
|
+
console.error(`Supported: darwin-arm64, linux-arm64, linux-x64.`);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
16
17
|
|
|
18
|
+
const result = spawnSync(binaryPath, process.argv.slice(2), { stdio: 'inherit', shell: false });
|
|
17
19
|
if (result.error) {
|
|
18
|
-
|
|
19
|
-
console.error(`Error: Deslop binary not found for ${platform}-${arch}.`);
|
|
20
|
-
console.error(`Deslop currently supports Linux (x64) and macOS (arm64).`);
|
|
21
|
-
} else {
|
|
22
|
-
console.error(`Failed to start Deslop: ${result.error.message}`);
|
|
23
|
-
}
|
|
20
|
+
console.error(`deslop: failed to start: ${result.error.message}`);
|
|
24
21
|
process.exit(1);
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
process.exit(result.status ?? 1);
|
package/bin/deslop-darwin-arm64
DELETED
|
Binary file
|
package/bin/deslop-linux-x64
DELETED
|
Binary file
|