@arela/uploader 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.nuevo DELETED
@@ -1,277 +0,0 @@
1
- # ============================================
2
- # ARELA UPLOADER CONFIGURATION
3
- # ============================================
4
-
5
- # =============================================================================
6
- # MULTI-TENANT API CONFIGURATION
7
- # =============================================================================
8
- # Default API (backward compatible - used when no --api flag is specified)
9
- ARELA_API_URL=http://localhost:3010
10
- ARELA_API_TOKEN=6389d891667ab73ad24e90dce7fd3932d20abab23ed864ba98d3a13a7321858f
11
-
12
- # API Agencia - Para registrar archivos de la agencia aduanal
13
- # Uso: arela stats --api agencia
14
- ARELA_API_AGENCIA_URL=http://localhost:4012
15
- ARELA_API_AGENCIA_TOKEN=6389d891667ab73ad24e90dce7fd3932d20abab23ed864ba98d3a13a7321858f
16
-
17
- # API Cliente Demo - Para pruebas genéricas
18
- # Uso: arela upload --api cliente --upload-by-rfc
19
- ARELA_API_CLIENTE_URL=http://localhost:4011
20
- ARELA_API_CLIENTE_TOKEN=6389d891667ab73ad24e90dce7fd3932d20abab23ed864ba98d3a13a7321858f
21
-
22
- # API Cliente KTJ931117P55 - Cliente real dedicado
23
- # Uso: arela upload --api ktj931117p55 --upload-by-rfc
24
- ARELA_API_KTJ931117P55_URL=http://localhost:4013
25
- ARELA_API_KTJ931117P55_TOKEN=6389d891667ab73ad24e90dce7fd3932d20abab23ed864ba98d3a13a7321858f
26
-
27
- # API Cliente AUM9207011CA - Cliente real dedicado
28
- # Uso: arela upload --api aum9207011ca --upload-by-rfc
29
- ARELA_API_AUM9207011CA_URL=http://localhost:4014
30
- ARELA_API_AUM9207011CA_TOKEN=6389d891667ab73ad24e90dce7fd3932d20abab23ed864ba98d3a13a7321858f
31
-
32
- # Default API target (can be overridden with --api flag)
33
- # Options: default | agencia | cliente | ktj931117p55
34
- ARELA_API_TARGET=default
35
-
36
- # Localhost Supabase Configuration (Storage compartido para todos los clientes)
37
- # Deprecado: !!!!!!!!!!!
38
- # SUPABASE_URL=http://127.0.0.1:54321
39
- # SUPABASE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
40
- # SUPABASE_BUCKET=record_keeping
41
-
42
- # Localhost Upload Configuration
43
- UPLOAD_BASE_PATH=../../Documents
44
- UPLOAD_SOURCES=2023|2024
45
- # UPLOAD_RFCS=RDG1107154L7|AUM9207011CA
46
- # UPLOAD_RFCS=AKS151005E46|IMS030409FZ0|RDG1107154L7|SHP031226BV2|CSM9301219B4|LIN960124HT8|LME971009SW4|AKM9707151B6|FEL000822AG2|FDM060802J54|MTM9807279B4|AUM9207011CA|MMJ0810145N1|ACC010328EQ6|PED781129JT6|CAD890407NK7|SME140411IK7|JME1903121C2|EIJ110429NF9|PTJ080414TM6|TME050503BM4|KTJ931117P55
47
- UPLOAD_RFCS=KTJ931117P55
48
- UPLOAD_YEARS=2023|2024
49
-
50
- # =============================================================================
51
- # PERFORMANCE OPTIMIZATION FOR MULTIPLE API REPLICAS
52
- # =============================================================================
53
-
54
- # API Connection Configuration
55
- # Set this to match your number of API replicas (e.g., if you have 10 API instances, set to 10)
56
- MAX_API_CONNECTIONS=10
57
-
58
- # API Connection Timeout (milliseconds)
59
- API_CONNECTION_TIMEOUT=60000
60
-
61
- # Batch Processing Configuration
62
- # Files processed concurrently per batch (should be >= MAX_API_CONNECTIONS for best performance)
63
- BATCH_SIZE=100
64
-
65
- # Delay between batches (0 for maximum speed)
66
- BATCH_DELAY=0
67
-
68
- # Source Processing Concurrency
69
- # Number of upload sources/folders to process simultaneously
70
- MAX_CONCURRENT_SOURCES=2
71
-
72
- # =============================================================================
73
- # EXAMPLE CONFIGURATIONS FOR DIFFERENT SCENARIOS
74
- # =============================================================================
75
-
76
- # For 10 API Replicas (High Performance Setup):
77
- # MAX_API_CONNECTIONS=10
78
- # BATCH_SIZE=100
79
- # MAX_CONCURRENT_SOURCES=3
80
- # BATCH_DELAY=0
81
-
82
- # For 5 API Replicas (Medium Performance Setup):
83
- # MAX_API_CONNECTIONS=5
84
- # BATCH_SIZE=50
85
- # MAX_CONCURRENT_SOURCES=2
86
- # BATCH_DELAY=0
87
-
88
- # For 1 API Instance (Single Instance Setup):
89
- # MAX_API_CONNECTIONS=5
90
- # BATCH_SIZE=20
91
- # MAX_CONCURRENT_SOURCES=1
92
- # BATCH_DELAY=100
93
-
94
-
95
- # =============================================================================
96
- # WATCH MODE CONFIGURATION
97
- # =============================================================================
98
-
99
- # Habilitar watch mode (true/false)
100
- WATCH_ENABLED=true
101
-
102
- # Configuración de directorios a observar (formato JSON)
103
- # Cada directorio puede tener su propia folderStructure para organizar en el bucket
104
- # Formato: {"ruta/directorio1":"estructura-1","ruta/directorio2":"estructura-2"}
105
- WATCH_DIRECTORY_CONFIGS={"../../Documents/2022":"palco","../../Documents/2023":"palco","../../Documents/2024":"palco"}
106
-
107
- # Estrategia de upload (opciones: individual|batch|full-structure)
108
- # - individual: Sube solo el archivo modificado más reciente
109
- # - batch: Sube un lote de N archivos recientes
110
- # - full-structure: Sube la estructura completa de carpetas
111
- WATCH_STRATEGY=batch
112
-
113
- # Debouncing en milisegundos (esperar entre eventos antes de procesar)
114
- WATCH_DEBOUNCE_MS=1000
115
-
116
- # Tamaño de batch para strategy batch
117
- WATCH_BATCH_SIZE=10
118
-
119
- # Usar polling en lugar de eventos nativos del filesystem
120
- # Útil para sistemas de archivos remotos o NFS
121
- WATCH_USE_POLLING=false
122
-
123
- # Interval de polling en milisegundos (solo si WATCH_USE_POLLING=true)
124
- WATCH_POLL_INTERVAL=100
125
-
126
- # Umbral de estabilidad en ms (esperar a que el archivo deje de cambiar)
127
- WATCH_STABILITY_THRESHOLD=300
128
-
129
- # Patrones a ignorar (separados por coma, se usan como regex)
130
- WATCH_IGNORE_PATTERNS=.tmp,.bak,*.swp
131
-
132
- # Detección automática de tipos de documento
133
- WATCH_AUTO_DETECT=true
134
-
135
- # Organización automática de archivos
136
- WATCH_AUTO_ORGANIZE=true
137
-
138
- # =============================================================================
139
- # WATCH MODE - AUTOMATIC PROCESSING PIPELINE
140
- # =============================================================================
141
- #
142
- # El pipeline automático ejecuta la siguiente secuencia cuando se detecta un archivo nuevo:
143
- # 1. Stats Collection → stats --stats-only (recopila información del archivo)
144
- # 2. PDF Detection → detect --detect-pdfs (identifica pedimentos simplificados)
145
- # 3. Path Propagation → detect --propagate-arela-path (propaga a documentos relacionados)
146
- # 4. RFC Upload → upload --upload-by-rfc --folder-structure (sube con estructura)
147
- #
148
- # El pipeline se habilita automáticamente en watch mode y usa la folderStructure
149
- # definida para cada WATCH_DIRECTORY_CONFIGS
150
- #
151
- # Para deshabilitar en CLI, usa: arela watch --no-auto-processing
152
-
153
- # =============================================================================
154
- # LOGGING AND MONITORING
155
- # =============================================================================
156
-
157
- # Progress bar update frequency
158
- PROGRESS_UPDATE_INTERVAL=10
159
-
160
- # Enable verbose logging (true/false)
161
- VERBOSE_LOGGING=false
162
-
163
- # ============================================
164
-
165
- # # Cloud Service Arela API Configuration
166
- # ARELA_API_URL=https://api.aws.arela.com.mx
167
- # ARELA_API_TOKEN=6bd75c5b3699ecf19e6726c10ae88ae0528f0b72d6c10f8b284f92563d3822a7
168
-
169
- # # Cloud Service Supabase Configuration
170
- # SUPABASE_URL=https://qlospyfsbwvkskivmsgq.supabase.co
171
- # SUPABASE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InFsb3NweWZzYnd2a3NraXZtc2dxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTU5MDg2NjUsImV4cCI6MjA3MTQ4NDY2NX0.BrqcCLxTmpU6Swl7h3gam6TeW4jVf4WssMbRm0sH7l4
172
- # SUPABASE_BUCKET=test
173
-
174
- # # Cloud Service Upload Configuration
175
- # UPLOAD_BASE_PATH=../../Documents
176
- # UPLOAD_SOURCES=2023|2024
177
- # # UPLOAD_RFCS=AKS151005E46|IMS030409FZ0|RDG1107154L7|SHP031226BV2|CSM9301219B4|LIN960124HT8|LME971009SW4|AKM9707151B6|FEL000822AG2|FDM060802J54|MTM9807279B4|AUM9207011CA|MMJ0810145N1|ACC010328EQ6|PED781129JT6|CAD890407NK7|SME140411IK7|JME1903121C2|EIJ110429NF9|PTJ080414TM6|TME050503BM4
178
- # UPLOAD_RFCS=KTJ931117P55|AUM9207011CA
179
- # UPLOAD_YEARS=2020|
180
-
181
- # # =============================================================================
182
- # # PERFORMANCE OPTIMIZATION FOR MULTIPLE API REPLICAS
183
- # # =============================================================================
184
-
185
- # # API Connection Configuration
186
- # # Set this to match your number of API replicas (e.g., if you have 10 API instances, set to 10)
187
- # MAX_API_CONNECTIONS=10
188
-
189
- # # API Connection Timeout (milliseconds)
190
- # API_CONNECTION_TIMEOUT=60000
191
-
192
- # # Batch Processing Configuration
193
- # # Files processed concurrently per batch (should be >= MAX_API_CONNECTIONS for best performance)
194
- # BATCH_SIZE=100
195
-
196
- # # Delay between batches (0 for maximum speed)
197
- # BATCH_DELAY=0
198
-
199
- # # Source Processing Concurrency
200
- # # Number of upload sources/folders to process simultaneously
201
- # MAX_CONCURRENT_SOURCES=2
202
-
203
- # # =============================================================================
204
- # # EXAMPLE CONFIGURATIONS FOR DIFFERENT SCENARIOS
205
- # # =============================================================================
206
-
207
- # # For 10 API Replicas (High Performance Setup):
208
- # # MAX_API_CONNECTIONS=10
209
- # # BATCH_SIZE=100
210
- # # MAX_CONCURRENT_SOURCES=3
211
- # # BATCH_DELAY=0
212
-
213
- # # For 5 API Replicas (Medium Performance Setup):
214
- # # MAX_API_CONNECTIONS=5
215
- # # BATCH_SIZE=50
216
- # # MAX_CONCURRENT_SOURCES=2
217
- # # BATCH_DELAY=0
218
-
219
- # # For 1 API Instance (Single Instance Setup):
220
- # # MAX_API_CONNECTIONS=5
221
- # # BATCH_SIZE=20
222
- # # MAX_CONCURRENT_SOURCES=1
223
- # # BATCH_DELAY=100
224
-
225
-
226
- # # =============================================================================
227
- # # WATCH MODE CONFIGURATION
228
- # # =============================================================================
229
-
230
- # # Habilitar watch mode (true/false)
231
- # WATCH_ENABLED=false
232
-
233
- # # Directorios a observar (separados por coma)
234
- # WATCH_DIRECTORIES=/ruta/carpeta1,/ruta/carpeta2
235
-
236
- # # Estrategia de upload (opciones: individual|batch|full-structure)
237
- # # - individual: Sube solo el archivo modificado más reciente
238
- # # - batch: Sube un lote de N archivos recientes
239
- # # - full-structure: Sube la estructura completa de carpetas
240
- # WATCH_STRATEGY=batch
241
-
242
- # # Debouncing en milisegundos (esperar entre eventos antes de procesar)
243
- # WATCH_DEBOUNCE_MS=1000
244
-
245
- # # Tamaño de batch para strategy batch
246
- # WATCH_BATCH_SIZE=10
247
-
248
- # # Usar polling en lugar de eventos nativos del filesystem
249
- # # Útil para sistemas de archivos remotos o NFS
250
- # WATCH_USE_POLLING=false
251
-
252
- # # Interval de polling en milisegundos (solo si WATCH_USE_POLLING=true)
253
- # WATCH_POLL_INTERVAL=100
254
-
255
- # # Umbral de estabilidad en ms (esperar a que el archivo deje de cambiar)
256
- # WATCH_STABILITY_THRESHOLD=300
257
-
258
- # # Patrones a ignorar (separados por coma, se usan como regex)
259
- # WATCH_IGNORE_PATTERNS=.tmp,.bak,*.swp
260
-
261
- # # Detección automática de tipos de documento
262
- # WATCH_AUTO_DETECT=false
263
-
264
- # # Organización automática de archivos
265
- # WATCH_AUTO_ORGANIZE=false
266
-
267
- # # =============================================================================
268
- # # LOGGING AND MONITORING
269
- # # =============================================================================
270
-
271
- # # Progress bar update frequency
272
- # PROGRESS_UPDATE_INTERVAL=10
273
-
274
- # # Enable verbose logging (true/false)
275
- # VERBOSE_LOGGING=false
276
-
277
- # # ============================================
package/.env.palco DELETED
@@ -1,315 +0,0 @@
1
- # ============================================
2
- # ARELA UPLOADER CONFIGURATION
3
- # ============================================
4
-
5
- # Localhost Arela API Configuration
6
- ARELA_API_URL=http://localhost:3010
7
- ARELA_API_TOKEN=555f1d5c1b5020a132002a6fa201e0074e1b057895776bd33619db0cd26b259b
8
-
9
- # Localhost Supabase Configuration
10
- SUPABASE_URL=http://127.0.0.1:54321
11
- SUPABASE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
12
- SUPABASE_BUCKET=arela
13
-
14
- # ARELA_API_TARGET=default
15
-
16
- # Localhost Upload Configuration
17
- UPLOAD_BASE_PATH=O:\expediente\archivos\IACM6102046C9\3429070
18
- UPLOAD_SOURCES=2026
19
- UPLOAD_RFCS=KTJ931117P55|AUM9207011CA
20
- UPLOAD_YEARS=2026
21
-
22
- # =============================================================================
23
- # SCAN CONFIGURATION (for arela scan command)
24
- # =============================================================================
25
-
26
- # Company identifier for this CLI instance (required)
27
- # Use a short, descriptive slug for your company/agency/client
28
- # Examples: "acme_corp", "cliente_123", "agencia_xyz"
29
- ARELA_COMPANY_SLUG=palco
30
-
31
- # Server identifier (required)
32
- # Use a unique ID for each server/NAS where arela-cli is installed
33
- # Examples: "nas01", "server-mx", "storage-01"
34
- ARELA_SERVER_ID=nas
35
-
36
- # Base path label (optional, auto-derived from UPLOAD_BASE_PATH if not set)
37
- # Short label describing the base path being scanned
38
- # Examples: "data", "documents", "archive"
39
- ARELA_BASE_PATH_LABEL=
40
-
41
- # System file patterns to exclude from scan (comma-separated)
42
- # These files will be filtered before uploading stats to reduce payload
43
- SCAN_EXCLUDE_PATTERNS=.DS_Store,Thumbs.db,desktop.ini,__pycache__,.pyc,.tmp,.swp,$RECYCLE.BIN,System Volume Information,~$*
44
-
45
- # Batch size for scan operations (default: 2000 records per API call)
46
- SCAN_BATCH_SIZE=2000
47
-
48
- # Directory depth level for creating separate tables (default: 0)
49
- # 0 = single table for entire base path
50
- # 1 = one table per first-level subdirectory
51
- # 2 = one table per second-level subdirectory, etc.
52
- # Example: with level=1 and base=/data, creates tables for /data/folder1, /data/folder2, etc.
53
- SCAN_DIRECTORY_LEVEL=0
54
-
55
- # =============================================================================
56
- # PUSH CONFIGURATION (for arela push command)
57
- # =============================================================================
58
-
59
- # Filter files to upload by RFC (pipe-separated, optional)
60
- # If not set, all files with arela_path will be uploaded
61
- # Examples: "RFC123456ABC|RFC789012DEF"
62
- PUSH_RFCS=
63
-
64
- # Filter files to upload by year (pipe-separated, optional)
65
- # If not set, all files with arela_path will be uploaded
66
- # Examples: "2023|2024|2025"
67
- PUSH_YEARS=
68
-
69
- # Batch size for fetching files from database (default: 100)
70
- PUSH_BATCH_SIZE=100
71
-
72
- # Concurrent upload batch size (default: 10)
73
- # Number of files to upload simultaneously
74
- PUSH_UPLOAD_BATCH_SIZE=10
75
-
76
- # Storage bucket for uploaded files (optional, defaults to SUPABASE_BUCKET)
77
- # Examples: "archivos", "documents", "storage"
78
- PUSH_BUCKET=record_keeping
79
-
80
-
81
- # =============================================================================
82
- # PERFORMANCE OPTIMIZATION FOR MULTIPLE API REPLICAS
83
- # =============================================================================
84
-
85
- # API Connection Configuration
86
- # Set this to match your number of API replicas (e.g., if you have 10 API instances, set to 10)
87
- MAX_API_CONNECTIONS=10
88
-
89
- # API Connection Timeout (milliseconds)
90
- API_CONNECTION_TIMEOUT=60000
91
-
92
- # Batch Processing Configuration
93
- # Files processed concurrently per batch (should be >= MAX_API_CONNECTIONS for best performance)
94
- BATCH_SIZE=100
95
-
96
- # Delay between batches (0 for maximum speed)
97
- BATCH_DELAY=0
98
-
99
- # Source Processing Concurrency
100
- # Number of upload sources/folders to process simultaneously
101
- MAX_CONCURRENT_SOURCES=2
102
-
103
- # API Retry Configuration
104
- # Maximum number of retry attempts for failed API requests
105
- API_MAX_RETRIES=3
106
-
107
- # Enable exponential backoff for retries (true/false)
108
- # When true, retry delays increase: 1s, 2s, 4s, 8s, 16s
109
- # When false, uses fixed delay (API_RETRY_DELAY)
110
- API_RETRY_EXPONENTIAL_BACKOFF=true
111
-
112
- # Fixed retry delay in milliseconds (only used if exponential backoff is disabled)
113
- API_RETRY_DELAY=1000
114
-
115
- # =============================================================================
116
- # EXAMPLE CONFIGURATIONS FOR DIFFERENT SCENARIOS
117
- # =============================================================================
118
-
119
- # For 10 API Replicas (High Performance Setup):
120
- # MAX_API_CONNECTIONS=10
121
- # BATCH_SIZE=100
122
- # MAX_CONCURRENT_SOURCES=3
123
- # BATCH_DELAY=0
124
-
125
- # For 5 API Replicas (Medium Performance Setup):
126
- # MAX_API_CONNECTIONS=5
127
- # BATCH_SIZE=50
128
- # MAX_CONCURRENT_SOURCES=2
129
- # BATCH_DELAY=0
130
-
131
- # For 1 API Instance (Single Instance Setup):
132
- # MAX_API_CONNECTIONS=5
133
- # BATCH_SIZE=20
134
- # MAX_CONCURRENT_SOURCES=1
135
- # BATCH_DELAY=100
136
-
137
- # =============================================================================
138
- # LOGGING AND MONITORING
139
- # =============================================================================
140
-
141
- # Progress bar update frequency
142
- PROGRESS_UPDATE_INTERVAL=10
143
-
144
- # Enable verbose logging (true/false)
145
- VERBOSE_LOGGING=false
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
- # ============================================
172
-
173
- # # Cloud Service Arela API Configuration
174
- # # ARELA_API_URL=https://api.aws.arela.com.mx
175
- # # ARELA_API_TOKEN=6bd75c5b3699ecf19e6726c10ae88ae0528f0b72d6c10f8b284f92563d3822a7
176
-
177
- # # # Cloud Service Supabase Configuration
178
- # SUPABASE_URL=https://qlospyfsbwvkskivmsgq.supabase.co
179
- # SUPABASE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InFsb3NweWZzYnd2a3NraXZtc2dxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTU5MDg2NjUsImV4cCI6MjA3MTQ4NDY2NX0.BrqcCLxTmpU6Swl7h3gam6TeW4jVf4WssMbRm0sH7l4
180
- # SUPABASE_BUCKET=zips
181
-
182
- # # # Cloud Service Upload Configuration
183
- # UPLOAD_BASE_PATH=./sample
184
- # UPLOAD_SOURCES=zips
185
- # # UPLOAD_RFCS=AKS151005E46|IMS030409FZ0|RDG1107154L7|SHP031226BV2|CSM9301219B4|LIN960124HT8|LME971009SW4|AKM9707151B6|FEL000822AG2|FDM060802J54|MTM9807279B4|AUM9207011CA|MMJ0810145N1|ACC010328EQ6|PED781129JT6|CAD890407NK7|SME140411IK7|JME1903121C2|EIJ110429NF9|PTJ080414TM6|TME050503BM4
186
- # UPLOAD_RFCS=KTJ931117P55|AUM9207011CA
187
- # UPLOAD_YEARS=2023|
188
-
189
- # # =============================================================================
190
- # # PERFORMANCE OPTIMIZATION FOR MULTIPLE API REPLICAS
191
- # # =============================================================================
192
-
193
- # # API Connection Configuration
194
- # # Set this to match your number of API replicas (e.g., if you have 10 API instances, set to 10)
195
- # MAX_API_CONNECTIONS=10
196
-
197
- # # API Connection Timeout (milliseconds)
198
- # API_CONNECTION_TIMEOUT=60000
199
-
200
- # # Batch Processing Configuration
201
- # # Files processed concurrently per batch (should be >= MAX_API_CONNECTIONS for best performance)
202
- # BATCH_SIZE=100
203
-
204
- # # Delay between batches (0 for maximum speed)
205
- # BATCH_DELAY=0
206
-
207
- # # Source Processing Concurrency
208
- # # Number of upload sources/folders to process simultaneously
209
- # MAX_CONCURRENT_SOURCES=2
210
-
211
- # # =============================================================================
212
- # # EXAMPLE CONFIGURATIONS FOR DIFFERENT SCENARIOS
213
- # # =============================================================================
214
-
215
- # # For 10 API Replicas (High Performance Setup):
216
- # # MAX_API_CONNECTIONS=10
217
- # # BATCH_SIZE=100
218
- # # MAX_CONCURRENT_SOURCES=3
219
- # # BATCH_DELAY=0
220
-
221
- # # For 5 API Replicas (Medium Performance Setup):
222
- # # MAX_API_CONNECTIONS=5
223
- # # BATCH_SIZE=50
224
- # # MAX_CONCURRENT_SOURCES=2
225
- # # BATCH_DELAY=0
226
-
227
- # # For 1 API Instance (Single Instance Setup):
228
- # # MAX_API_CONNECTIONS=5
229
- # # BATCH_SIZE=20
230
- # # MAX_CONCURRENT_SOURCES=1
231
- # # BATCH_DELAY=100
232
-
233
- # # =============================================================================
234
- # # LOGGING AND MONITORING
235
- # # =============================================================================
236
-
237
- # # Progress bar update frequency
238
- # PROGRESS_UPDATE_INTERVAL=10
239
-
240
- # # Enable verbose logging (true/false)
241
- # VERBOSE_LOGGING=false
242
-
243
- # # ============================================
244
-
245
-
246
-
247
- # =============================================================================
248
- # WATCH MODE CONFIGURATION
249
- # =============================================================================
250
-
251
- # Habilitar watch mode (true/false)
252
- WATCH_ENABLED=true
253
-
254
- # Configuración de directorios a observar (formato JSON)
255
- # Cada directorio puede tener su propia folderStructure para organizar en el bucket
256
- # Formato: {"ruta/directorio1":"estructura-1","ruta/directorio2":"estructura-2"}
257
- WATCH_DIRECTORY_CONFIGS={"./sample/watcher":"prueba-watcher"}
258
-
259
- # Estrategia de upload (opciones: individual|batch|full-structure)
260
- # - individual: Sube solo el archivo modificado más reciente
261
- # - batch: Sube un lote de N archivos recientes
262
- # - full-structure: Sube la estructura completa de carpetas
263
- WATCH_STRATEGY=batch
264
-
265
- # Debouncing en milisegundos (esperar entre eventos antes de procesar)
266
- WATCH_DEBOUNCE_MS=1000
267
-
268
- # Tamaño de batch para strategy batch
269
- WATCH_BATCH_SIZE=10
270
-
271
- # Usar polling en lugar de eventos nativos del filesystem
272
- # Útil para sistemas de archivos remotos o NFS
273
- WATCH_USE_POLLING=false
274
-
275
- # Interval de polling en milisegundos (solo si WATCH_USE_POLLING=true)
276
- WATCH_POLL_INTERVAL=100
277
-
278
- # Umbral de estabilidad en ms (esperar a que el archivo deje de cambiar)
279
- WATCH_STABILITY_THRESHOLD=300
280
-
281
- # Patrones a ignorar (separados por coma, se usan como regex)
282
- WATCH_IGNORE_PATTERNS=.tmp,.bak,*.swp
283
-
284
- # Detección automática de tipos de documento
285
- WATCH_AUTO_DETECT=true
286
-
287
- # Organización automática de archivos
288
- WATCH_AUTO_ORGANIZE=true
289
-
290
- # =============================================================================
291
- # WATCH MODE - AUTOMATIC PROCESSING PIPELINE
292
- # =============================================================================
293
- #
294
- # El pipeline automático ejecuta la siguiente secuencia cuando se detecta un archivo nuevo:
295
- # 1. Stats Collection → stats --stats-only (recopila información del archivo)
296
- # 2. PDF Detection → detect --detect-pdfs (identifica pedimentos simplificados)
297
- # 3. Path Propagation → detect --propagate-arela-path (propaga a documentos relacionados)
298
- # 4. RFC Upload → upload --upload-by-rfc --folder-structure (sube con estructura)
299
- #
300
- # El pipeline se habilita automáticamente en watch mode y usa la folderStructure
301
- # definida para cada WATCH_DIRECTORY_CONFIGS
302
- #
303
- # Para deshabilitar en CLI, usa: arela watch --no-auto-processing
304
-
305
- # =============================================================================
306
- # LOGGING AND MONITORING
307
- # =============================================================================
308
-
309
- # Progress bar update frequency
310
- PROGRESS_UPDATE_INTERVAL=10
311
-
312
- # Enable verbose logging (true/false)
313
- VERBOSE_LOGGING=false
314
-
315
- # ============================================