dshmarket 1.70.0 → 1.70.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/lib/profile.js +6 -2
- package/package.json +1 -1
- package/src/profile.ts +6 -2
package/lib/profile.js
CHANGED
|
@@ -1491,6 +1491,10 @@ export function setAllowBuilds(profile, packages, explicitDir) {
|
|
|
1491
1491
|
const SEG = '[A-Za-z0-9_-][A-Za-z0-9_.-]*';
|
|
1492
1492
|
const NAME = '[A-Za-z0-9@/_.-]+';
|
|
1493
1493
|
const SHA = '[0-9a-f]{40}';
|
|
1494
|
+
// pnpm's exact monorepo key includes the selected directory; dropping it
|
|
1495
|
+
// makes approve-and-retry write only a bare name that git builds ignore.
|
|
1496
|
+
const DIR = '(?!\\.{1,2}(?:/|$))[A-Za-z0-9_.-]+';
|
|
1497
|
+
const SUBPATH = `path:/${DIR}(?:/${DIR})*`;
|
|
1494
1498
|
// The stable clone-URL key: github's (#68) and, since #637, every other
|
|
1495
1499
|
// host's — pnpm keys a git dependency by the remote it would clone, whoever
|
|
1496
1500
|
// serves it. Optionally pinned to a commit, which is the form pnpm 11.8.0
|
|
@@ -1502,7 +1506,7 @@ export function setAllowBuilds(profile, packages, explicitDir) {
|
|
|
1502
1506
|
// authorizes under `name@git+…/repo` and NOT under `…/repo.git`, so
|
|
1503
1507
|
// requiring the suffix dropped a correctly derived key on its way out, and
|
|
1504
1508
|
// appending it would have written one pnpm never reads.
|
|
1505
|
-
const GIT_KEY_RE = new RegExp(`^${NAME}@git\\+https://[A-Za-z0-9_.-]+(?::\\d{1,5})?/${SEG}(?:/${SEG})*(?:\\.git)?(?:#${SHA})?$`);
|
|
1509
|
+
const GIT_KEY_RE = new RegExp(`^${NAME}@git\\+https://[A-Za-z0-9_.-]+(?::\\d{1,5})?/${SEG}(?:/${SEG})*(?:\\.git)?(?:#${SHA}(?:&${SUBPATH})?|#${SUBPATH})?$`);
|
|
1506
1510
|
// The commit-pinned download a host serves, which is what pnpm below 11.21
|
|
1507
1511
|
// matches instead (#285): codeload for github, the project archive for
|
|
1508
1512
|
// gitlab.com and bitbucket.org (#637). Each branch names its host and its
|
|
@@ -1511,7 +1515,7 @@ export function setAllowBuilds(profile, packages, explicitDir) {
|
|
|
1511
1515
|
+ `codeload\\.github\\.com/${SEG}/${SEG}/tar\\.gz/${SHA}`
|
|
1512
1516
|
+ `|bitbucket\\.org/${SEG}/${SEG}/get/${SHA}\\.tar\\.gz`
|
|
1513
1517
|
+ `|gitlab\\.com/${SEG}(?:/${SEG})+/-/archive/${SHA}/${SEG}-${SHA}\\.tar\\.gz`
|
|
1514
|
-
+
|
|
1518
|
+
+ `)(?:#${SUBPATH})?$`);
|
|
1515
1519
|
for (const pkg of packages) {
|
|
1516
1520
|
if (/^[A-Za-z0-9@/_.-]+$/.test(pkg) || GIT_KEY_RE.test(pkg) || ARCHIVE_KEY_RE.test(pkg))
|
|
1517
1521
|
map[pkg] = 'true';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dshmarket",
|
|
3
3
|
"description": "Visual plugin market inside DeepSeek Harness — browse, search, and one-click install community plugins. · DSH 可视化插件市场:逛一逛,点一下,装好。",
|
|
4
|
-
"version": "1.70.
|
|
4
|
+
"version": "1.70.1",
|
|
5
5
|
"icon": "assets/logo.svg",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/index.js",
|
package/src/profile.ts
CHANGED
|
@@ -1541,6 +1541,10 @@ export function setAllowBuilds(profile: string, packages: string[], explicitDir?
|
|
|
1541
1541
|
const SEG = '[A-Za-z0-9_-][A-Za-z0-9_.-]*'
|
|
1542
1542
|
const NAME = '[A-Za-z0-9@/_.-]+'
|
|
1543
1543
|
const SHA = '[0-9a-f]{40}'
|
|
1544
|
+
// pnpm's exact monorepo key includes the selected directory; dropping it
|
|
1545
|
+
// makes approve-and-retry write only a bare name that git builds ignore.
|
|
1546
|
+
const DIR = '(?!\\.{1,2}(?:/|$))[A-Za-z0-9_.-]+'
|
|
1547
|
+
const SUBPATH = `path:/${DIR}(?:/${DIR})*`
|
|
1544
1548
|
// The stable clone-URL key: github's (#68) and, since #637, every other
|
|
1545
1549
|
// host's — pnpm keys a git dependency by the remote it would clone, whoever
|
|
1546
1550
|
// serves it. Optionally pinned to a commit, which is the form pnpm 11.8.0
|
|
@@ -1553,7 +1557,7 @@ export function setAllowBuilds(profile: string, packages: string[], explicitDir?
|
|
|
1553
1557
|
// requiring the suffix dropped a correctly derived key on its way out, and
|
|
1554
1558
|
// appending it would have written one pnpm never reads.
|
|
1555
1559
|
const GIT_KEY_RE = new RegExp(
|
|
1556
|
-
`^${NAME}@git\\+https://[A-Za-z0-9_.-]+(?::\\d{1,5})?/${SEG}(?:/${SEG})*(?:\\.git)?(?:#${SHA})?$`,
|
|
1560
|
+
`^${NAME}@git\\+https://[A-Za-z0-9_.-]+(?::\\d{1,5})?/${SEG}(?:/${SEG})*(?:\\.git)?(?:#${SHA}(?:&${SUBPATH})?|#${SUBPATH})?$`,
|
|
1557
1561
|
)
|
|
1558
1562
|
// The commit-pinned download a host serves, which is what pnpm below 11.21
|
|
1559
1563
|
// matches instead (#285): codeload for github, the project archive for
|
|
@@ -1564,7 +1568,7 @@ export function setAllowBuilds(profile: string, packages: string[], explicitDir?
|
|
|
1564
1568
|
+ `codeload\\.github\\.com/${SEG}/${SEG}/tar\\.gz/${SHA}`
|
|
1565
1569
|
+ `|bitbucket\\.org/${SEG}/${SEG}/get/${SHA}\\.tar\\.gz`
|
|
1566
1570
|
+ `|gitlab\\.com/${SEG}(?:/${SEG})+/-/archive/${SHA}/${SEG}-${SHA}\\.tar\\.gz`
|
|
1567
|
-
+
|
|
1571
|
+
+ `)(?:#${SUBPATH})?$`,
|
|
1568
1572
|
)
|
|
1569
1573
|
for (const pkg of packages) {
|
|
1570
1574
|
if (/^[A-Za-z0-9@/_.-]+$/.test(pkg) || GIT_KEY_RE.test(pkg) || ARCHIVE_KEY_RE.test(pkg)) map[pkg] = 'true'
|