@aws-lambda-powertools/jmespath 2.23.0 → 2.24.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/lib/cjs/Lexer.js +1 -1
- package/lib/cjs/ParsedResult.js +1 -1
- package/lib/cjs/Parser.d.ts.map +1 -1
- package/lib/cjs/Parser.js +2 -2
- package/lib/cjs/TreeInterpreter.js +1 -1
- package/lib/cjs/index.d.ts +1 -1
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +8 -8
- package/lib/cjs/types.d.ts +1 -1
- package/lib/cjs/types.d.ts.map +1 -1
- package/lib/cjs/utils.d.ts.map +1 -1
- package/lib/cjs/utils.js +0 -2
- package/lib/esm/Lexer.js +1 -1
- package/lib/esm/ParsedResult.js +1 -1
- package/lib/esm/Parser.d.ts.map +1 -1
- package/lib/esm/Parser.js +2 -2
- package/lib/esm/TreeInterpreter.js +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/types.d.ts +1 -1
- package/lib/esm/types.d.ts.map +1 -1
- package/lib/esm/utils.d.ts.map +1 -1
- package/lib/esm/utils.js +0 -2
- package/package.json +2 -2
- package/LICENSE +0 -14
package/lib/cjs/Lexer.js
CHANGED
package/lib/cjs/ParsedResult.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ParsedResult = void 0;
|
|
4
|
-
const TreeInterpreter_js_1 = require("./TreeInterpreter.js");
|
|
5
4
|
const errors_js_1 = require("./errors.js");
|
|
5
|
+
const TreeInterpreter_js_1 = require("./TreeInterpreter.js");
|
|
6
6
|
class ParsedResult {
|
|
7
7
|
expression;
|
|
8
8
|
parsed;
|
package/lib/cjs/Parser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parser.d.ts","sourceRoot":"","sources":["../../src/Parser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Parser.d.ts","sourceRoot":"","sources":["../../src/Parser.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;;;;;;;;;;;;GAaG;AACH,cAAM,MAAM;;gBAkBS,SAAS,SAAI;IAIhC;;;;;;;;OAQG;IACI,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY;IAc9C;;OAEG;IACI,UAAU,IAAI,IAAI;CAutB1B;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/lib/cjs/Parser.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Parser = void 0;
|
|
4
4
|
const node_crypto_1 = require("node:crypto");
|
|
5
|
-
const Lexer_js_1 = require("./Lexer.js");
|
|
6
|
-
const ParsedResult_js_1 = require("./ParsedResult.js");
|
|
7
5
|
const ast_js_1 = require("./ast.js");
|
|
8
6
|
const constants_js_1 = require("./constants.js");
|
|
9
7
|
const errors_js_1 = require("./errors.js");
|
|
8
|
+
const Lexer_js_1 = require("./Lexer.js");
|
|
9
|
+
const ParsedResult_js_1 = require("./ParsedResult.js");
|
|
10
10
|
/**
|
|
11
11
|
* Top down operaotr precedence parser for JMESPath.
|
|
12
12
|
*
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TreeInterpreter = void 0;
|
|
4
4
|
const typeutils_1 = require("@aws-lambda-powertools/commons/typeutils");
|
|
5
5
|
const Expression_js_1 = require("./Expression.js");
|
|
6
|
-
const Functions_js_1 = require("./Functions.js");
|
|
7
6
|
const errors_js_1 = require("./errors.js");
|
|
7
|
+
const Functions_js_1 = require("./Functions.js");
|
|
8
8
|
const utils_js_1 = require("./utils.js");
|
|
9
9
|
/**
|
|
10
10
|
*
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
export { ArityError, EmptyExpressionError, IncompleteExpressionError, JMESPathError, JMESPathTypeError, LexerError, ParseError, UnknownFunctionError, VariadicArityError, } from './errors.js';
|
|
1
2
|
export { search } from './search.js';
|
|
2
|
-
export { JMESPathError, LexerError, ParseError, IncompleteExpressionError, ArityError, VariadicArityError, JMESPathTypeError, EmptyExpressionError, UnknownFunctionError, } from './errors.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,yBAAyB,EACzB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var search_js_1 = require("./search.js");
|
|
5
|
-
Object.defineProperty(exports, "search", { enumerable: true, get: function () { return search_js_1.search; } });
|
|
3
|
+
exports.search = exports.VariadicArityError = exports.UnknownFunctionError = exports.ParseError = exports.LexerError = exports.JMESPathTypeError = exports.JMESPathError = exports.IncompleteExpressionError = exports.EmptyExpressionError = exports.ArityError = void 0;
|
|
6
4
|
var errors_js_1 = require("./errors.js");
|
|
5
|
+
Object.defineProperty(exports, "ArityError", { enumerable: true, get: function () { return errors_js_1.ArityError; } });
|
|
6
|
+
Object.defineProperty(exports, "EmptyExpressionError", { enumerable: true, get: function () { return errors_js_1.EmptyExpressionError; } });
|
|
7
|
+
Object.defineProperty(exports, "IncompleteExpressionError", { enumerable: true, get: function () { return errors_js_1.IncompleteExpressionError; } });
|
|
7
8
|
Object.defineProperty(exports, "JMESPathError", { enumerable: true, get: function () { return errors_js_1.JMESPathError; } });
|
|
9
|
+
Object.defineProperty(exports, "JMESPathTypeError", { enumerable: true, get: function () { return errors_js_1.JMESPathTypeError; } });
|
|
8
10
|
Object.defineProperty(exports, "LexerError", { enumerable: true, get: function () { return errors_js_1.LexerError; } });
|
|
9
11
|
Object.defineProperty(exports, "ParseError", { enumerable: true, get: function () { return errors_js_1.ParseError; } });
|
|
10
|
-
Object.defineProperty(exports, "IncompleteExpressionError", { enumerable: true, get: function () { return errors_js_1.IncompleteExpressionError; } });
|
|
11
|
-
Object.defineProperty(exports, "ArityError", { enumerable: true, get: function () { return errors_js_1.ArityError; } });
|
|
12
|
-
Object.defineProperty(exports, "VariadicArityError", { enumerable: true, get: function () { return errors_js_1.VariadicArityError; } });
|
|
13
|
-
Object.defineProperty(exports, "JMESPathTypeError", { enumerable: true, get: function () { return errors_js_1.JMESPathTypeError; } });
|
|
14
|
-
Object.defineProperty(exports, "EmptyExpressionError", { enumerable: true, get: function () { return errors_js_1.EmptyExpressionError; } });
|
|
15
12
|
Object.defineProperty(exports, "UnknownFunctionError", { enumerable: true, get: function () { return errors_js_1.UnknownFunctionError; } });
|
|
13
|
+
Object.defineProperty(exports, "VariadicArityError", { enumerable: true, get: function () { return errors_js_1.VariadicArityError; } });
|
|
14
|
+
var search_js_1 = require("./search.js");
|
|
15
|
+
Object.defineProperty(exports, "search", { enumerable: true, get: function () { return search_js_1.search; } });
|
package/lib/cjs/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JSONArray, JSONValue } from '@aws-lambda-powertools/commons/types';
|
|
2
|
-
import type { Functions } from './Functions.js';
|
|
3
2
|
import type { BINDING_POWER } from './constants.js';
|
|
3
|
+
import type { Functions } from './Functions.js';
|
|
4
4
|
/**
|
|
5
5
|
* A token in the JMESPath AST.
|
|
6
6
|
*/
|
package/lib/cjs/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACV,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACV,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,OAAO,aAAa,CAAC;IACjC,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;GAEG;AACH,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,KAAK,sBAAsB,GAAG;IAC5B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,KAAK,0BAA0B,GAAG,CAChC,MAAM,EAAE,SAAS,GAAG,OAAO,SAAS,EACpC,WAAW,EAAE,MAAM,GAAG,MAAM,EAC5B,UAAU,EAAE,kBAAkB,KAC3B,IAAI,CAAC;AAEV;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,K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
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAUA;;;;;;;;;GASG;AACH,QAAA,MAAM,QAAQ,GAAI,OAAO,OAAO,KAAG,OAKlC,CAAC;AA6BF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,UAAU,GAAI,CAAC,EAAE,8BAKpB;IACD,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,KAAG,CAAC,EAAE,GAAG,IA0BT,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,UAAU,GACd,MAAM,OAAO,EAAE,EACf,gBAAgB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EACpC,WAAW,OAAO,KACjB,IAcF,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,SAAS,GACb,MAAM,OAAO,EAAE,EACf,gBAAgB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,KACnC,IAKF,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,iBAAiB,GAAI,KAAK,OAAO,EAAE,cAAc,KAAK,CAAC,MAAM,CAAC,KAAG,IAMtE,CAAC;AA6IF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC"}
|
package/lib/cjs/utils.js
CHANGED
|
@@ -197,7 +197,6 @@ const checkIfArgumentTypeIsValid = (arg, type, index, argumentSpec) => {
|
|
|
197
197
|
}
|
|
198
198
|
if (['string', 'number', 'boolean'].includes(type)) {
|
|
199
199
|
typeCheckType(arg, type, argumentSpec, hasMoreTypesToCheck);
|
|
200
|
-
// biome-ignore lint/suspicious/useValidTypeof: we know that `type` is one of 'string', 'number', or 'boolean' because we checked for that above
|
|
201
200
|
if (typeof arg === type)
|
|
202
201
|
return true;
|
|
203
202
|
}
|
|
@@ -216,7 +215,6 @@ const checkIfArgumentTypeIsValid = (arg, type, index, argumentSpec) => {
|
|
|
216
215
|
* @param hasMoreTypesToCheck Whether there are more types to check
|
|
217
216
|
*/
|
|
218
217
|
const typeCheckType = (arg, type, argumentSpec, hasMoreTypesToCheck) => {
|
|
219
|
-
// biome-ignore lint/suspicious/useValidTypeof: we know that `type` is one of 'string', 'number', or 'boolean' because we checked before calling this function
|
|
220
218
|
if (typeof arg !== type && !hasMoreTypesToCheck) {
|
|
221
219
|
throw new errors_js_1.JMESPathTypeError({
|
|
222
220
|
currentValue: arg,
|
package/lib/esm/Lexer.js
CHANGED
package/lib/esm/ParsedResult.js
CHANGED
package/lib/esm/Parser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parser.d.ts","sourceRoot":"","sources":["../../src/Parser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Parser.d.ts","sourceRoot":"","sources":["../../src/Parser.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;;;;;;;;;;;;GAaG;AACH,cAAM,MAAM;;gBAkBS,SAAS,SAAI;IAIhC;;;;;;;;OAQG;IACI,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY;IAc9C;;OAEG;IACI,UAAU,IAAI,IAAI;CAutB1B;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/lib/esm/Parser.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { randomInt } from 'node:crypto';
|
|
2
|
-
import { Lexer } from './Lexer.js';
|
|
3
|
-
import { ParsedResult } from './ParsedResult.js';
|
|
4
2
|
import { andExpression, comparator, currentNode, expref, field, filterProjection, flatten, functionExpression, identity, index, indexExpression, keyValPair, literal, multiSelectList, multiSelectObject, notExpression, orExpression, pipe, projection, slice, subexpression, valueProjection, } from './ast.js';
|
|
5
3
|
import { BINDING_POWER } from './constants.js';
|
|
6
4
|
import { IncompleteExpressionError, LexerError, ParseError } from './errors.js';
|
|
5
|
+
import { Lexer } from './Lexer.js';
|
|
6
|
+
import { ParsedResult } from './ParsedResult.js';
|
|
7
7
|
/**
|
|
8
8
|
* Top down operaotr precedence parser for JMESPath.
|
|
9
9
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isIntegerNumber, isRecord, isStrictEqual, } from '@aws-lambda-powertools/commons/typeutils';
|
|
2
2
|
import { Expression } from './Expression.js';
|
|
3
|
-
import { Functions } from './Functions.js';
|
|
4
3
|
import { ArityError, JMESPathError, JMESPathTypeError, UnknownFunctionError, VariadicArityError, } from './errors.js';
|
|
4
|
+
import { Functions } from './Functions.js';
|
|
5
5
|
import { isTruthy, sliceArray } from './utils.js';
|
|
6
6
|
/**
|
|
7
7
|
*
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
export { ArityError, EmptyExpressionError, IncompleteExpressionError, JMESPathError, JMESPathTypeError, LexerError, ParseError, UnknownFunctionError, VariadicArityError, } from './errors.js';
|
|
1
2
|
export { search } from './search.js';
|
|
2
|
-
export { JMESPathError, LexerError, ParseError, IncompleteExpressionError, ArityError, VariadicArityError, JMESPathTypeError, EmptyExpressionError, UnknownFunctionError, } from './errors.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,yBAAyB,EACzB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
package/lib/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
+
export { ArityError, EmptyExpressionError, IncompleteExpressionError, JMESPathError, JMESPathTypeError, LexerError, ParseError, UnknownFunctionError, VariadicArityError, } from './errors.js';
|
|
1
2
|
export { search } from './search.js';
|
|
2
|
-
export { JMESPathError, LexerError, ParseError, IncompleteExpressionError, ArityError, VariadicArityError, JMESPathTypeError, EmptyExpressionError, UnknownFunctionError, } from './errors.js';
|
package/lib/esm/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JSONArray, JSONValue } from '@aws-lambda-powertools/commons/types';
|
|
2
|
-
import type { Functions } from './Functions.js';
|
|
3
2
|
import type { BINDING_POWER } from './constants.js';
|
|
3
|
+
import type { Functions } from './Functions.js';
|
|
4
4
|
/**
|
|
5
5
|
* A token in the JMESPath AST.
|
|
6
6
|
*/
|
package/lib/esm/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACV,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACV,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,OAAO,aAAa,CAAC;IACjC,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,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C,KACnC,IAKF,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,iBAAiB,GAAI,KAAK,OAAO,EAAE,cAAc,KAAK,CAAC,MAAM,CAAC,KAAG,IAMtE,CAAC;AA6IF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC"}
|
package/lib/esm/utils.js
CHANGED
|
@@ -189,7 +189,6 @@ const checkIfArgumentTypeIsValid = (arg, type, index, argumentSpec) => {
|
|
|
189
189
|
}
|
|
190
190
|
if (['string', 'number', 'boolean'].includes(type)) {
|
|
191
191
|
typeCheckType(arg, type, argumentSpec, hasMoreTypesToCheck);
|
|
192
|
-
// biome-ignore lint/suspicious/useValidTypeof: we know that `type` is one of 'string', 'number', or 'boolean' because we checked for that above
|
|
193
192
|
if (typeof arg === type)
|
|
194
193
|
return true;
|
|
195
194
|
}
|
|
@@ -208,7 +207,6 @@ const checkIfArgumentTypeIsValid = (arg, type, index, argumentSpec) => {
|
|
|
208
207
|
* @param hasMoreTypesToCheck Whether there are more types to check
|
|
209
208
|
*/
|
|
210
209
|
const typeCheckType = (arg, type, argumentSpec, hasMoreTypesToCheck) => {
|
|
211
|
-
// biome-ignore lint/suspicious/useValidTypeof: we know that `type` is one of 'string', 'number', or 'boolean' because we checked before calling this function
|
|
212
210
|
if (typeof arg !== type && !hasMoreTypesToCheck) {
|
|
213
211
|
throw new JMESPathTypeError({
|
|
214
212
|
currentValue: arg,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-lambda-powertools/jmespath",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.24.1",
|
|
4
4
|
"description": "A type safe and modern jmespath module to parse and extract data from JSON documents using JMESPath",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Amazon Web Services",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"nodejs"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aws-lambda-powertools/commons": "2.
|
|
28
|
+
"@aws-lambda-powertools/commons": "2.24.1"
|
|
29
29
|
},
|
|
30
30
|
"main": "./lib/cjs/index.js",
|
|
31
31
|
"types": "./lib/cjs/index.d.ts",
|
package/LICENSE
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
-
the Software without restriction, including without limitation the rights to
|
|
6
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
7
|
-
the Software, and to permit persons to whom the Software is furnished to do so.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
10
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
11
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
12
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
13
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
14
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|