@profullstack/builtindie 0.1.3 → 0.1.4
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/package.json +1 -1
- package/src/service.ts +14 -3
- package/src/version.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@profullstack/builtindie",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "built.indie: launch your indie product with one URL. We fetch the logo, screenshots, videos, llms.txt, OpenSite and OpenProfile from your homepage; people upvote; you get a badge. Web (PWA), API, CLI, TUI and MCP.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/src/service.ts
CHANGED
|
@@ -47,9 +47,20 @@ export type Config = {
|
|
|
47
47
|
export const CLAIM_LABEL = '_built-indie'
|
|
48
48
|
export const CLAIM_PREFIX = 'built-indie-verify='
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
/**
|
|
51
|
+
* TXT records as public resolvers see them: every answer from 1.1.1.1 and 9.9.9.9, merged.
|
|
52
|
+
* One Resolver per server on purpose: Bun 1.4's node:dns Resolver given two servers
|
|
53
|
+
* answers ENOTFOUND for a record each of them serves alone, so no claim could succeed.
|
|
54
|
+
*/
|
|
55
|
+
const PUBLIC_DNS = ['1.1.1.1', '9.9.9.9'].map((server) => {
|
|
56
|
+
const r = new Resolver({ timeout: 4000, tries: 2 })
|
|
57
|
+
r.setServers([server])
|
|
58
|
+
return r
|
|
59
|
+
})
|
|
60
|
+
export async function publicTxt(name: string, resolvers: Pick<Resolver, 'resolveTxt'>[] = PUBLIC_DNS): Promise<string[][]> {
|
|
61
|
+
const answers = await Promise.all(resolvers.map((r) => r.resolveTxt(name).catch(() => [] as string[][])))
|
|
62
|
+
return answers.flat()
|
|
63
|
+
}
|
|
53
64
|
|
|
54
65
|
export const CHAIN_LABELS: Record<string, string> = {
|
|
55
66
|
USDC_POL: 'USDC on Polygon', USDC_SOL: 'USDC on Solana', USDC_ETH: 'USDC on Ethereum', USDT_POL: 'USDT on Polygon',
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.
|
|
1
|
+
export const VERSION = '0.1.4'
|