@taskmagic/pieces-framework
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "@taskmagic/pieces-framework", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"type": "commonjs", | ||
@@ -13,3 +13,3 @@ "dependencies": { | ||
"semver": "7.5.4", | ||
"@taskmagic/shared": "1.0.5", | ||
"@taskmagic/shared": "0.10.29", | ||
"tslib": "2.6.1" | ||
@@ -16,0 +16,0 @@ }, |
@@ -11,2 +11,3 @@ import { ProjectId } from "@taskmagic/shared"; | ||
projectId?: ProjectId; | ||
platformId?: string; | ||
directoryName?: string; | ||
@@ -13,0 +14,0 @@ auth?: PieceAuthProperty; |
@@ -23,3 +23,4 @@ export declare enum ErrorMessages { | ||
SIZE = "The {property} size must be less than 0:{size}KB", | ||
NON_ZERO = "The value: {userInput} must be a non-zero value" | ||
NON_ZERO = "The value: {userInput} must be a non-zero value", | ||
PHONE_NUMBER = "The phone number entered is not a valid phone number" | ||
} |
@@ -28,3 +28,4 @@ "use strict"; | ||
ErrorMessages["NON_ZERO"] = "The value: {userInput} must be a non-zero value"; | ||
ErrorMessages["PHONE_NUMBER"] = "The phone number entered is not a valid phone number"; | ||
})(ErrorMessages || (exports.ErrorMessages = ErrorMessages = {})); | ||
//# sourceMappingURL=errors.js.map |
@@ -24,2 +24,3 @@ import { ErrorMessages } from './errors'; | ||
static file: TypedValidatorFn<ValidationInputType.FILE>; | ||
static phoneNumber: TypedValidatorFn<ValidationInputType.STRING>; | ||
static oneOf(values: unknown[]): TypedValidatorFn<any>; | ||
@@ -26,0 +27,0 @@ static requireKeys(values: string[]): TypedValidatorFn<ValidationInputType.OBJECT>; |
@@ -304,2 +304,13 @@ "use strict"; | ||
}; | ||
Validators.phoneNumber = { | ||
type: types_1.ValidationInputType.STRING, | ||
fn: (property, processedValue, userInput) => { | ||
const pattern = new RegExp('^\\+?\\d{1,4}?[-.\\s]?\\(?\\d{1,3}?\\)?[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,9}$'); | ||
if ((0, lodash_1.isEmpty)(processedValue)) | ||
return null; | ||
return pattern.test(String(processedValue)) | ||
? null | ||
: (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.PHONE_NUMBER, { userInput }); | ||
}, | ||
}; | ||
//# sourceMappingURL=validators.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
91010
1318
1
+ Added@taskmagic/shared@0.10.29(transitive)
- Removed@taskmagic/shared@1.0.5(transitive)
- Removedtslib@2.6.2(transitive)
Updated@taskmagic/shared@0.10.29