@knocklabs/cli 0.1.0-rc.1 → 0.1.0-rc.2
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 +3 -3
- package/dist/lib/marshal/workflow/reader.js +6 -15
- package/oclif.manifest.json +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ $ npm install -g @knocklabs/cli
|
|
|
16
16
|
$ knock COMMAND
|
|
17
17
|
running command...
|
|
18
18
|
$ knock (--version)
|
|
19
|
-
@knocklabs/cli/0.1.0-rc.
|
|
19
|
+
@knocklabs/cli/0.1.0-rc.2 linux-x64 node-v16.4.2
|
|
20
20
|
$ knock --help [COMMAND]
|
|
21
21
|
USAGE
|
|
22
22
|
$ knock COMMAND
|
|
@@ -62,7 +62,7 @@ FLAGS
|
|
|
62
62
|
--service-token=<value> (required) The service token to authenticate with
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
_See code: [dist/commands/commit/index.ts](https://github.com/knocklabs/knock-cli/blob/v0.1.0-rc.
|
|
65
|
+
_See code: [dist/commands/commit/index.ts](https://github.com/knocklabs/knock-cli/blob/v0.1.0-rc.2/dist/commands/commit/index.ts)_
|
|
66
66
|
|
|
67
67
|
## `knock commit promote`
|
|
68
68
|
|
|
@@ -114,7 +114,7 @@ EXAMPLES
|
|
|
114
114
|
$ knock ping
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
_See code: [dist/commands/ping.ts](https://github.com/knocklabs/knock-cli/blob/v0.1.0-rc.
|
|
117
|
+
_See code: [dist/commands/ping.ts](https://github.com/knocklabs/knock-cli/blob/v0.1.0-rc.2/dist/commands/ping.ts)_
|
|
118
118
|
|
|
119
119
|
## `knock plugins`
|
|
120
120
|
|
|
@@ -10,7 +10,8 @@ function _export(target, all) {
|
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
12
|
validateTemplateFilePathFormat: ()=>validateTemplateFilePathFormat,
|
|
13
|
-
readWorkflowDir: ()=>readWorkflowDir
|
|
13
|
+
readWorkflowDir: ()=>readWorkflowDir,
|
|
14
|
+
readTemplateFile: ()=>readTemplateFile
|
|
14
15
|
});
|
|
15
16
|
const _nodePath = /*#__PURE__*/ _interopRequireWildcard(require("node:path"));
|
|
16
17
|
const _fsExtra = /*#__PURE__*/ _interopRequireWildcard(require("fs-extra"));
|
|
@@ -78,26 +79,16 @@ const readTemplateFile = async (relpath, workflowDirCtx)=>{
|
|
|
78
79
|
// First read all template files as text content and check for valid liquid
|
|
79
80
|
// syntax given it is supported across all message templates and formats.
|
|
80
81
|
const content = await _fsExtra.readFile(abspath, "utf8");
|
|
81
|
-
const
|
|
82
|
-
|
|
82
|
+
const liquidParseError = (0, _liquid.validateLiquidSyntax)(content);
|
|
83
|
+
return liquidParseError ? [
|
|
83
84
|
undefined,
|
|
84
85
|
[
|
|
85
|
-
|
|
86
|
+
liquidParseError
|
|
86
87
|
]
|
|
87
|
-
]
|
|
88
|
-
// If not a json file, we can just return the file content.
|
|
89
|
-
const isJsonFile = abspath.toLowerCase().endsWith(".json");
|
|
90
|
-
if (!isJsonFile) return [
|
|
88
|
+
] : [
|
|
91
89
|
content,
|
|
92
90
|
[]
|
|
93
91
|
];
|
|
94
|
-
// If json, parse it as json and validate it as such.
|
|
95
|
-
const [obj, errors] = await (0, _json.readJson)(abspath);
|
|
96
|
-
const json = obj && JSON.stringify(obj);
|
|
97
|
-
return [
|
|
98
|
-
json,
|
|
99
|
-
errors
|
|
100
|
-
];
|
|
101
92
|
};
|
|
102
93
|
/*
|
|
103
94
|
* Validates that a given value is a valid template file path and the file
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knocklabs/cli",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.2",
|
|
4
4
|
"description": "Knock CLI",
|
|
5
5
|
"author": "@knocklabs",
|
|
6
6
|
"bin": {
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"date-fns": "^2.29.3",
|
|
26
26
|
"enquirer": "^2.3.6",
|
|
27
27
|
"fs-extra": "^10.1.0",
|
|
28
|
-
"liquidjs": "^10.
|
|
28
|
+
"liquidjs": "^10.6.1",
|
|
29
29
|
"lodash": "^4.17.21",
|
|
30
30
|
"yup": "^0.32.11"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@oclif/test": "^2.3.
|
|
33
|
+
"@oclif/test": "^2.3.9",
|
|
34
34
|
"@swc/cli": "^0.1.62",
|
|
35
|
-
"@swc/core": "^1.3.
|
|
35
|
+
"@swc/core": "^1.3.37",
|
|
36
36
|
"@swc/helpers": "^0.4.14",
|
|
37
37
|
"@types/chai": "^4",
|
|
38
38
|
"@types/fs-extra": "^9.0.13",
|
|
39
39
|
"@types/mocha": "^9.0.0",
|
|
40
|
-
"@types/node": "^16.18.
|
|
40
|
+
"@types/node": "^16.18.14",
|
|
41
41
|
"chai": "^4",
|
|
42
42
|
"eslint": "^7.32.0",
|
|
43
43
|
"eslint-config-oclif": "^4",
|