import { createAsset } from "../invokers/assets";
import { publish } from "../invokers/package";

export default {
  publish: async (obj, args) => {
    args.input.execute = await createAsset.execute({
      dir: "SCRIPT",
      ...args.input.execute,
    });
    args.input.readme = await createAsset.execute({
      dir: "README",
      ...args.input.readme,
    });

    await publish.execute(args.input);
    return true;
  },
};
