sigo-package 1.2.5 → 1.2.7
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/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +43 -3
- package/dist/index.mjs +48 -3
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -452,4 +452,6 @@ declare function getDateInTimeZone(timeZone: TimeZone): Date;
|
|
|
452
452
|
|
|
453
453
|
declare function generateUniqueNumber(): number;
|
|
454
454
|
|
|
455
|
-
|
|
455
|
+
declare function setContext(this: any, path: string): void;
|
|
456
|
+
|
|
457
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, GetCodigoFechaActual, type IDocumentacion, type IMO, type IMaterial, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$1 as MatStockPersonalType, type MatUtilizadosType$1 as MatUtilizadosType, type MoUoType$1 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, SEGMENT_TY, type TARGET, UpdateNodosDocDP, codBalizaAL04, codClientes, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, convertDates, dataFlujosHomePass, esCadenaFechaISOValida, esObjetoFecha, generateUniqueNumber, getChannelName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, validateNoLookup };
|
package/dist/index.d.ts
CHANGED
|
@@ -452,4 +452,6 @@ declare function getDateInTimeZone(timeZone: TimeZone): Date;
|
|
|
452
452
|
|
|
453
453
|
declare function generateUniqueNumber(): number;
|
|
454
454
|
|
|
455
|
-
|
|
455
|
+
declare function setContext(this: any, path: string): void;
|
|
456
|
+
|
|
457
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, GetCodigoFechaActual, type IDocumentacion, type IMO, type IMaterial, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$1 as MatStockPersonalType, type MatUtilizadosType$1 as MatUtilizadosType, type MoUoType$1 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, SEGMENT_TY, type TARGET, UpdateNodosDocDP, codBalizaAL04, codClientes, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, convertDates, dataFlujosHomePass, esCadenaFechaISOValida, esObjetoFecha, generateUniqueNumber, getChannelName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, validateNoLookup };
|
package/dist/index.js
CHANGED
|
@@ -98,6 +98,7 @@ __export(index_exports, {
|
|
|
98
98
|
obtenerTipoYCodigoMO: () => obtenerTipoYCodigoMO,
|
|
99
99
|
paisMap: () => paisMap,
|
|
100
100
|
searchCurrentContractorSpecialtyPrice: () => searchCurrentContractorSpecialtyPrice,
|
|
101
|
+
setContext: () => setContext,
|
|
101
102
|
updatePriceContractorMOAL02: () => updatePriceContractorMOAL02,
|
|
102
103
|
updatePriceContractorMOAL04: () => updatePriceContractorMOAL04,
|
|
103
104
|
updatePriceMOAL02: () => updatePriceMOAL02,
|
|
@@ -5003,7 +5004,10 @@ var codMOTroncal_ReglaLiquidacion1 = [
|
|
|
5003
5004
|
"T11",
|
|
5004
5005
|
//#endregion Cambios solicitados por arturo 04-02-2025
|
|
5005
5006
|
//#region Cambios solicitados por arturo 09-05-2025 Ticket (66841)
|
|
5006
|
-
"T47"
|
|
5007
|
+
"T47",
|
|
5008
|
+
//#endregion Cambios solicitados por arturo 09-05-2025 Ticket (66841)
|
|
5009
|
+
//#region Cambios solicitados por arturo 22-05-2025 Ticket (67488)
|
|
5010
|
+
"010602500"
|
|
5007
5011
|
];
|
|
5008
5012
|
var codMOClientes_ReglaLiquidacion1 = [
|
|
5009
5013
|
// '010602400',
|
|
@@ -5335,7 +5339,7 @@ function updatePriceContractorMOAL02(valorizaciones, priceContractorMO) {
|
|
|
5335
5339
|
const { TipoMO, CodigoMO } = obtenerTipoYCodigoMO(valorizacion.DetalleChile.ManoObra.Codigo);
|
|
5336
5340
|
const precio = obtenerPrecioManoObraAL02(CodigoMO, TipoMO, priceContractorMO);
|
|
5337
5341
|
valorizacion.PrecioContrata = precio;
|
|
5338
|
-
valorizacion.TotalContrata = valorizacion.PrecioContrata * valorizacion.Cantidad;
|
|
5342
|
+
valorizacion.TotalContrata = valorizacion.PrecioContrata * valorizacion.Cantidad * valorizacion.DetalleChile.PuntoBaremo;
|
|
5339
5343
|
}
|
|
5340
5344
|
}
|
|
5341
5345
|
__name(updatePriceContractorMOAL02, "updatePriceContractorMOAL02");
|
|
@@ -5381,7 +5385,7 @@ function updatePriceContractorMOAL04(valorizaciones, priceContractorMO) {
|
|
|
5381
5385
|
const { TipoMO, CodigoMO } = obtenerTipoYCodigoMO(valorizacion.DetalleChile.ManoObra.Codigo);
|
|
5382
5386
|
const precio = obtenerPrecioManoObraAL04(CodigoMO, TipoMO, priceContractorMO);
|
|
5383
5387
|
valorizacion.PrecioContrata = precio;
|
|
5384
|
-
valorizacion.TotalContrata = valorizacion.PrecioContrata * valorizacion.Cantidad;
|
|
5388
|
+
valorizacion.TotalContrata = valorizacion.PrecioContrata * valorizacion.Cantidad * valorizacion.DetalleChile.PuntoBaremo;
|
|
5385
5389
|
}
|
|
5386
5390
|
}
|
|
5387
5391
|
__name(updatePriceContractorMOAL04, "updatePriceContractorMOAL04");
|
|
@@ -5851,6 +5855,41 @@ function generateUniqueNumber() {
|
|
|
5851
5855
|
}
|
|
5852
5856
|
__name(generateUniqueNumber, "generateUniqueNumber");
|
|
5853
5857
|
|
|
5858
|
+
// src/shared/Utils/getDataType.ts
|
|
5859
|
+
var getDataType = /* @__PURE__ */ __name((value) => {
|
|
5860
|
+
if (String(value).includes("function")) return "function";
|
|
5861
|
+
if (String(value).includes("class")) return "class";
|
|
5862
|
+
return null;
|
|
5863
|
+
}, "getDataType");
|
|
5864
|
+
|
|
5865
|
+
// src/shared/Utils/isColModel.ts
|
|
5866
|
+
var isColModel = /* @__PURE__ */ __name((value) => getDataType(value) === "function" && value.name.toLowerCase().includes("colmodel"), "isColModel");
|
|
5867
|
+
|
|
5868
|
+
// src/shared/Utils/setContext.ts
|
|
5869
|
+
function setContext(path) {
|
|
5870
|
+
const modules = require.context(path, true, /\.js$/);
|
|
5871
|
+
const routes = modules.keys().filter((item) => item.startsWith("./"));
|
|
5872
|
+
const buildx = routes.reduce((result, path2) => {
|
|
5873
|
+
const file = modules(path2);
|
|
5874
|
+
if (Object.entries(file).length) {
|
|
5875
|
+
const [_key, value] = Object.entries(file)[0];
|
|
5876
|
+
const type = getDataType(value);
|
|
5877
|
+
if (type === "function") Object.assign(result.functions, file);
|
|
5878
|
+
if (type === "class") Object.assign(result.clases, file);
|
|
5879
|
+
}
|
|
5880
|
+
return result;
|
|
5881
|
+
}, {
|
|
5882
|
+
functions: {},
|
|
5883
|
+
clases: {}
|
|
5884
|
+
});
|
|
5885
|
+
Object.entries(buildx.functions).forEach(([key, funct]) => {
|
|
5886
|
+
const colModel = isColModel(funct);
|
|
5887
|
+
if (colModel) this[key] = funct.call(this);
|
|
5888
|
+
else this[key] = funct.bind(this);
|
|
5889
|
+
});
|
|
5890
|
+
}
|
|
5891
|
+
__name(setContext, "setContext");
|
|
5892
|
+
|
|
5854
5893
|
// src/Programados/Procesos/Preliquidar/ObtenerPrecioContratistaVigente.ts
|
|
5855
5894
|
function ObtenerPrecioContratistaVigente({ actividad, FechaVerificar }) {
|
|
5856
5895
|
const fechaVerificar = new Date(FechaVerificar);
|
|
@@ -5978,6 +6017,7 @@ __name(searchCurrentContractorSpecialtyPrice, "searchCurrentContractorSpecialtyP
|
|
|
5978
6017
|
obtenerTipoYCodigoMO,
|
|
5979
6018
|
paisMap,
|
|
5980
6019
|
searchCurrentContractorSpecialtyPrice,
|
|
6020
|
+
setContext,
|
|
5981
6021
|
updatePriceContractorMOAL02,
|
|
5982
6022
|
updatePriceContractorMOAL04,
|
|
5983
6023
|
updatePriceMOAL02,
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
5
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
6
|
+
}) : x)(function(x) {
|
|
7
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
8
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
9
|
+
});
|
|
4
10
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
11
|
|
|
6
12
|
// src/Programados/ActualizarDataManoObra.ts
|
|
@@ -4900,7 +4906,10 @@ var codMOTroncal_ReglaLiquidacion1 = [
|
|
|
4900
4906
|
"T11",
|
|
4901
4907
|
//#endregion Cambios solicitados por arturo 04-02-2025
|
|
4902
4908
|
//#region Cambios solicitados por arturo 09-05-2025 Ticket (66841)
|
|
4903
|
-
"T47"
|
|
4909
|
+
"T47",
|
|
4910
|
+
//#endregion Cambios solicitados por arturo 09-05-2025 Ticket (66841)
|
|
4911
|
+
//#region Cambios solicitados por arturo 22-05-2025 Ticket (67488)
|
|
4912
|
+
"010602500"
|
|
4904
4913
|
];
|
|
4905
4914
|
var codMOClientes_ReglaLiquidacion1 = [
|
|
4906
4915
|
// '010602400',
|
|
@@ -5232,7 +5241,7 @@ function updatePriceContractorMOAL02(valorizaciones, priceContractorMO) {
|
|
|
5232
5241
|
const { TipoMO, CodigoMO } = obtenerTipoYCodigoMO(valorizacion.DetalleChile.ManoObra.Codigo);
|
|
5233
5242
|
const precio = obtenerPrecioManoObraAL02(CodigoMO, TipoMO, priceContractorMO);
|
|
5234
5243
|
valorizacion.PrecioContrata = precio;
|
|
5235
|
-
valorizacion.TotalContrata = valorizacion.PrecioContrata * valorizacion.Cantidad;
|
|
5244
|
+
valorizacion.TotalContrata = valorizacion.PrecioContrata * valorizacion.Cantidad * valorizacion.DetalleChile.PuntoBaremo;
|
|
5236
5245
|
}
|
|
5237
5246
|
}
|
|
5238
5247
|
__name(updatePriceContractorMOAL02, "updatePriceContractorMOAL02");
|
|
@@ -5278,7 +5287,7 @@ function updatePriceContractorMOAL04(valorizaciones, priceContractorMO) {
|
|
|
5278
5287
|
const { TipoMO, CodigoMO } = obtenerTipoYCodigoMO(valorizacion.DetalleChile.ManoObra.Codigo);
|
|
5279
5288
|
const precio = obtenerPrecioManoObraAL04(CodigoMO, TipoMO, priceContractorMO);
|
|
5280
5289
|
valorizacion.PrecioContrata = precio;
|
|
5281
|
-
valorizacion.TotalContrata = valorizacion.PrecioContrata * valorizacion.Cantidad;
|
|
5290
|
+
valorizacion.TotalContrata = valorizacion.PrecioContrata * valorizacion.Cantidad * valorizacion.DetalleChile.PuntoBaremo;
|
|
5282
5291
|
}
|
|
5283
5292
|
}
|
|
5284
5293
|
__name(updatePriceContractorMOAL04, "updatePriceContractorMOAL04");
|
|
@@ -5748,6 +5757,41 @@ function generateUniqueNumber() {
|
|
|
5748
5757
|
}
|
|
5749
5758
|
__name(generateUniqueNumber, "generateUniqueNumber");
|
|
5750
5759
|
|
|
5760
|
+
// src/shared/Utils/getDataType.ts
|
|
5761
|
+
var getDataType = /* @__PURE__ */ __name((value) => {
|
|
5762
|
+
if (String(value).includes("function")) return "function";
|
|
5763
|
+
if (String(value).includes("class")) return "class";
|
|
5764
|
+
return null;
|
|
5765
|
+
}, "getDataType");
|
|
5766
|
+
|
|
5767
|
+
// src/shared/Utils/isColModel.ts
|
|
5768
|
+
var isColModel = /* @__PURE__ */ __name((value) => getDataType(value) === "function" && value.name.toLowerCase().includes("colmodel"), "isColModel");
|
|
5769
|
+
|
|
5770
|
+
// src/shared/Utils/setContext.ts
|
|
5771
|
+
function setContext(path) {
|
|
5772
|
+
const modules = __require.context(path, true, /\.js$/);
|
|
5773
|
+
const routes = modules.keys().filter((item) => item.startsWith("./"));
|
|
5774
|
+
const buildx = routes.reduce((result, path2) => {
|
|
5775
|
+
const file = modules(path2);
|
|
5776
|
+
if (Object.entries(file).length) {
|
|
5777
|
+
const [_key, value] = Object.entries(file)[0];
|
|
5778
|
+
const type = getDataType(value);
|
|
5779
|
+
if (type === "function") Object.assign(result.functions, file);
|
|
5780
|
+
if (type === "class") Object.assign(result.clases, file);
|
|
5781
|
+
}
|
|
5782
|
+
return result;
|
|
5783
|
+
}, {
|
|
5784
|
+
functions: {},
|
|
5785
|
+
clases: {}
|
|
5786
|
+
});
|
|
5787
|
+
Object.entries(buildx.functions).forEach(([key, funct]) => {
|
|
5788
|
+
const colModel = isColModel(funct);
|
|
5789
|
+
if (colModel) this[key] = funct.call(this);
|
|
5790
|
+
else this[key] = funct.bind(this);
|
|
5791
|
+
});
|
|
5792
|
+
}
|
|
5793
|
+
__name(setContext, "setContext");
|
|
5794
|
+
|
|
5751
5795
|
// src/Programados/Procesos/Preliquidar/ObtenerPrecioContratistaVigente.ts
|
|
5752
5796
|
function ObtenerPrecioContratistaVigente({ actividad, FechaVerificar }) {
|
|
5753
5797
|
const fechaVerificar = new Date(FechaVerificar);
|
|
@@ -5874,6 +5918,7 @@ export {
|
|
|
5874
5918
|
obtenerTipoYCodigoMO,
|
|
5875
5919
|
paisMap,
|
|
5876
5920
|
searchCurrentContractorSpecialtyPrice,
|
|
5921
|
+
setContext,
|
|
5877
5922
|
updatePriceContractorMOAL02,
|
|
5878
5923
|
updatePriceContractorMOAL04,
|
|
5879
5924
|
updatePriceMOAL02,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sigo-package",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"description": "Funciones compartidas sigo",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@swc/core": "^1.11.22",
|
|
17
17
|
"@types/express": "^5.0.1",
|
|
18
|
+
"@types/webpack-env": "^1.18.8",
|
|
18
19
|
"tsc-alias": "^1.8.15",
|
|
19
20
|
"tsup": "^8.4.0",
|
|
20
21
|
"typescript": "^5.7.3"
|