Skip to content

DX | 07-07-2025 | Release #198

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

Draft
wants to merge 51 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
ce13368
Merge pull request #52 from contentstack/main
harshithad0703 Sep 13, 2024
9ecb7d4
updated api test cases
harshithad0703 Sep 18, 2024
4aa32e2
Merge pull request #54 from contentstack/test/dx-693-sanity-test-cases
harshithad0703 Sep 18, 2024
0b6c073
updated test cases to run sanity
harshithad0703 Oct 23, 2024
e7825e2
added slack channel integration for sanity reports
harshithad0703 Oct 23, 2024
8ab67ea
update API test cases to check for defined titles instead of specific…
harshithad0703 Apr 9, 2025
18e1406
add Slack integration for sending sanity report notifications
harshithad0703 Apr 9, 2025
f9513b0
refactor: simplify sanity report test command in package.json
harshithad0703 Apr 9, 2025
22273d9
chore: testing slack notification for sanity report
AniketDev7 Apr 9, 2025
52977a5
chore: message updated
AniketDev7 Apr 9, 2025
ad83ad9
chore: updated the report url
AniketDev7 Apr 9, 2025
889e201
updated slack notif title for TS SDK
AniketDev7 Apr 10, 2025
5af0384
chore: updated slack notif
AniketDev7 Apr 10, 2025
08c3a63
Merge branch 'fix/sanity-test-cases' into test/sanity-update
harshithad0703 Apr 23, 2025
60bc1d0
update packege-lock
harshithad0703 Apr 23, 2025
6820edf
fix: include region in Slack message header
harshithad0703 May 12, 2025
30055b7
fix: update region extraction regex to match CDN instead of API
harshithad0703 May 12, 2025
59e9217
slack msg: set default region to AWS-NA in sanity report
harshithad0703 May 13, 2025
da16f11
Merge branch 'development' into test/sanity-update
harshithad0703 May 19, 2025
c46d34d
Merge pull request #187 from contentstack/main
harshithad0703 Jun 13, 2025
e19a4df
Merge pull request #188 from contentstack/staging
harshithad0703 Jun 13, 2025
a41d0c6
Added AWS-AU support
ntrjpatel Jun 30, 2025
c522698
Merge branch 'main' into development
ntrjpatel Jun 30, 2025
f0b80ab
Fixed Unit test cases
ntrjpatel Jun 30, 2025
c417dec
Updated talisman file
ntrjpatel Jun 30, 2025
e44b39f
Update test/unit/persistance/preference-store.spec.ts
netrajpatel Jun 30, 2025
47ed3c8
Merge branch 'development' into test/sanity-update
harshithad0703 Jul 1, 2025
ae411b4
Complete previous merge
harshithad0703 Jul 1, 2025
9bacb12
Merge pull request #183 from contentstack/test/sanity-update
harshithad0703 Jul 1, 2025
06fd23b
fix: add error handling for live preview query
harshithad0703 Jul 1, 2025
0865555
fix: update .talismanrc to include live preview test file
harshithad0703 Jul 1, 2025
f2d796b
Merge pull request #191 from contentstack/fix/live-preview-test
harshithad0703 Jul 1, 2025
18edb41
fix: add error handling for live preview test case
harshithad0703 Jul 1, 2025
978f2e4
fix: add live preview test case to ignore list in talismanrc
harshithad0703 Jul 1, 2025
ca4cea3
Merge pull request #192 from contentstack/fix/live-preview-test-case
harshithad0703 Jul 1, 2025
d87b850
fix: remove specific error assertions for live preview query entry AP…
harshithad0703 Jul 3, 2025
ce370dd
fix: add error handling for live preview query entry API tests to che…
harshithad0703 Jul 3, 2025
8ac60bf
Merge pull request #193 from contentstack/fix/lp-test-assertions
harshithad0703 Jul 3, 2025
1e0b396
Merge branch 'development' into feat/dx-3126
harshithad0703 Jul 3, 2025
e41d87e
Update .talismanrc
harshithad0703 Jul 3, 2025
6ee679b
Merge pull request #190 from contentstack/feat/dx-3126
harshithad0703 Jul 3, 2025
4a79224
Update .talismanrc
harshithad0703 Jul 3, 2025
f4664a2
Merge pull request #195 from contentstack/fix/update-talismanrc
netrajpatel Jul 3, 2025
29ff749
Merge staging to development
ntrjpatel Jul 3, 2025
c830b76
Updated talismanrc
ntrjpatel Jul 3, 2025
c54d168
Update test/api/live-preview.spec.ts
netrajpatel Jul 3, 2025
5bddfe1
update live preview assertion value
harshithad0703 Jul 3, 2025
c4ff057
Merge pull request #196 from contentstack/bw_merge
harshithad0703 Jul 3, 2025
fe6f575
Merge branch 'staging' into fix/conflicts
harshithad0703 Jul 3, 2025
4e25119
Merge pull request #197 from contentstack/fix/conflicts
harshithad0703 Jul 3, 2025
491e6e1
Merge pull request #194 from contentstack/development
harshithad0703 Jul 3, 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
41 changes: 17 additions & 24 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
fileignoreconfig:
- filename: .github/workflows/secrets-scan.yml
ignore_detectors:
- filecontent
- filename: src/lib/types.ts
checksum: 1eb6d6ec971934d65017dae2f82d6d6ef1cd0e6bfd50f43a9b46f30182307230
- filename: test/unit/image-transform.spec.ts
checksum: 7beabdd07bd35d620668fcd97e1a303b9cbc40170bf3008a376d75ce0895de2a
- filename: test/utils/mocks.ts
checksum: a1cb4b1890a584f1facd30f2a0974c97a66f91417022be79d00516338e244227
- filename: src/lib/query.ts
checksum: c4529069bc974d15c104303c5ae573c9341185a869c612ab07f0ee7f42e8b149
- filename: package-lock.json
checksum: f9c5af529a2c4c6576d67bd6c25dc6c3088ddedf2482757d382953f2d4521995
- filename: src/lib/entries.ts
checksum: 1c9a58570f26d3e53526e89b404581a523d3f035234bc099fda96d144dee40f6
- filename: src/lib/entry.ts
checksum: 8826fe3147a2c640b0780dae02345611ed24e562562e7df7b3785cb0fa6f1f14
- filename: .husky/pre-commit
checksum: 5baabd7d2c391648163f9371f0e5e9484f8fb90fa2284cfc378732ec3192c193
version: ""
fileignoreconfig:
- filename: package-lock.json
checksum: be08fac0b5e580b7dd66f5dc2b2f7bdefeef89b98ce60df1fe31ad33adb96172
version: "1.0"
- filename: test/unit/persistance/local-storage.spec.ts
checksum: da6638b676c34274279d80539983a5dfcf5e729ec65d6a535d7939b6ba7c9b58
- filename: test/unit/cache.spec.ts
checksum: cadf177ffc4ce8c271e8b49fd227947351afa7cade5c7cd902cda78d0f91ba5b
- filename: test/unit/persistance/preference-store.spec.ts
checksum: 0f3457f8ea8b149c5de1d6585c78eb4cea0d2ac00ca69cdc294c44fe29ea3c11
- filename: test/unit/contentstack.spec.ts
checksum: 267e4857af531bd3e5f080c3630922169a0c161355a6b185f1ee2716c5e60c45
- filename: test/unit/utils.spec.ts
checksum: b447bcd7d3b4ff83846dc0f492f1c7f52f80c46f341aabbf7570a16ed17d8232
- filename: src/lib/types.ts
checksum: a5e87bfe625b8cef8714545c07cfbe3ea05b07c8cb495fef532c610b37d82140
- filename: test/unit/persistance/preference-store.spec.ts
checksum: 5d31522fb28b95b0b243b8f3d8499dcf4c5c80c0ea24f895802a724136985e37
- filename: test/api/live-preview.spec.ts
checksum: 42b72f54a8c51fc9f98c6044a78d1435388972522763af6bf36f066ff2dc555c
version: "1.0"
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Version: 4.8.0
#### Date: June-30-2025
Enh: Added AWS-EU support

