@valbuild/server 0.35.0 → 0.36.0
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.
@@ -1348,7 +1348,7 @@ class ProxyValServer {
|
|
1348
1348
|
}
|
1349
1349
|
async getFiles(treePath, query, cookies) {
|
1350
1350
|
return this.withAuth(cookies, "getFiles", async data => {
|
1351
|
-
const url = new URL(`/v1/files/${this.options.valName}
|
1351
|
+
const url = new URL(`/v1/files/${this.options.valName}/~${treePath}`, this.options.valContentUrl);
|
1352
1352
|
if (typeof query.sha256 === "string") {
|
1353
1353
|
url.searchParams.append("sha256", query.sha256);
|
1354
1354
|
} else {
|
@@ -1600,7 +1600,7 @@ class ProxyValServer {
|
|
1600
1600
|
source: (source === "true").toString(),
|
1601
1601
|
commit
|
1602
1602
|
});
|
1603
|
-
const url = new URL(`/v1/tree/${this.options.valName}/heads/${this.options.gitBranch}
|
1603
|
+
const url = new URL(`/v1/tree/${this.options.valName}/heads/${this.options.gitBranch}/~${treePath}/?${params}`, this.options.valContentUrl);
|
1604
1604
|
try {
|
1605
1605
|
const fetchRes = await fetch(url, {
|
1606
1606
|
headers: this.getAuthHeaders(data.token, "application/json")
|
@@ -1348,7 +1348,7 @@ class ProxyValServer {
|
|
1348
1348
|
}
|
1349
1349
|
async getFiles(treePath, query, cookies) {
|
1350
1350
|
return this.withAuth(cookies, "getFiles", async data => {
|
1351
|
-
const url = new URL(`/v1/files/${this.options.valName}
|
1351
|
+
const url = new URL(`/v1/files/${this.options.valName}/~${treePath}`, this.options.valContentUrl);
|
1352
1352
|
if (typeof query.sha256 === "string") {
|
1353
1353
|
url.searchParams.append("sha256", query.sha256);
|
1354
1354
|
} else {
|
@@ -1600,7 +1600,7 @@ class ProxyValServer {
|
|
1600
1600
|
source: (source === "true").toString(),
|
1601
1601
|
commit
|
1602
1602
|
});
|
1603
|
-
const url = new URL(`/v1/tree/${this.options.valName}/heads/${this.options.gitBranch}
|
1603
|
+
const url = new URL(`/v1/tree/${this.options.valName}/heads/${this.options.gitBranch}/~${treePath}/?${params}`, this.options.valContentUrl);
|
1604
1604
|
try {
|
1605
1605
|
const fetchRes = await fetch(url, {
|
1606
1606
|
headers: this.getAuthHeaders(data.token, "application/json")
|
@@ -1318,7 +1318,7 @@ class ProxyValServer {
|
|
1318
1318
|
}
|
1319
1319
|
async getFiles(treePath, query, cookies) {
|
1320
1320
|
return this.withAuth(cookies, "getFiles", async data => {
|
1321
|
-
const url = new URL(`/v1/files/${this.options.valName}
|
1321
|
+
const url = new URL(`/v1/files/${this.options.valName}/~${treePath}`, this.options.valContentUrl);
|
1322
1322
|
if (typeof query.sha256 === "string") {
|
1323
1323
|
url.searchParams.append("sha256", query.sha256);
|
1324
1324
|
} else {
|
@@ -1570,7 +1570,7 @@ class ProxyValServer {
|
|
1570
1570
|
source: (source === "true").toString(),
|
1571
1571
|
commit
|
1572
1572
|
});
|
1573
|
-
const url = new URL(`/v1/tree/${this.options.valName}/heads/${this.options.gitBranch}
|
1573
|
+
const url = new URL(`/v1/tree/${this.options.valName}/heads/${this.options.gitBranch}/~${treePath}/?${params}`, this.options.valContentUrl);
|
1574
1574
|
try {
|
1575
1575
|
const fetchRes = await fetch(url, {
|
1576
1576
|
headers: this.getAuthHeaders(data.token, "application/json")
|
package/package.json
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
"./package.json": "./package.json"
|
13
13
|
},
|
14
14
|
"types": "dist/valbuild-server.cjs.d.ts",
|
15
|
-
"version": "0.
|
15
|
+
"version": "0.36.0",
|
16
16
|
"scripts": {
|
17
17
|
"typecheck": "tsc --noEmit",
|
18
18
|
"test": "jest",
|
@@ -24,9 +24,9 @@
|
|
24
24
|
"concurrently": "^7.6.0"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@valbuild/core": "~0.
|
28
|
-
"@valbuild/shared": "~0.
|
29
|
-
"@valbuild/ui": "~0.
|
27
|
+
"@valbuild/core": "~0.36.0",
|
28
|
+
"@valbuild/shared": "~0.36.0",
|
29
|
+
"@valbuild/ui": "~0.36.0",
|
30
30
|
"express": "^4.18.2",
|
31
31
|
"image-size": "^1.0.2",
|
32
32
|
"queue": "^6.0.2",
|