curtis
15小時前 0756bf12d10cf1b7f78c571de0a9ad69cbaeb7ca
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
 *
 *  SCAN 模組列表輸出至 CSV  scripts/dist/*.scan.csv
 *
 *
 * */
const fs = require('fs');
const readline = require('readline');
const path = require('path');
const { findImageKeywords } = require('./list_dependencies')
 
 
const baseDir = path.join(process.cwd(), 'scripts/dist');
const exclusions = Array.from(new Set([])).join('|')
// 您提供的關鍵字 (以 | 分隔)
const keywordsStr = Array.from(new Set([
  'TElHTTPSClient',
  'ProcessServlet_Get',
  'ProcessServlet_FormData',
  'upFile',
  'dnFile_Get',
  'dnFile',
  'TElSimpleFTPSClient',
  'SetFtpInfo',
  'IIS_Ftp',
  'FtpCaseComplete',
  'En_DecryptionStr_Base64',
  'TIdHashMessageDigest5',
  'LoadFileGetMD5',
  'HTTPSClientCertificateValidate',
  'HttpClient'
 
])).join('|')
// 執行腳本 (請確認您的目標檔案名稱,預設為 CB_IMGPSScanImp.pas)
const targetFiles = [
  'CB_IMGPSScanImp.pas.bk',
  'DocCopy.pas',
  'DocList.pas',
  'DocPrt.pas',
  'ErrList.pas',
  'InputMask.pas',
  'OldCaseImg.pas',
  'OldCaseInfo.pas',
  'PatchFom.pas',
  'ScanMemo.pas'
]
 
async function listDependencies() {
  console.log(`${'方法名'.padEnd(30)} | ${'所在檔名'.padEnd(20)} | ${'行號'.padEnd(5)} | ${'引用了什麼相依 (關鍵字)'}`);
  console.log(`--- | --- | --- | --- |`);
  return await Promise.all(targetFiles.map((_) => findImageKeywords(_, keywordsStr, exclusions, path.join(baseDir, `${_}.transp.csv`))))
}
 
module.exports = {
  listDependencies
}