@adminide-stack/marketplace-module-server 12.0.4-alpha.20 → 12.0.4-alpha.201

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.
Files changed (185) hide show
  1. package/Readme.md +321 -0
  2. package/lib/containers/module.d.ts +7 -0
  3. package/lib/containers/module.d.ts.map +1 -1
  4. package/lib/containers/module.js +11 -5
  5. package/lib/containers/module.js.map +1 -1
  6. package/lib/dataloaders/index.d.ts +1 -0
  7. package/lib/dataloaders/index.d.ts.map +1 -0
  8. package/lib/demo/test-graphql-examples.d.ts +73 -0
  9. package/lib/demo/test-graphql-examples.d.ts.map +1 -0
  10. package/lib/graphql/resolvers/form-templates-resolver.d.ts +220 -0
  11. package/lib/graphql/resolvers/form-templates-resolver.d.ts.map +1 -0
  12. package/lib/graphql/resolvers/form-templates-resolver.js +170 -0
  13. package/lib/graphql/resolvers/form-templates-resolver.js.map +1 -0
  14. package/lib/graphql/resolvers/gallery-resolver.d.ts +15 -0
  15. package/lib/graphql/resolvers/gallery-resolver.d.ts.map +1 -0
  16. package/lib/graphql/resolvers/gallery-resolver.js +35 -0
  17. package/lib/graphql/resolvers/gallery-resolver.js.map +1 -0
  18. package/lib/graphql/resolvers/index.d.ts +247 -1
  19. package/lib/graphql/resolvers/index.d.ts.map +1 -1
  20. package/lib/graphql/resolvers/index.js +1 -0
  21. package/lib/graphql/resolvers/index.js.map +1 -0
  22. package/lib/graphql/resolvers/installed-extension-resolver.d.ts +5 -0
  23. package/lib/graphql/resolvers/installed-extension-resolver.d.ts.map +1 -0
  24. package/lib/graphql/resolvers/installed-extension-resolver.js +276 -0
  25. package/lib/graphql/resolvers/installed-extension-resolver.js.map +1 -0
  26. package/lib/graphql/resolvers/marketplace-form-resolver.d.ts +13 -0
  27. package/lib/graphql/resolvers/marketplace-form-resolver.d.ts.map +1 -0
  28. package/lib/graphql/resolvers/marketplace-form-resolver.js +90 -0
  29. package/lib/graphql/resolvers/marketplace-form-resolver.js.map +1 -0
  30. package/lib/graphql/resolvers/publisher-analytics-resolver.d.ts +14 -0
  31. package/lib/graphql/resolvers/publisher-analytics-resolver.d.ts.map +1 -0
  32. package/lib/graphql/resolvers/publisher-analytics-resolver.js +221 -0
  33. package/lib/graphql/resolvers/publisher-analytics-resolver.js.map +1 -0
  34. package/lib/graphql/resolvers/publisher-resolver.d.ts +5 -0
  35. package/lib/graphql/resolvers/publisher-resolver.d.ts.map +1 -0
  36. package/lib/graphql/resolvers/publisher-resolver.js +176 -0
  37. package/lib/graphql/resolvers/publisher-resolver.js.map +1 -0
  38. package/lib/graphql/resolvers/registry-extension-resolver.d.ts +5 -0
  39. package/lib/graphql/resolvers/registry-extension-resolver.d.ts.map +1 -0
  40. package/lib/graphql/resolvers/registry-extension-resolver.js +46 -0
  41. package/lib/graphql/resolvers/registry-extension-resolver.js.map +1 -0
  42. package/lib/graphql/schemas/extension-pricing.graphql +546 -0
  43. package/lib/graphql/schemas/extension-pricing.graphql.js +1 -0
  44. package/lib/graphql/schemas/extension-pricing.graphql.js.map +1 -0
  45. package/lib/graphql/schemas/extension-registry.graphql +104 -0
  46. package/lib/graphql/schemas/extension-registry.graphql.js +1 -0
  47. package/lib/graphql/schemas/extension-registry.graphql.js.map +1 -0
  48. package/lib/graphql/schemas/form-templates.graphql +269 -0
  49. package/lib/graphql/schemas/form-templates.graphql.js +1 -0
  50. package/lib/graphql/schemas/form-templates.graphql.js.map +1 -0
  51. package/lib/graphql/schemas/gallery-schema.graphql +247 -0
  52. package/lib/graphql/schemas/gallery-schema.graphql.js +1 -0
  53. package/lib/graphql/schemas/gallery-schema.graphql.js.map +1 -0
  54. package/lib/graphql/schemas/index.d.ts.map +1 -1
  55. package/lib/graphql/schemas/index.js +3 -4
  56. package/lib/graphql/schemas/index.js.map +1 -1
  57. package/lib/graphql/schemas/installed-extension.graphql +295 -0
  58. package/lib/graphql/schemas/installed-extension.graphql.js +1 -0
  59. package/lib/graphql/schemas/installed-extension.graphql.js.map +1 -0
  60. package/lib/graphql/schemas/publisher-analytics.graphql +305 -0
  61. package/lib/graphql/schemas/publisher-analytics.graphql.js +1 -0
  62. package/lib/graphql/schemas/publisher-analytics.graphql.js.map +1 -0
  63. package/lib/graphql/schemas/publisher.graphql +376 -0
  64. package/lib/graphql/schemas/publisher.graphql.js +1 -0
  65. package/lib/graphql/schemas/publisher.graphql.js.map +1 -0
  66. package/lib/graphql/schemas/service.graphql +196 -0
  67. package/lib/index.d.ts +3 -1
  68. package/lib/index.d.ts.map +1 -1
  69. package/lib/index.js +1 -1
  70. package/lib/index.js.map +1 -1
  71. package/lib/module.d.ts +1 -1
  72. package/lib/module.d.ts.map +1 -1
  73. package/lib/module.js +9 -23
  74. package/lib/module.js.map +1 -1
  75. package/lib/plugins/extension-moleculer-service.d.ts +86 -0
  76. package/lib/plugins/extension-moleculer-service.d.ts.map +1 -0
  77. package/lib/plugins/index.d.ts +2 -0
  78. package/lib/plugins/index.d.ts.map +1 -0
  79. package/lib/services/extension-gallery-repository.d.ts +17 -0
  80. package/lib/services/extension-gallery-repository.d.ts.map +1 -0
  81. package/lib/services/extension-gallery-repository.js +192 -0
  82. package/lib/services/extension-gallery-repository.js.map +1 -0
  83. package/lib/services/extension-gallery-service-new.d.ts +39 -0
  84. package/lib/services/extension-gallery-service-new.d.ts.map +1 -0
  85. package/lib/services/extension-gallery-service.d.ts +30 -0
  86. package/lib/services/extension-gallery-service.d.ts.map +1 -0
  87. package/lib/services/extension-gallery-service.js +311 -0
  88. package/lib/services/extension-gallery-service.js.map +1 -0
  89. package/lib/services/index.d.ts +6 -1
  90. package/lib/services/index.d.ts.map +1 -1
  91. package/lib/services/installed-extension-service-ext.d.ts +14 -0
  92. package/lib/services/installed-extension-service-ext.d.ts.map +1 -0
  93. package/lib/services/installed-extension-service-ext.js +401 -0
  94. package/lib/services/installed-extension-service-ext.js.map +1 -0
  95. package/lib/services/installed-extension-service.d.ts +96 -0
  96. package/lib/services/installed-extension-service.d.ts.map +1 -0
  97. package/lib/services/installed-extension-service.js +521 -0
  98. package/lib/services/installed-extension-service.js.map +1 -0
  99. package/lib/services/installed-extension-service.test.d.ts +1 -0
  100. package/lib/services/installed-extension-service.test.d.ts.map +1 -0
  101. package/lib/services/publisher-analytics-service.d.ts +128 -0
  102. package/lib/services/publisher-analytics-service.d.ts.map +1 -0
  103. package/lib/services/publisher-event-service.d.ts +48 -0
  104. package/lib/services/publisher-event-service.d.ts.map +1 -0
  105. package/lib/services/publisher-event-service.js +296 -0
  106. package/lib/services/publisher-event-service.js.map +1 -0
  107. package/lib/services/publisher-service-context.d.ts +1 -0
  108. package/lib/services/publisher-service-context.d.ts.map +1 -0
  109. package/lib/services/publisher-service.d.ts +60 -0
  110. package/lib/services/publisher-service.d.ts.map +1 -0
  111. package/lib/services/publisher-service.js +134 -0
  112. package/lib/services/publisher-service.js.map +1 -0
  113. package/lib/store/index.d.ts +1 -1
  114. package/lib/store/index.d.ts.map +1 -1
  115. package/lib/store/models/index.d.ts +2 -1
  116. package/lib/store/models/index.d.ts.map +1 -1
  117. package/lib/store/models/installed-extension-model.d.ts +4 -0
  118. package/lib/store/models/installed-extension-model.d.ts.map +1 -0
  119. package/lib/store/models/installed-extension-model.js +260 -0
  120. package/lib/store/models/installed-extension-model.js.map +1 -0
  121. package/lib/store/models/publisher-event-model.d.ts +11 -0
  122. package/lib/store/models/publisher-event-model.d.ts.map +1 -0
  123. package/lib/store/models/publisher-model.d.ts +5 -0
  124. package/lib/store/models/publisher-model.d.ts.map +1 -0
  125. package/lib/store/models/publisher-model.js +103 -0
  126. package/lib/store/models/publisher-model.js.map +1 -0
  127. package/lib/store/models/publisher-stats-model.d.ts +1 -0
  128. package/lib/store/models/publisher-stats-model.d.ts.map +1 -0
  129. package/lib/store/repositories/index.d.ts +3 -0
  130. package/lib/store/repositories/index.d.ts.map +1 -0
  131. package/lib/store/repositories/installed-extension-repository.d.ts +73 -0
  132. package/lib/store/repositories/installed-extension-repository.d.ts.map +1 -0
  133. package/lib/store/repositories/installed-extension-repository.js +442 -0
  134. package/lib/store/repositories/installed-extension-repository.js.map +1 -0
  135. package/lib/store/repositories/publisher-analytics-repository.d.ts +1 -0
  136. package/lib/store/repositories/publisher-analytics-repository.d.ts.map +1 -0
  137. package/lib/store/repositories/publisher-repository.d.ts +19 -0
  138. package/lib/store/repositories/publisher-repository.d.ts.map +1 -0
  139. package/lib/store/repositories/publisher-repository.js +87 -0
  140. package/lib/store/repositories/publisher-repository.js.map +1 -0
  141. package/lib/templates/constants/DB_COLL_NAMES.ts.template +5 -0
  142. package/lib/templates/constants/SERVER_TYPES.ts.template +10 -4
  143. package/lib/templates/repositories/ExtensionGalleryRepository.ts.template +44 -0
  144. package/lib/templates/repositories/InstalledExtensionRepository.ts.template +94 -0
  145. package/lib/templates/repositories/MarketplacePublisherRepository.ts.template +24 -0
  146. package/lib/templates/repositories/RegistryExtensionRepository.ts.template +10 -15
  147. package/lib/templates/services/ExtensionGalleryDataLoader.ts.template +2 -0
  148. package/lib/templates/services/ExtensionGalleryService.ts.template +79 -0
  149. package/lib/templates/services/InstalledExtensionDataLoader.ts.template +2 -0
  150. package/lib/templates/services/InstalledExtensionService.ts.template +181 -0
  151. package/lib/templates/services/MarketplacePublisherService.ts.template +49 -0
  152. package/lib/templates/services/PublisherEventService.ts.template +56 -0
  153. package/lib/templates/services/RegistryExtensionService.ts.template +62 -18
  154. package/lib/tests/extension-integration.test.d.ts +1 -0
  155. package/lib/tests/extension-integration.test.d.ts.map +1 -0
  156. package/lib/tests/install-extension-graphql.test.d.ts +2 -0
  157. package/lib/tests/install-extension-graphql.test.d.ts.map +1 -0
  158. package/lib/tests/test-extension-services.d.ts +1 -0
  159. package/lib/tests/test-extension-services.d.ts.map +1 -0
  160. package/lib/utils/publisherValidation.d.ts +23 -0
  161. package/lib/utils/publisherValidation.d.ts.map +1 -0
  162. package/lib/utils/publisherValidation.js +144 -0
  163. package/lib/utils/publisherValidation.js.map +1 -0
  164. package/package.json +15 -7
  165. package/lib/graphql/resolvers/resolvers.d.ts +0 -2
  166. package/lib/graphql/resolvers/resolvers.d.ts.map +0 -1
  167. package/lib/graphql/resolvers/resolvers.js +0 -167
  168. package/lib/graphql/resolvers/resolvers.js.map +0 -1
  169. package/lib/graphql/schemas/extension.graphql +0 -57
  170. package/lib/graphql/schemas/extension.graphql.js +0 -1
  171. package/lib/graphql/schemas/extension.graphql.js.map +0 -1
  172. package/lib/services/extension-service.d.ts +0 -54
  173. package/lib/services/extension-service.d.ts.map +0 -1
  174. package/lib/services/extension-service.js +0 -42
  175. package/lib/services/extension-service.js.map +0 -1
  176. package/lib/store/models/registry-extension-model.d.ts +0 -10
  177. package/lib/store/models/registry-extension-model.d.ts.map +0 -1
  178. package/lib/store/models/registry-extension-model.js +0 -62
  179. package/lib/store/models/registry-extension-model.js.map +0 -1
  180. package/lib/store/repository/index.d.ts +0 -2
  181. package/lib/store/repository/index.d.ts.map +0 -1
  182. package/lib/store/repository/registry-extension-repository.d.ts +0 -31
  183. package/lib/store/repository/registry-extension-repository.d.ts.map +0 -1
  184. package/lib/store/repository/registry-extension-repository.js +0 -135
  185. package/lib/store/repository/registry-extension-repository.js.map +0 -1
