Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ coverage
.env
.dccache
dist/*
*.log
*.log
docs-internal/
54 changes: 17 additions & 37 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,38 +1,18 @@
fileignoreconfig:
- filename: index.d.ts
checksum: 22c6a7fe4027d6b2c9adf0cbeb9c525ab79b15210b07ec5189693992e6800a66
- filename: test/typescript/stack.test.ts
checksum: 50b764c0ca6f6f27d7306a4e54327bef9b178e8436c6e3fad0d67d77343d10b3
- filename: .github/workflows/secrets-scan.yml
checksum: d79ec3f3288964f7d117b9ad319a54c0ebc152e35f69be8fde95522034fdfb2a
- filename: package-lock.json
checksum: 215757874c719e0192e440dd4b98f4dfb6824f72e526047182fcd60cc03e3e80
- filename: src/core/modules/assets.js
checksum: 00f19d659b830b0f145b4db0ccf3211a4048d9488f30a224fe3c31cacca6dcd2
- filename: .husky/pre-commit
checksum: 52a664f536cf5d1be0bea19cb6031ca6e8107b45b6314fe7d47b7fad7d800632
- filename: src/core/cache.js
checksum: 85025b63df8db4a3f94ace5c7f088ea0e4d55eb8324d2265ea4a470b0c610fce
- filename: src/core/cache-provider/localstorage.js
checksum: 33266a67a003b665957e4a445e821b9295632cff75be0a71baf35b3576c55aa4
- filename: src/core/modules/entry.js
checksum: 49d6742d014ce111735611ebab16dc8c888ce8d678dfbc99620252257e780ec5
- filename: src/core/contentstack.js
checksum: 22e723507c1fed8b3175b57791f4249889c9305b79e5348d59d741bdf4f006ba
- filename: test/config.js
checksum: 4ada746af34f2868c038f53126c08c21d750ddbd037d0a62e88824dd5d9e20be
- filename: test/live-preview/live-preview-test.js
checksum: d742465789e00a17092a7e9664adda4342a13bc4975553371a26df658f109952
- filename: src/core/lib/request.js
checksum: 040f4fd184a96c57d0eb9e7134ae6ff65f8e9039c38c852c9a0f00825b4c69f1
- filename: test/sync/sync-testcases.js
checksum: 391b557a147c658a50256b49dcdd20fd053eb32966e9244d98c93142e4dcbf2e
- filename: src/core/modules/taxonomy.js
checksum: 115e63b4378809b29a037e2889f51e300edfd18682b3b6c0a4112c270fc32526
- filename: src/core/modules/query.js
checksum: aa6596a353665867586d00cc64225f0dea7edacc3bcfab60002a5727bd927132
- filename: src/core/stack.js
checksum: a467e56edcb43858512c47bd82c76dbf8799d57837f03c247e2cebe27ca5eaa8
- filename: src/core/lib/utils.js
checksum: 7ae53c3be5cdcd1468d66577c9450adc53e9c6aaeaeabc4275e87a47aa709850
version: ""
- filename: test/integration/EntryTests/SingleEntryFetch.test.js
checksum: 54015a61d1c3ceb1c6f3e720164e6aa1d2b21aa796c7ad7f90133b18b69127cd
- filename: test/integration/GlobalFieldsTests/SEOGlobalField.test.js
checksum: c5df5b9fa8756ced5f37879dff17aa0f31f50fd64470195064e0b22450cde29d
- filename: test/integration/QueryTests/FieldProjection.test.js
checksum: c775ac0895df7f11865d627bad5309dd51ae5ea1f63959d5b8d1e420851a6077
- filename: test/integration/LivePreviewTests/LivePreview.test.js
checksum: dba41fa432524189234a3d0ec35885a8e5c51904b3114853a41b1ec3899ad4cb
- filename: test/config.js
checksum: 55c700357e33032d4b5c52f98be14aafdf71d7ed72223c39a42e3310e829e532
- filename: test/integration/GlobalFieldsTests/ContentBlockGlobalField.test.js
checksum: 8d2bc8cb6661336b57397649259f7e12786256706019efb644f133b336629d96
- filename: test/integration/NetworkResilienceTests/RetryLogic.test.js
checksum: 681543c7c982eba430189b541116ffeb06c7955da220b5fd8c6b034b1e9a5e43
- filename: test/integration/QueryTests/ExistsSearchOperators.test.js
checksum: e4774c805f1d0876cdc03439ed14a2f35a0ceb6028d86370a49ef0558a7bc46e
version: "1.0"
3 changes: 2 additions & 1 deletion jest.js.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
module.exports = {
testEnvironment: "node",
testMatch: ["**/test/**/*.js"],
testMatch: ["**/test/integration/**/*.test.js"],
testPathIgnorePatterns: [
"/node_modules/",
"/test/index.js",
"/test/config.js",
"/test/sync_config.js",
"/test/helpers/",
"/test/.*/utils.js",
],
reporters: ["default", ["jest-html-reporters",
Expand Down
86 changes: 85 additions & 1 deletion test/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,94 @@
}

module.exports = {
stack: { api_key: process.env.API_KEY, delivery_token: process.env.DELIVERY_TOKEN, environment: process.env.ENVIRONMENT },
// Stack configuration
stack: {

Check failure on line 16 in test/config.js

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
api_key: process.env.API_KEY,

Check failure on line 17 in test/config.js

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
delivery_token: process.env.DELIVERY_TOKEN,

Check failure on line 18 in test/config.js

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
environment: process.env.ENVIRONMENT,
branch: process.env.BRANCH_UID || 'main' // Branch is part of Stack config

Check failure on line 20 in test/config.js

View workflow job for this annotation

GitHub Actions / lint

Multiple spaces found before '// Branch is p...'
},
host: process.env.HOST,

Check failure on line 23 in test/config.js

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
// Additional tokens for comprehensive tests
managementToken: process.env.MANAGEMENT_TOKEN,
previewToken: process.env.PREVIEW_TOKEN,
livePreviewHost: process.env.LIVE_PREVIEW_HOST,

Check failure on line 28 in test/config.js

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
// Branch configuration (also available separately for reference)
branch: process.env.BRANCH_UID || 'main',

Check failure on line 31 in test/config.js

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
// LEGACY content types (keep for backward compatibility)
contentTypes: {
source: 'source',
numbers_content_type: 'numbers_content_type'
},

Check failure on line 37 in test/config.js

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
// Content Types (UIDs from environment variables)
complexContentTypes: {
// Complexity level shortcuts
complex: process.env.COMPLEX_CONTENT_TYPE_UID,
medium: process.env.MEDIUM_CONTENT_TYPE_UID,
simple: process.env.SIMPLE_CONTENT_TYPE_UID,
selfReferencing: process.env.SELF_REF_CONTENT_TYPE_UID,

Check failure on line 45 in test/config.js

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
// Generic content type names (all values from env vars, keys are generic)
article: process.env.MEDIUM_CONTENT_TYPE_UID,
author: process.env.SIMPLE_CONTENT_TYPE_UID,
cybersecurity: process.env.COMPLEX_CONTENT_TYPE_UID,
section_builder: process.env.SELF_REF_CONTENT_TYPE_UID, // Alias for selfReferencing

Check failure on line 50 in test/config.js

View workflow job for this annotation

GitHub Actions / lint

Multiple spaces found before '// Alias for s...'
page_builder: 'page_builder' // Standard content type for modular blocks testing
},

// Test Entry UIDs (all from environment variables)
testEntries: {
complex: process.env.COMPLEX_ENTRY_UID,
medium: process.env.MEDIUM_ENTRY_UID,
simple: process.env.SIMPLE_ENTRY_UID,
selfReferencing: process.env.SELF_REF_ENTRY_UID,
complexBlocks: process.env.COMPLEX_BLOCKS_ENTRY_UID
},

// Variant configuration
variants: {
variantUID: process.env.VARIANT_UID
},

// Asset configuration
assets: {
imageUID: process.env.IMAGE_ASSET_UID
},

// Taxonomy configuration (generic country-based taxonomies with terms from .env)
taxonomies: {
usa: {
uid: 'usa',
term: process.env.TAX_USA_STATE
},
india: {
uid: 'india',
term: process.env.TAX_INDIA_STATE
}
},

// Locale configurations (standard/common locale codes)
locales: {
primary: 'en-us',
secondary: 'fr-fr',
japanese: 'ja-jp'
},

// Global field UIDs (values from environment variables, keys are descriptive)
globalFields: {
seo: process.env.GLOBAL_FIELD_SIMPLE, // Simple global field
gallery: process.env.GLOBAL_FIELD_MEDIUM, // Medium complexity
content_block: process.env.GLOBAL_FIELD_COMPLEX, // Complex global field
video_experience: process.env.GLOBAL_FIELD_VIDEO, // Video field
referenced_data: 'referenced_data' // Generic field name (optional)
},

// Reference field name (generic/common field name)
referenceFields: {
author: 'author'
}
};
Loading
Loading