@churchapps/apihelper 0.0.5 → 0.0.6
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/dist/helpers/DBCreator.js +1 -1
- package/dist/helpers/DBCreator.js.map +1 -1
- package/package.json +4 -3
- package/src/helpers/DBCreator.ts +1 -1
- package/tsconfig.json +17 -21
- package/tslint.json +15 -0
|
@@ -35,7 +35,7 @@ class DBCreator {
|
|
|
35
35
|
static runScript(title, file, customDelimeter) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
console.log("Creating '" + title + "'");
|
|
38
|
-
const sql =
|
|
38
|
+
const sql = fs_extra_1.default.readFileSync(file, "utf-8");
|
|
39
39
|
let del = /;(?=END)\s*$|;(?!\nEND)\s*$/gm;
|
|
40
40
|
if (customDelimeter) {
|
|
41
41
|
del = /\$\$$/gm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DBCreator.js","sourceRoot":"","sources":["../../src/helpers/DBCreator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAA4B;AAC5B,wDAA0B;AAC1B,6BAA0B;AAE1B,MAAa,SAAS;IAQb,MAAM,CAAO,IAAI,CAAC,cAAwB;;YAC/C,gBAAM,CAAC,MAAM,EAAE,CAAC;YAEhB,MAAM,IAAI,GAAsC,EAAE,CAAC;YACnD,cAAc,CAAC,OAAO,CAAC,CAAM,EAAE,EAAC,EAAE;gBAChC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAM,CAAC,EAAC,EAAE;oBAC5B,IAAI,CAAC,CAAC,KAAK,KAAK,EAAE;wBAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBACnC,CAAC,CAAA,CAAC,CAAC;YACL,CAAC,CAAA,CAAC,CAAC;YAEH,KAAK,MAAM,EAAE,IAAI,IAAI;gBAAE,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,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,CAAC;YAC1C,IAAI,eAAe,EAAE;gBACnB,GAAG,GAAG,SAAS,CAAC;aACjB;YACD,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAClC,KAAK,MAAM,SAAS,IAAI,UAAU;gBAAE,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC;oBAAE,MAAM,OAAE,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAC9F,CAAC;KAAA;;AA/BH,8BAkCC;AAhCgB,gBAAM,GAAsC;IACzD,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE;IACvC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE;IACvC,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,gBAAgB,EAAE;CAC9C,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@churchapps/apihelper",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Library of helper functions not specific to any one ChurchApps project or framework.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"date-fns": "^2.30.0",
|
|
31
31
|
"dotenv": "^16.3.1",
|
|
32
32
|
"express": "^4.17.2",
|
|
33
|
+
"fs-extra": "^11.1.1",
|
|
33
34
|
"inversify": "^6.0.1",
|
|
34
35
|
"inversify-express-utils": "^6.4.3",
|
|
35
36
|
"jsonwebtoken": "^9.0.1",
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@types/express": "^4.17.13",
|
|
47
|
-
"@types/fs-extra": "^
|
|
48
|
+
"@types/fs-extra": "^11.0.1",
|
|
48
49
|
"@types/jsonwebtoken": "^9.0.2",
|
|
49
50
|
"@types/kind-of": "^6.0.0",
|
|
50
51
|
"@types/mysql": "^2.15.21",
|
|
@@ -52,9 +53,9 @@
|
|
|
52
53
|
"@types/nodemailer": "^6.4.4",
|
|
53
54
|
"@types/nodemailer-direct-transport": "^1.0.32",
|
|
54
55
|
"copyfiles": "^2.4.1",
|
|
55
|
-
"fs-extra": "^10.0.0",
|
|
56
56
|
"npm-run-all": "^4.1.5",
|
|
57
57
|
"rimraf": "^5.0.1",
|
|
58
|
+
"tslint": "^6.1.2",
|
|
58
59
|
"typescript": "^5.2.2"
|
|
59
60
|
}
|
|
60
61
|
}
|
package/src/helpers/DBCreator.ts
CHANGED
|
@@ -26,7 +26,7 @@ export class DBCreator {
|
|
|
26
26
|
|
|
27
27
|
public static async runScript(title: string, file: string, customDelimeter: boolean) {
|
|
28
28
|
console.log("Creating '" + title + "'");
|
|
29
|
-
const sql =
|
|
29
|
+
const sql = fs.readFileSync(file, "utf-8");
|
|
30
30
|
let del = /;(?=END)\s*$|;(?!\nEND)\s*$/gm;
|
|
31
31
|
if (customDelimeter) {
|
|
32
32
|
del = /\$\$$/gm;
|
package/tsconfig.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"esModuleInterop": true,
|
|
5
|
+
"lib": [
|
|
6
|
+
"ESNext",
|
|
7
|
+
"DOM"
|
|
8
|
+
],
|
|
4
9
|
"typeRoots": [
|
|
5
10
|
"./types",
|
|
6
11
|
"node_modules/@types"
|
|
7
12
|
],
|
|
8
|
-
"lib": [
|
|
9
|
-
"dom",
|
|
10
|
-
"dom.iterable",
|
|
11
|
-
"esnext"
|
|
12
|
-
],
|
|
13
13
|
"experimentalDecorators": true,
|
|
14
14
|
"emitDecoratorMetadata": true,
|
|
15
|
+
"target": "es6",
|
|
15
16
|
"noImplicitAny": true,
|
|
16
17
|
"moduleResolution": "node",
|
|
17
18
|
"sourceMap": true,
|
|
@@ -19,21 +20,16 @@
|
|
|
19
20
|
"baseUrl": ".",
|
|
20
21
|
"strict": false,
|
|
21
22
|
"allowSyntheticDefaultImports": true,
|
|
22
|
-
"allowJs": true,
|
|
23
|
-
"skipLibCheck": true,
|
|
24
|
-
"esModuleInterop": true,
|
|
25
|
-
"strictNullChecks": false,
|
|
26
|
-
"forceConsistentCasingInFileNames": true,
|
|
27
|
-
"module": "CommonJS",
|
|
28
|
-
"resolveJsonModule": true,
|
|
29
|
-
"jsx": "react",
|
|
30
|
-
"allowUnreachableCode": false,
|
|
31
|
-
"allowUnusedLabels": false,
|
|
32
23
|
"declaration": true,
|
|
33
24
|
"declarationMap": true,
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
"paths": {
|
|
26
|
+
"*": [
|
|
27
|
+
"node_modules/*"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
37
30
|
},
|
|
38
|
-
"include": [
|
|
39
|
-
|
|
31
|
+
"include": [
|
|
32
|
+
"src/**/*",
|
|
33
|
+
"LambdaEntry.js"
|
|
34
|
+
]
|
|
35
|
+
}
|