@shware/security 2.0.3 → 2.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.
- package/dist/auth/index.cjs +94 -26
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.cts +33 -17
- package/dist/auth/index.d.ts +33 -17
- package/dist/auth/index.mjs +92 -25
- package/dist/auth/index.mjs.map +1 -1
- package/dist/auth/types.cjs.map +1 -1
- package/dist/auth/types.d.cts +16 -5
- package/dist/auth/types.d.ts +16 -5
- package/dist/email/schema.cjs +41 -0
- package/dist/email/schema.cjs.map +1 -0
- package/dist/email/schema.d.cts +13 -0
- package/dist/email/schema.d.ts +13 -0
- package/dist/email/schema.mjs +15 -0
- package/dist/email/schema.mjs.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/oauth2/client.d.cts +17 -17
- package/dist/oauth2/client.d.ts +17 -17
- package/dist/oauth2/provider/apple.cjs.map +1 -1
- package/dist/oauth2/provider/apple.mjs.map +1 -1
- package/dist/oauth2/provider/common.cjs.map +1 -1
- package/dist/oauth2/provider/common.mjs.map +1 -1
- package/dist/oauth2/provider/facebook.cjs.map +1 -1
- package/dist/oauth2/provider/facebook.mjs.map +1 -1
- package/dist/oauth2/provider/github.cjs.map +1 -1
- package/dist/oauth2/provider/github.mjs.map +1 -1
- package/dist/oauth2/provider/google.cjs.map +1 -1
- package/dist/oauth2/provider/google.mjs.map +1 -1
- package/dist/oauth2/provider/wechat.cjs.map +1 -1
- package/dist/oauth2/provider/wechat.mjs.map +1 -1
- package/dist/oauth2/provider/x.cjs.map +1 -1
- package/dist/oauth2/provider/x.mjs.map +1 -1
- package/dist/session/__tests__/redis.test.cjs +16 -11
- package/dist/session/__tests__/redis.test.cjs.map +1 -1
- package/dist/session/__tests__/redis.test.mjs +16 -11
- package/dist/session/__tests__/redis.test.mjs.map +1 -1
- package/dist/session/db.cjs.map +1 -1
- package/dist/session/db.d.cts +1 -1
- package/dist/session/db.d.ts +1 -1
- package/dist/session/db.mjs.map +1 -1
- package/dist/session/redis.cjs.map +1 -1
- package/dist/session/redis.d.cts +2 -2
- package/dist/session/redis.d.ts +2 -2
- package/dist/session/redis.mjs.map +1 -1
- package/dist/utils/valid.cjs +78 -0
- package/dist/utils/valid.cjs.map +1 -0
- package/dist/utils/valid.d.cts +27 -0
- package/dist/utils/valid.d.ts +27 -0
- package/dist/utils/valid.mjs +51 -0
- package/dist/utils/valid.mjs.map +1 -0
- package/package.json +4 -4
|
@@ -113,7 +113,7 @@ var require_dist = __commonJS({
|
|
|
113
113
|
// src/session/__tests__/redis.test.ts
|
|
114
114
|
import Redis from "ioredis";
|
|
115
115
|
|
|
116
|
-
// ../../node_modules/.pnpm/vitest@4.0.
|
|
116
|
+
// ../../node_modules/.pnpm/vitest@4.0.17_@types+node@24.10.6_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_yaml@2.8.2/node_modules/vitest/dist/index.js
|
|
117
117
|
var import_expect_type = __toESM(require_dist(), 1);
|
|
118
118
|
import { b as b2, c as c2, g as g3, i as i2, s as s2, v, d as d3 } from "./chunks/vi.2VT5v0um.js.mjs";
|
|
119
119
|
import { b as b3 } from "./chunks/benchmark.B3N2zMcH.js.mjs";
|
|
@@ -201,7 +201,7 @@ function f() {
|
|
|
201
201
|
}
|
|
202
202
|
var C = f();
|
|
203
203
|
|
|
204
|
-
// ../../node_modules/.pnpm/@vitest+pretty-format@4.0.
|
|
204
|
+
// ../../node_modules/.pnpm/@vitest+pretty-format@4.0.17/node_modules/@vitest/pretty-format/dist/index.js
|
|
205
205
|
function _mergeNamespaces(n2, m2) {
|
|
206
206
|
m2.forEach(function(e2) {
|
|
207
207
|
e2 && typeof e2 !== "string" && !Array.isArray(e2) && Object.keys(e2).forEach(function(k2) {
|
|
@@ -1158,7 +1158,7 @@ var plugins = {
|
|
|
1158
1158
|
Error: ErrorPlugin
|
|
1159
1159
|
};
|
|
1160
1160
|
|
|
1161
|
-
// ../../node_modules/.pnpm/@vitest+utils@4.0.
|
|
1161
|
+
// ../../node_modules/.pnpm/@vitest+utils@4.0.17/node_modules/@vitest/utils/dist/helpers.js
|
|
1162
1162
|
import { VALID_ID_PREFIX, NULL_BYTE_PLACEHOLDER } from "./constants.js.mjs";
|
|
1163
1163
|
function assertTypes(value, name, types) {
|
|
1164
1164
|
const receivedType = typeof value;
|
|
@@ -1212,7 +1212,7 @@ function isNegativeNaN(val) {
|
|
|
1212
1212
|
return isNegative;
|
|
1213
1213
|
}
|
|
1214
1214
|
|
|
1215
|
-
// ../../node_modules/.pnpm/@vitest+utils@4.0.
|
|
1215
|
+
// ../../node_modules/.pnpm/@vitest+utils@4.0.17/node_modules/@vitest/utils/dist/timers.js
|
|
1216
1216
|
var SAFE_TIMERS_SYMBOL = /* @__PURE__ */ Symbol("vitest:SAFE_TIMERS");
|
|
1217
1217
|
function getSafeTimers() {
|
|
1218
1218
|
const { setTimeout: safeSetTimeout, setInterval: safeSetInterval, clearInterval: safeClearInterval, clearTimeout: safeClearTimeout, setImmediate: safeSetImmediate, clearImmediate: safeClearImmediate, queueMicrotask: safeQueueMicrotask } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis;
|
|
@@ -1229,7 +1229,7 @@ function getSafeTimers() {
|
|
|
1229
1229
|
};
|
|
1230
1230
|
}
|
|
1231
1231
|
|
|
1232
|
-
// ../../node_modules/.pnpm/@vitest+utils@4.0.
|
|
1232
|
+
// ../../node_modules/.pnpm/@vitest+utils@4.0.17/node_modules/@vitest/utils/dist/display.js
|
|
1233
1233
|
var ansiColors = {
|
|
1234
1234
|
bold: ["1", "22"],
|
|
1235
1235
|
dim: ["2", "22"],
|
|
@@ -1913,7 +1913,7 @@ function objDisplay(obj, options = {}) {
|
|
|
1913
1913
|
return str;
|
|
1914
1914
|
}
|
|
1915
1915
|
|
|
1916
|
-
// ../../node_modules/.pnpm/@vitest+runner@4.0.
|
|
1916
|
+
// ../../node_modules/.pnpm/@vitest+runner@4.0.17/node_modules/@vitest/runner/dist/index.js
|
|
1917
1917
|
import { c as createChainable, e as createTaskName, f as findTestFileStackTrace, b as createFileTask, a as calculateSuiteHash, s as someTasksAreOnly, i as interpretTaskModes, l as limitConcurrency, p as partitionSuiteChildren, r as hasTests, q as hasFailed } from "./chunk-tasks.js.mjs";
|
|
1918
1918
|
var PendingError = class extends Error {
|
|
1919
1919
|
code = "VITEST_PENDING";
|
|
@@ -2291,7 +2291,12 @@ var defaultSuite;
|
|
|
2291
2291
|
var currentTestFilepath;
|
|
2292
2292
|
function assert(condition, message) {
|
|
2293
2293
|
if (!condition) {
|
|
2294
|
-
throw new Error(`Vitest failed to find ${message}.
|
|
2294
|
+
throw new Error(`Vitest failed to find ${message}. One of the following is possible:
|
|
2295
|
+
- "vitest" is imported directly without running "vitest" command
|
|
2296
|
+
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
2297
|
+
- "vitest" is imported inside Vite / Vitest config file
|
|
2298
|
+
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
2299
|
+
`);
|
|
2295
2300
|
}
|
|
2296
2301
|
}
|
|
2297
2302
|
function getRunner() {
|
|
@@ -3053,13 +3058,13 @@ function manageArtifactAttachment(attachment) {
|
|
|
3053
3058
|
}
|
|
3054
3059
|
}
|
|
3055
3060
|
|
|
3056
|
-
// ../../node_modules/.pnpm/vitest@4.0.
|
|
3061
|
+
// ../../node_modules/.pnpm/vitest@4.0.17_@types+node@24.10.6_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_yaml@2.8.2/node_modules/vitest/dist/index.js
|
|
3057
3062
|
import "./chunks/utils.DvEY5TfP.js.mjs";
|
|
3058
3063
|
|
|
3059
|
-
// ../../node_modules/.pnpm/@vitest+runner@4.0.
|
|
3064
|
+
// ../../node_modules/.pnpm/@vitest+runner@4.0.17/node_modules/@vitest/runner/dist/utils.js
|
|
3060
3065
|
import { a, c, b, e, f as f2, g as g2, d as d2, h as h2, j, k, m, n, o, q, r, i, t, l, p, s } from "./chunk-tasks.js.mjs";
|
|
3061
3066
|
|
|
3062
|
-
// ../../node_modules/.pnpm/vitest@4.0.
|
|
3067
|
+
// ../../node_modules/.pnpm/vitest@4.0.17_@types+node@24.10.6_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_yaml@2.8.2/node_modules/vitest/dist/index.js
|
|
3063
3068
|
import "./chunks/_commonjsHelpers.D26ty3Ew.js.mjs";
|
|
3064
3069
|
import "./chunks/date.Bq6ZW5rf.js.mjs";
|
|
3065
3070
|
|
|
@@ -3147,7 +3152,7 @@ describe("redis session attributes", () => {
|
|
|
3147
3152
|
g3(foundSession).not.toBeNull();
|
|
3148
3153
|
g3(foundSession?.getAttribute("test_key")).toBe("test_value");
|
|
3149
3154
|
foundSession?.removeAttribute("test_key");
|
|
3150
|
-
await repository.save(foundSession);
|
|
3155
|
+
if (foundSession) await repository.save(foundSession);
|
|
3151
3156
|
const foundSession2 = await repository.findById(sessionId);
|
|
3152
3157
|
g3(foundSession2?.getAttribute("test_key")).toBeNull();
|
|
3153
3158
|
});
|