@vocab/cli 0.0.0-global-key-support-20231025223328 → 0.0.0-master-20250202230611

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
- export * from "./declarations/src/index";
1
+ export * from "./declarations/src/index.js";
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: 'Array of glob paths to ignore when searching for keys to push',
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,20 +38,21 @@ 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({
55
+ builder: yargs => yargs.options({
49
56
  branch: branchDefinition,
50
57
  'error-on-no-global-key-translation': {
51
58
  type: 'boolean',
@@ -58,7 +65,7 @@ yargs__default["default"](process.argv.slice(2)).scriptName('vocab').option('con
58
65
  }
59
66
  }).command({
60
67
  command: 'compile',
61
- builder: () => yargs__default["default"].options({
68
+ builder: yargs => yargs.options({
62
69
  watch: {
63
70
  type: 'boolean',
64
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: 'Array of glob paths to ignore when searching for keys to push',
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,20 +38,21 @@ 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({
55
+ builder: yargs => yargs.options({
49
56
  branch: branchDefinition,
50
57
  'error-on-no-global-key-translation': {
51
58
  type: 'boolean',
@@ -58,7 +65,7 @@ yargs__default["default"](process.argv.slice(2)).scriptName('vocab').option('con
58
65
  }
59
66
  }).command({
60
67
  command: 'compile',
61
- builder: () => yargs__default["default"].options({
68
+ builder: yargs => yargs.options({
62
69
  watch: {
63
70
  type: 'boolean',
64
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: 'Array of glob paths to ignore when searching for keys to push',
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,20 +31,21 @@ 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({
48
+ builder: yargs => yargs.options({
42
49
  branch: branchDefinition,
43
50
  'error-on-no-global-key-translation': {
44
51
  type: 'boolean',
@@ -51,7 +58,7 @@ yargs(process.argv.slice(2)).scriptName('vocab').option('config', {
51
58
  }
52
59
  }).command({
53
60
  command: 'compile',
54
- builder: () => yargs.options({
61
+ builder: yargs => yargs.options({
55
62
  watch: {
56
63
  type: 'boolean',
57
64
  default: false
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "@vocab/cli",
3
- "version": "0.0.0-global-key-support-20231025223328",
3
+ "version": "0.0.0-master-20250202230611",
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,22 +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-global-key-support-20231025223328",
18
- "@vocab/phrase": "0.0.0-global-key-support-20231025223328",
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.3",
28
+ "@vocab/phrase": "^0.0.0-master-20250202230611"
25
29
  },
26
30
  "devDependencies": {
27
- "@types/node-fetch": "^2.5.7",
28
- "@types/prettier": "^2.1.5",
29
- "@types/yargs": "^15.0.9"
31
+ "@types/env-ci": "^3.1.0",
32
+ "@types/yargs": "^17.0.32"
30
33
  }
31
34
  }