@paciolan/remote-module-loader 3.0.3 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ {
2
+ "hooks": {
3
+ "PostToolUse": [
4
+ {
5
+ "matcher": "Edit|Write",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "cd \"$CLAUDE_PROJECT_DIR\" && npm run lint"
10
+ }
11
+ ]
12
+ }
13
+ ]
14
+ }
15
+ }
package/CLAUDE.md ADDED
@@ -0,0 +1,5 @@
1
+ # CLAUDE.md
2
+
3
+ ## Project Overview
4
+
5
+ `@paciolan/remote-module-loader` is a TypeScript library that dynamically loads CommonJS modules from remote URLs. It works in both browser (XMLHttpRequest) and Node.js (http/https) environments, auto-detecting which fetcher to use. Modules are evaluated via `new Function()` with dependency injection through a `requires` function.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Remote Module Loader ![coverage:100%](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)
2
2
 
3
- Loads a CommonJS module from a remote URL for the Browser or Node.js.
3
+ Loads a CommonJS, AMD, or UMD module from a remote URL for the Browser or Node.js.
4
4
 
5
5
  ![Lunar Module](https://raw.githubusercontent.com/Paciolan/remote-module-loader/master/media/logo-small.png)
6
6
 
@@ -61,7 +61,7 @@ export default createLoadRemoteModule({ requires });
61
61
 
62
62
  The default loader can be overridden if you want to use an alternate method.
63
63
 
64
- This example uses `axios` for the fetcher.
64
+ This example uses `fetch` for the fetcher.
65
65
 
66
66
  ```javascript
67
67
  /**
@@ -69,9 +69,8 @@ This example uses `axios` for the fetcher.
69
69
  */
70
70
 
71
71
  import createLoadRemoteModule from "@paciolan/remote-module-loader";
72
- import axios from "axios";
73
72
 
74
- const fetcher = url => axios.get(url).then(request => request.data);
73
+ const fetcher = url => fetch(url).then(response => response.text());
75
74
 
76
75
  export default createLoadRemoteModule({ fetcher });
77
76
  ```
@@ -139,9 +138,9 @@ main();
139
138
 
140
139
  ## Creating a Remote Module
141
140
 
142
- Remote Modules must be in the CommonJS format, using `exports` to export functionality.
141
+ Remote modules can be in CommonJS, AMD, or UMD format. The loader provides both `require`/`module`/`exports` (CommonJS) and `define` (AMD) to every module, so the module itself determines which format to use.
143
142
 
144
- This is an example of a simple CommonJS module:
143
+ ### CommonJS
145
144
 
146
145
  ```javascript
147
146
  function helloWorld() {
@@ -163,11 +162,33 @@ exports = {
163
162
  exports.default = "SUCCESS!";
164
163
  ```
165
164
 
165
+ ### AMD
166
+
167
+ ```javascript
168
+ define(["exports"], function (exports) {
169
+ exports.default = function helloWorld() {
170
+ console.log("Hello World!");
171
+ };
172
+ });
173
+ ```
174
+
175
+ AMD modules can also return a value directly from the factory:
176
+
177
+ ```javascript
178
+ define(function () {
179
+ return {
180
+ default: function helloWorld() {
181
+ console.log("Hello World!");
182
+ }
183
+ };
184
+ });
185
+ ```
186
+
166
187
  ### Webpack
167
188
 
168
- Webpack can be setup to export as CommonJS.
189
+ Webpack can be setup to export as CommonJS or AMD.
169
190
 
170
- Inside `webpack.config.js`, set the `libraryTarget` to `"commonjs"`.
191
+ Inside `webpack.config.js`, set the `libraryTarget` to `"commonjs"` or `"amd"`.
171
192
 
172
193
  ```javascript
173
194
  module.exports = {
@@ -177,6 +198,14 @@ module.exports = {
177
198
  };
178
199
  ```
179
200
 
201
+ ```javascript
202
+ module.exports = {
203
+ output: {
204
+ libraryTarget: "amd"
205
+ }
206
+ };
207
+ ```
208
+
180
209
  Dependencies should be excluded from the bundle because they will be provided by the Web Application can be added to webpack's `externals` section.
181
210
 
182
211
  This will prevent webpack from bundling duplicate 3rd party libraries, decreasing the bundle size.
@@ -196,7 +225,7 @@ module.exports = {
196
225
 
197
226
  Sites with a `content_security_policy` header set are likely to not work. CSP puts a restriction on using `new Function`, which `remote-module-loader` relies upon.
198
227
 
199
- [Read more on CSP](https://developer.chrome.com/extensions/contentSecurityPolicy)
228
+ [Read more on CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)
200
229
 
201
230
  ## Alternatives
202
231
 
@@ -204,6 +233,6 @@ Sites with a `content_security_policy` header set are likely to not work. CSP pu
204
233
 
205
234
  ## Contributors
206
235
 
207
- Joel Thoms (https://twitter.com/joelnet)
236
+ Joel Thoms (https://x.com/joelnet)
208
237
 
209
238
  Icon made by [Freepik](https://www.flaticon.com/authors/freepik) from [www.flaticon.com](www.flaticon.com)
@@ -0,0 +1,77 @@
1
+ module.exports = {
2
+ list: [
3
+ "test",
4
+ "feat",
5
+ "fix",
6
+ "chore",
7
+ "docs",
8
+ "refactor",
9
+ "style",
10
+ "ci",
11
+ "perf"
12
+ ],
13
+ maxMessageLength: 64,
14
+ minMessageLength: 3,
15
+ questions: [
16
+ "type",
17
+ "scope",
18
+ "subject",
19
+ "body",
20
+ "breaking",
21
+ "issues",
22
+ "lerna"
23
+ ],
24
+ scopes: [],
25
+ types: {
26
+ chore: {
27
+ description: "Build process or auxiliary tool changes",
28
+ emoji: "🛠️",
29
+ value: "chore"
30
+ },
31
+ ci: {
32
+ description: "CI related changes",
33
+ emoji: "🤖",
34
+ value: "ci"
35
+ },
36
+ docs: {
37
+ description: "Documentation only changes",
38
+ emoji: "📚",
39
+ value: "docs"
40
+ },
41
+ feat: {
42
+ description: "A new feature",
43
+ emoji: "✨",
44
+ value: "feat"
45
+ },
46
+ fix: {
47
+ description: "A bug fix",
48
+ emoji: "🐛",
49
+ value: "fix"
50
+ },
51
+ perf: {
52
+ description: "A code change that improves performance",
53
+ emoji: "⚡️",
54
+ value: "perf"
55
+ },
56
+ refactor: {
57
+ description: "A code change that neither fixes a bug or adds a feature",
58
+ emoji: "💡",
59
+ value: "refactor"
60
+ },
61
+ release: {
62
+ description: "Create a release commit",
63
+ emoji: "🚀",
64
+ value: "release"
65
+ },
66
+ style: {
67
+ description: "Markup, white-space, formatting, missing semi-colons...",
68
+ emoji: "🎨",
69
+ value: "style"
70
+ },
71
+ test: {
72
+ description: "Adding missing tests",
73
+ emoji: "🚨",
74
+ value: "test"
75
+ }
76
+ }
77
+ };
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2DAA2E;AAAlE,kFAAiC;AAC1C,uDAAsD;AAA7C,6DAAc"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2DAA2E;AAAlE,kFAAiC;AAC1C,uDAAsD;AAA7C,6DAAc"}
@@ -4,7 +4,7 @@ exports.createRequires = void 0;
4
4
  var createRequires = function (dependencies) { return function (name) {
5
5
  var _dependencies = dependencies || {};
6
6
  if (!(name in _dependencies)) {
7
- throw new Error("Could not require '" + name + "'. '" + name + "' does not exist in dependencies.");
7
+ throw new Error("Could not require '".concat(name, "'. '").concat(name, "' does not exist in dependencies."));
8
8
  }
9
9
  return _dependencies[name];
10
10
  }; };
@@ -1 +1 @@
1
- {"version":3,"file":"createRequires.js","sourceRoot":"","sources":["../../src/lib/createRequires.ts"],"names":[],"mappings":";;;AAQO,IAAM,cAAc,GAAmB,UAAA,YAAY,IAAI,OAAA,UAAA,IAAI;IAChE,IAAM,aAAa,GAAG,YAAY,IAAI,EAAE,CAAC;IAEzC,IAAI,CAAC,CAAC,IAAI,IAAI,aAAa,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CACb,wBAAsB,IAAI,YAAO,IAAI,sCAAmC,CACzE,CAAC;KACH;IAED,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC,EAV6D,CAU7D,CAAC;AAVW,QAAA,cAAc,kBAUzB"}
1
+ {"version":3,"file":"createRequires.js","sourceRoot":"","sources":["../../src/lib/createRequires.ts"],"names":[],"mappings":";;;AAQO,IAAM,cAAc,GAAmB,UAAA,YAAY,IAAI,OAAA,UAAA,IAAI;IAChE,IAAM,aAAa,GAAG,YAAY,IAAI,EAAE,CAAC;IAEzC,IAAI,CAAC,CAAC,IAAI,IAAI,aAAa,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CACb,6BAAsB,IAAI,iBAAO,IAAI,sCAAmC,CACzE,CAAC;KACH;IAED,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC,EAV6D,CAU7D,CAAC;AAVW,QAAA,cAAc,kBAUzB"}
@@ -4,11 +4,12 @@ exports.createLoadRemoteModule = void 0;
4
4
  var memoize_1 = require("./memoize");
5
5
  var nodeFetcher_1 = require("./nodeFetcher");
6
6
  var index_1 = require("./xmlHttpRequestFetcher/index");
7
+ /* istanbul ignore next - environment detection */
7
8
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
8
9
  /* istanbul ignore next - difficult to test */
9
10
  var defaultFetcher = isBrowser ? index_1["default"] : nodeFetcher_1["default"];
10
11
  var defaultRequires = function (name) {
11
- throw new Error("Could not require '" + name + "'. The 'requires' function was not provided.");
12
+ throw new Error("Could not require '".concat(name, "'. The 'requires' function was not provided."));
12
13
  };
13
14
  var createLoadRemoteModule = function (_a) {
14
15
  var _b = _a === void 0 ? {} : _a, requires = _b.requires, fetcher = _b.fetcher;
@@ -18,8 +19,31 @@ var createLoadRemoteModule = function (_a) {
18
19
  return _fetcher(url).then(function (data) {
19
20
  var exports = {};
20
21
  var module = { exports: exports };
21
- var func = new Function("require", "module", "exports", data);
22
- func(_requires, module, exports);
22
+ var define = function () {
23
+ var args = [];
24
+ for (var _i = 0; _i < arguments.length; _i++) {
25
+ args[_i] = arguments[_i];
26
+ }
27
+ var factory;
28
+ var deps;
29
+ if (typeof args[args.length - 1] === "function") {
30
+ factory = args.pop();
31
+ }
32
+ else {
33
+ module.exports = args[args.length - 1];
34
+ return;
35
+ }
36
+ deps = Array.isArray(args[args.length - 1]) ? args.pop() : ["require", "exports", "module"];
37
+ var builtins = { exports: exports, require: _requires, module: module };
38
+ var resolved = deps.map(function (dep) { return builtins[dep] || _requires(dep); });
39
+ var result = factory.apply(void 0, resolved);
40
+ if (result !== undefined) {
41
+ module.exports = result;
42
+ }
43
+ };
44
+ define.amd = {};
45
+ var func = new Function("require", "module", "exports", "define", data);
46
+ func(_requires, module, exports, define);
23
47
  return module.exports;
24
48
  });
25
49
  });
@@ -1 +1 @@
1
- {"version":3,"file":"loadRemoteModule.js","sourceRoot":"","sources":["../../src/lib/loadRemoteModule.ts"],"names":[],"mappings":";;;AACA,qCAAgC;AAChC,6CAAwC;AACxC,uDAAkE;AAElE,IAAM,SAAS,GACb,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW,CAAC;AAE1E,8CAA8C;AAC9C,IAAM,cAAc,GAAG,SAAS,CAAC,CAAC,CAAC,kBAAqB,CAAC,CAAC,CAAC,wBAAW,CAAC;AAEvE,IAAM,eAAe,GAAG,UAAA,IAAI;IAC1B,MAAM,IAAI,KAAK,CACb,wBAAsB,IAAI,iDAA8C,CACzE,CAAC;AACJ,CAAC,CAAC;AAeK,IAAM,sBAAsB,GAA2B,UAAC,EAGzD;QAHyD,qBAG3D,EAAE,KAAA,EAFJ,QAAQ,cAAA,EACR,OAAO,aAAA;IAEP,IAAM,SAAS,GAAG,QAAQ,IAAI,eAAe,CAAC;IAC9C,IAAM,QAAQ,GAAG,OAAO,IAAI,cAAc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AAQ,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC1E,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YACzC,OAAO,MAAM,CAAC,OAAO,CAAC;QACxB,CAAC,CAAC;IA9BF,CA8BE,CACH,CAAC;AACJ,CAAC,CAAC;AAxCW,QAAA,sBAAsB,0BAwCjC"}
@@ -37,7 +37,7 @@ var nodeFetcher = function (url) {
37
37
  return new Promise(function (resolve, reject) {
38
38
  get(url, function (res) {
39
39
  if (res.statusCode !== status_1.OK) {
40
- return reject(new Error("HTTP Error Response: " + res.statusCode + " " + res.statusMessage + " (" + url + ")"));
40
+ return reject(new Error("HTTP Error Response: ".concat(res.statusCode, " ").concat(res.statusMessage, " (").concat(url, ")")));
41
41
  }
42
42
  var data = null;
43
43
  // called when a data chunk is received.
@@ -50,6 +50,12 @@ var nodeFetcher = function (url) {
50
50
  });
51
51
  // called when the complete response is received.
52
52
  res.on("end", function () { return resolve(data); });
53
+ // called when the connection is closed.
54
+ res.on("close", function () {
55
+ if (!res.complete) {
56
+ reject(new Error("Connection closed before response was complete (".concat(url, ")")));
57
+ }
58
+ });
53
59
  }).on("error", reject);
54
60
  });
55
61
  };
@@ -1 +1 @@
1
- {"version":3,"file":"nodeFetcher.js","sourceRoot":"","sources":["../../src/lib/nodeFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2BAA6B;AAC7B,6BAA+B;AAE/B,mCAA6B;AAM7B;;GAEG;AACH,IAAM,GAAG,GAAY,UAAC,GAAG;IAAE,cAAO;SAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;QAAP,6BAAO;;IAChC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC3B,OAAO;YACL,EAAE,YAAC,SAAS,EAAE,QAAQ;gBACpB,QAAQ,CAAC,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC;YAC/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CAAwC;YACxC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE;gBACd,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;oBACjB,MAAM,CAAC,IAAI,KAAK,CAAC,0DAAmD,GAAG,MAAG,CAAC,CAAC,CAAC;iBAC9E;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACzB,CAAC,CAAC;AA3BF,CA2BE,CAAC;AAEL,qBAAe,WAAW,CAAC"}
@@ -10,7 +10,7 @@ var xmlHttpRequestFetcher = function (url) {
10
10
  return;
11
11
  xhr.status === status_1.OK
12
12
  ? resolve(xhr.responseText)
13
- : reject(new Error("HTTP Error Response: " + xhr.status + " " + xhr.statusText + " (" + url + ")"));
13
+ : reject(new Error("HTTP Error Response: ".concat(xhr.status, " ").concat(xhr.statusText, " (").concat(url, ")")));
14
14
  };
15
15
  xhr.open("GET", url, true);
16
16
  xhr.send();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/xmlHttpRequestFetcher/index.ts"],"names":[],"mappings":";;AACA,oCAA+B;AAC/B,2CAAoC;AAEpC,IAAM,qBAAqB,GAAY,UAAA,GAAG;IACxC,OAAA,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;QAC1B,IAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;QACjC,GAAG,CAAC,kBAAkB,GAAG;YACvB,IAAI,GAAG,CAAC,UAAU,KAAK,iBAAI;gBAAE,OAAO;YACpC,GAAG,CAAC,MAAM,KAAK,WAAE;gBACf,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;gBAC3B,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,0BAAwB,GAAG,CAAC,MAAM,SAAI,GAAG,CAAC,UAAU,UAAK,GAAG,MAAG,CAAC,CAAC,CAAA;QACxF,CAAC,CAAC;QACF,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3B,GAAG,CAAC,IAAI,EAAE,CAAC;IACb,CAAC,CAAC;AAVF,CAUE,CAAC;AAEL,qBAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/xmlHttpRequestFetcher/index.ts"],"names":[],"mappings":";;AACA,oCAA+B;AAC/B,2CAAoC;AAEpC,IAAM,qBAAqB,GAAY,UAAA,GAAG;IACxC,OAAA,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;QAC1B,IAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;QACjC,GAAG,CAAC,kBAAkB,GAAG;YACvB,IAAI,GAAG,CAAC,UAAU,KAAK,iBAAI;gBAAE,OAAO;YACpC,GAAG,CAAC,MAAM,KAAK,WAAE;gBACf,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;gBAC3B,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,+BAAwB,GAAG,CAAC,MAAM,cAAI,GAAG,CAAC,UAAU,eAAK,GAAG,MAAG,CAAC,CAAC,CAAA;QACxF,CAAC,CAAC;QACF,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3B,GAAG,CAAC,IAAI,EAAE,CAAC;IACb,CAAC,CAAC;AAVF,CAUE,CAAC;AAEL,qBAAe,qBAAqB,CAAC"}
@@ -0,0 +1,45 @@
1
+ {
2
+ "scan": {
3
+ "analyzer": {
4
+ "id": "semgrep",
5
+ "name": "Semgrep",
6
+ "url": "https://gitlab.com/gitlab-org/security-products/analyzers/semgrep",
7
+ "vendor": {
8
+ "name": "GitLab"
9
+ },
10
+ "version": "6.14.0"
11
+ },
12
+ "scanner": {
13
+ "id": "semgrep",
14
+ "name": "Semgrep",
15
+ "url": "https://github.com/returntocorp/semgrep",
16
+ "vendor": {
17
+ "name": "GitLab"
18
+ },
19
+ "version": "1.145.0"
20
+ },
21
+ "type": "sast",
22
+ "start_time": "2026-04-03T01:47:01",
23
+ "end_time": "2026-04-03T01:47:23",
24
+ "status": "success",
25
+ "observability": {
26
+ "events": [
27
+ {
28
+ "event": "collect_sast_scan_metrics_from_pipeline",
29
+ "property": "10019756-9f77-4683-b535-f031aba4f200",
30
+ "label": "semgrep",
31
+ "value": 0,
32
+ "version": "6.14.0",
33
+ "exit_code": 0,
34
+ "override_count": 0,
35
+ "passthrough_count": 4,
36
+ "custom_exclude_path_count": 0,
37
+ "time_s": 22,
38
+ "file_count": 20
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ "version": "15.2.2",
44
+ "vulnerabilities": []
45
+ }