tinfoil 0.1.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.
@@ -0,0 +1,49 @@
1
+ export interface DeviceInfo {
2
+ labels: string[];
3
+ }
4
+ export interface BrowserInfo {
5
+ labels: string[];
6
+ }
7
+ export interface OsInfo {
8
+ labels: string[];
9
+ }
10
+ export interface SessionInfo {
11
+ sessionInterval: number;
12
+ }
13
+ export interface CountryInfo {
14
+ countryIndex: number;
15
+ }
16
+ export interface VdafConfig {
17
+ sumBitLength?: number | null;
18
+ numBuckets?: number | null;
19
+ proofChunkSize?: number | null;
20
+ }
21
+ export interface AggregationConfig {
22
+ taskId: string;
23
+ type: string;
24
+ timePrecision: number;
25
+ vdafConfig: VdafConfig;
26
+ }
27
+ export interface MetricConfig {
28
+ metricsInfo?: any;
29
+ aggregationConfig: AggregationConfig;
30
+ }
31
+ export interface GlobalConfig {
32
+ leaderUrl: string;
33
+ helperUrl: string;
34
+ metrics: {
35
+ os?: MetricConfig | null;
36
+ browser?: MetricConfig | null;
37
+ device?: MetricConfig | null;
38
+ session?: MetricConfig | null;
39
+ visit?: MetricConfig | null;
40
+ country?: MetricConfig | null;
41
+ [key: string]: MetricConfig | null | undefined;
42
+ };
43
+ }
44
+ export interface AnalyticsConfig {
45
+ domain: string;
46
+ configEndpoint?: string;
47
+ debug?: boolean;
48
+ }
49
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACvB,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,MAAM;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IACxB,eAAe,EAAE,MAAM,CAAC;CAC3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/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "tinfoil",
3
+ "version": "0.1.2",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "browser": "dist/browser.js",
7
+ "type": "module",
8
+ "license": "MIT",
9
+ "scripts": {
10
+ "build": "npm run clean && npm run build:lib && npm run build:browser",
11
+ "build:lib": "tsc",
12
+ "build:browser": "esbuild src/browser.ts --minify --bundle --sourcemap --outfile=dist/browser.js --tree-shaking=true --main-fields=main,browser",
13
+ "clean": "rimraf dist",
14
+ "test": "vitest",
15
+ "test:cover": "vitest run --coverage",
16
+ "test:e2e": "playwright test",
17
+ "test:e2e:ui": "playwright test --ui",
18
+ "lint": "eslint ./src ./tests",
19
+ "serve": "python3 -m http.server 8223"
20
+ },
21
+ "dependencies": {
22
+ "@divviup/common": "^0.2.2",
23
+ "@divviup/dap": "^0.9.0",
24
+ "@divviup/prio3": "^0.8.0",
25
+ "@divviup/vdaf": "^0.8.0",
26
+ "ua-parser-js": "^1.0.39"
27
+ },
28
+ "devDependencies": {
29
+ "@eslint/js": "^9.13.0",
30
+ "@playwright/test": "^1.48.2",
31
+ "@tsconfig/node20": "^20.1.4",
32
+ "@types/node": "^22.8.1",
33
+ "@types/ua-parser-js": "^0.7.39",
34
+ "@vitest/coverage-v8": "^2.1.4",
35
+ "@vitest/ui": "^2.1.4",
36
+ "esbuild": "^0.24.0",
37
+ "eslint": "^9.13.0",
38
+ "globals": "^15.11.0",
39
+ "rimraf": "^5.0.0",
40
+ "ts-node": "^10.9.2",
41
+ "typescript": "^5.2.2",
42
+ "typescript-eslint": "^8.11.0",
43
+ "vitest": "^2.1.4"
44
+ },
45
+ "directories": {
46
+ "test": "tests"
47
+ }
48
+ }