@tinacms/datalayer 1.3.13 → 1.3.15
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/index.d.ts +1 -3
- package/dist/index.js +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { FilesystemBridge, AuditFileSystemBridge, IsomorphicBridge, TinaLevelClient, resolve, createDatabase, createLocalDatabase, } from '@tinacms/graphql';
|
|
3
|
-
export * from './backend';
|
|
1
|
+
export * from "../src/index"
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,9 @@ function MakeNodeApiHandler({
|
|
|
69
69
|
const url = new URL(path, `http://${((_b = req.headers) == null ? void 0 : _b.host) || "localhost"}`);
|
|
70
70
|
const routes = (_d = (_c = url.pathname) == null ? void 0 : _c.replace(opts.basePath, "")) == null ? void 0 : _d.split("/");
|
|
71
71
|
if (typeof routes === "string") {
|
|
72
|
-
throw new Error(
|
|
72
|
+
throw new Error(
|
|
73
|
+
"Please name your next api route [...routes] not [route]"
|
|
74
|
+
);
|
|
73
75
|
}
|
|
74
76
|
if (!(routes == null ? void 0 : routes.length)) {
|
|
75
77
|
console.error(
|
|
@@ -146,7 +148,9 @@ function MakeNodeApiHandler({
|
|
|
146
148
|
const isAuth = await isAuthorized(req, res);
|
|
147
149
|
if (isAuth.isAuthorized === false) {
|
|
148
150
|
res.statusCode = isAuth.errorCode;
|
|
149
|
-
res.write(
|
|
151
|
+
res.write(
|
|
152
|
+
JSON.stringify({ error: isAuth.errorMessage || "not found" })
|
|
153
|
+
);
|
|
150
154
|
res.end();
|
|
151
155
|
return;
|
|
152
156
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -45,7 +45,9 @@ function MakeNodeApiHandler({
|
|
|
45
45
|
const url = new URL(path, `http://${req.headers?.host || "localhost"}`);
|
|
46
46
|
const routes = url.pathname?.replace(opts.basePath, "")?.split("/");
|
|
47
47
|
if (typeof routes === "string") {
|
|
48
|
-
throw new Error(
|
|
48
|
+
throw new Error(
|
|
49
|
+
"Please name your next api route [...routes] not [route]"
|
|
50
|
+
);
|
|
49
51
|
}
|
|
50
52
|
if (!routes?.length) {
|
|
51
53
|
console.error(
|
|
@@ -121,7 +123,9 @@ function MakeNodeApiHandler({
|
|
|
121
123
|
const isAuth = await isAuthorized(req, res);
|
|
122
124
|
if (isAuth.isAuthorized === false) {
|
|
123
125
|
res.statusCode = isAuth.errorCode;
|
|
124
|
-
res.write(
|
|
126
|
+
res.write(
|
|
127
|
+
JSON.stringify({ error: isAuth.errorMessage || "not found" })
|
|
128
|
+
);
|
|
125
129
|
res.end();
|
|
126
130
|
return;
|
|
127
131
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/datalayer",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.15",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"typings": "dist/index",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
]
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@tinacms/graphql": "1.5.
|
|
34
|
+
"@tinacms/graphql": "1.5.15"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"registry": "https://registry.npmjs.org"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"jest-file-snapshot": "^0.5.0",
|
|
56
56
|
"jest-matcher-utils": "^29.7.0",
|
|
57
57
|
"typescript": "^5.7.3",
|
|
58
|
-
"@tinacms/scripts": "1.3.
|
|
58
|
+
"@tinacms/scripts": "1.3.3"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"types": "pnpm tsc",
|