Files
Laca-City/backend/node_modules/ioredis/built/transaction.js
PhongPham c65cc97a33 🎯 MapView v2.0 - Global Deployment Ready
 MAJOR FEATURES:
• Auto-zoom intelligence với smart bounds fitting
• Enhanced 3D GPS markers với pulsing effects
• Professional route display với 6-layer rendering
• Status-based parking icons với availability indicators
• Production-ready build optimizations

🗺️ AUTO-ZOOM FEATURES:
• Smart bounds fitting cho GPS + selected parking
• Adaptive padding (50px) cho visual balance
• Max zoom control (level 16) để tránh quá gần
• Dynamic centering khi không có selection

🎨 ENHANCED VISUALS:
• 3D GPS marker với multi-layer pulse effects
• Advanced parking icons với status colors
• Selection highlighting với animation
• Dimming system cho non-selected items

🛣️ ROUTE SYSTEM:
• OpenRouteService API integration
• Multi-layer route rendering (glow, shadow, main, animated)
• Real-time distance & duration calculation
• Visual route info trong popup

📱 PRODUCTION READY:
• SSR safe với dynamic imports
• Build errors resolved
• Global deployment via Vercel
• Optimized performance

🌍 DEPLOYMENT:
• Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app
• Bundle size: 22.8 kB optimized
• Global CDN distribution
• HTTPS enabled

💾 VERSION CONTROL:
• MapView-v2.0.tsx backup created
• MAPVIEW_VERSIONS.md documentation
• Full version history tracking
2025-07-20 19:52:16 +07:00

94 lines
3.7 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addTransactionSupport = void 0;
const utils_1 = require("./utils");
const standard_as_callback_1 = require("standard-as-callback");
const Pipeline_1 = require("./Pipeline");
function addTransactionSupport(redis) {
redis.pipeline = function (commands) {
const pipeline = new Pipeline_1.default(this);
if (Array.isArray(commands)) {
pipeline.addBatch(commands);
}
return pipeline;
};
const { multi } = redis;
redis.multi = function (commands, options) {
if (typeof options === "undefined" && !Array.isArray(commands)) {
options = commands;
commands = null;
}
if (options && options.pipeline === false) {
return multi.call(this);
}
const pipeline = new Pipeline_1.default(this);
// @ts-expect-error
pipeline.multi();
if (Array.isArray(commands)) {
pipeline.addBatch(commands);
}
const exec = pipeline.exec;
pipeline.exec = function (callback) {
// Wait for the cluster to be connected, since we need nodes information before continuing
if (this.isCluster && !this.redis.slots.length) {
if (this.redis.status === "wait")
this.redis.connect().catch(utils_1.noop);
return (0, standard_as_callback_1.default)(new Promise((resolve, reject) => {
this.redis.delayUntilReady((err) => {
if (err) {
reject(err);
return;
}
this.exec(pipeline).then(resolve, reject);
});
}), callback);
}
if (this._transactions > 0) {
exec.call(pipeline);
}
// Returns directly when the pipeline
// has been called multiple times (retries).
if (this.nodeifiedPromise) {
return exec.call(pipeline);
}
const promise = exec.call(pipeline);
return (0, standard_as_callback_1.default)(promise.then(function (result) {
const execResult = result[result.length - 1];
if (typeof execResult === "undefined") {
throw new Error("Pipeline cannot be used to send any commands when the `exec()` has been called on it.");
}
if (execResult[0]) {
execResult[0].previousErrors = [];
for (let i = 0; i < result.length - 1; ++i) {
if (result[i][0]) {
execResult[0].previousErrors.push(result[i][0]);
}
}
throw execResult[0];
}
return (0, utils_1.wrapMultiResult)(execResult[1]);
}), callback);
};
// @ts-expect-error
const { execBuffer } = pipeline;
// @ts-expect-error
pipeline.execBuffer = function (callback) {
if (this._transactions > 0) {
execBuffer.call(pipeline);
}
return pipeline.exec(callback);
};
return pipeline;
};
const { exec } = redis;
redis.exec = function (callback) {
return (0, standard_as_callback_1.default)(exec.call(this).then(function (results) {
if (Array.isArray(results)) {
results = (0, utils_1.wrapMultiResult)(results);
}
return results;
}), callback);
};
}
exports.addTransactionSupport = addTransactionSupport;