Skip to content

Commit 1d4d636

Browse files
committed
refactor: rename runner-node package to node for consistency
- Rename @envguard/runner-node to @envguard/node - Update all documentation and references - Update GitHub workflows - Update vitest workspace configuration - Align with ecosystem conventions like @sentry/node
1 parent e5e7ed7 commit 1d4d636

21 files changed

+87
-85
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ on:
66
workflow_dispatch:
77
inputs:
88
package:
9-
description: 'Package to publish (cli, runner-node, or all)'
9+
description: 'Package to publish (cli, node, or all)'
1010
required: true
1111
default: 'all'
1212
type: choice
1313
options:
1414
- all
1515
- cli
16-
- runner-node
16+
- node
1717

1818
jobs:
1919
publish:
@@ -54,9 +54,9 @@ jobs:
5454
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5555
continue-on-error: true
5656

57-
- name: Publish @envguard/runner-node to npm
58-
if: github.event.inputs.package == 'all' || github.event.inputs.package == 'runner-node' || github.event_name == 'release'
59-
working-directory: ./packages/runner-node
57+
- name: Publish @envguard/node to npm
58+
if: github.event.inputs.package == 'all' || github.event.inputs.package == 'node' || github.event_name == 'release'
59+
working-directory: ./packages/node
6060
run: pnpm publish --no-git-checks --access public --provenance
6161
env:
6262
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/version-bump.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ on:
44
workflow_dispatch:
55
inputs:
66
package:
7-
description: 'Package to bump (cli, runner-node, or both)'
7+
description: 'Package to bump (cli, node, or both)'
88
required: true
99
type: choice
1010
options:
1111
- both
1212
- cli
13-
- runner-node
13+
- node
1414
version:
1515
description: 'Version bump type'
1616
required: true
@@ -56,8 +56,8 @@ jobs:
5656
echo "CLI_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
5757
5858
- name: Bump Runner-Node version
59-
if: github.event.inputs.package == 'runner-node' || github.event.inputs.package == 'both'
60-
working-directory: ./packages/runner-node
59+
if: github.event.inputs.package == 'node' || github.event.inputs.package == 'both'
60+
working-directory: ./packages/node
6161
run: |
6262
pnpm version ${{ github.event.inputs.version }} --no-git-tag-version
6363
echo "RUNNER_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
@@ -73,9 +73,9 @@ jobs:
7373
if [ "${{ github.event.inputs.package }}" = "cli" ]; then
7474
git tag "cli-v${{ env.CLI_VERSION }}"
7575
git push origin "cli-v${{ env.CLI_VERSION }}"
76-
elif [ "${{ github.event.inputs.package }}" = "runner-node" ]; then
77-
git tag "runner-node-v${{ env.RUNNER_VERSION }}"
78-
git push origin "runner-node-v${{ env.RUNNER_VERSION }}"
76+
elif [ "${{ github.event.inputs.package }}" = "node" ]; then
77+
git tag "node-v${{ env.RUNNER_VERSION }}"
78+
git push origin "node-v${{ env.RUNNER_VERSION }}"
7979
else
8080
git tag "v${{ env.CLI_VERSION }}"
8181
git push origin "v${{ env.CLI_VERSION }}"

.plan/implementation-guidebook.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pnpm init
8888

8989
# 6. Create directory structure
9090
mkdir -p packages/cli/src/{commands,core,utils}
91-
mkdir -p packages/runner-node/src
91+
mkdir -p packages/node/src
9292
mkdir -p packages/runner-python/envguard
9393
mkdir -p scripts
9494
mkdir -p docs
@@ -2363,12 +2363,12 @@ Create Node.js runtime that auto-resolves placeholders.
23632363
#### Task 15.1: Setup Runner Package (30 min)
23642364

