@teable/app 7.0.7 → 7.0.9

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 CHANGED
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  buildServer,
4
4
  buildWorker
5
- } from "../chunks/H6R7E3GY.js";
6
- import "../chunks/ZYCZJSHS.js";
5
+ } from "../chunks/QMKFUKJ4.js";
6
+ import "../chunks/4HDG5ILC.js";
7
7
 
8
8
  // src/build/cli.ts
9
9
  import { mkdirSync, rmSync, writeFileSync } from "node:fs";
@@ -3,8 +3,8 @@ import {
3
3
  buildWorker,
4
4
  sqlAsText,
5
5
  teable
6
- } from "../chunks/H6R7E3GY.js";
7
- import "../chunks/ZYCZJSHS.js";
6
+ } from "../chunks/QMKFUKJ4.js";
7
+ import "../chunks/4HDG5ILC.js";
8
8
  export {
9
9
  buildServer,
10
10
  buildWorker,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  describeTables
3
- } from "./QMWZJWS3.js";
3
+ } from "./TKDXT3ZT.js";
4
4
  import {
5
5
  CAPABILITIES,
6
6
  PROTOCOL_VERSION,
7
7
  admit,
8
8
  isPageAccess
9
- } from "./ZYCZJSHS.js";
9
+ } from "./4HDG5ILC.js";
10
10
 
11
11
  // src/server/errors.ts
12
12
  import { z } from "zod";
@@ -263,6 +263,7 @@ var BRIDGE = String.raw`function (window, origins) {
263
263
  }`;
264
264
  var APPS_PATH = "/api/v4/apps";
265
265
  var FILE_NAME_HEADER = "X-File-Name";
266
+ var MAX_FILE_BYTES = 100 * 1024 * 1024;
266
267
  var PREVIEW_QUERY = "preview";
267
268
  function fileKeyPath(key) {
268
269
  const slash = key.indexOf("/");
@@ -365,6 +366,7 @@ export {
365
366
  pagesBridge,
366
367
  APPS_PATH,
367
368
  FILE_NAME_HEADER,
369
+ MAX_FILE_BYTES,
368
370
  PREVIEW_QUERY,
369
371
  fileKeyPath,
370
372
  DEPLOY_HEADERS,
@@ -10,7 +10,7 @@ import {
10
10
  isMember,
11
11
  pagesBridge,
12
12
  spaceRoleOf
13
- } from "./ZYCZJSHS.js";
13
+ } from "./4HDG5ILC.js";
14
14
 
15
15
  // src/build/index.ts
16
16
  import { existsSync, readFileSync } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_CURRENCY,
3
3
  currencyDigits
4
- } from "./ZYCZJSHS.js";
4
+ } from "./4HDG5ILC.js";
5
5
 
6
6
  // src/schema.ts
7
7
  import { getTableColumns, getTableName, is } from "drizzle-orm";
@@ -5,7 +5,7 @@ import {
5
5
  PREVIEW_QUERY,
6
6
  SESSION_PATH,
7
7
  fileKeyPath
8
- } from "./ZYCZJSHS.js";
8
+ } from "./4HDG5ILC.js";
9
9
 
10
10
  // src/client.ts
11
11
  var MethodError = class extends Error {
package/dist/client.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  MethodError,
3
3
  createClient
4
- } from "./chunks/55YHKIYV.js";
5
- import "./chunks/ZYCZJSHS.js";
4
+ } from "./chunks/ZQI6BF6U.js";
5
+ import "./chunks/4HDG5ILC.js";
6
6
  export {
7
7
  MethodError,
8
8
  createClient
package/dist/dev/host.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  callableMethods,
11
11
  checkAccess,
12
12
  isMember
13
- } from "../chunks/ZYCZJSHS.js";
13
+ } from "../chunks/4HDG5ILC.js";
14
14
 
15
15
  // src/dev/host.ts
16
16
  import { DurableObject, WorkerEntrypoint } from "cloudflare:workers";
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createApp,
3
3
  fail
4
- } from "./chunks/G4M5LS7T.js";
5
- import "./chunks/QMWZJWS3.js";
6
- import "./chunks/ZYCZJSHS.js";
4
+ } from "./chunks/2W5UWORA.js";
5
+ import "./chunks/TKDXT3ZT.js";
6
+ import "./chunks/4HDG5ILC.js";
7
7
 
