New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@react-ddd/cli

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

@react-ddd/cli - npm Package Compare versions

Comparing version
0.0.9
to
0.0.10
+4
-2
dist/helpers/generator.js

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

const path_1 = __importDefault(require("path"));
const handlebarsCompilePath = (templatedPath, replacements) => (handlebars_1.default.compile(templatedPath.replace(/\\/g, '\\\\'))(replacements));
const createDirectory = (directory, replacements, templateRoot, projectRoot) => {

@@ -15,6 +16,7 @@ if (!fs_1.default.existsSync(directory)) {

const children = fs_1.default.readdirSync(directory, { withFileTypes: true });
// TODO: Account for windows backslashes in template path
children.forEach((element) => {
const relativePath = directory.replace(templateRoot, '');
const templatePath = path_1.default.join(templateRoot, relativePath, element.name);
const elementName = handlebars_1.default.compile(element.name)(replacements).replaceAll(/\.hbs$/g, '');
const elementName = handlebarsCompilePath(element.name, replacements).replaceAll(/\.hbs$/g, '');
const outputPath = handlebars_1.default.compile(path_1.default.join(projectRoot, relativePath, elementName))(replacements);

@@ -30,3 +32,3 @@ if (element.isDirectory()) {

}
fs_1.default.mkdirSync(handlebars_1.default.compile(path_1.default.join(projectRoot, relativePath))(replacements), { recursive: true });
fs_1.default.mkdirSync(handlebarsCompilePath(path_1.default.join(projectRoot, relativePath), replacements), { recursive: true });
fs_1.default.writeFileSync(outputPath, template, { encoding: 'utf-8' });

@@ -33,0 +35,0 @@ }

@@ -12,3 +12,4 @@ "use strict";

const files = fs_1.default.readdirSync(dir);
if ((0, fp_1.find)('package.json', files)) {
console.log({ dir, files });
if ((0, fp_1.includes)('package.json', files)) {
return dir;

@@ -15,0 +16,0 @@ }

{
"name": "@react-ddd/cli",
"version": "0.0.9",
"version": "0.0.10",
"description": "Code generation",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet