"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.REPEATER = exports.generateCdnEndpoints = exports.CDN_ENDPONTS_CONFIG = exports.systemSubpackageMiniprogramDir = exports.cloudbaseMiniprogramDir = exports.miniprogramDir = exports.RUNTIME_CONFIG_URL = exports.systemSubpackageMiniprogramURL = exports.cloudbaseMiniprogramURL = exports.miniprogramURL = exports.materialsDirName = exports.appTemplateDir = exports.sharedMaterialsDir = exports.OFFICIAL_LIB_KEY = exports.rpxConfig = exports.remConfig = exports.npmRegistry = exports.KBONE_PAGE_KEYS = exports.MP_CONFIG_MODULE_NAME = exports.REPLACE_SIGN = void 0;
const path = __importStar(require("path"));
const os_1 = __importDefault(require("os"));
const index_1 = require("@cloudbase/lowcode-generator/lib/generator/config/index");
var index_2 = require("@cloudbase/lowcode-generator/lib/generator/config/index");
Object.defineProperty(exports, "REPLACE_SIGN", { enumerable: true, get: function () { return index_2.REPLACE_SIGN; } });
Object.defineProperty(exports, "MP_CONFIG_MODULE_NAME", { enumerable: true, get: function () { return index_2.MP_CONFIG_MODULE_NAME; } });
Object.defineProperty(exports, "KBONE_PAGE_KEYS", { enumerable: true, get: function () { return index_2.KBONE_PAGE_KEYS; } });
Object.defineProperty(exports, "npmRegistry", { enumerable: true, get: function () { return index_2.npmRegistry; } });
Object.defineProperty(exports, "remConfig", { enumerable: true, get: function () { return index_2.remConfig; } });
Object.defineProperty(exports, "rpxConfig", { enumerable: true, get: function () { return index_2.rpxConfig; } });
Object.defineProperty(exports, "OFFICIAL_LIB_KEY", { enumerable: true, get: function () { return index_2.OFFICIAL_LIB_KEY; } });
exports.sharedMaterialsDir = path.join(os_1.default.homedir(), '.weapps-materials');
exports.appTemplateDir = path.resolve(__dirname, '../../../template');
exports.materialsDirName = 'materials'; // materials diretory of current project
/**
 * miniprogram的代码，IDE插件后续会提供端功能
 * 存放在大账号：100015939275。访问地址：https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488&region=ap-shanghai&path=%252Flcap-builder%252F
 */
exports.miniprogramURL = 'https://comp-public-1303824488.file.myqcloud.com/lcap-builder/miniprogram_npm.1.8.57.zip';
exports.cloudbaseMiniprogramURL = 'https://comp-public-1303824488.file.myqcloud.com/lcap-builder/cloudbase_miniprogram_npm.1.8.57.zip';
exports.systemSubpackageMiniprogramURL = 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/lcap-builder/wd_system_miniprogram_npm.zip';
exports.RUNTIME_CONFIG_URL = `https://comp-public-1303824488.file.myqcloud.com/release_config/runtime/exp_runtime.json`;
/**
 * miniprogram_npm存放目录。IDE插件builder用到
 */
exports.miniprogramDir = path.join(os_1.default.homedir(), exports.sharedMaterialsDir, 'miniprogram_npm');
exports.cloudbaseMiniprogramDir = path.join(os_1.default.homedir(), exports.sharedMaterialsDir, 'cloudbase_miniprogram_npm');
exports.systemSubpackageMiniprogramDir = path.join(os_1.default.homedir(), exports.sharedMaterialsDir, '$wd_system_miniprogram_npm');
exports.CDN_ENDPONTS_CONFIG = {
    common: '',
    cloudbase: '//static.cloudbase.net',
    cdngo: 'https://qbase.cdn-go.cn',
    aegis: 'https://tam.cdn-go.cn',
};
function generateCdnEndpoints(endpoints = exports.CDN_ENDPONTS_CONFIG) {
    for (const key in exports.CDN_ENDPONTS_CONFIG) {
        if (!Object.prototype.hasOwnProperty.call(endpoints, key)) {
            endpoints[key] = endpoints.common ? endpoints.common : exports.CDN_ENDPONTS_CONFIG[key];
        }
    }
    return endpoints;
}
exports.generateCdnEndpoints = generateCdnEndpoints;
/**
 * 循环组件的信息
 */
exports.REPEATER = {
    MODULE_NAME: index_1.OFFICIAL_LIB_KEY,
    REPEATER_NAME: 'Repeater',
    REPEATER_ITEM_NAME: 'RepeaterItem',
};
