新增功能 .dideignore

This commit is contained in:
锦恢 2024-11-27 21:43:02 +08:00
parent a2eef0a7aa
commit bf97b231ff
25 changed files with 1018 additions and 627 deletions

View File

@ -0,0 +1,16 @@
{
"comments": {
"lineComment": "#"
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
{"open":"(", "close":")", "notIn":["string", "comment"]},
{"open":"[", "close":"]", "notIn":["string", "comment"]},
{"open":"{", "close":"}", "notIn":["string", "comment"]},
{"open":"\"", "close":"\"", "notIn":["string", "comment"]}
]
}

View File

@ -1 +1,9 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1729580625832" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18157" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M256 0A256 256 0 0 0 0 256v211.748571h303.177143l96.475428-161.353142a45.714286 45.714286 0 0 1 83.309715 11.410285l83.382857 305.590857 90.477714-135.314285a45.714286 45.714286 0 0 1 38.034286-20.333715H1024V256A256 256 0 0 0 768 0h-512zM1024 559.177143H719.286857L586.605714 757.540571a45.714286 45.714286 0 0 1-82.139428-13.385142L422.985143 445.513143l-54.637714 91.428571a45.714286 45.714286 0 0 1-39.204572 22.235429H0V768A256 256 0 0 0 256 1024h512a256 256 0 0 0 256-256V559.177143z" fill="#4CAF50" p-id="18158"></path></svg> <?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1701098079075" class="icon" viewBox="0 0 1280 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="7655" xmlns:xlink="http://www.w3.org/1999/xlink"
width="250" height="200">
<path
d="M256 128c0-35.4 28.6-64 64-64h320c35.4 0 64 28.6 64 64v704h192V512c0-35.4 28.6-64 64-64h256c35.4 0 64 28.6 64 64s-28.6 64-64 64h-192v320c0 35.4-28.6 64-64 64H640c-35.4 0-64-28.6-64-64V192h-192v320c0 35.4-28.6 64-64 64H64c-35.4 0-64-28.6-64-64s28.6-64 64-64h192V128z"
p-id="7656" fill="#cb81da"></path>
</svg>

Before

Width:  |  Height:  |  Size: 866 B

After

Width:  |  Height:  |  Size: 672 B

View File

@ -1 +1,9 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1729580625832" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18157" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M256 0A256 256 0 0 0 0 256v211.748571h303.177143l96.475428-161.353142a45.714286 45.714286 0 0 1 83.309715 11.410285l83.382857 305.590857 90.477714-135.314285a45.714286 45.714286 0 0 1 38.034286-20.333715H1024V256A256 256 0 0 0 768 0h-512zM1024 559.177143H719.286857L586.605714 757.540571a45.714286 45.714286 0 0 1-82.139428-13.385142L422.985143 445.513143l-54.637714 91.428571a45.714286 45.714286 0 0 1-39.204572 22.235429H0V768A256 256 0 0 0 256 1024h512a256 256 0 0 0 256-256V559.177143z" fill="#4CAF50" p-id="18158"></path></svg> <?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1701098079075" class="icon" viewBox="0 0 1280 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="7655" xmlns:xlink="http://www.w3.org/1999/xlink"
width="250" height="200">
<path
d="M256 128c0-35.4 28.6-64 64-64h320c35.4 0 64 28.6 64 64v704h192V512c0-35.4 28.6-64 64-64h256c35.4 0 64 28.6 64 64s-28.6 64-64 64h-192v320c0 35.4-28.6 64-64 64H640c-35.4 0-64-28.6-64-64V192h-192v320c0 35.4-28.6 64-64 64H64c-35.4 0-64-28.6-64-64s28.6-64 64-64h192V128z"
p-id="7656" fill="#cb81da"></path>
</svg>

Before

Width:  |  Height:  |  Size: 866 B

After

Width:  |  Height:  |  Size: 672 B

508
package-lock.json generated
View File

