create-payload-app 3.83.0-internal.86b7bfb → 3.83.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"download-skill.d.ts","sourceRoot":"","sources":["../../src/lib/download-skill.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAK5C,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;CACnB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgChB"}
1
+ {"version":3,"file":"download-skill.d.ts","sourceRoot":"","sources":["../../src/lib/download-skill.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAK5C,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;CACnB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoChB"}
@@ -19,8 +19,11 @@ export async function downloadSkill(args) {
19
19
  debugLog(`Skill destination: ${destDir}`);
20
20
  }
21
21
  const res = await fetch(url);
22
+ if (!res.ok) {
23
+ throw new Error(`Failed to download skill: ${res.status} ${res.statusText} from ${url}`);
24
+ }
22
25
  if (!res.body) {
23
- throw new Error(`Failed to download skill from: ${url}`);
26
+ throw new Error(`Failed to download skill: empty response from ${url}`);
24
27
  }
25
28
  await pipeline(Readable.from(res.body), x({
26
29
  cwd: destDir,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/download-skill.ts"],"sourcesContent":["import fse from 'fs-extra'\nimport { Readable } from 'node:stream'\nimport { pipeline } from 'node:stream/promises'\nimport path from 'path'\nimport { x } from 'tar'\n\nimport type { AgentType } from '../types.js'\n\nimport { debug as debugLog } from '../utils/log.js'\nimport { getSkillsDir } from './select-agent.js'\n\nexport async function downloadSkill(args: {\n agentType: AgentType\n branch?: string\n debug?: boolean\n projectDir: string\n}): Promise<void> {\n const { agentType, branch = 'main', debug, projectDir } = args\n\n const skillsDir = getSkillsDir(agentType)\n const destDir = path.join(projectDir, skillsDir, 'payload')\n\n await fse.mkdirp(destDir)\n\n const url = `https://codeload.github.com/payloadcms/payload/tar.gz/${branch}`\n const filter = `payload-${branch.replace(/^v/, '').replaceAll('/', '-')}/tools/claude-plugin/skills/payload/`\n\n if (debug) {\n debugLog(`Downloading skill for agent: ${agentType}`)\n debugLog(`Skill codeload url: ${url}`)\n debugLog(`Skill filter: ${filter}`)\n debugLog(`Skill destination: ${destDir}`)\n }\n\n const res = await fetch(url)\n\n if (!res.body) {\n throw new Error(`Failed to download skill from: ${url}`)\n }\n\n await pipeline(\n Readable.from(res.body as unknown as NodeJS.ReadableStream),\n x({\n cwd: destDir,\n filter: (p) => p.includes(filter),\n strip: filter.split('/').length - 1,\n }),\n )\n}\n"],"names":["fse","Readable","pipeline","path","x","debug","debugLog","getSkillsDir","downloadSkill","args","agentType","branch","projectDir","skillsDir","destDir","join","mkdirp","url","filter","replace","replaceAll","res","fetch","body","Error","from","cwd","p","includes","strip","split","length"],"mappings":"AAAA,OAAOA,SAAS,WAAU;AAC1B,SAASC,QAAQ,QAAQ,cAAa;AACtC,SAASC,QAAQ,QAAQ,uBAAsB;AAC/C,OAAOC,UAAU,OAAM;AACvB,SAASC,CAAC,QAAQ,MAAK;AAIvB,SAASC,SAASC,QAAQ,QAAQ,kBAAiB;AACnD,SAASC,YAAY,QAAQ,oBAAmB;AAEhD,OAAO,eAAeC,cAAcC,IAKnC;IACC,MAAM,EAAEC,SAAS,EAAEC,SAAS,MAAM,EAAEN,KAAK,EAAEO,UAAU,EAAE,GAAGH;IAE1D,MAAMI,YAAYN,aAAaG;IAC/B,MAAMI,UAAUX,KAAKY,IAAI,CAACH,YAAYC,WAAW;IAEjD,MAAMb,IAAIgB,MAAM,CAACF;IAEjB,MAAMG,MAAM,CAAC,sDAAsD,EAAEN,QAAQ;IAC7E,MAAMO,SAAS,CAAC,QAAQ,EAAEP,OAAOQ,OAAO,CAAC,MAAM,IAAIC,UAAU,CAAC,KAAK,KAAK,oCAAoC,CAAC;IAE7G,IAAIf,OAAO;QACTC,SAAS,CAAC,6BAA6B,EAAEI,WAAW;QACpDJ,SAAS,CAAC,oBAAoB,EAAEW,KAAK;QACrCX,SAAS,CAAC,cAAc,EAAEY,QAAQ;QAClCZ,SAAS,CAAC,mBAAmB,EAAEQ,SAAS;IAC1C;IAEA,MAAMO,MAAM,MAAMC,MAAML;IAExB,IAAI,CAACI,IAAIE,IAAI,EAAE;QACb,MAAM,IAAIC,MAAM,CAAC,+BAA+B,EAAEP,KAAK;IACzD;IAEA,MAAMf,SACJD,SAASwB,IAAI,CAACJ,IAAIE,IAAI,GACtBnB,EAAE;QACAsB,KAAKZ;QACLI,QAAQ,CAACS,IAAMA,EAAEC,QAAQ,CAACV;QAC1BW,OAAOX,OAAOY,KAAK,CAAC,KAAKC,MAAM,GAAG;IACpC;AAEJ"}
1
+ {"version":3,"sources":["../../src/lib/download-skill.ts"],"sourcesContent":["import fse from 'fs-extra'\nimport { Readable } from 'node:stream'\nimport { pipeline } from 'node:stream/promises'\nimport path from 'path'\nimport { x } from 'tar'\n\nimport type { AgentType } from '../types.js'\n\nimport { debug as debugLog } from '../utils/log.js'\nimport { getSkillsDir } from './select-agent.js'\n\nexport async function downloadSkill(args: {\n agentType: AgentType\n branch?: string\n debug?: boolean\n projectDir: string\n}): Promise<void> {\n const { agentType, branch = 'main', debug, projectDir } = args\n\n const skillsDir = getSkillsDir(agentType)\n const destDir = path.join(projectDir, skillsDir, 'payload')\n\n await fse.mkdirp(destDir)\n\n const url = `https://codeload.github.com/payloadcms/payload/tar.gz/${branch}`\n const filter = `payload-${branch.replace(/^v/, '').replaceAll('/', '-')}/tools/claude-plugin/skills/payload/`\n\n if (debug) {\n debugLog(`Downloading skill for agent: ${agentType}`)\n debugLog(`Skill codeload url: ${url}`)\n debugLog(`Skill filter: ${filter}`)\n debugLog(`Skill destination: ${destDir}`)\n }\n\n const res = await fetch(url)\n\n if (!res.ok) {\n throw new Error(`Failed to download skill: ${res.status} ${res.statusText} from ${url}`)\n }\n\n if (!res.body) {\n throw new Error(`Failed to download skill: empty response from ${url}`)\n }\n\n await pipeline(\n Readable.from(res.body as unknown as NodeJS.ReadableStream),\n x({\n cwd: destDir,\n filter: (p) => p.includes(filter),\n strip: filter.split('/').length - 1,\n }),\n )\n}\n"],"names":["fse","Readable","pipeline","path","x","debug","debugLog","getSkillsDir","downloadSkill","args","agentType","branch","projectDir","skillsDir","destDir","join","mkdirp","url","filter","replace","replaceAll","res","fetch","ok","Error","status","statusText","body","from","cwd","p","includes","strip","split","length"],"mappings":"AAAA,OAAOA,SAAS,WAAU;AAC1B,SAASC,QAAQ,QAAQ,cAAa;AACtC,SAASC,QAAQ,QAAQ,uBAAsB;AAC/C,OAAOC,UAAU,OAAM;AACvB,SAASC,CAAC,QAAQ,MAAK;AAIvB,SAASC,SAASC,QAAQ,QAAQ,kBAAiB;AACnD,SAASC,YAAY,QAAQ,oBAAmB;AAEhD,OAAO,eAAeC,cAAcC,IAKnC;IACC,MAAM,EAAEC,SAAS,EAAEC,SAAS,MAAM,EAAEN,KAAK,EAAEO,UAAU,EAAE,GAAGH;IAE1D,MAAMI,YAAYN,aAAaG;IAC/B,MAAMI,UAAUX,KAAKY,IAAI,CAACH,YAAYC,WAAW;IAEjD,MAAMb,IAAIgB,MAAM,CAACF;IAEjB,MAAMG,MAAM,CAAC,sDAAsD,EAAEN,QAAQ;IAC7E,MAAMO,SAAS,CAAC,QAAQ,EAAEP,OAAOQ,OAAO,CAAC,MAAM,IAAIC,UAAU,CAAC,KAAK,KAAK,oCAAoC,CAAC;IAE7G,IAAIf,OAAO;QACTC,SAAS,CAAC,6BAA6B,EAAEI,WAAW;QACpDJ,SAAS,CAAC,oBAAoB,EAAEW,KAAK;QACrCX,SAAS,CAAC,cAAc,EAAEY,QAAQ;QAClCZ,SAAS,CAAC,mBAAmB,EAAEQ,SAAS;IAC1C;IAEA,MAAMO,MAAM,MAAMC,MAAML;IAExB,IAAI,CAACI,IAAIE,EAAE,EAAE;QACX,MAAM,IAAIC,MAAM,CAAC,0BAA0B,EAAEH,IAAII,MAAM,CAAC,CAAC,EAAEJ,IAAIK,UAAU,CAAC,MAAM,EAAET,KAAK;IACzF;IAEA,IAAI,CAACI,IAAIM,IAAI,EAAE;QACb,MAAM,IAAIH,MAAM,CAAC,8CAA8C,EAAEP,KAAK;IACxE;IAEA,MAAMf,SACJD,SAAS2B,IAAI,CAACP,IAAIM,IAAI,GACtBvB,EAAE;QACAyB,KAAKf;QACLI,QAAQ,CAACY,IAAMA,EAAEC,QAAQ,CAACb;QAC1Bc,OAAOd,OAAOe,KAAK,CAAC,KAAKC,MAAM,GAAG;IACpC;AAEJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-payload-app",
3
- "version": "3.83.0-internal.86b7bfb",
3
+ "version": "3.83.0",
4
4
  "homepage": "https://payloadcms.com",
5
5
  "repository": {
6
6
  "type": "git",