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 to 2.4.0-alpha.0

16

build/build-static.js

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

const knownAssets = {};
let fileContents = 'import { Buffer } from "buffer";\n';
let fileContents = '';
for (const [index, file] of files.entries()) {

@@ -137,2 +137,14 @@ const relativeFilePath = path.relative('./src', file);

fileContents += 'import { StaticAssets } from "@fastly/compute-js-static-publish";\n';
fileContents += `
function fromBase64(data) {
const raw = atob(data);
const rawLength = raw.length;
const array = new ArrayBuffer(rawLength);
const view = new Uint8Array(array);
for (let i = 0; i < rawLength; i++) {
view[i] = raw.charCodeAt(i);
}
return array;
}
`;
fileContents += `\nexport const assets = {\n`;

@@ -153,3 +165,3 @@ for (const [index, file] of files.entries()) {

if (contentDef == null || contentDef.binary) {
content = 'Buffer.from(file' + index + ', "base64")';
content = 'fromBase64(file' + index + ')';
}

@@ -156,0 +168,0 @@ else {

10

build/init-app.js

@@ -176,8 +176,8 @@ // This program creates a Compute@Edge JavaScript application

"@fastly/expressly": "^1.0.0-alpha.7",
"@fastly/js-compute": "^0.5.3",
"buffer": "^6.0.3",
"core-js": "^3.19.1",
"webpack": "^5.64.0",
"webpack-cli": "^4.9.1"
"webpack": "^5.75.0",
"webpack-cli": "^5.0.0"
},
"dependencies": {
"@fastly/js-compute": "^0.5.12"
},
"engines": {

@@ -184,0 +184,0 @@ "node": ">=16.0.0"

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

/// <reference types="node" resolution-mode="require"/>
declare type TestFn = (name: string) => boolean;

@@ -18,3 +17,3 @@ export declare type ContentTypeDef = {

contentType: string;
content: Buffer | string;
content: ArrayBuffer | string;
module: unknown | null;

@@ -21,0 +20,0 @@ isStatic: boolean;

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

@@ -33,3 +33,3 @@ "main": "./build/index.js",

"dependencies": {
"@fastly/js-compute": "^0.5.4",
"@fastly/js-compute": "^0.5.12",
"command-line-args": "^5.2.1"

@@ -36,0 +36,0 @@ },

@@ -52,11 +52,3 @@ const path = require("path");

// or core nodejs modules needed for your application.
new ProvidePlugin({
Buffer: [ "buffer", "Buffer" ],
}),
],
resolve: {
fallback: {
"buffer": require.resolve("buffer/"),
},
},
};

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