Skip to content

Commit

Permalink
转换代码为ts
Browse files Browse the repository at this point in the history
  • Loading branch information
na57 committed May 29, 2024
1 parent 1341baa commit 03e4c42
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import triples from "./triples.js";
import notions from "./notions.js";
// import mysql from './mysql.js';
import mysql from './mysql.js';

export default {
...triples,
notions,
// mysql,
mysql,
};
2 changes: 1 addition & 1 deletion src/mysql.js → src/mysql.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { env } from 'node:process';
import mysql from 'mysql2/promise';
import * as mysql from 'mysql2/promise';

export const connectionToMysql = async (options) => {
options.host = options.host || env.OWL_DB_HOST;
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@
resolved "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz"
integrity sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==

"@types/node@^20.12.12":
version "20.12.12"
resolved "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz"
integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==
dependencies:
undici-types "~5.26.4"

"@ungap/structured-clone@^1.2.0":
version "1.2.0"
resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz"
Expand Down Expand Up @@ -2195,6 +2202,11 @@ underscore@~1.13.2:
resolved "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz"
integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==

undici-types@~5.26.4:
version "5.26.5"
resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

uri-js@^4.2.2:
version "4.4.1"
resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz"
Expand Down

0 comments on commit 03e4c42

Please sign in to comment.