mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-10-07 10:11:59 +00:00
refactor: upgrade project to Typescript 5.9
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
"nock": "13.3.1",
|
||||
"ts-node": "10.9.2",
|
||||
"tsup": "8.5.0",
|
||||
"typescript": "5.5.4"
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
@@ -19,7 +19,7 @@ import {URL} from 'url';
|
||||
import waitOn from 'wait-on';
|
||||
import {HttpClient} from '@openstapps/api';
|
||||
import {copy} from './copy.js';
|
||||
import {version} from '../package.json';
|
||||
import packageInfo from '../package.json' with {type: 'json'};
|
||||
// eslint-disable-next-line unicorn/prevent-abbreviations
|
||||
import {e2eRun} from './e2e.js';
|
||||
|
||||
@@ -37,7 +37,7 @@ const helpAndExit = (help: string) => {
|
||||
|
||||
commander
|
||||
.command('e2e <to>')
|
||||
.version(version)
|
||||
.version(packageInfo.version)
|
||||
.description(
|
||||
'Run in end to end test mode. Indexing and afterwards retrieving all test files from @openstapp/core to the backend',
|
||||
)
|
||||
@@ -81,14 +81,14 @@ commander
|
||||
|
||||
commander
|
||||
.command('copy <type> <from> <to> <batchSize>')
|
||||
.version(version)
|
||||
.version(packageInfo.version)
|
||||
.description('Copy data from one instance to another')
|
||||
.option(
|
||||
'-s, --bulkSource <bulkSource>',
|
||||
'The source identifier for the bulk to use with the target instance [copy]',
|
||||
'copy',
|
||||
)
|
||||
.option('-a, --appVersion <version>', 'The App version to use [unset by default]', version)
|
||||
.option('-a, --appVersion <version>', 'The App version to use [unset by default]', packageInfo.version)
|
||||
.allowUnknownOption(false)
|
||||
.action(async (type, from, to, batchSize, copyCommand) => {
|
||||
// validate type
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
"ts-node": "10.9.2",
|
||||
"tsup": "8.5.0",
|
||||
"typedoc": "0.25.12",
|
||||
"typescript": "5.5.4"
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@openstapps/core": "workspace:*"
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
"ts-node": "10.9.2",
|
||||
"tsup": "8.5.0",
|
||||
"typedoc": "0.25.12",
|
||||
"typescript": "5.5.4",
|
||||
"typescript": "5.9.3",
|
||||
"undici": "6.21.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"ts-node": "10.9.2",
|
||||
"tsup": "8.5.0",
|
||||
"typedoc": "0.25.12",
|
||||
"typescript": "5.5.4"
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
"ts-node": "10.9.2",
|
||||
"tsup": "8.5.0",
|
||||
"typedoc": "0.25.12",
|
||||
"typescript": "5.5.4"
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
"ts-node": "10.9.2",
|
||||
"tsup": "8.5.0",
|
||||
"typedoc": "0.25.12",
|
||||
"typescript": "5.5.4"
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"prettier": "@openstapps/prettier-config",
|
||||
"eslintConfig": {
|
||||
|
||||
@@ -368,7 +368,7 @@ class LRUCache<T> {
|
||||
public put(key: string, content: T) {
|
||||
if (this.entries.size >= this.maxEntries) {
|
||||
// LRU behavior
|
||||
const keyToDelete = this.entries.keys().next().value;
|
||||
const keyToDelete = this.entries.keys().next().value as string;
|
||||
this.entries.delete(keyToDelete);
|
||||
}
|
||||
this.entries.set(key, content);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"@openstapps/collection-utils": "workspace:*",
|
||||
"@openstapps/logger": "workspace:*",
|
||||
"glob": "10.5.0",
|
||||
"typescript": "5.5.4"
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"ts-node": "10.9.2",
|
||||
"tsup": "8.5.0",
|
||||
"typedoc": "0.25.12",
|
||||
"typescript": "5.5.4"
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
"test": "c8 mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/nodemailer": "6.4.7",
|
||||
"@types/nodemailer": "8.0.2",
|
||||
"chalk": "5.2.0",
|
||||
"flatted": "3.2.7",
|
||||
"nodemailer": "6.9.9"
|
||||
"nodemailer": "8.0.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
@@ -51,7 +51,7 @@
|
||||
"ts-node": "10.9.2",
|
||||
"tsup": "8.5.0",
|
||||
"typedoc": "0.25.12",
|
||||
"typescript": "5.5.4"
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import * as nodemailer from 'nodemailer';
|
||||
import {MailOptions} from 'nodemailer/lib/sendmail-transport';
|
||||
import {SendMailOptions} from 'nodemailer';
|
||||
import {deleteUndefinedProperties, isProductiveEnvironment, RecursivePartial} from './common.js';
|
||||
import {VerifiableTransport} from './transport.js';
|
||||
|
||||
@@ -310,7 +310,7 @@ export class SMTP extends VerifiableTransport {
|
||||
* Sends a mail object
|
||||
* @param mail Mail to send
|
||||
*/
|
||||
public async sendMail(mail: MailOptions): Promise<string> {
|
||||
public async sendMail(mail: SendMailOptions): Promise<string> {
|
||||
// info is the response of the smtp server
|
||||
let info = await this.transportAgent.sendMail(mail);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user