Skip to content

Commit 1f82623

Browse files
committed
added session to global scope and JSPython version bump
1 parent 868e016 commit 1f82623

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# JSPython CLI.
22

3-
We provide a command line interface to run [JSPython](https://github.com/jspython-dev/jspython) scripts
3+
Command line interface to run [JSPython](https://github.com/jspython-dev/jspython) in NodeJS environment
44

55
## Install from NPM
66

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jspython-cli",
3-
"version": "2.1.3",
3+
"version": "2.1.5",
44
"description": "CLI for jspython. Allows you to run jspython (*.jspy) files",
55
"main": "src/index.ts",
66
"bin": {
@@ -30,7 +30,7 @@
3030
"homepage": "https://github.com/jspython-dev/jspython-cli#readme",
3131
"dependencies": {
3232
"arg": "^4.1.2",
33-
"jspython-interpreter": "~2.1.3"
33+
"jspython-interpreter": "^2.1.5"
3434
},
3535
"devDependencies": {
3636
"rollup": "^1.27.13",

rollup.config.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
plugins: [
1515
typescript()
1616
],
17-
external: ['arg', 'fs', 'jspython-interpreter', 'json5', 'http', 'https'],
17+
external: ['arg', 'fs', 'jspython-interpreter', 'http', 'https'],
1818
watch: {
1919
exclude: ['node_modules/**'],
2020
include: 'src/**'

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ process
2222
});
2323

2424
const initialScope: Record<string, any> = {
25-
app: {}
25+
app: {},
26+
session: {}
2627
};
2728

2829
const rootFolder = process.cwd().split('\\').join('/');
@@ -134,6 +135,7 @@ function moduleLoader(filePath: string): Promise<string> {
134135
const script = fs.readFileSync(`${options.srcRoot}${trimChar(filePath, '/')}`, 'utf8');
135136
return Promise.resolve(script);
136137
} catch (e) {
138+
console.log('* module loader error ', e?.message || e)
137139
return Promise.reject(e);
138140
}
139141
}

0 commit comments

Comments
 (0)