Open seriema opened 4 years ago
Running the tool produces this JSON file which shows where the violations are happening:
[
{
"location": "C:\\source\\Foundation\\src\\Foundation\\ClientResources\\Scripts\\ContentEditing\\CreateContent.js",
"modules": [
{
"name": "epi-cms/contentediting/CreateContent",
"category": "internal",
"ruleId": "@episerver/cms/no-internal-episerver-apis",
"line": 8,
"column": 5
},
{
"name": "epi/shell/widget/SearchBox",
"category": "internal",
"ruleId": "@episerver/cms/no-internal-episerver-apis",
"line": 9,
"column": 5
}
]
},
{
"location": "C:\\source\\Foundation\\src\\Foundation\\modules\\_protected\\VisualCompareMode\\ClientResources\\Scripts\\compareWithMarkupView.js",
"modules": [
{
"name": "epi-cms/compare/views/SideBySideCompareView",
"category": "internal",
"ruleId": "@episerver/cms/no-internal-episerver-apis",
"line": 6,
"column": 5
}
]
},
{
"location": "C:\\source\\Foundation\\src\\Foundation\\modules\\_protected\\VisualCompareMode\\EpiServerOverridenLibs\\CustomCompareCommandProvider.js",
"modules": [
{
"name": "epi-cms/component/command/_GlobalToolbarCommandProvider",
"category": "internal",
"ruleId": "@episerver/cms/no-internal-episerver-apis",
"line": 3,
"column": 5
},
{
"name": "epi-cms/command/_NonEditViewCommandMixin",
"category": "internal",
"ruleId": "@episerver/cms/no-internal-episerver-apis",
"line": 8,
"column": 5
}
]
},
{
"location": "C:\\source\\Foundation\\src\\Foundation\\modules\\_protected\\VisualCompareMode\\EpiServerOverridenLibs\\customWidgetSwitcher.js",
"modules": [
{
"name": "epi/shell/StickyViewSelector",
"category": "internal",
"ruleId": "@episerver/cms/no-internal-episerver-apis",
"line": 8,
"column": 5
},
{
"name": "epi/shell/layout/AnimatedCardContainer",
"category": "internal",
"ruleId": "@episerver/cms/no-internal-episerver-apis",
"line": 10,
"column": 5
}
]
}
]
episerver-cms-api-usage.txt - renamed from .json to upload on github
Describe the bug Using internal API's isn't supported and can break the extensions in any upgrade (even patches).
To Reproduce Steps to reproduce the behavior:
npx @episerver/create-cms-api-report
Expected behavior The result table should be empty (0 violations).
Screenshots
Additional context Each case needs to be considered individually but I only created this "master" issue here on Github.
Also consider using the analyzer tool as part of the build pipeline. See #186.