@scifeon/sdk 0.99.0 → 0.101.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/dist/{sdk/src/action-target.d.ts → action-target.d.ts} +6 -6
- package/dist/{sdk/src/action-target.js → action-target.js} +10 -10
- package/dist/{sdk/src/app → app}/app-generator.d.ts +34 -34
- package/dist/{sdk/src/app → app}/app-generator.js +460 -460
- package/dist/{sdk/src/app → app}/app-persist.d.ts +18 -18
- package/dist/{sdk/src/app → app}/app-persist.js +193 -193
- package/dist/{sdk/src/app → app}/app-validator.d.ts +8 -8
- package/dist/{sdk/src/app → app}/app-validator.js +145 -145
- package/dist/{sdk/src/app → app}/interfaces/app-json.interface.d.ts +4 -4
- package/dist/{sdk/src/app → app}/interfaces/app-json.interface.js +2 -2
- package/dist/{sdk/src/app → app}/interfaces/app-type.enum.d.ts +5 -5
- package/dist/{sdk/src/app → app}/interfaces/app-type.enum.js +9 -9
- package/dist/{sdk/src/app → app}/interfaces/contributions/contributions-json.interface.d.ts +55 -55
- package/dist/{sdk/src/app → app}/interfaces/contributions/contributions-json.interface.js +2 -2
- package/dist/{sdk/src/app → app}/interfaces/contributions/main-menu.interface.d.ts +12 -12
- package/dist/{sdk/src/app → app}/interfaces/contributions/main-menu.interface.js +2 -2
- package/dist/{sdk/src/app → app}/interfaces/contributions/menu-item.interface.d.ts +5 -5
- package/dist/{sdk/src/app → app}/interfaces/contributions/menu-item.interface.js +2 -2
- package/dist/{sdk/src/app → app}/interfaces/contributions/page-menu-item.interface.d.ts +10 -10
- package/dist/{sdk/src/app → app}/interfaces/contributions/page-menu-item.interface.js +2 -2
- package/dist/{sdk/src/app → app}/interfaces/contributions/page-menu.interface.d.ts +9 -9
- package/dist/{sdk/src/app → app}/interfaces/contributions/page-menu.interface.js +2 -2
- package/dist/{sdk/src/app → app}/interfaces/package-json.interface.d.ts +14 -14
- package/dist/{sdk/src/app → app}/interfaces/package-json.interface.js +2 -2
- package/dist/{sdk/src/app → app}/interfaces/webpack-config.interface.d.ts +5 -5
- package/dist/{sdk/src/app → app}/interfaces/webpack-config.interface.js +2 -2
- package/dist/{sdk/src/cli → cli}/commands/app/build.d.ts +4 -4
- package/dist/{sdk/src/cli → cli}/commands/app/build.js +43 -43
- package/dist/{sdk/src/cli → cli}/commands/app/clean.d.ts +3 -3
- package/dist/{sdk/src/cli → cli}/commands/app/clean.js +15 -15
- package/dist/{sdk/src/cli → cli}/commands/app/debug.d.ts +3 -3
- package/dist/{sdk/src/cli → cli}/commands/app/debug.js +22 -22
- package/dist/{sdk/src/cli → cli}/commands/app/e2e-test.d.ts +3 -3
- package/dist/{sdk/src/cli → cli}/commands/app/e2e-test.js +23 -23
- package/dist/{sdk/src/cli → cli}/commands/app/new.d.ts +6 -6
- package/dist/{sdk/src/cli → cli}/commands/app/new.js +190 -190
- package/dist/{sdk/src/cli → cli}/commands/app/package.d.ts +3 -3
- package/dist/{sdk/src/cli → cli}/commands/app/package.js +10 -10
- package/dist/{sdk/src/cli → cli}/commands/app/post-process.d.ts +8 -8
- package/dist/{sdk/src/cli → cli}/commands/app/post-process.js +122 -122
- package/dist/{sdk/src/cli → cli}/commands/app/scaffold.d.ts +4 -4
- package/dist/{sdk/src/cli → cli}/commands/app/scaffold.js +19 -19
- package/dist/{sdk/src/cli → cli}/commands/app/unit-test.d.ts +3 -3
- package/dist/{sdk/src/cli → cli}/commands/app/unit-test.js +11 -11
- package/dist/{sdk/src/cli → cli}/commands/app/validate.d.ts +3 -3
- package/dist/{sdk/src/cli → cli}/commands/app/validate.js +20 -20
- package/dist/{sdk/src/cli → cli}/commands/app/version.d.ts +3 -3
- package/dist/{sdk/src/cli → cli}/commands/app/version.js +17 -17
- package/dist/{sdk/src/cli → cli}/commands/app/watch.d.ts +3 -3
- package/dist/{sdk/src/cli → cli}/commands/app/watch.js +48 -48
- package/dist/{sdk/src/cli → cli}/commands/scifeon/download.d.ts +3 -3
- package/dist/{sdk/src/cli → cli}/commands/scifeon/download.js +48 -48
- package/dist/{sdk/src/cli → cli}/commands/scifeon/run.d.ts +3 -3
- package/dist/{sdk/src/cli → cli}/commands/scifeon/run.js +41 -41
- package/dist/{sdk/src/cli → cli}/config.d.ts +11 -11
- package/dist/{sdk/src/cli → cli}/config.js +23 -23
- package/dist/{sdk/src/cli → cli}/index.d.ts +9 -9
- package/dist/{sdk/src/cli → cli}/index.js +159 -159
- package/dist/{sdk/src/cli → cli}/webpack-runner.d.ts +1 -1
- package/dist/{sdk/src/cli → cli}/webpack-runner.js +26 -26
- package/dist/{sdk/src/download-utils.d.ts → download-utils.d.ts} +3 -3
- package/dist/{sdk/src/download-utils.js → download-utils.js} +50 -50
- package/dist/{sdk/src/file-utils.d.ts → file-utils.d.ts} +5 -5
- package/dist/{sdk/src/file-utils.js → file-utils.js} +41 -41
- package/dist/{sdk/src/html-report.d.ts → html-report.d.ts} +15 -15
- package/dist/{sdk/src/html-report.js → html-report.js} +212 -212
- package/dist/{sdk/src/index.d.ts → index.d.ts} +2 -2
- package/dist/{sdk/src/index.js → index.js} +23 -23
- package/dist/{sdk/src/logger.d.ts → logger.d.ts} +14 -14
- package/dist/{sdk/src/logger.js → logger.js} +52 -52
- package/dist/{sdk/src/measurement-units.d.ts → measurement-units.d.ts} +5 -5
- package/dist/{sdk/src/measurement-units.js → measurement-units.js} +9 -9
- package/dist/{sdk/src/page-types.d.ts → page-types.d.ts} +6 -6
- package/dist/{sdk/src/page-types.js → page-types.js} +10 -10
- package/dist/{sdk/src/plugin-types.d.ts → plugin-types.d.ts} +43 -42
- package/dist/{sdk/src/plugin-types.js → plugin-types.js} +47 -46
- package/dist/{sdk/src/unit-test-runner.d.ts → unit-test-runner.d.ts} +1 -1
- package/dist/{sdk/src/unit-test-runner.js → unit-test-runner.js} +82 -82
- package/dist/utils/test-helper.d.ts +4 -0
- package/dist/{sdk/src/utils → utils}/test-helper.js +46 -46
- package/dist/{sdk/src/webpack-app-config.d.ts → webpack-app-config.d.ts} +2 -2
- package/dist/{sdk/src/webpack-app-config.js → webpack-app-config.js} +248 -248
- package/dist/{sdk/src/webpack-utils.d.ts → webpack-utils.d.ts} +8 -8
- package/dist/{sdk/src/webpack-utils.js → webpack-utils.js} +91 -91
- package/package.json +72 -72
- package/resources/new-app/README.md +12 -12
- package/resources/new-app/editor/.vscode/launch.json +40 -40
- package/resources/new-app/gitignore.txt +6 -6
- package/resources/new-app/typescript/src/index.html +14 -14
- package/resources/new-app/typescript/src/index.ts +32 -32
- package/resources/new-app/typescript/test/e2e/frontpage.test.ts +16 -16
- package/resources/new-app/typescript/test/e2e-config.ts +14 -14
- package/resources/new-app/typescript/test/unit/index.test.ts +7 -7
- package/resources/new-app/typescript/tsconfig.json +39 -39
- package/resources/scaffold-templates/scaffold-e2e-test.ts +19 -19
- package/resources/test/chai.js +10706 -10706
- package/resources/test/mocha.css +326 -326
- package/resources/test/mocha.js +16590 -16590
- package/resources/test/tests.html +26 -26
- package/dist/plugins/src/xlsx-types.d.ts +0 -281
- package/dist/plugins/src/xlsx-types.js +0 -2
- package/dist/sdk/src/utils/test-helper.d.ts +0 -5
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IgnoreNotFoundExportPlugin = exports.WebpackUtils = void 0;
|
|
4
|
-
const FriendlyErrorsPlugin = require("friendly-errors-webpack-plugin");
|
|
5
|
-
const fs = require("fs");
|
|
6
|
-
const file_utils_1 = require("./file-utils");
|
|
7
|
-
const path = require("path");
|
|
8
|
-
class WebpackUtils {
|
|
9
|
-
static parseLogForAzureDevOps() {
|
|
10
|
-
return new FriendlyErrorsPlugin({
|
|
11
|
-
onErrors: function (severity, errors) {
|
|
12
|
-
for (const error of errors) {
|
|
13
|
-
for (const line of error.message.split("\n")) {
|
|
14
|
-
if (line.includes("moment construction falls back to js Date()")
|
|
15
|
-
|| line.includes("_isAMomentObject")
|
|
16
|
-
|| line.includes("node_modules\\moment"))
|
|
17
|
-
continue;
|
|
18
|
-
console.log(`##vso[task.logissue type=${severity}] ${line}`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
clearConsole: false,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
static getPublicPath(fallback, prefix, postfix = null) {
|
|
26
|
-
let publicPath = fallback;
|
|
27
|
-
let scifeonVersion = process.argv.find(a => a.startsWith("--scifeon-version"));
|
|
28
|
-
if (scifeonVersion) {
|
|
29
|
-
scifeonVersion = scifeonVersion.replace("--scifeon-version=", "");
|
|
30
|
-
publicPath = "https://scifeon.azureedge.net/";
|
|
31
|
-
if (prefix) {
|
|
32
|
-
publicPath += `${prefix}/`;
|
|
33
|
-
}
|
|
34
|
-
publicPath += `${scifeonVersion}/`;
|
|
35
|
-
if (postfix) {
|
|
36
|
-
publicPath += `${postfix}/`;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return publicPath;
|
|
40
|
-
}
|
|
41
|
-
static transformTsConfig(file) {
|
|
42
|
-
const tsConfigJson = JSON.parse(fs.readFileSync(file).toString());
|
|
43
|
-
tsConfigJson.exclude = tsConfigJson.exclude || [];
|
|
44
|
-
tsConfigJson.exclude.push("**/*.test.ts");
|
|
45
|
-
tsConfigJson.exclude.push("**/*.e2e-test.ts");
|
|
46
|
-
tsConfigJson.exclude.push("**/*.e2e-util.ts");
|
|
47
|
-
tsConfigJson.exclude.push("**/*.e2e-utils.ts");
|
|
48
|
-
const tempDir = getFileDirectory(file);
|
|
49
|
-
file_utils_1.FileUtils.createDirRecurSync(tempDir);
|
|
50
|
-
const newFile = path.join(tempDir, "tsconfig.temp.json");
|
|
51
|
-
fs.writeFileSync(newFile, JSON.stringify(tsConfigJson));
|
|
52
|
-
return newFile;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.WebpackUtils = WebpackUtils;
|
|
56
|
-
function getFileDirectory(filePath) {
|
|
57
|
-
if (filePath.indexOf("/") === -1) {
|
|
58
|
-
return filePath.substring(0, filePath.lastIndexOf("\\"));
|
|
59
|
-
}
|
|
60
|
-
return filePath.substring(0, filePath.lastIndexOf("/"));
|
|
61
|
-
}
|
|
62
|
-
class IgnoreNotFoundExportPlugin {
|
|
63
|
-
apply(compiler) {
|
|
64
|
-
const doneHook = (stats) => {
|
|
65
|
-
stats.compilation.warnings = stats.compilation.warnings.filter(warn => {
|
|
66
|
-
const ignoreWarn1 = /export '.*'( \(reexported as '.*'\))? was not found in/;
|
|
67
|
-
const ignoreWarn2 = /export 'default'( \(imported as '.*'\))? was not found in/;
|
|
68
|
-
const ignoreWarn3 = /export '.*'( \(imported as '.*'\))? was not found in/;
|
|
69
|
-
if (warn.constructor.name === "ModuleDependencyWarning"
|
|
70
|
-
&& (ignoreWarn1.test(warn.message)
|
|
71
|
-
|| ignoreWarn2.test(warn.message)
|
|
72
|
-
|| ignoreWarn3.test(warn.message))) {
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
if (warn.constructor.name === "ModuleWarning"
|
|
76
|
-
&& warn.message.includes("Can't resolve")
|
|
77
|
-
&& warn.message.includes("chevrotain")) {
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
return true;
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
if (compiler.hooks) {
|
|
84
|
-
compiler.hooks.done.tap("IgnoreNotFoundExportPlugin", doneHook);
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
compiler.plugin("done", doneHook);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
exports.IgnoreNotFoundExportPlugin = IgnoreNotFoundExportPlugin;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IgnoreNotFoundExportPlugin = exports.WebpackUtils = void 0;
|
|
4
|
+
const FriendlyErrorsPlugin = require("friendly-errors-webpack-plugin");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
const file_utils_1 = require("./file-utils");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
class WebpackUtils {
|
|
9
|
+
static parseLogForAzureDevOps() {
|
|
10
|
+
return new FriendlyErrorsPlugin({
|
|
11
|
+
onErrors: function (severity, errors) {
|
|
12
|
+
for (const error of errors) {
|
|
13
|
+
for (const line of error.message.split("\n")) {
|
|
14
|
+
if (line.includes("moment construction falls back to js Date()")
|
|
15
|
+
|| line.includes("_isAMomentObject")
|
|
16
|
+
|| line.includes("node_modules\\moment"))
|
|
17
|
+
continue;
|
|
18
|
+
console.log(`##vso[task.logissue type=${severity}] ${line}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
clearConsole: false,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
static getPublicPath(fallback, prefix, postfix = null) {
|
|
26
|
+
let publicPath = fallback;
|
|
27
|
+
let scifeonVersion = process.argv.find(a => a.startsWith("--scifeon-version"));
|
|
28
|
+
if (scifeonVersion) {
|
|
29
|
+
scifeonVersion = scifeonVersion.replace("--scifeon-version=", "");
|
|
30
|
+
publicPath = "https://scifeon.azureedge.net/";
|
|
31
|
+
if (prefix) {
|
|
32
|
+
publicPath += `${prefix}/`;
|
|
33
|
+
}
|
|
34
|
+
publicPath += `${scifeonVersion}/`;
|
|
35
|
+
if (postfix) {
|
|
36
|
+
publicPath += `${postfix}/`;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return publicPath;
|
|
40
|
+
}
|
|
41
|
+
static transformTsConfig(file) {
|
|
42
|
+
const tsConfigJson = JSON.parse(fs.readFileSync(file).toString());
|
|
43
|
+
tsConfigJson.exclude = tsConfigJson.exclude || [];
|
|
44
|
+
tsConfigJson.exclude.push("**/*.test.ts");
|
|
45
|
+
tsConfigJson.exclude.push("**/*.e2e-test.ts");
|
|
46
|
+
tsConfigJson.exclude.push("**/*.e2e-util.ts");
|
|
47
|
+
tsConfigJson.exclude.push("**/*.e2e-utils.ts");
|
|
48
|
+
const tempDir = getFileDirectory(file);
|
|
49
|
+
file_utils_1.FileUtils.createDirRecurSync(tempDir);
|
|
50
|
+
const newFile = path.join(tempDir, "tsconfig.temp.json");
|
|
51
|
+
fs.writeFileSync(newFile, JSON.stringify(tsConfigJson));
|
|
52
|
+
return newFile;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.WebpackUtils = WebpackUtils;
|
|
56
|
+
function getFileDirectory(filePath) {
|
|
57
|
+
if (filePath.indexOf("/") === -1) {
|
|
58
|
+
return filePath.substring(0, filePath.lastIndexOf("\\"));
|
|
59
|
+
}
|
|
60
|
+
return filePath.substring(0, filePath.lastIndexOf("/"));
|
|
61
|
+
}
|
|
62
|
+
class IgnoreNotFoundExportPlugin {
|
|
63
|
+
apply(compiler) {
|
|
64
|
+
const doneHook = (stats) => {
|
|
65
|
+
stats.compilation.warnings = stats.compilation.warnings.filter(warn => {
|
|
66
|
+
const ignoreWarn1 = /export '.*'( \(reexported as '.*'\))? was not found in/;
|
|
67
|
+
const ignoreWarn2 = /export 'default'( \(imported as '.*'\))? was not found in/;
|
|
68
|
+
const ignoreWarn3 = /export '.*'( \(imported as '.*'\))? was not found in/;
|
|
69
|
+
if (warn.constructor.name === "ModuleDependencyWarning"
|
|
70
|
+
&& (ignoreWarn1.test(warn.message)
|
|
71
|
+
|| ignoreWarn2.test(warn.message)
|
|
72
|
+
|| ignoreWarn3.test(warn.message))) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
if (warn.constructor.name === "ModuleWarning"
|
|
76
|
+
&& warn.message.includes("Can't resolve")
|
|
77
|
+
&& warn.message.includes("chevrotain")) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
if (compiler.hooks) {
|
|
84
|
+
compiler.hooks.done.tap("IgnoreNotFoundExportPlugin", doneHook);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
compiler.plugin("done", doneHook);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.IgnoreNotFoundExportPlugin = IgnoreNotFoundExportPlugin;
|
package/package.json
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@scifeon/sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A tool for developing Apps for Scifeon.",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "Scifeon",
|
|
7
|
-
"email": "support@scifeon.com"
|
|
8
|
-
},
|
|
9
|
-
"main": "dist/cli/index.js",
|
|
10
|
-
"bin": {
|
|
11
|
-
"scifeon-cli": "dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"bin",
|
|
15
|
-
"dist",
|
|
16
|
-
"resources"
|
|
17
|
-
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"prepublishOnly": "npm run build",
|
|
20
|
-
"clean": "rimraf dist",
|
|
21
|
-
"build": "npm run clean && tsc --pretty",
|
|
22
|
-
"test": "mocha --require ts-node/register --recursive test/**/*.test.ts",
|
|
23
|
-
"test:report": "npm run test -- --reporter mocha-junit-reporter --reporter-options mochaFile=./test-report.xml",
|
|
24
|
-
"watch": "npm run build -- --watch",
|
|
25
|
-
"watch:test": "npm run test -- --watch"
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@types/chai": "4.3.1",
|
|
29
|
-
"adm-zip": "0.5.9",
|
|
30
|
-
"aurelia-bootstrapper": "2.4.0",
|
|
31
|
-
"aurelia-webpack-plugin": "4.0.0",
|
|
32
|
-
"chai": "4.3.6",
|
|
33
|
-
"chalk": "2.4.2",
|
|
34
|
-
"chokidar": "3.5.3",
|
|
35
|
-
"commander": "9.3.0",
|
|
36
|
-
"copy-webpack-plugin": "5.1.1",
|
|
37
|
-
"css-loader": "3.5.3",
|
|
38
|
-
"file-loader": "6.0.0",
|
|
39
|
-
"friendly-errors-webpack-plugin": "1.7.0",
|
|
40
|
-
"html-loader": "1.1.0",
|
|
41
|
-
"json-loader": "0.5.7",
|
|
42
|
-
"mini-css-extract-plugin": "0.9.0",
|
|
43
|
-
"node-fetch": "2.6.0",
|
|
44
|
-
"mocha": "10.0.0",
|
|
45
|
-
"mocha-junit-reporter": "2.0.2",
|
|
46
|
-
"node-hook": "1.0.0",
|
|
47
|
-
"openurl": "1.1.1",
|
|
48
|
-
"optimize-css-assets-webpack-plugin": "5.0.3",
|
|
49
|
-
"post-compile-webpack-plugin": "0.1.2",
|
|
50
|
-
"progress": "2.0.3",
|
|
51
|
-
"prompt": "1.3.0",
|
|
52
|
-
"resolve": "1.22.0",
|
|
53
|
-
"sass": "1.52.3",
|
|
54
|
-
"sass-loader": "8.0.2",
|
|
55
|
-
"semver": "7.3.7",
|
|
56
|
-
"style-loader": "1.2.1",
|
|
57
|
-
"terser-webpack-plugin": "2.3.6",
|
|
58
|
-
"ts-loader": "8.3.0",
|
|
59
|
-
"ts-node": "10.8.1",
|
|
60
|
-
"tsconfig-paths-webpack-plugin": "3.2.0",
|
|
61
|
-
"tslib": "2.4.0",
|
|
62
|
-
"typescript": "4.6.4",
|
|
63
|
-
"url-loader": "4.1.0",
|
|
64
|
-
"webpack": "4.43.0",
|
|
65
|
-
"webpack-cli": "3.3.11",
|
|
66
|
-
"webpack-dev-server": "3.10.3"
|
|
67
|
-
},
|
|
68
|
-
"devDependencies": {
|
|
69
|
-
"@types/node": "17.0.41",
|
|
70
|
-
"rimraf": "3.0.2"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@scifeon/sdk",
|
|
3
|
+
"version": "0.101.0",
|
|
4
|
+
"description": "A tool for developing Apps for Scifeon.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Scifeon",
|
|
7
|
+
"email": "support@scifeon.com"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/cli/index.js",
|
|
10
|
+
"bin": {
|
|
11
|
+
"scifeon-cli": "dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin",
|
|
15
|
+
"dist",
|
|
16
|
+
"resources"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"prepublishOnly": "npm run build",
|
|
20
|
+
"clean": "rimraf dist",
|
|
21
|
+
"build": "npm run clean && tsc --pretty",
|
|
22
|
+
"test": "mocha --require ts-node/register --recursive test/**/*.test.ts",
|
|
23
|
+
"test:report": "npm run test -- --reporter mocha-junit-reporter --reporter-options mochaFile=./test-report.xml",
|
|
24
|
+
"watch": "npm run build -- --watch",
|
|
25
|
+
"watch:test": "npm run test -- --watch"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@types/chai": "4.3.1",
|
|
29
|
+
"adm-zip": "0.5.9",
|
|
30
|
+
"aurelia-bootstrapper": "2.4.0",
|
|
31
|
+
"aurelia-webpack-plugin": "4.0.0",
|
|
32
|
+
"chai": "4.3.6",
|
|
33
|
+
"chalk": "2.4.2",
|
|
34
|
+
"chokidar": "3.5.3",
|
|
35
|
+
"commander": "9.3.0",
|
|
36
|
+
"copy-webpack-plugin": "5.1.1",
|
|
37
|
+
"css-loader": "3.5.3",
|
|
38
|
+
"file-loader": "6.0.0",
|
|
39
|
+
"friendly-errors-webpack-plugin": "1.7.0",
|
|
40
|
+
"html-loader": "1.1.0",
|
|
41
|
+
"json-loader": "0.5.7",
|
|
42
|
+
"mini-css-extract-plugin": "0.9.0",
|
|
43
|
+
"node-fetch": "2.6.0",
|
|
44
|
+
"mocha": "10.0.0",
|
|
45
|
+
"mocha-junit-reporter": "2.0.2",
|
|
46
|
+
"node-hook": "1.0.0",
|
|
47
|
+
"openurl": "1.1.1",
|
|
48
|
+
"optimize-css-assets-webpack-plugin": "5.0.3",
|
|
49
|
+
"post-compile-webpack-plugin": "0.1.2",
|
|
50
|
+
"progress": "2.0.3",
|
|
51
|
+
"prompt": "1.3.0",
|
|
52
|
+
"resolve": "1.22.0",
|
|
53
|
+
"sass": "1.52.3",
|
|
54
|
+
"sass-loader": "8.0.2",
|
|
55
|
+
"semver": "7.3.7",
|
|
56
|
+
"style-loader": "1.2.1",
|
|
57
|
+
"terser-webpack-plugin": "2.3.6",
|
|
58
|
+
"ts-loader": "8.3.0",
|
|
59
|
+
"ts-node": "10.8.1",
|
|
60
|
+
"tsconfig-paths-webpack-plugin": "3.2.0",
|
|
61
|
+
"tslib": "2.4.0",
|
|
62
|
+
"typescript": "4.6.4",
|
|
63
|
+
"url-loader": "4.1.0",
|
|
64
|
+
"webpack": "4.43.0",
|
|
65
|
+
"webpack-cli": "3.3.11",
|
|
66
|
+
"webpack-dev-server": "3.10.3"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@types/node": "17.0.41",
|
|
70
|
+
"rimraf": "3.0.2"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
=== Replace this with your own readme ===
|
|
2
|
-
|
|
3
|
-
# Scifeon App Development
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
* Node: https://nodejs.org/en/download/current/
|
|
7
|
-
* Visual Studio Code (optional): https://code.visualstudio.com/
|
|
8
|
-
|
|
9
|
-
## Development
|
|
10
|
-
1. Open a command prompt and execute `npm install scifeon-cli -g`
|
|
11
|
-
2. Execute `npm start`. This is just a shortcut for the command `scifeon-cli debug`, which will launch the development version of Scifeon, with the app under development pre-installed.
|
|
12
|
-
3. Open the following URL in a browser: http://localhost:5000
|
|
1
|
+
=== Replace this with your own readme ===
|
|
2
|
+
|
|
3
|
+
# Scifeon App Development
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
* Node: https://nodejs.org/en/download/current/
|
|
7
|
+
* Visual Studio Code (optional): https://code.visualstudio.com/
|
|
8
|
+
|
|
9
|
+
## Development
|
|
10
|
+
1. Open a command prompt and execute `npm install scifeon-cli -g`
|
|
11
|
+
2. Execute `npm start`. This is just a shortcut for the command `scifeon-cli debug`, which will launch the development version of Scifeon, with the app under development pre-installed.
|
|
12
|
+
3. Open the following URL in a browser: http://localhost:5000
|
|
@@ -1,41 +1,41 @@
|
|
|
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
|
-
"type": "chrome",
|
|
9
|
-
"request": "launch",
|
|
10
|
-
"name": "Launch Chrome against localhost",
|
|
11
|
-
"url": "http://localhost:5000",
|
|
12
|
-
"webRoot": "${workspaceFolder}/runtime/scifeon/wwwroot",
|
|
13
|
-
"userDataDir": "${workspaceFolder}/.vscode/chrome",
|
|
14
|
-
"sourceMapPathOverrides": {
|
|
15
|
-
"webpack:///./*": "${workspaceFolder}/*"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "Debug tests",
|
|
20
|
-
"type": "node",
|
|
21
|
-
"request": "launch",
|
|
22
|
-
"port": 9229,
|
|
23
|
-
"program": "${workspaceRoot}/node_modules/@scifeon/sdk/dist/index.js",
|
|
24
|
-
"stopOnEntry": false,
|
|
25
|
-
"sourceMaps": true,
|
|
26
|
-
"args":[
|
|
27
|
-
"e2e-test",
|
|
28
|
-
// To debug a single test, uncomment the following and specify a single test
|
|
29
|
-
//"--test", "test\\e2e\\*.test.ts"
|
|
30
|
-
],
|
|
31
|
-
"cwd": "${workspaceRoot}",
|
|
32
|
-
"preLaunchTask": null,
|
|
33
|
-
"runtimeExecutable": null,
|
|
34
|
-
"runtimeArgs": [
|
|
35
|
-
"--inspect-brk"
|
|
36
|
-
],
|
|
37
|
-
"console": "internalConsole",
|
|
38
|
-
"outFiles": []
|
|
39
|
-
}
|
|
40
|
-
]
|
|
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
|
+
"type": "chrome",
|
|
9
|
+
"request": "launch",
|
|
10
|
+
"name": "Launch Chrome against localhost",
|
|
11
|
+
"url": "http://localhost:5000",
|
|
12
|
+
"webRoot": "${workspaceFolder}/runtime/scifeon/wwwroot",
|
|
13
|
+
"userDataDir": "${workspaceFolder}/.vscode/chrome",
|
|
14
|
+
"sourceMapPathOverrides": {
|
|
15
|
+
"webpack:///./*": "${workspaceFolder}/*"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Debug tests",
|
|
20
|
+
"type": "node",
|
|
21
|
+
"request": "launch",
|
|
22
|
+
"port": 9229,
|
|
23
|
+
"program": "${workspaceRoot}/node_modules/@scifeon/sdk/dist/index.js",
|
|
24
|
+
"stopOnEntry": false,
|
|
25
|
+
"sourceMaps": true,
|
|
26
|
+
"args":[
|
|
27
|
+
"e2e-test",
|
|
28
|
+
// To debug a single test, uncomment the following and specify a single test
|
|
29
|
+
//"--test", "test\\e2e\\*.test.ts"
|
|
30
|
+
],
|
|
31
|
+
"cwd": "${workspaceRoot}",
|
|
32
|
+
"preLaunchTask": null,
|
|
33
|
+
"runtimeExecutable": null,
|
|
34
|
+
"runtimeArgs": [
|
|
35
|
+
"--inspect-brk"
|
|
36
|
+
],
|
|
37
|
+
"console": "internalConsole",
|
|
38
|
+
"outFiles": []
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
41
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
node_modules
|
|
2
|
-
runtime
|
|
3
|
-
temp
|
|
4
|
-
test/e2e-key.config
|
|
5
|
-
test/reports
|
|
6
|
-
test/screenshots
|
|
1
|
+
node_modules
|
|
2
|
+
runtime
|
|
3
|
+
temp
|
|
4
|
+
test/e2e-key.config
|
|
5
|
+
test/reports
|
|
6
|
+
test/screenshots
|
|
7
7
|
tsconfig.temp.json
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="page-with-header">
|
|
3
|
-
|
|
4
|
-
<div class="page-header">
|
|
5
|
-
<h1>Custom Page</h1>
|
|
6
|
-
</div>
|
|
7
|
-
|
|
8
|
-
<div class="page-panels">
|
|
9
|
-
<p>Class property <o>message</o>: <b>${message}</b></p>
|
|
10
|
-
<p>Input field for class property <o>message</o>: <input type="text" value.bind="message"/></p>
|
|
11
|
-
<p><button click.trigger="button()">Call function!</button></p>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-with-header">
|
|
3
|
+
|
|
4
|
+
<div class="page-header">
|
|
5
|
+
<h1>Custom Page</h1>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div class="page-panels">
|
|
9
|
+
<p>Class property <o>message</o>: <b>${message}</b></p>
|
|
10
|
+
<p>Input field for class property <o>message</o>: <input type="text" value.bind="message"/></p>
|
|
11
|
+
<p><button click.trigger="button()">Call function!</button></p>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { ConsoleLogger, ServerAPI } from "@scifeon/core";
|
|
2
|
-
import { scifeonRoute } from "@scifeon/plugins";
|
|
3
|
-
import { autoinject } from "aurelia-framework";
|
|
4
|
-
|
|
5
|
-
@autoinject
|
|
6
|
-
@scifeonRoute({
|
|
7
|
-
route: "app/{NAMESPACE}/{NAME}",
|
|
8
|
-
title: "Custom Page: {PAGE_NAME}",
|
|
9
|
-
chunk: "split_into_webpack_chunk",
|
|
10
|
-
})
|
|
11
|
-
export class Index {
|
|
12
|
-
public message: string;
|
|
13
|
-
|
|
14
|
-
constructor(private logger: ConsoleLogger, private server: ServerAPI) {
|
|
15
|
-
this.logger.debug("Logger enabled");
|
|
16
|
-
|
|
17
|
-
this.message = "Hello World!";
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public async button() {
|
|
21
|
-
const response = await this.server.get("/api/user");
|
|
22
|
-
if (response.ok) {
|
|
23
|
-
const user = await response.json();
|
|
24
|
-
alert("Current user: " + user.id);
|
|
25
|
-
} else {
|
|
26
|
-
alert("Button clicked!");
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
this.logger.setLevel(this.logger.logLevel.debug);
|
|
30
|
-
this.logger.debug("Debug log statement.");
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
import { ConsoleLogger, ServerAPI } from "@scifeon/core";
|
|
2
|
+
import { scifeonRoute } from "@scifeon/plugins";
|
|
3
|
+
import { autoinject } from "aurelia-framework";
|
|
4
|
+
|
|
5
|
+
@autoinject
|
|
6
|
+
@scifeonRoute({
|
|
7
|
+
route: "app/{NAMESPACE}/{NAME}",
|
|
8
|
+
title: "Custom Page: {PAGE_NAME}",
|
|
9
|
+
chunk: "split_into_webpack_chunk",
|
|
10
|
+
})
|
|
11
|
+
export class Index {
|
|
12
|
+
public message: string;
|
|
13
|
+
|
|
14
|
+
constructor(private logger: ConsoleLogger, private server: ServerAPI) {
|
|
15
|
+
this.logger.debug("Logger enabled");
|
|
16
|
+
|
|
17
|
+
this.message = "Hello World!";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public async button() {
|
|
21
|
+
const response = await this.server.get("/api/user");
|
|
22
|
+
if (response.ok) {
|
|
23
|
+
const user = await response.json();
|
|
24
|
+
alert("Current user: " + user.id);
|
|
25
|
+
} else {
|
|
26
|
+
alert("Button clicked!");
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
this.logger.setLevel(this.logger.logLevel.debug);
|
|
30
|
+
this.logger.debug("Debug log statement.");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { E2EUtils, ScifeonPage } from "@scifeon/e2e-test";
|
|
2
|
-
|
|
3
|
-
describe("PLATFORM Frontpage", async () => {
|
|
4
|
-
|
|
5
|
-
let page: ScifeonPage;
|
|
6
|
-
|
|
7
|
-
before(async () => {
|
|
8
|
-
page = await E2EUtils.newPage();
|
|
9
|
-
await page.login("USER");
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it("should show the dashboard", async () => {
|
|
13
|
-
await page.waitForSelector(".detail-panels div.panel.dashboard");
|
|
14
|
-
await page.assert.textContains(".detail-panels", "Results");
|
|
15
|
-
});
|
|
16
|
-
});
|
|
1
|
+
import { E2EUtils, ScifeonPage } from "@scifeon/e2e-test";
|
|
2
|
+
|
|
3
|
+
describe("PLATFORM Frontpage", async () => {
|
|
4
|
+
|
|
5
|
+
let page: ScifeonPage;
|
|
6
|
+
|
|
7
|
+
before(async () => {
|
|
8
|
+
page = await E2EUtils.newPage();
|
|
9
|
+
await page.login("USER");
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it("should show the dashboard", async () => {
|
|
13
|
+
await page.waitForSelector(".detail-panels div.panel.dashboard");
|
|
14
|
+
await page.assert.textContains(".detail-panels", "Results");
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export const config = {
|
|
2
|
-
url: "http://localhost:5000",
|
|
3
|
-
headless: false,
|
|
4
|
-
timeout: 30,
|
|
5
|
-
// chrome: '' //
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export async function before() {
|
|
9
|
-
console.log("// this will be run before all e2e tests");
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export async function after() {
|
|
13
|
-
console.log("// this will be run after all e2e tests");
|
|
14
|
-
}
|
|
1
|
+
export const config = {
|
|
2
|
+
url: "http://localhost:5000",
|
|
3
|
+
headless: false,
|
|
4
|
+
timeout: 30,
|
|
5
|
+
// chrome: '' //
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export async function before() {
|
|
9
|
+
console.log("// this will be run before all e2e tests");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export async function after() {
|
|
13
|
+
console.log("// this will be run after all e2e tests");
|
|
14
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
describe("index", function() {
|
|
2
|
-
describe("message", function() {
|
|
3
|
-
it("should not have changed on initialize", function() {
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
});
|
|
7
|
-
});
|
|
1
|
+
describe("index", function() {
|
|
2
|
+
describe("message", function() {
|
|
3
|
+
it("should not have changed on initialize", function() {
|
|
4
|
+
|
|
5
|
+
});
|
|
6
|
+
});
|
|
7
|
+
});
|