Deploy via committed dist: local Nest build, server runs with .env
Build on the developer machine without Docker, commit dist/, and run on the server with Dockerfile.dist plus compose env_file. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.splitFullName = splitFullName;
|
||||
exports.joinFullName = joinFullName;
|
||||
function splitFullName(name) {
|
||||
const trimmed = name.trim().replace(/\s+/g, ' ');
|
||||
if (!trimmed) {
|
||||
return { firstName: 'مشتری', lastName: 'جدید' };
|
||||
}
|
||||
const parts = trimmed.split(' ');
|
||||
if (parts.length === 1) {
|
||||
return { firstName: parts[0], lastName: '' };
|
||||
}
|
||||
return {
|
||||
firstName: parts[0],
|
||||
lastName: parts.slice(1).join(' '),
|
||||
};
|
||||
}
|
||||
function joinFullName(firstName, lastName) {
|
||||
return `${firstName} ${lastName}`.trim();
|
||||
}
|
||||
//# sourceMappingURL=name.js.map
|
||||
Reference in New Issue
Block a user