Socket
Socket
Sign inDemoInstall

@resoc/create-img

Package Overview
Dependencies
47
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.9 to 0.7.0

6

build/index.es.js

@@ -144,3 +144,3 @@ import { renderTemplateToHtml, ParamType, paramValueToString, stringToParamValue } from '@resoc/core';

var imageFingerprint = function (templateDir, values) { return __awaiter(void 0, void 0, void 0, function () {
var hash, sha;
var hash;
return __generator(this, function (_a) {

@@ -152,5 +152,3 @@ switch (_a.label) {

return [4 /*yield*/, sha256(JSON.stringify(hash) + JSON.stringify(values))];
case 2:
sha = _a.sent();
return [2 /*return*/, sha.substr(0, 8)];
case 2: return [2 /*return*/, _a.sent()];
}

@@ -157,0 +155,0 @@ });

@@ -156,3 +156,3 @@ 'use strict';

var imageFingerprint = function (templateDir, values) { return __awaiter(void 0, void 0, void 0, function () {
var hash, sha;
var hash;
return __generator(this, function (_a) {

@@ -164,5 +164,3 @@ switch (_a.label) {

return [4 /*yield*/, sha256__default['default'](JSON.stringify(hash) + JSON.stringify(values))];
case 2:
sha = _a.sent();
return [2 /*return*/, sha.substr(0, 8)];
case 2: return [2 /*return*/, _a.sent()];
}

@@ -169,0 +167,0 @@ });

{
"name": "@resoc/create-img",
"version": "0.6.9",
"version": "0.7.0",
"description": "Create an image based on a Resoc image template",

@@ -29,3 +29,3 @@ "main": "build/index.js",

"dependencies": {
"@resoc/core": "^0.6.7",
"@resoc/core": "^0.7.0",
"commander": "^8.1.0",

@@ -61,3 +61,3 @@ "folder-hash": "^4.0.1",

},
"gitHead": "6b840c21d40df800c0546369334aae6a1922d5b3"
"gitHead": "011c2bfc923b64fbea42976c64801014f6fd60bf"
}
import {
ImageTemplate,
ImageResolution,
loadRemoteTemplate,
ParamValues,

@@ -6,0 +5,0 @@ renderTemplateToHtml,

@@ -10,3 +10,3 @@ import { imageFingerprint } from "./fingerprint";

const t1p1 = await imageFingerprint(t1, p1);
expect(t1p1.length).toEqual(8);
expect(t1p1.length).toEqual(64);

@@ -13,0 +13,0 @@ const t1p1Twice = await imageFingerprint(t1, p1);

@@ -7,4 +7,3 @@ import { ParamValues } from '@resoc/core';

const hash = await hashElement(templateDir);
const sha = await sha256(JSON.stringify(hash) + JSON.stringify(values));
return sha.substr(0, 8);
return await sha256(JSON.stringify(hash) + JSON.stringify(values));
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc