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

create-wasmgroundup

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-wasmgroundup - npm Package Compare versions

Comparing version 2.0.3 to 2.1.0

49

index.js

@@ -6,5 +6,15 @@ #!/usr/bin/env node

import { readFileSync } from "node:fs";
import prompts from "prompts";
const usage = "Usage: create-wasmgroundup dest_dir";
const usage = "Usage: create-wasmgroundup <dest_dir>";
const userAgent = process.env.npm_config_user_agent ?? "";
const pkgMan = /pnpm/.test(userAgent)
? "pnpm"
: /yarn/.test(userAgent)
? "yarn"
: /bun/.test(userAgent)
? "bun"
: "npm";
function bail(message) {

@@ -15,6 +25,3 @@ process.stderr.write(`error: ${message}\n`);

const destDir = process.argv[2];
if (!destDir) bail(`no destination directory specified\n\n${usage}`);
(async function main() {
async function cloneTemplate(destDir) {
const emitter = degit("https://github.com/wasmgroundup/reader-template", {

@@ -36,5 +43,28 @@ cache: false,

}
process.chdir(destDir);
console.log('Running "npm install" in the destination directory...');
spawnSync("npm", ["install", "--silent"], {
}
(async function main() {
let targetDir = process.argv[2];
const defaultProjectName = !targetDir ? "wasmgroundup" : targetDir;
let result = {};
try {
result = await prompts([
{
name: "projectName",
type: targetDir ? null : "text",
message: "Project name",
initial: defaultProjectName,
onState: (state) =>
(targetDir = String(state.value).trim() || defaultProjectName),
},
]);
} catch (cancelled) {
console.log(cancelled.message);
process.exit(1);
}
await cloneTemplate(targetDir);
process.chdir(targetDir);
console.log(`Running '${pkgMan} install' in the destination directory...`);
spawnSync(pkgMan, ["install", "--silent"], {
stdio: "inherit",

@@ -47,4 +77,5 @@ shell: true,

console.log(
`\nYou're all set! You can do ${"`"}cd ${destDir}${"`"} to get started.`,
`\nYou're all set! You can do ${"`"}cd ${targetDir}${"`"} to get started.`,
);
process.exit(0);
})();

5

package.json
{
"name": "create-wasmgroundup",
"type": "module",
"version": "2.0.3",
"version": "2.1.0",
"description": "",

@@ -23,3 +23,4 @@ "bin": {

"dependencies": {
"degit": "^2.8.4"
"degit": "^2.8.4",
"prompts": "^2.4.2"
},

@@ -26,0 +27,0 @@ "devDependencies": {

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