@davidorex/pi-workflows 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@davidorex/pi-workflows",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Workflow orchestration extension for Pi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "David Ryan",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@mariozechner/pi-coding-agent": "*",
|
|
48
48
|
"@mariozechner/pi-tui": "*",
|
|
49
49
|
"@sinclair/typebox": "*",
|
|
50
|
-
"@davidorex/pi-project": "^0.3.
|
|
50
|
+
"@davidorex/pi-project": "^0.3.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/nunjucks": "^3.2.6"
|
|
@@ -15,8 +15,8 @@ steps:
|
|
|
15
15
|
command: |
|
|
16
16
|
node --experimental-strip-types -e "
|
|
17
17
|
import fs from 'fs';
|
|
18
|
-
import { readBlock } from '
|
|
19
|
-
import { PROJECT_DIR } from '
|
|
18
|
+
import { readBlock } from '@davidorex/pi-project/src/block-api.js';
|
|
19
|
+
import { PROJECT_DIR } from '@davidorex/pi-project/src/project-dir.js';
|
|
20
20
|
import path from 'path';
|
|
21
21
|
const phasesDir = path.join(PROJECT_DIR, 'phases');
|
|
22
22
|
const phases = fs.readdirSync(phasesDir)
|
|
@@ -48,7 +48,7 @@ steps:
|
|
|
48
48
|
command: |
|
|
49
49
|
node --experimental-strip-types -e "
|
|
50
50
|
import fs from 'fs';
|
|
51
|
-
import { validateFromFile } from '
|
|
51
|
+
import { validateFromFile } from '@davidorex/pi-project/src/schema-validator.js';
|
|
52
52
|
const phase = JSON.parse(process.argv[1]);
|
|
53
53
|
validateFromFile('.project/schemas/phase.schema.json', phase, 'phase');
|
|
54
54
|
const filename = '.project/phases/' + String(phase.number).padStart(2, '0') + '-' + phase.name.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/-+$/, '') + '.json';
|
|
@@ -20,7 +20,7 @@ steps:
|
|
|
20
20
|
load:
|
|
21
21
|
command: |
|
|
22
22
|
node --experimental-strip-types -e "
|
|
23
|
-
import { readBlock } from '
|
|
23
|
+
import { readBlock } from '@davidorex/pi-project/src/block-api.js';
|
|
24
24
|
const gapId = process.argv[1];
|
|
25
25
|
const data = readBlock('.', 'gaps');
|
|
26
26
|
const gap = data.gaps.find(g => g.id === gapId);
|
|
@@ -111,7 +111,7 @@ steps:
|
|
|
111
111
|
const blockPath = '.project/' + blockName + '.json';
|
|
112
112
|
if (fs.existsSync(blockPath)) {
|
|
113
113
|
try {
|
|
114
|
-
execSync('node --experimental-strip-types -e \"import{validateFromFile}from' + String.fromCharCode(39) + '
|
|
114
|
+
execSync('node --experimental-strip-types -e \"import{validateFromFile}from' + String.fromCharCode(39) + '@davidorex/pi-project/src/schema-validator.js' + String.fromCharCode(39) + ';import fs from' + String.fromCharCode(39) + 'fs' + String.fromCharCode(39) + ';validateFromFile(' + String.fromCharCode(39) + schemasDir + '/' + s + String.fromCharCode(39) + ',JSON.parse(fs.readFileSync(' + String.fromCharCode(39) + blockPath + String.fromCharCode(39) + ',' + String.fromCharCode(39) + 'utf8' + String.fromCharCode(39) + ')),' + String.fromCharCode(39) + blockName + String.fromCharCode(39) + ')\"', { stdio: 'pipe' });
|
|
115
115
|
} catch { errors.push('Block validation failed: ' + blockPath); }
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -127,7 +127,7 @@ steps:
|
|
|
127
127
|
when: "${{ steps.verify.output.passed }}"
|
|
128
128
|
command: |
|
|
129
129
|
node --experimental-strip-types -e "
|
|
130
|
-
import { updateItemInBlock } from '
|
|
130
|
+
import { updateItemInBlock } from '@davidorex/pi-project/src/block-api.js';
|
|
131
131
|
const gapId = process.argv[1];
|
|
132
132
|
updateItemInBlock('.', 'gaps', 'gaps',
|
|
133
133
|
(g) => g.id === gapId,
|
|
@@ -20,7 +20,7 @@ steps:
|
|
|
20
20
|
load-gap:
|
|
21
21
|
command: |
|
|
22
22
|
node --experimental-strip-types -e "
|
|
23
|
-
import { readBlock } from '
|
|
23
|
+
import { readBlock } from '@davidorex/pi-project/src/block-api.js';
|
|
24
24
|
const gapId = process.argv[1];
|
|
25
25
|
const data = readBlock('.', 'gaps');
|
|
26
26
|
const gap = data.gaps.find(g => g.id === gapId);
|
|
@@ -36,7 +36,7 @@ steps:
|
|
|
36
36
|
node --experimental-strip-types -e "
|
|
37
37
|
import fs from 'fs';
|
|
38
38
|
import path from 'path';
|
|
39
|
-
import { readBlock } from '
|
|
39
|
+
import { readBlock } from '@davidorex/pi-project/src/block-api.js';
|
|
40
40
|
|
|
41
41
|
const phases = [];
|
|
42
42
|
const phasesDir = '.project/phases';
|