csskit 0.0.6 → 0.0.7-canary.17dbae69aa

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/bin/csskit CHANGED
@@ -1,40 +1,46 @@
1
- #!/usr/bin/env node
2
- const { platform, arch, env, version, release } = process;
3
- const { join } = require('path');
1
+ #!/bin/bash
2
+ set -e
4
3
 
5
- const PLATFORMS = {
6
- win32: {
7
- x64: "csskit-win32-x64.exe",
8
- arm64: "csskit-win32-arm64.exe",
9
- },
10
- darwin: {
11
- x64: "csskit-darwin-x64",
12
- arm64: "csskit-darwin-arm64",
13
- },
14
- linux: {
15
- x64: "csskit-linux-x64",
16
- arm64: "csskit-linux-arm64",
17
- },
18
- };
4
+ # Get script directory
5
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
19
6
 
20
- const binPath = PLATFORMS?.[platform]?.[arch];
21
- if (binPath) {
22
- const result = require("child_process").spawnSync(
23
- join(__dirname, binPath),
24
- process.argv.slice(2),
25
- {
26
- shell: false,
27
- stdio: "inherit",
28
- env,
29
- }
30
- );
7
+ # Detect platform
8
+ case "$(uname -s)" in
9
+ Linux*) PLATFORM="linux" ;;
10
+ Darwin*) PLATFORM="darwin" ;;
11
+ MINGW*|MSYS*|CYGWIN*) PLATFORM="win32" ;;
12
+ *)
13
+ echo "Unsupported platform: $(uname -s)" >&2
14
+ exit 1
15
+ ;;
16
+ esac
31
17
 
32
- if (result.error) {
33
- throw result.error;
34
- }
18
+ # Detect architecture
19
+ case "$(uname -m)" in
20
+ x86_64|amd64) ARCH="x64" ;;
21
+ aarch64|arm64) ARCH="arm64" ;;
22
+ *)
23
+ echo "Unsupported architecture: $(uname -m)" >&2
24
+ exit 1
25
+ ;;
26
+ esac
35
27
 
36
- process.exitCode = result.status;
37
- } else {
38
- console.error(`Unsupported platform ${platform}-${arch}`);
39
- process.exitCode = 1;
40
- }
28
+ # Package name for this platform
29
+ PACKAGE_NAME="csskit-${PLATFORM}-${ARCH}"
30
+
31
+ # Find binary in platform-specific optional dependency
32
+ if [ "$PLATFORM" = "win32" ]; then
33
+ BIN_PATH="${SCRIPT_DIR}/../../${PACKAGE_NAME}/bin/csskit.exe"
34
+ else
35
+ BIN_PATH="${SCRIPT_DIR}/../../${PACKAGE_NAME}/bin/csskit"
36
+ fi
37
+
38
+ if [ -f "$BIN_PATH" ]; then
39
+ exec "$BIN_PATH" "$@"
40
+ fi
41
+
42
+ # Binary not found
43
+ echo "Error: csskit binary not found for ${PLATFORM}-${ARCH}" >&2
44
+ echo "Please ensure the appropriate platform package is installed:" >&2
45
+ echo " npm install ${PACKAGE_NAME}" >&2
46
+ exit 1
package/bin/csskit.cmd ADDED
@@ -0,0 +1,35 @@
1
+ @echo off
2
+ setlocal enabledelayedexpansion
3
+
4
+ :: Get script directory
5
+ set SCRIPT_DIR=%~dp0
6
+
7
+ :: Detect architecture
8
+ if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
9
+ set ARCH=x64
10
+ ) else if "%PROCESSOR_ARCHITECTURE%"=="ARM64" (
11
+ set ARCH=arm64
12
+ ) else if "%PROCESSOR_ARCHITEW6432%"=="AMD64" (
13
+ set ARCH=x64
14
+ ) else if "%PROCESSOR_ARCHITEW6432%"=="ARM64" (
15
+ set ARCH=arm64
16
+ ) else (
17
+ echo Unsupported architecture: %PROCESSOR_ARCHITECTURE% 1>&2
18
+ exit /b 1
19
+ )
20
+
21
+ :: Package name for this platform
22
+ set PACKAGE_NAME=csskit-win32-!ARCH!
23
+
24
+ :: Find binary in platform-specific optional dependency
25
+ set BIN_PATH=%SCRIPT_DIR%..\..\!PACKAGE_NAME!\bin\csskit.exe
26
+ if exist "!BIN_PATH!" (
27
+ "!BIN_PATH!" %*
28
+ exit /b %ERRORLEVEL%
29
+ )
30
+
31
+ :: Binary not found
32
+ echo Error: csskit binary not found for win32-!ARCH! 1>&2
33
+ echo Please ensure the appropriate platform package is installed: 1>&2
34
+ echo npm install !PACKAGE_NAME! 1>&2
35
+ exit /b 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "csskit",
3
- "version": "0.0.6",
3
+ "version": "0.0.7-canary.17dbae69aa",
4
4
  "description": "Refreshing CSS",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,6 +10,14 @@
10
10
  "files": [
11
11
  "./bin"
12
12
  ],
13
+ "optionalDependencies": {
14
+ "csskit-linux-x64": "0.0.7-canary.17dbae69aa",
15
+ "csskit-linux-arm64": "0.0.7-canary.17dbae69aa",
16
+ "csskit-darwin-x64": "0.0.7-canary.17dbae69aa",
17
+ "csskit-darwin-arm64": "0.0.7-canary.17dbae69aa",
18
+ "csskit-win32-x64": "0.0.7-canary.17dbae69aa",
19
+ "csskit-win32-arm64": "0.0.7-canary.17dbae69aa"
20
+ },
13
21
  "funding": {
14
22
  "url": "https://github.com/sponsors/keithamus"
15
23
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file