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

@resoc/create-img

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@resoc/create-img - npm Package Compare versions

Comparing version 0.5.4 to 0.6.0

1

build/index.d.ts

@@ -5,2 +5,1 @@ export { createImage, createImageFromTemplate, compileTemplate, compileLocalTemplate, cachedImageName, fileExists, renderLocalTemplate } from "./compile";

export { convertUrlToImage } from "./puppeteer";
export { initImageDateStorage, storeImageData, getImageData } from "./storage";

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

var initImageDateStorage = function (storagePath) { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, promises.writeFile(storagePath, JSON.stringify({}))];
case 1:
_a.sent();
return [2 /*return*/];
}
});
}); };
var storeImageData = function (storagePath, slug, imageData) { return __awaiter(void 0, void 0, void 0, function () {
var storageContent, storage;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, fileExists(storagePath)];
case 1:
if (!!(_a.sent())) return [3 /*break*/, 3];
return [4 /*yield*/, initImageDateStorage(storagePath)];
case 2:
_a.sent();
_a.label = 3;
case 3: return [4 /*yield*/, promises.readFile(storagePath)];
case 4:
storageContent = _a.sent();
storage = JSON.parse(storageContent.toString());
storage[slug] = imageData;
return [2 /*return*/, promises.writeFile(storagePath, JSON.stringify(storage))];
}
});
}); };
var getImageData = function (storagePath, slug) { return __awaiter(void 0, void 0, void 0, function () {
var storageContent, storage;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, promises.readFile(storagePath)];
case 1:
storageContent = _a.sent();
storage = JSON.parse(storageContent.toString());
return [2 /*return*/, storage[slug]];
}
});
}); };
export { cachedImageName, compileLocalTemplate, compileTemplate, convertUrlToImage, createImage, createImageFromTemplate, fileExists, getImageData, initImageDateStorage, loadLocalTemplate, parseParameters, renderLocalTemplate, storeImageData };
export { cachedImageName, compileLocalTemplate, compileTemplate, convertUrlToImage, createImage, createImageFromTemplate, fileExists, loadLocalTemplate, parseParameters, renderLocalTemplate };
//# sourceMappingURL=index.es.js.map

@@ -383,45 +383,2 @@ 'use strict';

var initImageDateStorage = function (storagePath) { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, fs.promises.writeFile(storagePath, JSON.stringify({}))];
case 1:
_a.sent();
return [2 /*return*/];
}
});
}); };
var storeImageData = function (storagePath, slug, imageData) { return __awaiter(void 0, void 0, void 0, function () {
var storageContent, storage;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, fileExists(storagePath)];
case 1:
if (!!(_a.sent())) return [3 /*break*/, 3];
return [4 /*yield*/, initImageDateStorage(storagePath)];
case 2:
_a.sent();
_a.label = 3;
case 3: return [4 /*yield*/, fs.promises.readFile(storagePath)];
case 4:
storageContent = _a.sent();
storage = JSON.parse(storageContent.toString());
storage[slug] = imageData;
return [2 /*return*/, fs.promises.writeFile(storagePath, JSON.stringify(storage))];
}
});
}); };
var getImageData = function (storagePath, slug) { return __awaiter(void 0, void 0, void 0, function () {
var storageContent, storage;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, fs.promises.readFile(storagePath)];
case 1:
storageContent = _a.sent();
storage = JSON.parse(storageContent.toString());
return [2 /*return*/, storage[slug]];
}
});
}); };
exports.cachedImageName = cachedImageName;

@@ -434,8 +391,5 @@ exports.compileLocalTemplate = compileLocalTemplate;

exports.fileExists = fileExists;
exports.getImageData = getImageData;
exports.initImageDateStorage = initImageDateStorage;
exports.loadLocalTemplate = loadLocalTemplate;
exports.parseParameters = parseParameters;
exports.renderLocalTemplate = renderLocalTemplate;
exports.storeImageData = storeImageData;
//# sourceMappingURL=index.js.map

6

package.json
{
"name": "@resoc/create-img",
"version": "0.5.4",
"version": "0.6.0",
"description": "Create an image based on a Resoc image template",

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

"dependencies": {
"@resoc/core": "^0.5.0",
"@resoc/core": "^0.6.0",
"commander": "^8.1.0",

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

},
"gitHead": "e89d197ef6259412114ff56c2c002adaf277b196"
"gitHead": "ef479333c4159d7c8ba0ec82492d76292056a105"
}

@@ -13,2 +13,1 @@ export {

export { convertUrlToImage } from "./puppeteer";
export { initImageDateStorage, storeImageData, getImageData } from "./storage";

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc