node-server-engine 1.9.0 → 1.10.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.
package/.nycrc
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"all": true,
|
|
3
3
|
"check-coverage": true,
|
|
4
|
+
"include": [
|
|
5
|
+
"src/**/*.ts"
|
|
6
|
+
],
|
|
4
7
|
"exclude": [
|
|
8
|
+
"**/*.test.ts",
|
|
5
9
|
"dist/**",
|
|
6
10
|
"certs/**",
|
|
7
11
|
"test/**",
|
|
@@ -15,10 +19,10 @@
|
|
|
15
19
|
"instrument": true,
|
|
16
20
|
"require": ["@babel/register"],
|
|
17
21
|
"reporter": ["text", "html", "lcov"],
|
|
18
|
-
"lines":
|
|
19
|
-
"branches":
|
|
20
|
-
"functions":
|
|
21
|
-
"statements":
|
|
22
|
+
"lines": 80,
|
|
23
|
+
"branches": 65,
|
|
24
|
+
"functions": 70,
|
|
25
|
+
"statements": 80,
|
|
22
26
|
"report-dir": "./.test-coverage",
|
|
23
27
|
"temp-dir": "./.nyc_output"
|
|
24
28
|
}
|
|
@@ -26,15 +26,17 @@ const config = {
|
|
|
26
26
|
collate: 'utf8mb4_unicode_ci' // Set collation for MySQL/MariaDB
|
|
27
27
|
},
|
|
28
28
|
retry: {
|
|
29
|
-
max:
|
|
29
|
+
max: process.env.NODE_ENV === 'test' ? 0 : 3 // Disable retries in test environment to prevent unhandled rejections
|
|
30
30
|
},
|
|
31
31
|
dialectOptions: {},
|
|
32
32
|
pool: {
|
|
33
|
-
max: 5,
|
|
33
|
+
max: process.env.NODE_ENV === 'test' ? 1 : 5,
|
|
34
34
|
min: 0,
|
|
35
|
-
acquire: 30000,
|
|
36
|
-
//
|
|
37
|
-
idle:
|
|
35
|
+
acquire: process.env.NODE_ENV === 'test' ? 1000 : 30000,
|
|
36
|
+
// Reduce acquire timeout in test
|
|
37
|
+
idle: process.env.NODE_ENV === 'test' ? 1000 : 10000,
|
|
38
|
+
// Reduce idle time in test
|
|
39
|
+
evict: process.env.NODE_ENV === 'test' ? 100 : 1000 // How often to check for idle connections
|
|
38
40
|
}
|
|
39
41
|
};
|
|
40
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sequelize.config.js","names":["_Sequelize","require","validateSequelizeEnvironment","config","username","process","env","SQL_USER","password","SQL_PASSWORD","database","SQL_DB","host","SQL_HOST","port","SQL_PORT","parseInt","dialect","SQL_TYPE","logging","define","freezeTableName","charset","collate","retry","max","dialectOptions","pool","min","acquire","idle","requestTimeout","connectTimeout","encrypt","trustServerCertificate","timezone","ssl","PG_SSL","rejectUnauthorized","development","exports","staging","production","test","_default","default"],"sources":["../../../src/entities/Sequelize/Sequelize.config.ts"],"sourcesContent":["import { Options, Dialect } from 'sequelize';\nimport { validateSequelizeEnvironment } from './Sequelize.validate';\n\n// Check that environment variables are correctly set\nvalidateSequelizeEnvironment();\n\nconst config: Options = {\n username: process.env.SQL_USER,\n password: process.env.SQL_PASSWORD,\n database: process.env.SQL_DB,\n host: process.env.SQL_HOST,\n port: process.env.SQL_PORT ? parseInt(process.env.SQL_PORT) : 5432, // Default port for PostgreSQL\n dialect: (process.env.SQL_TYPE ?? 'postgres') as Dialect, // Dynamically set the dialect (postgres, mysql, mssql)\n logging: false, // Set to true for debugging SQL queries\n define: {\n freezeTableName: false, // Prevent automatic pluralization of table names\n charset: 'utf8mb4', // Set character set for MySQL/MariaDB\n collate: 'utf8mb4_unicode_ci' // Set collation for MySQL/MariaDB\n },\n retry: {\n max:
|
|
1
|
+
{"version":3,"file":"Sequelize.config.js","names":["_Sequelize","require","validateSequelizeEnvironment","config","username","process","env","SQL_USER","password","SQL_PASSWORD","database","SQL_DB","host","SQL_HOST","port","SQL_PORT","parseInt","dialect","SQL_TYPE","logging","define","freezeTableName","charset","collate","retry","max","NODE_ENV","dialectOptions","pool","min","acquire","idle","evict","requestTimeout","connectTimeout","encrypt","trustServerCertificate","timezone","ssl","PG_SSL","rejectUnauthorized","development","exports","staging","production","test","_default","default"],"sources":["../../../src/entities/Sequelize/Sequelize.config.ts"],"sourcesContent":["import { Options, Dialect } from 'sequelize';\nimport { validateSequelizeEnvironment } from './Sequelize.validate';\n\n// Check that environment variables are correctly set\nvalidateSequelizeEnvironment();\n\nconst config: Options = {\n username: process.env.SQL_USER,\n password: process.env.SQL_PASSWORD,\n database: process.env.SQL_DB,\n host: process.env.SQL_HOST,\n port: process.env.SQL_PORT ? parseInt(process.env.SQL_PORT) : 5432, // Default port for PostgreSQL\n dialect: (process.env.SQL_TYPE ?? 'postgres') as Dialect, // Dynamically set the dialect (postgres, mysql, mssql)\n logging: false, // Set to true for debugging SQL queries\n define: {\n freezeTableName: false, // Prevent automatic pluralization of table names\n charset: 'utf8mb4', // Set character set for MySQL/MariaDB\n collate: 'utf8mb4_unicode_ci' // Set collation for MySQL/MariaDB\n },\n retry: {\n max: process.env.NODE_ENV === 'test' ? 0 : 3 // Disable retries in test environment to prevent unhandled rejections\n },\n dialectOptions: {},\n pool: {\n max: process.env.NODE_ENV === 'test' ? 1 : 5,\n min: 0,\n acquire: process.env.NODE_ENV === 'test' ? 1000 : 30000, // Reduce acquire timeout in test\n idle: process.env.NODE_ENV === 'test' ? 1000 : 10000, // Reduce idle time in test\n evict: process.env.NODE_ENV === 'test' ? 100 : 1000 // How often to check for idle connections\n },\n};\n\n// Additional configurations for MSSQL\nif (config.dialect === 'mssql') {\n config.dialectOptions = {\n requestTimeout: 30000, // Increase request timeout for MSSQL\n connectTimeout: 30000, // Increase connection timeout for MSSQL\n encrypt: true, // Use encryption for MSSQL (set to false if not needed)\n trustServerCertificate: true, // Set to true if using self-signed certificates\n };\n}\n\n// Add specific dialect configurations if necessary for MySQL/PostgreSQL\nif (config.dialect === 'mysql') {\n config.dialectOptions = {\n timezone: 'Z', // Set timezone for MySQL\n };\n}\n\nif (config.dialect === 'postgres') {\n config.dialectOptions = {\n ssl: process.env.PG_SSL === 'true' ? { rejectUnauthorized: false } : false, // SSL options for PostgreSQL (if required)\n };\n}\n\nexport const development = config;\nexport const staging = config;\nexport const production = config;\nexport const test = config;\nexport default config;\n"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA;AACA,IAAAC,uCAA4B,EAAC,CAAC;AAE9B,MAAMC,MAAe,GAAG;EACtBC,QAAQ,EAAEC,OAAO,CAACC,GAAG,CAACC,QAAQ;EAC9BC,QAAQ,EAAEH,OAAO,CAACC,GAAG,CAACG,YAAY;EAClCC,QAAQ,EAAEL,OAAO,CAACC,GAAG,CAACK,MAAM;EAC5BC,IAAI,EAAEP,OAAO,CAACC,GAAG,CAACO,QAAQ;EAC1BC,IAAI,EAAET,OAAO,CAACC,GAAG,CAACS,QAAQ,GAAGC,QAAQ,CAACX,OAAO,CAACC,GAAG,CAACS,QAAQ,CAAC,GAAG,IAAI;EAAE;EACpEE,OAAO,EAAGZ,OAAO,CAACC,GAAG,CAACY,QAAQ,IAAI,UAAsB;EAAE;EAC1DC,OAAO,EAAE,KAAK;EAAE;EAChBC,MAAM,EAAE;IACNC,eAAe,EAAE,KAAK;IAAE;IACxBC,OAAO,EAAE,SAAS;IAAE;IACpBC,OAAO,EAAE,oBAAoB,CAAC;EAChC,CAAC;EACDC,KAAK,EAAE;IACLC,GAAG,EAAEpB,OAAO,CAACC,GAAG,CAACoB,QAAQ,KAAK,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC;EAC/C,CAAC;EACDC,cAAc,EAAE,CAAC,CAAC;EAClBC,IAAI,EAAE;IACJH,GAAG,EAAEpB,OAAO,CAACC,GAAG,CAACoB,QAAQ,KAAK,MAAM,GAAG,CAAC,GAAG,CAAC;IAC5CG,GAAG,EAAE,CAAC;IACNC,OAAO,EAAEzB,OAAO,CAACC,GAAG,CAACoB,QAAQ,KAAK,MAAM,GAAG,IAAI,GAAG,KAAK;IAAE;IACzDK,IAAI,EAAE1B,OAAO,CAACC,GAAG,CAACoB,QAAQ,KAAK,MAAM,GAAG,IAAI,GAAG,KAAK;IAAE;IACtDM,KAAK,EAAE3B,OAAO,CAACC,GAAG,CAACoB,QAAQ,KAAK,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC;EACtD;AACF,CAAC;;AAED;AACA,IAAIvB,MAAM,CAACc,OAAO,KAAK,OAAO,EAAE;EAC9Bd,MAAM,CAACwB,cAAc,GAAG;IACtBM,cAAc,EAAE,KAAK;IAAE;IACvBC,cAAc,EAAE,KAAK;IAAE;IACvBC,OAAO,EAAE,IAAI;IAAE;IACfC,sBAAsB,EAAE,IAAI,CAAE;EAChC,CAAC;AACH;;AAEA;AACA,IAAIjC,MAAM,CAACc,OAAO,KAAK,OAAO,EAAE;EAC9Bd,MAAM,CAACwB,cAAc,GAAG;IACtBU,QAAQ,EAAE,GAAG,CAAE;EACjB,CAAC;AACH;AAEA,IAAIlC,MAAM,CAACc,OAAO,KAAK,UAAU,EAAE;EACjCd,MAAM,CAACwB,cAAc,GAAG;IACtBW,GAAG,EAAEjC,OAAO,CAACC,GAAG,CAACiC,MAAM,KAAK,MAAM,GAAG;MAAEC,kBAAkB,EAAE;IAAM,CAAC,GAAG,KAAK,CAAE;EAC9E,CAAC;AACH;AAEO,MAAMC,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAGtC,MAAM;AAC1B,MAAMwC,OAAO,GAAAD,OAAA,CAAAC,OAAA,GAAGxC,MAAM;AACtB,MAAMyC,UAAU,GAAAF,OAAA,CAAAE,UAAA,GAAGzC,MAAM;AACzB,MAAM0C,IAAI,GAAAH,OAAA,CAAAG,IAAA,GAAG1C,MAAM;AAAC,IAAA2C,QAAA,GAAAJ,OAAA,CAAAK,OAAA,GACZ5C,MAAM","ignoreList":[]}
|
|
@@ -45,15 +45,31 @@ function init() {
|
|
|
45
45
|
// Ignore if already initialized
|
|
46
46
|
if (sequelizeClient) return;
|
|
47
47
|
exports.sequelizeClient = sequelizeClient = createSequelizeClient();
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
|
|
49
|
+
// In test environment, authentication happens automatically with SQLite
|
|
50
|
+
// For other environments, authenticate and log the result
|
|
51
|
+
if (process.env.NODE_ENV !== 'test') {
|
|
52
|
+
void sequelizeClient.authenticate().then(() => (0, _report.reportInfo)({
|
|
53
|
+
message: 'Connected to database successfully'
|
|
54
|
+
})).catch(err => (0, _report.reportError)(err));
|
|
55
|
+
}
|
|
51
56
|
_LifecycleController.LifecycleController.register(sequelize);
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
/** On shutdown close connection and clear client */
|
|
55
60
|
async function shutdown() {
|
|
56
|
-
if (sequelizeClient)
|
|
61
|
+
if (sequelizeClient) {
|
|
62
|
+
try {
|
|
63
|
+
// For SQLite, just close the client (closing connection manager first causes SQLITE_MISUSE)
|
|
64
|
+
// For other dialects, sequelize.close() handles everything properly
|
|
65
|
+
await sequelizeClient.close();
|
|
66
|
+
} catch (error) {
|
|
67
|
+
// Ignore errors during shutdown
|
|
68
|
+
if (process.env.NODE_ENV !== 'test') {
|
|
69
|
+
console.error('Error closing sequelize client:', error);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
57
73
|
exports.sequelizeClient = sequelizeClient = undefined;
|
|
58
74
|
}
|
|
59
75
|
function addModels(models) {
|
|
@@ -66,6 +82,15 @@ function addModels(models) {
|
|
|
66
82
|
|
|
67
83
|
/** Create Sequelize client */
|
|
68
84
|
function createSequelizeClient() {
|
|
85
|
+
// Use in-memory SQLite for test environment to avoid real database connections
|
|
86
|
+
if (process.env.NODE_ENV === 'test') {
|
|
87
|
+
return new _sequelizeTypescript.Sequelize({
|
|
88
|
+
dialect: 'sqlite',
|
|
89
|
+
storage: ':memory:',
|
|
90
|
+
logging: false
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
69
94
|
// Throw an error if there is no host initial
|
|
70
95
|
(0, _Sequelize2.validateSequelizeEnvironment)();
|
|
71
96
|
return new _sequelizeTypescript.Sequelize(process.env.SQL_DB, process.env.SQL_USER, process.env.SQL_PASSWORD, _Sequelize.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sequelize.js","names":["_sequelizeTypescript","require","_Sequelize","_interopRequireDefault","_Sequelize2","_EngineError","_LifecycleController","_report","sequelizeClient","exports","sequelize","Proxy","get","target","property","init","shutdown","addModels","EngineError","message","createSequelizeClient","authenticate","then","reportInfo","catch","err","reportError","LifecycleController","register","close","undefined","models","sync","
|
|
1
|
+
{"version":3,"file":"Sequelize.js","names":["_sequelizeTypescript","require","_Sequelize","_interopRequireDefault","_Sequelize2","_EngineError","_LifecycleController","_report","sequelizeClient","exports","sequelize","Proxy","get","target","property","init","shutdown","addModels","EngineError","message","createSequelizeClient","process","env","NODE_ENV","authenticate","then","reportInfo","catch","err","reportError","LifecycleController","register","close","error","console","undefined","models","sync","Sequelize","dialect","storage","logging","validateSequelizeEnvironment","SQL_DB","SQL_USER","SQL_PASSWORD","dbConfig"],"sources":["../../../src/entities/Sequelize/Sequelize.ts"],"sourcesContent":["import { Sequelize, ModelCtor } from 'sequelize-typescript';\nimport dbConfig from './Sequelize.config';\nimport { Sequelize as SequelizeInterface } from './Sequelize.types';\nimport { validateSequelizeEnvironment } from './Sequelize.validate';\nimport { EngineError } from 'entities/EngineError';\nimport { LifecycleController } from 'entities/LifecycleController';\nimport { reportInfo, reportError } from 'utils/report';\n\nexport let sequelizeClient: undefined | Sequelize;\n\n/**\n * We use a proxy to extend the Sequelize behavior and allow initialization of the client only when needed while keeping the same interface\n */\nexport const sequelize = new Proxy<SequelizeInterface>(\n // Due to how we do the proxying, we are forced to ignore ts-errors, we could never create an object that respects the interface properly\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n {},\n {\n get: function (target, property): unknown {\n if (property === 'init') return init;\n if (property === 'shutdown') return shutdown;\n if (property === 'addModels') return addModels;\n // Create the sequelize client if it does not exist\n if (!sequelizeClient)\n throw new EngineError({\n message: 'Sequelize client was not initialized'\n });\n // Call the function on the sequelize client\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return sequelizeClient[property] as unknown;\n }\n }\n);\n\n/** On init create client and connect */\nexport function init(): void {\n // Ignore if already initialized\n if (sequelizeClient) return;\n sequelizeClient = createSequelizeClient();\n \n // In test environment, authentication happens automatically with SQLite\n // For other environments, authenticate and log the result\n if (process.env.NODE_ENV !== 'test') {\n void sequelizeClient\n .authenticate()\n .then(() => reportInfo({ message: 'Connected to database successfully' }))\n .catch((err: Error) => reportError(err));\n }\n \n LifecycleController.register(sequelize);\n}\n\n/** On shutdown close connection and clear client */\nexport async function shutdown(): Promise<void> {\n if (sequelizeClient) {\n try {\n // For SQLite, just close the client (closing connection manager first causes SQLITE_MISUSE)\n // For other dialects, sequelize.close() handles everything properly\n await sequelizeClient.close();\n } catch (error) {\n // Ignore errors during shutdown\n if (process.env.NODE_ENV !== 'test') {\n console.error('Error closing sequelize client:', error);\n }\n }\n }\n sequelizeClient = undefined;\n}\n\nexport function addModels(models: Array<ModelCtor>): void {\n if (!sequelizeClient)\n throw new EngineError({\n message: 'Sequelize client was not initialized'\n });\n sequelizeClient.addModels(models);\n sequelizeClient.sync();\n}\n\n/** Create Sequelize client */\nexport function createSequelizeClient(): Sequelize {\n // Use in-memory SQLite for test environment to avoid real database connections\n if (process.env.NODE_ENV === 'test') {\n return new Sequelize({\n dialect: 'sqlite',\n storage: ':memory:',\n logging: false\n });\n }\n \n // Throw an error if there is no host initial\n validateSequelizeEnvironment();\n return new Sequelize(\n process.env.SQL_DB as string,\n process.env.SQL_USER as string,\n process.env.SQL_PASSWORD as string,\n dbConfig\n );\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAEO,IAAIO,eAAsC,GAAAC,OAAA,CAAAD,eAAA;;AAEjD;AACA;AACA;AACO,MAAME,SAAS,GAAAD,OAAA,CAAAC,SAAA,GAAG,IAAIC,KAAK;AAChC;AACA;AACA;AACA,CAAC,CAAC,EACF;EACEC,GAAG,EAAE,SAAAA,CAAUC,MAAM,EAAEC,QAAQ,EAAW;IACxC,IAAIA,QAAQ,KAAK,MAAM,EAAE,OAAOC,IAAI;IACpC,IAAID,QAAQ,KAAK,UAAU,EAAE,OAAOE,QAAQ;IAC5C,IAAIF,QAAQ,KAAK,WAAW,EAAE,OAAOG,SAAS;IAC9C;IACA,IAAI,CAACT,eAAe,EAClB,MAAM,IAAIU,wBAAW,CAAC;MACpBC,OAAO,EAAE;IACX,CAAC,CAAC;IACJ;IACA;IACA;IACA,OAAOX,eAAe,CAACM,QAAQ,CAAC;EAClC;AACF,CACF,CAAC;;AAED;AACO,SAASC,IAAIA,CAAA,EAAS;EAC3B;EACA,IAAIP,eAAe,EAAE;EACrBC,OAAA,CAAAD,eAAA,GAAAA,eAAe,GAAGY,qBAAqB,CAAC,CAAC;;EAEzC;EACA;EACA,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,EAAE;IACnC,KAAKf,eAAe,CACjBgB,YAAY,CAAC,CAAC,CACdC,IAAI,CAAC,MAAM,IAAAC,kBAAU,EAAC;MAAEP,OAAO,EAAE;IAAqC,CAAC,CAAC,CAAC,CACzEQ,KAAK,CAAEC,GAAU,IAAK,IAAAC,mBAAW,EAACD,GAAG,CAAC,CAAC;EAC5C;EAEAE,wCAAmB,CAACC,QAAQ,CAACrB,SAAS,CAAC;AACzC;;AAEA;AACO,eAAeM,QAAQA,CAAA,EAAkB;EAC9C,IAAIR,eAAe,EAAE;IACnB,IAAI;MACF;MACA;MACA,MAAMA,eAAe,CAACwB,KAAK,CAAC,CAAC;IAC/B,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd;MACA,IAAIZ,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,EAAE;QACnCW,OAAO,CAACD,KAAK,CAAC,iCAAiC,EAAEA,KAAK,CAAC;MACzD;IACF;EACF;EACAxB,OAAA,CAAAD,eAAA,GAAAA,eAAe,GAAG2B,SAAS;AAC7B;AAEO,SAASlB,SAASA,CAACmB,MAAwB,EAAQ;EACxD,IAAI,CAAC5B,eAAe,EAClB,MAAM,IAAIU,wBAAW,CAAC;IACpBC,OAAO,EAAE;EACX,CAAC,CAAC;EACJX,eAAe,CAACS,SAAS,CAACmB,MAAM,CAAC;EACjC5B,eAAe,CAAC6B,IAAI,CAAC,CAAC;AACxB;;AAEA;AACO,SAASjB,qBAAqBA,CAAA,EAAc;EACjD;EACA,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,EAAE;IACnC,OAAO,IAAIe,8BAAS,CAAC;MACnBC,OAAO,EAAE,QAAQ;MACjBC,OAAO,EAAE,UAAU;MACnBC,OAAO,EAAE;IACX,CAAC,CAAC;EACJ;;EAEA;EACA,IAAAC,wCAA4B,EAAC,CAAC;EAC9B,OAAO,IAAIJ,8BAAS,CAClBjB,OAAO,CAACC,GAAG,CAACqB,MAAM,EAClBtB,OAAO,CAACC,GAAG,CAACsB,QAAQ,EACpBvB,OAAO,CAACC,GAAG,CAACuB,YAAY,EACxBC,kBACF,CAAC;AACH","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-server-engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Framework used to develop backend services. This package ships with a lot of features to standardize the creation of services, letting you focus on the business logic.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"lint:fix": "eslint ./src --fix",
|
|
12
12
|
"prepublish": "npm run build",
|
|
13
13
|
"prepublishOnly": "npm run build",
|
|
14
|
-
"test": "cross-env NODE_ENV=test TS_NODE_PROJECT=tsconfig.test.json mocha --require ts-node/register --require tsconfig-paths/register --reporter spec --timeout 10000 --exit test/hooks.ts 'src/**/*.test.ts'",
|
|
15
|
-
"test:coverage": "cross-env NODE_ENV=test TS_NODE_PROJECT=tsconfig.test.json nyc --reporter=text --no-clean mocha --require ts-node/register --require tsconfig-paths/register --reporter spec test/hooks.ts 'src/**/*.test.ts'",
|
|
14
|
+
"test": "cross-env NODE_ENV=test TS_NODE_PROJECT=tsconfig.test.json mocha --require ts-node/register --require tsconfig-paths/register --reporter spec --timeout 10000 --exit --full-trace test/hooks.ts 'src/**/*.test.ts'",
|
|
15
|
+
"test:coverage": "cross-env NODE_ENV=test TS_NODE_PROJECT=tsconfig.test.json nyc --reporter=text --no-clean mocha --require ts-node/register --require tsconfig-paths/register --reporter spec --full-trace test/hooks.ts 'src/**/*.test.ts'",
|
|
16
16
|
"test:file": "cross-env NODE_ENV=test TS_NODE_PROJECT=tsconfig.test.json mocha --require ts-node/register --require tsconfig-paths/register --reporter spec --exit test/hooks.ts",
|
|
17
17
|
"coverage": "nyc report --report-dir=./.test-coverage --reporter=html --reporter=text",
|
|
18
18
|
"coverage:ci": "nyc report --reporter=text-summary",
|
|
@@ -149,6 +149,7 @@
|
|
|
149
149
|
"shx": "^0.3.4",
|
|
150
150
|
"sinon": "^19.0.2",
|
|
151
151
|
"sinon-chai": "^3.5.0",
|
|
152
|
+
"sqlite3": "^5.1.7",
|
|
152
153
|
"supertest": "^7.0.0",
|
|
153
154
|
"tmp": "^0.2.4",
|
|
154
155
|
"ts-node": "^10.9.2",
|