@firestartr/cli 1.50.0-snapshot-2 → 1.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/index.js +14 -3
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -312792,6 +312792,7 @@ var dependabot_secret = __nccwpck_require__(82783);
312792
312792
 
312793
312793
 
312794
312794
 
312795
+
312795
312796
  async function provisionRepositorySecrets(scope, repo, fsGithubRepository) {
312796
312797
  const sections = ['actions', 'codespaces', 'dependabot'];
312797
312798
  if ('secrets' in fsGithubRepository.spec) {
@@ -312828,14 +312829,24 @@ async function provisionRepositorySecret(scope, repo, section, repoSecretName, s
312828
312829
  async function createEncryptedSecrect(scope, repo, secretRef, secretClass, section, repoSecretName, repoResource) {
312829
312830
  const { key_id, encrypted_value } = await encryptSecret(repo, secretRef);
312830
312831
  const resourceKey = `${section}-${repoSecretName.toLowerCase()}-secret`;
312831
- const tfStateKey = `_${repo.getTfStateKey()}-${resourceKey}`;
312832
- const sc = new secretClass(scope, tfStateKey, {
312832
+ const plainTextSecret = repo.resolveSecretRef({
312833
+ name: secretRef.name,
312834
+ key: secretRef.key,
312835
+ });
312836
+ const sha256 = external_crypto_default().createHash('sha256')
312837
+ .update(plainTextSecret)
312838
+ .digest('hex');
312839
+ const secretResourceName = `_${repoSecretName}-${sha256.slice(0, 12)}`;
312840
+ const instanceLifecycle = {
312841
+ ignoreChanges: ['encrypted_value'],
312842
+ };
312843
+ const sc = new secretClass(scope, secretResourceName, {
312833
312844
  secretName: repoSecretName,
312834
312845
  repository: repo.metadata.name,
312835
312846
  encryptedValue: encrypted_value,
312836
312847
  dependsOn: [repoResource],
312848
+ lifecycle: instanceLifecycle,
312837
312849
  });
312838
- provisioner_src_logger.info(tfStateKey);
312839
312850
  repo.addResourceToStack(resourceKey, sc);
312840
312851
  }
312841
312852
  async function createUnencryptedSecret(scope, repo, secretRef, secretClass, section, repoSecretName, repoResource) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "1.50.0-snapshot-2",
3
+ "version": "1.50.0",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",