Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appsync-template-tester

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appsync-template-tester - npm Package Compare versions

Comparing version 1.1.15 to 1.1.16

7

dist/index.d.ts
export default class Parser {
private template;
private internalStash;
get stash(): Record<string, string>;
private internalContext;
get stash(): Record<string, any>;
get context(): Context;
constructor(template: string);

@@ -20,3 +21,3 @@ /**

prev?: object;
stash?: object;
stash?: Record<string, any>;
};

@@ -23,0 +24,0 @@ export declare type velocityParams = {

@@ -18,8 +18,12 @@ "use strict";

constructor(template) {
this.internalStash = {};
this.template = template;
}
get stash() {
return this.internalStash;
var _a, _b;
return _b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.stash, (_b !== null && _b !== void 0 ? _b : {});
}
get context() {
var _a;
return _a = this.internalContext, (_a !== null && _a !== void 0 ? _a : {});
}
/**

@@ -53,4 +57,4 @@ * Resolve as a string

const res = velocityjs_1.render(this.template, params, macros);
// Keep stash value
this.internalStash = clonedContext.stash;
// Keep the full context
this.internalContext = clonedContext;
// Remove preceding and trailing whitespace

@@ -83,2 +87,2 @@ const resWithoutWhitespace = res

exports.default = Parser;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUEsZ0RBQWdEO0FBQ2hELDJDQUFvQztBQUNwQyxpREFBbUM7QUFDbkMsa0RBQW9DO0FBQ3BDLDBEQUE0QztBQUM1QyxnREFBa0M7QUFFbEMsTUFBcUIsTUFBTTtJQVN6QixZQUFZLFFBQWdCO1FBTnBCLGtCQUFhLEdBQTJCLEVBQUUsQ0FBQztRQU9qRCxJQUFJLEN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tcbiAgICBpZiAocmVzID09PSBcInRydWVcIikgcmV0dXJuIHRydWU7XG5cbiAgICAvLyBUeXBlY2FzdCBOdWxsXG4gICAgaWYgKHJlcyA9PT0gXCJudWxsXCIpIHJldHVybiBudWxsO1xuXG4gICAgLy8gVHlwZWNhc3QgTnVtYmVyc1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1yZXN0cmljdGVkLWdsb2JhbHNcbiAgICBpZiAoIWlzTmFOKChyZXMgYXMgdW5rbm93bikgYXMgbnVtYmVyKSkgcmV0dXJuIHBhcnNlRmxvYXQocmVzKTtcblxuICAgIC8vIFR5cGVjYXN0IEpTT04gdG8gT2JqZWN0XG4gICAgdHJ5IHtcbiAgICAgIHJldHVybiBKU09OLnBhcnNlKHJlcyk7XG4gICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tZW1wdHlcbiAgICB9IGNhdGNoIChlKSB7fVxuXG4gICAgLy8gUmV0dXJuIGEgc3RyaW5nIG90aGVyd2lzZVxuICAgIHJldHVybiByZXNXaXRob3V0V2hpdGVzcGFjZTtcbiAgfVxufVxuXG5leHBvcnQgdHlwZSBDb250ZXh0ID0ge1xuICBhcmd1bWVudHM/OiBvYmplY3Q7XG4gIHNvdXJjZT86IG9iamVjdDtcbiAgcmVzdWx0Pzogb2JqZWN0IHwgc3RyaW5nO1xuICBpZGVudGl0eT86IG9iamVjdDtcbiAgcmVxdWVzdD86IG9iamVjdDtcbiAgaW5mbz86IG9iamVjdDtcbiAgZXJyb3I/OiBvYmplY3Q7XG4gIHByZXY/OiBvYmplY3Q7XG4gIHN0YXNoPzogUmVjb3JkPHN0cmluZywgYW55Pjtcbn07XG5cbmV4cG9ydCB0eXBlIHZlbG9jaXR5UGFyYW1zID0geyBbYmxvY2tOYW1lOiBzdHJpbmddOiBib29sZWFuIH07XG4iXX0=

@@ -74,16 +74,52 @@ "use strict";

});
describe("$context.stash keeps data", () => {
test("Keep initial data", () => {
const vtl = "";
const parser = new index_1.default(vtl);
parser.resolve({
stash: { key: "value" },
describe("$context keeps full context data", () => {
describe("$context.stash keeps data", () => {
test("Keep initial data", () => {
const vtl = "";
const parser = new index_1.default(vtl);
parser.resolve({
stash: { key: "value" },
});
expect(parser.stash).toStrictEqual({ key: "value" });
});
expect(parser.stash).toStrictEqual({ key: "value" });
test("Keep resolved data", () => {
const vtl = '$ctx.stash.put("key", "value")';
const parser = new index_1.default(vtl);
parser.resolve({});
expect(parser.stash).toStrictEqual({ key: "value" });
});
test("Keep resolved data with complex structures", () => {
const vtl = `
#set($nestedMap = {})
$util.qr($nestedMap.put("nestedKey", "nestedValue"))
$ctx.stash.put("key", $nestedMap)
`;
const parser = new index_1.default(vtl);
parser.resolve({});
expect(parser.stash).toStrictEqual({ key: { nestedKey: "nestedValue" } });
});
describe("Defaults if context is not defined", () => {
test("Context defaults to an empty object", () => {
const parser = new index_1.default("");
expect(parser.context).not.toBeUndefined();
expect(Object.keys(parser.context).length).toEqual(0);
});
test("Stash defaults to an empty object", () => {
const parser = new index_1.default("");
expect(parser.stash).not.toBeUndefined();
expect(Object.keys(parser.stash).length).toEqual(0);
});
});
});
test("Keep resolved data", () => {
const vtl = '$ctx.stash.put("key", "value")';
test("Keep argument modifications", () => {
const vtl = `
#set($ctx.args.original = "bar")
#set($ctx.args.addition = "value")
`;
const parser = new index_1.default(vtl);
parser.resolve({});
expect(parser.stash).toStrictEqual({ key: "value" });
parser.resolve({ arguments: { original: "foo" } });
expect(parser.context.arguments).toStrictEqual({
original: "bar",
addition: "value",
});
});

@@ -141,2 +177,2 @@ });

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXgudGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0cy9pbmRleC50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQThCO0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EyMy40NTYpO1xuICB9KTtcblxuICB0ZXN0KFwiSlNPTlwiLCAoKSA9PiB7XG4gICAgY29uc3QgdnRsID0gJ3tcInRlc3RcIjogdHJ1ZX0nO1xuICAgIGNvbnN0IHBhcnNlciA9IG5ldyBQYXJzZXIodnRsKTtcbiAgICBjb25zdCByZXMgPSBwYXJzZXIucmVzb2x2ZSh7fSk7XG4gICAgZXhwZWN0KHJlcykudG9FcXVhbCh7IHRlc3Q6IHRydWUgfSk7XG4gIH0pO1xuXG4gIHRlc3QoXCJBcnJheVwiLCAoKSA9PiB7XG4gICAgY29uc3QgdnRsID0gXCJbMSwyLDNdXCI7XG4gICAgY29uc3QgcGFyc2VyID0gbmV3IFBhcnNlcih2dGwpO1xuICAgIGNvbnN0IHJlcyA9IHBhcnNlci5yZXNvbHZlKHt9KTtcbiAgICBleHBlY3QocmVzKS50b0VxdWFsKFsxLCAyLCAzXSk7XG4gIH0pO1xuXG4gIHRlc3QoXCJTdHJpbmdcIiwgKCkgPT4ge1xuICAgIGNvbnN0IHZ0bCA9IFwiYWJjMTIzXCI7XG4gICAgY29uc3QgcGFyc2VyID0gbmV3IFBhcnNlcih2dGwpO1xuICAgIGNvbnN0IHJlcyA9IHBhcnNlci5yZXNvbHZlKHt9KTtcbiAgICBleHBlY3QocmVzKS50b0JlKFwiYWJjMTIzXCIpO1xuICB9KTtcbn0pO1xuIl19

@@ -25,3 +25,3 @@ {

"license": "MIT",
"version": "1.1.15",
"version": "1.1.16",
"main": "dist/index.js",

@@ -28,0 +28,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc