@itentialopensource/adapter-azure_devops 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
package/adapter.js
CHANGED
|
@@ -5994,12 +5994,15 @@ class AzureDevops extends AdapterBaseCl {
|
|
|
5994
5994
|
* @param {string} organization - The name of the Azure DevOps organization.
|
|
5995
5995
|
* @param {string} repositoryId - The name or ID of the repository.
|
|
5996
5996
|
* @param {string} project - Project ID or project name
|
|
5997
|
+
* @param {string} [itemPath] - The item path.
|
|
5997
5998
|
* @param {string} [scopePath] - The path scope. The default is null.
|
|
5998
5999
|
* @param {string} [recursionLevel] - The recursion level of this request. The default is 'none', no recursion.
|
|
5999
6000
|
* @param {boolean} [includeContentMetadata] - Set to true to include content metadata. Default is false.
|
|
6000
6001
|
* @param {boolean} [latestProcessedChange] - Set to true to include the latest changes. Default is false.
|
|
6001
6002
|
* @param {boolean} [download] - Set to true to download the response as a file. Default is false.
|
|
6002
6003
|
* @param {boolean} [includeLinks] - Set to true to include links to items. Default is false.
|
|
6004
|
+
* @param {boolean} [includeContent] - Set to true to include item content when requesting json. Default is false.
|
|
6005
|
+
* @param {boolean} [resolveLfs] - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
|
|
6003
6006
|
* @param {string} [format] - If specified, this overrides the HTTP Accept request header to return either 'json' or 'zip'. If $format is specified, then api-version should also be specified as a quer...(description truncated)
|
|
6004
6007
|
* @param {string} [versionDescriptorVersion] - Version string identifier (name of tag\/branch, SHA1 of commit)
|
|
6005
6008
|
* @param {string} [versionDescriptorVersionOptions] - Version options - Specify additional modifiers to version (e.g Previous)
|
|
@@ -6013,7 +6016,7 @@ class AzureDevops extends AdapterBaseCl {
|
|
|
6013
6016
|
* @task true
|
|
6014
6017
|
*/
|
|
6015
6018
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
6016
|
-
itemsList(organization, repositoryId, project, scopePath, recursionLevel = 'none', includeContentMetadata, latestProcessedChange, download, includeLinks, format, versionDescriptorVersion, versionDescriptorVersionOptions = 'none', versionDescriptorVersionType = 'branch', apiVersion, callback) {
|
|
6019
|
+
itemsList(organization, repositoryId, project, itemPath, scopePath, recursionLevel = 'none', includeContentMetadata, latestProcessedChange, download, includeLinks, includeContent, resolveLfs, format, versionDescriptorVersion, versionDescriptorVersionOptions = 'none', versionDescriptorVersionType = 'branch', apiVersion, callback) {
|
|
6017
6020
|
const meth = 'adapter-itemsList';
|
|
6018
6021
|
const origin = `${this.id}-${meth}`;
|
|
6019
6022
|
log.trace(origin);
|
|
@@ -6045,9 +6048,14 @@ class AzureDevops extends AdapterBaseCl {
|
|
|
6045
6048
|
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6046
6049
|
return callback(null, errorObj);
|
|
6047
6050
|
}
|
|
6051
|
+
if (itemPath === undefined || itemPath === null || itemPath === '') {
|
|
6052
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['itemPath'], null, null, null);
|
|
6053
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
6054
|
+
return callback(null, errorObj);
|
|
6055
|
+
}
|
|
6048
6056
|
|
|
6049
6057
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
6050
|
-
const queryParamsAvailable = { scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, includeLinks, format, versionDescriptorVersion, versionDescriptorVersionOptions, versionDescriptorVersionType, apiVersion };
|
|
6058
|
+
const queryParamsAvailable = { itemPath, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, includeLinks, includeContent, resolveLfs, format, versionDescriptorVersion, versionDescriptorVersionOptions, versionDescriptorVersionType, apiVersion };
|
|
6051
6059
|
const queryParams = {};
|
|
6052
6060
|
const pathVars = [organization, project, repositoryId];
|
|
6053
6061
|
const bodyVars = {};
|
|
@@ -15,6 +15,17 @@
|
|
|
15
15
|
],
|
|
16
16
|
"external_name": "ph_request_type"
|
|
17
17
|
},
|
|
18
|
+
"itemPath": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "The item path.",
|
|
21
|
+
"parse": false,
|
|
22
|
+
"encode": false,
|
|
23
|
+
"encrypt": {
|
|
24
|
+
"type": "AES",
|
|
25
|
+
"key": ""
|
|
26
|
+
},
|
|
27
|
+
"external_name": "path"
|
|
28
|
+
},
|
|
18
29
|
"apiVersion": {
|
|
19
30
|
"type": "string",
|
|
20
31
|
"description": "Version of the API to use. This should be set to '6.1-preview.1' to use this version of the api.",
|
package/package.json
CHANGED
package/pronghorn.json
CHANGED
|
@@ -27617,6 +27617,16 @@
|
|
|
27617
27617
|
"type": "string"
|
|
27618
27618
|
}
|
|
27619
27619
|
},
|
|
27620
|
+
{
|
|
27621
|
+
"name": "itemPath",
|
|
27622
|
+
"type": "string",
|
|
27623
|
+
"info": "The item path.",
|
|
27624
|
+
"required": true,
|
|
27625
|
+
"schema": {
|
|
27626
|
+
"title": "itemPath",
|
|
27627
|
+
"type": "string"
|
|
27628
|
+
}
|
|
27629
|
+
},
|
|
27620
27630
|
{
|
|
27621
27631
|
"name": "scopePath",
|
|
27622
27632
|
"type": "string",
|
|
@@ -27677,6 +27687,26 @@
|
|
|
27677
27687
|
"type": "boolean"
|
|
27678
27688
|
}
|
|
27679
27689
|
},
|
|
27690
|
+
{
|
|
27691
|
+
"name": "includeContent",
|
|
27692
|
+
"type": "boolean",
|
|
27693
|
+
"info": "Set to true to include item content when requesting json. Default is false.",
|
|
27694
|
+
"required": false,
|
|
27695
|
+
"schema": {
|
|
27696
|
+
"title": "includeContent",
|
|
27697
|
+
"type": "boolean"
|
|
27698
|
+
}
|
|
27699
|
+
},
|
|
27700
|
+
{
|
|
27701
|
+
"name": "resolveLfs",
|
|
27702
|
+
"type": "boolean",
|
|
27703
|
+
"info": "Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.",
|
|
27704
|
+
"required": false,
|
|
27705
|
+
"schema": {
|
|
27706
|
+
"title": "resolveLfs",
|
|
27707
|
+
"type": "boolean"
|
|
27708
|
+
}
|
|
27709
|
+
},
|
|
27680
27710
|
{
|
|
27681
27711
|
"name": "format",
|
|
27682
27712
|
"type": "string",
|
|
Binary file
|
|
@@ -3235,7 +3235,7 @@ describe('[integration] Azure_devops Adapter Test', () => {
|
|
|
3235
3235
|
describe('#itemsList - errors', () => {
|
|
3236
3236
|
it('should work if integrated or standalone with mockdata', (done) => {
|
|
3237
3237
|
try {
|
|
3238
|
-
a.itemsList('fakedata', 'fakedata', 'fakedata', null, null, null, null, null, null, null, null, null, null, 'fakedata', (data, error) => {
|
|
3238
|
+
a.itemsList('fakedata', 'fakedata', 'fakedata', 'fakedata', null, null, null, null, null, null, null, null, null, null, null, null, 'fakedata', (data, error) => {
|
|
3239
3239
|
try {
|
|
3240
3240
|
if (stub) {
|
|
3241
3241
|
runCommonAsserts(data, error);
|
|
@@ -5619,7 +5619,7 @@ describe('[unit] Azure_devops Adapter Test', () => {
|
|
|
5619
5619
|
}).timeout(attemptTimeout);
|
|
5620
5620
|
it('should error if - missing organization', (done) => {
|
|
5621
5621
|
try {
|
|
5622
|
-
a.itemsList(null, null, null, null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
5622
|
+
a.itemsList(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
5623
5623
|
try {
|
|
5624
5624
|
const displayE = 'organization is required';
|
|
5625
5625
|
runErrorAsserts(data, error, 'AD.300', 'Test-azure_devops-adapter-itemsList', displayE);
|
|
@@ -5636,7 +5636,7 @@ describe('[unit] Azure_devops Adapter Test', () => {
|
|
|
5636
5636
|
}).timeout(attemptTimeout);
|
|
5637
5637
|
it('should error if - missing repositoryId', (done) => {
|
|
5638
5638
|
try {
|
|
5639
|
-
a.itemsList('fakeparam', null, null, null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
5639
|
+
a.itemsList('fakeparam', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
5640
5640
|
try {
|
|
5641
5641
|
const displayE = 'repositoryId is required';
|
|
5642
5642
|
runErrorAsserts(data, error, 'AD.300', 'Test-azure_devops-adapter-itemsList', displayE);
|
|
@@ -5653,7 +5653,7 @@ describe('[unit] Azure_devops Adapter Test', () => {
|
|
|
5653
5653
|
}).timeout(attemptTimeout);
|
|
5654
5654
|
it('should error if - missing project', (done) => {
|
|
5655
5655
|
try {
|
|
5656
|
-
a.itemsList('fakeparam', 'fakeparam', null, null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
5656
|
+
a.itemsList('fakeparam', 'fakeparam', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
5657
5657
|
try {
|
|
5658
5658
|
const displayE = 'project is required';
|
|
5659
5659
|
runErrorAsserts(data, error, 'AD.300', 'Test-azure_devops-adapter-itemsList', displayE);
|
|
@@ -5670,7 +5670,7 @@ describe('[unit] Azure_devops Adapter Test', () => {
|
|
|
5670
5670
|
}).timeout(attemptTimeout);
|
|
5671
5671
|
it('should error if - missing apiVersion', (done) => {
|
|
5672
5672
|
try {
|
|
5673
|
-
a.itemsList('fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', null, (data, error) => {
|
|
5673
|
+
a.itemsList('fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', null, (data, error) => {
|
|
5674
5674
|
try {
|
|
5675
5675
|
const displayE = 'apiVersion is required';
|
|
5676
5676
|
runErrorAsserts(data, error, 'AD.300', 'Test-azure_devops-adapter-itemsList', displayE);
|