@ -10,7 +10,8 @@
"dependencies": { "dependencies": {
"axios": "^1.7.7", "axios": "^1.7.7",
"bson": "^6.8.0", "bson": "^6.8.0",
"chokidar": "^3.5.3", "chokidar": "^4.0.1",
"minimatch": "^10.0.1",
"puppeteer-core": "^19.4.1", "puppeteer-core": "^19.4.1",
"showdown": "^2.1.0", "showdown": "^2.1.0",
"state-machine-cat": "^9.2.5", "state-machine-cat": "^9.2.5",
@ -23,7 +24,6 @@
"zlib": "^1.0.5" "zlib": "^1.0.5"
}, },
"devDependencies": { "devDependencies": {
"@types/glob": "^8.0.0",
"@types/mocha": "^10.0.0", "@types/mocha": "^10.0.0",
"@types/node": "16.x", "@types/node": "16.x",
"@types/showdown": "^2.0.0", "@types/showdown": "^2.0.0",
@ -32,7 +32,6 @@
"@typescript-eslint/parser": "^5.42.0", "@typescript-eslint/parser": "^5.42.0",
"@vscode/test-electron": "^2.2.0", "@vscode/test-electron": "^2.2.0",
"eslint": "^8.26.0", "eslint": "^8.26.0",
"glob": "^8.0.3",
"mocha": "^10.1.0", "mocha": "^10.1.0",
"typescript": "^4.8.4", "typescript": "^4.8.4",
"webpack-cli": "^5.1.4" "webpack-cli": "^5.1.4"
@ -70,6 +69,18 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
} }
}, },
"node_modules/@eslint/eslintrc/node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/@humanwhocodes/config-array": { "node_modules/@humanwhocodes/config-array": {
"version": "0.11.8", "version": "0.11.8",
"resolved": "https://registry.npmmirror.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", "resolved": "https://registry.npmmirror.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",
@ -84,6 +95,18 @@
"node": ">=10.10.0" "node": ">=10.10.0"
} }
}, },
"node_modules/@humanwhocodes/config-array/node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/@humanwhocodes/module-importer": { "node_modules/@humanwhocodes/module-importer": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmmirror.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "resolved": "https://registry.npmmirror.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
@ -345,28 +368,12 @@
"dev": true, "dev": true,
"peer": true "peer": true
}, },
"node_modules/@types/glob": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/@types/glob/-/glob-8.0.0.tgz",
"integrity": "sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==",
"dev": true,
"dependencies": {
"@types/minimatch": "*",
"@types/node": "*"
}
},
"node_modules/@types/json-schema": { "node_modules/@types/json-schema": {
"version": "7.0.11", "version": "7.0.11",
"resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz", "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz",
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
"dev": true "dev": true
}, },
"node_modules/@types/minimatch": {
"version": "5.1.2",
"resolved": "https://registry.npmmirror.com/@types/minimatch/-/minimatch-5.1.2.tgz",
"integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==",
"dev": true
},
"node_modules/@types/mocha": { "node_modules/@types/mocha": {
"version": "10.0.1", "version": "10.0.1",
"resolved": "https://registry.npmmirror.com/@types/mocha/-/mocha-10.0.1.tgz", "resolved": "https://registry.npmmirror.com/@types/mocha/-/mocha-10.0.1.tgz",
@ -889,8 +896,9 @@
}, },
"node_modules/anymatch": { "node_modules/anymatch": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dev": true,
"dependencies": { "dependencies": {
"normalize-path": "^3.0.0", "normalize-path": "^3.0.0",
"picomatch": "^2.0.4" "picomatch": "^2.0.4"
@ -962,11 +970,15 @@
} }
}, },
"node_modules/binary-extensions": { "node_modules/binary-extensions": {
"version": "2.2.0", "version": "2.3.0",
"resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
"dev": true,
"engines": { "engines": {
"node": ">=8" "node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/bit-field": { "node_modules/bit-field": {
@ -1063,6 +1075,7 @@
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz", "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"dependencies": { "dependencies": {
"fill-range": "^7.0.1" "fill-range": "^7.0.1"
}, },
@ -1224,34 +1237,17 @@
} }
}, },
"node_modules/chokidar": { "node_modules/chokidar": {
"version": "3.5.3", "version": "4.0.1",
"resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==",
"dependencies": { "dependencies": {
"anymatch": "~3.1.2", "readdirp": "^4.0.1"
"braces": "~3.0.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
}, },
"engines": { "engines": {
"node": ">= 8.10.0" "node": ">= 14.16.0"
}, },
"optionalDependencies": { "funding": {
"fsevents": "~2.3.2" "url": "https://paulmillr.com/funding/"
}
},
"node_modules/chokidar/node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
} }
}, },
"node_modules/chownr": { "node_modules/chownr": {
@ -1649,6 +1645,18 @@
"node": ">=4.0" "node": ">=4.0"
} }
}, },
"node_modules/eslint/node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/espree": { "node_modules/espree": {
"version": "9.4.1", "version": "9.4.1",
"resolved": "https://registry.npmmirror.com/espree/-/espree-9.4.1.tgz", "resolved": "https://registry.npmmirror.com/espree/-/espree-9.4.1.tgz",
@ -1850,6 +1858,7 @@
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz", "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"dependencies": { "dependencies": {
"to-regex-range": "^5.0.1" "to-regex-range": "^5.0.1"
}, },
@ -1969,9 +1978,10 @@
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
}, },
"node_modules/fsevents": { "node_modules/fsevents": {
"version": "2.3.2", "version": "2.3.3",
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"optional": true, "optional": true,
"os": [ "os": [
@ -2013,6 +2023,18 @@
"node": "*" "node": "*"
} }
}, },
"node_modules/fstream/node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/fstream/node_modules/rimraf": { "node_modules/fstream/node_modules/rimraf": {
"version": "2.7.1", "version": "2.7.1",
"resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz", "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz",
@ -2053,22 +2075,6 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/glob": {
"version": "8.1.0",
"resolved": "https://registry.npmmirror.com/glob/-/glob-8.1.0.tgz",
"integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^5.0.1",
"once": "^1.3.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/glob-parent": { "node_modules/glob-parent": {
"version": "6.0.2", "version": "6.0.2",
"resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz", "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz",
@ -2088,27 +2094,6 @@
"dev": true, "dev": true,
"peer": true "peer": true
}, },
"node_modules/glob/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/glob/node_modules/minimatch": {
"version": "5.1.6",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.6.tgz",
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=10"
}
},
"node_modules/globals": { "node_modules/globals": {
"version": "13.19.0", "version": "13.19.0",
"resolved": "https://registry.npmmirror.com/globals/-/globals-13.19.0.tgz", "resolved": "https://registry.npmmirror.com/globals/-/globals-13.19.0.tgz",
@ -2312,8 +2297,9 @@
}, },
"node_modules/is-binary-path": { "node_modules/is-binary-path": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"dependencies": { "dependencies": {
"binary-extensions": "^2.0.0" "binary-extensions": "^2.0.0"
}, },
@ -2337,6 +2323,7 @@
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true,
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
} }
@ -2353,6 +2340,7 @@
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
"dependencies": { "dependencies": {
"is-extglob": "^2.1.1" "is-extglob": "^2.1.1"
}, },
@ -2364,6 +2352,7 @@
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"engines": { "engines": {
"node": ">=0.12.0" "node": ">=0.12.0"
} }
@ -2691,14 +2680,25 @@
} }
}, },
"node_modules/minimatch": { "node_modules/minimatch": {
"version": "3.1.2", "version": "10.0.1",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==",
"dependencies": { "dependencies": {
"brace-expansion": "^1.1.7" "brace-expansion": "^2.0.1"
}, },
"engines": { "engines": {
"node": "*" "node": "20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/minimatch/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dependencies": {
"balanced-match": "^1.0.0"
} }
}, },
"node_modules/minimist": { "node_modules/minimist": {
@ -2833,6 +2833,33 @@
"node": ">= 14.0.0" "node": ">= 14.0.0"
} }
}, },
"node_modules/mocha/node_modules/chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"dev": true,
"funding": [
{
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
],
"dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
},
"engines": {
"node": ">= 8.10.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/mocha/node_modules/glob": { "node_modules/mocha/node_modules/glob": {
"version": "7.2.0", "version": "7.2.0",
"resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.0.tgz", "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.0.tgz",
@ -2850,6 +2877,18 @@
"node": "*" "node": "*"
} }
}, },
"node_modules/mocha/node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/mocha/node_modules/glob/node_modules/minimatch": { "node_modules/mocha/node_modules/glob/node_modules/minimatch": {
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
@ -2889,6 +2928,18 @@
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true "dev": true
}, },
"node_modules/mocha/node_modules/readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
"dependencies": {
"picomatch": "^2.2.1"
},
"engines": {
"node": ">=8.10.0"
}
},
"node_modules/mocha/node_modules/supports-color": { "node_modules/mocha/node_modules/supports-color": {
"version": "8.1.1", "version": "8.1.1",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz", "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz",
@ -2963,8 +3014,9 @@
}, },
"node_modules/normalize-path": { "node_modules/normalize-path": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true,
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
} }
@ -3128,6 +3180,7 @@
"version": "2.3.1", "version": "2.3.1",
"resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
"engines": { "engines": {
"node": ">=8.6" "node": ">=8.6"
} }
@ -3290,14 +3343,15 @@
"dev": true "dev": true
}, },
"node_modules/readdirp": { "node_modules/readdirp": {
"version": "3.6.0", "version": "4.0.2",
"resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==",
"dependencies": {
"picomatch": "^2.2.1"
},
"engines": { "engines": {
"node": ">=8.10.0" "node": ">= 14.16.0"
},
"funding": {
"type": "individual",
"url": "https://paulmillr.com/funding/"
} }
}, },
"node_modules/rechoir": { "node_modules/rechoir": {
@ -3421,6 +3475,17 @@
"node": "*" "node": "*"
} }
}, },
"node_modules/rimraf/node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/run-parallel": { "node_modules/run-parallel": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz", "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz",
@ -3924,6 +3989,17 @@
"node": "*" "node": "*"
} }
}, },
"node_modules/temp/node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/temp/node_modules/rimraf": { "node_modules/temp/node_modules/rimraf": {
"version": "2.6.3", "version": "2.6.3",
"resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.6.3.tgz", "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.6.3.tgz",
@ -4021,6 +4097,7 @@
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"dependencies": { "dependencies": {
"is-number": "^7.0.0" "is-number": "^7.0.0"
}, },
@ -4631,6 +4708,17 @@
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"minimatch": "^3.1.2", "minimatch": "^3.1.2",
"strip-json-comments": "^3.1.1" "strip-json-comments": "^3.1.1"
},
"dependencies": {
"minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
}
} }
}, },
"@humanwhocodes/config-array": { "@humanwhocodes/config-array": {
@ -4642,6 +4730,17 @@
"@humanwhocodes/object-schema": "^1.2.1", "@humanwhocodes/object-schema": "^1.2.1",
"debug": "^4.1.1", "debug": "^4.1.1",
"minimatch": "^3.0.5" "minimatch": "^3.0.5"
},
"dependencies": {
"minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
}
} }
}, },
"@humanwhocodes/module-importer": { "@humanwhocodes/module-importer": {
@ -4844,28 +4943,12 @@
"dev": true, "dev": true,
"peer": true "peer": true
}, },
"@types/glob": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/@types/glob/-/glob-8.0.0.tgz",
"integrity": "sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==",
"dev": true,
"requires": {
"@types/minimatch": "*",
"@types/node": "*"
}
},
"@types/json-schema": { "@types/json-schema": {
"version": "7.0.11", "version": "7.0.11",
"resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz", "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz",
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
"dev": true "dev": true
}, },
"@types/minimatch": {
"version": "5.1.2",
"resolved": "https://registry.npmmirror.com/@types/minimatch/-/minimatch-5.1.2.tgz",
"integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==",
"dev": true
},
"@types/mocha": { "@types/mocha": {
"version": "10.0.1", "version": "10.0.1",
"resolved": "https://registry.npmmirror.com/@types/mocha/-/mocha-10.0.1.tgz", "resolved": "https://registry.npmmirror.com/@types/mocha/-/mocha-10.0.1.tgz",
@ -5281,8 +5364,9 @@
}, },
"anymatch": { "anymatch": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dev": true,
"requires": { "requires": {
"normalize-path": "^3.0.0", "normalize-path": "^3.0.0",
"picomatch": "^2.0.4" "picomatch": "^2.0.4"
@ -5342,9 +5426,10 @@
} }
}, },
"binary-extensions": { "binary-extensions": {
"version": "2.2.0", "version": "2.3.0",
"resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
"dev": true
}, },
"bit-field": { "bit-field": {
"version": "1.7.0", "version": "1.7.0",
@ -5429,6 +5514,7 @@
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz", "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"requires": { "requires": {
"fill-range": "^7.0.1" "fill-range": "^7.0.1"
} }
@ -5529,28 +5615,11 @@
} }
}, },
"chokidar": { "chokidar": {
"version": "3.5.3", "version": "4.0.1",
"resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==",
"requires": { "requires": {
"anymatch": "~3.1.2", "readdirp": "^4.0.1"
"braces": "~3.0.2",
"fsevents": "~2.3.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
},
"dependencies": {
"glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"requires": {
"is-glob": "^4.0.1"
}
}
} }
}, },
"chownr": { "chownr": {
@ -5833,6 +5902,15 @@
"resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz",
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
"dev": true "dev": true
},
"minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
} }
} }
}, },
@ -6029,6 +6107,7 @@
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz", "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"requires": { "requires": {
"to-regex-range": "^5.0.1" "to-regex-range": "^5.0.1"
} }
@ -6110,9 +6189,10 @@
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
}, },
"fsevents": { "fsevents": {
"version": "2.3.2", "version": "2.3.3",
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true,
"optional": true "optional": true
}, },
"fstream": { "fstream": {
@ -6141,6 +6221,15 @@
"path-is-absolute": "^1.0.0" "path-is-absolute": "^1.0.0"
} }
}, },
"minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"rimraf": { "rimraf": {
"version": "2.7.1", "version": "2.7.1",
"resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz", "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz",
@ -6171,39 +6260,6 @@
"pump": "^3.0.0" "pump": "^3.0.0"
} }
}, },
"glob": {
"version": "8.1.0",
"resolved": "https://registry.npmmirror.com/glob/-/glob-8.1.0.tgz",
"integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^5.0.1",
"once": "^1.3.0"
},
"dependencies": {
"brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0"
}
},
"minimatch": {
"version": "5.1.6",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.6.tgz",
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true,
"requires": {
"brace-expansion": "^2.0.1"
}
}
}
},
"glob-parent": { "glob-parent": {
"version": "6.0.2", "version": "6.0.2",
"resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz", "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz",
@ -6370,8 +6426,9 @@
}, },
"is-binary-path": { "is-binary-path": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"requires": { "requires": {
"binary-extensions": "^2.0.0" "binary-extensions": "^2.0.0"
} }
@ -6388,7 +6445,8 @@
"is-extglob": { "is-extglob": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true
}, },
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "3.0.0", "version": "3.0.0",
@ -6399,6 +6457,7 @@
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
"requires": { "requires": {
"is-extglob": "^2.1.1" "is-extglob": "^2.1.1"
} }
@ -6406,7 +6465,8 @@
"is-number": { "is-number": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
}, },
"is-path-inside": { "is-path-inside": {
"version": "3.0.3", "version": "3.0.3",
@ -6668,11 +6728,21 @@
} }
}, },
"minimatch": { "minimatch": {
"version": "3.1.2", "version": "10.0.1",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==",
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^2.0.1"
},
"dependencies": {
"brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"requires": {
"balanced-match": "^1.0.0"
}
}
} }
}, },
"minimist": { "minimist": {
@ -6775,6 +6845,22 @@
"yargs-unparser": "2.0.0" "yargs-unparser": "2.0.0"
}, },
"dependencies": { "dependencies": {
"chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"dev": true,
"requires": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"fsevents": "~2.3.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
}
},
"glob": { "glob": {
"version": "7.2.0", "version": "7.2.0",
"resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.0.tgz", "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.0.tgz",
@ -6800,6 +6886,15 @@
} }
} }
}, },
"glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"requires": {
"is-glob": "^4.0.1"
}
},
"minimatch": { "minimatch": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.0.1.tgz", "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.0.1.tgz",
@ -6826,6 +6921,15 @@
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true "dev": true
}, },
"readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
"requires": {
"picomatch": "^2.2.1"
}
},
"supports-color": { "supports-color": {
"version": "8.1.1", "version": "8.1.1",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz", "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz",
@ -6882,8 +6986,9 @@
}, },
"normalize-path": { "normalize-path": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true
}, },
"once": { "once": {
"version": "1.4.0", "version": "1.4.0",
@ -7012,7 +7117,8 @@
"picomatch": { "picomatch": {
"version": "2.3.1", "version": "2.3.1",
"resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true
}, },
"pkg-dir": { "pkg-dir": {
"version": "4.2.0", "version": "4.2.0",
@ -7149,12 +7255,9 @@
} }
}, },
"readdirp": { "readdirp": {
"version": "3.6.0", "version": "4.0.2",
"resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA=="
"requires": {
"picomatch": "^2.2.1"
}
}, },
"rechoir": { "rechoir": {
"version": "0.8.0", "version": "0.8.0",
@ -7241,6 +7344,14 @@
"once": "^1.3.0", "once": "^1.3.0",
"path-is-absolute": "^1.0.0" "path-is-absolute": "^1.0.0"
} }
},
"minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"requires": {
"brace-expansion": "^1.1.7"
}
} }
} }
}, },
@ -7626,6 +7737,14 @@
"path-is-absolute": "^1.0.0" "path-is-absolute": "^1.0.0"
} }
}, },
"minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"rimraf": { "rimraf": {
"version": "2.6.3", "version": "2.6.3",
"resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.6.3.tgz", "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.6.3.tgz",
@ -7699,6 +7818,7 @@
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"requires": { "requires": {
"is-number": "^7.0.0" "is-number": "^7.0.0"
} }

