@bridgething/catalog 0.15.0 → 0.15.2
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/categories.d.ts +8 -0
- package/dist/categories.d.ts.map +1 -0
- package/dist/categories.js +38 -0
- package/dist/categories.js.map +1 -0
- package/dist/changelog.d.ts +2 -0
- package/dist/changelog.d.ts.map +1 -0
- package/dist/changelog.js +52 -0
- package/dist/changelog.js.map +1 -0
- package/dist/copy.d.ts +8 -13
- package/dist/copy.d.ts.map +1 -1
- package/dist/copy.js +27 -22
- package/dist/copy.js.map +1 -1
- package/dist/generated/schema.v1.validator.mjs +120 -42
- package/dist/href.d.ts +2 -0
- package/dist/href.d.ts.map +1 -0
- package/dist/href.js +15 -0
- package/dist/href.js.map +1 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/resolve.d.ts +4 -1
- package/dist/resolve.d.ts.map +1 -1
- package/dist/resolve.js +6 -2
- package/dist/resolve.js.map +1 -1
- package/dist/sources.d.ts +4 -1
- package/dist/sources.d.ts.map +1 -1
- package/dist/sources.js +7 -1
- package/dist/sources.js.map +1 -1
- package/dist/store.d.ts +26 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +41 -0
- package/dist/store.js.map +1 -0
- package/dist/storefront.d.ts +56 -0
- package/dist/storefront.d.ts.map +1 -0
- package/dist/storefront.js +228 -0
- package/dist/storefront.js.map +1 -0
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/schema.v1.json +11 -0
- package/dist/blend.d.ts +0 -18
- package/dist/blend.d.ts.map +0 -1
- package/dist/blend.js +0 -28
- package/dist/blend.js.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AppEntry } from './types.ts';
|
|
2
|
+
export declare const CATEGORIES: readonly ["music", "clocks-weather", "dashboards", "home-control", "productivity", "ambient", "games", "travel", "tools"];
|
|
3
|
+
export type Category = (typeof CATEGORIES)[number];
|
|
4
|
+
export declare const MAX_CATEGORIES = 2;
|
|
5
|
+
export declare const CATEGORY_LABELS: Record<Category, string>;
|
|
6
|
+
export declare function isCategory(slug: string): slug is Category;
|
|
7
|
+
export declare function appCategories(app: AppEntry): Category[];
|
|
8
|
+
//# sourceMappingURL=categories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../src/categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,eAAO,MAAM,UAAU,2HAUb,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAUpD,CAAC;AAIF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,QAAQ,CAEzD;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAOvD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const CATEGORIES = [
|
|
2
|
+
'music',
|
|
3
|
+
'clocks-weather',
|
|
4
|
+
'dashboards',
|
|
5
|
+
'home-control',
|
|
6
|
+
'productivity',
|
|
7
|
+
'ambient',
|
|
8
|
+
'games',
|
|
9
|
+
'travel',
|
|
10
|
+
'tools',
|
|
11
|
+
];
|
|
12
|
+
export const MAX_CATEGORIES = 2;
|
|
13
|
+
export const CATEGORY_LABELS = {
|
|
14
|
+
music: 'music',
|
|
15
|
+
'clocks-weather': 'clocks & weather',
|
|
16
|
+
dashboards: 'dashboards',
|
|
17
|
+
'home-control': 'home & control',
|
|
18
|
+
productivity: 'productivity',
|
|
19
|
+
ambient: 'ambient',
|
|
20
|
+
games: 'games',
|
|
21
|
+
travel: 'travel',
|
|
22
|
+
tools: 'tools',
|
|
23
|
+
};
|
|
24
|
+
const KNOWN = new Set(CATEGORIES);
|
|
25
|
+
export function isCategory(slug) {
|
|
26
|
+
return KNOWN.has(slug);
|
|
27
|
+
}
|
|
28
|
+
export function appCategories(app) {
|
|
29
|
+
const out = [];
|
|
30
|
+
for (const slug of app.categories ?? []) {
|
|
31
|
+
if (isCategory(slug) && !out.includes(slug))
|
|
32
|
+
out.push(slug);
|
|
33
|
+
if (out.length === MAX_CATEGORIES)
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=categories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"categories.js","sourceRoot":"","sources":["../src/categories.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,OAAO;IACP,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,cAAc;IACd,SAAS;IACT,OAAO;IACP,QAAQ;IACR,OAAO;CACC,CAAC;AAIX,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEhC,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD,KAAK,EAAE,OAAO;IACd,gBAAgB,EAAE,kBAAkB;IACpC,UAAU,EAAE,YAAY;IACxB,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,cAAc;IAC5B,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACf,CAAC;AAEF,MAAM,KAAK,GAAG,IAAI,GAAG,CAAS,UAAU,CAAC,CAAC;AAE1C,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAa;IACzC,MAAM,GAAG,GAAe,EAAE,CAAC;IAC3B,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;QACxC,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;YAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5D,IAAI,GAAG,CAAC,MAAM,KAAK,cAAc;YAAE,MAAM;IAC3C,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../src/changelog.ts"],"names":[],"mappings":"AAsCA,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAUhF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const LIST_ITEM = /^\s*(?:[-*+]|\d+[.)])\s+/;
|
|
2
|
+
const HEADING = /^\s{0,3}#{1,6}\s+/;
|
|
3
|
+
const RULE = /^\s*(?:[-*_]\s*){3,}$/;
|
|
4
|
+
function inline(text) {
|
|
5
|
+
return text
|
|
6
|
+
.replace(/!\[([^\]]*)\]\([^)]*\)/g, '$1')
|
|
7
|
+
.replace(/\[([^\]]+)\]\([^)]*\)/g, '$1')
|
|
8
|
+
.replace(/<\/?[a-z][^>]*>/gi, '')
|
|
9
|
+
.replace(/`([^`]+)`/g, '$1')
|
|
10
|
+
.replace(/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, '$2')
|
|
11
|
+
.replace(/~~(?=\S)([\s\S]*?\S)~~/g, '$1')
|
|
12
|
+
.replace(/(^|[^\w*])\*(?=\S)([^*]*?\S)\*(?!\w)/g, '$1$2')
|
|
13
|
+
.replace(/(^|[^\w_])_(?=\S)([^_]*?\S)_(?![\w_])/g, '$1$2')
|
|
14
|
+
.replace(/\\([\\`*_{}[\]()#+\-.!~])/g, '$1');
|
|
15
|
+
}
|
|
16
|
+
function block(raw) {
|
|
17
|
+
const lines = [];
|
|
18
|
+
for (const line of raw.split('\n')) {
|
|
19
|
+
if (RULE.test(line))
|
|
20
|
+
continue;
|
|
21
|
+
if (HEADING.test(line)) {
|
|
22
|
+
lines.push(line.replace(HEADING, '').trim());
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
if (LIST_ITEM.test(line)) {
|
|
26
|
+
const numbered = /^\s*(\d+[.)])/.exec(line);
|
|
27
|
+
lines.push(`${numbered ? numbered[1] : '•'} ${line.replace(LIST_ITEM, '').trim()}`);
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const text = line.trim();
|
|
31
|
+
if (!text)
|
|
32
|
+
continue;
|
|
33
|
+
if (lines.length === 0)
|
|
34
|
+
lines.push(text);
|
|
35
|
+
else
|
|
36
|
+
lines[lines.length - 1] += ` ${text}`;
|
|
37
|
+
}
|
|
38
|
+
return lines.map(inline).join('\n');
|
|
39
|
+
}
|
|
40
|
+
export function changelogText(markdown) {
|
|
41
|
+
if (!markdown)
|
|
42
|
+
return null;
|
|
43
|
+
const text = markdown
|
|
44
|
+
.replace(/\r\n?/g, '\n')
|
|
45
|
+
.split(/\n\s*\n/)
|
|
46
|
+
.map(block)
|
|
47
|
+
.filter(Boolean)
|
|
48
|
+
.join('\n\n')
|
|
49
|
+
.trim();
|
|
50
|
+
return text || null;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=changelog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../src/changelog.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,0BAA0B,CAAC;AAC7C,MAAM,OAAO,GAAG,mBAAmB,CAAC;AACpC,MAAM,IAAI,GAAG,uBAAuB,CAAC;AAErC,SAAS,MAAM,CAAC,IAAY;IAC1B,OAAO,IAAI;SACR,OAAO,CAAC,yBAAyB,EAAE,IAAI,CAAC;SACxC,OAAO,CAAC,wBAAwB,EAAE,IAAI,CAAC;SACvC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC;SAChC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;SAC3B,OAAO,CAAC,gCAAgC,EAAE,IAAI,CAAC;SAC/C,OAAO,CAAC,yBAAyB,EAAE,IAAI,CAAC;SACxC,OAAO,CAAC,uCAAuC,EAAE,MAAM,CAAC;SACxD,OAAO,CAAC,wCAAwC,EAAE,MAAM,CAAC;SACzD,OAAO,CAAC,4BAA4B,EAAE,IAAI,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,KAAK,CAAC,GAAW;IACxB,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,SAAS;QAC9B,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAC7C,SAAS;QACX,CAAC;QACD,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5C,KAAK,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACpF,SAAS;QACX,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;YACpC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;IAC7C,CAAC;IACD,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,QAAmC;IAC/D,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3B,MAAM,IAAI,GAAG,QAAQ;SAClB,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC;SACvB,KAAK,CAAC,SAAS,CAAC;SAChB,GAAG,CAAC,KAAK,CAAC;SACV,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,MAAM,CAAC;SACZ,IAAI,EAAE,CAAC;IACV,OAAO,IAAI,IAAI,IAAI,CAAC;AACtB,CAAC"}
|
package/dist/copy.d.ts
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StoreSource } from './store.ts';
|
|
2
2
|
export declare const STORE_COPY: {
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
5
|
-
readonly appsEmpty: "the catalog exists but has no apps in it.";
|
|
6
|
-
readonly communityTitle: "community apps";
|
|
7
|
-
readonly communityNote: "these are unreviewed";
|
|
8
|
-
readonly communityHint: "from directory sources you have not added";
|
|
9
|
-
readonly communityEmpty: "nothing here";
|
|
10
|
-
readonly suggestedTitle: "suggested sources";
|
|
11
|
-
readonly suggestedHint: "listed in the bridgething directory";
|
|
12
|
-
readonly suggestedEmpty: "nothing the directory lists is missing from your sources.";
|
|
3
|
+
readonly empty: "no apps";
|
|
4
|
+
readonly noMatches: "no matches";
|
|
13
5
|
readonly needsFirmware: "needs newer firmware";
|
|
14
6
|
readonly unpublished: "not published yet";
|
|
7
|
+
readonly unreviewed: "not reviewed by bridgething";
|
|
8
|
+
readonly suggestedTitle: "suggested sources";
|
|
9
|
+
readonly suggestedEmpty: "none";
|
|
15
10
|
};
|
|
16
|
-
export declare function countLine(listings: number, sources: number): string;
|
|
17
11
|
export declare function failureLine(failures: number): string;
|
|
18
12
|
export declare function installsLabel(installs: number): string | null;
|
|
19
13
|
export declare function alsoAvailableLabel(alsoAvailableFrom: readonly string[]): string | null;
|
|
20
|
-
export declare function
|
|
14
|
+
export declare function permissionLabel(permission: string): string;
|
|
15
|
+
export declare function sourceLine(source: StoreSource | null | undefined): string;
|
|
21
16
|
//# sourceMappingURL=copy.d.ts.map
|
package/dist/copy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../src/copy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../src/copy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,eAAO,MAAM,UAAU;;;;;;;;CAQb,CAAC;AAMX,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE7D;AAED,wBAAgB,kBAAkB,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAEtF;AAaD,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAKzE"}
|
package/dist/copy.js
CHANGED
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
export const STORE_COPY = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
appsEmpty: 'the catalog exists but has no apps in it.',
|
|
5
|
-
communityTitle: 'community apps',
|
|
6
|
-
communityNote: 'these are unreviewed',
|
|
7
|
-
communityHint: 'from directory sources you have not added',
|
|
8
|
-
communityEmpty: 'nothing here',
|
|
9
|
-
suggestedTitle: 'suggested sources',
|
|
10
|
-
suggestedHint: 'listed in the bridgething directory',
|
|
11
|
-
suggestedEmpty: 'nothing the directory lists is missing from your sources.',
|
|
2
|
+
empty: 'no apps',
|
|
3
|
+
noMatches: 'no matches',
|
|
12
4
|
needsFirmware: 'needs newer firmware',
|
|
13
5
|
unpublished: 'not published yet',
|
|
6
|
+
unreviewed: 'not reviewed by bridgething',
|
|
7
|
+
suggestedTitle: 'suggested sources',
|
|
8
|
+
suggestedEmpty: 'none',
|
|
14
9
|
};
|
|
15
10
|
function plural(count, word) {
|
|
16
11
|
return `${count} ${word}${count === 1 ? '' : 's'}`;
|
|
17
12
|
}
|
|
18
|
-
export function countLine(listings, sources) {
|
|
19
|
-
return `${listings} across ${plural(sources, 'source')}`;
|
|
20
|
-
}
|
|
21
13
|
export function failureLine(failures) {
|
|
22
|
-
return `${plural(failures, 'source')}
|
|
14
|
+
return `${plural(failures, 'source')} unreachable`;
|
|
23
15
|
}
|
|
24
16
|
export function installsLabel(installs) {
|
|
25
17
|
return installs > 0 ? plural(installs, 'install') : null;
|
|
@@ -27,13 +19,26 @@ export function installsLabel(installs) {
|
|
|
27
19
|
export function alsoAvailableLabel(alsoAvailableFrom) {
|
|
28
20
|
return alsoAvailableFrom.length > 0 ? `also offered by ${plural(alsoAvailableFrom.length, 'other source')}` : null;
|
|
29
21
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
const PERMISSION_LABELS = {
|
|
23
|
+
'net.fetch': 'internet',
|
|
24
|
+
'net.ws': 'websockets',
|
|
25
|
+
'net.proxy': 'TCP tunnel',
|
|
26
|
+
geo: 'location',
|
|
27
|
+
notifications: 'notifications',
|
|
28
|
+
audio: 'sound',
|
|
29
|
+
'audio.tts': 'sound',
|
|
30
|
+
mic: 'microphone',
|
|
31
|
+
};
|
|
32
|
+
export function permissionLabel(permission) {
|
|
33
|
+
return PERMISSION_LABELS[permission] ?? permission;
|
|
34
|
+
}
|
|
35
|
+
export function sourceLine(source) {
|
|
36
|
+
if (!source)
|
|
37
|
+
return STORE_COPY.unreviewed;
|
|
38
|
+
if (source.trust === 'official')
|
|
39
|
+
return 'from bridgething';
|
|
40
|
+
if (source.trust === 'attested')
|
|
41
|
+
return `from ${source.name}`;
|
|
42
|
+
return `from ${source.name} · ${STORE_COPY.unreviewed}`;
|
|
38
43
|
}
|
|
39
44
|
//# sourceMappingURL=copy.js.map
|
package/dist/copy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../src/copy.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,
|
|
1
|
+
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../src/copy.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,YAAY;IACvB,aAAa,EAAE,sBAAsB;IACrC,WAAW,EAAE,mBAAmB;IAChC,UAAU,EAAE,6BAA6B;IACzC,cAAc,EAAE,mBAAmB;IACnC,cAAc,EAAE,MAAM;CACd,CAAC;AAEX,SAAS,MAAM,CAAC,KAAa,EAAE,IAAY;IACzC,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAgB;IAC1C,OAAO,GAAG,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,QAAgB;IAC5C,OAAO,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,iBAAoC;IACrE,OAAO,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,MAAM,CAAC,iBAAiB,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACrH,CAAC;AAED,MAAM,iBAAiB,GAA2B;IAChD,WAAW,EAAE,UAAU;IACvB,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,YAAY;IACzB,GAAG,EAAE,UAAU;IACf,aAAa,EAAE,eAAe;IAC9B,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,OAAO;IACpB,GAAG,EAAE,YAAY;CAClB,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,UAAkB;IAChD,OAAO,iBAAiB,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,MAAsC;IAC/D,IAAI,CAAC,MAAM;QAAE,OAAO,UAAU,CAAC,UAAU,CAAC;IAC1C,IAAI,MAAM,CAAC,KAAK,KAAK,UAAU;QAAE,OAAO,kBAAkB,CAAC;IAC3D,IAAI,MAAM,CAAC,KAAK,KAAK,UAAU;QAAE,OAAO,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;IAC9D,OAAO,QAAQ,MAAM,CAAC,IAAI,MAAM,UAAU,CAAC,UAAU,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -210,12 +210,13 @@ var require_validator = __commonJS(function(exports, module) {
|
|
|
210
210
|
var formats0 = require_formats().fullFormats.uri;
|
|
211
211
|
var formats2 = require_formats().fullFormats["date-time"];
|
|
212
212
|
var func1 = require_ucs2length().default;
|
|
213
|
-
var schema33 = { type: "object", additionalProperties: true, description: "One installable webapp. Unknown keys are tolerated so a catalog that carries a property added after a client shipped still validates; every key defined here is still checked strictly.", required: ["id", "name", "description", "author", "icon", "homepage", "source", "versions"], properties: { id: { $ref: "#/$defs/Uuid" }, name: { type: "string", minLength: 1, maxLength: 100, description: "Display name." }, description: { type: "string", minLength: 1, maxLength: 300, description: "One-line tagline for store cards." }, author: { type: "string", minLength: 1, maxLength: 100 }, icon: { type: ["string", "null"], format: "uri", description: "Hosted square icon. The publish step extracts the bundle's icon and uploads it; null until then." }, screenshots: { type: "array", minItems: 1, maxItems: 6, items: { type: "string", format: "uri" }, description: "Captures of the app running on a device, 800x480 landscape. The store shows the first one on the listing. Omit the key entirely rather than sending an empty array." }, homepage: { type: ["string", "null"], format: "uri" }, source: { type: ["string", "null"], format: "uri", description: "Repository or source URL, for users who want to check it themselves." }, versions: { type: "array", minItems: 1, items: { $ref: "#/$defs/AppVersion" }, description: "Published versions, newest-first. The companion installs the newest version compatible with the connected device." } } };
|
|
213
|
+
var schema33 = { type: "object", additionalProperties: true, description: "One installable webapp. Unknown keys are tolerated so a catalog that carries a property added after a client shipped still validates; every key defined here is still checked strictly.", required: ["id", "name", "description", "author", "icon", "homepage", "source", "versions"], properties: { id: { $ref: "#/$defs/Uuid" }, name: { type: "string", minLength: 1, maxLength: 100, description: "Display name." }, description: { type: "string", minLength: 1, maxLength: 300, description: "One-line tagline for store cards." }, author: { type: "string", minLength: 1, maxLength: 100 }, icon: { type: ["string", "null"], format: "uri", description: "Hosted square icon. The publish step extracts the bundle's icon and uploads it; null until then." }, screenshots: { type: "array", minItems: 1, maxItems: 6, items: { type: "string", format: "uri" }, description: "Captures of the app running on a device, 800x480 landscape. The store shows the first one on the listing. Omit the key entirely rather than sending an empty array." }, categories: { type: "array", minItems: 1, maxItems: 2, uniqueItems: true, items: { type: "string", pattern: "^[a-z][a-z-]{0,31}$" }, description: "Store categories, at most two, from the vocabulary in @bridgething/catalog (CATEGORIES). Clients ignore slugs they do not know, so a newer category never breaks an older client. Omit the key rather than sending an empty array." }, homepage: { type: ["string", "null"], format: "uri" }, source: { type: ["string", "null"], format: "uri", description: "Repository or source URL, for users who want to check it themselves." }, versions: { type: "array", minItems: 1, items: { $ref: "#/$defs/AppVersion" }, description: "Published versions, newest-first. The companion installs the newest version compatible with the connected device." } } };
|
|
214
214
|
var formats8 = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
|
|
215
|
+
var pattern4 = new RegExp("^[a-z][a-z-]{0,31}$", "u");
|
|
215
216
|
var schema35 = { type: "object", additionalProperties: true, description: "One published version. Unknown keys are tolerated so a catalog that carries a property added after a client shipped still validates; every key defined here is still checked strictly.", required: ["version", "released_at", "download", "permissions", "min_libbridgething_version", "changelog"], properties: { version: { $ref: "#/$defs/Version" }, released_at: { type: "string", format: "date-time" }, download: { $ref: "#/$defs/Download" }, settings: { $ref: "#/$defs/Download", description: "The bundle's settings page, hosted separately so a companion can fetch it over the internet instead of pulling it off the device over Bluetooth. Its sha256 MUST be the digest of the same bytes the bundle ships, which is what the device reports as settings_hash; a client verifies against the device's hash and falls back to the device when they disagree. Absent when the version ships no settings page." }, permissions: { type: "array", items: { type: "string", minLength: 1 }, uniqueItems: true, description: "Permission catalog keys this version requests (net.fetch, geo, ...). Shown at install, informational, never a gate." }, role: { enum: ["standard", "launcher"], description: "Mirrors the bundle manifest's role. A launcher can take the device's launcher slot and replace the built-in hub. Absent means standard." }, provides_overlay: { type: "boolean", description: "Whether this version ships an overlay the device can inject over every webapp. Absent means it does not." }, extension: { $ref: "#/$defs/Extension" }, min_libbridgething_version: { $ref: "#/$defs/Semver" }, changelog: { type: ["string", "null"], description: "Markdown changelog for this version." } } };
|
|
216
|
-
var
|
|
217
|
-
var
|
|
218
|
-
var
|
|
217
|
+
var pattern5 = new RegExp("^[A-Za-z0-9](?:[A-Za-z0-9.+\\-]*[A-Za-z0-9])?$", "u");
|
|
218
|
+
var pattern7 = new RegExp("^[0-9]+\\.[0-9]+\\.[0-9]+(?:[.+\\-][0-9A-Za-z.\\-]+)?$", "u");
|
|
219
|
+
var pattern6 = new RegExp("^[a-f0-9]{64}$", "u");
|
|
219
220
|
function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
|
|
220
221
|
let vErrors = null;
|
|
221
222
|
let errors = 0;
|
|
@@ -313,7 +314,7 @@ var require_validator = __commonJS(function(exports, module) {
|
|
|
313
314
|
if (data.sha256 !== undefined) {
|
|
314
315
|
let data2 = data.sha256;
|
|
315
316
|
if (typeof data2 === "string") {
|
|
316
|
-
if (!
|
|
317
|
+
if (!pattern6.test(data2)) {
|
|
317
318
|
const err8 = { instancePath: instancePath + "/sha256", schemaPath: "#/$defs/Sha256/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "' + "^[a-f0-9]{64}$" + '"' };
|
|
318
319
|
if (vErrors === null) {
|
|
319
320
|
vErrors = [err8];
|
|
@@ -431,7 +432,7 @@ var require_validator = __commonJS(function(exports, module) {
|
|
|
431
432
|
}
|
|
432
433
|
errors++;
|
|
433
434
|
}
|
|
434
|
-
if (!
|
|
435
|
+
if (!pattern5.test(data0)) {
|
|
435
436
|
const err8 = { instancePath: instancePath + "/version", schemaPath: "#/$defs/Version/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9](?:[A-Za-z0-9.+\\-]*[A-Za-z0-9])?$" }, message: 'must match pattern "' + "^[A-Za-z0-9](?:[A-Za-z0-9.+\\-]*[A-Za-z0-9])?$" + '"' };
|
|
436
437
|
if (vErrors === null) {
|
|
437
438
|
vErrors = [err8];
|
|
@@ -681,7 +682,7 @@ var require_validator = __commonJS(function(exports, module) {
|
|
|
681
682
|
if (data.min_libbridgething_version !== undefined) {
|
|
682
683
|
let data12 = data.min_libbridgething_version;
|
|
683
684
|
if (typeof data12 === "string") {
|
|
684
|
-
if (!
|
|
685
|
+
if (!pattern7.test(data12)) {
|
|
685
686
|
const err27 = { instancePath: instancePath + "/min_libbridgething_version", schemaPath: "#/$defs/Semver/pattern", keyword: "pattern", params: { pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+(?:[.+\\-][0-9A-Za-z.\\-]+)?$" }, message: 'must match pattern "' + "^[0-9]+\\.[0-9]+\\.[0-9]+(?:[.+\\-][0-9A-Za-z.\\-]+)?$" + '"' };
|
|
686
687
|
if (vErrors === null) {
|
|
687
688
|
vErrors = [err27];
|
|
@@ -1000,87 +1001,164 @@ var require_validator = __commonJS(function(exports, module) {
|
|
|
1000
1001
|
errors++;
|
|
1001
1002
|
}
|
|
1002
1003
|
}
|
|
1004
|
+
if (data.categories !== undefined) {
|
|
1005
|
+
let data7 = data.categories;
|
|
1006
|
+
if (Array.isArray(data7)) {
|
|
1007
|
+
if (data7.length > 2) {
|
|
1008
|
+
const err26 = { instancePath: instancePath + "/categories", schemaPath: "#/properties/categories/maxItems", keyword: "maxItems", params: { limit: 2 }, message: "must NOT have more than 2 items" };
|
|
1009
|
+
if (vErrors === null) {
|
|
1010
|
+
vErrors = [err26];
|
|
1011
|
+
} else {
|
|
1012
|
+
vErrors.push(err26);
|
|
1013
|
+
}
|
|
1014
|
+
errors++;
|
|
1015
|
+
}
|
|
1016
|
+
if (data7.length < 1) {
|
|
1017
|
+
const err27 = { instancePath: instancePath + "/categories", schemaPath: "#/properties/categories/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
1018
|
+
if (vErrors === null) {
|
|
1019
|
+
vErrors = [err27];
|
|
1020
|
+
} else {
|
|
1021
|
+
vErrors.push(err27);
|
|
1022
|
+
}
|
|
1023
|
+
errors++;
|
|
1024
|
+
}
|
|
1025
|
+
const len1 = data7.length;
|
|
1026
|
+
for (let i1 = 0;i1 < len1; i1++) {
|
|
1027
|
+
let data8 = data7[i1];
|
|
1028
|
+
if (typeof data8 === "string") {
|
|
1029
|
+
if (!pattern4.test(data8)) {
|
|
1030
|
+
const err28 = { instancePath: instancePath + "/categories/" + i1, schemaPath: "#/properties/categories/items/pattern", keyword: "pattern", params: { pattern: "^[a-z][a-z-]{0,31}$" }, message: 'must match pattern "' + "^[a-z][a-z-]{0,31}$" + '"' };
|
|
1031
|
+
if (vErrors === null) {
|
|
1032
|
+
vErrors = [err28];
|
|
1033
|
+
} else {
|
|
1034
|
+
vErrors.push(err28);
|
|
1035
|
+
}
|
|
1036
|
+
errors++;
|
|
1037
|
+
}
|
|
1038
|
+
} else {
|
|
1039
|
+
const err29 = { instancePath: instancePath + "/categories/" + i1, schemaPath: "#/properties/categories/items/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
1040
|
+
if (vErrors === null) {
|
|
1041
|
+
vErrors = [err29];
|
|
1042
|
+
} else {
|
|
1043
|
+
vErrors.push(err29);
|
|
1044
|
+
}
|
|
1045
|
+
errors++;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
let i2 = data7.length;
|
|
1049
|
+
let j0;
|
|
1050
|
+
if (i2 > 1) {
|
|
1051
|
+
const indices0 = {};
|
|
1052
|
+
for (;i2--; ) {
|
|
1053
|
+
let item0 = data7[i2];
|
|
1054
|
+
if (typeof item0 !== "string") {
|
|
1055
|
+
continue;
|
|
1056
|
+
}
|
|
1057
|
+
if (typeof indices0[item0] == "number") {
|
|
1058
|
+
j0 = indices0[item0];
|
|
1059
|
+
const err30 = { instancePath: instancePath + "/categories", schemaPath: "#/properties/categories/uniqueItems", keyword: "uniqueItems", params: { i: i2, j: j0 }, message: "must NOT have duplicate items (items ## " + j0 + " and " + i2 + " are identical)" };
|
|
1060
|
+
if (vErrors === null) {
|
|
1061
|
+
vErrors = [err30];
|
|
1062
|
+
} else {
|
|
1063
|
+
vErrors.push(err30);
|
|
1064
|
+
}
|
|
1065
|
+
errors++;
|
|
1066
|
+
break;
|
|
1067
|
+
}
|
|
1068
|
+
indices0[item0] = i2;
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
} else {
|
|
1072
|
+
const err31 = { instancePath: instancePath + "/categories", schemaPath: "#/properties/categories/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1073
|
+
if (vErrors === null) {
|
|
1074
|
+
vErrors = [err31];
|
|
1075
|
+
} else {
|
|
1076
|
+
vErrors.push(err31);
|
|
1077
|
+
}
|
|
1078
|
+
errors++;
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1003
1081
|
if (data.homepage !== undefined) {
|
|
1004
|
-
let
|
|
1005
|
-
if (typeof
|
|
1006
|
-
const
|
|
1082
|
+
let data9 = data.homepage;
|
|
1083
|
+
if (typeof data9 !== "string" && data9 !== null) {
|
|
1084
|
+
const err32 = { instancePath: instancePath + "/homepage", schemaPath: "#/properties/homepage/type", keyword: "type", params: { type: schema33.properties.homepage.type }, message: "must be string,null" };
|
|
1007
1085
|
if (vErrors === null) {
|
|
1008
|
-
vErrors = [
|
|
1086
|
+
vErrors = [err32];
|
|
1009
1087
|
} else {
|
|
1010
|
-
vErrors.push(
|
|
1088
|
+
vErrors.push(err32);
|
|
1011
1089
|
}
|
|
1012
1090
|
errors++;
|
|
1013
1091
|
}
|
|
1014
|
-
if (typeof
|
|
1015
|
-
if (!formats0(
|
|
1016
|
-
const
|
|
1092
|
+
if (typeof data9 === "string") {
|
|
1093
|
+
if (!formats0(data9)) {
|
|
1094
|
+
const err33 = { instancePath: instancePath + "/homepage", schemaPath: "#/properties/homepage/format", keyword: "format", params: { format: "uri" }, message: 'must match format "' + "uri" + '"' };
|
|
1017
1095
|
if (vErrors === null) {
|
|
1018
|
-
vErrors = [
|
|
1096
|
+
vErrors = [err33];
|
|
1019
1097
|
} else {
|
|
1020
|
-
vErrors.push(
|
|
1098
|
+
vErrors.push(err33);
|
|
1021
1099
|
}
|
|
1022
1100
|
errors++;
|
|
1023
1101
|
}
|
|
1024
1102
|
}
|
|
1025
1103
|
}
|
|
1026
1104
|
if (data.source !== undefined) {
|
|
1027
|
-
let
|
|
1028
|
-
if (typeof
|
|
1029
|
-
const
|
|
1105
|
+
let data10 = data.source;
|
|
1106
|
+
if (typeof data10 !== "string" && data10 !== null) {
|
|
1107
|
+
const err34 = { instancePath: instancePath + "/source", schemaPath: "#/properties/source/type", keyword: "type", params: { type: schema33.properties.source.type }, message: "must be string,null" };
|
|
1030
1108
|
if (vErrors === null) {
|
|
1031
|
-
vErrors = [
|
|
1109
|
+
vErrors = [err34];
|
|
1032
1110
|
} else {
|
|
1033
|
-
vErrors.push(
|
|
1111
|
+
vErrors.push(err34);
|
|
1034
1112
|
}
|
|
1035
1113
|
errors++;
|
|
1036
1114
|
}
|
|
1037
|
-
if (typeof
|
|
1038
|
-
if (!formats0(
|
|
1039
|
-
const
|
|
1115
|
+
if (typeof data10 === "string") {
|
|
1116
|
+
if (!formats0(data10)) {
|
|
1117
|
+
const err35 = { instancePath: instancePath + "/source", schemaPath: "#/properties/source/format", keyword: "format", params: { format: "uri" }, message: 'must match format "' + "uri" + '"' };
|
|
1040
1118
|
if (vErrors === null) {
|
|
1041
|
-
vErrors = [
|
|
1119
|
+
vErrors = [err35];
|
|
1042
1120
|
} else {
|
|
1043
|
-
vErrors.push(
|
|
1121
|
+
vErrors.push(err35);
|
|
1044
1122
|
}
|
|
1045
1123
|
errors++;
|
|
1046
1124
|
}
|
|
1047
1125
|
}
|
|
1048
1126
|
}
|
|
1049
1127
|
if (data.versions !== undefined) {
|
|
1050
|
-
let
|
|
1051
|
-
if (Array.isArray(
|
|
1052
|
-
if (
|
|
1053
|
-
const
|
|
1128
|
+
let data11 = data.versions;
|
|
1129
|
+
if (Array.isArray(data11)) {
|
|
1130
|
+
if (data11.length < 1) {
|
|
1131
|
+
const err36 = { instancePath: instancePath + "/versions", schemaPath: "#/properties/versions/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
|
|
1054
1132
|
if (vErrors === null) {
|
|
1055
|
-
vErrors = [
|
|
1133
|
+
vErrors = [err36];
|
|
1056
1134
|
} else {
|
|
1057
|
-
vErrors.push(
|
|
1135
|
+
vErrors.push(err36);
|
|
1058
1136
|
}
|
|
1059
1137
|
errors++;
|
|
1060
1138
|
}
|
|
1061
|
-
const
|
|
1062
|
-
for (let
|
|
1063
|
-
if (!validate22(
|
|
1139
|
+
const len2 = data11.length;
|
|
1140
|
+
for (let i3 = 0;i3 < len2; i3++) {
|
|
1141
|
+
if (!validate22(data11[i3], { instancePath: instancePath + "/versions/" + i3, parentData: data11, parentDataProperty: i3, rootData, dynamicAnchors })) {
|
|
1064
1142
|
vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
|
|
1065
1143
|
errors = vErrors.length;
|
|
1066
1144
|
}
|
|
1067
1145
|
}
|
|
1068
1146
|
} else {
|
|
1069
|
-
const
|
|
1147
|
+
const err37 = { instancePath: instancePath + "/versions", schemaPath: "#/properties/versions/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
1070
1148
|
if (vErrors === null) {
|
|
1071
|
-
vErrors = [
|
|
1149
|
+
vErrors = [err37];
|
|
1072
1150
|
} else {
|
|
1073
|
-
vErrors.push(
|
|
1151
|
+
vErrors.push(err37);
|
|
1074
1152
|
}
|
|
1075
1153
|
errors++;
|
|
1076
1154
|
}
|
|
1077
1155
|
}
|
|
1078
1156
|
} else {
|
|
1079
|
-
const
|
|
1157
|
+
const err38 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
1080
1158
|
if (vErrors === null) {
|
|
1081
|
-
vErrors = [
|
|
1159
|
+
vErrors = [err38];
|
|
1082
1160
|
} else {
|
|
1083
|
-
vErrors.push(
|
|
1161
|
+
vErrors.push(err38);
|
|
1084
1162
|
}
|
|
1085
1163
|
errors++;
|
|
1086
1164
|
}
|
package/dist/href.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"href.d.ts","sourceRoot":"","sources":["../src/href.ts"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAWvE"}
|
package/dist/href.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const WEB_PROTOCOLS = ['http:', 'https:'];
|
|
2
|
+
export function webHref(value) {
|
|
3
|
+
if (typeof value !== 'string')
|
|
4
|
+
return null;
|
|
5
|
+
const raw = value.trim();
|
|
6
|
+
if (raw.length === 0)
|
|
7
|
+
return null;
|
|
8
|
+
try {
|
|
9
|
+
return WEB_PROTOCOLS.includes(new URL(raw).protocol) ? raw : null;
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=href.js.map
|
package/dist/href.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"href.js","sourceRoot":"","sources":["../src/href.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAE1C,MAAM,UAAU,OAAO,CAAC,KAAgC;IACtD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAE3C,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IACzB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAElC,IAAI,CAAC;QACH,OAAO,aAAa,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IACpE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
export type { AppEntry, AppExtension, AppVersion, Catalog, Download, InstallCount, RecommendedSource, Repo, SourceCatalog, } from './types.ts';
|
|
1
|
+
export type { AppEntry, AppExtension, AppVersion, Catalog, Download, InstallCount, RecommendedSource, Repo, SourceCatalog, StorePin, TrendingCount, } from './types.ts';
|
|
2
|
+
export { CATEGORIES, CATEGORY_LABELS, MAX_CATEGORIES, appCategories, isCategory, type Category } from './categories.ts';
|
|
2
3
|
export { CatalogValidationError, validate, validateInvariants, validateSchema } from './validate.ts';
|
|
3
4
|
export { EXTENSION_PERMISSION_PATTERN, EXTENSION_SOURCE_PATTERN, declaresExtension, describeExtensionPermission, describeExtensionPermissions, extensionOf, extensionRepoLabel, isExtensionPermission, } from './extension.ts';
|
|
4
5
|
export { releasedAtInstant, sortNewestFirst } from './versions.ts';
|
|
6
|
+
export { webHref } from './href.ts';
|
|
7
|
+
export { changelogText } from './changelog.ts';
|
|
5
8
|
export { SETTINGS_PAGE_MIME, aggregate, compareVersions, fillsSlot, isListedWebapp, listedWebapps, newestCompatible, offersApp, pinsFrom, recommendedSources, satisfies, settingsOrigin, settingsOriginFor, slotCandidates, updates, versionCompatible, type CatalogAppListing, type CatalogAppUpdate, type ExtensionOffering, type InstalledWebapp, type WebappSlotName, } from './resolve.ts';
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
9
|
+
export { reviewed, storeCatalog, type SourceTrust, type StoreCatalog, type StoreSource } from './store.ts';
|
|
10
|
+
export { SHELF_SIZE, SORT_LABELS, browse, featuredListing, filterLabel, firstReleasedAt, hasScreenshot, isLauncher, isOverlay, lastReleasedAt, listingKindLabel, matchesFilter, moreFromAuthor, queryTitle, search, storefront, type BrowseQuery, type CategoryCount, type Shelf, type ShelfId, type StoreFilter, type StoreKind, type StoreSort, type Storefront, } from './storefront.ts';
|
|
11
|
+
export { STORE_COPY, alsoAvailableLabel, failureLine, installsLabel, permissionLabel, sourceLine } from './copy.ts';
|
|
8
12
|
export { CATALOG_FETCH_TIMEOUT_MS, DIRECTORY_ORIGIN, DirectoryApiError, OFFICIAL_CATALOG_URL, SOURCE_DIRECTORY_URL, SOURCE_STATUSES, SourceUrlError, fetchCatalog, fetchMergedApps, fetchSources, installedBody, normalizeSourceUrl, parseSourceUrl, reportInstalled, submitSource, unwrapDirectory, type CatalogSnapshot, type DirectoryEntry, type InstalledApp, type InstalledReport, type MergedApps, type MergedCatalog, type SourceFailure, type SourceStatus, } from './sources.ts';
|
|
9
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,IAAI,EACJ,aAAa,GACd,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAErG,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,iBAAiB,EACjB,2BAA2B,EAC3B,4BAA4B,EAC5B,WAAW,EACX,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,eAAe,EACf,SAAS,EACT,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,aAAa,GACd,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAExH,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAErG,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,iBAAiB,EACjB,2BAA2B,EAC3B,4BAA4B,EAC5B,WAAW,EACX,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,eAAe,EACf,SAAS,EACT,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAE3G,OAAO,EACL,UAAU,EACV,WAAW,EACX,MAAM,EACN,eAAe,EACf,WAAW,EACX,eAAe,EACf,aAAa,EACb,UAAU,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,UAAU,EACV,MAAM,EACN,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,UAAU,GAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEpH,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
export { CATEGORIES, CATEGORY_LABELS, MAX_CATEGORIES, appCategories, isCategory } from "./categories.js";
|
|
1
2
|
export { CatalogValidationError, validate, validateInvariants, validateSchema } from "./validate.js";
|
|
2
3
|
export { EXTENSION_PERMISSION_PATTERN, EXTENSION_SOURCE_PATTERN, declaresExtension, describeExtensionPermission, describeExtensionPermissions, extensionOf, extensionRepoLabel, isExtensionPermission, } from "./extension.js";
|
|
3
4
|
export { releasedAtInstant, sortNewestFirst } from "./versions.js";
|
|
5
|
+
export { webHref } from "./href.js";
|
|
6
|
+
export { changelogText } from "./changelog.js";
|
|
4
7
|
export { SETTINGS_PAGE_MIME, aggregate, compareVersions, fillsSlot, isListedWebapp, listedWebapps, newestCompatible, offersApp, pinsFrom, recommendedSources, satisfies, settingsOrigin, settingsOriginFor, slotCandidates, updates, versionCompatible, } from "./resolve.js";
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
8
|
+
export { reviewed, storeCatalog } from "./store.js";
|
|
9
|
+
export { SHELF_SIZE, SORT_LABELS, browse, featuredListing, filterLabel, firstReleasedAt, hasScreenshot, isLauncher, isOverlay, lastReleasedAt, listingKindLabel, matchesFilter, moreFromAuthor, queryTitle, search, storefront, } from "./storefront.js";
|
|
10
|
+
export { STORE_COPY, alsoAvailableLabel, failureLine, installsLabel, permissionLabel, sourceLine } from "./copy.js";
|
|
7
11
|
export { CATALOG_FETCH_TIMEOUT_MS, DIRECTORY_ORIGIN, DirectoryApiError, OFFICIAL_CATALOG_URL, SOURCE_DIRECTORY_URL, SOURCE_STATUSES, SourceUrlError, fetchCatalog, fetchMergedApps, fetchSources, installedBody, normalizeSourceUrl, parseSourceUrl, reportInstalled, submitSource, unwrapDirectory, } from "./sources.js";
|
|
8
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAiB,MAAM,iBAAiB,CAAC;AAExH,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAErG,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,iBAAiB,EACjB,2BAA2B,EAC3B,4BAA4B,EAC5B,WAAW,EACX,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,eAAe,EACf,SAAS,EACT,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,iBAAiB,GAMlB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAyD,MAAM,YAAY,CAAC;AAE3G,OAAO,EACL,UAAU,EACV,WAAW,EACX,MAAM,EACN,eAAe,EACf,WAAW,EACX,eAAe,EACf,aAAa,EACb,UAAU,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,UAAU,EACV,MAAM,EACN,UAAU,GASX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEpH,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,YAAY,EACZ,eAAe,GAShB,MAAM,cAAc,CAAC"}
|
package/dist/resolve.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppEntry, AppVersion, Catalog, Download, InstallCount, RecommendedSource, SourceCatalog } from './types.ts';
|
|
1
|
+
import type { AppEntry, AppVersion, Catalog, Download, InstallCount, RecommendedSource, SourceCatalog, TrendingCount } from './types.ts';
|
|
2
2
|
export type ExtensionOffering = 'listed' | 'omitted';
|
|
3
3
|
export declare function offersApp(app: AppEntry, extensions: ExtensionOffering): boolean;
|
|
4
4
|
export type InstalledWebapp = {
|
|
@@ -16,6 +16,8 @@ export type CatalogAppListing = {
|
|
|
16
16
|
updateAvailable: boolean;
|
|
17
17
|
alsoAvailableFrom: string[];
|
|
18
18
|
installs: number;
|
|
19
|
+
trending: number;
|
|
20
|
+
official: boolean;
|
|
19
21
|
};
|
|
20
22
|
export type CatalogAppUpdate = {
|
|
21
23
|
appId: string;
|
|
@@ -51,6 +53,7 @@ export declare function aggregate(args: {
|
|
|
51
53
|
installed: InstalledWebapp[];
|
|
52
54
|
deviceLibVersion: string | null;
|
|
53
55
|
installs?: InstallCount[];
|
|
56
|
+
trending?: TrendingCount[];
|
|
54
57
|
extensions: ExtensionOffering;
|
|
55
58
|
}): CatalogAppListing[];
|
|
56
59
|
export declare function updates(args: {
|