Skip to content

Commit 2cc72b5

Browse files
authored
feat(sanity): ship codingcat-ops Sanity App SDK via Blueprint & upgrade runtime-cli to 17.16.0 (#754)
1 parent bdda6e5 commit 2cc72b5

9 files changed

Lines changed: 3434 additions & 1906 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
SANITY_STUDIO_PROJECT_ID: hfh83o0w
5858
SANITY_STUDIO_DATASET: production
5959

60+
- name: Build ops app (Sanity App SDK)
61+
run: pnpm --filter @codingcatdev/ops build
62+
6063
- name: Run E2E Tests
6164
run: pnpm --filter @codingcatdev/site test:e2e
6265

‎.github/workflows/deploy.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
branches: [dev, main]
77
paths:
88
- "apps/sanity/**"
9+
- "apps/ops/**"
910
- "sanity.blueprint.ts"
11+
- "package.json"
1012
- "pnpm-lock.yaml"
1113
- ".github/workflows/deploy.yml"
1214

‎apps/ops/package.json‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
"deploy": "sanity deploy"
1010
},
1111
"dependencies": {
12-
"@sanity/sdk": "^1.0.0",
13-
"@sanity/sdk-react": "^1.0.0",
14-
"@sanity/ui": "^3.1.10",
15-
"react": "^19.2.0",
16-
"react-dom": "^19.2.0",
17-
"sanity": "^6.9.2",
12+
"@sanity/sdk": "^3.9.1",
13+
"@sanity/sdk-react": "^3.9.1",
14+
"@sanity/ui": "^4.4.9",
15+
"react": "^19.2.4",
16+
"react-dom": "^19.2.4",
17+
"sanity": "^6.20.0",
1818
"styled-components": "^6.3.11"
1919
},
2020
"devDependencies": {

‎apps/ops/sanity.cli.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { defineCliConfig } from "sanity/cli";
22

33
export default defineCliConfig({
44
app: {
5-
organizationId: process.env.SANITY_ORGANIZATION_ID || "o1H0wB7xG",
5+
organizationId: process.env.SANITY_ORGANIZATION_ID || "ovF2qiKSO",
66
entry: "./src/index.tsx",
77
},
88
});
9+

‎apps/ops/src/index.tsx‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { type SanityConfig } from "@sanity/sdk";
22
import { SanityApp } from "@sanity/sdk-react";
3-
import { StudioTheme, ThemeProvider } from "@sanity/ui";
3+
import { studioTheme, ThemeProvider } from "@sanity/ui";
44
import { StrictMode } from "react";
5-
import { createRoot } from "react-dom/client";
65
import { App } from "./App";
76

87
const config: SanityConfig[] = [
@@ -12,15 +11,15 @@ const config: SanityConfig[] = [
1211
},
1312
];
1413

15-
const rootEl = document.getElementById("root");
16-
if (rootEl) {
17-
createRoot(rootEl).render(
14+
export default function RootApp() {
15+
return (
1816
<StrictMode>
19-
<ThemeProvider theme={StudioTheme}>
17+
<ThemeProvider theme={studioTheme}>
2018
<SanityApp config={config} fallback={<div>Loading CodingCat.dev Ops...</div>}>
2119
<App />
2220
</SanityApp>
2321
</ThemeProvider>
24-
</StrictMode>,
22+
</StrictMode>
2523
);
2624
}
25+

‎apps/sanity/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"@sanity/functions": "^1.8.1",
2323
"@sanity/icons": "^5.2.1",
2424
"@sanity/image-url": "^2.1.1",
25-
"@sanity/ui": "^4.0.3",
26-
"@sanity/vision": "^6.9.2",
25+
"@sanity/ui": "^4.4.9",
26+
"@sanity/vision": "^6.20.0",
2727
"date-fns": "^4.1.0",
2828
"lucide-react": "^0.577.0",
2929
"micromark": "^4.0.2",
@@ -33,7 +33,7 @@
3333
"react-icons": "^5.6.0",
3434
"react-inlinesvg": "^4.2.0",
3535
"react-twitter-embed": "^4.0.4",
36-
"sanity": "^6.9.2",
36+
"sanity": "^6.20.0",
3737
"sanity-plugin-media": "^6.1.4",
3838
"styled-components": "^6.3.11"
3939
},

‎package.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@
2828
"@sanity/client": "^8.9.0",
2929
"@sanity/functions": "^1.8.1",
3030
"@sanity/image-url": "^2.1.1",
31-
"sanity": "^6.9.2"
31+
"sanity": "^6.20.0"
32+
},
33+
"pnpm": {
34+
"overrides": {
35+
"@sanity/runtime-cli": "17.16.0"
36+
}
3237
},
3338
"packageManager": "pnpm@10.34.1"
3439
}

‎pnpm-lock.yaml‎

Lines changed: 3391 additions & 1888 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎sanity.blueprint.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
import {
2+
defineApplication,
23
defineBlueprint,
34
defineDocumentFunction,
45
defineScheduledFunction,
6+
defineWindowView,
57
} from "@sanity/blueprints";
68

79
export default defineBlueprint({
810
resources: [
11+
defineApplication({
12+
name: "codingcat-ops",
13+
title: "CodingCat Ops & Revenue OS",
14+
root: "./apps/ops",
15+
views: [
16+
defineWindowView({
17+
name: "main",
18+
title: "CodingCat Ops & Revenue OS",
19+
src: "./src/index.tsx",
20+
dock: { group: "applications", order: 10 },
21+
}),
22+
],
23+
}),
924
defineDocumentFunction({
1025
name: "syndicate-content",
1126
displayName: "Syndicate Content (Dev.to & Hashnode)",

0 commit comments

Comments
 (0)