import { DEFAULT_SUPERBLOCKS_DOMAIN, getSuperblocksDomainFromBaseUrl } from './github-workflow.js';
export function isBitbucketRemoteUrl(remoteUrl) {
    return /(^git@bitbucket\.org:)|(^https?:\/\/([^@]+@)?bitbucket\.org\/)|(^ssh:\/\/git@bitbucket\.org\/)/.test(remoteUrl.trim());
}
export function buildBitbucketSuperblocksSyncPipeline(domain = DEFAULT_SUPERBLOCKS_DOMAIN) {
    return `image: superblocksteam/sync-action:v1

pipelines:
  branches:
    main:
      - step:
          name: Sync to Superblocks
          clone:
            depth: full
          script:
            - export SUPERBLOCKS_DOMAIN='${domain}' && /entrypoint.sh
          after-script:
            - echo "Superblocks sync complete"
`;
}
export function buildBitbucketSuperblocksSyncPipelineFromBaseUrl(superblocksBaseUrl) {
    return buildBitbucketSuperblocksSyncPipeline(getSuperblocksDomainFromBaseUrl(superblocksBaseUrl));
}
//# sourceMappingURL=bitbucket-workflow.js.map