@constructive-io/seeder 0.5.2 → 0.5.3
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 +13 -20
- package/dist/bin.js.map +1 -1
- package/dist/index.cjs +13 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -18030,7 +18030,7 @@ function getBlueprintNames() {
|
|
|
18030
18030
|
|
|
18031
18031
|
// package.json
|
|
18032
18032
|
var package_default = {
|
|
18033
|
-
version: "0.5.
|
|
18033
|
+
version: "0.5.3"};
|
|
18034
18034
|
|
|
18035
18035
|
// src/templates/blog/generators.ts
|
|
18036
18036
|
var POST_STATUSES = ["draft", "published", "archived"];
|
|
@@ -20251,7 +20251,8 @@ async function provisionDatabase(db, options) {
|
|
|
20251
20251
|
domain: options.domain,
|
|
20252
20252
|
subdomain: options.subdomain || void 0,
|
|
20253
20253
|
ownerId: options.ownerId,
|
|
20254
|
-
modules: ["all"]
|
|
20254
|
+
modules: ["all"],
|
|
20255
|
+
bootstrapUser: true
|
|
20255
20256
|
},
|
|
20256
20257
|
select: {
|
|
20257
20258
|
id: true,
|
|
@@ -22456,9 +22457,9 @@ Endpoint: ${config.endpoint}`);
|
|
|
22456
22457
|
console.log("");
|
|
22457
22458
|
logStep("Authenticating with schema builder");
|
|
22458
22459
|
const credentials = await promptForCredentials(config);
|
|
22459
|
-
const authResult = await
|
|
22460
|
+
const authResult = await loginOrRegister(config.endpoint, credentials.email, credentials.password);
|
|
22460
22461
|
const { token, userId } = authResult;
|
|
22461
|
-
logOk(`
|
|
22462
|
+
logOk(`Authenticated as user ${mask(userId)}`);
|
|
22462
22463
|
if (config.dryRun) {
|
|
22463
22464
|
logWarn("Dry run mode - skipping provisioning");
|
|
22464
22465
|
return;
|
|
@@ -22493,6 +22494,14 @@ Endpoint: ${config.endpoint}`);
|
|
|
22493
22494
|
authenticatedRoleName: topology.dataRoleName
|
|
22494
22495
|
}
|
|
22495
22496
|
);
|
|
22497
|
+
logStep("Registering admin user on per-database auth...");
|
|
22498
|
+
await sleep(5e3);
|
|
22499
|
+
try {
|
|
22500
|
+
const perDbAuth = await loginOrRegister(topology.authEndpoint, credentials.email, credentials.password);
|
|
22501
|
+
logOk(`Per-database admin user ready: ${mask(perDbAuth.userId)}`);
|
|
22502
|
+
} catch (error) {
|
|
22503
|
+
logWarn(`Per-database admin registration deferred: ${error instanceof Error ? error.message : String(error)}`);
|
|
22504
|
+
}
|
|
22496
22505
|
const seededRowCounts = {};
|
|
22497
22506
|
let seedUserId;
|
|
22498
22507
|
if (dataset && preset) {
|