@vocab/cli 0.0.0-delete-unused-keys-20228144520 → 0.0.0-package-files-20231142931
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/CHANGELOG.md +19 -4
- package/dist/vocab-cli.cjs.dev.js +1 -1
- package/dist/vocab-cli.cjs.prod.js +1 -1
- package/dist/vocab-cli.esm.js +1 -1
- package/package.json +6 -2
- package/src/index.ts +0 -73
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
# @vocab/cli
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-package-files-20231142931
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`29c81d3`](https://github.com/seek-oss/vocab/commit/29c81d370799f631d97c45e727b8cf81453bd398) Thanks [@askoufis](https://github.com/askoufis)! - Exclude source files from package build
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`29c81d3`](https://github.com/seek-oss/vocab/commit/29c81d370799f631d97c45e727b8cf81453bd398)]:
|
|
10
|
+
- @vocab/phrase@0.0.0-package-files-20231142931
|
|
11
|
+
|
|
12
|
+
## 1.2.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
6
15
|
|
|
7
|
-
- [`
|
|
16
|
+
- [`66ed22c`](https://github.com/seek-oss/vocab/commit/66ed22cac6f89018d5fd69fd6f6408e090e1a382) [#93](https://github.com/seek-oss/vocab/pull/93) Thanks [@askoufis](https://github.com/askoufis)! - Add an optional `delete-unused-keys` flag to the `push` command. If set to `true`, unused keys will be deleted from Phrase after translations are pushed.
|
|
17
|
+
|
|
18
|
+
**EXAMPLE USAGE**:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
vocab push --delete-unused-keys
|
|
22
|
+
```
|
|
8
23
|
|
|
9
24
|
### Patch Changes
|
|
10
25
|
|
|
11
|
-
- Updated dependencies [[`
|
|
12
|
-
- @vocab/phrase@
|
|
26
|
+
- Updated dependencies [[`66ed22c`](https://github.com/seek-oss/vocab/commit/66ed22cac6f89018d5fd69fd6f6408e090e1a382), [`159d559`](https://github.com/seek-oss/vocab/commit/159d559c87c66c3e91c707fb45a1f67ebec07b4d)]:
|
|
27
|
+
- @vocab/phrase@1.1.0
|
|
13
28
|
|
|
14
29
|
## 1.1.0
|
|
15
30
|
|
|
@@ -33,7 +33,7 @@ yargs__default['default'](process.argv.slice(2)).scriptName('vocab').option('con
|
|
|
33
33
|
command: 'push',
|
|
34
34
|
builder: () => yargs__default['default'].options({
|
|
35
35
|
branch: branchDefinition,
|
|
36
|
-
|
|
36
|
+
'delete-unused-keys': {
|
|
37
37
|
type: 'boolean',
|
|
38
38
|
describe: 'Whether or not to delete unused keys after pushing',
|
|
39
39
|
default: false
|
|
@@ -33,7 +33,7 @@ yargs__default['default'](process.argv.slice(2)).scriptName('vocab').option('con
|
|
|
33
33
|
command: 'push',
|
|
34
34
|
builder: () => yargs__default['default'].options({
|
|
35
35
|
branch: branchDefinition,
|
|
36
|
-
|
|
36
|
+
'delete-unused-keys': {
|
|
37
37
|
type: 'boolean',
|
|
38
38
|
describe: 'Whether or not to delete unused keys after pushing',
|
|
39
39
|
default: false
|
package/dist/vocab-cli.esm.js
CHANGED
|
@@ -26,7 +26,7 @@ yargs(process.argv.slice(2)).scriptName('vocab').option('config', {
|
|
|
26
26
|
command: 'push',
|
|
27
27
|
builder: () => yargs.options({
|
|
28
28
|
branch: branchDefinition,
|
|
29
|
-
|
|
29
|
+
'delete-unused-keys': {
|
|
30
30
|
type: 'boolean',
|
|
31
31
|
describe: 'Whether or not to delete unused keys after pushing',
|
|
32
32
|
default: false
|
package/package.json
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vocab/cli",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-package-files-20231142931",
|
|
4
4
|
"main": "dist/vocab-cli.cjs.js",
|
|
5
5
|
"module": "dist/vocab-cli.esm.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"vocab": "bin.js"
|
|
8
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"bin.js"
|
|
12
|
+
],
|
|
9
13
|
"author": "SEEK",
|
|
10
14
|
"license": "MIT",
|
|
11
15
|
"dependencies": {
|
|
12
16
|
"@types/env-ci": "^3.1.0",
|
|
13
17
|
"@vocab/core": "^1.1.0",
|
|
14
|
-
"@vocab/phrase": "^0.0.0-
|
|
18
|
+
"@vocab/phrase": "^0.0.0-package-files-20231142931",
|
|
15
19
|
"env-ci": "^5.0.2",
|
|
16
20
|
"fast-glob": "^3.2.4",
|
|
17
21
|
"form-data": "^3.0.0",
|
package/src/index.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
import type { UserConfig } from '@vocab/types';
|
|
3
|
-
import { pull, push } from '@vocab/phrase';
|
|
4
|
-
import { resolveConfig, compile, validate } from '@vocab/core';
|
|
5
|
-
import yargs from 'yargs';
|
|
6
|
-
|
|
7
|
-
import envCi from 'env-ci';
|
|
8
|
-
|
|
9
|
-
const { branch } = envCi();
|
|
10
|
-
|
|
11
|
-
const branchDefinition = {
|
|
12
|
-
type: 'string',
|
|
13
|
-
describe: 'The Phrase branch to target',
|
|
14
|
-
default: branch || 'local-development',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
let config: UserConfig | null = null;
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
20
|
-
yargs(process.argv.slice(2))
|
|
21
|
-
.scriptName('vocab')
|
|
22
|
-
.option('config', {
|
|
23
|
-
type: 'string',
|
|
24
|
-
describe: 'Path to config file',
|
|
25
|
-
})
|
|
26
|
-
.middleware(async ({ config: configPath }) => {
|
|
27
|
-
config = await resolveConfig(configPath);
|
|
28
|
-
console.log('Loaded config from', configPath || process.cwd());
|
|
29
|
-
})
|
|
30
|
-
.command({
|
|
31
|
-
command: 'push',
|
|
32
|
-
builder: () =>
|
|
33
|
-
yargs.options({
|
|
34
|
-
branch: branchDefinition,
|
|
35
|
-
deleteUnusedKeys: {
|
|
36
|
-
type: 'boolean',
|
|
37
|
-
describe: 'Whether or not to delete unused keys after pushing',
|
|
38
|
-
default: false,
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
handler: async (options) => {
|
|
42
|
-
await push(options, config!);
|
|
43
|
-
},
|
|
44
|
-
})
|
|
45
|
-
.command({
|
|
46
|
-
command: 'pull',
|
|
47
|
-
builder: () => yargs.options({ branch: branchDefinition }),
|
|
48
|
-
handler: async (options) => {
|
|
49
|
-
await pull(options, config!);
|
|
50
|
-
},
|
|
51
|
-
})
|
|
52
|
-
.command({
|
|
53
|
-
command: 'compile',
|
|
54
|
-
builder: () =>
|
|
55
|
-
yargs.options({
|
|
56
|
-
watch: { type: 'boolean', default: false },
|
|
57
|
-
}),
|
|
58
|
-
handler: async ({ watch }) => {
|
|
59
|
-
await compile({ watch }, config!);
|
|
60
|
-
},
|
|
61
|
-
})
|
|
62
|
-
.command({
|
|
63
|
-
command: 'validate',
|
|
64
|
-
handler: async () => {
|
|
65
|
-
const valid = await validate(config!);
|
|
66
|
-
|
|
67
|
-
if (!valid) {
|
|
68
|
-
throw new Error('Project invalid');
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
})
|
|
72
|
-
.help()
|
|
73
|
-
.wrap(72).argv;
|