build: manage nodecar dependencies via workspace

This commit is contained in:
zhom
2025-06-03 16:53:27 +04:00
parent ccfd1f81f6
commit c698fff101
13 changed files with 52 additions and 1378 deletions
+2 -3
View File
@@ -14,9 +14,8 @@ on:
- "src/**"
- "nodecar/**"
- "package.json"
- "package-lock.json"
- "yarn.lock"
- "pnpm-lock.yaml"
- "yarn.lock"
- "README.md"
- ".github/workflows/lint-js.yml"
- ".github/workflows/osv.yml"
@@ -68,7 +67,7 @@ jobs:
- name: Install nodecar dependencies
working-directory: ./nodecar
run: |
pnpm install --ignore-workspace --frozen-lockfile
pnpm install --frozen-lockfile
- name: Build nodecar binary
shell: bash
+4 -8
View File
@@ -21,11 +21,10 @@ on:
paths:
- "package.json"
- "pnpm-lock.yaml"
- "package-lock.json"
- "src-tauri/Cargo.toml"
- "src-tauri/Cargo.lock"
- "nodecar/package.json"
- "nodecar/package-lock.json"
- "nodecar/pnpm-lock.yaml"
- ".github/workflows/osv.yml"
merge_group:
branches: ["main"]
@@ -37,11 +36,10 @@ on:
paths:
- "package.json"
- "pnpm-lock.yaml"
- "package-lock.json"
- "src-tauri/Cargo.toml"
- "src-tauri/Cargo.lock"
- "nodecar/package.json"
- "nodecar/package-lock.json"
- "nodecar/pnpm-lock.yaml"
permissions:
security-events: write
@@ -57,10 +55,9 @@ jobs:
scan-args: |-
-r
--skip-git
--lockfile=package-lock.json
--lockfile=pnpm-lock.yaml
--lockfile=src-tauri/Cargo.lock
--lockfile=nodecar/package-lock.json
--lockfile=nodecar/pnpm-lock.yaml
./
scan-pr:
@@ -71,8 +68,7 @@ jobs:
scan-args: |-
-r
--skip-git
--lockfile=package-lock.json
--lockfile=pnpm-lock.yaml
--lockfile=src-tauri/Cargo.lock
--lockfile=nodecar/package-lock.json
--lockfile=nodecar/pnpm-lock.yaml
./
+2 -3
View File
@@ -18,10 +18,9 @@ jobs:
scan-args: |-
-r
--skip-git
--lockfile=package-lock.json
--lockfile=pnpm-lock.yaml
--lockfile=src-tauri/Cargo.lock
--lockfile=nodecar/package-lock.json
--lockfile=nodecar/pnpm-lock.yaml
./
permissions:
security-events: write
@@ -118,7 +117,7 @@ jobs:
- name: Install nodecar dependencies
working-directory: ./nodecar
run: |
pnpm install --ignore-workspace --frozen-lockfile
pnpm install --frozen-lockfile
- name: Build nodecar sidecar
shell: bash
+2 -3
View File
@@ -17,10 +17,9 @@ jobs:
scan-args: |-
-r
--skip-git
--lockfile=package-lock.json
--lockfile=pnpm-lock.yaml
--lockfile=src-tauri/Cargo.lock
--lockfile=nodecar/package-lock.json
--lockfile=nodecar/pnpm-lock.yaml
./
permissions:
security-events: write
@@ -86,7 +85,7 @@ jobs:
- name: Install nodecar dependencies
working-directory: ./nodecar
run: |
pnpm install --ignore-workspace --frozen-lockfile
pnpm install --frozen-lockfile
- name: Build nodecar sidecar
shell: bash
+4
View File
@@ -5,6 +5,10 @@
/.pnp
.pnp.js
# npm/yarn lock files (project uses pnpm only)
**/package-lock.json
**/yarn.lock
# testing
/coverage
+3
View File
@@ -3,6 +3,7 @@
"applescript",
"autoconfig",
"autologin",
"biomejs",
"cdylib",
"CFURL",
"checkin",
@@ -11,6 +12,7 @@
"donutbrowser",
"dtolnay",
"elif",
"esbuild",
"gifs",
"launchservices",
"mountpoint",
@@ -39,6 +41,7 @@
"Torbrowser",
"turbopack",
"unlisten",
"unrs",
"wiremock",
"xattr",
"zhom"
+1 -1
View File
@@ -50,7 +50,7 @@ After having the above dependencies installed, proceed through the following ste
```bash
cd nodecar
pnpm install --ignore-workspace --frozen-lockfile
pnpm install --frozen-lockfile
cd ..
```
-1304
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -48,8 +48,8 @@ program
ignoreProxyCertificate: options.ignoreCertificate,
});
console.log(JSON.stringify(config));
} catch (error: any) {
console.error(`Failed to start proxy: ${error.message}`);
} catch (error: unknown) {
console.error(`Failed to start proxy: ${JSON.stringify(error)}`);
}
} else if (action === "stop") {
if (options.id) {
+2 -2
View File
@@ -1,5 +1,5 @@
import { spawn } from "child_process";
import path from "path";
import { spawn } from "node:child_process";
import path from "node:path";
import getPort from "get-port";
import {
type ProxyConfig,
+3 -3
View File
@@ -1,6 +1,6 @@
import fs from "fs";
import path from "path";
import os from "os";
import fs from "node:fs";
import path from "node:path";
import os from "node:os";
// Define the proxy configuration type
export interface ProxyConfig {
+22 -47
View File
@@ -189,18 +189,14 @@ packages:
resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==}
engines: {node: '>=6.9.0'}
'@babel/compat-data@7.27.3':
resolution: {integrity: sha512-V42wFfx1ymFte+ecf6iXghnnP8kWTO+ZLXIyZq+1LAXHHvTZdVxicn4yiVYdYMGaCO3tmqub11AorKkv+iodqw==}
'@babel/compat-data@7.27.5':
resolution: {integrity: sha512-KiRAp/VoJaWkkte84TvUd9qjdbZAdiqyvMxrGl1N6vzFogKmaLgoM3L1kgtLicp2HP5fBJS8JrZKLVIZGVJAVg==}
engines: {node: '>=6.9.0'}
'@babel/core@7.27.4':
resolution: {integrity: sha512-bXYxrXFubeYdvB0NhD/NBB3Qi6aZeV20GOWVI47t2dkecCEoneR4NPVcb7abpXDEvejgrUfFtG6vG/zxAKmg+g==}
engines: {node: '>=6.9.0'}
'@babel/generator@7.27.3':
resolution: {integrity: sha512-xnlJYj5zepml8NXtjkG0WquFUv8RskFqyFcVgTBp5k+NaA/8uw/K+OSVf8AMGw5e9HKP2ETd5xpK5MLZQD6b4Q==}
engines: {node: '>=6.9.0'}
'@babel/generator@7.27.5':
resolution: {integrity: sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==}
engines: {node: '>=6.9.0'}
@@ -239,11 +235,6 @@ packages:
resolution: {integrity: sha512-Y+bO6U+I7ZKaM5G5rDUZiYfUvQPUibYmAFe7EnKdnKBbVXDZxvp+MWOH5gYciY0EPk4EScsuFMQBbEfpdRKSCQ==}
engines: {node: '>=6.9.0'}
'@babel/parser@7.27.4':
resolution: {integrity: sha512-BRmLHGwpUqLFR2jzx9orBuX/ABDkj2jLKOXrHDTN2aOKL+jFDDKaRNo9nyYsIl9h/UE/7lMKdDjKQQyxKKDZ7g==}
engines: {node: '>=6.0.0'}
hasBin: true
'@babel/parser@7.27.5':
resolution: {integrity: sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==}
engines: {node: '>=6.0.0'}
@@ -3596,36 +3587,28 @@ snapshots:
js-tokens: 4.0.0
picocolors: 1.1.1
'@babel/compat-data@7.27.3': {}
'@babel/compat-data@7.27.5': {}
'@babel/core@7.27.4':
dependencies:
'@ampproject/remapping': 2.3.0
'@babel/code-frame': 7.27.1
'@babel/generator': 7.27.3
'@babel/generator': 7.27.5
'@babel/helper-compilation-targets': 7.27.2
'@babel/helper-module-transforms': 7.27.3(@babel/core@7.27.4)
'@babel/helpers': 7.27.4
'@babel/parser': 7.27.4
'@babel/parser': 7.27.5
'@babel/template': 7.27.2
'@babel/traverse': 7.27.4
'@babel/types': 7.27.3
convert-source-map: 2.0.0
debug: 4.4.1
debug: 4.4.1(supports-color@5.5.0)
gensync: 1.0.0-beta.2
json5: 2.2.3
semver: 6.3.1
transitivePeerDependencies:
- supports-color
'@babel/generator@7.27.3':
dependencies:
'@babel/parser': 7.27.4
'@babel/types': 7.27.3
'@jridgewell/gen-mapping': 0.3.8
'@jridgewell/trace-mapping': 0.3.25
jsesc: 3.1.0
'@babel/generator@7.27.5':
dependencies:
'@babel/parser': 7.27.5
@@ -3636,7 +3619,7 @@ snapshots:
'@babel/helper-compilation-targets@7.27.2':
dependencies:
'@babel/compat-data': 7.27.3
'@babel/compat-data': 7.27.5
'@babel/helper-validator-option': 7.27.1
browserslist: 4.25.0
lru-cache: 5.1.1
@@ -3671,10 +3654,6 @@ snapshots:
'@babel/template': 7.27.2
'@babel/types': 7.27.3
'@babel/parser@7.27.4':
dependencies:
'@babel/types': 7.27.3
'@babel/parser@7.27.5':
dependencies:
'@babel/types': 7.27.3
@@ -3692,17 +3671,17 @@ snapshots:
'@babel/template@7.27.2':
dependencies:
'@babel/code-frame': 7.27.1
'@babel/parser': 7.27.4
'@babel/parser': 7.27.5
'@babel/types': 7.27.3
'@babel/traverse@7.27.4':
dependencies:
'@babel/code-frame': 7.27.1
'@babel/generator': 7.27.3
'@babel/parser': 7.27.4
'@babel/generator': 7.27.5
'@babel/parser': 7.27.5
'@babel/template': 7.27.2
'@babel/types': 7.27.3
debug: 4.4.1
debug: 4.4.1(supports-color@5.5.0)
globals: 11.12.0
transitivePeerDependencies:
- supports-color
@@ -3852,7 +3831,7 @@ snapshots:
'@eslint/config-array@0.20.0':
dependencies:
'@eslint/object-schema': 2.1.6
debug: 4.4.1
debug: 4.4.1(supports-color@5.5.0)
minimatch: 3.1.2
transitivePeerDependencies:
- supports-color
@@ -3866,7 +3845,7 @@ snapshots:
'@eslint/eslintrc@3.3.1':
dependencies:
ajv: 6.12.6
debug: 4.4.1
debug: 4.4.1(supports-color@5.5.0)
espree: 10.3.0
globals: 14.0.0
ignore: 5.3.2
@@ -4701,7 +4680,7 @@ snapshots:
'@types/babel__core@7.20.5':
dependencies:
'@babel/parser': 7.27.4
'@babel/parser': 7.27.5
'@babel/types': 7.27.3
'@types/babel__generator': 7.27.0
'@types/babel__template': 7.4.4
@@ -4713,7 +4692,7 @@ snapshots:
'@types/babel__template@7.4.4':
dependencies:
'@babel/parser': 7.27.4
'@babel/parser': 7.27.5
'@babel/types': 7.27.3
'@types/babel__traverse@7.20.7':
@@ -4761,7 +4740,7 @@ snapshots:
'@typescript-eslint/types': 8.33.1
'@typescript-eslint/typescript-estree': 8.33.1(typescript@5.8.3)
'@typescript-eslint/visitor-keys': 8.33.1
debug: 4.4.1
debug: 4.4.1(supports-color@5.5.0)
eslint: 9.28.0(jiti@2.4.2)
typescript: 5.8.3
transitivePeerDependencies:
@@ -4771,7 +4750,7 @@ snapshots:
dependencies:
'@typescript-eslint/tsconfig-utils': 8.33.1(typescript@5.8.3)
'@typescript-eslint/types': 8.33.1
debug: 4.4.1
debug: 4.4.1(supports-color@5.5.0)
typescript: 5.8.3
transitivePeerDependencies:
- supports-color
@@ -4789,7 +4768,7 @@ snapshots:
dependencies:
'@typescript-eslint/typescript-estree': 8.33.1(typescript@5.8.3)
'@typescript-eslint/utils': 8.33.1(eslint@9.28.0(jiti@2.4.2))(typescript@5.8.3)
debug: 4.4.1
debug: 4.4.1(supports-color@5.5.0)
eslint: 9.28.0(jiti@2.4.2)
ts-api-utils: 2.1.0(typescript@5.8.3)
typescript: 5.8.3
@@ -4804,7 +4783,7 @@ snapshots:
'@typescript-eslint/tsconfig-utils': 8.33.1(typescript@5.8.3)
'@typescript-eslint/types': 8.33.1
'@typescript-eslint/visitor-keys': 8.33.1
debug: 4.4.1
debug: 4.4.1(supports-color@5.5.0)
fast-glob: 3.3.3
is-glob: 4.0.3
minimatch: 9.0.5
@@ -5246,10 +5225,6 @@ snapshots:
dependencies:
ms: 2.1.3
debug@4.4.1:
dependencies:
ms: 2.1.3
debug@4.4.1(supports-color@5.5.0):
dependencies:
ms: 2.1.3
@@ -5481,7 +5456,7 @@ snapshots:
eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0)(eslint@9.28.0(jiti@2.4.2)):
dependencies:
'@nolyfill/is-core-module': 1.0.39
debug: 4.4.1
debug: 4.4.1(supports-color@5.5.0)
eslint: 9.28.0(jiti@2.4.2)
get-tsconfig: 4.10.1
is-bun-module: 2.0.0
@@ -5605,7 +5580,7 @@ snapshots:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.6
debug: 4.4.1
debug: 4.4.1(supports-color@5.5.0)
escape-string-regexp: 4.0.0
eslint-scope: 8.3.0
eslint-visitor-keys: 4.2.0
@@ -6109,7 +6084,7 @@ snapshots:
dependencies:
chalk: 5.4.1
commander: 14.0.0
debug: 4.4.1
debug: 4.4.1(supports-color@5.5.0)
lilconfig: 3.1.3
listr2: 8.3.3
micromatch: 4.0.8
+5 -2
View File
@@ -1,6 +1,9 @@
packages:
- "nodecar"
onlyBuiltDependencies:
- '@biomejs/biome'
- '@tailwindcss/oxide'
- "@biomejs/biome"
- "@tailwindcss/oxide"
- esbuild
- sharp
- unrs-resolver