From 7a52ddeba2a68388b544f529d2d92104420f77b0 Mon Sep 17 00:00:00 2001 From: Shipwreckt Date: Fri, 31 Oct 2025 20:02:14 +0000 Subject: Changed from static to 11ty! --- node_modules/node-retrieve-globals/LICENSE | 21 ++ node_modules/node-retrieve-globals/README.md | 91 +++++ node_modules/node-retrieve-globals/package.json | 30 ++ .../node-retrieve-globals/retrieveGlobals.js | 376 +++++++++++++++++++++ .../util/getWorkingDirectory.js | 18 + .../node-retrieve-globals/util/vmModules.js | 23 ++ 6 files changed, 559 insertions(+) create mode 100644 node_modules/node-retrieve-globals/LICENSE create mode 100644 node_modules/node-retrieve-globals/README.md create mode 100644 node_modules/node-retrieve-globals/package.json create mode 100644 node_modules/node-retrieve-globals/retrieveGlobals.js create mode 100644 node_modules/node-retrieve-globals/util/getWorkingDirectory.js create mode 100644 node_modules/node-retrieve-globals/util/vmModules.js (limited to 'node_modules/node-retrieve-globals') diff --git a/node_modules/node-retrieve-globals/LICENSE b/node_modules/node-retrieve-globals/LICENSE new file mode 100644 index 0000000..8706985 --- /dev/null +++ b/node_modules/node-retrieve-globals/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Zach Leatherman @zachleat + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/node-retrieve-globals/README.md b/node_modules/node-retrieve-globals/README.md new file mode 100644 index 0000000..eaf8f1e --- /dev/null +++ b/node_modules/node-retrieve-globals/README.md @@ -0,0 +1,91 @@ +# node-retrieve-globals + +Execute a string of JavaScript using Node.js and return the global variable values and functions. + +* Supported on Node.js 16 and newer. +* Uses `var`, `let`, `const`, `function`, Array and Object [destructuring assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment). +* Async-only as of v5.0. +* Can return any valid JS data type (including functions). +* Can provide an external data object as context to the local execution scope +* Transforms ESM import statements to work with current CommonJS limitations in Node’s `vm`. +* Uses [Node’s `vm` module to execute JavaScript](https://nodejs.org/api/vm.html#vmruninthiscontextcode-options) + * ⚠️ The `node:vm` module is not a security mechanism. Do not use it to run untrusted code. + * `codeGeneration` (e.g. `eval`) is disabled by default; use `setCreateContextOptions({codeGeneration: { strings: true, wasm: true } })` to re-enable. + * Works _with or without_ `--experimental-vm-modules` flag (for `vm.Module` support). _(v5.0.0 and newer)_ + * Future-friendly feature tests for when `vm.Module` is stable and `--experimental-vm-modules` is no longer necessary. _(v5.0.0 and newer)_ +* In use on: + * [JavaScript in Eleventy Front Matter](https://www.11ty.dev/docs/data-frontmatter-customize/#example-use-javascript-in-your-front-matter) (and [Demo](https://github.com/11ty/demo-eleventy-js-front-matter)) + * [WebC’s `