diff --git a/packages/plugin-js-lambda-microlib/src/MicroserviceType.ts b/packages/plugin-js-lambda-microlib/src/MicroserviceType.ts index f5c2c8a7..455adf58 100644 --- a/packages/plugin-js-lambda-microlib/src/MicroserviceType.ts +++ b/packages/plugin-js-lambda-microlib/src/MicroserviceType.ts @@ -411,6 +411,9 @@ export default class MicroserviceType { case 'value-cleared': requirements['isValueCleared'] = true; return `isValueCleared('${condition.attribute}', query)`; + case 'value-unemptied': + requirements['isValueUnemptied'] = true; + return `isValueUnemptied('${condition.attribute}', query)`; case 'eq': requirements['isEqualTo'] = true; return `isEqualTo('${condition.attribute}', '${condition.value}', query${this.buildDataKeyString(condition.dataKey)})`; diff --git a/packages/plugin-js-lambda-microlib/src/configs/conditions.ts b/packages/plugin-js-lambda-microlib/src/configs/conditions.ts index 413985cb..8a9c3458 100644 --- a/packages/plugin-js-lambda-microlib/src/configs/conditions.ts +++ b/packages/plugin-js-lambda-microlib/src/configs/conditions.ts @@ -12,7 +12,7 @@ const patterns = [ }, // $email[changed] { - pattern: /^\s*(\$)([a-z0-9_]+)\s*\[\s*(changed|cleared)\s*]\s*$/i, + pattern: /^\s*(\$)([a-z0-9_]+)\s*\[\s*(changed|cleared|unemptied)\s*]\s*$/i, build: (matches) => ({ type: `value-${matches[3]}`, attribute: matches[2],