Phase9
This commit is contained in:
@@ -14,6 +14,11 @@ export const DEV_NODE_ENROLLMENT_TOKEN =
|
||||
export const DEV_NODE_2_ENROLLMENT_TOKEN =
|
||||
'local-dev-node2-enrollment-token-32ch';
|
||||
|
||||
export const DEV_WHMCS_INTEGRATION_ID = 'local-dev-whmcs';
|
||||
|
||||
export const DEV_WHMCS_API_SECRET =
|
||||
'local-dev-whmcs-api-secret-32chars-minimum';
|
||||
|
||||
async function main(): Promise<void> {
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
@@ -93,12 +98,28 @@ async function main(): Promise<void> {
|
||||
},
|
||||
});
|
||||
|
||||
const whmcsInstallation = await prisma.whmcsInstallation.upsert({
|
||||
where: { integrationId: DEV_WHMCS_INTEGRATION_ID },
|
||||
create: {
|
||||
integrationId: DEV_WHMCS_INTEGRATION_ID,
|
||||
name: 'Local Development',
|
||||
apiSecret: DEV_WHMCS_API_SECRET,
|
||||
isActive: true,
|
||||
},
|
||||
update: {
|
||||
apiSecret: DEV_WHMCS_API_SECRET,
|
||||
isActive: true,
|
||||
},
|
||||
});
|
||||
|
||||
console.log('Seed complete:');
|
||||
console.log(` Plan Free: ${freePlan.id}`);
|
||||
console.log(` Dev node: ${devNode.id} (${devNode.name})`);
|
||||
console.log(` Dev node 2: ${devNode2.id} (${devNode2.name})`);
|
||||
console.log(` Enrollment token (set NODE_TOKEN): ${DEV_NODE_ENROLLMENT_TOKEN}`);
|
||||
console.log(` Node 2 enrollment token: ${DEV_NODE_2_ENROLLMENT_TOKEN}`);
|
||||
console.log(` WHMCS integration: ${whmcsInstallation.integrationId}`);
|
||||
console.log(` WHMCS API secret: ${DEV_WHMCS_API_SECRET}`);
|
||||
} finally {
|
||||
await prisma.$disconnect();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,10 @@ export type {
|
||||
CreditWallet,
|
||||
CreditTransaction,
|
||||
UsageRecord,
|
||||
WhmcsInstallation,
|
||||
WhmcsClientLink,
|
||||
WhmcsServiceLink,
|
||||
IntegrationOperation,
|
||||
Plan,
|
||||
FeatureFlag,
|
||||
SystemSetting,
|
||||
|
||||
Reference in New Issue
Block a user