View File

@ -990,6 +990,17 @@
"light": "./images/svg/light/view.svg" "light": "./images/svg/light/view.svg"
} }
}, },
{
"id": "dideignore",
"filenames": [
".dideignore"
],
"icon": {
"dark": "./images/icon.svg",
"light": "./images/icon.svg"
},
"configuration": "./config/ignore.configuration.json"
},
{ {
"id": "digital-ide-output", "id": "digital-ide-output",
"mimetypes": [ "mimetypes": [
@ -1043,6 +1054,11 @@
"language": "digital-ide-output", "language": "digital-ide-output",
"scopeName": "digital-ide.output", "scopeName": "digital-ide.output",
"path": "./syntaxes/digital-ide-output.json" "path": "./syntaxes/digital-ide-output.json"
},
{
"language": "dideignore",
"scopeName": "source.dideignore",
"path": "./syntaxes/ignore.json"
} }
], ],
"snippets": [ "snippets": [
@ -1201,7 +1217,6 @@
"test": "node ./out/test/runTest.js" "test": "node ./out/test/runTest.js"
}, },
"devDependencies": { "devDependencies": {
"@types/glob": "^8.0.0",
"@types/mocha": "^10.0.0", "@types/mocha": "^10.0.0",
"@types/node": "16.x", "@types/node": "16.x",
"@types/showdown": "^2.0.0", "@types/showdown": "^2.0.0",
@ -1210,7 +1225,6 @@
"@typescript-eslint/parser": "^5.42.0", "@typescript-eslint/parser": "^5.42.0",
"@vscode/test-electron": "^2.2.0", "@vscode/test-electron": "^2.2.0",
"eslint": "^8.26.0", "eslint": "^8.26.0",
"glob": "^8.0.3",
"mocha": "^10.1.0", "mocha": "^10.1.0",
"typescript": "^4.8.4", "typescript": "^4.8.4",
"webpack-cli": "^5.1.4" "webpack-cli": "^5.1.4"
@ -1218,7 +1232,8 @@
"dependencies": { "dependencies": {
"axios": "^1.7.7", "axios": "^1.7.7",
"bson": "^6.8.0", "bson": "^6.8.0",
"chokidar": "^3.5.3", "chokidar": "^4.0.1",
"minimatch": "^10.0.1",
"puppeteer-core": "^19.4.1", "puppeteer-core": "^19.4.1",
"showdown": "^2.1.0", "showdown": "^2.1.0",
"state-machine-cat": "^9.2.5", "state-machine-cat": "^9.2.5",
@ -1230,4 +1245,4 @@
"wavedrom": "^2.9.1", "wavedrom": "^2.9.1",
"zlib": "^1.0.5" "zlib": "^1.0.5"
} }
} }

View File

