acp-ts 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/datamanager.js +8 -1
- package/package.json +2 -2
package/dist/datamanager.js
CHANGED
|
@@ -163,7 +163,14 @@ class CertAndKeyStore {
|
|
|
163
163
|
return [];
|
|
164
164
|
}
|
|
165
165
|
const entries = fs.readdirSync(aidsDir, { withFileTypes: true });
|
|
166
|
-
return entries.filter(e =>
|
|
166
|
+
return entries.filter(e => {
|
|
167
|
+
if (!e.isDirectory())
|
|
168
|
+
return false;
|
|
169
|
+
const aidName = e.name;
|
|
170
|
+
const keyPath = path.join(aidsDir, aidName, 'private', `${aidName}.key`);
|
|
171
|
+
const crtPath = path.join(aidsDir, aidName, 'public', `${aidName}.crt`);
|
|
172
|
+
return fs.existsSync(keyPath) && fs.existsSync(crtPath);
|
|
173
|
+
}).map(e => e.name);
|
|
167
174
|
}
|
|
168
175
|
catch (e) {
|
|
169
176
|
console.error('扫描 AIDs 目录失败:', e);
|
package/package.json
CHANGED