<commit_before>const fs = require('fs')
const path = require('path')

const {
  isInHBuilderX,
  isInHBuilderXAlpha,
  normalizeNodeModules
} = require('./util')

const {
  SCSS,
  SASS
} = require('./scss')

function getShadowCss () {
  let tagName = 'page'
  if (process.env.UNI_PLATFORM === 'h5') {
    tagName = 'body'
  }
  const cdn = getShadowCdn()
  return `${tagName}::after{position:fixed;content:'';left:-1000px;top:-1000px;-webkit-animation:shadow-preload .1s;-webkit-animation-delay:3s;animation:shadow-preload .1s;animation-delay:3s}@-webkit-keyframes shadow-preload{0%{background-image:url(${cdn}/img/shadow-grey.png)}100%{background-image:url(${cdn}/img/shadow-grey.png)}}@keyframes shadow-preload{0%{background-image:url(${cdn}/img/shadow-grey.png)}100%{background-image:url(${cdn}/img/shadow-grey.png)}}`
}
const cdns = {
  'mp-weixin': 1,
  'mp-alipay': 2,
  'mp-baidu': 3,
  'mp-toutiao': 4,
  'mp-qq': 5,
  'mp-360': 7,
  'mp-dingtalk': 8,
  'mp-kuaishou': 9,
  'mp-lark': 10,
  'quickapp-webview-huawei': 200,
  'quickapp-webview-union': 201
}

function getShadowCdn () {
  const index = cdns[process.env.UNI_SUB_PLATFORM || process.env.UNI_PLATFORM] || ''
  return `https://cdn${index}.dcloud.net.cn`
}

// 解决 vue-cli-service lint 时 UNI_PLATFORM 不存在
process.env.UNI_PLATFORM = process.env.UNI_PLATFORM || 'h5'

const uniPluginOptions = global.uniPlugin.options || {}<commit_msg>chore: add cdn<commit_after>const fs = require('fs')
const path = require('path')

const {
  isInHBuilderX,
  isInHBuilderXAlpha,
  normalizeNodeModules
} = require('./util')

const {
  SCSS,
  SASS
} = require('./scss')

function getShadowCss () {
  let tagName = 'page'
  if (process.env.UNI_PLATFORM === 'h5') {
    tagName = 'body'
  }
  const cdn = getShadowCdn()
  return `${tagName}::after{position:fixed;content:'';left:-1000px;top:-1000px;-webkit-animation:shadow-preload .1s;-webkit-animation-delay:3s;animation:shadow-preload .1s;animation-delay:3s}@-webkit-keyframes shadow-preload{0%{background-image:url(${cdn}/img/shadow-grey.png)}100%{background-image:url(${cdn}/img/shadow-grey.png)}}@keyframes shadow-preload{0%{background-image:url(${cdn}/img/shadow-grey.png)}100%{background-image:url(${cdn}/img/shadow-grey.png)}}`
}
const cdns = {
  'mp-weixin': 1,
  'mp-alipay': 2,
  'mp-baidu': 3,
  'mp-toutiao': 4,
  'mp-qq': 5,
  'mp-360': 7,
  'mp-dingtalk': 8,
  'mp-kuaishou': 9,
  'mp-lark': 10,
  'mp-jd': 11,
  'mp-xhs': 12,
  'quickapp-webview-huawei': 200,
  'quickapp-webview-union': 201
}

function getShadowCdn () {
  const index = cdns[process.env.UNI_SUB_PLATFORM || process.env.UNI_PLATFORM] || ''
  return `https://cdn${index}.dcloud.net.cn`
}

// 解决 vue-cli-service lint 时 UNI_PLATFORM 不存在
process.env.UNI_PLATFORM = process.env.UNI_PLATFORM || 'h5'

const uniPluginOptions = global.uniPlugin.options || {}
{'fraction_non_alphanumeric': 0.19371912491178547, 'fraction_numerical': 0.030345800988002825, 'mean_word_length': 4.750507099391481, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1996781', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1160, 'n_words': 162}