@share-crm/sharedev-cli 0.0.4-rc.47-test.0 → 0.0.4-rc.47
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/sharedev.js +16 -3
- package/package.json +1 -1
package/dist/sharedev.js
CHANGED
|
@@ -40248,12 +40248,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
40248
40248
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40249
40249
|
};
|
|
40250
40250
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40251
|
+
exports.isPublicObject = isPublicObject;
|
|
40251
40252
|
exports.objectListService = objectListService;
|
|
40252
40253
|
const logger_ts_1 = __webpack_require__(63333);
|
|
40253
40254
|
const request_execute_command_paths_ts_1 = __webpack_require__(32351);
|
|
40254
40255
|
const normalize_ts_1 = __importDefault(__webpack_require__(39268));
|
|
40255
40256
|
const request_ts_1 = __webpack_require__(43176);
|
|
40256
40257
|
const types_ts_1 = __webpack_require__(77480);
|
|
40258
|
+
const PUBLIC_OBJECT_VISIBLE_SCOPES = new Set(['public', 'public_big']);
|
|
40259
|
+
function isPublicObject(item) {
|
|
40260
|
+
return PUBLIC_OBJECT_VISIBLE_SCOPES.has(item.visibleScope) && item.upstreamTenantId.length > 0;
|
|
40261
|
+
}
|
|
40257
40262
|
const getObjectListFromExecute = async (queryType) => {
|
|
40258
40263
|
if (queryType === null) {
|
|
40259
40264
|
throw new Error('queryType is required');
|
|
@@ -40282,6 +40287,8 @@ const getObjectsFromPullResponse = async (response) => {
|
|
|
40282
40287
|
apiName: normalize_ts_1.default.normalizeText(item.api_name),
|
|
40283
40288
|
description: normalize_ts_1.default.normalizeText(item.description),
|
|
40284
40289
|
defineType: normalize_ts_1.default.normalizeText(item.define_type),
|
|
40290
|
+
visibleScope: normalize_ts_1.default.normalizeText(item.visible_scope),
|
|
40291
|
+
upstreamTenantId: normalize_ts_1.default.normalizeText(item.upstream_tenant_id),
|
|
40285
40292
|
createTime: normalize_ts_1.default.normalizeDateTime(item.create_time),
|
|
40286
40293
|
lastModifiedTime: normalize_ts_1.default.normalizeDateTime(item.last_modified_time)
|
|
40287
40294
|
})).filter(item => item.apiName);
|
|
@@ -40363,13 +40370,19 @@ async function objectPullService(shouldQueryAll, queryType = null, apiName, skip
|
|
|
40363
40370
|
}
|
|
40364
40371
|
else if (shouldQueryAll) {
|
|
40365
40372
|
logger_ts_1.loggerService.startLoading('Fetching object apiName list...');
|
|
40373
|
+
const skippedPublicApiNames = objectListResult.objects
|
|
40374
|
+
.filter(obj => (0, object_list_ts_1.isPublicObject)(obj))
|
|
40375
|
+
.map(obj => obj.apiName);
|
|
40366
40376
|
try {
|
|
40367
|
-
apiNamesList.push(...remoteApiNamesList);
|
|
40377
|
+
apiNamesList.push(...remoteApiNamesList.filter(name => !skippedPublicApiNames.includes(name)));
|
|
40368
40378
|
}
|
|
40369
40379
|
finally {
|
|
40370
40380
|
logger_ts_1.loggerService.stopLoading();
|
|
40371
40381
|
}
|
|
40372
40382
|
logger_ts_1.loggerService.info(`Fetched object apiName count: ${apiNamesList.length}`);
|
|
40383
|
+
if (skippedPublicApiNames.length) {
|
|
40384
|
+
logger_ts_1.loggerService.info(`Skipped public object count: ${skippedPublicApiNames.length}`);
|
|
40385
|
+
}
|
|
40373
40386
|
}
|
|
40374
40387
|
// 50个分批拉取
|
|
40375
40388
|
const apiNamesListGroups = apiNamesList.reduce((acc, item, index) => {
|
|
@@ -49510,8 +49523,8 @@ async function readCliPackageMeta() {
|
|
|
49510
49523
|
? "@share-crm/sharedev-cli".trim()
|
|
49511
49524
|
: '@share-crm/sharedev-cli';
|
|
49512
49525
|
const debugEnabled = true && Boolean(false);
|
|
49513
|
-
const rawVersion = ( true && "0.0.4-rc.47
|
|
49514
|
-
? "0.0.4-rc.47
|
|
49526
|
+
const rawVersion = ( true && "0.0.4-rc.47".trim())
|
|
49527
|
+
? "0.0.4-rc.47".trim()
|
|
49515
49528
|
: '0.0.0';
|
|
49516
49529
|
const version = rawVersion + (debugEnabled ? '-debug' : '');
|
|
49517
49530
|
return { name, version };
|