Build release artifacts for deploy.
Refresh API release bundle and admin/user app dist outputs for Dokploy copy-only deploys. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+34
-12
@@ -87629,12 +87629,24 @@ var require_iam_service = __commonJS({
|
||||
customerBrowserReturnUrl() {
|
||||
return (0, env_12.envOrNull)("IAM_BROWSER_RETURN_URL") || (0, env_12.envOrNull)("IAM_POST_LOGOUT_REDIRECT_URI") || (0, env_12.envList)("IAM_ALLOWED_RETURN_URLS")[0] || null;
|
||||
}
|
||||
/**
|
||||
* Admin return URL only. Must NOT fall back to the customer/app URL: that
|
||||
* sent admins to user-app-v2 after password login whenever
|
||||
* `IAM_ADMIN_BROWSER_RETURN_URL` was left blank but the customer return was set.
|
||||
*/
|
||||
adminBrowserReturnUrl() {
|
||||
return (0, env_12.envOrNull)("IAM_ADMIN_BROWSER_RETURN_URL") || (0, env_12.envOrNull)("IAM_ADMIN_POST_LOGOUT_REDIRECT_URI") || (0, env_12.envList)("IAM_ADMIN_ALLOWED_RETURN_URLS")[0] || this.customerBrowserReturnUrl();
|
||||
return (0, env_12.envOrNull)("IAM_ADMIN_BROWSER_RETURN_URL") || (0, env_12.envOrNull)("IAM_ADMIN_POST_LOGOUT_REDIRECT_URI") || (0, env_12.envList)("IAM_ADMIN_ALLOWED_RETURN_URLS")[0] || null;
|
||||
}
|
||||
browserBootstrapUrl(ticket) {
|
||||
/**
|
||||
* One-shot IAM cookie bootstrap. `audience` picks which return URL must be
|
||||
* configured — without it a ticket would bounce the browser to the wrong app.
|
||||
*/
|
||||
browserBootstrapUrl(ticket, audience = "customer") {
|
||||
if (!ticket || !this.issuer)
|
||||
return null;
|
||||
const returnTo = audience === "admin" ? this.adminBrowserReturnUrl() : this.customerBrowserReturnUrl();
|
||||
if (!returnTo)
|
||||
return null;
|
||||
return `${this.issuer}/auth/bootstrap?ticket=${encodeURIComponent(ticket)}`;
|
||||
}
|
||||
/**
|
||||
@@ -89328,7 +89340,7 @@ var require_customer_auth_service = __commonJS({
|
||||
return { ended };
|
||||
}
|
||||
withBootstrap(body, identity) {
|
||||
const url = this.iam.browserBootstrapUrl(identity?.browserTicket);
|
||||
const url = this.iam.browserBootstrapUrl(identity?.browserTicket, "customer");
|
||||
return url ? { ...body, iamBootstrapUrl: url } : body;
|
||||
}
|
||||
ssoSecret() {
|
||||
@@ -94018,7 +94030,7 @@ var require_auth_service = __commonJS({
|
||||
userAgent: userAgent ?? null
|
||||
});
|
||||
}
|
||||
const bootstrap2 = this.iam.browserBootstrapUrl(verified.identity?.browserTicket);
|
||||
const bootstrap2 = this.iam.browserBootstrapUrl(verified.identity?.browserTicket, "admin");
|
||||
return {
|
||||
id: user.id,
|
||||
name: user.fullName,
|
||||
@@ -97139,30 +97151,40 @@ var require_admin_customers_service = __commonJS({
|
||||
* customer -> type=2 AND is_archive=0 (مغازه دار اپلیکیشن)
|
||||
* banker -> type=4 AND is_archive=0 (بنکدار)
|
||||
* shopkeeper -> type=3 AND is_archive=0 (مغازه دار حضوری)
|
||||
* major/verify/table -> is_archive=0 AND (step_one=1 OR step_two=1)
|
||||
* major/verify/table -> awaiting first approval (inactive + step pending)
|
||||
* major/archive/table -> is_archive=1 (no type filter)
|
||||
*
|
||||
* NOTE every non-archive list also excludes archived rows, so archiving a
|
||||
* customer removes them from ALL type lists at once.
|
||||
*
|
||||
* «در انتظار» vs «عمده» must not show the same rows. App self-registration
|
||||
* creates APP_SHOPKEEPER + isActive=false + STEP_ONE_SUBMITTED, and step-one
|
||||
* accept sets isActive=true — so pending is inactive+pending-step only, and
|
||||
* the main omde list excludes those same inactive pending rows.
|
||||
*/
|
||||
scopeWhere(scope) {
|
||||
const pendingVerification = {
|
||||
isActive: false,
|
||||
verificationStep: {
|
||||
in: [client_1.VerificationStep.STEP_ONE_SUBMITTED, client_1.VerificationStep.STEP_TWO_SUBMITTED]
|
||||
}
|
||||
};
|
||||
switch (scope) {
|
||||
case "banker":
|
||||
return { kind: client_1.CustomerKind.BANKER, isArchived: false };
|
||||
case "shopkeeper":
|
||||
return { kind: client_1.CustomerKind.WALK_IN_SHOPKEEPER, isArchived: false };
|
||||
case "non_verified":
|
||||
return {
|
||||
isArchived: false,
|
||||
verificationStep: {
|
||||
in: [client_1.VerificationStep.STEP_ONE_SUBMITTED, client_1.VerificationStep.STEP_TWO_SUBMITTED]
|
||||
}
|
||||
};
|
||||
return { isArchived: false, ...pendingVerification };
|
||||
case "archived":
|
||||
return { isArchived: true };
|
||||
case "all":
|
||||
default:
|
||||
return { kind: client_1.CustomerKind.APP_SHOPKEEPER, isArchived: false };
|
||||
return {
|
||||
kind: client_1.CustomerKind.APP_SHOPKEEPER,
|
||||
isArchived: false,
|
||||
NOT: pendingVerification
|
||||
};
|
||||
}
|
||||
}
|
||||
async list(query, scope = "all") {
|
||||
|
||||
Reference in New Issue
Block a user