@ -26,7 +26,9 @@ class DefaultVlogLinter implements BaseLinter {
const diagnostics: vscode.Diagnostic[] = []; const diagnostics: vscode.Diagnostic[] = [];
if (all.error && all.error.length > 0) { if (all.error && all.error.length > 0) {
for (const hdlError of all.error) { for (const hdlError of all.error) {
LspOutput.report(`<default linter> line: ${hdlError.range.line}, info: ${hdlError.message}`, ReportType.Run); LspOutput.report(`<default linter> line: ${hdlError.range.line}, info: ${hdlError.message}`, {
level: ReportType.Run
});
const syntaxInfo = hdlError.message.replace(/\\r\\n/g, '\n'); const syntaxInfo = hdlError.message.replace(/\\r\\n/g, '\n');
const range = this.makeCorrectRange(document, hdlError.range); const range = this.makeCorrectRange(document, hdlError.range);
const diag = new vscode.Diagnostic(range, syntaxInfo, hdlError.severity); const diag = new vscode.Diagnostic(range, syntaxInfo, hdlError.severity);
@ -99,7 +101,9 @@ class DefaultVhdlLinter implements BaseLinter {
const diagnostics: vscode.Diagnostic[] = []; const diagnostics: vscode.Diagnostic[] = [];
if (all.error && all.error.length > 0) { if (all.error && all.error.length > 0) {
for (const hdlError of all.error) { for (const hdlError of all.error) {
LspOutput.report(`<default linter> line: ${hdlError.range.line}, info: ${hdlError.message}`, ReportType.Run); LspOutput.report(`<default linter> line: ${hdlError.range.line}, info: ${hdlError.message}`, {
level: ReportType.Run
});
const range = this.makeCorrectRange(document, hdlError.range); const range = this.makeCorrectRange(document, hdlError.range);
const diag = new vscode.Diagnostic(range, hdlError.message, hdlError.severity); const diag = new vscode.Diagnostic(range, hdlError.message, hdlError.severity);

View File

@ -221,14 +221,13 @@ class ToolTreeProvider extends BaseCommandTreeProvider {
vscode.window.showWarningMessage(t('warn.command.clean.prjPath-is-workspace')); vscode.window.showWarningMessage(t('warn.command.clean.prjPath-is-workspace'));
} }
const ignores = hdlIgnore.getIgnoreFiles(); const strFiles = hdlFile.pickFileRecursive(workspacePath, p => p.endsWith('.str'));
const strFiles = hdlFile.pickFileRecursive(workspacePath, ignores, p => p.endsWith('.str'));
for (const path of strFiles) { for (const path of strFiles) {
hdlFile.removeFile(path); hdlFile.removeFile(path);
MainOutput.report("remove file " + path); MainOutput.report("remove file " + path);
} }
const logFiles = hdlFile.pickFileRecursive(workspacePath, ignores, p => p.endsWith('.log')); const logFiles = hdlFile.pickFileRecursive(workspacePath, p => p.endsWith('.log'));
for (const path of logFiles) { for (const path of logFiles) {
hdlFile.readFile(path); hdlFile.readFile(path);
} }
@ -265,14 +264,13 @@ export async function clean() {
vscode.window.showWarningMessage(t('warn.command.clean.prjPath-is-workspace')); vscode.window.showWarningMessage(t('warn.command.clean.prjPath-is-workspace'));
} }
const ignores = hdlIgnore.getIgnoreFiles(); const strFiles = hdlFile.pickFileRecursive(workspacePath, p => p.endsWith('.str'));
const strFiles = hdlFile.pickFileRecursive(workspacePath, ignores, p => p.endsWith('.str'));
for (const path of strFiles) { for (const path of strFiles) {
hdlFile.removeFile(path); hdlFile.removeFile(path);
MainOutput.report("remove file " + path); MainOutput.report("remove file " + path);
} }
const logFiles = hdlFile.pickFileRecursive(workspacePath, ignores, p => p.endsWith('.log')); const logFiles = hdlFile.pickFileRecursive(workspacePath, p => p.endsWith('.log'));
for (const path of logFiles) { for (const path of logFiles) {
hdlFile.readFile(path); hdlFile.readFile(path);
} }

View File

@ -189,6 +189,9 @@ class ModuleTreeProvider implements vscode.TreeDataProvider<ModuleDataItem> {
parent: element, parent: element,
})); }));
// 根据字母序列进行排序
topModuleItemList.sort((a, b) => a.name.localeCompare(b.name));
if (topModuleItemList.length > 0) { if (topModuleItemList.length > 0) {
const type = moduleType as keyof FirstTop; const type = moduleType as keyof FirstTop;
@ -241,7 +244,10 @@ class ModuleTreeProvider implements vscode.TreeDataProvider<ModuleDataItem> {
const targetModule = hdlParam.getHdlModule(element.path, element.name); const targetModule = hdlParam.getHdlModule(element.path, element.name);
if (targetModule) { if (targetModule) {
for (const instance of targetModule.getAllInstances()) { const allInstances = targetModule.getAllInstances();
// 根据出现次序进行排序
allInstances.sort((a, b) => a.range.start.line - b.range.start.line);
for (const instance of allInstances) {
// 所有的例化模块都定向到它的定义文件上 // 所有的例化模块都定向到它的定义文件上
const item: ModuleDataItem = { const item: ModuleDataItem = {
icon: 'file', icon: 'file',
@ -267,7 +273,7 @@ class ModuleTreeProvider implements vscode.TreeDataProvider<ModuleDataItem> {
level: ReportType.Error level: ReportType.Error
}); });
} }
return moduleDataItemList; return moduleDataItemList;
} }

View File

@ -2,6 +2,7 @@ import * as assert from 'assert';
import * as fs from 'fs'; import * as fs from 'fs';
import { Arch, PrjInfo, RawPrjInfo, resolve } from './prjInfo'; import { Arch, PrjInfo, RawPrjInfo, resolve } from './prjInfo';
import { hdlPath } from '../hdlFs';
type AbsPath = string; type AbsPath = string;
type RelPath = string; type RelPath = string;
@ -78,6 +79,14 @@ class OpeParam {
return this._propertyJsonPath; return this._propertyJsonPath;
} }
/**
* .dideignore
*/
public get dideignorePath(): AbsPath {
const workspace = this._workspacePath;
return hdlPath.join(workspace, '.dideignore');
}
/** /**
* path of property-schema.json * path of property-schema.json
*/ */

View File

@ -7,13 +7,14 @@ import { verilogExts, vhdlExts, systemVerilogExts, hdlExts } from '../global/lan
import * as hdlPath from './path'; import * as hdlPath from './path';
import { HdlFileProjectType } from '../hdlParser/common'; import { HdlFileProjectType } from '../hdlParser/common';
import { opeParam } from '../global'; import { opeParam } from '../global';
import { hdlIgnore } from '../manager/ignore';
/** /**
* judge if the path represent a file * judge if the path represent a file
* @param path * @param path
* @returns * @returns
*/ */
function isFile(path: AbsPath): boolean { export function isFile(path: AbsPath): boolean {
if (!fs.existsSync(path)) { if (!fs.existsSync(path)) {
return false; return false;
} }
@ -29,7 +30,7 @@ function isFile(path: AbsPath): boolean {
* @param path * @param path
* @returns * @returns
*/ */
function isDir(path: AbsPath): boolean { export function isDir(path: AbsPath): boolean {
if (!fs.existsSync(path)) { if (!fs.existsSync(path)) {
return false; return false;
} }
@ -41,7 +42,7 @@ function isDir(path: AbsPath): boolean {
return false; return false;
} }
function isVerilogFile(path: AbsPath): boolean { export function isVerilogFile(path: AbsPath): boolean {
if (!isFile(path)) { if (!isFile(path)) {
return false; return false;
} }
@ -49,7 +50,7 @@ function isVerilogFile(path: AbsPath): boolean {
return verilogExts.includes(ext); return verilogExts.includes(ext);
} }
function isVhdlFile(path: AbsPath): boolean { export function isVhdlFile(path: AbsPath): boolean {
if (!isFile(path)) { if (!isFile(path)) {
return false; return false;
} }
@ -57,7 +58,7 @@ function isVhdlFile(path: AbsPath): boolean {
return vhdlExts.includes(ext); return vhdlExts.includes(ext);
} }
function isSystemVerilogFile(path: AbsPath): boolean { export function isSystemVerilogFile(path: AbsPath): boolean {
if (!isFile(path)) { if (!isFile(path)) {
return false; return false;
} }
@ -65,7 +66,7 @@ function isSystemVerilogFile(path: AbsPath): boolean {
return systemVerilogExts.includes(ext); return systemVerilogExts.includes(ext);
} }
function isHDLFile(path: AbsPath): boolean { export function isHDLFile(path: AbsPath): boolean {
if (!isFile(path)) { if (!isFile(path)) {
return false; return false;
} }
@ -73,34 +74,47 @@ function isHDLFile(path: AbsPath): boolean {
return hdlExts.includes(ext); return hdlExts.includes(ext);
} }
/**
function getHDLFiles(path: AbsPath | AbsPath[] | Set<AbsPath>, ignores?: AbsPath[]): AbsPath[] { * @description path hdl
const allFiles = pickFileRecursive(path, ignores, * @param path
filePath => isHDLFile(filePath)); * @returns
*/
export function getHDLFiles(path: AbsPath | AbsPath[] | Set<AbsPath>): AbsPath[] {
const allFiles = pickFileRecursive(path, filePath => {
// 判断是否在 ignore 里面
if (hdlIgnore.isignore(filePath)) {
return false;
}
// 判断是否为 hdl 文件
return isHDLFile(filePath);
});
const pathSet = new Set<string>(allFiles); const pathSet = new Set<string>(allFiles);
return [...pathSet]; return [...pathSet];
} }
/**
function pickFileRecursive(path: AbsPath | AbsPath[] | Set<AbsPath>, ignores?: AbsPath[], condition?: (filePath: string) => boolean | undefined | void): AbsPath[] { * @description path
* @param path
* @param condition true
* @returns
*/
export function pickFileRecursive(
path: AbsPath | AbsPath[] | Set<AbsPath>,
condition?: (filePath: string) => boolean | undefined | void
): AbsPath[] {
if ((path instanceof Array) || if ((path instanceof Array) ||
(path instanceof Set)) { (path instanceof Set)) {
const hdlFiles: AbsPath[] = []; const hdlFiles: AbsPath[] = [];
path.forEach(p => hdlFiles.push(...pickFileRecursive(p, ignores, condition))); path.forEach(p => hdlFiles.push(...pickFileRecursive(p, condition)));
return hdlFiles; return hdlFiles;
} }
if (isDir(path)) { if (isDir(path)) {
// return if ignore have path
if (ignores?.includes(path)) {
return [];
}
const hdlFiles = []; const hdlFiles = [];
for (const file of fs.readdirSync(path)) { for (const file of fs.readdirSync(path)) {
const filePath = hdlPath.join(path, file); const filePath = hdlPath.join(path, file);
if (isDir(filePath)) { if (isDir(filePath)) {
const subHdlFiles = pickFileRecursive(filePath, ignores, condition); const subHdlFiles = pickFileRecursive(filePath, condition);
if (subHdlFiles.length > 0) { if (subHdlFiles.length > 0) {
hdlFiles.push(...subHdlFiles); hdlFiles.push(...subHdlFiles);
} }
@ -122,7 +136,7 @@ function pickFileRecursive(path: AbsPath | AbsPath[] | Set<AbsPath>, ignores?: A
* @param path * @param path
* @returns * @returns
*/ */
function getLanguageId(path: AbsPath | RelPath): HdlLangID { export function getLanguageId(path: AbsPath | RelPath): HdlLangID {
if (!isFile(path)) { if (!isFile(path)) {
return HdlLangID.Unknown; return HdlLangID.Unknown;
} }
@ -139,7 +153,7 @@ function getLanguageId(path: AbsPath | RelPath): HdlLangID {
} }
function readFile(path: AbsPath): string | undefined { export function readFile(path: AbsPath): string | undefined {
try { try {
const content = fs.readFileSync(path, 'utf-8'); const content = fs.readFileSync(path, 'utf-8');
return content; return content;
@ -149,7 +163,7 @@ function readFile(path: AbsPath): string | undefined {
} }
} }
function writeFile(path: AbsPath, content: string): boolean { export function writeFile(path: AbsPath, content: string): boolean {
try { try {
const parent = fspath.dirname(path); const parent = fspath.dirname(path);
fs.mkdirSync(parent, {recursive: true}); fs.mkdirSync(parent, {recursive: true});
@ -161,7 +175,7 @@ function writeFile(path: AbsPath, content: string): boolean {
} }
} }
function readJSON(path: AbsPath): object { export function readJSON(path: AbsPath): object {
try { try {
const context = fs.readFileSync(path, 'utf-8'); const context = fs.readFileSync(path, 'utf-8');
return JSON.parse(context); return JSON.parse(context);
@ -171,7 +185,7 @@ function readJSON(path: AbsPath): object {
return {}; return {};
} }
function writeJSON(path: AbsPath, obj: object): boolean { export function writeJSON(path: AbsPath, obj: object): boolean {
try { try {
const jsonString = JSON.stringify(obj, null, '\t'); const jsonString = JSON.stringify(obj, null, '\t');
return writeFile(path, jsonString); return writeFile(path, jsonString);
@ -181,7 +195,7 @@ function writeJSON(path: AbsPath, obj: object): boolean {
return false; return false;
} }
function removeFile(path: AbsPath): boolean { export function removeFile(path: AbsPath): boolean {
if (!isFile(path)) { if (!isFile(path)) {
return false; return false;
} }
@ -195,7 +209,7 @@ function removeFile(path: AbsPath): boolean {
return false; return false;
} }
function moveFile(src: AbsPath, dest: AbsPath, cover: boolean = true): boolean { export function moveFile(src: AbsPath, dest: AbsPath, cover: boolean = true): boolean {
if (src === dest) { if (src === dest) {
return false; return false;
} }
@ -218,7 +232,7 @@ function moveFile(src: AbsPath, dest: AbsPath, cover: boolean = true): boolean {
return false; return false;
} }
function copyFile(src: AbsPath, dest: AbsPath, cover: boolean = true): boolean { export function copyFile(src: AbsPath, dest: AbsPath, cover: boolean = true): boolean {
if (src === dest) { if (src === dest) {
return false; return false;
} }
@ -248,7 +262,7 @@ function copyFile(src: AbsPath, dest: AbsPath, cover: boolean = true): boolean {
* remove folder or file by path * remove folder or file by path
* @param path * @param path
*/ */
function rmSync(path: AbsPath): void { export function rmSync(path: AbsPath): void {
if (fs.existsSync(path)) { if (fs.existsSync(path)) {
if (fs.statSync(path).isDirectory()) { if (fs.statSync(path).isDirectory()) {
const files = fs.readdirSync(path); const files = fs.readdirSync(path);
@ -273,7 +287,7 @@ function rmSync(path: AbsPath): void {
* @param attr attribution or attributions, split by '.' * @param attr attribution or attributions, split by '.'
* @returns * @returns
*/ */
function isHasAttr(obj: any, attr: string): boolean{ export function isHasAttr(obj: any, attr: string): boolean{
if (!obj) { if (!obj) {
return false; return false;
} }
@ -297,7 +311,7 @@ function isHasAttr(obj: any, attr: string): boolean{
} }
function isHasValue(obj: any, attr: string, value: any): boolean{ export function isHasValue(obj: any, attr: string, value: any): boolean{
if (!obj) { if (!obj) {
return false; return false;
} }
@ -323,7 +337,7 @@ function isHasValue(obj: any, attr: string, value: any): boolean{
return true; return true;
} }
function* walk(path: AbsPath | RelPath, condition?: (filePath: AbsPath) => boolean): Generator<AbsPath> { export function* walk(path: AbsPath | RelPath, condition?: (filePath: AbsPath) => boolean): Generator<AbsPath> {
if (isFile(path)) { if (isFile(path)) {
if (!condition || condition(path)) { if (!condition || condition(path)) {
yield path; yield path;
@ -344,25 +358,40 @@ function* walk(path: AbsPath | RelPath, condition?: (filePath: AbsPath) => boole
} }
} }
export { interface DiffResult {
isFile, /**
isDir, * @description
isVerilogFile, */
isVhdlFile, addFiles: AbsPath[],
isSystemVerilogFile, /**
isHDLFile, * @description
getHDLFiles, */
getLanguageId, delFiles: AbsPath[]
readFile, }
writeFile,
readJSON, /**
writeJSON, * @description
rmSync, * @param newFiles
pickFileRecursive, * @param oldFiles
isHasAttr, * @returns
isHasValue, */
copyFile, export function diffFiles(newFiles: AbsPath[], oldFiles: AbsPath[]): DiffResult {
removeFile, const uncheckHdlFileSet = new Set<AbsPath>(oldFiles);
moveFile, const addFiles: AbsPath[] = [];
walk const delFiles: AbsPath[] = [];
};
for (const path of newFiles) {
if (!uncheckHdlFileSet.has(path)) {
addFiles.push(path);
} else {
uncheckHdlFileSet.delete(path);
}
}
for (const path of uncheckHdlFileSet) {
delFiles.push(path);
}
return {
addFiles, delFiles
};
}

View File

@ -102,6 +102,13 @@ function toEscapePath(path: AbsPath): AbsPath {
} }
} }
function toPureRelativePath(path: RelPath): RelPath {
if (path.startsWith('./') || path.startsWith('.\\')) {
return path.slice(2);
}
return path;
}
export { export {
toSlash, toSlash,
rel2abs, rel2abs,
@ -112,5 +119,6 @@ export {
extname, extname,
basename, basename,
exist, exist,
toEscapePath toEscapePath,
toPureRelativePath
}; };

View File

@ -483,6 +483,15 @@ class HdlParam {
moduleFile.deleteHdlModule(moduleName); moduleFile.deleteHdlModule(moduleName);
} }
} }
public async updateByMonitor(addFiles: AbsPath[], delFiles: AbsPath[]) {
for (const path of addFiles) {
await this.addHdlFile(path);
}
for (const path of delFiles) {
this.deleteHdlFile(path);
}
}
}; };
const hdlParam = new HdlParam(); const hdlParam = new HdlParam();

View File

@ -12,7 +12,8 @@ import { hdlFile, hdlPath } from '../../hdlFs';
import { moduleTreeProvider, ModuleDataItem } from '../../function/treeView/tree'; import { moduleTreeProvider, ModuleDataItem } from '../../function/treeView/tree';
import { HdlFileProjectType } from '../../hdlParser/common'; import { HdlFileProjectType } from '../../hdlParser/common';
import { PropertySchema } from '../../global/propertySchema'; import { PropertySchema } from '../../global/propertySchema';
import { HardwareOutput, ReportType } from '../../global/outputChannel'; import { HardwareOutput, MainOutput, ReportType } from '../../global/outputChannel';
import { AbsPath } from '../../global';
import { t } from '../../i18n'; import { t } from '../../i18n';
class PlManage extends BaseManage { class PlManage extends BaseManage {
@ -118,7 +119,36 @@ class PlManage extends BaseManage {
moduleTreeProvider.refreshSim(); moduleTreeProvider.refreshSim();
} }
} }
/**
* @description
* @param addFiles
* @param delFiles
*/
public async updateByMonitor(addFiles: AbsPath[], delFiles: AbsPath[]) {
// 目前只支持 Xilinx
const addfileActionTag = '(add files) ';
const delfileActionTag = '(del files) ';
if (addFiles.length > 0) {
const reportMsg = ['', ...addFiles].join('\n\t');
MainOutput.report(addfileActionTag + t('info.pl.xilinx.update-addfiles') + reportMsg, {
level: ReportType.Run
});
await this.addFiles(addFiles);
} else {
MainOutput.report(addfileActionTag + t('info.pl.xilinx.no-need-add-files'));
}
if (delFiles.length > 0) {
const reportMsg = ['', ...delFiles].join('\n\t');
MainOutput.report(delfileActionTag + t('info.pl.xilinx.update-delfiles') + reportMsg, {
level: ReportType.Run
});
await this.delFiles(delFiles);
} else {
MainOutput.report(delfileActionTag + t('info.pl.xilinx.no-need-del-files'));
}
}
async addFiles(files: string[]) { async addFiles(files: string[]) {
this.context.ope.addFiles(files, this.context); this.context.ope.addFiles(files, this.context);

View File

@ -146,7 +146,7 @@ class XilinxOperation {
let prjFilePath = this.prjPath as AbsPath; let prjFilePath = this.prjPath as AbsPath;
// 找到所有的 xilinx 工程文件 // 找到所有的 xilinx 工程文件
const prjFiles = hdlFile.pickFileRecursive(prjFilePath, [], const prjFiles = hdlFile.pickFileRecursive(prjFilePath,
filePath => filePath.endsWith('.xpr') filePath => filePath.endsWith('.xpr')
); );
@ -349,7 +349,7 @@ class XilinxOperation {
hdlPath.join(this.prjInfo.path, this.prjInfo.name + '.src', 'sources_1', 'bd') hdlPath.join(this.prjInfo.path, this.prjInfo.name + '.src', 'sources_1', 'bd')
]; ];
hdlFile.pickFileRecursive(bdPaths, [], (filePath) => { hdlFile.pickFileRecursive(bdPaths, filePath => {
if (filePath.endsWith('.bd')) { if (filePath.endsWith('.bd')) {
scripts.push(`add_files ${filePath} -quiet`); scripts.push(`add_files ${filePath} -quiet`);
scripts.push(`add_files ${fspath.dirname(filePath)}/hdl -quiet`); scripts.push(`add_files ${fspath.dirname(filePath)}/hdl -quiet`);
@ -365,7 +365,7 @@ class XilinxOperation {
} }
const mrefPath = hdlPath.join(this.HWPath, 'bd', 'mref'); const mrefPath = hdlPath.join(this.HWPath, 'bd', 'mref');
hdlFile.pickFileRecursive(mrefPath, [], filePath => { hdlFile.pickFileRecursive(mrefPath, filePath => {
if (filePath.endsWith('.tcl')) { if (filePath.endsWith('.tcl')) {
scripts.push(`source ${filePath}`); scripts.push(`source ${filePath}`);
} }
@ -377,7 +377,7 @@ class XilinxOperation {
hdlPath.join(this.prjInfo.path, this.prjInfo.name + '.src', 'sources_1', 'ip') hdlPath.join(this.prjInfo.path, this.prjInfo.name + '.src', 'sources_1', 'ip')
]; ];
hdlFile.pickFileRecursive(ipPaths, [], filePath => { hdlFile.pickFileRecursive(ipPaths, filePath => {
if (filePath.endsWith('.xci')) { if (filePath.endsWith('.xci')) {
scripts.push(`add_files ${filePath} -quiet`); scripts.push(`add_files ${filePath} -quiet`);
} }
@ -925,7 +925,7 @@ const tools = {
}, },
async getfsblPath(outsidePath: AbsPath, insidePath: AbsPath): Promise<string> { async getfsblPath(outsidePath: AbsPath, insidePath: AbsPath): Promise<string> {
const paths: AbsPath[] = hdlFile.pickFileRecursive(outsidePath, [], const paths: AbsPath[] = hdlFile.pickFileRecursive(outsidePath,
filePath => filePath.endsWith('fsbl.elf')); filePath => filePath.endsWith('fsbl.elf'));
if (paths.length) { if (paths.length) {
@ -944,7 +944,7 @@ const tools = {
}, },
async getBitPath(bitPath: AbsPath): Promise<string> { async getBitPath(bitPath: AbsPath): Promise<string> {
let bitList = hdlFile.pickFileRecursive(bitPath, [], let bitList = hdlFile.pickFileRecursive(bitPath,
filePath => filePath.endsWith('.bit')); filePath => filePath.endsWith('.bit'));
if (bitList.length === 0) { if (bitList.length === 0) {
@ -999,7 +999,7 @@ const tools = {
}, },
pickElfFile(path: AbsPath): AbsPath[] { pickElfFile(path: AbsPath): AbsPath[] {
return hdlFile.pickFileRecursive(path, [], return hdlFile.pickFileRecursive(path,
filePath => filePath.endsWith('.elf') && !filePath.endsWith('fsbl.elf')); filePath => filePath.endsWith('.elf') && !filePath.endsWith('fsbl.elf'));
} }
}; };

View File

@ -43,7 +43,7 @@ class XilinxOperation {
} }
launch(config: PSConfig) { launch(config: PSConfig) {
const hdfs = hdlFile.pickFileRecursive(this.config.dat, [], const hdfs = hdlFile.pickFileRecursive(this.config.dat,
p => p.endsWith('.hdf')); p => p.endsWith('.hdf'));
if (hdfs.length) { if (hdfs.length) {

View File

@ -1,18 +1,67 @@
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { AbsPath } from '../global'; import { AbsPath, opeParam } from '../global';
import { hdlPath } from '../hdlFs';
import * as fs from 'fs';
import { minimatch } from 'minimatch';
class HdlIgnore { class HdlIgnore {
// 用于进行 glob 匹配的模式
public patterns: string[]
constructor() { constructor() {
this.patterns = [];
} }
public getIgnoreFiles(): AbsPath[] { /**
return []; * @description ignore
*/
public isignore(path: AbsPath): boolean {
const workspace = opeParam.workspacePath;
// 转换成相对于 ws 的相对路径,形如 ./src/test.py
let relativePath = hdlPath.toPureRelativePath(hdlPath.relative(workspace, path));
console.log('current path:', relativePath);
for (const pattern of this.patterns.map(p => hdlPath.toPureRelativePath(p))) {
const matched = minimatch(relativePath, pattern);
if (matched) {
return true;
}
}
return false;
}
public updatePatterns() {
// ignore 文件一般不会很大,直接全量解析即可
const ignorePath = opeParam.dideignorePath;
if (fs.existsSync(ignorePath)) {
const validGlobStrings = new Set<string>();
const ignoreContent = fs.readFileSync(ignorePath, { encoding: 'utf-8' });
for (const line of ignoreContent.split('\n')) {
const lineText = line.trim();
// 如果是空行或者 # 注释,则跳过
if (lineText.length === 0 || lineText.startsWith('#')) {
continue;
}
const commentTagIndex = lineText.indexOf('#');
if (commentTagIndex > -1) {
// 存在注释, # 往后都是注释
validGlobStrings.add(lineText.slice(0, commentTagIndex));
} else {
// index 为 -1 说明本行没有注释,直接加入即可
validGlobStrings.add(lineText);
}
}
this.patterns = [...validGlobStrings];
} else {
// .dideignore 不存在直接赋值为空
this.patterns = [];
}
} }
} }
const hdlIgnore = new HdlIgnore(); const hdlIgnore = new HdlIgnore();
export { export {

View File

@ -144,8 +144,7 @@ class LibManage {
libPathSet.checkAdd(path); libPathSet.checkAdd(path);
} }
const ignores = hdlIgnore.getIgnoreFiles(); const libPathList = hdlFile.getHDLFiles(libPathSet.files);
const libPathList = hdlFile.getHDLFiles(libPathSet.files, ignores);
return libPathList; return libPathList;
} }
@ -169,8 +168,7 @@ class LibManage {
} }
public deleteLocalLib() { public deleteLocalLib() {
const ignores = hdlIgnore.getIgnoreFiles(); const hdlFileList = hdlFile.getHDLFiles([this.localLibPath]);
const hdlFileList = hdlFile.getHDLFiles([this.localLibPath], ignores);
for (const path of hdlFileList) { for (const path of hdlFileList) {
hdlParam.deleteHdlFile(path); hdlParam.deleteHdlFile(path);
} }

View File

@ -12,12 +12,12 @@ import { hdlParam } from '../hdlParser';
import { PlManage } from './PL'; import { PlManage } from './PL';
import { PsManage } from './PS'; import { PsManage } from './PS';
import { hdlIgnore } from './ignore'; import { hdlIgnore } from './ignore';
import { ppyAction } from '../monitor/event';
import { hdlMonitor } from '../monitor'; import { hdlMonitor } from '../monitor';
import { NotificationType } from 'vscode-jsonrpc'; import { NotificationType } from 'vscode-jsonrpc';
import { refreshArchTree } from '../function/treeView'; import { refreshArchTree } from '../function/treeView';
import { Fast } from '../hdlParser/common'; import { Fast } from '../hdlParser/common';
import { t } from '../i18n'; import { t } from '../i18n';
import { PpyAction } from '../monitor/propery';
interface RefreshPrjConfig { interface RefreshPrjConfig {
mkdir: boolean mkdir: boolean
@ -36,8 +36,9 @@ class PrjManage {
const template = hdlFile.readJSON(opeParam.propertyInitPath) as RawPrjInfo; const template = hdlFile.readJSON(opeParam.propertyInitPath) as RawPrjInfo;
hdlFile.writeJSON(opeParam.propertyJsonPath, template); hdlFile.writeJSON(opeParam.propertyJsonPath, template);
// TODO : this is a bug, that monitor cannot sense the add event of ppy // 当创建 property.json 时monitor 似乎无法获取到 ppy 的 add 事件
// so we need to do <add event> manually here // 所以此处需要手动调用
const ppyAction = new PpyAction();
await ppyAction.add(opeParam.propertyJsonPath, hdlMonitor); await ppyAction.add(opeParam.propertyJsonPath, hdlMonitor);
} }
@ -130,12 +131,8 @@ class PrjManage {
level: ReportType.Run level: ReportType.Run
}); });
// TODO : make something like .gitignore // 根据搜索路径获取所有 HDL 文件(出现在 .dideignore 中的文件不会被搜索到)
const ignores = hdlIgnore.getIgnoreFiles(); const hdlFiles = hdlFile.getHDLFiles(searchPathSet.files);
// do search
const searchPaths = searchPathSet.files;
const hdlFiles = hdlFile.getHDLFiles(searchPaths, ignores);
return hdlFiles; return hdlFiles;
} }
@ -184,6 +181,8 @@ class PrjManage {
console.time('launch'); console.time('launch');
} }
// 初始化 ignore
hdlIgnore.updatePatterns();
// 解析 hdl 文件,构建 hdlParam // 解析 hdl 文件,构建 hdlParam
const hdlFiles = await this.getPrjHardwareFiles(); const hdlFiles = await this.getPrjHardwareFiles();
@ -191,10 +190,7 @@ class PrjManage {
// 根据 toolchain 解析合法的 IP构建 hdlParam // 根据 toolchain 解析合法的 IP构建 hdlParam
const IPsPath = await this.getPrjIPs(); const IPsPath = await this.getPrjIPs();
await hdlParam.initializeIPsPath(IPsPath, progress); await hdlParam.initializeIPsPath(IPsPath, progress);
// TODO: 解析原语并构建,向后端索要原语缓存
// 构建 instance 解析 // 构建 instance 解析
await hdlParam.makeAllInstance(); await hdlParam.makeAllInstance();

0
src/monitor/base.ts Normal file
View File

View File

@ -1,27 +1,14 @@
/* eslint-disable @typescript-eslint/naming-convention */
import assert = require('assert');
import * as chokidar from 'chokidar'; import * as chokidar from 'chokidar';
import * as vscode from 'vscode';
import * as fs from 'fs';
import { refreshArchTree } from '../function/treeView';
import { AbsPath, MainOutput, opeParam, PrjInfoDefaults, RelPath, ReportType } from '../global'; import { AbsPath, MainOutput, opeParam, PrjInfoDefaults, RelPath, ReportType } from '../global';
import { isSameSet } from '../global/util';
import { hdlFile, hdlPath } from '../hdlFs';
import { hdlParam, HdlSymbol } from '../hdlParser';
import { prjManage } from '../manager';
import { libManage } from '../manager/lib';
import type { HdlMonitor } from './index'; import type { HdlMonitor } from './index';
import { HdlLangID, ToolChainType } from '../global/enum';
import { vlogLinterManager, vhdlLinterManager, svlogLinterManager } from '../function/lsp/linter';
import { t } from '../i18n';
enum Event { export enum Event {
Add = 'add', // emit when add file Add = 'add', // emit when add file
AddDir = 'addDir', // emit when add folder AddDir = 'addDir', // emit when add folder
Unlink = 'unlink', // emit when delete file Unlink = 'unlink', // emit when delete file
UnlinkDir = 'unlinkDir', // emit when delete folder UnlinkDir = 'unlinkDir', // emit when delete folder
Change = 'change', // emit when file changed Change = 'change', // emit when file changed
Move = 'move',
All = 'all', // all the change above All = 'all', // all the change above
Ready = 'ready', Ready = 'ready',
Raw = 'raw', Raw = 'raw',
@ -29,7 +16,7 @@ enum Event {
}; };
abstract class BaseAction { export abstract class BaseAction {
public listenChange(m: HdlMonitor) { public listenChange(m: HdlMonitor) {
const fSWatcher = this.selectFSWatcher(m); const fSWatcher = this.selectFSWatcher(m);
if (!fSWatcher) { if (!fSWatcher) {
@ -62,302 +49,9 @@ abstract class BaseAction {
} }
fSWatcher.on(Event.Unlink, path => this.unlink(path, m)); fSWatcher.on(Event.Unlink, path => this.unlink(path, m));
} }
abstract selectFSWatcher(m: HdlMonitor): chokidar.FSWatcher | undefined; abstract selectFSWatcher(m: HdlMonitor): chokidar.FSWatcher | undefined;
abstract change(path: AbsPath, m: HdlMonitor): Promise<void>; abstract change(path: AbsPath, m: HdlMonitor): Promise<void>;
abstract add(path: AbsPath, m: HdlMonitor): Promise<void>; abstract add(path: AbsPath, m: HdlMonitor): Promise<void>;
abstract unlink(path: AbsPath, m: HdlMonitor): Promise<void>; abstract unlink(path: AbsPath, m: HdlMonitor): Promise<void>;
} }
class HdlAction extends BaseAction {
selectFSWatcher(m: HdlMonitor): chokidar.FSWatcher | undefined {
return m.hdlMonitor;
}
async add(path: string, m: HdlMonitor): Promise<void> {
console.log('HdlAction add', path);
path = hdlPath.toSlash(path);
this.updateLinter(path);
// check if it has been created
if (hdlParam.hasHdlFile(path)) {
MainOutput.report('<HdlAction Add Event> HdlFile ' + path + ' has been created', {
level: ReportType.Warn
});
return;
}
// create corresponding moduleFile
await hdlParam.addHdlFile(path);
refreshArchTree();
}
async unlink(path: string, m: HdlMonitor): Promise<void> {
console.log('HdlAction unlink', path);
// operation to process unlink of hdl files can be deleted in <processLibFiles>
path = hdlPath.toSlash(path);
hdlParam.deleteHdlFile(path);
refreshArchTree();
const uri = vscode.Uri.file(path);
const langID = hdlFile.getLanguageId(path);
if (langID === HdlLangID.Verilog) {
vlogLinterManager.remove(uri);
} else if (langID === HdlLangID.Vhdl) {
vhdlLinterManager.remove(uri);
} else if (langID === HdlLangID.SystemVerilog) {
svlogLinterManager.remove(uri);
}
}
async unlinkDir(path: string, m: HdlMonitor): Promise<void> {
console.log('HdlAction unlinkDir', path);
}
async addDir(path: string, m: HdlMonitor): Promise<void> {
console.log('HdlAction addDir', path);
}
async change(path: string, m: HdlMonitor): Promise<void> {
console.log('HdlAction change');
path = hdlPath.toSlash(path);
await this.updateHdlParam(path);
await this.updateLinter(path);
refreshArchTree();
}
// 下一个版本丢弃,完全由后端承担这部分功能
async updateLinter(path: string) {
const uri = vscode.Uri.file(path);
const document = await vscode.workspace.openTextDocument(uri);
const langID = hdlFile.getLanguageId(path);
if (langID === HdlLangID.Verilog) {
vlogLinterManager.lint(document);
} else if (langID === HdlLangID.Vhdl) {
vhdlLinterManager.lint(document);
} else if (langID === HdlLangID.SystemVerilog) {
svlogLinterManager.lint(document);
}
}
async updateHdlParam(path: string) {
const moduleFile = hdlParam.getHdlFile(path);
if (!moduleFile) {
return;
}
const fast = await HdlSymbol.fast(path, 'common');
console.log('update fast: ' + path);
if (!fast) {
// vscode.window.showErrorMessage('error happen when parse ' + path + '\nFail to update');
return;
}
// 1. update marco directly
moduleFile.updateMacro(fast.macro);
// 2. update modules one by one
const uncheckedModuleNames = new Set<string>();
for (const name of moduleFile.getAllModuleNames()) {
uncheckedModuleNames.add(name);
}
for (const rawHdlModule of fast.content) {
const moduleName = rawHdlModule.name;
if (uncheckedModuleNames.has(moduleName)) {
// match the same module, check then
const originalModule = moduleFile.getHdlModule(moduleName);
uncheckedModuleNames.delete(moduleName);
originalModule?.update(rawHdlModule);
} else {
// no matched, create it
const newModule = moduleFile.createHdlModule(rawHdlModule);
newModule.makeNameToInstances();
newModule.solveUnhandleInstance();
}
}
// 3. delete module not visited yet
for (const moduleName of uncheckedModuleNames) {
moduleFile.deleteHdlModule(moduleName);
}
}
}
class PpyAction extends BaseAction {
selectFSWatcher(m: HdlMonitor): chokidar.FSWatcher | undefined {
return m.ppyMonitor;
}
async add(path: string, m: HdlMonitor): Promise<void> {
console.log('PpyAction add');
assert.equal(hdlPath.toSlash(path), opeParam.propertyJsonPath);
await this.updateProperty(Event.Add, m);
}
async unlink(path: string, m: HdlMonitor): Promise<void> {
console.log('PpyAction unlink');
assert.equal(hdlPath.toSlash(path), opeParam.propertyJsonPath);
await this.updateProperty(Event.Unlink, m);
}
async change(path: string, m: HdlMonitor): Promise<void> {
console.log('PpyAction change');
assert.equal(hdlPath.toSlash(path), opeParam.propertyJsonPath);
await this.updateProperty(Event.Change, m);
console.log(hdlParam);
}
// get path set from opeParam that used to tell if need to remake HdlMonitor
private getImportantPathSet(): Set<AbsPath | RelPath> {
const pathSet = new Set<AbsPath | RelPath>();
pathSet.add(opeParam.prjInfo.hardwareSimPath);
pathSet.add(opeParam.prjInfo.hardwareSrcPath);
for (const path of opeParam.prjInfo.getLibraryCommonPaths()) {
pathSet.add(path);
}
for (const path of opeParam.prjInfo.getLibraryCustomPaths()) {
pathSet.add(path);
}
return pathSet;
}
public async updateProperty(e: Event, m: HdlMonitor) {
const originalPathSet = this.getImportantPathSet();
const originalHdlFiles = await prjManage.getPrjHardwareFiles();
const originalLibState = opeParam.prjInfo.library.state;
const rawPrjInfo = opeParam.getRawUserPrjInfo();
// when delete, make ws path to be main parse path
if (e === Event.Unlink) {
console.log('unlink ppy, PrjInfoDefaults.arch:', PrjInfoDefaults.arch);
rawPrjInfo.arch = PrjInfoDefaults.arch;
}
opeParam.mergePrjInfo(rawPrjInfo);
await prjManage.refreshPrjFolder();
const currentPathSet = this.getImportantPathSet();
const currentLibState = opeParam.prjInfo.library.state;
if (isSameSet(originalPathSet, currentPathSet)) {
// skip hdl remake
if (originalLibState !== currentLibState) {
const fileChange = await libManage.processLibFiles(opeParam.prjInfo.library);
MainOutput.report(`libManage finish process, add ${fileChange.add.length} files, del ${fileChange.del.length} files`, {
level: ReportType.Info
});
}
} else {
// update hdl monitor
await this.refreshHdlMonitor(m, originalHdlFiles);
}
refreshArchTree();
}
public diffNewOld(newFiles: AbsPath[], oldFiles: AbsPath[]) {
const uncheckHdlFileSet = new Set<AbsPath>(oldFiles);
const addFiles: AbsPath[] = [];
const delFiles: AbsPath[] = [];
for (const path of newFiles) {
if (!uncheckHdlFileSet.has(path)) {
addFiles.push(path);
} else {
uncheckHdlFileSet.delete(path);
}
}
for (const path of uncheckHdlFileSet) {
hdlParam.deleteHdlFile(path);
delFiles.push(path);
}
return {
addFiles, delFiles
};
}
public async refreshHdlMonitor(m: HdlMonitor, originalHdlFiles: AbsPath[]) {
m.remakeHdlMonitor();
const newFiles = await prjManage.getPrjHardwareFiles();
const { addFiles, delFiles } = this.diffNewOld(newFiles, originalHdlFiles);
await vscode.window.withProgress({
location: vscode.ProgressLocation.Notification,
title: t('info.monitor.ppy.impl-change-to-project', opeParam.prjInfo.toolChain)
}, async () => {
await this.updateHdlParam(addFiles, delFiles);
switch (opeParam.prjInfo.toolChain) {
case ToolChainType.Xilinx:
await this.updatePL(addFiles, delFiles);
break;
default:
break;
}
});
}
public async updateHdlParam(addFiles: AbsPath[], delFiles: AbsPath[]) {
for (const path of addFiles) {
await hdlParam.addHdlFile(path);
}
for (const path of delFiles) {
hdlParam.deleteHdlFile(path);
}
}
public async updatePL(addFiles: AbsPath[], delFiles: AbsPath[]) {
// current only support xilinx
if (prjManage.pl) {
const addfileActionTag = '(add files) ';
const delfileActionTag = '(del files) ';
if (addFiles.length > 0) {
const reportMsg = ['', ...addFiles].join('\n\t');
MainOutput.report(addfileActionTag + t('info.pl.xilinx.update-addfiles') + reportMsg, {
level: ReportType.Run
});
await prjManage.pl.addFiles(addFiles);
} else {
MainOutput.report(addfileActionTag + t('info.pl.xilinx.no-need-add-files'));
}
if (delFiles.length > 0) {
const reportMsg = ['', ...delFiles].join('\n\t');
MainOutput.report(delfileActionTag + t('info.pl.xilinx.update-delfiles') + reportMsg, {
level: ReportType.Run
});
await prjManage.pl.delFiles(delFiles);
} else {
MainOutput.report(delfileActionTag + t('info.pl.xilinx.no-need-del-files'));
}
} else {
MainOutput.report('PL is not registered', {
level: ReportType.Warn
});
}
}
}
const hdlAction = new HdlAction();
const ppyAction = new PpyAction();
export {
hdlAction,
ppyAction
};

180
src/monitor/hdl.ts Normal file
View File

@ -0,0 +1,180 @@
import * as chokidar from 'chokidar';
import * as vscode from 'vscode';
import { refreshArchTree } from '../function/treeView';
import { AbsPath, MainOutput, opeParam, ReportType } from '../global';
import { hdlFile, hdlPath } from '../hdlFs';
import { hdlParam, HdlSymbol } from '../hdlParser';
import type { HdlMonitor } from './index';
import { HdlLangID } from '../global/enum';
import { vlogLinterManager, vhdlLinterManager, svlogLinterManager } from '../function/lsp/linter';
import { BaseAction, Event } from './event';
import { hdlIgnore } from '../manager/ignore';
export class HdlAction extends BaseAction {
selectFSWatcher(m: HdlMonitor): chokidar.FSWatcher | undefined {
return m.hdlMonitor;
}
/**
* @description hdl
* @param path
* @param m
* @returns
*/
async add(path: string, m: HdlMonitor): Promise<void> {
console.log('HdlAction add', path);
path = hdlPath.toSlash(path);
// 如果不是 src 或者 sim 下的直接不管
if (!this.isvalid(path)) {
return;
}
this.updateLinter(path);
// check if it has been created
if (hdlParam.hasHdlFile(path)) {
MainOutput.report('<HdlAction Add Event> HdlFile ' + path + ' has been created', {
level: ReportType.Warn
});
return;
}
// create corresponding moduleFile
await hdlParam.addHdlFile(path);
refreshArchTree();
}
/**
* @description hdl
* @param path
* @param m
*/
async unlink(path: string, m: HdlMonitor): Promise<void> {
console.log('HdlAction unlink', path);
// operation to process unlink of hdl files can be deleted in <processLibFiles>
path = hdlPath.toSlash(path);
// 如果不是 src 或者 sim 下的直接不管
if (!this.isvalid(path)) {
return;
}
hdlParam.deleteHdlFile(path);
refreshArchTree();
const uri = vscode.Uri.file(path);
const langID = hdlFile.getLanguageId(path);
if (langID === HdlLangID.Verilog) {
vlogLinterManager.remove(uri);
} else if (langID === HdlLangID.Vhdl) {
vhdlLinterManager.remove(uri);
} else if (langID === HdlLangID.SystemVerilog) {
svlogLinterManager.remove(uri);
}
}
/**
* @description unlink
* @param path
* @param m
*/
async unlinkDir(path: string, m: HdlMonitor): Promise<void> {
console.log('HdlAction unlinkDir', path);
}
/**
* @description add
* @param path
* @param m
*/
async addDir(path: string, m: HdlMonitor): Promise<void> {
console.log('HdlAction addDir', path);
}
/**
* @description hdl
* @param path
* @param m
*/
async change(path: string, m: HdlMonitor): Promise<void> {
console.log('HdlAction change');
path = hdlPath.toSlash(path);
// 如果不是 src 或者 sim 下的直接不管
if (!this.isvalid(path)) {
return;
}
// 更新 hdl 文件
const fast = await HdlSymbol.fast(path, 'common');
if (fast) {
hdlParam.updateFast(path, fast);
}
// 更新 linter
await this.updateLinter(path);
refreshArchTree();
}
public listenAddDir(m: HdlMonitor) {
const fSWatcher = this.selectFSWatcher(m);
if (!fSWatcher) {
MainOutput.report("FSWatcher hasn't been made!", {
level: ReportType.Error
});
return;
}
fSWatcher.on(Event.AddDir, path => this.addDir(path, m));
}
public listenUnlinkDir(m: HdlMonitor) {
const fSWatcher = this.selectFSWatcher(m);
if (!fSWatcher) {
MainOutput.report("FSWatcher hasn't been made!", {
level: ReportType.Error
});
return;
}
fSWatcher.on(Event.UnlinkDir, path => this.unlinkDir(path, m));
}
/**
* @description src/sim ignore
* @param path
*/
private isvalid(path: AbsPath): boolean {
const prjInfo = opeParam.prjInfo;
if (path.startsWith(prjInfo.hardwareSrcPath) || path.startsWith(prjInfo.hardwareSimPath)) {
if (!hdlIgnore.isignore(path)) {
return true;
}
}
return false;
}
// 下一个版本丢弃,完全由后端承担这部分功能
async updateLinter(path: string) {
const uri = vscode.Uri.file(path);
const document = await vscode.workspace.openTextDocument(uri);
const langID = hdlFile.getLanguageId(path);
if (langID === HdlLangID.Verilog) {
vlogLinterManager.lint(document);
} else if (langID === HdlLangID.Vhdl) {
vhdlLinterManager.lint(document);
} else if (langID === HdlLangID.SystemVerilog) {
svlogLinterManager.lint(document);
}
}
}

70
src/monitor/ignore.ts Normal file
View File

@ -0,0 +1,70 @@
import * as vscode from 'vscode';
import { FSWatcher } from "chokidar";
import { HdlMonitor } from ".";
import { BaseAction } from "./event";
import { AbsPath, MainOutput, opeParam } from "../global";
import { hdlIgnore } from "../manager/ignore";
import { prjManage } from "../manager";
import { diffFiles } from "../hdlFs/file";
import { t } from '../i18n';
import { hdlParam } from '../hdlParser';
import { ToolChainType } from '../global/enum';
import { refreshArchTree } from '../function/treeView';
export class IgnoreAction extends BaseAction {
selectFSWatcher(m: HdlMonitor): FSWatcher | undefined {
return m.ignoreMonitor;
}
// 用户新建了 .dideignore
async add(path: AbsPath, m: HdlMonitor): Promise<void> {
const oldFiles = await prjManage.getPrjHardwareFiles();
hdlIgnore.updatePatterns();
await this.update(oldFiles);
refreshArchTree();
}
// 用户删除了 .dideignore
async unlink(path: AbsPath, m: HdlMonitor): Promise<void> {
const oldFiles = await prjManage.getPrjHardwareFiles();
hdlIgnore.updatePatterns();
await this.update(oldFiles);
refreshArchTree();
}
// 用户修改了 .dideignore 中的内容
async change(path: AbsPath, m: HdlMonitor): Promise<void> {
const oldFiles = await prjManage.getPrjHardwareFiles();
hdlIgnore.updatePatterns();
await this.update(oldFiles);
refreshArchTree();
}
async update(oldFiles: AbsPath[]) {
const newFiles = await prjManage.getPrjHardwareFiles();
const { addFiles, delFiles } = diffFiles(newFiles, oldFiles);
if (addFiles.length + delFiles.length === 0) {
return;
}
await vscode.window.withProgress({
location: vscode.ProgressLocation.Notification,
title: t('info.monitor.ppy.impl-change-to-project', opeParam.prjInfo.toolChain)
}, async () => {
await hdlParam.updateByMonitor(addFiles, delFiles);
switch (opeParam.prjInfo.toolChain) {
case ToolChainType.Xilinx:
await prjManage.pl?.updateByMonitor(addFiles, delFiles);
break;
default:
break;
}
});
}
}

View File

@ -4,13 +4,16 @@ import { hdlExts } from '../global/lang';
import { PathSet } from '../global/util'; import { PathSet } from '../global/util';
import { hdlPath } from '../hdlFs'; import { hdlPath } from '../hdlFs';
import * as Event from './event';
import { t } from '../i18n'; import { t } from '../i18n';
import { HdlAction } from './hdl';
import { PpyAction } from './propery';
import { IgnoreAction } from './ignore';
class HdlMonitor{ class HdlMonitor{
private monitorConfig: chokidar.WatchOptions; private monitorConfig: chokidar.ChokidarOptions;
public hdlMonitor?: chokidar.FSWatcher; public hdlMonitor?: chokidar.FSWatcher;
public ppyMonitor?: chokidar.FSWatcher; public ppyMonitor?: chokidar.FSWatcher;
public ignoreMonitor?: chokidar.FSWatcher;
constructor() { constructor() {
// public config for monitor // public config for monitor
@ -21,7 +24,7 @@ class HdlMonitor{
}; };
} }
public makeMonitor(paths: string | string[], config?: chokidar.WatchOptions): chokidar.FSWatcher { public makeMonitor(paths: string | string[], config?: chokidar.ChokidarOptions): chokidar.FSWatcher {
if (!config) { if (!config) {
config = this.monitorConfig; config = this.monitorConfig;
} }
@ -40,27 +43,27 @@ class HdlMonitor{
* @description get monitor for HDLParam update * @description get monitor for HDLParam update
*/ */
public getHdlMonitor() { public getHdlMonitor() {
const hdlExtsGlob = `**/*.{${hdlExts.join(',')}}`;
const prjInfo = opeParam.prjInfo; const prjInfo = opeParam.prjInfo;
const monitorPathSet = new PathSet(); const monitorPathSet = new PathSet();
// 在输出中展示当前的监视路径
monitorPathSet.checkAdd(opeParam.workspacePath);
monitorPathSet.checkAdd(prjInfo.hardwareSimPath); monitorPathSet.checkAdd(prjInfo.hardwareSimPath);
monitorPathSet.checkAdd(prjInfo.hardwareSrcPath); monitorPathSet.checkAdd(prjInfo.hardwareSrcPath);
monitorPathSet.checkAdd(prjInfo.libCommonPath); monitorPathSet.checkAdd(prjInfo.libCommonPath);
monitorPathSet.checkAdd(prjInfo.libCustomPath);
const monitorFoldersWithGlob = [];
for (const folder of monitorPathSet.files) {
const globPath = hdlPath.join(folder, hdlExtsGlob);
monitorFoldersWithGlob.push(globPath);
}
const reportString = ['', ...monitorPathSet.files].join('\n\t'); const reportString = ['', ...monitorPathSet.files].join('\n\t');
MainOutput.report(t('info.launch.following-folder-tracked') + reportString, { MainOutput.report(t('info.launch.following-folder-tracked') + reportString, {
level: ReportType.Launch level: ReportType.Launch
}); });
return this.makeMonitor(monitorFoldersWithGlob); // chokidar 4.0.0 开始不支持 glob需要在每一个入口自己判断
return this.makeMonitor([opeParam.workspacePath, prjInfo.libCommonPath]);
}
public getIgnoreMonitor() {
const watcherPath = opeParam.dideignorePath;
return this.makeMonitor(watcherPath);
} }
public close() { public close() {
@ -72,9 +75,11 @@ class HdlMonitor{
// make monitor // make monitor
this.hdlMonitor = this.getHdlMonitor(); this.hdlMonitor = this.getHdlMonitor();
this.ppyMonitor = this.getPpyMonitor(); this.ppyMonitor = this.getPpyMonitor();
this.ignoreMonitor = this.getIgnoreMonitor();
this.registerHdlMonitorListener(); this.registerHdlMonitorListener();
this.registerPpyMonitorListener(); this.registerPpyMonitorListener();
this.registerIgnoreMonitorListener();
} }
public remakeHdlMonitor() { public remakeHdlMonitor() {
@ -93,19 +98,37 @@ class HdlMonitor{
} }
} }
public registerHdlMonitorListener() { public remakeIgnoreMonitor() {
Event.hdlAction.listenAdd(this); if (this.ignoreMonitor) {
Event.hdlAction.listenChange(this); this.ignoreMonitor.close();
Event.hdlAction.listenUnlink(this); this.ignoreMonitor = this.getIgnoreMonitor();
this.registerIgnoreMonitorListener();
}
}
// Event.hdlAction.listenAddDir(this); public registerHdlMonitorListener() {
// Event.hdlAction.listenUnlinkDir(this); // 不需要实现 addDir 和 unlinkDir 事件
// 因为删除文件夹时,下级各个文件会自动触发 add 和 unlink 事件
// 因此monitor 只需要实现对文件的监听即可
const hdlAction = new HdlAction();
hdlAction.listenAdd(this);
hdlAction.listenChange(this);
hdlAction.listenUnlink(this);
} }
public registerPpyMonitorListener() { public registerPpyMonitorListener() {
Event.ppyAction.listenAdd(this); const ppyAction = new PpyAction();
Event.ppyAction.listenChange(this); ppyAction.listenAdd(this);
Event.ppyAction.listenUnlink(this); ppyAction.listenChange(this);
ppyAction.listenUnlink(this);
}
public registerIgnoreMonitorListener() {
const ignoreAction = new IgnoreAction();
ignoreAction.listenAdd(this);
ignoreAction.listenChange(this);
ignoreAction.listenUnlink(this);
} }
}; };

110
src/monitor/propery.ts Normal file
View File

@ -0,0 +1,110 @@
import assert = require('assert');
import * as chokidar from 'chokidar';
import * as vscode from 'vscode';
import { refreshArchTree } from '../function/treeView';
import { AbsPath, MainOutput, opeParam, PrjInfoDefaults, RelPath, ReportType } from '../global';
import { isSameSet } from '../global/util';
import { hdlPath } from '../hdlFs';
import { hdlParam } from '../hdlParser';
import { prjManage } from '../manager';
import { libManage } from '../manager/lib';
import type { HdlMonitor } from './index';
import { ToolChainType } from '../global/enum';
import { t } from '../i18n';
import { BaseAction, Event } from './event';
import { diffFiles } from '../hdlFs/file';
export class PpyAction extends BaseAction {
selectFSWatcher(m: HdlMonitor): chokidar.FSWatcher | undefined {
return m.ppyMonitor;
}
async add(path: string, m: HdlMonitor): Promise<void> {
console.log('PpyAction add');
assert.equal(hdlPath.toSlash(path), opeParam.propertyJsonPath);
await this.updateProperty(Event.Add, m);
}
async unlink(path: string, m: HdlMonitor): Promise<void> {
console.log('PpyAction unlink');
assert.equal(hdlPath.toSlash(path), opeParam.propertyJsonPath);
await this.updateProperty(Event.Unlink, m);
}
async change(path: string, m: HdlMonitor): Promise<void> {
console.log('PpyAction change');
assert.equal(hdlPath.toSlash(path), opeParam.propertyJsonPath);
await this.updateProperty(Event.Change, m);
}
// get path set from opeParam that used to tell if need to remake HdlMonitor
private getImportantPathSet(): Set<AbsPath | RelPath> {
const pathSet = new Set<AbsPath | RelPath>();
pathSet.add(opeParam.prjInfo.hardwareSimPath);
pathSet.add(opeParam.prjInfo.hardwareSrcPath);
for (const path of opeParam.prjInfo.getLibraryCommonPaths()) {
pathSet.add(path);
}
for (const path of opeParam.prjInfo.getLibraryCustomPaths()) {
pathSet.add(path);
}
return pathSet;
}
public async updateProperty(e: Event, m: HdlMonitor) {
const originalPathSet = this.getImportantPathSet();
const originalHdlFiles = await prjManage.getPrjHardwareFiles();
const originalLibState = opeParam.prjInfo.library.state;
const rawPrjInfo = opeParam.getRawUserPrjInfo();
// when delete, make ws path to be main parse path
if (e === Event.Unlink) {
console.log('unlink ppy, PrjInfoDefaults.arch:', PrjInfoDefaults.arch);
rawPrjInfo.arch = PrjInfoDefaults.arch;
}
opeParam.mergePrjInfo(rawPrjInfo);
await prjManage.refreshPrjFolder();
const currentPathSet = this.getImportantPathSet();
const currentLibState = opeParam.prjInfo.library.state;
if (isSameSet(originalPathSet, currentPathSet)) {
// skip hdl remake
if (originalLibState !== currentLibState) {
const fileChange = await libManage.processLibFiles(opeParam.prjInfo.library);
MainOutput.report(`libManage finish process, add ${fileChange.add.length} files, del ${fileChange.del.length} files`, {
level: ReportType.Info
});
}
} else {
// update hdl monitor
await this.refreshHdlMonitor(m, originalHdlFiles);
}
refreshArchTree();
}
public async refreshHdlMonitor(m: HdlMonitor, originalHdlFiles: AbsPath[]) {
// 获取布局更新后的新的文件
const newFiles = await prjManage.getPrjHardwareFiles();
const { addFiles, delFiles } = diffFiles(newFiles, originalHdlFiles);
await vscode.window.withProgress({
location: vscode.ProgressLocation.Notification,
title: t('info.monitor.ppy.impl-change-to-project', opeParam.prjInfo.toolChain)
}, async () => {
await hdlParam.updateByMonitor(addFiles, delFiles);
switch (opeParam.prjInfo.toolChain) {
case ToolChainType.Xilinx:
await prjManage.pl?.updateByMonitor(addFiles, delFiles);
break;
default:
break;
}
});
}
}

11
syntaxes/ignore.json Normal file
View File

@ -0,0 +1,11 @@
{
"name": "dideignore",
"scopeName": "source.dideignore",
"patterns": [
{
"match": "^\\s*#.*$",
"name": "comment.line.number-sign.gitignore"
}
],
"uuid": "12345678-1234-1234-1234-123456789012"
}