@netlify/zip-it-and-ship-it 15.3.1 → 15.3.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.
|
@@ -34,6 +34,7 @@ export type GetSrcFilesFunction = (args: {
|
|
|
34
34
|
runtimeAPIVersion: number;
|
|
35
35
|
} & FunctionSource) => Promise<string[]>;
|
|
36
36
|
export interface ZipFunctionResult {
|
|
37
|
+
bootstrapVersion?: string;
|
|
37
38
|
bundler?: NodeBundlerName;
|
|
38
39
|
bundlerReason?: BundlerReason;
|
|
39
40
|
bundlerErrors?: object[];
|
|
@@ -2,6 +2,7 @@ import type { FunctionArchive } from '../function.js';
|
|
|
2
2
|
export declare const getArchiveSize: (path: string) => Promise<number | undefined>;
|
|
3
3
|
export declare const addArchiveSize: (result: FunctionArchive) => Promise<{
|
|
4
4
|
size: number | undefined;
|
|
5
|
+
bootstrapVersion?: string;
|
|
5
6
|
bundler?: import("../main.js").NodeBundlerName;
|
|
6
7
|
bundlerReason?: import("../runtimes/node/bundlers/types.js").BundlerReason;
|
|
7
8
|
bundlerErrors?: object[];
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { FunctionArchive } from '../function.js';
|
|
2
2
|
import { RuntimeName } from '../runtimes/runtime.js';
|
|
3
3
|
import type { ExtendedRoute, Route } from './routes.js';
|
|
4
|
+
export interface BuildData {
|
|
5
|
+
bootstrapVersion?: string;
|
|
6
|
+
runtimeAPIVersion?: number;
|
|
7
|
+
}
|
|
4
8
|
export type FunctionResult = Omit<FunctionArchive, 'runtime'> & {
|
|
5
9
|
bootstrapVersion?: string;
|
|
10
|
+
buildData?: BuildData;
|
|
6
11
|
eventSubscriptions?: string[];
|
|
7
12
|
memory?: number;
|
|
8
13
|
region?: string;
|
|
@@ -3,6 +3,15 @@ import { removeUndefined } from './remove_undefined.js';
|
|
|
3
3
|
export const formatZipResult = (archive) => {
|
|
4
4
|
const memory = archive.staticAnalysisResult?.config?.memory ?? archive?.config?.memory;
|
|
5
5
|
const vcpu = archive.staticAnalysisResult?.config?.vcpu ?? archive?.config?.vcpu;
|
|
6
|
+
const runtimeAPIVersion = archive.staticAnalysisResult?.runtimeAPIVersion;
|
|
7
|
+
// Mirror the `buildData` object that `manifest.ts` persists, so consumers
|
|
8
|
+
// reading the in-memory result see the same shape as the manifest cache.
|
|
9
|
+
// Only attach it when there's something to report (e.g. Node functions),
|
|
10
|
+
// avoiding an empty `buildData: {}` on runtimes like Go and Rust.
|
|
11
|
+
const buildData = removeUndefined({
|
|
12
|
+
bootstrapVersion: archive.bootstrapVersion,
|
|
13
|
+
runtimeAPIVersion,
|
|
14
|
+
});
|
|
6
15
|
const functionResult = {
|
|
7
16
|
...archive,
|
|
8
17
|
staticAnalysisResult: undefined,
|
|
@@ -13,7 +22,8 @@ export const formatZipResult = (archive) => {
|
|
|
13
22
|
memory,
|
|
14
23
|
region: archive.staticAnalysisResult?.config?.region ?? archive?.config?.region,
|
|
15
24
|
schedule: archive.staticAnalysisResult?.config?.schedule ?? archive?.config?.schedule,
|
|
16
|
-
runtimeAPIVersion
|
|
25
|
+
runtimeAPIVersion,
|
|
26
|
+
buildData: Object.keys(buildData).length === 0 ? undefined : buildData,
|
|
17
27
|
vcpu,
|
|
18
28
|
};
|
|
19
29
|
return removeUndefined(functionResult);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/zip-it-and-ship-it",
|
|
3
|
-
"version": "15.3.
|
|
3
|
+
"version": "15.3.2",
|
|
4
4
|
"description": "Zip it and ship it",
|
|
5
5
|
"main": "./dist/main.js",
|
|
6
6
|
"type": "module",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"engines": {
|
|
103
103
|
"node": ">=22.12.0"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "f34dd81fc3bc8925aabe5cf9c1cdce4e8eebc4e0"
|
|
106
106
|
}
|