@profullstack/builtindie 0.1.4 → 0.7.1
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/OpenStack.md +1 -1
- package/README.md +33 -4
- package/package.json +16 -7
- package/public/app.js +58 -0
- package/public/style.css +113 -11
- package/src/auth.ts +10 -6
- package/src/browse.ts +243 -0
- package/src/cli.ts +131 -10
- package/src/client.ts +96 -5
- package/src/coinpay-signin.ts +118 -0
- package/src/db.ts +406 -9
- package/src/fetch.ts +15 -7
- package/src/html.ts +561 -82
- package/src/karma.ts +179 -0
- package/src/leaderboard.ts +59 -0
- package/src/mcp.ts +55 -4
- package/src/pit-footer.ts +39 -0
- package/src/profile.ts +34 -0
- package/src/ring-footer.ts +53 -0
- package/src/ring.ts +5 -1
- package/src/server.ts +607 -48
- package/src/service.ts +307 -74
- package/src/tags.ts +92 -0
- package/src/tui.ts +28 -6
- package/src/version.ts +1 -1
package/src/fetch.ts
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import { lookup } from 'node:dns/promises'
|
|
18
18
|
import { isIP } from 'node:net'
|
|
19
19
|
import { accounts, identityValue, kindOf as kindOfProfile, parseOpenProfile, web } from '@profullstack/openprofile'
|
|
20
|
+
import { tagsFor } from './tags.js'
|
|
20
21
|
|
|
21
22
|
export type Video = { kind: 'youtube' | 'vimeo' | 'loom' | 'file'; url: string; embed: string | null }
|
|
22
23
|
|
|
@@ -554,13 +555,20 @@ export async function autofetch(input: string, o: FetchOptions = {}): Promise<Si
|
|
|
554
555
|
for (const a of profile?.accounts ?? []) addSocial(a)
|
|
555
556
|
for (const l of facts.links) addSocial(l)
|
|
556
557
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
558
|
+
// Tags: what the site declares (opensite.json, keywords meta, article:tag, JSON-LD keywords,
|
|
559
|
+
// category and genre, manifest categories); else topics read from its own words.
|
|
560
|
+
const words = (v: unknown) => asArray(v).flatMap((k) => String(k ?? '').split(','))
|
|
561
|
+
const tags = tagsFor(
|
|
562
|
+
[
|
|
563
|
+
...words(declared?.tags),
|
|
564
|
+
...words(declared?.keywords),
|
|
565
|
+
...words(m['keywords']),
|
|
566
|
+
...words(m['article:tag']),
|
|
567
|
+
...[app, org, site].flatMap((d) => [...words(d?.keywords), ...words(d?.applicationCategory), ...words(d?.genre)]),
|
|
568
|
+
...words(manifest?.categories),
|
|
569
|
+
],
|
|
570
|
+
{ name, tagline, description },
|
|
571
|
+
)
|
|
564
572
|
|
|
565
573
|
return {
|
|
566
574
|
url: base.href,
|