create-payloadpack-auth 0.1.0 → 0.1.1
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 +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,9 +5,9 @@ import pc from "picocolors";
|
|
|
5
5
|
// src/constants.ts
|
|
6
6
|
var REGISTRY_URL = "https://payloadpack.nodejs.pub";
|
|
7
7
|
var PACKAGE_NAME = "@payloadpack/auth";
|
|
8
|
-
var DOCS_URL = "https://
|
|
8
|
+
var DOCS_URL = "https://payloadpack.com/docs";
|
|
9
9
|
var TOKEN_ENV_VAR = "PAYLOADPACK_AUTH_TOKEN";
|
|
10
|
-
var DEPENDENCIES = ["@payloadpack/auth", "better-auth"];
|
|
10
|
+
var DEPENDENCIES = ["@payloadpack/auth", "better-auth", "@better-auth/passkey"];
|
|
11
11
|
var DEV_DEPENDENCIES = ["dotenv-cli"];
|
|
12
12
|
var NPMRC_CONTENT = `@payloadpack:registry=https://payloadpack.nodejs.pub
|
|
13
13
|
//payloadpack.nodejs.pub/:_authToken=\${PAYLOADPACK_AUTH_TOKEN}
|
|
@@ -353,7 +353,7 @@ function getManualInstructions() {
|
|
|
353
353
|
}
|
|
354
354
|
async function modifyPayloadConfig(configPath, cwd) {
|
|
355
355
|
const source = await fs7.readFile(configPath, "utf-8");
|
|
356
|
-
if (source.includes("betterPayloadAuth") || source.includes("
|
|
356
|
+
if (source.includes("betterPayloadAuth") || source.includes("@payloadpack/auth")) {
|
|
357
357
|
return { success: true, modified: false, alreadyConfigured: true };
|
|
358
358
|
}
|
|
359
359
|
const formatter = await detectFormatter(cwd);
|
|
@@ -484,7 +484,7 @@ async function installDependencies({
|
|
|
484
484
|
async function main() {
|
|
485
485
|
const cwd = process.cwd();
|
|
486
486
|
console.log();
|
|
487
|
-
p.intro(pc.bgCyan(pc.black("
|
|
487
|
+
p.intro(pc.bgCyan(pc.black(" @payloadpack/auth Setup ")));
|
|
488
488
|
const project = await validatePayloadProject(cwd);
|
|
489
489
|
if (!project.valid) {
|
|
490
490
|
p.cancel(project.error || "This does not appear to be a Payload CMS project.");
|
|
@@ -609,7 +609,7 @@ async function main() {
|
|
|
609
609
|
p.outro(pc.red("Setup incomplete - dependency installation failed"));
|
|
610
610
|
process.exit(1);
|
|
611
611
|
}
|
|
612
|
-
p.outro(pc.green("
|
|
612
|
+
p.outro(pc.green("@payloadpack/auth is now configured!"));
|
|
613
613
|
console.log(`
|
|
614
614
|
${pc.bold("Next steps:")}
|
|
615
615
|
1. Ensure ${pc.cyan("PAYLOAD_SECRET")} is set in your .env (required for auth)
|