@jackchuka/gql-ingest 2.0.0 → 2.0.1
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/bin/cli.js +37 -37
- package/package.json +1 -1
- package/src/cli.ts +4 -24
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -122,7 +122,9 @@ program
|
|
|
122
122
|
// When using --entities flag, show warnings instead of errors
|
|
123
123
|
console.warn("\n⚠️ Warning: Dependency validation issues:");
|
|
124
124
|
validationErrors.forEach((error) => console.warn(` - ${error}`));
|
|
125
|
-
console.warn(
|
|
125
|
+
console.warn(
|
|
126
|
+
"This may cause errors if the dependent data doesn't already exist.\n"
|
|
127
|
+
);
|
|
126
128
|
} else {
|
|
127
129
|
// Strict validation when processing all entities
|
|
128
130
|
console.error("Dependency validation errors:");
|
|
@@ -131,12 +133,7 @@ program
|
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
135
|
|
|
134
|
-
|
|
135
|
-
if (config.parallelProcessing.entityConcurrency === 1) {
|
|
136
|
-
await processEntitiesSequentially(mappingPaths, mapper, config);
|
|
137
|
-
} else {
|
|
138
|
-
await processEntitiesInWaves(mappingPaths, resolver, mapper, config);
|
|
139
|
-
}
|
|
136
|
+
await processEntitiesInWaves(mappingPaths, resolver, mapper, config);
|
|
140
137
|
|
|
141
138
|
metrics.finishProcessing();
|
|
142
139
|
console.log(metrics.generateSummary());
|
|
@@ -146,23 +143,6 @@ program
|
|
|
146
143
|
}
|
|
147
144
|
});
|
|
148
145
|
|
|
149
|
-
async function processEntitiesSequentially(
|
|
150
|
-
mappingPaths: string[],
|
|
151
|
-
mapper: DataMapper,
|
|
152
|
-
config: ReturnType<typeof loadConfig>
|
|
153
|
-
): Promise<void> {
|
|
154
|
-
for (const configPath of mappingPaths) {
|
|
155
|
-
try {
|
|
156
|
-
const entityName = basename(configPath, ".json");
|
|
157
|
-
const entityConfig = getEntityConfig(entityName, config);
|
|
158
|
-
const retryConfig = getRetryConfig(entityName, config);
|
|
159
|
-
await mapper.processEntity(configPath, entityConfig, retryConfig);
|
|
160
|
-
} catch (error) {
|
|
161
|
-
console.warn(`Warning: Could not process ${configPath}:`, error);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
146
|
async function processEntitiesInWaves(
|
|
167
147
|
mappingPaths: string[],
|
|
168
148
|
resolver: DependencyResolver,
|