@scifeon/sdk 0.117.0 → 0.118.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.
@@ -73,7 +73,7 @@ class AppGenerator {
73
73
  this.packageJson.scifeon.runtimeVersion = version;
74
74
  }
75
75
  }
76
- const cliPackageJsonPath = path.resolve(__dirname, "..", "..", "package.json");
76
+ const cliPackageJsonPath = path.resolve(__dirname, "..", "..", "..", "..", "package.json");
77
77
  const cliPackageJson = require(cliPackageJsonPath);
78
78
  this.packageJson.scifeon.cliVersion = cliPackageJson.version;
79
79
  }
@@ -63,7 +63,7 @@ class NewCommand {
63
63
  return;
64
64
  }
65
65
  if (fs.existsSync(packageJson.name)) {
66
- throw new Error("A folder with the name '" + packageJson.name + "' already exists.");
66
+ throw new Error(`A folder with the name '${packageJson.name}' already exists.`);
67
67
  }
68
68
  fs.mkdirSync(packageJson.name);
69
69
  packageJson.version = "0.0.1";
@@ -71,13 +71,13 @@ class NewCommand {
71
71
  if (!packageJson.displayName) {
72
72
  packageJson.name = packageJson.displayName;
73
73
  }
74
- const cliPackageJson = require(path.resolve(__dirname, "..", "..", "..", "..", "package.json"));
74
+ const cliPackageJson = require(path.resolve(__dirname, "..", "..", "..", "..", "..", "..", "package.json"));
75
75
  packageJson.scifeon.cliVersion = cliPackageJson.version;
76
76
  packageJson.dependencies = {
77
77
  "aurelia-bootstrapper": cliPackageJson.dependencies["aurelia-bootstrapper"],
78
78
  };
79
79
  packageJson.devDependencies = {
80
- "@scifeon/sdk": "^" + packageJson.scifeon.cliVersion,
80
+ "@scifeon/sdk": `^${packageJson.scifeon.cliVersion}`,
81
81
  "tslib": cliPackageJson.dependencies.tslib,
82
82
  };
83
83
  if (packageJson.e2e.trim() === "yes") {
@@ -90,8 +90,8 @@ class NewCommand {
90
90
  const contributionsJson = {
91
91
  menu: {
92
92
  main: [{
93
- text: "Custom Page: " + packageJson.namespace + "." + packageJson.name,
94
- route: "app/" + packageJson.namespace + "/" + packageJson.name,
93
+ text: `Custom Page: ${packageJson.namespace}.${packageJson.name}`,
94
+ route: `app/${packageJson.namespace}/${packageJson.name}`,
95
95
  }],
96
96
  },
97
97
  };
@@ -107,9 +107,9 @@ class NewCommand {
107
107
  logger_1.LOGGER.msg("Installing node_modules...");
108
108
  const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm";
109
109
  const proc = (0, child_process_1.spawn)(npmCmd, ["install --silent --prefer-offline --no-audit"], { cwd: path.resolve(packageJson.name) });
110
- proc.stderr.on("data", (data) => console.log(data.toString()));
111
- proc.stdout.on("data", (data) => console.log(data.toString()));
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."));
110
+ proc.stderr.on("data", data => console.log(data.toString()));
111
+ proc.stdout.on("data", data => console.log(data.toString()));
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.`));
113
113
  });
114
114
  }
115
115
  copyResources(packageJson) {
@@ -120,46 +120,46 @@ class NewCommand {
120
120
  });
121
121
  if (packageJson.editor.toLowerCase().trim() === "vscode") {
122
122
  resources.push({
123
- from: "editor" + path.sep + ".vscode" + path.sep + "launch.json",
123
+ from: `editor${path.sep}.vscode${path.sep}launch.json`,
124
124
  to: "launch.json",
125
125
  toFolder: ".vscode",
126
126
  });
127
127
  }
128
128
  delete packageJson.editor;
129
129
  resources.push({
130
- from: "typescript" + path.sep + "tsconfig.json",
130
+ from: `typescript${path.sep}tsconfig.json`,
131
131
  to: "tsconfig.json",
132
132
  });
133
133
  resources.push({
134
- from: "typescript" + path.sep + "src" + path.sep + "index.ts",
134
+ from: `typescript${path.sep}src${path.sep}index.ts`,
135
135
  to: "index.ts",
136
- toFolder: "src" + path.sep + "pages",
136
+ toFolder: `src${path.sep}pages`,
137
137
  });
138
138
  resources.push({
139
- from: "typescript" + path.sep + "src" + path.sep + "index.html",
139
+ from: `typescript${path.sep}src${path.sep}index.html`,
140
140
  to: "index.html",
141
- toFolder: "src" + path.sep + "pages",
141
+ toFolder: `src${path.sep}pages`,
142
142
  });
143
143
  if (packageJson.unit.trim() === "yes") {
144
144
  resources.push({
145
- from: "typescript" + path.sep + "test" + path.sep + "unit" + path.sep + "index.test.ts",
145
+ from: `typescript${path.sep}test${path.sep}unit${path.sep}index.test.ts`,
146
146
  to: "index.test.ts",
147
- toFolder: "test" + path.sep + "unit",
147
+ toFolder: `test${path.sep}unit`,
148
148
  });
149
149
  }
150
150
  if (packageJson.e2e.trim() === "yes") {
151
151
  resources.push({
152
- from: "typescript" + path.sep + "test" + path.sep + "e2e" + path.sep + "frontpage.test.ts",
152
+ from: `typescript${path.sep}test${path.sep}e2e${path.sep}frontpage.test.ts`,
153
153
  to: "frontpage.test.ts",
154
- toFolder: "test" + path.sep + "e2e",
154
+ toFolder: `test${path.sep}e2e`,
155
155
  });
156
156
  resources.push({
157
- from: "typescript" + path.sep + "test" + path.sep + "e2e-config.ts",
157
+ from: `typescript${path.sep}test${path.sep}e2e-config.ts`,
158
158
  to: "e2e-config.ts",
159
159
  toFolder: "test",
160
160
  });
161
161
  resources.push({
162
- from: "typescript" + path.sep + "test" + path.sep + "e2e-key.config",
162
+ from: `typescript${path.sep}test${path.sep}e2e-key.config`,
163
163
  to: "e2e-key.config",
164
164
  toFolder: "test",
165
165
  });
@@ -181,7 +181,7 @@ class NewCommand {
181
181
  if (from.endsWith("index.ts")) {
182
182
  content = content.replace("{NAMESPACE}", packageJson.namespace)
183
183
  .replace("{NAME}", packageJson.name)
184
- .replace("{PAGE_NAME}", packageJson.namespace + "." + packageJson.name);
184
+ .replace("{PAGE_NAME}", `${packageJson.namespace}.${packageJson.name}`);
185
185
  }
186
186
  fs.writeFileSync(path.resolve(packageJson.name, toFolder, to), content);
187
187
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scifeon/sdk",
3
- "version": "0.117.0",
3
+ "version": "0.118.0",
4
4
  "description": "A tool for developing Apps for Scifeon.",
5
5
  "author": {
6
6
  "name": "Scifeon",