Skip to content

Fix/cs 43301 merge live preview #127

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 30 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bcb43d2
feat: Support new REST preview service
Deepak-Kharah Oct 23, 2023
7803e7f
feat: make management token optional
Deepak-Kharah Oct 26, 2023
a2f8f84
test: test live preview changes
Deepak-Kharah Oct 26, 2023
8bee6a0
chore: remove failing workflow
Deepak-Kharah Oct 26, 2023
d8c0729
feat: use separate header for preview token
Deepak-Kharah Nov 8, 2023
e831040
refactor: remove logs
Deepak-Kharah Nov 8, 2023
6453bb4
Merge pull request #1 from Deepak-Kharah/EB-550-add-preveiew-token-he…
Deepak-Kharah Nov 8, 2023
645f388
feat: add live preview hash in header
Deepak-Kharah Nov 8, 2023
98d4ab1
fix: typo in the interface name
Deepak-Kharah Nov 22, 2023
82c6d2a
Merge pull request #2 from Deepak-Kharah/EB-634-typo-in-the-interface
Deepak-Kharah Nov 23, 2023
5ef8408
Merge remote-tracking branch 'upstream/master' into VC-311-changes-fo…
Deepak-Kharah Dec 1, 2023
7a3e454
chore: add sca scan
Deepak-Kharah Dec 8, 2023
e9788b4
feat: remove live preview optimization for live editor
Deepak-Kharah Dec 12, 2023
b9faa4b
Merge pull request #3 from Deepak-Kharah/EB-749-remove-live-preview-o…
Deepak-Kharah Dec 12, 2023
0763916
feat: remove caching
Deepak-Kharah Dec 14, 2023
547cbe5
feat: remove content type check from find queries.
Deepak-Kharah Dec 14, 2023
85beba7
fix: add hash check
Deepak-Kharah Dec 14, 2023
d0d2bbd
Merge pull request #4 from Deepak-Kharah/EB-749-remove-live-preview-o…
Deepak-Kharah Jan 11, 2024
65f32fb
V3 (#118)
sunil-lakshman Jan 16, 2024
c90546f
Merge branch 'master' into next
aravindbuilt Jan 16, 2024
9fdcf2d
V3 (#118) (#119)
sunil-lakshman Jan 16, 2024
c0cfcc6
Updated this branch by pulling changes from master branch
harshithad0703 Jan 19, 2024
7c502f3
test: Fixed the failing test case
harshithad0703 Jan 19, 2024
8d845b8
Merge branch 'master' into VC-311-changes-for-rest-preview-service
harshithad0703 Jan 19, 2024
9aa21a2
Merge branch 'next' into VC-311-changes-for-rest-preview-service
harshithad0703 Jan 19, 2024
4564971
Revert "Updated this branch by pulling changes from master branch"
harshithad0703 Jan 22, 2024
e29ecc8
Merge branch 'VC-311-changes-for-rest-preview-service' into fix/CS-43…
abhinav-from-contentstack Jan 22, 2024
1f5a7b7
updated .talismanrc
abhinav-from-contentstack Jan 22, 2024
06ce95a
fix: added preset-env for webpack web build
abhinav-from-contentstack Jan 22, 2024
f2fc054
fix: updated package-lock.json and .talismanrc
abhinav-from-contentstack Jan 22, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/sca-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --all-projects --fail-on=all
args: --all-projects --fail-on=all
4 changes: 3 additions & 1 deletion .talismanrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fileignoreconfig:
- filename: package-lock.json
checksum: b55c22a1b5dca347c79fea4cac3a0a3ea7487180cb21e4e3d5b2bbdf1981cebe
checksum: 227057b277330f78f01b86fbcb7cc622036cd9eebd5ad3c60b19f6b58e94ed91
- filename: test/typescript/taxonomy.test.ts
checksum: e4bdf633e147fd60d929d379f20c814eed5f68b11421d7b53ec8826e9142de37
- filename: src/core/modules/taxonomy.js
Expand All @@ -11,4 +11,6 @@ fileignoreconfig:
checksum: c88b336f9a271397ffedcf8c5085941ceb0bd1cd7e25ed9ada3acd8ce4f8970c
- filename: test/typescript/stack.test.ts
checksum: bbb3c425f8e1a63d4793f69ee9eaba9559294ff53f163a28f70ae54b1792276a
- filename: test/typescript/live-preview.test.ts
checksum: 57c355f5ad4070cbc3c35a2867487bef80c71be27079496e6997e0d2baec26ab
version: ""
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const config = {
},
live_preview: {
enable: false,
host: 'api.contentstack.io'
host: 'rest-preview.contentstack.com'
}
};

Expand Down
17 changes: 14 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,21 @@ export interface ContentTypeCollection {
count?: number
}

export interface LivePreview {
host: string
management_token: string
export type LivePreview = {
host?: string
enable: boolean
} & (LivePreivewConfigWithManagementToken | LivePreviewConfigWithPreviewToken)

export interface LivePreivewConfigWithManagementToken {
/**
* @deprecated Please use `preview_token` instead to enable live preview.
* The `management_token` will be removed in future releases.
*/
management_token: string;
}

export interface LivePreviewConfigWithPreviewToken {
preview_token: string;
}

export interface LivePreviewQuery {
Expand Down
Loading