@launchframe/cli 1.0.0-beta.11 → 1.0.0-beta.13
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/package.json
CHANGED
|
@@ -105,7 +105,7 @@ async function deployUp() {
|
|
|
105
105
|
const verifySpinner = ora('Checking service status...').start();
|
|
106
106
|
|
|
107
107
|
try {
|
|
108
|
-
const { stdout: psOutput} = await execAsync(
|
|
108
|
+
const { stdout: psOutput } = await execAsync(
|
|
109
109
|
`ssh ${vpsUser}@${vpsHost} "cd ${vpsAppFolder}/infrastructure && docker-compose -f docker-compose.yml ps"`,
|
|
110
110
|
{ timeout: 30000 }
|
|
111
111
|
);
|
|
@@ -114,6 +114,7 @@ async function deployUp() {
|
|
|
114
114
|
|
|
115
115
|
console.log(chalk.gray('\n' + psOutput));
|
|
116
116
|
} catch (error) {
|
|
117
|
+
console.error(chalk.red(`\n❌ Error: ${error.message}\n`));
|
|
117
118
|
verifySpinner.warn('Could not verify services');
|
|
118
119
|
}
|
|
119
120
|
|
|
@@ -205,6 +205,7 @@ async function waitlistDeploy() {
|
|
|
205
205
|
verifySpinner.succeed('Services verified');
|
|
206
206
|
console.log(chalk.gray('\n' + psOutput));
|
|
207
207
|
} catch (error) {
|
|
208
|
+
console.error(chalk.yellow(`\n⚠️ Error: ${error.message}\n`));
|
|
208
209
|
verifySpinner.warn('Could not verify services');
|
|
209
210
|
}
|
|
210
211
|
|
|
@@ -24,8 +24,6 @@ const VARIANT_CONFIG = {
|
|
|
24
24
|
'src/modules/domain/ai/services/project-config.service.ts', // Project config service
|
|
25
25
|
'src/guards/project-ownership.guard.ts', // Project ownership guard (header-based)
|
|
26
26
|
'src/guards/project-param.guard.ts', // Project param guard (route-based)
|
|
27
|
-
'src/modules/auth/auth.service.ts', // Auth service with multi-tenant support
|
|
28
|
-
'src/modules/auth/auth.controller.ts', // Auth controller with multi-tenant support
|
|
29
27
|
'src/modules/users/users.service.ts', // Users service with multi-tenant support
|
|
30
28
|
'src/modules/users/users.controller.ts', // Users controller with multi-tenant support
|
|
31
29
|
'src/modules/users/create-user.dto.ts' // CreateUserDto with businessId
|
|
@@ -60,11 +58,15 @@ const VARIANT_CONFIG = {
|
|
|
60
58
|
}
|
|
61
59
|
},
|
|
62
60
|
|
|
63
|
-
// B2B2C variant: Adds regular_user support
|
|
61
|
+
// B2B2C variant: Adds regular_user support with separate customer auth
|
|
64
62
|
'b2b2c': {
|
|
65
63
|
// Complete files to copy
|
|
66
64
|
files: [
|
|
67
|
-
'src/modules/users/user-business.entity.ts',
|
|
65
|
+
'src/modules/users/user-business.entity.ts', // Business-to-user linking entity
|
|
66
|
+
'src/modules/auth/auth-customer.ts', // Customer auth config (regular_user, customer_ cookie)
|
|
67
|
+
'src/modules/auth/better-auth-customer.controller.ts', // Customer auth controller (/api/auth/customer)
|
|
68
|
+
'src/modules/auth/auth.module.ts', // Auth module with customer controller
|
|
69
|
+
'src/modules/auth/better-auth.guard.ts', // Guard handling both auth instances
|
|
68
70
|
],
|
|
69
71
|
|
|
70
72
|
// Code sections to insert
|
|
@@ -77,6 +79,9 @@ const VARIANT_CONFIG = {
|
|
|
77
79
|
'src/modules/users/users.module.ts': [
|
|
78
80
|
'B2B2C_IMPORTS', // Add UserBusiness import
|
|
79
81
|
'B2B2C_ENTITIES' // Add UserBusiness to TypeORM
|
|
82
|
+
],
|
|
83
|
+
'src/database/migrations/1764300000001-CreateSessionsTable.ts': [
|
|
84
|
+
'B2B2C_TENANT_COLUMN' // Add tenant_id column for session scoping
|
|
80
85
|
]
|
|
81
86
|
}
|
|
82
87
|
},
|
|
@@ -126,8 +131,7 @@ const VARIANT_CONFIG = {
|
|
|
126
131
|
// Complete files to copy (has both multi-tenant and B2B2C features)
|
|
127
132
|
files: [
|
|
128
133
|
'src/modules/users/user-business.entity.ts', // Business-to-user linking entity
|
|
129
|
-
'src/modules/auth/auth.
|
|
130
|
-
'src/modules/auth/auth.controller.ts', // Combined auth controller
|
|
134
|
+
'src/modules/auth/auth.ts', // Combined Better Auth config
|
|
131
135
|
'src/modules/users/users.service.ts', // Combined users service
|
|
132
136
|
'src/modules/users/users.controller.ts', // Combined users controller
|
|
133
137
|
'src/modules/domain/projects/projects.module.ts' // Projects module with UserBusiness
|
|
@@ -310,6 +314,14 @@ const VARIANT_CONFIG = {
|
|
|
310
314
|
'src/store/useProjectStore.ts' // Project state
|
|
311
315
|
],
|
|
312
316
|
sections: {}
|
|
317
|
+
},
|
|
318
|
+
|
|
319
|
+
'b2b2c': {
|
|
320
|
+
// B2B2C uses separate auth endpoint for customer sessions
|
|
321
|
+
files: [
|
|
322
|
+
'src/lib/auth-client.ts' // Auth client with /api/auth/customer basePath
|
|
323
|
+
],
|
|
324
|
+
sections: {}
|
|
313
325
|
}
|
|
314
326
|
},
|
|
315
327
|
|
|
@@ -395,6 +407,11 @@ function resolveVariantChoices(backendChoices) {
|
|
|
395
407
|
choices['admin-portal'].userModel = backendChoices.userModel;
|
|
396
408
|
}
|
|
397
409
|
|
|
410
|
+
// Special case: customers-portal inherits BOTH tenancy and userModel
|
|
411
|
+
if (choices['customers-portal']) {
|
|
412
|
+
choices['customers-portal'].userModel = backendChoices.userModel;
|
|
413
|
+
}
|
|
414
|
+
|
|
398
415
|
// Special case: infrastructure needs BOTH tenancy and userModel for proper variant resolution
|
|
399
416
|
if (choices['infrastructure']) {
|
|
400
417
|
choices['infrastructure'].tenancy = backendChoices.tenancy;
|