Skip to content

Commit 5ea137a

Browse files
authored
Merge pull request #446 from webstackdev/bugfix/ci-types-error
Fix CI type error
2 parents 4dc6134 + 2c72f32 commit 5ea137a

73 files changed

Lines changed: 1054 additions & 1091 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.cache/pages.d.ts‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Type declaration for generated pages.json file
3+
* This file is generated during the build process
4+
*/
5+
6+
type PageData =
7+
| string
8+
| { articles: string[] }
9+
| { 'case-studies': string[] }
10+
| { downloads: string[] }
11+
| { services: string[] }
12+
| { 'social-shares': string[] }
13+
| { stories: string[] }
14+
| { tags: string[] }
15+
16+
declare const pagesData: PageData[]
17+
export default pagesData

‎.cache/pages.json‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
[
2+
"about",
3+
{
4+
"articles": [
5+
"getting-started-with-astro",
6+
"typescript-best-practices",
7+
"useful-vs-code-extensions",
8+
"writing-library-code"
9+
]
10+
},
11+
{
12+
"case-studies": [
13+
"division-15",
14+
"ecommerce-modernization",
15+
"english-first",
16+
"enterprise-api-platform",
17+
"labcorp",
18+
"us-logistics"
19+
]
20+
},
21+
"contact",
22+
"cookies",
23+
{
24+
"downloads": [
25+
"api-tool-consolidation-whitepaper",
26+
"identity-security-for-dummies",
27+
"lakehouse-analytics-guide",
28+
"observability-benefits-guide",
29+
"ransomware-recovery-kit"
30+
]
31+
},
32+
"offline",
33+
"privacy",
34+
{
35+
"services": ["create-custom-font-sets", "overview"]
36+
},
37+
{
38+
"social-shares": ["template"]
39+
},
40+
{
41+
"tags": [
42+
"apiDesign",
43+
"cms",
44+
"code",
45+
"crm",
46+
"graphql",
47+
"online-learning",
48+
"react",
49+
"services",
50+
"typescript"
51+
]
52+
}
53+
]

‎.gitignore‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ npm-debug.log*
3232
# Optional eslint cache
3333
.eslintcache
3434

35-
# Cache
36-
.cache
35+
# Cache - ignore all contents except type declarations and placeholder data
36+
.cache/*
37+
!.cache/*.d.ts
38+
!.cache/pages.json
3739

3840
# Runtime data
3941
pids

‎.husky/pre-commit‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ fi
1818
# Run TypeScript check (fast feedback on type errors)
1919
npm run check
2020

21+
# Run linters (fail fast on each)
22+
npm run lint:style
23+
npm run lint:code
24+
npm run lint:json
25+
2126
# Run unit tests (fast feedback)
2227
npm run test:unit
2328

‎@types/remark-abbr.d.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable jsdoc/no-multi-asterisks */
12
/**
23
* Type definitions for remark-abbr
34
*

‎@types/vitest-axe.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// <reference types="vitest" />
2-
2+
/* eslint-disable @typescript-eslint/no-empty-object-type, no-unused-vars, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */
33
import type { AxeMatchers } from 'vitest-axe/matchers'
44

55
declare module 'vitest' {

‎astro.config.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ import {
1717
import { callToActionValidator } from './src/integrations/CtaValidator/call-to-action-validator'
1818
import { serializeSitemapItem, writePagesJson } from './src/lib/config/sitemap-serialize'
1919

20-
// Type guard for required environment variables (only in CI)
21-
const IS_CI = process.env['CI'] === 'true'
20+
// Type guard for required environment variables (only in Vercel)
21+
const IS_VERCEL = process.env['VERCEL']
2222
const SENTRY_AUTH_TOKEN = process.env['SENTRY_AUTH_TOKEN']
23-
if (IS_CI && !SENTRY_AUTH_TOKEN) {
24-
throw new Error('SENTRY_AUTH_TOKEN environment variable is required in CI but not set')
23+
if (IS_VERCEL && !SENTRY_AUTH_TOKEN) {
24+
throw new Error('SENTRY_AUTH_TOKEN environment variable is required in Vercel but not set')
2525
}
2626

2727
export default defineConfig({
@@ -38,11 +38,11 @@ export default defineConfig({
3838
callToActionValidator({
3939
debug: true // Enable debug logging to see validation details
4040
}),
41-
// Only include Sentry integration in CI environments
42-
...(IS_CI && SENTRY_AUTH_TOKEN ? [sentry({
41+
// Only include Sentry integration in Vercel environments
42+
...(IS_VERCEL ? [sentry({
4343
project: "webstack-builders-corporate-website",
4444
org: "webstack-builders",
45-
authToken: SENTRY_AUTH_TOKEN,
45+
authToken: SENTRY_AUTH_TOKEN!, // Non-null assertion safe due to check above
4646
})] : []),
4747
sitemap({
4848
lastmod: new Date(),

0 commit comments

Comments
 (0)