create-payload-app
Advanced tools
Comparing version 3.0.0-beta.30 to 3.0.0-beta.31
@@ -8,2 +8,3 @@ import * as p from '@clack/prompts'; | ||
import path from 'path'; | ||
import { tryInitRepoAndCommit } from '../utils/git.js'; | ||
import { debug, error, warning } from '../utils/log.js'; | ||
@@ -93,2 +94,7 @@ import { configurePayloadConfig } from './configure-payload-config.js'; | ||
} | ||
if (!cliArgs['--no-git']) { | ||
tryInitRepoAndCommit({ | ||
cwd: projectDir | ||
}); | ||
} | ||
} | ||
@@ -95,0 +101,0 @@ export async function updatePackageJSON(args) { |
import fse from 'fs-extra'; | ||
import path from 'path'; | ||
import { createProject } from './create-project.js'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { dbReplacements } from './packages.js'; | ||
import { getValidTemplates } from './templates.js'; | ||
import globby from 'globby'; | ||
const filename = fileURLToPath(import.meta.url); | ||
const dirname = path.dirname(filename); | ||
const projectDir = path.resolve(dirname, './tmp'); | ||
import tempDirectory from 'temp-dir'; | ||
describe('createProject', ()=>{ | ||
let projectDir; | ||
beforeAll(()=>{ | ||
@@ -16,7 +14,3 @@ console.log = jest.fn(); | ||
beforeEach(()=>{ | ||
if (fse.existsSync(projectDir)) { | ||
fse.rmdirSync(projectDir, { | ||
recursive: true | ||
}); | ||
} | ||
projectDir = `${tempDirectory}/${Math.random().toString(36).substring(7)}`; | ||
}); | ||
@@ -94,2 +88,4 @@ afterEach(()=>{ | ||
const packageJson = fse.readJsonSync(packageJsonPath); | ||
// Verify git was initialized | ||
expect(fse.existsSync(path.resolve(projectDir, '.git'))).toBe(true); | ||
// Should only have one db adapter | ||
@@ -96,0 +92,0 @@ expect(Object.keys(packageJson.dependencies).filter((n)=>n.startsWith('@payloadcms/db-'))).toHaveLength(1); |
@@ -41,2 +41,4 @@ import * as p from '@clack/prompts'; | ||
'--use-yarn': Boolean, | ||
// Other | ||
'--no-git': Boolean, | ||
// Flags | ||
@@ -43,0 +45,0 @@ '--beta': Boolean, |
@@ -14,2 +14,3 @@ import type arg from 'arg'; | ||
'--no-deps': BooleanConstructor; | ||
'--no-git': BooleanConstructor; | ||
'--secret': StringConstructor; | ||
@@ -16,0 +17,0 @@ '--template': StringConstructor; |
{ | ||
"name": "create-payload-app", | ||
"version": "3.0.0-beta.30", | ||
"version": "3.0.0-beta.31", | ||
"homepage": "https://payloadcms.com", | ||
@@ -49,3 +49,4 @@ "repository": { | ||
"@types/jest": "^27.0.3", | ||
"@types/node": "20.12.5" | ||
"@types/node": "20.12.5", | ||
"temp-dir": "2.0.0" | ||
}, | ||
@@ -52,0 +53,0 @@ "scripts": { |
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
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
178859
97
1704
7
1