"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.registerRequireStep = registerRequireStep;
function registerRequireStep(registry) {
    registry.register("util.require", async (ctx, step) => {
        const input = (step.with ?? {});
        if (!input.resource) {
            throw new Error('Missing "resource" in step.with for op "util.require"');
        }
        if (!ctx.resources.has(input.resource)) {
            const suffix = input.message ? ` ${input.message}` : "";
            throw new Error(`Missing required resource: "${input.resource}".${suffix}`);
        }
    });
}
//# sourceMappingURL=require.step.js.map