@next-core/brick-utils 2.37.26 → 2.38.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/CHANGELOG.md +11 -0
- package/dist/index.bundle.js +35 -1
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +35 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/scanInstalledAppsInStoryboard.d.ts +2 -0
- package/dist/types/scanInstalledAppsInStoryboard.spec.d.ts +1 -0
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -20797,7 +20797,7 @@ function lint(source) {
|
|
|
20797
20797
|
loc: {
|
|
20798
20798
|
start: node.loc.start,
|
|
20799
20799
|
end: {
|
|
20800
|
-
line: node.loc.
|
|
20800
|
+
line: node.loc.start.line,
|
|
20801
20801
|
// Only decorate the "var".
|
|
20802
20802
|
column: node.loc.start.column + 3
|
|
20803
20803
|
}
|
|
@@ -23030,5 +23030,38 @@ function debounceByAnimationFrame(fn) {
|
|
|
23030
23030
|
};
|
|
23031
23031
|
}
|
|
23032
23032
|
|
|
23033
|
-
|
|
23033
|
+
var INSTALLED_APPS = "INSTALLED_APPS";
|
|
23034
|
+
var has = "has";
|
|
23035
|
+
function scanInstalledAppsInStoryboard(storyboard) {
|
|
23036
|
+
var _storyboard$meta;
|
|
23037
|
+
|
|
23038
|
+
var collection = new Set();
|
|
23039
|
+
var beforeVisitInstalledApps = beforeVisitInstalledAppsFactory(collection);
|
|
23040
|
+
var {
|
|
23041
|
+
customTemplates,
|
|
23042
|
+
functions
|
|
23043
|
+
} = (_storyboard$meta = storyboard.meta) !== null && _storyboard$meta !== void 0 ? _storyboard$meta : {};
|
|
23044
|
+
visitStoryboardExpressions([storyboard.routes, customTemplates], beforeVisitInstalledApps, INSTALLED_APPS);
|
|
23045
|
+
visitStoryboardFunctions(functions, beforeVisitInstalledApps);
|
|
23046
|
+
return Array.from(collection);
|
|
23047
|
+
}
|
|
23048
|
+
|
|
23049
|
+
function beforeVisitInstalledAppsFactory(collection) {
|
|
23050
|
+
return function beforeVisitPermissions(node, parent) {
|
|
23051
|
+
if (node.name === INSTALLED_APPS) {
|
|
23052
|
+
var memberParent = parent[parent.length - 1];
|
|
23053
|
+
var callParent = parent[parent.length - 2];
|
|
23054
|
+
|
|
23055
|
+
if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === "CallExpression" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === "callee" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === "MemberExpression" && memberParent.key === "object" && !memberParent.node.computed && memberParent.node.property.type === "Identifier" && memberParent.node.property.name === has) {
|
|
23056
|
+
var args = callParent.node.arguments;
|
|
23057
|
+
|
|
23058
|
+
if (args.length > 0 && args[0].type === "Literal" && typeof args[0].value === "string") {
|
|
23059
|
+
collection.add(args[0].value);
|
|
23060
|
+
}
|
|
23061
|
+
}
|
|
23062
|
+
}
|
|
23063
|
+
};
|
|
23064
|
+
}
|
|
23065
|
+
|
|
23066
|
+
export { JsonStorage, PrecookFunctionVisitor, PrecookVisitor, asyncProcessBrick, asyncProcessStoryboard, computeRealRoutePath, convertValueByPrecision, cook, createProviderClass, debounceByAnimationFrame, deepFreeze, formatValue, getDependencyMapOfContext, getDepsOfTemplates, getDllAndDepsByResource, getDllAndDepsOfBricks, getDllAndDepsOfStoryboard, getTemplateDepsOfStoryboard, hasOwnProperty$1 as hasOwnProperty, inject, isBrickNode, isCustomTemplateNode, isEvaluable, isObject, isRouteNode, isSnippetNode, lint, loadScript, mapCustomApisToNameAndNamespace, matchPath, normalizeBuilderNode, normalizeMenu, parseForAnalysis, precook, precookFunction, preevaluate, prefetchScript, resolveContextConcurrently, restoreDynamicTemplates, scanAppGetMenuInAny, scanAppGetMenuInStoryboard, scanBricksInBrickConf, scanBricksInStoryboard, scanCustomApisInStoryboard, scanI18NInAny, scanI18NInStoryboard, scanInstalledAppsInStoryboard, scanPermissionActionsInAny, scanPermissionActionsInStoryboard, scanProcessorsInAny, scanProcessorsInStoryboard, scanRouteAliasInStoryboard, scanStoryboard, scanTemplatesInBrick, scanTemplatesInStoryboard, shouldAllowRecursiveEvaluations, smartDisplayForEvaluableString, syncResolveContextConcurrently, toPath, tokTypes_1 as tokTypes, trackContext, trackState, transform, transformAndInject, visitStoryboardExpressions, visitStoryboardFunctions };
|
|
23034
23067
|
//# sourceMappingURL=index.esm.js.map
|