create-donotdev 0.0.1 → 0.0.3

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/dist/index.d.ts CHANGED
@@ -1,14 +1,3 @@
1
1
  #!/usr/bin/env node
2
- /**
3
- * @fileoverview create-donotdev — One command to scaffold a DoNotDev project
4
- * @description Installs CLI globally, scaffolds project, installs deps, prints next steps
5
- *
6
- * Usage: npx create-donotdev [project-name]
7
- * bunx create-donotdev [project-name]
8
- *
9
- * @version 0.0.2
10
- * @since 0.0.1
11
- * @author AMBROISE PARK Consulting
12
- */
13
2
  export {};
14
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;GAUG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import*as e from"@clack/prompts";import{execSync as t}from"node:child_process";e.intro("DoNotDev \u2014 Create a new project");const o=e.spinner();o.start("Installing @donotdev/cli@latest globally...");try{t("npm install -g @donotdev/cli@latest",{stdio:"pipe"}),o.stop("CLI installed globally")}catch{o.stop("Needs elevated permissions"),e.log.warn("Could not install globally (likely needs sudo)."),e.note(`Run these two commands:
2
+ import*as e from"@clack/prompts";import{execSync as l,execFileSync as r}from"node:child_process";const d=/^[a-zA-Z0-9_-]+$/;function i(n){return d.test(n)&&!n.includes("..")}e.intro("DoNotDev \u2014 Create a new project");const s=e.spinner();s.start("Installing @donotdev/cli@latest globally...");try{l("npm install -g @donotdev/cli@latest",{stdio:"pipe"}),s.stop("CLI installed globally")}catch{s.stop("Needs elevated permissions"),e.log.warn("Could not install globally (likely needs sudo)."),e.note(`Run these two commands:
3
3
 
4
4
  sudo npm install -g @donotdev/cli@latest
5
- npx create-donotdev`,"Manual step needed"),process.exit(1)}let n=process.argv[2]||"";if(!n){const l=await e.text({message:"Project name?",placeholder:"my-app",validate:i=>{const a=i?.trim();if(!a)return"Project name is required";if(!/^[a-zA-Z0-9_-]+$/.test(a))return"Use only letters, numbers, dashes, underscores"}});e.isCancel(l)&&(e.outro("Cancelled."),process.exit(0)),n=l.trim()}e.log.info(`Scaffolding "${n}"...`);try{t(`dndev init ${n}`,{stdio:"inherit",cwd:process.cwd()})}catch{e.log.error("Scaffolding failed. Check the output above."),process.exit(1)}const d=`${process.cwd()}/${n}`,s=e.spinner();s.start("Installing dependencies...");try{t("bun install",{stdio:"pipe",cwd:d}),s.stop("Dependencies installed")}catch{s.stop("bun install failed"),e.log.warn(`Dependencies failed to install. Run manually:
6
- cd ${n} && bun install`)}e.note(`cd ${n}
5
+ npx create-donotdev`,"Manual step needed"),process.exit(1)}let t=process.argv[2]||"";if(t&&!i(t)&&(e.log.error("Invalid project name. Use only letters, numbers, dashes, underscores."),process.exit(1)),!t){const n=await e.text({message:"Project name?",placeholder:"my-app",validate:a=>{const o=a?.trim();if(!o)return"Project name is required";if(!/^[a-zA-Z0-9_-]+$/.test(o))return"Use only letters, numbers, dashes, underscores"}});e.isCancel(n)&&(e.outro("Cancelled."),process.exit(0)),t=n.trim()}e.log.info(`Scaffolding "${t}"...`);try{r("dndev",["init",t],{stdio:"inherit",cwd:process.cwd()})}catch{e.log.error("Scaffolding failed. Check the output above."),process.exit(1)}const c=`${process.cwd()}/${t}`;e.log.step("Installing dependencies...");try{l("bun install",{stdio:"inherit",cwd:c}),e.log.success("Dependencies installed")}catch{e.log.warn(`Dependencies failed to install. Run manually:
6
+ cd ${t} && bun install`)}e.note(`cd ${t}
7
7
  Open your IDE and tell your AI agent:
8
8
 
9
9
  "Read AI.md and build my app"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-donotdev",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Create a new DoNotDev project",
5
5
  "type": "module",
6
6
  "private": false,
@@ -20,12 +20,11 @@
20
20
  "dist",
21
21
  "README.md"
22
22
  ],
23
- "sideEffects": false,
24
23
  "scripts": {
25
24
  "build": "dn bundle --package create-donotdev",
26
25
  "dev": "tsc --watch",
27
26
  "clean": "rimraf dist tsconfig.tsbuildinfo",
28
- "type-check": "tsc --noEmit"
27
+ "type-check": "bunx tsc --noEmit"
29
28
  },
30
29
  "dependencies": {
31
30
  "@clack/prompts": "^1.0.0"