feat: make gateway publishable + add npmjs publish script
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

- Remove `private: true` from gateway package.json
- Add bin entry (mosaic-gateway), files array, npmjs publishConfig
- Add shebang to main.ts for bin execution
- New scripts/publish-npmjs.sh that patches @mosaic/* → @mosaicstack/*,
  resolves workspace deps to real versions, publishes to npmjs, restores
- Add publish-npmjs CI step in Woodpecker (runs on tags only)
- Update Gitea publish step comments for clarity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jarvis
2026-04-04 13:05:59 -05:00
parent 39ccba95d0
commit 501370ad65
4 changed files with 192 additions and 3 deletions

View File

@@ -1,9 +1,18 @@
{
"name": "@mosaic/gateway",
"version": "0.0.2",
"private": true,
"type": "module",
"main": "dist/main.js",
"bin": {
"mosaic-gateway": "dist/main.js"
},
"files": [
"dist"
],
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"scripts": {
"build": "tsc",
"dev": "tsx watch src/main.ts",

View File

@@ -1,3 +1,4 @@
#!/usr/bin/env node
import { config } from 'dotenv';
import { existsSync } from 'node:fs';
import { resolve, join } from 'node:path';