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

@miniflare/sites

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@miniflare/sites - npm Package Compare versions

Comparing version 2.0.0-rc.3 to 2.0.0-rc.4

71

dist/src/index.js

@@ -0,3 +1,24 @@

var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
var __export = (target, all) => {
__markAsModule(target);
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __reExport = (target, module2, desc) => {
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
for (let key of __getOwnPropNames(module2))
if (!__hasOwnProp.call(target, key) && key !== "default")
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
}
return target;
};
var __toModule = (module2) => {
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
};
var __decorateClass = (decorators, target, key, kind) => {

@@ -13,7 +34,11 @@ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;

// packages/sites/src/index.ts
__export(exports, {
FilteredKVNamespace: () => FilteredKVNamespace,
SitesPlugin: () => SitesPlugin
});
// packages/sites/src/filtered.ts
import {
KVNamespace
} from "@miniflare/kv";
var FilteredKVNamespace = class extends KVNamespace {
var import_kv = __toModule(require("@miniflare/kv"));
var FilteredKVNamespace = class extends import_kv.KVNamespace {
#options;

@@ -66,10 +91,5 @@ constructor(storage, options = {}, clock) {

// packages/sites/src/plugin.ts
import path from "path";
import {
Option,
OptionType,
Plugin,
globsToMatcher
} from "@miniflare/shared";
var SitesPlugin = class extends Plugin {
var import_path = __toModule(require("path"));
var import_shared = __toModule(require("@miniflare/shared"));
var SitesPlugin = class extends import_shared.Plugin {
sitePath;

@@ -87,4 +107,6 @@ siteInclude;

return {};
const { FileStorage } = await import("@miniflare/storage-file");
const sitePath = path.resolve(this.ctx.rootPath, this.sitePath);
const {
FileStorage
} = require("@miniflare/storage-file");
const sitePath = import_path.default.resolve(this.ctx.rootPath, this.sitePath);
const storage = new FileStorage(sitePath, false);

@@ -94,4 +116,4 @@ const bindings = {

readOnly: true,
include: this.siteInclude && globsToMatcher(this.siteInclude),
exclude: this.siteExclude && globsToMatcher(this.siteExclude)
include: this.siteInclude && (0, import_shared.globsToMatcher)(this.siteInclude),
exclude: this.siteExclude && (0, import_shared.globsToMatcher)(this.siteExclude)
}),

@@ -110,4 +132,4 @@ __STATIC_CONTENT_MANIFEST: {}

__decorateClass([
Option({
type: OptionType.STRING,
(0, import_shared.Option)({
type: import_shared.OptionType.STRING,
name: "site",

@@ -121,4 +143,4 @@ alias: "s",

__decorateClass([
Option({
type: OptionType.ARRAY,
(0, import_shared.Option)({
type: import_shared.OptionType.ARRAY,
description: "Glob pattern of site files to serve",

@@ -130,4 +152,4 @@ logName: "Workers Site Include",

__decorateClass([
Option({
type: OptionType.ARRAY,
(0, import_shared.Option)({
type: import_shared.OptionType.ARRAY,
description: "Glob pattern of site files not to serve",

@@ -138,6 +160,7 @@ logName: "Workers Site Exclude",

], SitesPlugin.prototype, "siteExclude", 2);
export {
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
FilteredKVNamespace,
SitesPlugin
};
});
//# sourceMappingURL=index.js.map
{
"name": "@miniflare/sites",
"version": "2.0.0-rc.3",
"version": "2.0.0-rc.4",
"description": "Workers Sites module for Miniflare: a fun, full-featured, fully-local simulator for Cloudflare Workers",

@@ -14,4 +14,3 @@ "keywords": [

"license": "MIT",
"type": "module",
"exports": "./dist/src/index.js",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",

@@ -41,14 +40,14 @@ "files": [

"test/fixtures/plugin.assetHandler.js",
"test/fixtures/plugin.assetHandler.modules.js"
"test/fixtures/plugin.assetHandler.modules.mjs"
],
"dependencies": {
"@miniflare/kv": "2.0.0-rc.3",
"@miniflare/shared": "2.0.0-rc.3",
"@miniflare/storage-file": "2.0.0-rc.3"
"@miniflare/kv": "2.0.0-rc.4",
"@miniflare/shared": "2.0.0-rc.4",
"@miniflare/storage-file": "2.0.0-rc.4"
},
"devDependencies": {
"@cloudflare/kv-asset-handler": "^0.1.3",
"@miniflare/core": "2.0.0-rc.3",
"@miniflare/shared-test": "2.0.0-rc.3"
"@miniflare/core": "2.0.0-rc.4",
"@miniflare/shared-test": "2.0.0-rc.4"
}
}

@@ -5,3 +5,3 @@ # `@miniflare/sites`

fun, full-featured, fully-local simulator for Cloudflare Workers. See
[🌐 Workers Sites](https://miniflare.dev/sites.html) for more details.
[🌐 Workers Sites](https://v2.miniflare.dev/storage/sites) for more details.

@@ -8,0 +8,0 @@ ## Example

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