@scifeon/sdk 0.87.0 → 0.88.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/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/new.js +1 -1
- package/dist/cli/commands/app/package.js +1 -1
- package/dist/cli/commands/app/unit-test.js +1 -1
- package/dist/cli/commands/app/watch.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/webpack-runner.js +1 -1
- package/dist/download-utils.d.ts +1 -1
- package/dist/plugin-types.d.ts +3 -1
- package/dist/plugin-types.js +2 -0
- package/dist/unit-test-runner.js +1 -1
- package/dist/utils/test-helper.js +1 -1
- package/dist/webpack-app-config.js +1 -21
- package/dist/webpack-utils.d.ts +3 -0
- package/dist/webpack-utils.js +23 -1
- package/package.json +4 -4
|
@@ -21,7 +21,7 @@ class BuildCommand {
|
|
|
21
21
|
if (!fs.existsSync(config_1.config.wwwDir)) {
|
|
22
22
|
yield download_utils_1.DownloadUtils.downloadZip("https://scifeon.azureedge.net/sdk/packages-types.zip", path.resolve("runtime", "scifeon", "generated"), "Downloading Scifeon Types");
|
|
23
23
|
}
|
|
24
|
-
webpack_runner_1.webpackRunner("build");
|
|
24
|
+
(0, webpack_runner_1.webpackRunner)("build");
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -106,7 +106,7 @@ class NewCommand {
|
|
|
106
106
|
fs.writeFileSync(path.resolve(packageJson.name, "contributions.json"), JSON.stringify(contributionsJson, null, 2));
|
|
107
107
|
logger_1.LOGGER.msg("Installing node_modules...");
|
|
108
108
|
const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm";
|
|
109
|
-
const proc = child_process_1.spawn(npmCmd, ["install --silent --prefer-offline --no-audit"], { cwd: path.resolve(packageJson.name) });
|
|
109
|
+
const proc = (0, child_process_1.spawn)(npmCmd, ["install --silent --prefer-offline --no-audit"], { cwd: path.resolve(packageJson.name) });
|
|
110
110
|
proc.stderr.on("data", (data) => console.log(data.toString()));
|
|
111
111
|
proc.stdout.on("data", (data) => console.log(data.toString()));
|
|
112
112
|
proc.once("exit", () => logger_1.LOGGER.msg("App created in folder [" + packageJson.name + "]. Run 'scifeon-cli debug' in this directory to start development of your app."));
|
|
@@ -4,7 +4,7 @@ exports.PackageCommand = void 0;
|
|
|
4
4
|
const webpack_runner_1 = require("../../webpack-runner");
|
|
5
5
|
class PackageCommand {
|
|
6
6
|
execute() {
|
|
7
|
-
webpack_runner_1.webpackRunner("package");
|
|
7
|
+
(0, webpack_runner_1.webpackRunner)("package");
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
exports.PackageCommand = PackageCommand;
|
|
@@ -5,7 +5,7 @@ const unit_test_runner_1 = require("../../../unit-test-runner");
|
|
|
5
5
|
const config_1 = require("../../config");
|
|
6
6
|
class TestCommand {
|
|
7
7
|
execute(options) {
|
|
8
|
-
unit_test_runner_1.unitTestRunner(options, config_1.config);
|
|
8
|
+
(0, unit_test_runner_1.unitTestRunner)(options, config_1.config);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
exports.TestCommand = TestCommand;
|
|
@@ -22,7 +22,7 @@ class WatchCommand {
|
|
|
22
22
|
if (!fs.existsSync("./runtime")) {
|
|
23
23
|
yield new download_1.DownloadCommand().execute();
|
|
24
24
|
}
|
|
25
|
-
const webpackConfig = webpack_app_config_1.webpackAppConfig({ watch: true }, config_1.config);
|
|
25
|
+
const webpackConfig = (0, webpack_app_config_1.webpackAppConfig)({ watch: true }, config_1.config);
|
|
26
26
|
webpackConfig.output.publicPath = "http://localhost:9090" + webpackConfig.output.publicPath;
|
|
27
27
|
webpackConfig.entry.app.unshift(require.resolve("webpack-dev-server/client") + "?http://localhost:9090", require.resolve("webpack/hot/dev-server"));
|
|
28
28
|
const compiler = webpack(webpackConfig);
|
package/dist/cli/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
7
7
|
o[k2] = m[k];
|
|
8
8
|
}));
|
|
9
9
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
13
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -8,7 +8,7 @@ const config_1 = require("./config");
|
|
|
8
8
|
function webpackRunner(mode) {
|
|
9
9
|
const env = {};
|
|
10
10
|
env[mode] = true;
|
|
11
|
-
const compiler = webpack(webpack_app_config_1.webpackAppConfig(env, config_1.config));
|
|
11
|
+
const compiler = webpack((0, webpack_app_config_1.webpackAppConfig)(env, config_1.config));
|
|
12
12
|
compiler.run(function (err, stats) {
|
|
13
13
|
logger_1.LOGGER.info("Webpack output: ");
|
|
14
14
|
const config = logger_1.LOGGER.verbose ? "verbose" : {
|
package/dist/download-utils.d.ts
CHANGED
package/dist/plugin-types.d.ts
CHANGED
|
@@ -31,5 +31,7 @@ export declare enum PLUGIN_TYPE {
|
|
|
31
31
|
ELN_STEP_SECTION = "eln.step.section",
|
|
32
32
|
ELN_EXPERIMENT_COMPLETE = "eln.experiment.complete",
|
|
33
33
|
ELN_EXPERIMENT_LOCK = "eln.experiment.lock",
|
|
34
|
-
|
|
34
|
+
ELN_STEP_FORM_MODE = "eln.step.form.mode",
|
|
35
|
+
PRE_PROCESS_SAVE_ENTITY = "pre_process_save_entity",
|
|
36
|
+
ADMINISTRATION_SETTINGS_ELN = "administration.settings.eln"
|
|
35
37
|
}
|
package/dist/plugin-types.js
CHANGED
|
@@ -35,5 +35,7 @@ var PLUGIN_TYPE;
|
|
|
35
35
|
PLUGIN_TYPE["ELN_STEP_SECTION"] = "eln.step.section";
|
|
36
36
|
PLUGIN_TYPE["ELN_EXPERIMENT_COMPLETE"] = "eln.experiment.complete";
|
|
37
37
|
PLUGIN_TYPE["ELN_EXPERIMENT_LOCK"] = "eln.experiment.lock";
|
|
38
|
+
PLUGIN_TYPE["ELN_STEP_FORM_MODE"] = "eln.step.form.mode";
|
|
38
39
|
PLUGIN_TYPE["PRE_PROCESS_SAVE_ENTITY"] = "pre_process_save_entity";
|
|
40
|
+
PLUGIN_TYPE["ADMINISTRATION_SETTINGS_ELN"] = "administration.settings.eln";
|
|
39
41
|
})(PLUGIN_TYPE = exports.PLUGIN_TYPE || (exports.PLUGIN_TYPE = {}));
|
package/dist/unit-test-runner.js
CHANGED
|
@@ -27,7 +27,7 @@ function unitTestRunner(options, config, appType = "sdk") {
|
|
|
27
27
|
}
|
|
28
28
|
file_utils_1.FileUtils.createDirRecurSync(path.resolve(config.tempDir));
|
|
29
29
|
fs.writeFileSync(path.resolve(config.tempDir, "unit-tests.js"), unitTestsJs.join("\n"));
|
|
30
|
-
const webpackConfig = webpack_app_config_1.webpackAppConfig({ test: true }, config, appType);
|
|
30
|
+
const webpackConfig = (0, webpack_app_config_1.webpackAppConfig)({ test: true }, config, appType);
|
|
31
31
|
webpackConfig.target = "node";
|
|
32
32
|
const compiler = webpack(webpackConfig);
|
|
33
33
|
compiler.run(function (err, stats) {
|
|
@@ -20,7 +20,7 @@ const requireURL = (url) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
20
20
|
script = requireCache[url];
|
|
21
21
|
}
|
|
22
22
|
else {
|
|
23
|
-
const response = yield node_fetch_1.default(url);
|
|
23
|
+
const response = yield (0, node_fetch_1.default)(url);
|
|
24
24
|
script = yield response.text();
|
|
25
25
|
requireCache[url] = script;
|
|
26
26
|
}
|
|
@@ -15,26 +15,6 @@ const logger_1 = require("./logger");
|
|
|
15
15
|
const webpack_utils_1 = require("./webpack-utils");
|
|
16
16
|
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
|
|
17
17
|
const TerserJSPlugin = require("terser-webpack-plugin");
|
|
18
|
-
const ModuleDependencyWarning = require("webpack/lib/ModuleDependencyWarning");
|
|
19
|
-
class IgnoreNotFoundExportPlugin {
|
|
20
|
-
apply(compiler) {
|
|
21
|
-
const messageRegExp = /export '.*'( \(reexported as '.*'\))? was not found in/;
|
|
22
|
-
function doneHook(stats) {
|
|
23
|
-
stats.compilation.warnings = stats.compilation.warnings.filter(function (warn) {
|
|
24
|
-
if (warn instanceof ModuleDependencyWarning && messageRegExp.test(warn.message)) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
return true;
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
if (compiler.hooks) {
|
|
31
|
-
compiler.hooks.done.tap("IgnoreNotFoundExportPlugin", doneHook);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
compiler.plugin("done", doneHook);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
18
|
function webpackAppConfig(env, config, appType = "sdk") {
|
|
39
19
|
env = env || { debug: true };
|
|
40
20
|
const DEBUG = env.debug;
|
|
@@ -67,7 +47,7 @@ function webpackAppConfig(env, config, appType = "sdk") {
|
|
|
67
47
|
filename: "[name].[contenthash].css",
|
|
68
48
|
chunkFilename: "[id].[contenthash].css",
|
|
69
49
|
}),
|
|
70
|
-
new IgnoreNotFoundExportPlugin(),
|
|
50
|
+
new webpack_utils_1.IgnoreNotFoundExportPlugin(),
|
|
71
51
|
]);
|
|
72
52
|
if (PACKAGE) {
|
|
73
53
|
plugins.push(webpack_utils_1.WebpackUtils.parseLogForAzureDevOps());
|
package/dist/webpack-utils.d.ts
CHANGED
package/dist/webpack-utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebpackUtils = void 0;
|
|
3
|
+
exports.IgnoreNotFoundExportPlugin = exports.WebpackUtils = void 0;
|
|
4
4
|
const FriendlyErrorsPlugin = require("friendly-errors-webpack-plugin");
|
|
5
5
|
const fs = require("fs");
|
|
6
6
|
const file_utils_1 = require("./file-utils");
|
|
@@ -59,3 +59,25 @@ function getFileDirectory(filePath) {
|
|
|
59
59
|
return filePath.substring(0, filePath.lastIndexOf("/"));
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
const ModuleDependencyWarning = require("webpack/lib/ModuleDependencyWarning");
|
|
63
|
+
class IgnoreNotFoundExportPlugin {
|
|
64
|
+
apply(compiler) {
|
|
65
|
+
const messageRegExp = /export '.*'( \(reexported as '.*'\))? was not found in/;
|
|
66
|
+
const messageRegExp2 = /export 'default'( \(imported as '.*'\))? was not found in/;
|
|
67
|
+
function doneHook(stats) {
|
|
68
|
+
stats.compilation.warnings = stats.compilation.warnings.filter(function (warn) {
|
|
69
|
+
if (warn instanceof ModuleDependencyWarning && (messageRegExp.test(warn.message) || messageRegExp2.test(warn.message))) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
return true;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
if (compiler.hooks) {
|
|
76
|
+
compiler.hooks.done.tap("IgnoreNotFoundExportPlugin", doneHook);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
compiler.plugin("done", doneHook);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.IgnoreNotFoundExportPlugin = IgnoreNotFoundExportPlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scifeon/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.0",
|
|
4
4
|
"description": "A tool for developing Apps for Scifeon.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Scifeon",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"semver": "7.3.2",
|
|
56
56
|
"style-loader": "1.2.1",
|
|
57
57
|
"terser-webpack-plugin": "2.3.6",
|
|
58
|
-
"ts-loader": "
|
|
58
|
+
"ts-loader": "8.3.0",
|
|
59
59
|
"ts-node": "8.9.1",
|
|
60
60
|
"tsconfig-paths-webpack-plugin": "3.2.0",
|
|
61
|
-
"tslib": "
|
|
62
|
-
"typescript": "
|
|
61
|
+
"tslib": "2.3.1",
|
|
62
|
+
"typescript": "4.4.2",
|
|
63
63
|
"url-loader": "4.1.0",
|
|
64
64
|
"webpack": "4.43.0",
|
|
65
65
|
"webpack-cli": "3.3.11",
|