Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rev-web-assets

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rev-web-assets - npm Package Compare versions

Comparing version 0.0.5 to 0.1.0

4

dist/rev-web-assets.d.ts

@@ -1,2 +0,2 @@

//! rev-web-assets v0.0.5 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License
//! rev-web-assets v0.1.0 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License

@@ -30,3 +30,3 @@ export declare type Settings = {

declare const revWebAssets: {
readDirSyncRecursive(folder: string): string[];
readFolderRecursive(folder: string): string[];
manifest(source: string, target: string): {

@@ -33,0 +33,0 @@ origin: string;

@@ -1,9 +0,9 @@

//! rev-web-assets v0.0.5 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License
//! rev-web-assets v0.1.0 ~~ https://github.com/center-key/rev-web-assets ~~ MIT License
import crypto from 'crypto';
import fs from 'fs-extra';
import fs from 'fs';
import path from 'path';
import slash from 'slash';
const revWebAssets = {
readDirSyncRecursive(folder) {
readFolderRecursive(folder) {
const files = [];

@@ -20,3 +20,3 @@ const process = (item) => {

manifest(source, target) {
const files = revWebAssets.readDirSyncRecursive(source);
const files = revWebAssets.readFolderRecursive(source);
const process = (file) => {

@@ -85,3 +85,3 @@ const fileExtension = path.extname(file).toLowerCase();

detail.destPath = detail.destFolder + '/' + detail.filename;
fs.ensureDirSync(detail.destFolder);
fs.mkdirSync(detail.destFolder, { recursive: true });
fs.writeFileSync(detail.destPath, hashedContent);

@@ -99,3 +99,3 @@ };

detail.destPath = detail.destFolder + '/' + ((_a = detail.hashedFilename) !== null && _a !== void 0 ? _a : detail.filename);
fs.ensureDirSync(detail.destFolder);
fs.mkdirSync(detail.destFolder, { recursive: true });
fs.writeFileSync(detail.destPath, hashedContent);

@@ -109,3 +109,3 @@ };

detail.destPath = detail.destFolder + '/' + ((_a = detail.hashedFilename) !== null && _a !== void 0 ? _a : detail.filename);
fs.ensureDirSync(detail.destFolder);
fs.mkdirSync(detail.destFolder, { recursive: true });
fs.copyFileSync(detail.origin, detail.destPath);

@@ -128,7 +128,7 @@ };

if (targetFolder)
fs.ensureDirSync(target);
fs.mkdirSync(target, { recursive: true });
const errorMessage = !sourceFolder ? 'Must specify the source folder path.' :
!targetFolder ? 'Must specify the target folder path.' :
!fs.pathExistsSync(source) ? 'Source folder does not exist: ' + source :
!fs.pathExistsSync(target) ? 'Target folder cannot be created: ' + target :
!fs.existsSync(source) ? 'Source folder does not exist: ' + source :
!fs.existsSync(target) ? 'Target folder cannot be created: ' + target :
!fs.statSync(source).isDirectory() ? 'Source is not a folder: ' + source :

@@ -135,0 +135,0 @@ !fs.statSync(target).isDirectory() ? 'Target is not a folder: ' + target :

{
"name": "rev-web-assets",
"version": "0.0.5",
"version": "0.1.0",
"description": "Revision web asset filenames with cache busting content hash fingerprints",

@@ -76,3 +76,2 @@ "license": "MIT",

"fancy-log": "~2.0",
"fs-extra": "~10.1",
"slash": "~5.0"

@@ -82,7 +81,6 @@ },

"@types/fancy-log": "~2.0",
"@types/fs-extra": "~9.0",
"@types/node": "~18.7",
"@types/node": "~18.8",
"@typescript-eslint/eslint-plugin": "~5.38",
"@typescript-eslint/parser": "~5.38",
"add-dist-header": "~0.2",
"add-dist-header": "~0.3",
"assert-deep-strict-equal": "~1.0",

@@ -89,0 +87,0 @@ "copy-file-util": "~0.1",

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