haraps 1.0.9 → 1.0.10
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/bin/index.js +9 -5
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -13,8 +13,12 @@ function ensureDir(dir) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
function writeFile(filePath, content) {
|
|
16
|
+
function writeFile(filePath, content, skipIfExists = false) {
|
|
17
17
|
const fullPath = path.resolve(process.cwd(), filePath);
|
|
18
|
+
if (skipIfExists && fs.existsSync(fullPath)) {
|
|
19
|
+
console.log(`⏭️ Skipped: ${filePath} (already exists)`);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
18
22
|
ensureDir(path.dirname(fullPath));
|
|
19
23
|
fs.writeFileSync(fullPath, content.trim() + '\n', 'utf8');
|
|
20
24
|
console.log(`✅ Created: ${filePath}`);
|
|
@@ -382,7 +386,7 @@ EOF
|
|
|
382
386
|
|
|
383
387
|
node "$runnerPath"
|
|
384
388
|
|
|
385
|
-
|
|
389
|
+
`, true);
|
|
386
390
|
fs.chmodSync(path.resolve(process.cwd(), 'dev.sh'), '755');
|
|
387
391
|
|
|
388
392
|
writeFile('dev.ps1', `
|
|
@@ -796,7 +800,7 @@ if ($null -ne (Get-Variable -Name watcherJob -ErrorAction SilentlyContinue)) {
|
|
|
796
800
|
}
|
|
797
801
|
}
|
|
798
802
|
|
|
799
|
-
|
|
803
|
+
`, true);
|
|
800
804
|
|
|
801
805
|
// 2. Deploy Scripts
|
|
802
806
|
writeFile('deploy.sh', `
|
|
@@ -811,7 +815,7 @@ cd /mnt/c/Users/shivg/Desktop/Hara-XY/mediqueue-main/mediqueue/frontend
|
|
|
811
815
|
$env:WRANGLER_SEND_METRICS="false"
|
|
812
816
|
npx wrangler pages deploy .vercel/output/static
|
|
813
817
|
|
|
814
|
-
|
|
818
|
+
`, true);
|
|
815
819
|
fs.chmodSync(path.resolve(process.cwd(), 'deploy.sh'), '755');
|
|
816
820
|
|
|
817
821
|
writeFile('deploy.ps1', `
|
|
@@ -1230,7 +1234,7 @@ Write-Host "[CLIPBOARD] Full report copied to your clipboard!" -ForegroundColor
|
|
|
1230
1234
|
Write-Host ""
|
|
1231
1235
|
Write-Host ">>> Deployment localized and verified." -ForegroundColor Cyan
|
|
1232
1236
|
|
|
1233
|
-
|
|
1237
|
+
`, true);
|
|
1234
1238
|
|
|
1235
1239
|
// 3. Agent Rules
|
|
1236
1240
|
writeFile('AGENTS.md', `
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "haraps",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "NPM package to scaffold standard development environment, deployment scripts, AGENTS.md guidelines, and core workflows for a Next.js frontend + Rust Cloudflare Worker backend.",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"bin": {
|