@valtimo/plugin-management 13.46.0 → 13.47.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/fesm2022/valtimo-plugin-management.mjs +4829 -320
- package/fesm2022/valtimo-plugin-management.mjs.map +1 -1
- package/lib/components/plugin-add-modal/plugin-add-modal.component.d.ts +90 -14
- package/lib/components/plugin-add-select/plugin-add-select.component.d.ts +17 -11
- package/lib/components/plugin-app-add-modal/plugin-app-add-modal.component.d.ts +127 -0
- package/lib/components/plugin-apps-page/plugin-apps-page.component.d.ts +120 -0
- package/lib/components/plugin-edit-modal/plugin-edit-modal.component.d.ts +10 -1
- package/lib/components/plugin-external-configure/plugin-external-configure.component.d.ts +78 -0
- package/lib/components/plugin-external-edit-modal/plugin-external-edit-modal.component.d.ts +79 -0
- package/lib/components/plugin-external-permissions/plugin-external-permissions.component.d.ts +83 -0
- package/lib/components/plugin-external-review-modal/plugin-external-review-modal.component.d.ts +41 -0
- package/lib/components/plugin-host-connection-form/plugin-host-connection-form.component.d.ts +85 -0
- package/lib/components/plugin-host-edit-modal/plugin-host-edit-modal.component.d.ts +58 -0
- package/lib/components/plugin-host-event-queue-modal/plugin-host-event-queue-modal.component.d.ts +34 -0
- package/lib/components/plugin-host-frontend-origins-modal/plugin-host-frontend-origins-modal.component.d.ts +30 -0
- package/lib/components/plugin-host-modal/plugin-host-modal.component.d.ts +46 -0
- package/lib/components/plugin-hosts-page/plugin-hosts-page.component.d.ts +84 -0
- package/lib/components/plugin-log-modal/plugin-log-modal.component.d.ts +55 -0
- package/lib/components/plugin-management/plugin-management.component.d.ts +102 -13
- package/lib/components/plugin-upload-modal/plugin-upload-modal.component.d.ts +76 -0
- package/lib/components/plugin-usage-modal/plugin-usage-modal.component.d.ts +26 -0
- package/lib/constants/index.d.ts +2 -0
- package/lib/constants/plugin-app-add-modal.test-ids.d.ts +8 -0
- package/lib/constants/plugin-external-review-modal.test-ids.d.ts +4 -0
- package/lib/models/external-plugin-permissions.model.d.ts +6 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/unified-plugin-definition.model.d.ts +41 -0
- package/lib/plugin-management.module.d.ts +12 -5
- package/lib/utils/csp-allows-origin.util.d.ts +13 -0
- package/lib/utils/external-plugin-compatibility.util.d.ts +11 -0
- package/lib/utils/external-plugin-egress.util.d.ts +15 -0
- package/lib/utils/index.d.ts +3 -0
- package/package.json +1 -1
- package/public-api.d.ts +5 -0
|
@@ -1,30 +1,119 @@
|
|
|
1
|
+
import { AfterViewInit, OnDestroy } from '@angular/core';
|
|
1
2
|
import { TranslateService } from '@ngx-translate/core';
|
|
2
3
|
import { ActionItem, ColumnConfig } from '@valtimo/components';
|
|
3
|
-
import {
|
|
4
|
+
import { GlobalNotificationService } from '@valtimo/shared';
|
|
5
|
+
import { ExternalPluginDefinition, ExternalPluginHost, ExternalPluginHostUsage, ExternalPluginService, ExternalPluginUploadResult, PluginManagementService, PluginTranslationService } from '@valtimo/plugin';
|
|
6
|
+
import { IconService } from 'carbon-components-angular';
|
|
4
7
|
import { NGXLogger } from 'ngx-logger';
|
|
5
8
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
6
9
|
import { PluginManagementStateService } from '../../services';
|
|
10
|
+
import { UnifiedPluginConfigurationRow } from '../../models';
|
|
7
11
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class PluginManagementComponent {
|
|
9
|
-
private readonly
|
|
10
|
-
private readonly
|
|
11
|
-
private readonly
|
|
12
|
-
private readonly
|
|
13
|
-
private readonly
|
|
14
|
-
readonly
|
|
12
|
+
export declare class PluginManagementComponent implements AfterViewInit, OnDestroy {
|
|
13
|
+
private readonly _logger;
|
|
14
|
+
private readonly _pluginManagementService;
|
|
15
|
+
private readonly _pluginTranslationService;
|
|
16
|
+
private readonly _stateService;
|
|
17
|
+
private readonly _translateService;
|
|
18
|
+
private readonly _externalPluginService;
|
|
19
|
+
private readonly _iconService;
|
|
20
|
+
private readonly _globalNotificationService;
|
|
21
|
+
private readonly _destroy$;
|
|
22
|
+
private _pluginNameColumnTemplate;
|
|
23
|
+
readonly fields$: BehaviorSubject<ColumnConfig[]>;
|
|
15
24
|
readonly actionItems: ActionItem[];
|
|
25
|
+
showLogModal: boolean;
|
|
26
|
+
logConfigurationId: string | null;
|
|
27
|
+
logConfigurationTitle: string;
|
|
16
28
|
readonly loading$: BehaviorSubject<boolean>;
|
|
17
29
|
readonly showEditModal$: BehaviorSubject<boolean>;
|
|
18
30
|
readonly showAddModal$: BehaviorSubject<boolean>;
|
|
19
|
-
readonly pluginConfigurations$: Observable<
|
|
31
|
+
readonly pluginConfigurations$: Observable<Array<UnifiedPluginConfigurationRow>>;
|
|
20
32
|
readonly saveNewConfiguration$: BehaviorSubject<boolean>;
|
|
21
|
-
|
|
33
|
+
readonly showExternalEditModal$: BehaviorSubject<boolean>;
|
|
34
|
+
readonly selectedExternalConfiguration$: BehaviorSubject<UnifiedPluginConfigurationRow>;
|
|
35
|
+
readonly deleteConfigurationModalOpen$: BehaviorSubject<boolean>;
|
|
36
|
+
configurationToDelete: {
|
|
37
|
+
id: string;
|
|
38
|
+
title: string;
|
|
39
|
+
source: 'external' | 'embedded';
|
|
40
|
+
} | null;
|
|
41
|
+
readonly usageModalOpen$: BehaviorSubject<boolean>;
|
|
42
|
+
readonly usageModalUsages$: BehaviorSubject<ExternalPluginHostUsage[]>;
|
|
43
|
+
usageModalEntityName: string | null;
|
|
44
|
+
usageModalTitleKey: string;
|
|
45
|
+
usageModalDescriptionKey: string;
|
|
46
|
+
readonly externalDefsRefreshing$: BehaviorSubject<boolean>;
|
|
47
|
+
private _externalDefsInitialLoad;
|
|
48
|
+
private readonly _tabVisible$;
|
|
49
|
+
private readonly _pollTick$;
|
|
50
|
+
/**
|
|
51
|
+
* Single shared definitions poll: no matter how many consumers subscribe, only one
|
|
52
|
+
* `getDefinitions()` request is made per tick/refresh. Deduped so consumers only re-render when
|
|
53
|
+
* the data actually changed. The toolbar refresh spinner is only driven by explicit refreshes
|
|
54
|
+
* (upload/save/delete), never by the background poll, so it does not blink every 5 seconds when
|
|
55
|
+
* the data is unchanged.
|
|
56
|
+
*/
|
|
57
|
+
private readonly _allDefinitions$;
|
|
58
|
+
readonly uploadModalOpen$: BehaviorSubject<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* Single shared hosts poll: one `getHosts()` request per tick, shared by every consumer
|
|
61
|
+
* (configurations list, connected hosts, upload button state). Deduped so consumers only
|
|
62
|
+
* re-render when the data actually changed.
|
|
63
|
+
*/
|
|
64
|
+
private readonly _allHosts$;
|
|
65
|
+
readonly connectedHosts$: Observable<Array<ExternalPluginHost>>;
|
|
66
|
+
readonly hasConnectedHosts$: Observable<boolean>;
|
|
67
|
+
/**
|
|
68
|
+
* Definitions offered in the add flow. Apps are connected *and* configured on the apps page, so
|
|
69
|
+
* definitions served by an APP-kind host are excluded here.
|
|
70
|
+
*/
|
|
71
|
+
readonly externalDefinitions$: Observable<ExternalPluginDefinition[]>;
|
|
72
|
+
constructor(_logger: NGXLogger, _pluginManagementService: PluginManagementService, _pluginTranslationService: PluginTranslationService, _stateService: PluginManagementStateService, _translateService: TranslateService, _externalPluginService: ExternalPluginService, _iconService: IconService, _globalNotificationService: GlobalNotificationService);
|
|
73
|
+
ngAfterViewInit(): void;
|
|
74
|
+
ngOnDestroy(): void;
|
|
22
75
|
showAddModal(): void;
|
|
23
|
-
editConfiguration(configuration:
|
|
24
|
-
|
|
76
|
+
editConfiguration(configuration: UnifiedPluginConfigurationRow): void;
|
|
77
|
+
viewLogs(configuration: UnifiedPluginConfigurationRow): void;
|
|
78
|
+
closeLogModal(): void;
|
|
79
|
+
deleteConfiguration(configuration: UnifiedPluginConfigurationRow): void;
|
|
80
|
+
confirmDeleteConfiguration(): void;
|
|
81
|
+
cancelDeleteConfiguration(): void;
|
|
82
|
+
private _requestDeleteConfiguration;
|
|
83
|
+
private _performDeleteExternalConfiguration;
|
|
84
|
+
private _performDeleteEmbeddedConfiguration;
|
|
25
85
|
closeEditModal(): void;
|
|
26
86
|
closeAddModal(): void;
|
|
27
|
-
duplicateConfiguration(configuration:
|
|
87
|
+
duplicateConfiguration(configuration: UnifiedPluginConfigurationRow): void;
|
|
88
|
+
closeExternalEditModal(): void;
|
|
89
|
+
onExternalConfigSaved(): void;
|
|
90
|
+
onExternalConfigDeleted(configurationId: string): void;
|
|
91
|
+
onEmbeddedConfigDeleted(payload: {
|
|
92
|
+
configurationId: string;
|
|
93
|
+
configurationTitle: string;
|
|
94
|
+
}): void;
|
|
95
|
+
openUploadModal(): void;
|
|
96
|
+
closeUploadModal(): void;
|
|
97
|
+
/**
|
|
98
|
+
* The backend runs discovery before answering the upload, so the definition already exists by the
|
|
99
|
+
* time this fires — the refresh below shows it, and the notification names what was installed and
|
|
100
|
+
* offers the obvious next step. The fields degrade gracefully: an older host that answers without
|
|
101
|
+
* them still yields a valid message, just without the name.
|
|
102
|
+
*
|
|
103
|
+
* An actionable notification rather than a plain toast, because a toast renders no action; and a
|
|
104
|
+
* longer duration than the 4 s default, since an action the admin never gets to click is worse
|
|
105
|
+
* than no action at all.
|
|
106
|
+
*/
|
|
107
|
+
onPluginUploaded(result: ExternalPluginUploadResult): void;
|
|
108
|
+
/**
|
|
109
|
+
* Opens the add-configuration flow straight on the configuration step for the plugin that was
|
|
110
|
+
* just uploaded. The definition is matched on `pluginId@version` against the freshly refreshed
|
|
111
|
+
* list; if discovery has not surfaced it yet the flow still opens, just on the plugin picker —
|
|
112
|
+
* a slower path, never a dead end.
|
|
113
|
+
*/
|
|
114
|
+
configureUploadedPlugin(result: ExternalPluginUploadResult): void;
|
|
115
|
+
closeUsageModal(): void;
|
|
116
|
+
private _showConfigurationInUseModal;
|
|
28
117
|
static ɵfac: i0.ɵɵFactoryDeclaration<PluginManagementComponent, never>;
|
|
29
118
|
static ɵcmp: i0.ɵɵComponentDeclaration<PluginManagementComponent, "valtimo-plugin-management", never, {}, {}, never, never, false, never>;
|
|
30
119
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
+
import { FormBuilder } from '@angular/forms';
|
|
4
|
+
import { ListItem, NotificationContent } from 'carbon-components-angular';
|
|
5
|
+
import { ExternalPluginEndpoint, ExternalPluginHost, ExternalPluginService, ExternalPluginUploadResult } from '@valtimo/plugin';
|
|
6
|
+
import { BehaviorSubject } from 'rxjs';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* State of the overwrite-review dialog: what the already-existing version is, the permissions the
|
|
10
|
+
* uploaded package requests (shown for re-review) and the pre-built warning notification.
|
|
11
|
+
*/
|
|
12
|
+
interface OverwriteReview {
|
|
13
|
+
pluginId: string;
|
|
14
|
+
version: string;
|
|
15
|
+
endpoints: Array<ExternalPluginEndpoint>;
|
|
16
|
+
eventSubscriptions: Array<string>;
|
|
17
|
+
capabilities: Array<string>;
|
|
18
|
+
egress: Array<string>;
|
|
19
|
+
warning: NotificationContent;
|
|
20
|
+
}
|
|
21
|
+
export declare class PluginUploadModalComponent implements OnChanges {
|
|
22
|
+
private readonly _formBuilder;
|
|
23
|
+
private readonly _externalPluginService;
|
|
24
|
+
private readonly _translateService;
|
|
25
|
+
open: boolean;
|
|
26
|
+
hosts: Array<ExternalPluginHost>;
|
|
27
|
+
closeEvent: EventEmitter<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Emitted only on a successful upload, carrying the host's `{pluginId, version}` so the parent
|
|
30
|
+
* can name the installed plugin in its success notification.
|
|
31
|
+
*/
|
|
32
|
+
uploadedEvent: EventEmitter<ExternalPluginUploadResult>;
|
|
33
|
+
readonly $uploading: import("@angular/core").WritableSignal<boolean>;
|
|
34
|
+
readonly $hostItems: import("@angular/core").WritableSignal<ListItem[]>;
|
|
35
|
+
readonly $selectedHostId: import("@angular/core").WritableSignal<string>;
|
|
36
|
+
readonly _compatibilityModalOpen$: BehaviorSubject<boolean>;
|
|
37
|
+
readonly $compatibilityWarning: import("@angular/core").WritableSignal<string>;
|
|
38
|
+
readonly $uploadNotification: import("@angular/core").WritableSignal<NotificationContent>;
|
|
39
|
+
readonly $overwriteReview: import("@angular/core").WritableSignal<OverwriteReview>;
|
|
40
|
+
readonly $overwriteAcknowledged: import("@angular/core").WritableSignal<boolean>;
|
|
41
|
+
readonly _fileForm: import("@angular/forms").FormGroup<{
|
|
42
|
+
file: import("@angular/forms").FormControl<Set<any>>;
|
|
43
|
+
}>;
|
|
44
|
+
readonly $fileSelected: import("@angular/core").WritableSignal<boolean>;
|
|
45
|
+
readonly $fileTooLarge: import("@angular/core").WritableSignal<boolean>;
|
|
46
|
+
private readonly _destroyRef;
|
|
47
|
+
constructor(_formBuilder: FormBuilder, _externalPluginService: ExternalPluginService, _translateService: TranslateService);
|
|
48
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
49
|
+
onHostSelected(event: {
|
|
50
|
+
item: ListItem & {
|
|
51
|
+
hostId?: string;
|
|
52
|
+
};
|
|
53
|
+
}): void;
|
|
54
|
+
onUpload(force?: boolean, overwrite?: boolean): void;
|
|
55
|
+
onConfirmOverwrite(): void;
|
|
56
|
+
onCancelOverwrite(): void;
|
|
57
|
+
onOverwriteValidityChange(valid: boolean): void;
|
|
58
|
+
onConfirmIncompatibleUpload(): void;
|
|
59
|
+
onCancelIncompatibleUpload(): void;
|
|
60
|
+
onClose(): void;
|
|
61
|
+
private _resetAndClose;
|
|
62
|
+
/**
|
|
63
|
+
* The uploaded pluginId@version already exists on the host. Identical content means there is
|
|
64
|
+
* nothing to overwrite — a friendly info suffices. Different (or undeterminable) content opens
|
|
65
|
+
* the overwrite-review dialog: the requested permissions from the enriched 409 body are shown
|
|
66
|
+
* for re-review and the admin must explicitly acknowledge them before the overwrite proceeds.
|
|
67
|
+
*/
|
|
68
|
+
private _handleVersionExists;
|
|
69
|
+
private _selectedFile;
|
|
70
|
+
private _buildTooLargeNotification;
|
|
71
|
+
private _buildUploadErrorNotification;
|
|
72
|
+
private _parseRelayedHostBody;
|
|
73
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PluginUploadModalComponent, never>;
|
|
74
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PluginUploadModalComponent, "valtimo-plugin-upload-modal", never, { "open": { "alias": "open"; "required": false; }; "hosts": { "alias": "hosts"; "required": false; }; }, { "closeEvent": "closeEvent"; "uploadedEvent": "uploadedEvent"; }, never, never, true, never>;
|
|
75
|
+
}
|
|
76
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ExternalPluginHostUsage, ExternalPluginHostUsageParentType } from '@valtimo/plugin';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Read-only modal shown when an admin tries to delete an external plugin entity (a host or a
|
|
6
|
+
* configuration) that is still referenced by one or more BPMN process links, case tabs, case
|
|
7
|
+
* widgets or building-block mappings. The list mirrors the `usages` payload the backend would
|
|
8
|
+
* attach to a 409 from the corresponding `DELETE` endpoint; only "Close" is offered — there is no
|
|
9
|
+
* force-delete.
|
|
10
|
+
*
|
|
11
|
+
* The parent supplies the heading + description translation keys so the same modal can be
|
|
12
|
+
* reused for hosts and configurations (and any future entity with the same usage shape).
|
|
13
|
+
*/
|
|
14
|
+
export declare class PluginUsageModalComponent {
|
|
15
|
+
open: boolean;
|
|
16
|
+
titleTranslationKey: string;
|
|
17
|
+
descriptionTranslationKey: string;
|
|
18
|
+
entityName: string | null;
|
|
19
|
+
usages: Array<ExternalPluginHostUsage>;
|
|
20
|
+
closeEvent: EventEmitter<void>;
|
|
21
|
+
onClose(): void;
|
|
22
|
+
trackByUsage(_index: number, usage: ExternalPluginHostUsage): string;
|
|
23
|
+
parentTypeTagColor(parentType: ExternalPluginHostUsageParentType): string;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PluginUsageModalComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PluginUsageModalComponent, "valtimo-plugin-usage-modal", never, { "open": { "alias": "open"; "required": false; }; "titleTranslationKey": { "alias": "titleTranslationKey"; "required": false; }; "descriptionTranslationKey": { "alias": "descriptionTranslationKey"; "required": false; }; "entityName": { "alias": "entityName"; "required": false; }; "usages": { "alias": "usages"; "required": false; }; }, { "closeEvent": "closeEvent"; }, never, never, true, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PLUGIN_APP_ADD_MODAL_TEST_IDS: {
|
|
2
|
+
readonly cancelButton: "pluginAppAddModalCancelButton";
|
|
3
|
+
readonly connectButton: "pluginAppAddModalConnectButton";
|
|
4
|
+
readonly continueButton: "pluginAppAddModalContinueButton";
|
|
5
|
+
readonly retryButton: "pluginAppAddModalRetryButton";
|
|
6
|
+
readonly nextButton: "pluginAppAddModalNextButton";
|
|
7
|
+
readonly completeButton: "pluginAppAddModalCompleteButton";
|
|
8
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExternalPluginEndpoint } from '@valtimo/plugin';
|
|
2
|
+
/** A manifest endpoint enriched with its localized description for display in the permission list. */
|
|
3
|
+
interface EnrichedEndpoint extends ExternalPluginEndpoint {
|
|
4
|
+
description: string | null;
|
|
5
|
+
}
|
|
6
|
+
export { EnrichedEndpoint };
|
package/lib/models/index.d.ts
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PluginDefinitionWithLogo } from '@valtimo/plugin';
|
|
2
|
+
type PluginConfigurationSource = 'embedded' | 'external';
|
|
3
|
+
interface UnifiedPluginDefinition extends PluginDefinitionWithLogo {
|
|
4
|
+
source: PluginConfigurationSource;
|
|
5
|
+
externalDefinitionId?: string;
|
|
6
|
+
externalName?: string | null;
|
|
7
|
+
externalDescription?: string | null;
|
|
8
|
+
externalLogoUrl?: string | null;
|
|
9
|
+
}
|
|
10
|
+
interface UnifiedPluginConfigurationRow {
|
|
11
|
+
id?: string;
|
|
12
|
+
title: string;
|
|
13
|
+
pluginName: string;
|
|
14
|
+
definitionKey: string;
|
|
15
|
+
source: PluginConfigurationSource;
|
|
16
|
+
sourceLabel?: string;
|
|
17
|
+
properties?: object;
|
|
18
|
+
pluginDefinition?: {
|
|
19
|
+
key: string;
|
|
20
|
+
};
|
|
21
|
+
externalDefinitionId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Set on external rows whose plugin definition is incompatible with the running GZAC version.
|
|
24
|
+
* Drives the "Incompatible" tag and its tooltip ([compatibilityMessage]) in the table.
|
|
25
|
+
*/
|
|
26
|
+
incompatible?: boolean;
|
|
27
|
+
compatibilityMessage?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Drives the "Awaiting host" tag: the configuration is real and everything referencing it
|
|
30
|
+
* resolves, but its plugin cannot run until its host serves it.
|
|
31
|
+
*/
|
|
32
|
+
awaitingHost?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Drives the "Review required" tag: the plugin's package changed after acceptance, so nothing is
|
|
35
|
+
* pushed and no service token is issued until an admin accepts it.
|
|
36
|
+
*/
|
|
37
|
+
reviewRequired?: boolean;
|
|
38
|
+
reviewMessage?: string;
|
|
39
|
+
hostName?: string;
|
|
40
|
+
}
|
|
41
|
+
export { PluginConfigurationSource, UnifiedPluginDefinition, UnifiedPluginConfigurationRow };
|
|
@@ -6,13 +6,20 @@ import * as i4 from "./components/plugin-configure/plugin-configure.component";
|
|
|
6
6
|
import * as i5 from "./components/plugin-edit-modal/plugin-edit-modal.component";
|
|
7
7
|
import * as i6 from "./components/plugin-edit/plugin-edit.component";
|
|
8
8
|
import * as i7 from "@angular/common";
|
|
9
|
-
import * as i8 from "
|
|
10
|
-
import * as i9 from "
|
|
11
|
-
import * as i10 from "@
|
|
12
|
-
import * as i11 from "@valtimo/
|
|
9
|
+
import * as i8 from "@angular/forms";
|
|
10
|
+
import * as i9 from "./plugin-management-routing";
|
|
11
|
+
import * as i10 from "@ngx-translate/core";
|
|
12
|
+
import * as i11 from "@valtimo/components";
|
|
13
13
|
import * as i12 from "carbon-components-angular";
|
|
14
|
+
import * as i13 from "@valtimo/plugin";
|
|
15
|
+
import * as i14 from "./components/plugin-external-edit-modal/plugin-external-edit-modal.component";
|
|
16
|
+
import * as i15 from "./components/plugin-external-configure/plugin-external-configure.component";
|
|
17
|
+
import * as i16 from "./components/plugin-external-permissions/plugin-external-permissions.component";
|
|
18
|
+
import * as i17 from "./components/plugin-upload-modal/plugin-upload-modal.component";
|
|
19
|
+
import * as i18 from "./components/plugin-usage-modal/plugin-usage-modal.component";
|
|
20
|
+
import * as i19 from "./components/plugin-log-modal/plugin-log-modal.component";
|
|
14
21
|
export declare class PluginManagementModule {
|
|
15
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<PluginManagementModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PluginManagementModule, [typeof i1.PluginManagementComponent, typeof i2.PluginAddModalComponent, typeof i3.PluginAddSelectComponent, typeof i4.PluginConfigureComponent, typeof i5.PluginEditModalComponent, typeof i6.PluginEditComponent], [typeof i7.CommonModule, typeof i8.
|
|
23
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PluginManagementModule, [typeof i1.PluginManagementComponent, typeof i2.PluginAddModalComponent, typeof i3.PluginAddSelectComponent, typeof i4.PluginConfigureComponent, typeof i5.PluginEditModalComponent, typeof i6.PluginEditComponent], [typeof i7.CommonModule, typeof i8.ReactiveFormsModule, typeof i9.PluginManagementRoutingModule, typeof i10.TranslateModule, typeof i11.ParagraphModule, typeof i11.TableModule, typeof i12.ProgressIndicatorModule, typeof i11.VModalModule, typeof i13.PluginTranslatePipeModule, typeof i13.PluginConfigurationContainerModule, typeof i12.ButtonModule, typeof i11.CarbonListModule, typeof i12.ModalModule, typeof i12.IconModule, typeof i12.NotificationModule, typeof i12.TagModule, typeof i11.ValtimoCdsModalDirective, typeof i12.LayerModule, typeof i12.TilesModule, typeof i12.LoadingModule, typeof i14.PluginExternalEditModalComponent, typeof i15.PluginExternalConfigureComponent, typeof i16.PluginExternalPermissionsComponent, typeof i17.PluginUploadModalComponent, typeof i18.PluginUsageModalComponent, typeof i19.PluginLogModalComponent, typeof i11.ConfirmationModalModule, typeof i11.TooltipModule], [typeof i1.PluginManagementComponent, typeof i2.PluginAddModalComponent, typeof i3.PluginAddSelectComponent, typeof i4.PluginConfigureComponent, typeof i5.PluginEditModalComponent, typeof i6.PluginEditComponent]>;
|
|
17
24
|
static ɵinj: i0.ɵɵInjectorDeclaration<PluginManagementModule>;
|
|
18
25
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the CSP meta tag the app bootstrapped with allows framing content from the given URL's
|
|
3
|
+
* origin. The meta tag is immutable once parsed, so a host registered *after* bootstrap is not
|
|
4
|
+
* covered until the page is reloaded — that is exactly what this check detects.
|
|
5
|
+
*
|
|
6
|
+
* Returns `true` when no CSP meta tag is present (no CSP configured → nothing blocks the iframe)
|
|
7
|
+
* or when the URL cannot be parsed (nothing sensible to check; the iframe component itself refuses
|
|
8
|
+
* unsafe URLs). The matcher intentionally covers only the source forms this app's CSP is built
|
|
9
|
+
* from (exact origins, `*`, scheme-only and `*.domain` sources) — anything unrecognised counts as
|
|
10
|
+
* "not allowed", which errs on the side of a harmless extra page refresh.
|
|
11
|
+
*/
|
|
12
|
+
declare function cspAllowsFrameOrigin(url: string, doc?: Document): boolean;
|
|
13
|
+
export { cspAllowsFrameOrigin };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
2
|
+
import { ExternalPluginCompatibilityInfo } from '@valtimo/plugin';
|
|
3
|
+
/**
|
|
4
|
+
* Builds the localized, non-blocking compatibility warning shown wherever an incompatible external
|
|
5
|
+
* plugin surfaces (add-configuration modal, configuration table tooltip, upload confirmation).
|
|
6
|
+
*
|
|
7
|
+
* Keeps it simple: state that the version is incompatible, the version in use, and the supported
|
|
8
|
+
* bounds — the maximum only when the plugin declares one. Single source of truth so every entry
|
|
9
|
+
* point reads identically.
|
|
10
|
+
*/
|
|
11
|
+
export declare function buildExternalPluginCompatibilityMessage(info: ExternalPluginCompatibilityInfo, translateService: TranslateService): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview of the `http_request` destinations GZAC will derive from a configuration's own values —
|
|
3
|
+
* the origins of the properties the plugin marked `x-egress-target: true` in its
|
|
4
|
+
* `configurationSchema`.
|
|
5
|
+
*
|
|
6
|
+
* Display only. GZAC recomputes this server-side on every push (`PluginEgressTargets`) and that
|
|
7
|
+
* result is what the plugin host enforces; this exists so the permissions step can show the admin
|
|
8
|
+
* the destinations their own input just authorised, alongside the manifest-declared ones. Kept in
|
|
9
|
+
* step with the server by normalising the same way: scheme + host + port, with an absent port
|
|
10
|
+
* meaning the scheme's default.
|
|
11
|
+
*
|
|
12
|
+
* Only top-level properties are inspected, matching the server-side walkers for `x-secret` and
|
|
13
|
+
* `x-egress-target`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function deriveExternalPluginEgressOrigins(configurationSchema: unknown, properties: Record<string, unknown> | null | undefined): Array<string>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './lib/constants';
|
|
1
2
|
export * from './lib/models';
|
|
2
3
|
export * from './lib/services';
|
|
3
4
|
export * from './lib/plugin-management.module';
|
|
@@ -7,3 +8,7 @@ export * from './lib/components/plugin-add-select/plugin-add-select.component';
|
|
|
7
8
|
export * from './lib/components/plugin-configure/plugin-configure.component';
|
|
8
9
|
export * from './lib/components/plugin-edit-modal/plugin-edit-modal.component';
|
|
9
10
|
export * from './lib/components/plugin-edit/plugin-edit.component';
|
|
11
|
+
export * from './lib/components/plugin-host-modal/plugin-host-modal.component';
|
|
12
|
+
export * from './lib/components/plugin-app-add-modal/plugin-app-add-modal.component';
|
|
13
|
+
export * from './lib/components/plugin-hosts-page/plugin-hosts-page.component';
|
|
14
|
+
export * from './lib/components/plugin-apps-page/plugin-apps-page.component';
|