-
Notifications
You must be signed in to change notification settings - Fork 0
Mocking @contentstack/cli-utilities to avoid ESM uuid issues and upgrade cli dependencies #159
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
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ada3a18
CL-1753 | + Anuja | + venky | feat: add rollback command for previous…
AryanBansal-launch 9980454
CL-1753 | enhance rollback command with deployment status polling and…
AryanBansal-launch 189764d
CL-1753 | add unit tests for rollback command and enhance environment…
AryanBansal-launch 3b9750a
CL-1753 | refactor rollback command: rename init method, enhance erro…
AryanBansal-launch b3aa64d
chore: upgrade @contentstack/cli-command and cli-utilities version an…
SakshiKoli-CS b815313
Merge pull request #152 from contentstack/CL-3760
SakshiKoli-CS 781d99d
Revert "CL-1753 | refactor rollback command: rename init method, enha…
AryanBansal-launch aa6f710
Revert "CL-1753 | add unit tests for rollback command and enhance env…
AryanBansal-launch ec5e3b0
Revert "CL-1753 | enhance rollback command with deployment status pol…
AryanBansal-launch f1bb6eb
Revert "CL-1753 | + Anuja | + venky | feat: add rollback command for …
AryanBansal-launch 8565cf5
Merge pull request #154 from contentstack/development
SakshiKoli-CS 060ad9a
test: mock @contentstack/cli-utilities so ESM uuid does not break the…
SakshiKoli-CS b529a38
Merge pull request #156 from contentstack/CL-4004
SakshiKoli-CS 4fa7cc5
Merge pull request #157 from contentstack/development
SakshiKoli-CS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,4 +25,10 @@ export default tseslint.config( | |
| ] | ||
| }, | ||
| }, | ||
| { | ||
| files: ['src/**/*.test.ts'], | ||
| rules: { | ||
| 'max-len': 'off', | ||
| }, | ||
| }, | ||
| ); | ||
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| import { Args, Command, Errors, Flags, Interfaces } from '@oclif/core'; | ||
|
|
||
| class CLIError extends Error {} | ||
|
|
||
| export const launchCommand = { | ||
| Args, | ||
| Command, | ||
| Errors, | ||
| Flags, | ||
| Interfaces, | ||
| CLIError, | ||
| cliux: { | ||
| inquire: jest.fn(), | ||
| print: jest.fn(), | ||
| loader: jest.fn(), | ||
| registerSearchPlugin: jest.fn(), | ||
| }, | ||
| configHandler: { get: jest.fn() }, | ||
| authHandler: { | ||
| compareOAuthExpiry: jest.fn().mockResolvedValue(undefined), | ||
| host: '', | ||
| }, | ||
| HttpClient: jest.fn(), | ||
| ContentstackClient: jest.fn(), | ||
| isAuthenticated: jest.fn().mockReturnValue(true), | ||
| managementSDKClient: jest.fn(), | ||
| managementSDKInitiator: jest.fn(), | ||
| }; | ||
|
|
||
| export const fileUploadAdapter = { | ||
| cliux: { | ||
| inquire: jest.fn(), | ||
| loader: jest.fn(), | ||
| print: jest.fn(), | ||
| registerSearchPlugin: jest.fn(), | ||
| confirm: jest.fn(), | ||
| prompt: jest.fn(), | ||
| styledJSON: jest.fn(), | ||
| table: jest.fn(), | ||
| }, | ||
| configHandler: { get: jest.fn() }, | ||
| HttpClient: jest.fn(), | ||
| ContentstackClient: jest.fn(), | ||
| authHandler: { | ||
| compareOAuthExpiry: jest.fn().mockResolvedValue(undefined), | ||
| host: '', | ||
| }, | ||
| }; | ||
|
|
||
| export const githubAdapter = { | ||
| cliux: { | ||
| inquire: jest.fn(), | ||
| print: jest.fn(), | ||
| loader: jest.fn(), | ||
| registerSearchPlugin: jest.fn(), | ||
| confirm: jest.fn(), | ||
| prompt: jest.fn(), | ||
| styledJSON: jest.fn(), | ||
| table: jest.fn(), | ||
| }, | ||
| configHandler: { get: jest.fn() }, | ||
| ContentstackClient: jest.fn(), | ||
| authHandler: { | ||
| compareOAuthExpiry: jest.fn().mockResolvedValue(undefined), | ||
| host: '', | ||
| }, | ||
| }; | ||
|
|
||
| export const baseClassAdapter = { | ||
| cliux: { | ||
| inquire: jest.fn(), | ||
| table: jest.fn(), | ||
| print: jest.fn(), | ||
| loader: jest.fn(), | ||
| registerSearchPlugin: jest.fn(), | ||
| confirm: jest.fn(), | ||
| prompt: jest.fn(), | ||
| styledJSON: jest.fn(), | ||
| }, | ||
| ContentstackClient: jest.fn(), | ||
| configHandler: { get: jest.fn() }, | ||
| authHandler: { | ||
| compareOAuthExpiry: jest.fn().mockResolvedValue(undefined), | ||
| host: '', | ||
| }, | ||
| }; | ||
|
|
||
| export const functionsCommand = {}; | ||
|
|
||
| export const logPolling = { | ||
| cliux: { | ||
| loaderV2: jest.fn(() => ({})), | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,5 +12,8 @@ | |
| }, | ||
| "include": [ | ||
| "src/**/*" | ||
| ], | ||
| "exclude": [ | ||
| "src/test/**" | ||
| ] | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.