@kumori/aurora-backend-handler 1.1.90 → 1.1.92
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.
|
@@ -184,7 +184,8 @@ interface ArtifactConfigParameterDto {
|
|
|
184
184
|
type ParameterTypeDto = "string" | "number" | "bool";
|
|
185
185
|
type ComponentEnvironmentDto =
|
|
186
186
|
| ComponentEnvironmentParamDto
|
|
187
|
-
| ComponentEnvironmentSecretDto
|
|
187
|
+
| ComponentEnvironmentSecretDto
|
|
188
|
+
| ComponentEnvironmentValueDto;
|
|
188
189
|
interface ComponentEnvironmentParamDto {
|
|
189
190
|
varName: string;
|
|
190
191
|
param: string;
|
|
@@ -193,6 +194,10 @@ interface ComponentEnvironmentSecretDto {
|
|
|
193
194
|
varName: string;
|
|
194
195
|
secret: string;
|
|
195
196
|
}
|
|
197
|
+
interface ComponentEnvironmentValueDto {
|
|
198
|
+
varName: string;
|
|
199
|
+
value: string;
|
|
200
|
+
}
|
|
196
201
|
type ArtifactConfigResource =
|
|
197
202
|
| CA<ArtifactConfigResourceSpec>
|
|
198
203
|
| Secret<ArtifactConfigResourceSpec>
|
|
@@ -382,6 +387,15 @@ export function handleParametersToGenerateData(
|
|
|
382
387
|
});
|
|
383
388
|
break;
|
|
384
389
|
|
|
390
|
+
case "clientChannel":
|
|
391
|
+
console.log('DEBUG clientChannel', parameter.name, parameter.value);
|
|
392
|
+
environmentResult.push({
|
|
393
|
+
varName: parameter.name,
|
|
394
|
+
value: `0.${parameter.value}`,
|
|
395
|
+
});
|
|
396
|
+
console.log('DEBUG environmentResult', environmentResult);
|
|
397
|
+
break;
|
|
398
|
+
|
|
385
399
|
default:
|
|
386
400
|
console.warn(`Unknown parameter type: ${parameter.type}`);
|
|
387
401
|
parametersResult.push({
|
|
@@ -1136,7 +1150,7 @@ async function generateServiceSpecDSL(
|
|
|
1136
1150
|
fileSystem,
|
|
1137
1151
|
resources: componentResources,
|
|
1138
1152
|
} = handleParametersToGenerateData(formParams, formResources);
|
|
1139
|
-
|
|
1153
|
+
console.log('DEBUG environment', environment);
|
|
1140
1154
|
const serverConfigDomainResources: ArtifactConfigResource[] = form.channels
|
|
1141
1155
|
.filter((channel) => channel.protocol === "HTTPS" && channel.isPublic)
|
|
1142
1156
|
.map((channel) => ({ domain: { name: `${channel.channelName}_domain` } }));
|
package/package.json
CHANGED
|
@@ -97,6 +97,19 @@ describe("handleParametersToGenerateData", () => {
|
|
|
97
97
|
expect(result.parameters).toHaveLength(0);
|
|
98
98
|
});
|
|
99
99
|
|
|
100
|
+
it("maneja tipo clientChannel", () => {
|
|
101
|
+
const result = handleParametersToGenerateData(
|
|
102
|
+
[{ name: "test", value: "ClientChannel1aaa", type: "clientChannel" }],
|
|
103
|
+
[],
|
|
104
|
+
);
|
|
105
|
+
expect(result.environment).toContainEqual({
|
|
106
|
+
varName: "test",
|
|
107
|
+
value: "0.ClientChannel1aaa",
|
|
108
|
+
});
|
|
109
|
+
expect(result.parameters).toHaveLength(0);
|
|
110
|
+
expect(result.resources).toHaveLength(0);
|
|
111
|
+
});
|
|
112
|
+
|
|
100
113
|
it("maneja tipo file", () => {
|
|
101
114
|
const result = handleParametersToGenerateData(
|
|
102
115
|
[{ name: "myconfig", value: "/path/to/file", type: "file" }],
|
|
@@ -840,6 +853,14 @@ describe("deployServiceHelper", () => {
|
|
|
840
853
|
expect(formData.get("bundle")).toBeTruthy();
|
|
841
854
|
});
|
|
842
855
|
|
|
856
|
+
it("maneja parámetros de tipo clientChannel en generateServiceSpecDSL", async () => {
|
|
857
|
+
const service = createMockService({
|
|
858
|
+
parameters: [{ name: "test", value: "ClientChannel1aaa", type: "clientChannel" }],
|
|
859
|
+
});
|
|
860
|
+
const formData = await deployService(service);
|
|
861
|
+
expect(formData.get("bundle")).toBeTruthy();
|
|
862
|
+
});
|
|
863
|
+
|
|
843
864
|
it("maneja resources de tipo volume sin size en generateServiceSpecDSL", async () => {
|
|
844
865
|
const service = createMockService({
|
|
845
866
|
resources: [{ name: "vol1", type: "volume", value: "existing-vol" }],
|