create-allyhub 0.2.0-next.1 → 0.2.0-next.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.
@@ -11,6 +11,6 @@ This folder is an AllyHub project. Videos and 3D sceneries are TypeScript, docs
11
11
 
12
12
  ${AGENT_RULES}
13
13
  `,PROJECT_CLAUDE=`@AGENTS.md
14
- `,PROJECT_TSCONFIG=`${JSON.stringify({compilerOptions:{target:"ES2022",module:"ESNext",moduleResolution:"Bundler",lib:["ES2022","DOM","DOM.Iterable"],types:[`${PROJECT_PACKAGES.sdk}/client`],strict:!0,noEmit:!0,skipLibCheck:!0,verbatimModuleSyntax:!0,allowImportingTsExtensions:!0},include:["**/*.ts",".allyhub/cache/types"],exclude:["node_modules"]},null,2)}
15
- `;export function packageName(s){const e=s.toLowerCase().normalize("NFKD").replace(/\p{M}/gu,"").replace(/[^\w.-]+/gu,"-").replace(/^[-._]+|[-._]+$/gu,"").slice(0,214);return e===""?"allyhub-project":e}const c=s=>y(s).then(()=>!0,()=>!1);export async function writeAgentFiles(s){const e=h(s);await l(e,{recursive:!0});const t=[];for(const[o,r]of[["AGENTS.md",PROJECT_AGENTS],["CLAUDE.md",PROJECT_CLAUDE]])await c(a(e,o))||(await d(a(e,o),r,{flag:"wx"}),t.push(o));return t}export async function startProject(s,e){const t=h(s);if(await c(a(t,"package.json")))throw new Error(`${t} already has a package.json: add AllyHub to it with npm install ${PROJECT_PACKAGES.cli} ${PROJECT_PACKAGES.sdk}.`);const o=packageName(f(t)),r=n=>e.packages?.[n]??e.version,p={name:o,version:"0.0.0",private:!0,type:"module",scripts:{dev:"allyhub dev",check:"allyhub check",render:"allyhub render",typecheck:"tsc --noEmit"},dependencies:{[PROJECT_PACKAGES.cli]:r(PROJECT_PACKAGES.cli),[PROJECT_PACKAGES.sdk]:r(PROJECT_PACKAGES.sdk)},devDependencies:{typescript:PROJECT_TYPESCRIPT}},m=[["package.json",`${JSON.stringify(p,null,2)}
16
- `],["tsconfig.json",PROJECT_TSCONFIG],[".gitignore",PROJECT_GITIGNORE]];await l(t,{recursive:!0});const i=[];for(const[n,u]of m)await c(a(t,n))||(await d(a(t,n),u,{flag:"wx"}),i.push(n));return i.push(...await writeAgentFiles(t)),{folder:t,name:o,files:i}}
14
+ `,PROJECT_TSCONFIG=`${JSON.stringify({compilerOptions:{target:"ES2022",module:"ESNext",moduleResolution:"Bundler",lib:["ES2022","DOM","DOM.Iterable"],types:[`${PROJECT_PACKAGES.sdk}/client`,`${PROJECT_PACKAGES.cli}/client`],strict:!0,noEmit:!0,skipLibCheck:!0,verbatimModuleSyntax:!0,allowImportingTsExtensions:!0},include:["**/*.ts",".allyhub/cache/types"],exclude:["node_modules"]},null,2)}
15
+ `;export function packageName(s){const e=s.toLowerCase().normalize("NFKD").replace(/\p{M}/gu,"").replace(/[^\w.-]+/gu,"-").replace(/^[-._]+|[-._]+$/gu,"").slice(0,214);return e===""?"allyhub-project":e}const c=s=>y(s).then(()=>!0,()=>!1);export async function writeAgentFiles(s){const e=h(s);await l(e,{recursive:!0});const t=[];for(const[n,r]of[["AGENTS.md",PROJECT_AGENTS],["CLAUDE.md",PROJECT_CLAUDE]])await c(a(e,n))||(await d(a(e,n),r,{flag:"wx"}),t.push(n));return t}export async function startProject(s,e){const t=h(s);if(await c(a(t,"package.json")))throw new Error(`${t} already has a package.json: add AllyHub to it with npm install ${PROJECT_PACKAGES.cli} ${PROJECT_PACKAGES.sdk}.`);const n=packageName(f(t)),r=o=>e.packages?.[o]??e.version,p={name:n,version:"0.0.0",private:!0,type:"module",scripts:{dev:"allyhub dev",check:"allyhub check",render:"allyhub render",typecheck:"tsc --noEmit"},dependencies:{[PROJECT_PACKAGES.cli]:r(PROJECT_PACKAGES.cli),[PROJECT_PACKAGES.sdk]:r(PROJECT_PACKAGES.sdk)},devDependencies:{typescript:PROJECT_TYPESCRIPT}},m=[["package.json",`${JSON.stringify(p,null,2)}
16
+ `],["tsconfig.json",PROJECT_TSCONFIG],[".gitignore",PROJECT_GITIGNORE]];await l(t,{recursive:!0});const i=[];for(const[o,u]of m)await c(a(t,o))||(await d(a(t,o),u,{flag:"wx"}),i.push(o));return i.push(...await writeAgentFiles(t)),{folder:t,name:n,files:i}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/scaffold",
3
- "version": "0.2.0-next.1",
3
+ "version": "0.2.0-next.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-allyhub",
3
- "version": "0.2.0-next.1",
3
+ "version": "0.2.0-next.2",
4
4
  "description": "Starts an AllyHub project: npm create allyhub <folder>.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "homepage": "https://allyhub.com",
@@ -20,7 +20,7 @@
20
20
  "node": ">=22.19"
21
21
  },
22
22
  "dependencies": {
23
- "@allyhub-next/scaffold": "0.2.0-next.1"
23
+ "@allyhub-next/scaffold": "0.2.0-next.2"
24
24
  },
25
25
  "bundleDependencies": [
26
26
  "@allyhub-next/scaffold"