@cparra/apexdocs 3.6.0 → 3.7.2-alpha.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/dist/cli/generate.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -105,7 +105,32 @@ type DocPageData = {
|
|
|
105
105
|
type: 'class' | 'interface' | 'enum' | 'customobject';
|
|
106
106
|
};
|
|
107
107
|
|
|
108
|
+
type FileChange = {
|
|
109
|
+
name: string;
|
|
110
|
+
fileType: 'apex' | 'customobject';
|
|
111
|
+
changeType: 'added' | 'removed' | 'changed';
|
|
112
|
+
changes?: {
|
|
113
|
+
addedMethods?: string[];
|
|
114
|
+
removedMethods?: string[];
|
|
115
|
+
addedFields?: string[];
|
|
116
|
+
removedFields?: string[];
|
|
117
|
+
addedProperties?: string[];
|
|
118
|
+
removedProperties?: string[];
|
|
119
|
+
addedCustomFields?: string[];
|
|
120
|
+
removedCustomFields?: string[];
|
|
121
|
+
addedSubtypes?: string[];
|
|
122
|
+
removedSubtypes?: string[];
|
|
123
|
+
addedEnumValues?: string[];
|
|
124
|
+
removedEnumValues?: string[];
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
type SourceChangelog = {
|
|
129
|
+
fileChanges: FileChange[];
|
|
130
|
+
};
|
|
131
|
+
|
|
108
132
|
type ChangeLogPageData = {
|
|
133
|
+
source: SourceChangelog;
|
|
109
134
|
frontmatter: Frontmatter;
|
|
110
135
|
content: string;
|
|
111
136
|
outputDocPath: string;
|
|
@@ -204,4 +229,4 @@ type ConfigurableChangelogConfig = Omit<Partial<UserDefinedChangelogConfig>, 'ta
|
|
|
204
229
|
*/
|
|
205
230
|
declare function defineChangelogConfig(config: ConfigurableChangelogConfig): Partial<UserDefinedChangelogConfig>;
|
|
206
231
|
|
|
207
|
-
export { type ChangeLogPageData, type ChangelogConfigurableHooks, type ConfigurableChangelogConfig, type ConfigurableDocPageData, type ConfigurableDocPageReference, type ConfigurableMarkdownConfig, type ConfigurableOpenApiConfig, type DocPageData, type DocPageReference, type MarkdownConfigurableHooks, type ReferenceGuidePageData, type Skip, type TransformChangelogPage, type TransformDocPage, type TransformDocs, type TransformReference, type TransformReferenceGuide, defineChangelogConfig, defineMarkdownConfig, defineOpenApiConfig, process, skip };
|
|
232
|
+
export { type ChangeLogPageData, type ChangelogConfigurableHooks, type ConfigurableChangelogConfig, type ConfigurableDocPageData, type ConfigurableDocPageReference, type ConfigurableMarkdownConfig, type ConfigurableOpenApiConfig, type DocPageData, type DocPageReference, type MarkdownConfigurableHooks, type ReferenceGuidePageData, type Skip, type SourceChangelog, type TransformChangelogPage, type TransformDocPage, type TransformDocs, type TransformReference, type TransformReferenceGuide, defineChangelogConfig, defineMarkdownConfig, defineOpenApiConfig, process, skip };
|
package/dist/index.js
CHANGED
|
@@ -1942,7 +1942,7 @@ function toPickListValues(customField) {
|
|
|
1942
1942
|
const valueSetDefinition = valueSet.valueSetDefinition;
|
|
1943
1943
|
if ("value" in valueSetDefinition) {
|
|
1944
1944
|
const pickListValues = valueSetDefinition.value;
|
|
1945
|
-
return pickListValues.filter((each) => "fullName" in each).map((
|
|
1945
|
+
return pickListValues.filter((each) => "fullName" in each).map((current) => current.fullName);
|
|
1946
1946
|
}
|
|
1947
1947
|
}
|
|
1948
1948
|
}
|
|
@@ -3913,6 +3913,77 @@ const changelogTemplate = `
|
|
|
3913
3913
|
{{/if}}
|
|
3914
3914
|
`.trim();
|
|
3915
3915
|
|
|
3916
|
+
function changelogToSourceChangelog(changelog) {
|
|
3917
|
+
const newApexTypes = changelog.newApexTypes.map((newType) => {
|
|
3918
|
+
return {
|
|
3919
|
+
name: newType,
|
|
3920
|
+
fileType: "apex",
|
|
3921
|
+
changeType: "added"
|
|
3922
|
+
};
|
|
3923
|
+
});
|
|
3924
|
+
const removedApexTypes = changelog.removedApexTypes.map((removedType) => {
|
|
3925
|
+
return {
|
|
3926
|
+
name: removedType,
|
|
3927
|
+
fileType: "apex",
|
|
3928
|
+
changeType: "removed"
|
|
3929
|
+
};
|
|
3930
|
+
});
|
|
3931
|
+
const newCustomObjects = changelog.newCustomObjects.map((newType) => {
|
|
3932
|
+
return {
|
|
3933
|
+
name: newType,
|
|
3934
|
+
fileType: "customobject",
|
|
3935
|
+
changeType: "added"
|
|
3936
|
+
};
|
|
3937
|
+
});
|
|
3938
|
+
const removedCustomObjects = changelog.removedCustomObjects.map((removedType) => {
|
|
3939
|
+
return {
|
|
3940
|
+
name: removedType,
|
|
3941
|
+
fileType: "customobject",
|
|
3942
|
+
changeType: "removed"
|
|
3943
|
+
};
|
|
3944
|
+
});
|
|
3945
|
+
const modifiedApexTypes = changelog.newOrModifiedApexMembers.map((modifiedType) => {
|
|
3946
|
+
return {
|
|
3947
|
+
name: modifiedType.typeName,
|
|
3948
|
+
fileType: "apex",
|
|
3949
|
+
changeType: "changed",
|
|
3950
|
+
changes: {
|
|
3951
|
+
addedMethods: modifiedType.modifications.filter((mod) => mod.__typename === "NewMethod").map((mod) => mod.name),
|
|
3952
|
+
removedMethods: modifiedType.modifications.filter((mod) => mod.__typename === "RemovedMethod").map((mod) => mod.name),
|
|
3953
|
+
addedFields: modifiedType.modifications.filter((mod) => mod.__typename === "NewField").map((mod) => mod.name),
|
|
3954
|
+
removedFields: modifiedType.modifications.filter((mod) => mod.__typename === "RemovedField").map((mod) => mod.name),
|
|
3955
|
+
addedProperties: modifiedType.modifications.filter((mod) => mod.__typename === "NewProperty").map((mod) => mod.name),
|
|
3956
|
+
removedProperties: modifiedType.modifications.filter((mod) => mod.__typename === "RemovedProperty").map((mod) => mod.name),
|
|
3957
|
+
addedSubtypes: modifiedType.modifications.filter((mod) => mod.__typename === "NewType").map((mod) => mod.name),
|
|
3958
|
+
removedSubtypes: modifiedType.modifications.filter((mod) => mod.__typename === "RemovedType").map((mod) => mod.name),
|
|
3959
|
+
addedEnumValues: modifiedType.modifications.filter((mod) => mod.__typename === "NewEnumValue").map((mod) => mod.name),
|
|
3960
|
+
removedEnumValues: modifiedType.modifications.filter((mod) => mod.__typename === "RemovedEnumValue").map((mod) => mod.name)
|
|
3961
|
+
}
|
|
3962
|
+
};
|
|
3963
|
+
});
|
|
3964
|
+
const modifiedCustomObjects = changelog.customObjectModifications.map((modifiedType) => {
|
|
3965
|
+
return {
|
|
3966
|
+
name: modifiedType.typeName,
|
|
3967
|
+
fileType: "customobject",
|
|
3968
|
+
changeType: "changed",
|
|
3969
|
+
changes: {
|
|
3970
|
+
addedCustomFields: modifiedType.modifications.filter((mod) => mod.__typename === "NewField").map((mod) => mod.name),
|
|
3971
|
+
removedCustomFields: modifiedType.modifications.filter((mod) => mod.__typename === "RemovedField").map((mod) => mod.name)
|
|
3972
|
+
}
|
|
3973
|
+
};
|
|
3974
|
+
});
|
|
3975
|
+
return {
|
|
3976
|
+
fileChanges: [
|
|
3977
|
+
...newApexTypes,
|
|
3978
|
+
...removedApexTypes,
|
|
3979
|
+
...newCustomObjects,
|
|
3980
|
+
...removedCustomObjects,
|
|
3981
|
+
...modifiedApexTypes,
|
|
3982
|
+
...modifiedCustomObjects
|
|
3983
|
+
]
|
|
3984
|
+
};
|
|
3985
|
+
}
|
|
3986
|
+
|
|
3916
3987
|
var __defProp$1 = Object.defineProperty;
|
|
3917
3988
|
var __defProps$1 = Object.defineProperties;
|
|
3918
3989
|
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
@@ -3958,7 +4029,11 @@ function generateChangeLog(oldBundles, newBundles, config) {
|
|
|
3958
4029
|
if (config.skipIfNoChanges && !hasChanges(changelog)) {
|
|
3959
4030
|
return skip();
|
|
3960
4031
|
}
|
|
3961
|
-
return _function.pipe(
|
|
4032
|
+
return _function.pipe(
|
|
4033
|
+
convertToRenderableChangelog(changelog, newManifest.types),
|
|
4034
|
+
compile,
|
|
4035
|
+
(content) => convertToPageData(content, changelog)
|
|
4036
|
+
);
|
|
3962
4037
|
}
|
|
3963
4038
|
return _function.pipe(
|
|
3964
4039
|
reflect(oldBundles, config),
|
|
@@ -4015,8 +4090,9 @@ function compile(renderable) {
|
|
|
4015
4090
|
};
|
|
4016
4091
|
return Template.getInstance().compile(compilationRequest);
|
|
4017
4092
|
}
|
|
4018
|
-
function toPageData(fileName, content) {
|
|
4093
|
+
function toPageData(fileName, content, changelog) {
|
|
4019
4094
|
return {
|
|
4095
|
+
source: changelogToSourceChangelog(changelog),
|
|
4020
4096
|
frontmatter: null,
|
|
4021
4097
|
content,
|
|
4022
4098
|
outputDocPath: `${fileName}.md`
|