ofsc-utility 1.0.36 → 1.0.37

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.
@@ -111,8 +111,10 @@ async function generateAllOnHandInventoryOfAllResources(clientId, clientSecret,
111
111
  const rows = [];
112
112
  for (const [index, resource] of resourcesToProcess.entries()) {
113
113
  console.log(`${index} 👤 Fetching Inventories for ${resource.resourceId}`);
114
- if (!resource)
114
+ if (!resource || !resource.resourceId || ["", null, undefined, "undefined"].includes(resource.resourceId)) {
115
+ console.log(`resourceId is misisng for ${JSON.stringify(resource, undefined, 2)}`);
115
116
  continue;
117
+ }
116
118
  if (resource.status !== "active") {
117
119
  console.log(` ⚠ Skipping inactive resource ${resource.resourceId}`);
118
120
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ofsc-utility",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "description": "TypeScript helpers for Oracle Field Service Cloud (OFSC): events, resources, inventories, metadata and CSV/Excel utilities.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",