@fjall/generator 0.88.4 → 0.89.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.
Files changed (73) hide show
  1. package/LICENSE +21 -0
  2. package/dist/src/ast/astCdnParser.d.ts +15 -0
  3. package/dist/src/ast/astCdnParser.js +114 -0
  4. package/dist/src/ast/astCommonParser.d.ts +90 -0
  5. package/dist/src/ast/astCommonParser.js +351 -0
  6. package/dist/src/ast/astComputeParser.d.ts +14 -2
  7. package/dist/src/ast/astComputeParser.js +55 -9
  8. package/dist/src/ast/astDatabaseParser.d.ts +104 -0
  9. package/dist/src/ast/astDatabaseParser.js +275 -0
  10. package/dist/src/ast/astInfrastructureParser.d.ts +23 -277
  11. package/dist/src/ast/astInfrastructureParser.js +83 -1456
  12. package/dist/src/ast/astMessagingParser.d.ts +25 -0
  13. package/dist/src/ast/astMessagingParser.js +78 -0
  14. package/dist/src/ast/astNetworkParser.d.ts +70 -0
  15. package/dist/src/ast/astNetworkParser.js +219 -0
  16. package/dist/src/ast/astPatternParser.d.ts +80 -0
  17. package/dist/src/ast/astPatternParser.js +155 -0
  18. package/dist/src/ast/astStorageParser.d.ts +18 -0
  19. package/dist/src/ast/astStorageParser.js +164 -0
  20. package/dist/src/ast/index.d.ts +1 -0
  21. package/dist/src/ast/index.js +4 -0
  22. package/dist/src/dns/bindParser.d.ts +13 -0
  23. package/dist/src/dns/bindParser.js +224 -0
  24. package/dist/src/dns/bindWriter.d.ts +2 -0
  25. package/dist/src/dns/bindWriter.js +52 -0
  26. package/dist/src/dns/index.d.ts +4 -0
  27. package/dist/src/dns/index.js +4 -0
  28. package/dist/src/dns/infrastructureWriter.d.ts +2 -0
  29. package/dist/src/dns/infrastructureWriter.js +58 -0
  30. package/dist/src/dns/types.d.ts +82 -0
  31. package/dist/src/dns/types.js +52 -0
  32. package/dist/src/generation/common.d.ts +1 -16
  33. package/dist/src/generation/common.js +2 -28
  34. package/dist/src/generation/compute.js +77 -28
  35. package/dist/src/generation/index.d.ts +2 -1
  36. package/dist/src/generation/index.js +3 -1
  37. package/dist/src/generation/messagingConnections.d.ts +33 -0
  38. package/dist/src/generation/messagingConnections.js +73 -0
  39. package/dist/src/generation/storage.d.ts +5 -1
  40. package/dist/src/generation/storage.js +9 -1
  41. package/dist/src/generation/storageConnections.d.ts +3 -3
  42. package/dist/src/generation/storageConnections.js +8 -4
  43. package/dist/src/index.d.ts +1 -0
  44. package/dist/src/index.js +2 -0
  45. package/dist/src/planning/resourcePlanning.js +0 -2
  46. package/dist/src/presets/tierTypes.d.ts +4 -1
  47. package/dist/src/schemas/applicationSchemas.d.ts +854 -0
  48. package/dist/src/schemas/applicationSchemas.js +80 -0
  49. package/dist/src/schemas/baseSchemas.d.ts +206 -0
  50. package/dist/src/schemas/baseSchemas.js +248 -0
  51. package/dist/src/schemas/cdnSchemas.d.ts +61 -0
  52. package/dist/src/schemas/cdnSchemas.js +62 -0
  53. package/dist/src/schemas/computeSchemas.d.ts +723 -0
  54. package/dist/src/schemas/computeSchemas.js +727 -0
  55. package/dist/src/schemas/constants.d.ts +12 -8
  56. package/dist/src/schemas/constants.js +14 -4
  57. package/dist/src/schemas/databaseSchemas.d.ts +638 -0
  58. package/dist/src/schemas/databaseSchemas.js +366 -0
  59. package/dist/src/schemas/messagingSchemas.d.ts +20 -0
  60. package/dist/src/schemas/messagingSchemas.js +29 -0
  61. package/dist/src/schemas/networkSchemas.d.ts +246 -0
  62. package/dist/src/schemas/networkSchemas.js +125 -0
  63. package/dist/src/schemas/patternSchemas.d.ts +708 -0
  64. package/dist/src/schemas/patternSchemas.js +294 -0
  65. package/dist/src/schemas/resourceSchemas.d.ts +24 -3530
  66. package/dist/src/schemas/resourceSchemas.js +24 -2011
  67. package/dist/src/schemas/storageSchemas.d.ts +93 -0
  68. package/dist/src/schemas/storageSchemas.js +119 -0
  69. package/dist/src/util/errorUtils.d.ts +1 -2
  70. package/dist/src/util/errorUtils.js +1 -15
  71. package/dist/src/validation/patterns.d.ts +9 -0
  72. package/dist/src/validation/patterns.js +9 -0
  73. package/package.json +4 -3
