@teable/app 7.0.8 → 7.0.10
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/build/cli.js +2 -2
- package/dist/build/index.js +2 -2
- package/dist/chunks/{TKDXT3ZT.js → GFYV4PFY.js} +1 -1
- package/dist/chunks/{ZQI6BF6U.js → IECAZUW6.js} +1 -1
- package/dist/chunks/{QMKFUKJ4.js → NUNZDM2R.js} +1 -1
- package/dist/chunks/{2W5UWORA.js → OAU5HBAB.js} +2 -2
- package/dist/chunks/{4HDG5ILC.js → VBS7QVKG.js} +2 -0
- package/dist/client.js +2 -2
- package/dist/dev/host.js +1 -1
- package/dist/index.js +3 -3
- package/dist/protocol.d.ts +34 -0
- package/dist/protocol.js +3 -1
- package/dist/schema.js +2 -2
- package/dist/testing.js +4 -4
- package/dist/worker.js +2 -2
- package/package.json +2 -3
package/dist/build/cli.js
CHANGED
package/dist/build/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
describeTables
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./GFYV4PFY.js";
|
|
4
4
|
import {
|
|
5
5
|
CAPABILITIES,
|
|
6
6
|
PROTOCOL_VERSION,
|
|
7
7
|
admit,
|
|
8
8
|
isPageAccess
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./VBS7QVKG.js";
|
|
10
10
|
|
|
11
11
|
// src/server/errors.ts
|
|
12
12
|
import { z } from "zod";
|
|
@@ -296,6 +296,7 @@ var SITE_ICON_TYPES = [
|
|
|
296
296
|
"image/x-icon",
|
|
297
297
|
"image/vnd.microsoft.icon"
|
|
298
298
|
];
|
|
299
|
+
var VISIT_PERIODS = [7, 30];
|
|
299
300
|
var SECRET_NAME_PATTERN = "[A-Z][A-Z0-9_]{0,63}";
|
|
300
301
|
var SECRET_NAME = new RegExp(`^${SECRET_NAME_PATTERN}$`);
|
|
301
302
|
function secretPlaceholder(name) {
|
|
@@ -381,6 +382,7 @@ export {
|
|
|
381
382
|
BADGE_RULES,
|
|
382
383
|
SITE_LIMITS,
|
|
383
384
|
SITE_ICON_TYPES,
|
|
385
|
+
VISIT_PERIODS,
|
|
384
386
|
SECRET_NAME,
|
|
385
387
|
secretPlaceholder,
|
|
386
388
|
SECRET_PLACEHOLDER,
|
package/dist/client.js
CHANGED
package/dist/dev/host.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApp,
|
|
3
3
|
fail
|
|
4
|
-
} from "./chunks/
|
|
5
|
-
import "./chunks/
|
|
6
|
-
import "./chunks/
|
|
4
|
+
} from "./chunks/OAU5HBAB.js";
|
|
5
|
+
import "./chunks/GFYV4PFY.js";
|
|
6
|
+
import "./chunks/VBS7QVKG.js";
|
|
7
7
|
|
|
8
8
|
// src/index.ts
|
|
9
9
|
import { z } from "zod";
|
package/dist/protocol.d.ts
CHANGED
|
@@ -1011,6 +1011,40 @@ export interface AppUsage {
|
|
|
1011
1011
|
durationMs: number;
|
|
1012
1012
|
}[];
|
|
1013
1013
|
}
|
|
1014
|
+
/** The periods, in UTC days, that an app's visits are read for: today and the days before it. */
|
|
1015
|
+
export declare const VISIT_PERIODS: readonly [7, 30];
|
|
1016
|
+
export type VisitPeriod = (typeof VISIT_PERIODS)[number];
|
|
1017
|
+
/** How many visitors and page views something had: a day, a page, a source, a period. */
|
|
1018
|
+
export interface VisitCounts {
|
|
1019
|
+
/** People, each counted once a UTC day (ADR 0032). */
|
|
1020
|
+
visitors: number;
|
|
1021
|
+
/** Pages opened. */
|
|
1022
|
+
views: number;
|
|
1023
|
+
}
|
|
1024
|
+
/**
|
|
1025
|
+
* Who opened an app's live pages lately (ADR 0032), as
|
|
1026
|
+
* `GET {APPS_PATH}/:appId/visits?days=7|30` says it to its creators: the
|
|
1027
|
+
* period's UTC days from `from` to `to` (YYYY-MM-DD, both counted, today so
|
|
1028
|
+
* far the last), each with its visitors and page views, days without any
|
|
1029
|
+
* left out; the same totals for as many days just before (`before`); and
|
|
1030
|
+
* the period's most viewed pages and the sources most visitors came from,
|
|
1031
|
+
* ten at most, most first. A source is the host of the site a page was
|
|
1032
|
+
* opened from, "" for none: typed, a bookmark, an app.
|
|
1033
|
+
*/
|
|
1034
|
+
export interface AppVisits {
|
|
1035
|
+
from: string;
|
|
1036
|
+
to: string;
|
|
1037
|
+
days: ({
|
|
1038
|
+
day: string;
|
|
1039
|
+
} & VisitCounts)[];
|
|
1040
|
+
before: VisitCounts;
|
|
1041
|
+
pages: ({
|
|
1042
|
+
path: string;
|
|
1043
|
+
} & VisitCounts)[];
|
|
1044
|
+
sources: ({
|
|
1045
|
+
source: string;
|
|
1046
|
+
} & VisitCounts)[];
|
|
1047
|
+
}
|
|
1014
1048
|
/**
|
|
1015
1049
|
* A secret of an app (ADR 0015), as `GET {APPS_PATH}/:appId/secrets` lists
|
|
1016
1050
|
* them for its creators: by name, never by value. The app's code writes
|
package/dist/protocol.js
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
SITE_ICON_TYPES,
|
|
27
27
|
SITE_LIMITS,
|
|
28
28
|
SPACE_ROLES,
|
|
29
|
+
VISIT_PERIODS,
|
|
29
30
|
admit,
|
|
30
31
|
callableMethods,
|
|
31
32
|
checkAccess,
|
|
@@ -43,7 +44,7 @@ import {
|
|
|
43
44
|
secretPlaceholder,
|
|
44
45
|
signedInAsAsked,
|
|
45
46
|
spaceRoleOf
|
|
46
|
-
} from "./chunks/
|
|
47
|
+
} from "./chunks/VBS7QVKG.js";
|
|
47
48
|
export {
|
|
48
49
|
APPS_PATH,
|
|
49
50
|
APP_COMPATIBILITY_DATE,
|
|
@@ -72,6 +73,7 @@ export {
|
|
|
72
73
|
SITE_ICON_TYPES,
|
|
73
74
|
SITE_LIMITS,
|
|
74
75
|
SPACE_ROLES,
|
|
76
|
+
VISIT_PERIODS,
|
|
75
77
|
admit,
|
|
76
78
|
callableMethods,
|
|
77
79
|
checkAccess,
|
package/dist/schema.js
CHANGED
package/dist/testing.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
methodName
|
|
3
|
-
} from "./chunks/
|
|
4
|
-
import "./chunks/
|
|
3
|
+
} from "./chunks/OAU5HBAB.js";
|
|
4
|
+
import "./chunks/GFYV4PFY.js";
|
|
5
5
|
import {
|
|
6
6
|
MethodError
|
|
7
|
-
} from "./chunks/
|
|
7
|
+
} from "./chunks/IECAZUW6.js";
|
|
8
8
|
import {
|
|
9
9
|
ERROR_STATUS
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/VBS7QVKG.js";
|
|
11
11
|
|
|
12
12
|
// src/testing.ts
|
|
13
13
|
var OWNER = { kind: "user", userId: "test-owner", role: "owner", via: "api" };
|
package/dist/worker.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teable/app",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.10",
|
|
4
4
|
"description": "Write a Teable app as a Drizzle schema plus methods",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -54,8 +54,7 @@
|
|
|
54
54
|
"bun": ">=1.2"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
|
-
"access": "public"
|
|
58
|
-
"provenance": true
|
|
57
|
+
"access": "public"
|
|
59
58
|
},
|
|
60
59
|
"dependencies": {
|
|
61
60
|
"drizzle-orm": "0.45.4",
|