Correct NPM module path and add provenance (#1322)

This commit is contained in:
YotaHamada 2025-10-13 21:44:03 +09:00 committed by GitHub
parent 88d491074c
commit dab9908e31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 25 additions and 21 deletions

View File

@ -12,6 +12,10 @@ env:
VERSION: ${{ github.event.release.tag_name || inputs.version }}
NODE_VERSION: "22"
permissions:
contents: read
id-token: write
jobs:
# First, publish all platform-specific packages
publish-platform-packages:
@ -134,7 +138,7 @@ jobs:
run: |
cd npm/${{ matrix.package }}
# Try to publish, but don't fail if version already exists
npm publish --access public 2>&1 | tee publish.log || {
npm publish --access public --provenance 2>&1 | tee publish.log || {
if grep -q "cannot publish over the previously published versions" publish.log; then
echo "Version already published, skipping..."
exit 0
@ -200,7 +204,7 @@ jobs:
run: |
cd npm/dagu
# Try to publish, but don't fail if version already exists
npm publish --access public 2>&1 | tee publish.log || {
npm publish --access public --provenance 2>&1 | tee publish.log || {
if grep -q "cannot publish over the previously published versions" publish.log; then
echo "Version already published, skipping..."
exit 0
@ -221,11 +225,11 @@ jobs:
matrix:
include:
- os: ubuntu-latest
test-install: npm install -g dagu
test-install: 'npm install -g @dagu-org/dagu'
- os: macos-latest
test-install: npm install -g dagu
test-install: 'npm install -g @dagu-org/dagu'
- os: windows-latest
test-install: npm install -g dagu
test-install: 'npm install -g @dagu-org/dagu'
steps:
- name: Setup Node.js
@ -239,7 +243,7 @@ jobs:
# Wait for package to be available with retries
echo "Checking npm package availability..."
for i in {1..30}; do
if npm view dagu version 2>/dev/null; then
if npm view @dagu-org/dagu version 2>/dev/null; then
echo "Package is available!"
break
fi

View File

@ -115,7 +115,7 @@ brew update && brew upgrade dagu
**npm**:
```bash
# Install via npm
npm install -g --ignore-scripts=false dagu
npm install -g --ignore-scripts=false @dagu-org/dagu
```
### 2. Create your first workflow

View File

@ -31,7 +31,7 @@ Visit http://localhost:8080
### npm
```bash
npm install -g --ignore-scripts=false dagu
npm install -g --ignore-scripts=false @dagu-org/dagu
```
This installs Dagu globally with automatic platform detection.

View File

@ -26,7 +26,7 @@ brew update && brew install dagu
```
```bash [npm]
npm install -g --ignore-scripts=false dagu
npm install -g --ignore-scripts=false @dagu-org/dagu
```
:::

View File

@ -45,7 +45,7 @@ brew update && brew install dagu
```
```bash [npm]
npm install -g --ignore-scripts=false dagu
npm install -g --ignore-scripts=false @dagu-org/dagu
```
:::

View File

@ -199,7 +199,7 @@ Thanks to our contributors for this release:
- **Scheduler Health Check**: Added health check endpoint for scheduler monitoring (#1129) - Thanks to [@jonasban](https://github.com/jonasban) for the feature request
- **Default DAG Sorting Configuration**: Added configuration for default DAG list sorting (#1135)
- **GitHub Repository Link**: Added GitHub repository link to sidebar
- **npm Installation Support**: Added global npm package for easy cross-platform installation via `npm install -g dagu`
- **npm Installation Support**: Added global npm package for easy cross-platform installation via `npm install -g @dagu-org/dagu`
### Improvements
- **Output Capture**: Fixed maximum size setting for output capture

View File

@ -1,20 +1,20 @@
# dagu
# @dagu-org/dagu
> A powerful Workflow Orchestration Engine with simple declarative YAML API
[![npm version](https://img.shields.io/npm/v/dagu.svg)](https://www.npmjs.com/package/dagu)
[![npm version](https://img.shields.io/npm/v/%40dagu-org%2Fdagu.svg)](https://www.npmjs.com/package/@dagu-org/dagu)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
## Installation
```bash
npm install -g dagu
npm install -g @dagu-org/dagu
```
Or add to your project:
```bash
npm install dagu
npm install @dagu-org/dagu
```
## Usage
@ -37,7 +37,7 @@ dagu status my-workflow.yaml
### Programmatic Usage
```javascript
const { execute, getDaguPath } = require('dagu');
const { execute, getDaguPath } = require('@dagu-org/dagu');
// Get path to the binary
const daguPath = getDaguPath();
@ -46,7 +46,7 @@ const daguPath = getDaguPath();
const child = execute(['start', 'workflow.yaml']);
// Or use async/await
const { executeAsync } = require('dagu');
const { executeAsync } = require('@dagu-org/dagu');
async function runWorkflow() {
const result = await executeAsync(['start', 'workflow.yaml']);
@ -81,4 +81,4 @@ For detailed documentation, visit: https://github.com/dagu-org/dagu
## License
GNU General Public License v3.0
GNU General Public License v3.0

View File

@ -1,11 +1,11 @@
{
"name": "dagu",
"name": "@dagu-org/dagu",
"version": "0.0.0-development",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "dagu",
"name": "@dagu-org/dagu",
"version": "0.0.0-development",
"hasInstallScript": true,
"license": "GPL-3.0",

View File

@ -1,5 +1,5 @@
{
"name": "dagu",
"name": "@dagu-org/dagu",
"version": "0.0.0-development",
"description": "A powerful Workflow Orchestration Engine with simple declarative YAML API. Zero-dependency, single binary for Linux, macOS, and Windows.",
"keywords": [