repository-provider 31.0.0 → 31.1.1
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/package.json +1 -1
- package/src/base-object.mjs +14 -1
- package/src/repository.mjs +2 -18
package/package.json
CHANGED
package/src/base-object.mjs
CHANGED
|
@@ -123,10 +123,14 @@ export class BaseObject {
|
|
|
123
123
|
* Complete name in the hierachy.
|
|
124
124
|
* @return {string}
|
|
125
125
|
*/
|
|
126
|
-
|
|
126
|
+
get fullCondensedName() {
|
|
127
127
|
return this.fullName;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
get condensedName() {
|
|
131
|
+
return this.name;
|
|
132
|
+
}
|
|
133
|
+
|
|
130
134
|
/**
|
|
131
135
|
* Short human readable identifier with provider and branch.
|
|
132
136
|
* @return {string}
|
|
@@ -160,6 +164,15 @@ export class BaseObject {
|
|
|
160
164
|
return this.owner.provider;
|
|
161
165
|
}
|
|
162
166
|
|
|
167
|
+
/**
|
|
168
|
+
* API as given by the owner.
|
|
169
|
+
* @return {string} url
|
|
170
|
+
*/
|
|
171
|
+
get api() {
|
|
172
|
+
// TODO move into owner-object
|
|
173
|
+
return this.owner && this.owner.api;
|
|
174
|
+
}
|
|
175
|
+
|
|
163
176
|
/**
|
|
164
177
|
* Forwarded to the owner.
|
|
165
178
|
* @param {...any} args
|
package/src/repository.mjs
CHANGED
|
@@ -48,10 +48,10 @@ export class Repository extends OwnedObject {
|
|
|
48
48
|
defaultBranchName: { type: "string", default: "master" },
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* URL of the repository
|
|
52
52
|
* @return {string}
|
|
53
53
|
*/
|
|
54
|
-
url: { type: "
|
|
54
|
+
url: { type: "url" },
|
|
55
55
|
|
|
56
56
|
cloneURL: { type: "url" },
|
|
57
57
|
|
|
@@ -134,14 +134,6 @@ export class Repository extends OwnedObject {
|
|
|
134
134
|
*/
|
|
135
135
|
async *commits(options) {}
|
|
136
136
|
|
|
137
|
-
/**
|
|
138
|
-
* Preffered url to access the repo.
|
|
139
|
-
* @return {string}
|
|
140
|
-
*/
|
|
141
|
-
/*get url() {
|
|
142
|
-
return this.urls[0];
|
|
143
|
-
}*/
|
|
144
|
-
|
|
145
137
|
/**
|
|
146
138
|
* The url used for cloning the repo.
|
|
147
139
|
* @return {string}
|
|
@@ -166,14 +158,6 @@ export class Repository extends OwnedObject {
|
|
|
166
158
|
return undefined;
|
|
167
159
|
}
|
|
168
160
|
|
|
169
|
-
/**
|
|
170
|
-
* Name without owner.
|
|
171
|
-
* @return {string} name
|
|
172
|
-
*/
|
|
173
|
-
get condensedName() {
|
|
174
|
-
return this.name;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
161
|
/**
|
|
178
162
|
* By default we are not archived.
|
|
179
163
|
* @return {boolean} false
|