@gigadrive/network-config 2.0.3 → 2.0.4

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/dist/index.d.mts CHANGED
@@ -140,6 +140,8 @@ type NormalizedConfigRouteMatchRequirements = [] | [
140
140
 
141
141
  declare const parseConfig: (filePath: string, projectFolder: string) => Promise<NormalizedConfig>;
142
142
 
143
- declare const parseRawConfig: (filePath: string) => Promise<any>;
143
+ declare const parseRawConfig: (filePath: string, { disableVersionCheck }?: {
144
+ disableVersionCheck?: boolean;
145
+ }) => Promise<any>;
144
146
 
145
147
  export { ALLOWED_CONFIG_NAMES, AVAILABLE_REGIONS, AVAILABLE_RUNTIMES, type NeonAWSRegion, type NormalizedConfig, type NormalizedConfigEntrypoint, type NormalizedConfigRoute, type NormalizedConfigRouteHandler, type NormalizedConfigRouteMatchRequirements, type NormalizedConfigRouteMethod, type NormalizedConfigService, type NormalizedConfigServicePostgres, type NormalizedConfigServiceRedis, type NormalizedConfigServiceType, type Region, type Runtime, type UpstashAWSRegion, findConfig, parseConfig, parseRawConfig };
package/dist/index.d.ts CHANGED
@@ -140,6 +140,8 @@ type NormalizedConfigRouteMatchRequirements = [] | [
140
140
 
141
141
  declare const parseConfig: (filePath: string, projectFolder: string) => Promise<NormalizedConfig>;
142
142
 
143
- declare const parseRawConfig: (filePath: string) => Promise<any>;
143
+ declare const parseRawConfig: (filePath: string, { disableVersionCheck }?: {
144
+ disableVersionCheck?: boolean;
145
+ }) => Promise<any>;
144
146
 
145
147
  export { ALLOWED_CONFIG_NAMES, AVAILABLE_REGIONS, AVAILABLE_RUNTIMES, type NeonAWSRegion, type NormalizedConfig, type NormalizedConfigEntrypoint, type NormalizedConfigRoute, type NormalizedConfigRouteHandler, type NormalizedConfigRouteMatchRequirements, type NormalizedConfigRouteMethod, type NormalizedConfigService, type NormalizedConfigServicePostgres, type NormalizedConfigServiceRedis, type NormalizedConfigServiceType, type Region, type Runtime, type UpstashAWSRegion, findConfig, parseConfig, parseRawConfig };
package/dist/index.js CHANGED
@@ -15609,7 +15609,7 @@ ${end.comment}` : end.comment;
15609
15609
  var import_fs2 = __toESM(__require("fs"));
15610
15610
  var import_path2 = __toESM(__require("path"));
15611
15611
  var import_yaml = __toESM(require_dist2());
15612
- var parseRawConfig = async (filePath) => {
15612
+ var parseRawConfig = async (filePath, { disableVersionCheck = false } = {}) => {
15613
15613
  if (!import_fs2.default.existsSync(filePath)) {
15614
15614
  throw new Error(`Config file not found at ${filePath}`);
15615
15615
  }
@@ -15635,7 +15635,7 @@ ${end.comment}` : end.comment;
15635
15635
  if (parsed === void 0) {
15636
15636
  throw new Error(`Config file could not be parsed at ${filePath}`);
15637
15637
  }
15638
- if (typeof parsed.version !== "number") {
15638
+ if (!disableVersionCheck && typeof parsed.version !== "number") {
15639
15639
  throw new Error(`Config file is missing version at ${filePath}`);
15640
15640
  }
15641
15641
  return parsed;
@@ -15741,7 +15741,7 @@ ${end.comment}` : end.comment;
15741
15741
  if (!import_fs3.default.existsSync(configFilePath)) {
15742
15742
  return null;
15743
15743
  }
15744
- const parsed = await parseRawConfig(configFilePath);
15744
+ const parsed = await parseRawConfig(configFilePath, { disableVersionCheck: true });
15745
15745
  return parsed;
15746
15746
  };
15747
15747
  var translateVercelRuntime = (runtime) => {