@@ -3,14 +3,14 @@
3
3
  * These defaults are designed to draw attention when not properly configured
4
4
  */
5
5
  export declare const DEFAULTS: Readonly<{
6
- RESOURCE_SUFFIXES: {
7
- storage: string;
8
- database: string;
9
- cluster: string;
10
- function: string;
11
- instance: string;
12
- compute: string;
13
- };
6
+ RESOURCE_SUFFIXES: Readonly<{
7
+ storage: "Storage";
8
+ database: "Database";
9
+ cluster: "Cluster";
10
+ function: "Function";
11
+ instance: "Instance";
12
+ compute: "Compute";
13
+ }>;
14
14
  }>;
15
15
  export declare const DATABASE_TYPES: readonly ["Aurora", "Instance", "GlobalAurora"];
16
16
  export type DatabaseType = (typeof DATABASE_TYPES)[number];
@@ -60,6 +60,10 @@ export declare const MIN_LAMBDA_TIMEOUT = 1;
60
60
  export declare const MAX_LAMBDA_TIMEOUT = 900;
61
61
  export declare const MIN_ECS_CAPACITY = 1;
62
62
  export declare const MAX_ECS_CAPACITY = 1000;
63
+ export declare const MAX_SCALING_CAPACITY = 100;
64
+ export declare const MAX_WARM_POOL_SIZE = 100;
65
+ export declare const DEFAULT_WARM_POOL_MIN_SIZE = 1;
66
+ export declare const DEFAULT_WARM_POOL_REUSE_ON_SCALE_IN = true;
63
67
  export declare const DEFAULT_CONTAINER_PORT = 3000;
64
68
  export declare const DEFAULT_EC2_INSTANCE_TYPE: "t4g.micro";
65
69
  /** AWS Secrets Manager recommended rotation interval (days) */
@@ -4,14 +4,14 @@
4
4
  */
5
5
  export const DEFAULTS = Object.freeze({
6
6
  // Resource naming conventions
7
- RESOURCE_SUFFIXES: {
7
+ RESOURCE_SUFFIXES: Object.freeze({
8
8
  storage: "Storage",
9
9
  database: "Database",
10
10
  cluster: "Cluster",
11
11
  function: "Function",
12
12
  instance: "Instance",
13
13
  compute: "Compute",
14
- },
14
+ }),
15
15
  });
16
16
  // Resource type constants for validation
17
17
  export const DATABASE_TYPES = ["Aurora", "Instance", "GlobalAurora"];
@@ -172,10 +172,20 @@ export const MIN_LAMBDA_MEMORY = 128;
172
172
  export const MAX_LAMBDA_MEMORY = 10240;
173
173
  export const MIN_LAMBDA_TIMEOUT = 1;
174
174
  export const MAX_LAMBDA_TIMEOUT = 900;
175
- // ECS constraints — AWS service hard limits
175
+ // ECS constraints — Fjall guardrails (ASG maxSize is the effective AWS ceiling;
176
+ // these cap the generator UI to prevent accidental large-scale provisioning)
176
177
  export const MIN_ECS_CAPACITY = 1;
177
178
  export const MAX_ECS_CAPACITY = 1000;
178
- // Default container port for ECS clusters and services
179
+ // Per-service scaling ceiling limits individual service/ASG capacity to prevent
180
+ // accidental large-scale provisioning within a single service definition.
181
+ export const MAX_SCALING_CAPACITY = 100;
182
+ // Warm pool constraints and defaults — Fjall guardrails, not AWS hard limits
183
+ // (ASG maxSize is the effective AWS ceiling; these cap the generator UI)
184
+ export const MAX_WARM_POOL_SIZE = 100;
185
+ export const DEFAULT_WARM_POOL_MIN_SIZE = 1;
186
+ export const DEFAULT_WARM_POOL_REUSE_ON_SCALE_IN = true;
187
+ // Default container port for ECS clusters and services.
188
+ // 3000 is the most common default for Node.js frameworks (Express, Next.js, Remix).
179
189
  export const DEFAULT_CONTAINER_PORT = 3000;
180
190
  // Default EC2 instance type — Graviton-based, free-tier eligible
181
191
  export const DEFAULT_EC2_INSTANCE_TYPE = "t4g.micro";