Skip to content

Commit e7314a3

Browse files
authored
Merge pull request #2335 from contentstack/fix/DX-3932
Fix: Removed Unused code
2 parents 5806d56 + 19fe62b commit e7314a3

File tree

12 files changed

+651
-905
lines changed

12 files changed

+651
-905
lines changed

.talismanrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fileignoreconfig:
22
- filename: packages/contentstack-export-to-csv/src/types/index.ts
33
checksum: 28c19efb0c13969d40df964f86fa6de444316e320801f19dee7392df7a36851d
44
- filename: package-lock.json
5-
checksum: 62632519fd82d3941a5e7434fd86a3daf122d7922d765b27147c43ef08f01d87
5+
checksum: 8622177c9f0bd80a3cedcb2e562ee0a9bb24436fea4c96724277b42d8c813496
66
- filename: pnpm-lock.yaml
7-
checksum: 7615fbce5f716d889b6558fb06df28d1f34c9e2af7225eb22ed23e2817d6dd69
7+
checksum: ace2f01074f779a648ca15f76cde1b88489e2f7f741fb469772ad706209c0fe9
88
version: '1.0'

package-lock.json

Lines changed: 77 additions & 77 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/contentstack-auth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@contentstack/cli-auth",
33
"description": "Contentstack CLI plugin for authentication activities",
4-
"version": "1.7.2",
4+
"version": "1.7.3",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"scripts": {

packages/contentstack-auth/src/utils/auth-handler.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -182,36 +182,6 @@ class AuthHandler {
182182
}
183183
});
184184
}
185-
186-
/**
187-
* Validate token
188-
* @param {string} authtoken
189-
* @returns {Promise} Promise object returns response object from Contentstack
190-
*/
191-
async validateAuthtoken(authtoken: string): Promise<object> {
192-
log.debug('Starting token validation.', { module: 'auth-handler', hasAuthToken: !!authtoken });
193-
194-
return new Promise((resolve, reject) => {
195-
if (authtoken) {
196-
log.debug('Making token validation API call.', { module: 'auth-handler' });
197-
198-
this._client
199-
.getUser()
200-
.then((user: object) => {
201-
log.debug('Token validation successful.', { module: 'auth-handler', user });
202-
resolve(user);
203-
})
204-
.catch((error: Error) => {
205-
log.debug('Token validation failed.', { module: 'auth-handler', error: error.message });
206-
cliux.print('CLI_AUTH_TOKEN_VALIDATION_FAILED', { color: 'yellow' });
207-
reject(error);
208-
});
209-
} else {
210-
log.debug('Token validation failed: no auth token provided.', { module: 'auth-handler' });
211-
reject(new Error(messageHandler.parse('CLI_AUTH_TOKEN_VALIDATION_NO_TOKEN')));
212-
}
213-
});
214-
}
215185
}
216186

217187
export default new AuthHandler();
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
export { default as authHandler } from './auth-handler';
22
export { default as mfaHandler } from './mfa-handler';
33
export * as interactive from './interactive';
4-
export * as tokenValidation from './tokens-validation';

0 commit comments

Comments
 (0)