@carbonorm/carbonnode 3.7.22 → 3.7.23

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbonorm/carbonnode",
3
- "version": "3.7.22",
3
+ "version": "3.7.23",
4
4
  "browser": "dist/index.umd.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -131,10 +131,15 @@ export const C6 : iC6Object<RestTableInterfaces> = {
131
131
  }
132
132
  }
133
133
  // This will rightfully throw a dynamic import warning in the console, but it is necessary to use dynamic imports
134
- return import(/* @vite-ignore */ './' + (tableName.split('_')
135
- .map(word => word.charAt(0).toUpperCase() + word.slice(1))
136
- .join('_')) + '.ts');
137
-
134
+ const toPascalUnderscore = (name: string) =>
135
+ name
136
+ .split("_")
137
+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
138
+ .join("_");
139
+
140
+ return import(
141
+ /* @vite-ignore */ `./${toPascalUnderscore(tableName)}.ts`
142
+ );
138
143
  },
139
144
  PREFIX: RestTablePrefix,
140
145
  TABLES: TABLES,
@@ -1342,7 +1342,7 @@ export const TABLES = {
1342
1342
  };
1343
1343
  export const C6 = {
1344
1344
  ...C6Constants,
1345
- C6VERSION: '3.7.22',
1345
+ C6VERSION: '3.7.23',
1346
1346
  IMPORT: async (tableName) => {
1347
1347
  tableName = tableName.toLowerCase();
1348
1348
  // if tableName is not a key in the TABLES object then throw an error
@@ -1359,9 +1359,12 @@ export const C6 = {
1359
1359
  }
1360
1360
  }
1361
1361
  // This will rightfully throw a dynamic import warning in the console, but it is necessary to use dynamic imports
1362
- return import(/* @vite-ignore */ './' + (tableName.split('_')
1363
- .map(word => word.charAt(0).toUpperCase() + word.slice(1))
1364
- .join('_')) + '.ts');
1362
+ const toPascalUnderscore = (name) => name
1363
+ .split("_")
1364
+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
1365
+ .join("_");
1366
+ return import(
1367
+ /* @vite-ignore */ `./${toPascalUnderscore(tableName)}.ts`);
1365
1368
  },
1366
1369
  PREFIX: RestTablePrefix,
1367
1370
  TABLES: TABLES,
@@ -2009,7 +2009,7 @@ export type RestTableInterfaces = iActor
2009
2009
 
2010
2010
  export const C6 : iC6Object<RestTableInterfaces> = {
2011
2011
  ...C6Constants,
2012
- C6VERSION: '3.7.22',
2012
+ C6VERSION: '3.7.23',
2013
2013
  IMPORT: async (tableName: string) : Promise<iDynamicApiImport> => {
2014
2014
 
2015
2015
  tableName = tableName.toLowerCase();
@@ -2028,10 +2028,15 @@ export const C6 : iC6Object<RestTableInterfaces> = {
2028
2028
  }
2029
2029
  }
2030
2030
  // This will rightfully throw a dynamic import warning in the console, but it is necessary to use dynamic imports
2031
- return import(/* @vite-ignore */ './' + (tableName.split('_')
2032
- .map(word => word.charAt(0).toUpperCase() + word.slice(1))
2033
- .join('_')) + '.ts');
2034
-
2031
+ const toPascalUnderscore = (name: string) =>
2032
+ name
2033
+ .split("_")
2034
+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
2035
+ .join("_");
2036
+
2037
+ return import(
2038
+ /* @vite-ignore */ `./${toPascalUnderscore(tableName)}.ts`
2039
+ );
2035
2040
  },
2036
2041
  PREFIX: RestTablePrefix,
2037
2042
  TABLES: TABLES,