create-payload-app
Advanced tools
Comparing version 3.0.0-canary.518fabe to 3.0.0-canary.51be7be
@@ -5,3 +5,3 @@ import type { CliArgs, PackageManager } from '../types.js'; | ||
projectDir: string; | ||
}): PackageManager; | ||
}): Promise<PackageManager>; | ||
//# sourceMappingURL=get-package-manager.d.ts.map |
@@ -0,3 +1,4 @@ | ||
import execa from 'execa'; | ||
import fse from 'fs-extra'; | ||
export function getPackageManager(args) { | ||
export async function getPackageManager(args) { | ||
const { cliArgs, projectDir } = args; | ||
@@ -15,2 +16,5 @@ try { | ||
detected = 'bun'; | ||
} else if (await commandExists('pnpm')) { | ||
// Prefer pnpm if it's installed | ||
detected = 'pnpm'; | ||
} else { | ||
@@ -38,3 +42,11 @@ // Otherwise check the execution environment | ||
} | ||
async function commandExists(command) { | ||
try { | ||
await execa.command(`command -v ${command}`); | ||
return true; | ||
} catch { | ||
return false; | ||
} | ||
} | ||
//# sourceMappingURL=get-package-manager.js.map |
@@ -98,3 +98,3 @@ import * as p from '@clack/prompts'; | ||
const projectDir = nextConfigPath ? path.dirname(nextConfigPath) : path.resolve(process.cwd(), slugify(projectName)); | ||
const packageManager = getPackageManager({ | ||
const packageManager = await getPackageManager({ | ||
cliArgs: this.args, | ||
@@ -101,0 +101,0 @@ projectDir |
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ | ||
/* DO NOT MODIFY it because it could be re-written at any time. */ | ||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ | ||
import config from '@payload-config' | ||
@@ -4,0 +4,0 @@ import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' |
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ | ||
/* DO NOT MODIFY it because it could be re-written at any time. */ | ||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ | ||
import config from '@payload-config' | ||
@@ -4,0 +4,0 @@ import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' |
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ | ||
/* DO NOT MODIFY it because it could be re-written at any time. */ | ||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ | ||
import config from '@payload-config' | ||
@@ -4,0 +4,0 @@ import { GRAPHQL_POST } from '@payloadcms/next/routes' |
{ | ||
"name": "create-payload-app", | ||
"version": "3.0.0-canary.518fabe", | ||
"version": "3.0.0-canary.51be7be", | ||
"homepage": "https://payloadcms.com", | ||
@@ -60,4 +60,7 @@ "repository": { | ||
"@types/jest": "29.5.12", | ||
"@types/node": "20.12.5" | ||
"@types/node": "22.5.4" | ||
}, | ||
"engines": { | ||
"node": "^18.20.2 || >=20.9.0" | ||
}, | ||
"scripts": { | ||
@@ -64,0 +67,0 @@ "build": "pnpm pack-template-files && pnpm typecheck && pnpm build:swc", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
233641
2356