@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,48 +1,48 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.DownloadCommand = void 0;
|
|
13
|
-
const fs = require("fs");
|
|
14
|
-
const os = require("os");
|
|
15
|
-
const path = require("path");
|
|
16
|
-
const download_utils_1 = require("../../../download-utils");
|
|
17
|
-
const file_utils_1 = require("../../../file-utils");
|
|
18
|
-
const logger_1 = require("../../../logger");
|
|
19
|
-
class DownloadCommand {
|
|
20
|
-
execute(rootPath = null) {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
let scifeonPath = "runtime";
|
|
23
|
-
if (rootPath) {
|
|
24
|
-
scifeonPath = path.join(rootPath, scifeonPath);
|
|
25
|
-
}
|
|
26
|
-
file_utils_1.FileUtils.removeDirRecurSync(path.join(scifeonPath, "scifeon"));
|
|
27
|
-
file_utils_1.FileUtils.createDirRecurSync(scifeonPath);
|
|
28
|
-
logger_1.LOGGER.msg("Downloading latest version of the runtime...");
|
|
29
|
-
let url = "https://scifeon.azureedge.net/sdk/scifeon-runtime-";
|
|
30
|
-
if (os.platform() === "win32") {
|
|
31
|
-
url += "win";
|
|
32
|
-
}
|
|
33
|
-
else if (os.platform() === "darwin") {
|
|
34
|
-
url += "osx";
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
throw new Error("Operating system currently not supported. Want support? Contact support@scifeon.com");
|
|
38
|
-
}
|
|
39
|
-
url += ".zip";
|
|
40
|
-
yield download_utils_1.DownloadUtils.downloadZip(url, scifeonPath, "Downloading Scifeon Runtime");
|
|
41
|
-
if (os.platform() === "darwin") {
|
|
42
|
-
fs.chmodSync(path.join(scifeonPath, "scifeon", "Scifeon"), 0o766);
|
|
43
|
-
}
|
|
44
|
-
logger_1.LOGGER.msg("Finished! Run with the command: scifeon-cli scifeon-run");
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.DownloadCommand = DownloadCommand;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DownloadCommand = void 0;
|
|
13
|
+
const fs = require("fs");
|
|
14
|
+
const os = require("os");
|
|
15
|
+
const path = require("path");
|
|
16
|
+
const download_utils_1 = require("../../../download-utils");
|
|
17
|
+
const file_utils_1 = require("../../../file-utils");
|
|
18
|
+
const logger_1 = require("../../../logger");
|
|
19
|
+
class DownloadCommand {
|
|
20
|
+
execute(rootPath = null) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
let scifeonPath = "runtime";
|
|
23
|
+
if (rootPath) {
|
|
24
|
+
scifeonPath = path.join(rootPath, scifeonPath);
|
|
25
|
+
}
|
|
26
|
+
file_utils_1.FileUtils.removeDirRecurSync(path.join(scifeonPath, "scifeon"));
|
|
27
|
+
file_utils_1.FileUtils.createDirRecurSync(scifeonPath);
|
|
28
|
+
logger_1.LOGGER.msg("Downloading latest version of the runtime...");
|
|
29
|
+
let url = "https://scifeon.azureedge.net/sdk/scifeon-runtime-";
|
|
30
|
+
if (os.platform() === "win32") {
|
|
31
|
+
url += "win";
|
|
32
|
+
}
|
|
33
|
+
else if (os.platform() === "darwin") {
|
|
34
|
+
url += "osx";
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
throw new Error("Operating system currently not supported. Want support? Contact support@scifeon.com");
|
|
38
|
+
}
|
|
39
|
+
url += ".zip";
|
|
40
|
+
yield download_utils_1.DownloadUtils.downloadZip(url, scifeonPath, "Downloading Scifeon Runtime");
|
|
41
|
+
if (os.platform() === "darwin") {
|
|
42
|
+
fs.chmodSync(path.join(scifeonPath, "scifeon", "Scifeon"), 0o766);
|
|
43
|
+
}
|
|
44
|
+
logger_1.LOGGER.msg("Finished! Run with the command: scifeon-cli scifeon-run");
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.DownloadCommand = DownloadCommand;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare class RunCommand {
|
|
2
|
-
execute(disableBrowserLaunch: boolean): void;
|
|
3
|
-
}
|
|
1
|
+
export declare class RunCommand {
|
|
2
|
+
execute(disableBrowserLaunch: boolean): void;
|
|
3
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RunCommand = void 0;
|
|
4
|
-
const child_process = require("child_process");
|
|
5
|
-
const fs = require("fs");
|
|
6
|
-
const os = require("os");
|
|
7
|
-
const path = require("path");
|
|
8
|
-
class RunCommand {
|
|
9
|
-
execute(disableBrowserLaunch) {
|
|
10
|
-
process.env.ASPNETCORE_ENVIRONMENT = "SDK";
|
|
11
|
-
let executable = "";
|
|
12
|
-
if (os.platform() === "win32") {
|
|
13
|
-
executable += path.resolve("./runtime/scifeon/Scifeon.exe");
|
|
14
|
-
}
|
|
15
|
-
else if (os.platform() === "darwin") {
|
|
16
|
-
executable += path.resolve("./runtime/scifeon/Scifeon");
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
throw new Error("Operating system currently not supported. Want support? Contact support@scifeon.com");
|
|
20
|
-
}
|
|
21
|
-
if (!fs.existsSync(executable)) {
|
|
22
|
-
throw new Error("Could not find " + executable + ". Maybe you need to download the SDK first?");
|
|
23
|
-
}
|
|
24
|
-
const scifeon = child_process.spawn(executable, [], { env: process.env });
|
|
25
|
-
let browserLaunched = false;
|
|
26
|
-
scifeon.stdout.on("data", (data) => {
|
|
27
|
-
console.log(`${data}`);
|
|
28
|
-
if (!disableBrowserLaunch && !browserLaunched) {
|
|
29
|
-
browserLaunched = true;
|
|
30
|
-
setTimeout(() => require("openurl").open("http://localhost:5000"), 5000);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
scifeon.stderr.on("data", (data) => {
|
|
34
|
-
console.error(`Error: ${data}`);
|
|
35
|
-
});
|
|
36
|
-
scifeon.on("close", (code) => {
|
|
37
|
-
console.log(`Child process exited with code ${code}`);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.RunCommand = RunCommand;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RunCommand = void 0;
|
|
4
|
+
const child_process = require("child_process");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
const os = require("os");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
class RunCommand {
|
|
9
|
+
execute(disableBrowserLaunch) {
|
|
10
|
+
process.env.ASPNETCORE_ENVIRONMENT = "SDK";
|
|
11
|
+
let executable = "";
|
|
12
|
+
if (os.platform() === "win32") {
|
|
13
|
+
executable += path.resolve("./runtime/scifeon/Scifeon.exe");
|
|
14
|
+
}
|
|
15
|
+
else if (os.platform() === "darwin") {
|
|
16
|
+
executable += path.resolve("./runtime/scifeon/Scifeon");
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
throw new Error("Operating system currently not supported. Want support? Contact support@scifeon.com");
|
|
20
|
+
}
|
|
21
|
+
if (!fs.existsSync(executable)) {
|
|
22
|
+
throw new Error("Could not find " + executable + ". Maybe you need to download the SDK first?");
|
|
23
|
+
}
|
|
24
|
+
const scifeon = child_process.spawn(executable, [], { env: process.env });
|
|
25
|
+
let browserLaunched = false;
|
|
26
|
+
scifeon.stdout.on("data", (data) => {
|
|
27
|
+
console.log(`${data}`);
|
|
28
|
+
if (!disableBrowserLaunch && !browserLaunched) {
|
|
29
|
+
browserLaunched = true;
|
|
30
|
+
setTimeout(() => require("openurl").open("http://localhost:5000"), 5000);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
scifeon.stderr.on("data", (data) => {
|
|
34
|
+
console.error(`Error: ${data}`);
|
|
35
|
+
});
|
|
36
|
+
scifeon.on("close", (code) => {
|
|
37
|
+
console.log(`Child process exited with code ${code}`);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.RunCommand = RunCommand;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare const config: {
|
|
2
|
-
appPath: string;
|
|
3
|
-
jsonDir: string;
|
|
4
|
-
manifestDir: string;
|
|
5
|
-
tempDir: string;
|
|
6
|
-
outputDir: string;
|
|
7
|
-
publicPath: string;
|
|
8
|
-
modulesFolders: string[];
|
|
9
|
-
wwwDir: string;
|
|
10
|
-
manifests: string[];
|
|
11
|
-
};
|
|
1
|
+
export declare const config: {
|
|
2
|
+
appPath: string;
|
|
3
|
+
jsonDir: string;
|
|
4
|
+
manifestDir: string;
|
|
5
|
+
tempDir: string;
|
|
6
|
+
outputDir: string;
|
|
7
|
+
publicPath: string;
|
|
8
|
+
modulesFolders: string[];
|
|
9
|
+
wwwDir: string;
|
|
10
|
+
manifests: string[];
|
|
11
|
+
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.config = void 0;
|
|
4
|
-
const path = require("path");
|
|
5
|
-
exports.config = {
|
|
6
|
-
appPath: path.resolve(),
|
|
7
|
-
jsonDir: path.resolve("runtime", "scifeon", "generated", "sdkApps"),
|
|
8
|
-
manifestDir: path.resolve("runtime", "scifeon", "generated", "manifest"),
|
|
9
|
-
tempDir: path.resolve("temp"),
|
|
10
|
-
outputDir: path.resolve("temp"),
|
|
11
|
-
publicPath: "/",
|
|
12
|
-
modulesFolders: [
|
|
13
|
-
"node_modules",
|
|
14
|
-
path.resolve("..", "node_modules"),
|
|
15
|
-
path.resolve(__dirname, "node_modules"),
|
|
16
|
-
path.resolve(__dirname, "..", "..", "node_modules"),
|
|
17
|
-
path.resolve(__dirname, "..", "..", "..", "node_modules"),
|
|
18
|
-
path.resolve(__dirname, "..", "..", "..", "..", "node_modules"),
|
|
19
|
-
path.resolve(__dirname, "..", "..", "..", "..", "..", "node_modules"),
|
|
20
|
-
].map((x) => path.resolve(x)),
|
|
21
|
-
wwwDir: path.resolve("runtime", "scifeon", "wwwroot", "dist"),
|
|
22
|
-
manifests: ["vendor", "scifeon-core", "scifeon-plugins", "scifeon-ui", "scifeon-data"].reverse(),
|
|
23
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.config = void 0;
|
|
4
|
+
const path = require("path");
|
|
5
|
+
exports.config = {
|
|
6
|
+
appPath: path.resolve(),
|
|
7
|
+
jsonDir: path.resolve("runtime", "scifeon", "generated", "sdkApps"),
|
|
8
|
+
manifestDir: path.resolve("runtime", "scifeon", "generated", "manifest"),
|
|
9
|
+
tempDir: path.resolve("temp"),
|
|
10
|
+
outputDir: path.resolve("temp"),
|
|
11
|
+
publicPath: "/",
|
|
12
|
+
modulesFolders: [
|
|
13
|
+
"node_modules",
|
|
14
|
+
path.resolve("..", "node_modules"),
|
|
15
|
+
path.resolve(__dirname, "node_modules"),
|
|
16
|
+
path.resolve(__dirname, "..", "..", "node_modules"),
|
|
17
|
+
path.resolve(__dirname, "..", "..", "..", "node_modules"),
|
|
18
|
+
path.resolve(__dirname, "..", "..", "..", "..", "node_modules"),
|
|
19
|
+
path.resolve(__dirname, "..", "..", "..", "..", "..", "node_modules"),
|
|
20
|
+
].map((x) => path.resolve(x)),
|
|
21
|
+
wwwDir: path.resolve("runtime", "scifeon", "wwwroot", "dist"),
|
|
22
|
+
manifests: ["vendor", "scifeon-core", "scifeon-plugins", "scifeon-ui", "scifeon-data"].reverse(),
|
|
23
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from "../utils/test-helper";
|
|
2
|
-
export declare class ScifeonCLI {
|
|
3
|
-
private program;
|
|
4
|
-
private package;
|
|
5
|
-
constructor();
|
|
6
|
-
initialize(): void;
|
|
7
|
-
setup(): void;
|
|
8
|
-
start(): void;
|
|
9
|
-
}
|
|
1
|
+
export * from "../utils/test-helper";
|
|
2
|
+
export declare class ScifeonCLI {
|
|
3
|
+
private program;
|
|
4
|
+
private package;
|
|
5
|
+
constructor();
|
|
6
|
+
initialize(): void;
|
|
7
|
+
setup(): void;
|
|
8
|
+
start(): void;
|
|
9
|
+
}
|
|
@@ -1,159 +1,159 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.ScifeonCLI = void 0;
|
|
27
|
-
const chalk_1 = require("chalk");
|
|
28
|
-
const commander_1 = require("commander");
|
|
29
|
-
const logger_1 = require("../logger");
|
|
30
|
-
const build_1 = require("./commands/app/build");
|
|
31
|
-
const clean_1 = require("./commands/app/clean");
|
|
32
|
-
const debug_1 = require("./commands/app/debug");
|
|
33
|
-
const e2e_test_1 = require("./commands/app/e2e-test");
|
|
34
|
-
const new_1 = require("./commands/app/new");
|
|
35
|
-
const package_1 = require("./commands/app/package");
|
|
36
|
-
const post_process_1 = require("./commands/app/post-process");
|
|
37
|
-
const scaffold_1 = require("./commands/app/scaffold");
|
|
38
|
-
const unit_test_1 = require("./commands/app/unit-test");
|
|
39
|
-
const validate_1 = require("./commands/app/validate");
|
|
40
|
-
const version_1 = require("./commands/app/version");
|
|
41
|
-
const watch_1 = require("./commands/app/watch");
|
|
42
|
-
const download_1 = require("./commands/scifeon/download");
|
|
43
|
-
__exportStar(require("../utils/test-helper"), exports);
|
|
44
|
-
class ScifeonCLI {
|
|
45
|
-
constructor() {
|
|
46
|
-
this.program = commander_1.program;
|
|
47
|
-
this.package = require("../../package.json");
|
|
48
|
-
this.initialize();
|
|
49
|
-
this.setup();
|
|
50
|
-
const padding = new Array(20).join(" ");
|
|
51
|
-
const header = `${padding}Scifeon CLI | Version: ${this.package.version}${padding}`;
|
|
52
|
-
console.log(chalk_1.default.bgBlue.white(" ".repeat(header.length)));
|
|
53
|
-
console.log(chalk_1.default.bgBlue.white(header));
|
|
54
|
-
console.log(chalk_1.default.bgBlue.white("-".repeat(header.length)));
|
|
55
|
-
const options = this.program.opts();
|
|
56
|
-
new logger_1.LOGGER(options.quiet, options.verbose);
|
|
57
|
-
logger_1.LOGGER.warn("Verbose logging enabled.");
|
|
58
|
-
}
|
|
59
|
-
initialize() {
|
|
60
|
-
this.program
|
|
61
|
-
.version(this.package.version)
|
|
62
|
-
.description(this.package.description)
|
|
63
|
-
.option("-v, --verbose", "Verbose logging.")
|
|
64
|
-
.option("-q, --quiet", "No logging.");
|
|
65
|
-
}
|
|
66
|
-
setup() {
|
|
67
|
-
this.program
|
|
68
|
-
.command("build")
|
|
69
|
-
.option("--branch <branch>", "Platform branch to use for SDK types.")
|
|
70
|
-
.allowUnknownOption()
|
|
71
|
-
.description("Build the App into the folder /build.\n")
|
|
72
|
-
.action((options) => __awaiter(this, void 0, void 0, function* () { return new build_1.BuildCommand().execute(options); }));
|
|
73
|
-
this.program
|
|
74
|
-
.command("clean")
|
|
75
|
-
.description("Remove the /build-folder.\n")
|
|
76
|
-
.action(() => new clean_1.CleanCommand().execute());
|
|
77
|
-
this.program
|
|
78
|
-
.command("debug")
|
|
79
|
-
.allowUnknownOption()
|
|
80
|
-
.option("--disable-browser-launch", "Don't launch http://localhost:5000 in the default browser.")
|
|
81
|
-
.description("Starts Scifeon development version and builds App with watch-mode.\n")
|
|
82
|
-
.action((options) => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
return new debug_1.DebugCommand()
|
|
84
|
-
.execute(options.disableBrowserLaunch !== undefined && options.disableBrowserLaunch);
|
|
85
|
-
}));
|
|
86
|
-
this.program
|
|
87
|
-
.command("new")
|
|
88
|
-
.description("Create a new app in a new folder, ready for debugging.\n")
|
|
89
|
-
.action(() => new new_1.NewCommand().execute());
|
|
90
|
-
this.program
|
|
91
|
-
.command("package")
|
|
92
|
-
.description("Build and package the App into a zip-file named <namespace>.<name>.<version>.zip in the /build-folder, ready for upload to Scifeon.\n")
|
|
93
|
-
.action(() => new package_1.PackageCommand().execute());
|
|
94
|
-
this.program
|
|
95
|
-
.command("validate")
|
|
96
|
-
.description("Validate the package.json file.\n")
|
|
97
|
-
.action(() => new validate_1.ValidateCommand().execute());
|
|
98
|
-
this.program
|
|
99
|
-
.command("version <mode>")
|
|
100
|
-
.description("Increment the version number. Use one of major, minor, path for <mode>, where the version is on the format major.minor.patch.\n")
|
|
101
|
-
.action(mode => new version_1.VersionCommand().execute(mode));
|
|
102
|
-
this.program
|
|
103
|
-
.command("unit-test")
|
|
104
|
-
.option("--cli", "Run tests on the command-line, i.e. not in the browser.")
|
|
105
|
-
.option("--junit-report")
|
|
106
|
-
.option("--html-report")
|
|
107
|
-
.option("--dir <dir>")
|
|
108
|
-
.description("Run all unit-tests located in the /test/unit-folder.\n")
|
|
109
|
-
.action(options => new unit_test_1.TestCommand().execute(options));
|
|
110
|
-
this.program
|
|
111
|
-
.command("e2e-test")
|
|
112
|
-
.option("--url <url>", "URL for the scifeon instance to test", "http://localhost:5000")
|
|
113
|
-
.option("--key <key>", "Optionally add a /test/e2e/key.config-file with this content (make sure the file is ignored by .git).")
|
|
114
|
-
.option("--pdf-report", "Generate a PDF report with the result.")
|
|
115
|
-
.option("--junit-report", "Generate a JUnit formatted XML-file with the result.")
|
|
116
|
-
.option("--trx-report", "Generate a TRX formatted XML-file with the result.")
|
|
117
|
-
.option("--headless", "Run Chrome in headless mode.")
|
|
118
|
-
.option("--tag <tag>", "Run only tests with tag.")
|
|
119
|
-
.option("--file-pattern <filePattern>", "Run only tests in files matching file pattern.")
|
|
120
|
-
.option("--dir <dir>", "Run only tests in provided directory.")
|
|
121
|
-
.option("--test <file>", "Run only specific test file.")
|
|
122
|
-
.option("--timeout <timeout>", "Set the timeout for when to fail a test", "30")
|
|
123
|
-
.option("--chrome <path>", "Optionally specify the full path to the Chrome-installation to use.")
|
|
124
|
-
.description("Run all end-to-end-tests located in the /test/e2e-folder. All options above can be added to the /test/e2e/config.ts-file.\n")
|
|
125
|
-
.action(options => new e2e_test_1.E2ETestCommand().execute(options));
|
|
126
|
-
this.program
|
|
127
|
-
.command("scaffold")
|
|
128
|
-
.option("--e2e-test <filename>", "Create an e2e test file with the specified filename.")
|
|
129
|
-
.description("Create a scaffold file with boilerplate code.\n")
|
|
130
|
-
.action(options => new scaffold_1.ScaffoldCommand().execute(options));
|
|
131
|
-
this.program
|
|
132
|
-
.command("post-process")
|
|
133
|
-
.option("--test <file>", "Test file created with 'scifeon-cli scaffold --e2e-test'.")
|
|
134
|
-
.option("--recording <file>", "Puppeteer file exported from Chrome Recorder.")
|
|
135
|
-
.description("Post-process the content of a Chrome recording for use with the test file.")
|
|
136
|
-
.action(options => new post_process_1.PostProcessCommand().execute(options));
|
|
137
|
-
this.program
|
|
138
|
-
.command("watch")
|
|
139
|
-
.allowUnknownOption()
|
|
140
|
-
.description("Build the App and watch for changes.\n")
|
|
141
|
-
.action(() => __awaiter(this, void 0, void 0, function* () { return new watch_1.WatchCommand().execute(); }));
|
|
142
|
-
this.program
|
|
143
|
-
.command("download")
|
|
144
|
-
.description("Download the latest version of the Scifeon runtime.\n")
|
|
145
|
-
.action(() => __awaiter(this, void 0, void 0, function* () { return new download_1.DownloadCommand().execute(); }));
|
|
146
|
-
this.program.configureHelp({
|
|
147
|
-
sortSubcommands: true,
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
start() {
|
|
151
|
-
try {
|
|
152
|
-
const command = this.program.parse(process.argv);
|
|
153
|
-
}
|
|
154
|
-
catch (err) {
|
|
155
|
-
logger_1.LOGGER.error(err.toString());
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
exports.ScifeonCLI = ScifeonCLI;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.ScifeonCLI = void 0;
|
|
27
|
+
const chalk_1 = require("chalk");
|
|
28
|
+
const commander_1 = require("commander");
|
|
29
|
+
const logger_1 = require("../logger");
|
|
30
|
+
const build_1 = require("./commands/app/build");
|
|
31
|
+
const clean_1 = require("./commands/app/clean");
|
|
32
|
+
const debug_1 = require("./commands/app/debug");
|
|
33
|
+
const e2e_test_1 = require("./commands/app/e2e-test");
|
|
34
|
+
const new_1 = require("./commands/app/new");
|
|
35
|
+
const package_1 = require("./commands/app/package");
|
|
36
|
+
const post_process_1 = require("./commands/app/post-process");
|
|
37
|
+
const scaffold_1 = require("./commands/app/scaffold");
|
|
38
|
+
const unit_test_1 = require("./commands/app/unit-test");
|
|
39
|
+
const validate_1 = require("./commands/app/validate");
|
|
40
|
+
const version_1 = require("./commands/app/version");
|
|
41
|
+
const watch_1 = require("./commands/app/watch");
|
|
42
|
+
const download_1 = require("./commands/scifeon/download");
|
|
43
|
+
__exportStar(require("../utils/test-helper"), exports);
|
|
44
|
+
class ScifeonCLI {
|
|
45
|
+
constructor() {
|
|
46
|
+
this.program = commander_1.program;
|
|
47
|
+
this.package = require("../../package.json");
|
|
48
|
+
this.initialize();
|
|
49
|
+
this.setup();
|
|
50
|
+
const padding = new Array(20).join(" ");
|
|
51
|
+
const header = `${padding}Scifeon CLI | Version: ${this.package.version}${padding}`;
|
|
52
|
+
console.log(chalk_1.default.bgBlue.white(" ".repeat(header.length)));
|
|
53
|
+
console.log(chalk_1.default.bgBlue.white(header));
|
|
54
|
+
console.log(chalk_1.default.bgBlue.white("-".repeat(header.length)));
|
|
55
|
+
const options = this.program.opts();
|
|
56
|
+
new logger_1.LOGGER(options.quiet, options.verbose);
|
|
57
|
+
logger_1.LOGGER.warn("Verbose logging enabled.");
|
|
58
|
+
}
|
|
59
|
+
initialize() {
|
|
60
|
+
this.program
|
|
61
|
+
.version(this.package.version)
|
|
62
|
+
.description(this.package.description)
|
|
63
|
+
.option("-v, --verbose", "Verbose logging.")
|
|
64
|
+
.option("-q, --quiet", "No logging.");
|
|
65
|
+
}
|
|
66
|
+
setup() {
|
|
67
|
+
this.program
|
|
68
|
+
.command("build")
|
|
69
|
+
.option("--branch <branch>", "Platform branch to use for SDK types.")
|
|
70
|
+
.allowUnknownOption()
|
|
71
|
+
.description("Build the App into the folder /build.\n")
|
|
72
|
+
.action((options) => __awaiter(this, void 0, void 0, function* () { return new build_1.BuildCommand().execute(options); }));
|
|
73
|
+
this.program
|
|
74
|
+
.command("clean")
|
|
75
|
+
.description("Remove the /build-folder.\n")
|
|
76
|
+
.action(() => new clean_1.CleanCommand().execute());
|
|
77
|
+
this.program
|
|
78
|
+
.command("debug")
|
|
79
|
+
.allowUnknownOption()
|
|
80
|
+
.option("--disable-browser-launch", "Don't launch http://localhost:5000 in the default browser.")
|
|
81
|
+
.description("Starts Scifeon development version and builds App with watch-mode.\n")
|
|
82
|
+
.action((options) => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return new debug_1.DebugCommand()
|
|
84
|
+
.execute(options.disableBrowserLaunch !== undefined && options.disableBrowserLaunch);
|
|
85
|
+
}));
|
|
86
|
+
this.program
|
|
87
|
+
.command("new")
|
|
88
|
+
.description("Create a new app in a new folder, ready for debugging.\n")
|
|
89
|
+
.action(() => new new_1.NewCommand().execute());
|
|
90
|
+
this.program
|
|
91
|
+
.command("package")
|
|
92
|
+
.description("Build and package the App into a zip-file named <namespace>.<name>.<version>.zip in the /build-folder, ready for upload to Scifeon.\n")
|
|
93
|
+
.action(() => new package_1.PackageCommand().execute());
|
|
94
|
+
this.program
|
|
95
|
+
.command("validate")
|
|
96
|
+
.description("Validate the package.json file.\n")
|
|
97
|
+
.action(() => new validate_1.ValidateCommand().execute());
|
|
98
|
+
this.program
|
|
99
|
+
.command("version <mode>")
|
|
100
|
+
.description("Increment the version number. Use one of major, minor, path for <mode>, where the version is on the format major.minor.patch.\n")
|
|
101
|
+
.action(mode => new version_1.VersionCommand().execute(mode));
|
|
102
|
+
this.program
|
|
103
|
+
.command("unit-test")
|
|
104
|
+
.option("--cli", "Run tests on the command-line, i.e. not in the browser.")
|
|
105
|
+
.option("--junit-report")
|
|
106
|
+
.option("--html-report")
|
|
107
|
+
.option("--dir <dir>")
|
|
108
|
+
.description("Run all unit-tests located in the /test/unit-folder.\n")
|
|
109
|
+
.action(options => new unit_test_1.TestCommand().execute(options));
|
|
110
|
+
this.program
|
|
111
|
+
.command("e2e-test")
|
|
112
|
+
.option("--url <url>", "URL for the scifeon instance to test", "http://localhost:5000")
|
|
113
|
+
.option("--key <key>", "Optionally add a /test/e2e/key.config-file with this content (make sure the file is ignored by .git).")
|
|
114
|
+
.option("--pdf-report", "Generate a PDF report with the result.")
|
|
115
|
+
.option("--junit-report", "Generate a JUnit formatted XML-file with the result.")
|
|
116
|
+
.option("--trx-report", "Generate a TRX formatted XML-file with the result.")
|
|
117
|
+
.option("--headless", "Run Chrome in headless mode.")
|
|
118
|
+
.option("--tag <tag>", "Run only tests with tag.")
|
|
119
|
+
.option("--file-pattern <filePattern>", "Run only tests in files matching file pattern.")
|
|
120
|
+
.option("--dir <dir>", "Run only tests in provided directory.")
|
|
121
|
+
.option("--test <file>", "Run only specific test file.")
|
|
122
|
+
.option("--timeout <timeout>", "Set the timeout for when to fail a test", "30")
|
|
123
|
+
.option("--chrome <path>", "Optionally specify the full path to the Chrome-installation to use.")
|
|
124
|
+
.description("Run all end-to-end-tests located in the /test/e2e-folder. All options above can be added to the /test/e2e/config.ts-file.\n")
|
|
125
|
+
.action(options => new e2e_test_1.E2ETestCommand().execute(options));
|
|
126
|
+
this.program
|
|
127
|
+
.command("scaffold")
|
|
128
|
+
.option("--e2e-test <filename>", "Create an e2e test file with the specified filename.")
|
|
129
|
+
.description("Create a scaffold file with boilerplate code.\n")
|
|
130
|
+
.action(options => new scaffold_1.ScaffoldCommand().execute(options));
|
|
131
|
+
this.program
|
|
132
|
+
.command("post-process")
|
|
133
|
+
.option("--test <file>", "Test file created with 'scifeon-cli scaffold --e2e-test'.")
|
|
134
|
+
.option("--recording <file>", "Puppeteer file exported from Chrome Recorder.")
|
|
135
|
+
.description("Post-process the content of a Chrome recording for use with the test file.")
|
|
136
|
+
.action(options => new post_process_1.PostProcessCommand().execute(options));
|
|
137
|
+
this.program
|
|
138
|
+
.command("watch")
|
|
139
|
+
.allowUnknownOption()
|
|
140
|
+
.description("Build the App and watch for changes.\n")
|
|
141
|
+
.action(() => __awaiter(this, void 0, void 0, function* () { return new watch_1.WatchCommand().execute(); }));
|
|
142
|
+
this.program
|
|
143
|
+
.command("download")
|
|
144
|
+
.description("Download the latest version of the Scifeon runtime.\n")
|
|
145
|
+
.action(() => __awaiter(this, void 0, void 0, function* () { return new download_1.DownloadCommand().execute(); }));
|
|
146
|
+
this.program.configureHelp({
|
|
147
|
+
sortSubcommands: true,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
start() {
|
|
151
|
+
try {
|
|
152
|
+
const command = this.program.parse(process.argv);
|
|
153
|
+
}
|
|
154
|
+
catch (err) {
|
|
155
|
+
logger_1.LOGGER.error(err.toString());
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
exports.ScifeonCLI = ScifeonCLI;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function webpackRunner(mode: any): void;
|
|
1
|
+
export declare function webpackRunner(mode: any): void;
|