@gogitcms/editor 0.34.2 → 0.36.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.
- package/app/src/previewToken.ts +16 -6
- package/npm-shrinkwrap.json +47 -47
- package/package.json +6 -6
package/app/src/previewToken.ts
CHANGED
|
@@ -41,13 +41,23 @@ export async function getPreviewToken(repositoryId: string): Promise<string> {
|
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
43
|
if (!res.ok) {
|
|
44
|
-
// Surfaced to the plugin, which shows it in its own pane. 403
|
|
45
|
-
//
|
|
46
|
-
//
|
|
44
|
+
// Surfaced to the plugin, which shows it in its own pane. A 403 is one of
|
|
45
|
+
// two things worth telling apart: the workspace does not have previews
|
|
46
|
+
// (code preview_not_enabled — a plan or a staff grant fixes it), or the
|
|
47
|
+
// user cannot read that repository's content. Either is better said
|
|
48
|
+
// plainly than as "the preview service refused the session".
|
|
49
|
+
let code = "";
|
|
50
|
+
try {
|
|
51
|
+
code = String(((await res.json()) as { code?: string }).code ?? "");
|
|
52
|
+
} catch {
|
|
53
|
+
// Not JSON; the status is all there is.
|
|
54
|
+
}
|
|
47
55
|
throw new Error(
|
|
48
|
-
res.status === 403
|
|
49
|
-
? "
|
|
50
|
-
:
|
|
56
|
+
res.status === 403 && code === "preview_not_enabled"
|
|
57
|
+
? "previews are not enabled for this workspace — they come with a plan that includes them, or ask us to turn them on"
|
|
58
|
+
: res.status === 403
|
|
59
|
+
? "you do not have permission to preview this repository"
|
|
60
|
+
: `the CMS refused to mint a preview token (${res.status})`,
|
|
51
61
|
);
|
|
52
62
|
}
|
|
53
63
|
const body = (await res.json()) as { token: string; expiresAt: string };
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gogitcms/editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@gogitcms/editor",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.36.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@apollo/client": "^3.11.8",
|
|
12
12
|
"@handlewithcare/react-prosemirror": "^3.2.7",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"node": ">=20"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@gogitcms/gitcms-local-darwin-arm64": "0.
|
|
51
|
-
"@gogitcms/gitcms-local-darwin-x64": "0.
|
|
52
|
-
"@gogitcms/gitcms-local-linux-arm64": "0.
|
|
53
|
-
"@gogitcms/gitcms-local-linux-x64": "0.
|
|
54
|
-
"@gogitcms/gitcms-local-win32-x64": "0.
|
|
50
|
+
"@gogitcms/gitcms-local-darwin-arm64": "0.36.0",
|
|
51
|
+
"@gogitcms/gitcms-local-darwin-x64": "0.36.0",
|
|
52
|
+
"@gogitcms/gitcms-local-linux-arm64": "0.36.0",
|
|
53
|
+
"@gogitcms/gitcms-local-linux-x64": "0.36.0",
|
|
54
|
+
"@gogitcms/gitcms-local-win32-x64": "0.36.0"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"node_modules/@apollo/client": {
|
|
@@ -751,9 +751,9 @@
|
|
|
751
751
|
}
|
|
752
752
|
},
|
|
753
753
|
"node_modules/@gogitcms/gitcms-local-darwin-arm64": {
|
|
754
|
-
"version": "0.
|
|
755
|
-
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-darwin-arm64/-/gitcms-local-darwin-arm64-0.
|
|
756
|
-
"integrity": "sha512-
|
|
754
|
+
"version": "0.36.0",
|
|
755
|
+
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-darwin-arm64/-/gitcms-local-darwin-arm64-0.36.0.tgz",
|
|
756
|
+
"integrity": "sha512-3SPtjHnW2iFzSpwDWB4kakJill7WOw3yB/+/jXhN8Rv66CR0ly5ArpJiEVj90z97RXCrJCOiz+OPW6bAX7HWRg==",
|
|
757
757
|
"cpu": [
|
|
758
758
|
"arm64"
|
|
759
759
|
],
|
|
@@ -764,9 +764,9 @@
|
|
|
764
764
|
]
|
|
765
765
|
},
|
|
766
766
|
"node_modules/@gogitcms/gitcms-local-darwin-x64": {
|
|
767
|
-
"version": "0.
|
|
768
|
-
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-darwin-x64/-/gitcms-local-darwin-x64-0.
|
|
769
|
-
"integrity": "sha512-
|
|
767
|
+
"version": "0.36.0",
|
|
768
|
+
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-darwin-x64/-/gitcms-local-darwin-x64-0.36.0.tgz",
|
|
769
|
+
"integrity": "sha512-Dmsr+bXGBr9bqI6QTIRV6e2sZirfyNatuZwJU1kGr0W0ZGhfibS0phzQeru43ABfn0prMWpCxbdschkouzlSKQ==",
|
|
770
770
|
"cpu": [
|
|
771
771
|
"x64"
|
|
772
772
|
],
|
|
@@ -777,9 +777,9 @@
|
|
|
777
777
|
]
|
|
778
778
|
},
|
|
779
779
|
"node_modules/@gogitcms/gitcms-local-linux-x64": {
|
|
780
|
-
"version": "0.
|
|
781
|
-
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-linux-x64/-/gitcms-local-linux-x64-0.
|
|
782
|
-
"integrity": "sha512-
|
|
780
|
+
"version": "0.36.0",
|
|
781
|
+
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-linux-x64/-/gitcms-local-linux-x64-0.36.0.tgz",
|
|
782
|
+
"integrity": "sha512-gdzFRnZ8zqowY7Y9XU18LwXo4U04+i0Y4SJ1yQQYiObt6YpY3wIWjzQagZg14UViLZoRKBt/apruBKooikMJPg==",
|
|
783
783
|
"cpu": [
|
|
784
784
|
"x64"
|
|
785
785
|
],
|
|
@@ -790,9 +790,9 @@
|
|
|
790
790
|
]
|
|
791
791
|
},
|
|
792
792
|
"node_modules/@gogitcms/gitcms-local-win32-x64": {
|
|
793
|
-
"version": "0.
|
|
794
|
-
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-win32-x64/-/gitcms-local-win32-x64-0.
|
|
795
|
-
"integrity": "sha512-
|
|
793
|
+
"version": "0.36.0",
|
|
794
|
+
"resolved": "https://registry.npmjs.org/@gogitcms/gitcms-local-win32-x64/-/gitcms-local-win32-x64-0.36.0.tgz",
|
|
795
|
+
"integrity": "sha512-2c/GH7xz8jmagqa7Sb/qa8xeBpCVB+D9CwZ9F3TUtwvlqewN8uwBBzwLJtbyj3ITfb36bU7Tsj0P7BrvrxUGug==",
|
|
796
796
|
"cpu": [
|
|
797
797
|
"x64"
|
|
798
798
|
],
|
|
@@ -959,28 +959,28 @@
|
|
|
959
959
|
}
|
|
960
960
|
},
|
|
961
961
|
"node_modules/@posthog/browser-common": {
|
|
962
|
-
"version": "0.7.
|
|
963
|
-
"resolved": "https://registry.npmjs.org/@posthog/browser-common/-/browser-common-0.7.
|
|
964
|
-
"integrity": "sha512-
|
|
962
|
+
"version": "0.7.2",
|
|
963
|
+
"resolved": "https://registry.npmjs.org/@posthog/browser-common/-/browser-common-0.7.2.tgz",
|
|
964
|
+
"integrity": "sha512-ukDmETXy6fTBE4ZpaO8ccscrNz5SvTaUnhQ0Ze2JX/oYILa89rrNwqUH7lDAuhFKa+NY6EoJ9kZMuOvuu4WwLQ==",
|
|
965
965
|
"license": "MIT",
|
|
966
966
|
"dependencies": {
|
|
967
|
-
"@posthog/core": "^1.50.
|
|
968
|
-
"@posthog/types": "^1.
|
|
967
|
+
"@posthog/core": "^1.50.4",
|
|
968
|
+
"@posthog/types": "^1.408.1"
|
|
969
969
|
}
|
|
970
970
|
},
|
|
971
971
|
"node_modules/@posthog/core": {
|
|
972
|
-
"version": "1.50.
|
|
973
|
-
"resolved": "https://registry.npmjs.org/@posthog/core/-/core-1.50.
|
|
974
|
-
"integrity": "sha512-
|
|
972
|
+
"version": "1.50.4",
|
|
973
|
+
"resolved": "https://registry.npmjs.org/@posthog/core/-/core-1.50.4.tgz",
|
|
974
|
+
"integrity": "sha512-4iuCMbPJgy+w8xiFlSM/zapchVSzkba6Nb+iZEo+4DsAplNFj38pXE1htGx2GU8Fac70PPOwvNv4uHsZjYDbzA==",
|
|
975
975
|
"license": "MIT",
|
|
976
976
|
"dependencies": {
|
|
977
|
-
"@posthog/types": "^1.
|
|
977
|
+
"@posthog/types": "^1.408.1"
|
|
978
978
|
}
|
|
979
979
|
},
|
|
980
980
|
"node_modules/@posthog/types": {
|
|
981
|
-
"version": "1.408.
|
|
982
|
-
"resolved": "https://registry.npmjs.org/@posthog/types/-/types-1.408.
|
|
983
|
-
"integrity": "sha512-
|
|
981
|
+
"version": "1.408.1",
|
|
982
|
+
"resolved": "https://registry.npmjs.org/@posthog/types/-/types-1.408.1.tgz",
|
|
983
|
+
"integrity": "sha512-zcQ3rdAbWDWegL/TA3OiC+Wc8qquNtFj2Q2RPc3QuJas3D6FYsNhR9xYmZgLWEm+GDN/zhGlOHijG3nPMEiCbw==",
|
|
984
984
|
"license": "MIT"
|
|
985
985
|
},
|
|
986
986
|
"node_modules/@react-native/asset-utils": {
|
|
@@ -1868,9 +1868,9 @@
|
|
|
1868
1868
|
"license": "MIT"
|
|
1869
1869
|
},
|
|
1870
1870
|
"node_modules/baseline-browser-mapping": {
|
|
1871
|
-
"version": "2.11.
|
|
1872
|
-
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.
|
|
1873
|
-
"integrity": "sha512-
|
|
1871
|
+
"version": "2.11.21",
|
|
1872
|
+
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.21.tgz",
|
|
1873
|
+
"integrity": "sha512-uh8vpY/1/YyFkunIDFH/12p7/7VdPKA1hejMVEbdkEaWnUz0Hesvx5EbiU6XxjyHZIOju+ZMbQJkRh+es3/spQ==",
|
|
1874
1874
|
"license": "Apache-2.0",
|
|
1875
1875
|
"bin": {
|
|
1876
1876
|
"baseline-browser-mapping": "dist/cli.cjs"
|
|
@@ -2315,9 +2315,9 @@
|
|
|
2315
2315
|
"peer": true
|
|
2316
2316
|
},
|
|
2317
2317
|
"node_modules/electron-to-chromium": {
|
|
2318
|
-
"version": "1.5.
|
|
2319
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
2320
|
-
"integrity": "sha512-
|
|
2318
|
+
"version": "1.5.421",
|
|
2319
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.421.tgz",
|
|
2320
|
+
"integrity": "sha512-cUhfpHQy+PGbt+X90DMcAVazDCziIZr73hpxD4LRs4BGQoJCifPzTfQWa7S6c+uhokTOBe8tot09GBSEO6c9LA==",
|
|
2321
2321
|
"license": "ISC"
|
|
2322
2322
|
},
|
|
2323
2323
|
"node_modules/emoji-regex": {
|
|
@@ -4024,9 +4024,9 @@
|
|
|
4024
4024
|
}
|
|
4025
4025
|
},
|
|
4026
4026
|
"node_modules/postcss": {
|
|
4027
|
-
"version": "8.5.
|
|
4028
|
-
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.
|
|
4029
|
-
"integrity": "sha512-
|
|
4027
|
+
"version": "8.5.28",
|
|
4028
|
+
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz",
|
|
4029
|
+
"integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==",
|
|
4030
4030
|
"funding": [
|
|
4031
4031
|
{
|
|
4032
4032
|
"type": "opencollective",
|
|
@@ -4043,7 +4043,7 @@
|
|
|
4043
4043
|
],
|
|
4044
4044
|
"license": "MIT",
|
|
4045
4045
|
"dependencies": {
|
|
4046
|
-
"nanoid": "^3.3.
|
|
4046
|
+
"nanoid": "^3.3.18",
|
|
4047
4047
|
"picocolors": "^1.1.1",
|
|
4048
4048
|
"source-map-js": "^1.2.1"
|
|
4049
4049
|
},
|
|
@@ -4058,14 +4058,14 @@
|
|
|
4058
4058
|
"license": "MIT"
|
|
4059
4059
|
},
|
|
4060
4060
|
"node_modules/posthog-js": {
|
|
4061
|
-
"version": "1.
|
|
4062
|
-
"resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.
|
|
4063
|
-
"integrity": "sha512-
|
|
4061
|
+
"version": "1.426.2",
|
|
4062
|
+
"resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.426.2.tgz",
|
|
4063
|
+
"integrity": "sha512-dYs3GTLn3NxQIqsxIdMPsvJcnn9515YkTKHxuxrtMmnduIWiIoXdR5aqdd0GWjP2cx6cEVYO3OxZ8U/1bOVFBQ==",
|
|
4064
4064
|
"license": "(Apache-2.0 AND MIT)",
|
|
4065
4065
|
"dependencies": {
|
|
4066
|
-
"@posthog/browser-common": "^0.7.
|
|
4067
|
-
"@posthog/core": "^1.50.
|
|
4068
|
-
"@posthog/types": "^1.408.
|
|
4066
|
+
"@posthog/browser-common": "^0.7.2",
|
|
4067
|
+
"@posthog/core": "^1.50.4",
|
|
4068
|
+
"@posthog/types": "^1.408.1",
|
|
4069
4069
|
"core-js": "^3.49.0",
|
|
4070
4070
|
"dompurify": "^3.4.13",
|
|
4071
4071
|
"fflate": "^0.4.8",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gogitcms/editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "Terminal UI for setting up and running the Go·Git CMS content editor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"@gogitcms/frontend": "workspace:*"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"@gogitcms/gitcms-local-darwin-arm64": "0.
|
|
69
|
-
"@gogitcms/gitcms-local-darwin-x64": "0.
|
|
70
|
-
"@gogitcms/gitcms-local-linux-arm64": "0.
|
|
71
|
-
"@gogitcms/gitcms-local-linux-x64": "0.
|
|
72
|
-
"@gogitcms/gitcms-local-win32-x64": "0.
|
|
68
|
+
"@gogitcms/gitcms-local-darwin-arm64": "0.36.0",
|
|
69
|
+
"@gogitcms/gitcms-local-darwin-x64": "0.36.0",
|
|
70
|
+
"@gogitcms/gitcms-local-linux-arm64": "0.36.0",
|
|
71
|
+
"@gogitcms/gitcms-local-linux-x64": "0.36.0",
|
|
72
|
+
"@gogitcms/gitcms-local-win32-x64": "0.36.0"
|
|
73
73
|
}
|
|
74
74
|
}
|