@vocab/cli 0.0.0-compiled-translation-import-order-20230328231631 → 0.0.0-feature-ignore-flag-push-20241014224750

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.
@@ -1 +1,2 @@
1
1
  export * from "./declarations/src/index";
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidm9jYWItY2xpLmNqcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi9kZWNsYXJhdGlvbnMvc3JjL2luZGV4LmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
@@ -2,12 +2,12 @@
2
2
 
3
3
  var phrase = require('@vocab/phrase');
4
4
  var core = require('@vocab/core');
5
- var yargs = require('yargs');
5
+ var yargsCli = require('yargs');
6
6
  var envCi = require('env-ci');
7
7
 
8
8
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
9
9
 
10
- var yargs__default = /*#__PURE__*/_interopDefault(yargs);
10
+ var yargsCli__default = /*#__PURE__*/_interopDefault(yargsCli);
11
11
  var envCi__default = /*#__PURE__*/_interopDefault(envCi);
12
12
 
13
13
  /* eslint-disable no-console */
@@ -19,10 +19,16 @@ const branchDefinition = {
19
19
  describe: 'The Phrase branch to target',
20
20
  default: branch || 'local-development'
21
21
  };
22
+ const ignorePathDefinition = {
23
+ type: 'string',
24
+ array: true,
25
+ describe: 'list of paths to ignore from the command',
26
+ default: []
27
+ };
22
28
  let config = null;
23
29
 
