Skip to content

Commit 9f1d7f8

Browse files
committed
fix: prettier reformat
1 parent 8fd52c5 commit 9f1d7f8

File tree

5 files changed

+24
-20
lines changed

5 files changed

+24
-20
lines changed

src/application.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@ export class Application extends NamedDefaultableInMemoryEntity {
9797
get executables() {
9898
const tree = getAppTree(this.prop("name"));
9999
return Object.keys(tree).map((key) => {
100-
return new this.constructor.Executable(
101-
{ ...tree[key], name: key },
102-
);
100+
return new this.constructor.Executable({ ...tree[key], name: key });
103101
});
104102
}
105103

src/flavor.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import { mix } from "mixwith";
44
import { Template } from "./template";
55

66
export class Flavor extends mix(NamedDefaultableInMemoryEntity).with(RuntimeItemsMixin) {
7-
get input() { return this.prop("input", []); }
7+
get input() {
8+
return this.prop("input", []);
9+
}
810

911
// TODO : prevent this from running in client
1012
get inputAsTemplates() {

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import {
2-
allApplications, allowedMonitors, allowedResults, allTemplates,
2+
allApplications,
3+
allowedMonitors,
4+
allowedResults,
5+
allTemplates,
36
} from "@exabyte-io/application-flavors.js";
47

58
import { Application } from "./application";

src/template.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ export class Template extends NamedInMemoryEntity {
5656

5757
render(externalContext) {
5858
const renderingContext = this.getRenderingContext(externalContext);
59-
let template,
60-
rendered;
59+
let template, rendered;
6160
if (!this.isManuallyChanged) {
6261
try {
6362
template = jinja.compile(this.content);
@@ -85,9 +84,10 @@ export class Template extends NamedInMemoryEntity {
8584

8685
static fromFlavor(appName, execName, inputName) {
8786
const filtered = allTemplates.filter(
88-
(temp) => temp.applicationName === appName
89-
&& temp.executableName === execName
90-
&& temp.name === inputName,
87+
(temp) =>
88+
temp.applicationName === appName &&
89+
temp.executableName === execName &&
90+
temp.name === inputName,
9191
);
9292
if (filtered.length !== 1) {
9393
console.log(
@@ -105,8 +105,8 @@ export class Template extends NamedInMemoryEntity {
105105
getContextProvidersAsClassInstances(providerContext) {
106106
const me = this;
107107
return this.contextProviders.map((p) => {
108-
const { constructor, config } = me.constructor.providerRegistry
109-
.findProviderInstanceByName(p.name);
108+
const { constructor, config } =
109+
me.constructor.providerRegistry.findProviderInstanceByName(p.name);
110110
const clsInstance = new constructor({
111111
...config,
112112
context: providerContext,

src/tree.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ export function getAllApplications(cls = null) {
1212
const applicationsArray = [];
1313
allApplications.forEach((appName) => {
1414
applicationsTree[appName] = {};
15-
const {
16-
versions, defaultVersion, build = "Default", ...appData
17-
} = getAppData(appName);
15+
const { versions, defaultVersion, build = "Default", ...appData } = getAppData(appName);
1816
applicationsTree[appName].defaultVersion = defaultVersion;
1917
versions.forEach((options) => {
2018
const { version } = options;
@@ -40,9 +38,7 @@ export function getAllApplications(cls = null) {
4038
* @param build {String} the build to use (optional, defaults to Default)
4139
* @return {*} an application
4240
*/
43-
export function getApplication({
44-
applicationsTree, name, version = null, build = "Default",
45-
}) {
41+
export function getApplication({ applicationsTree, name, version = null, build = "Default" }) {
4642
const app = applicationsTree[name];
4743
// eslint-disable-next-line no-param-reassign
4844
if (!version) version = app.defaultVersion;
@@ -60,7 +56,10 @@ const { applicationsTree } = getAllApplications(null);
6056
*/
6157
export function getApplicationConfig({ name, version = null, build = "Default" }) {
6258
return getApplication({
63-
applicationsTree, name, version, build,
59+
applicationsTree,
60+
name,
61+
version,
62+
build,
6463
});
6564
}
6665

@@ -72,7 +71,9 @@ export function getApplicationConfig({ name, version = null, build = "Default" }
7271
*/
7372
export function getExecutableConfig({ appName, execName }) {
7473
const appTree = getAppTree(appName);
75-
Object.entries(appTree).forEach(([name, exec]) => { exec.name = name; });
74+
Object.entries(appTree).forEach(([name, exec]) => {
75+
exec.name = name;
76+
});
7677
if (!execName) return getOneMatchFromObject(appTree, "isDefault", true);
7778
return appTree[execName];
7879
}

0 commit comments

Comments
 (0)