@syncbridge/common 0.10.0 → 0.10.2
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/constants.js +1 -1
- package/decorators/component.decorator.d.ts +1 -1
- package/decorators/component.decorator.js +1 -1
- package/decorators/processor.decorator.d.ts +1 -1
- package/decorators/processor.decorator.js +1 -1
- package/models/metadata/element-component-metadata.d.ts +1 -0
- package/models/metadata/element-component-metadata.js +8 -0
- package/models/metadata/element-metadata.d.ts +1 -0
- package/models/metadata/element-metadata.js +8 -0
- package/package.json +1 -1
- package/utils/materialize-metadata.js +3 -1
package/constants.js
CHANGED
|
@@ -5,7 +5,7 @@ import { ComponentMetadata } from '../models/index.js';
|
|
|
5
5
|
import { UseComponent as _UseComponent } from './use-component.decorator.js';
|
|
6
6
|
export declare function Component<T extends ComponentBase>(options: Component.Options): (target: Type<T>) => void;
|
|
7
7
|
export declare namespace Component {
|
|
8
|
-
type Options = DeepPartial<StrictOmit<ComponentMetadata, 'components' | 'variables'>> & {
|
|
8
|
+
type Options = DeepPartial<StrictOmit<ComponentMetadata, 'uri' | 'components' | 'variables' | 'version'>> & {
|
|
9
9
|
className?: string;
|
|
10
10
|
};
|
|
11
11
|
function UseVariables<T extends ComponentBase>(variablesClass?: Type): (target: T, propertyKey: "values") => void;
|
|
@@ -39,7 +39,7 @@ export function Component(options) {
|
|
|
39
39
|
version: pkgjson.version,
|
|
40
40
|
abstract: !!options.abstract,
|
|
41
41
|
author: parseNpmAuthor(pkgjson.author),
|
|
42
|
-
...omit(options, ['uri']),
|
|
42
|
+
...omit(options, ['uri', 'components', 'variables', 'version']),
|
|
43
43
|
});
|
|
44
44
|
const base = Object.getPrototypeOf(target);
|
|
45
45
|
const baseMetadata = Reflect.getMetadata(CLASS_METADATA, base);
|
|
@@ -23,7 +23,7 @@ export declare namespace Processor {
|
|
|
23
23
|
function OnUpdateProfile<T extends ProcessorBase>(): (target: Type<T>, propertyKey: string | symbol) => void;
|
|
24
24
|
}
|
|
25
25
|
export declare namespace Processor {
|
|
26
|
-
type Options = DeepPartial<StrictOmit<ProcessorMetadata, 'components' | 'variables'>> & {
|
|
26
|
+
type Options = DeepPartial<StrictOmit<ProcessorMetadata, 'uri' | 'components' | 'variables' | 'version'>> & {
|
|
27
27
|
className?: string;
|
|
28
28
|
};
|
|
29
29
|
}
|
|
@@ -39,7 +39,7 @@ export function Processor(options) {
|
|
|
39
39
|
displayName: className,
|
|
40
40
|
version: pkgjson.version,
|
|
41
41
|
abstract: !!options.abstract,
|
|
42
|
-
...omit(options, ['uri']),
|
|
42
|
+
...omit(options, ['uri', 'components', 'variables', 'version']),
|
|
43
43
|
});
|
|
44
44
|
target.uri = uri;
|
|
45
45
|
target.packageName = packageName;
|
|
@@ -36,6 +36,14 @@ __decorate([
|
|
|
36
36
|
}),
|
|
37
37
|
__metadata("design:type", String)
|
|
38
38
|
], ElementComponentMetadata.prototype, "classUri", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
ApiField({
|
|
41
|
+
label: 'Version',
|
|
42
|
+
description: 'Version of the class',
|
|
43
|
+
examples: ['0.2.1', '2.1.5', '1.18.1-alpha.1'],
|
|
44
|
+
}),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], ElementComponentMetadata.prototype, "version", void 0);
|
|
39
47
|
__decorate([
|
|
40
48
|
ApiField({
|
|
41
49
|
label: 'Description',
|
|
@@ -20,6 +20,14 @@ __decorate([
|
|
|
20
20
|
}),
|
|
21
21
|
__metadata("design:type", String)
|
|
22
22
|
], ElementMetadata.prototype, "uri", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
ApiField({
|
|
25
|
+
label: 'Version',
|
|
26
|
+
description: 'Version of the class',
|
|
27
|
+
examples: ['0.2.1', '2.1.5', '1.18.1-alpha.1'],
|
|
28
|
+
}),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ElementMetadata.prototype, "version", void 0);
|
|
23
31
|
__decorate([
|
|
24
32
|
ApiField({
|
|
25
33
|
label: 'Name',
|
package/package.json
CHANGED
|
@@ -32,6 +32,7 @@ export function materializeMetadataSilent(profile, returnUndefinedComponentsAsAb
|
|
|
32
32
|
const processorRec = ExtensionRegistry.getProcessor(profile.processorUri);
|
|
33
33
|
const metadata = omitUndefined(clone({
|
|
34
34
|
uri: processorRec.metadata.uri,
|
|
35
|
+
version: processorRec.version,
|
|
35
36
|
displayName: processorRec.metadata.displayName,
|
|
36
37
|
description: processorRec.metadata.description,
|
|
37
38
|
iconUrl: processorRec.metadata.iconUrl,
|
|
@@ -87,7 +88,8 @@ function _materializeComponents(stackExecutor, srcMetadata, profile, returnUndef
|
|
|
87
88
|
}
|
|
88
89
|
materializedComponent = {
|
|
89
90
|
classUri: profileComponent.uri,
|
|
90
|
-
|
|
91
|
+
version: reg.version,
|
|
92
|
+
...omit(metadataComponent, ['classUri', 'variables', 'version']),
|
|
91
93
|
};
|
|
92
94
|
materializedComponent.variables = merge({}, [reg.metadata.variables || {}, metadataComponent.variables || {}], { deep: 'full' });
|
|
93
95
|
materializedComponent.variables = sortVariables(materializedComponent.variables);
|