Files
Laca-City/backend/node_modules/tsconfig-paths/lib/__tests__/try-path.test.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

124 lines
4.8 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var try_path_1 = require("../try-path");
var path_1 = require("path");
describe("mapping-entry", function () {
var abosolutePathMappings = [
{
pattern: "longest/pre/fix/*",
paths: [(0, path_1.join)("/absolute", "base", "url", "foo2", "bar")],
},
{ pattern: "pre/fix/*", paths: [(0, path_1.join)("/absolute", "base", "url", "foo3")] },
{ pattern: "*", paths: [(0, path_1.join)("/absolute", "base", "url", "foo1")] },
];
var abosolutePathMappingsStarstWithSlash = [
{
pattern: "/opt/*",
paths: [(0, path_1.join)("/absolute", "src", "aws-layer")],
},
{
pattern: "*",
paths: [(0, path_1.join)("/absolute", "src")],
},
];
it("should return no paths for relative requested module", function () {
var result = (0, try_path_1.getPathsToTry)([".ts", "tsx"], abosolutePathMappings, "./requested-module");
expect(result).toBeUndefined();
});
it("should return no paths if no pattern match the requested module", function () {
var result = (0, try_path_1.getPathsToTry)([".ts", "tsx"], [
{
pattern: "longest/pre/fix/*",
paths: [(0, path_1.join)("/absolute", "base", "url", "foo2", "bar")],
},
{
pattern: "pre/fix/*",
paths: [(0, path_1.join)("/absolute", "base", "url", "foo3")],
},
], "requested-module");
expect(result).toBeUndefined();
});
it("should get all paths that matches requested module", function () {
var result = (0, try_path_1.getPathsToTry)([".ts", ".tsx"], abosolutePathMappings, "longest/pre/fix/requested-module");
expect(result).toEqual([
// "longest/pre/fix/*"
{ type: "file", path: (0, path_1.join)("/absolute", "base", "url", "foo2", "bar") },
{
type: "extension",
path: (0, path_1.join)("/absolute", "base", "url", "foo2", "bar.ts"),
},
{
type: "extension",
path: (0, path_1.join)("/absolute", "base", "url", "foo2", "bar.tsx"),
},
{
type: "package",
path: (0, path_1.join)("/absolute", "base", "url", "foo2", "bar", "package.json"),
},
{
type: "index",
path: (0, path_1.join)("/absolute", "base", "url", "foo2", "bar", "index.ts"),
},
{
type: "index",
path: (0, path_1.join)("/absolute", "base", "url", "foo2", "bar", "index.tsx"),
},
// "*"
{ type: "file", path: (0, path_1.join)("/absolute", "base", "url", "foo1") },
{ type: "extension", path: (0, path_1.join)("/absolute", "base", "url", "foo1.ts") },
{ type: "extension", path: (0, path_1.join)("/absolute", "base", "url", "foo1.tsx") },
{
type: "package",
path: (0, path_1.join)("/absolute", "base", "url", "foo1", "package.json"),
},
{
type: "index",
path: (0, path_1.join)("/absolute", "base", "url", "foo1", "index.ts"),
},
{
type: "index",
path: (0, path_1.join)("/absolute", "base", "url", "foo1", "index.tsx"),
},
]);
});
it("should resolve paths starting with a slash", function () {
var result = (0, try_path_1.getPathsToTry)([".ts"], abosolutePathMappingsStarstWithSlash, "/opt/utils");
expect(result).toEqual([
// "opt/*"
{
path: (0, path_1.join)("/absolute", "src", "aws-layer"),
type: "file",
},
{
path: (0, path_1.join)("/absolute", "src", "aws-layer.ts"),
type: "extension",
},
{
path: (0, path_1.join)("/absolute", "src", "aws-layer", "package.json"),
type: "package",
},
{
path: (0, path_1.join)("/absolute", "src", "aws-layer", "index.ts"),
type: "index",
},
// "*"
{
path: (0, path_1.join)("/absolute", "src"),
type: "file",
},
{
path: (0, path_1.join)("/absolute", "src.ts"),
type: "extension",
},
{
path: (0, path_1.join)("/absolute", "src", "package.json"),
type: "package",
},
{
path: (0, path_1.join)("/absolute", "src", "index.ts"),
type: "index",
},
]);
});
});
//# sourceMappingURL=try-path.test.js.map