tinacms 3.10.1 → 3.11.0

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.
@@ -155,6 +155,9 @@ export declare class Client {
155
155
  branchExists(branchName: string, args?: {
156
156
  signal?: AbortSignal;
157
157
  }): Promise<boolean>;
158
+ branchesExist(branchNames: string[], args?: {
159
+ signal?: AbortSignal;
160
+ }): Promise<Record<string, boolean>>;
158
161
  createBranch({ baseBranch, branchName }: BranchData): Promise<string>;
159
162
  getLatestVersion(): Promise<LatestVersionResponse>;
160
163
  private pollEditorialWorkflowStatus;
@@ -33,6 +33,14 @@ export declare class TinaMediaStore implements MediaStore {
33
33
  private workflowBranchOverride;
34
34
  private mediaWorkflowInProgress;
35
35
  constructor(cms: TinaCMS, staticMedia?: StaticMedia);
36
+ /**
37
+ * Repo-backed media (`media.tina`) is served by TinaCloud's assets API. A
38
+ * self-hosted site (a custom content API, and not local dev) has no such
39
+ * endpoint, so these operations can never succeed there. Detecting the case
40
+ * lets us fail with a clear, actionable message instead of a misleading
41
+ * TinaCloud/provider error (e.g. a bogus 404 "Bad Route").
42
+ */
43
+ private isUnsupportedSelfHostedRepoMedia;
36
44
  setup(): void;
37
45
  isAuthenticated(): Promise<boolean>;
38
46
  accept: string;
@@ -156,4 +156,5 @@ export declare class MediaListError extends Error {
156
156
  export declare const E_UNAUTHORIZED: MediaListError;
157
157
  export declare const E_BAD_ROUTE: MediaListError;
158
158
  export declare const E_DEFAULT: MediaListError;
159
+ export declare const E_SELF_HOSTED_MEDIA: MediaListError;
159
160
  export {};
@@ -8,13 +8,17 @@ export interface MediaWorkflowConfirmBranchEvent {
8
8
  }
9
9
  export declare const getEditorialWorkflowPrTitle: (branchName: string) => string;
10
10
  export declare const TARGET_BRANCH_EXISTS_ERROR = "A branch with this name already exists";
11
- export declare const checkBaseBranchExists: (tinaApi: {
12
- branchExists: (branchName: string, args?: {
13
- signal?: AbortSignal;
14
- }) => Promise<boolean>;
15
- }, baseBranch: string, debugLabel: string, signal?: AbortSignal) => Promise<boolean>;
16
11
  export declare const checkTargetBranchExists: (tinaApi: {
17
12
  branchExists: (branchName: string, args?: {
18
13
  signal?: AbortSignal;
19
14
  }) => Promise<boolean>;
20
15
  }, targetBranch: string, debugLabel: string, signal?: AbortSignal) => Promise<boolean>;
16
+ export interface BranchGuardResult {
17
+ baseBranchExists: boolean;
18
+ targetBranchExists: boolean;
19
+ }
20
+ export declare const checkBranchGuard: (tinaApi: {
21
+ branchesExist: (branchNames: string[], args?: {
22
+ signal?: AbortSignal;
23
+ }) => Promise<Record<string, boolean>>;
24
+ }, baseBranch: string, targetBranch: string, debugLabel: string, signal?: AbortSignal) => Promise<BranchGuardResult>;
@@ -4,7 +4,7 @@ export * from './form';
4
4
  export * from './form-builder';
5
5
  export * from './form-legacy';
6
6
  export * from './form-portal';
7
- export * from './loading-dots';
7
+ export * from '../styles/loading-dots';
8
8
  export * from './reset-form';
9
9
  export * from './form-actions';
10
10
  export * from './create-branch-modal';
@@ -14,6 +14,7 @@ export interface ExecuteWorkflowOptions {
14
14
  tinaForm?: Form;
15
15
  signal?: AbortSignal;
16
16
  isDraft?: boolean;
17
+ targetBranchExists?: boolean;
17
18
  }
18
19
  export interface UseEditorialWorkflowResult {
19
20
  isExecuting: boolean;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "tinacms",
3
3
  "type": "module",
4
4
  "typings": "dist/index.d.ts",
5
- "version": "3.10.1",
5
+ "version": "3.11.0",
6
6
  "main": "dist/index.js",
7
7
  "module": "./dist/index.js",
8
8
  "exports": {
@@ -112,10 +112,10 @@
112
112
  "webfontloader": "1.6.28",
113
113
  "yup": "^1.6.1",
114
114
  "zod": "^3.24.2",
115
- "@tinacms/bridge": "0.3.0",
116
- "@tinacms/mdx": "2.1.10",
117
- "@tinacms/schema-tools": "2.8.3",
118
- "@tinacms/search": "1.2.22"
115
+ "@tinacms/bridge": "^0.3.1",
116
+ "@tinacms/mdx": "^2.1.11",
117
+ "@tinacms/schema-tools": "^2.8.3",
118
+ "@tinacms/search": "^1.2.23"
119
119
  },
120
120
  "devDependencies": {
121
121
  "@graphql-tools/utils": "^10.8.1",