csskit 0.0.7-canary.477dda2a83 → 0.0.7-canary.c2ddeeb1ed

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,56 @@
1
- #!/usr/bin/env node
2
- const { platform, arch, env, version, release } = process;
3
- const { join } = require('path');
4
-
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
- };
19
-
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
- );
31
-
32
- if (result.error) {
33
- throw result.error;
34
- }
35
-
36
- process.exitCode = result.status;
37
- } else {
38
- console.error(`Unsupported platform ${platform}-${arch}`);
39
- process.exitCode = 1;
40
- }
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ SOURCE="${BASH_SOURCE[0]}"
5
+ while [ -L "$SOURCE" ]; do
6
+ DIR="$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)"
7
+ TARGET="$(readlink "$SOURCE")"
8
+ case "$TARGET" in
9
+ /*) SOURCE="$TARGET" ;;
10
+ *) SOURCE="$DIR/$TARGET" ;;
11
+ esac
12
+ done
13
+
14
+ # Get script directory
15
+ SCRIPT_DIR="$(cd "$(dirname "${SOURCE}")" && pwd)"
16
+
17
+ # Detect platform
18
+ case "$(uname -s)" in
19
+ Linux*) PLATFORM="linux" ;;
20
+ Darwin*) PLATFORM="darwin" ;;
21
+ MINGW* | MSYS* | CYGWIN*) PLATFORM="win32" ;;
22
+ *)
23
+ echo "Unsupported platform: $(uname -s)" >&2
24
+ exit 1
25
+ ;;
26
+ esac
27
+
28
+ # Detect architecture
29
+ case "$(uname -m)" in
30
+ x86_64 | amd64) ARCH="x64" ;;
31
+ aarch64 | arm64) ARCH="arm64" ;;
32
+ *)
33
+ echo "Unsupported architecture: $(uname -m)" >&2
34
+ exit 1
35
+ ;;
36
+ esac
37
+
38
+ # Package name for this platform
39
+ PACKAGE_NAME="csskit-${PLATFORM}-${ARCH}"
40
+
41
+ # Find binary in platform-specific optional dependency
42
+ if [ "$PLATFORM" = "win32" ]; then
43
+ BIN_PATH="${SCRIPT_DIR}/../node_modules/${PACKAGE_NAME}/bin/csskit.exe"
44
+ else
45
+ BIN_PATH="${SCRIPT_DIR}/../node_modules/${PACKAGE_NAME}/bin/csskit"
46
+ fi
47
+
48
+ if [ -f "$BIN_PATH" ]; then
49
+ exec "$BIN_PATH" "$@"
50
+ fi
51
+
52
+ # Binary not found
53
+ echo "Error: csskit binary not found for ${PLATFORM}-${ARCH}" >&2
54
+ echo "Please ensure the appropriate platform package is installed:" >&2
55
+ echo " npm install ${PACKAGE_NAME}" >&2
56
+ 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.7-canary.477dda2a83",
3
+ "version": "0.0.7-canary.c2ddeeb1ed",
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.c2ddeeb1ed",
15
+ "csskit-linux-arm64": "0.0.7-canary.c2ddeeb1ed",
16
+ "csskit-darwin-x64": "0.0.7-canary.c2ddeeb1ed",
17
+ "csskit-darwin-arm64": "0.0.7-canary.c2ddeeb1ed",
18
+ "csskit-win32-x64": "0.0.7-canary.c2ddeeb1ed",
19
+ "csskit-win32-arm64": "0.0.7-canary.c2ddeeb1ed"
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