import { DEFAULT_SUPERBLOCKS_DOMAIN, getSuperblocksDomainFromBaseUrl } from './github-workflow.js';
export function isAzureDevOpsRemoteUrl(remoteUrl) {
    return /(^git@ssh\.dev\.azure\.com:)|(^https?:\/\/([^@]+@)?dev\.azure\.com\/)|(^ssh:\/\/git@ssh\.dev\.azure\.com\/)/.test(remoteUrl.trim());
}
export function buildAzureDevOpsSuperblocksSyncPipeline(domain = DEFAULT_SUPERBLOCKS_DOMAIN) {
    return `trigger:
  branches:
    include:
      - main

pool:
  vmImage: ubuntu-latest

steps:
  - checkout: self
    fetchDepth: 0
    persistCredentials: false

  - task: Bash@3
    displayName: Sync to Superblocks
    env:
      SUPERBLOCKS_TOKEN: $(SUPERBLOCKS_TOKEN)
    inputs:
      targetType: inline
      script: |
        npx @superblocksteam/cli sync --token "$SUPERBLOCKS_TOKEN" --domain ${domain} --path . --sha $(Build.SourceVersion)
`;
}
export function buildAzureDevOpsSuperblocksSyncPipelineFromBaseUrl(superblocksBaseUrl) {
    return buildAzureDevOpsSuperblocksSyncPipeline(getSuperblocksDomainFromBaseUrl(superblocksBaseUrl));
}
//# sourceMappingURL=azure-devops-workflow.js.map