### Version: 4.7.1
#### Date: June-13-2025
- Add encode option on find method to encode query params
Expand Down Expand Up @@ -38,11 +42,11 @@ Fix: removed node-localstorage
#### Date: October-21-2024
Fix: getData to receive params and headers both in data
Enh: Node version bump
Refactor: Package type changed to be module instead of CommonJS
Refactor: Package type changed to be module instead of CommonJS

### Version: 4.3.0
#### Date: Septmber-09-2024
Feat: Include refernce accepts array of values
Feat: Include refernce accepts array of values

### Version: 4.2.0
#### Date: Septmber-04-2024
Expand Down Expand Up @@ -75,7 +79,7 @@ Custom host implementation

### Version: 4.0.1
#### Date: May-20-2024
Fixed SRE vulnerabilities
Fixed SRE vulnerabilities

### Version: 4.0.0
#### Date: April-23-2024
Expand Down
4 changes: 2 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable */
export default {
displayName: 'contentstack-delivery',
preset: './jest.preset.js',
displayName: "contentstack-delivery",
preset: "./jest.preset.js",
transform: {
"^.+\\.[tj]s$": [
"ts-jest",
Expand Down
9 changes: 3 additions & 6 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/delivery-sdk",
"version": "4.7.1",
"version": "4.8.0",
"type": "module",
"license": "MIT",
"main": "./dist/legacy/index.cjs",
Expand Down
10 changes: 9 additions & 1 deletion sanity-report.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,16 @@ console.log(`Failed Tests: ${failedTests}`);
console.log(`Skipped Tests: ${skippedTests}`);
console.log(`Total Duration: ${totalDurationMinutes}m ${totalDurationSeconds.toFixed(0)}s`);

const host = process.env.HOST || ''
let region = 'AWS-NA'

const match = host.match(/^([^-]+(?:-[^-]+)*)-cdn/)
if (match && match[1]) {
region = match[1].toUpperCase()
}

const slackMessage = `
*Typescript CDA Report*
*Typescript CDA Report - ${region}*
• Total Suites: *${totalSuites}*
• Total Tests: *${totalTests}*
• Passed Tests: *${passedTests}*
Expand Down
159 changes: 80 additions & 79 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
/* eslint-disable @cspell/spellchecker */
import { HttpClientParams } from '@contentstack/core';
import { PersistanceStoreOptions, StorageType } from '../persistance';
import { HttpClientParams } from "@contentstack/core";
import { PersistanceStoreOptions, StorageType } from "../persistance";

// Internal Types
export type params = {
[key: string]: any
}
[key: string]: any;
};

export type queryParams = {
[key: string]: string | boolean | number | string[]
}
export type queryParams = {
[key: string]: string | boolean | number | string[];
};

// External Types
export enum Region {
US = 'us',
EU = 'eu',
AZURE_NA = 'azure-na',
AZURE_EU = 'azure-eu',
GCP_NA = 'gcp-na',
GCP_EU = 'gcp-eu',
US = "us",
EU = "eu",
AU = "au",
AZURE_NA = "azure-na",
AZURE_EU = "azure-eu",
GCP_NA = "gcp-na",
GCP_EU = "gcp-eu",
}
export interface StackConfig extends HttpClientParams {
host?: string;
Expand All @@ -42,24 +43,24 @@ export interface CacheOptions extends PersistanceStoreOptions {
}

export enum Policy {
IGNORE_CACHE = 'IGNORE_CACHE',
CACHE_THEN_NETWORK = 'CACHE_THEN_NETWORK',
CACHE_ELSE_NETWORK = 'CACHE_ELSE_NETWORK',
NETWORK_ELSE_CACHE = 'NETWORK_ELSE_CACHE',
IGNORE_CACHE = "IGNORE_CACHE",
CACHE_THEN_NETWORK = "CACHE_THEN_NETWORK",
CACHE_ELSE_NETWORK = "CACHE_ELSE_NETWORK",
NETWORK_ELSE_CACHE = "NETWORK_ELSE_CACHE",
}

export interface SyncStack {
paginationToken?: string;
syncToken?: string;
}
export enum PublishType {
ENTRY_PUBLISHED = 'entry_published',
ENTRY_UNPUBLISHED = 'entry_unpublished',
ENTRY_DELETED = 'entry_deleted',
ASSET_PUBLISHED = 'asset_published',
ASSET_UNPUBLISHED = 'asset_unpublished',
ASSET_DELETED = 'asset_deleted',
CONTENT_TYPE_DELETED = 'content_type_deleted',
ENTRY_PUBLISHED = "entry_published",
ENTRY_UNPUBLISHED = "entry_unpublished",
ENTRY_DELETED = "entry_deleted",
ASSET_PUBLISHED = "asset_published",
ASSET_UNPUBLISHED = "asset_unpublished",
ASSET_DELETED = "asset_deleted",
CONTENT_TYPE_DELETED = "content_type_deleted",
}
export interface SyncType {
environment?: string;
Expand All @@ -71,25 +72,25 @@ export interface SyncType {
export type TransformData = { [key: string]: string | string[] };

export enum Format {
GIF = 'gif',
PNG = 'png',
JPG = 'jpg',
PJPG = 'pjpg',
WEBP = 'webp',
WEBPLL = 'webpll',
WEBPLY = 'webply',
GIF = "gif",
PNG = "png",
JPG = "jpg",
PJPG = "pjpg",
WEBP = "webp",
WEBPLL = "webpll",
WEBPLY = "webply",
}

export enum CropBy {
DEFAULT = 'default',
ASPECTRATIO = 'aspectRatio',
REGION = 'region',
OFFSET = 'offset',
DEFAULT = "default",
ASPECTRATIO = "aspectRatio",
REGION = "region",
OFFSET = "offset",
}

export enum FitBy {
BOUNDS = 'bounds',
CROP = 'crop',
BOUNDS = "bounds",
CROP = "crop",
}

export enum Orientation {
Expand All @@ -104,53 +105,53 @@ export enum Orientation {
}

export enum OverlayAlign {
TOP = 'top',
BOTTOM = 'bottom',
LEFT = 'left',
RIGHT = 'right',
MIDDLE = 'middle',
CENTER = 'center',
TOP = "top",
BOTTOM = "bottom",
LEFT = "left",
RIGHT = "right",
MIDDLE = "middle",
CENTER = "center",
}

export enum OverlayRepeat {
X = 'x',
Y = 'y',
BOTH = 'both',
X = "x",
Y = "y",
BOTH = "both",
}

export enum ResizeFilter {
NEAREST = 'nearest',
BILINEAR = 'bilinear',
BICUBIC = 'bicubic',
LANCZOS2 = 'lanczos2',
LANCZOS3 = 'lanczos3',
NEAREST = "nearest",
BILINEAR = "bilinear",
BICUBIC = "bicubic",
LANCZOS2 = "lanczos2",
LANCZOS3 = "lanczos3",
}

export enum CanvasBy {
DEFAULT = 'default',
ASPECTRATIO = 'aspectRatio',
REGION = 'region',
OFFSET = 'offset',
DEFAULT = "default",
ASPECTRATIO = "aspectRatio",
REGION = "region",
OFFSET = "offset",
}

export enum QueryOperation {
EQUALS = '',
NOT_EQUALS = '$ne',
INCLUDES = '$in',
EXCLUDES = '$nin',
IS_LESS_THAN = '$lt',
IS_LESS_THAN_OR_EQUAL = '$lte',
IS_GREATER_THAN = '$gt',
IS_GREATER_THAN_OR_EQUAL = '$gte',
EXISTS = '$exists',
MATCHES = '$regex',
EQUALS = "",
NOT_EQUALS = "$ne",
INCLUDES = "$in",
EXCLUDES = "$nin",
IS_LESS_THAN = "$lt",
IS_LESS_THAN_OR_EQUAL = "$lte",
IS_GREATER_THAN = "$gt",
IS_GREATER_THAN_OR_EQUAL = "$gte",
EXISTS = "$exists",
MATCHES = "$regex",
}

export enum TaxonomyQueryOperation {
ABOVE = '$above',
BELOW = '$below',
EQ_ABOVE = '$eq_above',
EQ_BELOW = '$eq_below'
ABOVE = "$above",
BELOW = "$below",
EQ_ABOVE = "$eq_above",
EQ_BELOW = "$eq_below",
}

export type BaseQueryParameters = {
Expand All @@ -162,8 +163,8 @@ export type BaseQueryParameters = {
};

export enum QueryOperator {
AND = '$and',
OR = '$or',
AND = "$and",
OR = "$or",
}

export type PaginationObj = {
Expand Down Expand Up @@ -267,18 +268,18 @@ export interface FindResponse<T> {
content_types?: T[];
assets?: T[];
global_fields?: T[];
count?: number
count?: number;
}

export interface LivePreviewQuery {
live_preview: string
live_preview: string;
include_applied_variants?: boolean;
contentTypeUid?: string
content_type_uid?: string
entry_uid?: string
contentTypeUid?: string;
content_type_uid?: string;
entry_uid?: string;
entryUid?: any;
preview_timestamp?: string
release_id?: string
preview_timestamp?: string;
release_id?: string;
}

export type LivePreview = {
Expand All @@ -290,4 +291,4 @@ export type LivePreview = {
enable: boolean;
management_token?: string;
preview_token?: string;
}
};
Loading
Loading