@adobe/spacecat-shared-data-access 1.2.1 → 1.2.2

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
@@ -1,3 +1,10 @@
1
+ # [@adobe/spacecat-shared-data-access-v1.2.2](https://github.com/adobe-rnd/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.2.1...@adobe/spacecat-shared-data-access-v1.2.2) (2023-12-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * allow update of github URL ([#40](https://github.com/adobe-rnd/spacecat-shared/issues/40)) ([21da989](https://github.com/adobe-rnd/spacecat-shared/commit/21da9893fcb9c971c1c6a4e1271133188351c155))
7
+
1
8
  # [@adobe/spacecat-shared-data-access-v1.2.1](https://github.com/adobe-rnd/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.2.0...@adobe/spacecat-shared-data-access-v1.2.1) (2023-12-07)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -65,6 +65,27 @@ const Site = (data = {}) => {
65
65
  return self;
66
66
  }; */
67
67
 
68
+ /**
69
+ * Updates the GitHub URL belonging to the site.
70
+ * @param {string} gitHubURL - The GitHub URL.
71
+ * @return {Base} The updated site.
72
+ */
73
+ self.updateGitHubURL = (gitHubURL) => {
74
+ if (!isValidUrl(gitHubURL)) {
75
+ throw new Error('GitHub URL must be a valid URL');
76
+ }
77
+
78
+ self.state.gitHubURL = gitHubURL;
79
+ self.touch();
80
+
81
+ return self;
82
+ };
83
+
84
+ /**
85
+ * Updates the IMS Org ID belonging to the site.
86
+ * @param {string} imsOrgId - The IMS Org ID.
87
+ * @return {Base} The updated site.
88
+ */
68
89
  self.updateImsOrgId = (imsOrgId) => {
69
90
  if (!hasText(imsOrgId)) {
70
91
  throw new Error('IMS Org ID must be provided');
@@ -81,6 +102,10 @@ const Site = (data = {}) => {
81
102
  return self;
82
103
  };
83
104
 
105
+ /**
106
+ * Sets whether the site is live.
107
+ * @return {Base} The updated site.
108
+ */
84
109
  self.toggleLive = () => {
85
110
  self.state.isLive = !self.state.isLive;
86
111
  return self;