@ivy-apps/deslop 0.4.7

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.
Binary file
Binary file
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@ivy-apps/deslop",
3
+ "version": "0.4.7",
4
+ "description": "Deslop - remove slop from TypeScript projects.",
5
+ "license": "BSD-3-Clause",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Ivy-Apps/deslop.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/Ivy-Apps/deslop/issues"
12
+ },
13
+ "homepage": "https://github.com/Ivy-Apps/deslop#readme",
14
+ "keywords": [
15
+ "typescript",
16
+ "cli",
17
+ "code-quality",
18
+ "deslop"
19
+ ],
20
+ "engines": {
21
+ "node": ">=18"
22
+ },
23
+ "bin": {
24
+ "deslop": "wrapper.js"
25
+ },
26
+ "files": [
27
+ "bin",
28
+ "wrapper.js"
29
+ ],
30
+ "scripts": {},
31
+ "publishConfig": {
32
+ "access": "public",
33
+ "registry": "https://registry.npmjs.org/"
34
+ }
35
+ }
package/wrapper.js ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ const { spawnSync } = require('child_process');
3
+ const path = require('path');
4
+ const os = require('os');
5
+
6
+ const platform = os.platform(); // 'darwin', 'linux'
7
+ const arch = os.arch(); // 'arm64', 'x64'
8
+
9
+ const binaryName = `deslop-${platform}-${arch}`;
10
+ const binaryPath = path.join(__dirname, 'bin', binaryName);
11
+
12
+ const result = spawnSync(binaryPath, process.argv.slice(2), {
13
+ stdio: 'inherit',
14
+ shell: false
15
+ });
16
+
17
+ if (result.error) {
18
+ if (result.error.code === 'ENOENT') {
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
+ }
24
+ process.exit(1);
25
+ }
26
+
27
+ process.exit(result.status ?? 1);