@drawbridge/drawbridge-utils 0.0.75 → 0.0.77
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.
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/sanitize.cjs +12 -9
- package/dist/sanitize.d.cts +9 -8
- package/dist/sanitize.d.ts +9 -8
- package/dist/sanitize.js +1 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/sanitize.cjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
7
|
var __export = (target, all) => {
|
|
6
8
|
for (var name in all)
|
|
@@ -14,6 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
16
|
}
|
|
15
17
|
return to;
|
|
16
18
|
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
17
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
28
|
|
|
19
29
|
// lib/sanitize.js
|
|
@@ -27,17 +37,10 @@ __export(sanitize_exports, {
|
|
|
27
37
|
sanitizeUrl: () => sanitizeUrl
|
|
28
38
|
});
|
|
29
39
|
module.exports = __toCommonJS(sanitize_exports);
|
|
30
|
-
|
|
31
|
-
// node_modules/tsup/assets/cjs_shims.js
|
|
32
|
-
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
|
|
33
|
-
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
34
|
-
|
|
35
|
-
// lib/sanitize.js
|
|
36
|
-
var import_node_module = require("module");
|
|
37
|
-
var disposableDomains = (0, import_node_module.createRequire)(importMetaUrl)("disposable-email-domains");
|
|
40
|
+
var import_disposable_email_domains = __toESM(require("disposable-email-domains/index.js"), 1);
|
|
38
41
|
var SCOPE_KEYS = ["organization", "account", "user", "owner"];
|
|
39
42
|
var DANGEROUS_OPERATORS = ["$where", "$function", "$accumulator"];
|
|
40
|
-
var disposableBlacklist = new Set(
|
|
43
|
+
var disposableBlacklist = new Set(import_disposable_email_domains.default.map((d) => d.toLowerCase()));
|
|
41
44
|
var stripDangerousOperators = (value) => {
|
|
42
45
|
if (Array.isArray(value)) {
|
|
43
46
|
return value.map(stripDangerousOperators);
|
package/dist/sanitize.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
//
|
|
4
|
-
// JSON import attribute
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
|
|
1
|
+
import disposableDomains from 'disposable-email-domains/index.js';
|
|
2
|
+
|
|
3
|
+
// disposable-email-domains' package `main` is a bare index.json, which under
|
|
4
|
+
// plain-Node ESM needs a JSON import attribute (Node <20.10) — hence this was
|
|
5
|
+
// previously loaded via createRequire. But createRequire pulls the `node:module`
|
|
6
|
+
// builtin, which browser bundlers (app-web/share via Turbopack) can't resolve,
|
|
7
|
+
// breaking the client build. The package also ships index.js — a plain-CJS
|
|
8
|
+
// re-export of the same list — so importing that entry works under Node
|
|
9
|
+
// (ESM + CJS) and in bundlers alike, with no node:module/createRequire.
|
|
9
10
|
|
|
10
11
|
const SCOPE_KEYS = [ 'organization', 'account', 'user', 'owner' ];
|
|
11
12
|
const DANGEROUS_OPERATORS = [ '$where', '$function', '$accumulator' ];
|
package/dist/sanitize.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
//
|
|
4
|
-
// JSON import attribute
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
|
|
1
|
+
import disposableDomains from 'disposable-email-domains/index.js';
|
|
2
|
+
|
|
3
|
+
// disposable-email-domains' package `main` is a bare index.json, which under
|
|
4
|
+
// plain-Node ESM needs a JSON import attribute (Node <20.10) — hence this was
|
|
5
|
+
// previously loaded via createRequire. But createRequire pulls the `node:module`
|
|
6
|
+
// builtin, which browser bundlers (app-web/share via Turbopack) can't resolve,
|
|
7
|
+
// breaking the client build. The package also ships index.js — a plain-CJS
|
|
8
|
+
// re-export of the same list — so importing that entry works under Node
|
|
9
|
+
// (ESM + CJS) and in bundlers alike, with no node:module/createRequire.
|
|
9
10
|
|
|
10
11
|
const SCOPE_KEYS = [ 'organization', 'account', 'user', 'owner' ];
|
|
11
12
|
const DANGEROUS_OPERATORS = [ '$where', '$function', '$accumulator' ];
|
package/dist/sanitize.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// lib/sanitize.js
|
|
2
|
-
import
|
|
3
|
-
var disposableDomains = createRequire(import.meta.url)("disposable-email-domains");
|
|
2
|
+
import disposableDomains from "disposable-email-domains/index.js";
|
|
4
3
|
var SCOPE_KEYS = ["organization", "account", "user", "owner"];
|
|
5
4
|
var DANGEROUS_OPERATORS = ["$where", "$function", "$accumulator"];
|
|
6
5
|
var disposableBlacklist = new Set(disposableDomains.map((d) => d.toLowerCase()));
|
package/package.json
CHANGED