add = async (rootPath, targetName, log = defaultLog, options = {}) => {
    const srcRd = cwd.neighbor(rootPath);

    const {
      noTransforms = false,
      elideComments = false,
      format = 'endoZipBase64',
      conditions = [],
    } = options;

    conditions.sort();

    const statsByPath = new Map();

    const loggedRead = async loc => {
      await null;
      if (!loc.match(/\bpackage.json$/)) {
        try {
          const itemRd = cwd.neighbor(new URL(loc).pathname);
          const ref = srcRd.relative(itemRd.absolute());
          /** @type {import('fs').Stats} */
          const stats = await itemRd.stat();
          statsByPath.set(ref, stats);
          // console.log({ loc, mtime, ref });
        } catch (oops) {
          log(oops);
        }
      }
      return readPowers.read(loc);
    };

    await wr.mkdir({ recursive: true });

    const bundleFileName = toBundleName(targetName);
    const bundleWr = wr.neighbor(bundleFileName);
    const metaWr = wr.neighbor(toBundleMeta(targetName));

    const bundle = await bundleSource(
      rootPath,
      { ...bundleOptions, noTransforms, elideComments, format, conditions },
      {
        ...readPowers,
        read: loggedRead,
      },
    );

    const code = encodeBundle(bundle);
    await wr.mkdir({ recursive: true });
    const { mtime: bundleTime, size: bundleSize } =
      await bundleWr.atomicWriteText(code);

    /** @type {BundleMeta} */
    const meta = {
      bundleFileName,
      bundleTime: bundleTime.toISOString(),
      bundleSize,
      moduleSource: {
        relative: bundleWr.readOnly().relative(srcRd.absolute()),
        absolute: srcRd.absolute(),
      },
      contents: [...statsByPath.entries()].map(
        ([relativePath, { mtime, size }]) => ({
          relativePath,
          mtime: mtime.toISOString(),
          size,
        }),
      ),
      noTransforms,
      elideComments,
      format,
      conditions,
    };

    await metaWr.atomicWriteText(JSON.stringify(meta, null, 2));
    return meta;
  }
@param {string} rootPath
@param {string} targetName
@param {Logger} [log]
@param {object} [options]
@param {boolean} [options.noTransforms]
@param {boolean} [options.elideComments]
@param {string[]} [options.conditions]
@param {ModuleFormat} [options.format]