@teable/app 7.0.3 → 7.0.4
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/{UAHL536U.js → N6PYNICH.js} +9 -0
- package/dist/chunks/{C74GVJIJ.js → OXDV76VZ.js} +1 -1
- package/dist/chunks/{WVY4PINE.js → QHPLAVFD.js} +2 -2
- package/dist/chunks/{VUAUTXE2.js → QNWCYG6K.js} +1 -1
- package/dist/chunks/{WOZYDEVS.js → UDRXJPLD.js} +1 -1
- package/dist/client.js +2 -2
- package/dist/dev/host.js +1 -1
- package/dist/index.js +3 -3
- package/dist/protocol.d.ts +39 -0
- package/dist/protocol.js +5 -1
- package/dist/schema.js +2 -2
- package/dist/testing.js +4 -4
- package/dist/worker.js +2 -2
- package/package.json +1 -1
package/dist/build/cli.js
CHANGED
package/dist/build/index.js
CHANGED
|
@@ -271,6 +271,13 @@ function fileKeyPath(key) {
|
|
|
271
271
|
var DEPLOY_HEADERS = { commit: "X-Teable-Commit", message: "X-Teable-Message" };
|
|
272
272
|
var DEPLOY_PARTS = { server: "server", worker: "worker", pages: "pages" };
|
|
273
273
|
var PAGES_APP_META = "teable-app";
|
|
274
|
+
var DOMAIN_NAME = /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/;
|
|
275
|
+
function normalizeDomain(input) {
|
|
276
|
+
return input.trim().toLowerCase().replace(/^https?:\/\//, "").replace(/\/+$/, "").replace(/\.$/, "");
|
|
277
|
+
}
|
|
278
|
+
function isDomainName(domain) {
|
|
279
|
+
return domain.length <= 253 && DOMAIN_NAME.test(domain);
|
|
280
|
+
}
|
|
274
281
|
var BADGE_RULES = ["required", "optional", "off"];
|
|
275
282
|
var SITE_LIMITS = { title: 120, description: 500, iconBytes: 1024 * 1024 };
|
|
276
283
|
var SITE_ICON_TYPES = [
|
|
@@ -356,6 +363,8 @@ export {
|
|
|
356
363
|
DEPLOY_HEADERS,
|
|
357
364
|
DEPLOY_PARTS,
|
|
358
365
|
PAGES_APP_META,
|
|
366
|
+
normalizeDomain,
|
|
367
|
+
isDomainName,
|
|
359
368
|
BADGE_RULES,
|
|
360
369
|
SITE_LIMITS,
|
|
361
370
|
SITE_ICON_TYPES,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
describeTables
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./QNWCYG6K.js";
|
|
4
4
|
import {
|
|
5
5
|
CAPABILITIES,
|
|
6
6
|
PROTOCOL_VERSION,
|
|
7
7
|
admit,
|
|
8
8
|
isPageAccess
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./N6PYNICH.js";
|
|
10
10
|
|
|
11
11
|
// src/server/errors.ts
|
|
12
12
|
import { z } from "zod";
|
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/QHPLAVFD.js";
|
|
5
|
+
import "./chunks/QNWCYG6K.js";
|
|
6
|
+
import "./chunks/N6PYNICH.js";
|
|
7
7
|
|
|
8
8
|
// src/index.ts
|
|
9
9
|
import { z } from "zod";
|
package/dist/protocol.d.ts
CHANGED
|
@@ -751,6 +751,45 @@ export interface AppSubdomain {
|
|
|
751
751
|
/** `https://<subdomain>.teable.uk`, or its id's host; null when it has neither. */
|
|
752
752
|
url: string | null;
|
|
753
753
|
}
|
|
754
|
+
/**
|
|
755
|
+
* A DNS record people add at their DNS provider for an app's own domain
|
|
756
|
+
* (ADR 0024): its name within their zone (`@` for its root).
|
|
757
|
+
*/
|
|
758
|
+
export interface DomainRecord {
|
|
759
|
+
type: "CNAME";
|
|
760
|
+
name: string;
|
|
761
|
+
value: string;
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* A domain as people type it, as the runtime takes it for an app's own
|
|
765
|
+
* (ADR 0024), and as the old platform did: trimmed, in lower case, without
|
|
766
|
+
* scheme, trailing slashes or a trailing dot.
|
|
767
|
+
*/
|
|
768
|
+
export declare function normalizeDomain(input: string): string;
|
|
769
|
+
/** Whether `domain`, normalized, is a host name of two labels or more, 253 characters at most, ending in letters. */
|
|
770
|
+
export declare function isDomainName(domain: string): boolean;
|
|
771
|
+
/**
|
|
772
|
+
* An app's own domain (ADR 0024), as `{APPS_PATH}/:appId/domain` says it
|
|
773
|
+
* to its creators: the domain they bound, or null; `pending` until
|
|
774
|
+
* Cloudflare has validated it and issued its certificate, then `active`,
|
|
775
|
+
* while its pages are there; the record to add for it; and why it is not
|
|
776
|
+
* active yet, in Cloudflare's words. The space's plan decides whether the
|
|
777
|
+
* app may have one, and when a lapsed plan's domain is released.
|
|
778
|
+
*/
|
|
779
|
+
export interface AppDomain {
|
|
780
|
+
domain: string | null;
|
|
781
|
+
status: "pending" | "active" | null;
|
|
782
|
+
records: DomainRecord[];
|
|
783
|
+
problem: string | null;
|
|
784
|
+
/** When Cloudflare was last asked about it (epoch milliseconds); null before. */
|
|
785
|
+
checkedAt: number | null;
|
|
786
|
+
/** Whether the space's plan includes own domains (Business and above). */
|
|
787
|
+
allowed: boolean;
|
|
788
|
+
/** When the domain is released, the plan no longer including it (epoch milliseconds); null while it does. */
|
|
789
|
+
releasesAt: number | null;
|
|
790
|
+
/** Where its pages are now: the domain while it is active, else its subdomain or its id's host. */
|
|
791
|
+
url: string | null;
|
|
792
|
+
}
|
|
754
793
|
/**
|
|
755
794
|
* Whether an app's pages show the "Build with Teable" badge (ADR 0023), as
|
|
756
795
|
* the old platform decides from its space's plan: always (`required`),
|
package/dist/protocol.js
CHANGED
|
@@ -27,16 +27,18 @@ import {
|
|
|
27
27
|
checkAccess,
|
|
28
28
|
currencyDigits,
|
|
29
29
|
fileKeyPath,
|
|
30
|
+
isDomainName,
|
|
30
31
|
isExposed,
|
|
31
32
|
isMember,
|
|
32
33
|
isPageAccess,
|
|
34
|
+
normalizeDomain,
|
|
33
35
|
pagesBridge,
|
|
34
36
|
roleAsAsked,
|
|
35
37
|
rolesBelow,
|
|
36
38
|
secretPlaceholder,
|
|
37
39
|
signedInAsAsked,
|
|
38
40
|
spaceRoleOf
|
|
39
|
-
} from "./chunks/
|
|
41
|
+
} from "./chunks/N6PYNICH.js";
|
|
40
42
|
export {
|
|
41
43
|
APPS_PATH,
|
|
42
44
|
APP_COMPATIBILITY_DATE,
|
|
@@ -66,9 +68,11 @@ export {
|
|
|
66
68
|
checkAccess,
|
|
67
69
|
currencyDigits,
|
|
68
70
|
fileKeyPath,
|
|
71
|
+
isDomainName,
|
|
69
72
|
isExposed,
|
|
70
73
|
isMember,
|
|
71
74
|
isPageAccess,
|
|
75
|
+
normalizeDomain,
|
|
72
76
|
pagesBridge,
|
|
73
77
|
roleAsAsked,
|
|
74
78
|
rolesBelow,
|
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/QHPLAVFD.js";
|
|
4
|
+
import "./chunks/QNWCYG6K.js";
|
|
5
5
|
import {
|
|
6
6
|
MethodError
|
|
7
|
-
} from "./chunks/
|
|
7
|
+
} from "./chunks/OXDV76VZ.js";
|
|
8
8
|
import {
|
|
9
9
|
ERROR_STATUS
|
|
10
|
-
} from "./chunks/
|
|
10
|
+
} from "./chunks/N6PYNICH.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