@itentialopensource/adapter-azure_devops 0.1.6 → 0.1.8

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.
Files changed (121) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/adapter.js +5 -10
  3. package/package.json +1 -1
  4. package/pronghorn.json +8 -3
  5. package/refs?service=git-upload-pack +0 -0
  6. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/README.md +0 -59
  7. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/specificCallScript.js +0 -97
  8. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/update.js +0 -532
  9. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/adapter.js +0 -11651
  10. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/AnnotatedTags/action.json +0 -43
  11. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/AnnotatedTags/mockdatafiles/mockdata.json +0 -20817
  12. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/AnnotatedTags/schema.json +0 -125
  13. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Blobs/action.json +0 -43
  14. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Blobs/mockdatafiles/mockdata.json +0 -20817
  15. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Blobs/schema.json +0 -125
  16. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/CherryPicks/action.json +0 -64
  17. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/CherryPicks/mockdatafiles/mockdata.json +0 -20817
  18. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/CherryPicks/schema.json +0 -125
  19. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Commits/action.json +0 -85
  20. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Commits/mockdatafiles/mockdata.json +0 -20817
  21. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Commits/schema.json +0 -125
  22. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Diffs/action.json +0 -23
  23. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Diffs/mockdatafiles/mockdata.json +0 -20817
  24. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Diffs/schema.json +0 -125
  25. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Forks/action.json +0 -85
  26. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Forks/mockdatafiles/mockdata.json +0 -20817
  27. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Forks/schema.json +0 -125
  28. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/ImportRequests/action.json +0 -84
  29. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/ImportRequests/mockdatafiles/mockdata.json +0 -20817
  30. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/ImportRequests/schema.json +0 -125
  31. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Items/action.json +0 -43
  32. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Items/mockdatafiles/mockdata.json +0 -20817
  33. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Items/schema.json +0 -125
  34. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/MergeBases/action.json +0 -23
  35. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/MergeBases/mockdatafiles/mockdata.json +0 -20817
  36. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/MergeBases/schema.json +0 -125
  37. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Merges/action.json +0 -43
  38. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Merges/mockdatafiles/mockdata.json +0 -20817
  39. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Merges/schema.json +0 -125
  40. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PolicyConfigurations/action.json +0 -23
  41. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PolicyConfigurations/mockdatafiles/mockdata.json +0 -20817
  42. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PolicyConfigurations/schema.json +0 -125
  43. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestAttachments/action.json +0 -84
  44. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestAttachments/mockdatafiles/mockdata.json +0 -20817
  45. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestAttachments/schema.json +0 -125
  46. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestCommentLikes/action.json +0 -63
  47. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestCommentLikes/mockdatafiles/mockdata.json +0 -20817
  48. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestCommentLikes/schema.json +0 -125
  49. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestCommits/action.json +0 -44
  50. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestCommits/mockdatafiles/mockdata.json +0 -20817
  51. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestCommits/schema.json +0 -125
  52. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestIterationChanges/action.json +0 -23
  53. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestIterationChanges/mockdatafiles/mockdata.json +0 -20817
  54. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestIterationChanges/schema.json +0 -125
  55. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestIterationStatuses/action.json +0 -104
  56. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestIterationStatuses/mockdatafiles/mockdata.json +0 -20817
  57. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestIterationStatuses/schema.json +0 -125
  58. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestIterations/action.json +0 -44
  59. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestIterations/mockdatafiles/mockdata.json +0 -20817
  60. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestIterations/schema.json +0 -125
  61. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestLabels/action.json +0 -84
  62. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestLabels/mockdatafiles/mockdata.json +0 -20817
  63. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestLabels/schema.json +0 -125
  64. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestProperties/action.json +0 -43
  65. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestProperties/mockdatafiles/mockdata.json +0 -20817
  66. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestProperties/schema.json +0 -125
  67. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestQuery/action.json +0 -22
  68. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestQuery/mockdatafiles/mockdata.json +0 -20817
  69. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestQuery/schema.json +0 -125
  70. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestReviewers/action.json +0 -164
  71. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestReviewers/mockdatafiles/mockdata.json +0 -20817
  72. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestReviewers/schema.json +0 -125
  73. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestShare/action.json +0 -22
  74. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestShare/mockdatafiles/mockdata.json +0 -20817
  75. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestShare/schema.json +0 -125
  76. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestStatuses/action.json +0 -104
  77. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestStatuses/mockdatafiles/mockdata.json +0 -20817
  78. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestStatuses/schema.json +0 -125
  79. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestThreadComments/action.json +0 -104
  80. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestThreadComments/mockdatafiles/mockdata.json +0 -20817
  81. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestThreadComments/schema.json +0 -125
  82. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestThreads/action.json +0 -84
  83. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestThreads/mockdatafiles/mockdata.json +0 -20817
  84. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestThreads/schema.json +0 -125
  85. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestWorkItems/action.json +0 -23
  86. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestWorkItems/mockdatafiles/mockdata.json +0 -20817
  87. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequestWorkItems/schema.json +0 -125
  88. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequests/action.json +0 -126
  89. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequests/mockdatafiles/mockdata.json +0 -20817
  90. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/PullRequests/schema.json +0 -125
  91. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Pushes/action.json +0 -64
  92. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Pushes/mockdatafiles/mockdata.json +0 -20817
  93. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Pushes/schema.json +0 -125
  94. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Refs/action.json +0 -63
  95. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Refs/mockdatafiles/mockdata.json +0 -20817
  96. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Refs/schema.json +0 -125
  97. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/RefsFavorites/action.json +0 -84
  98. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/RefsFavorites/mockdatafiles/mockdata.json +0 -20817
  99. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/RefsFavorites/schema.json +0 -125
  100. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Repositories/action.json +0 -186
  101. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Repositories/mockdatafiles/mockdata.json +0 -20817
  102. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Repositories/schema.json +0 -125
  103. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Reverts/action.json +0 -64
  104. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Reverts/mockdatafiles/mockdata.json +0 -20817
  105. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Reverts/schema.json +0 -125
  106. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Stats/action.json +0 -23
  107. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Stats/mockdatafiles/mockdata.json +0 -20817
  108. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Stats/schema.json +0 -125
  109. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Statuses/action.json +0 -43
  110. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Statuses/mockdatafiles/mockdata.json +0 -20817
  111. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Statuses/schema.json +0 -125
  112. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Suggestions/action.json +0 -23
  113. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Suggestions/mockdatafiles/mockdata.json +0 -20817
  114. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Suggestions/schema.json +0 -125
  115. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Trees/action.json +0 -23
  116. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Trees/mockdatafiles/mockdata.json +0 -20817
  117. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/entities/Trees/schema.json +0 -125
  118. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/methods.json +0 -74975
  119. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/pronghorn.json +0 -11730
  120. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/test/integration/adapterTestIntegration.js +0 -5493
  121. package/adapter_modifications/archive/UPD-2022-04-29T13:05:13.710Z/updateFiles/components/test/unit/adapterTestUnit.js +0 -10889
