Skip to content

DX | 28-04-2025 | Release #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Apr 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
fa83cb0
enh: Add environment variable checks for ContentstackClient
harshithad0703 Apr 7, 2025
ebd4e4f
refactor: Remove unused mock files and test cases
harshithad0703 Apr 7, 2025
25dfbbc
refactor: Remove 'test:api' script from package.json
harshithad0703 Apr 7, 2025
3ef4d6b
Merge pull request #320 from contentstack/staging
harshithad0703 Apr 7, 2025
941337c
Merge branch 'development' into fix/dx-2230-handle-env-variables
harshithad0703 Apr 7, 2025
a4a9c38
chore: Update branch restrictions in workflows to include 'staging' a…
harshithad0703 Apr 8, 2025
66b9b6d
chore: Bump version to 1.20.2 and update changelog for recent fixes
harshithad0703 Apr 8, 2025
e8a3c62
refactor: Update mock paths to use 'sanity-check' directory instead o…
harshithad0703 Apr 8, 2025
bd17746
chore: Update changelog date for version 1.20.2
harshithad0703 Apr 8, 2025
f2c7adc
Merge pull request #321 from contentstack/fix/dx-2230-handle-env-vari…
harshithad0703 Apr 8, 2025
0af5062
Merge branch 'staging' into fix/staging-merge-cnonflicts
harshithad0703 Apr 16, 2025
0f1fc6a
Merge pull request #327 from contentstack/fix/staging-merge-cnonflicts
reeshika-h Apr 16, 2025
edee59b
chore: update version to 1.20.3 and add changelog entry for sanity te…
harshithad0703 Apr 16, 2025
936d028
test: update access token in refreshAccessToken test case to use plac…
harshithad0703 Apr 16, 2025
2629d21
chore: update changelog dates for v1.20.3 and v1.20.2
harshithad0703 Apr 16, 2025
b60fa60
Merge pull request #328 from contentstack/fix/version-bump
harshithad0703 Apr 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
enh: Add environment variable checks for ContentstackClient
  • Loading branch information
harshithad0703 committed Apr 7, 2025
commit fa83cb014725d7a456a5b153de107a5df2f7d83d
9 changes: 9 additions & 0 deletions test/sanity-check/utility/ContentstackClient.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import * as contentstack from '../../../lib/contentstack.js'
import dotenv from 'dotenv'
dotenv.config()

const requiredVars = ['HOST', 'EMAIL', 'PASSWORD', 'ORGANIZATION', 'API_KEY']
const missingVars = requiredVars.filter((key) => !process.env[key])

if (missingVars.length > 0) {
console.error(`\x1b[31mError: Missing environment variables - ${missingVars.join(', ')}`)
process.exit(1)
}

function contentstackClient (authtoken = null) {
var params = { host: process.env.HOST, defaultHostName: process.env.DEFAULTHOST }
if (authtoken) {
Expand Down