@cyklang/cli 0.2.2 → 0.3.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/AssetCommand.js +63 -23
- package/build/Cmd.d.ts +2 -2
- package/build/Cmd.js +2 -1
- package/build/DBClient.d.ts +2 -0
- package/build/DBClient.js +16 -0
- package/build/ModuleCommand.js +11 -3
- package/build/QueryCommand.js +49 -39
- package/build/RunCommand.js +21 -28
- package/build/TableCommand.js +8 -8
- package/build/TestCommand.js +21 -2
- package/build/UserCommand.js +7 -1
- package/docker.env +2 -2
- package/package.json +3 -5
- package/src/AssetCommand.ts +82 -35
- package/src/Cmd.ts +10 -6
- package/src/DBClient.ts +24 -0
- package/src/ModuleCommand.ts +17 -11
- package/src/QueryCommand.ts +56 -39
- package/src/RunCommand.ts +33 -39
- package/src/TableCommand.ts +8 -8
- package/src/TestCommand.ts +28 -3
- package/src/UserCommand.ts +7 -1
- package/test/cyklang.xsd +870 -219
- package/test/t0.output +1 -1
- package/test/t0.xml +1 -1
- package/test/t01.output +16 -2
- package/test/t01.xml +46 -8
- package/test/t09.output +1 -1
- package/test/t09.xml +1 -1
- package/test/t0__us.output +4 -0
- package/test/t0__us.xml +7 -0
- package/test/t1.ts +8 -0
- package/test/t17.output +2 -0
- package/test/t17.xml +3 -1
- package/test/t20.output +0 -0
- package/test/t20.xml +17 -1
- package/test/t21.output +2 -0
- package/test/t21.xml +39 -9
- package/test/t22.output +0 -0
- package/test/t23.output +4 -0
- package/test/t23.xml +4 -4
- package/test/t24.output +1007 -0
- package/test/t24.xml +20 -0
- package/test/t25.output +4 -0
- package/test/t25.xml +23 -0
- package/test/t26.output +5 -0
- package/test/t26.xml +35 -0
package/test/t24.xml
CHANGED
|
@@ -7,4 +7,24 @@
|
|
|
7
7
|
</block>
|
|
8
8
|
</function>
|
|
9
9
|
|
|
10
|
+
<string name="name">"Mortimer"</string>
|
|
11
|
+
<string name="country">"France"</string>
|
|
12
|
+
<string name="model" literal="">
|
|
13
|
+
My name is {{ name }}
|
|
14
|
+
I live in {{ country }}
|
|
15
|
+
</string>
|
|
16
|
+
<print>interpolate(model)</print>
|
|
17
|
+
<print>replace("php_script.php", "php","cyk", "g")</print>
|
|
18
|
+
|
|
19
|
+
<print>"while Loop "</print>
|
|
20
|
+
<number name="cpt">0</number>
|
|
21
|
+
<while>
|
|
22
|
+
<condition> <![CDATA[ cpt < 1000 ]]></condition>
|
|
23
|
+
<then>
|
|
24
|
+
<number name="nombre">1000</number>
|
|
25
|
+
<set name="cpt">cpt + 1</set>
|
|
26
|
+
<print>"cpt = " + cpt</print>
|
|
27
|
+
</then>
|
|
28
|
+
</while>
|
|
29
|
+
<print>"after 10 loop dcl NOMBRE and set"</print>
|
|
10
30
|
</module>
|
package/test/t25.output
ADDED
package/test/t25.xml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml-model href="https://www.cyklang.net/schema/cyklang.xsd" ?>
|
|
2
|
+
<module>
|
|
3
|
+
<function name="task" synchronized="">
|
|
4
|
+
<string name="name"/>
|
|
5
|
+
<number name="duration"/>
|
|
6
|
+
<block>
|
|
7
|
+
<print>name + " begins "</print>
|
|
8
|
+
<sleep>duration</sleep>
|
|
9
|
+
<print>name + " ended after " + duration </print>
|
|
10
|
+
</block>
|
|
11
|
+
</function>
|
|
12
|
+
<parallel>
|
|
13
|
+
<call function="task">
|
|
14
|
+
<string name="name">"task 1"</string>
|
|
15
|
+
<number name="duration">2000</number>
|
|
16
|
+
</call>
|
|
17
|
+
<call function="task">
|
|
18
|
+
<string name="name">"task 2"</string>
|
|
19
|
+
<number name="duration">1000</number>
|
|
20
|
+
</call>
|
|
21
|
+
</parallel>
|
|
22
|
+
|
|
23
|
+
</module>
|
package/test/t26.output
ADDED
package/test/t26.xml
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<?xml-model href="cyklang.xsd" ?>
|
|
2
|
+
<module>
|
|
3
|
+
<map name="hash">
|
|
4
|
+
<key>nom</key><value>CHANE</value>
|
|
5
|
+
<key>prénom</key><value>Philippe</value>
|
|
6
|
+
<key>Nom : {{ {0} Prénom {1} }}</key><value>Firstname : {{ {1} Name {0} }}</value>
|
|
7
|
+
</map>
|
|
8
|
+
<print>"nom : " + hash.get("nom")</print>
|
|
9
|
+
<call object="hash" method="set">
|
|
10
|
+
<string name="key">"date"</string>
|
|
11
|
+
<string name="value" literal=""><![CDATA[ <b>Gras</b> <i>Italic </i>]]></string>
|
|
12
|
+
</call>
|
|
13
|
+
<print>"date : " + hash.get("date")</print>
|
|
14
|
+
<print>"format 1 : " + format("Format sans paramètre")</print>
|
|
15
|
+
<print>"format 2 : " + format("Nom : {0} Final", "CYK")</print>
|
|
16
|
+
<print>"format 3 : " + format("Nom : {{ {0} Prénom {1} }}", "CYK", "Philippe")</print>
|
|
17
|
+
|
|
18
|
+
<object name="person">
|
|
19
|
+
<string name="name">"CYK"</string>
|
|
20
|
+
<string name="surname">"Philippe"</string>
|
|
21
|
+
<object name="adresses">
|
|
22
|
+
<object>
|
|
23
|
+
<string name="town">"Saint-Denis"</string>
|
|
24
|
+
<string name="department">"Reunion"</string>
|
|
25
|
+
</object>
|
|
26
|
+
<object>
|
|
27
|
+
<string name="town">"Paris"</string>
|
|
28
|
+
<string name="department">"Paris"</string>
|
|
29
|
+
</object>
|
|
30
|
+
</object>
|
|
31
|
+
</object>
|
|
32
|
+
|
|
33
|
+
<print>json(person)</print>
|
|
34
|
+
|
|
35
|
+
</module>
|