@highstate/pulumi 0.4.5 → 0.5.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/index.mjs +6 -6
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { secret, Config, output,
|
1
|
+
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { secret, getStack, Config, output, StackReference, all } from '@pulumi/pulumi';
|
2
2
|
export * from '@pulumi/pulumi';
|
3
3
|
import { getInstanceId, parseInstanceId } from '@highstate/contract';
|
4
4
|
import { Type } from '@sinclair/typebox';
|
@@ -24,9 +24,10 @@ function getOrCreateSecret(secrets, key, create) {
|
|
24
24
|
|
25
25
|
const ajv = new Ajv();
|
26
26
|
const stackRefMap = /* @__PURE__ */ new Map();
|
27
|
+
const [projectId, instanceName] = getStack().split("_");
|
27
28
|
function getStackRef(input) {
|
28
|
-
const [instanceType,
|
29
|
-
const key = `organization/${instanceType}/${
|
29
|
+
const [instanceType, instanceName2] = parseInstanceId(input.instanceId);
|
30
|
+
const key = `organization/${instanceType}/${projectId}_${instanceName2}`;
|
30
31
|
if (!stackRefMap.has(key)) {
|
31
32
|
stackRefMap.set(key, new StackReference(key));
|
32
33
|
}
|
@@ -150,12 +151,11 @@ function forUnit(unit) {
|
|
150
151
|
return getOutput(unit, input, value);
|
151
152
|
});
|
152
153
|
const type = unit.model.type;
|
153
|
-
const name = getStack();
|
154
154
|
return {
|
155
155
|
args,
|
156
|
-
instanceId: getInstanceId(type,
|
156
|
+
instanceId: getInstanceId(type, instanceName),
|
157
157
|
type,
|
158
|
-
name,
|
158
|
+
name: instanceName,
|
159
159
|
secrets,
|
160
160
|
inputs,
|
161
161
|
invokedTriggers: config.getObject("$invokedTriggers") ?? [],
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@highstate/pulumi",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.5.0",
|
4
4
|
"type": "module",
|
5
5
|
"module": "dist/index.mjs",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"build": "pkgroll --tsconfig=tsconfig.build.json"
|
21
21
|
},
|
22
22
|
"dependencies": {
|
23
|
-
"@highstate/contract": "^0.
|
23
|
+
"@highstate/contract": "^0.5.0",
|
24
24
|
"@pulumi/pulumi": "^3.152.0",
|
25
25
|
"@sinclair/typebox": "^0.34.11",
|
26
26
|
"ajv": "^8.17.1",
|
@@ -30,5 +30,5 @@
|
|
30
30
|
"devDependencies": {
|
31
31
|
"pkgroll": "^2.5.1"
|
32
32
|
},
|
33
|
-
"gitHead": "
|
33
|
+
"gitHead": "9ab4fc8f01c56df2c9ddf39eda57a3e00a2d17a8"
|
34
34
|
}
|