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

@travetto/asset

Package Overview
Dependencies
Maintainers
1
Versions
310
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/asset - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

2

package.json

@@ -30,3 +30,3 @@ {

},
"version": "0.0.23"
"version": "0.0.24"
}

@@ -6,2 +6,4 @@ travetto: Asset

If `GraphicsMagick` is not installed, the framework will spin up a `docker` container to provide needed functionality.
The primary driver for the Asset framework is an `AssetSource` which needs to be implemented

@@ -13,2 +15,2 @@ to provide code on how to read and write files.

- `asset-mongo` provides the mongodb driver for file management
- `asset-s3` provides the S3 driver for file management
import * as fs from 'fs';
import * as util from 'util';
import { CommandService } from '@travetto/exec';
import { CommandService, spawn } from '@travetto/exec';
import { Cacheable } from '@travetto/cache';
import { Injectable } from '@travetto/di';
import { CommonProcess, ExecutionResult } from '@travetto/exec/src/types';
import { AppEnv } from '@travetto/base';

@@ -11,4 +13,2 @@ import { AssetService } from './asset';

import { AssetUtil } from '../util';
import { CommonProcess, ExecutionResult } from '@travetto/exec/src/types';
import { AppEnv } from '@travetto/base';

@@ -21,10 +21,11 @@ const fsUnlinkAsync = util.promisify(fs.unlink);

converter = new CommandService({ image: 'v4tech/imagemagick' });
converter = new CommandService({
image: 'v4tech/imagemagick',
checkForLocal: async () => {
return (await spawn('convert --version')[1]).valid;
}
});
constructor(private assetService: AssetService) { }
async postConstruct() {
await this.converter.init();
}
@Cacheable({

@@ -46,3 +47,3 @@ max: 1000,

const [proc, prom] = this.converter.exec('convert', '-resize', `${options.w}x${options.h}`, '-auto-orient', '-', '-');
const [proc, prom] = await this.converter.exec('convert', '-resize', `${options.w}x${options.h}`, '-auto-orient', '-', '-');

@@ -49,0 +50,0 @@ info.stream.pipe(proc.stdin);

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