@@ -0,0 +1,401 @@
1
+ import {__decorate,__param,__metadata}from'tslib';import {injectable,inject}from'inversify';import {ServiceBroker}from'moleculer';import {CommonType}from'@common-stack/core';import'@cdm-logger/core';import {SERVER_TYPES,ContributionFragmentName,ConfigurationSchemaId,SystemContributionExtensionNames,ExtensionServiceAction,MoleculerServiceName}from'common/server';import {InstalledExtensionService}from'./installed-extension-service.js';/**
2
+ * Convert scope string values from package.json to ConfigurationScope enum numbers
3
+ * Maps: "application" -> 1, "machine" -> 2, "window" -> 3, "resource" -> 4
4
+ */
5
+ function convertScopeStringToNumber(scope) {
6
+ if (typeof scope === 'number') {
7
+ return scope; // Already a number
8
+ }
9
+ if (typeof scope === 'string') {
10
+ const scopeMap = {
11
+ application: 1 /* ConfigurationScope.APPLICATION */,
12
+ machine: 2 /* ConfigurationScope.MACHINE */,
13
+ window: 3 /* ConfigurationScope.WINDOW */,
14
+ resource: 4 /* ConfigurationScope.RESOURCE */
15
+ };
16
+ const normalizedScope = scope.toLowerCase();
17
+ if (normalizedScope in scopeMap) {
18
+ return scopeMap[normalizedScope];
19
+ }
20
+ console.warn(`Unknown scope string: "${scope}", defaulting to WINDOW`);
21
+ }
22
+ // Default to WINDOW scope if undefined or unknown
23
+ return 3 /* ConfigurationScope.WINDOW */;
24
+ }
25
+ /**
26
+ * Recursively process configuration properties to convert scope strings to numbers
27
+ */
28
+ function processConfigurationProperties(properties) {
29
+ if (!properties || typeof properties !== 'object') {
30
+ return properties;
31
+ }
32
+ const processedProperties = {
33
+ ...properties
34
+ };
35
+ for (const [key, value] of Object.entries(processedProperties)) {
36
+ if (value && typeof value === 'object') {
37
+ const objectValue = value;
38
+ // If this property has a scope, convert it
39
+ if ('scope' in objectValue) {
40
+ objectValue.scope = convertScopeStringToNumber(objectValue.scope);
41
+ }
42
+ // Recursively process nested properties
43
+ processedProperties[key] = processConfigurationProperties(objectValue);
44
+ }
45
+ }
46
+ return processedProperties;
47
+ }
48
+ /**
49
+ * Extended InstalledExtensionService that handles Moleculer event broadcasting
50
+ * Follows the pattern of AccountService/AccountServiceExt
51
+ */
52
+ let InstalledExtensionServiceExt = class InstalledExtensionServiceExt extends InstalledExtensionService {
53
+ slugService;
54
+ constructor(repository, registryService, slugService, broker, logger) {
55
+ super(repository, registryService, slugService, broker, logger);
56
+ this.slugService = slugService;
57
+ this.setupEventListeners();
58
+ }
59
+ setupEventListeners() {
60
+ // Listen to extension installed events
61
+ this.onExtensionInstalled.event(async event => {
62
+ console.log('_____>>>>>>> EXTENSION INSTALLLED EVENT IS GETTIN CALLED');
63
+ try {
64
+ // Get full extension data with metadata to extract contributions
65
+ const registryExtension = await this.registryExtensionService.findExtension(event.extensionSlug);
66
+ let configurationNodes = [];
67
+ let configurationDefaults = [];
68
+ if (registryExtension) {
69
+ console.log('Extension found:', event.extensionSlug);
70
+ // Get the current release to access the manifest
71
+ // The manifest is stored in the release, not directly in the registry extension
72
+ const currentRelease = registryExtension.releases?.find(release => release.version === registryExtension.version);
73
+ if (currentRelease && currentRelease.manifest) {
74
+ console.log('Found current release with manifest:', registryExtension.version);
75
+ let contributes = null;
76
+ let parsedManifest = null;
77
+ try {
78
+ // Parse the manifest from the release (stored as JSON string)
79
+ parsedManifest = typeof currentRelease.manifest === 'string' ? JSON.parse(currentRelease.manifest) : currentRelease.manifest;
80
+ console.log('Parsed manifest keys:', Object.keys(parsedManifest));
81
+ contributes = parsedManifest.contributes;
82
+ if (contributes) {
83
+ console.log('Contributes keys:', Object.keys(contributes));
84
+ console.log('Configuration exists:', !!contributes.configuration);
85
+ if (contributes.configuration) {
86
+ console.log('Configuration data:', JSON.stringify(contributes.configuration, null, 2));
87
+ }
88
+ }
89
+ } catch (error) {
90
+ console.warn('Failed to parse release manifest:', error);
91
+ }
92
+ // Extract configuration contributions if they exist
93
+ if (contributes && contributes.configuration) {
94
+ console.log('Configuration contributions found, processing...');
95
+ const configurations = Array.isArray(contributes.configuration) ? contributes.configuration : [contributes.configuration];
96
+ // Format contributions for configuration registry
97
+ configurationNodes = configurations.map(config => {
98
+ // Process properties to convert scope strings to numbers
99
+ const processedProperties = processConfigurationProperties(config.properties || {});
100
+ return {
101
+ id: ContributionFragmentName.Settings,
102
+ title: config.title || registryExtension.name,
103
+ description: config.description,
104
+ properties: processedProperties,
105
+ type: config.type || ['object']
106
+ };
107
+ });
108
+ // Create configuration defaults
109
+ configurationDefaults = [{
110
+ source: {
111
+ id: event.extensionSlug,
112
+ displayName: registryExtension.name
113
+ },
114
+ overrides: {} // Default empty overrides
115
+ }];
116
+ console.log(`Processed ${configurationNodes.length} configuration nodes`);
117
+ } else {
118
+ console.log('No configuration contributions found in manifest');
119
+ }
120
+ } else {
121
+ console.log('No current release or manifest found for version:', registryExtension.version);
122
+ }
123
+ } else {
124
+ console.log('No extension found for:', event.extensionSlug);
125
+ }
126
+ // Add the extension's enabled/disabled state to configuration nodes
127
+ // This tracks the extension status regardless of whether it has configuration contributions
128
+ const extensionStatusNode = {
129
+ id: ContributionFragmentName.Settings,
130
+ title: `${registryExtension?.name || event.extensionSlug} Status`,
131
+ description: `Extension enabled/disabled status for ${event.extensionSlug}`,
132
+ properties: {
133
+ [`extensions.${event.extensionSlug}`]: {
134
+ type: 'boolean',
135
+ default: true,
136
+ // Default to enabled when installed
137
+ description: `Enable/disable ${event.extensionSlug} extension`,
138
+ scope: 3 /* ConfigurationScope.WINDOW */
139
+ }
140
+ },
141
+ type: ['object'],
142
+ extensionInfo: {
143
+ id: event.extensionSlug,
144
+ displayName: registryExtension?.name || event.extensionSlug
145
+ }
146
+ };
147
+ // Add the extension status node to configurationNodes
148
+ // configurationNodes.push(extensionStatusNode);
149
+ // Create the configuration node data that configuration registry expects
150
+ const configurationNode = {
151
+ schemaId: ConfigurationSchemaId.Configuration,
152
+ tenantId: event.tenantId,
153
+ extensionName: event.extensionSlug,
154
+ policyConfigs: event.policies || null,
155
+ configurationNodes,
156
+ configurationDefaults
157
+ };
158
+ const context = {
159
+ schemaId: ConfigurationSchemaId.Configuration,
160
+ tenantId: event.tenantId,
161
+ extensionName: event.extensionSlug,
162
+ accountId: event.installedBy
163
+ // Add other context fields as needed
164
+ };
165
+ console.log('Broadcasting configuration registry event with data:', {
166
+ configurationNode: {
167
+ ...configurationNode,
168
+ configurationNodes: `${configurationNodes.length} nodes`
169
+ },
170
+ context
171
+ });
172
+ // STEP 1: MANDATORY - Register extension in system_extension FIRST (REQUIRED FOR ALL EXTENSIONS)
173
+ console.log('\n🔧 STEP 1: Registering extension in SYSTEM_EXTENSION (MANDATORY)');
174
+ // Create separate configuration node for system extension status
175
+ const systemExtensionNode = {
176
+ schemaId: ConfigurationSchemaId.Configuration,
177
+ tenantId: event.tenantId,
178
+ extensionName: SystemContributionExtensionNames.SystemExtension,
179
+ policyConfigs: null,
180
+ configurationNodes: [extensionStatusNode]
181
+ };
182
+ const systemContext = {
183
+ schemaId: ConfigurationSchemaId.Configuration,
184
+ tenantId: event.tenantId,
185
+ extensionName: SystemContributionExtensionNames.SystemExtension,
186
+ accountId: event.installedBy
187
+ };
188
+ let systemExtensionRegistered = false;
189
+ try {
190
+ console.log('Broadcasting SYSTEM extension registry (MANDATORY)...');
191
+ await this.broker.call('ConfigurationRegistryService.createConfigurationNodeRegistry', {
192
+ data: systemExtensionNode,
193
+ context: systemContext
194
+ });
195
+ systemExtensionRegistered = true;
196
+ console.log('✅ STEP 1 SUCCESS: Extension registered in system_extension');
197
+ } catch (systemError) {
198
+ console.error('❌ STEP 1 FAILED: System extension registration failed:', systemError);
199
+ throw new Error(`Extension installation failed: Could not register in system (${systemError.message})`);
200
+ }
201
+ // STEP 2: CONDITIONAL - Create extension configuration ONLY IF CONTRIBUTIONS EXIST
202
+ let extensionConfigCreated = false;
203
+ if (configurationNodes.length > 0) {
204
+ console.log('\n📝 STEP 2: Creating extension configuration (contributions exist)');
205
+ try {
206
+ console.log('Broadcasting extension configuration registry...');
207
+ await this.broker.call('ConfigurationRegistryService.createConfigurationNodeRegistry', {
208
+ data: configurationNode,
209
+ context
210
+ });
211
+ extensionConfigCreated = true;
212
+ console.log('✅ STEP 2 SUCCESS: Extension configuration created');
213
+ } catch (configError) {
214
+ console.error('❌ STEP 2 FAILED: Extension configuration creation failed:', configError);
215
+ // This is not fatal since system extension is already registered
216
+ console.warn('⚠️ Extension is registered in system but configuration creation failed');
217
+ }
218
+ } else {
219
+ console.log('\nℹ️ STEP 2: Skipping extension configuration (no contributions found)');
220
+ }
221
+ console.log('\n=== EXTENSION INSTALLATION COMPLETED ===');
222
+ console.log('System Extension Registered:', systemExtensionRegistered ? '✅' : '❌');
223
+ console.log('Extension Config Created:', extensionConfigCreated ? '✅' : 'ℹ️ Not needed');
224
+ console.log('Overall Installation:', systemExtensionRegistered ? '✅ SUCCESS' : '❌ FAILED');
225
+ } catch (error) {
226
+ console.error('Error processing extension installed event:', error);
227
+ }
228
+ });
229
+ // Listen to extension uninstalled events
230
+ this.onExtensionUninstalled.event(async event => {
231
+ console.log('=== EXTENSION UNINSTALLATION STARTED ===');
232
+ console.log('Extension slug:', event.extensionSlug);
233
+ console.log('Tenant:', event.tenantId);
234
+ let uninstallationSuccessful = false;
235
+ let extensionConfigRemoved = false;
236
+ let systemExtensionUpdated = false;
237
+ try {
238
+ // STEP 1: Remove the extension's own configuration registry entry (if it exists)
239
+ console.log('\n🗑️ STEP 1: Removing extension configuration registry');
240
+ const context = {
241
+ schemaId: ConfigurationSchemaId.Configuration,
242
+ tenantId: event.tenantId,
243
+ extensionName: event.extensionSlug,
244
+ accountId: event.uninstalledBy
245
+ };
246
+ try {
247
+ console.log('Removing extension configuration document...');
248
+ await this.broker.call('ConfigurationRegistryService.removeConfigurationNodeRegistry', {
249
+ context
250
+ });
251
+ extensionConfigRemoved = true;
252
+ console.log('✅ STEP 1 SUCCESS: Extension configuration removed');
253
+ } catch (configError) {
254
+ console.warn('⚠️ STEP 1 WARNING: Extension configuration removal failed (may not exist):', configError);
255
+ // This is not fatal - extension might not have had configuration
256
+ }
257
+ // STEP 2: MANDATORY - Remove extension node from system_extension document
258
+ console.log('\n🔧 STEP 2: Unregistering extension from SYSTEM_EXTENSION (MANDATORY)');
259
+ try {
260
+ // First, get the current system_extension document
261
+ const systemContext = {
262
+ schemaId: ConfigurationSchemaId.Configuration,
263
+ tenantId: event.tenantId,
264
+ extensionName: SystemContributionExtensionNames.SystemExtension,
265
+ accountId: event.uninstalledBy
266
+ };
267
+ console.log('Fetching current system_extension document...');
268
+ const currentSystemDoc = await this.broker.call('ConfigurationRegistryService.getConfigurationNodeRegistry', {
269
+ context: systemContext
270
+ });
271
+ if (currentSystemDoc && currentSystemDoc.configurationNodes) {
272
+ const systemDoc = currentSystemDoc;
273
+ // Filter out the specific extension's status node
274
+ const configurationNodes = systemDoc.configurationNodes;
275
+ const updatedConfigurationNodes = configurationNodes.filter(node => node.id !== ContributionFragmentName.Settings);
276
+ console.log('Removing extension status node:', ContributionFragmentName.Settings);
277
+ console.log(`Original nodes: ${configurationNodes.length}, After removal: ${updatedConfigurationNodes.length}`);
278
+ // Update the system_extension document with the filtered nodes
279
+ const updatedSystemExtensionNode = {
280
+ schemaId: ConfigurationSchemaId.Configuration,
281
+ tenantId: event.tenantId,
282
+ extensionName: SystemContributionExtensionNames.SystemExtension,
283
+ policyConfigs: systemDoc.policyConfigs || null,
284
+ configurationNodes: updatedConfigurationNodes,
285
+ configurationDefaults: systemDoc.configurationDefaults || []
286
+ };
287
+ console.log('Updating system_extension document...');
288
+ await this.broker.call('ConfigurationRegistryService.updateConfigurationNodeRegistry', {
289
+ data: updatedSystemExtensionNode,
290
+ context: systemContext
291
+ });
292
+ systemExtensionUpdated = true;
293
+ console.log('✅ STEP 2 SUCCESS: Extension unregistered from system_extension');
294
+ } else {
295
+ console.warn('⚠️ STEP 2 WARNING: No system_extension document found or no configuration nodes');
296
+ systemExtensionUpdated = true; // Consider it successful if document doesn't exist
297
+ }
298
+ } catch (systemError) {
299
+ console.error('❌ STEP 2 FAILED: System extension unregistration failed:', systemError);
300
+ throw new Error(`Extension uninstallation failed: Could not unregister from system (${systemError.message})`);
301
+ }
302
+ // Uninstallation is successful if system extension is updated
303
+ uninstallationSuccessful = systemExtensionUpdated;
304
+ console.log('\n=== EXTENSION UNINSTALLATION COMPLETED ===');
305
+ console.log('Extension Config Removed:', extensionConfigRemoved ? '✅' : 'ℹ️ Not found');
306
+ console.log('System Extension Updated:', systemExtensionUpdated ? '✅' : '❌');
307
+ console.log('Overall Uninstallation:', uninstallationSuccessful ? '✅ SUCCESS' : '❌ FAILED');
308
+ } catch (error) {
309
+ console.error('❌ EXTENSION UNINSTALLATION FAILED:', error);
310
+ console.error('Error details:', {
311
+ message: error.message,
312
+ stack: error.stack,
313
+ extensionSlug: event.extensionSlug,
314
+ tenantId: event.tenantId,
315
+ extensionConfigRemoved,
316
+ systemExtensionUpdated
317
+ });
318
+ throw error; // Re-throw to ensure calling code knows uninstallation failed
319
+ }
320
+ // Notify other services about the uninstallation
321
+ this.broker.broadcast(ExtensionServiceAction.OnExtensionUninstalled, {
322
+ event
323
+ }, [MoleculerServiceName.ConfigurationService, 'WorkbenchService',
324
+ // Using string literal as MoleculerServiceName.WorkbenchService doesn't exist
325
+ MoleculerServiceName.MailService // Using MailService instead of NotificationService
326
+ ]);
327
+ });
328
+ // Listen to extension enabled events
329
+ this.onExtensionEnabled.event(event => {
330
+ this.broker.broadcast(ExtensionServiceAction.OnExtensionEnabled, {
331
+ event
332
+ }, [MoleculerServiceName.ConfigurationService, 'WorkbenchService' // Using string literal as MoleculerServiceName.WorkbenchService doesn't exist
333
+ ]);
334
+ });
335
+ // Listen to extension disabled events
336
+ this.onExtensionDisabled.event(event => {
337
+ this.broker.broadcast(ExtensionServiceAction.OnExtensionDisabled, {
338
+ event
339
+ }, [MoleculerServiceName.ConfigurationService, 'WorkbenchService' // Using string literal as MoleculerServiceName.WorkbenchService doesn't exist
340
+ ]);
341
+ });
342
+ // Listen to extension updated events
343
+ this.onExtensionUpdated.event(event => {
344
+ this.broker.broadcast(ExtensionServiceAction.OnExtensionUpdated, {
345
+ event
346
+ }, [MoleculerServiceName.ConfigurationService]);
347
+ });
348
+ // Listen to extension version updated events
349
+ this.onExtensionVersionUpdated.event(event => {
350
+ this.broker.broadcast(ExtensionServiceAction.OnExtensionVersionUpdated, {
351
+ event
352
+ }, [MoleculerServiceName.ConfigurationService, 'WorkbenchService',
353
+ // Using string literal as MoleculerServiceName.WorkbenchService doesn't exist
354
+ MoleculerServiceName.MailService // Using MailService instead of NotificationService
355
+ ]);
356
+ });
357
+ // Listen to extension configuration updated events
358
+ this.onExtensionConfigurationUpdated.event(event => {
359
+ this.broker.broadcast(ExtensionServiceAction.OnExtensionConfigurationUpdated, {
360
+ event
361
+ }, [MoleculerServiceName.ConfigurationService, 'WorkbenchService' // Using string literal as MoleculerServiceName.WorkbenchService doesn't exist
362
+ ]);
363
+ });
364
+ // Listen to extension sync completed events
365
+ this.onExtensionSyncCompleted.event(event => {
366
+ this.broker.broadcast(ExtensionServiceAction.OnExtensionSyncCompleted, {
367
+ event
368
+ }, [MoleculerServiceName.MailService // Using MailService instead of NotificationService
369
+ ]);
370
+ });
371
+ // Listen to extension cleanup completed events
372
+ this.onExtensionCleanupCompleted.event(e => {
373
+ this.broker.broadcast(ExtensionServiceAction.OnExtensionCleanupCompleted, {
374
+ event: e
375
+ }, [MoleculerServiceName.MailService // Using MailService instead of NotificationService
376
+ ]);
377
+ });
378
+ // Listen to extension activation failed events
379
+ this.onExtensionActivationFailed.event(event => {
380
+ this.broker.broadcast(ExtensionServiceAction.OnExtensionActivationFailed, {
381
+ event
382
+ }, [MoleculerServiceName.MailService // Using MailService instead of NotificationService
383
+ ]);
384
+ });
385
+ // Listen to extension deprecated events
386
+ this.onExtensionDeprecated.event(event => {
387
+ this.broker.broadcast(ExtensionServiceAction.OnExtensionDeprecated, {
388
+ event
389
+ }, [MoleculerServiceName.MailService // Using MailService instead of NotificationService
390
+ ]);
391
+ });
392
+ // Listen to extension orphaned events
393
+ this.onExtensionOrphaned.event(event => {
394
+ this.broker.broadcast(ExtensionServiceAction.OnExtensionOrphaned, {
395
+ event
396
+ }, [MoleculerServiceName.MailService // Using MailService instead of NotificationService
397
+ ]);
398
+ });
399
+ }
400
+ };
401
+ InstalledExtensionServiceExt = __decorate([injectable(), __param(0, inject(SERVER_TYPES.IInstalledExtensionRepository)), __param(1, inject(SERVER_TYPES.IRegistryExtensionService)), __param(2, inject(SERVER_TYPES.SlugService)), __param(3, inject(CommonType.MOLECULER_BROKER)), __param(4, inject(CommonType.LOGGER)), __metadata("design:paramtypes", [Object, Object, Object, ServiceBroker, Object])], InstalledExtensionServiceExt);export{InstalledExtensionServiceExt};//# sourceMappingURL=installed-extension-service-ext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installed-extension-service-ext.js","sources":["../../src/services/installed-extension-service-ext.ts"],"sourcesContent":[null],"names":[],"mappings":"qbA2FG;AACH;;AAG4D;AAWxD,SAAA,0BAA2B,CAAA,KAAA,EAAA;AA4Z9B,EAAA,IAAA,OAAA,KAAA,KAAA,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,96 @@
1
+ import { CdmLogger } from '@cdm-logger/core';
2
+ import { ServiceBroker } from 'moleculer';
3
+ import { Disposable, DisposableCollection, Emitter } from '@adminide-stack/core';
4
+ import { BaseService2 } from '@common-stack/store-mongo';
5
+ import { IInstalledExtensionModel, ICreateInstalledExtensionInput, IUpdateInstalledExtensionInput, IRegistryExtensionService, IInstalledExtensionFilter, IInstalledExtensionService, IInstalledExtensionRepository, IExtensionInstalledEvent, IExtensionUninstalledEvent, IExtensionEnabledEvent, IExtensionDisabledEvent, IExtensionUpdatedEvent, IExtensionVersionUpdatedEvent, IExtensionStatusChangedEvent, IExtensionActivationFailedEvent, IExtensionDeprecatedEvent, IExtensionOrphanedEvent, IExtensionConfigurationUpdatedEvent, IExtensionSyncCompletedEvent, IExtensionCleanupCompletedEvent, AsDomainType, ISlugService } from 'common/server';
6
+ export declare class InstalledExtensionService extends BaseService2<IInstalledExtensionModel> implements IInstalledExtensionService, Disposable {
7
+ private installedExtensionRepository;
8
+ protected registryExtensionService: IRegistryExtensionService;
9
+ protected slugService: ISlugService;
10
+ protected broker: ServiceBroker;
11
+ protected readonly onExtensionInstalled: Emitter<IExtensionInstalledEvent>;
12
+ protected readonly onExtensionUninstalled: Emitter<IExtensionUninstalledEvent>;
13
+ protected readonly onExtensionEnabled: Emitter<IExtensionEnabledEvent>;
14
+ protected readonly onExtensionDisabled: Emitter<IExtensionDisabledEvent>;
15
+ protected readonly onExtensionUpdated: Emitter<IExtensionUpdatedEvent>;
16
+ protected readonly onExtensionVersionUpdated: Emitter<IExtensionVersionUpdatedEvent>;
17
+ protected readonly onExtensionConfigurationUpdated: Emitter<IExtensionConfigurationUpdatedEvent>;
18
+ protected readonly onExtensionSyncCompleted: Emitter<IExtensionSyncCompletedEvent>;
19
+ protected readonly onExtensionCleanupCompleted: Emitter<IExtensionCleanupCompletedEvent>;
20
+ protected readonly onExtensionStatusChanged: Emitter<IExtensionStatusChangedEvent>;
21
+ protected readonly onExtensionActivationFailed: Emitter<IExtensionActivationFailedEvent>;
22
+ protected readonly onExtensionDeprecated: Emitter<IExtensionDeprecatedEvent>;
23
+ protected readonly onExtensionOrphaned: Emitter<IExtensionOrphanedEvent>;
24
+ protected readonly toDispose: DisposableCollection;
25
+ private logger;
26
+ constructor(installedExtensionRepository: IInstalledExtensionRepository, registryExtensionService: IRegistryExtensionService, slugService: ISlugService, broker: ServiceBroker, logger: CdmLogger.ILogger);
27
+ dispose(): void;
28
+ private resolveExtensionSlug;
29
+ /**
30
+ * Install a new extension from the registry
31
+ */
32
+ installExtension(input: ICreateInstalledExtensionInput, tenantId: string): Promise<AsDomainType<IInstalledExtensionModel>>;
33
+ /**
34
+ * Internal method to perform the actual installation after validation
35
+ */
36
+ private doInstallExtension;
37
+ /**
38
+ * Uninstall an extension
39
+ */
40
+ uninstallExtension(orgId: string, extensionSlug: string, uninstalledBy: string, tenantId: any): Promise<boolean>;
41
+ /**
42
+ * Update an installed extension's configuration or status
43
+ */
44
+ updateInstalledExtension(orgId: string, extensionSlug: string, update: IUpdateInstalledExtensionInput, tenantId: string): Promise<AsDomainType<IInstalledExtensionModel>>;
45
+ /**
46
+ * Get a specific installed extension
47
+ */
48
+ getInstalledExtension(orgId: string, extensionSlug: string): Promise<AsDomainType<IInstalledExtensionModel> | null>;
49
+ /**
50
+ * Get all installed extensions for a tenant with optional filtering
51
+ */
52
+ getInstalledExtensions(filter: IInstalledExtensionFilter): Promise<AsDomainType<IInstalledExtensionModel>[]>;
53
+ /**
54
+ * Enable/disable an installed extension
55
+ */
56
+ toggleExtension(orgId: string, extensionSlug: string, enabled: boolean, toggledBy: string, tenantId: string): Promise<AsDomainType<IInstalledExtensionModel>>;
57
+ /**
58
+ * Update extension settings/configuration
59
+ */
60
+ updateExtensionSettings(orgId: string, extensionSlug: string, userConfig: Record<string, unknown>, updatedBy: string, tenantId: string): Promise<AsDomainType<IInstalledExtensionModel>>;
61
+ /**
62
+ * Check for extension updates and return available updates
63
+ */
64
+ checkForUpdates(orgId: string, extensionSlug?: string): Promise<Array<{
65
+ extensionId: string;
66
+ extensionSlug: string;
67
+ currentVersion: string;
68
+ availableVersion: string;
69
+ isSecurityUpdate: boolean;
70
+ }>>;
71
+ /**
72
+ * Update an extension to a newer version
73
+ */
74
+ updateExtensionVersion(orgId: string, extensionSlug: string, targetVersion: string, updatedBy: string, tenantId: any): Promise<AsDomainType<IInstalledExtensionModel>>;
75
+ /**
76
+ * Sync installed extensions with registry status
77
+ */
78
+ syncWithRegistry(orgId: string, tenantId: string): Promise<void>;
79
+ /**
80
+ * Get extensions that need attention
81
+ */
82
+ getExtensionsNeedingAttention(orgId: string): Promise<AsDomainType<IInstalledExtensionModel>[]>;
83
+ /**
84
+ * Clean up deprecated or removed extensions based on policies
85
+ */
86
+ cleanupExtensions(orgId: string, tenantId: string, dryRun?: boolean): Promise<{
87
+ removed: string[];
88
+ deprecated: string[];
89
+ warnings: string[];
90
+ }>;
91
+ /**
92
+ * Check if update is a security update (simplified logic)
93
+ */
94
+ private isSecurityUpdate;
95
+ }
96
+ //# sourceMappingURL=installed-extension-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installed-extension-service.d.ts","sourceRoot":"","sources":["../../src/services/installed-extension-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EACH,wBAAwB,EACxB,8BAA8B,EAC9B,8BAA8B,EAE9B,yBAAyB,EAEzB,yBAAyB,EAEzB,0BAA0B,EAC1B,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,6BAA6B,EAC7B,4BAA4B,EAC5B,+BAA+B,EAC/B,yBAAyB,EACzB,uBAAuB,EACvB,mCAAmC,EACnC,4BAA4B,EAC5B,+BAA+B,EAC/B,YAAY,EACZ,YAAY,EAGf,MAAM,eAAe,CAAC;AAEvB,qBACa,yBACT,SAAQ,YAAY,CAAC,wBAAwB,CAC7C,YAAW,0BAA0B,EAAE,UAAU;IAgD7C,OAAO,CAAC,4BAA4B;IAGpC,SAAS,CAAC,wBAAwB,EAAE,yBAAyB;IAG7D,SAAS,CAAC,WAAW,EAAE,YAAY;IAGnC,SAAS,CAAC,MAAM,EAAE,aAAa;IAvDnC,SAAS,CAAC,QAAQ,CAAC,oBAAoB,oCAA2C;IAElF,SAAS,CAAC,QAAQ,CAAC,sBAAsB,sCAA6C;IAEtF,SAAS,CAAC,QAAQ,CAAC,kBAAkB,kCAAyC;IAE9E,SAAS,CAAC,QAAQ,CAAC,mBAAmB,mCAA0C;IAEhF,SAAS,CAAC,QAAQ,CAAC,kBAAkB,kCAAyC;IAE9E,SAAS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