@deslop/auth 0.1.1261 → 0.1.1267
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/client/assets/{(home)-C6w15Knq.js → (home)-zPVOH7Wu.js} +1 -1
- package/dist/client/assets/{components-Dzgxr0NK.js → components-CxZlmD_H.js} +1 -1
- package/dist/client/assets/{dialog-hH_i4j1g.js → dialog-DbVw_5V8.js} +1 -1
- package/dist/client/assets/index-D_zkN1kq.css +2 -0
- package/dist/client/assets/{index-CW-CqO1U.js → index-RSMneHpz.js} +2 -2
- package/dist/client/assets/{people-Bk8xVEDM.js → people-BeIXWDuU.js} +1 -1
- package/dist/client/assets/{route-C2Xf2CnS.js → route-CPuCWB2A.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server.js +34 -26
- package/package.json +2 -2
- package/dist/client/assets/index-SYuv6Jic.css +0 -2
package/dist/server.js
CHANGED
|
@@ -22097,7 +22097,7 @@ const isLinkLocal = (self) => {
|
|
|
22097
22097
|
* @category predicates
|
|
22098
22098
|
* @since 4.0.0
|
|
22099
22099
|
*/
|
|
22100
|
-
const isPrivate
|
|
22100
|
+
const isPrivate = (self) => {
|
|
22101
22101
|
const value = ipv4Value(self);
|
|
22102
22102
|
return value >>> 24 === 10 || (value >>> 16 & 65520) === 44048 || value >>> 16 === 49320;
|
|
22103
22103
|
};
|
|
@@ -63108,7 +63108,7 @@ const fromDuplex = (open, options) => withFiber((fiber) => {
|
|
|
63108
63108
|
writer
|
|
63109
63109
|
}));
|
|
63110
63110
|
});
|
|
63111
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
63111
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/constants.js
|
|
63112
63112
|
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
63113
63113
|
const BINARY_TYPES = [
|
|
63114
63114
|
"nodebuffer",
|
|
@@ -63130,7 +63130,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
63130
63130
|
NOOP: () => {}
|
|
63131
63131
|
};
|
|
63132
63132
|
}));
|
|
63133
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
63133
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/buffer-util.js
|
|
63134
63134
|
var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
63135
63135
|
const { websocketMask, websocketUnmask } = __require("http");
|
|
63136
63136
|
const { EMPTY_BUFFER } = require_constants();
|
|
@@ -63238,7 +63238,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
63238
63238
|
};
|
|
63239
63239
|
} catch (e) {}
|
|
63240
63240
|
}));
|
|
63241
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
63241
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/limiter.js
|
|
63242
63242
|
var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
63243
63243
|
const kDone = Symbol("kDone");
|
|
63244
63244
|
const kRun = Symbol("kRun");
|
|
@@ -63288,7 +63288,7 @@ var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
63288
63288
|
};
|
|
63289
63289
|
module.exports = Limiter;
|
|
63290
63290
|
}));
|
|
63291
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
63291
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/permessage-deflate.js
|
|
63292
63292
|
var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
63293
63293
|
const zlib = __require("zlib");
|
|
63294
63294
|
const bufferUtil = require_buffer_util();
|
|
@@ -63623,7 +63623,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
63623
63623
|
this[kCallback](err);
|
|
63624
63624
|
}
|
|
63625
63625
|
}));
|
|
63626
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
63626
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/validation.js
|
|
63627
63627
|
var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
63628
63628
|
const { isUtf8 } = __require("buffer");
|
|
63629
63629
|
const { hasBlob } = require_constants();
|
|
@@ -63818,7 +63818,7 @@ var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
63818
63818
|
};
|
|
63819
63819
|
} catch (e) {}
|
|
63820
63820
|
}));
|
|
63821
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
63821
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/receiver.js
|
|
63822
63822
|
var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
63823
63823
|
const { Writable } = __require("stream");
|
|
63824
63824
|
const PerMessageDeflate = require_permessage_deflate();
|
|
@@ -64118,6 +64118,7 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
64118
64118
|
data = this.consume(this._payloadLength);
|
|
64119
64119
|
if (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) unmask(data, this._mask);
|
|
64120
64120
|
}
|
|
64121
|
+
this._mask = void 0;
|
|
64121
64122
|
if (this._opcode > 7) {
|
|
64122
64123
|
this.controlMessage(data, cb);
|
|
64123
64124
|
return;
|
|
@@ -64280,7 +64281,7 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
64280
64281
|
};
|
|
64281
64282
|
module.exports = Receiver;
|
|
64282
64283
|
}));
|
|
64283
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
64284
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/sender.js
|
|
64284
64285
|
var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
64285
64286
|
const { Duplex } = __require("stream");
|
|
64286
64287
|
const { randomFillSync } = __require("crypto");
|
|
@@ -64778,7 +64779,7 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
64778
64779
|
sender.onerror(err);
|
|
64779
64780
|
}
|
|
64780
64781
|
}));
|
|
64781
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
64782
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/event-target.js
|
|
64782
64783
|
var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
64783
64784
|
const { kForOnEventAttribute, kListener } = require_constants();
|
|
64784
64785
|
const kCode = Symbol("kCode");
|
|
@@ -65008,7 +65009,7 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65008
65009
|
else listener.call(thisArg, event);
|
|
65009
65010
|
}
|
|
65010
65011
|
}));
|
|
65011
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
65012
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/extension.js
|
|
65012
65013
|
var require_extension$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
65013
65014
|
const { tokenChars } = require_validation();
|
|
65014
65015
|
/**
|
|
@@ -65153,12 +65154,13 @@ var require_extension$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65153
65154
|
parse
|
|
65154
65155
|
};
|
|
65155
65156
|
}));
|
|
65156
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
65157
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/websocket.js
|
|
65157
65158
|
var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
65158
65159
|
const EventEmitter = __require("events");
|
|
65159
65160
|
const https = __require("https");
|
|
65160
65161
|
const http = __require("http");
|
|
65161
65162
|
const net = __require("net");
|
|
65163
|
+
const querystring = __require("querystring");
|
|
65162
65164
|
const tls = __require("tls");
|
|
65163
65165
|
const { randomBytes, createHash } = __require("crypto");
|
|
65164
65166
|
const { Duplex, Readable } = __require("stream");
|
|
@@ -65717,8 +65719,10 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65717
65719
|
} catch {
|
|
65718
65720
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
65719
65721
|
}
|
|
65720
|
-
if (parsedUrl.protocol === "http:"
|
|
65721
|
-
|
|
65722
|
+
if (parsedUrl.protocol === "http:" || parsedUrl.protocol === "https:") {
|
|
65723
|
+
parsedUrl = new URL(parsedUrl);
|
|
65724
|
+
parsedUrl.protocol = parsedUrl.protocol === "http:" ? "ws:" : "wss:";
|
|
65725
|
+
}
|
|
65722
65726
|
websocket._url = parsedUrl.href;
|
|
65723
65727
|
const isSecure = parsedUrl.protocol === "wss:";
|
|
65724
65728
|
const isIpcUrl = parsedUrl.protocol === "ws+unix:";
|
|
@@ -65771,7 +65775,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65771
65775
|
if (opts.protocolVersion < 13) opts.headers["Sec-WebSocket-Origin"] = opts.origin;
|
|
65772
65776
|
else opts.headers.Origin = opts.origin;
|
|
65773
65777
|
}
|
|
65774
|
-
if (parsedUrl.username || parsedUrl.password) opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
|
|
65778
|
+
if (parsedUrl.username || parsedUrl.password) opts.auth = `${querystring.unescape(parsedUrl.username)}:${querystring.unescape(parsedUrl.password)}`;
|
|
65775
65779
|
if (isIpcUrl) {
|
|
65776
65780
|
const i = opts.path.indexOf(":");
|
|
65777
65781
|
if (i === -1) {
|
|
@@ -65987,8 +65991,12 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65987
65991
|
function receiverOnConclude(code, reason) {
|
|
65988
65992
|
const websocket = this[kWebSocket];
|
|
65989
65993
|
websocket._closeFrameReceived = true;
|
|
65990
|
-
websocket._closeMessage = reason;
|
|
65991
65994
|
websocket._closeCode = code;
|
|
65995
|
+
if (reason.length === 0) websocket._closeMessage = EMPTY_BUFFER;
|
|
65996
|
+
else {
|
|
65997
|
+
websocket._closeMessage = Buffer.allocUnsafeSlow(reason.length);
|
|
65998
|
+
websocket._closeMessage.set(reason);
|
|
65999
|
+
}
|
|
65992
66000
|
if (websocket._socket[kWebSocket] === void 0) return;
|
|
65993
66001
|
websocket._socket.removeListener("data", socketOnData);
|
|
65994
66002
|
process.nextTick(resume, websocket._socket);
|
|
@@ -66156,7 +66164,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66156
66164
|
}
|
|
66157
66165
|
}
|
|
66158
66166
|
}));
|
|
66159
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
66167
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/stream.js
|
|
66160
66168
|
var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
66161
66169
|
require_websocket();
|
|
66162
66170
|
const { Duplex } = __require("stream");
|
|
@@ -66271,7 +66279,7 @@ var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66271
66279
|
}
|
|
66272
66280
|
module.exports = createWebSocketStream;
|
|
66273
66281
|
}));
|
|
66274
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
66282
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/subprotocol.js
|
|
66275
66283
|
var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
66276
66284
|
const { tokenChars } = require_validation();
|
|
66277
66285
|
/**
|
|
@@ -66309,7 +66317,7 @@ var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66309
66317
|
}
|
|
66310
66318
|
module.exports = { parse };
|
|
66311
66319
|
}));
|
|
66312
|
-
// ../../node_modules/.pnpm/ws@8.22.
|
|
66320
|
+
// ../../node_modules/.pnpm/ws@8.22.2/node_modules/ws/lib/websocket-server.js
|
|
66313
66321
|
var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
66314
66322
|
const EventEmitter = __require("events");
|
|
66315
66323
|
const http = __require("http");
|
|
@@ -92360,7 +92368,7 @@ const ADMINS = {
|
|
|
92360
92368
|
function flagsOf(settings) {
|
|
92361
92369
|
return map$9(settings, (setting, key) => pipe(String$1(setting.flag), withSchema(setting.schema), withFallbackConfig(schema(setting.schema, key)), withDescription(`${setting.description} [${key}]`), optional));
|
|
92362
92370
|
}
|
|
92363
|
-
const
|
|
92371
|
+
const configProvider = fnUntraced(function* (given, defaultPort) {
|
|
92364
92372
|
const port = given["PORT"] ?? `${defaultPort}`;
|
|
92365
92373
|
const url = given["APP_URL"] ?? `http://localhost:${port}`;
|
|
92366
92374
|
if (given["AUTH_URL"] !== void 0 && new URL(url).protocol !== "https:") return yield* AppError.make({ message: "With --auth, set --url to the app's HTTPS origin" });
|
|
@@ -92406,12 +92414,12 @@ function runApp(app) {
|
|
|
92406
92414
|
};
|
|
92407
92415
|
const root = pipe(make$7(name), withSharedFlags(flagsOf(settings)));
|
|
92408
92416
|
const given = map$5(root, (input) => getSomes$1(input));
|
|
92409
|
-
return yield* pipe(root, withHandler((input) => flatMap$2(
|
|
92417
|
+
return yield* pipe(root, withHandler((input) => flatMap$2(configProvider(getSomes$1(input), metadata.config.port), (values) => provideService(server(app), ConfigProvider, values))), withSubcommands([pipe(make$7("service"), withSubcommands([
|
|
92410
92418
|
make$7("install", {}, fnUntraced(function* () {
|
|
92411
92419
|
const fs = yield* FileSystem;
|
|
92412
92420
|
const path = yield* Path$1;
|
|
92413
92421
|
const flags = yield* given;
|
|
92414
|
-
yield*
|
|
92422
|
+
yield* configProvider(flags, metadata.config.port);
|
|
92415
92423
|
const entry = path.join(yield* activate(name, yield* fs.realPath(packageRoot)), "dist", "server.js");
|
|
92416
92424
|
const args = flatten$3(collect$1(flags, (key, value) => [`--${settings[key]?.flag ?? key}`, value]));
|
|
92417
92425
|
yield* output(yield* install(name, [
|
|
@@ -114382,8 +114390,8 @@ function parsedAddress(address) {
|
|
|
114382
114390
|
return ip;
|
|
114383
114391
|
}));
|
|
114384
114392
|
}
|
|
114385
|
-
function
|
|
114386
|
-
if (isIpv4Address(ip)) return isPrivate
|
|
114393
|
+
function isPrivateOrUniqueLocal(ip) {
|
|
114394
|
+
if (isIpv4Address(ip)) return isPrivate(ip);
|
|
114387
114395
|
return isUniqueLocal(ip);
|
|
114388
114396
|
}
|
|
114389
114397
|
function addressGroup(address) {
|
|
@@ -114433,7 +114441,7 @@ function browserLabel(origin) {
|
|
|
114433
114441
|
}
|
|
114434
114442
|
function deviceLabel(origin) {
|
|
114435
114443
|
return pipe(flatMap$7(fromUndefinedOr(origin.address), (address) => {
|
|
114436
|
-
if (exists(parsedAddress(address), (ip) => isLinkLocal(ip) || isLoopback(ip) ||
|
|
114444
|
+
if (exists(parsedAddress(address), (ip) => isLinkLocal(ip) || isLoopback(ip) || isPrivateOrUniqueLocal(ip))) return some$1("dev");
|
|
114437
114445
|
return get$13(WORKERS, address);
|
|
114438
114446
|
}), orElse$3(() => flatMap$7(fromUndefinedOr(origin.userAgent), platform)), getOrElse(() => origin.address ?? "unknown"));
|
|
114439
114447
|
}
|
|
@@ -114529,7 +114537,7 @@ const owned = fnUntraced(function* (via) {
|
|
|
114529
114537
|
message: "Sign in with GitHub or a passkey on this browser to add a passkey"
|
|
114530
114538
|
});
|
|
114531
114539
|
});
|
|
114532
|
-
const
|
|
114540
|
+
const challengeFromClientData = fnUntraced(function* (clientDataJSON) {
|
|
114533
114541
|
return (yield* decodeEffect(fromJsonString(ClientData))(yield* fromResult(decodeString$2(clientDataJSON)))).challenge;
|
|
114534
114542
|
});
|
|
114535
114543
|
function live(issued, now) {
|
|
@@ -114645,7 +114653,7 @@ var Passkeys = class Passkeys extends Service$1()("@deslop/auth/services/passkey
|
|
|
114645
114653
|
})
|
|
114646
114654
|
}), tap$1((options) => flatMap$2(currentTimeMillis, (now) => update$3(signingIn, (issued) => set$1(live(issued, now), options.challenge, { expiresAt: now + LIFETIME })))), flatMap$2(encodeUnknownEffect(fromJsonString(Unknown))), flatMap$2(decodeEffect(fromJsonString(RequestOptions))), rejected("Cannot start a passkey sign-in"), withSpan("Passkeys.request")),
|
|
114647
114655
|
signIn: fn("Passkeys.signIn")(function* (response) {
|
|
114648
|
-
const challenge = yield*
|
|
114656
|
+
const challenge = yield* challengeFromClientData(response.response.clientDataJSON);
|
|
114649
114657
|
const now = yield* currentTimeMillis;
|
|
114650
114658
|
if (!(yield* modify$5(signingIn, (issued) => [has$2(live(issued, now), challenge), remove$1(live(issued, now), challenge)]))) return yield* AuthError.make({ message: "The sign-in took too long; start again" });
|
|
114651
114659
|
const found = yield* mapError$2(fromOption(findFirst(yield* get(state), (stored) => stored.id === response.id)), () => unknown);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deslop/auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1267",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/MP281X/deslop.git",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=26"
|
|
35
35
|
},
|
|
36
|
-
"fingerprint": "
|
|
36
|
+
"fingerprint": "c4214e2d9585d35652c74f006c33383554ff034f2855d3a0524d28d11e5a202c"
|
|
37
37
|
}
|