-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #758 from HubSpot/refactor/theme-validation
Refactor theme validation
- Loading branch information
Showing
18 changed files
with
146 additions
and
1,169 deletions.
There are no files selected for viewing
This file contains 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,42 @@ | ||
const http = require('../http'); | ||
|
||
const VALIDATION_API_BASE = 'quality-engine/v1/validation'; | ||
|
||
/** | ||
* @param {number} accountId | ||
* @returns {Promise} | ||
*/ | ||
function requestValidation(accountId, body = {}) { | ||
return http.post(accountId, { | ||
uri: `${VALIDATION_API_BASE}/request`, | ||
body, | ||
}); | ||
} | ||
|
||
/** | ||
* @param {number} accountId | ||
* @returns {Promise} | ||
*/ | ||
function getValidationStatus(accountId, query = {}) { | ||
return http.get(accountId, { | ||
uri: `${VALIDATION_API_BASE}/status`, | ||
query, | ||
}); | ||
} | ||
|
||
/** | ||
* @param {number} accountId | ||
* @returns {Promise} | ||
*/ | ||
function getValidationResults(accountId, query = {}) { | ||
return http.get(accountId, { | ||
uri: `${VALIDATION_API_BASE}/results`, | ||
query, | ||
}); | ||
} | ||
|
||
module.exports = { | ||
requestValidation, | ||
getValidationStatus, | ||
getValidationResults, | ||
}; |
This file contains 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 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
28 changes: 0 additions & 28 deletions
28
packages/cli/lib/validators/__tests__/AbsoluteValidator.js
This file was deleted.
Oops, something went wrong.
101 changes: 0 additions & 101 deletions
101
packages/cli/lib/validators/__tests__/TemplateValidator.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.