@netlify/zip-it-and-ship-it 9.28.4 → 9.29.1

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.
@@ -14,6 +14,7 @@ interface ManifestFunction {
14
14
  displayName?: string;
15
15
  bundler?: string;
16
16
  generator?: string;
17
+ priority?: number;
17
18
  }
18
19
  export interface Manifest {
19
20
  functions: ManifestFunction[];
package/dist/manifest.js CHANGED
@@ -12,7 +12,7 @@ export const createManifest = async ({ functions, path }) => {
12
12
  };
13
13
  await fs.writeFile(path, JSON.stringify(payload));
14
14
  };
15
- const formatFunctionForManifest = ({ bundler, displayName, generator, invocationMode, mainFile, name, path, routes, runtime, runtimeVersion, runtimeAPIVersion, schedule, }) => {
15
+ const formatFunctionForManifest = ({ bundler, displayName, generator, invocationMode, mainFile, name, path, priority, routes, runtime, runtimeVersion, runtimeAPIVersion, schedule, }) => {
16
16
  const manifestFunction = {
17
17
  bundler,
18
18
  displayName,
@@ -21,6 +21,7 @@ const formatFunctionForManifest = ({ bundler, displayName, generator, invocation
21
21
  buildData: { runtimeAPIVersion },
22
22
  mainFile,
23
23
  name,
24
+ priority,
24
25
  runtimeVersion,
25
26
  path: resolve(path),
26
27
  runtime,
@@ -0,0 +1,4 @@
1
+ export declare enum Priority {
2
+ GeneratedFunction = 0,
3
+ UserFunction = 10
4
+ }
@@ -0,0 +1,6 @@
1
+ export var Priority;
2
+ (function (Priority) {
3
+ Priority[Priority["GeneratedFunction"] = 0] = "GeneratedFunction";
4
+ Priority[Priority["UserFunction"] = 10] = "UserFunction";
5
+ })(Priority || (Priority = {}));
6
+ //# sourceMappingURL=priority.js.map
@@ -1,6 +1,7 @@
1
1
  import { extname, join } from 'path';
2
2
  import { copyFile } from 'cp-file';
3
3
  import { INVOCATION_MODE } from '../../function.js';
4
+ import { Priority } from '../../priority.js';
4
5
  import getInternalValue from '../../utils/get_internal_value.js';
5
6
  import { RUNTIME } from '../runtime.js';
6
7
  import { getBundler, getBundlerName } from './bundlers/index.js';
@@ -94,6 +95,7 @@ const zipFunction = async function ({ archiveFormat, basePath, cache, config = {
94
95
  invocationMode = INVOCATION_MODE.Background;
95
96
  }
96
97
  const outputModuleFormat = extname(finalMainFile) === MODULE_FILE_EXTENSION.MJS ? MODULE_FORMAT.ESM : MODULE_FORMAT.COMMONJS;
98
+ const priority = isInternal ? Priority.GeneratedFunction : Priority.UserFunction;
97
99
  return {
98
100
  bundler: bundlerName,
99
101
  bundlerWarnings,
@@ -108,6 +110,7 @@ const zipFunction = async function ({ archiveFormat, basePath, cache, config = {
108
110
  outputModuleFormat,
109
111
  nativeNodeModules,
110
112
  path: zipPath.path,
113
+ priority,
111
114
  runtimeVersion: runtimeAPIVersion === 2 ? getNodeRuntimeForV2(config.nodeVersion) : getNodeRuntime(config.nodeVersion),
112
115
  };
113
116
  };
@@ -44,6 +44,7 @@ export interface ZipFunctionResult {
44
44
  outputModuleFormat?: ModuleFormat;
45
45
  nativeNodeModules?: object;
46
46
  path: string;
47
+ priority?: number;
47
48
  runtimeVersion?: string;
48
49
  staticAnalysisResult?: StaticAnalysisResult;
49
50
  entryFilename: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/zip-it-and-ship-it",
3
- "version": "9.28.4",
3
+ "version": "9.29.1",
4
4
  "description": "Zip it and ship it",
5
5
  "main": "./dist/main.js",
6
6
  "type": "module",
@@ -57,7 +57,7 @@
57
57
  "@babel/parser": "^7.22.5",
58
58
  "@babel/types": "7.23.6",
59
59
  "@netlify/binary-info": "^1.0.0",
60
- "@netlify/serverless-functions-api": "^1.13.1",
60
+ "@netlify/serverless-functions-api": "^1.14.0",
61
61
  "@vercel/nft": "^0.23.0",
62
62
  "archiver": "^6.0.0",
63
63
  "common-path-prefix": "^3.0.0",