@miso.ai/server-wordpress 0.6.6-beta.16 → 0.6.6-beta.18

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/cli/download.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { createWriteStream } from 'fs';
2
2
  import { access, mkdir } from 'fs/promises';
3
3
  import { createGzip } from 'zlib';
4
+ import { pipeline } from 'stream/promises';
4
5
  import { startOfDate, endOfDate, stream } from '@miso.ai/server-commons';
5
6
  import { WordPressClient } from '../src/index.js';
6
7
  import { buildForEntities } from './utils.js';
@@ -79,7 +80,7 @@ async function run({
79
80
  const startTime = Date.now();
80
81
  const sourceStream = await client.posts.stream({ ...options, after, before });
81
82
 
82
- await stream.pipeline(
83
+ await pipeline(
83
84
  sourceStream,
84
85
  stream.stringify(),
85
86
  createGzip(),
package/cli/entities.js CHANGED
@@ -61,7 +61,7 @@ export async function runGet(client, name, options) {
61
61
 
62
62
  export async function runIds(client, name, { update, transform, resolve, fields, ...options }) {
63
63
  if (update) {
64
- await stream.pipeline(
64
+ await pipeline(
65
65
  await buildUpdateStream(client, name, update, { ...options, fields: ['id'] }),
66
66
  new Transform({
67
67
  objectMode: true,
@@ -72,7 +72,7 @@ export async function runIds(client, name, { update, transform, resolve, fields,
72
72
  new stream.OutputStream(),
73
73
  );
74
74
  } else {
75
- await stream.pipeline(
75
+ await pipeline(
76
76
  await client.entities(name).ids(options),
77
77
  new stream.OutputStream(),
78
78
  );
@@ -80,14 +80,14 @@ export async function runIds(client, name, { update, transform, resolve, fields,
80
80
  }
81
81
 
82
82
  export async function runUpdate(client, name, update, options) {
83
- await stream.pipeline(
83
+ await pipeline(
84
84
  await buildUpdateStream(client, name, update, options),
85
85
  new stream.OutputStream(),
86
86
  );
87
87
  }
88
88
 
89
89
  export async function runPresence(client, name, options) {
90
- await stream.pipeline(
90
+ await pipeline(
91
91
  process.stdin,
92
92
  split2(),
93
93
  client.entities(name).presence(options),
package/package.json CHANGED
@@ -17,12 +17,12 @@
17
17
  "simonpai <simon.pai@askmiso.com>"
18
18
  ],
19
19
  "dependencies": {
20
- "@miso.ai/server-commons": "0.6.6-beta.16",
20
+ "@miso.ai/server-commons": "0.6.6-beta.18",
21
21
  "axios": "^1.6.2",
22
22
  "axios-retry": "^3.3.1",
23
23
  "dotenv": "^16.4.5",
24
24
  "saxes": "^6.0.0",
25
25
  "split2": "^4.2.0"
26
26
  },
27
- "version": "0.6.6-beta.16"
27
+ "version": "0.6.6-beta.18"
28
28
  }
package/src/version.js CHANGED
@@ -1 +1 @@
1
- export default '0.6.6-beta.16';
1
+ export default '0.6.6-beta.18';