@adminide-stack/marketplace-module-server 12.0.4-alpha.92 → 12.0.4-alpha.95
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/Readme.md +321 -0
- package/lib/constants/extension-events.d.ts +136 -0
- package/lib/constants/extension-events.d.ts.map +1 -0
- package/lib/containers/module.d.ts +8 -0
- package/lib/containers/module.d.ts.map +1 -1
- package/lib/containers/module.js +9 -3
- package/lib/containers/module.js.map +1 -1
- package/lib/dataloaders/index.d.ts +2 -0
- package/lib/dataloaders/index.d.ts.map +1 -0
- package/lib/dataloaders/registry-extension-data-loader.d.ts +6 -0
- package/lib/dataloaders/registry-extension-data-loader.d.ts.map +1 -0
- package/lib/dataloaders/registry-extension-data-loader.js +6 -0
- package/lib/dataloaders/registry-extension-data-loader.js.map +1 -0
- package/lib/graphql/resolvers/index.d.ts +1 -1
- package/lib/graphql/resolvers/index.d.ts.map +1 -1
- package/lib/graphql/resolvers/index.js +1 -0
- package/lib/graphql/resolvers/index.js.map +1 -0
- package/lib/graphql/resolvers/installed-extension-resolver.d.ts +5 -0
- package/lib/graphql/resolvers/installed-extension-resolver.d.ts.map +1 -0
- package/lib/graphql/resolvers/installed-extension-resolver.js +183 -0
- package/lib/graphql/resolvers/installed-extension-resolver.js.map +1 -0
- package/lib/graphql/resolvers/registry-extension-resolver.d.ts +5 -0
- package/lib/graphql/resolvers/registry-extension-resolver.d.ts.map +1 -0
- package/lib/graphql/resolvers/{resolvers.js → registry-extension-resolver.js} +59 -47
- package/lib/graphql/resolvers/registry-extension-resolver.js.map +1 -0
- package/lib/graphql/schemas/extension-registry.graphql +74 -0
- package/lib/graphql/schemas/extension-registry.graphql.js +1 -0
- package/lib/graphql/schemas/extension-registry.graphql.js.map +1 -0
- package/lib/graphql/schemas/index.d.ts.map +1 -1
- package/lib/graphql/schemas/index.js +1 -4
- package/lib/graphql/schemas/index.js.map +1 -1
- package/lib/graphql/schemas/installed-extension.graphql +294 -0
- package/lib/graphql/schemas/installed-extension.graphql.js +1 -0
- package/lib/graphql/schemas/installed-extension.graphql.js.map +1 -0
- package/lib/graphql/schemas/service.graphql +181 -0
- package/lib/graphql/schemas/service.graphql.js +1 -0
- package/lib/graphql/schemas/service.graphql.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/module.d.ts.map +1 -1
- package/lib/module.js +6 -4
- package/lib/module.js.map +1 -1
- package/lib/plugins/extension-moleculer-service.d.ts +86 -0
- package/lib/plugins/extension-moleculer-service.d.ts.map +1 -0
- package/lib/plugins/index.d.ts +2 -0
- package/lib/plugins/index.d.ts.map +1 -0
- package/lib/services/extension-service.d.ts +35 -47
- package/lib/services/extension-service.d.ts.map +1 -1
- package/lib/services/extension-service.js +33 -15
- package/lib/services/extension-service.js.map +1 -1
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/installed-extension-service-ext.d.ts +13 -0
- package/lib/services/installed-extension-service-ext.d.ts.map +1 -0
- package/lib/services/installed-extension-service-ext.js +271 -0
- package/lib/services/installed-extension-service-ext.js.map +1 -0
- package/lib/services/installed-extension-service.d.ts +93 -0
- package/lib/services/installed-extension-service.d.ts.map +1 -0
- package/lib/services/installed-extension-service.js +400 -0
- package/lib/services/installed-extension-service.js.map +1 -0
- package/lib/services/installed-extension-service.test.d.ts +2 -0
- package/lib/services/installed-extension-service.test.d.ts.map +1 -0
- package/lib/store/index.d.ts +1 -1
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/models/index.d.ts +1 -0
- package/lib/store/models/index.d.ts.map +1 -1
- package/lib/store/models/installed-extension-model.d.ts +4 -0
- package/lib/store/models/installed-extension-model.d.ts.map +1 -0
- package/lib/store/models/installed-extension-model.js +297 -0
- package/lib/store/models/installed-extension-model.js.map +1 -0
- package/lib/store/models/registry-extension-model.d.ts +2 -7
- package/lib/store/models/registry-extension-model.d.ts.map +1 -1
- package/lib/store/models/registry-extension-model.js +40 -19
- package/lib/store/models/registry-extension-model.js.map +1 -1
- package/lib/store/repositories/index.d.ts +3 -0
- package/lib/store/repositories/index.d.ts.map +1 -0
- package/lib/store/repositories/installed-extension-repository.d.ts +71 -0
- package/lib/store/repositories/installed-extension-repository.d.ts.map +1 -0
- package/lib/store/repositories/installed-extension-repository.js +414 -0
- package/lib/store/repositories/installed-extension-repository.js.map +1 -0
- package/lib/store/repositories/registry-extension-repository.d.ts +54 -0
- package/lib/store/repositories/registry-extension-repository.d.ts.map +1 -0
- package/lib/store/{repository → repositories}/registry-extension-repository.js +44 -42
- package/lib/store/repositories/registry-extension-repository.js.map +1 -0
- package/lib/templates/constants/DB_COLL_NAMES.ts.template +5 -0
- package/lib/templates/constants/SERVER_TYPES.ts.template +3 -0
- package/lib/templates/repositories/InstalledExtensionRepository.ts.template +94 -0
- package/lib/templates/repositories/RegistryExtensionRepository.ts.template +10 -15
- package/lib/templates/services/InstalledExtensionDataLoader.ts.template +2 -0
- package/lib/templates/services/InstalledExtensionService.ts.template +168 -0
- package/lib/templates/services/RegistryExtensionDataLoader.ts.template +2 -0
- package/lib/templates/services/RegistryExtensionService.ts.template +10 -10
- package/lib/tests/extension-integration.test.d.ts +2 -0
- package/lib/tests/extension-integration.test.d.ts.map +1 -0
- package/lib/tests/test-extension-services.d.ts +1 -0
- package/lib/tests/test-extension-services.d.ts.map +1 -0
- package/package.json +12 -7
- package/lib/graphql/resolvers/resolvers.d.ts +0 -2
- package/lib/graphql/resolvers/resolvers.d.ts.map +0 -1
- package/lib/graphql/resolvers/resolvers.js.map +0 -1
- package/lib/graphql/schemas/extension.graphql +0 -57
- package/lib/graphql/schemas/extension.graphql.js +0 -1
- package/lib/graphql/schemas/extension.graphql.js.map +0 -1
- package/lib/store/repository/index.d.ts +0 -2
- package/lib/store/repository/index.d.ts.map +0 -1
- package/lib/store/repository/registry-extension-repository.d.ts +0 -31
- package/lib/store/repository/registry-extension-repository.d.ts.map +0 -1
- package/lib/store/repository/registry-extension-repository.js.map +0 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { IBaseMongoRepository, IInstalledExtensionModel, AsDomainType } from 'common/server';
|
|
2
|
+
import {
|
|
3
|
+
ICreateInstalledExtensionInput,
|
|
4
|
+
IUpdateInstalledExtensionInput,
|
|
5
|
+
IInstalledExtensionFilter,
|
|
6
|
+
} from '../services/InstalledExtensionService';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Repository interface for installed extensions data access layer
|
|
10
|
+
*/
|
|
11
|
+
export interface IInstalledExtensionRepository extends IBaseMongoRepository<IInstalledExtensionModel> {
|
|
12
|
+
/**
|
|
13
|
+
* Create a new installed extension record
|
|
14
|
+
*/
|
|
15
|
+
create<T = ICreateInstalledExtensionInput>(data: T): Promise<AsDomainType<IInstalledExtensionModel>>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Update an existing installed extension
|
|
19
|
+
*/
|
|
20
|
+
updateExtension(
|
|
21
|
+
tenantId: string,
|
|
22
|
+
extensionSlug: string,
|
|
23
|
+
update: IUpdateInstalledExtensionInput,
|
|
24
|
+
): Promise<AsDomainType<IInstalledExtensionModel> | null>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Find a specific installed extension
|
|
28
|
+
*/
|
|
29
|
+
findByTenantAndId(tenantId: string, extensionSlug: string): Promise<AsDomainType<IInstalledExtensionModel> | null>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Find installed extensions with optional filtering
|
|
33
|
+
*/
|
|
34
|
+
findExtensions(filter: IInstalledExtensionFilter): Promise<AsDomainType<IInstalledExtensionModel>[]>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Delete an installed extension
|
|
38
|
+
*/
|
|
39
|
+
deleteExtension(tenantId: string, extensionSlug: string): Promise<boolean>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Get installed extensions joined with registry information
|
|
43
|
+
*/
|
|
44
|
+
findWithRegistryInfo(filter: IInstalledExtensionFilter): Promise<any[]>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Check if extension exists for tenant
|
|
48
|
+
*/
|
|
49
|
+
exists(tenantId: string, extensionSlug: string): Promise<boolean>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Bulk update multiple extensions (useful for policy changes or admin actions)
|
|
53
|
+
*/
|
|
54
|
+
bulkUpdateExtensions(
|
|
55
|
+
tenantId: string,
|
|
56
|
+
filter: Partial<IInstalledExtensionFilter>,
|
|
57
|
+
update: Partial<IUpdateInstalledExtensionInput>,
|
|
58
|
+
): Promise<number>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Get extension dependency graph for a tenant
|
|
62
|
+
*/
|
|
63
|
+
getDependencyGraph(tenantId: string): Promise<{
|
|
64
|
+
extensions: AsDomainType<IInstalledExtensionModel>[];
|
|
65
|
+
dependencies: Array<{
|
|
66
|
+
extensionSlug: string;
|
|
67
|
+
dependsOn: string[];
|
|
68
|
+
dependents: string[];
|
|
69
|
+
}>;
|
|
70
|
+
}>;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Count installed extensions matching filter
|
|
74
|
+
*/
|
|
75
|
+
countExtensions(filter: IInstalledExtensionFilter): Promise<number>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Find extensions that need registry sync (stale registry status)
|
|
79
|
+
*/
|
|
80
|
+
findStaleExtensions(tenantId: string, maxAge: number): Promise<AsDomainType<IInstalledExtensionModel>[]>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Update registry status for multiple extensions
|
|
84
|
+
*/
|
|
85
|
+
syncRegistryStatus(
|
|
86
|
+
updates: Array<{
|
|
87
|
+
tenantId: string;
|
|
88
|
+
extensionSlug: string;
|
|
89
|
+
registryStatus: string;
|
|
90
|
+
latestVersion?: string;
|
|
91
|
+
isOrphaned: boolean;
|
|
92
|
+
}>,
|
|
93
|
+
): Promise<void>;
|
|
94
|
+
}
|
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
import { IPublishRequest, IExtensionRelease,
|
|
1
|
+
import { IPublishRequest, IExtensionRelease, IBaseMongoRepository, IRegistryExtensionModel, IExtensionReleaseModel, AsDomainType } from 'common/server';
|
|
2
2
|
|
|
3
|
-
export interface
|
|
4
|
-
|
|
5
|
-
createdAt?: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface IRegistryExtensionRepository {
|
|
9
|
-
extensionReleases(extensionID: string): Promise<IExtensionRelease[]>;
|
|
3
|
+
export interface IRegistryExtensionRepository extends IBaseMongoRepository<IRegistryExtensionModel> {
|
|
4
|
+
extensionReleases(extensionSlug: string): Promise<AsDomainType<IExtensionReleaseModel>[]>;
|
|
10
5
|
|
|
11
|
-
createExtension(publisherId: string, name: string): Promise<
|
|
6
|
+
createExtension(publisherId: string, name: string): Promise<AsDomainType<IRegistryExtensionModel>>;
|
|
12
7
|
|
|
13
|
-
updateExtensionName(
|
|
8
|
+
updateExtensionName(extensionSlug: string, name: string): Promise<AsDomainType<IRegistryExtensionModel>>;
|
|
14
9
|
|
|
15
|
-
updateExtension(
|
|
10
|
+
updateExtension(extensionSlug: string, update: { installed?: boolean }): Promise<AsDomainType<IRegistryExtensionModel>>;
|
|
16
11
|
|
|
17
|
-
deleteExtension(
|
|
12
|
+
deleteExtension(extensionSlug: string): boolean | Promise<boolean>;
|
|
18
13
|
|
|
19
|
-
publishExtension(request: IPublishRequest)
|
|
14
|
+
publishExtension(request: IPublishRequest): Promise<AsDomainType<IRegistryExtensionModel>>;
|
|
20
15
|
|
|
21
|
-
findExtensions(first: number, query: string, local?: boolean, remote?: boolean, prioritizeExtensionIDs?: string[])
|
|
16
|
+
findExtensions(first: number, query: string, local?: boolean, remote?: boolean, prioritizeExtensionIDs?: string[]): Promise<AsDomainType<IRegistryExtensionModel>[]>;
|
|
22
17
|
|
|
23
|
-
findExtension(
|
|
18
|
+
findExtension(extensionSlug: string): Promise<AsDomainType<IRegistryExtensionModel>>;
|
|
24
19
|
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IInstalledExtensionModel,
|
|
3
|
+
IInstallExtensionInput,
|
|
4
|
+
IExtensionPoliciesInput,
|
|
5
|
+
IExtensionSettingsInput,
|
|
6
|
+
AsDomainType,
|
|
7
|
+
IBaseService,
|
|
8
|
+
} from 'common/server';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Input type for creating installed extensions with additional server-side fields
|
|
12
|
+
*/
|
|
13
|
+
export interface ICreateInstalledExtensionInput extends IInstallExtensionInput {
|
|
14
|
+
extensionId: string;
|
|
15
|
+
tenantId: string;
|
|
16
|
+
installedVersion: string;
|
|
17
|
+
installedBy: string; // User ObjectId as string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Input type for updating installed extensions
|
|
22
|
+
*/
|
|
23
|
+
export interface IUpdateInstalledExtensionInput {
|
|
24
|
+
status?: string;
|
|
25
|
+
lifecycle?: {
|
|
26
|
+
registryStatus?: string;
|
|
27
|
+
isOrphaned?: boolean;
|
|
28
|
+
deprecationWarningShown?: boolean;
|
|
29
|
+
autoUpdateBlocked?: boolean;
|
|
30
|
+
lastRegistryCheck?: string;
|
|
31
|
+
};
|
|
32
|
+
policies?: IExtensionPoliciesInput;
|
|
33
|
+
settings?: IExtensionSettingsInput;
|
|
34
|
+
runtime?: {
|
|
35
|
+
activationState?: string;
|
|
36
|
+
lastActivated?: Date;
|
|
37
|
+
lastDeactivated?: Date;
|
|
38
|
+
activationError?: {
|
|
39
|
+
message: string;
|
|
40
|
+
code: string;
|
|
41
|
+
timestamp: string;
|
|
42
|
+
};
|
|
43
|
+
metrics?: {
|
|
44
|
+
activationTime: number;
|
|
45
|
+
memoryUsage: number;
|
|
46
|
+
lastMeasured: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
lastUpdatedBy?: string;
|
|
50
|
+
availableVersion?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Filter input for querying installed extensions
|
|
55
|
+
*/
|
|
56
|
+
export interface IInstalledExtensionFilter {
|
|
57
|
+
tenantId?: string;
|
|
58
|
+
extensionSlug?: string; // From GraphQL: extensionSlug field
|
|
59
|
+
extension?: string; // ObjectId as string reference
|
|
60
|
+
status?: string[];
|
|
61
|
+
registryStatus?: string[];
|
|
62
|
+
isOrphaned?: boolean;
|
|
63
|
+
userEnabled?: boolean;
|
|
64
|
+
systemEnabled?: boolean;
|
|
65
|
+
installedBy?: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Service interface for managing installed extensions
|
|
70
|
+
* This service handles the lifecycle of extensions after they've been installed from the registry
|
|
71
|
+
*/
|
|
72
|
+
export interface IInstalledExtensionService extends IBaseService<IInstalledExtensionModel> {
|
|
73
|
+
/**
|
|
74
|
+
* Install a new extension from the registry
|
|
75
|
+
*/
|
|
76
|
+
installExtension(input: ICreateInstalledExtensionInput): Promise<AsDomainType<IInstalledExtensionModel>>;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Uninstall an extension
|
|
80
|
+
*/
|
|
81
|
+
uninstallExtension(tenantId: string, extensionSlug: string, uninstalledBy: string): Promise<boolean>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Update an installed extension's configuration or status
|
|
85
|
+
*/
|
|
86
|
+
updateInstalledExtension(
|
|
87
|
+
tenantId: string,
|
|
88
|
+
extensionSlug: string,
|
|
89
|
+
update: IUpdateInstalledExtensionInput,
|
|
90
|
+
): Promise<AsDomainType<IInstalledExtensionModel>>;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Get a specific installed extension
|
|
94
|
+
*/
|
|
95
|
+
getInstalledExtension(tenantId: string, extensionSlug: string): Promise<AsDomainType<IInstalledExtensionModel> | null>;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Get all installed extensions for a tenant with optional filtering
|
|
99
|
+
*/
|
|
100
|
+
getInstalledExtensions(filter: IInstalledExtensionFilter): Promise<AsDomainType<IInstalledExtensionModel>[]>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Enable/disable an installed extension
|
|
104
|
+
*/
|
|
105
|
+
toggleExtension(
|
|
106
|
+
tenantId: string,
|
|
107
|
+
extensionSlug: string,
|
|
108
|
+
enabled: boolean,
|
|
109
|
+
toggledBy: string,
|
|
110
|
+
): Promise<AsDomainType<IInstalledExtensionModel>>;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Update extension settings/configuration
|
|
114
|
+
*/
|
|
115
|
+
updateExtensionSettings(
|
|
116
|
+
tenantId: string,
|
|
117
|
+
extensionSlug: string,
|
|
118
|
+
userConfig: Record<string, unknown>,
|
|
119
|
+
updatedBy: string,
|
|
120
|
+
): Promise<AsDomainType<IInstalledExtensionModel>>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Check for extension updates and return available updates
|
|
124
|
+
*/
|
|
125
|
+
checkForUpdates(
|
|
126
|
+
tenantId: string,
|
|
127
|
+
extensionSlug?: string,
|
|
128
|
+
): Promise<
|
|
129
|
+
Array<{
|
|
130
|
+
extensionSlug: string;
|
|
131
|
+
currentVersion: string;
|
|
132
|
+
availableVersion: string;
|
|
133
|
+
isSecurityUpdate: boolean;
|
|
134
|
+
}>
|
|
135
|
+
>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Update an extension to a newer version
|
|
139
|
+
*/
|
|
140
|
+
updateExtensionVersion(
|
|
141
|
+
tenantId: string,
|
|
142
|
+
extensionSlug: string,
|
|
143
|
+
targetVersion: string,
|
|
144
|
+
updatedBy: string,
|
|
145
|
+
): Promise<AsDomainType<IInstalledExtensionModel>>;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Sync installed extensions with registry status (for orphaned, deprecated, etc.)
|
|
149
|
+
*/
|
|
150
|
+
syncWithRegistry(tenantId: string): Promise<void>;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Get extensions that need attention (deprecated, orphaned, security updates, etc.)
|
|
154
|
+
*/
|
|
155
|
+
getExtensionsNeedingAttention(tenantId: string): Promise<AsDomainType<IInstalledExtensionModel>[]>;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Clean up deprecated or removed extensions based on policies
|
|
159
|
+
*/
|
|
160
|
+
cleanupExtensions(
|
|
161
|
+
tenantId: string,
|
|
162
|
+
dryRun?: boolean,
|
|
163
|
+
): Promise<{
|
|
164
|
+
removed: string[];
|
|
165
|
+
deprecated: string[];
|
|
166
|
+
warnings: string[];
|
|
167
|
+
}>;
|
|
168
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { IPublishRequest, IExtensionRelease,
|
|
1
|
+
import { IPublishRequest, IExtensionRelease, IBaseService, IRegistryExtensionModel, AsDomainType } from 'common/server';
|
|
2
2
|
|
|
3
|
-
export interface IRegistryExtensionService {
|
|
4
|
-
extensionReleases(
|
|
3
|
+
export interface IRegistryExtensionService extends IBaseService<AsDomainType<IRegistryExtensionModel>> {
|
|
4
|
+
extensionReleases(extensionSlug: string): Promise<IExtensionRelease[]>;
|
|
5
5
|
|
|
6
|
-
createExtension(publisherId: string, name: string): Promise<
|
|
6
|
+
createExtension(publisherId: string, name: string): Promise<AsDomainType<IRegistryExtensionModel>>;
|
|
7
7
|
|
|
8
|
-
updateExtensionName(
|
|
8
|
+
updateExtensionName(extensionSlug: string, name: string): Promise<AsDomainType<IRegistryExtensionModel>>;
|
|
9
9
|
|
|
10
|
-
updateExtension(
|
|
10
|
+
updateExtension(extensionSlug: string, update: { installed?: boolean }): Promise<AsDomainType<IRegistryExtensionModel>>;
|
|
11
11
|
|
|
12
|
-
deleteExtension(
|
|
12
|
+
deleteExtension(extensionSlug: string): boolean | Promise<boolean>;
|
|
13
13
|
|
|
14
|
-
publishExtension(request: IPublishRequest)
|
|
14
|
+
publishExtension(request: IPublishRequest): Promise<AsDomainType<IRegistryExtensionModel>>;
|
|
15
15
|
|
|
16
|
-
findExtensions(first: number, query: string, local?: boolean, remote?: boolean, prioritizeExtensionIDs?: string[])
|
|
16
|
+
findExtensions(first: number, query: string, local?: boolean, remote?: boolean, prioritizeExtensionIDs?: string[]): Promise<AsDomainType<IRegistryExtensionModel>[]>;
|
|
17
17
|
|
|
18
|
-
findExtension(
|
|
18
|
+
findExtension(extensionSlug: string): Promise<AsDomainType<IRegistryExtensionModel>>;
|
|
19
19
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-integration.test.d.ts","sourceRoot":"","sources":["../../src/tests/extension-integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=test-extension-services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-extension-services.d.ts","sourceRoot":"","sources":["../../src/tests/test-extension-services.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminide-stack/marketplace-module-server",
|
|
3
|
-
"version": "12.0.4-alpha.
|
|
3
|
+
"version": "12.0.4-alpha.95",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"watch": "yarn build:lib:watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@adminide-stack/extension-api": "12.0.4-alpha.
|
|
24
|
+
"@adminide-stack/extension-api": "12.0.4-alpha.95",
|
|
25
25
|
"nanoid": "^5.1.5"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"common": "12.0.4-alpha.
|
|
28
|
+
"common": "12.0.4-alpha.95"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"graphql-tag": ">=2.0.0"
|
|
@@ -36,18 +36,23 @@
|
|
|
36
36
|
"cdecode": {
|
|
37
37
|
"common": {
|
|
38
38
|
"constants": [
|
|
39
|
-
"./${libDir}/templates/constants/SERVER_TYPES.ts.template"
|
|
39
|
+
"./${libDir}/templates/constants/SERVER_TYPES.ts.template",
|
|
40
|
+
"./${libDir}/templates/constants/DB_COLL_NAMES.ts.template"
|
|
40
41
|
],
|
|
41
42
|
"services": [
|
|
42
|
-
"./${libDir}/templates/services/RegistryExtensionService.ts.template"
|
|
43
|
+
"./${libDir}/templates/services/RegistryExtensionService.ts.template",
|
|
44
|
+
"./${libDir}/templates/services/InstalledExtensionService.ts.template",
|
|
45
|
+
"./${libDir}/templates/services/RegistryExtensionDataLoader.ts.template",
|
|
46
|
+
"./${libDir}/templates/services/InstalledExtensionDataLoader.ts.template"
|
|
43
47
|
],
|
|
44
48
|
"repositories": [
|
|
45
|
-
"./${libDir}/templates/repositories/RegistryExtensionRepository.ts.template"
|
|
49
|
+
"./${libDir}/templates/repositories/RegistryExtensionRepository.ts.template",
|
|
50
|
+
"./${libDir}/templates/repositories/InstalledExtensionRepository.ts.template"
|
|
46
51
|
]
|
|
47
52
|
}
|
|
48
53
|
},
|
|
49
54
|
"typescript": {
|
|
50
55
|
"definition": "lib/index.d.ts"
|
|
51
56
|
},
|
|
52
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "1ecc4d25620d22456937857503df6884e49356ad"
|
|
53
58
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../src/graphql/resolvers/resolvers.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,QAAQ,EAAE,GAuMrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolvers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
extend type Mutation {
|
|
2
|
-
"""Install an extension in the registry."""
|
|
3
|
-
installExtension(extensionID: String!): RegistryExtension!
|
|
4
|
-
|
|
5
|
-
"""Uninstall an extension from the registry."""
|
|
6
|
-
uninstallExtension(extensionID: String!): RegistryExtension!
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
type RegistryExtension implements Node {
|
|
10
|
-
"""The unique, opaque, permanent ID of the extension."""
|
|
11
|
-
id: ID!
|
|
12
|
-
|
|
13
|
-
"""The UUID of the extension."""
|
|
14
|
-
uuid: String!
|
|
15
|
-
|
|
16
|
-
"""The publisher of the extension."""
|
|
17
|
-
publisher: RegistryPublisher
|
|
18
|
-
|
|
19
|
-
"""The qualified, unique name that refers to this extension."""
|
|
20
|
-
extensionID: String
|
|
21
|
-
|
|
22
|
-
"""The extension ID without the registry name."""
|
|
23
|
-
extensionIDWithoutRegistry: String
|
|
24
|
-
|
|
25
|
-
"""The name of the extension."""
|
|
26
|
-
name: String!
|
|
27
|
-
|
|
28
|
-
"""Latest Published version."""
|
|
29
|
-
version: String
|
|
30
|
-
|
|
31
|
-
"""The activation events for this extension."""
|
|
32
|
-
activationEvents: [String!]
|
|
33
|
-
|
|
34
|
-
"""The extension manifest."""
|
|
35
|
-
manifest: ExtensionManifest
|
|
36
|
-
|
|
37
|
-
"""The date when this extension was last updated on the registry."""
|
|
38
|
-
updatedAt: String
|
|
39
|
-
|
|
40
|
-
"""The URL to the extension on this CDECode site."""
|
|
41
|
-
url: String
|
|
42
|
-
|
|
43
|
-
"""The URL to the extension on the extension registry where it lives."""
|
|
44
|
-
remoteURL: String
|
|
45
|
-
|
|
46
|
-
"""Whether the registry extension is published on this CDECode site."""
|
|
47
|
-
isLocal: Boolean
|
|
48
|
-
|
|
49
|
-
"""Whether the viewer has admin privileges on this registry extension."""
|
|
50
|
-
viewerCanAdminister: Boolean
|
|
51
|
-
|
|
52
|
-
"""Extension Releases."""
|
|
53
|
-
releases: [ExtensionRelease!]
|
|
54
|
-
|
|
55
|
-
"""Whether the extension is installed."""
|
|
56
|
-
installed: Boolean
|
|
57
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var extensionSchema = "extend type Mutation {\n \"\"\"Install an extension in the registry.\"\"\"\n installExtension(extensionID: String!): RegistryExtension!\n\n \"\"\"Uninstall an extension from the registry.\"\"\"\n uninstallExtension(extensionID: String!): RegistryExtension!\n}\n\ntype RegistryExtension implements Node {\n \"\"\"The unique, opaque, permanent ID of the extension.\"\"\"\n id: ID!\n\n \"\"\"The UUID of the extension.\"\"\"\n uuid: String!\n\n \"\"\"The publisher of the extension.\"\"\"\n publisher: RegistryPublisher\n\n \"\"\"The qualified, unique name that refers to this extension.\"\"\"\n extensionID: String\n\n \"\"\"The extension ID without the registry name.\"\"\"\n extensionIDWithoutRegistry: String\n\n \"\"\"The name of the extension.\"\"\"\n name: String!\n\n \"\"\"Latest Published version.\"\"\"\n version: String\n\n \"\"\"The activation events for this extension.\"\"\"\n activationEvents: [String!]\n\n \"\"\"The extension manifest.\"\"\"\n manifest: ExtensionManifest\n\n \"\"\"The date when this extension was last updated on the registry.\"\"\"\n updatedAt: String\n\n \"\"\"The URL to the extension on this CDECode site.\"\"\"\n url: String\n\n \"\"\"The URL to the extension on the extension registry where it lives.\"\"\"\n remoteURL: String\n\n \"\"\"Whether the registry extension is published on this CDECode site.\"\"\"\n isLocal: Boolean\n\n \"\"\"Whether the viewer has admin privileges on this registry extension.\"\"\"\n viewerCanAdminister: Boolean\n\n \"\"\"Extension Releases.\"\"\"\n releases: [ExtensionRelease!]\n\n \"\"\"Whether the extension is installed.\"\"\"\n installed: Boolean\n}\n";export{extensionSchema as default};//# sourceMappingURL=extension.graphql.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension.graphql.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/repository/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as mongoose from 'mongoose';
|
|
2
|
-
import { CdmLogger } from '@cdm-logger/core';
|
|
3
|
-
import { IExtensionRelease, IRegistryExtensionRepository } from 'common/server';
|
|
4
|
-
export declare class RegistryExtensionRepository implements IRegistryExtensionRepository {
|
|
5
|
-
private logger;
|
|
6
|
-
private repositoryExtensionModel;
|
|
7
|
-
constructor(db: mongoose.Connection, logger: CdmLogger.ILogger, options?: any);
|
|
8
|
-
createExtension(publisherId: string, name: string): Promise<import("..").IRegistryExtensionModel & {
|
|
9
|
-
_id: mongoose.Types.ObjectId;
|
|
10
|
-
}>;
|
|
11
|
-
updateExtensionName(extensionID: string, name: string): Promise<import("..").IRegistryExtensionModel & {
|
|
12
|
-
_id: mongoose.Types.ObjectId;
|
|
13
|
-
}>;
|
|
14
|
-
updateExtension(extensionID: string, update: {
|
|
15
|
-
installed?: boolean;
|
|
16
|
-
}): Promise<import("..").IRegistryExtensionModel & {
|
|
17
|
-
_id: mongoose.Types.ObjectId;
|
|
18
|
-
}>;
|
|
19
|
-
deleteExtension(extensionID: any): Promise<boolean>;
|
|
20
|
-
extensionReleases(extensionID: string): Promise<IExtensionRelease[]>;
|
|
21
|
-
publishExtension(request: any): Promise<import("..").IRegistryExtensionModel & {
|
|
22
|
-
_id: mongoose.Types.ObjectId;
|
|
23
|
-
}>;
|
|
24
|
-
findExtensions(first: number, query: string, local?: boolean, remote?: boolean, prioritizeExtensionIDs?: string[]): Promise<(import("..").IRegistryExtensionModel & {
|
|
25
|
-
_id: mongoose.Types.ObjectId;
|
|
26
|
-
})[]>;
|
|
27
|
-
findExtension(extensionID: string, version?: string): Promise<import("..").IRegistryExtensionModel & {
|
|
28
|
-
_id: mongoose.Types.ObjectId;
|
|
29
|
-
}>;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=registry-extension-repository.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry-extension-repository.d.ts","sourceRoot":"","sources":["../../../src/store/repository/registry-extension-repository.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAgB,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAG9F,qBACa,2BAA4B,YAAW,4BAA4B;IAC5E,OAAO,CAAC,MAAM,CAAoB;IAElC,OAAO,CAAC,wBAAwB,CAA6B;gBAIzD,EAAE,EAAE,QAAQ,CAAC,UAAU,EAGvB,MAAM,EAAE,SAAS,CAAC,OAAO,EAIzB,OAAO,CAAC,KAAA;IAMC,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;IAYjD,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;IAMrD,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE;;;IAMpE,eAAe,CAAC,WAAW,KAAA;IAW3B,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAMpE,gBAAgB,CAAC,OAAO,EAAE,GAAG;;;IA0D7B,cAAc,CACvB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,OAAO,EACf,MAAM,CAAC,EAAE,OAAO,EAChB,sBAAsB,CAAC,EAAE,MAAM,EAAE;;;IAKxB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;;;CASnE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry-extension-repository.js","sources":["../../../src/store/repository/registry-extension-repository.ts"],"sourcesContent":[null],"names":[],"mappings":"wUAEA,IAAA,6BAA0B;;;AAsCT,EAAA,wBAA+B;;;AAM/B,MAAA,SAAA,EAAA,8BAA2C;;AAAyB,IAAA,IAAA,CAAA,wBAAA,GAAA,0BAAA,CAAA,EAAA,CAAA;;;IAMpE,IAAe,CAAA,MAAA,CAAA,wDAAY,EAAA,WAAA,EAAA,IAAA,CAAA;IAW3B,OAAiB,IAAA,CAAA,wBAAc,CAAM,MAAU,CAAA;MAM/B,WAAA;;;MA0DF,IAAA,EAAA,EAAA;;;KAUD,CAAA;;;AAS7B,IAAA,IAAA,CAAA,MAAA,CAAA,KAAA,CAAA,oDAAA,EAAA,WAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|