@devicecloud.dev/dcd 3.2.0 → 3.2.1

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/methods.js CHANGED
@@ -224,7 +224,12 @@ const uploadBinary = async (filePath, apiUrl, apiKey, ignoreShaCheck = false) =>
224
224
  let sha = undefined;
225
225
  try {
226
226
  sha = await getFileHashFromFile(file);
227
- if (!ignoreShaCheck) {
227
+ }
228
+ catch (e) {
229
+ console.warn('Warning: Failed to get file hash', e);
230
+ }
231
+ if (!ignoreShaCheck && sha) {
232
+ try {
228
233
  const { appBinaryId, exists } = await (0, exports.typeSafePost)(apiUrl, '/uploads/checkForExistingUpload', {
229
234
  body: JSON.stringify({ sha }),
230
235
  headers: {
@@ -238,9 +243,9 @@ const uploadBinary = async (filePath, apiUrl, apiKey, ignoreShaCheck = false) =>
238
243
  return appBinaryId;
239
244
  }
240
245
  }
241
- }
242
- catch (e) {
243
- console.warn('Warning: Failed to get file hash or check if binary exists', e);
246
+ catch {
247
+ // ignore error
248
+ }
244
249
  }
245
250
  const { id, message, path, token } = await (0, exports.typeSafePost)(apiUrl, '/uploads/getBinaryUploadUrl', {
246
251
  body: JSON.stringify({
package/dist/plan.js CHANGED
@@ -120,10 +120,12 @@ async function plan(input, includeTags, excludeTags, excludeFlows) {
120
120
  // eslint-disable-next-line unicorn/no-array-reduce
121
121
  const pathsByName = allFlows.reduce((acc, filePath) => {
122
122
  const config = configPerFlowFile[filePath];
123
- acc[config?.name || path.parse(filePath).name] = filePath;
123
+ const name = config?.name || path.parse(filePath).name;
124
+ acc[name] = filePath;
124
125
  return acc;
125
126
  }, {});
126
127
  const flowsToRunInSequence = workspaceConfig.executionOrder?.flowsOrder
128
+ ?.map((flowOrder) => flowOrder.replace('.yaml', '').replace('.yml', '')) // support case where ext is left on
127
129
  ?.map((flowOrder) => (0, planMethods_1.getFlowsToRunInSequence)(pathsByName, [flowOrder]))
128
130
  .flat() || [];
129
131
  const normalFlows = allFlows
@@ -323,5 +323,5 @@
323
323
  ]
324
324
  }
325
325
  },
326
- "version": "3.2.0"
326
+ "version": "3.2.1"
327
327
  }
package/package.json CHANGED
@@ -80,7 +80,7 @@
80
80
  "test": "mocha --forbid-only \"test/**/*.test.ts\"",
81
81
  "version": "oclif readme && git add README.md"
82
82
  },
83
- "version": "3.2.0",
83
+ "version": "3.2.1",
84
84
  "bugs": {
85
85
  "url": "https://discord.gg/gm3mJwcNw8"
86
86
  },