haraps 1.0.6 → 1.0.7
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 +21 -16
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -4,7 +4,8 @@ const fs = require('fs');
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const { execSync } = require('child_process');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const pkg = require(path.join(__dirname, '../package.json'));
|
|
8
|
+
console.log(`🚀 Scaffold Project Environment (Hara-XY) v${pkg.version} 🚀`);
|
|
8
9
|
|
|
9
10
|
function ensureDir(dir) {
|
|
10
11
|
if (!fs.existsSync(dir)) {
|
|
@@ -20,7 +21,7 @@ function writeFile(filePath, content) {
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
// 1. Dev Scripts
|
|
23
|
-
writeFile('dev.sh', `
|
|
24
|
+
writeFile('dev.sh', `
|
|
24
25
|
#!/usr/bin/env bash
|
|
25
26
|
# =============================================
|
|
26
27
|
# Medizys Local Development Runner
|
|
@@ -384,7 +385,7 @@ node "$runnerPath"
|
|
|
384
385
|
`);
|
|
385
386
|
fs.chmodSync(path.resolve(process.cwd(), 'dev.sh'), '755');
|
|
386
387
|
|
|
387
|
-
writeFile('dev.ps1', `
|
|
388
|
+
writeFile('dev.ps1', `
|
|
388
389
|
# =============================================
|
|
389
390
|
# Medizys Local Development Runner
|
|
390
391
|
# =============================================
|
|
@@ -798,22 +799,22 @@ if ($null -ne (Get-Variable -Name watcherJob -ErrorAction SilentlyContinue)) {
|
|
|
798
799
|
`);
|
|
799
800
|
|
|
800
801
|
// 2. Deploy Scripts
|
|
801
|
-
writeFile('deploy.sh', `
|
|
802
|
-
TARGET=$(readlink -f ~/mediqueue_linux/mediqueue/frontend/node_modules/@cloudflare/next-on-pages/dist/index.js)
|
|
803
|
-
sed -i 's/await (0, import_esbuild.build)({/await (0, import_esbuild.build)({ logLevel: "error",/g' $TARGET
|
|
804
|
-
sed -i 's/await (0, import_esbuild2.build)({/await (0, import_esbuild2.build)({ logLevel: "error",/g' $TARGET
|
|
805
|
-
cd ~/mediqueue_linux/mediqueue/frontend
|
|
806
|
-
export NODE_OPTIONS="--max_old_space_size=16384"
|
|
807
|
-
npx @cloudflare/next-on-pages
|
|
808
|
-
cp -r .vercel /mnt/c/Users/shivg/Desktop/Hara-XY/mediqueue-main/mediqueue/frontend/
|
|
809
|
-
cd /mnt/c/Users/shivg/Desktop/Hara-XY/mediqueue-main/mediqueue/frontend
|
|
810
|
-
$env:WRANGLER_SEND_METRICS="false"
|
|
811
|
-
npx wrangler pages deploy .vercel/output/static
|
|
802
|
+
writeFile('deploy.sh', `
|
|
803
|
+
TARGET=$(readlink -f ~/mediqueue_linux/mediqueue/frontend/node_modules/@cloudflare/next-on-pages/dist/index.js)
|
|
804
|
+
sed -i 's/await (0, import_esbuild.build)({/await (0, import_esbuild.build)({ logLevel: "error",/g' $TARGET
|
|
805
|
+
sed -i 's/await (0, import_esbuild2.build)({/await (0, import_esbuild2.build)({ logLevel: "error",/g' $TARGET
|
|
806
|
+
cd ~/mediqueue_linux/mediqueue/frontend
|
|
807
|
+
export NODE_OPTIONS="--max_old_space_size=16384"
|
|
808
|
+
npx @cloudflare/next-on-pages
|
|
809
|
+
cp -r .vercel /mnt/c/Users/shivg/Desktop/Hara-XY/mediqueue-main/mediqueue/frontend/
|
|
810
|
+
cd /mnt/c/Users/shivg/Desktop/Hara-XY/mediqueue-main/mediqueue/frontend
|
|
811
|
+
$env:WRANGLER_SEND_METRICS="false"
|
|
812
|
+
npx wrangler pages deploy .vercel/output/static
|
|
812
813
|
|
|
813
814
|
`);
|
|
814
815
|
fs.chmodSync(path.resolve(process.cwd(), 'deploy.sh'), '755');
|
|
815
816
|
|
|
816
|
-
writeFile('deploy.ps1', `
|
|
817
|
+
writeFile('deploy.ps1', `
|
|
817
818
|
param(
|
|
818
819
|
[switch]$SkipSentry = $false,
|
|
819
820
|
[switch]$SkipSeed = $false,
|
|
@@ -1259,8 +1260,12 @@ writeFile('AGENTS.md', `
|
|
|
1259
1260
|
When the user says "start project", you MUST immediately:
|
|
1260
1261
|
1. Ask the user for the name of the project and a brief description of what they want to build.
|
|
1261
1262
|
2. Wait for their response.
|
|
1262
|
-
3. Once they respond,
|
|
1263
|
+
3. Once they respond, it is YOUR strict responsibility to initialize the standard project skeleton:
|
|
1264
|
+
a. Generate the Next.js frontend and Rust Cloudflare Worker backend in their respective directories (\`frontend/\` and \`backend/\`).
|
|
1265
|
+
b. Carefully modify the generated files to align with the project guidelines.
|
|
1266
|
+
c. **CRITICAL: Dev and Deploy Scripts**: The generated \`dev.ps1\`, \`dev.sh\`, \`deploy.ps1\`, and \`deploy.sh\` files are highly optimized custom runners (with clipboard integration, aggressive process cleanup, and error reporting). **Never** overwrite them with generic start/build scripts. If modifications are needed, surgically edit them to preserve their robust functionality.
|
|
1263
1267
|
4. Initialize a new git repository in the root directory (\`git init\`) and create an initial commit.
|
|
1268
|
+
5. Notify the user that the project has been successfully scaffolded and all the lazy senior dev standards, security reviews, UI sniper setups, and AI slop removers are in place. Remind them to use \`./dev.ps1\` or \`./dev.sh\` once their \`frontend/\` and \`backend/\` directories are initialized.
|
|
1264
1269
|
`);
|
|
1265
1270
|
|
|
1266
1271
|
// 4. Workflows
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "haraps",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
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": {
|