create-vexcms 0.0.4 → 0.0.6
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
CHANGED
|
@@ -98,7 +98,9 @@ async function copyTemplate(framework, targetPath) {
|
|
|
98
98
|
overwrite: false,
|
|
99
99
|
errorOnExist: false,
|
|
100
100
|
filter: (src) => {
|
|
101
|
-
|
|
101
|
+
const basename = src.split("/").pop() ?? "";
|
|
102
|
+
const skipFiles = ["_gitignore", "_env.example", "_prettierrc", "_prettierignore"];
|
|
103
|
+
return !skipFiles.includes(basename);
|
|
102
104
|
}
|
|
103
105
|
});
|
|
104
106
|
const sourceGitignore = join(templatePath, "_gitignore");
|
|
@@ -109,6 +111,18 @@ async function copyTemplate(framework, targetPath) {
|
|
|
109
111
|
errorOnExist: false
|
|
110
112
|
});
|
|
111
113
|
}
|
|
114
|
+
const dotfileRenames = [
|
|
115
|
+
["_env.example", ".env.example"],
|
|
116
|
+
["_prettierrc", ".prettierrc"],
|
|
117
|
+
["_prettierignore", ".prettierignore"]
|
|
118
|
+
];
|
|
119
|
+
for (const [from, to] of dotfileRenames) {
|
|
120
|
+
const source = join(templatePath, from);
|
|
121
|
+
const target = join(targetPath, to);
|
|
122
|
+
if (await fs2.pathExists(source)) {
|
|
123
|
+
await fs2.copy(source, target, { overwrite: false, errorOnExist: false });
|
|
124
|
+
}
|
|
125
|
+
}
|
|
112
126
|
}
|
|
113
127
|
async function overlayTemplate({ overlayDir, targetDir }) {
|
|
114
128
|
await fs2.copy(overlayDir, targetDir, { overwrite: true });
|
|
@@ -174,6 +188,7 @@ var VexFrameworkInstaller = class {
|
|
|
174
188
|
await fs3.writeJson(pkgPath, pkg, { spaces: 2 });
|
|
175
189
|
const envLocalPath = path.join(this.targetPath, ".env.local");
|
|
176
190
|
const envContent = `NEXT_PUBLIC_SITE_URL=http://localhost:${port}
|
|
191
|
+
BETTER_AUTH_SECRET=""
|
|
177
192
|
`;
|
|
178
193
|
await fs3.writeFile(envLocalPath, envContent);
|
|
179
194
|
}
|
|
@@ -2383,6 +2398,10 @@ async function main() {
|
|
|
2383
2398
|
message: "(4/8) Enable email/password authentication?",
|
|
2384
2399
|
default: true
|
|
2385
2400
|
});
|
|
2401
|
+
const orgs = opts.orgs ?? await confirm({
|
|
2402
|
+
message: "(5/8) Enable multi-tenant (organizations)?",
|
|
2403
|
+
default: false
|
|
2404
|
+
});
|
|
2386
2405
|
const popularProviders = getPopularProviders();
|
|
2387
2406
|
const additionalProviders = getAdditionalProviders();
|
|
2388
2407
|
const allProviderChoices = [
|
|
@@ -2397,13 +2416,9 @@ async function main() {
|
|
|
2397
2416
|
}))
|
|
2398
2417
|
];
|
|
2399
2418
|
const oauthProviders = await checkbox({
|
|
2400
|
-
message: "(
|
|
2419
|
+
message: "(6/8) Select OAuth providers (space to toggle, enter to confirm):",
|
|
2401
2420
|
choices: allProviderChoices
|
|
2402
2421
|
});
|
|
2403
|
-
const orgs = opts.orgs ?? await confirm({
|
|
2404
|
-
message: "(6/8) Enable multi-tenant (organizations)?",
|
|
2405
|
-
default: false
|
|
2406
|
-
});
|
|
2407
2422
|
const initGit = await confirm({
|
|
2408
2423
|
message: "(7/8) Initialize a Git repository?",
|
|
2409
2424
|
default: true
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Since the ".env" file is gitignored, you can use the ".env.example" file to
|
|
2
|
+
# build a new ".env" file when you clone the repo. Keep this file up-to-date
|
|
3
|
+
# when you add new variables to `.env`.
|
|
4
|
+
|
|
5
|
+
# This file will be committed to version control, so make sure not to have any
|
|
6
|
+
# secrets in it. If you are cloning this repo, create a copy of this file named
|
|
7
|
+
# ".env" and populate it with your secrets.
|
|
8
|
+
|
|
9
|
+
# When adding additional environment variables, the schema in "/src/env.js"
|
|
10
|
+
# should be updated accordingly.
|
|
11
|
+
|
|
12
|
+
NEXT_PUBLIC_CONVEX_URL=""
|
|
13
|
+
NEXT_PUBLIC_CONVEX_SITE_URL=""
|
|
14
|
+
|
|
15
|
+
NEXT_PUBLIC_SITE_URL="http://localhost:3000"
|
|
16
|
+
BETTER_AUTH_SECRET=""
|
|
17
|
+
|
|
18
|
+
# {{ENV_OAUTH_VARS}}
|
|
19
|
+
|
|
@@ -28,21 +28,6 @@
|
|
|
28
28
|
],
|
|
29
29
|
"@convex/*": [
|
|
30
30
|
"./convex/*"
|
|
31
|
-
],
|
|
32
|
-
"@vexcms/core": [
|
|
33
|
-
"../../packages/core/src/index.ts"
|
|
34
|
-
],
|
|
35
|
-
"@vexcms/ui": [
|
|
36
|
-
"../../packages/ui/src/index.ts"
|
|
37
|
-
],
|
|
38
|
-
"@vexcms/admin-next": [
|
|
39
|
-
"../../packages/admin-next/src/index.ts"
|
|
40
|
-
],
|
|
41
|
-
"@vexcms/better-auth": [
|
|
42
|
-
"../../packages/better-auth/src/index.ts"
|
|
43
|
-
],
|
|
44
|
-
"@vexcms/file-storage-convex": [
|
|
45
|
-
"../../packages/file-storage-convex/src/index.ts"
|
|
46
31
|
]
|
|
47
32
|
}
|
|
48
33
|
},
|
|
File without changes
|
|
File without changes
|