8
8
  // src/index.ts
9
9
  import { z } from "zod";
@@ -589,6 +589,26 @@ export type RealtimeMessage = {
589
589
  export declare const APPS_PATH = "/api/v4/apps";
590
590
  /** The header that names an uploaded file (URI-encoded); the body is its bytes. */
591
591
  export declare const FILE_NAME_HEADER = "X-File-Name";
592
+ /** At most this many bytes a file of an app (100 MiB), however it is stored: uploaded, or by a task. */
593
+ export declare const MAX_FILE_BYTES: number;
594
+ /**
595
+ * An app's files, for those who may publish it (ADR 0010): `GET
596
+ * {APPS_PATH}/:appId/files` lists a page of them, a thousand at most
597
+ * (`?limit=` asks for fewer), and the next page after `?cursor=`, the one
598
+ * the last page gave. `DELETE {APPS_PATH}/:appId/files/:id/:name` deletes
599
+ * one: nothing opens it after, the app's rows and its public links
600
+ * included. The preview and the live version share them (ADR 0022).
601
+ */
602
+ export interface AppFiles {
603
+ /** In the order they are stored in, by key, which is no order people know: sort them to show them. */
604
+ files: AppFile[];
605
+ /** Where the next page starts; null after the last. */
606
+ cursor: string | null;
607
+ }
608
+ /** A file of an app: what its rows keep of it, and when it was uploaded (epoch milliseconds). */
609
+ export interface AppFile extends Attachment {
610
+ uploadedAt: number;
611
+ }
592
612
  /**
593
613
  * The query parameter, set to `1`, by which a request on the platform's
594
614
  * hosts names the app's preview (ADR 0022): the builder's views call it so,
package/dist/protocol.js CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  FILE_NAME_HEADER,
15
15
  GITHUB_CHANNEL,
16
16
  GITHUB_CONFLICT_BRANCH,
17
+ MAX_FILE_BYTES,
17
18
  PAGES_APP_META,
18
19
  PREVIEW_QUERY,
19
20
  PROTOCOL_VERSION,
@@ -42,7 +43,7 @@ import {
42
43
  secretPlaceholder,
43
44
  signedInAsAsked,
44
45
  spaceRoleOf
45
- } from "./chunks/ZYCZJSHS.js";
46
+ } from "./chunks/4HDG5ILC.js";
46
47
  export {
47
48
  APPS_PATH,
48
49
  APP_COMPATIBILITY_DATE,
@@ -59,6 +60,7 @@ export {
59
60
  FILE_NAME_HEADER,
60
61
  GITHUB_CHANNEL,
61
62
  GITHUB_CONFLICT_BRANCH,
63
+ MAX_FILE_BYTES,
62
64
  PAGES_APP_META,
63
65
  PREVIEW_QUERY,
64
66
  PROTOCOL_VERSION,
package/dist/schema.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  col,
4
4
  describeTables,
5
5
  schemaOf
6
- } from "./chunks/QMWZJWS3.js";
7
- import "./chunks/ZYCZJSHS.js";
6
+ } from "./chunks/TKDXT3ZT.js";
7
+ import "./chunks/4HDG5ILC.js";
8
8
  export {
9
9
  attachment,
10
10
  col,
package/dist/testing.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  methodName
3
- } from "./chunks/G4M5LS7T.js";
4
- import "./chunks/QMWZJWS3.js";
3
+ } from "./chunks/2W5UWORA.js";
4
+ import "./chunks/TKDXT3ZT.js";
5
5
  import {
6
6
  MethodError
7
- } from "./chunks/55YHKIYV.js";
7
+ } from "./chunks/ZQI6BF6U.js";
8
8
  import {
9
9
  ERROR_STATUS
10
- } from "./chunks/ZYCZJSHS.js";
10
+ } from "./chunks/4HDG5ILC.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
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  MethodError
3
- } from "./chunks/55YHKIYV.js";
3
+ } from "./chunks/ZQI6BF6U.js";
4
4
  import {
5
5
  ERROR_STATUS
6
- } from "./chunks/ZYCZJSHS.js";
6
+ } from "./chunks/4HDG5ILC.js";
7
7
 
8
8
  // src/worker.ts
9
9
  function thrower(caller) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teable/app",
3
- "version": "7.0.7",
3
+ "version": "7.0.9",
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",