@netlify/edge-bundler
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -1,2 +0,2 @@ | ||
import { writeStage2 } from 'https://62ac9c589c16c50008b6ef55--edge-bootstrap.netlify.app/bundler/mod.ts' | ||
import { writeStage2 } from 'https://62bae4994570970008142f1e--edge-bootstrap.netlify.app/bundler/mod.ts' | ||
@@ -3,0 +3,0 @@ const [payload] = Deno.args |
@@ -23,3 +23,3 @@ import { promises as fs } from 'fs'; | ||
var _a, _b, _c; | ||
(_a = this.onBeforeDownload) === null || _a === void 0 ? void 0 : _a.call(this); | ||
await ((_a = this.onBeforeDownload) === null || _a === void 0 ? void 0 : _a.call(this)); | ||
await fs.mkdir(this.cacheDirectory, { recursive: true }); | ||
@@ -34,7 +34,7 @@ this.log(`Downloading Deno CLI to ${this.cacheDirectory}...`); | ||
const error = new Error('There was a problem setting up the Edge Functions environment. To try a manual installation, visit https://ntl.fyi/install-deno.'); | ||
(_b = this.onAfterDownload) === null || _b === void 0 ? void 0 : _b.call(this, error); | ||
await ((_b = this.onAfterDownload) === null || _b === void 0 ? void 0 : _b.call(this, error)); | ||
throw error; | ||
} | ||
await this.writeVersionFile(downloadedVersion); | ||
(_c = this.onAfterDownload) === null || _c === void 0 ? void 0 : _c.call(this); | ||
await ((_c = this.onAfterDownload) === null || _c === void 0 ? void 0 : _c.call(this)); | ||
return binaryPath; | ||
@@ -41,0 +41,0 @@ } |
@@ -8,3 +8,3 @@ import { promises as fs } from 'fs'; | ||
import { getFileHash } from '../utils/sha256.js'; | ||
const BOOTSTRAP_LATEST = 'https://62ac9c589c16c50008b6ef55--edge-bootstrap.netlify.app/bootstrap/index-combined.ts'; | ||
const BOOTSTRAP_LATEST = 'https://62bae4994570970008142f1e--edge-bootstrap.netlify.app/bootstrap/index-combined.ts'; | ||
const bundle = async (options) => { | ||
@@ -11,0 +11,0 @@ try { |
import { Buffer } from 'buffer'; | ||
import { promises as fs } from 'fs'; | ||
import { dirname } from 'path'; | ||
const DEFAULT_IMPORTS = { | ||
const INTERNAL_IMPORTS = { | ||
'netlify:edge': 'https://edge-bootstrap.netlify.app/v1/index.ts', | ||
@@ -10,5 +10,5 @@ }; | ||
const inputImports = input.reduce((acc, { imports }) => ({ ...acc, ...imports }), {}); | ||
// `DEFAULT_IMPORTS` must come last because we want our internal imports to | ||
// take precedence. | ||
this.imports = { ...inputImports, ...DEFAULT_IMPORTS }; | ||
// `INTERNAL_IMPORTS` must come last, | ||
// because we need to guarantee `netlify:edge` isn't user-defined. | ||
this.imports = { ...inputImports, ...INTERNAL_IMPORTS }; | ||
} | ||
@@ -15,0 +15,0 @@ getContents() { |
{ | ||
"name": "@netlify/edge-bundler", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Intelligently prepare Netlify Edge Functions for deployment", | ||
@@ -5,0 +5,0 @@ "type": "module", |
44595