23652365
```bash
2366-
mkdir -p packages/runner-node/src
2367-
cd packages/runner-node
2366+
mkdir -p packages/node/src
2367+
cd packages/node
23682368

23692369
cat > package.json << 'EOF'
23702370
{
2371-
"name": "@envguard/runner-node",
2371+
"name": "@envguard/node",
23722372
"version": "0.1.0",
23732373
"main": "dist/index.js",
23742374
"scripts": {
@@ -2390,7 +2390,7 @@ pnpm install
23902390

23912391
#### Task 15.2: Implement Preload Script (2 hours)
23922392

2393-
**File**: `packages/runner-node/src/preload.ts`
2393+
**File**: `packages/node/src/preload.ts`
23942394

23952395
```typescript
23962396
import keytar from '@electron/keytar';
@@ -2470,7 +2470,7 @@ Object.defineProperty(process, 'env', {
24702470
console.log('[EnvGuard] Node.js runner initialized');
24712471
```
24722472

2473-
**File**: `packages/runner-node/src/index.ts`
2473+
**File**: `packages/node/src/index.ts`
24742474

24752475
```typescript
24762476
// Re-export preload for --require usage
@@ -2506,12 +2506,12 @@ envguard set DATABASE_URL postgresql://localhost/test
25062506
envguard set API_KEY sk_test_12345
25072507

25082508
# Run with EnvGuard runner
2509-
node --require @envguard/runner-node/preload index.js
2509+
node --require @envguard/node/preload index.js
25102510
```
25112511

25122512
#### Task 15.4: Package Script Helper (30 min)
25132513

2514-
**File**: `packages/runner-node/bin/envguard-node`
2514+
**File**: `packages/node/bin/envguard-node`
25152515

25162516
```bash
25172517
#!/usr/bin/env node
@@ -2536,7 +2536,7 @@ child.on('exit', (code) => {
25362536
Make executable:
25372537
25382538
```bash
2539-
chmod +x packages/runner-node/bin/envguard-node
2539+
chmod +x packages/node/bin/envguard-node
25402540
```
25412541
25422542
Add to package.json:
@@ -2945,7 +2945,7 @@ require('dotenv').config({ path: '.env.redacted' });
29452945
console.log('NODE:', process.env.TEST_SECRET);
29462946
EOF
29472947

2948-
node --require @envguard/runner-node/preload test-node.js | grep "hello_world"
2948+
node --require @envguard/node/preload test-node.js | grep "hello_world"
29492949

29502950
# Test Python runner
29512951
echo "5. Testing Python runner..."
@@ -3958,15 +3958,15 @@ Define your secrets schema:
39583958
**Method 1: Preload script**
39593959
39603960
```bash
3961-
node --require @envguard/runner-node/preload app.js
3961+
node --require @envguard/node/preload app.js
39623962
```
39633963
39643964
**Method 2: package.json**
39653965
39663966
```json
39673967
{
39683968
"scripts": {
3969-
"dev": "node --require @envguard/runner-node/preload src/index.js"
3969+
"dev": "node --require @envguard/node/preload src/index.js"
39703970
}
39713971
}
39723972
```

.plan/mvp_plan.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ program
412412
**Task 3.1: Create runner package structure** (1 hour)
413413

414414
```bash
415-
cd packages/runner-node
415+
cd packages/node
416416
```
417417

418418
Create files:
@@ -423,7 +423,7 @@ Create files:
423423

424424
**Task 3.2: Implement secret resolver** (3 hours)
425425

426-
File: `packages/runner-node/src/resolver.ts`
426+
File: `packages/node/src/resolver.ts`
427427

428428
```typescript
429429
import { SystemKeychain } from '@envguard/cli/core';
@@ -480,7 +480,7 @@ export class SecretResolver {
480480

481481
**Task 3.3: Create preload module** (2 hours)
482482

483-
File: `packages/runner-node/src/preload.ts`
483+
File: `packages/node/src/preload.ts`
484484

485485
```typescript
486486
import { SecretResolver } from './resolver';
@@ -508,7 +508,7 @@ resolver.injectIntoProcessEnv().catch((error) => {
508508

509509
**Task 3.4: Create CLI wrapper** (2 hours)
510510

511-
File: `packages/runner-node/src/index.ts`
511+
File: `packages/node/src/index.ts`
512512

513513
```typescript
514514
#!/usr/bin/env node
@@ -544,7 +544,7 @@ child.on('exit', (code) => {
544544

545545
```json
546546
{
547-
"name": "@envguard/runner-node",
547+
"name": "@envguard/node",
548548
"version": "0.1.0",
549549
"main": "dist/index.js",
550550
"bin": {
@@ -568,7 +568,7 @@ child.on('exit', (code) => {
568568

569569
**Task 3.6: Write tests** (1 hour)
570570

571-
Create: `packages/runner-node/__tests__/resolver.test.ts`
571+
Create: `packages/node/__tests__/resolver.test.ts`
572572

573573
```typescript
574574
import { describe, it, expect, beforeEach } from 'vitest';
@@ -823,7 +823,7 @@ Document all features for v0.1.0
823823
# From packages/cli
824824
npm publish --access public
825825

826-
# From packages/runner-node
826+
# From packages/node
827827
npm publish --access public
828828
```
829829

@@ -868,12 +868,12 @@ npm publish --access public
868868
- ✅ Validators
869869
- ✅ Tests
870870

871-
### Package 2: @envguard/runner-node
871+
### Package 2: @envguard/node
872872

873873
**Exports:**
874874

875875
-`envguard-node` CLI wrapper
876-
-`--require @envguard/runner-node/preload` option
876+
-`--require @envguard/node/preload` option
877877
- ✅ SecretResolver class
878878

879879
**Usage:**
@@ -883,7 +883,7 @@ npm publish --access public
883883
envguard-node npm start
884884

885885
# Method 2
886-
node --require @envguard/runner-node/preload app.js
886+
node --require @envguard/node/preload app.js
887887

888888
# Method 3 (package.json)
889889
{

CLAUDE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This is a **pnpm workspace monorepo** with three main packages:
1717
- Binary entry point: `envguard` command
1818
- Core modules for keychain integration, secret storage, validation, and Git integration
1919

20-
- **`packages/runner-node/`** - Node.js runtime integration (`@envguard/runner-node`)
20+
- **`packages/node/`** - Node.js runtime integration (`@envguard/node`)
2121
- Provides runtime secret injection for Node.js applications
2222
- Used as `envguard-node app.js` or via Node.js preload module
2323

@@ -101,7 +101,7 @@ pnpm clean
101101
```bash
102102
# Run commands for a specific package
103103
pnpm --filter @envguard/cli build
104-
pnpm --filter @envguard/runner-node test
104+
pnpm --filter @envguard/node test
105105

106106
# Run tests for CLI package only
107107
cd packages/cli && pnpm test
@@ -137,10 +137,10 @@ pnpm test:watch
137137

138138
### Build Tool (tsup)
139139

140-
Both `cli` and `runner-node` use **tsup** for building:
140+
Both `cli` and `node` use **tsup** for building:
141141

142142
- CLI builds: ESM format with CLI entry point
143-
- Runner-node builds: Both ESM and CJS formats for compatibility
143+
- Node builds: Both ESM and CJS formats for compatibility
144144
- Generates TypeScript declarations (`.d.ts`)
145145
- Source maps enabled for debugging
146146

@@ -221,7 +221,7 @@ When implementing keychain integration:
221221
- `conf` - Config management
222222
- `dotenv` - Env file parsing
223223

224-
### Runner-Node Package (`@envguard/runner-node`)
224+
### Node Package (`@envguard/node`)
225225

226226
- `dotenv` - Env file parsing (minimal dependencies)
227227

0 commit comments

Comments
 (0)