@ldsg/utils 0.3.28 → 0.3.29
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/index.cjs +1 -12
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -267,16 +267,8 @@ const readSourceData = async (uri)=>{
|
|
|
267
267
|
};
|
|
268
268
|
const normalizeSourceData = async (rawData, expression)=>{
|
|
269
269
|
if (expression) {
|
|
270
|
-
console.debug("normalizeSourceData expression",expression)
|
|
271
|
-
|
|
272
270
|
const exp = external_jsonata_default()(expression);
|
|
273
|
-
|
|
274
|
-
console.debug("normalizeSourceData exp",exp)
|
|
275
|
-
const res = await exp.evaluate(rawData);
|
|
276
|
-
|
|
277
|
-
console.debug("normalizeSourceData res",res)
|
|
278
|
-
|
|
279
|
-
return res
|
|
271
|
+
return await exp.evaluate(rawData);
|
|
280
272
|
}
|
|
281
273
|
return rawData;
|
|
282
274
|
};
|
|
@@ -284,10 +276,7 @@ const loadAppResourceRecords = async (params)=>{
|
|
|
284
276
|
const { appDataUri, apaasAppDataUri, apaasAppDataExpression } = params;
|
|
285
277
|
if (apaasAppDataUri) {
|
|
286
278
|
const rawData = await readSourceData(apaasAppDataUri);
|
|
287
|
-
console.debug("loadAppResourceRecords rawData",rawData)
|
|
288
|
-
console.debug("loadAppResourceRecords apaasAppDataExpression",apaasAppDataExpression)
|
|
289
279
|
const { resourceRecords } = await normalizeSourceData(rawData, apaasAppDataExpression);
|
|
290
|
-
console.debug("loadAppResourceRecords resourceRecords",resourceRecords)
|
|
291
280
|
const apaasRecords = resourceRecords.map((record)=>({
|
|
292
281
|
id: record.id,
|
|
293
282
|
kind: record.kind,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ldsg/utils",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.29",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "wanxger",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"jsonata": "^2.0.6",
|
|
34
34
|
"jszip": "^3.10.1",
|
|
35
35
|
"lodash": "^4.17.21",
|
|
36
|
-
"@ldsg/constants": "0.3.
|
|
37
|
-
"@ldsg/
|
|
38
|
-
"@ldsg/
|
|
39
|
-
"@ldsg/
|
|
40
|
-
"@ldsg/types": "0.3.
|
|
36
|
+
"@ldsg/apaas-constants": "0.3.29",
|
|
37
|
+
"@ldsg/handler": "0.3.29",
|
|
38
|
+
"@ldsg/core": "0.3.29",
|
|
39
|
+
"@ldsg/constants": "0.3.29",
|
|
40
|
+
"@ldsg/types": "0.3.29"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@rslib/core": "^0.17.1",
|