@scifeon/sdk 0.112.0 → 0.114.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/{plugin-types.d.ts → core/src/types/plugins/common/enums/plugin-types.d.ts} +7 -2
- package/dist/{plugin-types.js → core/src/types/plugins/common/enums/plugin-types.js} +6 -1
- package/dist/{app → sdk/src/app}/app-generator.d.ts +1 -0
- package/dist/{app → sdk/src/app}/app-generator.js +17 -6
- package/dist/{app → sdk/src/app}/app-validator.js +15 -15
- package/dist/{app → sdk/src/app}/interfaces/contributions/contributions-json.interface.d.ts +20 -0
- package/dist/{app → sdk/src/app}/interfaces/contributions/page-menu.interface.d.ts +1 -0
- package/dist/{cli → sdk/src/cli}/config.js +1 -1
- package/dist/{utils → sdk/src/utils}/test-helper.d.ts +1 -0
- package/dist/{utils → sdk/src/utils}/test-helper.js +10 -0
- package/dist/{webpack-app-config.js → sdk/src/webpack-app-config.js} +15 -12
- package/package.json +3 -3
- package/resources/new-app/typescript/src/index.ts +3 -3
- /package/dist/{action-target.d.ts → core/src/types/plugins/action/action-target.d.ts} +0 -0
- /package/dist/{action-target.js → core/src/types/plugins/action/action-target.js} +0 -0
- /package/dist/{page-types.d.ts → core/src/types/plugins/common/enums/page-types.d.ts} +0 -0
- /package/dist/{page-types.js → core/src/types/plugins/common/enums/page-types.js} +0 -0
- /package/dist/{app → sdk/src/app}/app-persist.d.ts +0 -0
- /package/dist/{app → sdk/src/app}/app-persist.js +0 -0
- /package/dist/{app → sdk/src/app}/app-validator.d.ts +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/app-json.interface.d.ts +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/app-json.interface.js +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/app-type.enum.d.ts +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/app-type.enum.js +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/contributions/contributions-json.interface.js +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/contributions/main-menu.interface.d.ts +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/contributions/main-menu.interface.js +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/contributions/menu-item.interface.d.ts +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/contributions/menu-item.interface.js +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/contributions/page-menu-item.interface.d.ts +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/contributions/page-menu-item.interface.js +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/contributions/page-menu.interface.js +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/package-json.interface.d.ts +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/package-json.interface.js +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/webpack-config.interface.d.ts +0 -0
- /package/dist/{app → sdk/src/app}/interfaces/webpack-config.interface.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/build.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/build.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/clean.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/clean.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/debug.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/debug.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/e2e-test.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/e2e-test.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/new.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/new.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/package.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/package.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/post-process.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/post-process.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/scaffold.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/scaffold.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/unit-test.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/unit-test.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/validate.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/validate.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/version.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/version.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/watch.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/app/watch.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/scifeon/download.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/scifeon/download.js +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/scifeon/run.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/commands/scifeon/run.js +0 -0
- /package/dist/{cli → sdk/src/cli}/config.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/index.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/index.js +0 -0
- /package/dist/{cli → sdk/src/cli}/webpack-runner.d.ts +0 -0
- /package/dist/{cli → sdk/src/cli}/webpack-runner.js +0 -0
- /package/dist/{download-utils.d.ts → sdk/src/download-utils.d.ts} +0 -0
- /package/dist/{download-utils.js → sdk/src/download-utils.js} +0 -0
- /package/dist/{file-utils.d.ts → sdk/src/file-utils.d.ts} +0 -0
- /package/dist/{file-utils.js → sdk/src/file-utils.js} +0 -0
- /package/dist/{html-report.d.ts → sdk/src/html-report.d.ts} +0 -0
- /package/dist/{html-report.js → sdk/src/html-report.js} +0 -0
- /package/dist/{index.d.ts → sdk/src/index.d.ts} +0 -0
- /package/dist/{index.js → sdk/src/index.js} +0 -0
- /package/dist/{logger.d.ts → sdk/src/logger.d.ts} +0 -0
- /package/dist/{logger.js → sdk/src/logger.js} +0 -0
- /package/dist/{measurement-units.d.ts → sdk/src/measurement-units.d.ts} +0 -0
- /package/dist/{measurement-units.js → sdk/src/measurement-units.js} +0 -0
- /package/dist/{unit-test-runner.d.ts → sdk/src/unit-test-runner.d.ts} +0 -0
- /package/dist/{unit-test-runner.js → sdk/src/unit-test-runner.js} +0 -0
- /package/dist/{webpack-app-config.d.ts → sdk/src/webpack-app-config.d.ts} +0 -0
- /package/dist/{webpack-utils.d.ts → sdk/src/webpack-utils.d.ts} +0 -0
- /package/dist/{webpack-utils.js → sdk/src/webpack-utils.js} +0 -0
|
@@ -15,7 +15,6 @@ export declare enum PLUGIN_TYPE {
|
|
|
15
15
|
REQUEST_PANEL = "request.panel",
|
|
16
16
|
FIELD_TEMPLATE = "field_template",
|
|
17
17
|
FIELD_GROUP_TEMPLATE = "field_group_template",
|
|
18
|
-
SPREADSHEET_FUNCTION = "spreadsheet_function",
|
|
19
18
|
POST_UPLOAD_REDIRECT = "PostUploadRedirect",
|
|
20
19
|
ASSAY_DEFINITION = "AssayDefinition",
|
|
21
20
|
LINKS_DETAIL = "DetailLink",
|
|
@@ -40,8 +39,14 @@ export declare enum PLUGIN_TYPE {
|
|
|
40
39
|
ELN_BATCH_RECIPE_COLUMN = "eln.batch_recipe.column",
|
|
41
40
|
APPROVAL_STRATEGY = "approval.strategy",
|
|
42
41
|
FORM_VARIABLE_INJECTION = "form.variable_injection",
|
|
42
|
+
CUSTOM_FUNCTION = "custom_function",
|
|
43
43
|
PRE_PROCESS_SAVE_ENTITY = "pre_process_save_entity",
|
|
44
44
|
ADMINISTRATION_SETTINGS = "administration.settings",
|
|
45
45
|
ADMINISTRATION_SETTINGS_SECURITY = "administration.settings.security",
|
|
46
|
-
ADMINISTRATION_SETTINGS_ELN = "administration.settings.eln"
|
|
46
|
+
ADMINISTRATION_SETTINGS_ELN = "administration.settings.eln",
|
|
47
|
+
REPORT_DATA = "report.data",
|
|
48
|
+
REPORT_BLOCK = "report.block",
|
|
49
|
+
REPORT_BLOCK_CONFIG = "report.block.config",
|
|
50
|
+
UPDATE_SET = "update_set",
|
|
51
|
+
DATA_STEP = "data_step"
|
|
47
52
|
}
|
|
@@ -19,7 +19,6 @@ var PLUGIN_TYPE;
|
|
|
19
19
|
PLUGIN_TYPE["REQUEST_PANEL"] = "request.panel";
|
|
20
20
|
PLUGIN_TYPE["FIELD_TEMPLATE"] = "field_template";
|
|
21
21
|
PLUGIN_TYPE["FIELD_GROUP_TEMPLATE"] = "field_group_template";
|
|
22
|
-
PLUGIN_TYPE["SPREADSHEET_FUNCTION"] = "spreadsheet_function";
|
|
23
22
|
PLUGIN_TYPE["POST_UPLOAD_REDIRECT"] = "PostUploadRedirect";
|
|
24
23
|
PLUGIN_TYPE["ASSAY_DEFINITION"] = "AssayDefinition";
|
|
25
24
|
PLUGIN_TYPE["LINKS_DETAIL"] = "DetailLink";
|
|
@@ -44,8 +43,14 @@ var PLUGIN_TYPE;
|
|
|
44
43
|
PLUGIN_TYPE["ELN_BATCH_RECIPE_COLUMN"] = "eln.batch_recipe.column";
|
|
45
44
|
PLUGIN_TYPE["APPROVAL_STRATEGY"] = "approval.strategy";
|
|
46
45
|
PLUGIN_TYPE["FORM_VARIABLE_INJECTION"] = "form.variable_injection";
|
|
46
|
+
PLUGIN_TYPE["CUSTOM_FUNCTION"] = "custom_function";
|
|
47
47
|
PLUGIN_TYPE["PRE_PROCESS_SAVE_ENTITY"] = "pre_process_save_entity";
|
|
48
48
|
PLUGIN_TYPE["ADMINISTRATION_SETTINGS"] = "administration.settings";
|
|
49
49
|
PLUGIN_TYPE["ADMINISTRATION_SETTINGS_SECURITY"] = "administration.settings.security";
|
|
50
50
|
PLUGIN_TYPE["ADMINISTRATION_SETTINGS_ELN"] = "administration.settings.eln";
|
|
51
|
+
PLUGIN_TYPE["REPORT_DATA"] = "report.data";
|
|
52
|
+
PLUGIN_TYPE["REPORT_BLOCK"] = "report.block";
|
|
53
|
+
PLUGIN_TYPE["REPORT_BLOCK_CONFIG"] = "report.block.config";
|
|
54
|
+
PLUGIN_TYPE["UPDATE_SET"] = "update_set";
|
|
55
|
+
PLUGIN_TYPE["DATA_STEP"] = "data_step";
|
|
51
56
|
})(PLUGIN_TYPE = exports.PLUGIN_TYPE || (exports.PLUGIN_TYPE = {}));
|
|
@@ -4,10 +4,10 @@ exports.AppGenerator = void 0;
|
|
|
4
4
|
const fs = require("fs");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const ts = require("typescript");
|
|
7
|
-
const action_target_1 = require("
|
|
7
|
+
const action_target_1 = require("../../../core/src/types/plugins/action/action-target");
|
|
8
|
+
const page_types_1 = require("../../../core/src/types/plugins/common/enums/page-types");
|
|
9
|
+
const plugin_types_1 = require("../../../core/src/types/plugins/common/enums/plugin-types");
|
|
8
10
|
const file_utils_1 = require("../file-utils");
|
|
9
|
-
const page_types_1 = require("../page-types");
|
|
10
|
-
const plugin_types_1 = require("../plugin-types");
|
|
11
11
|
const app_persist_1 = require("./app-persist");
|
|
12
12
|
const app_validator_1 = require("./app-validator");
|
|
13
13
|
class AppGenerator {
|
|
@@ -209,6 +209,18 @@ class AppGenerator {
|
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
+
generateChunk(src) {
|
|
213
|
+
let chunk = src;
|
|
214
|
+
const dirs = src.split("/");
|
|
215
|
+
chunk = dirs[0];
|
|
216
|
+
if (chunk === "src") {
|
|
217
|
+
chunk = dirs[1];
|
|
218
|
+
if (chunk === "pages" || chunk === "plugins") {
|
|
219
|
+
chunk = dirs[2] || chunk;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return chunk;
|
|
223
|
+
}
|
|
212
224
|
addRouteDecorators() {
|
|
213
225
|
const routeRegex = /@scifeonRoute\s*\(\s*(\{[^]*?\})\s*\)/i;
|
|
214
226
|
for (const file of this.tsFiles) {
|
|
@@ -221,17 +233,16 @@ class AppGenerator {
|
|
|
221
233
|
src: file.src,
|
|
222
234
|
route: Array.isArray(routeObject.route) ? routeObject.route : [routeObject.route],
|
|
223
235
|
title: routeObject.title,
|
|
224
|
-
roles: routeObject.roles,
|
|
236
|
+
roles: routeObject.roles || [],
|
|
237
|
+
permissions: routeObject.permissions || [],
|
|
225
238
|
chunk: routeObject.chunk,
|
|
226
239
|
type: routeObject.type,
|
|
227
240
|
};
|
|
228
241
|
if (route.type === page_types_1.PAGE_TYPE.DATA_ADMINISTRATION) {
|
|
229
|
-
route.roles = route.roles || [];
|
|
230
242
|
route.roles.push("admin");
|
|
231
243
|
route.roles.push("datamanager");
|
|
232
244
|
}
|
|
233
245
|
else if (route.type === page_types_1.PAGE_TYPE.ADMINISTRATION) {
|
|
234
|
-
route.roles = route.roles || [];
|
|
235
246
|
route.roles.push("admin");
|
|
236
247
|
}
|
|
237
248
|
this.contributionsJson.routes.push(route);
|
|
@@ -16,6 +16,8 @@ class AppValidator {
|
|
|
16
16
|
"files",
|
|
17
17
|
"previewFeatures",
|
|
18
18
|
"scheduledNotifications",
|
|
19
|
+
"permissions",
|
|
20
|
+
"modules",
|
|
19
21
|
];
|
|
20
22
|
}
|
|
21
23
|
validatePackageJson(packageJson) {
|
|
@@ -117,21 +119,19 @@ class AppValidator {
|
|
|
117
119
|
}
|
|
118
120
|
}
|
|
119
121
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
if (requiredKeys.some(rk => !keys.includes(rk))) {
|
|
134
|
-
throw new Error(`Error in contributions.json: '${requiredKeys.join("' or '")}' missing in scheduledNotifications: ${JSON.stringify(scheduledNotification)}`);
|
|
122
|
+
const requiredKeysMap = {
|
|
123
|
+
scheduledNotifications: ["schedule", "query", "emailTemplate", "emailSubject"],
|
|
124
|
+
permissions: ["id", "title", "group", "description"],
|
|
125
|
+
modules: ["id", "title", "description"],
|
|
126
|
+
previewFeatures: ["id", "name", "description", "expireDate"],
|
|
127
|
+
};
|
|
128
|
+
for (const [section, requiredKeys] of Object.entries(requiredKeysMap)) {
|
|
129
|
+
if (contributionsJson[section]) {
|
|
130
|
+
for (const item of contributionsJson[section]) {
|
|
131
|
+
const keys = Object.keys(item);
|
|
132
|
+
if (requiredKeys.some(rk => !keys.includes(rk))) {
|
|
133
|
+
throw new Error(`Error in contributions.json: '${requiredKeys.join("' or '")}' missing in ${section}: ${JSON.stringify(item)}`);
|
|
134
|
+
}
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
}
|
|
@@ -8,6 +8,23 @@ export interface IContributionsJson {
|
|
|
8
8
|
userRoles?: {
|
|
9
9
|
[roleName: string]: string;
|
|
10
10
|
};
|
|
11
|
+
permissions?: [
|
|
12
|
+
{
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
group: string;
|
|
16
|
+
description: string;
|
|
17
|
+
upsertEClass?: string;
|
|
18
|
+
upsertType?: string;
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
modules?: [
|
|
22
|
+
{
|
|
23
|
+
id: string;
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
}
|
|
27
|
+
];
|
|
11
28
|
scheduledNotifications?: {
|
|
12
29
|
description?: string;
|
|
13
30
|
schedule: "daily";
|
|
@@ -33,6 +50,9 @@ export interface IContributionsJson {
|
|
|
33
50
|
accessScope: "All" | "Department" | "Project" | "Admin" | "User";
|
|
34
51
|
fields?: string;
|
|
35
52
|
dbms?: ("sqlserver" | "sqlite")[];
|
|
53
|
+
useRecompileOption?: boolean;
|
|
54
|
+
isMaterialized?: boolean;
|
|
55
|
+
dependencies?: string[];
|
|
36
56
|
}[];
|
|
37
57
|
datamodel: string;
|
|
38
58
|
sequences: {
|
|
@@ -19,5 +19,5 @@ exports.config = {
|
|
|
19
19
|
path.resolve(__dirname, "..", "..", "..", "..", "..", "node_modules"),
|
|
20
20
|
].map(x => path.resolve(x)),
|
|
21
21
|
wwwDir: path.resolve("runtime", "scifeon", "wwwroot", "dist"),
|
|
22
|
-
manifests: ["vendor", "scifeon-core", "scifeon-
|
|
22
|
+
manifests: ["vendor", "scifeon-core", "scifeon-ui", "scifeon-eln", "scifeon-insights", "scifeon-approval"].reverse(),
|
|
23
23
|
};
|
|
@@ -42,5 +42,15 @@ class TestHelper {
|
|
|
42
42
|
return xlsx.read(fs.readFileSync(filename), options);
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
+
static csvToXLSX(csv, options = { cellDates: true }) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const xlsx = yield TestHelper.XLSX();
|
|
48
|
+
const wb = xlsx.utils.book_new();
|
|
49
|
+
wb.SheetNames.push("Sheet1");
|
|
50
|
+
const ws = xlsx.utils.aoa_to_sheet(csv, Object.assign({}, options));
|
|
51
|
+
wb.Sheets.Sheet1 = ws;
|
|
52
|
+
return wb;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
45
55
|
}
|
|
46
56
|
exports.TestHelper = TestHelper;
|
|
@@ -31,7 +31,7 @@ function webpackAppConfig(env, config, appType = "sdk") {
|
|
|
31
31
|
let plugins = [];
|
|
32
32
|
if (appType !== "sdk") {
|
|
33
33
|
plugins = config.manifests.reverse().map(p => new webpack.DllReferencePlugin({
|
|
34
|
-
manifest: require(path.resolve(config.manifestDir, "packages", p
|
|
34
|
+
manifest: require(path.resolve(config.manifestDir, "packages", `${p}.bundle.manifest.json`)),
|
|
35
35
|
}));
|
|
36
36
|
plugins.push(new webpack.DllReferencePlugin({ manifest: require(path.resolve(config.manifestDir, "vendor", "vendor.bundle.manifest.json")) }));
|
|
37
37
|
}
|
|
@@ -77,15 +77,15 @@ function webpackAppConfig(env, config, appType = "sdk") {
|
|
|
77
77
|
plugins = plugins.concat([
|
|
78
78
|
new PostCompile(() => {
|
|
79
79
|
const packageDir = config.packageDir || config.outputDir;
|
|
80
|
-
const filename = path.resolve(packageDir, app.namespace
|
|
80
|
+
const filename = path.resolve(packageDir, `${app.namespace}.${app.name}.zip`);
|
|
81
81
|
logger_1.LOGGER.msg(`Packaging into ${filename}...`);
|
|
82
82
|
const zip = new AdmZip();
|
|
83
|
-
zip.addLocalFolder(path.resolve(config.outputDir, app.namespace, app.name), app.namespace
|
|
83
|
+
zip.addLocalFolder(path.resolve(config.outputDir, app.namespace, app.name), `${app.namespace}/${app.name}`);
|
|
84
84
|
zip.writeZip(filename);
|
|
85
85
|
}),
|
|
86
86
|
]);
|
|
87
87
|
}
|
|
88
|
-
const publicPath = webpack_utils_1.WebpackUtils.getPublicPath(config.publicPath + app.namespace
|
|
88
|
+
const publicPath = webpack_utils_1.WebpackUtils.getPublicPath(`${config.publicPath + app.namespace}/${app.name}/`, "apps", `${app.namespace}/${app.name}/bundles`);
|
|
89
89
|
entry = {
|
|
90
90
|
app: [path.resolve(config.tempDir, "gen-app.js")],
|
|
91
91
|
};
|
|
@@ -93,7 +93,7 @@ function webpackAppConfig(env, config, appType = "sdk") {
|
|
|
93
93
|
path: path.resolve(config.outputDir, app.namespace, app.name, "bundles"),
|
|
94
94
|
publicPath,
|
|
95
95
|
filename: "app.js",
|
|
96
|
-
library: app.namespace.replace(/\./g, "_")
|
|
96
|
+
library: `${app.namespace.replace(/\./g, "_")}_${app.name}`,
|
|
97
97
|
libraryTarget: "jsonp",
|
|
98
98
|
chunkFilename: WATCH || DEBUG ? "[id].js" : "[id].[contenthash].js",
|
|
99
99
|
devtoolModuleFilenameTemplate: "webpack:///[resource-path]?[loaders]",
|
|
@@ -111,10 +111,13 @@ function webpackAppConfig(env, config, appType = "sdk") {
|
|
|
111
111
|
optimization: {
|
|
112
112
|
minimizer: DEBUG || SDK ? [] : [new TerserJSPlugin({
|
|
113
113
|
terserOptions: {
|
|
114
|
-
ecma:
|
|
114
|
+
ecma: 8,
|
|
115
115
|
compress: {
|
|
116
116
|
pure_funcs: ["console.info", "console.debug", "console.warn", "console.log"],
|
|
117
117
|
},
|
|
118
|
+
parse: {
|
|
119
|
+
ecma: 8,
|
|
120
|
+
},
|
|
118
121
|
},
|
|
119
122
|
parallel: true,
|
|
120
123
|
cache: true,
|
|
@@ -187,12 +190,12 @@ function webpackAppConfig(env, config, appType = "sdk") {
|
|
|
187
190
|
};
|
|
188
191
|
}
|
|
189
192
|
catch (err) {
|
|
190
|
-
logger_1.LOGGER.error(
|
|
193
|
+
logger_1.LOGGER.error(`ERROR: ${err.message}`);
|
|
191
194
|
logger_1.LOGGER.error(err.stack + err.stacktrace);
|
|
192
195
|
logger_1.LOGGER.error("An error occurred when creating Webpack config with this input:");
|
|
193
|
-
logger_1.LOGGER.error(
|
|
194
|
-
logger_1.LOGGER.error(
|
|
195
|
-
logger_1.LOGGER.error(
|
|
196
|
+
logger_1.LOGGER.error(`CONFIG: ${JSON.stringify(config, null, 2)}`);
|
|
197
|
+
logger_1.LOGGER.error(`ENV: ${JSON.stringify(env, null, 2)}`);
|
|
198
|
+
logger_1.LOGGER.error(`APP_TYPE: ${appType}`);
|
|
196
199
|
return null;
|
|
197
200
|
}
|
|
198
201
|
}
|
|
@@ -208,7 +211,7 @@ function getReplaceModulesPlugins(dist, libs) {
|
|
|
208
211
|
scope: lib.replace("-", "_"),
|
|
209
212
|
name: `@${lib.replace("-", "/")}`,
|
|
210
213
|
path: `${lib.replace("-", "_")}/packages/${lib.replace("scifeon-", "")}/index.ts`,
|
|
211
|
-
manifest: JSON.parse(fs.readFileSync(path.resolve(dist, "packages", lib
|
|
214
|
+
manifest: JSON.parse(fs.readFileSync(path.resolve(dist, "packages", `${lib}.bundle.manifest.json`)).toString()),
|
|
212
215
|
});
|
|
213
216
|
}
|
|
214
217
|
let plugins = [new webpack.NormalModuleReplacementPlugin(/.*/, function (resource) {
|
|
@@ -226,7 +229,7 @@ function getReplaceModulesPlugins(dist, libs) {
|
|
|
226
229
|
const match = Object.keys(manifestContent).find(m => m.includes(`/${request}/`)
|
|
227
230
|
|| m.includes(`${request}.js`)
|
|
228
231
|
|| m.includes(`${request}.ts`));
|
|
229
|
-
return match ? match.replace("./", prefix
|
|
232
|
+
return match ? match.replace("./", `${prefix}/`) : null;
|
|
230
233
|
};
|
|
231
234
|
const match = replaceMatch(vendor.manifest.content, dep.request, vendor.scope);
|
|
232
235
|
if (match) {
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scifeon/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.114.0",
|
|
4
4
|
"description": "A tool for developing Apps for Scifeon.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Scifeon",
|
|
7
7
|
"email": "support@scifeon.com"
|
|
8
8
|
},
|
|
9
|
-
"main": "dist/cli/index.js",
|
|
9
|
+
"main": "dist/sdk/src/cli/index.js",
|
|
10
10
|
"bin": {
|
|
11
|
-
"scifeon-cli": "dist/index.js"
|
|
11
|
+
"scifeon-cli": "dist/sdk/src/index.js"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"bin",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ConsoleLogger, ServerAPI } from "@scifeon/core";
|
|
2
|
-
import { scifeonRoute } from "@scifeon/plugins";
|
|
1
|
+
import { ConsoleLogger, ServerAPI, scifeonRoute } from "@scifeon/core";
|
|
3
2
|
import { autoinject } from "aurelia-framework";
|
|
4
3
|
|
|
5
4
|
@autoinject
|
|
@@ -19,9 +18,10 @@ export class Index {
|
|
|
19
18
|
|
|
20
19
|
public async button() {
|
|
21
20
|
const response = await this.server.get("/api/user");
|
|
21
|
+
|
|
22
22
|
if (response.ok) {
|
|
23
23
|
const user = await response.json();
|
|
24
|
-
alert(
|
|
24
|
+
alert(`Current user: ${user.id}`);
|
|
25
25
|
} else {
|
|
26
26
|
alert("Button clicked!");
|
|
27
27
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|