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

@jsreport/jsreport-assets

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsreport/jsreport-assets - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

4

lib/assetsShared.js

@@ -13,3 +13,3 @@ const fs = require('fs/promises')

async function readAsset (reporter, definition, { id, name, encoding }, req) {
async function readAsset (reporter, definition, { id, name, encoding, currentPath }, req) {
const allowAssetsLinkedToFiles = definition.options.allowAssetsLinkedToFiles !== false

@@ -67,3 +67,3 @@

assetName = [...pathParts].pop()
const result = await reporter.folders.resolveEntityFromPath(name, 'assets', req)
const result = await reporter.folders.resolveEntityFromPath(name, 'assets', { currentPath }, req)

@@ -70,0 +70,0 @@ if (result) {

@@ -110,3 +110,3 @@ const util = require('util')

read: async (path, encoding, moduleMode = false) => {
const r = await readAsset(reporter, definition, { id: null, name: path, encoding, moduleMode }, req)
const r = await readAsset(reporter, definition, { id: null, name: path, encoding, moduleMode, currentPath: proxy.currentPath }, req)
return r.content

@@ -135,3 +135,3 @@ },

registerHelpers: async (path) => {
const asset = await readAsset(reporter, definition, { id: null, name: path, encoding: 'utf8' }, req)
const asset = await readAsset(reporter, definition, { id: null, name: path, encoding: 'utf8', currentPath: proxy.currentPath }, req)

@@ -153,3 +153,3 @@ const functionNames = getTopLevelFunctions(asset.content.toString())

require: async (path) => {
const r = await readAsset(reporter, definition, { id: null, name: path, encoding: 'utf8' }, req)
const r = await readAsset(reporter, definition, { id: null, name: path, encoding: 'utf8', currentPath: proxy.currentPath }, req)

@@ -156,0 +156,0 @@ const userCode = [

{
"name": "@jsreport/jsreport-assets",
"version": "3.0.0",
"version": "3.0.1",
"description": "jsreport extension embedding static assets like fonts or helpers into the templates",

@@ -44,8 +44,8 @@ "keywords": [

"devDependencies": {
"@jsreport/jsreport-core": "3.0.0",
"@jsreport/jsreport-express": "3.0.0",
"@jsreport/jsreport-core": "3.1.0",
"@jsreport/jsreport-express": "3.1.0",
"@jsreport/jsreport-handlebars": "3.0.0",
"@jsreport/jsreport-jsrender": "3.0.0",
"@jsreport/jsreport-scripts": "3.0.0-beta.1",
"@jsreport/studio-dev": "3.0.0",
"@jsreport/jsreport-scripts": "3.0.0",
"@jsreport/studio-dev": "3.0.1",
"binary-extensions": "1.12.0",

@@ -52,0 +52,0 @@ "mocha": "8.2.1",

@@ -11,2 +11,6 @@ # @jsreport/jsreport-assets

### 3.0.1
- use relative path to the currently evaluated entity (for example relative asset inside script should be relative to the script)
### 3.0.0-beta.1

@@ -13,0 +17,0 @@

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