
import { dirname as _$_dirname } from "node:path";
import { createRequire as _$_createRequire } from "node:module";
import { fileURLToPath as _$_fileURLToPath } from "node:url";

const require = _$_createRequire(import.meta.url);
const __dirname = _$_dirname(_$_fileURLToPath(import.meta.url));


// src/config/default.ts
import { fileURLToPath } from "node:url";

// node_modules/@commitlint/types/lib/rules.js
var RuleConfigSeverity;
(function(RuleConfigSeverity2) {
  RuleConfigSeverity2[RuleConfigSeverity2["Disabled"] = 0] = "Disabled";
  RuleConfigSeverity2[RuleConfigSeverity2["Warning"] = 1] = "Warning";
  RuleConfigSeverity2[RuleConfigSeverity2["Error"] = 2] = "Error";
})(RuleConfigSeverity || (RuleConfigSeverity = {}));
var RuleConfigQuality;
(function(RuleConfigQuality2) {
  RuleConfigQuality2[RuleConfigQuality2["User"] = 0] = "User";
  RuleConfigQuality2[RuleConfigQuality2["Qualified"] = 1] = "Qualified";
})(RuleConfigQuality || (RuleConfigQuality = {}));

// node_modules/@commitlint/config-conventional/lib/index.js
var lib_default = {
  parserPreset: "conventional-changelog-conventionalcommits",
  rules: {
    "body-leading-blank": [RuleConfigSeverity.Warning, "always"],
    "body-max-line-length": [RuleConfigSeverity.Error, "always", 100],
    "footer-leading-blank": [RuleConfigSeverity.Warning, "always"],
    "footer-max-line-length": [RuleConfigSeverity.Error, "always", 100],
    "header-max-length": [RuleConfigSeverity.Error, "always", 100],
    "header-trim": [RuleConfigSeverity.Error, "always"],
    "subject-case": [
      RuleConfigSeverity.Error,
      "never",
      ["sentence-case", "start-case", "pascal-case", "upper-case"]
    ],
    "subject-empty": [RuleConfigSeverity.Error, "never"],
    "subject-full-stop": [RuleConfigSeverity.Error, "never", "."],
    "type-case": [RuleConfigSeverity.Error, "always", "lower-case"],
    "type-empty": [RuleConfigSeverity.Error, "never"],
    "type-enum": [
      RuleConfigSeverity.Error,
      "always",
      [
        "build",
        "chore",
        "ci",
        "docs",
        "feat",
        "fix",
        "perf",
        "refactor",
        "revert",
        "style",
        "test"
      ]
    ]
  },
  prompt: {
    questions: {
      type: {
        description: "Select the type of change that you're committing",
        enum: {
          feat: {
            description: "A new feature",
            title: "Features",
            emoji: "\u2728"
          },
          fix: {
            description: "A bug fix",
            title: "Bug Fixes",
            emoji: "\u{1F41B}"
          },
          docs: {
            description: "Documentation only changes",
            title: "Documentation",
            emoji: "\u{1F4DA}"
          },
          style: {
            description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
            title: "Styles",
            emoji: "\u{1F48E}"
          },
          refactor: {
            description: "A code change that neither fixes a bug nor adds a feature",
            title: "Code Refactoring",
            emoji: "\u{1F4E6}"
          },
          perf: {
            description: "A code change that improves performance",
            title: "Performance Improvements",
            emoji: "\u{1F680}"
          },
          test: {
            description: "Adding missing tests or correcting existing tests",
            title: "Tests",
            emoji: "\u{1F6A8}"
          },
          build: {
            description: "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
            title: "Builds",
            emoji: "\u{1F6E0}"
          },
          ci: {
            description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
            title: "Continuous Integrations",
            emoji: "\u2699\uFE0F"
          },
          chore: {
            description: "Other changes that don't modify src or test files",
            title: "Chores",
            emoji: "\u267B\uFE0F"
          },
          revert: {
            description: "Reverts a previous commit",
            title: "Reverts",
            emoji: "\u{1F5D1}"
          }
        }
      },
      scope: {
        description: "What is the scope of this change (e.g. component or file name)"
      },
      subject: {
        description: "Write a short, imperative tense description of the change"
      },
      body: {
        description: "Provide a longer description of the change"
      },
      isBreaking: {
        description: "Are there any breaking changes?"
      },
      breakingBody: {
        description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself"
      },
      breaking: {
        description: "Describe the breaking changes"
      },
      isIssueAffected: {
        description: "Does this change affect any open issues?"
      },
      issuesBody: {
        description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself"
      },
      issues: {
        description: 'Add issue references (e.g. "fix #123", "re #123".)'
      }
    }
  }
};

// src/messages.ts
var messages_default = {
  MISSING_JIRA_REFERENCE: `subject should contain JIRA reference in the form of "(fixes XY-123)" or "(refs XY-123)"`
};

// src/config/default.ts
var config = {
  parserPreset: fileURLToPath(new URL("../parser.js", import.meta.url)),
  formatter: fileURLToPath(new URL("../format.js", import.meta.url)),
  prompt: lib_default.prompt,
  rules: {
    ...lib_default.rules,
    /* the changelog is included with the commits by semantic-release and
     * contains quite long lines and we don't really consider the body format to
     * be important so we disable max length (header still applies) */
    "body-max-line-length": [0],
    "jira-reference": [2, "always"]
  },
  plugins: [
    {
      rules: {
        /* require a jira reference at the end of the commit message */
        "jira-reference": ({ subject }) => {
          const jira = /\((refs|fixes) [\dA-Z]+-\d+\)$/;
          return [
            Boolean(subject?.match(jira)),
            messages_default.MISSING_JIRA_REFERENCE
          ];
        }
      }
    }
  ]
};
var default_default = config;
export {
  default_default as default
};
