From 2c901b3731d340ec183e9c7fc225f97864e20061 Mon Sep 17 00:00:00 2001 From: Joshua Date: Sat, 18 Dec 2021 14:34:31 -0800 Subject: [PATCH] chore: Debugging. --- nr.config.js | 4 ++-- packages/client/src/lib/photos.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nr.config.js b/nr.config.js index 5228935..8997845 100644 --- a/nr.config.js +++ b/nr.config.js @@ -11,11 +11,11 @@ export default nr(({ createCommand, createScript, isCI }) => { // ----- Backend Scripts ----------------------------------------------------- - createBabelNodeCommand('backend-deploy-dev', ['serverless', ['deploy'], { stage: 'prod' }], { + createBabelNodeCommand('backend-deploy-dev', ['serverless', ['deploy']], { execaOptions: { cwd: BACKEND_CWD } }); - createBabelNodeCommand('backend-deploy-prod', ['serverless', ['deploy']], { + createBabelNodeCommand('backend-deploy-prod', ['serverless', ['deploy'], { stage: 'prod' }], { execaOptions: { cwd: BACKEND_CWD } }); diff --git a/packages/client/src/lib/photos.ts b/packages/client/src/lib/photos.ts index bf4100f..1310f7b 100644 --- a/packages/client/src/lib/photos.ts +++ b/packages/client/src/lib/photos.ts @@ -113,8 +113,10 @@ export async function getPhotoCollections() { const sortedCollection = shuffleSeed.shuffle(R.sortBy(R.prop('id'), photoCache.photos), name); ifDebug(() => { - const collectionHash = objectHash(sortedCollection); - console.debug('[getPhotoCollections] Collection hash:', collectionHash); + const collectionHash = objectHash(photoCache?.photos); + console.debug(`[getPhotoCollections] Collection hash, unsorted, using seed "${name}":`, collectionHash); + const sortedCollectionHash = objectHash(sortedCollection); + console.debug(`[getPhotoCollections] Collection hash, sorted, using seed "${name}":`, sortedCollectionHash); }, { once: true }); return sortedCollection;