@tryghost/http-stream 2.0.3 → 2.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/README.md CHANGED
@@ -8,8 +8,7 @@ A http stream to use alongside bunyan for logging
8
8
 
9
9
  or
10
10
 
11
- `yarn add @tryghost/http-stream`
12
-
11
+ `pnpm add @tryghost/http-stream`
13
12
 
14
13
  ## Purpose
15
14
 
@@ -17,29 +16,24 @@ HTTP response streaming helper used for piping remote/local resources through Gh
17
16
 
18
17
  ## Usage
19
18
 
20
-
21
19
  ## Develop
22
20
 
23
- This is a mono repository, managed with [lerna](https://lernajs.io/).
21
+ This is a mono repository, managed with [Nx](https://nx.dev).
24
22
 
25
23
  Follow the instructions for the top-level repo.
26
- 1. `git clone` this repo & `cd` into it as usual
27
- 2. Run `yarn` to install top-level dependencies.
28
24
 
25
+ 1. `git clone` this repo & `cd` into it as usual
26
+ 2. Run `pnpm install` to install top-level dependencies.
29
27
 
30
28
  ## Run
31
29
 
32
- - `yarn dev`
33
-
30
+ - `pnpm dev`
34
31
 
35
32
  ## Test
36
33
 
37
- - `yarn lint` run just eslint
38
- - `yarn test` run lint and tests
39
-
40
-
41
-
34
+ - `pnpm lint` runs oxlint
35
+ - `pnpm test` runs lint and tests
42
36
 
43
- # Copyright & License
37
+ # Copyright & License
44
38
 
45
- Copyright (c) 2013-2026 Ghost Foundation - Released under the [MIT license](LICENSE).
39
+ Copyright (c) 2013-2026 Ghost Foundation - Released under the [MIT license](LICENSE).
package/lib/HttpStream.js CHANGED
@@ -10,15 +10,17 @@ class HttpStream {
10
10
  async write(data) {
11
11
  try {
12
12
  if (typeof data !== 'object') {
13
- throw new GhostError.IncorrectUsageError({message: 'Type Error: Http transport requires log data to be an object'});
13
+ throw new GhostError.IncorrectUsageError({
14
+ message: 'Type Error: Http transport requires log data to be an object',
15
+ });
14
16
  }
15
17
 
16
18
  const options = {
17
19
  ...this.config,
18
20
  method: 'POST',
19
- json: data
21
+ json: data,
20
22
  };
21
- const {url} = options;
23
+ const { url } = options;
22
24
  delete options.url;
23
25
 
24
26
  return await request(url, options);
package/package.json CHANGED
@@ -1,35 +1,33 @@
1
1
  {
2
2
  "name": "@tryghost/http-stream",
3
- "version": "2.0.3",
3
+ "version": "2.1.1",
4
+ "license": "MIT",
5
+ "author": "Ghost Foundation",
4
6
  "repository": {
5
7
  "type": "git",
6
8
  "url": "git+https://github.com/TryGhost/framework.git",
7
9
  "directory": "packages/http-stream"
8
10
  },
9
- "author": "Ghost Foundation",
10
- "license": "MIT",
11
- "main": "index.js",
12
- "scripts": {
13
- "dev": "echo \"Implement me!\"",
14
- "test": "NODE_ENV=testing vitest run --coverage --config ../../vitest.config.ts",
15
- "lint:code": "eslint *.js lib/ --ext .js --cache",
16
- "lint": "yarn lint:code && yarn lint:test",
17
- "lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache",
18
- "posttest": "yarn lint"
19
- },
20
11
  "files": [
21
12
  "index.js",
22
13
  "lib"
23
14
  ],
15
+ "main": "index.js",
24
16
  "publishConfig": {
25
17
  "access": "public"
26
18
  },
19
+ "dependencies": {
20
+ "@tryghost/errors": "3.1.0",
21
+ "@tryghost/request": "3.1.1"
22
+ },
27
23
  "devDependencies": {
28
24
  "express": "5.2.1",
29
- "sinon": "21.0.2"
25
+ "sinon": "21.1.2"
30
26
  },
31
- "dependencies": {
32
- "@tryghost/errors": "^3.0.3",
33
- "@tryghost/request": "^3.0.3"
27
+ "scripts": {
28
+ "dev": "echo \"Implement me!\"",
29
+ "test": "NODE_ENV=testing vitest run --coverage",
30
+ "lint": "oxlint -c ../../.oxlintrc.json .",
31
+ "posttest": "pnpm run lint"
34
32
  }
35
- }
33
+ }