@komaci/common-shared 242.2.1 → 242.2.4
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/build/internal-namespaces.json +1 -0
- package/build/utils.d.ts +3 -2
- package/build/utils.js +5 -5
- package/package.json +2 -2
package/build/utils.d.ts
CHANGED
|
@@ -70,8 +70,9 @@ export declare function getAllClassMethods(astRoot: t.File): string[];
|
|
|
70
70
|
* @returns a context object containing meta data about the ast.
|
|
71
71
|
*/
|
|
72
72
|
export declare function getAstContextObject(ast: t.File): AstContext;
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
73
|
+
/**
|
|
74
|
+
* Determines if the module (i.e LWC Component) was written by an external user. If the namespace of the module
|
|
75
|
+
* is in the internal namespace list or is a @salesforce scoped module then we consider it internal
|
|
75
76
|
* @param namespace string namespace of the ModuleInfo to check (comes from ModuleInfo.namespace)
|
|
76
77
|
* @returns true if moduleInfo is an external module, false otherwise
|
|
77
78
|
*/
|
package/build/utils.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getFilepathSegments = exports.addPropertyFunction = exports.updateKomaciDocumentWithValidTemplatedStrings = exports.updateKomaciDocumentWithValidGetters = exports.isDeclaredInAst = exports.isExpressionThisOrAlias = exports.getThisAliasDeclaredInFunction = exports.isPropertyNodeUsed = exports.isGetterNodeUsed = exports.isPropertyUsed = exports.getClassMethodName = exports.getVariablesDeclaredInFunction = exports.isExternalModule = exports.getAstContextObject = exports.getAllClassMethods = exports.getAllModuleVaraibles = exports.getAllModuleFunctions = exports.getFromIdentifierOrStringLiteral = exports.collectImportUsage = exports.getMemberVarsFromGetter = exports.implicitConsumptionMetadata = exports.getPropertyMetadataFromAst = exports.TEMPLATED_STRING_FUNCTION = exports.GETTER_FUNCTION = exports.ONE_NS = exports.FORCE_NS = exports.LIGHTNING_NS = void 0;
|
|
4
4
|
const core_1 = require("@babel/core");
|
|
5
5
|
const types_1 = require("./types");
|
|
6
|
+
const allowlistNamespaces_1 = require("./allowlistNamespaces");
|
|
6
7
|
exports.LIGHTNING_NS = 'lightning';
|
|
7
8
|
exports.FORCE_NS = 'force';
|
|
8
9
|
exports.ONE_NS = 'one';
|
|
@@ -260,15 +261,14 @@ function getAstContextObject(ast) {
|
|
|
260
261
|
return context;
|
|
261
262
|
}
|
|
262
263
|
exports.getAstContextObject = getAstContextObject;
|
|
263
|
-
/**
|
|
264
|
-
*
|
|
264
|
+
/**
|
|
265
|
+
* Determines if the module (i.e LWC Component) was written by an external user. If the namespace of the module
|
|
266
|
+
* is in the internal namespace list or is a @salesforce scoped module then we consider it internal
|
|
265
267
|
* @param namespace string namespace of the ModuleInfo to check (comes from ModuleInfo.namespace)
|
|
266
268
|
* @returns true if moduleInfo is an external module, false otherwise
|
|
267
269
|
*/
|
|
268
270
|
function isExternalModule(namespace) {
|
|
269
|
-
return !(namespace
|
|
270
|
-
namespace === exports.FORCE_NS ||
|
|
271
|
-
namespace === exports.ONE_NS);
|
|
271
|
+
return !((0, allowlistNamespaces_1.isNamespaceInternal)(namespace) || namespace.startsWith('@salesforce/'));
|
|
272
272
|
}
|
|
273
273
|
exports.isExternalModule = isExternalModule;
|
|
274
274
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@komaci/common-shared",
|
|
3
|
-
"version": "242.2.
|
|
3
|
+
"version": "242.2.4",
|
|
4
4
|
"description": "Assets that are shared across Komaci commonjs packages",
|
|
5
5
|
"homepage": "https://komaci.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"build/komaci-mapping.json"
|
|
30
30
|
],
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@komaci/types": "242.2.
|
|
32
|
+
"@komaci/types": "242.2.4"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/core": "^7.9.0",
|