@heroku/buildpack-registry 1.0.3 → 1.1.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.
@@ -33,6 +33,7 @@ export type BuildpackBody = {
33
33
  description: string;
34
34
  category: Category;
35
35
  two_factor_authentication: boolean;
36
+ archived: boolean;
36
37
  blob_url: string;
37
38
  source: {
38
39
  type: 'github';
@@ -14,6 +14,7 @@ export type InfoData = {
14
14
  license: string;
15
15
  category?: string;
16
16
  description: string;
17
+ archived: boolean;
17
18
  readme?: string;
18
19
  support?: string;
19
20
  source?: string;
@@ -110,10 +110,10 @@ class BuildpackRegistry {
110
110
  }
111
111
  const bp_body = await response.json();
112
112
  const result = await this.listVersions(buildpack);
113
- if (result.isErr()) {
114
- return true_myth_1.Result.err(result.unsafelyUnwrapErr());
113
+ if (result.isErr) {
114
+ return true_myth_1.Result.err(result.error);
115
115
  }
116
- const revisions = result.unsafelyUnwrap();
116
+ const revisions = result.value;
117
117
  const revision = revisions.sort((a, b) => {
118
118
  return a.release > b.release ? -1 : 1;
119
119
  })[0];
@@ -130,6 +130,7 @@ class BuildpackRegistry {
130
130
  const data = {
131
131
  description: bp_body.description,
132
132
  category: bp_body.category,
133
+ archived: bp_body.archived,
133
134
  license: revision.license
134
135
  };
135
136
  if (bp_body.support.method === 'email') {
@@ -211,8 +212,8 @@ class BuildpackRegistry {
211
212
  while (running) {
212
213
  status_count += 1;
213
214
  const result = await this.revisionInfo(buildpack_id, revision_id);
214
- if (result.isOk()) {
215
- const revision = result.unsafelyUnwrap();
215
+ if (result.isOk) {
216
+ const revision = result.value;
216
217
  status = revision.status;
217
218
  if (status !== 'pending') {
218
219
  break;
package/package.json CHANGED
@@ -1,14 +1,19 @@
1
1
  {
2
2
  "name": "@heroku/buildpack-registry",
3
- "version": "1.0.3",
3
+ "version": "1.1.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
- "prepare": "tsc",
8
+ "clean": "rimraf dist",
9
+ "build": "npm run clean && tsc",
9
10
  "lint": "eslint .",
10
- "test": "vitest run --coverage",
11
- "posttest": "tsc -p test --noEmit && npm run lint"
11
+ "lint:fix": "eslint . --fix",
12
+ "typecheck:test": "tsc -p test --noEmit",
13
+ "test": "vitest run",
14
+ "test:watch": "vitest",
15
+ "test:coverage": "vitest run --coverage --coverage.reporter=text-summary --coverage.reporter=lcovonly",
16
+ "prepare": "npm run build"
12
17
  },
13
18
  "repository": {
14
19
  "type": "git",
@@ -21,22 +26,23 @@
21
26
  },
22
27
  "homepage": "https://github.com/heroku/buildpack-registry.js#readme",
23
28
  "devDependencies": {
24
- "@types/node": "^20.14.8",
29
+ "@types/node": "^26.6.2",
25
30
  "@types/node-fetch": "^2.1.2",
26
- "@vitest/coverage-v8": "^4.0.0",
27
- "eslint": "^9.0.0",
28
- "nock": "^13.3",
31
+ "@vitest/coverage-v8": "^4.1.11",
32
+ "eslint": "^10.7.0",
33
+ "nock": "^15.0",
34
+ "rimraf": "^6.1.3",
29
35
  "typescript": "^5.7",
30
36
  "typescript-eslint": "^8.0.0",
31
- "vitest": "^4.0.0"
37
+ "vitest": "^4.1.11"
32
38
  },
33
39
  "dependencies": {
34
40
  "node-fetch": "^2.2.0",
35
- "true-myth": "^2.0.0",
41
+ "true-myth": "^9.4.0",
36
42
  "tslib": "^2.8.1"
37
43
  },
38
44
  "engines": {
39
- "node": ">= 20"
45
+ "node": ">= 20.19"
40
46
  },
41
47
  "files": [
42
48
  "/dist"