datagrok-tools 4.1.20 → 4.2.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/README.md +84 -84
- package/bin/_deprecated/migrate.js +83 -83
- package/bin/_deprecated/upload.js +161 -161
- package/bin/commands/create.js +2 -0
- package/bin/commands/publish.js +31 -25
- package/bin/grok.js +26 -26
- package/bin/utils/utils.js +1 -7
- package/config-template.yaml +11 -11
- package/entity-template/app.js +6 -6
- package/entity-template/connection.json +17 -17
- package/entity-template/function.js +9 -9
- package/entity-template/function.ts +9 -9
- package/entity-template/init.js +4 -4
- package/entity-template/panel.js +11 -11
- package/entity-template/panel.ts +11 -11
- package/entity-template/queries.sql +7 -7
- package/entity-template/sem-type-detector.js +11 -11
- package/entity-template/view-class.js +60 -60
- package/entity-template/view-class.ts +64 -64
- package/entity-template/view.js +10 -10
- package/entity-template/viewer-class.js +23 -23
- package/entity-template/viewer-class.ts +23 -23
- package/entity-template/viewer.js +8 -8
- package/package-template/.eslintrc.json +37 -35
- package/package-template/.vscode/launch.json +15 -15
- package/package-template/.vscode/tasks.json +9 -9
- package/package-template/README.md +2 -2
- package/package-template/detectors.js +9 -9
- package/package-template/gitignore +29 -29
- package/package-template/package.json +23 -22
- package/package-template/src/package-test.js +13 -0
- package/package-template/src/package-test.ts +13 -0
- package/package-template/src/package.js +2 -2
- package/package-template/ts.webpack.config.js +3 -1
- package/package-template/webpack.config.js +27 -26
- package/package.json +51 -51
- package/script-template/javascript.js +6 -6
- package/script-template/julia.jl +8 -8
- package/script-template/node.js +8 -8
- package/script-template/octave.m +8 -8
- package/script-template/python.py +8 -8
- package/script-template/r.R +8 -8
- package/tsconfig.json +71 -71
package/entity-template/view.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
//name: #{NAME}
|
|
3
|
-
//description: Creates #{NAME} view
|
|
4
|
-
//tags: view
|
|
5
|
-
//input: map params
|
|
6
|
-
//input: string path
|
|
7
|
-
//output: view result
|
|
8
|
-
export function _#{NAME}(params = null, path = '') {
|
|
9
|
-
return new #{NAME}(params, path);
|
|
10
|
-
}
|
|
1
|
+
|
|
2
|
+
//name: #{NAME}
|
|
3
|
+
//description: Creates #{NAME} view
|
|
4
|
+
//tags: view
|
|
5
|
+
//input: map params
|
|
6
|
+
//input: string path
|
|
7
|
+
//output: view result
|
|
8
|
+
export function _#{NAME}(params = null, path = '') {
|
|
9
|
+
return new #{NAME}(params, path);
|
|
10
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as grok from 'datagrok-api/grok';
|
|
2
|
-
import * as ui from 'datagrok-api/ui';
|
|
3
|
-
import * as DG from 'datagrok-api/dg';
|
|
4
|
-
|
|
5
|
-
// See also https://datagrok.ai/help/develop/how-to/develop-custom-viewer
|
|
6
|
-
// This viewer does the following:
|
|
7
|
-
// * listens to changes of filter and selection in the attached table,
|
|
8
|
-
// * updates the number of filtered/selected rows accordingly.
|
|
9
|
-
export class #{NAME} extends DG.JsViewer {
|
|
10
|
-
onTableAttached() {
|
|
11
|
-
this.subs.push(this.dataFrame.selection.onChanged.subscribe((_) => this.render()));
|
|
12
|
-
this.subs.push(this.dataFrame.filter.onChanged.subscribe((_) => this.render()));
|
|
13
|
-
|
|
14
|
-
this.render();
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
render() {
|
|
18
|
-
this.root.innerHTML =
|
|
19
|
-
`${this.dataFrame.toString()}<br>
|
|
20
|
-
Selected: ${this.dataFrame.selection.trueCount}<br>
|
|
21
|
-
Filtered: ${this.dataFrame.filter.trueCount}`;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
import * as grok from 'datagrok-api/grok';
|
|
2
|
+
import * as ui from 'datagrok-api/ui';
|
|
3
|
+
import * as DG from 'datagrok-api/dg';
|
|
4
|
+
|
|
5
|
+
// See also https://datagrok.ai/help/develop/how-to/develop-custom-viewer
|
|
6
|
+
// This viewer does the following:
|
|
7
|
+
// * listens to changes of filter and selection in the attached table,
|
|
8
|
+
// * updates the number of filtered/selected rows accordingly.
|
|
9
|
+
export class #{NAME} extends DG.JsViewer {
|
|
10
|
+
onTableAttached() {
|
|
11
|
+
this.subs.push(this.dataFrame.selection.onChanged.subscribe((_) => this.render()));
|
|
12
|
+
this.subs.push(this.dataFrame.filter.onChanged.subscribe((_) => this.render()));
|
|
13
|
+
|
|
14
|
+
this.render();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
render() {
|
|
18
|
+
this.root.innerHTML =
|
|
19
|
+
`${this.dataFrame.toString()}<br>
|
|
20
|
+
Selected: ${this.dataFrame.selection.trueCount}<br>
|
|
21
|
+
Filtered: ${this.dataFrame.filter.trueCount}`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as grok from 'datagrok-api/grok';
|
|
2
|
-
import * as ui from 'datagrok-api/ui';
|
|
3
|
-
import * as DG from 'datagrok-api/dg';
|
|
4
|
-
|
|
5
|
-
// See also https://datagrok.ai/help/develop/how-to/develop-custom-viewer
|
|
6
|
-
// This viewer does the following:
|
|
7
|
-
// * listens to changes of filter and selection in the attached table,
|
|
8
|
-
// * updates the number of filtered/selected rows accordingly.
|
|
9
|
-
export class #{NAME} extends DG.JsViewer {
|
|
10
|
-
onTableAttached() {
|
|
11
|
-
this.subs.push(this.dataFrame!.selection.onChanged.subscribe((_) => this.render()));
|
|
12
|
-
this.subs.push(this.dataFrame!.filter.onChanged.subscribe((_) => this.render()));
|
|
13
|
-
|
|
14
|
-
this.render();
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
render() {
|
|
18
|
-
this.root.innerHTML =
|
|
19
|
-
`${this.dataFrame!.toString()}<br>
|
|
20
|
-
Selected: ${this.dataFrame!.selection.trueCount}<br>
|
|
21
|
-
Filtered: ${this.dataFrame!.filter.trueCount}`;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
import * as grok from 'datagrok-api/grok';
|
|
2
|
+
import * as ui from 'datagrok-api/ui';
|
|
3
|
+
import * as DG from 'datagrok-api/dg';
|
|
4
|
+
|
|
5
|
+
// See also https://datagrok.ai/help/develop/how-to/develop-custom-viewer
|
|
6
|
+
// This viewer does the following:
|
|
7
|
+
// * listens to changes of filter and selection in the attached table,
|
|
8
|
+
// * updates the number of filtered/selected rows accordingly.
|
|
9
|
+
export class #{NAME} extends DG.JsViewer {
|
|
10
|
+
onTableAttached() {
|
|
11
|
+
this.subs.push(this.dataFrame!.selection.onChanged.subscribe((_) => this.render()));
|
|
12
|
+
this.subs.push(this.dataFrame!.filter.onChanged.subscribe((_) => this.render()));
|
|
13
|
+
|
|
14
|
+
this.render();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
render() {
|
|
18
|
+
this.root.innerHTML =
|
|
19
|
+
`${this.dataFrame!.toString()}<br>
|
|
20
|
+
Selected: ${this.dataFrame!.selection.trueCount}<br>
|
|
21
|
+
Filtered: ${this.dataFrame!.filter.trueCount}`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
//name: #{NAME}
|
|
3
|
-
//description: Creates #{NAME} viewer
|
|
4
|
-
//tags: viewer
|
|
5
|
-
//output: viewer result
|
|
6
|
-
export function _#{NAME}() {
|
|
7
|
-
return new #{NAME}();
|
|
8
|
-
}
|
|
1
|
+
|
|
2
|
+
//name: #{NAME}
|
|
3
|
+
//description: Creates #{NAME} viewer
|
|
4
|
+
//tags: viewer
|
|
5
|
+
//output: viewer result
|
|
6
|
+
export function _#{NAME}() {
|
|
7
|
+
return new #{NAME}();
|
|
8
|
+
}
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"es2021": true
|
|
5
|
-
},
|
|
6
|
-
"extends": [
|
|
7
|
-
"google"
|
|
8
|
-
],
|
|
9
|
-
"parserOptions": {
|
|
10
|
-
"ecmaVersion": 12,
|
|
11
|
-
"sourceType": "module"
|
|
12
|
-
},
|
|
13
|
-
"rules": {
|
|
14
|
-
"indent": [
|
|
15
|
-
"error",
|
|
16
|
-
2
|
|
17
|
-
],
|
|
18
|
-
"max-len": [
|
|
19
|
-
"error",
|
|
20
|
-
120
|
|
21
|
-
],
|
|
22
|
-
"require-jsdoc": "off",
|
|
23
|
-
"spaced-comment": "off",
|
|
24
|
-
"linebreak-style": "off",
|
|
25
|
-
"curly": [
|
|
26
|
-
"error",
|
|
27
|
-
"multi-or-nest"
|
|
28
|
-
],
|
|
29
|
-
"brace-style": [
|
|
30
|
-
"error",
|
|
31
|
-
"1tbs",
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": true,
|
|
4
|
+
"es2021": true
|
|
5
|
+
},
|
|
6
|
+
"extends": [
|
|
7
|
+
"google"
|
|
8
|
+
],
|
|
9
|
+
"parserOptions": {
|
|
10
|
+
"ecmaVersion": 12,
|
|
11
|
+
"sourceType": "module"
|
|
12
|
+
},
|
|
13
|
+
"rules": {
|
|
14
|
+
"indent": [
|
|
15
|
+
"error",
|
|
16
|
+
2
|
|
17
|
+
],
|
|
18
|
+
"max-len": [
|
|
19
|
+
"error",
|
|
20
|
+
120
|
|
21
|
+
],
|
|
22
|
+
"require-jsdoc": "off",
|
|
23
|
+
"spaced-comment": "off",
|
|
24
|
+
"linebreak-style": "off",
|
|
25
|
+
"curly": [
|
|
26
|
+
"error",
|
|
27
|
+
"multi-or-nest"
|
|
28
|
+
],
|
|
29
|
+
"brace-style": [
|
|
30
|
+
"error",
|
|
31
|
+
"1tbs",
|
|
32
|
+
{
|
|
33
|
+
"allowSingleLine": true
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"preLaunchTask": "rebuild",
|
|
9
|
-
"type": "pwa-chrome",
|
|
10
|
-
"request": "launch",
|
|
11
|
-
"name": "Debug #{GROK_HOST_ALIAS}",
|
|
12
|
-
"url": "#{GROK_HOST}",
|
|
13
|
-
"webRoot": "${workspaceFolder}"
|
|
14
|
-
}
|
|
15
|
-
]
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"preLaunchTask": "rebuild",
|
|
9
|
+
"type": "pwa-chrome",
|
|
10
|
+
"request": "launch",
|
|
11
|
+
"name": "Debug #{GROK_HOST_ALIAS}",
|
|
12
|
+
"url": "#{GROK_HOST}",
|
|
13
|
+
"webRoot": "${workspaceFolder}"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
16
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "2.0.0",
|
|
3
|
-
"tasks": [
|
|
4
|
-
{
|
|
5
|
-
"type": "shell",
|
|
6
|
-
"command": "cmd.exe /c 'call webpack && call grok publish {GROK_HOST_ALIAS}'",
|
|
7
|
-
"label": "rebuild"
|
|
8
|
-
}
|
|
9
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"tasks": [
|
|
4
|
+
{
|
|
5
|
+
"type": "shell",
|
|
6
|
+
"command": "cmd.exe /c 'call webpack && call grok publish {GROK_HOST_ALIAS}'",
|
|
7
|
+
"label": "rebuild"
|
|
8
|
+
}
|
|
9
|
+
]
|
|
10
10
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# #{PACKAGE_NAME}
|
|
2
|
-
|
|
1
|
+
# #{PACKAGE_NAME}
|
|
2
|
+
|
|
3
3
|
#{PACKAGE_NAME} is a [package](https://datagrok.ai/help/develop/develop#packages) for the [Datagrok](https://datagrok.ai) platform.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The class contains semantic type detectors.
|
|
3
|
-
* Detectors are functions tagged with `DG.FUNC_TYPES.SEM_TYPE_DETECTOR`.
|
|
4
|
-
* See also: https://datagrok.ai/help/develop/how-to/define-semantic-type-detectors
|
|
5
|
-
* The class name is comprised of <PackageName> and the `PackageDetectors` suffix.
|
|
6
|
-
* Follow this naming convention to ensure that your detectors are properly loaded.
|
|
7
|
-
*/
|
|
8
|
-
class #{PACKAGE_DETECTORS_NAME}PackageDetectors extends DG.Package {
|
|
9
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* The class contains semantic type detectors.
|
|
3
|
+
* Detectors are functions tagged with `DG.FUNC_TYPES.SEM_TYPE_DETECTOR`.
|
|
4
|
+
* See also: https://datagrok.ai/help/develop/how-to/define-semantic-type-detectors
|
|
5
|
+
* The class name is comprised of <PackageName> and the `PackageDetectors` suffix.
|
|
6
|
+
* Follow this naming convention to ensure that your detectors are properly loaded.
|
|
7
|
+
*/
|
|
8
|
+
class #{PACKAGE_DETECTORS_NAME}PackageDetectors extends DG.Package {
|
|
9
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
# Developer keys
|
|
2
|
-
upload.keys.json
|
|
3
|
-
|
|
4
|
-
# Dependency directories
|
|
5
|
-
node_modules/
|
|
6
|
-
|
|
7
|
-
# Webpack outputs
|
|
8
|
-
dist/
|
|
9
|
-
|
|
10
|
-
# IDEs
|
|
11
|
-
# VS Code (https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore)
|
|
12
|
-
.vscode/*
|
|
13
|
-
!.vscode/settings.json
|
|
14
|
-
!.vscode/tasks.json
|
|
15
|
-
!.vscode/launch.json
|
|
16
|
-
!.vscode/extensions.json
|
|
17
|
-
*.code-workspace
|
|
18
|
-
.history/
|
|
19
|
-
|
|
20
|
-
# Intellij IDEA/WebStorm (https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore)
|
|
21
|
-
.idea/inspectionProfiles/
|
|
22
|
-
.idea/**/compiler.xml
|
|
23
|
-
.idea/**/encodings.xml
|
|
24
|
-
.idea/**/workspace.xml
|
|
25
|
-
.idea/**/tasks.xml
|
|
26
|
-
.idea/**/usage.statistics.xml
|
|
27
|
-
.idea/**/dictionaries
|
|
28
|
-
.idea/**/shelf
|
|
29
|
-
.idea/codeStyles/
|
|
1
|
+
# Developer keys
|
|
2
|
+
upload.keys.json
|
|
3
|
+
|
|
4
|
+
# Dependency directories
|
|
5
|
+
node_modules/
|
|
6
|
+
|
|
7
|
+
# Webpack outputs
|
|
8
|
+
dist/
|
|
9
|
+
|
|
10
|
+
# IDEs
|
|
11
|
+
# VS Code (https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore)
|
|
12
|
+
.vscode/*
|
|
13
|
+
!.vscode/settings.json
|
|
14
|
+
!.vscode/tasks.json
|
|
15
|
+
!.vscode/launch.json
|
|
16
|
+
!.vscode/extensions.json
|
|
17
|
+
*.code-workspace
|
|
18
|
+
.history/
|
|
19
|
+
|
|
20
|
+
# Intellij IDEA/WebStorm (https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore)
|
|
21
|
+
.idea/inspectionProfiles/
|
|
22
|
+
.idea/**/compiler.xml
|
|
23
|
+
.idea/**/encodings.xml
|
|
24
|
+
.idea/**/workspace.xml
|
|
25
|
+
.idea/**/tasks.xml
|
|
26
|
+
.idea/**/usage.statistics.xml
|
|
27
|
+
.idea/**/dictionaries
|
|
28
|
+
.idea/**/shelf
|
|
29
|
+
.idea/codeStyles/
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "#{PACKAGE_NAME_LOWERCASE}",
|
|
3
|
-
"beta": true,
|
|
4
|
-
"friendlyName": "#{PACKAGE_NAME}",
|
|
5
|
-
"version": "0.0.1",
|
|
6
|
-
"description": "",
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"datagrok-api": "latest",
|
|
9
|
-
"cash-dom": "latest",
|
|
10
|
-
"dayjs": "latest"
|
|
11
|
-
},
|
|
12
|
-
"devDependencies": {
|
|
13
|
-
"webpack": "latest",
|
|
14
|
-
"webpack-cli": "latest"
|
|
15
|
-
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"build": "webpack"
|
|
21
|
-
|
|
22
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "#{PACKAGE_NAME_LOWERCASE}",
|
|
3
|
+
"beta": true,
|
|
4
|
+
"friendlyName": "#{PACKAGE_NAME}",
|
|
5
|
+
"version": "0.0.1",
|
|
6
|
+
"description": "",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"datagrok-api": "latest",
|
|
9
|
+
"cash-dom": "latest",
|
|
10
|
+
"dayjs": "latest"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"webpack": "latest",
|
|
14
|
+
"webpack-cli": "latest"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"link-all": "",
|
|
18
|
+
"debug-#{PACKAGE_NAME_LOWERCASE}": "webpack && grok publish ",
|
|
19
|
+
"release-#{PACKAGE_NAME_LOWERCASE}": "webpack && grok publish --release",
|
|
20
|
+
"build-#{PACKAGE_NAME_LOWERCASE}": "webpack",
|
|
21
|
+
"build": "webpack"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as DG from "datagrok-api/dg";
|
|
2
|
+
import * as grok from "datagrok-api/grok";
|
|
3
|
+
import {runTests} from "@datagrok-libraries/utils/src/test";
|
|
4
|
+
import "./tests/chem-tests";
|
|
5
|
+
|
|
6
|
+
export let _package = new DG.Package();
|
|
7
|
+
|
|
8
|
+
//name: test
|
|
9
|
+
//output: dataframe result
|
|
10
|
+
export async function test() {
|
|
11
|
+
let data = await runTests();
|
|
12
|
+
return DG.DataFrame.fromObjects(data);
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as DG from "datagrok-api/dg";
|
|
2
|
+
import * as grok from "datagrok-api/grok";
|
|
3
|
+
import {runTests} from "@datagrok-libraries/utils/src/test";
|
|
4
|
+
import "./tests/chem-tests";
|
|
5
|
+
|
|
6
|
+
export let _package = new DG.Package();
|
|
7
|
+
|
|
8
|
+
//name: test
|
|
9
|
+
//output: dataframe result
|
|
10
|
+
export async function test(): Promise<DG.DataFrame> {
|
|
11
|
+
let data = await runTests();
|
|
12
|
+
return DG.DataFrame.fromObjects(data)!;
|
|
13
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
|
+
const packageName = path.parse(require('./package.json').name).name.toLowerCase().replace(/-/g, '');
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
4
5
|
mode: 'development',
|
|
5
6
|
entry: {
|
|
7
|
+
test: {filename: 'package-test.js', library: {type: 'var', name:`${packageName}_test`}, import: './src/package-test.ts'},
|
|
6
8
|
package: './src/package.ts'
|
|
7
9
|
},
|
|
8
10
|
resolve: {
|
|
@@ -27,7 +29,7 @@ module.exports = {
|
|
|
27
29
|
},
|
|
28
30
|
output: {
|
|
29
31
|
filename: '[name].js',
|
|
30
|
-
library:
|
|
32
|
+
library: packageName,
|
|
31
33
|
libraryTarget: 'var',
|
|
32
34
|
path: path.resolve(__dirname, 'dist'),
|
|
33
35
|
},
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
'datagrok-api/
|
|
12
|
-
'datagrok-api/
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'rxjs
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const packageName = path.parse(require('./package.json').name).name.toLowerCase().replace(/-/g, '');
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
mode: 'development',
|
|
6
|
+
entry: {
|
|
7
|
+
package: './src/package.js'
|
|
8
|
+
},
|
|
9
|
+
devtool: 'inline-source-map',
|
|
10
|
+
externals: {
|
|
11
|
+
'datagrok-api/dg': 'DG',
|
|
12
|
+
'datagrok-api/grok': 'grok',
|
|
13
|
+
'datagrok-api/ui': 'ui',
|
|
14
|
+
'openchemlib/full.js': 'OCL',
|
|
15
|
+
'rxjs': 'rxjs',
|
|
16
|
+
'rxjs/operators': 'rxjs.operators',
|
|
17
|
+
'cash-dom': '$',
|
|
18
|
+
'dayjs': 'dayjs',
|
|
19
|
+
'wu': 'wu',
|
|
20
|
+
},
|
|
21
|
+
output: {
|
|
22
|
+
filename: '[name].js',
|
|
23
|
+
library: packageName,
|
|
24
|
+
libraryTarget: 'var',
|
|
25
|
+
path: path.resolve(__dirname, 'dist'),
|
|
26
|
+
},
|
|
27
|
+
};
|
package/package.json
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "datagrok-tools",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "Utility to upload and publish packages to Datagrok",
|
|
5
|
-
"homepage": "https://github.com/datagrok-ai/public/tree/master/tools#readme",
|
|
6
|
-
"dependencies": {
|
|
7
|
-
"@babel/runtime": "^7.16.0",
|
|
8
|
-
"archiver": "^4.0.2",
|
|
9
|
-
"archiver-promise": "^1.0.0",
|
|
10
|
-
"fs": "latest",
|
|
11
|
-
"ignore-walk": "^3.0.3",
|
|
12
|
-
"inquirer": "^7.1.0",
|
|
13
|
-
"js-yaml": "^4.1.0",
|
|
14
|
-
"minimist": "^1.2.5",
|
|
15
|
-
"node-fetch": "^2.6.0",
|
|
16
|
-
"node-recursive-directory": "^1.2.0",
|
|
17
|
-
"os": "^0.1.1",
|
|
18
|
-
"path": "^0.12.7"
|
|
19
|
-
},
|
|
20
|
-
"scripts": {
|
|
21
|
-
"link": "npm link",
|
|
22
|
-
"prepublishOnly": "babel bin --extensions .ts -d bin",
|
|
23
|
-
"babel": "babel bin --extensions .ts -d bin"
|
|
24
|
-
},
|
|
25
|
-
"bin": {
|
|
26
|
-
"datagrok-upload": "./bin/_deprecated/upload.js",
|
|
27
|
-
"grok": "./bin/grok.js"
|
|
28
|
-
},
|
|
29
|
-
"babel": {
|
|
30
|
-
"presets": [
|
|
31
|
-
"@babel/preset-typescript",
|
|
32
|
-
"@babel/preset-env"
|
|
33
|
-
],
|
|
34
|
-
"plugins": [
|
|
35
|
-
"@babel/plugin-transform-runtime"
|
|
36
|
-
]
|
|
37
|
-
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@babel/cli": "^7.15.7",
|
|
40
|
-
"@babel/core": "^7.15.8",
|
|
41
|
-
"@babel/plugin-transform-runtime": "^7.16.0",
|
|
42
|
-
"@babel/preset-env": "^7.15.8",
|
|
43
|
-
"@babel/preset-typescript": "7.15.0",
|
|
44
|
-
"@types/ignore-walk": "^4.0.0",
|
|
45
|
-
"@types/inquirer": "^8.1.3",
|
|
46
|
-
"@types/js-yaml": "^4.0.4",
|
|
47
|
-
"@types/node": "^16.11.6",
|
|
48
|
-
"webpack": "^4.43.0",
|
|
49
|
-
"webpack-cli": "^3.3.11"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "datagrok-tools",
|
|
3
|
+
"version": "4.2.0",
|
|
4
|
+
"description": "Utility to upload and publish packages to Datagrok",
|
|
5
|
+
"homepage": "https://github.com/datagrok-ai/public/tree/master/tools#readme",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@babel/runtime": "^7.16.0",
|
|
8
|
+
"archiver": "^4.0.2",
|
|
9
|
+
"archiver-promise": "^1.0.0",
|
|
10
|
+
"fs": "latest",
|
|
11
|
+
"ignore-walk": "^3.0.3",
|
|
12
|
+
"inquirer": "^7.1.0",
|
|
13
|
+
"js-yaml": "^4.1.0",
|
|
14
|
+
"minimist": "^1.2.5",
|
|
15
|
+
"node-fetch": "^2.6.0",
|
|
16
|
+
"node-recursive-directory": "^1.2.0",
|
|
17
|
+
"os": "^0.1.1",
|
|
18
|
+
"path": "^0.12.7"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"link": "npm link",
|
|
22
|
+
"prepublishOnly": "babel bin --extensions .ts -d bin",
|
|
23
|
+
"babel": "babel bin --extensions .ts -d bin"
|
|
24
|
+
},
|
|
25
|
+
"bin": {
|
|
26
|
+
"datagrok-upload": "./bin/_deprecated/upload.js",
|
|
27
|
+
"grok": "./bin/grok.js"
|
|
28
|
+
},
|
|
29
|
+
"babel": {
|
|
30
|
+
"presets": [
|
|
31
|
+
"@babel/preset-typescript",
|
|
32
|
+
"@babel/preset-env"
|
|
33
|
+
],
|
|
34
|
+
"plugins": [
|
|
35
|
+
"@babel/plugin-transform-runtime"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@babel/cli": "^7.15.7",
|
|
40
|
+
"@babel/core": "^7.15.8",
|
|
41
|
+
"@babel/plugin-transform-runtime": "^7.16.0",
|
|
42
|
+
"@babel/preset-env": "^7.15.8",
|
|
43
|
+
"@babel/preset-typescript": "7.15.0",
|
|
44
|
+
"@types/ignore-walk": "^4.0.0",
|
|
45
|
+
"@types/inquirer": "^8.1.3",
|
|
46
|
+
"@types/js-yaml": "^4.0.4",
|
|
47
|
+
"@types/node": "^16.11.6",
|
|
48
|
+
"webpack": "^4.43.0",
|
|
49
|
+
"webpack-cli": "^3.3.11"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//name: #{NAME}
|
|
2
|
-
//description: Hello world script
|
|
3
|
-
//language: javascript
|
|
4
|
-
//tags: template, demo
|
|
5
|
-
|
|
6
|
-
alert('Hello, World!');
|
|
1
|
+
//name: #{NAME}
|
|
2
|
+
//description: Hello world script
|
|
3
|
+
//language: javascript
|
|
4
|
+
//tags: template, demo
|
|
5
|
+
|
|
6
|
+
alert('Hello, World!');
|
package/script-template/julia.jl
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#name: #{NAME}
|
|
2
|
-
#description: Following template calculates number of cells in table
|
|
3
|
-
#language: julia
|
|
4
|
-
#tags: template, demo
|
|
5
|
-
#sample: cars.csv
|
|
6
|
-
#input: dataframe table [Data table]
|
|
7
|
-
#output: int count [Number of cells in table]
|
|
8
|
-
count = size(table)[1] * size(table)[2]
|
|
1
|
+
#name: #{NAME}
|
|
2
|
+
#description: Following template calculates number of cells in table
|
|
3
|
+
#language: julia
|
|
4
|
+
#tags: template, demo
|
|
5
|
+
#sample: cars.csv
|
|
6
|
+
#input: dataframe table [Data table]
|
|
7
|
+
#output: int count [Number of cells in table]
|
|
8
|
+
count = size(table)[1] * size(table)[2]
|