@carbonorm/carbonreact 3.3.13 → 3.4.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/compileValidSQL.cjs +3 -1
- package/compileValidSQL.tsx +15 -8
- package/package.json +4 -3
package/compileValidSQL.cjs
CHANGED
|
@@ -105,7 +105,9 @@ var fs = require('fs');
|
|
|
105
105
|
Object.keys(apiRequest[testName]).forEach(function (restCallInfo) {
|
|
106
106
|
apiRequest[testName][restCallInfo].forEach(function (singleSqlInfoObject) {
|
|
107
107
|
if (true === singleSqlInfoObject['CarbonPHP\\Restful\\RestSettings::$externalRestfulRequestsAPI']) {
|
|
108
|
-
|
|
108
|
+
singleSqlInfoObject.stmt.debugDumpParams = singleSqlInfoObject.stmt.debugDumpParams.slice(0, 2);
|
|
109
|
+
// change this to only the sql statement
|
|
110
|
+
validExternalRequests.push(singleSqlInfoObject.stmt);
|
|
109
111
|
}
|
|
110
112
|
});
|
|
111
113
|
});
|
package/compileValidSQL.tsx
CHANGED
|
@@ -57,15 +57,19 @@ interface iApiResponseLine {
|
|
|
57
57
|
any,
|
|
58
58
|
any
|
|
59
59
|
],
|
|
60
|
-
"stmt":
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
"stmt": {
|
|
61
|
+
// ['stmt']['sql']
|
|
62
|
+
sql: string, // sql
|
|
63
|
+
injections: { [inectionNumber: string]: string },
|
|
64
|
+
debugDumpParams: string[]
|
|
65
|
+
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
|
|
69
|
+
interface iRestfulTestFile {
|
|
70
|
+
[testName: string]: iApiResponseLine[]
|
|
71
|
+
}
|
|
72
|
+
|
|
69
73
|
const util = require('util');
|
|
70
74
|
|
|
71
75
|
const exec = util.promisify(require('child_process').exec);
|
|
@@ -75,7 +79,7 @@ const fs = require('fs');
|
|
|
75
79
|
(async () => {
|
|
76
80
|
|
|
77
81
|
|
|
78
|
-
let jsonValidSqlFiles:
|
|
82
|
+
let jsonValidSqlFiles: iRestfulTestFile[] = [],
|
|
79
83
|
validExternalRequests: iApiResponseLine[] = [];
|
|
80
84
|
|
|
81
85
|
|
|
@@ -117,7 +121,10 @@ const fs = require('fs');
|
|
|
117
121
|
|
|
118
122
|
if (true === singleSqlInfoObject['CarbonPHP\\Restful\\RestSettings::$externalRestfulRequestsAPI']) {
|
|
119
123
|
|
|
120
|
-
|
|
124
|
+
singleSqlInfoObject.stmt.debugDumpParams = singleSqlInfoObject.stmt.debugDumpParams.slice(0,2)
|
|
125
|
+
|
|
126
|
+
// change this to only the sql statement
|
|
127
|
+
validExternalRequests.push(singleSqlInfoObject.stmt)
|
|
121
128
|
|
|
122
129
|
}
|
|
123
130
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbonorm/carbonreact",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"browser": "dist/index.umd.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -70,16 +70,17 @@
|
|
|
70
70
|
"scripts": {
|
|
71
71
|
"prepublishOnly": "npm run build",
|
|
72
72
|
"c6": "wget https://raw.githubusercontent.com/RichardTMiles/CarbonPHP/lts/view/C6.tsx -O src/variables/C6.tsx",
|
|
73
|
-
"build": "rm -rf ./dist/ && npm run build:css && npm run build:index && rollup -c &&
|
|
73
|
+
"build": "rm -rf ./dist/ && npm run build:css && npm run build:index && rollup -c && npm run build:compileValidSQL",
|
|
74
74
|
"dev": "rollup -c -w",
|
|
75
75
|
"test": "node test/test.js",
|
|
76
76
|
"pretest": "npm run build",
|
|
77
77
|
"build:index": "npx barrelsby --directory ./src --delete --exclude '(jestHoc|\\.test|\\.d).(js|tsx?)$' --exportDefault --verbose --mode top",
|
|
78
78
|
"build:css": "sass ./src:./src && typed-scss-modules 'src/**/*.?(s)css' --nameFormat all --exportType default src",
|
|
79
|
-
"build:compileValidSQL": "
|
|
79
|
+
"build:compileValidSQL": "tsc compileValidSQL.tsx && mv compileValidSQL.js compileValidSQL.cjs"
|
|
80
80
|
},
|
|
81
81
|
"files": [
|
|
82
82
|
"compileValidSQL.tsx",
|
|
83
|
+
"compileValidSQL.cjs",
|
|
83
84
|
"dist",
|
|
84
85
|
"src"
|
|
85
86
|
]
|