@knocklabs/cli 0.1.13 → 0.1.15
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 +506 -6
- package/dist/{src/commands → commands}/translation/get.js +15 -3
- package/dist/{src/commands → commands}/translation/pull.js +18 -4
- package/dist/{src/commands → commands}/translation/push.js +2 -1
- package/dist/{src/commands → commands}/translation/validate.js +2 -1
- package/dist/{src/lib → lib}/api-v1.js +3 -1
- package/dist/{src/lib → lib}/marshal/translation/helpers.js +33 -8
- package/dist/lib/marshal/translation/processor.isomorphic.js +59 -0
- package/dist/{src/lib → lib}/marshal/translation/reader.js +56 -5
- package/dist/{src/lib → lib}/marshal/translation/writer.js +21 -6
- package/dist/lib/run-context/types.js +4 -0
- package/oclif.manifest.json +1784 -2
- package/package.json +6 -6
- package/dist/src/lib/marshal/translation/processor.isomorphic.js +0 -39
- package/dist/src/lib/marshal/translation/types.js +0 -5
- /package/dist/{src/commands → commands}/commit/get.js +0 -0
- /package/dist/{src/commands → commands}/commit/index.js +0 -0
- /package/dist/{src/commands → commands}/commit/list.js +0 -0
- /package/dist/{src/commands → commands}/commit/promote.js +0 -0
- /package/dist/{src/commands → commands}/knock.js +0 -0
- /package/dist/{src/commands → commands}/layout/get.js +0 -0
- /package/dist/{src/commands → commands}/layout/list.js +0 -0
- /package/dist/{src/commands → commands}/layout/pull.js +0 -0
- /package/dist/{src/commands → commands}/layout/push.js +0 -0
- /package/dist/{src/commands → commands}/layout/validate.js +0 -0
- /package/dist/{src/commands → commands}/ping.js +0 -0
- /package/dist/{src/commands → commands}/translation/list.js +0 -0
- /package/dist/{src/commands → commands}/whoami.js +0 -0
- /package/dist/{src/commands → commands}/workflow/activate.js +0 -0
- /package/dist/{src/commands → commands}/workflow/get.js +0 -0
- /package/dist/{src/commands → commands}/workflow/list.js +0 -0
- /package/dist/{src/commands → commands}/workflow/new.js +0 -0
- /package/dist/{src/commands → commands}/workflow/pull.js +0 -0
- /package/dist/{src/commands → commands}/workflow/push.js +0 -0
- /package/dist/{src/commands → commands}/workflow/run.js +0 -0
- /package/dist/{src/commands → commands}/workflow/validate.js +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/isomorphic.js → isomorphic.js} +0 -0
- /package/dist/{src/lib → lib}/base-command.js +0 -0
- /package/dist/{src/lib → lib}/helpers/const.js +0 -0
- /package/dist/{src/lib → lib}/helpers/date.js +0 -0
- /package/dist/{src/lib → lib}/helpers/error.js +0 -0
- /package/dist/{src/lib → lib}/helpers/flag.js +0 -0
- /package/dist/{src/lib → lib}/helpers/fs.js +0 -0
- /package/dist/{src/lib → lib}/helpers/json.js +0 -0
- /package/dist/{src/lib → lib}/helpers/liquid.js +0 -0
- /package/dist/{src/lib → lib}/helpers/object.isomorphic.js +0 -0
- /package/dist/{src/lib → lib}/helpers/page.js +0 -0
- /package/dist/{src/lib → lib}/helpers/request.js +0 -0
- /package/dist/{src/lib → lib}/helpers/string.js +0 -0
- /package/dist/{src/lib → lib}/helpers/ux.js +0 -0
- /package/dist/{src/lib → lib}/marshal/commit/helpers.js +0 -0
- /package/dist/{src/lib → lib}/marshal/commit/index.js +0 -0
- /package/dist/{src/lib → lib}/marshal/commit/types.js +0 -0
- /package/dist/{src/lib → lib}/marshal/conditions/helpers.js +0 -0
- /package/dist/{src/lib → lib}/marshal/conditions/index.js +0 -0
- /package/dist/{src/lib → lib}/marshal/conditions/types.js +0 -0
- /package/dist/{src/lib → lib}/marshal/email-layout/helpers.js +0 -0
- /package/dist/{src/lib → lib}/marshal/email-layout/index.js +0 -0
- /package/dist/{src/lib → lib}/marshal/email-layout/processor.isomorphic.js +0 -0
- /package/dist/{src/lib → lib}/marshal/email-layout/reader.js +0 -0
- /package/dist/{src/lib → lib}/marshal/email-layout/types.js +0 -0
- /package/dist/{src/lib → lib}/marshal/email-layout/writer.js +0 -0
- /package/dist/{src/lib → lib}/marshal/index.isomorphic.js +0 -0
- /package/dist/{src/lib → lib}/marshal/shared/const.isomorphic.js +0 -0
- /package/dist/{src/lib → lib}/marshal/shared/helpers.js +0 -0
- /package/dist/{src/lib → lib}/marshal/shared/types.js +0 -0
- /package/dist/{src/lib → lib}/marshal/translation/index.js +0 -0
- /package/dist/{src/lib/run-context → lib/marshal/translation}/types.js +0 -0
- /package/dist/{src/lib → lib}/marshal/workflow/generator.js +0 -0
- /package/dist/{src/lib → lib}/marshal/workflow/helpers.js +0 -0
- /package/dist/{src/lib → lib}/marshal/workflow/index.js +0 -0
- /package/dist/{src/lib → lib}/marshal/workflow/processor.isomorphic.js +0 -0
- /package/dist/{src/lib → lib}/marshal/workflow/reader.js +0 -0
- /package/dist/{src/lib → lib}/marshal/workflow/types.js +0 -0
- /package/dist/{src/lib → lib}/marshal/workflow/writer.js +0 -0
- /package/dist/{src/lib → lib}/run-context/helpers.js +0 -0
- /package/dist/{src/lib → lib}/run-context/index.js +0 -0
- /package/dist/{src/lib → lib}/run-context/loader.js +0 -0
- /package/dist/{src/lib → lib}/user-config.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knocklabs/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "Knock CLI",
|
|
5
5
|
"author": "@knocklabs",
|
|
6
6
|
"bin": {
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
"@oclif/plugin-help": "^6",
|
|
22
22
|
"@oclif/plugin-plugins": "^4",
|
|
23
23
|
"@prantlf/jsonlint": "^14.0.3",
|
|
24
|
-
"axios": "^1.
|
|
24
|
+
"axios": "^1.6.8",
|
|
25
25
|
"date-fns": "^2.30.0",
|
|
26
26
|
"enquirer": "^2.4.1",
|
|
27
27
|
"fs-extra": "^11.2.0",
|
|
28
|
-
"liquidjs": "^10.
|
|
28
|
+
"liquidjs": "^10.12.0",
|
|
29
29
|
"locale-codes": "^1.3.1",
|
|
30
30
|
"lodash": "^4.17.21",
|
|
31
31
|
"yup": "^1.4.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@oclif/test": "^3",
|
|
35
|
-
"@swc/cli": "^0.3.
|
|
35
|
+
"@swc/cli": "^0.3.12",
|
|
36
36
|
"@swc/core": "^1.4.6",
|
|
37
37
|
"@swc/helpers": "^0.5.6",
|
|
38
38
|
"@types/chai": "^4",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"eslint-plugin-prettier": "^4.2.1",
|
|
48
48
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
49
49
|
"mocha": "^10",
|
|
50
|
-
"nock": "^13.5.
|
|
50
|
+
"nock": "^13.5.4",
|
|
51
51
|
"oclif": "^4",
|
|
52
52
|
"prettier": "2.8.8",
|
|
53
53
|
"shx": "^0.3.4",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
|
-
"build": "shx rm -rf dist && swc src -d dist",
|
|
85
|
+
"build": "shx rm -rf dist && swc src -d dist --strip-leading-paths",
|
|
86
86
|
"lint": "eslint . --ext .ts --config .eslintrc.json",
|
|
87
87
|
"lint.fix": "yarn run lint --fix",
|
|
88
88
|
"format": "prettier \"src/**/*.+(ts|js)\" \"test/**/*.+(ts|js)\"",
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
buildTranslationDirBundle: function() {
|
|
13
|
-
return buildTranslationDirBundle;
|
|
14
|
-
},
|
|
15
|
-
formatFileName: function() {
|
|
16
|
-
return formatFileName;
|
|
17
|
-
},
|
|
18
|
-
formatRef: function() {
|
|
19
|
-
return formatRef;
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
const formatRef = (localeCode, namespace)=>namespace ? `${namespace}.${localeCode}` : localeCode;
|
|
23
|
-
const formatFileName = (input)=>{
|
|
24
|
-
const ref = typeof input === "string" ? input : formatRef(input.locale_code, input.namespace);
|
|
25
|
-
return `${ref}.json`;
|
|
26
|
-
};
|
|
27
|
-
const buildTranslationDirBundle = (input)=>{
|
|
28
|
-
if (Array.isArray(input)) {
|
|
29
|
-
const translations = input;
|
|
30
|
-
return Object.fromEntries(translations.map((translation)=>[
|
|
31
|
-
formatFileName(translation),
|
|
32
|
-
JSON.parse(translation.content)
|
|
33
|
-
]));
|
|
34
|
-
}
|
|
35
|
-
const translation = input;
|
|
36
|
-
return {
|
|
37
|
-
[formatFileName(translation)]: JSON.parse(translation.content)
|
|
38
|
-
};
|
|
39
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|