@fluid-topics/public-api 1.0.57 → 1.0.58
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/build/cjs/helpers/GenAIChunkReader.js +66 -0
- package/build/cjs/index.js +43 -0
- package/build/cjs/types/ft-common/public.js +2 -1
- package/build/mjs/helpers/GenAIChunkReader.d.ts +15 -0
- package/build/mjs/helpers/GenAIChunkReader.js +37 -0
- package/build/mjs/index.d.ts +5 -0
- package/build/mjs/index.js +17 -0
- package/build/mjs/types/ft-common/public.d.ts +1 -0
- package/build/mjs/types/ft-common/public.js +2 -1
- package/build/rollup/fluidtopics.min.js +1 -1
- package/build/test-results/web-components.xml +12 -0
- package/dist/cjs/helpers/GenAIChunkReader.js +66 -0
- package/dist/cjs/index.js +43 -0
- package/dist/cjs/types/ft-common/public.js +2 -1
- package/dist/fluidtopics.min.js +1 -1
- package/dist/mjs/helpers/GenAIChunkReader.d.ts +15 -0
- package/dist/mjs/helpers/GenAIChunkReader.js +37 -0
- package/dist/mjs/index.d.ts +5 -0
- package/dist/mjs/index.js +17 -0
- package/dist/mjs/types/ft-common/public.d.ts +1 -0
- package/dist/mjs/types/ft-common/public.js +2 -1
- package/package.json +7 -2
- package/test-browser/helpers/GenAIChunkReader.test.ts +54 -0
- package/vite-plugin.mjs +95 -0
- package/web-test-runner.config.mjs +58 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {playwrightLauncher} from '@web/test-runner-playwright';
|
|
2
|
+
import {defaultReporter} from "@web/test-runner";
|
|
3
|
+
import {junitReporter} from "@web/test-runner-junit-reporter";
|
|
4
|
+
import {vitePlugin} from "./vite-plugin.mjs";
|
|
5
|
+
|
|
6
|
+
const ignoredLogs = [
|
|
7
|
+
"[vite] connecting...",
|
|
8
|
+
"[vite] connected.",
|
|
9
|
+
"Lit is in dev mode.",
|
|
10
|
+
"Multiple versions of Lit loaded.",
|
|
11
|
+
"Fluid Topics public API was not found.",
|
|
12
|
+
"scheduled an update (generally because a property was set) after an update completed",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
rootDir: '.',
|
|
17
|
+
files: ['./test-browser/**/*.test.ts'],
|
|
18
|
+
nodeResolve: true,
|
|
19
|
+
preserveSymlinks: true,
|
|
20
|
+
browsers: [
|
|
21
|
+
playwrightLauncher({product: 'chromium'}),
|
|
22
|
+
],
|
|
23
|
+
reporters: [
|
|
24
|
+
defaultReporter({reportTestResults: true, reportTestProgress: true}),
|
|
25
|
+
junitReporter({
|
|
26
|
+
outputPath: './build/test-results/web-components.xml',
|
|
27
|
+
reportLogs: true,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
plugins: [
|
|
31
|
+
vitePlugin({
|
|
32
|
+
optimizeDeps: {
|
|
33
|
+
disabled: true
|
|
34
|
+
}
|
|
35
|
+
}),
|
|
36
|
+
{
|
|
37
|
+
name: "cross-fetch-plugin",
|
|
38
|
+
async serve(context) {
|
|
39
|
+
if (context.path.includes("cross-fetch")) {
|
|
40
|
+
return `export default {}`;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
filterBrowserLogs: (log) => !(typeof log.args[0] === "string" && ignoredLogs.some(l => log.args[0].includes(l))),
|
|
46
|
+
testRunnerHtml: (testRunnerImport) => `
|
|
47
|
+
<html>
|
|
48
|
+
<body>
|
|
49
|
+
<script type="module">
|
|
50
|
+
window.process = { env: { NODE_ENV: 'test' } };
|
|
51
|
+
</script>
|
|
52
|
+
<script type="module">
|
|
53
|
+
import '${testRunnerImport}';
|
|
54
|
+
</script>
|
|
55
|
+
</body>
|
|
56
|
+
</html>
|
|
57
|
+
`,
|
|
58
|
+
};
|