{"version":3,"sources":["jsdelivr-header.js","/npm/@mbialon/provider-project@0.5.101/src/index.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,gKCLA,OAAA,QAAA,UACA,cAAA,QAAA,eACA,SAAA,QAAA,UAEA,aAAA,QAAA,yBACA,iBAAA,QAAA,oBACA,eAAA,QAAA,kBACA,8BAAA,QAAA,iCACA,YAAA,QAAA,eACA,eAAA,QAAA,kBACA,oBAAA,QAAA,uBACA,qBAAA,QAAA,wBACA,aAAA,QAAA,gBACA,qBAAA,QAAA,wBACA,gBAAA,QAAA,mBACA,gBAAA,QAAA,mBACA,cAAA,QAAA,iBAEA,mBAAA,QAAA,sBACA,qBAAA,QAAA,gCACA,iBAAA,QAAA,4BAGM,kBAAoB,EAmDpB,aAAgB,GACb,CAAC,OAAQ,UAAU,SAAS,GAC/B,GAAG,aACH,EAAa,QAAQ,MAAO,KAG5B,2BAA6B,CACjC,mBAAoB,2CACpB,4BAA6B,2CAC7B,wBAAyB,2CACzB,uBAAwB,2CACxB,mBAAoB,2CACpB,qBAAsB,2CACtB,qBAAsB,2CACtB,uBAAwB,2CACxB,gBAAiB,2CACjB,0BAA2B,2CAC3B,sCACE,2CACF,uBAAwB,2CACxB,4BAA6B,2CAC7B,qBAAsB,2CACtB,kCAAmC,2CACnC,+BAAgC,4CAGlC,MAAa,6BAA6B,SAAA,IAAI,YAC5C,WAAA,CAAY,GACV,MAAM,kBACJ,EAAiB,uBACjB,EAAsB,aACtB,EAAY,kBACZ,EAAiB,eACjB,EAAc,YACd,EAAW,kBACX,EAAiB,aACjB,EAAY,gBACZ,EAAe,WACf,EAAa,YAAW,cACxB,EAAgB,wBAAuB,UACvC,EAAY,QAAO,gBACnB,EAAkB,QAAO,cACzB,EAAgB,qCAAoC,SACpD,EAAW,YAAW,SACtB,EAAW,aACT,GAEG,EAAgB,GAAmB,EAAkB,MAAM,KAC5D,EAAe,EAAe,MAAM,KAAK,MAC/C,OAAO,EAAc,GAAG,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A,wCACA,KAAK,YAIb,KAAK,gBAAgB,MAAM,GAC3B,KAAK,UAAU,QAAQ,cACvB,KAAK,kBAAkB,cAGvB,MAAM,EAAoB,KAAK,QAAQ,qBAAsB,CAC3D,YAAa,yDACb,MAAO,CACL,CACE,KAAM,6DACN,KAAM,oBAER,CAAE,QAAS,yBAEb,IAAK,CACH,QAAS,eACT,UAAW,oBACX,SAAU,mBACV,WAAY,sBACZ,mBAAoB,GACpB,UAAW,OArcO,MAwctB,KAAK,eAAe,MAAM,GAEzB,KAAK,cAAsB,SAAS,KAAK,YACxC,sCACA,GAGF,KAAK,eAAe,kBAAkB,CACpC,KAAM,mCACN,IAAK,8BAGP,IAAI,oBAAA,iBAAiB,MACrB,IAAI,qBAAA,kBAAkB,KAAM,CAC1B,eACA,cACA,eAAgB,GAEpB,CAEQ,uBAAA,CAAwB,GAE9B,OAAO,QAAQ,GAAgB,SAAQ,EAAE,EAAM,MAC7C,KAAK,QAAQ,QAAQ,IAAI,EAAM,GAAG,KAAQ,IAAM,GAEpD,EApZF,QAAA,0C","file":"/npm/@mbialon/provider-project@0.5.101/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@mbialon/provider-project@0.5.101/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/* eslint-disable @typescript-eslint/no-require-imports */\nimport assert = require(\"assert\");\nimport { pascalCase } from \"change-case\";\nimport { TextFile, cdk, github, JsonPatch } from \"projen\";\nimport { JobStep } from \"projen/lib/github/workflows-model\";\nimport { UpgradeDependenciesSchedule } from \"projen/lib/javascript\";\nimport { AlertOpenPrs } from \"./alert-open-prs\";\nimport { AutoApprove } from \"./auto-approve\";\nimport { AutoCloseCommunityIssues } from \"./auto-close-community-issues\";\nimport { Automerge } from \"./automerge\";\nimport { CdktfConfig } from \"./cdktf-config\";\nimport { CopyrightHeaders } from \"./copyright-headers\";\nimport { CustomizedLicense } from \"./customized-license\";\nimport { Dependabot } from \"./dependabot\";\nimport { DeprecatePackages } from \"./deprecate-packages\";\nimport { ForceRelease } from \"./force-release\";\nimport { GithubIssues } from \"./github-issues\";\nimport { LockIssues } from \"./lock-issues\";\nimport { PackageInfo } from \"./package-info\";\nimport { ProviderUpgrade } from \"./provider-upgrade\";\nimport { CheckForUpgradesScriptFile } from \"./scripts/check-for-upgrades\";\nimport { ShouldReleaseScriptFile } from \"./scripts/should-release\";\n\n// ensure new projects start with 1.0.0 so that every following breaking change leads to an increased major version\nconst MIN_MAJOR_VERSION = 1;\n\nexport interface CdktfProviderProjectOptions extends cdk.JsiiProjectOptions {\n  readonly useCustomGithubRunner?: boolean;\n  readonly terraformProvider: string;\n  readonly cdktfVersion: string;\n  readonly constructsVersion: string;\n  readonly forceMajorVersion?: number;\n  /**\n   * defaults to \"cdktf\"\n   */\n  readonly namespace?: string;\n  /**\n   * defaults to \"cdktf\"\n   * previously was \"hashicorp\". Used for GitHub org name and package scoping\n   */\n  readonly githubNamespace?: string;\n  readonly mavenEndpoint?: string;\n  /**\n   * defaults to \"HashiCorp\"\n   */\n  readonly nugetOrg?: string;\n  /**\n   * defaults to \"hashicorp\"\n   */\n  readonly mavenOrg?: string;\n  /**\n   * defaults to \"com.${mavenOrg}\"\n   */\n  readonly mavenGroupId?: string;\n  /**\n   * The year of the creation of the repository, for copyright purposes.\n   * Will fall back to the current year if not specified.\n   */\n  readonly creationYear?: number;\n  /**\n   * Whether or not this prebuilt provider is deprecated.\n   * If true, no new versions will be published.\n   */\n  readonly isDeprecated?: boolean;\n  /**\n   * An optional date when the project should be considered deprecated, to be used in the README text.\n   * If no date is provided, then the date of the build will be used by default.\n   */\n  readonly deprecationDate?: string;\n  /**\n   * defaults to \"HashiCorp, Inc.\"\n   */\n  readonly licensee?: string;\n}\n\nconst getMavenName = (providerName: string): string => {\n  return [\"null\", \"random\"].includes(providerName)\n    ? `${providerName}_provider`\n    : providerName.replace(/-/gi, \"_\");\n};\n\nconst githubActionPinnedVersions = {\n  \"actions/checkout\": \"b4ffde65f46336ab88eb53be808477a3936bae11\", // v4.1.1\n  \"actions/download-artifact\": \"9bc31d5ccc31df68ecc42ccf4149144866c47d8a\", // v3.0.2\n  \"actions/github-script\": \"60a0d83039c74a4aee543508d2ffcb1c3799cdea\", // v7.0.1\n  \"actions/setup-dotnet\": \"3447fd6a9f9e57506b15f895c5b76d3b197dc7c2\", // v3.2.0\n  \"actions/setup-go\": \"93397bea11091df50f3d7e59dc26a7711a8bcfbe\", // v4.1.0\n  \"actions/setup-java\": \"0ab4596768b603586c0de567f2430c30f5b0d2b0\", // v3.13.0\n  \"actions/setup-node\": \"8f152de45cc393bb48ce5d89d36b731f54556e65\", // v4.0.0\n  \"actions/setup-python\": \"65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236\", // v4.7.1\n  \"actions/stale\": \"28ca1036281a5e5922ead5184a1bbf96e5fc984e\", // v9.0.0\n  \"actions/upload-artifact\": \"a8a3f3ad30e3422c9c7b888a15615d19a852ae32\", // v3.1.3\n  \"amannn/action-semantic-pull-request\":\n    \"e9fabac35e210fea40ca5b14c0da95a099eff26f\", // v5.4.0\n  \"dessant/lock-threads\": \"1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771\", // v5.0.1\n  \"hashicorp/setup-copywrite\": \"867a1a2a064a0626db322392806428f7dc59cb3e\", // v1.1.2\n  \"imjohnbo/issue-bot\": \"6924a99d928dc228f407d34eb3d0149eda73f2a7\", // v3.4.3\n  \"peter-evans/create-pull-request\": \"153407881ec5c347639a548ade7d8ad1d6740e38\", // v5.0.2\n  \"slackapi/slack-github-action\": \"e28cf165c92ffef168d23c5c9000cffc8a25e117\", // v1.24.0\n};\n\nexport class CdktfProviderProject extends cdk.JsiiProject {\n  constructor(options: CdktfProviderProjectOptions) {\n    const {\n      terraformProvider,\n      workflowContainerImage,\n      cdktfVersion,\n      constructsVersion,\n      minNodeVersion,\n      jsiiVersion,\n      typescriptVersion,\n      isDeprecated,\n      deprecationDate,\n      authorName = \"HashiCorp\",\n      authorAddress = \"https://hashicorp.com\",\n      namespace = \"cdktf\",\n      githubNamespace = \"cdktf\",\n      mavenEndpoint = \"https://hashicorp.oss.sonatype.org\",\n      nugetOrg = \"HashiCorp\",\n      mavenOrg = \"hashicorp\",\n    } = options;\n\n    const [fqproviderName, providerVersion] = terraformProvider.split(\"@\");\n    const providerName = fqproviderName.split(\"/\").pop();\n    assert(providerName, `${terraformProvider} doesn't seem to be valid`);\n    assert(\n      !providerName.endsWith(\"-go\"),\n      \"providerName may not end with '-go' as this can conflict with repos for go packages\"\n    );\n\n    const nugetName = `${nugetOrg}.${pascalCase(\n      namespace\n    )}.Providers.${pascalCase(providerName)}`;\n    const mavenGroupId = options.mavenGroupId ?? `com.${mavenOrg}`;\n    const mavenName = `${mavenGroupId}.${namespace}.providers.${getMavenName(\n      providerName\n    )}`;\n    const repositoryUrl = `github.com/${githubNamespace}/${namespace}-provider-${providerName.replace(\n      /-/g,\n      \"\"\n    )}`;\n\n    const packageInfo: PackageInfo = {\n      npm: {\n        name: `@${githubNamespace}/provider-${providerName}`,\n      },\n      python: {\n        distName: `${githubNamespace}-${namespace}-provider-${providerName.replace(\n          /-/gi,\n          \"_\"\n        )}`,\n        module: `${githubNamespace}_${namespace}_provider_${providerName.replace(\n          /-/gi,\n          \"_\"\n        )}`,\n      },\n      publishToNuget: {\n        dotNetNamespace: nugetName,\n        packageId: nugetName,\n      },\n      publishToMaven: {\n        javaPackage: mavenName,\n        mavenGroupId: mavenGroupId,\n        mavenArtifactId: `${namespace}-provider-${providerName}`,\n        mavenEndpoint,\n      },\n      publishToGo: {\n        moduleName: `${repositoryUrl}-go`,\n        gitUserEmail: \"github-team-tf-cdk@hashicorp.com\",\n        gitUserName: \"CDK for Terraform Team\",\n        packageName: providerName.replace(/-/g, \"\"),\n        // In order to use the copywrite action, we need to rebuild the full pre-publish steps workflow unfortunately\n        // If someone knows a better way to do this mutation with minimal custom code, please do so\n        prePublishSteps: [\n          {\n            name: \"Prepare Repository\",\n            run: \"mv dist .repo\",\n          },\n          {\n            name: \"Install Dependencies\",\n            run: \"cd .repo && yarn install --check-files --frozen-lockfile\",\n          },\n          {\n            name: \"Create go artifact\",\n            run: \"cd .repo && npx projen package:go\",\n          },\n          {\n            name: \"Setup Copywrite tool\",\n            uses: \"hashicorp/setup-copywrite\",\n          },\n          {\n            name: \"Copy copywrite hcl file\",\n            run: \"cp .repo/.copywrite.hcl .repo/dist/go/.copywrite.hcl\",\n          },\n          {\n            name: \"Add headers using Copywrite tool\",\n            run: \"cd .repo/dist/go && copywrite headers\",\n          },\n          {\n            name: \"Remove copywrite hcl file\",\n            run: \"rm -f .repo/dist/go/.copywrite.hcl\",\n          },\n          {\n            name: \"Remove some text from the README that doesn't apply to Go\",\n            run: [\n              \"sed -i 's/# CDKTF prebuilt bindings for/# CDKTF Go bindings for/' .repo/dist/go/*/README.md\",\n              // @see https://stackoverflow.com/a/49511949\n              \"sed -i -e '/## Available Packages/,/### Go/!b' -e '/### Go/!d;p; s/### Go/## Go Package/' -e 'd' .repo/dist/go/*/README.md\",\n              // sed -e is black magic and for whatever reason the string replace doesn't work so let's try it again:\n              // eslint-disable-next-line prettier/prettier\n              `sed -i 's/### Go/## ${isDeprecated ? 'Deprecated' : 'Go'} Package/' .repo/dist/go/*/README.md`,\n              // Just straight up delete these full lines and everything in between them:\n              \"sed -i -e '/API.typescript.md/,/You can also visit a hosted version/!b' -e 'd' .repo/dist/go/*/README.md\",\n              `sed -i 's|Find auto-generated docs for this provider here:|Find auto-generated docs for this provider [here](https://${repositoryUrl}/blob/main/docs/API.go.md).|' .repo/dist/go/*/README.md`,\n              // Just straight up delete these full lines and everything in between them:\n              \"sed -i -e '/### Provider Version/,/The provider version can be adjusted/!b' -e 'd' .repo/dist/go/*/README.md\",\n            ].join(\"\\n\"),\n          },\n          {\n            name: \"Copy the README file to the parent directory\",\n            run: \"cp .repo/dist/go/*/README.md .repo/dist/go/README.md\",\n          },\n          {\n            name: \"Collect go Artifact\",\n            run: \"mv .repo/dist dist\",\n          },\n        ],\n      },\n    };\n\n    const repository = `${githubNamespace}/${namespace}-provider-${providerName.replace(\n      /-/g,\n      \"\"\n    )}`;\n\n    const workflowRunsOn = options.useCustomGithubRunner\n      ? [\"custom\", \"linux\", \"custom-linux-medium\"] // 8 core, 32 GB\n      : [\"ubuntu-latest\"]; // 7 GB\n\n    super({\n      ...options,\n      authorAddress,\n      authorName,\n      minNodeVersion,\n      workflowContainerImage,\n      workflowRunsOn,\n      licensed: false, // we do supply our own license file with a custom header\n      releaseToNpm: true,\n      devDeps: [\n        \"@actions/core@^1.1.0\",\n        \"dot-prop@^5.2.0\",\n        ...(options.devDeps ?? []),\n      ],\n      name: packageInfo.npm.name,\n      description: `Prebuilt ${providerName} Provider for Terraform CDK (cdktf)`,\n      keywords: [\"cdktf\", \"terraform\", \"cdk\", \"provider\", providerName],\n      sampleCode: false,\n      jest: false,\n      authorOrganization: true,\n      defaultReleaseBranch: \"main\",\n      repository: `https://github.com/${repository}.git`,\n      mergify: false,\n      eslint: false,\n      depsUpgrade: !isDeprecated,\n      depsUpgradeOptions: {\n        workflowOptions: {\n          labels: [\"automerge\", \"auto-approve\", \"dependencies\"],\n          schedule: UpgradeDependenciesSchedule.WEEKLY,\n        },\n      },\n      python: packageInfo.python,\n      publishToNuget: packageInfo.publishToNuget,\n      publishToMaven: packageInfo.publishToMaven,\n      publishToGo: packageInfo.publishToGo,\n      releaseFailureIssue: true,\n      peerDependencyOptions: {\n        pinnedDevDependency: false,\n      },\n      workflowGitIdentity: {\n        name: \"team-tf-cdk\",\n        email: \"github-team-tf-cdk@hashicorp.com\",\n      },\n      minMajorVersion: MIN_MAJOR_VERSION,\n      stale: true,\n      staleOptions: {\n        issues: {\n          staleLabel: \"stale\",\n          daysBeforeStale: 45,\n          staleMessage:\n            \"45 days have passed since this issue was opened, and I assume other publishes have succeeded in the meantime. \" +\n            \"If no one removes the `stale` label or comments, I'm going to auto-close this issue in 14 days.\",\n          daysBeforeClose: 14,\n          closeMessage:\n            \"2 months have passed, so I'm closing this issue with the assumption that other publishes have succeeded in the meantime.\",\n        },\n        pullRequest: {\n          staleLabel: \"stale\",\n          daysBeforeStale: 1,\n          staleMessage: `Closing this PR, if it has not merged there is most likely a CI or CDKTF issue preventing it from merging. If this has been a manual PR, please reopen it and add the \\`no-auto-close\\` label to prevent this from happening again.`,\n          daysBeforeClose: 0,\n          exemptLabels: [\"no-auto-close\"],\n        },\n      },\n      pullRequestTemplate: false,\n      docgen: false,\n    });\n\n    // Default memory is 7GB: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources\n    // Custom Runners we use have 32GB of memory\n    // The below numbers set heap limits that are ~1gb and ~0.5gb less, respectively, than the total available memory\n    const maxOldSpaceSize = options.useCustomGithubRunner ? \"31744\" : \"6656\";\n\n    // Golang needs more memory to build\n    this.tasks.addEnvironment(\n      \"NODE_OPTIONS\",\n      `--max-old-space-size=${maxOldSpaceSize}`\n    );\n\n    this.tasks.addEnvironment(\"CHECKPOINT_DISABLE\", \"1\");\n\n    this.package.addPackageResolutions(\"@types/yargs@17.0.13\");\n\n    const setSafeDirectory = {\n      name: \"Set git config safe.directory\",\n      run: \"git config --global --add safe.directory $(pwd)\",\n    };\n\n    ((this.buildWorkflow as any).preBuildSteps as JobStep[]).push(\n      setSafeDirectory\n    );\n    (this.release as any).defaultBranch.workflow.jobs.release.steps.splice(\n      1,\n      0,\n      setSafeDirectory\n    );\n\n    if (!isDeprecated) {\n      const { upgrade, pr } = (this.upgradeWorkflow as any).workflows[0].jobs;\n      upgrade.steps.splice(1, 0, setSafeDirectory);\n      pr.steps.splice(1, 0, setSafeDirectory);\n    }\n\n    // Fix maven issue (https://github.com/cdklabs/publib/pull/777)\n    github.GitHub.of(this)?.tryFindWorkflow(\"release\")?.file?.patch(\n      JsonPatch.add(\n        \"/jobs/release_maven/steps/8/env/MAVEN_OPTS\",\n        // See https://stackoverflow.com/questions/70153962/nexus-staging-maven-plugin-maven-deploy-failed-an-api-incompatibility-was-enco\n        \"--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED\"\n      )\n    );\n\n    this.pinGithubActionVersions(githubActionPinnedVersions);\n\n    new CdktfConfig(this, {\n      terraformProvider,\n      providerName,\n      fqproviderName,\n      providerVersion,\n      cdktfVersion,\n      constructsVersion,\n      jsiiVersion,\n      typescriptVersion,\n      packageInfo,\n      githubNamespace,\n      deprecationDate,\n      isDeprecated: !!isDeprecated,\n    });\n    new CustomizedLicense(this, options.creationYear, options.licensee);\n    new GithubIssues(this, { providerName });\n    new AutoApprove(this);\n    new AutoCloseCommunityIssues(this, { providerName });\n    new Automerge(this);\n    new LockIssues(this);\n\n    if (!isDeprecated) {\n      const upgradeScript = new CheckForUpgradesScriptFile(this, {\n        providerVersion,\n        fqproviderName,\n      });\n      new ProviderUpgrade(this, {\n        checkForUpgradesScriptPath: upgradeScript.path,\n        workflowRunsOn,\n        nodeHeapSize: maxOldSpaceSize,\n      });\n      new AlertOpenPrs(this, {\n        slackWebhookUrl: \"${{ secrets.ALERT_PRS_SLACK_WEBHOOK_URL }}\",\n        repository,\n      });\n      new ForceRelease(this, {\n        workflowRunsOn,\n        repositoryUrl,\n      });\n      new Dependabot(this);\n    }\n\n    new TextFile(this, \".github/CODEOWNERS\", {\n      lines: [\n        \"# These owners will be the default owners for everything in \",\n        \"# the repo. Unless a later match takes precedence, \",\n        \"# they will be requested for review when someone opens a \",\n        \"# pull request.\",\n        \"*       @cdktf/tf-cdk-team\",\n      ],\n    });\n\n    if (!isDeprecated) {\n      new ShouldReleaseScriptFile(this, {});\n\n      const releaseTask = this.tasks.tryFind(\"release\")!;\n      this.removeTask(\"release\");\n      this.addTask(\"release\", {\n        description: releaseTask.description,\n        steps: releaseTask.steps,\n        env: (releaseTask as any)._env,\n        condition: \"node ./scripts/should-release.js\",\n      });\n\n      const releaseJobSteps: any[] = (\n        this.github?.tryFindWorkflow(\"release\") as any\n      ).jobs.release.steps;\n      const gitRemoteJob = releaseJobSteps.find((it) => it.id === \"git_remote\");\n      assert(\n        gitRemoteJob.run ===\n          'echo \"latest_commit=$(git ls-remote origin -h ${{ github.ref }} | cut -f1)\" >> $GITHUB_OUTPUT',\n        \"git_remote step in release workflow did not match expected string, please check if the workaround still works!\"\n      );\n      const previousCommand = gitRemoteJob.run;\n      const cancelCommand =\n        'echo \"latest_commit=release_cancelled\" >> $GITHUB_OUTPUT'; // this cancels the release via a non-matching SHA;\n      gitRemoteJob.run = `node ./scripts/should-release.js && ${previousCommand} || ${cancelCommand}`;\n      gitRemoteJob.name +=\n        \" or cancel via faking a SHA if release was cancelled\";\n    }\n\n    // Submodule documentation generation\n    this.gitignore.exclude(\"API.md\"); // ignore the old file, we now generate it in the docs folder\n    this.addDevDeps(\"jsii-docgen@^10.2.3\");\n    this.addDevDeps(`jsii-rosetta@~5.2.0`);\n\n    const docgen = this.addTask(\"docgen\", {\n      description: \"Generate documentation for the project\",\n      steps: [\n        {\n          exec: [\n            \"rm -rf docs\",\n            \"rm -f API.md\",\n            \"mkdir docs\",\n            \"jsii-docgen --split-by-submodule -l typescript -l python -l java -l csharp -l go\",\n            // There is no nice way to tell jsii-docgen to generate docs into a folder so I went this route\n            \"mv *.*.md docs\",\n            // Some part of the documentation are too long, we need to truncate them to ~10MB\n            \"cd docs\",\n            \"ls ./ | xargs sed -i '150000,$ d' $1\",\n          ].join(\" && \"),\n        },\n      ],\n    });\n    this.postCompileTask.spawn(docgen);\n    this.gitignore.include(`/docs/*.md`);\n    this.annotateGenerated(`/docs/*.md`);\n\n    // Setting the version in package.json so the golang docs have the correct version\n    const unconditionalBump = this.addTask(\"unconditional-bump\", {\n      description: \"Set the version in package.json to the current version\",\n      steps: [\n        {\n          name: \"Clear the changelog so that it doesn't get published twice\",\n          exec: \"rm -f $CHANGELOG\",\n        },\n        { builtin: \"release/bump-version\" },\n      ],\n      env: {\n        OUTFILE: \"package.json\",\n        CHANGELOG: \"dist/changelog.md\",\n        BUMPFILE: \"dist/version.txt\",\n        RELEASETAG: \"dist/releasetag.txt\",\n        RELEASE_TAG_PREFIX: \"\",\n        MIN_MAJOR: String(MIN_MAJOR_VERSION),\n      },\n    });\n    this.preCompileTask.spawn(unconditionalBump);\n    // To bump correctly we need to have the completely cloned repo\n    (this.buildWorkflow as any).workflow.file.addOverride(\n      \"jobs.build.steps.0.with.fetch-depth\",\n      0\n    );\n    // Undo the changes after compilation\n    this.buildWorkflow?.addPostBuildSteps({\n      name: \"Revert package.json version bump\",\n      run: \"git checkout package.json\",\n    });\n\n    new CopyrightHeaders(this);\n    new DeprecatePackages(this, {\n      providerName,\n      packageInfo,\n      isDeprecated: !!isDeprecated,\n    });\n  }\n\n  private pinGithubActionVersions(pinnedVersions: Record<string, string>) {\n    // Use pinned versions of github actions\n    Object.entries(pinnedVersions).forEach(([name, sha]) => {\n      this.github?.actions.set(name, `${name}@${sha}`);\n    });\n  }\n}\n"]}