@vercel/build-utils 13.26.0 → 13.26.2
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 +17 -0
- package/dist/deserialize/deserialize-build-output-types.d.ts +2 -4
- package/dist/deserialize/deserialize-build-output.d.ts +2 -2
- package/dist/deserialize/deserialize-build-output.js +2 -4
- package/dist/deserialize/validate-framework-version.d.ts +2 -1
- package/dist/deserialize/validate-framework-version.js +20 -10
- package/dist/finalize-lambda.d.ts +0 -3
- package/dist/finalize-lambda.js +3 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +41 -24
- package/dist/process-serverless/get-lambda-supports-streaming.d.ts +1 -8
- package/dist/process-serverless/get-lambda-supports-streaming.js +6 -6
- package/dist/types.d.ts +9 -0
- package/dist/types.js +12 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @vercel/build-utils
|
|
2
2
|
|
|
3
|
+
## 13.26.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 647c1e8: Cleanup getLambdaSupportsStreaming
|
|
8
|
+
|
|
9
|
+
## 13.26.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- fa25cb7: Fix config.framework in deserializeBuildOutput
|
|
14
|
+
- 972cc84: Support workflow-triggered job services in queue infrastructure
|
|
15
|
+
|
|
16
|
+
Add `isWorkflowTriggeredService()` and `isQueueBackedService()` helpers so workflow services
|
|
17
|
+
are recognized by the queue broker, dev server, and build pipeline. Update Python runtime to
|
|
18
|
+
bootstrap workflow services as queue-backed workers.
|
|
19
|
+
|
|
3
20
|
## 13.26.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -35,7 +35,7 @@ export type GroupLambdasOptions = {
|
|
|
35
35
|
export type DeserializeBuildOutputLambda<TLambda extends Lambda> = (files: Files, config: SerializedLambda | SerializedNodejsLambda, repoRootPath: string, fileFsRefsCache: Map<string, FileFsRef>, options?: DeserializeBuildOutputLambdaOptions) => Promise<TLambda>;
|
|
36
36
|
export type GroupLambdas<TLambda extends Lambda> = (lambdas: Record<string, TLambda>, options: GroupLambdasOptions) => Promise<Record<string, TLambda>>;
|
|
37
37
|
export type InspectSerializedLambda = (path: string, config: SerializedLambda | SerializedNodejsLambda, repoRootPath: string, hasServerActions: boolean) => Promise<boolean>;
|
|
38
|
-
export interface DeserializeBuildOutputOptions<
|
|
38
|
+
export interface DeserializeBuildOutputOptions<TMeta = unknown, TLambda extends Lambda = Lambda> {
|
|
39
39
|
outputDir: string;
|
|
40
40
|
repoRootPath: string;
|
|
41
41
|
maxBundleSizeMb?: number;
|
|
@@ -47,9 +47,7 @@ export interface DeserializeBuildOutputOptions<TResult extends DeserializeBuildO
|
|
|
47
47
|
inspectSerializedLambda?: InspectSerializedLambda;
|
|
48
48
|
warn?: (message: string) => void;
|
|
49
49
|
includeDeploymentId?: boolean;
|
|
50
|
-
getMeta?: (hasServerActions: boolean) =>
|
|
51
|
-
meta?: infer TMeta;
|
|
52
|
-
} ? TMeta : never;
|
|
50
|
+
getMeta?: (hasServerActions: boolean) => TMeta;
|
|
53
51
|
}
|
|
54
52
|
export type DeserializeBuildOutputFiles = BuildResultV2Typical['output'];
|
|
55
53
|
export type DeserializeBuildOutputPrerenderFallback = Prerender['fallback'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Lambda } from '../lambda';
|
|
2
|
-
import type {
|
|
2
|
+
import type { DeserializeBuildOutputOptions, DeserializeBuildOutputResult } from './deserialize-build-output-types';
|
|
3
3
|
export declare function validateDeploymentId(deploymentId?: string): void;
|
|
4
|
-
export declare function deserializeBuildOutput<
|
|
4
|
+
export declare function deserializeBuildOutput<TFlags = unknown, TMeta = unknown, TLambda extends Lambda = Lambda>(options: DeserializeBuildOutputOptions<TMeta, TLambda>): Promise<DeserializeBuildOutputResult<TFlags, TMeta>>;
|
|
@@ -186,9 +186,7 @@ async function deserializeBuildOutput(options) {
|
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
188
|
validateDeploymentId(config.deploymentId);
|
|
189
|
-
const flags = await (0, import_maybe_read_json.maybeReadJSON)(
|
|
190
|
-
(0, import_path.join)(outputDir, "flags.json")
|
|
191
|
-
);
|
|
189
|
+
const flags = await (0, import_maybe_read_json.maybeReadJSON)((0, import_path.join)(outputDir, "flags.json"));
|
|
192
190
|
const staticDir = (0, import_path.join)(outputDir, "static");
|
|
193
191
|
const output = await (0, import_glob.default)("**", {
|
|
194
192
|
cwd: staticDir,
|
|
@@ -276,7 +274,7 @@ async function deserializeBuildOutput(options) {
|
|
|
276
274
|
}
|
|
277
275
|
);
|
|
278
276
|
applyGroupedLambdas(output, groupedLambdas);
|
|
279
|
-
const framework = (0, import_validate_framework_version.validateFrameworkVersion)(config?.framework
|
|
277
|
+
const framework = (0, import_validate_framework_version.validateFrameworkVersion)(config?.framework);
|
|
280
278
|
const meta = getMeta?.(hasServerActions);
|
|
281
279
|
return {
|
|
282
280
|
wildcard: config.wildcard,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type FrameworkMeta = {
|
|
2
|
+
slug: string;
|
|
2
3
|
version: string;
|
|
3
4
|
};
|
|
4
|
-
export declare function validateFrameworkVersion(
|
|
5
|
+
export declare function validateFrameworkVersion(framework: FrameworkMeta | undefined): FrameworkMeta | undefined;
|
|
5
6
|
export {};
|
|
@@ -22,30 +22,40 @@ __export(validate_framework_version_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(validate_framework_version_exports);
|
|
24
24
|
var import_errors = require("../errors");
|
|
25
|
+
const MAX_SLUG_LENGTH = 50;
|
|
25
26
|
const MAX_FRAMEWORK_VERSION_LENGTH = 50;
|
|
26
|
-
function validateFrameworkVersion(
|
|
27
|
-
if (!
|
|
27
|
+
function validateFrameworkVersion(framework) {
|
|
28
|
+
if (!framework) {
|
|
28
29
|
return void 0;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
+
const { slug, version } = framework;
|
|
32
|
+
if (typeof slug !== "string") {
|
|
33
|
+
return void 0;
|
|
34
|
+
}
|
|
35
|
+
if (typeof version !== "string") {
|
|
31
36
|
throw new import_errors.NowBuildError({
|
|
32
|
-
message: `Invalid config.json: "
|
|
37
|
+
message: `Invalid config.json: "version" type "${typeof version}" should be "string"`,
|
|
33
38
|
code: "VC_BUILD_INVALID_CONFIG_JSON_FRAMEWORK_VERSION_TYPE"
|
|
34
39
|
});
|
|
35
40
|
}
|
|
36
|
-
if (
|
|
37
|
-
const
|
|
41
|
+
if (slug.length > MAX_SLUG_LENGTH) {
|
|
42
|
+
const trimmedFrameworkSlug = slug.slice(0, MAX_SLUG_LENGTH);
|
|
43
|
+
throw new import_errors.NowBuildError({
|
|
44
|
+
message: `Invalid config.json: "framework.slug" length ${slug.length} > ${MAX_SLUG_LENGTH}. "${trimmedFrameworkSlug}..."`,
|
|
45
|
+
code: "VC_BUILD_INVALID_CONFIG_JSON_FRAMEWORK_SLUG_LENGTH"
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
if (version.length > MAX_FRAMEWORK_VERSION_LENGTH) {
|
|
49
|
+
const trimmedFrameworkVersion = version.slice(
|
|
38
50
|
0,
|
|
39
51
|
MAX_FRAMEWORK_VERSION_LENGTH
|
|
40
52
|
);
|
|
41
53
|
throw new import_errors.NowBuildError({
|
|
42
|
-
message: `Invalid config.json: "framework.version" length ${
|
|
54
|
+
message: `Invalid config.json: "framework.version" length ${version.length} > ${MAX_FRAMEWORK_VERSION_LENGTH}. "${trimmedFrameworkVersion}..."`,
|
|
43
55
|
code: "VC_BUILD_INVALID_CONFIG_JSON_FRAMEWORK_VERSION_LENGTH"
|
|
44
56
|
});
|
|
45
57
|
}
|
|
46
|
-
return
|
|
47
|
-
version: frameworkVersion
|
|
48
|
-
};
|
|
58
|
+
return framework;
|
|
49
59
|
}
|
|
50
60
|
// Annotate the CommonJS export names for ESM import in node:
|
|
51
61
|
0 && (module.exports = {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Lambda } from './lambda';
|
|
2
2
|
import type { NodejsLambda } from './nodejs-lambda';
|
|
3
3
|
import type { BytecodeCachingOptions } from './process-serverless/get-lambda-preload-scripts';
|
|
4
|
-
import type { SupportsStreamingResult } from './process-serverless/get-lambda-supports-streaming';
|
|
5
4
|
/**
|
|
6
5
|
* Optional wrapper around async work, allowing callers to inject tracing
|
|
7
6
|
* (e.g. dd-trace spans) without coupling the shared code to a tracer.
|
|
@@ -59,8 +58,6 @@ export interface FinalizeLambdaResult {
|
|
|
59
58
|
/** Compressed size in bytes. */
|
|
60
59
|
size: number;
|
|
61
60
|
uncompressedBytes: number;
|
|
62
|
-
/** Non-fatal streaming detection error, if any. Caller decides how to log. */
|
|
63
|
-
streamingError?: SupportsStreamingResult['error'];
|
|
64
61
|
}
|
|
65
62
|
/**
|
|
66
63
|
* Core Lambda finalization logic shared between BYOF and build-container.
|
package/dist/finalize-lambda.js
CHANGED
|
@@ -98,18 +98,17 @@ async function finalizeLambda(params) {
|
|
|
98
98
|
bytecodeCachingOptions
|
|
99
99
|
)
|
|
100
100
|
};
|
|
101
|
-
const streamingResult =
|
|
101
|
+
const streamingResult = (0, import_get_lambda_supports_streaming.getLambdaSupportsStreaming)(
|
|
102
102
|
lambda,
|
|
103
103
|
forceStreamingRuntime
|
|
104
104
|
);
|
|
105
|
-
lambda.supportsResponseStreaming = streamingResult
|
|
105
|
+
lambda.supportsResponseStreaming = streamingResult;
|
|
106
106
|
return {
|
|
107
107
|
buffer: zipResult.buffer,
|
|
108
108
|
zipPath: zipResult.zipPath ?? null,
|
|
109
109
|
digest: zipResult.digest,
|
|
110
110
|
size: zipResult.size,
|
|
111
|
-
uncompressedBytes
|
|
112
|
-
streamingError: streamingResult.error
|
|
111
|
+
uncompressedBytes
|
|
113
112
|
};
|
|
114
113
|
}
|
|
115
114
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export * from './service-path-utils';
|
|
|
43
43
|
export { getEncryptedEnv, type EncryptedEnvFile, } from './process-serverless/get-encrypted-env-file';
|
|
44
44
|
export { getLambdaEnvironment } from './process-serverless/get-lambda-environment';
|
|
45
45
|
export { getLambdaPreloadScripts, type BytecodeCachingOptions, } from './process-serverless/get-lambda-preload-scripts';
|
|
46
|
-
export { getLambdaSupportsStreaming
|
|
46
|
+
export { getLambdaSupportsStreaming } from './process-serverless/get-lambda-supports-streaming';
|
|
47
47
|
export { streamToDigestAsync, sha256, md5, type FileDigest, } from './fs/stream-to-digest-async';
|
|
48
48
|
export { getBuildResultMetadata, type BuildResultMetadata, } from './collect-build-result/get-build-result-metadata';
|
|
49
49
|
export { validateBuildResult, SUPPORTED_AL2023_RUNTIMES, type ValidateBuildResultParams, type ValidateBuildResultResult, } from './collect-build-result/validate-build-result';
|
package/dist/index.js
CHANGED
|
@@ -34586,10 +34586,12 @@ __export(src_exports, {
|
|
|
34586
34586
|
isNodeEntrypoint: () => isNodeEntrypoint,
|
|
34587
34587
|
isPythonEntrypoint: () => isPythonEntrypoint,
|
|
34588
34588
|
isPythonFramework: () => isPythonFramework,
|
|
34589
|
+
isQueueBackedService: () => isQueueBackedService,
|
|
34589
34590
|
isQueueTriggeredService: () => isQueueTriggeredService,
|
|
34590
34591
|
isRouteMiddleware: () => isRouteMiddleware,
|
|
34591
34592
|
isScheduleTriggeredService: () => isScheduleTriggeredService,
|
|
34592
34593
|
isSymbolicLink: () => isSymbolicLink,
|
|
34594
|
+
isWorkflowTriggeredService: () => isWorkflowTriggeredService,
|
|
34593
34595
|
manifestPath: () => manifestPath,
|
|
34594
34596
|
maybeReadJSON: () => maybeReadJSON,
|
|
34595
34597
|
md5: () => md5,
|
|
@@ -35824,6 +35826,12 @@ function isQueueTriggeredService(service) {
|
|
|
35824
35826
|
function isScheduleTriggeredService(service) {
|
|
35825
35827
|
return service.type === "cron" || service.type === "job" && service.trigger === "schedule";
|
|
35826
35828
|
}
|
|
35829
|
+
function isWorkflowTriggeredService(service) {
|
|
35830
|
+
return service.type === "job" && service.trigger === "workflow";
|
|
35831
|
+
}
|
|
35832
|
+
function isQueueBackedService(service) {
|
|
35833
|
+
return isQueueTriggeredService(service) || isWorkflowTriggeredService(service);
|
|
35834
|
+
}
|
|
35827
35835
|
function getReportedServiceType(service) {
|
|
35828
35836
|
switch (service.type) {
|
|
35829
35837
|
case "web":
|
|
@@ -39319,20 +39327,20 @@ function getLambdaEnvironment(lambda, buffer, options) {
|
|
|
39319
39327
|
}
|
|
39320
39328
|
|
|
39321
39329
|
// src/process-serverless/get-lambda-supports-streaming.ts
|
|
39322
|
-
|
|
39330
|
+
function getLambdaSupportsStreaming(lambda, forceStreamingRuntime) {
|
|
39323
39331
|
if (lambda.awsLambdaHandler) {
|
|
39324
|
-
return
|
|
39332
|
+
return false;
|
|
39325
39333
|
}
|
|
39326
39334
|
if (forceStreamingRuntime) {
|
|
39327
|
-
return
|
|
39335
|
+
return true;
|
|
39328
39336
|
}
|
|
39329
39337
|
if (typeof lambda.supportsResponseStreaming === "boolean") {
|
|
39330
|
-
return
|
|
39338
|
+
return lambda.supportsResponseStreaming;
|
|
39331
39339
|
}
|
|
39332
39340
|
if ("launcherType" in lambda && lambda.launcherType === "Nodejs") {
|
|
39333
|
-
return
|
|
39341
|
+
return true;
|
|
39334
39342
|
}
|
|
39335
|
-
return
|
|
39343
|
+
return void 0;
|
|
39336
39344
|
}
|
|
39337
39345
|
|
|
39338
39346
|
// src/fs/stream-to-digest-async.ts
|
|
@@ -39702,18 +39710,17 @@ async function finalizeLambda(params) {
|
|
|
39702
39710
|
bytecodeCachingOptions
|
|
39703
39711
|
)
|
|
39704
39712
|
};
|
|
39705
|
-
const streamingResult =
|
|
39713
|
+
const streamingResult = getLambdaSupportsStreaming(
|
|
39706
39714
|
lambda,
|
|
39707
39715
|
forceStreamingRuntime
|
|
39708
39716
|
);
|
|
39709
|
-
lambda.supportsResponseStreaming = streamingResult
|
|
39717
|
+
lambda.supportsResponseStreaming = streamingResult;
|
|
39710
39718
|
return {
|
|
39711
39719
|
buffer: zipResult.buffer,
|
|
39712
39720
|
zipPath: zipResult.zipPath ?? null,
|
|
39713
39721
|
digest: zipResult.digest,
|
|
39714
39722
|
size: zipResult.size,
|
|
39715
|
-
uncompressedBytes
|
|
39716
|
-
streamingError: streamingResult.error
|
|
39723
|
+
uncompressedBytes
|
|
39717
39724
|
};
|
|
39718
39725
|
}
|
|
39719
39726
|
|
|
@@ -39787,30 +39794,40 @@ function validateEnvWrapperSupport(encryptedEnvFilename, encryptedEnvContent, la
|
|
|
39787
39794
|
}
|
|
39788
39795
|
|
|
39789
39796
|
// src/deserialize/validate-framework-version.ts
|
|
39797
|
+
var MAX_SLUG_LENGTH = 50;
|
|
39790
39798
|
var MAX_FRAMEWORK_VERSION_LENGTH = 50;
|
|
39791
|
-
function validateFrameworkVersion(
|
|
39792
|
-
if (!
|
|
39799
|
+
function validateFrameworkVersion(framework) {
|
|
39800
|
+
if (!framework) {
|
|
39801
|
+
return void 0;
|
|
39802
|
+
}
|
|
39803
|
+
const { slug, version } = framework;
|
|
39804
|
+
if (typeof slug !== "string") {
|
|
39793
39805
|
return void 0;
|
|
39794
39806
|
}
|
|
39795
|
-
if (typeof
|
|
39807
|
+
if (typeof version !== "string") {
|
|
39796
39808
|
throw new NowBuildError({
|
|
39797
|
-
message: `Invalid config.json: "
|
|
39809
|
+
message: `Invalid config.json: "version" type "${typeof version}" should be "string"`,
|
|
39798
39810
|
code: "VC_BUILD_INVALID_CONFIG_JSON_FRAMEWORK_VERSION_TYPE"
|
|
39799
39811
|
});
|
|
39800
39812
|
}
|
|
39801
|
-
if (
|
|
39802
|
-
const
|
|
39813
|
+
if (slug.length > MAX_SLUG_LENGTH) {
|
|
39814
|
+
const trimmedFrameworkSlug = slug.slice(0, MAX_SLUG_LENGTH);
|
|
39815
|
+
throw new NowBuildError({
|
|
39816
|
+
message: `Invalid config.json: "framework.slug" length ${slug.length} > ${MAX_SLUG_LENGTH}. "${trimmedFrameworkSlug}..."`,
|
|
39817
|
+
code: "VC_BUILD_INVALID_CONFIG_JSON_FRAMEWORK_SLUG_LENGTH"
|
|
39818
|
+
});
|
|
39819
|
+
}
|
|
39820
|
+
if (version.length > MAX_FRAMEWORK_VERSION_LENGTH) {
|
|
39821
|
+
const trimmedFrameworkVersion = version.slice(
|
|
39803
39822
|
0,
|
|
39804
39823
|
MAX_FRAMEWORK_VERSION_LENGTH
|
|
39805
39824
|
);
|
|
39806
39825
|
throw new NowBuildError({
|
|
39807
|
-
message: `Invalid config.json: "framework.version" length ${
|
|
39826
|
+
message: `Invalid config.json: "framework.version" length ${version.length} > ${MAX_FRAMEWORK_VERSION_LENGTH}. "${trimmedFrameworkVersion}..."`,
|
|
39808
39827
|
code: "VC_BUILD_INVALID_CONFIG_JSON_FRAMEWORK_VERSION_LENGTH"
|
|
39809
39828
|
});
|
|
39810
39829
|
}
|
|
39811
|
-
return
|
|
39812
|
-
version: frameworkVersion
|
|
39813
|
-
};
|
|
39830
|
+
return framework;
|
|
39814
39831
|
}
|
|
39815
39832
|
|
|
39816
39833
|
// src/deserialize/hydrate-files-map.ts
|
|
@@ -40040,9 +40057,7 @@ async function deserializeBuildOutput(options) {
|
|
|
40040
40057
|
);
|
|
40041
40058
|
}
|
|
40042
40059
|
validateDeploymentId(config.deploymentId);
|
|
40043
|
-
const flags = await maybeReadJSON(
|
|
40044
|
-
(0, import_path15.join)(outputDir, "flags.json")
|
|
40045
|
-
);
|
|
40060
|
+
const flags = await maybeReadJSON((0, import_path15.join)(outputDir, "flags.json"));
|
|
40046
40061
|
const staticDir = (0, import_path15.join)(outputDir, "static");
|
|
40047
40062
|
const output = await glob("**", {
|
|
40048
40063
|
cwd: staticDir,
|
|
@@ -40130,7 +40145,7 @@ async function deserializeBuildOutput(options) {
|
|
|
40130
40145
|
}
|
|
40131
40146
|
);
|
|
40132
40147
|
applyGroupedLambdas(output, groupedLambdas);
|
|
40133
|
-
const framework = validateFrameworkVersion(config?.framework
|
|
40148
|
+
const framework = validateFrameworkVersion(config?.framework);
|
|
40134
40149
|
const meta = getMeta?.(hasServerActions);
|
|
40135
40150
|
return {
|
|
40136
40151
|
wildcard: config.wildcard,
|
|
@@ -40381,10 +40396,12 @@ function getExtendedPayload({
|
|
|
40381
40396
|
isNodeEntrypoint,
|
|
40382
40397
|
isPythonEntrypoint,
|
|
40383
40398
|
isPythonFramework,
|
|
40399
|
+
isQueueBackedService,
|
|
40384
40400
|
isQueueTriggeredService,
|
|
40385
40401
|
isRouteMiddleware,
|
|
40386
40402
|
isScheduleTriggeredService,
|
|
40387
40403
|
isSymbolicLink,
|
|
40404
|
+
isWorkflowTriggeredService,
|
|
40388
40405
|
manifestPath,
|
|
40389
40406
|
maybeReadJSON,
|
|
40390
40407
|
md5,
|
|
@@ -5,13 +5,6 @@ interface LambdaLike {
|
|
|
5
5
|
runtime: string;
|
|
6
6
|
supportsResponseStreaming?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export interface SupportsStreamingResult {
|
|
9
|
-
supportsStreaming: boolean | undefined;
|
|
10
|
-
error?: {
|
|
11
|
-
handler: string;
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
8
|
/**
|
|
16
9
|
* Determines if a Lambda should have streaming enabled.
|
|
17
10
|
*
|
|
@@ -25,5 +18,5 @@ export interface SupportsStreamingResult {
|
|
|
25
18
|
* enabled. If the setting is defined it will be honored. Enabled by
|
|
26
19
|
* default for Node.js.
|
|
27
20
|
*/
|
|
28
|
-
export declare function getLambdaSupportsStreaming(lambda: LambdaLike, forceStreamingRuntime: boolean):
|
|
21
|
+
export declare function getLambdaSupportsStreaming(lambda: LambdaLike, forceStreamingRuntime: boolean): boolean | undefined;
|
|
29
22
|
export {};
|
|
@@ -21,20 +21,20 @@ __export(get_lambda_supports_streaming_exports, {
|
|
|
21
21
|
getLambdaSupportsStreaming: () => getLambdaSupportsStreaming
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(get_lambda_supports_streaming_exports);
|
|
24
|
-
|
|
24
|
+
function getLambdaSupportsStreaming(lambda, forceStreamingRuntime) {
|
|
25
25
|
if (lambda.awsLambdaHandler) {
|
|
26
|
-
return
|
|
26
|
+
return false;
|
|
27
27
|
}
|
|
28
28
|
if (forceStreamingRuntime) {
|
|
29
|
-
return
|
|
29
|
+
return true;
|
|
30
30
|
}
|
|
31
31
|
if (typeof lambda.supportsResponseStreaming === "boolean") {
|
|
32
|
-
return
|
|
32
|
+
return lambda.supportsResponseStreaming;
|
|
33
33
|
}
|
|
34
34
|
if ("launcherType" in lambda && lambda.launcherType === "Nodejs") {
|
|
35
|
-
return
|
|
35
|
+
return true;
|
|
36
36
|
}
|
|
37
|
-
return
|
|
37
|
+
return void 0;
|
|
38
38
|
}
|
|
39
39
|
// Annotate the CommonJS export names for ESM import in node:
|
|
40
40
|
0 && (module.exports = {
|
package/dist/types.d.ts
CHANGED
|
@@ -550,6 +550,15 @@ export declare function isScheduleTriggeredService(service: {
|
|
|
550
550
|
type?: ServiceType;
|
|
551
551
|
trigger?: JobTrigger;
|
|
552
552
|
}): boolean;
|
|
553
|
+
export declare function isWorkflowTriggeredService(service: {
|
|
554
|
+
type?: ServiceType;
|
|
555
|
+
trigger?: JobTrigger;
|
|
556
|
+
}): boolean;
|
|
557
|
+
/** Returns true for any service that consumes queue messages (worker, queue-triggered job, workflow-triggered job). */
|
|
558
|
+
export declare function isQueueBackedService(service: {
|
|
559
|
+
type?: ServiceType;
|
|
560
|
+
trigger?: JobTrigger;
|
|
561
|
+
}): boolean;
|
|
553
562
|
export type ReportedServiceType = 'web' | 'schedule' | 'queue' | 'workflow';
|
|
554
563
|
export declare function getReportedServiceType(service: {
|
|
555
564
|
type?: ServiceType;
|
package/dist/types.js
CHANGED
|
@@ -25,8 +25,10 @@ __export(types_exports, {
|
|
|
25
25
|
getReportedServiceType: () => getReportedServiceType,
|
|
26
26
|
getServiceQueueTopicConfigs: () => getServiceQueueTopicConfigs,
|
|
27
27
|
getServiceQueueTopics: () => getServiceQueueTopics,
|
|
28
|
+
isQueueBackedService: () => isQueueBackedService,
|
|
28
29
|
isQueueTriggeredService: () => isQueueTriggeredService,
|
|
29
|
-
isScheduleTriggeredService: () => isScheduleTriggeredService
|
|
30
|
+
isScheduleTriggeredService: () => isScheduleTriggeredService,
|
|
31
|
+
isWorkflowTriggeredService: () => isWorkflowTriggeredService
|
|
30
32
|
});
|
|
31
33
|
module.exports = __toCommonJS(types_exports);
|
|
32
34
|
class Version {
|
|
@@ -69,6 +71,12 @@ function isQueueTriggeredService(service) {
|
|
|
69
71
|
function isScheduleTriggeredService(service) {
|
|
70
72
|
return service.type === "cron" || service.type === "job" && service.trigger === "schedule";
|
|
71
73
|
}
|
|
74
|
+
function isWorkflowTriggeredService(service) {
|
|
75
|
+
return service.type === "job" && service.trigger === "workflow";
|
|
76
|
+
}
|
|
77
|
+
function isQueueBackedService(service) {
|
|
78
|
+
return isQueueTriggeredService(service) || isWorkflowTriggeredService(service);
|
|
79
|
+
}
|
|
72
80
|
function getReportedServiceType(service) {
|
|
73
81
|
switch (service.type) {
|
|
74
82
|
case "web":
|
|
@@ -98,6 +106,8 @@ function getReportedServiceType(service) {
|
|
|
98
106
|
getReportedServiceType,
|
|
99
107
|
getServiceQueueTopicConfigs,
|
|
100
108
|
getServiceQueueTopics,
|
|
109
|
+
isQueueBackedService,
|
|
101
110
|
isQueueTriggeredService,
|
|
102
|
-
isScheduleTriggeredService
|
|
111
|
+
isScheduleTriggeredService,
|
|
112
|
+
isWorkflowTriggeredService
|
|
103
113
|
});
|