I wrote this quick and dirty script to add created and modified timestamps to all demos based on the same attributes of their respective JSON files in the old demo system. If I were writing it as a standalone script, I would use async/await, but since this was written interactively in the REPL, chaining promises was a bit easier.

const fsp = require('fs').promises;
const { Firestore } = require('@google-cloud/firestore');
const firestore = new Firestore({
  projectId: 'popping-fire-610', // dmtest1 project
  keyFilename: 'dmtest1-261a63e9997d.json', // key is in the firebase-demo-uploader project
});
 
const batch = firestore.batch();
firestore.collection('dm/demos/demos').get().then(demos => {
  demos.forEach(demo => {
    const demoData = demo.data();
    fsp.stat(`/Users/raddevon/Documents/projects/design-media/demo/data/${demoData.slug}.json`)
      .then(stat => batch.update(demo.ref, {
        created: new Date(stat.birthtime),
        modified: new Date(stat.mtime)
      })).catch((error)=>console.error(error));
  });
  return batch.commit()
    .then(() => console.log('done'))
    .catch(error => console.error(error));
});