@highstate/restic 0.9.18 → 0.9.20

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 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-G3PMV62Z.js"}
@@ -1,47 +0,0 @@
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';
6
-
7
- var { args, inputs, secrets, outputs } = forUnit(restic.repo);
8
- var remoteName = secrets.rcloneConfig.apply((config) => {
9
- const remoteNames = Array.from(config.matchAll(/(?<=\[).+?(?=\])/g));
10
- if (remoteNames.length === 0) {
11
- throw new Error("No remotes found in rclone config");
12
- }
13
- if (remoteNames.length > 1) {
14
- throw new Error("Multiple remotes found in rclone config");
15
- }
16
- return remoteNames[0][0];
17
- });
18
- var { remoteL3Endpoints, remoteL4Endpoints } = await toPromise(inputs);
19
- var remoteEndpoints = uniqueBy(
20
- [
21
- //
22
- ...args.remoteEndpoints.map(parseL34Endpoint),
23
- ...remoteL3Endpoints,
24
- ...remoteL4Endpoints
25
- ],
26
- l34EndpointToString
27
- );
28
- var repo_default = outputs({
29
- repo: {
30
- type: "rclone",
31
- pathPattern: args.pathPattern,
32
- rcloneConfig: secrets.rcloneConfig,
33
- remoteName,
34
- remoteEndpoints
35
- },
36
- $statusFields: {
37
- remoteName,
38
- remoteEndpoints: {
39
- value: remoteEndpoints.map(l34EndpointToString),
40
- complementaryTo: "remoteEndpoints"
41
- }
42
- }
43
- });
44
-
45
- export { repo_default as default };
46
- //# sourceMappingURL=index.js.map
47
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/repo/index.ts"],"names":[],"mappings":";;;;;;AAKA,IAAM,EAAE,MAAM,MAAA,EAAQ,OAAA,EAAS,SAAQ,GAAI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pointToString, 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/src/repo/index.ts DELETED
@@ -1,51 +0,0 @@
1
- import { restic } from "@highstate/library"
2
- import { forUnit, toPromise } from "@highstate/pulumi"
3
- import { l34EndpointToString, parseL34Endpoint } from "@highstate/common"
4
- import { uniqueBy } from "remeda"
5
-
6
- const { args, inputs, secrets, outputs } = forUnit(restic.repo)
7
-
8
- const remoteName = secrets.rcloneConfig.apply(config => {
9
- const remoteNames = Array.from(config.matchAll(/(?<=\[).+?(?=\])/g))
10
-
11
- if (remoteNames.length === 0) {
12
- throw new Error("No remotes found in rclone config")
13
- }
14
-
15
- if (remoteNames.length > 1) {
16
- throw new Error("Multiple remotes found in rclone config")
17
- }
18
-
19
- return remoteNames[0][0]
20
- })
21
-
22
- const { remoteL3Endpoints, remoteL4Endpoints } = await toPromise(inputs)
23
-
24
- const remoteEndpoints = uniqueBy(
25
- [
26
- //
27
- ...args.remoteEndpoints.map(parseL34Endpoint),
28
- ...remoteL3Endpoints,
29
- ...remoteL4Endpoints,
30
- ],
31
- l34EndpointToString,
32
- )
33
-
34
- export default outputs({
35
- repo: {
36
- type: "rclone",
37
- pathPattern: args.pathPattern,
38
- rcloneConfig: secrets.rcloneConfig,
39
- remoteName,
40
- remoteEndpoints,
41
- },
42
-
43
- $statusFields: {
44
- remoteName,
45
-
46
- remoteEndpoints: {
47
- value: remoteEndpoints.map(l34EndpointToString),
48
- complementaryTo: "remoteEndpoints",
49
- },
50
- },
51
- })