@carbonorm/carbonnode 1.6.36 → 1.6.38
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/package.json
CHANGED
|
@@ -94,6 +94,7 @@ export const TABLES: tC6Tables = {
|
|
|
94
94
|
|
|
95
95
|
let dynamicImportCache = {};
|
|
96
96
|
|
|
97
|
+
// The only reason this function is here/dynamic is due to the relative import (using `./`)
|
|
97
98
|
async function dynamicRestImport(tableName: string) : Promise<{
|
|
98
99
|
default: iRestApiFunctions,
|
|
99
100
|
postState: (response: AxiosResponse<iPostC6RestResponse<any>>, request: iAPI<any>, id: string | number | boolean) => void,
|
|
@@ -130,13 +131,13 @@ async function dynamicRestImport(tableName: string) : Promise<{
|
|
|
130
131
|
|
|
131
132
|
}
|
|
132
133
|
|
|
133
|
-
|
|
134
|
+
}
|
|
134
135
|
|
|
135
136
|
const module = await import('./' + (tableName.split('_')
|
|
136
137
|
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
|
137
|
-
.join('')) + '.ts');
|
|
138
|
+
.join('_')) + '.ts');
|
|
138
139
|
|
|
139
|
-
|
|
140
|
+
dynamicImportCache[tableName] = module
|
|
140
141
|
|
|
141
142
|
return module
|
|
142
143
|
|