@grouparoo/app-templates
Advanced tools
Comparing version 0.7.4-alpha.1 to 0.7.4-alpha.2
@@ -62,3 +62,3 @@ "use strict"; | ||
function verifyProcessed(exportedRecord) { | ||
const { destinationId, processed, error, shouldCreate, shouldUpdate, shouldDelete, } = exportedRecord; | ||
const { recordId, destinationId, processed, error, shouldCreate, shouldUpdate, shouldDelete, } = exportedRecord; | ||
let needProcessed = false; | ||
@@ -77,6 +77,6 @@ let needDestinationId = false; | ||
if (needProcessed && !processed) { | ||
throw new Error(`record has not processed: ${exportedRecord.foreignKeyValue}`); | ||
throw new Error(`record (${recordId}) has not processed: ${exportedRecord.foreignKeyValue}`); | ||
} | ||
if (needDestinationId && !destinationId) { | ||
throw new Error(`record does not have a destination id: ${exportedRecord.foreignKeyValue}`); | ||
throw new Error(`record (${recordId}) does not have a destination id: ${exportedRecord.foreignKeyValue}`); | ||
} | ||
@@ -231,3 +231,3 @@ } | ||
if (!exportedRecord.destinationId) { | ||
throw new Error(`cannot update without destinationId: ${exportedRecord.foreignKeyValue}`); | ||
throw new Error(`cannot update without destinationId: ${exportedRecord.foreignKeyValue} for record ${exportedRecord.recordId}`); | ||
} | ||
@@ -234,0 +234,0 @@ if (currentCount >= config.batchSize) { |
@@ -9,3 +9,3 @@ import { PluginConnection, ExecuteQueryMethod, ValidateQueryMethod, GetChangedRowsMethod } from "./options"; | ||
description: string; | ||
app: string; | ||
apps: string[]; | ||
tableOptionDescription?: string; | ||
@@ -12,0 +12,0 @@ tableOptionDisplayName?: string; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const options_1 = require("./options"); | ||
const buildConnection = ({ name, displayName, description, app, tableOptionDescription = null, options = [], executeQuery, getChangedRows, validateQuery = options_1.validateGenericQuery, getTables, }) => { | ||
const buildConnection = ({ name, displayName, description, apps, tableOptionDescription = null, options = [], executeQuery, getChangedRows, validateQuery = options_1.validateGenericQuery, getTables, }) => { | ||
const sourceOptions = (0, options_1.getSourceOptions)({ getTables }); | ||
@@ -21,3 +21,3 @@ const recordProperty = (0, options_1.getRecordProperty)({ | ||
description, | ||
app, | ||
apps, | ||
options, | ||
@@ -24,0 +24,0 @@ skipSourceMapping: true, |
@@ -7,3 +7,3 @@ import { GetSampleRowsMethod, GetTablesMethod, GetColumnDefinitionsMethod, PluginConnection, GetChangedRowsMethod, GetPropertyValueMethod, GetPropertyValuesMethod, GetChangedRowCountMethod, SourceOptionsExtra } from "./options"; | ||
description: string; | ||
app: string; | ||
apps: string[]; | ||
tableOptionDescription?: string; | ||
@@ -10,0 +10,0 @@ tableOptionDisplayName?: string; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const options_1 = require("./options"); | ||
const buildConnection = ({ name, displayName, description, app, tableOptionDescription = null, tableOptionDisplayName = null, sourceOptions: additionalOptions, getSampleRows, getColumns, getTables, getChangedRows, getPropertyValue, getPropertyValues, getChangedRowCount, }) => { | ||
const buildConnection = ({ name, displayName, description, apps, tableOptionDescription = null, tableOptionDisplayName = null, sourceOptions: additionalOptions, getSampleRows, getColumns, getTables, getChangedRows, getPropertyValue, getPropertyValues, getChangedRowCount, }) => { | ||
const propertyOptions = async (args) => (0, options_1.getPropertyOptions)(args, { | ||
@@ -54,3 +54,3 @@ getSampleRows, | ||
description, | ||
app, | ||
apps, | ||
options, | ||
@@ -57,0 +57,0 @@ groupAggregations: [options_1.AggregationMethod.Exact], |
@@ -5,3 +5,3 @@ { | ||
"description": "Common patterns for Grouparoo plugins that contribute apps", | ||
"version": "0.7.4-alpha.1", | ||
"version": "0.7.4-alpha.2", | ||
"license": "MPL-2.0", | ||
@@ -32,4 +32,4 @@ "private": false, | ||
"devDependencies": { | ||
"@grouparoo/core": "0.7.4-alpha.1", | ||
"@grouparoo/spec-helper": "0.7.4-alpha.1", | ||
"@grouparoo/core": "0.7.4-alpha.2", | ||
"@grouparoo/spec-helper": "0.7.4-alpha.2", | ||
"@types/jest": "*", | ||
@@ -46,3 +46,3 @@ "@types/node": "*", | ||
}, | ||
"gitHead": "5f91bd0dd16e651874bda3f77b54740bb17f9879" | ||
"gitHead": "18b71667b1f7d14d25acbb3a929d6c41cc514175" | ||
} |
@@ -89,2 +89,3 @@ import { Errors } from "@grouparoo/core"; | ||
const { | ||
recordId, | ||
destinationId, | ||
@@ -115,3 +116,3 @@ processed, | ||
throw new Error( | ||
`record has not processed: ${exportedRecord.foreignKeyValue}` | ||
`record (${recordId}) has not processed: ${exportedRecord.foreignKeyValue}` | ||
); | ||
@@ -122,3 +123,3 @@ } | ||
throw new Error( | ||
`record does not have a destination id: ${exportedRecord.foreignKeyValue}` | ||
`record (${recordId}) does not have a destination id: ${exportedRecord.foreignKeyValue}` | ||
); | ||
@@ -321,3 +322,3 @@ } | ||
throw new Error( | ||
`cannot update without destinationId: ${exportedRecord.foreignKeyValue}` | ||
`cannot update without destinationId: ${exportedRecord.foreignKeyValue} for record ${exportedRecord.recordId}` | ||
); | ||
@@ -324,0 +325,0 @@ } |
@@ -25,3 +25,3 @@ import { | ||
description: string; | ||
app: string; | ||
apps: string[]; | ||
tableOptionDescription?: string; | ||
@@ -41,3 +41,3 @@ tableOptionDisplayName?: string; | ||
description, | ||
app, | ||
apps, | ||
tableOptionDescription = null, | ||
@@ -69,3 +69,3 @@ options = [], | ||
description, | ||
app, | ||
apps, | ||
options, | ||
@@ -72,0 +72,0 @@ skipSourceMapping: true, |
@@ -40,3 +40,3 @@ import { | ||
description: string; | ||
app: string; | ||
apps: string[]; | ||
tableOptionDescription?: string; | ||
@@ -59,3 +59,3 @@ tableOptionDisplayName?: string; | ||
description, | ||
app, | ||
apps, | ||
tableOptionDescription = null, | ||
@@ -125,3 +125,3 @@ tableOptionDisplayName = null, | ||
description, | ||
app, | ||
apps, | ||
options, | ||
@@ -128,0 +128,0 @@ groupAggregations: [AggregationMethod.Exact], |
242188
6539