@deslop/auth 0.1.1920 → 0.1.1983
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/effect-C5VNQVMM.js +17 -0
- package/dist/client/assets/index-B3_GhlId.js +1 -0
- package/dist/client/assets/index-Dy-nTDEx.css +1 -0
- package/dist/client/index.html +10 -8
- package/dist/iphone/_expo/static/js/ios/main-7a45a6b9d7b4ff4bd6437669787c38b4.hbc +0 -0
- package/dist/iphone/metadata.json +1 -1
- package/dist/iphone/update.json +1 -1
- package/dist/server.js +353 -67
- package/package.json +2 -2
- package/dist/client/assets/effect-CBaOcoho.js +0 -17
- package/dist/client/assets/index-BwbN28bp.css +0 -1
- package/dist/client/assets/index-Ux40mXqe.js +0 -1
- package/dist/iphone/_expo/static/js/ios/main-a17fb98946f2fba6eba96104fa039c33.hbc +0 -0
package/dist/server.js
CHANGED
|
@@ -2088,6 +2088,35 @@ function isIterable(input) {
|
|
|
2088
2088
|
return hasProperty(input, Symbol.iterator) || isString$1(input);
|
|
2089
2089
|
}
|
|
2090
2090
|
/**
|
|
2091
|
+
* Checks whether a value is a `RegExp`.
|
|
2092
|
+
*
|
|
2093
|
+
* **When to use**
|
|
2094
|
+
*
|
|
2095
|
+
* Use when you need a `Predicate` runtime guard for regular expressions.
|
|
2096
|
+
*
|
|
2097
|
+
* **Details**
|
|
2098
|
+
*
|
|
2099
|
+
* Uses `instanceof RegExp`.
|
|
2100
|
+
*
|
|
2101
|
+
* **Example** (Guarding RegExp values)
|
|
2102
|
+
*
|
|
2103
|
+
* ```ts import.meta.vitest
|
|
2104
|
+
* import { Predicate } from "effect"
|
|
2105
|
+
*
|
|
2106
|
+
* const data: unknown = /abc/
|
|
2107
|
+
*
|
|
2108
|
+
* Predicate.isRegExp(data) // => true
|
|
2109
|
+
* ```
|
|
2110
|
+
*
|
|
2111
|
+
* @see {@link isDate}
|
|
2112
|
+
* @stability stable
|
|
2113
|
+
* @category guards
|
|
2114
|
+
* @since 3.9.0
|
|
2115
|
+
*/
|
|
2116
|
+
function isRegExp(input) {
|
|
2117
|
+
return input instanceof RegExp;
|
|
2118
|
+
}
|
|
2119
|
+
/**
|
|
2091
2120
|
* Creates a predicate that returns `true` if either predicate is `true`.
|
|
2092
2121
|
*
|
|
2093
2122
|
* **When to use**
|
|
@@ -7320,6 +7349,36 @@ const has$3 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key));
|
|
|
7320
7349
|
*/
|
|
7321
7350
|
const get$12 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key) ? some$1(self[key]) : none());
|
|
7322
7351
|
/**
|
|
7352
|
+
* Removes a key from a record.
|
|
7353
|
+
*
|
|
7354
|
+
* **When to use**
|
|
7355
|
+
*
|
|
7356
|
+
* Use to create a shallow copy of a record without one property.
|
|
7357
|
+
*
|
|
7358
|
+
* **Details**
|
|
7359
|
+
*
|
|
7360
|
+
* If the key is not present, the result is still a shallow copy of the original
|
|
7361
|
+
* record.
|
|
7362
|
+
*
|
|
7363
|
+
* **Example** (Removing a key)
|
|
7364
|
+
*
|
|
7365
|
+
* ```ts import.meta.vitest
|
|
7366
|
+
* import { Record } from "effect"
|
|
7367
|
+
*
|
|
7368
|
+
* Record.remove({ a: 1, b: 2 }, "a") // => { b: 2 }
|
|
7369
|
+
* ```
|
|
7370
|
+
*
|
|
7371
|
+
* @stability stable
|
|
7372
|
+
* @category mutations
|
|
7373
|
+
* @since 2.0.0
|
|
7374
|
+
*/
|
|
7375
|
+
const remove$5 = /*#__PURE__*/ dual(2, (self, key) => {
|
|
7376
|
+
if (!has$3(self, key)) return { ...self };
|
|
7377
|
+
const out = { ...self };
|
|
7378
|
+
delete out[key];
|
|
7379
|
+
return out;
|
|
7380
|
+
});
|
|
7381
|
+
/**
|
|
7323
7382
|
* Maps a record into another record by applying a transformation function to each of its values.
|
|
7324
7383
|
*
|
|
7325
7384
|
* **Example** (Mapping record values)
|
|
@@ -11906,7 +11965,7 @@ const logWithLevel = (level) => (...message) => {
|
|
|
11906
11965
|
return void_$4;
|
|
11907
11966
|
});
|
|
11908
11967
|
};
|
|
11909
|
-
const colors = {
|
|
11968
|
+
const colors$1 = {
|
|
11910
11969
|
bold: "1",
|
|
11911
11970
|
red: "31",
|
|
11912
11971
|
green: "32",
|
|
@@ -11918,7 +11977,7 @@ const colors = {
|
|
|
11918
11977
|
black: "30",
|
|
11919
11978
|
bgBrightRed: "101"
|
|
11920
11979
|
};
|
|
11921
|
-
colors.gray, colors.blue, colors.green, colors.yellow, colors.red, colors.bgBrightRed, colors.black;
|
|
11980
|
+
colors$1.gray, colors$1.blue, colors$1.green, colors$1.yellow, colors$1.red, colors$1.bgBrightRed, colors$1.black;
|
|
11922
11981
|
const defaultDateFormat = (date) => `${date.getHours().toString().padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")}:${date.getSeconds().toString().padStart(2, "0")}.${date.getMilliseconds().toString().padStart(3, "0")}`;
|
|
11923
11982
|
/** @internal */
|
|
11924
11983
|
const defaultLogger = /*#__PURE__*/ loggerMake(({ cause, date, fiber, logLevel, message }) => {
|
|
@@ -16345,6 +16404,71 @@ const match$2 = (regExp) => (self) => fromNullOr(self.match(regExp));
|
|
|
16345
16404
|
* @since 2.0.0
|
|
16346
16405
|
*/
|
|
16347
16406
|
const replaceAll = (searchValue, replaceValue) => (self) => self.replaceAll(searchValue, replaceValue);
|
|
16407
|
+
/**
|
|
16408
|
+
* Normalizes a string by splitting it into word parts, transforming each part,
|
|
16409
|
+
* and joining the parts with a configurable delimiter. By default, words contain
|
|
16410
|
+
* Unicode letters, combining marks, and numbers; no Unicode normalization is applied.
|
|
16411
|
+
*
|
|
16412
|
+
* **When to use**
|
|
16413
|
+
*
|
|
16414
|
+
* Use when you need custom word-case output with a delimiter or part transform
|
|
16415
|
+
* that the fixed case helpers do not provide.
|
|
16416
|
+
*
|
|
16417
|
+
* @see {@link pascalCase} for fixed PascalCase output
|
|
16418
|
+
* @see {@link camelCase} for fixed lower-initial camelCase output
|
|
16419
|
+
* @see {@link constantCase} for fixed uppercase underscore-separated output
|
|
16420
|
+
* @see {@link kebabCase} for fixed lowercase hyphen-separated output
|
|
16421
|
+
* @see {@link snakeCase} for fixed lowercase underscore-separated output
|
|
16422
|
+
*
|
|
16423
|
+
* @stability stable
|
|
16424
|
+
* @category transforming
|
|
16425
|
+
* @since 4.0.0
|
|
16426
|
+
*/
|
|
16427
|
+
const noCase = /*#__PURE__*/ dual((args) => typeof args[0] === "string", (input, options) => {
|
|
16428
|
+
const splitRegExp = toRegExpArray(options?.splitRegExp ?? SPLIT_REGEXP);
|
|
16429
|
+
const stripRegExp = toRegExpArray(options?.stripRegExp ?? STRIP_REGEXP);
|
|
16430
|
+
const delimiter = options?.delimiter ?? " ";
|
|
16431
|
+
const transform = options?.transform ?? toLowerCase;
|
|
16432
|
+
return normalizeCase(input, splitRegExp, stripRegExp, delimiter, transform);
|
|
16433
|
+
});
|
|
16434
|
+
const toRegExpArray = (regexp) => isRegExp(regexp) ? [regexp] : regexp;
|
|
16435
|
+
const normalizeCase = (input, splitRegExp, stripRegExp, delimiter, transform) => {
|
|
16436
|
+
let result = input;
|
|
16437
|
+
for (const regexp of splitRegExp) result = result.replace(regexp, "$1\0$2");
|
|
16438
|
+
for (const regexp of stripRegExp) result = result.replace(regexp, "\0");
|
|
16439
|
+
let start = 0;
|
|
16440
|
+
let end = result.length;
|
|
16441
|
+
while (result.charAt(start) === "\0") start++;
|
|
16442
|
+
while (result.charAt(end - 1) === "\0") end--;
|
|
16443
|
+
if (start >= end) return "";
|
|
16444
|
+
return result.slice(start, end).split("\0").map(transform).join(delimiter);
|
|
16445
|
+
};
|
|
16446
|
+
const SPLIT_REGEXP = [
|
|
16447
|
+
/([\p{Ll}\p{N}]\p{M}*)(\p{Lu})/gu,
|
|
16448
|
+
/(\p{Lu}\p{M}*)(\p{Lu}\p{M}*\p{Ll})/gu,
|
|
16449
|
+
/(\p{L}\p{M}*)(\p{N})/gu,
|
|
16450
|
+
/(\p{N}\p{M}*)(\p{L})/gu
|
|
16451
|
+
];
|
|
16452
|
+
const STRIP_REGEXP = /[^\p{L}\p{M}\p{N}]+/gu;
|
|
16453
|
+
/**
|
|
16454
|
+
* Converts a string to kebab-case (lowercase with hyphens).
|
|
16455
|
+
*
|
|
16456
|
+
* **When to use**
|
|
16457
|
+
*
|
|
16458
|
+
* Use to normalize free-form labels, identifiers, or keys into lowercase
|
|
16459
|
+
* hyphen-separated text.
|
|
16460
|
+
*
|
|
16461
|
+
* @see {@link noCase} for configurable delimiters and part transforms
|
|
16462
|
+
* @see {@link snakeCase} for lowercase underscore-separated output
|
|
16463
|
+
* @see {@link constantCase} for uppercase underscore-separated output
|
|
16464
|
+
* @see {@link camelCase} for lower-initial camelCase output
|
|
16465
|
+
* @see {@link pascalCase} for upper-initial PascalCase output
|
|
16466
|
+
*
|
|
16467
|
+
* @stability stable
|
|
16468
|
+
* @category transforming
|
|
16469
|
+
* @since 4.0.0
|
|
16470
|
+
*/
|
|
16471
|
+
const kebabCase = /*#__PURE__*/ noCase({ delimiter: "-" });
|
|
16348
16472
|
// ../../node_modules/.pnpm/effect@4.1.7/node_modules/effect/dist/internal/random.js
|
|
16349
16473
|
/** @internal */
|
|
16350
16474
|
const Random$1 = /*#__PURE__*/ Reference("effect/Random", { defaultValue: () => ({
|
|
@@ -82477,7 +82601,7 @@ var PaginatedResultMeta = class extends (/*#__PURE__*/ Opaque()(/*#__PURE__*/ St
|
|
|
82477
82601
|
* @category schemas
|
|
82478
82602
|
* @since 4.0.0
|
|
82479
82603
|
*/
|
|
82480
|
-
const Role$
|
|
82604
|
+
const Role$4 = /*#__PURE__*/ Literals(["user", "assistant"]);
|
|
82481
82605
|
/**
|
|
82482
82606
|
* Schema for optional client-facing annotations on MCP objects.
|
|
82483
82607
|
*
|
|
@@ -82497,7 +82621,7 @@ var Annotations$3 = class extends (/*#__PURE__*/ Opaque()(/*#__PURE__*/ Struct$2
|
|
|
82497
82621
|
* It can include multiple entries to indicate content useful for multiple
|
|
82498
82622
|
* audiences (e.g., `["user", "assistant"]`).
|
|
82499
82623
|
*/
|
|
82500
|
-
audience: /*#__PURE__*/ optional$7(/*#__PURE__*/ ArraySchema(Role$
|
|
82624
|
+
audience: /*#__PURE__*/ optional$7(/*#__PURE__*/ ArraySchema(Role$4)),
|
|
82501
82625
|
/**
|
|
82502
82626
|
* Describes how important this data is for operating the server.
|
|
82503
82627
|
*
|
|
@@ -83691,7 +83815,7 @@ const SamplingMessageContentBlock$2 = /*#__PURE__*/ Union$2([
|
|
|
83691
83815
|
* @since 4.0.0
|
|
83692
83816
|
*/
|
|
83693
83817
|
var SamplingMessage$5 = class extends (/*#__PURE__*/ Opaque()(/*#__PURE__*/ Struct$2({
|
|
83694
|
-
role: Role$
|
|
83818
|
+
role: Role$4,
|
|
83695
83819
|
content: /*#__PURE__*/ Union$2([SamplingMessageContentBlock$2, /*#__PURE__*/ ArraySchema(SamplingMessageContentBlock$2)]),
|
|
83696
83820
|
_meta: /*#__PURE__*/ optional$7(UnknownObject$5)
|
|
83697
83821
|
}))) {};
|
|
@@ -83815,7 +83939,7 @@ var ModelPreferences$2 = class extends (/*#__PURE__*/ Class$1("@effect/ai/McpSch
|
|
|
83815
83939
|
* @since 4.0.0
|
|
83816
83940
|
*/
|
|
83817
83941
|
var CreateMessageResult$5 = class extends (/*#__PURE__*/ Class$1("@effect/ai/McpSchema/CreateMessageResult")({
|
|
83818
|
-
role: Role$
|
|
83942
|
+
role: Role$4,
|
|
83819
83943
|
content: /*#__PURE__*/ Union$2([SamplingMessageContentBlock$2, /*#__PURE__*/ ArraySchema(SamplingMessageContentBlock$2)]),
|
|
83820
83944
|
_meta: /*#__PURE__*/ optional$7(UnknownObject$5),
|
|
83821
83945
|
/**
|
|
@@ -84842,7 +84966,7 @@ const ProgressToken$1 = /*#__PURE__*/ Union$2([String$6, Finite]);
|
|
|
84842
84966
|
/**
|
|
84843
84967
|
* @internal
|
|
84844
84968
|
*/
|
|
84845
|
-
const Role$
|
|
84969
|
+
const Role$3 = /*#__PURE__*/ Literals(["user", "assistant"]);
|
|
84846
84970
|
/**
|
|
84847
84971
|
* @internal
|
|
84848
84972
|
*/
|
|
@@ -84925,7 +85049,7 @@ const McpError$1 = /*#__PURE__*/ Struct$2({
|
|
|
84925
85049
|
* @internal
|
|
84926
85050
|
*/
|
|
84927
85051
|
const Annotation = /*#__PURE__*/ Struct$2({
|
|
84928
|
-
audience: /*#__PURE__*/ optional$6(/*#__PURE__*/ ArraySchema(Role$
|
|
85052
|
+
audience: /*#__PURE__*/ optional$6(/*#__PURE__*/ ArraySchema(Role$3)),
|
|
84929
85053
|
priority: /*#__PURE__*/ optional$6(/*#__PURE__*/ Finite.check(/*#__PURE__*/ isBetween({
|
|
84930
85054
|
minimum: 0,
|
|
84931
85055
|
maximum: 1
|
|
@@ -85265,7 +85389,7 @@ const ClientCapabilities$2 = /*#__PURE__*/ Struct$2({
|
|
|
85265
85389
|
* @internal
|
|
85266
85390
|
*/
|
|
85267
85391
|
const Annotations$2 = /*#__PURE__*/ Struct$2({
|
|
85268
|
-
audience: /*#__PURE__*/ optional$4(/*#__PURE__*/ ArraySchema(Role$
|
|
85392
|
+
audience: /*#__PURE__*/ optional$4(/*#__PURE__*/ ArraySchema(Role$3)),
|
|
85269
85393
|
priority: /*#__PURE__*/ optional$4(/*#__PURE__*/ Finite.check(/*#__PURE__*/ isBetween({
|
|
85270
85394
|
minimum: 0,
|
|
85271
85395
|
maximum: 1
|
|
@@ -85377,14 +85501,14 @@ const SamplingContent = /*#__PURE__*/ Union$2([
|
|
|
85377
85501
|
* @internal
|
|
85378
85502
|
*/
|
|
85379
85503
|
const PromptMessage$2 = /*#__PURE__*/ Struct$2({
|
|
85380
|
-
role: Role$
|
|
85504
|
+
role: Role$3,
|
|
85381
85505
|
content: ContentBlock$2
|
|
85382
85506
|
});
|
|
85383
85507
|
/**
|
|
85384
85508
|
* @internal
|
|
85385
85509
|
*/
|
|
85386
85510
|
const SamplingMessage$2 = /*#__PURE__*/ Struct$2({
|
|
85387
|
-
role: Role$
|
|
85511
|
+
role: Role$3,
|
|
85388
85512
|
content: SamplingContent
|
|
85389
85513
|
});
|
|
85390
85514
|
/**
|
|
@@ -85445,7 +85569,7 @@ const CallToolResult$2 = /*#__PURE__*/ Struct$2({
|
|
|
85445
85569
|
*/
|
|
85446
85570
|
const CreateMessageResult$2 = /*#__PURE__*/ Struct$2({
|
|
85447
85571
|
...ResultMeta$1.fields,
|
|
85448
|
-
role: Role$
|
|
85572
|
+
role: Role$3,
|
|
85449
85573
|
content: SamplingContent,
|
|
85450
85574
|
model: String$6,
|
|
85451
85575
|
stopReason: /*#__PURE__*/ optional$4(String$6)
|
|
@@ -85813,7 +85937,7 @@ const ContentBlock$1 = /*#__PURE__*/ Union$2([
|
|
|
85813
85937
|
* @internal
|
|
85814
85938
|
*/
|
|
85815
85939
|
const PromptMessage$1 = /*#__PURE__*/ Struct$2({
|
|
85816
|
-
role: Role$
|
|
85940
|
+
role: Role$3,
|
|
85817
85941
|
content: ContentBlock$1
|
|
85818
85942
|
});
|
|
85819
85943
|
/**
|
|
@@ -85869,7 +85993,7 @@ const SamplingMessageContentBlock$1 = /*#__PURE__*/ Union$2([
|
|
|
85869
85993
|
* @internal
|
|
85870
85994
|
*/
|
|
85871
85995
|
const SamplingMessage$1 = /*#__PURE__*/ Struct$2({
|
|
85872
|
-
role: Role$
|
|
85996
|
+
role: Role$3,
|
|
85873
85997
|
content: /*#__PURE__*/ Union$2([SamplingMessageContentBlock$1, /*#__PURE__*/ ArraySchema(SamplingMessageContentBlock$1)]),
|
|
85874
85998
|
_meta: Meta$1
|
|
85875
85999
|
});
|
|
@@ -86208,7 +86332,7 @@ const ProgressToken = RequestId;
|
|
|
86208
86332
|
/**
|
|
86209
86333
|
* @internal
|
|
86210
86334
|
*/
|
|
86211
|
-
const Role$
|
|
86335
|
+
const Role$2 = Role$3;
|
|
86212
86336
|
/**
|
|
86213
86337
|
* @internal
|
|
86214
86338
|
*/
|
|
@@ -86350,7 +86474,7 @@ const Prompt = Prompt$1;
|
|
|
86350
86474
|
* @internal
|
|
86351
86475
|
*/
|
|
86352
86476
|
const PromptMessage = /*#__PURE__*/ Struct$2({
|
|
86353
|
-
role: Role$
|
|
86477
|
+
role: Role$2,
|
|
86354
86478
|
content: ContentBlock
|
|
86355
86479
|
});
|
|
86356
86480
|
const ToolInputSchema = /*#__PURE__*/ StructWithRest(/*#__PURE__*/ Struct$2({
|
|
@@ -86392,7 +86516,7 @@ const SamplingMessageContentBlock = /*#__PURE__*/ Union$2([
|
|
|
86392
86516
|
* @internal
|
|
86393
86517
|
*/
|
|
86394
86518
|
const SamplingMessage = /*#__PURE__*/ Struct$2({
|
|
86395
|
-
role: Role$
|
|
86519
|
+
role: Role$2,
|
|
86396
86520
|
content: /*#__PURE__*/ Union$2([SamplingMessageContentBlock, /*#__PURE__*/ ArraySchema(SamplingMessageContentBlock)]),
|
|
86397
86521
|
_meta: Meta
|
|
86398
86522
|
});
|
|
@@ -98255,8 +98379,8 @@ const publicAccess = [
|
|
|
98255
98379
|
"POST /api/capture",
|
|
98256
98380
|
"POST /api/capture/:id/activity",
|
|
98257
98381
|
"POST /api/files/:id",
|
|
98258
|
-
"GET /api/images/:id",
|
|
98259
|
-
"GET /api/notes/:id/media/:index"
|
|
98382
|
+
"GET /api/images/:id/:revision",
|
|
98383
|
+
"GET /api/notes/:id/media/:revision/:index"
|
|
98260
98384
|
], (surface) => ({
|
|
98261
98385
|
app: "stash",
|
|
98262
98386
|
callers: ["member"],
|
|
@@ -98264,8 +98388,8 @@ const publicAccess = [
|
|
|
98264
98388
|
})),
|
|
98265
98389
|
...map$10([
|
|
98266
98390
|
"notes.events",
|
|
98267
|
-
"notes.
|
|
98268
|
-
"notes.
|
|
98391
|
+
"notes.detail",
|
|
98392
|
+
"notes.gallery",
|
|
98269
98393
|
"notes.capture",
|
|
98270
98394
|
"notes.regenerate"
|
|
98271
98395
|
], (name) => ({
|
|
@@ -98408,8 +98532,8 @@ const HTTP_DOMAINS = {
|
|
|
98408
98532
|
"POST /mcp": 406,
|
|
98409
98533
|
"PUT /mcp": 405,
|
|
98410
98534
|
"gateway * /ai/*": 402,
|
|
98411
|
-
"stash GET /api/images/:id": 400,
|
|
98412
|
-
"stash GET /api/notes/:id/media/:index": 400,
|
|
98535
|
+
"stash GET /api/images/:id/:revision": 400,
|
|
98536
|
+
"stash GET /api/notes/:id/media/:revision/:index": 400,
|
|
98413
98537
|
"stash POST /api/capture": 422,
|
|
98414
98538
|
"stash POST /api/capture/:id/activity": 422,
|
|
98415
98539
|
"stash POST /api/files/:id": 422,
|
|
@@ -98428,7 +98552,7 @@ function okJson(body) {
|
|
|
98428
98552
|
}
|
|
98429
98553
|
const Icon = replyWith(200, String$6.check(isPattern(/^<svg\b[^>]*>.+<\/svg>\s*$/su)));
|
|
98430
98554
|
const Manifest = okJson(Struct$2({
|
|
98431
|
-
background_color: NonEmptyString,
|
|
98555
|
+
background_color: optionalKey(NonEmptyString),
|
|
98432
98556
|
display: Literal("standalone"),
|
|
98433
98557
|
icons: NonEmptyArray(Struct$2({
|
|
98434
98558
|
purpose: NonEmptyString,
|
|
@@ -98440,7 +98564,7 @@ const Manifest = okJson(Struct$2({
|
|
|
98440
98564
|
scope: NonEmptyString,
|
|
98441
98565
|
short_name: NonEmptyString,
|
|
98442
98566
|
start_url: NonEmptyString,
|
|
98443
|
-
theme_color: NonEmptyString
|
|
98567
|
+
theme_color: optionalKey(NonEmptyString)
|
|
98444
98568
|
}));
|
|
98445
98569
|
const ClientMetadata = okJson(Struct$2({
|
|
98446
98570
|
client_id: HttpUrl,
|
|
@@ -99739,7 +99863,10 @@ const layerWeb = unwrap$7(gen(function* () {
|
|
|
99739
99863
|
if (!(yield* (yield* FileSystem).exists((yield* Path$1).join(client, "index.html")))) return empty$11;
|
|
99740
99864
|
const name = capitalize(yield* appName);
|
|
99741
99865
|
return mergeAll$1(add("GET", MANIFEST_PATH, succeed$5(jsonUnsafe({
|
|
99742
|
-
|
|
99866
|
+
...name === "Portfolio" && {
|
|
99867
|
+
background_color: "#0d0c0c",
|
|
99868
|
+
theme_color: "#0d0c0c"
|
|
99869
|
+
},
|
|
99743
99870
|
display: "standalone",
|
|
99744
99871
|
icons: [{
|
|
99745
99872
|
purpose: "any",
|
|
@@ -99750,8 +99877,7 @@ const layerWeb = unwrap$7(gen(function* () {
|
|
|
99750
99877
|
name,
|
|
99751
99878
|
scope: "/",
|
|
99752
99879
|
short_name: name,
|
|
99753
|
-
start_url: "/"
|
|
99754
|
-
theme_color: "#0d0c0c"
|
|
99880
|
+
start_url: "/"
|
|
99755
99881
|
}, {
|
|
99756
99882
|
contentType: "application/manifest+json",
|
|
99757
99883
|
headers: { "cache-control": "no-cache" }
|
|
@@ -100889,7 +101015,7 @@ const StatusJson = fromJsonString(Struct$2({
|
|
|
100889
101015
|
User: Record$1(TailnetUserId, Profile)
|
|
100890
101016
|
}), { reviver: exactNumbers });
|
|
100891
101017
|
// src/people/contract.ts
|
|
100892
|
-
const Role = Literals([
|
|
101018
|
+
const Role$1 = Literals([
|
|
100893
101019
|
"Admin",
|
|
100894
101020
|
"Member",
|
|
100895
101021
|
"Waiting"
|
|
@@ -100897,7 +101023,7 @@ const Role = Literals([
|
|
|
100897
101023
|
const Account = Struct$2({
|
|
100898
101024
|
...User.fields,
|
|
100899
101025
|
fullName: OptionFromOptionalKey(String$6),
|
|
100900
|
-
role: Role
|
|
101026
|
+
role: Role$1
|
|
100901
101027
|
});
|
|
100902
101028
|
const Person = Struct$2({
|
|
100903
101029
|
...Account.fields,
|
|
@@ -101310,6 +101436,15 @@ var Sessions = class Sessions extends Service$1()("@deslop/auth/sessions/server/
|
|
|
101310
101436
|
strategy: "sliding"
|
|
101311
101437
|
})) });
|
|
101312
101438
|
return Sessions.of({
|
|
101439
|
+
active: fn("Sessions.active")(function* (ids) {
|
|
101440
|
+
const since = cutoff(yield* now);
|
|
101441
|
+
const rows = yield* findAll({
|
|
101442
|
+
Request: Void,
|
|
101443
|
+
Result: Struct$2({ id: String$6 }),
|
|
101444
|
+
execute: () => sql`SELECT id FROM ${table} WHERE id IN ${sql.in(ids)} AND lastSeenAt > ${since}`
|
|
101445
|
+
})();
|
|
101446
|
+
return map$10(rows, (row) => row.id);
|
|
101447
|
+
}, asAuthError("Cannot read active sessions")),
|
|
101313
101448
|
create: fn("Sessions.create")(function* (user, address, browser) {
|
|
101314
101449
|
const secret = encode$1(yield* random.randomBytes(32));
|
|
101315
101450
|
const now$4 = yield* now;
|
|
@@ -101755,6 +101890,15 @@ const peopleHandlers = PeopleRpcs.toLayer(gen(function* () {
|
|
|
101755
101890
|
};
|
|
101756
101891
|
}));
|
|
101757
101892
|
// src/sessions/handlers.ts
|
|
101893
|
+
const SessionIds = ArraySchema(String$6);
|
|
101894
|
+
const sessionsHttp = use((router) => gen(function* () {
|
|
101895
|
+
const sessions = yield* Sessions;
|
|
101896
|
+
yield* router.add("POST", "/api/sessions/active", authResponse(gen(function* () {
|
|
101897
|
+
if (!isMachine((yield* HttpServerRequest).headers["x-deslop-client"] ?? "")) return text("Only this machine may verify sessions", { status: 403 });
|
|
101898
|
+
const requested = yield* schemaBodyJson(SessionIds);
|
|
101899
|
+
return yield* schemaJson(SessionIds)(yield* sessions.active(requested));
|
|
101900
|
+
})));
|
|
101901
|
+
}));
|
|
101758
101902
|
const sessionsTools = make$13(make$14("list_sessions", {
|
|
101759
101903
|
dependencies: [CurrentUser],
|
|
101760
101904
|
description: "List your browser sessions, newest activity first.",
|
|
@@ -101778,30 +101922,119 @@ const sessionsToolHandlers = sessionsTools.toLayer(map$7(Sessions, (sessions) =>
|
|
|
101778
101922
|
})
|
|
101779
101923
|
})));
|
|
101780
101924
|
const sessionsHandlers = SessionsRpcs.toLayer(map$7(Sessions, (sessions) => ({ "sessions.watch": (_, options) => unwrap$4(map$7(CurrentUser, (user) => sessions.watch(user.id, identifyRequestOf(options.headers, "verify").session))) })));
|
|
101781
|
-
|
|
101782
|
-
const
|
|
101783
|
-
|
|
101784
|
-
|
|
101785
|
-
|
|
101786
|
-
|
|
101925
|
+
Literals(["light", "dark"]);
|
|
101926
|
+
const hues = {
|
|
101927
|
+
auth: "auth",
|
|
101928
|
+
deploy: "deploy",
|
|
101929
|
+
gateway: "gateway",
|
|
101930
|
+
opm: "opm",
|
|
101931
|
+
scope: "scope",
|
|
101932
|
+
stash: "stash",
|
|
101933
|
+
trips: "trips"
|
|
101934
|
+
};
|
|
101935
|
+
Literals(keys$1(hues));
|
|
101936
|
+
Literals([
|
|
101937
|
+
"success",
|
|
101938
|
+
"warning",
|
|
101939
|
+
"error",
|
|
101940
|
+
"info"
|
|
101941
|
+
]);
|
|
101942
|
+
Literals([
|
|
101943
|
+
"canvas",
|
|
101944
|
+
"surface",
|
|
101945
|
+
"raised",
|
|
101946
|
+
"control",
|
|
101947
|
+
"ink",
|
|
101948
|
+
"secondary",
|
|
101949
|
+
"quiet",
|
|
101950
|
+
"rule",
|
|
101951
|
+
"outline",
|
|
101952
|
+
"glass",
|
|
101953
|
+
"glassEdge",
|
|
101954
|
+
"glassHighlight"
|
|
101955
|
+
]);
|
|
101956
|
+
const palettes = {
|
|
101957
|
+
dark: {
|
|
101958
|
+
accent: {
|
|
101959
|
+
auth: "#93a6cc",
|
|
101960
|
+
deploy: "#86a6ef",
|
|
101961
|
+
gateway: "#ec87ae",
|
|
101962
|
+
opm: "#e6c4a0",
|
|
101963
|
+
scope: "#5cc9c0",
|
|
101964
|
+
stash: "#f2c46b",
|
|
101965
|
+
trips: "#f39a4b"
|
|
101966
|
+
},
|
|
101967
|
+
canvas: "#000000",
|
|
101968
|
+
control: "#303035",
|
|
101969
|
+
error: "#ff817a",
|
|
101970
|
+
glass: "rgba(44,44,47,.90)",
|
|
101971
|
+
glassEdge: "rgba(255,255,255,.20)",
|
|
101972
|
+
glassHighlight: "rgba(255,255,255,.07)",
|
|
101973
|
+
info: "#9cbaff",
|
|
101974
|
+
ink: "#f4f4f4",
|
|
101975
|
+
outline: "#72727d",
|
|
101976
|
+
quiet: "#a6a6af",
|
|
101977
|
+
raised: "#252527",
|
|
101978
|
+
rule: "#3c3c41",
|
|
101979
|
+
secondary: "#aaaab1",
|
|
101980
|
+
success: "#5bd879",
|
|
101981
|
+
surface: "#1c1c1e",
|
|
101982
|
+
warning: "#ffd20a"
|
|
101983
|
+
},
|
|
101984
|
+
light: {
|
|
101985
|
+
accent: {
|
|
101986
|
+
auth: "#415a89",
|
|
101987
|
+
deploy: "#2c55a0",
|
|
101988
|
+
gateway: "#8c315a",
|
|
101989
|
+
opm: "#725333",
|
|
101990
|
+
scope: "#126962",
|
|
101991
|
+
stash: "#75520e",
|
|
101992
|
+
trips: "#8b4617"
|
|
101993
|
+
},
|
|
101994
|
+
canvas: "#f2f2f7",
|
|
101995
|
+
control: "#e7e7ed",
|
|
101996
|
+
error: "#a62132",
|
|
101997
|
+
glass: "rgba(255,255,255,.92)",
|
|
101998
|
+
glassEdge: "rgba(0,0,0,.13)",
|
|
101999
|
+
glassHighlight: "#ffffff",
|
|
102000
|
+
info: "#365e9f",
|
|
102001
|
+
ink: "#17171b",
|
|
102002
|
+
outline: "#85858f",
|
|
102003
|
+
quiet: "#5e5e6a",
|
|
102004
|
+
raised: "#f7f7fa",
|
|
102005
|
+
rule: "#d8d8df",
|
|
102006
|
+
secondary: "#575761",
|
|
102007
|
+
success: "#1d6b3b",
|
|
102008
|
+
surface: "#ffffff",
|
|
102009
|
+
warning: "#7f5200"
|
|
102010
|
+
}
|
|
102011
|
+
};
|
|
102012
|
+
function variable(role) {
|
|
102013
|
+
return `--design-${kebabCase(role)}`;
|
|
102014
|
+
}
|
|
102015
|
+
const roles = remove$5(palettes.light, "accent");
|
|
102016
|
+
const colors = {
|
|
102017
|
+
accent: map$11(hues, (hue) => `var(${variable(`accent-${hue}`)})`),
|
|
102018
|
+
...map$11(roles, (_value, role) => `var(${variable(role)})`)
|
|
102019
|
+
};
|
|
101787
102020
|
const styles = {
|
|
101788
102021
|
body: {
|
|
101789
|
-
color: ink,
|
|
102022
|
+
color: colors.ink,
|
|
101790
102023
|
fontSize: 15,
|
|
101791
102024
|
lineHeight: 22
|
|
101792
102025
|
},
|
|
101793
102026
|
bone: {
|
|
101794
|
-
backgroundColor:
|
|
102027
|
+
backgroundColor: colors.control,
|
|
101795
102028
|
borderRadius: 6
|
|
101796
102029
|
},
|
|
101797
102030
|
card: {
|
|
101798
|
-
backgroundColor:
|
|
101799
|
-
borderRadius:
|
|
102031
|
+
backgroundColor: colors.surface,
|
|
102032
|
+
borderRadius: 24,
|
|
101800
102033
|
overflow: "hidden"
|
|
101801
102034
|
},
|
|
101802
102035
|
chip: {
|
|
101803
102036
|
alignItems: "center",
|
|
101804
|
-
backgroundColor:
|
|
102037
|
+
backgroundColor: colors.raised,
|
|
101805
102038
|
display: "flex",
|
|
101806
102039
|
flexShrink: 0,
|
|
101807
102040
|
justifyContent: "center",
|
|
@@ -101809,12 +102042,12 @@ const styles = {
|
|
|
101809
102042
|
},
|
|
101810
102043
|
control: {
|
|
101811
102044
|
alignItems: "center",
|
|
101812
|
-
backgroundColor:
|
|
102045
|
+
backgroundColor: colors.raised,
|
|
101813
102046
|
borderRadius: 8,
|
|
101814
102047
|
display: "flex",
|
|
101815
102048
|
justifyContent: "center",
|
|
101816
|
-
minHeight:
|
|
101817
|
-
minWidth:
|
|
102049
|
+
minHeight: 44,
|
|
102050
|
+
minWidth: 44,
|
|
101818
102051
|
paddingInline: 10
|
|
101819
102052
|
},
|
|
101820
102053
|
detail: {
|
|
@@ -101824,30 +102057,44 @@ const styles = {
|
|
|
101824
102057
|
padding: 20
|
|
101825
102058
|
},
|
|
101826
102059
|
dot: {
|
|
101827
|
-
borderRadius: 3,
|
|
102060
|
+
borderRadius: 3.5,
|
|
101828
102061
|
flexShrink: 0,
|
|
101829
|
-
height:
|
|
101830
|
-
width:
|
|
102062
|
+
height: 7,
|
|
102063
|
+
width: 7
|
|
101831
102064
|
},
|
|
101832
102065
|
emptyLine: {
|
|
101833
|
-
color:
|
|
102066
|
+
color: colors.secondary,
|
|
101834
102067
|
fontSize: 17,
|
|
101835
102068
|
lineHeight: 22,
|
|
101836
102069
|
textAlign: "center"
|
|
101837
102070
|
},
|
|
102071
|
+
field: {
|
|
102072
|
+
borderColor: colors.outline,
|
|
102073
|
+
borderRadius: 12,
|
|
102074
|
+
borderWidth: 1,
|
|
102075
|
+
minHeight: 44,
|
|
102076
|
+
padding: 8
|
|
102077
|
+
},
|
|
101838
102078
|
figure: {
|
|
101839
|
-
color:
|
|
101840
|
-
fontSize:
|
|
101841
|
-
lineHeight:
|
|
102079
|
+
color: colors.secondary,
|
|
102080
|
+
fontSize: 13,
|
|
102081
|
+
lineHeight: 18
|
|
101842
102082
|
},
|
|
101843
102083
|
frame: {
|
|
101844
|
-
backgroundColor:
|
|
102084
|
+
backgroundColor: colors.canvas,
|
|
101845
102085
|
display: "flex",
|
|
101846
102086
|
flex: 1,
|
|
101847
102087
|
minHeight: 0
|
|
101848
102088
|
},
|
|
102089
|
+
glass: {
|
|
102090
|
+
backgroundColor: colors.glass,
|
|
102091
|
+
borderColor: colors.glassEdge,
|
|
102092
|
+
borderRadius: 22,
|
|
102093
|
+
borderWidth: 1,
|
|
102094
|
+
minHeight: 44
|
|
102095
|
+
},
|
|
101849
102096
|
groupHeading: {
|
|
101850
|
-
color: ink,
|
|
102097
|
+
color: colors.ink,
|
|
101851
102098
|
fontSize: 15,
|
|
101852
102099
|
fontWeight: "600",
|
|
101853
102100
|
lineHeight: 20,
|
|
@@ -101856,14 +102103,14 @@ const styles = {
|
|
|
101856
102103
|
paddingTop: 18
|
|
101857
102104
|
},
|
|
101858
102105
|
heading: {
|
|
101859
|
-
color: ink,
|
|
102106
|
+
color: colors.ink,
|
|
101860
102107
|
fontSize: 20,
|
|
101861
102108
|
fontWeight: "600",
|
|
101862
102109
|
lineHeight: 26
|
|
101863
102110
|
},
|
|
101864
102111
|
headline: {
|
|
101865
|
-
color: ink,
|
|
101866
|
-
fontSize:
|
|
102112
|
+
color: colors.ink,
|
|
102113
|
+
fontSize: 28,
|
|
101867
102114
|
fontWeight: "700",
|
|
101868
102115
|
lineHeight: 32
|
|
101869
102116
|
},
|
|
@@ -101874,12 +102121,12 @@ const styles = {
|
|
|
101874
102121
|
minWidth: 0
|
|
101875
102122
|
},
|
|
101876
102123
|
line: {
|
|
101877
|
-
color:
|
|
102124
|
+
color: colors.secondary,
|
|
101878
102125
|
fontSize: 13,
|
|
101879
102126
|
lineHeight: 18
|
|
101880
102127
|
},
|
|
101881
102128
|
overline: {
|
|
101882
|
-
color: ink,
|
|
102129
|
+
color: colors.ink,
|
|
101883
102130
|
flexShrink: 1,
|
|
101884
102131
|
fontSize: 14,
|
|
101885
102132
|
fontWeight: "600",
|
|
@@ -101904,12 +102151,22 @@ const styles = {
|
|
|
101904
102151
|
flexDirection: "row",
|
|
101905
102152
|
minHeight: 0
|
|
101906
102153
|
},
|
|
102154
|
+
pill: {
|
|
102155
|
+
borderRadius: 12,
|
|
102156
|
+
minHeight: 24,
|
|
102157
|
+
paddingInline: 8
|
|
102158
|
+
},
|
|
102159
|
+
reader: {
|
|
102160
|
+
color: colors.ink,
|
|
102161
|
+
fontSize: 16,
|
|
102162
|
+
lineHeight: 25
|
|
102163
|
+
},
|
|
101907
102164
|
row: {
|
|
101908
102165
|
alignItems: "center",
|
|
101909
102166
|
display: "flex",
|
|
101910
102167
|
flexDirection: "row",
|
|
101911
102168
|
gap: 12,
|
|
101912
|
-
minHeight:
|
|
102169
|
+
minHeight: 54,
|
|
101913
102170
|
paddingInline: 16
|
|
101914
102171
|
},
|
|
101915
102172
|
rowBody: {
|
|
@@ -101927,12 +102184,13 @@ const styles = {
|
|
|
101927
102184
|
paddingInline: 16
|
|
101928
102185
|
},
|
|
101929
102186
|
scale: {
|
|
101930
|
-
color:
|
|
102187
|
+
color: colors.quiet,
|
|
101931
102188
|
fontSize: 11,
|
|
101932
|
-
lineHeight:
|
|
102189
|
+
lineHeight: 15
|
|
101933
102190
|
},
|
|
101934
102191
|
sheet: {
|
|
101935
|
-
backgroundColor:
|
|
102192
|
+
backgroundColor: colors.surface,
|
|
102193
|
+
borderRadius: 26,
|
|
101936
102194
|
display: "flex",
|
|
101937
102195
|
flexDirection: "column",
|
|
101938
102196
|
gap: 16,
|
|
@@ -101945,14 +102203,32 @@ const styles = {
|
|
|
101945
102203
|
justifyContent: "flex-end"
|
|
101946
102204
|
},
|
|
101947
102205
|
summary: {
|
|
101948
|
-
color:
|
|
102206
|
+
color: colors.secondary,
|
|
101949
102207
|
fontSize: 14,
|
|
101950
102208
|
lineHeight: 19
|
|
101951
102209
|
},
|
|
102210
|
+
tile: {
|
|
102211
|
+
backgroundColor: colors.surface,
|
|
102212
|
+
borderRadius: 24,
|
|
102213
|
+
gap: 8,
|
|
102214
|
+
padding: 16
|
|
102215
|
+
},
|
|
102216
|
+
tileLabel: {
|
|
102217
|
+
color: colors.secondary,
|
|
102218
|
+
fontSize: 13,
|
|
102219
|
+
lineHeight: 18
|
|
102220
|
+
},
|
|
102221
|
+
tileValue: {
|
|
102222
|
+
color: colors.ink,
|
|
102223
|
+
fontSize: 28,
|
|
102224
|
+
fontWeight: "600",
|
|
102225
|
+
lineHeight: 32
|
|
102226
|
+
},
|
|
101952
102227
|
title: {
|
|
101953
|
-
color: ink,
|
|
102228
|
+
color: colors.ink,
|
|
101954
102229
|
flexShrink: 1,
|
|
101955
102230
|
fontSize: 16,
|
|
102231
|
+
fontWeight: "500",
|
|
101956
102232
|
lineHeight: 21
|
|
101957
102233
|
},
|
|
101958
102234
|
titleLine: {
|
|
@@ -101961,6 +102237,12 @@ const styles = {
|
|
|
101961
102237
|
flexDirection: "row",
|
|
101962
102238
|
gap: 6,
|
|
101963
102239
|
minWidth: 0
|
|
102240
|
+
},
|
|
102241
|
+
workspaceTitle: {
|
|
102242
|
+
color: colors.ink,
|
|
102243
|
+
fontSize: 34,
|
|
102244
|
+
fontWeight: "700",
|
|
102245
|
+
lineHeight: 39
|
|
101964
102246
|
}
|
|
101965
102247
|
};
|
|
101966
102248
|
// src/sign-ins/shared.ts
|
|
@@ -102150,8 +102432,12 @@ function waitingPage(unavailable) {
|
|
|
102150
102432
|
});
|
|
102151
102433
|
return html(`<!doctype html>
|
|
102152
102434
|
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
|
102153
|
-
<meta name="color-scheme" content="dark"
|
|
102154
|
-
<
|
|
102435
|
+
<meta name="color-scheme" content="light dark">
|
|
102436
|
+
<meta name="theme-color" media="(prefers-color-scheme: light)" content="${palettes.light.canvas}">
|
|
102437
|
+
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="${palettes.dark.canvas}">
|
|
102438
|
+
<meta http-equiv="refresh" content="5"><title>Auth</title></head>
|
|
102439
|
+
<body style="display:grid;place-items:center;min-height:100dvh;margin:0;
|
|
102440
|
+
background:light-dark(${palettes.light.canvas},${palettes.dark.canvas});color:light-dark(${palettes.light.secondary},${palettes.dark.secondary});
|
|
102155
102441
|
font:${styles.line.fontSize}px/${styles.line.lineHeight}px system-ui"><p role="status">${text}</p></body></html>`);
|
|
102156
102442
|
}
|
|
102157
102443
|
const association = { webcredentials: { apps: flatMap$6(AppSignIn.fields.app.literals, (slug) => map$10(["", ".dev"], (suffix) => `99K7MQUK7F.xyz.mp281x.${slug}${suffix}`)) } };
|
|
@@ -102208,7 +102494,7 @@ runApp({
|
|
|
102208
102494
|
auth: provide$2(effectContext(map$7(Identity, (identity) => Auth.makeContext((headers, purpose) => withSpan(identity.resolve(identifyRequestOf(headers, purpose)), "Identity.account")))), layerServices),
|
|
102209
102495
|
icon: icon_default,
|
|
102210
102496
|
middleware: (app) => map$7(app, setHeader("content-security-policy", "frame-ancestors 'none'")),
|
|
102211
|
-
routes: provide$2(mergeAll$1(identityHttp, signInsHttp, layerRpc({
|
|
102497
|
+
routes: provide$2(mergeAll$1(identityHttp, sessionsHttp, signInsHttp, layerRpc({
|
|
102212
102498
|
group: RpcContracts,
|
|
102213
102499
|
handlers: mergeAll$1(identityHandlers, peopleHandlers, sessionsHandlers)
|
|
102214
102500
|
}), layerMcp({
|