@karmaniverous/jeeves-scripts-core
    Preparing search index...

    Function definePlugin

    • Declare the instance plugin: the default export of {root}/jeeves-scripts.plugin.ts. Checks against core (core ids, core domains, override targets) happen when the CLI loads it.

      Parameters

      • declaration: {
            configSchema?: LocalConfigSchema;
            jobs?: readonly JobModule[];
            overrides?: readonly JobOverride[];
        }
        • OptionalconfigSchema?: LocalConfigSchema

          Validates the instance's own local block in the instance config.

        • Optionaljobs?: readonly JobModule[]

          Instance runnables (defineRunnable); a core id or a core domain is an error.

        • Optionaloverrides?: readonly JobOverride[]

          Declared replacements of core runnables.

      Returns Plugin

      import { definePlugin } from '@karmaniverous/jeeves-scripts-core';
      import { z } from 'zod';

      import acmeReport from './src/acme/report.js';

      export default definePlugin({
      jobs: [acmeReport],
      configSchema: z.object({ reportChannel: z.string() }),
      });

      When the declaration is invalid (unknown field, an entry not made with defineRunnable or override, ...).