@habeetat/cli 0.1.0-dev.20260624144936.825fc0b → 0.1.0-dev.20260624145259.c5f7eb0
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/bin.js +2 -2
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -13613,7 +13613,7 @@ async function initPlatform(projectDir) {
|
|
|
13613
13613
|
const orgSlug = orgName.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
|
|
13614
13614
|
const adminEmail = env2.PLATFORM_ADMIN_EMAIL || config.platform.adminEmail;
|
|
13615
13615
|
const adminPassword = env2.PLATFORM_ADMIN_PASSWORD || "Habeetat_01";
|
|
13616
|
-
const adminUsername = adminEmail.split("@")[0];
|
|
13616
|
+
const adminUsername = adminEmail.split("@")[0].replace(/[^A-Za-z0-9_]/g, "_").replace(/^[^A-Za-z_]/, "_") || "admin";
|
|
13617
13617
|
const logtoDbUrl = `postgres://${env2.LOGTO_DB_USER || "logto"}:${env2.LOGTO_DB_PASSWORD || "logto"}@logto-db:5432/${env2.LOGTO_DB_NAME || "logto"}`;
|
|
13618
13618
|
const bootstrapScriptPath = path3__default.default.join(projectDir, "scripts", "nhp-seed-logto-bootstrap.mjs");
|
|
13619
13619
|
const hasLocalScript = fs2__default.default.existsSync(bootstrapScriptPath);
|
|
@@ -13688,7 +13688,7 @@ async function initPlatform(projectDir) {
|
|
|
13688
13688
|
"exec",
|
|
13689
13689
|
"-T",
|
|
13690
13690
|
"-e",
|
|
13691
|
-
`NHP_PLATFORM_ADMIN_USER=${adminEmail.split("@")[0]}`,
|
|
13691
|
+
`NHP_PLATFORM_ADMIN_USER=${adminEmail.split("@")[0].replace(/[^A-Za-z0-9_]/g, "_").replace(/^[^A-Za-z_]/, "_") || "admin"}`,
|
|
13692
13692
|
"-e",
|
|
13693
13693
|
`NHP_PLATFORM_ADMIN_EMAIL=${adminEmail}`,
|
|
13694
13694
|
"-e",
|