@platform-mesh/portal-server-lib 0.5.46 → 0.6.1

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.
@@ -33,11 +33,11 @@ let ContentConfigurationServiceProvidersService = class ContentConfigurationServ
33
33
  });
34
34
  try {
35
35
  const response = await client.request(contentConfigurationsQuery, {});
36
- if (!response?.ui_platform_mesh_io?.ContentConfigurations) {
36
+ if (!response?.ui_platform_mesh_io?.v1alpha1?.ContentConfigurations) {
37
37
  throw new Error('Invalid response structure: missing ContentConfigurations');
38
38
  }
39
39
  const entity = !entities || !entities.length ? 'main' : entities[0];
40
- const contentConfigurations = response.ui_platform_mesh_io.ContentConfigurations.items
40
+ const contentConfigurations = response.ui_platform_mesh_io.v1alpha1.ContentConfigurations.items
41
41
  .filter((item) => item.metadata.labels?.['ui.platform-mesh.io/entity'] === entity)
42
42
  .map((item) => {
43
43
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"content-configuration-service-providers.service.js","sourceRoot":"","sources":["../../../src/portal-options/service-providers/content-configuration-service-providers.service.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,8CAA8C,EAAE,MAAM,wCAAwC,CAAC;AACxG,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAM5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGzC,IAAM,2CAA2C,GAAjD,MAAM,2CAA2C;IACtD,KAAK,CAAC,mBAAmB,CACvB,KAAa,EACb,QAAkB,EAClB,OAAuB;QAGvB,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QACvC,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YACzB,OAAO,iBAAiB,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AAC,OAAO,KAAK,EAAE,CAAC;YAEf,IACE,KAAK,YAAY,KAAK;gBACtB,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAC7C,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;YACD,MAAM,IAAI,KAAK,CACb,2CAA2C,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CACtG,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AA7HY,2CAA2C;IADvD,UAAU,EAAE;GACA,2CAA2C,CA6HvD"}
1
+ {"version":3,"file":"content-configuration-service-providers.service.js","sourceRoot":"","sources":["../../../src/portal-options/service-providers/content-configuration-service-providers.service.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,8CAA8C,EAAE,MAAM,wCAAwC,CAAC;AACxG,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAM5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGzC,IAAM,2CAA2C,GAAjD,MAAM,2CAA2C;IACtD,KAAK,CAAC,mBAAmB,CACvB,KAAa,EACb,QAAkB,EAClB,OAAuB;QAGvB,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QACvC,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YACzB,OAAO,iBAAiB,CAAC;QAC3B,CAAC;QAED,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,CAAC;QAED,IAAI,GAAG,GAAG,OAAO,CAAC,gBAAgB,CAAC,OAAO,CACxC,iCAAiC,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,IAAI,KAAK,CACb,2CAA2C,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CACtG,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AA7HY,2CAA2C;IADvD,UAAU,EAAE;GACA,2CAA2C,CA6HvD"}
@@ -2,19 +2,21 @@ import { gql } from 'graphql-request';
2
2
  export const contentConfigurationsQuery = gql `
3
3
  query {
4
4
  ui_platform_mesh_io {
5
- ContentConfigurations {
6
- items {
7
- metadata {
8
- name
9
- labels
10
- }
11
- spec {
12
- remoteConfiguration {
13
- url
5
+ v1alpha1 {
6
+ ContentConfigurations {
7
+ items {
8
+ metadata {
9
+ name
10
+ labels
11
+ }
12
+ spec {
13
+ remoteConfiguration {
14
+ url
15
+ }
16
+ }
17
+ status {
18
+ configurationResult
14
19
  }
15
- }
16
- status {
17
- configurationResult
18
20
  }
19
21
  }
20
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"contentconfigurations-query.js","sourceRoot":"","sources":["../../../src/portal-options/service-providers/contentconfigurations-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;CAqB5C,CAAC"}
1
+ {"version":3,"file":"contentconfigurations-query.js","sourceRoot":"","sources":["../../../src/portal-options/service-providers/contentconfigurations-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;CAuB5C,CAAC"}
@@ -1,5 +1,7 @@
1
1
  export interface ContentConfigurationQueryResponse {
2
- ui_platform_mesh_io: ContentConfigurationsResponse;
2
+ ui_platform_mesh_io: {
3
+ v1alpha1: ContentConfigurationsResponse;
4
+ };
3
5
  }
4
6
  export interface ContentConfigurationsResponse {
5
7
  ContentConfigurations: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-mesh/portal-server-lib",
3
- "version": "0.5.46",
3
+ "version": "0.6.1",
4
4
  "author": "Platform Mesh",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -57,7 +57,7 @@
57
57
  "@nestjs/testing": "11.1.9",
58
58
  "@openmfp/config-prettier": "0.9.2",
59
59
  "@types/jest": "30.0.0",
60
- "@types/node": "24.10.4",
60
+ "@types/node": "24.10.5",
61
61
  "@types/supertest": "6.0.3",
62
62
  "eslint": "9.39.2",
63
63
  "eslint-config-prettier": "10.1.8",
@@ -70,19 +70,21 @@ describe('ContentConfigurationServiceProvidersService', () => {
70
70
  it('returns parsed content configurations', async () => {
71
71
  mockClient.request.mockResolvedValue({
72
72
  ui_platform_mesh_io: {
73
- ContentConfigurations: {
74
- items: [
75
- {
76
- metadata: {
77
- name: 'conf1',
78
- labels: { 'ui.platform-mesh.io/entity': 'entity' },
73
+ v1alpha1: {
74
+ ContentConfigurations: {
75
+ items: [
76
+ {
77
+ metadata: {
78
+ name: 'conf1',
79
+ labels: { 'ui.platform-mesh.io/entity': 'entity' },
80
+ },
81
+ spec: { remoteConfiguration: { url: 'http://remote' } },
82
+ status: {
83
+ configurationResult: JSON.stringify({ url: 'http://parsed' }),
84
+ },
79
85
  },
80
- spec: { remoteConfiguration: { url: 'http://remote' } },
81
- status: {
82
- configurationResult: JSON.stringify({ url: 'http://parsed' }),
83
- },
84
- },
85
- ],
86
+ ],
87
+ },
86
88
  },
87
89
  },
88
90
  });
@@ -99,17 +101,19 @@ describe('ContentConfigurationServiceProvidersService', () => {
99
101
  it('falls back to spec.remoteConfiguration.url if missing in parsed config', async () => {
100
102
  mockClient.request.mockResolvedValue({
101
103
  ui_platform_mesh_io: {
102
- ContentConfigurations: {
103
- items: [
104
- {
105
- metadata: {
106
- name: 'conf1',
107
- labels: { 'ui.platform-mesh.io/entity': 'entity' },
104
+ v1alpha1: {
105
+ ContentConfigurations: {
106
+ items: [
107
+ {
108
+ metadata: {
109
+ name: 'conf1',
110
+ labels: { 'ui.platform-mesh.io/entity': 'entity' },
111
+ },
112
+ spec: { remoteConfiguration: { url: 'http://remote' } },
113
+ status: { configurationResult: JSON.stringify({}) },
108
114
  },
109
- spec: { remoteConfiguration: { url: 'http://remote' } },
110
- status: { configurationResult: JSON.stringify({}) },
111
- },
112
- ],
115
+ ],
116
+ },
113
117
  },
114
118
  },
115
119
  });
@@ -126,17 +130,19 @@ describe('ContentConfigurationServiceProvidersService', () => {
126
130
  it('throws on missing configurationResult', async () => {
127
131
  mockClient.request.mockResolvedValue({
128
132
  ui_platform_mesh_io: {
129
- ContentConfigurations: {
130
- items: [
131
- {
132
- metadata: {
133
- name: 'conf1',
134
- labels: { 'ui.platform-mesh.io/entity': 'entity' },
133
+ v1alpha1: {
134
+ ContentConfigurations: {
135
+ items: [
136
+ {
137
+ metadata: {
138
+ name: 'conf1',
139
+ labels: { 'ui.platform-mesh.io/entity': 'entity' },
140
+ },
141
+ spec: { remoteConfiguration: { url: 'http://remote' } },
142
+ status: {},
135
143
  },
136
- spec: { remoteConfiguration: { url: 'http://remote' } },
137
- status: {},
138
- },
139
- ],
144
+ ],
145
+ },
140
146
  },
141
147
  },
142
148
  });
@@ -165,26 +171,30 @@ describe('ContentConfigurationServiceProvidersService', () => {
165
171
  context.accountPath = 'acc1';
166
172
  mockClient.request.mockResolvedValue({
167
173
  ui_platform_mesh_io: {
168
- ContentConfigurations: {
169
- items: [
170
- {
171
- metadata: {
172
- name: 'conf1',
173
- labels: { 'ui.platform-mesh.io/entity': 'entity' },
174
- },
175
- spec: { remoteConfiguration: { url: 'http://remote' } },
176
- status: {
177
- configurationResult: JSON.stringify({
178
- name: 'test-config',
179
- luigiConfigFragment: {
180
- data: {
181
- nodes: [{ entityType: 'core_platform-mesh_io_account' }],
174
+ v1alpha1: {
175
+ ContentConfigurations: {
176
+ items: [
177
+ {
178
+ metadata: {
179
+ name: 'conf1',
180
+ labels: { 'ui.platform-mesh.io/entity': 'entity' },
181
+ },
182
+ spec: { remoteConfiguration: { url: 'http://remote' } },
183
+ status: {
184
+ configurationResult: JSON.stringify({
185
+ name: 'test-config',
186
+ luigiConfigFragment: {
187
+ data: {
188
+ nodes: [
189
+ { entityType: 'core_platform-mesh_io_account' },
190
+ ],
191
+ },
182
192
  },
183
- },
184
- }),
193
+ }),
194
+ },
185
195
  },
186
- },
187
- ],
196
+ ],
197
+ },
188
198
  },
189
199
  },
190
200
  });
@@ -205,26 +215,30 @@ describe('ContentConfigurationServiceProvidersService', () => {
205
215
  context.accountPath = 'acc1:acc2:acc3';
206
216
  mockClient.request.mockResolvedValue({
207
217
  ui_platform_mesh_io: {
208
- ContentConfigurations: {
209
- items: [
210
- {
211
- metadata: {
212
- name: 'conf1',
213
- labels: { 'ui.platform-mesh.io/entity': 'entity' },
214
- },
215
- spec: { remoteConfiguration: { url: 'http://remote' } },
216
- status: {
217
- configurationResult: JSON.stringify({
218
- name: 'test-config',
219
- luigiConfigFragment: {
220
- data: {
221
- nodes: [{ entityType: 'core_platform-mesh_io_account' }],
218
+ v1alpha1: {
219
+ ContentConfigurations: {
220
+ items: [
221
+ {
222
+ metadata: {
223
+ name: 'conf1',
224
+ labels: { 'ui.platform-mesh.io/entity': 'entity' },
225
+ },
226
+ spec: { remoteConfiguration: { url: 'http://remote' } },
227
+ status: {
228
+ configurationResult: JSON.stringify({
229
+ name: 'test-config',
230
+ luigiConfigFragment: {
231
+ data: {
232
+ nodes: [
233
+ { entityType: 'core_platform-mesh_io_account' },
234
+ ],
235
+ },
222
236
  },
223
- },
224
- }),
237
+ }),
238
+ },
225
239
  },
226
- },
227
- ],
240
+ ],
241
+ },
228
242
  },
229
243
  },
230
244
  });
@@ -247,37 +261,39 @@ describe('ContentConfigurationServiceProvidersService', () => {
247
261
  context.accountPath = 'acc1';
248
262
  mockClient.request.mockResolvedValue({
249
263
  ui_platform_mesh_io: {
250
- ContentConfigurations: {
251
- items: [
252
- {
253
- metadata: {
254
- name: 'accounts-config',
255
- labels: { 'ui.platform-mesh.io/entity': 'entity' },
256
- },
257
- spec: { remoteConfiguration: { url: 'http://remote' } },
258
- status: {
259
- configurationResult: JSON.stringify({
260
- name: 'accounts',
261
- luigiConfigFragment: {
262
- data: {
263
- nodes: [
264
- {
265
- entityType: 'core_platform-mesh_io_account',
266
- children: [
267
- {
268
- defineEntity: { id: 'old-id' },
269
- context: {},
270
- pathSegment: 'old-path',
271
- },
272
- ],
273
- },
274
- ],
264
+ v1alpha1: {
265
+ ContentConfigurations: {
266
+ items: [
267
+ {
268
+ metadata: {
269
+ name: 'accounts-config',
270
+ labels: { 'ui.platform-mesh.io/entity': 'entity' },
271
+ },
272
+ spec: { remoteConfiguration: { url: 'http://remote' } },
273
+ status: {
274
+ configurationResult: JSON.stringify({
275
+ name: 'accounts',
276
+ luigiConfigFragment: {
277
+ data: {
278
+ nodes: [
279
+ {
280
+ entityType: 'core_platform-mesh_io_account',
281
+ children: [
282
+ {
283
+ defineEntity: { id: 'old-id' },
284
+ context: {},
285
+ pathSegment: 'old-path',
286
+ },
287
+ ],
288
+ },
289
+ ],
290
+ },
275
291
  },
276
- },
277
- }),
292
+ }),
293
+ },
278
294
  },
279
- },
280
- ],
295
+ ],
296
+ },
281
297
  },
282
298
  },
283
299
  });
@@ -299,26 +315,30 @@ describe('ContentConfigurationServiceProvidersService', () => {
299
315
  it('does not apply processContentConfigurationForAccountHierarchy when accountPath is not provided', async () => {
300
316
  mockClient.request.mockResolvedValue({
301
317
  ui_platform_mesh_io: {
302
- ContentConfigurations: {
303
- items: [
304
- {
305
- metadata: {
306
- name: 'conf1',
307
- labels: { 'ui.platform-mesh.io/entity': 'entity' },
308
- },
309
- spec: { remoteConfiguration: { url: 'http://remote' } },
310
- status: {
311
- configurationResult: JSON.stringify({
312
- name: 'test-config',
313
- luigiConfigFragment: {
314
- data: {
315
- nodes: [{ entityType: 'core_platform-mesh_io_account' }],
318
+ v1alpha1: {
319
+ ContentConfigurations: {
320
+ items: [
321
+ {
322
+ metadata: {
323
+ name: 'conf1',
324
+ labels: { 'ui.platform-mesh.io/entity': 'entity' },
325
+ },
326
+ spec: { remoteConfiguration: { url: 'http://remote' } },
327
+ status: {
328
+ configurationResult: JSON.stringify({
329
+ name: 'test-config',
330
+ luigiConfigFragment: {
331
+ data: {
332
+ nodes: [
333
+ { entityType: 'core_platform-mesh_io_account' },
334
+ ],
335
+ },
316
336
  },
317
- },
318
- }),
337
+ }),
338
+ },
319
339
  },
320
- },
321
- ],
340
+ ],
341
+ },
322
342
  },
323
343
  },
324
344
  });
@@ -56,7 +56,7 @@ export class ContentConfigurationServiceProvidersService implements ServiceProvi
56
56
  );
57
57
 
58
58
  // Validate response structure
59
- if (!response?.ui_platform_mesh_io?.ContentConfigurations) {
59
+ if (!response?.ui_platform_mesh_io?.v1alpha1?.ContentConfigurations) {
60
60
  throw new Error(
61
61
  'Invalid response structure: missing ContentConfigurations',
62
62
  );
@@ -64,7 +64,7 @@ export class ContentConfigurationServiceProvidersService implements ServiceProvi
64
64
 
65
65
  const entity = !entities || !entities.length ? 'main' : entities[0];
66
66
  const contentConfigurations =
67
- response.ui_platform_mesh_io.ContentConfigurations.items
67
+ response.ui_platform_mesh_io.v1alpha1.ContentConfigurations.items
68
68
  .filter(
69
69
  (item) =>
70
70
  item.metadata.labels?.['ui.platform-mesh.io/entity'] === entity,
@@ -3,19 +3,21 @@ import { gql } from 'graphql-request';
3
3
  export const contentConfigurationsQuery = gql`
4
4
  query {
5
5
  ui_platform_mesh_io {
6
- ContentConfigurations {
7
- items {
8
- metadata {
9
- name
10
- labels
11
- }
12
- spec {
13
- remoteConfiguration {
14
- url
6
+ v1alpha1 {
7
+ ContentConfigurations {
8
+ items {
9
+ metadata {
10
+ name
11
+ labels
12
+ }
13
+ spec {
14
+ remoteConfiguration {
15
+ url
16
+ }
17
+ }
18
+ status {
19
+ configurationResult
15
20
  }
16
- }
17
- status {
18
- configurationResult
19
21
  }
20
22
  }
21
23
  }
@@ -1,5 +1,5 @@
1
1
  export interface ContentConfigurationQueryResponse {
2
- ui_platform_mesh_io: ContentConfigurationsResponse;
2
+ ui_platform_mesh_io: { v1alpha1: ContentConfigurationsResponse };
3
3
  }
4
4
 
5
5
  export interface ContentConfigurationsResponse {