@highstate/common 0.12.0 → 0.13.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.
- package/dist/highstate.manifest.json +2 -1
- package/dist/units/databases/existing-redis/index.js +19 -0
- package/dist/units/databases/existing-redis/index.js.map +1 -0
- package/package.json +13 -8
- package/src/units/databases/existing-redis/index.ts +18 -0
- package/src/units/databases/existing-s3/index.ts +15 -0
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"./dist/units/server-patch/index.js": 2212294583,
|
|
13
13
|
"./dist/units/databases/existing-mariadb/index.js": 2212294583,
|
|
14
14
|
"./dist/units/databases/existing-postgresql/index.js": 2212294583,
|
|
15
|
-
"./dist/units/databases/existing-mongodb/index.js": 2212294583
|
|
15
|
+
"./dist/units/databases/existing-mongodb/index.js": 2212294583,
|
|
16
|
+
"./dist/units/databases/existing-redis/index.js": 2212294583
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { parseEndpoints } from '../../../chunk-WFWXDYUX.js';
|
|
2
|
+
import { databases } from '@highstate/library';
|
|
3
|
+
import { forUnit } from '@highstate/pulumi';
|
|
4
|
+
|
|
5
|
+
var { args, inputs, outputs } = forUnit(databases.existingRedis);
|
|
6
|
+
var redisDatabase = args.database === void 0 ? void 0 : Number.parseInt(args.database, 10);
|
|
7
|
+
if (redisDatabase !== void 0 && Number.isNaN(redisDatabase)) {
|
|
8
|
+
throw new Error(`Invalid Redis database number "${args.database}"`);
|
|
9
|
+
}
|
|
10
|
+
var existing_redis_default = outputs({
|
|
11
|
+
redis: {
|
|
12
|
+
endpoints: parseEndpoints(args.endpoints, inputs.endpoints),
|
|
13
|
+
database: redisDatabase ?? 0
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export { existing_redis_default as default };
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/units/databases/existing-redis/index.ts"],"names":[],"mappings":";;;;AAIA,IAAM,EAAE,IAAA,EAAM,MAAA,EAAQ,SAAQ,GAAI,OAAA,CAAQ,UAAU,aAAa,CAAA;AAEjE,IAAM,aAAA,GAAgB,KAAK,QAAA,KAAa,MAAA,GAAY,SAAY,MAAA,CAAO,QAAA,CAAS,IAAA,CAAK,QAAA,EAAU,EAAE,CAAA;AAEjG,IAAI,aAAA,KAAkB,MAAA,IAAa,MAAA,CAAO,KAAA,CAAM,aAAa,CAAA,EAAG;AAC9D,EAAA,MAAM,IAAI,KAAA,CAAM,CAAA,+BAAA,EAAkC,IAAA,CAAK,QAAQ,CAAA,CAAA,CAAG,CAAA;AACpE;AAEA,IAAO,yBAAQ,OAAA,CAAQ;AAAA,EACrB,KAAA,EAAO;AAAA,IACL,SAAA,EAAW,cAAA,CAAe,IAAA,CAAK,SAAA,EAAW,OAAO,SAAS,CAAA;AAAA,IAC1D,UAAU,aAAA,IAAiB;AAAA;AAE/B,CAAC","file":"index.js","sourcesContent":["import { databases } from \"@highstate/library\"\nimport { forUnit } from \"@highstate/pulumi\"\nimport { parseEndpoints } from \"../../../shared\"\n\nconst { args, inputs, outputs } = forUnit(databases.existingRedis)\n\nconst redisDatabase = args.database === undefined ? undefined : Number.parseInt(args.database, 10)\n\nif (redisDatabase !== undefined && Number.isNaN(redisDatabase)) {\n throw new Error(`Invalid Redis database number \"${args.database}\"`)\n}\n\nexport default outputs({\n redis: {\n endpoints: parseEndpoints(args.endpoints, inputs.endpoints),\n database: redisDatabase ?? 0,\n },\n})\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@highstate/common",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -59,6 +59,10 @@
|
|
|
59
59
|
"./units/databases/existing-mongodb": {
|
|
60
60
|
"mode": "manual",
|
|
61
61
|
"version": "1"
|
|
62
|
+
},
|
|
63
|
+
"./units/databases/existing-redis": {
|
|
64
|
+
"mode": "manual",
|
|
65
|
+
"version": "1"
|
|
62
66
|
}
|
|
63
67
|
}
|
|
64
68
|
},
|
|
@@ -78,15 +82,13 @@
|
|
|
78
82
|
"./units/server-patch": "./dist/units/server-patch/index.js",
|
|
79
83
|
"./units/databases/existing-mariadb": "./dist/units/databases/existing-mariadb/index.js",
|
|
80
84
|
"./units/databases/existing-postgresql": "./dist/units/databases/existing-postgresql/index.js",
|
|
81
|
-
"./units/databases/existing-mongodb": "./dist/units/databases/existing-mongodb/index.js"
|
|
85
|
+
"./units/databases/existing-mongodb": "./dist/units/databases/existing-mongodb/index.js",
|
|
86
|
+
"./units/databases/existing-redis": "./dist/units/databases/existing-redis/index.js"
|
|
82
87
|
},
|
|
83
88
|
"publishConfig": {
|
|
84
89
|
"access": "public"
|
|
85
90
|
},
|
|
86
91
|
"dependencies": {
|
|
87
|
-
"@highstate/contract": "^0.10.0",
|
|
88
|
-
"@highstate/library": "^0.10.0",
|
|
89
|
-
"@highstate/pulumi": "^0.10.0",
|
|
90
92
|
"@noble/hashes": "^1.7.1",
|
|
91
93
|
"@pulumi/command": "^1.0.2",
|
|
92
94
|
"micro-key-producer": "^0.7.3",
|
|
@@ -94,15 +96,18 @@
|
|
|
94
96
|
"remeda": "^2.21.0",
|
|
95
97
|
"tar": "^7.4.3",
|
|
96
98
|
"unzipper": "^0.12.3",
|
|
97
|
-
"import-meta-resolve": "^4.1.0"
|
|
99
|
+
"import-meta-resolve": "^4.1.0",
|
|
100
|
+
"@highstate/contract": "0.13.0",
|
|
101
|
+
"@highstate/library": "0.13.0",
|
|
102
|
+
"@highstate/pulumi": "0.13.0"
|
|
98
103
|
},
|
|
99
104
|
"devDependencies": {
|
|
100
105
|
"@biomejs/biome": "2.2.0",
|
|
101
|
-
"@highstate/cli": "^0.10.0",
|
|
102
106
|
"@types/tar": "^6.1.13",
|
|
103
107
|
"@types/unzipper": "^0.10.11",
|
|
104
108
|
"@typescript/native-preview": "^7.0.0-dev.20250920.1",
|
|
105
|
-
"type-fest": "^4.41.0"
|
|
109
|
+
"type-fest": "^4.41.0",
|
|
110
|
+
"@highstate/cli": "0.13.0"
|
|
106
111
|
},
|
|
107
112
|
"repository": {
|
|
108
113
|
"url": "https://github.com/highstate-io/highstate"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { databases } from "@highstate/library"
|
|
2
|
+
import { forUnit } from "@highstate/pulumi"
|
|
3
|
+
import { parseEndpoints } from "../../../shared"
|
|
4
|
+
|
|
5
|
+
const { args, inputs, outputs } = forUnit(databases.existingRedis)
|
|
6
|
+
|
|
7
|
+
const redisDatabase = args.database === undefined ? undefined : Number.parseInt(args.database, 10)
|
|
8
|
+
|
|
9
|
+
if (redisDatabase !== undefined && Number.isNaN(redisDatabase)) {
|
|
10
|
+
throw new Error(`Invalid Redis database number "${args.database}"`)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default outputs({
|
|
14
|
+
redis: {
|
|
15
|
+
endpoints: parseEndpoints(args.endpoints, inputs.endpoints),
|
|
16
|
+
database: redisDatabase ?? 0,
|
|
17
|
+
},
|
|
18
|
+
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { databases } from "@highstate/library"
|
|
2
|
+
import { forUnit } from "@highstate/pulumi"
|
|
3
|
+
import { parseEndpoints } from "../../../shared"
|
|
4
|
+
|
|
5
|
+
const { args, secrets, inputs, outputs } = forUnit(databases.existingS3)
|
|
6
|
+
|
|
7
|
+
export default outputs({
|
|
8
|
+
s3: {
|
|
9
|
+
endpoints: parseEndpoints(args.endpoints, inputs.endpoints),
|
|
10
|
+
region: args.region,
|
|
11
|
+
accessKey: args.accessKey,
|
|
12
|
+
secretKey: secrets.secretKey,
|
|
13
|
+
buckets: args.buckets,
|
|
14
|
+
},
|
|
15
|
+
})
|