mirror of
https://github.com/Heretek-AI/openclaw.git
synced 2026-07-19 18:43:46 -04:00
a9ae1a6778
Matrix Protocol: - docker-compose.matrix.yml: Dendrite homeserver + PostgreSQL + Nginx TLS - src/channels/plugins/matrix-channel.ts: OpenClaw plugin implementation - docs/matrix-triad-setup.md: Setup guide with auth scheme (@tm1-4:triad.local) MCP Server Integration: - docs/mcp-triad-integration.md: SearXNG, Playwright, GitHub MCP configs - docs/mcp-curiosity-mapping.md: Gap-to-capability mapping Node Sync Architecture: - src/services/node-sync-service.ts: WebSocket peer sync + presence detection - src/services/node-sync-service.test.ts: Unit tests - docs/node-sync-architecture.md: Architecture docs Triad Resilience: - scripts/triad-corruption-check.mjs: SQLite + log + config + git integrity - docs/triad-resilience.md: Recovery procedures - .secure/deployment-logs/README.md: Schema v2 - skills/triad-heartbeat/SKILL.md: Corruption check integration NPM Publish Workflow: - scripts/npm-publish.mjs: version, changelog, validate, publish, rollback - .github/workflows/npm-publish.yml: GitHub Actions with provenance - docs/npm-publish-guide.md: Complete documentation All deliverables tested in Docker before production.
46 lines
1.3 KiB
Bash
Executable File
46 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
mode="${1:-}"
|
|
package_dir="${2:-}"
|
|
|
|
if [[ "${mode}" != "--dry-run" && "${mode}" != "--publish" ]]; then
|
|
echo "usage: bash scripts/plugin-npm-publish.sh [--dry-run|--publish] <package-dir>" >&2
|
|
exit 2
|
|
fi
|
|
|
|
if [[ -z "${package_dir}" ]]; then
|
|
echo "missing package dir" >&2
|
|
exit 2
|
|
fi
|
|
|
|
package_name="$(node -e 'const pkg = require(require("node:path").resolve(process.argv[1], "package.json")); console.log(pkg.name)' "${package_dir}")"
|
|
package_version="$(node -e 'const pkg = require(require("node:path").resolve(process.argv[1], "package.json")); console.log(pkg.version)' "${package_dir}")"
|
|
publish_cmd=(npm publish --access public --provenance)
|
|
release_channel="stable"
|
|
|
|
if [[ "${package_version}" == *-beta.* ]]; then
|
|
publish_cmd=(npm publish --access public --tag beta --provenance)
|
|
release_channel="beta"
|
|
fi
|
|
|
|
echo "Resolved package dir: ${package_dir}"
|
|
echo "Resolved package name: ${package_name}"
|
|
echo "Resolved package version: ${package_version}"
|
|
echo "Resolved release channel: ${release_channel}"
|
|
echo "Publish auth: GitHub OIDC trusted publishing"
|
|
|
|
printf 'Publish command:'
|
|
printf ' %q' "${publish_cmd[@]}"
|
|
printf '\n'
|
|
|
|
if [[ "${mode}" == "--dry-run" ]]; then
|
|
exit 0
|
|
fi
|
|
|
|
(
|
|
cd "${package_dir}"
|
|
"${publish_cmd[@]}"
|
|
)
|