@cyklang/cli 0.14.10 → 0.14.12
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/DBClient.js +1 -1
- package/build/RunCommand.js +2 -2
- package/build/TestCommand.js +2 -2
- package/build/index.js +1 -1
- package/package.json +2 -2
- package/src/DBClient.ts +1 -1
- package/src/RunCommand.ts +2 -2
- package/src/TestCommand.ts +2 -2
- package/src/index.ts +1 -1
- package/test/t31.output +5 -5
package/build/DBClient.js
CHANGED
|
@@ -31,7 +31,7 @@ class DBClient {
|
|
|
31
31
|
*/
|
|
32
32
|
async execScript(source) {
|
|
33
33
|
try {
|
|
34
|
-
const script = new core_1.Script(this.dbManager.scope, '', source);
|
|
34
|
+
const script = new core_1.Script(this.dbManager.scope, '', source, this.dbManager);
|
|
35
35
|
await script.parseInstructions();
|
|
36
36
|
await script.execute();
|
|
37
37
|
}
|
package/build/RunCommand.js
CHANGED
|
@@ -96,11 +96,11 @@ async function runFile(filename) {
|
|
|
96
96
|
await modLang.execute(structure.scope);
|
|
97
97
|
const langMap = modLang.objectData?.variables.getData(user_lang);
|
|
98
98
|
if (langMap !== null && langMap !== undefined) {
|
|
99
|
-
structure.
|
|
99
|
+
await structure.setLang(user_lang, langMap);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
let script = new core_1.Script(structure.scope, xmlfilename, xml.toString());
|
|
103
|
+
let script = new core_1.Script(structure.scope, xmlfilename, xml.toString(), dbManager);
|
|
104
104
|
await script.parseInstructions();
|
|
105
105
|
await script.execute();
|
|
106
106
|
}
|
package/build/TestCommand.js
CHANGED
|
@@ -86,7 +86,7 @@ async function testfile(filename) {
|
|
|
86
86
|
const dbManager = new core_1.DBManager(structure.scope, dbRemote);
|
|
87
87
|
await dbManager.initialize();
|
|
88
88
|
structure.scope.addInstructionType(new console_1.PrintInstructionType(logfilename));
|
|
89
|
-
let script = new core_1.Script(structure.scope, xmlfilename, xml.toString());
|
|
89
|
+
let script = new core_1.Script(structure.scope, xmlfilename, xml.toString(), dbManager);
|
|
90
90
|
const user_lang = login.content.user_lang;
|
|
91
91
|
if (user_lang && user_lang.trim() !== '') {
|
|
92
92
|
const langfilename = filename + "__" + user_lang + ".xml";
|
|
@@ -98,7 +98,7 @@ async function testfile(filename) {
|
|
|
98
98
|
await modLang.execute(structure.scope);
|
|
99
99
|
const langMap = modLang.objectData?.variables.getData(user_lang);
|
|
100
100
|
if (langMap !== null && langMap !== undefined) {
|
|
101
|
-
structure.
|
|
101
|
+
await structure.setLang(user_lang, langMap);
|
|
102
102
|
outfilename = filename + "__" + user_lang + ".output";
|
|
103
103
|
}
|
|
104
104
|
}
|
package/build/index.js
CHANGED
|
@@ -182,7 +182,7 @@ class StopCommand extends commander_1.Command {
|
|
|
182
182
|
*/
|
|
183
183
|
const program = new commander_1.Command();
|
|
184
184
|
program.name('cyk').description('cyklang CLI')
|
|
185
|
-
.version('0.14.
|
|
185
|
+
.version('0.14.11');
|
|
186
186
|
program.addCommand(new StartCommand('start'));
|
|
187
187
|
program.addCommand(new StopCommand('stop'));
|
|
188
188
|
program.addCommand(new InstallCommand_1.InstallCommand('install'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyklang/cli",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.12",
|
|
4
4
|
"description": "cyklang CLI",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@cyklang/core": "^0.
|
|
22
|
+
"@cyklang/core": "^0.13.0",
|
|
23
23
|
"commander": "^9.4.0",
|
|
24
24
|
"dotenv": "^16.0.1",
|
|
25
25
|
"form-data": "^4.0.0",
|
package/src/DBClient.ts
CHANGED
|
@@ -29,7 +29,7 @@ export class DBClient {
|
|
|
29
29
|
*/
|
|
30
30
|
async execScript(source: string) {
|
|
31
31
|
try {
|
|
32
|
-
const script = new Script(this.dbManager.scope, '', source)
|
|
32
|
+
const script = new Script(this.dbManager.scope, '', source, this.dbManager)
|
|
33
33
|
await script.parseInstructions()
|
|
34
34
|
await script.execute()
|
|
35
35
|
}
|
package/src/RunCommand.ts
CHANGED
|
@@ -76,12 +76,12 @@ export async function runFile(filename: string): Promise<void> {
|
|
|
76
76
|
const langMap = modLang.objectData?.variables.getData(user_lang)
|
|
77
77
|
|
|
78
78
|
if (langMap !== null && langMap !== undefined) {
|
|
79
|
-
structure.
|
|
79
|
+
await structure.setLang(user_lang, langMap as MapData)
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
let script = new Script(structure.scope, xmlfilename, xml.toString())
|
|
84
|
+
let script = new Script(structure.scope, xmlfilename, xml.toString(), dbManager)
|
|
85
85
|
await script.parseInstructions()
|
|
86
86
|
await script.execute()
|
|
87
87
|
}
|
package/src/TestCommand.ts
CHANGED
|
@@ -64,7 +64,7 @@ async function testfile(filename: string): Promise<boolean> {
|
|
|
64
64
|
const dbManager = new DBManager(structure.scope, dbRemote)
|
|
65
65
|
await dbManager.initialize()
|
|
66
66
|
structure.scope.addInstructionType(new PrintInstructionType(logfilename))
|
|
67
|
-
let script = new Script(structure.scope, xmlfilename, xml.toString())
|
|
67
|
+
let script = new Script(structure.scope, xmlfilename, xml.toString(), dbManager)
|
|
68
68
|
const user_lang = login.content.user_lang
|
|
69
69
|
if (user_lang && user_lang.trim() !== '') {
|
|
70
70
|
|
|
@@ -80,7 +80,7 @@ async function testfile(filename: string): Promise<boolean> {
|
|
|
80
80
|
const langMap = modLang.objectData?.variables.getData(user_lang)
|
|
81
81
|
|
|
82
82
|
if (langMap !== null && langMap !== undefined) {
|
|
83
|
-
structure.
|
|
83
|
+
await structure.setLang(user_lang, langMap as MapData)
|
|
84
84
|
|
|
85
85
|
outfilename = filename + "__" + user_lang + ".output"
|
|
86
86
|
}
|
package/src/index.ts
CHANGED
|
@@ -176,7 +176,7 @@ class StopCommand extends Command {
|
|
|
176
176
|
*/
|
|
177
177
|
const program = new Command()
|
|
178
178
|
program.name('cyk').description('cyklang CLI')
|
|
179
|
-
.version('0.14.
|
|
179
|
+
.version('0.14.12')
|
|
180
180
|
program.addCommand(new StartCommand('start'))
|
|
181
181
|
program.addCommand(new StopCommand('stop'))
|
|
182
182
|
program.addCommand(new InstallCommand('install'))
|
package/test/t31.output
CHANGED
|
@@ -15,9 +15,9 @@ v.AD = 1400
|
|
|
15
15
|
v.AC = 200
|
|
16
16
|
v.AD = 1300
|
|
17
17
|
v = <object>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
<number name="_010_">1000</number>
|
|
19
|
+
<number name="AA">2500</number>
|
|
20
|
+
<number name="AB">500</number>
|
|
21
|
+
<number name="AC">200</number>
|
|
22
|
+
<number name="AD">1300</number>
|
|
23
23
|
</object>
|