create-payload-app 4.0.0-beta.3 → 4.0.0-beta.5
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/lib/download-example.js.map +1 -1
- package/dist/lib/download-template.js.map +1 -1
- package/dist/template/src/app/(payload)/admin/importMap.js +4 -5
- package/dist/template-tanstack/routes/_payload/api.$.ts +1 -1
- package/dist/template-tanstack/routes/_payload/importMap.js +5 -5
- package/package.json +2 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/download-example.ts"],"sourcesContent":["import { Readable } from 'node:stream'\nimport { pipeline } from 'node:stream/promises'\nimport { x } from 'tar'\n\nimport type { ProjectExample } from '../types.js'\n\nimport { debug as debugLog } from '../utils/log.js'\n\nexport async function downloadExample({\n debug,\n example,\n projectDir,\n}: {\n debug?: boolean\n example: ProjectExample\n projectDir: string\n}) {\n const branchOrTag = example.url.split('#')?.[1] || 'latest'\n const url = `https://codeload.github.com/payloadcms/payload/tar.gz/${branchOrTag}`\n const filter = `payload-${branchOrTag.replace(/^v/, '')}/examples/${example.name}/`\n\n if (debug) {\n debugLog(`Using example url: ${example.url}`)\n debugLog(`Codeload url: ${url}`)\n debugLog(`Filter: ${filter}`)\n }\n\n await pipeline(\n await downloadTarStream(url),\n x({\n cwd: projectDir,\n filter: (p) => p.includes(filter),\n strip: 2 + example.name.split('/').length,\n }),\n )\n}\n\nasync function downloadTarStream(url: string) {\n const res = await fetch(url)\n\n if (!res.body) {\n throw new Error(`Failed to download: ${url}`)\n }\n\n return Readable.from(res.body
|
|
1
|
+
{"version":3,"sources":["../../src/lib/download-example.ts"],"sourcesContent":["import { Readable } from 'node:stream'\nimport { pipeline } from 'node:stream/promises'\nimport { x } from 'tar'\n\nimport type { ProjectExample } from '../types.js'\n\nimport { debug as debugLog } from '../utils/log.js'\n\nexport async function downloadExample({\n debug,\n example,\n projectDir,\n}: {\n debug?: boolean\n example: ProjectExample\n projectDir: string\n}) {\n const branchOrTag = example.url.split('#')?.[1] || 'latest'\n const url = `https://codeload.github.com/payloadcms/payload/tar.gz/${branchOrTag}`\n const filter = `payload-${branchOrTag.replace(/^v/, '')}/examples/${example.name}/`\n\n if (debug) {\n debugLog(`Using example url: ${example.url}`)\n debugLog(`Codeload url: ${url}`)\n debugLog(`Filter: ${filter}`)\n }\n\n await pipeline(\n await downloadTarStream(url),\n x({\n cwd: projectDir,\n filter: (p) => p.includes(filter),\n strip: 2 + example.name.split('/').length,\n }),\n )\n}\n\nasync function downloadTarStream(url: string) {\n const res = await fetch(url)\n\n if (!res.body) {\n throw new Error(`Failed to download: ${url}`)\n }\n\n return Readable.from(res.body)\n}\n"],"names":["Readable","pipeline","x","debug","debugLog","downloadExample","example","projectDir","branchOrTag","url","split","filter","replace","name","downloadTarStream","cwd","p","includes","strip","length","res","fetch","body","Error","from"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAa;AACtC,SAASC,QAAQ,QAAQ,uBAAsB;AAC/C,SAASC,CAAC,QAAQ,MAAK;AAIvB,SAASC,SAASC,QAAQ,QAAQ,kBAAiB;AAEnD,OAAO,eAAeC,gBAAgB,EACpCF,KAAK,EACLG,OAAO,EACPC,UAAU,EAKX;IACC,MAAMC,cAAcF,QAAQG,GAAG,CAACC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI;IACnD,MAAMD,MAAM,CAAC,sDAAsD,EAAED,aAAa;IAClF,MAAMG,SAAS,CAAC,QAAQ,EAAEH,YAAYI,OAAO,CAAC,MAAM,IAAI,UAAU,EAAEN,QAAQO,IAAI,CAAC,CAAC,CAAC;IAEnF,IAAIV,OAAO;QACTC,SAAS,CAAC,mBAAmB,EAAEE,QAAQG,GAAG,EAAE;QAC5CL,SAAS,CAAC,cAAc,EAAEK,KAAK;QAC/BL,SAAS,CAAC,QAAQ,EAAEO,QAAQ;IAC9B;IAEA,MAAMV,SACJ,MAAMa,kBAAkBL,MACxBP,EAAE;QACAa,KAAKR;QACLI,QAAQ,CAACK,IAAMA,EAAEC,QAAQ,CAACN;QAC1BO,OAAO,IAAIZ,QAAQO,IAAI,CAACH,KAAK,CAAC,KAAKS,MAAM;IAC3C;AAEJ;AAEA,eAAeL,kBAAkBL,GAAW;IAC1C,MAAMW,MAAM,MAAMC,MAAMZ;IAExB,IAAI,CAACW,IAAIE,IAAI,EAAE;QACb,MAAM,IAAIC,MAAM,CAAC,oBAAoB,EAAEd,KAAK;IAC9C;IAEA,OAAOT,SAASwB,IAAI,CAACJ,IAAIE,IAAI;AAC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/download-template.ts"],"sourcesContent":["import { Readable } from 'node:stream'\nimport { pipeline } from 'node:stream/promises'\nimport { x } from 'tar'\n\nimport type { ProjectTemplate } from '../types.js'\n\nimport { debug as debugLog } from '../utils/log.js'\n\nexport async function downloadTemplate({\n debug,\n projectDir,\n template,\n}: {\n debug?: boolean\n projectDir: string\n template: ProjectTemplate\n}) {\n const branchOrTag = template.url.split('#')?.[1] || 'latest'\n const url = `https://codeload.github.com/payloadcms/payload/tar.gz/${branchOrTag}`\n const filter = `payload-${branchOrTag.replace(/^v/, '').replaceAll('/', '-')}/templates/${template.name}/`\n\n if (debug) {\n debugLog(`Using template url: ${template.url}`)\n debugLog(`Codeload url: ${url}`)\n debugLog(`Filter: ${filter}`)\n }\n\n await pipeline(\n await downloadTarStream(url),\n x({\n cwd: projectDir,\n filter: (p) => p.includes(filter),\n strip: 2 + template.name.split('/').length,\n }),\n )\n}\n\nasync function downloadTarStream(url: string) {\n const res = await fetch(url)\n\n if (!res.body) {\n throw new Error(`Failed to download: ${url}`)\n }\n\n return Readable.from(res.body
|
|
1
|
+
{"version":3,"sources":["../../src/lib/download-template.ts"],"sourcesContent":["import { Readable } from 'node:stream'\nimport { pipeline } from 'node:stream/promises'\nimport { x } from 'tar'\n\nimport type { ProjectTemplate } from '../types.js'\n\nimport { debug as debugLog } from '../utils/log.js'\n\nexport async function downloadTemplate({\n debug,\n projectDir,\n template,\n}: {\n debug?: boolean\n projectDir: string\n template: ProjectTemplate\n}) {\n const branchOrTag = template.url.split('#')?.[1] || 'latest'\n const url = `https://codeload.github.com/payloadcms/payload/tar.gz/${branchOrTag}`\n const filter = `payload-${branchOrTag.replace(/^v/, '').replaceAll('/', '-')}/templates/${template.name}/`\n\n if (debug) {\n debugLog(`Using template url: ${template.url}`)\n debugLog(`Codeload url: ${url}`)\n debugLog(`Filter: ${filter}`)\n }\n\n await pipeline(\n await downloadTarStream(url),\n x({\n cwd: projectDir,\n filter: (p) => p.includes(filter),\n strip: 2 + template.name.split('/').length,\n }),\n )\n}\n\nasync function downloadTarStream(url: string) {\n const res = await fetch(url)\n\n if (!res.body) {\n throw new Error(`Failed to download: ${url}`)\n }\n\n return Readable.from(res.body)\n}\n"],"names":["Readable","pipeline","x","debug","debugLog","downloadTemplate","projectDir","template","branchOrTag","url","split","filter","replace","replaceAll","name","downloadTarStream","cwd","p","includes","strip","length","res","fetch","body","Error","from"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAa;AACtC,SAASC,QAAQ,QAAQ,uBAAsB;AAC/C,SAASC,CAAC,QAAQ,MAAK;AAIvB,SAASC,SAASC,QAAQ,QAAQ,kBAAiB;AAEnD,OAAO,eAAeC,iBAAiB,EACrCF,KAAK,EACLG,UAAU,EACVC,QAAQ,EAKT;IACC,MAAMC,cAAcD,SAASE,GAAG,CAACC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI;IACpD,MAAMD,MAAM,CAAC,sDAAsD,EAAED,aAAa;IAClF,MAAMG,SAAS,CAAC,QAAQ,EAAEH,YAAYI,OAAO,CAAC,MAAM,IAAIC,UAAU,CAAC,KAAK,KAAK,WAAW,EAAEN,SAASO,IAAI,CAAC,CAAC,CAAC;IAE1G,IAAIX,OAAO;QACTC,SAAS,CAAC,oBAAoB,EAAEG,SAASE,GAAG,EAAE;QAC9CL,SAAS,CAAC,cAAc,EAAEK,KAAK;QAC/BL,SAAS,CAAC,QAAQ,EAAEO,QAAQ;IAC9B;IAEA,MAAMV,SACJ,MAAMc,kBAAkBN,MACxBP,EAAE;QACAc,KAAKV;QACLK,QAAQ,CAACM,IAAMA,EAAEC,QAAQ,CAACP;QAC1BQ,OAAO,IAAIZ,SAASO,IAAI,CAACJ,KAAK,CAAC,KAAKU,MAAM;IAC5C;AAEJ;AAEA,eAAeL,kBAAkBN,GAAW;IAC1C,MAAMY,MAAM,MAAMC,MAAMb;IAExB,IAAI,CAACY,IAAIE,IAAI,EAAE;QACb,MAAM,IAAIC,MAAM,CAAC,oBAAoB,EAAEf,KAAK;IAC9C;IAEA,OAAOT,SAASyB,IAAI,CAACJ,IAAIE,IAAI;AAC/B"}
|
|
@@ -9,8 +9,8 @@ import { CollectionCards as CollectionCards_ab83ff7e88da8d3530831f296ec4756a } f
|
|
|
9
9
|
import { CollectionQueryWidget as CollectionQueryWidget_ab83ff7e88da8d3530831f296ec4756a } from '@payloadcms/ui/rsc'
|
|
10
10
|
import { QueryPresetsWhereField as QueryPresetsWhereField_3817bf644402e67bfe6577f60ef982de } from '@payloadcms/ui'
|
|
11
11
|
import { CollectionQuerySortField as CollectionQuerySortField_3817bf644402e67bfe6577f60ef982de } from '@payloadcms/ui'
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { ActivityWidget as ActivityWidget_ab83ff7e88da8d3530831f296ec4756a } from '@payloadcms/ui/rsc'
|
|
13
|
+
import { CollectionFilter as CollectionFilter_3817bf644402e67bfe6577f60ef982de } from '@payloadcms/ui'
|
|
14
14
|
|
|
15
15
|
/** @type import('payload').ImportMap */
|
|
16
16
|
export const importMap = {
|
|
@@ -28,7 +28,6 @@ export const importMap = {
|
|
|
28
28
|
'@payloadcms/ui#QueryPresetsWhereField': QueryPresetsWhereField_3817bf644402e67bfe6577f60ef982de,
|
|
29
29
|
'@payloadcms/ui#CollectionQuerySortField':
|
|
30
30
|
CollectionQuerySortField_3817bf644402e67bfe6577f60ef982de,
|
|
31
|
-
'@payloadcms/ui/rsc#
|
|
32
|
-
'@payloadcms/ui#
|
|
33
|
-
RecentlyViewedCollectionsField_3817bf644402e67bfe6577f60ef982de,
|
|
31
|
+
'@payloadcms/ui/rsc#ActivityWidget': ActivityWidget_ab83ff7e88da8d3530831f296ec4756a,
|
|
32
|
+
'@payloadcms/ui#CollectionFilter': CollectionFilter_3817bf644402e67bfe6577f60ef982de,
|
|
34
33
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. MODIFY AT YOUR OWN RISK. */
|
|
2
|
-
import { payloadApiHandlers } from '@payloadcms/tanstack-start/
|
|
2
|
+
import { payloadApiHandlers } from '@payloadcms/tanstack-start/routes'
|
|
3
3
|
import { createFileRoute } from '@tanstack/react-router'
|
|
4
4
|
|
|
5
5
|
export const Route = createFileRoute('/_payload/api/$')({
|
|
@@ -8,8 +8,8 @@ import { CollectionCards as CollectionCards_ab83ff7e88da8d3530831f296ec4756a } f
|
|
|
8
8
|
import { CollectionQueryWidget as CollectionQueryWidget_ab83ff7e88da8d3530831f296ec4756a } from '@payloadcms/ui/rsc'
|
|
9
9
|
import { QueryPresetsWhereField as QueryPresetsWhereField_3817bf644402e67bfe6577f60ef982de } from '@payloadcms/ui'
|
|
10
10
|
import { CollectionQuerySortField as CollectionQuerySortField_3817bf644402e67bfe6577f60ef982de } from '@payloadcms/ui'
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { ActivityWidget as ActivityWidget_ab83ff7e88da8d3530831f296ec4756a } from '@payloadcms/ui/rsc'
|
|
12
|
+
import { CollectionFilter as CollectionFilter_3817bf644402e67bfe6577f60ef982de } from '@payloadcms/ui'
|
|
13
13
|
|
|
14
14
|
/** @type import('payload').ImportMap */
|
|
15
15
|
export const importMap = {
|
|
@@ -26,7 +26,7 @@ export const importMap = {
|
|
|
26
26
|
'@payloadcms/ui#QueryPresetsWhereField': QueryPresetsWhereField_3817bf644402e67bfe6577f60ef982de,
|
|
27
27
|
'@payloadcms/ui#CollectionQuerySortField':
|
|
28
28
|
CollectionQuerySortField_3817bf644402e67bfe6577f60ef982de,
|
|
29
|
-
'@payloadcms/ui/rsc#
|
|
30
|
-
'@payloadcms/ui#
|
|
31
|
-
|
|
29
|
+
'@payloadcms/ui/rsc#ActivityWidget': ActivityWidget_ab83ff7e88da8d3530831f296ec4756a,
|
|
30
|
+
'@payloadcms/ui#CollectionFilter':
|
|
31
|
+
CollectionFilter_3817bf644402e67bfe6577f60ef982de,
|
|
32
32
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-payload-app",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.5",
|
|
4
4
|
"homepage": "https://payloadcms.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Payload <dev@payloadcms.com> (https://payloadcms.com)",
|
|
@@ -70,15 +70,13 @@
|
|
|
70
70
|
"@types/node": "24.12.3"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
|
-
"node": ">=24.
|
|
73
|
+
"node": ">=24.22.1"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
76
|
"build": "pnpm pack-template-files && pnpm typecheck && pnpm build:swc",
|
|
77
77
|
"build:debug": "pnpm build",
|
|
78
78
|
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
|
79
79
|
"clean": "rimraf -g {dist,*.tsbuildinfo}",
|
|
80
|
-
"lint": "eslint .",
|
|
81
|
-
"lint:fix": "eslint . --fix",
|
|
82
80
|
"pack-template-files": "node --no-deprecation --import @swc-node/register/esm-register src/scripts/pack-template-files.ts",
|
|
83
81
|
"test": "vitest --run",
|
|
84
82
|
"typecheck": "tsc"
|