@gigadrive/network-config 3.1.0 → 3.1.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/dist/index.d.mts CHANGED
@@ -262,7 +262,11 @@ interface DetectionResult {
262
262
  * @param projectFolder - Absolute path to the project root
263
263
  * @returns DetectionResult with framework, package manager, and generated config
264
264
  */
265
- declare const detectFramework: (projectFolder: string) => Effect.Effect<DetectionResult, ManifestReadError | ManifestParseError | FrameworkNotDetectedError, FileSystem.FileSystem | Path.Path>;
265
+ declare const detectFramework: (projectFolder: string) => Effect.Effect<{
266
+ framework: FrameworkDefinition;
267
+ packageManager: PackageManager;
268
+ config: NormalizedConfig;
269
+ }, ManifestReadError | ManifestParseError | FrameworkNotDetectedError, FileSystem.FileSystem | Path.Path>;
266
270
 
267
271
  /**
268
272
  * Detects the package manager by checking for lockfiles in the project folder.
@@ -484,7 +488,7 @@ interface ConfigV4 extends Config {
484
488
  /**
485
489
  * Additional environment variables to set during runtime and build.
486
490
  */
487
- env: Record<string, string>;
491
+ env?: Record<string, string>;
488
492
  /**
489
493
  * Optionally, specify additional services like databases to deploy.
490
494
  */
@@ -507,6 +511,10 @@ interface ConfigV4FunctionSettings {
507
511
  * The runtime to use for the function.
508
512
  */
509
513
  runtime?: Runtime;
514
+ /**
515
+ * Enable function response streaming. When omitted, Node and Bun runtimes stream by default.
516
+ */
517
+ streaming?: boolean;
510
518
  /**
511
519
  * Use to create symlinks on the final function. This is useful for applications that require use of the file system, since serverless functions are ephemeral and have read-only file systems, except for /tmp.
512
520
  */
@@ -546,7 +554,21 @@ declare const V4ConfigParser_base: Effect.Service.Class<V4ConfigParser, "V4Confi
546
554
  * @param config - The raw V4 config object
547
555
  * @param projectFolder - Absolute path to the project root
548
556
  */
549
- parse: (config: ConfigV4, projectFolder: string) => Effect.Effect<NormalizedConfig, FunctionConfigError, FileSystem.FileSystem | Path.Path>;
557
+ parse: (config: ConfigV4, projectFolder: string) => Effect.Effect<{
558
+ regions: ("us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "sa-east-1")[];
559
+ assets: {
560
+ paths: string[];
561
+ prefixToStrip: string;
562
+ dynamicRoutes: boolean;
563
+ populateCache: boolean;
564
+ };
565
+ environmentVariables: Record<string, string>;
566
+ commands: string[];
567
+ entrypoints: NormalizedConfigEntrypoint[];
568
+ errors: never[];
569
+ warnings: never[];
570
+ routes: NormalizedConfigRoute[];
571
+ }, FunctionConfigError, FileSystem.FileSystem | Path.Path>;
550
572
  }, never, never>;
551
573
  }>;
552
574
  declare class V4ConfigParser extends V4ConfigParser_base {
@@ -574,7 +596,21 @@ interface Config {
574
596
  * @param filePath - Absolute path to the config file
575
597
  * @param projectFolder - Absolute path to the project root
576
598
  */
577
- declare const parseConfigRaw: (filePath: string, projectFolder: string) => Effect.Effect<NormalizedConfig, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigVersionError | ConfigSchemaValidationError | FunctionConfigError, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path | RawConfigReader | SchemaValidator | V4ConfigParser>;
599
+ declare const parseConfigRaw: (filePath: string, projectFolder: string) => Effect.Effect<{
600
+ regions: ("us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "sa-east-1")[];
601
+ assets: {
602
+ paths: string[];
603
+ prefixToStrip: string;
604
+ dynamicRoutes: boolean;
605
+ populateCache: boolean;
606
+ };
607
+ environmentVariables: Record<string, string>;
608
+ commands: string[];
609
+ entrypoints: NormalizedConfigEntrypoint[];
610
+ errors: never[];
611
+ warnings: never[];
612
+ routes: NormalizedConfigRoute[];
613
+ }, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigVersionError | ConfigSchemaValidationError | FunctionConfigError, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path | RawConfigReader | SchemaValidator | V4ConfigParser>;
578
614
  /**
579
615
  * Parses a config file at the given path, validates it against the appropriate
580
616
  * JSON Schema, converts it to a NormalizedConfig, and applies post-processing.
package/dist/index.d.ts CHANGED
@@ -262,7 +262,11 @@ interface DetectionResult {
262
262
  * @param projectFolder - Absolute path to the project root
263
263
  * @returns DetectionResult with framework, package manager, and generated config
264
264
  */
265
- declare const detectFramework: (projectFolder: string) => Effect.Effect<DetectionResult, ManifestReadError | ManifestParseError | FrameworkNotDetectedError, FileSystem.FileSystem | Path.Path>;
265
+ declare const detectFramework: (projectFolder: string) => Effect.Effect<{
266
+ framework: FrameworkDefinition;
267
+ packageManager: PackageManager;
268
+ config: NormalizedConfig;
269
+ }, ManifestReadError | ManifestParseError | FrameworkNotDetectedError, FileSystem.FileSystem | Path.Path>;
266
270
 
267
271
  /**
268
272
  * Detects the package manager by checking for lockfiles in the project folder.
@@ -484,7 +488,7 @@ interface ConfigV4 extends Config {
484
488
  /**
485
489
  * Additional environment variables to set during runtime and build.
486
490
  */
487
- env: Record<string, string>;
491
+ env?: Record<string, string>;
488
492
  /**
489
493
  * Optionally, specify additional services like databases to deploy.
490
494
  */
@@ -507,6 +511,10 @@ interface ConfigV4FunctionSettings {
507
511
  * The runtime to use for the function.
508
512
  */
509
513
  runtime?: Runtime;
514
+ /**
515
+ * Enable function response streaming. When omitted, Node and Bun runtimes stream by default.
516
+ */
517
+ streaming?: boolean;
510
518
  /**
511
519
  * Use to create symlinks on the final function. This is useful for applications that require use of the file system, since serverless functions are ephemeral and have read-only file systems, except for /tmp.
512
520
  */
@@ -546,7 +554,21 @@ declare const V4ConfigParser_base: Effect.Service.Class<V4ConfigParser, "V4Confi
546
554
  * @param config - The raw V4 config object
547
555
  * @param projectFolder - Absolute path to the project root
548
556
  */
549
- parse: (config: ConfigV4, projectFolder: string) => Effect.Effect<NormalizedConfig, FunctionConfigError, FileSystem.FileSystem | Path.Path>;
557
+ parse: (config: ConfigV4, projectFolder: string) => Effect.Effect<{
558
+ regions: ("us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "sa-east-1")[];
559
+ assets: {
560
+ paths: string[];
561
+ prefixToStrip: string;
562
+ dynamicRoutes: boolean;
563
+ populateCache: boolean;
564
+ };
565
+ environmentVariables: Record<string, string>;
566
+ commands: string[];
567
+ entrypoints: NormalizedConfigEntrypoint[];
568
+ errors: never[];
569
+ warnings: never[];
570
+ routes: NormalizedConfigRoute[];
571
+ }, FunctionConfigError, FileSystem.FileSystem | Path.Path>;
550
572
  }, never, never>;
551
573
  }>;
552
574
  declare class V4ConfigParser extends V4ConfigParser_base {
@@ -574,7 +596,21 @@ interface Config {
574
596
  * @param filePath - Absolute path to the config file
575
597
  * @param projectFolder - Absolute path to the project root
576
598
  */
577
- declare const parseConfigRaw: (filePath: string, projectFolder: string) => Effect.Effect<NormalizedConfig, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigVersionError | ConfigSchemaValidationError | FunctionConfigError, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path | RawConfigReader | SchemaValidator | V4ConfigParser>;
599
+ declare const parseConfigRaw: (filePath: string, projectFolder: string) => Effect.Effect<{
600
+ regions: ("us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "sa-east-1")[];
601
+ assets: {
602
+ paths: string[];
603
+ prefixToStrip: string;
604
+ dynamicRoutes: boolean;
605
+ populateCache: boolean;
606
+ };
607
+ environmentVariables: Record<string, string>;
608
+ commands: string[];
609
+ entrypoints: NormalizedConfigEntrypoint[];
610
+ errors: never[];
611
+ warnings: never[];
612
+ routes: NormalizedConfigRoute[];
613
+ }, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigVersionError | ConfigSchemaValidationError | FunctionConfigError, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path | RawConfigReader | SchemaValidator | V4ConfigParser>;
578
614
  /**
579
615
  * Parses a config file at the given path, validates it against the appropriate
580
616
  * JSON Schema, converts it to a NormalizedConfig, and applies post-processing.