@mossbear/protocol 0.1.0-alpha.102 → 0.1.0-alpha.104
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/datasets.d.ts +208 -2
- package/dist/datasets.d.ts.map +1 -1
- package/dist/datasets.js +161 -7
- package/dist/datasets.js.map +1 -1
- package/dist/datasets.test.js +1 -1
- package/dist/frameDocument.d.ts +9 -0
- package/dist/frameDocument.d.ts.map +1 -1
- package/dist/frameDocument.js +3 -0
- package/dist/frameDocument.js.map +1 -1
- package/dist/frameRuntime.d.ts +84 -0
- package/dist/frameRuntime.d.ts.map +1 -0
- package/dist/frameRuntime.js +141 -0
- package/dist/frameRuntime.js.map +1 -0
- package/dist/frameRuntime.test.d.ts +2 -0
- package/dist/frameRuntime.test.d.ts.map +1 -0
- package/dist/frameRuntime.test.js +165 -0
- package/dist/frameRuntime.test.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/photos.d.ts +6 -0
- package/dist/photos.d.ts.map +1 -1
- package/dist/photos.js +6 -0
- package/dist/photos.js.map +1 -1
- package/dist/schemas.d.ts +73 -7
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +61 -4
- package/dist/schemas.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The runtime a dashboard page runs against: the `mossbear` object the frame
|
|
3
|
+
* document defines before the page's own scripts, and the manifest a page
|
|
4
|
+
* declares to get it.
|
|
5
|
+
*
|
|
6
|
+
* A dashboard is an `html` artifact that declares a runtime version and the
|
|
7
|
+
* datasets it reads, as meta tags in its own bytes:
|
|
8
|
+
*
|
|
9
|
+
* <meta name="mossbear:runtime" content="1">
|
|
10
|
+
* <meta name="mossbear:datasets" content="usage.daily@1 sessions.daily@1">
|
|
11
|
+
*
|
|
12
|
+
* The manifest lives in the page rather than beside it, so the content stamp's
|
|
13
|
+
* hash covers it, a copy carries it, and an agent editing the page edits it
|
|
14
|
+
* with the code it describes.
|
|
15
|
+
*
|
|
16
|
+
* The page reads like this, and works the same with or without live data:
|
|
17
|
+
*
|
|
18
|
+
* const data = await mossbear.use('data')
|
|
19
|
+
* const usage = data?.get('usage.daily@1') ?? mossbear.sample('usage.daily@1')
|
|
20
|
+
*
|
|
21
|
+
* `use('data')` resolves to a reader only when the host delivered live data,
|
|
22
|
+
* which it does for code the viewer wrote or Mossbear published; otherwise it
|
|
23
|
+
* resolves `null`. `get` answers `null` for a name the page did not declare
|
|
24
|
+
* or whose read failed. `sample` answers every declared dataset's published
|
|
25
|
+
* sample, always. Saying on the page that the numbers are samples is the
|
|
26
|
+
* host's job, not the template's, so no template can forget it.
|
|
27
|
+
*
|
|
28
|
+
* The data is part of the document, not a later message: the frame relay
|
|
29
|
+
* mounts a fresh frame for each `render`, so data written into the document
|
|
30
|
+
* that `render` carries cannot reach any document but the one it was gated for.
|
|
31
|
+
*/
|
|
32
|
+
import { type DatasetId, type DatasetPayload } from './datasets.js';
|
|
33
|
+
/** The runtime versions this build serves. A page pinned to another gets none. */
|
|
34
|
+
export declare const FRAME_RUNTIME_VERSIONS: readonly [1];
|
|
35
|
+
export type FrameRuntimeVersion = (typeof FRAME_RUNTIME_VERSIONS)[number];
|
|
36
|
+
/** The most datasets one page may declare; past it the rest are ignored. */
|
|
37
|
+
export declare const FRAME_MAX_DATASETS = 8;
|
|
38
|
+
/** What a page declares about itself. */
|
|
39
|
+
export type FrameManifest = {
|
|
40
|
+
/**
|
|
41
|
+
* The runtime version the page pins: a number when it declares one it can
|
|
42
|
+
* be read as, `null` when it declares none. A version not in
|
|
43
|
+
* {@link FRAME_RUNTIME_VERSIONS} is still reported, so the host can say why
|
|
44
|
+
* the page gets no runtime.
|
|
45
|
+
*/
|
|
46
|
+
runtime: number | null;
|
|
47
|
+
/** Declared datasets this build knows, in declaration order, without repeats. */
|
|
48
|
+
datasets: DatasetId[];
|
|
49
|
+
/** Declared names this build does not know, so the host can name them. */
|
|
50
|
+
unknown: string[];
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Read a page's manifest from its meta tags. Pure, and safe on any input: what
|
|
54
|
+
* it returns only ever selects among datasets this build defines, so a page
|
|
55
|
+
* that misdeclares itself can at most ask for less. It reads the start of the
|
|
56
|
+
* page, where a head belongs, and caps how much of a tag it reads and how
|
|
57
|
+
* many names it keeps, so a page cannot make it slow.
|
|
58
|
+
*/
|
|
59
|
+
export declare function readFrameManifest(html: string): FrameManifest;
|
|
60
|
+
/** Whether this build serves the runtime a manifest pins. */
|
|
61
|
+
export declare function servesFrameRuntime(manifest: Pick<FrameManifest, 'runtime'>): manifest is {
|
|
62
|
+
runtime: FrameRuntimeVersion;
|
|
63
|
+
};
|
|
64
|
+
/** What the host hands the document for one render. */
|
|
65
|
+
export type FrameRuntimeData = {
|
|
66
|
+
/** The active UI locale, which a template formats numbers and dates in. */
|
|
67
|
+
locale?: string | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* The live payloads, by dataset, when the gate let this page hold the
|
|
70
|
+
* viewer's data; `null` when it did not. A declared dataset missing here
|
|
71
|
+
* (its read failed) reads as `null`, and the template draws its sample.
|
|
72
|
+
*/
|
|
73
|
+
live: Partial<{
|
|
74
|
+
[Id in DatasetId]: DatasetPayload<Id>;
|
|
75
|
+
}> | null;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* The script that defines `window.mossbear` for a page whose runtime this build
|
|
79
|
+
* serves, or null for any other page. ES5 for the same reason as the shell.
|
|
80
|
+
* Only declared datasets go in, live or sample; every read hands back a copy,
|
|
81
|
+
* so one part of a page cannot change what another reads.
|
|
82
|
+
*/
|
|
83
|
+
export declare function frameRuntimeScript(manifest: FrameManifest, data: FrameRuntimeData | undefined): string | null;
|
|
84
|
+
//# sourceMappingURL=frameRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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f"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The runtime a dashboard page runs against: the `mossbear` object the frame
|
|
3
|
+
* document defines before the page's own scripts, and the manifest a page
|
|
4
|
+
* declares to get it.
|
|
5
|
+
*
|
|
6
|
+
* A dashboard is an `html` artifact that declares a runtime version and the
|
|
7
|
+
* datasets it reads, as meta tags in its own bytes:
|
|
8
|
+
*
|
|
9
|
+
* <meta name="mossbear:runtime" content="1">
|
|
10
|
+
* <meta name="mossbear:datasets" content="usage.daily@1 sessions.daily@1">
|
|
11
|
+
*
|
|
12
|
+
* The manifest lives in the page rather than beside it, so the content stamp's
|
|
13
|
+
* hash covers it, a copy carries it, and an agent editing the page edits it
|
|
14
|
+
* with the code it describes.
|
|
15
|
+
*
|
|
16
|
+
* The page reads like this, and works the same with or without live data:
|
|
17
|
+
*
|
|
18
|
+
* const data = await mossbear.use('data')
|
|
19
|
+
* const usage = data?.get('usage.daily@1') ?? mossbear.sample('usage.daily@1')
|
|
20
|
+
*
|
|
21
|
+
* `use('data')` resolves to a reader only when the host delivered live data,
|
|
22
|
+
* which it does for code the viewer wrote or Mossbear published; otherwise it
|
|
23
|
+
* resolves `null`. `get` answers `null` for a name the page did not declare
|
|
24
|
+
* or whose read failed. `sample` answers every declared dataset's published
|
|
25
|
+
* sample, always. Saying on the page that the numbers are samples is the
|
|
26
|
+
* host's job, not the template's, so no template can forget it.
|
|
27
|
+
*
|
|
28
|
+
* The data is part of the document, not a later message: the frame relay
|
|
29
|
+
* mounts a fresh frame for each `render`, so data written into the document
|
|
30
|
+
* that `render` carries cannot reach any document but the one it was gated for.
|
|
31
|
+
*/
|
|
32
|
+
import { DATASET_SAMPLES, parseDatasetId, } from './datasets.js';
|
|
33
|
+
/** The runtime versions this build serves. A page pinned to another gets none. */
|
|
34
|
+
export const FRAME_RUNTIME_VERSIONS = [1];
|
|
35
|
+
/** The most datasets one page may declare; past it the rest are ignored. */
|
|
36
|
+
export const FRAME_MAX_DATASETS = 8;
|
|
37
|
+
/** The most of a page the manifest is looked for in, and of one tag's value read. */
|
|
38
|
+
const MANIFEST_SCAN_CHARS = 64 * 1024;
|
|
39
|
+
const MANIFEST_VALUE_CHARS = 2 * 1024;
|
|
40
|
+
/** A dataset name past this is not one, and is cut short wherever it is shown. */
|
|
41
|
+
const MAX_NAME_CHARS = 100;
|
|
42
|
+
/**
|
|
43
|
+
* Markup that only looks like a tag: comments, and the contents of elements
|
|
44
|
+
* whose text is not markup. A `<meta>` written in a script string or a
|
|
45
|
+
* comment is not the page declaring itself.
|
|
46
|
+
*/
|
|
47
|
+
const NOT_MARKUP = /<!--[\s\S]*?(?:-->|$)|<(script|style|template|textarea|title|noscript)\b[\s\S]*?(?:<\/\1\s*>|$)/gi;
|
|
48
|
+
const META_TAG = /<meta\b[^>]*>/gi;
|
|
49
|
+
const ATTRIBUTE = /([^\s"'=<>`/]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g;
|
|
50
|
+
/** The `content` of the first `<meta name="…">` with this name, or null. */
|
|
51
|
+
function metaContent(markup, name) {
|
|
52
|
+
for (const tag of markup.match(META_TAG) ?? []) {
|
|
53
|
+
const attributes = new Map();
|
|
54
|
+
for (const match of tag.matchAll(ATTRIBUTE)) {
|
|
55
|
+
const key = match[1].toLowerCase();
|
|
56
|
+
if (!attributes.has(key))
|
|
57
|
+
attributes.set(key, match[2] ?? match[3] ?? match[4] ?? '');
|
|
58
|
+
}
|
|
59
|
+
if (attributes.get('name')?.trim().toLowerCase() === name) {
|
|
60
|
+
return (attributes.get('content') ?? '').slice(0, MANIFEST_VALUE_CHARS);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Read a page's manifest from its meta tags. Pure, and safe on any input: what
|
|
67
|
+
* it returns only ever selects among datasets this build defines, so a page
|
|
68
|
+
* that misdeclares itself can at most ask for less. It reads the start of the
|
|
69
|
+
* page, where a head belongs, and caps how much of a tag it reads and how
|
|
70
|
+
* many names it keeps, so a page cannot make it slow.
|
|
71
|
+
*/
|
|
72
|
+
export function readFrameManifest(html) {
|
|
73
|
+
const markup = html.slice(0, MANIFEST_SCAN_CHARS).replace(NOT_MARKUP, '');
|
|
74
|
+
const runtimeRaw = metaContent(markup, 'mossbear:runtime')?.trim() ?? null;
|
|
75
|
+
const runtime = runtimeRaw !== null && /^\d{1,4}$/.test(runtimeRaw) ? Number(runtimeRaw) : null;
|
|
76
|
+
const names = (metaContent(markup, 'mossbear:datasets') ?? '')
|
|
77
|
+
.split(/[\s,]+/)
|
|
78
|
+
.filter((name) => name.length > 0);
|
|
79
|
+
const datasets = [];
|
|
80
|
+
const unknown = [];
|
|
81
|
+
for (const name of names) {
|
|
82
|
+
if (datasets.length + unknown.length >= FRAME_MAX_DATASETS)
|
|
83
|
+
break;
|
|
84
|
+
const id = parseDatasetId(name);
|
|
85
|
+
const shown = name.slice(0, MAX_NAME_CHARS);
|
|
86
|
+
if (id) {
|
|
87
|
+
if (!datasets.includes(id))
|
|
88
|
+
datasets.push(id);
|
|
89
|
+
}
|
|
90
|
+
else if (!unknown.includes(shown)) {
|
|
91
|
+
unknown.push(shown);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return { runtime, datasets, unknown };
|
|
95
|
+
}
|
|
96
|
+
/** Whether this build serves the runtime a manifest pins. */
|
|
97
|
+
export function servesFrameRuntime(manifest) {
|
|
98
|
+
return FRAME_RUNTIME_VERSIONS.includes(manifest.runtime);
|
|
99
|
+
}
|
|
100
|
+
/** JSON that is safe inside a `<script>`: no `<`, and no line separators. */
|
|
101
|
+
function scriptJson(value) {
|
|
102
|
+
return JSON.stringify(value)
|
|
103
|
+
.replace(/</g, '\\u003c')
|
|
104
|
+
.replace(/\u2028/g, '\\u2028')
|
|
105
|
+
.replace(/\u2029/g, '\\u2029');
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The script that defines `window.mossbear` for a page whose runtime this build
|
|
109
|
+
* serves, or null for any other page. ES5 for the same reason as the shell.
|
|
110
|
+
* Only declared datasets go in, live or sample; every read hands back a copy,
|
|
111
|
+
* so one part of a page cannot change what another reads.
|
|
112
|
+
*/
|
|
113
|
+
export function frameRuntimeScript(manifest, data) {
|
|
114
|
+
if (!servesFrameRuntime(manifest))
|
|
115
|
+
return null;
|
|
116
|
+
const samples = {};
|
|
117
|
+
const live = data?.live ? {} : null;
|
|
118
|
+
for (const id of manifest.datasets) {
|
|
119
|
+
samples[id] = DATASET_SAMPLES[id];
|
|
120
|
+
const payload = data?.live?.[id];
|
|
121
|
+
if (live && payload)
|
|
122
|
+
live[id] = payload;
|
|
123
|
+
}
|
|
124
|
+
const state = {
|
|
125
|
+
runtime: manifest.runtime,
|
|
126
|
+
locale: data?.locale ?? null,
|
|
127
|
+
samples,
|
|
128
|
+
live,
|
|
129
|
+
};
|
|
130
|
+
return `(function(){
|
|
131
|
+
var M=${scriptJson(state)};
|
|
132
|
+
function own(o,k){return o!==null&&Object.prototype.hasOwnProperty.call(o,k)}
|
|
133
|
+
function copy(x){return x==null?null:JSON.parse(JSON.stringify(x))}
|
|
134
|
+
var reader=M.live===null?null:Object.freeze({get:function(n){return own(M.live,n)?copy(M.live[n]):null}});
|
|
135
|
+
var api=Object.freeze({runtime:M.runtime,locale:M.locale,
|
|
136
|
+
use:function(c){return Promise.resolve(c==='data'?reader:null)},
|
|
137
|
+
sample:function(n){return own(M.samples,n)?copy(M.samples[n]):null}});
|
|
138
|
+
try{Object.defineProperty(window,'mossbear',{value:api,configurable:false,writable:false})}catch(e){}
|
|
139
|
+
})();`;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=frameRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frameRuntime.js","sourceRoot":"","sources":["../src/frameRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,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AC,OAAO;QACzB,MAAM,EAAE,IAAI,EAAE,MAAM,IAAI,IAAI;QAC5B,OAAO;QACP,IAAI;KACL,CAAA;IACD,OAAO;QACD,UAAU,CAAC,KAAK,CAAC;;;;;;;;MAQnB,CAAA;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frameRuntime.test.d.ts","sourceRoot":"","sources":["../src/frameRuntime.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { runInNewContext } from 'node:vm';
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
import { DATASET_SAMPLES } from './datasets.js';
|
|
4
|
+
import { buildFrameDocument } from './frameDocument.js';
|
|
5
|
+
import { FRAME_MAX_DATASETS, frameRuntimeScript, readFrameManifest, } from './frameRuntime.js';
|
|
6
|
+
const MANIFEST = '<meta name="mossbear:runtime" content="1">' +
|
|
7
|
+
'<meta name="mossbear:datasets" content="usage.daily@1 sessions.daily@1">';
|
|
8
|
+
/** Run the runtime script for `html` in a bare window, and return `mossbear`. */
|
|
9
|
+
function run(html, data) {
|
|
10
|
+
const script = frameRuntimeScript(readFrameManifest(html), data);
|
|
11
|
+
if (script === null)
|
|
12
|
+
return undefined;
|
|
13
|
+
const frame = { Promise, JSON, Object };
|
|
14
|
+
frame['window'] = frame;
|
|
15
|
+
runInNewContext(script, frame);
|
|
16
|
+
return frame['mossbear'];
|
|
17
|
+
}
|
|
18
|
+
const live = {
|
|
19
|
+
'usage.daily@1': { ...DATASET_SAMPLES['usage.daily@1'], timeZone: 'Europe/Paris' },
|
|
20
|
+
};
|
|
21
|
+
describe('readFrameManifest', () => {
|
|
22
|
+
it('reads the runtime and the datasets a page declares, in order', () => {
|
|
23
|
+
expect(readFrameManifest(MANIFEST)).toEqual({
|
|
24
|
+
runtime: 1,
|
|
25
|
+
datasets: ['usage.daily@1', 'sessions.daily@1'],
|
|
26
|
+
unknown: [],
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
it('reads either quote, any case and any attribute order, and the first tag only', () => {
|
|
30
|
+
const html = "<META CONTENT='usage.byModel@1, usage.byModel@1' NAME='Mossbear:Datasets'>" +
|
|
31
|
+
'<meta content="2" name="mossbear:runtime">' +
|
|
32
|
+
'<meta name="mossbear:datasets" content="usage.daily@1">';
|
|
33
|
+
expect(readFrameManifest(html)).toEqual({
|
|
34
|
+
runtime: 2,
|
|
35
|
+
datasets: ['usage.byModel@1'],
|
|
36
|
+
unknown: [],
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
it('names what it does not know, and refuses a bare name like an unknown one', () => {
|
|
40
|
+
const html = '<meta name="mossbear:datasets" content="usage.daily usage.everything@1">';
|
|
41
|
+
expect(readFrameManifest(html)).toEqual({
|
|
42
|
+
runtime: null,
|
|
43
|
+
datasets: [],
|
|
44
|
+
unknown: ['usage.daily', 'usage.everything@1'],
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
it('reads no runtime from a value that is not a plain number', () => {
|
|
48
|
+
for (const content of ['', 'one', '1.0', '-1', '1; data']) {
|
|
49
|
+
const html = `<meta name="mossbear:runtime" content="${content}">`;
|
|
50
|
+
expect(readFrameManifest(html).runtime).toBeNull();
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
it('caps how many names one page can declare', () => {
|
|
54
|
+
const names = Array.from({ length: FRAME_MAX_DATASETS + 4 }, (_, i) => `x${i}@1`);
|
|
55
|
+
const html = `<meta name="mossbear:datasets" content="${names.join(' ')}">`;
|
|
56
|
+
expect(readFrameManifest(html).unknown).toHaveLength(FRAME_MAX_DATASETS);
|
|
57
|
+
});
|
|
58
|
+
it('reads no manifest written in a script, a comment or a template', () => {
|
|
59
|
+
const html = '<script>var t = \'<meta name="mossbear:runtime" content="1">\'</script>' +
|
|
60
|
+
'<!-- <meta name="mossbear:datasets" content="usage.daily@1"> -->' +
|
|
61
|
+
'<template><meta name="mossbear:datasets" content="usage.daily@1"></template>';
|
|
62
|
+
expect(readFrameManifest(html)).toEqual({ runtime: null, datasets: [], unknown: [] });
|
|
63
|
+
});
|
|
64
|
+
it('reads a huge value only so far, and repeated names once', () => {
|
|
65
|
+
const html = '<meta name="mossbear:runtime" content="1">' +
|
|
66
|
+
`<meta name="mossbear:datasets" content="usage.daily@1 usage.daily@1 ${'x'.repeat(30_000)} ${'y'.repeat(150)}a ${'y'.repeat(150)}b">`;
|
|
67
|
+
const manifest = readFrameManifest(html);
|
|
68
|
+
expect(manifest.runtime).toBe(1);
|
|
69
|
+
expect(manifest.datasets).toEqual(['usage.daily@1']);
|
|
70
|
+
// The tail past the value cap is never read; what is read is cut short.
|
|
71
|
+
// (A tag that runs past where the manifest is looked for is not read at all.)
|
|
72
|
+
expect(manifest.unknown).toEqual(['x'.repeat(100)]);
|
|
73
|
+
});
|
|
74
|
+
it('names two long unknown names once when they share their first characters', () => {
|
|
75
|
+
const long = 'y'.repeat(150);
|
|
76
|
+
const html = `<meta name="mossbear:datasets" content="${long}a ${long}b">`;
|
|
77
|
+
expect(readFrameManifest(html).unknown).toEqual(['y'.repeat(100)]);
|
|
78
|
+
});
|
|
79
|
+
it('declares nothing for a page with no manifest', () => {
|
|
80
|
+
expect(readFrameManifest('<h1>Prototype</h1>')).toEqual({
|
|
81
|
+
runtime: null,
|
|
82
|
+
datasets: [],
|
|
83
|
+
unknown: [],
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
describe('frameRuntimeScript', () => {
|
|
88
|
+
it('gives a page that pins no runtime, or one this build does not serve, nothing', () => {
|
|
89
|
+
expect(run('<meta name="mossbear:datasets" content="usage.daily@1">')).toBeUndefined();
|
|
90
|
+
expect(run('<meta name="mossbear:runtime" content="2">')).toBeUndefined();
|
|
91
|
+
});
|
|
92
|
+
it('without live data, resolves use("data") to null and serves every declared sample', async () => {
|
|
93
|
+
const api = run(MANIFEST);
|
|
94
|
+
expect(api.runtime).toBe(1);
|
|
95
|
+
expect(await api.use('data')).toBeNull();
|
|
96
|
+
expect(api.sample('usage.daily@1')).toEqual(DATASET_SAMPLES['usage.daily@1']);
|
|
97
|
+
expect(api.sample('sessions.daily@1')).toEqual(DATASET_SAMPLES['sessions.daily@1']);
|
|
98
|
+
// Not declared, so not in the document at all.
|
|
99
|
+
expect(api.sample('usage.byModel@1')).toBeNull();
|
|
100
|
+
});
|
|
101
|
+
it('with live data, reads only declared datasets, and null for a failed read', async () => {
|
|
102
|
+
const api = run(MANIFEST, {
|
|
103
|
+
locale: 'fr',
|
|
104
|
+
live: { ...live, 'usage.byModel@1': DATASET_SAMPLES['usage.byModel@1'] },
|
|
105
|
+
});
|
|
106
|
+
expect(api.locale).toBe('fr');
|
|
107
|
+
const reader = (await api.use('data'));
|
|
108
|
+
expect(reader.get('usage.daily@1')).toEqual(live['usage.daily@1']);
|
|
109
|
+
expect(reader.get('sessions.daily@1')).toBeNull();
|
|
110
|
+
expect(reader.get('usage.byModel@1')).toBeNull();
|
|
111
|
+
expect(reader.get('__proto__')).toBeNull();
|
|
112
|
+
expect(await api.use('anything-else')).toBeNull();
|
|
113
|
+
});
|
|
114
|
+
it('hands every read its own copy', async () => {
|
|
115
|
+
const api = run(MANIFEST, { live });
|
|
116
|
+
const reader = (await api.use('data'));
|
|
117
|
+
reader.get('usage.daily@1').data.days.length = 0;
|
|
118
|
+
expect(reader.get('usage.daily@1')).toEqual(live['usage.daily@1']);
|
|
119
|
+
api.sample('usage.daily@1').data.days.length = 0;
|
|
120
|
+
expect(api.sample('usage.daily@1')).toEqual(DATASET_SAMPLES['usage.daily@1']);
|
|
121
|
+
});
|
|
122
|
+
it('keeps live data from closing its script element or opening a comment', async () => {
|
|
123
|
+
const breakouts = [
|
|
124
|
+
'</script><script>window.pwned=1</script>',
|
|
125
|
+
'</SCRIPT ><script>window.pwned=1</script>',
|
|
126
|
+
'<!--<script>',
|
|
127
|
+
'line\u2028separator\u2029paragraph',
|
|
128
|
+
];
|
|
129
|
+
for (const model of breakouts) {
|
|
130
|
+
const payload = {
|
|
131
|
+
...DATASET_SAMPLES['usage.byModel@1'],
|
|
132
|
+
data: {
|
|
133
|
+
models: [{ ...DATASET_SAMPLES['usage.byModel@1'].data.models[0], model }],
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
const html = MANIFEST.replace('usage.daily@1 ', 'usage.byModel@1 ');
|
|
137
|
+
const doc = buildFrameDocument(html, {
|
|
138
|
+
theme: 'light',
|
|
139
|
+
data: { live: { 'usage.byModel@1': payload } },
|
|
140
|
+
});
|
|
141
|
+
const head = doc.slice(0, doc.indexOf('<body>'));
|
|
142
|
+
expect(head).not.toMatch(/<\/script\s*>\s*<script>window\.pwned/i);
|
|
143
|
+
expect(head).not.toContain('<!--');
|
|
144
|
+
expect(head).not.toMatch(/[\u2028\u2029]/);
|
|
145
|
+
// And the page still reads the model name exactly as stored.
|
|
146
|
+
const api = run(html, { live: { 'usage.byModel@1': payload } });
|
|
147
|
+
const reader = (await api.use('data'));
|
|
148
|
+
const read = reader.get('usage.byModel@1');
|
|
149
|
+
expect(read.data.models[0].model).toBe(model);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
describe('buildFrameDocument with a runtime', () => {
|
|
154
|
+
it('defines the runtime after the shell and before the page', () => {
|
|
155
|
+
const doc = buildFrameDocument(MANIFEST, { theme: 'light' });
|
|
156
|
+
const runtimeAt = doc.indexOf("Object.defineProperty(window,'mossbear'");
|
|
157
|
+
expect(runtimeAt).toBeGreaterThan(doc.indexOf('localStorage'));
|
|
158
|
+
expect(runtimeAt).toBeLessThan(doc.indexOf('<body>'));
|
|
159
|
+
});
|
|
160
|
+
it('leaves a page that is not a dashboard as it was', () => {
|
|
161
|
+
const page = '<h1>Prototype</h1>';
|
|
162
|
+
expect(buildFrameDocument(page, { theme: 'light', data: { live } })).not.toContain("Object.defineProperty(window,'mossbear'");
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
//# sourceMappingURL=frameRuntime.test.js.map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AAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,IAAI,GAAG,oBAAoB,CAAA;QACjC,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAChF,yCAAyC,CAC1C,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './commentAnchor.js';
|
|
|
11
11
|
export * from './contextKinds.js';
|
|
12
12
|
export * from './datasets.js';
|
|
13
13
|
export * from './frameDocument.js';
|
|
14
|
+
export * from './frameRuntime.js';
|
|
14
15
|
export * from './frameProtocol.js';
|
|
15
16
|
export * from './markdownSections.js';
|
|
16
17
|
export * from './pairing.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export * from './commentAnchor.js';
|
|
|
11
11
|
export * from './contextKinds.js';
|
|
12
12
|
export * from './datasets.js';
|
|
13
13
|
export * from './frameDocument.js';
|
|
14
|
+
export * from './frameRuntime.js';
|
|
14
15
|
export * from './frameProtocol.js';
|
|
15
16
|
export * from './markdownSections.js';
|
|
16
17
|
export * from './pairing.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
|
package/dist/photos.d.ts
CHANGED
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
* checks their bytes and refuses one that does. An item never substitutes the
|
|
10
10
|
* original for a missing variant, which is why all three parts are required.
|
|
11
11
|
*
|
|
12
|
+
* An optimized upload keeps the full-size file on the device: it declares the
|
|
13
|
+
* display copy's bytes as the original as well (same hash, size and media) and
|
|
14
|
+
* sends them once, as the display part. The server stores one blob for both
|
|
15
|
+
* roles, so every reader of the original gets the display copy, and the item's
|
|
16
|
+
* original reads the size that was actually uploaded.
|
|
17
|
+
*
|
|
12
18
|
* Imports nothing but valibot, so `schemas.ts` can depend on it without a
|
|
13
19
|
* cycle.
|
|
14
20
|
*/
|
package/dist/photos.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"photos.d.ts","sourceRoot":"","sources":["../src/photos.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"photos.d.ts","sourceRoot":"","sources":["../src/photos.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,WAAW,2CAA4C,CAAA;AACpE,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AACpD,eAAO,MAAM,eAAe,wEAA0B,CAAA;AAEtD,2FAA2F;AAC3F,eAAO,MAAM,iBAAiB,6FAOpB,CAAA;AACV,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE/D,wEAAwE;AACxE,eAAO,MAAM,yBAAyB,oDAI5B,CAAA;AAEV,KAAK,SAAS,GAAG;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,SAAS,cAAc,EAAE,CAAA;IACrC,uCAAuC;IACvC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAID;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,CAmB1D,CAAA;AAID,iFAAiF;AACjF,eAAO,MAAM,oBAAoB;;;;;;aAM/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,mFAAmF;AACnF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,GAAG,IAAI,CAWzE;AAED,iFAAiF;AACjF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;kCAMjC,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAUxC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAExF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;IAEzC,yFAAyF;;aAEzF,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAE1F;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;aAE3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE/D;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;;;;;aAQrC,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAA"}
|
package/dist/photos.js
CHANGED
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
* checks their bytes and refuses one that does. An item never substitutes the
|
|
10
10
|
* original for a missing variant, which is why all three parts are required.
|
|
11
11
|
*
|
|
12
|
+
* An optimized upload keeps the full-size file on the device: it declares the
|
|
13
|
+
* display copy's bytes as the original as well (same hash, size and media) and
|
|
14
|
+
* sends them once, as the display part. The server stores one blob for both
|
|
15
|
+
* roles, so every reader of the original gets the display copy, and the item's
|
|
16
|
+
* original reads the size that was actually uploaded.
|
|
17
|
+
*
|
|
12
18
|
* Imports nothing but valibot, so `schemas.ts` can depend on it without a
|
|
13
19
|
* cycle.
|
|
14
20
|
*/
|
package/dist/photos.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"photos.js","sourceRoot":"","sources":["../src/photos.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"photos.js","sourceRoot":"","sources":["../src/photos.ts"],"names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