Skip to content

Commit

Permalink
fix indexing issue caused by shift from netlify to cloudflare
Browse files Browse the repository at this point in the history
  • Loading branch information
theoephraim committed Jan 14, 2025
1 parent 21e8006 commit 3b43780
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/spicy-items-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@dmno/cloudflare-platform": patch
---

fix cf pages type description
15 changes: 7 additions & 8 deletions packages/docs-site/.dmno/config.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DmnoBaseTypes, defineDmnoService, switchBy, pickFromSchemaObject } from 'dmno';
import { NetlifyEnvSchema } from '@dmno/netlify-platform/types';
import { CloudflarePagesEnvSchema } from '@dmno/cloudflare-platform';

export default defineDmnoService({
name: 'docs-site',
Expand All @@ -22,15 +22,14 @@ export default defineDmnoService({
value: 'family=Days+One&family=Fira+Mono:wght@400&family=Inter:[email protected]'
},

...pickFromSchemaObject(NetlifyEnvSchema, 'CONTEXT', 'BUILD_ID'),
...pickFromSchemaObject(CloudflarePagesEnvSchema, 'CF_PAGES_BRANCH'),

DMNO_ENV: {
value: switchBy('CONTEXT', {
_default: 'local',
'deploy-preview': 'staging',
'branch-deploy': 'staging',
production: 'production',
}),
value: () => {
if (DMNO_CONFIG.CF_PAGES_BRANCH === 'main') return 'production';
if (DMNO_CONFIG.CF_PAGES_BRANCH) return 'staging';
return 'local';
},
},

SIGNUP_API_URL: {
Expand Down
2 changes: 1 addition & 1 deletion packages/docs-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@astrojs/vue": "^4.5.0",
"@dmno/astro-integration": "workspace:*",
"@dmno/eslint-config": "workspace:*",
"@dmno/netlify-platform": "workspace:*",
"@dmno/cloudflare-platform": "workspace:*",
"@dmno/tsconfig": "workspace:*",
"@dmno/ui-lib": "workspace: *",
"@iconify/vue": "^4.1.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/platforms/cloudflare/src/data-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const CloudflarePagesEnvSchema = createVendorSchema({
},
CF_PAGES_BRANCH: {
extends: GitDataTypes.BranchName,
description: 'unique ID for the Cloudflare Pages commit',
description: 'branch name of the current Cloudflare Pages deployment',
...getCommonPagesTypeInfo(),
},
CF_PAGES_COMMIT_SHA: {
Expand All @@ -34,7 +34,7 @@ export const CloudflarePagesEnvSchema = createVendorSchema({
},
CF_PAGES_URL: {
extends: 'url',
description: 'URL of the current Cloudflare Pages site',
description: 'URL of the current Cloudflare Pages deployment',
...getCommonPagesTypeInfo(),
},
}, { fromVendor: 'cloudflare-pages' });
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3b43780

Please sign in to comment.