@miso.ai/server-wordpress 0.6.3-beta.1 → 0.6.3-beta.2

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/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { yargs } from '@miso.ai/server-commons';
3
3
  import version from '../src/version.js';
4
- import profile from './profile.js';
4
+ import { profile, init } from './profile.js';
5
5
  import taxonomies from './taxonomies.js';
6
6
  import entities from './entities.js';
7
7
 
@@ -21,6 +21,7 @@ yargs.build(yargs => {
21
21
  default: false,
22
22
  })
23
23
  .hide('debug')
24
+ .command(init)
24
25
  .command(profile)
25
26
  .command(taxonomies)
26
27
  .command(entities)
package/cli/profile.js CHANGED
@@ -11,7 +11,7 @@ function build(yargs) {
11
11
  });
12
12
  }
13
13
 
14
- async function run({ generate, ...options }) {
14
+ async function runProfile({ generate, ...options }) {
15
15
  if (generate) {
16
16
  await runGenerate(options);
17
17
  } else {
@@ -38,9 +38,19 @@ async function runView(options) {
38
38
  console.log(JSON.stringify(client.profile, undefined, 2));
39
39
  }
40
40
 
41
- export default {
41
+ async function runInit(options) {
42
+ await runGenerate(options);
43
+ }
44
+
45
+ export const profile = {
42
46
  command: 'profile',
43
47
  desc: 'WordPress site profile management',
44
48
  builder: build,
45
- handler: run,
49
+ handler: runProfile,
50
+ };
51
+
52
+ export const init = {
53
+ command: 'init <site>',
54
+ desc: 'Initialize WordPress site profile',
55
+ handler: runInit,
46
56
  };
package/package.json CHANGED
@@ -17,9 +17,9 @@
17
17
  "simonpai <simon.pai@askmiso.com>"
18
18
  ],
19
19
  "dependencies": {
20
- "@miso.ai/server-commons": "0.6.3-beta.1",
20
+ "@miso.ai/server-commons": "0.6.3-beta.2",
21
21
  "axios": "^0.27.2",
22
22
  "axios-retry": "^3.3.1"
23
23
  },
24
- "version": "0.6.3-beta.1"
24
+ "version": "0.6.3-beta.2"
25
25
  }
package/src/axios.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import axios from 'axios';
2
2
  import axiosRetry from 'axios-retry';
3
3
 
4
+ // TODO: create an instance
5
+
4
6
  axiosRetry(axios, { retries: 5, retryDelay: count => count * 300 });
5
7
 
6
8
  export default axios;
package/src/version.js CHANGED
@@ -1 +1 @@
1
- export default '0.6.3-beta.1';
1
+ export default '0.6.3-beta.2';