haraps 1.0.6 → 1.0.8

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.
Files changed (3) hide show
  1. package/SKILL.md +5 -4
  2. package/bin/index.js +22 -16
  3. package/package.json +1 -1
package/SKILL.md CHANGED
@@ -36,10 +36,11 @@ Verify that the following files were successfully created in the root directory:
36
36
 
37
37
  It is your strict responsibility as the agent to carefully initialize the standard project skeleton if this is the first run (i.e. if the project is empty). You must:
38
38
  1. Generate the Next.js frontend and Rust Cloudflare Worker backend in their respective directories (`frontend/` and `backend/`).
39
- 2. Carefully modify the generated files to align with the project guidelines.
40
- 3. **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.
41
- 4. Initialize the Git repository (`git init`) and create the initial commit.
39
+ 2. **Contextualize Files**: Open the scaffolded `dev.ps1`, `dev.sh`, `deploy.ps1`, `deploy.sh`, and the UI Sniper Telegram configuration (including the webhook route), and **modify them** to precisely match the project name and description.
40
+ 3. **Telegram Feedback Customization**: Ensure the Telegram message for UI feedback exactly matches the project context (updating names, tags, or message format as needed).
41
+ 4. **Rust Instructions**: Ensure dev and deploy scripts are surgically modified to correctly support the required Rust compilation/cargo instructions for the backend. **Never** overwrite the entire scripts with generic versions; preserve their robust functionality.
42
+ 5. Initialize the Git repository (`git init`) and create the initial commit.
42
43
 
43
44
  ### Step 4: Inform the User
44
45
 
45
- 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.
46
+ Notify the user that the project has been contextualized, customized, and scaffolded. Remind them to run `./dev.ps1` or `./dev.sh`.
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
- console.log('🚀 Scaffold Project Environment (Hara-XY) 🚀');
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,13 @@ 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, use their details to initialize the Next.js frontend (in \`frontend/\`) and Rust backend (in \`backend/\`), adhering to all High-Performance Engineering Standards.
1263
+ 3. Once they respond, it is YOUR strict responsibility to initialize the standard project skeleton and apply contextual modifications:
1264
+ a. Generate the Next.js frontend and Rust Cloudflare Worker backend in their respective directories (\`frontend/\` and \`backend/\`).
1265
+ b. **Contextualize Files**: Open the scaffolded \`dev.ps1\`, \`dev.sh\`, \`deploy.ps1\`, \`deploy.sh\`, and the UI Sniper Telegram configuration (including the webhook route), and **modify them** to precisely match the project name and description.
1266
+ c. **Telegram Feedback Customization**: Ensure the Telegram message for UI feedback exactly matches the project context (updating names, tags, or message format as needed).
1267
+ d. **Rust Instructions**: Ensure dev and deploy scripts are surgically modified to correctly support the required Rust compilation/cargo instructions for the backend. **Never** overwrite the entire scripts with generic versions; preserve their robust functionality.
1263
1268
  4. Initialize a new git repository in the root directory (\`git init\`) and create an initial commit.
1269
+ 5. Notify the user that the project has been contextualized, customized, and scaffolded. Remind them to run \`./dev.ps1\` or \`./dev.sh\`.
1264
1270
  `);
1265
1271
 
1266
1272
  // 4. Workflows
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "haraps",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
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": {