@deslop/portfolio 0.1.1227 → 0.1.1228
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/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<link rel="manifest" href="/manifest.webmanifest" />
|
|
16
16
|
|
|
17
17
|
<title>Portfolio</title>
|
|
18
|
-
<script type="module" crossorigin src="/assets/index-
|
|
18
|
+
<script type="module" crossorigin src="/assets/index-w71U_E9C.js"></script>
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-WkwZ5CU-.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/assets/profile-B5GCDOor.js">
|
|
21
21
|
<link rel="stylesheet" crossorigin href="/assets/index-DDKtg7R3.css">
|
package/dist/server.js
CHANGED
|
@@ -43744,6 +43744,23 @@ const compressBody = /*#__PURE__*/ dual((args) => isHttpClientRequest(args[0]),
|
|
|
43744
43744
|
return map$5(compressBody$1(self.body, algorithm, options), (body) => body === self.body ? self : makeWith$1(self.method, self.url, self.urlParams, self.hash, set$1(updateContentLength(self.headers, body), "content-encoding", algorithm), body));
|
|
43745
43745
|
});
|
|
43746
43746
|
/**
|
|
43747
|
+
* Sets a JSON request body using unsafe JSON encoding.
|
|
43748
|
+
*
|
|
43749
|
+
* **When to use**
|
|
43750
|
+
*
|
|
43751
|
+
* Use when the request body is known to be JSON-serializable and a synchronous
|
|
43752
|
+
* `HttpClientRequest` result is needed.
|
|
43753
|
+
*
|
|
43754
|
+
* **Gotchas**
|
|
43755
|
+
*
|
|
43756
|
+
* JSON encoding may throw instead of failing in the Effect error channel.
|
|
43757
|
+
*
|
|
43758
|
+
* @stability unstable
|
|
43759
|
+
* @category combinators
|
|
43760
|
+
* @since 4.0.0
|
|
43761
|
+
*/
|
|
43762
|
+
const bodyJsonUnsafe = /*#__PURE__*/ dual(2, (self, body) => setBody$1(self, jsonUnsafe$1(body)));
|
|
43763
|
+
/**
|
|
43747
43764
|
* Builds a `URL` from the request URL, query parameters, and hash, returning `Option.none()` if the URL is invalid.
|
|
43748
43765
|
*
|
|
43749
43766
|
* @stability unstable
|
|
@@ -69543,6 +69560,8 @@ const SecureOrigin = Origin.check(makeFilter((value) => {
|
|
|
69543
69560
|
const Port = String$6.check(isPattern(/^\d{1,5}$/u), makeFilter((value) => exists(parse$2(value), (port) => port >= 1 && port <= 65535), { expected: "a port between 1 and 65535" }));
|
|
69544
69561
|
const AppVersion = String$6.check(isPattern(/^0\.1\.\d+$/u));
|
|
69545
69562
|
const RuntimeConfig = Struct({
|
|
69563
|
+
auth: optionalKey(String$6),
|
|
69564
|
+
name: String$6,
|
|
69546
69565
|
traces: String$6,
|
|
69547
69566
|
version: AppVersion
|
|
69548
69567
|
});
|
|
@@ -70452,10 +70471,17 @@ const layerRoutes = use((router) => gen(function* () {
|
|
|
70452
70471
|
})
|
|
70453
70472
|
});
|
|
70454
70473
|
});
|
|
70455
|
-
yield* router.add("GET", "/api/runtime",
|
|
70456
|
-
|
|
70457
|
-
|
|
70458
|
-
|
|
70474
|
+
yield* router.add("GET", "/api/runtime", gen(function* () {
|
|
70475
|
+
return yield* schemaJson(RuntimeConfig)({
|
|
70476
|
+
...match$7(issuer, {
|
|
70477
|
+
onNone: () => ({}),
|
|
70478
|
+
onSome: (origin) => ({ auth: origin })
|
|
70479
|
+
}),
|
|
70480
|
+
name: yield* appName,
|
|
70481
|
+
traces,
|
|
70482
|
+
version: (yield* packageMetadata).version
|
|
70483
|
+
});
|
|
70484
|
+
}));
|
|
70459
70485
|
yield* router.add("GET", "/auth/sign-in", toIssuer({}));
|
|
70460
70486
|
yield* router.add("GET", "/auth/sign-out", toIssuer({ "sign-out": "" }));
|
|
70461
70487
|
yield* router.add("GET", "/auth/user", gen(function* () {
|
|
@@ -70467,6 +70493,22 @@ const layerRoutes = use((router) => gen(function* () {
|
|
|
70467
70493
|
}, { headers: { "cache-control": "no-store" } });
|
|
70468
70494
|
}));
|
|
70469
70495
|
}));
|
|
70496
|
+
const layerAnnounce = effectDiscard(gen(function* () {
|
|
70497
|
+
const origin = new URL(yield* String$5("APP_URL")).origin;
|
|
70498
|
+
const client = filterStatusOk(yield* HttpClient);
|
|
70499
|
+
yield* match$7(yield* option(String$5("AUTH_URL")), {
|
|
70500
|
+
onNone: () => void_$1,
|
|
70501
|
+
onSome: fnUntraced(function* (issuer) {
|
|
70502
|
+
yield* pipe(post(new URL("/api/apps", issuer).href), bodyJsonUnsafe({ origin }), client.execute, delay("2 seconds"), retry({
|
|
70503
|
+
schedule: spaced("1 minute"),
|
|
70504
|
+
times: 60
|
|
70505
|
+
}), ignore$1({
|
|
70506
|
+
log: "Warn",
|
|
70507
|
+
message: "Auth did not list this app"
|
|
70508
|
+
}), forkScoped);
|
|
70509
|
+
})
|
|
70510
|
+
});
|
|
70511
|
+
}));
|
|
70470
70512
|
function layerIcon(icon) {
|
|
70471
70513
|
return add("GET", "/icon", succeed$5(text(icon, {
|
|
70472
70514
|
contentType: "image/svg+xml",
|
|
@@ -70679,7 +70721,7 @@ const provider = fnUntraced(function* (given) {
|
|
|
70679
70721
|
});
|
|
70680
70722
|
const layerPlatform = mergeAll$1(layer$4, layer$12, layer$15);
|
|
70681
70723
|
function server(app) {
|
|
70682
|
-
return pipe(serve(pipe(mergeAll$1(app.routes, layerRoutes, layerIcon(app.icon), layerWeb), provide$2(Auth.layer)), {
|
|
70724
|
+
return pipe(serve(pipe(mergeAll$1(app.routes, layerRoutes, layerIcon(app.icon), layerWeb, layerAnnounce), provide$2(Auth.layer)), {
|
|
70683
70725
|
disableLogger: true,
|
|
70684
70726
|
middleware: (http) => guard(app.middleware?.(http) ?? http)
|
|
70685
70727
|
}), provide$2(mergeAll$1(layerProtocol, match(app.telemetry === false, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deslop/portfolio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1228",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/MP281X/deslop",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"engines": {
|
|
31
31
|
"node": ">=26"
|
|
32
32
|
},
|
|
33
|
-
"fingerprint": "
|
|
33
|
+
"fingerprint": "d03883a030aeb286036d5c501aaf7d685a84a68e0e74122d261c6bfac1348eb6"
|
|
34
34
|
}
|