@architect/plugin-bundles
Advanced tools
Comparing version 3.0.4 to 3.0.5
{ | ||
"name": "@architect/plugin-bundles", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "plugin-bundles Plugin for exposing bundled modules to the browser from your Architect project.", | ||
@@ -5,0 +5,0 @@ "main": "src/plugins/bundles/index.js", |
@@ -1,2 +0,2 @@ | ||
`plugin-bundles | ||
# `plugin-bundles` | ||
Plugin for exposing bundled modules to the browser from your Architect project. | ||
@@ -27,5 +27,6 @@ | ||
yolo /lib/yolo.mjs | ||
`` | ||
``` | ||
Bundles are will now be available at `/_static/bundles/yolo.mjs` | ||
[If you have fingerprinting turned on then you can use `static.json` to look up the fingerprinted file name.](https://arc.codes/docs/en/guides/frontend/static-assets#fingerprint) | ||
> 🙌 [Turn fingerprinting on and use `static.json` to retrieve the fingerprinted file name.](https://arc.codes/docs/en/guides/frontend/static-assets#fingerprint) |
const path = require('path') | ||
const { build } = require('esbuild') | ||
const fs = require('fs') | ||
@@ -24,4 +23,3 @@ const sandbox = { | ||
async function verify (arc) { | ||
if (Array.isArray(arc.bundles) === false) | ||
throw Error('missing or invalid @bundles pragma') | ||
if (!arc.bundles) return | ||
for (let tuple of arc.bundles) { | ||
@@ -47,2 +45,3 @@ if (Array.isArray(tuple)) { | ||
async function bundle (arc, inventory) { | ||
if (!arc.bundles) return | ||
const pathToStatic = path.join(inventory._project.cwd, inventory?.static?.folder || 'public') | ||
@@ -62,8 +61,4 @@ const pathToStaticBundles = path.join(pathToStatic, 'bundles') | ||
} | ||
fs.writeFileSync( | ||
path.join(pathToStatic, '.gitignore'), | ||
'bundles' | ||
) | ||
} | ||
module.exports = { sandbox, deploy } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
32
0
14843
56
1