@murumets-ee/imports 0.107.0 → 0.108.0
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/analyze/index.d.mts +1 -1
- package/dist/{carmaker-feed-_QVQFLUl.d.mts → carmaker-feed-CWrZLYUt.d.mts} +7 -7
- package/dist/{carmaker-feed-_QVQFLUl.d.mts.map → carmaker-feed-CWrZLYUt.d.mts.map} +1 -1
- package/dist/{engine-DiM4r2Vj.d.mts → engine-tkbUXKxB.d.mts} +27 -27
- package/dist/{engine-DiM4r2Vj.d.mts.map → engine-tkbUXKxB.d.mts.map} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/mapping/index.d.mts +2 -2
- package/dist/{parts-schema-DOWhBJYh.d.mts → parts-schema-M1AtjNJt.d.mts} +6 -6
- package/dist/{parts-schema-DOWhBJYh.d.mts.map → parts-schema-M1AtjNJt.d.mts.map} +1 -1
- package/dist/plugin.d.mts +1 -1
- package/dist/storage-resolver.d.mts +1 -1
- package/dist/transforms.d.mts +1 -1
- package/dist/{worker-_MlRH5hd.d.mts → worker-CRH_PjKO.d.mts} +7 -7
- package/dist/{worker-_MlRH5hd.d.mts.map → worker-CRH_PjKO.d.mts.map} +1 -1
- package/dist/worker.d.mts +1 -1
- package/package.json +8 -8
package/dist/analyze/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as RowTransform } from "./transform-WeiiLdYP.mjs";
|
|
2
|
-
import { n as MappingConfig } from "./engine-
|
|
3
|
-
import { t as PartsParams } from "./parts-schema-
|
|
2
|
+
import { n as MappingConfig } from "./engine-tkbUXKxB.mjs";
|
|
3
|
+
import { t as PartsParams } from "./parts-schema-M1AtjNJt.mjs";
|
|
4
4
|
import { PartsDocument } from "@murumets-ee/search-elasticsearch";
|
|
5
5
|
|
|
6
6
|
//#region src/transforms/carmaker-feed.d.ts
|
|
@@ -20,18 +20,18 @@ declare const carmakerFeedParamsSchema: import("zod").ZodObject<{
|
|
|
20
20
|
supplierCodePrefix: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
21
|
discountGroups: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodNumber>>;
|
|
22
22
|
}, "strip", import("zod").ZodTypeAny, {
|
|
23
|
-
supplierId: string;
|
|
24
|
-
brandId: string;
|
|
25
23
|
brandSlug: string;
|
|
26
24
|
supplierDisplayName: string;
|
|
25
|
+
brandId: string;
|
|
26
|
+
supplierId: string;
|
|
27
27
|
importBatchId: string;
|
|
28
28
|
supplierCodePrefix?: string | undefined;
|
|
29
29
|
discountGroups?: Record<string, number> | undefined;
|
|
30
30
|
}, {
|
|
31
|
-
supplierId: string;
|
|
32
|
-
brandId: string;
|
|
33
31
|
brandSlug: string;
|
|
34
32
|
supplierDisplayName: string;
|
|
33
|
+
brandId: string;
|
|
34
|
+
supplierId: string;
|
|
35
35
|
importBatchId: string;
|
|
36
36
|
supplierCodePrefix?: string | undefined;
|
|
37
37
|
discountGroups?: Record<string, number> | undefined;
|
|
@@ -56,4 +56,4 @@ declare const CARMAKER_MAPPING: MappingConfig;
|
|
|
56
56
|
declare const carmakerFeedTransform: RowTransform<PartsDocument>;
|
|
57
57
|
//#endregion
|
|
58
58
|
export { carmakerFeedTransform as a, carmakerFeedParamsSchema as i, CARMAKER_MAPPING as n, CarmakerFeedParams as r, CARMAKER_FEED_TRANSFORM_NAME as t };
|
|
59
|
-
//# sourceMappingURL=carmaker-feed-
|
|
59
|
+
//# sourceMappingURL=carmaker-feed-CWrZLYUt.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carmaker-feed-
|
|
1
|
+
{"version":3,"file":"carmaker-feed-CWrZLYUt.d.mts","names":[],"sources":["../src/transforms/carmaker-feed.ts"],"mappings":";;;;;;;cAgDa,4BAAA;;;;;;cAOA,wBAAA,gBAAwB,SAAA;;;;;;;;;;;;;;;mBAAoB,MAAA;AAAA;;;;;;;mBAAA,MAAA;AAAA;AAAA,KAC7C,kBAAA,GAAqB,WAAW;;;;;;;;;;;;cAa/B,gBAAA,EAAkB,aAoB9B;;;;;cAMY,qBAAA,EAAuB,YAAY,CAAC,aAAA"}
|
|
@@ -313,7 +313,6 @@ declare const mappingColumnSchema: z.ZodObject<{
|
|
|
313
313
|
op: "europeanNumber";
|
|
314
314
|
}>]>, "many">>;
|
|
315
315
|
}, "strip", z.ZodTypeAny, {
|
|
316
|
-
source: string;
|
|
317
316
|
target: string;
|
|
318
317
|
transforms: ({
|
|
319
318
|
op: "trim";
|
|
@@ -335,9 +334,10 @@ declare const mappingColumnSchema: z.ZodObject<{
|
|
|
335
334
|
} | {
|
|
336
335
|
op: "europeanNumber";
|
|
337
336
|
})[];
|
|
338
|
-
}, {
|
|
339
337
|
source: string;
|
|
338
|
+
}, {
|
|
340
339
|
target: string;
|
|
340
|
+
source: string;
|
|
341
341
|
transforms?: ({
|
|
342
342
|
op: "trim";
|
|
343
343
|
} | {
|
|
@@ -372,17 +372,17 @@ declare const numberFormatSchema: z.ZodEffects<z.ZodObject<{
|
|
|
372
372
|
decimal: z.ZodEnum<[".", ","]>;
|
|
373
373
|
thousands: z.ZodEnum<["", ".", ",", " "]>;
|
|
374
374
|
}, "strip", z.ZodTypeAny, {
|
|
375
|
-
decimal: "
|
|
376
|
-
thousands: "" | "
|
|
375
|
+
decimal: "," | ".";
|
|
376
|
+
thousands: "" | "," | "." | " ";
|
|
377
377
|
}, {
|
|
378
|
-
decimal: "
|
|
379
|
-
thousands: "" | "
|
|
378
|
+
decimal: "," | ".";
|
|
379
|
+
thousands: "" | "," | "." | " ";
|
|
380
380
|
}>, {
|
|
381
|
-
decimal: "
|
|
382
|
-
thousands: "" | "
|
|
381
|
+
decimal: "," | ".";
|
|
382
|
+
thousands: "" | "," | "." | " ";
|
|
383
383
|
}, {
|
|
384
|
-
decimal: "
|
|
385
|
-
thousands: "" | "
|
|
384
|
+
decimal: "," | ".";
|
|
385
|
+
thousands: "" | "," | "." | " ";
|
|
386
386
|
}>;
|
|
387
387
|
/**
|
|
388
388
|
* The portable mapping config — the subset of an `import_mapping` row the engine
|
|
@@ -396,17 +396,17 @@ declare const mappingConfigSchema: z.ZodObject<{
|
|
|
396
396
|
decimal: z.ZodEnum<[".", ","]>;
|
|
397
397
|
thousands: z.ZodEnum<["", ".", ",", " "]>;
|
|
398
398
|
}, "strip", z.ZodTypeAny, {
|
|
399
|
-
decimal: "
|
|
400
|
-
thousands: "" | "
|
|
399
|
+
decimal: "," | ".";
|
|
400
|
+
thousands: "" | "," | "." | " ";
|
|
401
401
|
}, {
|
|
402
|
-
decimal: "
|
|
403
|
-
thousands: "" | "
|
|
402
|
+
decimal: "," | ".";
|
|
403
|
+
thousands: "" | "," | "." | " ";
|
|
404
404
|
}>, {
|
|
405
|
-
decimal: "
|
|
406
|
-
thousands: "" | "
|
|
405
|
+
decimal: "," | ".";
|
|
406
|
+
thousands: "" | "," | "." | " ";
|
|
407
407
|
}, {
|
|
408
|
-
decimal: "
|
|
409
|
-
thousands: "" | "
|
|
408
|
+
decimal: "," | ".";
|
|
409
|
+
thousands: "" | "," | "." | " ";
|
|
410
410
|
}>;
|
|
411
411
|
columnMap: z.ZodArray<z.ZodObject<{
|
|
412
412
|
/** Source header name (or positional index string for headerless feeds). */source: z.ZodString; /** Target field key — must be in the chosen schema's whitelist (enforced in `buildMappingTransform`). */
|
|
@@ -470,7 +470,6 @@ declare const mappingConfigSchema: z.ZodObject<{
|
|
|
470
470
|
op: "europeanNumber";
|
|
471
471
|
}>]>, "many">>;
|
|
472
472
|
}, "strip", z.ZodTypeAny, {
|
|
473
|
-
source: string;
|
|
474
473
|
target: string;
|
|
475
474
|
transforms: ({
|
|
476
475
|
op: "trim";
|
|
@@ -492,9 +491,10 @@ declare const mappingConfigSchema: z.ZodObject<{
|
|
|
492
491
|
} | {
|
|
493
492
|
op: "europeanNumber";
|
|
494
493
|
})[];
|
|
495
|
-
}, {
|
|
496
494
|
source: string;
|
|
495
|
+
}, {
|
|
497
496
|
target: string;
|
|
497
|
+
source: string;
|
|
498
498
|
transforms?: ({
|
|
499
499
|
op: "trim";
|
|
500
500
|
} | {
|
|
@@ -519,11 +519,10 @@ declare const mappingConfigSchema: z.ZodObject<{
|
|
|
519
519
|
}, "strip", z.ZodTypeAny, {
|
|
520
520
|
targetSchema: string;
|
|
521
521
|
numberFormat: {
|
|
522
|
-
decimal: "
|
|
523
|
-
thousands: "" | "
|
|
522
|
+
decimal: "," | ".";
|
|
523
|
+
thousands: "" | "," | "." | " ";
|
|
524
524
|
};
|
|
525
525
|
columnMap: {
|
|
526
|
-
source: string;
|
|
527
526
|
target: string;
|
|
528
527
|
transforms: ({
|
|
529
528
|
op: "trim";
|
|
@@ -545,16 +544,17 @@ declare const mappingConfigSchema: z.ZodObject<{
|
|
|
545
544
|
} | {
|
|
546
545
|
op: "europeanNumber";
|
|
547
546
|
})[];
|
|
547
|
+
source: string;
|
|
548
548
|
}[];
|
|
549
549
|
}, {
|
|
550
550
|
targetSchema: string;
|
|
551
551
|
numberFormat: {
|
|
552
|
-
decimal: "
|
|
553
|
-
thousands: "" | "
|
|
552
|
+
decimal: "," | ".";
|
|
553
|
+
thousands: "" | "," | "." | " ";
|
|
554
554
|
};
|
|
555
555
|
columnMap: {
|
|
556
|
-
source: string;
|
|
557
556
|
target: string;
|
|
557
|
+
source: string;
|
|
558
558
|
transforms?: ({
|
|
559
559
|
op: "trim";
|
|
560
560
|
} | {
|
|
@@ -606,4 +606,4 @@ interface ResolvableMapping {
|
|
|
606
606
|
declare function resolveMapping<M extends ResolvableMapping>(mappings: readonly M[], brandId: string | null): M | undefined;
|
|
607
607
|
//#endregion
|
|
608
608
|
export { columnTransformSchema as C, toMinorUnits as D, parseNumber as E, applyColumnTransforms as S, parseEuropeanNumber as T, COLUMN_TRANSFORM_OPS as _, mappingColumnSchema as a, ColumnTransformOp as b, resolveMapping as c, NumberOutcome as d, TargetField as f, textOrNull as g, rowError as h, buildMappingTransform as i, BuildRowContext as l, numberCell as m, MappingConfig as n, mappingConfigSchema as o, TargetSchema as p, ResolvableMapping as r, numberFormatSchema as s, MappingColumn as t, MappedRow as u, CellValue as v, NumberFormat as w, ColumnTransformOpDescriptor as x, ColumnTransform as y };
|
|
609
|
-
//# sourceMappingURL=engine-
|
|
609
|
+
//# sourceMappingURL=engine-tkbUXKxB.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-
|
|
1
|
+
{"version":3,"file":"engine-tkbUXKxB.d.mts","names":[],"sources":["../src/mapping/number-format.ts","../src/mapping/column-transforms.ts","../src/mapping/target-schema.ts","../src/mapping/engine.ts"],"mappings":";;;;;;;;AAqBA;;;;AAIW;AAsBX;;;;;;;;AAA6D;AA+B7D;;UAzDiB,YAAA;EAyDyB;EAvDxC,OAAA;EAiFc;EA/Ed,SAAS;AAAA;;AA+EkC;;;;AC9E7C;;;;;;;;;;;iBDqBgB,WAAA,CAAY,GAAA,UAAa,MAAA,EAAQ,YAAY;;;;;;;;iBA+B7C,YAAA,CAAa,KAAa;;;;;;;;;;;;;;;;;;;;;;;iBA0B1B,mBAAA,CAAoB,CAAS;;;;AAzDgB;AA+B7D;;;cCpDa,qBAAA,EAAqB,CAAA,CAAA,qBAAA,QAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAYtB,eAAA,GAAkB,CAAA,CAAE,KAAK,QAAQ,qBAAA;;KAGjC,iBAAA,GAAoB,eAAe;;UAG9B,2BAAA;EACf,EAAA,EAAI,iBAAiB;EACrB,KAAA;;EAEA,QAAA;AAAA;;;;;;cAQW,oBAAA,WAA+B,2BAA2B;;KAY3D,SAAA;;;;;;;;iBASI,qBAAA,CACd,GAAA,UACA,UAAA,WAAqB,eAAA,IACrB,MAAA,EAAQ,YAAA,GACP,SAAA;;;;UC/Dc,WAAA;EF6B4C;EE3B3D,GAAA;EF0D0B;EExD1B,K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T,aAAA,GAAgB,CAAA,CAAE,KAAK,QAAQ,mBAAA;;;;;;;;;;;;;iBAc3B,qBAAA,MAAA,CACd,MAAA,EAAQ,aAAA,EACR,MAAA,EAAQ,YAAA,CAAa,IAAA,IACpB,YAAA,CAAa,IAAA;;UA+BC,iBAAA;;EAEf,OAAA;EACA,MAAM;AAAA;;;;;;;iBASQ,cAAA,WAAyB,iBAAA,CAAA,CACvC,QAAA,WAAmB,CAAA,IACnB,OAAA,kBACC,CAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as RowWarning, c as TransformRegistry, i as RowTransform, l as getTransformRegistry, n as RowError, o as TransformContext, r as RowResult, s as TransformName, t as DirectionalPair, u as registerImportTransform } from "./transform-WeiiLdYP.mjs";
|
|
2
|
-
import { a as mappingColumnSchema, n as MappingConfig, o as mappingConfigSchema, t as MappingColumn } from "./engine-
|
|
3
|
-
import { A as ErrorSample, B as StreamFeedOptions, C as PriceStats, D as DEFAULT_MAX_PATTERNS, E as parsePriceStats, F as FeedReaderConfig, G as ImportRun, H as countDataRows, I as ReadFeedOptions, K as ImportRunClient, L as feedReaderConfigSchema, M as ErrorTrackerConfig, N as ErrorTrackerSnapshot, O as DEFAULT_MAX_SAMPLES_PER_PATTERN, P as mergeErrorTrackerSnapshots, R as readFeed, S as PriceAnomaly, T as detectPriceAnomaly, U as streamFeed, V as StreamFeedRow, W as IMPORT_RUN_STATUSES, _ as RunImportResult, b as PRICE_ANOMALY_THRESHOLD_MULTIPLIER, c as PairSinkContext, g as RunImportOptions, h as ImportRunProgress, j as ErrorTracker, k as ErrorPattern, m as DEFAULT_BATCH_SIZE, n as EsClientResolver, q as ImportRunStatus, r as FilePathResolver, s as PairSink, t as EnsureIndexResolver, v as runImport, w as PriceStatsCollector, x as PRICE_SAMPLE_CAP, y as EMPTY_PRICE_STATS, z as readPersistedFeedConfig } from "./worker-
|
|
4
|
-
import { n as CARMAKER_MAPPING } from "./carmaker-feed-
|
|
2
|
+
import { a as mappingColumnSchema, n as MappingConfig, o as mappingConfigSchema, t as MappingColumn } from "./engine-tkbUXKxB.mjs";
|
|
3
|
+
import { A as ErrorSample, B as StreamFeedOptions, C as PriceStats, D as DEFAULT_MAX_PATTERNS, E as parsePriceStats, F as FeedReaderConfig, G as ImportRun, H as countDataRows, I as ReadFeedOptions, K as ImportRunClient, L as feedReaderConfigSchema, M as ErrorTrackerConfig, N as ErrorTrackerSnapshot, O as DEFAULT_MAX_SAMPLES_PER_PATTERN, P as mergeErrorTrackerSnapshots, R as readFeed, S as PriceAnomaly, T as detectPriceAnomaly, U as streamFeed, V as StreamFeedRow, W as IMPORT_RUN_STATUSES, _ as RunImportResult, b as PRICE_ANOMALY_THRESHOLD_MULTIPLIER, c as PairSinkContext, g as RunImportOptions, h as ImportRunProgress, j as ErrorTracker, k as ErrorPattern, m as DEFAULT_BATCH_SIZE, n as EsClientResolver, q as ImportRunStatus, r as FilePathResolver, s as PairSink, t as EnsureIndexResolver, v as runImport, w as PriceStatsCollector, x as PRICE_SAMPLE_CAP, y as EMPTY_PRICE_STATS, z as readPersistedFeedConfig } from "./worker-CRH_PjKO.mjs";
|
|
4
|
+
import { n as CARMAKER_MAPPING } from "./carmaker-feed-CWrZLYUt.mjs";
|
|
5
5
|
import { ToolkitApp } from "@murumets-ee/core";
|
|
6
6
|
import { Behavior } from "@murumets-ee/entity";
|
|
7
7
|
import { Logger as Logger$1 } from "@murumets-ee/logging";
|
package/dist/mapping/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as RowTransform } from "../transform-WeiiLdYP.mjs";
|
|
2
|
-
import { C as columnTransformSchema, D as toMinorUnits, E as parseNumber, S as applyColumnTransforms, T as parseEuropeanNumber, _ as COLUMN_TRANSFORM_OPS, a as mappingColumnSchema, b as ColumnTransformOp, c as resolveMapping, d as NumberOutcome, f as TargetField, g as textOrNull, h as rowError, i as buildMappingTransform, l as BuildRowContext, m as numberCell, n as MappingConfig, o as mappingConfigSchema, p as TargetSchema, r as ResolvableMapping, s as numberFormatSchema, t as MappingColumn, u as MappedRow, v as CellValue, w as NumberFormat, x as ColumnTransformOpDescriptor, y as ColumnTransform } from "../engine-
|
|
3
|
-
import { i as partsSchema, n as normalizeCode, r as partsParamsSchema, t as PartsParams } from "../parts-schema-
|
|
2
|
+
import { C as columnTransformSchema, D as toMinorUnits, E as parseNumber, S as applyColumnTransforms, T as parseEuropeanNumber, _ as COLUMN_TRANSFORM_OPS, a as mappingColumnSchema, b as ColumnTransformOp, c as resolveMapping, d as NumberOutcome, f as TargetField, g as textOrNull, h as rowError, i as buildMappingTransform, l as BuildRowContext, m as numberCell, n as MappingConfig, o as mappingConfigSchema, p as TargetSchema, r as ResolvableMapping, s as numberFormatSchema, t as MappingColumn, u as MappedRow, v as CellValue, w as NumberFormat, x as ColumnTransformOpDescriptor, y as ColumnTransform } from "../engine-tkbUXKxB.mjs";
|
|
3
|
+
import { i as partsSchema, n as normalizeCode, r as partsParamsSchema, t as PartsParams } from "../parts-schema-M1AtjNJt.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/mapping/discount-table-schema.d.ts
|
|
6
6
|
/** One parsed discount-table row: a group token + the purchase discount % off list. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as TargetSchema } from "./engine-
|
|
1
|
+
import { p as TargetSchema } from "./engine-tkbUXKxB.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { PartsDocument } from "@murumets-ee/search-elasticsearch";
|
|
4
4
|
|
|
@@ -25,18 +25,18 @@ declare const partsParamsSchema: z.ZodObject<{
|
|
|
25
25
|
*/
|
|
26
26
|
discountGroups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
supplierId: string;
|
|
29
|
-
brandId: string;
|
|
30
28
|
brandSlug: string;
|
|
31
29
|
supplierDisplayName: string;
|
|
30
|
+
brandId: string;
|
|
31
|
+
supplierId: string;
|
|
32
32
|
importBatchId: string;
|
|
33
33
|
supplierCodePrefix?: string | undefined;
|
|
34
34
|
discountGroups?: Record<string, number> | undefined;
|
|
35
35
|
}, {
|
|
36
|
-
supplierId: string;
|
|
37
|
-
brandId: string;
|
|
38
36
|
brandSlug: string;
|
|
39
37
|
supplierDisplayName: string;
|
|
38
|
+
brandId: string;
|
|
39
|
+
supplierId: string;
|
|
40
40
|
importBatchId: string;
|
|
41
41
|
supplierCodePrefix?: string | undefined;
|
|
42
42
|
discountGroups?: Record<string, number> | undefined;
|
|
@@ -58,4 +58,4 @@ declare function normalizeCode(s: string): string;
|
|
|
58
58
|
declare const partsSchema: TargetSchema<PartsDocument>;
|
|
59
59
|
//#endregion
|
|
60
60
|
export { partsSchema as i, normalizeCode as n, partsParamsSchema as r, PartsParams as t };
|
|
61
|
-
//# sourceMappingURL=parts-schema-
|
|
61
|
+
//# sourceMappingURL=parts-schema-M1AtjNJt.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parts-schema-
|
|
1
|
+
{"version":3,"file":"parts-schema-M1AtjNJt.d.mts","names":[],"sources":["../src/mapping/parts-schema.ts"],"mappings":";;;;;;;;;;;cAmDa,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqBlB,WAAA,GAAc,CAAA,CAAE,KAAK,QAAQ,iBAAA;;;;;AAAzC;;;iBAsMgB,aAAA,CAAc,CAAS;;;;;AAtMmB;cA6R7C,WAAA,EAAa,YAAY,CAAC,aAAA"}
|
package/dist/plugin.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as EsClientResolver, r as FilePathResolver, s as PairSink, t as EnsureIndexResolver } from "./worker-
|
|
1
|
+
import { n as EsClientResolver, r as FilePathResolver, s as PairSink, t as EnsureIndexResolver } from "./worker-CRH_PjKO.mjs";
|
|
2
2
|
import { ImportsStorageFactory } from "./storage.mjs";
|
|
3
3
|
import { IndexConfig } from "@murumets-ee/search-elasticsearch";
|
|
4
4
|
|
package/dist/transforms.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as carmakerFeedTransform, i as carmakerFeedParamsSchema, r as CarmakerFeedParams, t as CARMAKER_FEED_TRANSFORM_NAME } from "./carmaker-feed-
|
|
1
|
+
import { a as carmakerFeedTransform, i as carmakerFeedParamsSchema, r as CarmakerFeedParams, t as CARMAKER_FEED_TRANSFORM_NAME } from "./carmaker-feed-CWrZLYUt.mjs";
|
|
2
2
|
export { CARMAKER_FEED_TRANSFORM_NAME, type CarmakerFeedParams, carmakerFeedParamsSchema, carmakerFeedTransform };
|
|
@@ -253,19 +253,19 @@ declare const feedReaderConfigSchema: z.ZodObject<{
|
|
|
253
253
|
*/
|
|
254
254
|
quote: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<false>]>>;
|
|
255
255
|
}, "strict", z.ZodTypeAny, {
|
|
256
|
-
format?: "csv" | "tsv" | "xlsx" | undefined;
|
|
257
|
-
delimiter?: string | undefined;
|
|
258
256
|
hasHeader?: boolean | undefined;
|
|
257
|
+
delimiter?: string | undefined;
|
|
258
|
+
quote?: string | false | undefined;
|
|
259
259
|
headerRowIndex?: number | undefined;
|
|
260
260
|
sheet?: string | undefined;
|
|
261
|
-
quote?: string | false | undefined;
|
|
262
|
-
}, {
|
|
263
261
|
format?: "csv" | "tsv" | "xlsx" | undefined;
|
|
264
|
-
|
|
262
|
+
}, {
|
|
265
263
|
hasHeader?: boolean | undefined;
|
|
264
|
+
delimiter?: string | undefined;
|
|
265
|
+
quote?: string | false | undefined;
|
|
266
266
|
headerRowIndex?: number | undefined;
|
|
267
267
|
sheet?: string | undefined;
|
|
268
|
-
|
|
268
|
+
format?: "csv" | "tsv" | "xlsx" | undefined;
|
|
269
269
|
}>;
|
|
270
270
|
type FeedReaderConfig = z.infer<typeof feedReaderConfigSchema>;
|
|
271
271
|
/**
|
|
@@ -937,4 +937,4 @@ interface ImportsRunDeadListenerConfig {
|
|
|
937
937
|
declare function createImportsRunDeadListener(config: ImportsRunDeadListenerConfig): QueueTerminalNotifier;
|
|
938
938
|
//#endregion
|
|
939
939
|
export { ErrorSample as A, StreamFeedOptions as B, PriceStats as C, DEFAULT_MAX_PATTERNS as D, parsePriceStats as E, FeedReaderConfig as F, ImportRun as G, countDataRows as H, ReadFeedOptions as I, ImportRunClient as K, feedReaderConfigSchema as L, ErrorTrackerConfig as M, ErrorTrackerSnapshot as N, DEFAULT_MAX_SAMPLES_PER_PATTERN as O, mergeErrorTrackerSnapshots as P, readFeed as R, PriceAnomaly as S, detectPriceAnomaly as T, streamFeed as U, StreamFeedRow as V, IMPORT_RUN_STATUSES as W, RunImportResult as _, ImportsRunJobContext as a, PRICE_ANOMALY_THRESHOLD_MULTIPLIER as b, PairSinkContext as c, createRunImportHandler as d, importsRunJob as f, RunImportOptions as g, ImportRunProgress as h, ImportsRunDeadListenerConfig as i, ErrorTracker as j, ErrorPattern as k, RunImportHandlerConfig as l, DEFAULT_BATCH_SIZE as m, EsClientResolver as n, ImportsRunJobPayload as o, importsRunJobPayloadSchema as p, ImportRunStatus as q, FilePathResolver as r, PairSink as s, EnsureIndexResolver as t, createImportsRunDeadListener as u, runImport as v, PriceStatsCollector as w, PRICE_SAMPLE_CAP as x, EMPTY_PRICE_STATS as y, readPersistedFeedConfig as z };
|
|
940
|
-
//# sourceMappingURL=worker-
|
|
940
|
+
//# sourceMappingURL=worker-CRH_PjKO.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-
|
|
1
|
+
{"version":3,"file":"worker-CRH_PjKO.d.mts","names":[],"sources":["../src/entities/import-run.ts","../src/streaming.ts","../src/read-feed.ts","../src/error-tracker.ts","../src/price-stats.ts","../src/runner.ts","../src/worker.ts"],"mappings":";;;;;;;;AAoCyD;AAEzD;;;;;;;;AAFyD,cAP5C,mBAAA;AAAA,KAOD,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;;;;EI+KjC,QAAA,GAAW,QAAA;;EAEX,MAAA,GAAS,MAAA;AAAA;;;;;;;;;;;iBAaK,sBAAA,CACd,MAAA,EAAQ,sBAAA,IACN,GAAA,EAAK,oBAAA,KAAyB,OAAA;AAAA,UAsZjB,4BAAA;EACf,UAAA,EAAY,eAAA;;EAEZ,MAAA,GAAS,MAAM;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AJrkBjB;;;;;;;;iBI6mBgB,4BAAA,CACd,MAAA,EAAQ,4BAAA,GACP,qBAAqB"}
|
package/dist/worker.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ImportsRunJobContext, c as PairSinkContext, d as createRunImportHandler, f as importsRunJob, i as ImportsRunDeadListenerConfig, l as RunImportHandlerConfig, n as EsClientResolver, o as ImportsRunJobPayload, p as importsRunJobPayloadSchema, r as FilePathResolver, s as PairSink, t as EnsureIndexResolver, u as createImportsRunDeadListener } from "./worker-
|
|
1
|
+
import { a as ImportsRunJobContext, c as PairSinkContext, d as createRunImportHandler, f as importsRunJob, i as ImportsRunDeadListenerConfig, l as RunImportHandlerConfig, n as EsClientResolver, o as ImportsRunJobPayload, p as importsRunJobPayloadSchema, r as FilePathResolver, s as PairSink, t as EnsureIndexResolver, u as createImportsRunDeadListener } from "./worker-CRH_PjKO.mjs";
|
|
2
2
|
export { EnsureIndexResolver, EsClientResolver, FilePathResolver, ImportsRunDeadListenerConfig, ImportsRunJobContext, ImportsRunJobPayload, PairSink, PairSinkContext, RunImportHandlerConfig, createImportsRunDeadListener, createRunImportHandler, importsRunJob, importsRunJobPayloadSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@murumets-ee/imports",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.108.0",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"drizzle-orm": "^0.45.2",
|
|
54
54
|
"exceljs": "^4.4.0",
|
|
55
55
|
"zod": "^3.24.1",
|
|
56
|
-
"@murumets-ee/
|
|
57
|
-
"@murumets-ee/
|
|
58
|
-
"@murumets-ee/
|
|
59
|
-
"@murumets-ee/
|
|
60
|
-
"@murumets-ee/queue": "0.
|
|
61
|
-
"@murumets-ee/search-elasticsearch": "0.
|
|
62
|
-
"@murumets-ee/storage": "0.
|
|
56
|
+
"@murumets-ee/db": "0.108.0",
|
|
57
|
+
"@murumets-ee/entity": "0.108.0",
|
|
58
|
+
"@murumets-ee/logging": "0.108.0",
|
|
59
|
+
"@murumets-ee/core": "0.108.0",
|
|
60
|
+
"@murumets-ee/queue": "0.108.0",
|
|
61
|
+
"@murumets-ee/search-elasticsearch": "0.108.0",
|
|
62
|
+
"@murumets-ee/storage": "0.108.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/node": "^20.19.42",
|