dsh-enterprise-market 0.3.0 → 0.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-enterprise-market",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "TranESS 企业插件市场:员工把自建插件发布到企业 npm 仓库,市场按企业身份显示上传人姓名,同事可直接下载安装。",
@@ -139,7 +139,7 @@ export async function buildCatalog(input) {
139
139
  item.local === true &&
140
140
  typeof item.localVersion === 'string' &&
141
141
  item.localVersion !== '' &&
142
- !(doc.versions && typeof doc.versions === 'object' && item.localVersion in doc.versions)
142
+ !(Array.isArray(doc.publishedVersions) && doc.publishedVersions.includes(item.localVersion))
143
143
  ) {
144
144
  item.pendingApproval = true
145
145
  item.updateAvailable = false
package/src/host/npm.js CHANGED
@@ -294,6 +294,7 @@ export async function readPackument(input) {
294
294
  if (manifest === undefined) return null
295
295
  return {
296
296
  latest,
297
+ publishedVersions: Object.keys(body?.versions ?? {}),
297
298
  manifest,
298
299
  modified: typeof body?.time?.modified === 'string' ? body.time.modified : undefined,
299
300
  }