create-apppaaaul 2.0.17 ā 2.0.18
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/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/templates/nextjs-ts-landing-prisma/project/prisma/schema.prisma +23 -23
- package/package.json +1 -1
- package/dist/templates/nextjs-ts-clean/project/%%.gitignore +0 -43
- package/dist/templates/nextjs-ts-landing-prisma/project/%%.gitignore +0 -46
package/dist/index.js
CHANGED
|
@@ -131,6 +131,13 @@ async function main() {
|
|
|
131
131
|
);
|
|
132
132
|
const destination = project.name === "." ? process.cwd() : import_node_path.default.join(process.cwd(), project.name);
|
|
133
133
|
await (0, import_promises.cp)(import_node_path.default.join(template, "project"), destination, { recursive: true });
|
|
134
|
+
const aditionalsPath = import_node_path.default.join(import_node_path.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl)), "aditionals");
|
|
135
|
+
try {
|
|
136
|
+
await (0, import_promises.cp)(aditionalsPath, destination, { recursive: true });
|
|
137
|
+
console.log(`${import_picocolors2.default.green("\u2713")} Copied additional files`);
|
|
138
|
+
} catch (error) {
|
|
139
|
+
console.log(`${import_picocolors2.default.yellow("\u26A0")} Could not copy additional files: ${error}`);
|
|
140
|
+
}
|
|
134
141
|
const files = await (0, import_glob.glob)(`**/*`, { nodir: true, cwd: destination, absolute: true });
|
|
135
142
|
for await (const file of files) {
|
|
136
143
|
const data = await (0, import_promises.readFile)(file, "utf8");
|
|
@@ -143,8 +150,20 @@ async function main() {
|
|
|
143
150
|
await execAsync(`cd ${project.name}`);
|
|
144
151
|
console.log(`
|
|
145
152
|
${import_picocolors2.default.green(`cd`)} ${project.name}`);
|
|
146
|
-
|
|
147
|
-
|
|
153
|
+
try {
|
|
154
|
+
await execAsync("git status", { cwd: destination });
|
|
155
|
+
console.log(`${import_picocolors2.default.green("\u2713")} Git repository detected`);
|
|
156
|
+
await execAsync("git checkout -b dev", { cwd: destination });
|
|
157
|
+
console.log(`${import_picocolors2.default.green("\u2713")} Created dev branch`);
|
|
158
|
+
try {
|
|
159
|
+
await execAsync("git push -u origin dev", { cwd: destination });
|
|
160
|
+
console.log(`${import_picocolors2.default.green("\u2713")} Pushed dev branch to origin`);
|
|
161
|
+
} catch (pushError) {
|
|
162
|
+
console.log(`${import_picocolors2.default.yellow("\u26A0")} Could not push to origin (remote may not be configured)`);
|
|
163
|
+
}
|
|
164
|
+
} catch (gitError) {
|
|
165
|
+
console.log(`${import_picocolors2.default.yellow("\u26A0")} Git not initialized in this directory`);
|
|
166
|
+
}
|
|
148
167
|
} catch (error) {
|
|
149
168
|
console.error(`Error executing commands: ${error}`);
|
|
150
169
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../node_modules/.pnpm/tsup@8.4.0_typescript@5.8.2_yaml@2.4.5/node_modules/tsup/assets/cjs_shims.js","../index.ts","../helpers/install.ts"],"sourcesContent":["// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () =>\n typeof document === 'undefined'\n ? new URL(`file:${__filename}`).href\n : (document.currentScript && document.currentScript.src) ||\n new URL('main.js', document.baseURI).href\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n","#!/usr/bin/env node\r\n\r\nimport path from \"node:path\";\r\nimport { fileURLToPath } from \"node:url\";\r\nimport { cp, readFile, writeFile } from \"node:fs/promises\";\r\nimport { exec } from \"child_process\";\r\nimport { promisify } from \"util\";\r\n\r\nimport { cyan, green, red } from \"picocolors\";\r\nimport { glob } from \"glob\";\r\nimport color from \"picocolors\";\r\nimport prompts from \"prompts\";\r\nimport yargs from \"yargs\";\r\nimport { hideBin } from \"yargs/helpers\";\r\n\r\nimport { install } from \"./helpers/install\";\r\nconst execAsync = promisify(exec);\r\n\r\n// Define the templates available\r\nconst TEMPLATES = [\r\n {\r\n title: \"Nextjs ts with db setup Landing with prisma\",\r\n value: \"nextjs-ts-landing-prisma\",\r\n },\r\n {\r\n title: 'Nextjs ts clean',\r\n value: 'nextjs-ts-clean'\r\n }\r\n];\r\n\r\n// Specify CLI arguments\r\nconst args = yargs(hideBin(process.argv)).options({\r\n name: {\r\n alias: \"n\",\r\n type: \"string\",\r\n description: \"Name of the project\",\r\n },\r\n template: {\r\n alias: \"t\",\r\n type: \"string\",\r\n description: \"Template to use\",\r\n },\r\n});\r\n\r\n// Override arguments passed on the CLI\r\nprompts.override(args.argv);\r\n\r\nasync function main() {\r\n // Get the initial values for the prompts\r\n const {\r\n _: [initialName, initialProject],\r\n } = await args.argv;\r\n\r\n // Create the project prompt\r\n const project = await prompts(\r\n [\r\n {\r\n type: \"text\",\r\n name: \"name\",\r\n message: \"What is the name of your project?\",\r\n initial: initialName || \"apppaaaul-project\",\r\n validate: (value) => {\r\n if (value !== \".\" && value.match(/[^a-zA-Z0-9-_]+/g)) {\r\n return \"Project name can only contain letters, numbers, dashes, underscores, or be '.' for the current directory\";\r\n }\r\n\r\n return true;\r\n },\r\n },\r\n {\r\n type: \"select\",\r\n name: \"template\",\r\n message: `Which template would you like to use?`,\r\n initial: initialProject || 0,\r\n choices: TEMPLATES,\r\n },\r\n ],\r\n {\r\n onCancel: () => {\r\n console.log(\"\\nBye š\\n\");\r\n\r\n process.exit(0);\r\n },\r\n },\r\n );\r\n\r\n // Get the template folder for the selected template\r\n const template = path.join(\r\n path.dirname(fileURLToPath(import.meta.url)),\r\n \"templates\",\r\n project.template,\r\n );\r\n\r\n // Get the destination folder for the project\r\n const destination = project.name === \".\" ? process.cwd() : path.join(process.cwd(), project.name);\r\n\r\n // Copy files from the template folder to the current directory\r\n await cp(path.join(template, \"project\"), destination, { recursive: true });\r\n\r\n // Get all files from the destination folder\r\n const files = await glob(`**/*`, { nodir: true, cwd: destination, absolute: true });\r\n\r\n // Read each file and replace the tokens\r\n for await (const file of files) {\r\n const data = await readFile(file, \"utf8\");\r\n const draft = data.replace(/{{name}}/g, project.name);\r\n\r\n await writeFile(file, draft, \"utf8\");\r\n }\r\n\r\n // Log outro message\r\n console.log(\"\\n⨠Project created āØ\");\r\n\r\n // Run commands if a new directory was created\r\n if (project.name !== \".\") {\r\n try {\r\n await execAsync(`cd ${project.name}`);\r\n console.log(`\\n${color.green(`cd`)} ${project.name}`);\r\n await execAsync(\"git checkout -b dev\");\r\n await execAsync(\"git push -u origin dev\");\r\n } catch (error) {\r\n console.error(`Error executing commands: ${error}`);\r\n }\r\n }\r\n try {\r\n await execAsync(\"cursor .\");\r\n console.log(\"Installing packages. This might take a couple of minutes.\");\r\n console.log();\r\n await install();\r\n console.log();\r\n console.log(`${green(\"Success!\")} App installed successfully.`);\r\n console.log(cyan(\"Initializing the development server...\"));\r\n await execAsync(\"pnpm dev\");\r\n } catch (error) {\r\n console.error(`Error executing commands: ${error}`);\r\n }\r\n}\r\n\r\n// Run the main function\r\nmain().catch(console.error);\r\n","import spawn from \"cross-spawn\";\r\nimport { yellow } from \"picocolors\";\r\n\r\nexport async function install(): Promise<void> {\r\n const packageManager = \"pnpm\";\r\n const args: string[] = [\"install\"];\r\n\r\n return new Promise((resolve, reject) => {\r\n /**\r\n * Spawn the installation process.\r\n */\r\n const child = spawn(packageManager, args, {\r\n stdio: \"inherit\",\r\n env: {\r\n ...process.env,\r\n ADBLOCK: \"1\",\r\n // we set NODE_ENV to development as pnpm skips dev\r\n // dependencies when production\r\n NODE_ENV: \"development\",\r\n DISABLE_OPENCOLLECTIVE: \"1\",\r\n },\r\n });\r\n\r\n child.on(\"close\", (code) => {\r\n if (code !== 0) {\r\n reject({ command: `${packageManager} ${args.join(\" \")}` });\r\n\r\n return;\r\n }\r\n resolve();\r\n });\r\n });\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,O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O,MAAM;AAAA,EACrC;AAGA,UAAQ,IAAI,iCAAuB;AAGnC,MAAI,QAAQ,SAAS,KAAK;AACxB,QAAI;AACF,YAAM,UAAU,MAAM,QAAQ,IAAI,EAAE;AACpC,cAAQ,IAAI;AAAA,EAAK,mBAAAC,QAAM,MAAM,IAAI,CAAC,IAAI,QAAQ,IAAI,EAAE;AACpD,YAAM,UAAU,qBAAqB;AACrC,YAAM,UAAU,wBAAwB;AAAA,IAC1C,SAAS,OAAO;AACd,cAAQ,MAAM,6BAA6B,KAAK,EAAE;AAAA,IACpD;AAAA,EACF;AACA,MAAI;AACF,UAAM,UAAU,UAAU;AAC1B,YAAQ,IAAI,2DAA2D;AACvE,YAAQ,IAAI;AACZ,UAAM,QAAQ;AACd,YAAQ,IAAI;AACZ,YAAQ,IAAI,OAAG,yBAAM,UAAU,CAAC,8BAA8B;AAC9D,YAAQ,QAAI,wBAAK,wCAAwC,CAAC;AAC1D,UAAM,UAAU,UAAU;AAAA,EAC5B,SAAS,OAAO;AACd,YAAQ,MAAM,6BAA6B,KAAK,EAAE;AAAA,EACpD;AACF;AAGA,KAAK,EAAE,MAAM,QAAQ,KAAK;","names":["import_picocolors","args","spawn","yargs","prompts","path","color"]}
|
|
1
|
+
{"version":3,"sources":["../node_modules/.pnpm/tsup@8.4.0_typescript@5.8.2_yaml@2.4.5/node_modules/tsup/assets/cjs_shims.js","../index.ts","../helpers/install.ts"],"sourcesContent":["// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () =>\n typeof document === 'undefined'\n ? new URL(`file:${__filename}`).href\n : (document.currentScript && document.currentScript.src) ||\n new URL('main.js', document.baseURI).href\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n","#!/usr/bin/env node\r\n\r\nimport path from \"node:path\";\r\nimport { fileURLToPath } from \"node:url\";\r\nimport { cp, readFile, writeFile } from \"node:fs/promises\";\r\nimport { exec } from \"child_process\";\r\nimport { promisify } from \"util\";\r\n\r\nimport { cyan, green, red, yellow } from \"picocolors\";\r\nimport { glob } from \"glob\";\r\nimport color from \"picocolors\";\r\nimport prompts from \"prompts\";\r\nimport yargs from \"yargs\";\r\nimport { hideBin } from \"yargs/helpers\";\r\n\r\nimport { install } from \"./helpers/install\";\r\nconst execAsync = promisify(exec);\r\n\r\n// Define the templates available\r\nconst TEMPLATES = [\r\n {\r\n title: \"Nextjs ts with db setup Landing with prisma\",\r\n value: \"nextjs-ts-landing-prisma\",\r\n },\r\n {\r\n title: 'Nextjs ts clean',\r\n value: 'nextjs-ts-clean'\r\n }\r\n];\r\n\r\n// Specify CLI arguments\r\nconst args = yargs(hideBin(process.argv)).options({\r\n name: {\r\n alias: \"n\",\r\n type: \"string\",\r\n description: \"Name of the project\",\r\n },\r\n template: {\r\n alias: \"t\",\r\n type: \"string\",\r\n description: \"Template to use\",\r\n },\r\n});\r\n\r\n// Override arguments passed on the CLI\r\nprompts.override(args.argv);\r\n\r\nasync function main() {\r\n // Get the initial values for the prompts\r\n const {\r\n _: [initialName, initialProject],\r\n } = await args.argv;\r\n\r\n // Create the project prompt\r\n const project = await prompts(\r\n [\r\n {\r\n type: \"text\",\r\n name: \"name\",\r\n message: \"What is the name of your project?\",\r\n initial: initialName || \"apppaaaul-project\",\r\n validate: (value) => {\r\n if (value !== \".\" && value.match(/[^a-zA-Z0-9-_]+/g)) {\r\n return \"Project name can only contain letters, numbers, dashes, underscores, or be '.' for the current directory\";\r\n }\r\n\r\n return true;\r\n },\r\n },\r\n {\r\n type: \"select\",\r\n name: \"template\",\r\n message: `Which template would you like to use?`,\r\n initial: initialProject || 0,\r\n choices: TEMPLATES,\r\n },\r\n ],\r\n {\r\n onCancel: () => {\r\n console.log(\"\\nBye š\\n\");\r\n\r\n process.exit(0);\r\n },\r\n },\r\n );\r\n\r\n // Get the template folder for the selected template\r\n const template = path.join(\r\n path.dirname(fileURLToPath(import.meta.url)),\r\n \"templates\",\r\n project.template,\r\n );\r\n\r\n // Get the destination folder for the project\r\n const destination = project.name === \".\" ? process.cwd() : path.join(process.cwd(), project.name);\r\n\r\n // Copy files from the template folder to the current directory\r\n await cp(path.join(template, \"project\"), destination, { recursive: true });\r\n\r\n // Copy additional files from aditionals folder to the project root\r\n const aditionalsPath = path.join(path.dirname(fileURLToPath(import.meta.url)), \"aditionals\");\r\n try {\r\n await cp(aditionalsPath, destination, { recursive: true });\r\n console.log(`${color.green(\"ā\")} Copied additional files`);\r\n } catch (error) {\r\n console.log(`${color.yellow(\"ā \")} Could not copy additional files: ${error}`);\r\n }\r\n\r\n // Get all files from the destination folder\r\n const files = await glob(`**/*`, { nodir: true, cwd: destination, absolute: true });\r\n\r\n // Read each file and replace the tokens\r\n for await (const file of files) {\r\n const data = await readFile(file, \"utf8\");\r\n const draft = data.replace(/{{name}}/g, project.name);\r\n\r\n await writeFile(file, draft, \"utf8\");\r\n }\r\n\r\n // Log outro message\r\n console.log(\"\\n⨠Project created āØ\");\r\n\r\n // Run commands if a new directory was created\r\n if (project.name !== \".\") {\r\n try {\r\n await execAsync(`cd ${project.name}`);\r\n console.log(`\\n${color.green(`cd`)} ${project.name}`);\r\n \r\n // Check if git is initialized\r\n try {\r\n await execAsync(\"git status\", { cwd: destination });\r\n console.log(`${color.green(\"ā\")} Git repository detected`);\r\n \r\n // Create dev branch if git is initialized\r\n await execAsync(\"git checkout -b dev\", { cwd: destination });\r\n console.log(`${color.green(\"ā\")} Created dev branch`);\r\n \r\n // Try to push to origin if remote exists\r\n try {\r\n await execAsync(\"git push -u origin dev\", { cwd: destination });\r\n console.log(`${color.green(\"ā\")} Pushed dev branch to origin`);\r\n } catch (pushError) {\r\n console.log(`${color.yellow(\"ā \")} Could not push to origin (remote may not be configured)`);\r\n }\r\n } catch (gitError) {\r\n console.log(`${color.yellow(\"ā \")} Git not initialized in this directory`);\r\n }\r\n } catch (error) {\r\n console.error(`Error executing commands: ${error}`);\r\n }\r\n }\r\n try {\r\n await execAsync(\"cursor .\");\r\n console.log(\"Installing packages. This might take a couple of minutes.\");\r\n console.log();\r\n await install();\r\n console.log();\r\n console.log(`${green(\"Success!\")} App installed successfully.`);\r\n console.log(cyan(\"Initializing the development server...\"));\r\n await execAsync(\"pnpm dev\");\r\n } catch (error) {\r\n console.error(`Error executing commands: ${error}`);\r\n }\r\n}\r\n\r\n// Run the main function\r\nmain().catch(console.error);\r\n","import spawn from \"cross-spawn\";\r\nimport { yellow } from \"picocolors\";\r\n\r\nexport async function install(): Promise<void> {\r\n const packageManager = \"pnpm\";\r\n const args: string[] = [\"install\"];\r\n\r\n return new Promise((resolve, reject) => {\r\n /**\r\n * Spawn the installation process.\r\n */\r\n const child = spawn(packageManager, args, {\r\n stdio: \"inherit\",\r\n env: {\r\n ...process.env,\r\n ADBLOCK: \"1\",\r\n // we set NODE_ENV to development as pnpm skips dev\r\n // dependencies when production\r\n NODE_ENV: \"development\",\r\n DISABLE_OPENCOLLECTIVE: \"1\",\r\n },\r\n });\r\n\r\n child.on(\"close\", (code) => {\r\n if (code !== 0) {\r\n reject({ command: `${packageManager} ${args.join(\" \")}` });\r\n\r\n return;\r\n }\r\n resolve();\r\n });\r\n });\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,OAClD,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;AAEpC,IAAM,gBAAgC,iCAAiB;;;ACT9D,uBAAiB;AACjB,sBAA8B;AAC9B,sBAAwC;AACxC,2BAAqB;AACrB,kBAA0B;AAE1B,wBAAyC;AACzC,kBAAqB;AACrB,IAAAA,qBAAkB;AAClB,qBAAoB;AACpB,mBAAkB;AAClB,qBAAwB;;;ACbxB,yBAAkB;AAGlB,eAAsB,UAAyB;AAC7C,QAAM,iBAAiB;A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AK,EAAE,MAAM,QAAQ,KAAK;","names":["import_picocolors","args","spawn","yargs","prompts","path","color"]}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
generator client {
|
|
3
|
-
provider = "prisma-client-js"
|
|
1
|
+
|
|
2
|
+
generator client {
|
|
3
|
+
provider = "prisma-client-js"
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
datasource db {
|
|
6
|
+
datasource db {
|
|
7
7
|
provider = "postgresql"
|
|
8
|
-
url = env("DATABASE_URL")
|
|
8
|
+
url = env("DATABASE_URL")
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
model Post {
|
|
12
|
-
id
|
|
11
|
+
model Post {
|
|
12
|
+
id String @id @default(uuid())
|
|
13
13
|
title String
|
|
14
14
|
content String?
|
|
15
15
|
published Boolean @default(false)
|
|
16
16
|
author User? @relation(fields: [authorId], references: [id])
|
|
17
|
-
authorId
|
|
17
|
+
authorId String?
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
model User {
|
|
21
|
-
id
|
|
20
|
+
model User {
|
|
21
|
+
id String @id @default(uuid())
|
|
22
22
|
email String @unique
|
|
23
23
|
name String?
|
|
24
24
|
posts Post[]
|
|
@@ -35,11 +35,11 @@ model User {
|
|
|
35
35
|
sessions Session[]
|
|
36
36
|
accounts Account[]
|
|
37
37
|
|
|
38
|
-
@@map("user")
|
|
38
|
+
@@map("user")
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
model Session {
|
|
42
|
-
id String @id
|
|
40
|
+
|
|
41
|
+
model Session {
|
|
42
|
+
id String @id @default(uuid())
|
|
43
43
|
expiresAt DateTime
|
|
44
44
|
token String
|
|
45
45
|
createdAt DateTime @default(now())
|
|
@@ -51,11 +51,11 @@ model Session {
|
|
|
51
51
|
impersonatedBy String?
|
|
52
52
|
|
|
53
53
|
@@unique([token])
|
|
54
|
-
@@map("session")
|
|
54
|
+
@@map("session")
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
model Account {
|
|
58
|
-
id String @id
|
|
56
|
+
|
|
57
|
+
model Account {
|
|
58
|
+
id String @id @default(uuid())
|
|
59
59
|
accountId String
|
|
60
60
|
providerId String
|
|
61
61
|
userId String
|
|
@@ -70,16 +70,16 @@ model Account {
|
|
|
70
70
|
createdAt DateTime @default(now())
|
|
71
71
|
updatedAt DateTime @updatedAt
|
|
72
72
|
|
|
73
|
-
@@map("account")
|
|
73
|
+
@@map("account")
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
model Verification {
|
|
77
|
-
id String @id
|
|
75
|
+
|
|
76
|
+
model Verification {
|
|
77
|
+
id String @id @default(uuid())
|
|
78
78
|
identifier String
|
|
79
79
|
value String
|
|
80
80
|
expiresAt DateTime
|
|
81
81
|
createdAt DateTime @default(now())
|
|
82
82
|
updatedAt DateTime @default(now()) @updatedAt
|
|
83
83
|
|
|
84
|
-
@@map("verification")
|
|
84
|
+
@@map("verification")
|
|
85
85
|
}
|
package/package.json
CHANGED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
/node_modules
|
|
5
|
-
/.pnp
|
|
6
|
-
.pnp.js
|
|
7
|
-
|
|
8
|
-
# testing
|
|
9
|
-
/coverage
|
|
10
|
-
|
|
11
|
-
# next.js
|
|
12
|
-
/.next/
|
|
13
|
-
/out/
|
|
14
|
-
|
|
15
|
-
# production
|
|
16
|
-
/build
|
|
17
|
-
|
|
18
|
-
# misc
|
|
19
|
-
.DS_Store
|
|
20
|
-
*.pem
|
|
21
|
-
|
|
22
|
-
# debug
|
|
23
|
-
npm-debug.log*
|
|
24
|
-
yarn-debug.log*
|
|
25
|
-
yarn-error.log*
|
|
26
|
-
|
|
27
|
-
# local env files
|
|
28
|
-
.env*.local
|
|
29
|
-
.env
|
|
30
|
-
|
|
31
|
-
# vercel
|
|
32
|
-
.vercel
|
|
33
|
-
|
|
34
|
-
# typescript
|
|
35
|
-
*.tsbuildinfo
|
|
36
|
-
next-env.d.ts
|
|
37
|
-
|
|
38
|
-
# docker
|
|
39
|
-
docker-compose.yml
|
|
40
|
-
|
|
41
|
-
# pnpm
|
|
42
|
-
pnpm-lock.yaml
|
|
43
|
-
pnpm-*
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
/node_modules
|
|
5
|
-
/.pnp
|
|
6
|
-
.pnp.js
|
|
7
|
-
|
|
8
|
-
# testing
|
|
9
|
-
/coverage
|
|
10
|
-
|
|
11
|
-
# next.js
|
|
12
|
-
/.next/
|
|
13
|
-
/out/
|
|
14
|
-
|
|
15
|
-
# production
|
|
16
|
-
/build
|
|
17
|
-
|
|
18
|
-
# misc
|
|
19
|
-
.DS_Store
|
|
20
|
-
*.pem
|
|
21
|
-
|
|
22
|
-
# debug
|
|
23
|
-
npm-debug.log*
|
|
24
|
-
yarn-debug.log*
|
|
25
|
-
yarn-error.log*
|
|
26
|
-
|
|
27
|
-
# local env files
|
|
28
|
-
.env*.local
|
|
29
|
-
.env
|
|
30
|
-
|
|
31
|
-
# vercel
|
|
32
|
-
.vercel
|
|
33
|
-
|
|
34
|
-
# typescript
|
|
35
|
-
*.tsbuildinfo
|
|
36
|
-
next-env.d.ts
|
|
37
|
-
|
|
38
|
-
# docker
|
|
39
|
-
docker-compose.yml
|
|
40
|
-
|
|
41
|
-
# prisma
|
|
42
|
-
prisma/generated/*
|
|
43
|
-
|
|
44
|
-
# pnpm
|
|
45
|
-
pnpm-lock.yaml
|
|
46
|
-
pnpm-*
|