update to v0.9.1.
add npm package link prep for jsr support (I hope) add favicon update installation instructions
This commit is contained in:
16
dist-node/loadAndParseTwtxt.d.ts
vendored
16
dist-node/loadAndParseTwtxt.d.ts
vendored
@@ -1,14 +1,2 @@
|
||||
export default function loadAndParseTwtxtFile(url?: string): Promise<{
|
||||
lastModified: string;
|
||||
following: import('./types.ts').Twttr[];
|
||||
metadata: import('./types.ts').Metadata;
|
||||
twts: {
|
||||
content: string;
|
||||
created: string;
|
||||
createdUTC: string;
|
||||
hash: string;
|
||||
replyHash: string | undefined;
|
||||
replyNick: string | undefined;
|
||||
replyUrl: string | undefined;
|
||||
}[];
|
||||
}>;
|
||||
import { Twtxt } from './types.ts';
|
||||
export default function loadAndParseTwtxtFile(url?: string): Promise<Twtxt>;
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"loadAndParseTwtxt.js","sources":["../src/loadAndParseTwtxt.ts"],"sourcesContent":["import dayjs from \"dayjs\";\n\nimport parseTwtxt from \"./parseTwtxt.js\";\n\nexport default async function loadAndParseTwtxtFile(url = \"\") {\n\tif (!url) throw new Error(\"URL is required\");\n\n\ttry {\n\t\tconst response = await fetch(url);\n\t\tconst twtxtFile = await response.text();\n\t\tconst lastModified = dayjs(\n\t\t\tresponse.headers.get(\"Last-Modified\"),\n\t\t).toISOString();\n\n\t\treturn {\n\t\t\t...parseTwtxt(twtxtFile),\n\t\t\tlastModified,\n\t\t};\n\t} catch (err) {\n\t\tconsole.error(err);\n\t\tthrow err;\n\t}\n}\n"],"names":[],"mappings":";;AAIA,eAA8B,sBAAsB,MAAM,IAAI;AAC7D,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,iBAAiB;AAE3C,MAAI;AACH,UAAM,WAAW,MAAM,MAAM,GAAG;AAChC,UAAM,YAAY,MAAM,SAAS,KAAA;AACjC,UAAM,eAAe;AAAA,MACpB,SAAS,QAAQ,IAAI,eAAe;AAAA,IAAA,EACnC,YAAA;AAEF,WAAO;AAAA,MACN,GAAG,WAAW,SAAS;AAAA,MACvB;AAAA,IAAA;AAAA,EAEF,SAAS,KAAK;AACb,YAAQ,MAAM,GAAG;AACjB,UAAM;AAAA,EACP;AACD;"}
|
||||
{"version":3,"file":"loadAndParseTwtxt.js","sources":["../src/loadAndParseTwtxt.ts"],"sourcesContent":["import dayjs from \"dayjs\";\n\nimport parseTwtxt from \"./parseTwtxt.js\";\nimport type { Twtxt } from \"./types.ts\";\n\nexport default async function loadAndParseTwtxtFile(url = \"\"): Promise<Twtxt> {\n\tif (!url) throw new Error(\"URL is required\");\n\n\ttry {\n\t\tconst response = await fetch(url);\n\t\tconst twtxtFile = await response.text();\n\t\tconst lastModified = dayjs(\n\t\t\tresponse.headers.get(\"Last-Modified\"),\n\t\t).toISOString();\n\n\t\treturn {\n\t\t\t...parseTwtxt(twtxtFile),\n\t\t\tlastModified,\n\t\t};\n\t} catch (err) {\n\t\tconsole.error(err);\n\t\tthrow err;\n\t}\n}\n"],"names":[],"mappings":";;AAKA,eAA8B,sBAAsB,MAAM,IAAoB;AAC7E,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,iBAAiB;AAE3C,MAAI;AACH,UAAM,WAAW,MAAM,MAAM,GAAG;AAChC,UAAM,YAAY,MAAM,SAAS,KAAA;AACjC,UAAM,eAAe;AAAA,MACpB,SAAS,QAAQ,IAAI,eAAe;AAAA,IAAA,EACnC,YAAA;AAEF,WAAO;AAAA,MACN,GAAG,WAAW,SAAS;AAAA,MACvB;AAAA,IAAA;AAAA,EAEF,SAAS,KAAK;AACb,YAAQ,MAAM,GAAG;AACjB,UAAM;AAAA,EACP;AACD;"}
|
||||
16
dist-node/parseTwtxt.d.ts
vendored
16
dist-node/parseTwtxt.d.ts
vendored
@@ -1,18 +1,6 @@
|
||||
import { Metadata, Twttr } from './types.ts';
|
||||
import { Twtxt } from './types.ts';
|
||||
/**
|
||||
* @param twtxt
|
||||
* @returns object containing: following, metadata, twts
|
||||
*/
|
||||
export default function parseTwtxt(twtxt: string): {
|
||||
following: Twttr[];
|
||||
metadata: Metadata;
|
||||
twts: {
|
||||
content: string;
|
||||
created: string;
|
||||
createdUTC: string;
|
||||
hash: string;
|
||||
replyHash: string | undefined;
|
||||
replyNick: string | undefined;
|
||||
replyUrl: string | undefined;
|
||||
}[];
|
||||
};
|
||||
export default function parseTwtxt(twtxt: string): Twtxt;
|
||||
|
||||
File diff suppressed because one or more lines are too long
1
dist-node/types.d.ts
vendored
1
dist-node/types.d.ts
vendored
@@ -26,6 +26,7 @@ export interface Twttr {
|
||||
}
|
||||
export interface Twtxt {
|
||||
following: Twttr[];
|
||||
lastModified?: string;
|
||||
metadata: Metadata;
|
||||
twts: Twt[];
|
||||
}
|
||||
|
||||
2
dist-node/utils.d.ts
vendored
2
dist-node/utils.d.ts
vendored
@@ -1,2 +1,2 @@
|
||||
export declare const base32Encode: (payload: string | Uint8Array<ArrayBufferLike>) => any;
|
||||
export declare const base32Encode: (payload: string | Uint8Array<ArrayBufferLike>) => string;
|
||||
export declare const getValueOrFirstEntry: (value: unknown | unknown[]) => any;
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import base32 from \"base32.js\";\n\nexport const base32Encode = (payload: string | Uint8Array<ArrayBufferLike>) => {\n\tconst encoder = new base32.Encoder({ type: \"rfc4648\" });\n\treturn encoder.write(payload).finalize();\n};\n\nexport const getValueOrFirstEntry = (value: unknown | unknown[]) =>\n\tArray.isArray(value) && value.length ? value[0] : value;\n"],"names":[],"mappings":";AAEO,MAAM,eAAe,CAAC,YAAkD;AAC9E,QAAM,UAAU,IAAI,OAAO,QAAQ,EAAE,MAAM,WAAW;AACtD,SAAO,QAAQ,MAAM,OAAO,EAAE,SAAA;AAC/B;AAEO,MAAM,uBAAuB,CAAC,UACpC,MAAM,QAAQ,KAAK,KAAK,MAAM,SAAS,MAAM,CAAC,IAAI;"}
|
||||
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import base32 from \"base32.js\";\n\nexport const base32Encode = (\n\tpayload: string | Uint8Array<ArrayBufferLike>,\n): string => {\n\tconst encoder = new base32.Encoder({ type: \"rfc4648\" });\n\treturn encoder.write(payload).finalize();\n};\n\nexport const getValueOrFirstEntry = (value: unknown | unknown[]) =>\n\tArray.isArray(value) && value.length ? value[0] : value;\n"],"names":[],"mappings":";AAEO,MAAM,eAAe,CAC3B,YACY;AACZ,QAAM,UAAU,IAAI,OAAO,QAAQ,EAAE,MAAM,WAAW;AACtD,SAAO,QAAQ,MAAM,OAAO,EAAE,SAAA;AAC/B;AAEO,MAAM,uBAAuB,CAAC,UACpC,MAAM,QAAQ,KAAK,KAAK,MAAM,SAAS,MAAM,CAAC,IAAI;"}
|
||||
Reference in New Issue
Block a user