@reventlessdev/reventless-core 3.0.0-alpha.175 → 3.0.0-alpha.176
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/CHANGELOG.md +16 -0
- package/package.json +6 -6
- package/src/ComponentType.res +0 -7
- package/src/ComponentType.res.mjs +0 -6
- package/src/plugin/component/Plugin_Builder.res +2 -2
- package/src/plugin/component/Plugin_Builder.res.mjs +1 -1
- package/src/plugin/connect/PluginExtensionPoint_Plugin.res +26 -12
- package/src/plugin/connect/PluginExtensionPoint_Plugin.res.mjs +8 -8
- package/src/util/Interstack.res +1 -1
- package/src/util/Interstack.res.mjs +3 -3
- package/src/util/Interstack.resi +1 -1
- package/src/util/Util_StackRefs.res +2 -2
- package/src/util/Util_StackRefs.res.mjs +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 3.0.0-alpha.176 (2026-07-22)
|
|
7
|
+
|
|
8
|
+
* refactor!: retire the stale "core" vocabulary for platform things ([34e7480](https://github.com/ReventlessDev/reventless-core/commit/34e7480992bd58906a250b0a1ce6ff2c5ba45260))
|
|
9
|
+
|
|
10
|
+
### BREAKING CHANGES
|
|
11
|
+
|
|
12
|
+
* the built-in extension point is renamed Core.Plugin ->
|
|
13
|
+
Platform.Plugin. This replaces the CorePluginExtPointCmdTopic SQS queue
|
|
14
|
+
with PlatformPluginExtPointCmdTopic (a replacement, not an update) and
|
|
15
|
+
breaks every already-deployed plugin's connection until redeployed.
|
|
16
|
+
Wipe the alpha stack and redeploy fresh rather than migrating.
|
|
17
|
+
|
|
18
|
+
Build clean; 1349 tests green (interop 50, core 518, local 501, aws 280).
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# 3.0.0-alpha.175 (2026-07-22)
|
|
7
23
|
|
|
8
24
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-core",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.176",
|
|
4
4
|
"description": "Core package for Reventless framework",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"sury": "11.0.0-alpha.4",
|
|
30
30
|
"uuid": "^13.0.0",
|
|
31
31
|
"@reventlessdev/rescript-effect": "0.1.0-alpha.30",
|
|
32
|
-
"@reventlessdev/rescript-hash-object": "1.2.0-alpha.13",
|
|
33
32
|
"@reventlessdev/rescript-fast-csv": "1.2.0-alpha.14",
|
|
34
33
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.9",
|
|
34
|
+
"@reventlessdev/rescript-hash-object": "1.2.0-alpha.13",
|
|
35
35
|
"@reventlessdev/rescript-node-streams": "1.1.0-alpha.13",
|
|
36
36
|
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.17",
|
|
37
37
|
"@reventlessdev/rescript-ssh2": "1.1.0-alpha.14",
|
|
38
|
-
"@reventlessdev/
|
|
39
|
-
"@reventlessdev/reventless-
|
|
40
|
-
"@reventlessdev/reventless-
|
|
41
|
-
"@reventlessdev/
|
|
38
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.104",
|
|
39
|
+
"@reventlessdev/reventless-interop": "3.0.0-alpha.29",
|
|
40
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.80",
|
|
41
|
+
"@reventlessdev/rescript-uuid": "1.1.0-alpha.17"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"rescript": "12.3.0",
|
package/src/ComponentType.res
CHANGED
|
@@ -18,10 +18,6 @@ type t =
|
|
|
18
18
|
| SideEffectHandler
|
|
19
19
|
| Task
|
|
20
20
|
| Vpc
|
|
21
|
-
| /** Vestigial: predates the platform/plugin split and names nothing the
|
|
22
|
-
framework builds. Do not reach for it — platform-level things are
|
|
23
|
-
`Platform`, and the built-in core PLUGIN is a `Plugin`. */
|
|
24
|
-
Core
|
|
25
21
|
| Heartbeat
|
|
26
22
|
| Cloner
|
|
27
23
|
| DcbEventLog
|
|
@@ -52,7 +48,6 @@ let toString = componentType =>
|
|
|
52
48
|
| SideEffectHandler => "SideEffectHandler"
|
|
53
49
|
| Task => "Task"
|
|
54
50
|
| Vpc => "Vpc"
|
|
55
|
-
| Core => "Core"
|
|
56
51
|
| Heartbeat => "Heartbeat"
|
|
57
52
|
| Cloner => "Cloner"
|
|
58
53
|
| DcbEventLog => "DcbEventLog"
|
|
@@ -84,7 +79,6 @@ let ofString = str =>
|
|
|
84
79
|
| "SideEffectHandler" => SideEffectHandler->Some
|
|
85
80
|
| "Task" => Task->Some
|
|
86
81
|
| "Vpc" => Vpc->Some
|
|
87
|
-
| "Core" => Core->Some
|
|
88
82
|
| "Heartbeat" => Heartbeat->Some
|
|
89
83
|
| "Cloner" => Cloner->Some
|
|
90
84
|
| "DcbEventLog" => DcbEventLog->Some
|
|
@@ -117,7 +111,6 @@ let toName = componentType =>
|
|
|
117
111
|
| SideEffectHandler => "SideEffectHandler"
|
|
118
112
|
| Task => "Task"
|
|
119
113
|
| Vpc => "Vpc"
|
|
120
|
-
| Core => "Core"
|
|
121
114
|
| Heartbeat => "Heartbeat"
|
|
122
115
|
| Cloner => "Cloner"
|
|
123
116
|
| DcbEventLog => "DcbEventLog"
|
|
@@ -42,8 +42,6 @@ function toString(componentType) {
|
|
|
42
42
|
return "Task";
|
|
43
43
|
case "Vpc" :
|
|
44
44
|
return "Vpc";
|
|
45
|
-
case "Core" :
|
|
46
|
-
return "Core";
|
|
47
45
|
case "Heartbeat" :
|
|
48
46
|
return "Heartbeat";
|
|
49
47
|
case "Cloner" :
|
|
@@ -75,8 +73,6 @@ function ofString(str) {
|
|
|
75
73
|
return "CommandGenerator";
|
|
76
74
|
case "CommandTopic" :
|
|
77
75
|
return "CommandTopic";
|
|
78
|
-
case "Core" :
|
|
79
|
-
return "Core";
|
|
80
76
|
case "Counter" :
|
|
81
77
|
return "Counter";
|
|
82
78
|
case "DcbEventLog" :
|
|
@@ -166,8 +162,6 @@ function toName(componentType) {
|
|
|
166
162
|
return "Task";
|
|
167
163
|
case "Vpc" :
|
|
168
164
|
return "Vpc";
|
|
169
|
-
case "Core" :
|
|
170
|
-
return "Core";
|
|
171
165
|
case "Heartbeat" :
|
|
172
166
|
return "Heartbeat";
|
|
173
167
|
case "Cloner" :
|
|
@@ -575,8 +575,8 @@ module Make = (
|
|
|
575
575
|
let builderOutputs = {
|
|
576
576
|
// Resolve admin extension point data — from Interstack (AWS cross-stack reference).
|
|
577
577
|
let interstackAdminExtensionPoints =
|
|
578
|
-
Interstack.
|
|
579
|
-
|
|
578
|
+
Interstack.platformStackReference->Option.mapOr(Pulumi.Output.make(None), platformStack =>
|
|
579
|
+
platformStack->Pulumi.StackReference.getOutput("extensionPoints")
|
|
580
580
|
)
|
|
581
581
|
|
|
582
582
|
// Derive local admin extension point resolved data (passed from makePlatform).
|
|
@@ -399,7 +399,7 @@ function Make(Spec) {
|
|
|
399
399
|
components: components
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
|
-
let interstackAdminExtensionPoints = Stdlib_Option.mapOr(Interstack$ReventlessCore.
|
|
402
|
+
let interstackAdminExtensionPoints = Stdlib_Option.mapOr(Interstack$ReventlessCore.platformStackReference, Pulumi.output(undefined), platformStack => platformStack.getOutput("extensionPoints"));
|
|
403
403
|
let localAdminResolvedEP = Output$Pulumi.flatMap(Spec.hooks.adminExtensionPoints.contents, eps => {
|
|
404
404
|
let ep = eps[PluginExtensionPointSpec$ReventlessInfra.name];
|
|
405
405
|
if (ep !== undefined) {
|
|
@@ -47,7 +47,7 @@ module Make = (Spec: Spec) => {
|
|
|
47
47
|
switch jsons {
|
|
48
48
|
| [] =>
|
|
49
49
|
EffectLogger.logWarn(
|
|
50
|
-
~comp=
|
|
50
|
+
~comp=PluginExtensionPointSpec.name,
|
|
51
51
|
`ForwardCommand: Couldn't find Plugin with ExtensionPoint ${extensionPointName}`,
|
|
52
52
|
)->Effect.runSync
|
|
53
53
|
| plugins =>
|
|
@@ -66,28 +66,31 @@ module Make = (Spec: Spec) => {
|
|
|
66
66
|
) {
|
|
67
67
|
| _ =>
|
|
68
68
|
EffectLogger.logInfo(
|
|
69
|
-
~comp=
|
|
69
|
+
~comp=PluginExtensionPointSpec.name,
|
|
70
70
|
`ForwardCommand: published command to ${plugin.name} ${extensionPoint.commandTopic}`,
|
|
71
71
|
)->Effect.runSync
|
|
72
72
|
| exception err =>
|
|
73
73
|
let errMsg =
|
|
74
74
|
err->JsExn.fromException->Option.flatMap(JsExn.message)->Option.getOr("unknown")
|
|
75
75
|
EffectLogger.logError(
|
|
76
|
-
~comp=
|
|
76
|
+
~comp=PluginExtensionPointSpec.name,
|
|
77
77
|
`ForwardCommand: Error on publish command: ${errMsg}`,
|
|
78
78
|
)->Effect.runSync
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
| None =>
|
|
82
82
|
EffectLogger.logWarn(
|
|
83
|
-
~comp=
|
|
83
|
+
~comp=PluginExtensionPointSpec.name,
|
|
84
84
|
`ForwardCommand: Couldn't find ExtensionPoint ${extensionPointName} in ${plugin.name}`,
|
|
85
85
|
)->Effect.runSync
|
|
86
86
|
}
|
|
87
87
|
| exception err =>
|
|
88
88
|
let errMsg =
|
|
89
89
|
err->JsExn.fromException->Option.flatMap(JsExn.message)->Option.getOr("unknown")
|
|
90
|
-
EffectLogger.logError(
|
|
90
|
+
EffectLogger.logError(
|
|
91
|
+
~comp=PluginExtensionPointSpec.name,
|
|
92
|
+
`ForwardCommand: Couldn't decode Plugin: ${errMsg}`,
|
|
93
|
+
)->Effect.runSync
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
}
|
|
@@ -105,7 +108,7 @@ module Make = (Spec: Spec) => {
|
|
|
105
108
|
rate: timeout->ScheduleOps.minutesFromNow,
|
|
106
109
|
payload: {
|
|
107
110
|
Message.id,
|
|
108
|
-
meta: Message.generateMeta(~service=
|
|
111
|
+
meta: Message.generateMeta(~service=PluginExtensionPointSpec.name, ~user="Scheduler"),
|
|
109
112
|
command: PluginExtensionPointSpec.DisconnectPlugin,
|
|
110
113
|
}
|
|
111
114
|
->Message.encodeCommand'(S.string, PluginExtensionPointSpec.commandSchema)
|
|
@@ -155,7 +158,10 @@ module Make = (Spec: Spec) => {
|
|
|
155
158
|
PublishCommand(Plugin.name(id), Delegate.Heartbeat(Plugin.version(id))),
|
|
156
159
|
// Re-arm the disconnect schedule with an interval-scaled grace so a
|
|
157
160
|
// single late beat doesn't trip a spurious disconnect (see disconnectGrace).
|
|
158
|
-
HandleDirective(
|
|
161
|
+
HandleDirective(
|
|
162
|
+
directiveHandler,
|
|
163
|
+
CreateDisconnectSchedule(id, disconnectGrace(interval)),
|
|
164
|
+
),
|
|
159
165
|
]
|
|
160
166
|
| RedetectPlugin(interval) => [
|
|
161
167
|
// Deploy-time re-detect: drive Redetect (not Heartbeat) so an already-connected
|
|
@@ -163,7 +169,10 @@ module Make = (Spec: Spec) => {
|
|
|
163
169
|
// re-arm the disconnect schedule exactly like a heartbeat so liveness tracking
|
|
164
170
|
// continues from the deploy moment.
|
|
165
171
|
PublishCommand(Plugin.name(id), Delegate.Redetect(Plugin.version(id))),
|
|
166
|
-
HandleDirective(
|
|
172
|
+
HandleDirective(
|
|
173
|
+
directiveHandler,
|
|
174
|
+
CreateDisconnectSchedule(id, disconnectGrace(interval)),
|
|
175
|
+
),
|
|
167
176
|
]
|
|
168
177
|
| ConnectPlugin(pluginDefinition) =>
|
|
169
178
|
// Validate protocol versions declared by the connecting plugin.
|
|
@@ -172,7 +181,7 @@ module Make = (Spec: Spec) => {
|
|
|
172
181
|
let protocolErrors =
|
|
173
182
|
pluginDefinition.extensionProtocols->Array.flatMap(proto =>
|
|
174
183
|
ReventlessInterop.Compat.validateProtocol(
|
|
175
|
-
~host=ReventlessInterop.CompatMatrix.
|
|
184
|
+
~host=ReventlessInterop.CompatMatrix.platformPlugin,
|
|
176
185
|
~extensionPointName=proto.extensionPointName,
|
|
177
186
|
~commandVersion=proto.commandVersion,
|
|
178
187
|
~eventVersion=proto.eventVersion,
|
|
@@ -180,7 +189,7 @@ module Make = (Spec: Spec) => {
|
|
|
180
189
|
)
|
|
181
190
|
let reportAction = if protocolErrors->Array.length > 0 {
|
|
182
191
|
EffectLogger.logWarn(
|
|
183
|
-
~comp=
|
|
192
|
+
~comp=PluginExtensionPointSpec.name,
|
|
184
193
|
`Protocol version mismatch for plugin ${pluginDefinition.id}: ${protocolErrors
|
|
185
194
|
->JSON.stringifyAny
|
|
186
195
|
->Option.getOr("[]")}`,
|
|
@@ -197,7 +206,9 @@ module Make = (Spec: Spec) => {
|
|
|
197
206
|
PublishCommand(Plugin.name(id), Delegate.Disconnect(Plugin.version(id))),
|
|
198
207
|
HandleDirective(directiveHandler, DeleteDisconnectSchedule(id)),
|
|
199
208
|
]
|
|
200
|
-
| ForwardCommand(forwardCommand) => [
|
|
209
|
+
| ForwardCommand(forwardCommand) => [
|
|
210
|
+
HandleDirective(directiveHandler, ForwardCommand(forwardCommand)),
|
|
211
|
+
]
|
|
201
212
|
// Routed to the UiFragmentRegistry slice by the sibling UI-fragment mapping, not the
|
|
202
213
|
// Plugin aggregate — a no-op here.
|
|
203
214
|
| RegisterUiFragment(_) => []
|
|
@@ -212,7 +223,10 @@ module Make = (Spec: Spec) => {
|
|
|
212
223
|
// definition publish with `def.id` (= name@version), preserving the prior
|
|
213
224
|
// cross-plugin wire id.
|
|
214
225
|
| Delegate.VersionDetected(version) => [
|
|
215
|
-
PublishEvent(
|
|
226
|
+
PublishEvent(
|
|
227
|
+
Plugin.makeId(id, version),
|
|
228
|
+
PluginExtensionPointSpec.UnknownPluginDetected,
|
|
229
|
+
),
|
|
216
230
|
]
|
|
217
231
|
| VersionConnected(pluginDefinition)
|
|
218
232
|
| VersionPromoted(pluginDefinition) => [
|
|
@@ -43,7 +43,7 @@ function Make(Spec) {
|
|
|
43
43
|
]
|
|
44
44
|
], 1000);
|
|
45
45
|
if (jsons.length === 0) {
|
|
46
|
-
return Effect.runSync(EffectLogger$ReventlessCore.logWarn(
|
|
46
|
+
return Effect.runSync(EffectLogger$ReventlessCore.logWarn(PluginExtensionPointSpec$ReventlessInfra.name, undefined, `ForwardCommand: Couldn't find Plugin with ExtensionPoint ` + extensionPointName));
|
|
47
47
|
}
|
|
48
48
|
let plugin = jsons[0];
|
|
49
49
|
let exit = 0;
|
|
@@ -54,12 +54,12 @@ function Make(Spec) {
|
|
|
54
54
|
} catch (raw_err) {
|
|
55
55
|
let err = Primitive_exceptions.internalToException(raw_err);
|
|
56
56
|
let errMsg = Stdlib_Option.getOr(Stdlib_Option.flatMap(Stdlib_JsExn.fromException(err), Stdlib_JsExn.message), "unknown");
|
|
57
|
-
return Effect.runSync(EffectLogger$ReventlessCore.logError(
|
|
57
|
+
return Effect.runSync(EffectLogger$ReventlessCore.logError(PluginExtensionPointSpec$ReventlessInfra.name, undefined, `ForwardCommand: Couldn't decode Plugin: ` + errMsg));
|
|
58
58
|
}
|
|
59
59
|
if (exit === 1) {
|
|
60
60
|
let extensionPoint = plugin$1.extensionPoints.find(extensionPoint => extensionPoint.name === extensionPointName);
|
|
61
61
|
if (extensionPoint === undefined) {
|
|
62
|
-
return Effect.runSync(EffectLogger$ReventlessCore.logWarn(
|
|
62
|
+
return Effect.runSync(EffectLogger$ReventlessCore.logWarn(PluginExtensionPointSpec$ReventlessInfra.name, undefined, `ForwardCommand: Couldn't find ExtensionPoint ` + extensionPointName + ` in ` + plugin$1.name));
|
|
63
63
|
}
|
|
64
64
|
let exit$1 = 0;
|
|
65
65
|
let val;
|
|
@@ -69,10 +69,10 @@ function Make(Spec) {
|
|
|
69
69
|
} catch (raw_err$1) {
|
|
70
70
|
let err$1 = Primitive_exceptions.internalToException(raw_err$1);
|
|
71
71
|
let errMsg$1 = Stdlib_Option.getOr(Stdlib_Option.flatMap(Stdlib_JsExn.fromException(err$1), Stdlib_JsExn.message), "unknown");
|
|
72
|
-
return Effect.runSync(EffectLogger$ReventlessCore.logError(
|
|
72
|
+
return Effect.runSync(EffectLogger$ReventlessCore.logError(PluginExtensionPointSpec$ReventlessInfra.name, undefined, `ForwardCommand: Error on publish command: ` + errMsg$1));
|
|
73
73
|
}
|
|
74
74
|
if (exit$1 === 2) {
|
|
75
|
-
return Effect.runSync(EffectLogger$ReventlessCore.logInfo(
|
|
75
|
+
return Effect.runSync(EffectLogger$ReventlessCore.logInfo(PluginExtensionPointSpec$ReventlessInfra.name, undefined, `ForwardCommand: published command to ` + plugin$1.name + ` ` + extensionPoint.commandTopic));
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
};
|
|
@@ -85,7 +85,7 @@ function Make(Spec) {
|
|
|
85
85
|
rate: ScheduleOps$ReventlessCore.minutesFromNow(directive._1),
|
|
86
86
|
payload: JSON.stringify(Message$ReventlessCore.encodeCommand$p({
|
|
87
87
|
id: id,
|
|
88
|
-
meta: Message$ReventlessCore.generateMeta(
|
|
88
|
+
meta: Message$ReventlessCore.generateMeta(PluginExtensionPointSpec$ReventlessInfra.name, undefined, "Scheduler", undefined, undefined, undefined, undefined, undefined),
|
|
89
89
|
command: "DisconnectPlugin"
|
|
90
90
|
}, S.string, PluginExtensionPointSpec$ReventlessInfra.commandSchema))
|
|
91
91
|
});
|
|
@@ -162,8 +162,8 @@ function Make(Spec) {
|
|
|
162
162
|
];
|
|
163
163
|
case "ConnectPlugin" :
|
|
164
164
|
let pluginDefinition = cmd._0;
|
|
165
|
-
let protocolErrors = pluginDefinition.extensionProtocols.flatMap(proto => Compat$ReventlessInterop.validateProtocol(CompatMatrix$ReventlessInterop.
|
|
166
|
-
let reportAction = protocolErrors.length !== 0 ? (Effect.runSync(EffectLogger$ReventlessCore.logWarn(
|
|
165
|
+
let protocolErrors = pluginDefinition.extensionProtocols.flatMap(proto => Compat$ReventlessInterop.validateProtocol(CompatMatrix$ReventlessInterop.platformPlugin, proto.extensionPointName, proto.commandVersion, proto.eventVersion));
|
|
166
|
+
let reportAction = protocolErrors.length !== 0 ? (Effect.runSync(EffectLogger$ReventlessCore.logWarn(PluginExtensionPointSpec$ReventlessInfra.name, undefined, `Protocol version mismatch for plugin ` + pluginDefinition.id + `: ` + Stdlib_Option.getOr(JSON.stringify(protocolErrors), "[]"))), [{
|
|
167
167
|
TAG: "PublishCommand",
|
|
168
168
|
_0: Plugin$ReventlessCore.name(id),
|
|
169
169
|
_1: {
|
package/src/util/Interstack.res
CHANGED
|
@@ -10,7 +10,7 @@ import * as Query$ReventlessInterop from "@reventlessdev/reventless-interop/src/
|
|
|
10
10
|
import * as EventMapper$ReventlessInterop from "@reventlessdev/reventless-interop/src/components/EventMapper.res.mjs";
|
|
11
11
|
import * as ExtensionPoint$ReventlessInterop from "@reventlessdev/reventless-interop/src/components/ExtensionPoint.res.mjs";
|
|
12
12
|
|
|
13
|
-
let
|
|
13
|
+
let platformStackReference = Stdlib_Option.map(new Pulumi.Config("platform").get("stack"), stack => new Pulumi.StackReference(stack + "-interstack", {
|
|
14
14
|
name: stack
|
|
15
15
|
}));
|
|
16
16
|
|
|
@@ -115,7 +115,7 @@ let mergeEventMappers = DefaultEventMapperQuery.mergeWith;
|
|
|
115
115
|
let mergeExtensionPoints = DefaultExtensionPointQuery.mergeWith;
|
|
116
116
|
|
|
117
117
|
export {
|
|
118
|
-
|
|
118
|
+
platformStackReference,
|
|
119
119
|
stackDependenciesTasks,
|
|
120
120
|
stackDependenciesEventMappers,
|
|
121
121
|
stackDependenciesExtensionPoints,
|
|
@@ -123,4 +123,4 @@ export {
|
|
|
123
123
|
mergeEventMappers,
|
|
124
124
|
mergeExtensionPoints,
|
|
125
125
|
}
|
|
126
|
-
/*
|
|
126
|
+
/* platformStackReference Not a pure module */
|
package/src/util/Interstack.resi
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
let stackRefs: dict<Pulumi.StackReference.t> = Dict.make()
|
|
2
2
|
|
|
3
|
-
let
|
|
3
|
+
let platformStackName = Pulumi.Config.make(Some("platform"))->Pulumi.Config.get("stack")
|
|
4
4
|
|
|
5
5
|
let stackName = pluginName =>
|
|
6
|
-
|
|
6
|
+
platformStackName->Option.map(name => {
|
|
7
7
|
let parts = name->String.split("/")
|
|
8
8
|
parts->Array.set(1, pluginName)
|
|
9
9
|
parts->Array.joinUnsafe("/")
|
|
@@ -6,10 +6,10 @@ import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js
|
|
|
6
6
|
|
|
7
7
|
let stackRefs = {};
|
|
8
8
|
|
|
9
|
-
let
|
|
9
|
+
let platformStackName = new Pulumi.Config("platform").get("stack");
|
|
10
10
|
|
|
11
11
|
function stackName(pluginName) {
|
|
12
|
-
return Stdlib_Option.map(
|
|
12
|
+
return Stdlib_Option.map(platformStackName, name => {
|
|
13
13
|
let parts = name.split("/");
|
|
14
14
|
parts[1] = pluginName;
|
|
15
15
|
return parts.join("/");
|
|
@@ -32,8 +32,8 @@ function get(pluginName) {
|
|
|
32
32
|
|
|
33
33
|
export {
|
|
34
34
|
stackRefs,
|
|
35
|
-
|
|
35
|
+
platformStackName,
|
|
36
36
|
stackName,
|
|
37
37
|
get,
|
|
38
38
|
}
|
|
39
|
-
/*
|
|
39
|
+
/* platformStackName Not a pure module */
|