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

@fastly/compute-js-static-publish

Package Overview
Dependencies
Maintainers
23
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastly/compute-js-static-publish - npm Package Compare versions

Comparing version 2.3.0-alpha.0 to 2.3.0-alpha.1

3

build/build-static.js

@@ -153,3 +153,3 @@ // This program builds static resources out of the files in the

else {
content = 'file' + index;
content = 'String(file' + index + ')';
}

@@ -202,4 +202,5 @@ let module;

fileContents += `\nexport const autoExt = ${JSON.stringify(autoExt)};\n`;
fileContents += '\nexport const staticAssets = new StaticAssets(assets);\n';
fs.writeFileSync('./src/statics.js', fileContents);
console.log("✅ Wrote static file loader for " + files.length + " file(s).");
}

@@ -6,4 +6,5 @@ /// <reference types="@fastly/js-compute" />

constructor(assetsMap: AssetsMap);
getAsset(key: string): import("./types.js").Asset;
serveAsset(event: FetchEvent, pathPrefix?: string): Response | null;
}
//# sourceMappingURL=static-assets.d.ts.map

@@ -5,6 +5,9 @@ export class StaticAssets {

}
getAsset(key) {
return this.assetsMap[key];
}
serveAsset(event, pathPrefix = '') {
const { request } = event;
const { pathname } = new URL(request.url);
const asset = this.assetsMap[`${pathPrefix}${pathname}`];
const asset = this.getAsset(`${pathPrefix}${pathname}`);
if (!asset) {

@@ -11,0 +14,0 @@ return null;

{
"name": "@fastly/compute-js-static-publish",
"type": "module",
"version": "2.3.0-alpha.0",
"version": "2.3.0-alpha.1",
"description": "Static Publisher for Compute@Edge JavaScript",

@@ -6,0 +6,0 @@ "main": "./build/index.js",

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