24
30
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
25
- yargs__default["default"](process.argv.slice(2)).scriptName('vocab').option('config', {
31
+ yargsCli__default["default"](process.argv.slice(2)).scriptName('vocab').option('config', {
26
32
  type: 'string',
27
33
  describe: 'Path to config file'
28
34
  }).middleware(async ({
@@ -32,28 +38,34 @@ yargs__default["default"](process.argv.slice(2)).scriptName('vocab').option('con
32
38
  console.log('Loaded config from', configPath || process.cwd());
33
39
  }).command({
34
40
  command: 'push',
35
- builder: () => yargs__default["default"].options({
41
+ builder: yargs => yargs.options({
36
42
  branch: branchDefinition,
37
43
  'delete-unused-keys': {
38
44
  type: 'boolean',
39
45
  describe: 'Whether or not to delete unused keys after pushing',
40
46
  default: false
41
- }
47
+ },
48
+ ignore: ignorePathDefinition
42
49
  }),
43
50
  handler: async options => {
44
51
  await phrase.push(options, config);
45
52
  }
46
53
  }).command({
47
54
  command: 'pull',
48
- builder: () => yargs__default["default"].options({
49
- branch: branchDefinition
55
+ builder: yargs => yargs.options({
56
+ branch: branchDefinition,
57
+ 'error-on-no-global-key-translation': {
58
+ type: 'boolean',
59
+ describe: 'Throw an error when there is no translation for a global key',
60
+ default: false
61
+ }
50
62
  }),
51
63
  handler: async options => {
52
64
  await phrase.pull(options, config);
53
65
  }
54
66
  }).command({
55
67
  command: 'compile',
56
- builder: () => yargs__default["default"].options({
68
+ builder: yargs => yargs.options({
57
69
  watch: {
58
70
  type: 'boolean',
59
71
  default: false
@@ -2,12 +2,12 @@
2
2
 
3
3
  var phrase = require('@vocab/phrase');
4
4
  var core = require('@vocab/core');
5
- var yargs = require('yargs');
5
+ var yargsCli = require('yargs');
6
6
  var envCi = require('env-ci');
7
7
 
8
8
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
9
9
 
10
- var yargs__default = /*#__PURE__*/_interopDefault(yargs);
10
+ var yargsCli__default = /*#__PURE__*/_interopDefault(yargsCli);
11
11
  var envCi__default = /*#__PURE__*/_interopDefault(envCi);
12
12
 
13
13
  /* eslint-disable no-console */
@@ -19,10 +19,16 @@ const branchDefinition = {
19
19
  describe: 'The Phrase branch to target',
20
20
  default: branch || 'local-development'
21
21
  };
22
+ const ignorePathDefinition = {
23
+ type: 'string',
24
+ array: true,
25
+ describe: 'list of paths to ignore from the command',
26
+ default: []
27
+ };
22
28
  let config = null;
23
29
 
24
30
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
25
- yargs__default["default"](process.argv.slice(2)).scriptName('vocab').option('config', {
31
+ yargsCli__default["default"](process.argv.slice(2)).scriptName('vocab').option('config', {
26
32
  type: 'string',
27
33
  describe: 'Path to config file'
28
34
  }).middleware(async ({
@@ -32,28 +38,34 @@ yargs__default["default"](process.argv.slice(2)).scriptName('vocab').option('con
32
38
  console.log('Loaded config from', configPath || process.cwd());
33
39
  }).command({
34
40
  command: 'push',
35
- builder: () => yargs__default["default"].options({
41
+ builder: yargs => yargs.options({
36
42
  branch: branchDefinition,
37
43
  'delete-unused-keys': {
38
44
  type: 'boolean',
39
45
  describe: 'Whether or not to delete unused keys after pushing',
40
46
  default: false
41
- }
47
+ },
48
+ ignore: ignorePathDefinition
42
49
  }),
43
50
  handler: async options => {
44
51
  await phrase.push(options, config);
45
52
  }
46
53
  }).command({
47
54
  command: 'pull',
48
- builder: () => yargs__default["default"].options({
49
- branch: branchDefinition
55
+ builder: yargs => yargs.options({
56
+ branch: branchDefinition,
57
+ 'error-on-no-global-key-translation': {
58
+ type: 'boolean',
59
+ describe: 'Throw an error when there is no translation for a global key',
60
+ default: false
61
+ }
50
62
  }),
51
63
  handler: async options => {
52
64
  await phrase.pull(options, config);
53
65
  }
54
66
  }).command({
55
67
  command: 'compile',
56
- builder: () => yargs__default["default"].options({
68
+ builder: yargs => yargs.options({
57
69
  watch: {
58
70
  type: 'boolean',
59
71
  default: false
@@ -1,6 +1,6 @@
1
1
  import { push, pull } from '@vocab/phrase';
2
2
  import { resolveConfig, compile, validate } from '@vocab/core';
3
- import yargs from 'yargs';
3
+ import yargsCli from 'yargs';
4
4
  import envCi from 'env-ci';
5
5
 
6
6
  /* eslint-disable no-console */
@@ -12,10 +12,16 @@ const branchDefinition = {
12
12
  describe: 'The Phrase branch to target',
13
13
  default: branch || 'local-development'
14
14
  };
15
+ const ignorePathDefinition = {
16
+ type: 'string',
17
+ array: true,
18
+ describe: 'list of paths to ignore from the command',
19
+ default: []
20
+ };
15
21
  let config = null;
16
22
 
17
23
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
18
- yargs(process.argv.slice(2)).scriptName('vocab').option('config', {
24
+ yargsCli(process.argv.slice(2)).scriptName('vocab').option('config', {
19
25
  type: 'string',
20
26
  describe: 'Path to config file'
21
27
  }).middleware(async ({
@@ -25,28 +31,34 @@ yargs(process.argv.slice(2)).scriptName('vocab').option('config', {
25
31
  console.log('Loaded config from', configPath || process.cwd());
26
32
  }).command({
27
33
  command: 'push',
28
- builder: () => yargs.options({
34
+ builder: yargs => yargs.options({
29
35
  branch: branchDefinition,
30
36
  'delete-unused-keys': {
31
37
  type: 'boolean',
32
38
  describe: 'Whether or not to delete unused keys after pushing',
33
39
  default: false
34
- }
40
+ },
41
+ ignore: ignorePathDefinition
35
42
  }),
36
43
  handler: async options => {
37
44
  await push(options, config);
38
45
  }
39
46
  }).command({
40
47
  command: 'pull',
41
- builder: () => yargs.options({
42
- branch: branchDefinition
48
+ builder: yargs => yargs.options({
49
+ branch: branchDefinition,
50
+ 'error-on-no-global-key-translation': {
51
+ type: 'boolean',
52
+ describe: 'Throw an error when there is no translation for a global key',
53
+ default: false
54
+ }
43
55
  }),
44
56
  handler: async options => {
45
57
  await pull(options, config);
46
58
  }
47
59
  }).command({
48
60
  command: 'compile',
49
- builder: () => yargs.options({
61
+ builder: yargs => yargs.options({
50
62
  watch: {
51
63
  type: 'boolean',
52
64
  default: false
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "@vocab/cli",
3
- "version": "0.0.0-compiled-translation-import-order-20230328231631",
3
+ "version": "0.0.0-feature-ignore-flag-push-20241014224750",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/seek-oss/vocab.git",
7
+ "directory": "packages/cli"
8
+ },
4
9
  "main": "dist/vocab-cli.cjs.js",
5
10
  "module": "dist/vocab-cli.esm.js",
6
11
  "bin": {
@@ -10,23 +15,20 @@
10
15
  "dist",
11
16
  "bin.js"
12
17
  ],
18
+ "engines": {
19
+ "node": ">=18"
20
+ },
13
21
  "author": "SEEK",
14
22
  "license": "MIT",
15
23
  "dependencies": {
16
- "@types/env-ci": "^3.1.0",
17
- "@vocab/core": "0.0.0-compiled-translation-import-order-20230328231631",
18
- "@vocab/phrase": "0.0.0-compiled-translation-import-order-20230328231631",
19
- "env-ci": "^5.0.2",
24
+ "env-ci": "^7.3.0",
20
25
  "fast-glob": "^3.2.4",
21
- "form-data": "^3.0.0",
22
- "node-fetch": "^2.6.1",
23
- "prettier": "^2.1.2",
24
- "yargs": "^16.1.0"
26
+ "yargs": "^17.7.2",
27
+ "@vocab/core": "^1.6.2",
28
+ "@vocab/phrase": "^0.0.0-feature-ignore-flag-push-20241014224750"
25
29
  },
26
30
  "devDependencies": {
27
- "@types/node-fetch": "^2.5.7",
28
- "@types/prettier": "^2.1.5",
29
- "@types/yargs": "^15.0.9",
30
- "@vocab/types": "^1.1.2"
31
+ "@types/env-ci": "^3.1.0",
32
+ "@types/yargs": "^17.0.32"
31
33
  }
32
34
  }