package/CHANGELOG.md CHANGED
@@ -1,4 +1,20 @@
1
1
 
2
+ ## 0.1.8 [01-26-2023]
3
+
4
+ * Updated schema, inputs and removed adapter_modifications folder
5
+
6
+ See merge request itentialopensource/adapters/devops-netops/adapter-azure_devops!8
7
+
8
+ ---
9
+
10
+ ## 0.1.7 [01-26-2023]
11
+
12
+ * ADAPT-2530 - Change body format
13
+
14
+ See merge request itentialopensource/adapters/devops-netops/adapter-azure_devops!7
15
+
16
+ ---
17
+
2
18
  ## 0.1.6 [12-01-2022]
3
19
 
4
20
  * ADAPT-2476
package/adapter.js CHANGED
@@ -4206,7 +4206,7 @@ class AzureDevops extends AdapterBaseCl {
4206
4206
  const queryParamsAvailable = { filename, apiVersion };
4207
4207
  const queryParams = {};
4208
4208
  const pathVars = [organization, project, repositoryId];
4209
- const bodyVars = { body };
4209
+ const bodyVars = body;
4210
4210
 
4211
4211
  // loop in template. long callback arg name to avoid identifier conflicts
4212
4212
  Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
@@ -6048,11 +6048,6 @@ class AzureDevops extends AdapterBaseCl {
6048
6048
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6049
6049
  return callback(null, errorObj);
6050
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
- }
6056
6051
 
6057
6052
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
6058
6053
  const queryParamsAvailable = { itemPath, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, includeLinks, includeContent, resolveLfs, format, versionDescriptorVersion, versionDescriptorVersionOptions, versionDescriptorVersionType, apiVersion };
@@ -6494,7 +6489,7 @@ class AzureDevops extends AdapterBaseCl {
6494
6489
  const queryParamsAvailable = { apiVersion };
6495
6490
  const queryParams = {};
6496
6491
  const pathVars = [organization, project, repositoryId, pullRequestId, fileName];
6497
- const bodyVars = { body };
6492
+ const bodyVars = body;
6498
6493
 
6499
6494
  // loop in template. long callback arg name to avoid identifier conflicts
6500
6495
  Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
@@ -8634,7 +8629,7 @@ class AzureDevops extends AdapterBaseCl {
8634
8629
  const queryParamsAvailable = { apiVersion };
8635
8630
  const queryParams = {};
8636
8631
  const pathVars = [organization, project, repositoryId, pullRequestId];
8637
- const bodyVars = { body };
8632
+ const bodyVars = body;
8638
8633
 
8639
8634
  // loop in template. long callback arg name to avoid identifier conflicts
8640
8635
  Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
@@ -8964,7 +8959,7 @@ class AzureDevops extends AdapterBaseCl {
8964
8959
  const queryParamsAvailable = { apiVersion };
8965
8960
  const queryParams = {};
8966
8961
  const pathVars = [organization, project, repositoryId, pullRequestId];
8967
- const bodyVars = { body };
8962
+ const bodyVars = body;
8968
8963
 
8969
8964
  // loop in template. long callback arg name to avoid identifier conflicts
8970
8965
  Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
@@ -12243,7 +12238,7 @@ class AzureDevops extends AdapterBaseCl {
12243
12238
  const queryParamsAvailable = { projectId, apiVersion };
12244
12239
  const queryParams = {};
12245
12240
  const pathVars = [organization, project, repositoryId];
12246
- const bodyVars = { body };
12241
+ const bodyVars = body;
12247
12242
 
12248
12243
  // loop in template. long callback arg name to avoid identifier conflicts
12249
12244
  Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-azure_devops",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "This adapter integrates with system described as: Azure DevOps.",
5
5
  "main": "adapter.js",
6
6
  "systemName": "Microsoft Azure DevOps",
package/pronghorn.json CHANGED
@@ -27621,7 +27621,7 @@
27621
27621
  "name": "itemPath",
27622
27622
  "type": "string",
27623
27623
  "info": "The item path.",
27624
- "required": true,
27624
+ "required": false,
27625
27625
  "schema": {
27626
27626
  "title": "itemPath",
27627
27627
  "type": "string"
@@ -45770,8 +45770,13 @@
45770
45770
  }
45771
45771
  },
45772
45772
  "item": {
45773
- "description": "Current version.",
45774
- "type": "string"
45773
+ "description": "Path to item.",
45774
+ "type": "object",
45775
+ "properties": {
45776
+ "path" : {
45777
+ "type" : "string"
45778
+ }
45779
+ }
45775
45780
  },
45776
45781
  "newContent": {
45777
45782
  "description": "",
Binary file
@@ -1,59 +0,0 @@
1
- # Update
2
-
3
- This update script will update an adapter by appending or updating API calls selected for modification.
4
-
5
- Calls can be selected for change within an adapter by providing a specification document to the Update Tool in the adapter-engine and choosing which calls to modify via the CLI or adapter-wizard (to be implemented in later versions).
6
-
7
- Ability to properly delete API calls via this update script will be implemented in the future.
8
-
9
- ## Usage
10
-
11
- Navigate to the directory of the adapter you want to update. If necessary, move an adapter-modifications folder generated by the Update Tool into the adapter directory.
12
-
13
- ```
14
- cd adapter_modifications
15
-
16
- node update.js {sub-directory name}
17
- ```
18
-
19
- The second argument in the above command should be identical to the name of a immediate sub-directory within adapter-modifications. The provided directory should contain the components required to update a certain adapter.
20
-
21
- The name of this folder is initialized based on the specification document you provide as input to the Update Tool. If you rename that folder, you will need to reflect that change in the given command argument.
22
-
23
- Running this command will update the adapter and run unit and integration tests. If updated correctly, the adapter should pass all tests.
24
-
25
- In order to pass all tests, note that adapter names should be formatted as: 'adapter-name'. Names such as 'adapter-name-test' or similar will cause the tests to error at this point in time.
26
-
27
- ## Directory Structure
28
-
29
- A sub-directory within adapter-modifications should have the following file structure:
30
-
31
- ```
32
- {name of sub-directory}
33
- -- components
34
- -- adapter.js
35
- -- entities
36
- -- {entity name}
37
- -- schema.json
38
- -- action.json
39
- -- mockdatafiles
40
- -- mockdata.json
41
- -- pronghorn.json
42
- -- test
43
- -- unit
44
- -- adapterTestUnit.js
45
- -- integration
46
- -- adapterTestIntegration.js
47
- ```
48
-
49
- Each of these files contains the changes to their adapter equivalents that are enacted when an adapter is updated.
50
-
51
- Note that depending on how many calls are being updated, the number of sub-directories within entities/ will vary. Each entity sub-directory will have its own action.json, schema.json, and mockdatafiles/ directory.
52
-
53
- ## Linting
54
-
55
- If this is an adapter built prior to update capabilities being added (9/2020) you may need to add a line to the .eslintignore (adapter_modifications/*) to ignore any lint errors in the update files. These files have lint errors because they are parital js files.
56
-
57
- ## Testing
58
-
59
- Refer to the adapter's README file to perform unit and integration tests post-update. Integration tests can be performed in standalone or integrated mode.
@@ -1,97 +0,0 @@
1
- /* @copyright Itential, LLC 2019 */
2
-
3
- /* eslint prefer-destructuring:warn */
4
- /* eslint prefer-template:warn */
5
-
6
- // const updateScript = require('update.js');
7
- const fs = require('fs-extra');
8
- const path = require('path');
9
-
10
- const folder = process.argv[2];
11
-
12
- /**
13
- *
14
- * This is the file to run in order to add specific calls to your existing adapter.
15
- * Make sure the zip is in the adapter's top level directory, then navigate there in the terminal and run 'node specficCallScript {folderName}'.
16
- *
17
- */
18
-
19
- /**
20
- *@summary the main function to be run in this file.
21
- *@function main
22
- */
23
-
24
- function main() {
25
- const entityPath = path.join(__dirname, '../entities');
26
- const entitiesFull = fs.readdirSync(entityPath, 'utf8').filter((entity) => (entity !== '.system' && entity !== '.DS_Store' && entity !== '.generic'));
27
- const mockArray = [];
28
-
29
- // loop through existing adapter entities
30
- entitiesFull.forEach((e) => {
31
- if (fs.existsSync(path.join(__dirname, `../entities/${e}/mockdatafiles`))) {
32
- fs.readdirSync(path.join(__dirname, `../entities/${e}/mockdatafiles`)).forEach((file) => {
33
- const mockObj = {};
34
- mockObj.name = file;
35
- mockObj.contents = JSON.parse(fs.readFileSync(path.join(__dirname, `../entities/${e}/mockdatafiles/${file}`), 'utf8'));
36
- mockObj.entity = e;
37
- mockObj.function = file.slice(0, -13);
38
- mockArray.push(mockObj);
39
- });
40
- }
41
- // find and loop through entities of methods being added
42
- if (fs.existsSync(path.join(__dirname, `./${folder}/components/entities`))) {
43
- const entityAddPath = path.join(__dirname, `./${folder}/components/entities`);
44
- const entitiesAdding = fs.readdirSync(entityAddPath, 'utf8').filter((entity) => (entity !== '.system' && entity !== '.DS_Store' && entity !== '.generic'));
45
-
46
- // for each entity in the specific additions, get the appropriate integration test info from generic call for the specific calls
47
- let finalAddedIntegrationTest = '';
48
- let entityIntegrationTests = '';
49
- entitiesAdding.forEach((eSpecific) => {
50
- const existingActionFile = JSON.parse(fs.readFileSync(path.join(__dirname, `../entities/${e}/action.json`), 'utf8'));
51
- const existingIntegrationFile = fs.readFileSync(path.join(__dirname, '../test/integration/adapterTestIntegration.js'), 'utf8');
52
- const testSplit = existingIntegrationFile.split('describe');
53
- existingActionFile.actions.forEach((action) => {
54
- let replaceTest = '';
55
- testSplit.every((test) => {
56
- const testSlice = test.slice(0, action.name.length + 3);
57
- if (testSlice.includes(action.name)) {
58
- replaceTest = test.split('if (stub) {\n');
59
- replaceTest = replaceTest[1].split('} else {\n');
60
- replaceTest = replaceTest[0];
61
- return false;
62
- }
63
- return true;
64
- });
65
- if (replaceTest !== '') {
66
- const addingIntegrationFile = fs.readFileSync(path.join(__dirname, `${folder}/components/test/integration/adapterTestIntegration.js`), 'utf8');
67
- const addingTestSplit = addingIntegrationFile.split('describe');
68
- const addingActionFile = JSON.parse(fs.readFileSync(path.join(__dirname, `./${folder}/components/entities/${eSpecific}/action.json`)), 'utf8');
69
- addingActionFile.forEach((addingAction) => {
70
- let replacedTest = '';
71
- addingTestSplit.forEach((addedTest) => {
72
- const addingTestSlice = addedTest.slice(0, addingAction.name.length + 3);
73
- if (addingTestSlice.includes(addingAction.name) && (action.method === addingAction.method)) {
74
- replacedTest = addedTest.split('if (stub) {\n');
75
- replacedTest = replacedTest[1].split('} else {\n');
76
- replacedTest = replacedTest[0];
77
- let finalTest = addedTest.replace(replacedTest, replaceTest);
78
- finalTest = finalTest.replace('should work if integrated but since no mockdata should error when run standalone', 'should work if integrated or standalone with mockdata');
79
- finalTest = 'describe' + finalTest;
80
- entityIntegrationTests = finalTest;
81
- finalAddedIntegrationTest += entityIntegrationTests;
82
- }
83
- });
84
- });
85
- }
86
- });
87
- // clear out the action.json and schema.json file of the specific call so it does not get added to action.json and schema.json of generic adapter
88
- fs.writeFileSync(path.join(__dirname, `./${folder}/components/entities/${eSpecific}/action.json`), '[]');
89
- fs.writeFileSync(path.join(__dirname, `./${folder}/components/entities/${eSpecific}/schema.json`), '[]');
90
- });
91
- finalAddedIntegrationTest = '\n ' + finalAddedIntegrationTest;
92
- fs.writeFileSync(path.join(__dirname, `${folder}/components/test/integration/adapterTestIntegration.js`), finalAddedIntegrationTest);
93
- }
94
- });
95
- }
96
-
97
- main();