lambda-serverless-api
Advanced tools
Comparing version 11.0.1 to 11.0.2
import get from 'lodash.get'; | ||
import pv from 'painless-version'; | ||
import { test } from 'painless-version'; | ||
import SwaggerParser from 'swagger-parser'; | ||
@@ -13,3 +13,3 @@ | ||
version: Object.keys(get(options, 'versioning.versions', { '0.0.1': '' })) | ||
.sort((a, b) => pv.test(`${a} < ${b}`))[0] | ||
.sort((a, b) => test(`${a} < ${b}`))[0] | ||
}, | ||
@@ -16,0 +16,0 @@ paths: {} |
import assert from 'assert'; | ||
import get from 'lodash.get'; | ||
import difference from 'lodash.difference'; | ||
import objectFields from 'object-fields'; | ||
import { Retainer, split } from 'object-fields'; | ||
import Str from './str.js'; | ||
@@ -32,3 +32,3 @@ | ||
assert(typeof this.autoPrune === 'string'); | ||
const retain = objectFields.Retainer(parsedFields); | ||
const retain = Retainer(parsedFields); | ||
retain(this.autoPrune === '' | ||
@@ -41,3 +41,3 @@ ? apiResponse.payload | ||
let valid = super.validate(value); | ||
if (valid && difference(objectFields.split(value), FieldsParam.evaluatePaths(this.fields)).length !== 0) { | ||
if (valid && difference(split(value), FieldsParam.evaluatePaths(this.fields)).length !== 0) { | ||
valid = false; | ||
@@ -51,3 +51,3 @@ } | ||
if (typeof result === 'string') { | ||
result = objectFields.split(result); | ||
result = split(result); | ||
} | ||
@@ -54,0 +54,0 @@ this.enforce.forEach((field) => { |
@@ -5,3 +5,3 @@ import get from 'lodash.get'; | ||
import Joi from 'joi-strict'; | ||
import pv from 'painless-version'; | ||
import { test, updateDeprecationHeaders } from 'painless-version'; | ||
import { logger } from 'lambda-monitor-logger'; | ||
@@ -23,3 +23,3 @@ import { Plugin } from '../plugin.js'; | ||
.map(([version, date]) => ({ version, date, unix: Date.parse(date) })) | ||
.sort((a, b) => (pv.test(`${a.version} < ${b.version}`) ? -1 : 1)) | ||
.sort((a, b) => (test(`${a.version} < ${b.version}`) ? -1 : 1)) | ||
.map((e, idx, arr) => Object.assign(e, { | ||
@@ -74,3 +74,3 @@ isDeprecated: arr[idx + 1] !== undefined, | ||
const deprecated = get(request, 'options.deprecated'); | ||
if (deprecated !== undefined && pv.test(`${deprecated} <= ${apiVersion}`)) { | ||
if (deprecated !== undefined && test(`${deprecated} <= ${apiVersion}`)) { | ||
throw ApiErrorFn(`Endpoint deprecated since version "${deprecated}"`, 403); | ||
@@ -102,3 +102,3 @@ } | ||
} | ||
pv.updateDeprecationHeaders(response.headers, { deprecationDate, sunsetDate }); | ||
updateDeprecationHeaders(response.headers, { deprecationDate, sunsetDate }); | ||
} | ||
@@ -105,0 +105,0 @@ }; |
@@ -17,8 +17,8 @@ { | ||
"devDependencies": { | ||
"@aws-sdk/client-s3": "^3.379.1", | ||
"@aws-sdk/client-s3": "^3.385.0", | ||
"@babel/core": "7.22.9", | ||
"@babel/eslint-parser": "7.22.9", | ||
"@babel/register": "7.22.5", | ||
"@blackflux/eslint-plugin-rules": "2.1.0", | ||
"@blackflux/robo-config-plugin": "9.0.7", | ||
"@blackflux/eslint-plugin-rules": "3.0.0", | ||
"@blackflux/robo-config-plugin": "9.1.9", | ||
"c8": "8.0.1", | ||
@@ -32,12 +32,12 @@ "chai": "4.3.7", | ||
"eslint-plugin-mocha": "10.1.0", | ||
"js-gardener": "5.0.0", | ||
"lambda-tdd": "6.3.2", | ||
"js-gardener": "5.0.1", | ||
"lambda-tdd": "6.3.4", | ||
"minimist": "1.2.8", | ||
"moment-timezone": "0.5.43", | ||
"nock": "13.3.2", | ||
"node-tdd": "3.5.2", | ||
"node-tdd": "4.0.0", | ||
"request": "2.88.2", | ||
"request-promise": "4.2.6" | ||
}, | ||
"version": "11.0.1", | ||
"version": "11.0.2", | ||
"scripts": { | ||
@@ -82,6 +82,6 @@ "clean": "rm -rf lib", | ||
"@turf/kinks": "6.5.0", | ||
"aws-sdk-wrap": "13.0.4", | ||
"joi-strict": "2.0.1", | ||
"lambda-async": "2.0.1", | ||
"lambda-monitor-logger": "4.0.0", | ||
"aws-sdk-wrap": "13.0.6", | ||
"joi-strict": "3.0.0", | ||
"lambda-async": "3.0.0", | ||
"lambda-monitor-logger": "5.0.0", | ||
"lodash.clonedeep": "4.5.0", | ||
@@ -91,10 +91,10 @@ "lodash.difference": "4.5.0", | ||
"lodash.set": "4.3.2", | ||
"lru-cache-ext": "3.0.2", | ||
"object-fields": "3.0.1", | ||
"object-hash-strict": "3.0.1", | ||
"object-scan": "18.5.1", | ||
"painless-version": "2.0.1", | ||
"lru-cache-ext": "4.0.0", | ||
"object-fields": "4.0.0", | ||
"object-hash-strict": "4.0.0", | ||
"object-scan": "19.0.0", | ||
"painless-version": "3.0.0", | ||
"route-recognizer": "0.3.4", | ||
"serialize-error": "11.0.0", | ||
"smart-fs": "3.0.2", | ||
"serialize-error": "11.0.1", | ||
"smart-fs": "4.0.0", | ||
"swagger-parser": "10.0.3", | ||
@@ -101,0 +101,0 @@ "turf-polygon": "1.0.3" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101113
+ Addedaws-sdk-wrap@13.0.6(transitive)
+ Addedcompare-versions@6.0.0(transitive)
+ Addedjoi@17.9.2(transitive)
+ Addedjoi-strict@3.0.0(transitive)
+ Addedlambda-async@3.0.0(transitive)
+ Addedlambda-monitor-logger@5.0.0(transitive)
+ Addedlru-cache@10.0.0(transitive)
+ Addedlru-cache-ext@4.0.0(transitive)
+ Addedobject-fields@4.0.0(transitive)
+ Addedobject-hash@3.0.0(transitive)
+ Addedobject-hash-strict@4.0.0(transitive)
+ Addedobject-scan@19.0.0(transitive)
+ Addedpainless-version@3.0.0(transitive)
+ Addedpromise-pool-ext@3.0.0(transitive)
+ Addedserialize-error@11.0.1(transitive)
+ Addedsmart-fs@4.0.0(transitive)
- Removedaws-sdk-wrap@13.0.4(transitive)
- Removedcompare-versions@3.6.0(transitive)
- Removedjoi@17.4.0(transitive)
- Removedjoi-strict@2.0.0(transitive)
- Removedlru-cache@7.8.1(transitive)
- Removedlru-cache-ext@3.0.2(transitive)
- Removedpainless-version@2.0.1(transitive)
- Removedpromise-pool-ext@2.1.2(transitive)
- Removedserialize-error@11.0.0(transitive)
- Removedsmart-fs@3.0.2(transitive)
Updatedaws-sdk-wrap@13.0.6
Updatedjoi-strict@3.0.0
Updatedlambda-async@3.0.0
Updatedlambda-monitor-logger@5.0.0
Updatedlru-cache-ext@4.0.0
Updatedobject-fields@4.0.0
Updatedobject-hash-strict@4.0.0
Updatedobject-scan@19.0.0
Updatedpainless-version@3.0.0
Updatedserialize-error@11.0.1
Updatedsmart-fs@4.0.0