build: allow node package depends on workspace packages (#11963)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added a unified CLI entry point for server operations and introduced a new CLI executable alias.
  - Centralized and simplified server startup, allowing selection between CLI and server modes.
  - Added static migration module aggregation for easier migration management.

- **Bug Fixes**
  - Improved platform-specific native module loading for better compatibility and reliability.

- **Refactor**
  - Streamlined server build, startup, and artifact management processes.
  - Reorganized and simplified workflow and configuration files for backend services.
  - Transitioned export styles and import mechanisms for native modules to enhance maintainability.

- **Chores**
  - Removed unused dependencies and configuration files.
  - Updated test cases to reflect refined server flavor logic.
  - Adjusted package and build configurations for consistency and clarity.

- **Revert**
  - Removed legacy scripts and loaders no longer needed after refactor.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
forehalo
2025-04-24 10:36:51 +00:00
parent 4ffa37d1c3
commit f4ffdb9995
31 changed files with 331 additions and 332 deletions

View File

@@ -122,6 +122,7 @@ __metadata:
"@napi-rs/simple-git": "npm:^0.1.19"
"@perfsee/webpack": "npm:^1.13.0"
"@sentry/webpack-plugin": "npm:^3.0.0"
"@swc/core": "npm:^1.10.1"
"@tailwindcss/postcss": "npm:^4.0.0"
"@types/lodash-es": "npm:^4.17.12"
"@types/mime-types": "npm:^2.1.4"
@@ -139,6 +140,7 @@ __metadata:
lodash-es: "npm:^4.17.21"
mime-types: "npm:^3.0.0"
mini-css-extract-plugin: "npm:^2.9.2"
node-loader: "npm:^2.1.0"
postcss: "npm:^8.4.49"
postcss-loader: "npm:^8.1.1"
prettier: "npm:^3.4.2"
@@ -155,6 +157,7 @@ __metadata:
webpack-dev-server: "npm:^5.2.0"
webpack-merge: "npm:^6.0.1"
bin:
affine: ./bin/cli.js
r: ./bin/runner.js
languageName: unknown
linkType: soft
@@ -417,7 +420,6 @@ __metadata:
"@radix-ui/react-slot": "npm:^1.1.1"
"@radix-ui/react-toolbar": "npm:^1.1.1"
"@sentry/react": "npm:^9.2.0"
"@swc/core": "npm:^1.10.1"
"@testing-library/dom": "npm:^10.4.0"
"@testing-library/react": "npm:^16.1.0"
"@toeverything/infra": "workspace:*"
@@ -760,7 +762,6 @@ __metadata:
"@magic-works/i18n-codegen": "npm:^0.6.1"
"@playwright/test": "npm:=1.51.1"
"@smarttools/eslint-plugin-rxjs": "npm:^1.0.8"
"@swc/core": "npm:^1.10.1"
"@taplo/cli": "npm:^0.7.0"
"@toeverything/infra": "workspace:*"
"@types/eslint": "npm:^9.6.1"
@@ -14286,7 +14287,6 @@ __metadata:
"@affine/templates": "workspace:*"
"@emotion/react": "npm:^11.14.0"
"@preact/signals-core": "npm:^1.8.0"
"@swc/core": "npm:^1.10.1"
"@testing-library/dom": "npm:^10.4.0"
"@testing-library/react": "npm:^16.1.0"
"@types/react": "npm:^19.0.1"
@@ -25152,7 +25152,7 @@ __metadata:
languageName: node
linkType: hard
"loader-utils@npm:^2.0.0":
"loader-utils@npm:^2.0.0, loader-utils@npm:^2.0.3":
version: 2.0.4
resolution: "loader-utils@npm:2.0.4"
dependencies:
@@ -27414,6 +27414,17 @@ __metadata:
languageName: node
linkType: hard
"node-loader@npm:^2.1.0":
version: 2.1.0
resolution: "node-loader@npm:2.1.0"
dependencies:
loader-utils: "npm:^2.0.3"
peerDependencies:
webpack: ^5.0.0
checksum: 10/d2f20b1e0f946055fcbbf365c3927ffecfff9aee3b5cc2d71e45229ca27010267d3d6fdea04dcb7c0bc7ce9b87878105b8c1d15c05065c813b5c8ec5ef1fb4d1
languageName: node
linkType: hard
"node-releases@npm:^2.0.19":
version: 2.0.19
resolution: "node-releases@npm:2.0.19"