@vocab/cli 1.4.4 → 2.0.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 +2 -2
- package/dist/vocab-cli.cjs.dev.js +6 -6
- package/dist/vocab-cli.cjs.prod.js +6 -6
- package/dist/vocab-cli.esm.js +5 -5
- package/package.json +9 -11
package/README.md
CHANGED
|
@@ -39,8 +39,8 @@ This is the language Vocab will assume when it sees a `translation.json` file wi
|
|
|
39
39
|
```js
|
|
40
40
|
// vocab.config.js
|
|
41
41
|
module.exports = {
|
|
42
|
-
languages: [{ name: 'en' }, { name: 'fr' }]
|
|
43
|
-
devLanguage: 'en'
|
|
42
|
+
languages: [{ name: 'en' }, { name: 'fr' }],
|
|
43
|
+
devLanguage: 'en'
|
|
44
44
|
};
|
|
45
45
|
```
|
|
46
46
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
var phrase = require('@vocab/phrase');
|
|
4
4
|
var core = require('@vocab/core');
|
|
5
|
-
var
|
|
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
|
|
10
|
+
var yargsCli__default = /*#__PURE__*/_interopDefault(yargsCli);
|
|
11
11
|
var envCi__default = /*#__PURE__*/_interopDefault(envCi);
|
|
12
12
|
|
|
13
13
|
/* eslint-disable no-console */
|
|
@@ -22,7 +22,7 @@ const branchDefinition = {
|
|
|
22
22
|
let config = null;
|
|
23
23
|
|
|
24
24
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
25
|
-
|
|
25
|
+
yargsCli__default["default"](process.argv.slice(2)).scriptName('vocab').option('config', {
|
|
26
26
|
type: 'string',
|
|
27
27
|
describe: 'Path to config file'
|
|
28
28
|
}).middleware(async ({
|
|
@@ -32,7 +32,7 @@ yargs__default["default"](process.argv.slice(2)).scriptName('vocab').option('con
|
|
|
32
32
|
console.log('Loaded config from', configPath || process.cwd());
|
|
33
33
|
}).command({
|
|
34
34
|
command: 'push',
|
|
35
|
-
builder:
|
|
35
|
+
builder: yargs => yargs.options({
|
|
36
36
|
branch: branchDefinition,
|
|
37
37
|
'delete-unused-keys': {
|
|
38
38
|
type: 'boolean',
|
|
@@ -45,7 +45,7 @@ yargs__default["default"](process.argv.slice(2)).scriptName('vocab').option('con
|
|
|
45
45
|
}
|
|
46
46
|
}).command({
|
|
47
47
|
command: 'pull',
|
|
48
|
-
builder:
|
|
48
|
+
builder: yargs => yargs.options({
|
|
49
49
|
branch: branchDefinition,
|
|
50
50
|
'error-on-no-global-key-translation': {
|
|
51
51
|
type: 'boolean',
|
|
@@ -58,7 +58,7 @@ yargs__default["default"](process.argv.slice(2)).scriptName('vocab').option('con
|
|
|
58
58
|
}
|
|
59
59
|
}).command({
|
|
60
60
|
command: 'compile',
|
|
61
|
-
builder:
|
|
61
|
+
builder: yargs => yargs.options({
|
|
62
62
|
watch: {
|
|
63
63
|
type: 'boolean',
|
|
64
64
|
default: false
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
var phrase = require('@vocab/phrase');
|
|
4
4
|
var core = require('@vocab/core');
|
|
5
|
-
var
|
|
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
|
|
10
|
+
var yargsCli__default = /*#__PURE__*/_interopDefault(yargsCli);
|
|
11
11
|
var envCi__default = /*#__PURE__*/_interopDefault(envCi);
|
|
12
12
|
|
|
13
13
|
/* eslint-disable no-console */
|
|
@@ -22,7 +22,7 @@ const branchDefinition = {
|
|
|
22
22
|
let config = null;
|
|
23
23
|
|
|
24
24
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
25
|
-
|
|
25
|
+
yargsCli__default["default"](process.argv.slice(2)).scriptName('vocab').option('config', {
|
|
26
26
|
type: 'string',
|
|
27
27
|
describe: 'Path to config file'
|
|
28
28
|
}).middleware(async ({
|
|
@@ -32,7 +32,7 @@ yargs__default["default"](process.argv.slice(2)).scriptName('vocab').option('con
|
|
|
32
32
|
console.log('Loaded config from', configPath || process.cwd());
|
|
33
33
|
}).command({
|
|
34
34
|
command: 'push',
|
|
35
|
-
builder:
|
|
35
|
+
builder: yargs => yargs.options({
|
|
36
36
|
branch: branchDefinition,
|
|
37
37
|
'delete-unused-keys': {
|
|
38
38
|
type: 'boolean',
|
|
@@ -45,7 +45,7 @@ yargs__default["default"](process.argv.slice(2)).scriptName('vocab').option('con
|
|
|
45
45
|
}
|
|
46
46
|
}).command({
|
|
47
47
|
command: 'pull',
|
|
48
|
-
builder:
|
|
48
|
+
builder: yargs => yargs.options({
|
|
49
49
|
branch: branchDefinition,
|
|
50
50
|
'error-on-no-global-key-translation': {
|
|
51
51
|
type: 'boolean',
|
|
@@ -58,7 +58,7 @@ yargs__default["default"](process.argv.slice(2)).scriptName('vocab').option('con
|
|
|
58
58
|
}
|
|
59
59
|
}).command({
|
|
60
60
|
command: 'compile',
|
|
61
|
-
builder:
|
|
61
|
+
builder: yargs => yargs.options({
|
|
62
62
|
watch: {
|
|
63
63
|
type: 'boolean',
|
|
64
64
|
default: false
|
package/dist/vocab-cli.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { push, pull } from '@vocab/phrase';
|
|
2
2
|
import { resolveConfig, compile, validate } from '@vocab/core';
|
|
3
|
-
import
|
|
3
|
+
import yargsCli from 'yargs';
|
|
4
4
|
import envCi from 'env-ci';
|
|
5
5
|
|
|
6
6
|
/* eslint-disable no-console */
|
|
@@ -15,7 +15,7 @@ const branchDefinition = {
|
|
|
15
15
|
let config = null;
|
|
16
16
|
|
|
17
17
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
18
|
-
|
|
18
|
+
yargsCli(process.argv.slice(2)).scriptName('vocab').option('config', {
|
|
19
19
|
type: 'string',
|
|
20
20
|
describe: 'Path to config file'
|
|
21
21
|
}).middleware(async ({
|
|
@@ -25,7 +25,7 @@ yargs(process.argv.slice(2)).scriptName('vocab').option('config', {
|
|
|
25
25
|
console.log('Loaded config from', configPath || process.cwd());
|
|
26
26
|
}).command({
|
|
27
27
|
command: 'push',
|
|
28
|
-
builder:
|
|
28
|
+
builder: yargs => yargs.options({
|
|
29
29
|
branch: branchDefinition,
|
|
30
30
|
'delete-unused-keys': {
|
|
31
31
|
type: 'boolean',
|
|
@@ -38,7 +38,7 @@ yargs(process.argv.slice(2)).scriptName('vocab').option('config', {
|
|
|
38
38
|
}
|
|
39
39
|
}).command({
|
|
40
40
|
command: 'pull',
|
|
41
|
-
builder:
|
|
41
|
+
builder: yargs => yargs.options({
|
|
42
42
|
branch: branchDefinition,
|
|
43
43
|
'error-on-no-global-key-translation': {
|
|
44
44
|
type: 'boolean',
|
|
@@ -51,7 +51,7 @@ yargs(process.argv.slice(2)).scriptName('vocab').option('config', {
|
|
|
51
51
|
}
|
|
52
52
|
}).command({
|
|
53
53
|
command: 'compile',
|
|
54
|
-
builder:
|
|
54
|
+
builder: yargs => yargs.options({
|
|
55
55
|
watch: {
|
|
56
56
|
type: 'boolean',
|
|
57
57
|
default: false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vocab/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/seek-oss/vocab.git",
|
|
@@ -15,22 +15,20 @@
|
|
|
15
15
|
"dist",
|
|
16
16
|
"bin.js"
|
|
17
17
|
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=18"
|
|
20
|
+
},
|
|
18
21
|
"author": "SEEK",
|
|
19
22
|
"license": "MIT",
|
|
20
23
|
"dependencies": {
|
|
21
|
-
"@types/env-ci": "^3.1.0",
|
|
22
|
-
"@vocab/core": "^1.6.2",
|
|
23
|
-
"@vocab/phrase": "^1.3.3",
|
|
24
24
|
"env-ci": "^7.3.0",
|
|
25
25
|
"fast-glob": "^3.2.4",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"yargs": "^16.1.0"
|
|
26
|
+
"yargs": "^17.7.2",
|
|
27
|
+
"@vocab/core": "^1.6.2",
|
|
28
|
+
"@vocab/phrase": "^2.0.1"
|
|
30
29
|
},
|
|
31
30
|
"devDependencies": {
|
|
32
|
-
"@types/
|
|
33
|
-
"@types/
|
|
34
|
-
"@types/yargs": "^15.0.9"
|
|
31
|
+
"@types/env-ci": "^3.1.0",
|
|
32
|
+
"@types/yargs": "^17.0.32"
|
|
35
33
|
}
|
|
36
34
|
}
|