veryfront 0.1.904 → 0.1.905
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/esm/deno.js +1 -1
- package/esm/src/platform/adapters/veryfront-api-client/operations.js +2 -2
- package/esm/src/server/handlers/request/api/api-handler-wrapper.d.ts.map +1 -1
- package/esm/src/server/handlers/request/api/api-handler-wrapper.js +2 -0
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +1 -1
package/esm/deno.js
CHANGED
|
@@ -117,7 +117,7 @@ export class VeryfrontAPIOperations {
|
|
|
117
117
|
return getProjectSchema().parse(raw);
|
|
118
118
|
}
|
|
119
119
|
async listBranchFiles(projectRef, branchRef = "main", options = {}) {
|
|
120
|
-
const params = buildListParams(options);
|
|
120
|
+
const params = addRuntimeServerFunctionAccess(buildListParams(options));
|
|
121
121
|
params.set("branch", branchRef);
|
|
122
122
|
const url = `/projects/${encodeURIComponent(projectRef)}/files?${params}`;
|
|
123
123
|
logger.debug("listBranchFiles", { projectRef, branchRef, pattern: options.pattern });
|
|
@@ -143,7 +143,7 @@ export class VeryfrontAPIOperations {
|
|
|
143
143
|
}
|
|
144
144
|
getBranchFile(projectRef, branchRef, pathOrId) {
|
|
145
145
|
return withSpan(SpanNames.API_GET_FILE, async () => {
|
|
146
|
-
const params = new URLSearchParams({ branch: branchRef });
|
|
146
|
+
const params = addRuntimeServerFunctionAccess(new URLSearchParams({ branch: branchRef }));
|
|
147
147
|
const url = `/projects/${encodeURIComponent(projectRef)}/files/${encodeURIComponent(pathOrId)}?${params}`;
|
|
148
148
|
logger.debug("getBranchFile", { projectRef, branchRef, pathOrId });
|
|
149
149
|
const raw = await this.request(url);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-handler-wrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/src/server/handlers/request/api/api-handler-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAEf,aAAa,EACd,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"api-handler-wrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/src/server/handlers/request/api/api-handler-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAEf,aAAa,EACd,MAAM,gBAAgB,CAAC;AAsBxB,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,OAAO,CAAiE;IAChF,OAAO,CAAC,WAAW,CAA8B;IAEjD,QAAQ,EAAE,eAAe,CAGvB;gBAGA,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,uCAAuC,EAAE,cAAc;IAOnE,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAW3B,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAmDvE,OAAO,CAAC,iBAAiB;CA4D1B"}
|
|
@@ -49,6 +49,8 @@ export class ApiHandlerWrapper extends BaseHandler {
|
|
|
49
49
|
return fsWrapper.runWithContext(ctx.projectSlug, ctx.proxyToken ?? "", () => this.handleWithContext(req, ctx, pathname), ctx.projectId, {
|
|
50
50
|
productionMode: isProduction,
|
|
51
51
|
releaseId: ctx.releaseId,
|
|
52
|
+
branch: isProduction ? null : ctx.requestContext?.branch ?? ctx.parsedDomain?.branch ??
|
|
53
|
+
null,
|
|
52
54
|
environmentName: ctx.environmentName,
|
|
53
55
|
});
|
|
54
56
|
}
|