- Add Foundry project configuration (foundry.toml, foundry.lock) - Add Solidity contracts (TokenFactory138, BridgeVault138, ComplianceRegistry, etc.) - Add API definitions (OpenAPI, GraphQL, gRPC, AsyncAPI) - Add comprehensive test suite (unit, integration, fuzz, invariants) - Add API services (REST, GraphQL, orchestrator, packet service) - Add documentation (ISO20022 mapping, runbooks, adapter guides) - Add development tools (RBC tool, Swagger UI, mock server) - Update OpenZeppelin submodules to v5.0.0
113 lines
2.4 KiB
Markdown
113 lines
2.4 KiB
Markdown
# pnpm Migration Summary
|
|
|
|
All package management has been migrated from npm to pnpm.
|
|
|
|
## Changes Made
|
|
|
|
### Configuration Files
|
|
|
|
1. **pnpm-workspace.yaml** - Workspace configuration
|
|
2. **.npmrc** - pnpm-specific settings
|
|
3. **.pnpmfile.cjs** - Workspace hooks for dependency management
|
|
4. **api/package.json** - Root workspace package with pnpm scripts
|
|
|
|
### Updated Documentation
|
|
|
|
All documentation files updated to use pnpm:
|
|
- `api/README.md`
|
|
- `api/GETTING_STARTED.md`
|
|
- `api/PNPM_SETUP.md`
|
|
- `api/tools/README.md`
|
|
- `api/tools/swagger-ui/README.md`
|
|
- `api/tools/swagger-ui/QUICKSTART.md`
|
|
- `api/tools/swagger-ui/SWAGGER_DOCS.md`
|
|
- `test/api/README.md`
|
|
- `docs/api/swagger-ui-guide.md`
|
|
|
|
### Updated Scripts
|
|
|
|
- All `npm install` → `pnpm install`
|
|
- All `npm run` → `pnpm run`
|
|
- All `npm start` → `pnpm start`
|
|
- All `npm test` → `pnpm test`
|
|
- All `npm build` → `pnpm run build`
|
|
- All `npx` → `pnpm exec`
|
|
|
|
### Updated Build Files
|
|
|
|
- `api/tools/swagger-ui/Dockerfile` - Uses pnpm
|
|
- `api/tools/swagger-ui/Makefile` - Uses pnpm
|
|
- `api/tools/openapi-generator/generate-sdks.sh` - Uses pnpm exec
|
|
|
|
### Updated Package Scripts
|
|
|
|
- `api/tools/mock-server/package.json` - Concurrent scripts use pnpm
|
|
- `api/tools/openapi-generator/package.json` - Generator scripts use pnpm exec
|
|
- `api/tools/sdk-templates/typescript-sdk-template/package.json` - Prepublish uses pnpm
|
|
|
|
## Workspace Structure
|
|
|
|
The API directory is now a pnpm workspace with:
|
|
|
|
```
|
|
api/
|
|
├── services/ # Service packages (@emoney/rest-api, etc.)
|
|
├── shared/ # Shared packages (@emoney/blockchain, etc.)
|
|
├── packages/ # Specification packages
|
|
└── tools/ # Development tools
|
|
```
|
|
|
|
## Quick Reference
|
|
|
|
### Install Dependencies
|
|
|
|
```bash
|
|
cd api
|
|
pnpm install
|
|
```
|
|
|
|
### Run Service
|
|
|
|
```bash
|
|
cd api/services/rest-api
|
|
pnpm run dev
|
|
```
|
|
|
|
### Build All
|
|
|
|
```bash
|
|
cd api
|
|
pnpm run build:all
|
|
```
|
|
|
|
### Add Dependency
|
|
|
|
```bash
|
|
cd api/services/rest-api
|
|
pnpm add express
|
|
```
|
|
|
|
### Workspace Package
|
|
|
|
```bash
|
|
cd api/services/rest-api
|
|
pnpm add @emoney/blockchain
|
|
# Automatically uses workspace:*
|
|
```
|
|
|
|
## Benefits
|
|
|
|
- ✅ Faster installs (up to 2x faster)
|
|
- ✅ Disk efficient (shared store)
|
|
- ✅ Better dependency resolution
|
|
- ✅ Native workspace support
|
|
- ✅ Stricter peer dependency handling
|
|
|
|
## Next Steps
|
|
|
|
1. Run `pnpm install` in `api/` directory
|
|
2. Verify workspace packages are linked correctly
|
|
3. Test service startup
|
|
4. Commit `pnpm-lock.yaml` to version control
|
|
|