mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
refactor: use tabs instead of spaces
This commit is contained in:
@@ -25,23 +25,23 @@ const APP_ROOT = new URL('../', import.meta.url);
|
||||
* application.
|
||||
*/
|
||||
const IMPORTER = (filePath: string) => {
|
||||
if (filePath.startsWith('./') || filePath.startsWith('../')) {
|
||||
return import(new URL(filePath, APP_ROOT).href);
|
||||
}
|
||||
return import(filePath);
|
||||
if (filePath.startsWith('./') || filePath.startsWith('../')) {
|
||||
return import(new URL(filePath, APP_ROOT).href);
|
||||
}
|
||||
return import(filePath);
|
||||
};
|
||||
|
||||
new Ignitor(APP_ROOT, { importer: IMPORTER })
|
||||
.tap((app) => {
|
||||
app.booting(async () => {
|
||||
await import('#start/env');
|
||||
});
|
||||
app.listen('SIGTERM', () => app.terminate());
|
||||
app.listenIf(app.managedByPm2, 'SIGINT', () => app.terminate());
|
||||
})
|
||||
.ace()
|
||||
.handle(process.argv.splice(2))
|
||||
.catch((error) => {
|
||||
process.exitCode = 1;
|
||||
prettyPrintError(error);
|
||||
});
|
||||
.tap((app) => {
|
||||
app.booting(async () => {
|
||||
await import('#start/env');
|
||||
});
|
||||
app.listen('SIGTERM', () => app.terminate());
|
||||
app.listenIf(app.managedByPm2, 'SIGINT', () => app.terminate());
|
||||
})
|
||||
.ace()
|
||||
.handle(process.argv.splice(2))
|
||||
.catch((error) => {
|
||||
process.exitCode = 1;
|
||||
prettyPrintError(error);
|
||||
});
|
||||
|
||||
@@ -23,23 +23,23 @@ const APP_ROOT = new URL('../', import.meta.url);
|
||||
* application.
|
||||
*/
|
||||
const IMPORTER = (filePath: string) => {
|
||||
if (filePath.startsWith('./') || filePath.startsWith('../')) {
|
||||
return import(new URL(filePath, APP_ROOT).href);
|
||||
}
|
||||
return import(filePath);
|
||||
if (filePath.startsWith('./') || filePath.startsWith('../')) {
|
||||
return import(new URL(filePath, APP_ROOT).href);
|
||||
}
|
||||
return import(filePath);
|
||||
};
|
||||
|
||||
new Ignitor(APP_ROOT, { importer: IMPORTER })
|
||||
.tap((app) => {
|
||||
app.booting(async () => {
|
||||
await import('#start/env');
|
||||
});
|
||||
app.listen('SIGTERM', () => app.terminate());
|
||||
app.listenIf(app.managedByPm2, 'SIGINT', () => app.terminate());
|
||||
})
|
||||
.httpServer()
|
||||
.start()
|
||||
.catch((error) => {
|
||||
process.exitCode = 1;
|
||||
prettyPrintError(error);
|
||||
});
|
||||
.tap((app) => {
|
||||
app.booting(async () => {
|
||||
await import('#start/env');
|
||||
});
|
||||
app.listen('SIGTERM', () => app.terminate());
|
||||
app.listenIf(app.managedByPm2, 'SIGINT', () => app.terminate());
|
||||
})
|
||||
.httpServer()
|
||||
.start()
|
||||
.catch((error) => {
|
||||
process.exitCode = 1;
|
||||
prettyPrintError(error);
|
||||
});
|
||||
|
||||
58
bin/test.ts
58
bin/test.ts
@@ -27,36 +27,36 @@ const APP_ROOT = new URL('../', import.meta.url);
|
||||
* application.
|
||||
*/
|
||||
const IMPORTER = (filePath: string) => {
|
||||
if (filePath.startsWith('./') || filePath.startsWith('../')) {
|
||||
return import(new URL(filePath, APP_ROOT).href);
|
||||
}
|
||||
return import(filePath);
|
||||
if (filePath.startsWith('./') || filePath.startsWith('../')) {
|
||||
return import(new URL(filePath, APP_ROOT).href);
|
||||
}
|
||||
return import(filePath);
|
||||
};
|
||||
|
||||
new Ignitor(APP_ROOT, { importer: IMPORTER })
|
||||
.tap((app) => {
|
||||
app.booting(async () => {
|
||||
await import('#start/env');
|
||||
});
|
||||
app.listen('SIGTERM', () => app.terminate());
|
||||
app.listenIf(app.managedByPm2, 'SIGINT', () => app.terminate());
|
||||
})
|
||||
.testRunner()
|
||||
.configure(async (app) => {
|
||||
const { runnerHooks, ...config } = await import('../tests/bootstrap.js');
|
||||
.tap((app) => {
|
||||
app.booting(async () => {
|
||||
await import('#start/env');
|
||||
});
|
||||
app.listen('SIGTERM', () => app.terminate());
|
||||
app.listenIf(app.managedByPm2, 'SIGINT', () => app.terminate());
|
||||
})
|
||||
.testRunner()
|
||||
.configure(async (app) => {
|
||||
const { runnerHooks, ...config } = await import('../tests/bootstrap.js');
|
||||
|
||||
processCLIArgs(process.argv.splice(2));
|
||||
configure({
|
||||
...app.rcFile.tests,
|
||||
...config,
|
||||
...{
|
||||
setup: runnerHooks.setup,
|
||||
teardown: runnerHooks.teardown.concat([() => app.terminate()]),
|
||||
},
|
||||
});
|
||||
})
|
||||
.run(() => run())
|
||||
.catch((error) => {
|
||||
process.exitCode = 1;
|
||||
prettyPrintError(error);
|
||||
});
|
||||
processCLIArgs(process.argv.splice(2));
|
||||
configure({
|
||||
...app.rcFile.tests,
|
||||
...config,
|
||||
...{
|
||||
setup: runnerHooks.setup,
|
||||
teardown: runnerHooks.teardown.concat([() => app.terminate()]),
|
||||
},
|
||||
});
|
||||
})
|
||||
.run(() => run())
|
||||
.catch((error) => {
|
||||
process.exitCode = 1;
|
||||
prettyPrintError(error);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user