@tinacms/schema-tools 2.8.2 → 2.9.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.
@@ -0,0 +1,37 @@
1
+ /** Path-collision fragment thrown by the @tinacms/graphql resolver. */
2
+ export declare const ERR_ALREADY_EXISTS = "already exists";
3
+ /** AsyncPoller lifecycle signals (tinacms internalClient). */
4
+ export declare const ASYNC_POLLER_ERROR: {
5
+ readonly CANCELLED: "AsyncPoller: cancelled";
6
+ readonly TIMEOUT: "AsyncPoller: reached timeout";
7
+ readonly STATUS_UNKNOWN: "AsyncPoller: status unknown for too long, please check indexing progress on the TinaCloud dashboard";
8
+ };
9
+ export type AsyncPollerError = (typeof ASYNC_POLLER_ERROR)[keyof typeof ASYNC_POLLER_ERROR];
10
+ /**
11
+ * Filesystem path-traversal prefix (CWE-22). The full emitted message MUST
12
+ * keep this exact prefix — do not reword.
13
+ *
14
+ * The path-traversal producers (the @tinacms/graphql filesystem and isomorphic
15
+ * bridges, and the @tinacms/cli path guard) inline this literal rather than
16
+ * importing the constant: those modules are loaded by jest from source across a
17
+ * package boundary, where importing the schema-tools ESM build throws "Cannot
18
+ * use import statement outside a module". This is the canonical reference for
19
+ * the string; keep the inlined literals byte-identical to it. The real contract
20
+ * is enforced by the `toThrow('Path traversal detected')` assertions in the
21
+ * bridge and CLI suites, not by this constant.
22
+ */
23
+ export declare const ERR_PATH_TRAVERSAL = "Path traversal detected";
24
+ /** TinaCloud: a document still has inbound references on delete/rename. */
25
+ export declare const ERR_HAS_REFERENCES = "has references";
26
+ /** TinaCloud: the branch schema has not finished indexing. */
27
+ export declare const ERR_NOT_INDEXED = "has not been indexed by TinaCloud";
28
+ /** TinaCloud: a branch with the given name already exists (editorial workflow). */
29
+ export declare const ERR_BRANCH_EXISTS = "already exists";
30
+ /**
31
+ * TinaCloud: branch-name conflict (editorial workflow fallback path). Broad by
32
+ * necessity — this matches the substring of an external server message we do
33
+ * not own, so it cannot be narrowed without risking a missed match. The
34
+ * structured `errorCode` switch above is the preferred path; this is the
35
+ * no-code fallback.
36
+ */
37
+ export declare const ERR_BRANCH_CONFLICT = "conflict";
package/dist/index.d.ts CHANGED
@@ -4,4 +4,6 @@ export * from './validate';
4
4
  export * from './util/namer';
5
5
  export * from './util/parseURL';
6
6
  export * from './util/normalizePath';
7
+ export * from './util/relativePath';
7
8
  export * from './util/headingLevels';
9
+ export * from './errors';