@cloudbase/cals 1.2.10 → 1.2.11
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/lib/cjs/parser/cals/utils/getUsedDatasource.d.ts +2 -0
- package/lib/cjs/parser/cals/utils/getUsedDatasource.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/getUsedDatasource.js +189 -0
- package/lib/cjs/parser/cals/utils/getUsedQueryPlugin.d.ts +4 -0
- package/lib/cjs/parser/cals/utils/getUsedQueryPlugin.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/getUsedQueryPlugin.js +76 -0
- package/lib/cjs/parser/cals/utils/getUsedWorkflow.d.ts +3 -0
- package/lib/cjs/parser/cals/utils/getUsedWorkflow.d.ts.map +1 -0
- package/lib/cjs/parser/cals/utils/getUsedWorkflow.js +27 -0
- package/lib/cjs/parser/index.d.ts +3 -0
- package/lib/cjs/parser/index.d.ts.map +1 -1
- package/lib/cjs/parser/index.js +8 -1
- package/lib/esm/parser/cals/utils/getUsedDatasource.d.ts +2 -0
- package/lib/esm/parser/cals/utils/getUsedDatasource.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/getUsedDatasource.js +185 -0
- package/lib/esm/parser/cals/utils/getUsedQueryPlugin.d.ts +4 -0
- package/lib/esm/parser/cals/utils/getUsedQueryPlugin.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/getUsedQueryPlugin.js +71 -0
- package/lib/esm/parser/cals/utils/getUsedWorkflow.d.ts +3 -0
- package/lib/esm/parser/cals/utils/getUsedWorkflow.d.ts.map +1 -0
- package/lib/esm/parser/cals/utils/getUsedWorkflow.js +23 -0
- package/lib/esm/parser/index.d.ts +3 -0
- package/lib/esm/parser/index.d.ts.map +1 -1
- package/lib/esm/parser/index.js +3 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { walkThroughComponents } from './common';
|
|
2
|
+
export function getUsedWorkflow(apps, options) {
|
|
3
|
+
const { defaultGroup = 'default' } = options || '';
|
|
4
|
+
const usedMap = {};
|
|
5
|
+
apps.forEach((app) => {
|
|
6
|
+
const key = app.id || app.appId || defaultGroup;
|
|
7
|
+
walkThroughComponents(app.items, (component) => {
|
|
8
|
+
const { listeners = [] } = component;
|
|
9
|
+
listeners.forEach((listener) => {
|
|
10
|
+
var _a, _b, _c, _d;
|
|
11
|
+
if (((_a = listener.handler) === null || _a === void 0 ? void 0 : _a.module) === 'platform' &&
|
|
12
|
+
((_b = listener.handler) === null || _b === void 0 ? void 0 : _b.name) === 'callWorkflow' &&
|
|
13
|
+
((_d = (_c = listener.handler) === null || _c === void 0 ? void 0 : _c.params) === null || _d === void 0 ? void 0 : _d.flowId)) {
|
|
14
|
+
if (!usedMap[key]) {
|
|
15
|
+
usedMap[key] = new Set();
|
|
16
|
+
}
|
|
17
|
+
usedMap[key].add(listener.handler.params.flowId);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
return usedMap;
|
|
23
|
+
}
|
|
@@ -6,6 +6,9 @@ export { parseComponentCals, regenBlockTemplateCals, regenBlockTemplateComponent
|
|
|
6
6
|
export { ActionType, type IDataBind, PropBindType } from './expression/index';
|
|
7
7
|
export { processCommonStyle2CSSProperties, processCSSProperties2Rem, processCSSPropertiesUnit, } from './cals/utils/style';
|
|
8
8
|
export { getUsedResources, getNavUsedStaticResource, _simpleGetUsedResourceOfComponent, } from './cals/utils/getUsedResources';
|
|
9
|
+
export { getUsedQueryPlugin, getUsedSQLConnector } from './cals/utils/getUsedQueryPlugin';
|
|
10
|
+
export { getUsedWorkflow } from './cals/utils/getUsedWorkflow';
|
|
11
|
+
export { getUsedDatasource } from './cals/utils/getUsedDatasource';
|
|
9
12
|
export { getUsedReference } from './cals/utils/getUsedReference';
|
|
10
13
|
export { default as PostcssRpx2Calc } from './plugins/postcss-rpx2clac';
|
|
11
14
|
export { Dependencies } from './dependiencies';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/parser/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EACL,UAAU,EACV,UAAU,EACV,KAAK,SAAS,EACd,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,GACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,iCAAiC,GAClC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/parser/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EACL,UAAU,EACV,UAAU,EACV,KAAK,SAAS,EACd,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,GACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,iCAAiC,GAClC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
|
package/lib/esm/parser/index.js
CHANGED
|
@@ -6,6 +6,9 @@ export { parseComponentCals, regenBlockTemplateCals, regenBlockTemplateComponent
|
|
|
6
6
|
export { ActionType, PropBindType } from './expression/index';
|
|
7
7
|
export { processCommonStyle2CSSProperties, processCSSProperties2Rem, processCSSPropertiesUnit, } from './cals/utils/style';
|
|
8
8
|
export { getUsedResources, getNavUsedStaticResource, _simpleGetUsedResourceOfComponent, } from './cals/utils/getUsedResources';
|
|
9
|
+
export { getUsedQueryPlugin, getUsedSQLConnector } from './cals/utils/getUsedQueryPlugin';
|
|
10
|
+
export { getUsedWorkflow } from './cals/utils/getUsedWorkflow';
|
|
11
|
+
export { getUsedDatasource } from './cals/utils/getUsedDatasource';
|
|
9
12
|
export { getUsedReference } from './cals/utils/getUsedReference';
|
|
10
13
|
export { default as PostcssRpx2Calc } from './plugins/postcss-rpx2clac';
|
|
11
14
|
export { Dependencies } from './dependiencies';
|