@empline/preflight 1.1.23 → 1.1.25
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/checks/integrations/critical-fields-registry.d.ts +28 -0
- package/dist/checks/integrations/critical-fields-registry.d.ts.map +1 -0
- package/dist/checks/integrations/critical-fields-registry.js +221 -0
- package/dist/checks/integrations/critical-fields-registry.js.map +1 -0
- package/dist/checks/integrations/integration-field-coverage.d.ts +13 -0
- package/dist/checks/integrations/integration-field-coverage.d.ts.map +1 -0
- package/dist/checks/integrations/integration-field-coverage.js +601 -0
- package/dist/checks/integrations/integration-field-coverage.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export declare const id = "integrations/critical-fields-registry";
|
|
3
|
+
export declare const name = "Critical Fields Registry Sync";
|
|
4
|
+
export declare const description = "Ensures all card identity fields are tracked in integration coverage";
|
|
5
|
+
export declare const category = "integrations";
|
|
6
|
+
export declare const blocking = true;
|
|
7
|
+
export declare const tags: string[];
|
|
8
|
+
export declare const requires: string[];
|
|
9
|
+
/**
|
|
10
|
+
* MASTER FIELD REGISTRY
|
|
11
|
+
*
|
|
12
|
+
* This is the single source of truth for critical fields that MUST be
|
|
13
|
+
* validated in integration imports. If a field is added here, it MUST
|
|
14
|
+
* also be added to integration-field-coverage.ts.
|
|
15
|
+
*
|
|
16
|
+
* Fields are categorized by their importance to card identification:
|
|
17
|
+
* - identity: Core fields that uniquely identify a card (MUST have coverage)
|
|
18
|
+
* - cataloging: Fields important for search/organization (SHOULD have coverage)
|
|
19
|
+
* - inventory: Fields for seller organization (optional coverage)
|
|
20
|
+
*/
|
|
21
|
+
export declare const FIELD_REGISTRY: Record<string, {
|
|
22
|
+
category: "identity" | "cataloging" | "inventory";
|
|
23
|
+
description: string;
|
|
24
|
+
sources: string[];
|
|
25
|
+
requiredInIntegrationCoverage: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
export declare function run(): Promise<void>;
|
|
28
|
+
//# sourceMappingURL=critical-fields-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"critical-fields-registry.d.ts","sourceRoot":"","sources":["../../../src/checks/integrations/critical-fields-registry.ts"],"names":[],"mappings":";AA8BA,eAAO,MAAM,EAAE,0CAA0C,CAAC;AAC1D,eAAO,MAAM,IAAI,kCAAkC,CAAC;AACpD,eAAO,MAAM,WAAW,yEAAyE,CAAC;AAClG,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AACvC,eAAO,MAAM,QAAQ,OAAO,CAAC;AAC7B,eAAO,MAAM,IAAI,UAA+D,CAAC;AACjF,eAAO,MAAM,QAAQ,UAA0B,CAAC;AAEhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE;IAC1C,QAAQ,EAAE,UAAU,GAAG,YAAY,GAAG,WAAW,CAAC;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6BAA6B,EAAE,OAAO,CAAC;CACxC,CAoFA,CAAC;AAwBF,wBAAsB,GAAG,kBAyExB"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.FIELD_REGISTRY = exports.requires = exports.tags = exports.blocking = exports.category = exports.description = exports.name = exports.id = void 0;
|
|
8
|
+
exports.run = run;
|
|
9
|
+
/**
|
|
10
|
+
* Critical Fields Registry & Sync Preflight (BLOCKING)
|
|
11
|
+
*
|
|
12
|
+
* This preflight ensures that ALL critical fields for card/listing data
|
|
13
|
+
* are registered and tracked for integration coverage.
|
|
14
|
+
*
|
|
15
|
+
* PURPOSE:
|
|
16
|
+
* When new fields are added to the codebase (e.g., in Prisma schema,
|
|
17
|
+
* CardData types, or listing forms), this preflight ensures they get
|
|
18
|
+
* added to the integration field coverage checks.
|
|
19
|
+
*
|
|
20
|
+
* HOW IT WORKS:
|
|
21
|
+
* 1. Maintains a FIELD_REGISTRY of all critical fields
|
|
22
|
+
* 2. Scans the codebase for field definitions in key locations:
|
|
23
|
+
* - lib/types/card-types.ts (CardData interfaces)
|
|
24
|
+
* - prisma/schema.prisma (card_catalog, core_listings tables)
|
|
25
|
+
* - components/forms/CardDetailsForm.tsx (form field definitions)
|
|
26
|
+
* 3. Cross-references against integration-field-coverage.ts
|
|
27
|
+
* 4. Flags any fields that exist in source but not in integration coverage
|
|
28
|
+
*
|
|
29
|
+
* WHEN TO UPDATE:
|
|
30
|
+
* - Adding a new field to CardData or card catalog
|
|
31
|
+
* - Adding a new required field to listing creation
|
|
32
|
+
* - When this preflight fails with "untracked field" errors
|
|
33
|
+
*/
|
|
34
|
+
const fs_1 = __importDefault(require("fs"));
|
|
35
|
+
const console_chars_1 = require("../../utils/console-chars");
|
|
36
|
+
// METADATA - Required for plugin loader discovery
|
|
37
|
+
exports.id = "integrations/critical-fields-registry";
|
|
38
|
+
exports.name = "Critical Fields Registry Sync";
|
|
39
|
+
exports.description = "Ensures all card identity fields are tracked in integration coverage";
|
|
40
|
+
exports.category = "integrations";
|
|
41
|
+
exports.blocking = true;
|
|
42
|
+
exports.tags = ["integrations", "field-registry", "sync", "data-integrity"];
|
|
43
|
+
exports.requires = ["trading-card-system"];
|
|
44
|
+
/**
|
|
45
|
+
* MASTER FIELD REGISTRY
|
|
46
|
+
*
|
|
47
|
+
* This is the single source of truth for critical fields that MUST be
|
|
48
|
+
* validated in integration imports. If a field is added here, it MUST
|
|
49
|
+
* also be added to integration-field-coverage.ts.
|
|
50
|
+
*
|
|
51
|
+
* Fields are categorized by their importance to card identification:
|
|
52
|
+
* - identity: Core fields that uniquely identify a card (MUST have coverage)
|
|
53
|
+
* - cataloging: Fields important for search/organization (SHOULD have coverage)
|
|
54
|
+
* - inventory: Fields for seller organization (optional coverage)
|
|
55
|
+
*/
|
|
56
|
+
exports.FIELD_REGISTRY = {
|
|
57
|
+
// IDENTITY FIELDS - Must have full integration coverage
|
|
58
|
+
cardNumber: {
|
|
59
|
+
category: "identity",
|
|
60
|
+
description: "Card number within the set (e.g., #123)",
|
|
61
|
+
sources: ["card-types.ts", "schema.prisma", "CardDetailsForm.tsx"],
|
|
62
|
+
requiredInIntegrationCoverage: true,
|
|
63
|
+
},
|
|
64
|
+
year: {
|
|
65
|
+
category: "identity",
|
|
66
|
+
description: "Release year of the card (e.g., 2024)",
|
|
67
|
+
sources: ["card-types.ts", "schema.prisma", "CardDetailsForm.tsx"],
|
|
68
|
+
requiredInIntegrationCoverage: true,
|
|
69
|
+
},
|
|
70
|
+
brand: {
|
|
71
|
+
category: "identity",
|
|
72
|
+
description: "Card manufacturer (Topps, Panini, etc.)",
|
|
73
|
+
sources: ["card-types.ts", "schema.prisma", "CardDetailsForm.tsx"],
|
|
74
|
+
requiredInIntegrationCoverage: true,
|
|
75
|
+
},
|
|
76
|
+
featured: {
|
|
77
|
+
category: "identity",
|
|
78
|
+
description: "Featured person or character on the card",
|
|
79
|
+
sources: ["card-types.ts", "schema.prisma", "CardDetailsForm.tsx"],
|
|
80
|
+
requiredInIntegrationCoverage: true,
|
|
81
|
+
},
|
|
82
|
+
series: {
|
|
83
|
+
category: "identity",
|
|
84
|
+
description: "Card set or series name",
|
|
85
|
+
sources: ["card-types.ts", "schema.prisma", "CardDetailsForm.tsx"],
|
|
86
|
+
requiredInIntegrationCoverage: true,
|
|
87
|
+
},
|
|
88
|
+
// CATALOGING FIELDS - Should have integration coverage
|
|
89
|
+
team: {
|
|
90
|
+
category: "cataloging",
|
|
91
|
+
description: "Sports team (for sports cards)",
|
|
92
|
+
sources: ["card-types.ts", "schema.prisma"],
|
|
93
|
+
requiredInIntegrationCoverage: true,
|
|
94
|
+
},
|
|
95
|
+
subset: {
|
|
96
|
+
category: "cataloging",
|
|
97
|
+
description: "Card subset or insert set",
|
|
98
|
+
sources: ["card-types.ts", "schema.prisma"],
|
|
99
|
+
requiredInIntegrationCoverage: false,
|
|
100
|
+
},
|
|
101
|
+
variation: {
|
|
102
|
+
category: "cataloging",
|
|
103
|
+
description: "Card variation (refractor, parallel, etc.)",
|
|
104
|
+
sources: ["card-types.ts", "schema.prisma"],
|
|
105
|
+
requiredInIntegrationCoverage: false,
|
|
106
|
+
},
|
|
107
|
+
condition: {
|
|
108
|
+
category: "cataloging",
|
|
109
|
+
description: "Card condition (mint, near mint, etc.)",
|
|
110
|
+
sources: ["card-types.ts", "schema.prisma", "CardDetailsForm.tsx"],
|
|
111
|
+
requiredInIntegrationCoverage: false,
|
|
112
|
+
},
|
|
113
|
+
graded: {
|
|
114
|
+
category: "cataloging",
|
|
115
|
+
description: "Whether card is graded",
|
|
116
|
+
sources: ["card-types.ts", "schema.prisma", "CardDetailsForm.tsx"],
|
|
117
|
+
requiredInIntegrationCoverage: false,
|
|
118
|
+
},
|
|
119
|
+
// INVENTORY FIELDS - Optional coverage
|
|
120
|
+
sellerBox: {
|
|
121
|
+
category: "inventory",
|
|
122
|
+
description: "Seller's storage box identifier",
|
|
123
|
+
sources: ["schema.prisma"],
|
|
124
|
+
requiredInIntegrationCoverage: false,
|
|
125
|
+
},
|
|
126
|
+
sellerRow: {
|
|
127
|
+
category: "inventory",
|
|
128
|
+
description: "Seller's storage row identifier",
|
|
129
|
+
sources: ["schema.prisma"],
|
|
130
|
+
requiredInIntegrationCoverage: false,
|
|
131
|
+
},
|
|
132
|
+
sellerSku: {
|
|
133
|
+
category: "inventory",
|
|
134
|
+
description: "Seller's SKU for the item",
|
|
135
|
+
sources: ["schema.prisma"],
|
|
136
|
+
requiredInIntegrationCoverage: false,
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Fields that are tracked in integration-field-coverage.ts
|
|
141
|
+
* This should match CRITICAL_FIELD_PATTERNS in that file
|
|
142
|
+
*/
|
|
143
|
+
const INTEGRATION_COVERAGE_FILE = "scripts/preflights/business-logic/integrations/integration-field-coverage.ts";
|
|
144
|
+
/**
|
|
145
|
+
* Check if a field is tracked in integration-field-coverage.ts
|
|
146
|
+
*/
|
|
147
|
+
function isFieldTrackedInCoverage(content, fieldName) {
|
|
148
|
+
// Look for the field in CRITICAL_FIELD_PATTERNS
|
|
149
|
+
const fieldPattern = new RegExp(`["']?${fieldName}["']?\\s*:\\s*\\{`, "i");
|
|
150
|
+
return fieldPattern.test(content);
|
|
151
|
+
}
|
|
152
|
+
async function run() {
|
|
153
|
+
console.log((0, console_chars_1.createDivider)());
|
|
154
|
+
console.log(`${console_chars_1.emoji.search} Checking critical fields registry sync...`);
|
|
155
|
+
console.log();
|
|
156
|
+
const issues = [];
|
|
157
|
+
// Check if integration coverage file exists
|
|
158
|
+
if (!fs_1.default.existsSync(INTEGRATION_COVERAGE_FILE)) {
|
|
159
|
+
console.log(`${console_chars_1.emoji.error} Integration coverage file not found: ${INTEGRATION_COVERAGE_FILE}`);
|
|
160
|
+
process.exit(1);
|
|
161
|
+
}
|
|
162
|
+
const coverageContent = fs_1.default.readFileSync(INTEGRATION_COVERAGE_FILE, "utf-8");
|
|
163
|
+
// Check each required field in registry is tracked in coverage
|
|
164
|
+
console.log(" Checking field registry against integration coverage...");
|
|
165
|
+
console.log();
|
|
166
|
+
const requiredFields = Object.entries(exports.FIELD_REGISTRY)
|
|
167
|
+
.filter(([_, config]) => config.requiredInIntegrationCoverage);
|
|
168
|
+
for (const [fieldName, config] of requiredFields) {
|
|
169
|
+
const isTracked = isFieldTrackedInCoverage(coverageContent, fieldName);
|
|
170
|
+
if (!isTracked) {
|
|
171
|
+
issues.push({
|
|
172
|
+
field: fieldName,
|
|
173
|
+
type: "error",
|
|
174
|
+
message: `Field "${fieldName}" is required but not tracked in integration coverage`,
|
|
175
|
+
fix: `Add "${fieldName}" to CRITICAL_FIELD_PATTERNS in ${INTEGRATION_COVERAGE_FILE}`,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
// Report results
|
|
180
|
+
const errors = issues.filter((i) => i.type === "error");
|
|
181
|
+
const warnings = issues.filter((i) => i.type === "warning");
|
|
182
|
+
if (issues.length === 0) {
|
|
183
|
+
console.log(`${console_chars_1.emoji.success} All required fields are tracked in integration coverage!`);
|
|
184
|
+
console.log();
|
|
185
|
+
console.log(" Registry summary:");
|
|
186
|
+
console.log(` ${console_chars_1.emoji.success} Identity fields: ${Object.entries(exports.FIELD_REGISTRY).filter(([_, c]) => c.category === "identity").length}`);
|
|
187
|
+
console.log(` ${console_chars_1.emoji.success} Cataloging fields: ${Object.entries(exports.FIELD_REGISTRY).filter(([_, c]) => c.category === "cataloging").length}`);
|
|
188
|
+
console.log(` ${console_chars_1.emoji.success} Inventory fields: ${Object.entries(exports.FIELD_REGISTRY).filter(([_, c]) => c.category === "inventory").length}`);
|
|
189
|
+
console.log();
|
|
190
|
+
console.log(" Required fields with coverage:");
|
|
191
|
+
for (const [fieldName, config] of requiredFields) {
|
|
192
|
+
console.log(` ${console_chars_1.emoji.success} ${fieldName} (${config.category})`);
|
|
193
|
+
}
|
|
194
|
+
process.exit(0);
|
|
195
|
+
}
|
|
196
|
+
// Show errors
|
|
197
|
+
if (errors.length > 0) {
|
|
198
|
+
console.log(`${console_chars_1.emoji.error} CRITICAL: ${errors.length} required field(s) missing from integration coverage!`);
|
|
199
|
+
console.log();
|
|
200
|
+
for (const issue of errors) {
|
|
201
|
+
console.log(` ${console_chars_1.emoji.error} ${issue.field}: ${issue.message}`);
|
|
202
|
+
console.log(` → Fix: ${issue.fix}`);
|
|
203
|
+
console.log();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
console.log((0, console_chars_1.createDivider)());
|
|
207
|
+
console.log(`${console_chars_1.emoji.info} HOW TO FIX:`);
|
|
208
|
+
console.log(`${console_chars_1.emoji.info} 1. Add missing fields to CRITICAL_FIELD_PATTERNS in integration-field-coverage.ts`);
|
|
209
|
+
console.log(`${console_chars_1.emoji.info} 2. Define requiredPatterns, advisoryPatterns, and forbiddenDefaults for each field`);
|
|
210
|
+
console.log(`${console_chars_1.emoji.info} 3. Add the field to relevant integration file checks in INTEGRATION_FILES`);
|
|
211
|
+
console.log();
|
|
212
|
+
process.exit(errors.length > 0 ? 1 : 0);
|
|
213
|
+
}
|
|
214
|
+
// Allow direct execution
|
|
215
|
+
if (require.main === module) {
|
|
216
|
+
run().catch((error) => {
|
|
217
|
+
console.error("Preflight failed:", error);
|
|
218
|
+
process.exit(1);
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=critical-fields-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"critical-fields-registry.js","sourceRoot":"","sources":["../../../src/checks/integrations/critical-fields-registry.ts"],"names":[],"mappings":";;;;;;;AAmKA,kBAyEC;AA3OD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,4CAAoB;AACpB,6DAAiE;AAEjE,kDAAkD;AACrC,QAAA,EAAE,GAAG,uCAAuC,CAAC;AAC7C,QAAA,IAAI,GAAG,+BAA+B,CAAC;AACvC,QAAA,WAAW,GAAG,sEAAsE,CAAC;AACrF,QAAA,QAAQ,GAAG,cAAc,CAAC;AAC1B,QAAA,QAAQ,GAAG,IAAI,CAAC;AAChB,QAAA,IAAI,GAAG,CAAC,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;AACpE,QAAA,QAAQ,GAAG,CAAC,qBAAqB,CAAC,CAAC;AAEhD;;;;;;;;;;;GAWG;AACU,QAAA,cAAc,GAKtB;IACH,wDAAwD;IACxD,UAAU,EAAE;QACV,QAAQ,EAAE,UAAU;QACpB,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,EAAE,qBAAqB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AK,CAAC,CAAC;QAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export declare const id = "integrations/field-coverage";
|
|
3
|
+
export declare const name = "Integration Field Coverage";
|
|
4
|
+
export declare const description = "Validates ALL integrations extract ALL critical fields without hardcoded defaults";
|
|
5
|
+
export declare const category = "integrations";
|
|
6
|
+
export declare const blocking = true;
|
|
7
|
+
export declare const tags: string[];
|
|
8
|
+
export declare const requires: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Main run function
|
|
11
|
+
*/
|
|
12
|
+
export declare function run(): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=integration-field-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-field-coverage.d.ts","sourceRoot":"","sources":["../../../src/checks/integrations/integration-field-coverage.ts"],"names":[],"mappings":";AAqCA,eAAO,MAAM,EAAE,gCAAgC,CAAC;AAChD,eAAO,MAAM,IAAI,+BAA+B,CAAC;AACjD,eAAO,MAAM,WAAW,sFAAsF,CAAC;AAC/G,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AACvC,eAAO,MAAM,QAAQ,OAAO,CAAC;AAC7B,eAAO,MAAM,IAAI,UAAmG,CAAC;AACrH,eAAO,MAAM,QAAQ,UAA0B,CAAC;AAufhD;;GAEG;AACH,wBAAsB,GAAG,kBA6GxB"}
|
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.requires = exports.tags = exports.blocking = exports.category = exports.description = exports.name = exports.id = void 0;
|
|
8
|
+
exports.run = run;
|
|
9
|
+
/**
|
|
10
|
+
* Integration Field Coverage Preflight (BLOCKING)
|
|
11
|
+
*
|
|
12
|
+
* Validates that ALL integration points properly extract ALL critical fields
|
|
13
|
+
* and don't use hardcoded fallback values that cause data loss.
|
|
14
|
+
*
|
|
15
|
+
* BACKGROUND:
|
|
16
|
+
* This preflight was created after the "all cards imported with card #1" bug
|
|
17
|
+
* where the WooCommerce import route checked for "cardNumber" but not "card_number"
|
|
18
|
+
* (underscore format), causing all imported cards to get the fallback value "1".
|
|
19
|
+
*
|
|
20
|
+
* INTEGRATION POINTS CHECKED:
|
|
21
|
+
* 1. WooCommerce import route (/api/store/integrations/woocommerce/import)
|
|
22
|
+
* 2. WooCommerce batch adapter (lib/integrations/batch-import/adapters)
|
|
23
|
+
* 3. Shopify import route (/api/store/integrations/shopify/import-products)
|
|
24
|
+
* 4. CSV import route (/api/listings/upload-csv)
|
|
25
|
+
* 5. Field mapping UI components
|
|
26
|
+
*
|
|
27
|
+
* CRITICAL FIELDS VALIDATED:
|
|
28
|
+
* - cardNumber: Must check card_number, cardNumber, number patterns
|
|
29
|
+
* - year: Must check year, card_year patterns
|
|
30
|
+
* - brand: Must check brand, manufacturer, card_brand patterns
|
|
31
|
+
* - featured/player: Must check player, featured, playerName, athlete patterns
|
|
32
|
+
* - series: Must check series, set, collection patterns
|
|
33
|
+
* - team: Must check team, nfl_team, mlb_team, nba_team, nhl_team patterns
|
|
34
|
+
*
|
|
35
|
+
* CRITICAL RULES:
|
|
36
|
+
* - NO hardcoded values like "", "1", "N/A", "Unknown" for card identity fields
|
|
37
|
+
* - All integrations must extract from source data
|
|
38
|
+
* - Field mappings must include common naming variations
|
|
39
|
+
*/
|
|
40
|
+
const fs_1 = __importDefault(require("fs"));
|
|
41
|
+
const path_1 = __importDefault(require("path"));
|
|
42
|
+
const console_chars_1 = require("../../utils/console-chars");
|
|
43
|
+
// METADATA - Required for plugin loader discovery
|
|
44
|
+
exports.id = "integrations/field-coverage";
|
|
45
|
+
exports.name = "Integration Field Coverage";
|
|
46
|
+
exports.description = "Validates ALL integrations extract ALL critical fields without hardcoded defaults";
|
|
47
|
+
exports.category = "integrations";
|
|
48
|
+
exports.blocking = true; // CRITICAL - prevents data loss
|
|
49
|
+
exports.tags = ["integrations", "woocommerce", "shopify", "csv", "field-mapping", "data-integrity", "critical"];
|
|
50
|
+
exports.requires = ["trading-card-system"];
|
|
51
|
+
/**
|
|
52
|
+
* ALL critical fields and their required naming pattern coverage
|
|
53
|
+
* Each field that identifies a card MUST have comprehensive pattern coverage
|
|
54
|
+
*/
|
|
55
|
+
const CRITICAL_FIELD_PATTERNS = {
|
|
56
|
+
// CRITICAL: Card identity fields - these uniquely identify a card
|
|
57
|
+
cardNumber: {
|
|
58
|
+
requiredPatterns: [
|
|
59
|
+
"card_number", // WordPress/WooCommerce standard (underscore)
|
|
60
|
+
"cardNumber", // JavaScript/camelCase standard
|
|
61
|
+
"number", // Generic short form
|
|
62
|
+
],
|
|
63
|
+
advisoryPatterns: [
|
|
64
|
+
"card_num", // Abbreviation
|
|
65
|
+
"cardnumber", // All lowercase
|
|
66
|
+
],
|
|
67
|
+
forbiddenDefaults: [
|
|
68
|
+
'cardNumber: ""',
|
|
69
|
+
"cardNumber: ''",
|
|
70
|
+
'cardNumber: "1"',
|
|
71
|
+
"cardNumber: '1'",
|
|
72
|
+
'cardNumber: "N/A"',
|
|
73
|
+
"cardNumber: 'N/A'",
|
|
74
|
+
],
|
|
75
|
+
severity: "critical",
|
|
76
|
+
description: "Card number uniquely identifies the card in a set",
|
|
77
|
+
},
|
|
78
|
+
year: {
|
|
79
|
+
requiredPatterns: [
|
|
80
|
+
"year",
|
|
81
|
+
"card_year",
|
|
82
|
+
],
|
|
83
|
+
advisoryPatterns: [
|
|
84
|
+
"yr",
|
|
85
|
+
"release_year",
|
|
86
|
+
],
|
|
87
|
+
forbiddenDefaults: [
|
|
88
|
+
'year: ""',
|
|
89
|
+
"year: ''",
|
|
90
|
+
'year: "0"',
|
|
91
|
+
'year: "1900"',
|
|
92
|
+
],
|
|
93
|
+
severity: "critical",
|
|
94
|
+
description: "Year is essential for card identification and value",
|
|
95
|
+
},
|
|
96
|
+
brand: {
|
|
97
|
+
requiredPatterns: [
|
|
98
|
+
"brand",
|
|
99
|
+
"manufacturer",
|
|
100
|
+
],
|
|
101
|
+
advisoryPatterns: [
|
|
102
|
+
"card_brand",
|
|
103
|
+
"maker",
|
|
104
|
+
"publisher",
|
|
105
|
+
],
|
|
106
|
+
forbiddenDefaults: [
|
|
107
|
+
'brand: ""',
|
|
108
|
+
"brand: ''",
|
|
109
|
+
'brand: "Unknown"',
|
|
110
|
+
'brand: "UNKNOWN"',
|
|
111
|
+
],
|
|
112
|
+
severity: "critical",
|
|
113
|
+
description: "Brand identifies the card manufacturer (Topps, Panini, etc.)",
|
|
114
|
+
},
|
|
115
|
+
// HIGH: Player/Featured - key for search and identification
|
|
116
|
+
featured: {
|
|
117
|
+
requiredPatterns: [
|
|
118
|
+
"featured",
|
|
119
|
+
"player",
|
|
120
|
+
"playerName",
|
|
121
|
+
],
|
|
122
|
+
advisoryPatterns: [
|
|
123
|
+
"player_name",
|
|
124
|
+
"athlete",
|
|
125
|
+
"character",
|
|
126
|
+
"subject",
|
|
127
|
+
],
|
|
128
|
+
forbiddenDefaults: [
|
|
129
|
+
'featured: ""',
|
|
130
|
+
"featured: ''",
|
|
131
|
+
'featured: "Unknown"',
|
|
132
|
+
'featured: "Unknown Player"',
|
|
133
|
+
'player: ""',
|
|
134
|
+
"player: ''",
|
|
135
|
+
],
|
|
136
|
+
severity: "high",
|
|
137
|
+
description: "Featured person/character is key for search and value",
|
|
138
|
+
},
|
|
139
|
+
// HIGH: Series/Set - important for cataloging
|
|
140
|
+
series: {
|
|
141
|
+
requiredPatterns: [
|
|
142
|
+
"series",
|
|
143
|
+
"set",
|
|
144
|
+
],
|
|
145
|
+
advisoryPatterns: [
|
|
146
|
+
"collection",
|
|
147
|
+
"set_name",
|
|
148
|
+
"setName",
|
|
149
|
+
],
|
|
150
|
+
forbiddenDefaults: [
|
|
151
|
+
'series: ""',
|
|
152
|
+
"series: ''",
|
|
153
|
+
],
|
|
154
|
+
severity: "high",
|
|
155
|
+
description: "Series/Set groups cards together for collectors",
|
|
156
|
+
},
|
|
157
|
+
// MEDIUM: Team - important for sports cards
|
|
158
|
+
team: {
|
|
159
|
+
requiredPatterns: [
|
|
160
|
+
"team",
|
|
161
|
+
],
|
|
162
|
+
advisoryPatterns: [
|
|
163
|
+
"nfl_team",
|
|
164
|
+
"mlb_team",
|
|
165
|
+
"nba_team",
|
|
166
|
+
"nhl_team",
|
|
167
|
+
"team_name",
|
|
168
|
+
],
|
|
169
|
+
forbiddenDefaults: [],
|
|
170
|
+
severity: "medium",
|
|
171
|
+
description: "Team is important for sports card categorization",
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Integration files that MUST be checked
|
|
176
|
+
*/
|
|
177
|
+
const INTEGRATION_FILES = [
|
|
178
|
+
{
|
|
179
|
+
path: "app/api/store/integrations/woocommerce/import/route.ts",
|
|
180
|
+
name: "WooCommerce Import Route",
|
|
181
|
+
checks: ["all_extraction_patterns", "all_forbidden_defaults"],
|
|
182
|
+
// Which fields to check in this file
|
|
183
|
+
fieldsToCheck: ["cardNumber", "year", "brand", "featured", "series", "team"],
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
path: "lib/integrations/batch-import/adapters/woocommerce-adapter.ts",
|
|
187
|
+
name: "WooCommerce Batch Adapter",
|
|
188
|
+
checks: ["all_extraction_patterns"],
|
|
189
|
+
fieldsToCheck: ["cardNumber", "year", "brand", "team"],
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
path: "app/api/store/integrations/shopify/import-products/route.ts",
|
|
193
|
+
name: "Shopify Import Route",
|
|
194
|
+
checks: ["all_forbidden_defaults", "shopify_metafield_extraction"],
|
|
195
|
+
fieldsToCheck: ["cardNumber", "year", "series"],
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
path: "app/api/listings/upload-csv/route.ts",
|
|
199
|
+
name: "CSV Import Route",
|
|
200
|
+
checks: ["csv_header_aliases"],
|
|
201
|
+
fieldsToCheck: ["cardNumber", "year", "brand", "featured"],
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
path: "components/woocommerce/steps/FieldMappingStep.tsx",
|
|
205
|
+
name: "WooCommerce Field Mapping UI",
|
|
206
|
+
checks: ["field_mapping_sources"],
|
|
207
|
+
fieldsToCheck: ["cardNumber"],
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
path: "lib/woocommerce-mapping-generator.ts",
|
|
211
|
+
name: "WooCommerce Smart Mapping Generator",
|
|
212
|
+
checks: ["smart_mapping_priority"],
|
|
213
|
+
fieldsToCheck: ["cardNumber"],
|
|
214
|
+
},
|
|
215
|
+
];
|
|
216
|
+
/**
|
|
217
|
+
* Check if file content has extraction patterns for ALL critical fields
|
|
218
|
+
*/
|
|
219
|
+
function checkAllExtractionPatterns(content, filePath, fieldsToCheck) {
|
|
220
|
+
const issues = [];
|
|
221
|
+
const fileName = path_1.default.basename(filePath);
|
|
222
|
+
for (const fieldName of fieldsToCheck) {
|
|
223
|
+
const fieldConfig = CRITICAL_FIELD_PATTERNS[fieldName];
|
|
224
|
+
if (!fieldConfig)
|
|
225
|
+
continue;
|
|
226
|
+
// Check required patterns for this field
|
|
227
|
+
for (const pattern of fieldConfig.requiredPatterns) {
|
|
228
|
+
// Look for various ways the pattern might be checked
|
|
229
|
+
const patternChecks = [
|
|
230
|
+
new RegExp(`getMetaValue\\s*\\(\\s*["']${pattern}["']\\s*\\)`, "i"),
|
|
231
|
+
new RegExp(`\\.key\\s*===?\\s*["']${pattern}["']`, "i"),
|
|
232
|
+
new RegExp(`\\.key.*includes\\s*\\(\\s*["']${pattern}["']\\s*\\)`, "i"),
|
|
233
|
+
new RegExp(`["']${pattern}["']`, "i"), // Simple string presence as fallback
|
|
234
|
+
];
|
|
235
|
+
const hasPattern = patternChecks.some((check) => check.test(content));
|
|
236
|
+
if (!hasPattern) {
|
|
237
|
+
const issueType = fieldConfig.severity === "critical" ? "error" : "warning";
|
|
238
|
+
issues.push({
|
|
239
|
+
file: filePath,
|
|
240
|
+
fileName,
|
|
241
|
+
type: issueType,
|
|
242
|
+
field: fieldName,
|
|
243
|
+
message: `Missing ${fieldName} extraction pattern: "${pattern}"`,
|
|
244
|
+
details: `${fieldConfig.description}. The file does not check for "${pattern}".`,
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
// Check advisory patterns (always warnings)
|
|
249
|
+
for (const pattern of fieldConfig.advisoryPatterns) {
|
|
250
|
+
const hasPattern = new RegExp(`["']${pattern}["']`, "i").test(content);
|
|
251
|
+
if (!hasPattern && fieldConfig.severity === "critical") {
|
|
252
|
+
issues.push({
|
|
253
|
+
file: filePath,
|
|
254
|
+
fileName,
|
|
255
|
+
type: "warning",
|
|
256
|
+
field: fieldName,
|
|
257
|
+
message: `Consider adding ${fieldName} pattern: "${pattern}"`,
|
|
258
|
+
details: `Adding "${pattern}" would improve compatibility with more data sources.`,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return issues;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Check for forbidden hardcoded default values across ALL fields
|
|
267
|
+
*/
|
|
268
|
+
function checkAllForbiddenDefaults(content, filePath, fieldsToCheck) {
|
|
269
|
+
const issues = [];
|
|
270
|
+
const fileName = path_1.default.basename(filePath);
|
|
271
|
+
for (const fieldName of fieldsToCheck) {
|
|
272
|
+
const fieldConfig = CRITICAL_FIELD_PATTERNS[fieldName];
|
|
273
|
+
if (!fieldConfig)
|
|
274
|
+
continue;
|
|
275
|
+
for (const forbidden of fieldConfig.forbiddenDefaults) {
|
|
276
|
+
if (content.includes(forbidden)) {
|
|
277
|
+
issues.push({
|
|
278
|
+
file: filePath,
|
|
279
|
+
fileName,
|
|
280
|
+
type: fieldConfig.severity === "critical" ? "error" : "warning",
|
|
281
|
+
field: fieldName,
|
|
282
|
+
message: `Hardcoded ${fieldName} default found: ${forbidden}`,
|
|
283
|
+
details: `${fieldConfig.description}. Extract from source data instead of hardcoding.`,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return issues;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Check Shopify metafield extraction covers all critical fields
|
|
292
|
+
*/
|
|
293
|
+
function checkShopifyMetafieldExtraction(content, filePath, fieldsToCheck) {
|
|
294
|
+
const issues = [];
|
|
295
|
+
const fileName = path_1.default.basename(filePath);
|
|
296
|
+
// First check: No empty cardNumber in catalog creation (legacy check)
|
|
297
|
+
const emptyCardNumberInCatalog = /findOrCreateCardCatalog\s*\(\s*\{[\s\S]*?cardNumber\s*:\s*["']["']/;
|
|
298
|
+
if (emptyCardNumberInCatalog.test(content)) {
|
|
299
|
+
issues.push({
|
|
300
|
+
file: filePath,
|
|
301
|
+
fileName,
|
|
302
|
+
type: "error",
|
|
303
|
+
field: "cardNumber",
|
|
304
|
+
message: "Shopify import uses empty cardNumber in catalog creation",
|
|
305
|
+
details: "The cardNumber should be extracted from Shopify metafields, not set to empty string.",
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
// Check for getMetafieldValue helper function
|
|
309
|
+
const hasMetafieldHelper = content.includes("getMetafieldValue");
|
|
310
|
+
if (!hasMetafieldHelper) {
|
|
311
|
+
issues.push({
|
|
312
|
+
file: filePath,
|
|
313
|
+
fileName,
|
|
314
|
+
type: "error",
|
|
315
|
+
field: "all",
|
|
316
|
+
message: "Shopify import missing metafield extraction helper",
|
|
317
|
+
details: "Should have a getMetafieldValue helper to extract card data from Shopify metafields.",
|
|
318
|
+
});
|
|
319
|
+
return issues;
|
|
320
|
+
}
|
|
321
|
+
// Check each field is being extracted
|
|
322
|
+
for (const fieldName of fieldsToCheck) {
|
|
323
|
+
const fieldConfig = CRITICAL_FIELD_PATTERNS[fieldName];
|
|
324
|
+
if (!fieldConfig)
|
|
325
|
+
continue;
|
|
326
|
+
// Check that the field patterns are being used in getMetafieldValue calls
|
|
327
|
+
let hasFieldExtraction = false;
|
|
328
|
+
for (const pattern of fieldConfig.requiredPatterns) {
|
|
329
|
+
if (content.includes(`"${pattern}"`) || content.includes(`'${pattern}'`)) {
|
|
330
|
+
hasFieldExtraction = true;
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
if (!hasFieldExtraction && fieldConfig.severity === "critical") {
|
|
335
|
+
issues.push({
|
|
336
|
+
file: filePath,
|
|
337
|
+
fileName,
|
|
338
|
+
type: "error",
|
|
339
|
+
field: fieldName,
|
|
340
|
+
message: `Shopify import not extracting ${fieldName} from metafields`,
|
|
341
|
+
details: `${fieldConfig.description}. Add extraction for patterns: ${fieldConfig.requiredPatterns.join(", ")}`,
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return issues;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Check CSV import has header aliases for ALL critical field variations
|
|
349
|
+
*/
|
|
350
|
+
function checkCsvHeaderAliases(content, filePath, fieldsToCheck) {
|
|
351
|
+
const issues = [];
|
|
352
|
+
const fileName = path_1.default.basename(filePath);
|
|
353
|
+
// Check for HEADER_ALIASES constant
|
|
354
|
+
const hasAliasConst = content.includes("HEADER_ALIASES");
|
|
355
|
+
if (!hasAliasConst) {
|
|
356
|
+
issues.push({
|
|
357
|
+
file: filePath,
|
|
358
|
+
fileName,
|
|
359
|
+
type: "error",
|
|
360
|
+
field: "all",
|
|
361
|
+
message: "CSV import missing HEADER_ALIASES for column name normalization",
|
|
362
|
+
details: "Users may have different column names that need to be aliased to standard names.",
|
|
363
|
+
});
|
|
364
|
+
return issues;
|
|
365
|
+
}
|
|
366
|
+
// Check critical field aliases
|
|
367
|
+
const criticalAliases = {
|
|
368
|
+
cardNumber: ["card_number", "number"],
|
|
369
|
+
year: ["card_year"],
|
|
370
|
+
brand: ["manufacturer"],
|
|
371
|
+
featured: ["player", "player_name", "athlete"],
|
|
372
|
+
};
|
|
373
|
+
for (const fieldName of fieldsToCheck) {
|
|
374
|
+
const aliases = criticalAliases[fieldName];
|
|
375
|
+
if (!aliases)
|
|
376
|
+
continue;
|
|
377
|
+
for (const alias of aliases) {
|
|
378
|
+
// Check for alias mapping (e.g., "card_number": "cardnumber")
|
|
379
|
+
const hasAlias = content.toLowerCase().includes(`"${alias}"`) ||
|
|
380
|
+
content.toLowerCase().includes(`'${alias}'`);
|
|
381
|
+
if (!hasAlias) {
|
|
382
|
+
issues.push({
|
|
383
|
+
file: filePath,
|
|
384
|
+
fileName,
|
|
385
|
+
type: "warning",
|
|
386
|
+
field: fieldName,
|
|
387
|
+
message: `CSV import missing "${alias}" alias for ${fieldName}`,
|
|
388
|
+
details: `Users with a "${alias}" column header should have it mapped to ${fieldName}.`,
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
return issues;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Check field mapping UI has both underscore and camelCase sources for critical fields
|
|
397
|
+
*/
|
|
398
|
+
function checkFieldMappingSources(content, filePath) {
|
|
399
|
+
const issues = [];
|
|
400
|
+
const fileName = path_1.default.basename(filePath);
|
|
401
|
+
// Check cardNumber patterns
|
|
402
|
+
const hasUnderscoreCardNumber = content.includes("meta_data.card_number");
|
|
403
|
+
const hasCamelCaseCardNumber = content.includes("meta_data.cardNumber");
|
|
404
|
+
if (!hasUnderscoreCardNumber) {
|
|
405
|
+
issues.push({
|
|
406
|
+
file: filePath,
|
|
407
|
+
fileName,
|
|
408
|
+
type: "error",
|
|
409
|
+
field: "cardNumber",
|
|
410
|
+
message: "Missing meta_data.card_number in field mapping sources",
|
|
411
|
+
details: "Users need to be able to map from the underscore format (most common in WooCommerce).",
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
if (!hasCamelCaseCardNumber) {
|
|
415
|
+
issues.push({
|
|
416
|
+
file: filePath,
|
|
417
|
+
fileName,
|
|
418
|
+
type: "warning",
|
|
419
|
+
field: "cardNumber",
|
|
420
|
+
message: "Consider adding meta_data.cardNumber to field mapping sources",
|
|
421
|
+
details: "Some WooCommerce setups use camelCase for field names.",
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
// Check year patterns
|
|
425
|
+
const hasYear = content.includes("meta_data.year");
|
|
426
|
+
const hasCardYear = content.includes("meta_data.card_year");
|
|
427
|
+
if (!hasYear && !hasCardYear) {
|
|
428
|
+
issues.push({
|
|
429
|
+
file: filePath,
|
|
430
|
+
fileName,
|
|
431
|
+
type: "warning",
|
|
432
|
+
field: "year",
|
|
433
|
+
message: "Consider adding year field mapping sources",
|
|
434
|
+
details: "Year is critical for card identification. Add meta_data.year and meta_data.card_year.",
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
return issues;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Check smart mapping generator prioritizes correct formats for all fields
|
|
441
|
+
*/
|
|
442
|
+
function checkSmartMappingPriority(content, filePath) {
|
|
443
|
+
const issues = [];
|
|
444
|
+
const fileName = path_1.default.basename(filePath);
|
|
445
|
+
// Check cardNumber mapping
|
|
446
|
+
const usesUnderscoreCardNumber = /addMapping\s*\(\s*["']meta_data\.card_number["']/.test(content);
|
|
447
|
+
const usesCamelCaseCardNumber = /addMapping\s*\(\s*["']meta_data\.cardNumber["']/.test(content);
|
|
448
|
+
if (!usesUnderscoreCardNumber && usesCamelCaseCardNumber) {
|
|
449
|
+
issues.push({
|
|
450
|
+
file: filePath,
|
|
451
|
+
fileName,
|
|
452
|
+
type: "error",
|
|
453
|
+
field: "cardNumber",
|
|
454
|
+
message: "Smart mapping should use meta_data.card_number (underscore)",
|
|
455
|
+
details: "The underscore format is most common in WooCommerce. Change from cardNumber to card_number.",
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
if (!usesUnderscoreCardNumber && !usesCamelCaseCardNumber) {
|
|
459
|
+
issues.push({
|
|
460
|
+
file: filePath,
|
|
461
|
+
fileName,
|
|
462
|
+
type: "error",
|
|
463
|
+
field: "cardNumber",
|
|
464
|
+
message: "Smart mapping is missing cardNumber field mapping",
|
|
465
|
+
details: "The cardNumber field must be included in smart field mappings.",
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
// Check year mapping
|
|
469
|
+
const hasYearMapping = /addMapping\s*\(\s*["']meta_data\.year/.test(content);
|
|
470
|
+
if (!hasYearMapping) {
|
|
471
|
+
issues.push({
|
|
472
|
+
file: filePath,
|
|
473
|
+
fileName,
|
|
474
|
+
type: "warning",
|
|
475
|
+
field: "year",
|
|
476
|
+
message: "Smart mapping should include year field",
|
|
477
|
+
details: "Year is critical for card identification.",
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
// Check brand mapping
|
|
481
|
+
const hasBrandMapping = /addMapping\s*\(\s*["']meta_data\.brand/.test(content);
|
|
482
|
+
if (!hasBrandMapping) {
|
|
483
|
+
issues.push({
|
|
484
|
+
file: filePath,
|
|
485
|
+
fileName,
|
|
486
|
+
type: "warning",
|
|
487
|
+
field: "brand",
|
|
488
|
+
message: "Smart mapping should include brand field",
|
|
489
|
+
details: "Brand is critical for card identification.",
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
return issues;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Main run function
|
|
496
|
+
*/
|
|
497
|
+
async function run() {
|
|
498
|
+
console.log((0, console_chars_1.createDivider)());
|
|
499
|
+
console.log(`${console_chars_1.emoji.search} Checking integration field coverage across ALL integration points...`);
|
|
500
|
+
console.log();
|
|
501
|
+
const allIssues = [];
|
|
502
|
+
for (const integration of INTEGRATION_FILES) {
|
|
503
|
+
if (!fs_1.default.existsSync(integration.path)) {
|
|
504
|
+
console.log(` ${console_chars_1.emoji.warning} File not found: ${integration.path}`);
|
|
505
|
+
continue;
|
|
506
|
+
}
|
|
507
|
+
const content = fs_1.default.readFileSync(integration.path, "utf-8");
|
|
508
|
+
const fieldsToCheck = integration.fieldsToCheck || ["cardNumber"];
|
|
509
|
+
console.log(` ${console_chars_1.emoji.search} Checking ${integration.name} (${fieldsToCheck.length} fields)...`);
|
|
510
|
+
for (const check of integration.checks) {
|
|
511
|
+
let issues = [];
|
|
512
|
+
switch (check) {
|
|
513
|
+
case "all_extraction_patterns":
|
|
514
|
+
issues = checkAllExtractionPatterns(content, integration.path, fieldsToCheck);
|
|
515
|
+
break;
|
|
516
|
+
case "all_forbidden_defaults":
|
|
517
|
+
issues = checkAllForbiddenDefaults(content, integration.path, fieldsToCheck);
|
|
518
|
+
break;
|
|
519
|
+
case "shopify_metafield_extraction":
|
|
520
|
+
issues = checkShopifyMetafieldExtraction(content, integration.path, fieldsToCheck);
|
|
521
|
+
break;
|
|
522
|
+
case "csv_header_aliases":
|
|
523
|
+
issues = checkCsvHeaderAliases(content, integration.path, fieldsToCheck);
|
|
524
|
+
break;
|
|
525
|
+
case "field_mapping_sources":
|
|
526
|
+
issues = checkFieldMappingSources(content, integration.path);
|
|
527
|
+
break;
|
|
528
|
+
case "smart_mapping_priority":
|
|
529
|
+
issues = checkSmartMappingPriority(content, integration.path);
|
|
530
|
+
break;
|
|
531
|
+
}
|
|
532
|
+
allIssues.push(...issues);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
console.log();
|
|
536
|
+
// Report results
|
|
537
|
+
const errors = allIssues.filter((i) => i.type === "error");
|
|
538
|
+
const warnings = allIssues.filter((i) => i.type === "warning");
|
|
539
|
+
if (allIssues.length === 0) {
|
|
540
|
+
console.log(`${console_chars_1.emoji.success} All integration field mappings have comprehensive coverage!`);
|
|
541
|
+
console.log();
|
|
542
|
+
console.log(" Verified:");
|
|
543
|
+
for (const integration of INTEGRATION_FILES) {
|
|
544
|
+
if (fs_1.default.existsSync(integration.path)) {
|
|
545
|
+
console.log(` ${console_chars_1.emoji.success} ${integration.name}`);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
console.log();
|
|
549
|
+
console.log(" Critical fields checked:");
|
|
550
|
+
for (const [fieldName, config] of Object.entries(CRITICAL_FIELD_PATTERNS)) {
|
|
551
|
+
console.log(` ${console_chars_1.emoji.success} ${fieldName} (${config.severity}): ${config.requiredPatterns.join(", ")}`);
|
|
552
|
+
}
|
|
553
|
+
process.exit(0);
|
|
554
|
+
}
|
|
555
|
+
// Group issues by field
|
|
556
|
+
const issuesByField = {};
|
|
557
|
+
for (const issue of allIssues) {
|
|
558
|
+
const field = issue.field || "general";
|
|
559
|
+
if (!issuesByField[field])
|
|
560
|
+
issuesByField[field] = [];
|
|
561
|
+
issuesByField[field].push(issue);
|
|
562
|
+
}
|
|
563
|
+
// Show errors
|
|
564
|
+
if (errors.length > 0) {
|
|
565
|
+
console.log(`${console_chars_1.emoji.error} CRITICAL: ${errors.length} error(s) will cause data loss during import!`);
|
|
566
|
+
console.log();
|
|
567
|
+
for (const issue of errors) {
|
|
568
|
+
console.log(` ${console_chars_1.emoji.error} [${issue.field || "general"}] ${issue.fileName}`);
|
|
569
|
+
console.log(` ${issue.message}`);
|
|
570
|
+
if (issue.details) {
|
|
571
|
+
console.log(` → ${issue.details}`);
|
|
572
|
+
}
|
|
573
|
+
console.log();
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
// Show warnings
|
|
577
|
+
if (warnings.length > 0) {
|
|
578
|
+
console.log(`${console_chars_1.emoji.warning} ${warnings.length} warning(s) (recommended improvements):`);
|
|
579
|
+
console.log();
|
|
580
|
+
for (const issue of warnings) {
|
|
581
|
+
console.log(` ${console_chars_1.emoji.warning} [${issue.field || "general"}] ${issue.fileName}: ${issue.message}`);
|
|
582
|
+
}
|
|
583
|
+
console.log();
|
|
584
|
+
}
|
|
585
|
+
console.log((0, console_chars_1.createDivider)());
|
|
586
|
+
console.log(`${console_chars_1.emoji.info} HOW TO FIX:`);
|
|
587
|
+
console.log(`${console_chars_1.emoji.info} 1. For extraction patterns: Add checks for all common field naming variations`);
|
|
588
|
+
console.log(`${console_chars_1.emoji.info} Example: getMetaValue("card_number") || getMetaValue("cardNumber") || getMetaValue("number")`);
|
|
589
|
+
console.log(`${console_chars_1.emoji.info} 2. For forbidden defaults: Extract from source data, don't use empty/hardcoded values`);
|
|
590
|
+
console.log(`${console_chars_1.emoji.info} 3. For all fields: Check CRITICAL_FIELD_PATTERNS for required naming patterns`);
|
|
591
|
+
console.log();
|
|
592
|
+
process.exit(errors.length > 0 ? 1 : 0);
|
|
593
|
+
}
|
|
594
|
+
// Allow direct execution
|
|
595
|
+
if (require.main === module) {
|
|
596
|
+
run().catch((error) => {
|
|
597
|
+
console.error("Preflight failed:", error);
|
|
598
|
+
process.exit(1);
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
//# sourceMappingURL=integration-field-coverage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-field-coverage.js","sourceRoot":"","sources":["../../../src/checks/integrations/integration-field-coverage.ts"],"names":[],"mappings":";;;;;;;AAqiBA,kBA6GC;AAjpBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,4CAAoB;AACpB,gDAAwB;AACxB,6DAAiE;AAEjE,kDAAkD;AACrC,QAAA,EAAE,GAAG,6BAA6B,CAAC;AACnC,QAAA,IAAI,GAAG,4BAA4B,CAAC;AACpC,QAAA,WAAW,GAAG,mFAAmF,CAAC;AAClG,QAAA,QAAQ,GAAG,cAAc,CAAC;AAC1B,QAAA,QAAQ,GAAG,IAAI,CAAC,CAAC,gCAAgC;AACjD,QAAA,IAAI,GAAG,CAAC,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,CAAC,CAAC;AACxG,QAAA,QAAQ,GAAG,CAAC,qBAAqB,CAAC,CAAC;AAEhD;;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G,CAAC,CAAC;IAC7H,OAAO,CAAC,GAAG,CAAC,GAAG,qBAAK,CAAC,IAAI,wFAAwF,CAAC,CAAC;IACnH,OAAO,CAAC,GAAG,CAAC,GAAG,qBAAK,CAAC,IAAI,gFAAgF,CAAC,CAAC;IAC3G,OAAO,CAAC,GAAG,EAAE,CAAC;IAEd,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,yBAAyB;AACzB,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACpB,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;QAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empline/preflight",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.25",
|
|
4
4
|
"description": "Distributable preflight validation system with app-specific plugin support",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "tsc",
|
|
22
|
-
"prebuild": "npm run check:hygiene && npm run check:metadata && npm run check:broken",
|
|
22
|
+
"prebuild": "npx ai-manager cleanup -q -r . && npm run check:hygiene && npm run check:metadata && npm run check:broken",
|
|
23
23
|
"dev": "tsc --watch",
|
|
24
24
|
"preflight": "tsx src/bin/preflight.ts",
|
|
25
25
|
"check:system": "tsx src/bin/preflight.ts --category system",
|