New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

elm-codegen

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elm-codegen - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

54

dist/run.js

@@ -82,2 +82,3 @@ "use strict";

var elm_compiler = __importStar(require("node-elm-compiler"));
var https = __importStar(require("https"));
var path = __importStar(require("path"));

@@ -87,3 +88,2 @@ var fs = __importStar(require("fs"));

var Chokidar = __importStar(require("chokidar"));
var node_fetch_1 = __importDefault(require("node-fetch"));
var chalk_1 = __importDefault(require("chalk"));

@@ -96,2 +96,32 @@ var templates_1 = __importDefault(require("./templates"));

var currentVersion = require("../package.json").version;
function httpsGetJson(url) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, new Promise(function (resolve, reject) {
https
.get(url, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks).toString();
if (res.statusCode === 200) {
try {
resolve(JSON.parse(body));
}
catch (error) {
reject(error);
}
}
else {
reject(new Error("GET " + url + " \u2013 expected status code 200 but got " + res.statusCode + ":\n\n" + body));
}
});
})
.on("error", reject);
})];
});
});
}
function run_generator(output_dir, moduleName, elm_source, flags) {

@@ -242,12 +272,9 @@ return __awaiter(this, void 0, void 0, function () {

return __awaiter(this, void 0, void 0, function () {
var searchResp, search, _i, search_1, found, docsResp, docs;
var search, _i, search_1, found, docs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!(version == null)) return [3 /*break*/, 3];
return [4 /*yield*/, node_fetch_1.default("https://elm-package-cache-psi.vercel.app/search.json")];
if (!(version == null)) return [3 /*break*/, 2];
return [4 /*yield*/, httpsGetJson("https://elm-package-cache-psi.vercel.app/search.json")];
case 1:
searchResp = _a.sent();
return [4 /*yield*/, searchResp.json()];
case 2:
search = _a.sent();

@@ -265,10 +292,7 @@ for (_i = 0, search_1 = search; _i < search_1.length; _i++) {

}
_a.label = 3;
case 3: return [4 /*yield*/, node_fetch_1.default("https://elm-package-cache-psi.vercel.app/packages/" + pkg + "/" + version + "/docs.json")];
case 4:
docsResp = _a.sent();
return [4 /*yield*/, docsResp.json()
// let codeGenJson = getCodeGenJson(install_dir)
];
case 5:
_a.label = 2;
case 2: return [4 /*yield*/, httpsGetJson("https://elm-package-cache-psi.vercel.app/packages/" + pkg + "/" + version + "/docs.json")
// let codeGenJson = getCodeGenJson(install_dir)
];
case 3:
docs = _a.sent();

@@ -275,0 +299,0 @@ // let codeGenJson = getCodeGenJson(install_dir)

{
"name": "elm-codegen",
"version": "0.1.2",
"version": "0.1.3",
"description": "Codegen for Elm",

@@ -30,3 +30,3 @@ "main": "./dist/index.js",

"play:install-codec": "(npm run build; cd play; node ../bin/elm-codegen install miniBill/elm-codec)",
"play:install-ui": "(npm run build; cd play; node ../bin/elm-codegen install)",
"play:install-ui": "(npm run build; cd play; node ../bin/elm-codegen install mdgriffith/elm-ui)",
"play:install-list": "(npm run build; cd play; node ../bin/elm-codegen install elm-community/list-extra)",

@@ -52,2 +52,3 @@ "play:install-css": "(npm run build; cd play; node ../bin/elm-codegen install rtfeldman/elm-css)",

"devDependencies": {
"@types/node": "^15.0.3",
"@types/node-fetch": "^2.5.10",

@@ -58,10 +59,7 @@ "ts-node": "^10.9.1",

"dependencies": {
"@types/node": "^15.0.3",
"chalk": "^4.1.1",
"chokidar": "^3.5.1",
"commander": "^8.3.0",
"elm-optimize-level-2": "^0.1.5",
"node-elm-compiler": "^5.0.6",
"node-fetch": "^2.6.1"
"node-elm-compiler": "^5.0.6"
}
}
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