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

reusable-serverless-template

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reusable-serverless-template - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

3

dist/src/YamlTemplate.d.ts

@@ -57,5 +57,6 @@ /**

* @param params sls variable name -> value map. E.g. Map { '(foo' => 'bar', 'stage' => 'test)' }
* @param print print the resolved template before converting to Yaml object
* @return yaml object
*/
export declare const load: (filePath: string, params?: Map<string, string>) => string;
export declare const load: (filePath: string, params?: Map<string, string>, print?: boolean) => string;
/**

@@ -62,0 +63,0 @@ * Dump yaml object

@@ -103,3 +103,3 @@ "use strict";

resolveFiles(content, dir) {
const paramRegexpStr = '([\\t ]*)\\${tfile:([^:}]+)(:([^}]))?}';
const paramRegexpStr = '([\\t ]*)\\${tfile:([^:}]+)(:([^}]+))?}';
const paramRegexp = new RegExp(paramRegexpStr, 'g'); //global to find all occurrences

@@ -152,6 +152,11 @@ content = content.replace(paramRegexp, (match) => {

* @param params sls variable name -> value map. E.g. Map { '(foo' => 'bar', 'stage' => 'test)' }
* @param print print the resolved template before converting to Yaml object
* @return yaml object
*/
exports.load = function (filePath, params) {
return js_yaml_1.load(new YamlTemplate().loadFile(filePath, params));
exports.load = function (filePath, params, print = true) {
const resolvedTemplate = new YamlTemplate().loadFile(filePath, params);
if (print) {
console.log(resolvedTemplate);
}
return js_yaml_1.load(resolvedTemplate);
};

@@ -158,0 +163,0 @@ /**

{
"name": "reusable-serverless-template",
"version": "1.0.3",
"version": "1.0.4",
"main": "dist/src/index.js",

@@ -5,0 +5,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