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

@chisel/steroids

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chisel/steroids - npm Package Compare versions

Comparing version 1.1.7 to 1.1.8

20

bin/sd-new.js

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

const fs_extra_1 = __importDefault(require("fs-extra"));
const tar_1 = __importDefault(require("tar"));
const path_1 = __importDefault(require("path"));

@@ -19,3 +20,3 @@ const child_process_1 = __importDefault(require("child_process"));

const rootDir = path_1.default.resolve(process.cwd(), name);
const templateDir = path_1.default.resolve(__dirname, '..', 'template');
const templatePath = path_1.default.resolve(__dirname, '..', 'template.tar.gz');
const assetsDir = path_1.default.resolve(__dirname, '..', 'template-assets');

@@ -31,6 +32,13 @@ try {

// If template doesn't exist
if (!fs_extra_1.default.existsSync(templateDir))
throw new Error('Steroids template missing! Try running "npm run fetch-template" and "npm run postinstall" inside Steroids installation directory.');
// Copy template to project root
fs_extra_1.default.copySync(templateDir, rootDir);
if (!fs_extra_1.default.existsSync(templatePath))
throw new Error('Steroids template missing! Try running "npm run fetch-template" inside Steroids installation directory.');
// Create empty root directory
fs_extra_1.default.mkdirSync(rootDir);
// Copy template to project root from template.tar.gz
await (new Promise((resolve, reject) => {
fs_extra_1.default.createReadStream(templatePath)
.pipe(tar_1.default.x({ C: rootDir, strip: 2 }))
.on('end', resolve)
.on('error', reject);
}));
// Update package.json

@@ -124,2 +132,2 @@ const packageJson = require(path_1.default.resolve(rootDir, 'package.json'));

exports.default = action;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2QtbmV3LmpzIiwic291cmNlUm9vdCI6InNyYy8iLCJzb3VyY2VzIjpbInNkLW5ldy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHdEQUEwQjtBQUMxQixnREFBd0I7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CLENBQUMsQ0FBQyxDQUFDO1FBQy9ELE9BQU8sQ0FBQyxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUM7S0FFdEI7QUFFSCxDQUFDO0FBaEtELHlCQWdLQyJ9

@@ -5,3 +5,3 @@ const tar = require('tar');

tar.c({ gzip: true }, [ './template' ])
tar.c({ gzip: true }, fs.readdirSync(path.resolve(__dirname, 'template')).map(p => `./template/${p}`))
.pipe(fs.createWriteStream(path.resolve(__dirname, 'template.tar.gz')));
{
"name": "@chisel/steroids",
"version": "1.1.7",
"version": "1.1.8",
"description": "Framework for building Node.js servers with Express on steroids!",

@@ -12,4 +12,3 @@ "main": "./bin/sd.js",

"start": "./node_modules/typescript/bin/tsc --build",
"fetch-template": "echo \"Fetching Steroids template...\" && rm -f ./template.tar.gz && rm -rf ./template && git clone git@github.com:chisel/steroids-template.git ./template && cd ./template && rm -r .git && rm README.md && cd .. && node ./pack-template.js && rm -rf ./template",
"postinstall": "echo \"Unpacking Steroids template...\" && node unpack-template.js"
"fetch-template": "echo \"Fetching Steroids template...\" && rm -f ./template.tar.gz && rm -rf ./template && git clone git@github.com:chisel/steroids-template.git ./template && cd ./template && rm -r .git && rm README.md && cd .. && node ./pack-template.js && rm -rf ./template"
},

@@ -52,4 +51,5 @@ "repository": {

"@types/serve-static": "^1.13.3",
"@types/tar": "^4.0.3",
"@types/validate-npm-package-name": "^3.0.0"
}
}
import fs from 'fs-extra';
import tar from 'tar';
import path from 'path';

@@ -15,3 +16,3 @@ import child from 'child_process';

const rootDir = path.resolve(process.cwd(), name);
const templateDir = path.resolve(__dirname, '..', 'template');
const templatePath = path.resolve(__dirname, '..', 'template.tar.gz');
const assetsDir = path.resolve(__dirname, '..', 'template-assets');

@@ -31,7 +32,17 @@

// If template doesn't exist
if ( ! fs.existsSync(templateDir) ) throw new Error('Steroids template missing! Try running "npm run fetch-template" and "npm run postinstall" inside Steroids installation directory.');
if ( ! fs.existsSync(templatePath) ) throw new Error('Steroids template missing! Try running "npm run fetch-template" inside Steroids installation directory.');
// Copy template to project root
fs.copySync(templateDir, rootDir);
// Create empty root directory
fs.mkdirSync(rootDir);
// Copy template to project root from template.tar.gz
await (new Promise((resolve, reject) => {
fs.createReadStream(templatePath)
.pipe(tar.x({ C: rootDir, strip: 2 }))
.on('end', resolve)
.on('error', reject);
}));
// Update package.json

@@ -38,0 +49,0 @@ const packageJson = require(path.resolve(rootDir, 'package.json'));

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