MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / loadConfig

Method loadConfig

src/js/modules/app-config.js:45–136  ·  view source on GitHub ↗

* Load environment-specific configuration

()

Source from the content-addressed store, hash-verified

43 * Load environment-specific configuration
44 */
45 loadConfig() {
46 const baseConfig = {
47 app: {
48 name: 'eSIM Tools',
49 version: '2.0.0',
50 description: '专为Giffgaff和Simyo用户设计的eSIM管理工具集'
51 },
52 api: {
53 timeout: 30000,
54 retries: 3,
55 retryDelay: 1000
56 },
57 performance: {
58 enableMonitoring: true,
59 enableServiceWorker: true,
60 swDelay: 2000,
61 imageLazyLoadThreshold: '50px',
62 maxConcurrentRequests: 4
63 },
64 cache: {
65 version: 'v1',
66 staticAssets: {
67 maxAge: 31536000,
68 immutable: true
69 },
70 apiResponses: {
71 maxAge: 300,
72 maxEntries: 100
73 },
74 images: {
75 maxAge: 86400,
76 maxEntries: 50
77 }
78 },
79 features: {
80 giffgaff: true,
81 simyo: true,
82 offlineMode: true,
83 analytics: false,
84 errorReporting: false
85 },
86 security: {
87 enableCSP: true,
88 enableCORS: true,
89 rateLimit: {
90 windowMs: 60000,
91 maxRequests: 100
92 }
93 }
94 };
95
96 // Environment-specific overrides
97 const envConfig = {
98 [ENV.DEVELOPMENT]: {
99 api: {
100 baseURL: 'http://localhost:3000',
101 timeout: 60000
102 },

Callers 1

constructorMethod · 0.95

Calls 1

deepMergeMethod · 0.95

Tested by

no test coverage detected