@porulle/plugin-channel-connector 0.48.0 → 0.49.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/index.d.ts +2 -1
- package/dist/index.js +10 -1
- package/dist/service.d.ts +89 -1
- package/dist/service.js +503 -37
- package/package.json +4 -4
- package/src/index.ts +18 -0
- package/src/service.ts +581 -34
- package/dist/tsconfig.tsbuildinfo +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@porulle/plugin-channel-connector",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@hono/zod-openapi": "^1.2.2",
|
|
21
21
|
"hono": "^4.12.5",
|
|
22
|
-
"@porulle/core": "0.
|
|
22
|
+
"@porulle/core": "0.49.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^24.5.2",
|
|
26
26
|
"eslint": "^9.39.1",
|
|
27
27
|
"typescript": "5.9.2",
|
|
28
28
|
"vitest": "^3.2.4",
|
|
29
|
-
"@porulle/
|
|
30
|
-
"@porulle/
|
|
29
|
+
"@porulle/eslint-config": "0.1.0",
|
|
30
|
+
"@porulle/typescript-config": "0.1.0"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
package/src/index.ts
CHANGED
|
@@ -57,6 +57,8 @@ export { mockChannelConnector } from "./mock-connector.js";
|
|
|
57
57
|
export type { MockChannelConnectorOptions } from "./mock-connector.js";
|
|
58
58
|
export {
|
|
59
59
|
ChannelConnectorService,
|
|
60
|
+
HERO_IMAGE_BYTE_CAP,
|
|
61
|
+
selectImportImages,
|
|
60
62
|
CATALOG_OUTBOUND_SUPPRESSION_WINDOW_MS,
|
|
61
63
|
CATALOG_PUSH_BATCH_SIZES,
|
|
62
64
|
CATALOG_PUSH_MAX_ATTEMPTS,
|
|
@@ -77,6 +79,13 @@ export {
|
|
|
77
79
|
selectCatalogFieldMapping,
|
|
78
80
|
validateCatalogMappingRow,
|
|
79
81
|
} from "./catalog-field-mapping.js";
|
|
82
|
+
export type {
|
|
83
|
+
CatalogDeferredMedia,
|
|
84
|
+
CatalogMediaFailure,
|
|
85
|
+
CatalogMediaFailureReason,
|
|
86
|
+
CatalogPageConvergence,
|
|
87
|
+
ImportImageSelection,
|
|
88
|
+
} from "./service.js";
|
|
80
89
|
export type {
|
|
81
90
|
CatalogFieldMapping,
|
|
82
91
|
CatalogFieldMappingInput,
|
|
@@ -335,6 +344,15 @@ export function channelConnectorPlugin(options: ChannelConnectorPluginOptions =
|
|
|
335
344
|
counted: page.value.imported,
|
|
336
345
|
cursor: page.value.cursor ?? null,
|
|
337
346
|
...(page.value.warnings ? { warnings: page.value.warnings } : {}),
|
|
347
|
+
// UNCONDITIONAL, unlike `warnings` and `failures` beside it. The step's return value is
|
|
348
|
+
// the only per-batch seam a host application has — `walkBatches` keeps just `last` — so
|
|
349
|
+
// this is where a page gets its identity. Omitting it when empty would make "this batch
|
|
350
|
+
// committed nothing" and "this plugin build does not report entities" the same
|
|
351
|
+
// `undefined` at the seam, and a caller that collapses those enqueues nothing and
|
|
352
|
+
// reports success. The service's own return declares it unconditional for the same
|
|
353
|
+
// reason; dropping it here would have undone that one line later.
|
|
354
|
+
entityIds: page.value.entityIds,
|
|
355
|
+
...(page.value.failures ? { failures: page.value.failures } : {}),
|
|
338
356
|
};
|
|
339
357
|
},
|
|
340
358
|
);
|