@highstate/restic 0.9.10 → 0.9.12

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "sourceHashes": {
3
- "./dist/index.js": "1610a5acb7fc1e922d3121c831b882ff287ac0cf2749bceefdb69d39f39201ce",
4
- "./dist/repo/index.js": "710d064bd08ed46062ec95e3181eef9edcce42e7db06af5011a1dafc94f2209a"
3
+ "./dist/index.js": "190f078493a232c8dc9c71f09692d3a88089b8cad31093d64ebc6b45a665d4ce",
4
+ "./dist/repo/index.js": "dde00525eefae3763627a9b4283fe46715c81a384d4d813a9483d1b97d34b0b8"
5
5
  }
6
6
  }
package/dist/index.js CHANGED
@@ -6398,6 +6398,7 @@ import { batch } from "@pulumi/kubernetes";
6398
6398
  import {
6399
6399
  createScriptContainer,
6400
6400
  CronJob,
6401
+ getProvider,
6401
6402
  Job,
6402
6403
  ScriptBundle,
6403
6404
  Secret
@@ -9149,6 +9150,7 @@ var BackupJobPair = class extends ComponentResource {
9149
9150
  constructor(name, args, opts) {
9150
9151
  super("highstate:restic:BackupJobPair", name, args, opts);
9151
9152
  this.name = name;
9153
+ this.args = args;
9152
9154
  this.opts = opts;
9153
9155
  this.credentials = output(args).apply((args2) => {
9154
9156
  return Secret.create(
@@ -9180,13 +9182,12 @@ var BackupJobPair = class extends ComponentResource {
9180
9182
  curl https://rclone.org/install.sh | bash
9181
9183
  `
9182
9184
  },
9183
- allowedEndpoints: [
9184
- "rclone.org:443",
9185
- "downloads.rclone.org:443",
9186
- ...args2.allowedEndpoints ?? [],
9187
- ...args2.resticRepo.remoteEndpoints ?? []
9188
- ]
9185
+ allowedEndpoints: ["rclone.org:443", "downloads.rclone.org:443"]
9189
9186
  },
9187
+ allowedEndpoints: [
9188
+ ...args2.allowedEndpoints ?? [],
9189
+ ...args2.resticRepo.remoteEndpoints ?? []
9190
+ ],
9190
9191
  environment: {
9191
9192
  RESTIC_REPOSITORY: `rclone:${args2.resticRepo.remoteName}:${repositoryPath}`,
9192
9193
  RESTIC_PASSWORD_FILE: "/credentials/password",
@@ -9286,7 +9287,7 @@ var BackupJobPair = class extends ComponentResource {
9286
9287
  const triggerName = `restic.backup-on-destroy.${this.name}`;
9287
9288
  const invokedTrigger = triggers.find((trigger) => trigger.name === triggerName);
9288
9289
  if (invokedTrigger) {
9289
- this.createBackupOnDestroyJob();
9290
+ void this.createBackupOnDestroyJob();
9290
9291
  return;
9291
9292
  }
9292
9293
  return {
@@ -9298,7 +9299,7 @@ var BackupJobPair = class extends ComponentResource {
9298
9299
  }
9299
9300
  };
9300
9301
  }
9301
- createBackupOnDestroyJob() {
9302
+ async createBackupOnDestroyJob() {
9302
9303
  new batch.v1.Job(
9303
9304
  `${this.name}-backup-on-destroy`,
9304
9305
  {
@@ -9308,7 +9309,7 @@ var BackupJobPair = class extends ComponentResource {
9308
9309
  },
9309
9310
  spec: this.backupJob.cronJob.spec.jobTemplate.spec
9310
9311
  },
9311
- { ...this.opts, parent: this }
9312
+ { ...this.opts, parent: this, provider: await getProvider(this.args.cluster) }
9312
9313
  );
9313
9314
  }
9314
9315
  };