@vercel/build-utils 13.8.2 → 13.11.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 13.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add `process-serverless` utilities: `getLambdaEnvironment`, `getLambdaPreloadScripts`, `getLambdaSupportsStreaming`, and `getEncryptedEnv`. ([#15712](https://github.com/vercel/vercel/pull/15712))
8
+
9
+ ## 13.10.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [services] support multiple topics for a single worker service ([#15615](https://github.com/vercel/vercel/pull/15615))
14
+
15
+ - [services] support for specifying an env prefix for each service ([#15641](https://github.com/vercel/vercel/pull/15641))
16
+
17
+ - Simplify python runtime by always passing in app variable ([#15635](https://github.com/vercel/vercel/pull/15635))
18
+
19
+ ### Patch Changes
20
+
21
+ - Namespace diagnostics keys by builder and service workspace, and aggregate per-builder `package-manifest.json` files into a single `project-manifest.json` ([#15399](https://github.com/vercel/vercel/pull/15399))
22
+
23
+ - Updated dependencies [[`ac87d5a5ef5d79b55765e094efc957de987d7ac4`](https://github.com/vercel/vercel/commit/ac87d5a5ef5d79b55765e094efc957de987d7ac4), [`25a6a2daa46baba6e8d7dec90eb49213b8150b8c`](https://github.com/vercel/vercel/commit/25a6a2daa46baba6e8d7dec90eb49213b8150b8c)]:
24
+ - @vercel/python-analysis@0.11.0
25
+
26
+ ## 13.9.0
27
+
28
+ ### Minor Changes
29
+
30
+ - Ensure django static files are copied in build output. ([#15557](https://github.com/vercel/vercel/pull/15557))
31
+
3
32
  ## 13.8.2
4
33
 
5
34
  ### Patch Changes
@@ -12,6 +12,7 @@ export interface GetServiceUrlEnvVarsOptions {
12
12
  currentEnv?: Envs;
13
13
  deploymentUrl?: string;
14
14
  origin?: string;
15
+ envPrefix?: string;
15
16
  }
16
17
  /**
17
18
  * Generate environment variables for service URLs.
@@ -48,7 +48,8 @@ function getServiceUrlEnvVars(options) {
48
48
  frameworkList,
49
49
  currentEnv = {},
50
50
  deploymentUrl,
51
- origin
51
+ origin,
52
+ envPrefix
52
53
  } = options;
53
54
  const baseUrl = origin || deploymentUrl;
54
55
  if (!baseUrl || !services || services.length === 0) {
@@ -72,11 +73,12 @@ function getServiceUrlEnvVars(options) {
72
73
  service.routePrefix,
73
74
  !!origin
74
75
  );
75
- if (!(baseEnvVarName in currentEnv)) {
76
- envVars[baseEnvVarName] = absoluteUrl;
76
+ const effectiveBaseEnvVarName = envPrefix ? `${envPrefix}${baseEnvVarName}` : baseEnvVarName;
77
+ if (!(effectiveBaseEnvVarName in currentEnv)) {
78
+ envVars[effectiveBaseEnvVarName] = absoluteUrl;
77
79
  }
78
80
  for (const prefix of frameworkPrefixes) {
79
- const prefixedEnvVarName = `${prefix}${baseEnvVarName}`;
81
+ const prefixedEnvVarName = envPrefix ? `${prefix}${envPrefix}${baseEnvVarName}` : `${prefix}${baseEnvVarName}`;
80
82
  if (!(prefixedEnvVarName in currentEnv)) {
81
83
  envVars[prefixedEnvVarName] = service.routePrefix;
82
84
  }
package/dist/index.d.ts CHANGED
@@ -36,3 +36,7 @@ export { defaultCachePathGlob } from './default-cache-path-glob';
36
36
  export { generateNodeBuilderFunctions } from './generate-node-builder-functions';
37
37
  export { BACKEND_FRAMEWORKS, BACKEND_BUILDERS, UNIFIED_BACKEND_BUILDER, BackendFramework, isBackendFramework, isNodeBackendFramework, isBackendBuilder, isExperimentalBackendsEnabled, isExperimentalBackendsWithoutIntrospectionEnabled, shouldUseExperimentalBackends, PYTHON_FRAMEWORKS, PythonFramework, isPythonFramework, } from './framework-helpers';
38
38
  export * from './python';
39
+ export { getEncryptedEnv, type EncryptedEnvFile, } from './process-serverless/get-encrypted-env-file';
40
+ export { getLambdaEnvironment } from './process-serverless/get-lambda-environment';
41
+ export { getLambdaPreloadScripts, type BytecodeCachingOptions, } from './process-serverless/get-lambda-preload-scripts';
42
+ export { getLambdaSupportsStreaming, type SupportsStreamingResult, } from './process-serverless/get-lambda-supports-streaming';