@cyklang/cli 0.11.7 → 0.12.0
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/build/ModuleCommand.js +8 -4
- package/package.json +2 -2
- package/src/ModuleCommand.ts +8 -4
- package/test/db/t21.output +2 -2
- package/test/t31.output +4 -0
- package/test/t31.xml +30 -0
package/build/ModuleCommand.js
CHANGED
|
@@ -43,10 +43,14 @@ class ModuleCommand extends commander_1.Command {
|
|
|
43
43
|
super(name);
|
|
44
44
|
this.description('manage modules');
|
|
45
45
|
// upload
|
|
46
|
-
this.addCommand(new ModuleU('upload', `Upload local module file(s) to the database.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
this.addCommand(new ModuleU('upload', `Upload local module file(s) to the database OR update module properties.
|
|
47
|
+
If [files...] given then upload files.
|
|
48
|
+
For each file, module name is the base name of the file. If a module with the same name already exists, it will be updated.
|
|
49
|
+
Otherwise, a new module is inserted in the database.
|
|
50
|
+
Without [files...] it is an update module properties command.
|
|
51
|
+
--id option is mandatory
|
|
52
|
+
`));
|
|
53
|
+
this.addCommand(new ModuleU('u', 'shortcut for (u)pload files or (u)pdate properties'));
|
|
50
54
|
// download
|
|
51
55
|
this.addCommand(new ModuleDownload('download', 'download module files to the current directory'));
|
|
52
56
|
this.addCommand(new ModuleDownload('d', 'shortcut for (d)ownload'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyklang/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "cyklang CLI",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"author": "",
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cyklang/core": "^0.
|
|
20
|
+
"@cyklang/core": "^0.9.0",
|
|
21
21
|
"commander": "^9.4.0",
|
|
22
22
|
"dotenv": "^16.0.1",
|
|
23
23
|
"form-data": "^4.0.0",
|
package/src/ModuleCommand.ts
CHANGED
|
@@ -15,11 +15,15 @@ export class ModuleCommand extends Command {
|
|
|
15
15
|
super(name)
|
|
16
16
|
this.description('manage modules')
|
|
17
17
|
// upload
|
|
18
|
-
this.addCommand(new ModuleU('upload', `Upload local module file(s) to the database.
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
this.addCommand(new ModuleU('upload', `Upload local module file(s) to the database OR update module properties.
|
|
19
|
+
If [files...] given then upload files.
|
|
20
|
+
For each file, module name is the base name of the file. If a module with the same name already exists, it will be updated.
|
|
21
|
+
Otherwise, a new module is inserted in the database.
|
|
22
|
+
Without [files...] it is an update module properties command.
|
|
23
|
+
--id option is mandatory
|
|
24
|
+
`)
|
|
21
25
|
)
|
|
22
|
-
this.addCommand(new ModuleU('u', 'shortcut for (u)pload'))
|
|
26
|
+
this.addCommand(new ModuleU('u', 'shortcut for (u)pload files or (u)pdate properties'))
|
|
23
27
|
// download
|
|
24
28
|
this.addCommand(new ModuleDownload('download', 'download module files to the current directory'))
|
|
25
29
|
this.addCommand(new ModuleDownload('d', 'shortcut for (d)ownload'))
|
package/test/db/t21.output
CHANGED
|
@@ -7,14 +7,14 @@ owner yves not in the collection
|
|
|
7
7
|
john's car's brand is BMW
|
|
8
8
|
bool : false
|
|
9
9
|
chaine : 150
|
|
10
|
-
<datetime name="dtbirthday">datetime("Mon Nov 04 1963 04:00:00 GMT+0400 (
|
|
10
|
+
<datetime name="dtbirthday">datetime("Mon Nov 04 1963 04:00:00 GMT+0400 (UTC+04:00)")</datetime>
|
|
11
11
|
<datetime name="dtundef1">
|
|
12
12
|
</datetime>
|
|
13
13
|
<datetime name="dtundef2">
|
|
14
14
|
</datetime>
|
|
15
15
|
<datetime name="dtnull1">
|
|
16
16
|
</datetime>
|
|
17
|
-
<datetime name="dtbirthday">datetime("Mon Nov 04 1963 04:00:00 GMT+0400 (
|
|
17
|
+
<datetime name="dtbirthday">datetime("Mon Nov 04 1963 04:00:00 GMT+0400 (UTC+04:00)")</datetime>
|
|
18
18
|
<datetime name="dtundef1">
|
|
19
19
|
</datetime>
|
|
20
20
|
<datetime name="dtundef2">
|
package/test/t31.output
ADDED
package/test/t31.xml
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml-model href="../../../../VueProjects/docs-vuepress/docs/.vuepress/public/cyklang.xsd" ?>
|
|
2
|
+
<module>
|
|
3
|
+
<function name="buildname" returns="result: string">
|
|
4
|
+
<string name="first"/>
|
|
5
|
+
<string name="last"/>
|
|
6
|
+
<block>
|
|
7
|
+
<set name="result">first + " " + last</set>
|
|
8
|
+
</block>
|
|
9
|
+
</function>
|
|
10
|
+
<function name="buildresume" returns="result: string">
|
|
11
|
+
<string name="name"/>
|
|
12
|
+
<string name="comment"/>
|
|
13
|
+
<block>
|
|
14
|
+
<set name="result">name + " : " + comment</set>
|
|
15
|
+
</block>
|
|
16
|
+
</function>
|
|
17
|
+
<string name="firstname">"John"</string>
|
|
18
|
+
<string name="lastname">"DOE"</string>
|
|
19
|
+
<string name="name" reactive="">buildname(firstname, lastname)</string>
|
|
20
|
+
<string name="comment">"Le soldat inconnu"</string>
|
|
21
|
+
<string name="resume" reactive="">buildresume(name, comment)</string>
|
|
22
|
+
<print>"name: " + name</print>
|
|
23
|
+
<print>"resume: " + resume</print>
|
|
24
|
+
<set name="lastname">"WAYNE"</set>
|
|
25
|
+
<set name="comment">"Le cow-boy"</set>
|
|
26
|
+
<sleep>100</sleep>
|
|
27
|
+
<print>"name: " + name</print>
|
|
28
|
+
<print>"resume: " + resume</print>
|
|
29
|
+
|
|
30
|
+
</module>
|