@highstate/restic 0.9.15 → 0.9.18

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,10 +1,9 @@
1
- import "../chunk-G3PMV62Z.js";
1
+ import '../chunk-G3PMV62Z.js';
2
+ import { restic } from '@highstate/library';
3
+ import { forUnit, toPromise } from '@highstate/pulumi';
4
+ import { parseL34Endpoint, l34EndpointToString } from '@highstate/common';
5
+ import { uniqueBy } from 'remeda';
2
6
 
3
- // src/repo/index.ts
4
- import { restic } from "@highstate/library";
5
- import { forUnit, toPromise } from "@highstate/pulumi";
6
- import { l34EndpointToString, parseL34Endpoint } from "@highstate/common";
7
- import { uniqueBy } from "remeda";
8
7
  var { args, inputs, secrets, outputs } = forUnit(restic.repo);
9
8
  var remoteName = secrets.rcloneConfig.apply((config) => {
10
9
  const remoteNames = Array.from(config.matchAll(/(?<=\[).+?(?=\])/g));
@@ -34,7 +33,7 @@ var repo_default = outputs({
34
33
  remoteName,
35
34
  remoteEndpoints
36
35
  },
37
- $status: {
36
+ $statusFields: {
38
37
  remoteName,
39
38
  remoteEndpoints: {
40
39
  value: remoteEndpoints.map(l34EndpointToString),
@@ -42,7 +41,7 @@ var repo_default = outputs({
42
41
  }
43
42
  }
44
43
  });
45
- export {
46
- repo_default as default
47
- };
44
+
45
+ export { repo_default as default };
46
+ //# sourceMappingURL=index.js.map
48
47
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/repo/index.ts"],"sourcesContent":["import { restic } from \"@highstate/library\"\nimport { forUnit, toPromise } from \"@highstate/pulumi\"\nimport { l34EndpointToString, parseL34Endpoint } from \"@highstate/common\"\nimport { uniqueBy } from \"remeda\"\n\nconst { args, inputs, secrets, outputs } = forUnit(restic.repo)\n\nconst remoteName = secrets.rcloneConfig.apply(config => {\n const remoteNames = Array.from(config.matchAll(/(?<=\\[).+?(?=\\])/g))\n\n if (remoteNames.length === 0) {\n throw new Error(\"No remotes found in rclone config\")\n }\n\n if (remoteNames.length > 1) {\n throw new Error(\"Multiple remotes found in rclone config\")\n }\n\n return remoteNames[0][0]\n})\n\nconst { remoteL3Endpoints, remoteL4Endpoints } = await toPromise(inputs)\n\nconst remoteEndpoints = uniqueBy(\n [\n //\n ...args.remoteEndpoints.map(parseL34Endpoint),\n ...remoteL3Endpoints,\n ...remoteL4Endpoints,\n ],\n l34EndpointToString,\n)\n\nexport default outputs({\n repo: {\n type: \"rclone\",\n pathPattern: args.pathPattern,\n rcloneConfig: secrets.rcloneConfig,\n remoteName,\n remoteEndpoints,\n },\n\n $status: {\n remoteName,\n\n remoteEndpoints: {\n value: remoteEndpoints.map(l34EndpointToString),\n complementaryTo: \"remoteEndpoints\",\n },\n },\n})\n"],"mappings":";;;AAAA,SAAS,cAAc;AACvB,SAAS,SAAS,iBAAiB;AACnC,SAAS,qBAAqB,wBAAwB;AACtD,SAAS,gBAAgB;AAEzB,IAAM,EAAE,MAAM,QAAQ,SAAS,QAAQ,IAAI,QAAQ,OAAO,IAAI;AAE9D,IAAM,aAAa,QAAQ,aAAa,MAAM,YAAU;AACtD,QAAM,cAAc,MAAM,KAAK,OAAO,SAAS,mBAAmB,CAAC;AAEnE,MAAI,YAAY,WAAW,GAAG;AAC5B,UAAM,IAAI,MAAM,mCAAmC;AAAA,EACrD;AAEA,MAAI,YAAY,SAAS,GAAG;AAC1B,UAAM,IAAI,MAAM,yCAAyC;AAAA,EAC3D;AAEA,SAAO,YAAY,CAAC,EAAE,CAAC;AACzB,CAAC;AAED,IAAM,EAAE,mBAAmB,kBAAkB,IAAI,MAAM,UAAU,MAAM;AAEvE,IAAM,kBAAkB;AAAA,EACtB;AAAA;AAAA,IAEE,GAAG,KAAK,gBAAgB,IAAI,gBAAgB;AAAA,IAC5C,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAAA,EACA;AACF;AAEA,IAAO,eAAQ,QAAQ;AAAA,EACrB,MAAM;AAAA,IACJ,MAAM;AAAA,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A;AAAA,IAClB,cAAc,OAAA,CAAQ,YAAA;AAAA,IACtB,UAAA;AAAA,IACA;AAAA,GACF;AAAA,EAEA,aAAA,EAAe;AAAA,IACb,UAAA;AAAA,IAEA,eAAA,EAAiB;AAAA,MACf,KAAA,EAAO,eAAA,CAAgB,GAAA,CAAI,mBAAmB,CAAA;AAAA,MAC9C,eAAA,EAAiB;AAAA;AACnB;AAEJ,CAAC","file":"index.js","sourcesContent":["import { restic } from \"@highstate/library\"\nimport { forUnit, toPromise } from \"@highstate/pulumi\"\nimport { l34EndpointToString, parseL34Endpoint } from \"@highstate/common\"\nimport { uniqueBy } from \"remeda\"\n\nconst { args, inputs, secrets, outputs } = forUnit(restic.repo)\n\nconst remoteName = secrets.rcloneConfig.apply(config => {\n const remoteNames = Array.from(config.matchAll(/(?<=\\[).+?(?=\\])/g))\n\n if (remoteNames.length === 0) {\n throw new Error(\"No remotes found in rclone config\")\n }\n\n if (remoteNames.length > 1) {\n throw new Error(\"Multiple remotes found in rclone config\")\n }\n\n return remoteNames[0][0]\n})\n\nconst { remoteL3Endpoints, remoteL4Endpoints } = await toPromise(inputs)\n\nconst remoteEndpoints = uniqueBy(\n [\n //\n ...args.remoteEndpoints.map(parseL34Endpoint),\n ...remoteL3Endpoints,\n ...remoteL4Endpoints,\n ],\n l34EndpointToString,\n)\n\nexport default outputs({\n repo: {\n type: \"rclone\",\n pathPattern: args.pathPattern,\n rcloneConfig: secrets.rcloneConfig,\n remoteName,\n remoteEndpoints,\n },\n\n $statusFields: {\n remoteName,\n\n remoteEndpoints: {\n value: remoteEndpoints.map(l34EndpointToString),\n complementaryTo: \"remoteEndpoints\",\n },\n },\n})\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highstate/restic",
3
- "version": "0.9.15",
3
+ "version": "0.9.18",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -21,15 +21,15 @@
21
21
  "update-images": "../../scripts/update-images.sh ./assets/images.json"
22
22
  },
23
23
  "dependencies": {
24
- "@highstate/common": "^0.9.15",
25
- "@highstate/k8s": "^0.9.15",
26
- "@highstate/library": "^0.9.15",
27
- "@highstate/pulumi": "^0.9.15",
24
+ "@highstate/common": "^0.9.18",
25
+ "@highstate/k8s": "^0.9.18",
26
+ "@highstate/library": "^0.9.18",
27
+ "@highstate/pulumi": "^0.9.18",
28
28
  "@pulumi/kubernetes": "^4.18.0",
29
29
  "remeda": "^2.21.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@highstate/cli": "^0.9.15"
32
+ "@highstate/cli": "^0.9.18"
33
33
  },
34
- "gitHead": "f61b9905d4cd50511b03331411f42595403ebc06"
34
+ "gitHead": "9ebcd7da56b00b8ca08bf52cc8438f527338cd64"
35
35
  }
package/src/job-pair.ts CHANGED
@@ -40,7 +40,7 @@ export type BackupJobPairArgs = CommonArgs & {
40
40
  /**
41
41
  * The repository to backup/restore to/from.
42
42
  */
43
- resticRepo: Input<restic.Repo>
43
+ resticRepo: Input<restic.Repository>
44
44
 
45
45
  /**
46
46
  * The password used to encrypt the backups.
@@ -307,9 +307,12 @@ export class BackupJobPair extends ComponentResource {
307
307
  createTerminal(): InstanceTerminal {
308
308
  return {
309
309
  name: "restic",
310
- title: "Restic",
311
- description: "Manage Restic repository",
312
- icon: "material-symbols:backup",
310
+
311
+ meta: {
312
+ title: "Restic",
313
+ description: "Manage Restic repository",
314
+ icon: "material-symbols:backup",
315
+ },
313
316
 
314
317
  image: images["terminal-restic"].image,
315
318
  command: ["bash", "/welcome.sh"],
package/src/repo/index.ts CHANGED
@@ -40,7 +40,7 @@ export default outputs({
40
40
  remoteEndpoints,
41
41
  },
42
42
 
43
- $status: {
43
+ $statusFields: {
44
44
  remoteName,
45
45
 
46
46
  remoteEndpoints: {