@scifeon/sdk 0.104.0 → 0.105.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/action-target.d.ts +7 -7
- package/dist/action-target.js +11 -11
- package/dist/app/app-generator.d.ts +34 -34
- package/dist/app/app-generator.js +460 -460
- package/dist/app/app-persist.d.ts +18 -18
- package/dist/app/app-persist.js +193 -183
- package/dist/app/app-validator.d.ts +8 -8
- package/dist/app/app-validator.js +145 -145
- package/dist/app/interfaces/app-json.interface.d.ts +4 -4
- package/dist/app/interfaces/app-json.interface.js +2 -2
- package/dist/app/interfaces/app-type.enum.d.ts +5 -5
- package/dist/app/interfaces/app-type.enum.js +9 -9
- package/dist/app/interfaces/contributions/contributions-json.interface.d.ts +55 -55
- package/dist/app/interfaces/contributions/contributions-json.interface.js +2 -2
- package/dist/app/interfaces/contributions/main-menu.interface.d.ts +12 -11
- package/dist/app/interfaces/contributions/main-menu.interface.js +2 -2
- package/dist/app/interfaces/contributions/menu-item.interface.d.ts +5 -5
- package/dist/app/interfaces/contributions/menu-item.interface.js +2 -2
- package/dist/app/interfaces/contributions/page-menu-item.interface.d.ts +10 -10
- package/dist/app/interfaces/contributions/page-menu-item.interface.js +2 -2
- package/dist/app/interfaces/contributions/page-menu.interface.d.ts +9 -9
- package/dist/app/interfaces/contributions/page-menu.interface.js +2 -2
- package/dist/app/interfaces/package-json.interface.d.ts +14 -14
- package/dist/app/interfaces/package-json.interface.js +2 -2
- package/dist/app/interfaces/webpack-config.interface.d.ts +5 -5
- package/dist/app/interfaces/webpack-config.interface.js +2 -2
- package/dist/cli/commands/app/build.d.ts +4 -4
- package/dist/cli/commands/app/build.js +43 -43
- package/dist/cli/commands/app/clean.d.ts +3 -3
- package/dist/cli/commands/app/clean.js +15 -15
- package/dist/cli/commands/app/debug.d.ts +3 -3
- package/dist/cli/commands/app/debug.js +22 -22
- package/dist/cli/commands/app/e2e-test.d.ts +3 -3
- package/dist/cli/commands/app/e2e-test.js +23 -23
- package/dist/cli/commands/app/new.d.ts +6 -6
- package/dist/cli/commands/app/new.js +190 -190
- package/dist/cli/commands/app/package.d.ts +3 -3
- package/dist/cli/commands/app/package.js +10 -10
- package/dist/cli/commands/app/post-process.d.ts +8 -8
- package/dist/cli/commands/app/post-process.js +122 -122
- package/dist/cli/commands/app/scaffold.d.ts +4 -4
- package/dist/cli/commands/app/scaffold.js +19 -19
- package/dist/cli/commands/app/unit-test.d.ts +3 -3
- package/dist/cli/commands/app/unit-test.js +11 -11
- package/dist/cli/commands/app/validate.d.ts +3 -3
- package/dist/cli/commands/app/validate.js +20 -20
- package/dist/cli/commands/app/version.d.ts +3 -3
- package/dist/cli/commands/app/version.js +17 -17
- package/dist/cli/commands/app/watch.d.ts +3 -3
- package/dist/cli/commands/app/watch.js +48 -48
- package/dist/cli/commands/scifeon/download.d.ts +3 -3
- package/dist/cli/commands/scifeon/download.js +48 -48
- package/dist/cli/commands/scifeon/run.d.ts +3 -3
- package/dist/cli/commands/scifeon/run.js +41 -41
- package/dist/cli/config.d.ts +11 -11
- package/dist/cli/config.js +23 -23
- package/dist/cli/index.d.ts +9 -9
- package/dist/cli/index.js +159 -159
- package/dist/cli/webpack-runner.d.ts +1 -1
- package/dist/cli/webpack-runner.js +26 -26
- package/dist/download-utils.d.ts +3 -3
- package/dist/download-utils.js +50 -50
- package/dist/file-utils.d.ts +5 -5
- package/dist/file-utils.js +41 -41
- package/dist/html-report.d.ts +15 -15
- package/dist/html-report.js +212 -212
- package/dist/index.d.ts +2 -2
- package/dist/index.js +23 -23
- package/dist/logger.d.ts +14 -14
- package/dist/logger.js +52 -52
- package/dist/measurement-units.d.ts +5 -5
- package/dist/measurement-units.js +9 -9
- package/dist/page-types.d.ts +6 -6
- package/dist/page-types.js +10 -10
- package/dist/plugin-types.d.ts +44 -44
- package/dist/plugin-types.js +48 -48
- package/dist/unit-test-runner.d.ts +1 -1
- package/dist/unit-test-runner.js +82 -82
- package/dist/utils/test-helper.d.ts +4 -4
- package/dist/utils/test-helper.js +46 -46
- package/dist/webpack-app-config.d.ts +2 -2
- package/dist/webpack-app-config.js +248 -248
- package/dist/webpack-utils.d.ts +8 -8
- package/dist/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
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.webpackRunner = void 0;
|
|
4
|
-
const webpack = require("webpack");
|
|
5
|
-
const logger_1 = require("../logger");
|
|
6
|
-
const webpack_app_config_1 = require("../webpack-app-config");
|
|
7
|
-
const config_1 = require("./config");
|
|
8
|
-
function webpackRunner(mode) {
|
|
9
|
-
const env = {};
|
|
10
|
-
env[mode] = true;
|
|
11
|
-
const compiler = webpack((0, webpack_app_config_1.webpackAppConfig)(env, config_1.config));
|
|
12
|
-
compiler.run(function (err, stats) {
|
|
13
|
-
logger_1.LOGGER.info("Webpack output: ");
|
|
14
|
-
const config = logger_1.LOGGER.verbose ? "verbose" : {
|
|
15
|
-
chunks: false,
|
|
16
|
-
colors: true,
|
|
17
|
-
};
|
|
18
|
-
if (err) {
|
|
19
|
-
console.error(err);
|
|
20
|
-
}
|
|
21
|
-
if (stats) {
|
|
22
|
-
console.log(stats.toString(config));
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
exports.webpackRunner = webpackRunner;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.webpackRunner = void 0;
|
|
4
|
+
const webpack = require("webpack");
|
|
5
|
+
const logger_1 = require("../logger");
|
|
6
|
+
const webpack_app_config_1 = require("../webpack-app-config");
|
|
7
|
+
const config_1 = require("./config");
|
|
8
|
+
function webpackRunner(mode) {
|
|
9
|
+
const env = {};
|
|
10
|
+
env[mode] = true;
|
|
11
|
+
const compiler = webpack((0, webpack_app_config_1.webpackAppConfig)(env, config_1.config));
|
|
12
|
+
compiler.run(function (err, stats) {
|
|
13
|
+
logger_1.LOGGER.info("Webpack output: ");
|
|
14
|
+
const config = logger_1.LOGGER.verbose ? "verbose" : {
|
|
15
|
+
chunks: false,
|
|
16
|
+
colors: true,
|
|
17
|
+
};
|
|
18
|
+
if (err) {
|
|
19
|
+
console.error(err);
|
|
20
|
+
}
|
|
21
|
+
if (stats) {
|
|
22
|
+
console.log(stats.toString(config));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
exports.webpackRunner = webpackRunner;
|
package/dist/download-utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare class DownloadUtils {
|
|
2
|
-
static downloadZip(url: string, targetPath: string, progressBarMsg: string): Promise<void>;
|
|
3
|
-
}
|
|
1
|
+
export declare class DownloadUtils {
|
|
2
|
+
static downloadZip(url: string, targetPath: string, progressBarMsg: string): Promise<void>;
|
|
3
|
+
}
|
package/dist/download-utils.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DownloadUtils = void 0;
|
|
4
|
-
const fs = require("fs");
|
|
5
|
-
const https = require("https");
|
|
6
|
-
const os = require("os");
|
|
7
|
-
const path = require("path");
|
|
8
|
-
const ProgressBar = require("progress");
|
|
9
|
-
const file_utils_1 = require("./file-utils");
|
|
10
|
-
const logger_1 = require("./logger");
|
|
11
|
-
const AdmZip = require("adm-zip");
|
|
12
|
-
class DownloadUtils {
|
|
13
|
-
static downloadZip(url, targetPath, progressBarMsg) {
|
|
14
|
-
return new Promise((resolve, reject) => {
|
|
15
|
-
if (!fs.existsSync(targetPath)) {
|
|
16
|
-
file_utils_1.FileUtils.createDirRecurSync(targetPath);
|
|
17
|
-
}
|
|
18
|
-
const tmpFilePath = os.tmpdir() + path.sep + Date.now() + "-scifeon-temp.zip";
|
|
19
|
-
https.get(url, (response) => {
|
|
20
|
-
const len = parseInt(response.headers["content-length"], 10);
|
|
21
|
-
const toMegabytes = (bytes) => {
|
|
22
|
-
const mb = bytes / 1024 / 1024;
|
|
23
|
-
return `${Math.round(mb * 10) / 10} Mb`;
|
|
24
|
-
};
|
|
25
|
-
console.log();
|
|
26
|
-
const bar = new ProgressBar(progressBarMsg + ` - ${toMegabytes(len)} [:bar] :percent :etas`, {
|
|
27
|
-
complete: "=",
|
|
28
|
-
incomplete: " ",
|
|
29
|
-
width: 20,
|
|
30
|
-
total: len,
|
|
31
|
-
});
|
|
32
|
-
response.on("data", function (data) {
|
|
33
|
-
bar.tick(data.length);
|
|
34
|
-
fs.appendFileSync(tmpFilePath, data);
|
|
35
|
-
});
|
|
36
|
-
response.on("end", function () {
|
|
37
|
-
logger_1.LOGGER.msg("Unzipping...");
|
|
38
|
-
const zip = new AdmZip(tmpFilePath);
|
|
39
|
-
zip.extractAllTo(targetPath);
|
|
40
|
-
fs.unlinkSync(tmpFilePath);
|
|
41
|
-
resolve();
|
|
42
|
-
});
|
|
43
|
-
response.on("error", function (e) {
|
|
44
|
-
reject(e);
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
exports.DownloadUtils = DownloadUtils;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DownloadUtils = void 0;
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
const https = require("https");
|
|
6
|
+
const os = require("os");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
const ProgressBar = require("progress");
|
|
9
|
+
const file_utils_1 = require("./file-utils");
|
|
10
|
+
const logger_1 = require("./logger");
|
|
11
|
+
const AdmZip = require("adm-zip");
|
|
12
|
+
class DownloadUtils {
|
|
13
|
+
static downloadZip(url, targetPath, progressBarMsg) {
|
|
14
|
+
return new Promise((resolve, reject) => {
|
|
15
|
+
if (!fs.existsSync(targetPath)) {
|
|
16
|
+
file_utils_1.FileUtils.createDirRecurSync(targetPath);
|
|
17
|
+
}
|
|
18
|
+
const tmpFilePath = os.tmpdir() + path.sep + Date.now() + "-scifeon-temp.zip";
|
|
19
|
+
https.get(url, (response) => {
|
|
20
|
+
const len = parseInt(response.headers["content-length"], 10);
|
|
21
|
+
const toMegabytes = (bytes) => {
|
|
22
|
+
const mb = bytes / 1024 / 1024;
|
|
23
|
+
return `${Math.round(mb * 10) / 10} Mb`;
|
|
24
|
+
};
|
|
25
|
+
console.log();
|
|
26
|
+
const bar = new ProgressBar(progressBarMsg + ` - ${toMegabytes(len)} [:bar] :percent :etas`, {
|
|
27
|
+
complete: "=",
|
|
28
|
+
incomplete: " ",
|
|
29
|
+
width: 20,
|
|
30
|
+
total: len,
|
|
31
|
+
});
|
|
32
|
+
response.on("data", function (data) {
|
|
33
|
+
bar.tick(data.length);
|
|
34
|
+
fs.appendFileSync(tmpFilePath, data);
|
|
35
|
+
});
|
|
36
|
+
response.on("end", function () {
|
|
37
|
+
logger_1.LOGGER.msg("Unzipping...");
|
|
38
|
+
const zip = new AdmZip(tmpFilePath);
|
|
39
|
+
zip.extractAllTo(targetPath);
|
|
40
|
+
fs.unlinkSync(tmpFilePath);
|
|
41
|
+
resolve();
|
|
42
|
+
});
|
|
43
|
+
response.on("error", function (e) {
|
|
44
|
+
reject(e);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.DownloadUtils = DownloadUtils;
|
package/dist/file-utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare class FileUtils {
|
|
2
|
-
static createDirRecurSync(dir: string): void;
|
|
3
|
-
static removeDirRecurSync(dir: string): void;
|
|
4
|
-
static readDirRecur(dir: string): string[];
|
|
5
|
-
}
|
|
1
|
+
export declare class FileUtils {
|
|
2
|
+
static createDirRecurSync(dir: string): void;
|
|
3
|
+
static removeDirRecurSync(dir: string): void;
|
|
4
|
+
static readDirRecur(dir: string): string[];
|
|
5
|
+
}
|
package/dist/file-utils.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FileUtils = void 0;
|
|
4
|
-
const fs = require("fs");
|
|
5
|
-
const path = require("path");
|
|
6
|
-
class FileUtils {
|
|
7
|
-
static createDirRecurSync(dir) {
|
|
8
|
-
const sep = path.sep;
|
|
9
|
-
const initDir = path.isAbsolute(dir) ? sep : "";
|
|
10
|
-
dir.split(sep).reduce((parentDir, childDir) => {
|
|
11
|
-
const curDir = path.resolve(parentDir, childDir);
|
|
12
|
-
if (!fs.existsSync(curDir)) {
|
|
13
|
-
fs.mkdirSync(curDir);
|
|
14
|
-
}
|
|
15
|
-
return curDir;
|
|
16
|
-
}, initDir);
|
|
17
|
-
}
|
|
18
|
-
static removeDirRecurSync(dir) {
|
|
19
|
-
if (fs.existsSync(dir)) {
|
|
20
|
-
for (const file of fs.readdirSync(dir)) {
|
|
21
|
-
const sub = path.resolve(dir, file);
|
|
22
|
-
if (fs.statSync(sub).isDirectory()) {
|
|
23
|
-
FileUtils.removeDirRecurSync(sub);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
fs.unlinkSync(sub);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
fs.rmdirSync(dir);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
static readDirRecur(dir) {
|
|
33
|
-
if (!fs.existsSync(dir))
|
|
34
|
-
return [];
|
|
35
|
-
return fs.readdirSync(dir)
|
|
36
|
-
.reduce((files, file) => fs.statSync(path.join(dir, file)).isDirectory() ?
|
|
37
|
-
files.concat(this.readDirRecur(path.join(dir, file))) :
|
|
38
|
-
files.concat(path.join(dir, file)), []);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.FileUtils = FileUtils;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileUtils = void 0;
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
class FileUtils {
|
|
7
|
+
static createDirRecurSync(dir) {
|
|
8
|
+
const sep = path.sep;
|
|
9
|
+
const initDir = path.isAbsolute(dir) ? sep : "";
|
|
10
|
+
dir.split(sep).reduce((parentDir, childDir) => {
|
|
11
|
+
const curDir = path.resolve(parentDir, childDir);
|
|
12
|
+
if (!fs.existsSync(curDir)) {
|
|
13
|
+
fs.mkdirSync(curDir);
|
|
14
|
+
}
|
|
15
|
+
return curDir;
|
|
16
|
+
}, initDir);
|
|
17
|
+
}
|
|
18
|
+
static removeDirRecurSync(dir) {
|
|
19
|
+
if (fs.existsSync(dir)) {
|
|
20
|
+
for (const file of fs.readdirSync(dir)) {
|
|
21
|
+
const sub = path.resolve(dir, file);
|
|
22
|
+
if (fs.statSync(sub).isDirectory()) {
|
|
23
|
+
FileUtils.removeDirRecurSync(sub);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
fs.unlinkSync(sub);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
fs.rmdirSync(dir);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
static readDirRecur(dir) {
|
|
33
|
+
if (!fs.existsSync(dir))
|
|
34
|
+
return [];
|
|
35
|
+
return fs.readdirSync(dir)
|
|
36
|
+
.reduce((files, file) => fs.statSync(path.join(dir, file)).isDirectory() ?
|
|
37
|
+
files.concat(this.readDirRecur(path.join(dir, file))) :
|
|
38
|
+
files.concat(path.join(dir, file)), []);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.FileUtils = FileUtils;
|
package/dist/html-report.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export declare class HtmlReport {
|
|
2
|
-
private reportsPath;
|
|
3
|
-
private appPath;
|
|
4
|
-
private stats;
|
|
5
|
-
private grep;
|
|
6
|
-
private rootSuite;
|
|
7
|
-
private reportHtml;
|
|
8
|
-
constructor(reportsPath: string, appPath: string);
|
|
9
|
-
generate(runner: any): void;
|
|
10
|
-
private generateTestsHtml;
|
|
11
|
-
private generateSuite;
|
|
12
|
-
private generateTests;
|
|
13
|
-
private generateSuites;
|
|
14
|
-
private msToMinutesAndSeconds;
|
|
15
|
-
}
|
|
1
|
+
export declare class HtmlReport {
|
|
2
|
+
private reportsPath;
|
|
3
|
+
private appPath;
|
|
4
|
+
private stats;
|
|
5
|
+
private grep;
|
|
6
|
+
private rootSuite;
|
|
7
|
+
private reportHtml;
|
|
8
|
+
constructor(reportsPath: string, appPath: string);
|
|
9
|
+
generate(runner: any): void;
|
|
10
|
+
private generateTestsHtml;
|
|
11
|
+
private generateSuite;
|
|
12
|
+
private generateTests;
|
|
13
|
+
private generateSuites;
|
|
14
|
+
private msToMinutesAndSeconds;
|
|
15
|
+
}
|