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

@code-engine/cli

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

@code-engine/cli - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

lib/events.js

@@ -49,3 +49,3 @@ "use strict";

if (partialBuild) {
let message = `${changedFiles.length} files changed`;
let message = `\n${changedFiles.length} files changed`;
if (options.debug) {

@@ -52,0 +52,0 @@ message += "\n " + changedFiles.map((file) => file.path).join("\n ");

@@ -26,3 +26,3 @@ import { PluginDefinition } from "@code-engine/types";

*
* Defaults to all files in the current directory.
* Defaults to all files in the "./src/" directory.
*/

@@ -29,0 +29,0 @@ source?: PluginDefinition | PluginDefinition[];

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

const validate_1 = require("@code-engine/validate");
const fs_1 = require("fs");
const ono_1 = require("ono");

@@ -34,4 +35,4 @@ const path_1 = require("path");

else if (!generator.source) {
// Include all files in the CWD by default
generator.source = "**/*";
// Include all files in "./src" by default
generator.source = await resolveSource(cwd);
}

@@ -46,2 +47,16 @@ if (!generator.destination) {

/**
* Ensures that the "src" directory exists before defaulting to it.
*/
async function resolveSource(cwd) {
try {
let src = path_1.resolve(cwd, "src");
let dir = await fs_1.promises.opendir(src);
await dir.close();
}
catch (error) {
throw ono_1.ono(error, `No source was specified, and no "./src" directory was found.`);
}
return "./src/**/*";
}
/**
* Resolves the path of the specified CodeEngine generator

@@ -48,0 +63,0 @@ */

{
"name": "@code-engine/cli",
"version": "0.0.3",
"version": "0.0.4",
"description": "build tool | code generator | static site builder",

@@ -82,7 +82,7 @@ "keywords": [

"dependencies": {
"@code-engine/lib": "0.0.11",
"@code-engine/utils": "0.0.12",
"@code-engine/lib": "0.0.12",
"@code-engine/utils": "0.0.14",
"@code-engine/validate": "0.0.1",
"code-engine-destination-filesystem": "0.0.4",
"code-engine-source-filesystem": "0.0.3",
"code-engine-destination-filesystem": "0.0.5",
"code-engine-source-filesystem": "0.0.4",
"command-line-args": "^5.1.1",

@@ -89,0 +89,0 @@ "filesize": "^6.0.1",

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