@heroku/buildpack-registry 1.0.1 → 1.0.2-beta.0
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/README.md +11 -0
- package/dist/buildpack-registry-api.d.ts +7 -7
- package/dist/buildpack-registry-api.js +10 -8
- package/dist/buildpack-registry.d.ts +4 -4
- package/dist/buildpack-registry.js +30 -32
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -3
- package/package.json +14 -15
- package/dist/test/helpers/fixture.d.ts +0 -6
- package/dist/test/helpers/fixture.js +0 -81
package/README.md
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
# buildpack-registry.js
|
|
2
|
+
|
|
2
3
|
Node.js/TypeScript library for interacting with the [Heroku Buildpack Registry](https://devcenter.heroku.com/articles/buildpack-registry).
|
|
4
|
+
|
|
5
|
+
## Related
|
|
6
|
+
|
|
7
|
+
If you are looking for the heroku CLI plugin:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
$ heroku plugins:install @heroku-cli/plugin-buildpack-registry
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
It is at a different (private) repo [`@heroku-cli/plugin-buildpack-registry`](https://github.com/heroku/plugin-buildpack-registry). That plugin uses this library to interact with the buildpack registry.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Headers, Response } from 'node-fetch';
|
|
2
2
|
export { Response } from 'node-fetch';
|
|
3
|
-
export
|
|
3
|
+
export type IBody = {
|
|
4
4
|
[property: string]: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type RevisionStatus = 'pending' | 'published' | 'failed';
|
|
7
|
+
export type RevisionBody = {
|
|
8
8
|
id: string;
|
|
9
9
|
buildpack_id: string;
|
|
10
10
|
published_by_email?: string;
|
|
@@ -19,13 +19,13 @@ export declare type RevisionBody = {
|
|
|
19
19
|
published_by_id: string;
|
|
20
20
|
license: string;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type ReadmeBody = {
|
|
23
23
|
content?: string;
|
|
24
24
|
encoding?: string;
|
|
25
25
|
sha?: string;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
28
|
-
export
|
|
27
|
+
export type Category = 'languages' | 'tools' | 'packages';
|
|
28
|
+
export type BuildpackBody = {
|
|
29
29
|
id: string;
|
|
30
30
|
name: string;
|
|
31
31
|
created_at: Date;
|
|
@@ -57,7 +57,7 @@ export declare type BuildpackBody = {
|
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
-
export
|
|
60
|
+
export type HeaderOptions = {
|
|
61
61
|
token?: string;
|
|
62
62
|
secondFactor?: string;
|
|
63
63
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
exports.BuildpackRegistryApi = exports.Response = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const node_fetch_1 = tslib_1.__importStar(require("node-fetch"));
|
|
4
6
|
var node_fetch_2 = require("node-fetch");
|
|
5
|
-
exports
|
|
7
|
+
Object.defineProperty(exports, "Response", { enumerable: true, get: function () { return node_fetch_2.Response; } });
|
|
6
8
|
class BuildpackRegistryApi {
|
|
7
9
|
static url() {
|
|
8
10
|
if (process.env.HEROKU_BUILDPACK_REGISTRY_URL === undefined) {
|
|
@@ -16,7 +18,7 @@ class BuildpackRegistryApi {
|
|
|
16
18
|
return new BuildpackRegistryApi();
|
|
17
19
|
}
|
|
18
20
|
headers(options = {}) {
|
|
19
|
-
|
|
21
|
+
const defaultHeaders = {
|
|
20
22
|
Accept: 'application/vnd.heroku+json; version=3.buildpack-registry',
|
|
21
23
|
'Content-Type': 'application/json'
|
|
22
24
|
};
|
|
@@ -27,25 +29,25 @@ class BuildpackRegistryApi {
|
|
|
27
29
|
defaultHeaders['Heroku-Two-Factor-Code'] = options.secondFactor;
|
|
28
30
|
}
|
|
29
31
|
if (process.env.HEROKU_HEADERS) {
|
|
30
|
-
|
|
31
|
-
return new node_fetch_1.Headers(Object.assign({}, defaultHeaders, { herokuHeaders }));
|
|
32
|
+
const herokuHeaders = JSON.parse(process.env.HEROKU_HEADERS);
|
|
33
|
+
return new node_fetch_1.Headers(Object.assign(Object.assign({}, defaultHeaders), { herokuHeaders }));
|
|
32
34
|
}
|
|
33
35
|
else {
|
|
34
36
|
return new node_fetch_1.Headers(defaultHeaders);
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
39
|
async post(path, body, headers) {
|
|
38
|
-
|
|
40
|
+
const options = {
|
|
39
41
|
method: 'POST',
|
|
40
42
|
headers: headers ? headers : this.headers(),
|
|
41
43
|
};
|
|
42
44
|
if (body) {
|
|
43
45
|
options.body = JSON.stringify(body);
|
|
44
46
|
}
|
|
45
|
-
return node_fetch_1.default(`${BuildpackRegistryApi.url()}${path}`, options);
|
|
47
|
+
return (0, node_fetch_1.default)(`${BuildpackRegistryApi.url()}${path}`, options);
|
|
46
48
|
}
|
|
47
49
|
async get(path) {
|
|
48
|
-
return node_fetch_1.default(`${BuildpackRegistryApi.url()}${path}`, {
|
|
50
|
+
return (0, node_fetch_1.default)(`${BuildpackRegistryApi.url()}${path}`, {
|
|
49
51
|
headers: this.headers()
|
|
50
52
|
});
|
|
51
53
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Result } from 'true-myth';
|
|
2
2
|
import { BuildpackBody, BuildpackRegistryApi as Api, Category, ReadmeBody, Response, RevisionBody, RevisionStatus } from './buildpack-registry-api';
|
|
3
3
|
export { BuildpackBody, Category, ReadmeBody, RevisionBody, RevisionStatus };
|
|
4
|
-
export
|
|
4
|
+
export type BuildpackSlugResult = {
|
|
5
5
|
result: boolean;
|
|
6
6
|
error?: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type ResponseError = {
|
|
9
9
|
status: number;
|
|
10
10
|
path: string;
|
|
11
11
|
description: string;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type InfoData = {
|
|
14
14
|
license: string;
|
|
15
15
|
category?: string;
|
|
16
16
|
description: string;
|
|
@@ -31,6 +31,6 @@ export declare class BuildpackRegistry {
|
|
|
31
31
|
revisionInfo(buildpack: string, revision_id: string): Promise<Result<RevisionBody, ResponseError>>;
|
|
32
32
|
buildpackExists(buildpack: string): Promise<Response>;
|
|
33
33
|
listVersions(buildpack: string): Promise<Result<RevisionBody[], ResponseError>>;
|
|
34
|
-
delay(ms: number): Promise<
|
|
34
|
+
delay(ms: number): Promise<unknown>;
|
|
35
35
|
waitForRelease(buildpack_id: string, revision_id: string): Promise<RevisionStatus>;
|
|
36
36
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BuildpackRegistry = void 0;
|
|
3
4
|
const true_myth_1 = require("true-myth");
|
|
4
5
|
const buildpack_registry_api_1 = require("./buildpack-registry-api");
|
|
5
6
|
const BUILDPACK_FORMATTING_MESSAGE = "To specify a buildpack, please format it like the following: namespace/name (e.g. heroku/ruby). Also names can only contain letters, numbers, '_', and '-'.";
|
|
6
7
|
class BuildpackRegistry {
|
|
7
8
|
static isValidBuildpackSlug(buildpack) {
|
|
8
|
-
|
|
9
|
+
const nameParts = buildpack.split('/');
|
|
9
10
|
if (nameParts.length === 2 && nameParts[0].length > 0 && nameParts[1].length > 0 && /^[a-z0-9][a-z0-9_\-]*$/i.exec(nameParts[1])) {
|
|
10
11
|
return true_myth_1.Result.ok(true);
|
|
11
12
|
}
|
|
@@ -17,10 +18,10 @@ class BuildpackRegistry {
|
|
|
17
18
|
this.api = buildpack_registry_api_1.BuildpackRegistryApi.create();
|
|
18
19
|
}
|
|
19
20
|
async requiresTwoFactor(buildpack) {
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
const path = `/buildpacks/${encodeURIComponent(buildpack)}`;
|
|
22
|
+
const response = await this.api.get(path);
|
|
22
23
|
if (response.status === 200) {
|
|
23
|
-
|
|
24
|
+
const body = await response.json();
|
|
24
25
|
return true_myth_1.Result.ok(body.two_factor_authentication);
|
|
25
26
|
}
|
|
26
27
|
else {
|
|
@@ -32,13 +33,13 @@ class BuildpackRegistry {
|
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
async publish(buildpack, ref, token, secondFactor) {
|
|
35
|
-
|
|
36
|
+
const options = { token };
|
|
36
37
|
if (secondFactor !== undefined) {
|
|
37
38
|
options.secondFactor = secondFactor;
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (response.status
|
|
40
|
+
const path = `/buildpacks/${encodeURIComponent(buildpack)}/revisions`;
|
|
41
|
+
const response = await this.api.post(path, { ref }, this.api.headers(options));
|
|
42
|
+
if (response.status >= 200 && response.status < 300) {
|
|
42
43
|
return true_myth_1.Result.ok(await response.json());
|
|
43
44
|
}
|
|
44
45
|
else {
|
|
@@ -50,12 +51,12 @@ class BuildpackRegistry {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
async rollback(buildpack, token, secondFactor) {
|
|
53
|
-
|
|
54
|
+
const options = { token };
|
|
54
55
|
if (secondFactor !== undefined) {
|
|
55
56
|
options.secondFactor = secondFactor;
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
const path = `/buildpacks/${encodeURIComponent(buildpack)}/actions/rollback`;
|
|
59
|
+
const response = await this.api.post(path, undefined, this.api.headers(options));
|
|
59
60
|
if (response.status === 200) {
|
|
60
61
|
return true_myth_1.Result.ok(await response.json());
|
|
61
62
|
}
|
|
@@ -84,8 +85,8 @@ class BuildpackRegistry {
|
|
|
84
85
|
if (queryParams.length > 0) {
|
|
85
86
|
queryString = `?${queryParams.join('&')}`;
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
const path = `/buildpacks${queryString}`;
|
|
89
|
+
const response = await this.api.get(path);
|
|
89
90
|
if (response.status === 200) {
|
|
90
91
|
return true_myth_1.Result.ok(await response.json());
|
|
91
92
|
}
|
|
@@ -107,13 +108,13 @@ class BuildpackRegistry {
|
|
|
107
108
|
description: await response.text(),
|
|
108
109
|
});
|
|
109
110
|
}
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
const bp_body = await response.json();
|
|
112
|
+
const result = await this.listVersions(buildpack);
|
|
112
113
|
if (result.isErr()) {
|
|
113
114
|
return true_myth_1.Result.err(result.unsafelyUnwrapErr());
|
|
114
115
|
}
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
const revisions = result.unsafelyUnwrap();
|
|
117
|
+
const revision = revisions.sort((a, b) => {
|
|
117
118
|
return a.release > b.release ? -1 : 1;
|
|
118
119
|
})[0];
|
|
119
120
|
path = `/buildpacks/${encodeURIComponent(buildpack)}/readme`;
|
|
@@ -125,8 +126,8 @@ class BuildpackRegistry {
|
|
|
125
126
|
description: await response.text()
|
|
126
127
|
});
|
|
127
128
|
}
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
const readme = await response.json();
|
|
130
|
+
const data = {
|
|
130
131
|
description: bp_body.description,
|
|
131
132
|
category: bp_body.category,
|
|
132
133
|
license: revision.license
|
|
@@ -152,12 +153,12 @@ class BuildpackRegistry {
|
|
|
152
153
|
return true_myth_1.Result.ok(data);
|
|
153
154
|
}
|
|
154
155
|
async archive(buildpack, token, secondFactor) {
|
|
155
|
-
|
|
156
|
+
const options = { token };
|
|
156
157
|
if (secondFactor !== undefined) {
|
|
157
158
|
options.secondFactor = secondFactor;
|
|
158
159
|
}
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
const path = `/buildpacks/${encodeURIComponent(buildpack)}/actions/archive`;
|
|
161
|
+
const response = await this.api.post(path, undefined, this.api.headers(options));
|
|
161
162
|
if (response.status === 200) {
|
|
162
163
|
return true_myth_1.Result.ok(await response.json());
|
|
163
164
|
}
|
|
@@ -170,8 +171,8 @@ class BuildpackRegistry {
|
|
|
170
171
|
}
|
|
171
172
|
}
|
|
172
173
|
async revisionInfo(buildpack, revision_id) {
|
|
173
|
-
|
|
174
|
-
|
|
174
|
+
const path = `/buildpacks/${encodeURIComponent(buildpack)}/revisions/${encodeURIComponent(revision_id)}`;
|
|
175
|
+
const response = await this.api.get(path);
|
|
175
176
|
if (response.status === 200) {
|
|
176
177
|
return true_myth_1.Result.ok(await response.json());
|
|
177
178
|
}
|
|
@@ -187,8 +188,8 @@ class BuildpackRegistry {
|
|
|
187
188
|
return this.api.get(`/buildpacks/${encodeURIComponent(buildpack)}`);
|
|
188
189
|
}
|
|
189
190
|
async listVersions(buildpack) {
|
|
190
|
-
|
|
191
|
-
|
|
191
|
+
const path = `/buildpacks/${encodeURIComponent(buildpack)}/revisions`;
|
|
192
|
+
const response = await this.api.get(path);
|
|
192
193
|
if (response.status === 200) {
|
|
193
194
|
return true_myth_1.Result.ok(await response.json());
|
|
194
195
|
}
|
|
@@ -201,20 +202,17 @@ class BuildpackRegistry {
|
|
|
201
202
|
}
|
|
202
203
|
}
|
|
203
204
|
async delay(ms) {
|
|
204
|
-
// Disable lint is Temporary
|
|
205
|
-
// until this issue is resolved https://github.com/Microsoft/tslint-microsoft-contrib/issues/355#issuecomment-407209401
|
|
206
|
-
// tslint:disable-next-line no-string-based-set-timeout
|
|
207
205
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
208
206
|
}
|
|
209
207
|
async waitForRelease(buildpack_id, revision_id) {
|
|
210
208
|
let status = 'failed';
|
|
211
209
|
let status_count = 0;
|
|
212
|
-
|
|
210
|
+
const running = true;
|
|
213
211
|
while (running) {
|
|
214
212
|
status_count += 1;
|
|
215
|
-
|
|
213
|
+
const result = await this.revisionInfo(buildpack_id, revision_id);
|
|
216
214
|
if (result.isOk()) {
|
|
217
|
-
|
|
215
|
+
const revision = result.unsafelyUnwrap();
|
|
218
216
|
status = revision.status;
|
|
219
217
|
if (status !== 'pending') {
|
|
220
218
|
break;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BuildpackRegistry = void 0;
|
|
3
4
|
var buildpack_registry_1 = require("./buildpack-registry");
|
|
4
|
-
exports
|
|
5
|
-
var fixture_1 = require("./test/helpers/fixture");
|
|
6
|
-
exports.Fixture = fixture_1.Fixture;
|
|
5
|
+
Object.defineProperty(exports, "BuildpackRegistry", { enumerable: true, get: function () { return buildpack_registry_1.BuildpackRegistry; } });
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heroku/buildpack-registry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2-beta.0",
|
|
4
4
|
"description": "Node.js/TypeScript library for interfacing with the Heroku Buildpack Registry",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"prepare": "tsc",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"lint": "eslint .",
|
|
10
|
+
"test": "vitest run --coverage",
|
|
11
|
+
"posttest": "tsc -p test --noEmit && npm run lint"
|
|
11
12
|
},
|
|
12
13
|
"repository": {
|
|
13
14
|
"type": "git",
|
|
@@ -20,24 +21,22 @@
|
|
|
20
21
|
},
|
|
21
22
|
"homepage": "https://github.com/heroku/buildpack-registry.js#readme",
|
|
22
23
|
"devDependencies": {
|
|
23
|
-
"@types/
|
|
24
|
-
"@types/mocha": "^5.2.5",
|
|
25
|
-
"@types/nock": "^9.3.0",
|
|
26
|
-
"@types/node": "^10.7.1",
|
|
24
|
+
"@types/node": "^20.14.8",
|
|
27
25
|
"@types/node-fetch": "^2.1.2",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
26
|
+
"@vitest/coverage-v8": "^4.0.0",
|
|
27
|
+
"eslint": "^9.0.0",
|
|
28
|
+
"nock": "^13.3",
|
|
29
|
+
"typescript": "^5.7",
|
|
30
|
+
"typescript-eslint": "^8.0.0",
|
|
31
|
+
"vitest": "^4.0.0"
|
|
34
32
|
},
|
|
35
33
|
"dependencies": {
|
|
36
34
|
"node-fetch": "^2.2.0",
|
|
37
|
-
"true-myth": "^2.0.0"
|
|
35
|
+
"true-myth": "^2.0.0",
|
|
36
|
+
"tslib": "^2.8.1"
|
|
38
37
|
},
|
|
39
38
|
"engines": {
|
|
40
|
-
"node": ">=
|
|
39
|
+
"node": ">= 20"
|
|
41
40
|
},
|
|
42
41
|
"files": [
|
|
43
42
|
"/dist"
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { BuildpackBody, ReadmeBody, RevisionBody } from '../../buildpack-registry';
|
|
2
|
-
export declare namespace Fixture {
|
|
3
|
-
function buildpack(options?: Partial<BuildpackBody>): BuildpackBody;
|
|
4
|
-
function revision(options?: Partial<RevisionBody>): RevisionBody;
|
|
5
|
-
function readme(options?: Partial<ReadmeBody>): ReadmeBody;
|
|
6
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var Fixture;
|
|
4
|
-
(function (Fixture) {
|
|
5
|
-
function buildpack(options) {
|
|
6
|
-
let base = {
|
|
7
|
-
id: '3ef8f543-b953-4a26-b410-8807d1b45eb1',
|
|
8
|
-
name: 'scala',
|
|
9
|
-
created_at: new Date(),
|
|
10
|
-
updated_at: new Date(),
|
|
11
|
-
description: 'Official Heroku Buildpack for Scala',
|
|
12
|
-
category: 'languages',
|
|
13
|
-
two_factor_authentication: false,
|
|
14
|
-
blob_url: 'https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/scala.tgz',
|
|
15
|
-
source: {
|
|
16
|
-
type: 'github',
|
|
17
|
-
owner: 'heroku',
|
|
18
|
-
repo: 'heroku-buildpack-scala'
|
|
19
|
-
},
|
|
20
|
-
support: { method: 'github', address: null },
|
|
21
|
-
namespace: 'heroku',
|
|
22
|
-
logo: {
|
|
23
|
-
small: {
|
|
24
|
-
url: 'https://s3.amazonaws.com/buildpack-registry/images/buildpacks/logos/3ef/8f5/43-/small/data?1526489067',
|
|
25
|
-
width: 64,
|
|
26
|
-
height: 64
|
|
27
|
-
},
|
|
28
|
-
medium: {
|
|
29
|
-
url: 'https://s3.amazonaws.com/buildpack-registry/images/buildpacks/logos/3ef/8f5/43-/medium/data?1526489067',
|
|
30
|
-
width: 128,
|
|
31
|
-
height: 128
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
if (options) {
|
|
36
|
-
return Object.assign({}, base, options);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
return base;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
Fixture.buildpack = buildpack;
|
|
43
|
-
function revision(options) {
|
|
44
|
-
let base = {
|
|
45
|
-
id: '8de70dbe-e862-4d51-b906-123ef3bf2fc5',
|
|
46
|
-
buildpack_id: '71a3c00a-d6c7-4393-94c5-d5d71531720e',
|
|
47
|
-
published_by_email: undefined,
|
|
48
|
-
ref: undefined,
|
|
49
|
-
tarball: 'https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/scala-v151.tgz',
|
|
50
|
-
status: 'published',
|
|
51
|
-
error: undefined,
|
|
52
|
-
created_at: new Date(),
|
|
53
|
-
updated_at: new Date(),
|
|
54
|
-
release: 151,
|
|
55
|
-
checksum: '3fc5aa90fcdc97b2a22a9bba1dac07323dd12d3d4e0abc1984fb06e6e15bc649',
|
|
56
|
-
published_by_id: 'bebd5adc-2194-41c9-a246-d97af547a3f9',
|
|
57
|
-
license: 'MIT'
|
|
58
|
-
};
|
|
59
|
-
if (options) {
|
|
60
|
-
return Object.assign({}, base, options);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
return base;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
Fixture.revision = revision;
|
|
67
|
-
function readme(options) {
|
|
68
|
-
let base = {
|
|
69
|
-
content: 'IyBIZXJva3UgRXhlYyBCdWlsZHBhY2sKClRoaXMgaXMgYSBbSGVyb2t1IEJ1\naWxkcGFja10oaHR0cHM6Ly9kZXZjZW50ZXIuaGVyb2t1LmNvbS9hcnRpY2xl\ncy9idWlsZHBhY2tzKQp0aGF0IHdvcmtzIHdpdGggdGhlIFtIZXJva3UgRXhl\nY10oaHR0cHM6Ly9kZXZjZW50ZXIuaGVyb2t1LmNvbS9hcnRpY2xlcy9oZXJv\na3UtZXhlYykgZmVhdHVyZS4K\n',
|
|
70
|
-
encoding: 'base64',
|
|
71
|
-
sha: 'a5e1e5f5eb76095087b32b31caf5ccaee0c2cae6'
|
|
72
|
-
};
|
|
73
|
-
if (options) {
|
|
74
|
-
return Object.assign({}, base, options);
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
return base;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
Fixture.readme = readme;
|
|
81
|
-
})(Fixture = exports.Fixture || (exports.Fixture = {}));
|