@fjall/generator 14.3.0 → 16.0.0

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 (46) hide show
  1. package/dist/.build-source-hash +26 -24
  2. package/dist/.minified +1 -1
  3. package/dist/src/ast/astTestHelpers.d.ts +2 -1
  4. package/dist/src/ast/parsers/orchestrator/astPlanConverter.js +1 -1
  5. package/dist/src/ast/parsers/resources/astComputeParserHelpers.js +1 -1
  6. package/dist/src/ast/parsers/resources/astScheduleParser.d.ts +3 -0
  7. package/dist/src/ast/parsers/resources/astScheduleParser.js +1 -1
  8. package/dist/src/codemod/drift/types.d.ts +2 -2
  9. package/dist/src/codemod/edits/addResource/propertyBuilder.d.ts +7 -0
  10. package/dist/src/codemod/edits/addResource/propertyBuilder.js +1 -1
  11. package/dist/src/codemod/fileRewriter/builders.d.ts +7 -0
  12. package/dist/src/codemod/fileRewriter/builders.js +1 -1
  13. package/dist/src/codemod/types.d.ts +6 -6
  14. package/dist/src/generation/common.d.ts +0 -7
  15. package/dist/src/generation/common.js +7 -8
  16. package/dist/src/generation/compute/ec2.d.ts +7 -0
  17. package/dist/src/generation/compute/ec2.js +2 -4
  18. package/dist/src/generation/compute/ecs.js +33 -33
  19. package/dist/src/generation/compute/lambda.d.ts +27 -0
  20. package/dist/src/generation/compute/lambda.js +9 -22
  21. package/dist/src/generation/compute.d.ts +18 -0
  22. package/dist/src/generation/compute.js +6 -6
  23. package/dist/src/generation/database.d.ts +2 -1
  24. package/dist/src/generation/database.js +20 -20
  25. package/dist/src/generation/generatePatternCode.js +9 -9
  26. package/dist/src/generation/index.d.ts +3 -2
  27. package/dist/src/generation/index.js +1 -1
  28. package/dist/src/generation/infrastructure.js +34 -34
  29. package/dist/src/generation/statementInvocation.d.ts +30 -0
  30. package/dist/src/generation/statementInvocation.js +1 -0
  31. package/dist/src/generation/storage.js +19 -19
  32. package/dist/src/generation/structuredSource.d.ts +61 -0
  33. package/dist/src/generation/structuredSource.js +9 -0
  34. package/dist/src/planning/resourcePlanning.d.ts +20 -0
  35. package/dist/src/planning/resourcePlanning.js +1 -1
  36. package/dist/src/projection/compute.d.ts +11 -1
  37. package/dist/src/projection/compute.js +1 -1
  38. package/dist/src/schemas/applicationSchemas.d.ts +5 -1
  39. package/dist/src/schemas/baseSchemas.d.ts +2 -2
  40. package/dist/src/schemas/computeSchemas.d.ts +4 -0
  41. package/dist/src/schemas/computeSchemas.js +1 -1
  42. package/dist/src/schemas/constants.d.ts +2 -0
  43. package/dist/src/schemas/constants.js +1 -1
  44. package/dist/src/version.d.ts +1 -1
  45. package/dist/src/version.js +1 -1
  46. package/package.json +2 -2
@@ -2,6 +2,7 @@ import { type TierEcsServiceConfig, type UserServiceConfig, type AppType } from
2
2
  import { type Result } from "../types/Result.js";
3
3
  import type { ApplicationResourcePlan, EcsServiceConfig } from "../schemas/resourceSchemas.js";
4
4
  import type { ApplicationServiceConfig } from "../schemas/computeSchemas.js";
5
+ import { type PendingDeclaration } from "../codemod/edits/siblingBindingResolution.js";
5
6
  /**
6
7
  * Adapt the wire-level service config (`ApplicationServiceConfig`, validated by
7
8
  * `ApplicationServiceConfigSchema`) into the planner's `UserServiceConfig`. The
@@ -30,4 +31,23 @@ export interface GenerationOptions {
30
31
  /** Resource name mapping from old names to new names (for custom code repositioning) */
31
32
  resourceMapping?: Map<string, string>;
32
33
  }
34
+ /**
35
+ * Every module-scope `const` the scaffold WILL declare for `plan`, in
36
+ * emission order, mirroring each emitter's own wrap predicate (a resource
37
+ * that emits as a bare `app.addX(...)` statement declares nothing and cannot
38
+ * collide). Feeds {@link findPendingWrapCollision} — the same collision
39
+ * oracle the codemod's sibling-wrap path uses — so two resources whose names
40
+ * collapse to one variable (`"Uploads"` and `"uploads"`) are refused before
41
+ * a file is written that does not parse.
42
+ */
43
+ export declare function collectPlannedDeclarations(plan: ApplicationResourcePlan): PendingDeclaration[];
44
+ /**
45
+ * The module-scope consts the PRELUDE itself declares (`const appName = …`,
46
+ * `const app = App.getApp(…)`), DERIVED from the emitter's actual output so
47
+ * a new prelude binding joins the collision oracle without a hand-list going
48
+ * stale. Negative statement indexes keep every prelude entry distinct from
49
+ * the planned resource declarations and from each other (same-index pairs
50
+ * read as idempotent re-plans, not collisions).
51
+ */
52
+ export declare function collectPreludeDeclarations(plan: ApplicationResourcePlan): PendingDeclaration[];
33
53
  export declare function generateInfrastructureFromPlan(plan: ApplicationResourcePlan, options?: GenerationOptions): Result<string, Error>;
@@ -1 +1 @@
1
- var b=Object.defineProperty;var i=(e,n)=>b(e,"name",{value:n,configurable:!0});import{TIER_PRESETS as l,getDefaultDatabaseTypeForTier as k,applyTierDefaultsToServices as P}from"../presets/tierPresets.js";import{COMPUTE_TYPE as D,DEFAULT_CONTAINER_PORT as T}from"../schemas/constants.js";import{success as f,failure as p}from"../types/Result.js";import{injectCustomCodeBlocks as h}from"../ast/mutation/astCodeInjection.js";import{toVariableName as m,toValidDatabaseName as v,generateImports as S,generateAppInit as y,generateTags as E,generateNetworkCode as C,generateDatabaseCode as R,generateClickHouseCode as I,generateS3Code as w,generateDynamoDBCode as x,generateSQSCode as A,generateComputeCode as B,generateCDNCode as U,collectCdnReferencedResources as j,usesPatternApproach as F,generatePatternCodeWithComments as _}from"../generation/index.js";function J(e){return e?.map(n=>({name:n.name,...n.serviceType!==void 0&&{serviceType:n.serviceType},...n.docker!==void 0&&{docker:n.docker},...n.containerPort!==void 0&&{containerPort:n.containerPort},...n.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:n.needsDatabaseConnection},...n.routing!==void 0&&{routing:n.routing}}))}i(J,"toUserServiceConfigs");function K(e,n,o=!0,c,t){const r={appName:e,type:n,database:[],s3:[],compute:[]};if(n==="custom")return r;const s=n,a=l[s];return{...r,database:$(e,a,s,o,t),compute:W(e,a,s,o,c),network:a.network,backup:a.backup}}i(K,"planApplicationResources");function $(e,n,o,c,t){const r=k(o),s=n.database[r];return!c||s===null?[]:[{name:e,type:r,databaseName:v(e),variableName:`${m(e)}Database`,...s,...t?.snapshotIdentifier!==void 0&&{snapshotIdentifier:t.snapshotIdentifier},...t?.snapshotUsername!==void 0&&{snapshotUsername:t.snapshotUsername}}]}i($,"buildDatabasePlan");function N(e,n){if(!(e===void 0&&n===void 0))return{scaling:{...e!==void 0&&{minCapacity:e},...n!==void 0&&{maxCapacity:n}}}}i(N,"buildScalingConfig");function H(e){const{minCapacity:n,maxCapacity:o,...c}=e;return{...c,...N(n,o)}}i(H,"planServiceFromTierPreset");function M(e,n){const o=H(e),c=n?.serviceType==="worker",t=n?.containerPort??T,r=n?.docker;return{...o,...r?.path!==void 0&&{docker:{path:r.path,...r.context!==void 0&&{context:r.context},...r.target!==void 0&&{target:r.target}}},...n?.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:n.needsDatabaseConnection},...c&&{serviceType:"worker"},containers:c?[{}]:[{port:t}]}}i(M,"buildServiceEntry");function V(e,n){return n||e?.directAccess===!0?e:{...e,loadBalancer:!1}}i(V,"resolveClusterConfig");function W(e,n,o,c,t){const r=n.compute.ecs,a=(t&&t.length>0?P(o,t):r.services.map((u,d)=>({...u,name:d===0?"api":`service-${d+1}`}))).map((u,d)=>M(u,t?.[d])),g=a.some(u=>u.containers?.some(d=>d.port!==void 0));return[{name:e,type:D.ECS,needsConnection:c,connectedDatabase:c?[e]:void 0,variableName:`${m(e)}Compute`,cluster:V(r.cluster,g),services:a}]}i(W,"buildComputePlan");function O(e,n){const o=[S(e),y(e),E(e)];if(F(e))o.push(_(e),C(e));else{const t=j(e);o.push(C(e),R(e),I(e),w(e),x(e),A(e),B(e,t),U(e))}const c=o.join("");if(e.customCodeBlocks&&e.customCodeBlocks.length>0){const t=h(c,e.customCodeBlocks,n?.resourceMapping);return t.success?f(t.content):p(new Error(`Custom code injection failed: ${t.error??"unknown error"}`))}return f(c)}i(O,"generateInfrastructureFromPlan");export{O as generateInfrastructureFromPlan,K as planApplicationResources,H as planServiceFromTierPreset,J as toUserServiceConfigs};
1
+ var v=Object.defineProperty;var c=(e,t)=>v(e,"name",{value:t,configurable:!0});import{TIER_PRESETS as N,getDefaultDatabaseTypeForTier as P,applyTierDefaultsToServices as y}from"../presets/tierPresets.js";import{COMPUTE_TYPE as $,DEFAULT_CONTAINER_PORT as D}from"../schemas/constants.js";import{success as g,failure as m}from"../types/Result.js";import{injectCustomCodeBlocks as E}from"../ast/mutation/astCodeInjection.js";import{toVariableName as l,toValidDatabaseName as w,getVariableName as u,generateImports as R,generateAppInit as h,generateTags as T,generateNetworkCode as C,generateDatabaseCode as I,generateClickHouseCode as x,generateS3Code as S,generateDynamoDBCode as A,generateSQSCode as V,generateComputeCode as _,generateCDNCode as B,findComputeProjectionRefusal as K,collectCdnReferencedResources as p,usesPatternApproach as b,generatePatternCodeWithComments as U,databaseNeedsVariable as j,clickhouseNeedsVariable as F,s3NeedsVariable as q,sqsNeedsVariable as M}from"../generation/index.js";import{findPendingWrapCollision as W}from"../codemod/edits/siblingBindingResolution.js";import{RESERVED_IDENTIFIER_NAMES as z}from"../codemod/edits/addResource/propertyBuilder.js";function ie(e){return e?.map(t=>({name:t.name,...t.serviceType!==void 0&&{serviceType:t.serviceType},...t.docker!==void 0&&{docker:t.docker},...t.containerPort!==void 0&&{containerPort:t.containerPort},...t.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:t.needsDatabaseConnection},...t.routing!==void 0&&{routing:t.routing}}))}c(ie,"toUserServiceConfigs");function ce(e,t,s=!0,o,r){const n={appName:e,type:t,database:[],s3:[],compute:[]};if(t==="custom")return n;const i=t,a=N[i];return{...n,database:H(e,a,i,s,r),compute:Y(e,a,i,s,o),network:a.network,backup:a.backup}}c(ce,"planApplicationResources");function H(e,t,s,o,r){const n=P(s),i=t.database[n];return!o||i===null?[]:[{name:e,type:n,databaseName:w(e),variableName:`${l(e)}Database`,...i,...r?.snapshotIdentifier!==void 0&&{snapshotIdentifier:r.snapshotIdentifier},...r?.snapshotUsername!==void 0&&{snapshotUsername:r.snapshotUsername}}]}c(H,"buildDatabasePlan");function Z(e,t){if(!(e===void 0&&t===void 0))return{scaling:{...e!==void 0&&{minCapacity:e},...t!==void 0&&{maxCapacity:t}}}}c(Z,"buildScalingConfig");function J(e){const{minCapacity:t,maxCapacity:s,...o}=e;return{...o,...Z(t,s)}}c(J,"planServiceFromTierPreset");function L(e,t){const s=J(e),o=t?.serviceType==="worker",r=t?.containerPort??D,n=t?.docker;return{...s,...n?.path!==void 0&&{docker:{path:n.path,...n.context!==void 0&&{context:n.context},...n.target!==void 0&&{target:n.target}}},...t?.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:t.needsDatabaseConnection},...o&&{serviceType:"worker"},containers:o?[{}]:[{port:r}]}}c(L,"buildServiceEntry");function Q(e,t){return t||e?.directAccess===!0?e:{...e,loadBalancer:!1}}c(Q,"resolveClusterConfig");function Y(e,t,s,o,r){const n=t.compute.ecs,a=(r&&r.length>0?y(s,r):n.services.map((f,d)=>({...f,name:d===0?"api":`service-${d+1}`}))).map((f,d)=>L(f,r?.[d])),k=a.some(f=>f.containers?.some(d=>d.port!==void 0));return[{name:e,type:$.ECS,needsConnection:o,connectedDatabase:o?[e]:void 0,variableName:`${l(e)}Compute`,cluster:Q(n.cluster,k),services:a}]}c(Y,"buildComputePlan");function G(e){const t=[];let s=0;const o=c((n,i,a)=>{t.push({variableName:n,resourceName:i,statementIndex:s++,planKey:a})},"declare");for(const n of e.additionalNetworks??[])o(l(n.name),n.name,"additionalNetworks");if(b(e))return t;for(const n of e.database)j(n,e)&&o(u(n),n.name,"database");for(const n of e.clickhouse??[])F(n,e)&&o(u(n),n.name,"clickhouse");for(const n of e.s3)q(n,e)&&o(u(n),n.name,"s3");for(const n of e.dynamodb??[])o(u(n),n.name,"dynamodb");for(const n of e.sqs??[])M(n,e)&&o(u(n),n.name,"sqs");const r=p(e);for(const n of e.compute)(r.has(n.name)||n.scheduleExpression!==void 0)&&o(u(n),n.name,"compute");return t}c(G,"collectPlannedDeclarations");function O(e){const t=[],s=/^const\s+([A-Za-z_$][A-Za-z0-9_$]*)\s*=/gm,o=h(e);let r=-1,n;for(;(n=s.exec(o))!==null;){const i=n[1];i!==void 0&&t.push({variableName:i,resourceName:i,statementIndex:r--,planKey:"prelude"})}return t}c(O,"collectPreludeDeclarations");function de(e,t){const s=G(e),o=s.find(a=>z.has(a.variableName));if(o!==void 0)return m(new Error(`Cannot generate infrastructure: ${o.planKey} resource "${o.resourceName}" binds the module-scope const \`${o.variableName}\`, a JavaScript reserved word \u2014 the generated file would not parse. Rename the resource, or give it a distinct variableName in the plan.`));const r=W([...O(e),...s]);if(r!==void 0)return r.first.planKey==="prelude"?m(new Error(`Cannot generate infrastructure: ${r.second.planKey} resource "${r.second.resourceName}" binds the module-scope const \`${r.first.variableName}\`, which the scaffold prelude itself declares \u2014 the generated file would not compile (Identifier '${r.first.variableName}' has already been declared). Rename the resource, or give it a distinct variableName in the plan.`)):m(new Error(`Cannot generate infrastructure: ${r.first.planKey} resource "${r.first.resourceName}" and ${r.second.planKey} resource "${r.second.resourceName}" both bind the module-scope const \`${r.first.variableName}\` \u2014 the generated file would not compile (Identifier '${r.first.variableName}' has already been declared). Rename one of the resources, or give one a distinct variableName in the plan.`));if(!b(e)){const a=K(e);if(a!==void 0)return m(new Error(`Cannot generate infrastructure: compute resource "${a.resourceName}" key \`${a.key}\` cannot be emitted \u2014 ${a.reason}`))}const n=[R(e),h(e),T(e)];if(b(e))n.push(U(e),C(e));else{const a=p(e);n.push(C(e),I(e),x(e),S(e),A(e),V(e),_(e,a),B(e))}const i=n.join("");if(e.customCodeBlocks&&e.customCodeBlocks.length>0){const a=E(i,e.customCodeBlocks,t?.resourceMapping);return a.success?g(a.content):m(new Error(`Custom code injection failed: ${a.error??"unknown error"}`))}return g(i)}c(de,"generateInfrastructureFromPlan");export{G as collectPlannedDeclarations,O as collectPreludeDeclarations,de as generateInfrastructureFromPlan,ce as planApplicationResources,J as planServiceFromTierPreset,ie as toUserServiceConfigs};
@@ -27,5 +27,15 @@
27
27
  * `codePath` — refusing a missing handler or runtime would refuse statements
28
28
  * the construct deploys correctly.
29
29
  */
30
- import type { TypeProjection } from "./types.js";
30
+ import type { StructuredBinding, TypeProjection } from "./types.js";
31
+ /**
32
+ * `scaling.scalingType` string → `ScalingType.<member>` access plus its
33
+ * barrel import — the ONE derivation of the member emission, consumed by
34
+ * {@link buildServicesBinding} (codemod lane, whole-services rebuild) and by
35
+ * the scaffold's ECS scaling emitter (`generation/compute/ecs.ts`), so the
36
+ * two lanes cannot disagree on the shape `addServiceAutoScaling` actually
37
+ * switches on. `undefined` for anything that is not a member name — the
38
+ * schema gate (`z.enum(SCALING_TYPES)`) owns that refusal.
39
+ */
40
+ export declare function scalingTypeBinding(value: unknown): StructuredBinding | undefined;
31
41
  export declare const compute: TypeProjection;
@@ -1 +1 @@
1
- var S=Object.defineProperty;var t=(e,n)=>S(e,"name",{value:n,configurable:!0});import{connectionEnvSuffix as x}from"../generation/common.js";import{buildConnectionWiringEntries as C,CONNECTION_TYPE_ORDER as T,DATABASE_ACCESSORS as v}from"../generation/connectionWiring.js";import{getArchitectureForInstanceType as j}from"../schemas/instanceTypeArchitecture.js";import{roundTripKeys as R}from"./roundTripKeys.js";const b=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function y(e,n){return{kind:"member",object:{kind:"identifier",name:e},property:n}}t(y,"memberOf");function h(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}t(h,"isPlainRecord");function m(e){return Array.isArray(e)?{kind:"array",elements:e.map(m)}:h(e)?{kind:"object",entries:Object.entries(e).filter(([,n])=>n!==void 0).map(([n,r])=>({key:n,value:m(r)}))}:{kind:"literal",value:e}}t(m,"toStructuredLiteral");function O(e){if(!Array.isArray(e))return{expression:m(e)};let n=!1;const r=[];for(const p of e){if(!h(p))return{expression:m(e)};const i=[];for(const[o,c]of Object.entries(p)){if(c===void 0)continue;if(o!=="scaling"||!h(c)){i.push({key:o,value:m(c)});continue}const d=[];for(const[l,a]of Object.entries(c))if(a!==void 0){if(l==="scalingType"&&typeof a=="string"&&b.test(a)){n=!0,d.push({key:l,value:y("ScalingType",a)});continue}d.push({key:l,value:m(a)})}i.push({key:o,value:{kind:"object",entries:d}})}r.push({kind:"object",entries:i})}return{expression:{kind:"array",elements:r},...n&&{imports:["ScalingType"]}}}t(O,"buildServicesBinding");function D(e){return h(e)&&Object.keys(e).length===1&&typeof e.authType=="string"&&b.test(e.authType)?{expression:{kind:"object",entries:[{key:"authType",value:y("FunctionUrlAuthType",e.authType)}]},imports:["FunctionUrlAuthType"]}:{expression:m(e)}}t(D,"buildFunctionUrlBinding");const M=[{property:"deployment",reason:"a Lambda needs a deployment mode: pass `deployment=container` (the image carries code and runtime) or `deployment=code` with a `codePath` for `Code.fromAsset(...)`.",refuseWhen:t(e=>e.type==="lambda"&&e.deployment===void 0&&e.code===void 0,"refuseWhen")},{property:"codePath",reason:"a container Lambda takes its code from the image, so `codePath` is never read \u2014 drop it, or use `deployment=code`.",refuseWhen:t(e=>e.deployment==="container"&&e.codePath!==void 0,"refuseWhen")},{property:"handler",reason:"a container Lambda takes its handler from the image (`Handler.FROM_IMAGE`), so `handler` is never read \u2014 drop it, or use `deployment=code`.",refuseWhen:t(e=>e.deployment==="container"&&e.handler!==void 0,"refuseWhen")},{property:"runtime",reason:"a container Lambda takes its runtime from the image (`Runtime.FROM_IMAGE`), so `runtime` is never read \u2014 drop it, or use `deployment=code`.",refuseWhen:t(e=>e.deployment==="container"&&e.runtime!==void 0,"refuseWhen")},{property:"codePath",reason:"`deployment=code` needs a `codePath` for `Code.fromAsset(...)`: without one the statement takes the whole app's synth down with `Cannot read properties of undefined (reading 'bind')` \u2014 naming no resource. Pass `codePath=<dir>`, or use `deployment=container`.",refuseWhen:t(e=>e.deployment==="code"&&e.code===void 0&&e.codePath===void 0,"refuseWhen")},{property:"scheduleExpression",reason:"`scheduleExpression` expands into an `app.addSchedule(...)` statement targeting this compute, and only a Lambda is a schedule target \u2014 drop it, or use `type=lambda`.",refuseWhen:t(e=>e.scheduleExpression!==void 0&&typeof e.type=="string"&&e.type!=="lambda","refuseWhen")},{property:"services",reason:'an x86 instance type mismatches the default linux/arm64 (Graviton) Docker build, so the service would pull images the instance cannot run. Use a Graviton instance type (t4g, c6g, r6g, m6g, \u2026), or set `amiHardwareType: "STANDARD"` on that service\'s `ec2Config` to acknowledge x86.',refuseWhen:t(e=>e.type==="ecs"&&Array.isArray(e.services)&&e.services.some(n=>{if(!h(n))return!1;const r=n.ec2Config;return!h(r)||typeof r.instanceType!="string"||r.instanceType===""||r.amiHardwareType!==void 0?!1:j(r.instanceType)!=="ARM"}),"refuseWhen")},{property:"architecture",reason:"`X86_64` on a container Lambda mismatches the default linux/arm64 Docker build. Use `ARM_64` (recommended), or author the statement by hand with a build pipeline that targets linux/amd64.",refuseWhen:t(e=>e.type==="lambda"&&e.deployment==="container"&&e.architecture==="X86_64","refuseWhen")}];function P(e,n){const r=e.scheduleExpression;return typeof r!="string"?{siblings:[],unprojectable:[]}:typeof e.type=="string"&&e.type!=="lambda"?{siblings:[],unprojectable:[{key:"scheduleExpression",reason:"`scheduleExpression` expands into an `app.addSchedule(...)` statement targeting this compute, and only a Lambda is a schedule target.",kind:"cross-key"}]}:n.resourceName===void 0?{siblings:[],unprojectable:[{key:"scheduleExpression",reason:"`scheduleExpression` expands into an `app.addSchedule(...)` statement whose construct id derives from the resource name, and this caller supplied none.",kind:"missing-context"}]}:{siblings:[{planKey:"scheduleExpression",constructId:`${n.resourceName}Schedule`,appMethod:"addSchedule",props:[{key:"schedule",value:{kind:"literal",value:r}},{key:"target",value:{kind:"structured",expression:{kind:"primary-binding"}}},{key:"stackPlacement",value:{kind:"literal",value:"compute"}}]}],unprojectable:[]}}t(P,"deriveScheduleSibling");const K={database:"connectedDatabase",storage:"connectedStorage",messaging:"connectedMessaging"};function N(e){const n=[],r=[];for(const p of T){const i=K[p],o=e[i];if(!Array.isArray(o)||o.length===0)continue;const c=o.filter(d=>typeof d=="string"&&d.length>0);if(c.length!==o.length){const l=typeof o.find(a=>typeof a!="string"||a.length===0)=="string"?'the empty string ""':"not a string";r.push({key:i,reason:`\`${i}\` lists sibling resources by name and one element is ${l} \u2014 nothing can be wired to a nameless resource, and dropping the element would deploy the compute with the requested wiring silently missing. Replace the element with the resource's name, or drop it.`,kind:"unresolved-binding"});continue}n.push({planKey:i,resourceType:p,names:c})}return{requests:n,unprojectable:r}}t(N,"readConnectionRequests");function _(e,n){switch(e.kind){case"accessor":return{kind:"call",callee:{kind:"member",object:{kind:"identifier",name:n},property:e.method},args:[]};case"credential":return{kind:"call",callee:{kind:"member",object:{kind:"call",callee:{kind:"member",object:{kind:"identifier",name:n},property:v.CREDENTIALS},args:[]},property:v.IMPORT},args:[{kind:"literal",value:e.credentialKey}]};case"literal":return{kind:"literal",value:e.value}}}t(_,"wiringValueToStructured");function g(e,n,r){return{props:[],unprojectable:[{key:e,reason:n,kind:r}]}}t(g,"expansionRefusal");function I(e,n){const{requests:r,unprojectable:p}=N(e);if(p.length>0)return{props:[],unprojectable:p};const i=h(e.environment)?e.environment:void 0;if(r.length===0)return{props:i!==void 0?[{key:"environment",value:{kind:"literal",value:i}}]:[],unprojectable:[]};const[o]=r;if(o===void 0)return{props:[],unprojectable:[]};if(n.editingExisting===!0)return g(o.planKey,"connection keys rebuild the statement's `environment`, `secretsImport` and `connections` props wholesale, which an edit to an existing compute cannot do safely. Wire the connection when creating the compute (`fjall add compute \u2026 connectedDatabase=<Name>`), add it from the resource's own side (`fjall add <database|storage|messaging>` connecting to this compute's services), or author the wiring in infrastructure.ts by hand.","cross-key");if(typeof e.type=="string"&&e.type!=="lambda")return g(o.planKey,"top-level connection wiring is a Lambda shape (`environment`/`secretsImport`/`connections` are Lambda construct props); an ECS cluster wires connections per SERVICE \u2014 add the resource from its own side (`fjall add <database|storage|messaging>` connecting to the services), or author the per-service wiring by hand.","cross-key");if(r.some(s=>s.resourceType==="database")&&e.needsConnection!==!0)return g("connectedDatabase","`connectedDatabase` wires only when `needsConnection` is true \u2014 database wiring is gated on it (storage and messaging wiring are not). Pass `needsConnection=true` alongside `connectedDatabase`.","cross-key");const c=[];for(const s of r){const u=n.resolveBindings?.(s.names,s.planKey);if(u===void 0)return g(s.planKey,`\`${s.planKey}\` names planned sibling resources and the wiring reads live bindings in their place; no unique ${s.resourceType} binding could be resolved for every listed name in this file.`,"unresolved-binding");c.push({request:s,variables:[...u]})}const d=new Map,l=[];for(const{request:s,variables:u}of c)u.forEach((w,E)=>{const A=x(E);for(const f of C(s.resourceType,A)){const k=_(f.value,w);f.target==="secretsImport"?l.push({key:f.key,value:k}):d.set(f.key,k)}});if(i!==void 0)for(const[s,u]of Object.entries(i))u!==void 0&&d.set(s,{kind:"literal",value:u});const a=[{key:"environment",value:{kind:"structured",expression:{kind:"object",entries:[...d].map(([s,u])=>({key:s,value:u}))}}}];return l.length>0&&a.push({key:"secretsImport",value:{kind:"structured",expression:{kind:"object",entries:l}}}),a.push({key:"connections",value:{kind:"structured",expression:{kind:"array",elements:c.flatMap(({variables:s})=>s.map(u=>({kind:"identifier",name:u})))}}}),{props:a,unprojectable:[]}}t(I,"deriveConnectionExpansion");const $={keys:{memory:{kind:"prop",as:"memorySize"},ssmSecrets:{kind:"prop",as:"secrets"},codePath:{kind:"structured",as:"code",reason:"`codePath` becomes `code: Code.fromAsset(<dir>)` and needs a non-empty directory path; nothing else can feed `Code.fromAsset`.",build:t(e=>typeof e=="string"&&e.length>0?{expression:{kind:"call",callee:y("Code","fromAsset"),args:[{kind:"literal",value:e}]},imports:["Code"]}:void 0,"build")},runtime:{kind:"structured",reason:"the construct reads a CDK `Runtime` member, so pass the MEMBER name (`NODEJS_22_X`), not a version string: `nodejs20.x` passes the plan schema but no `Runtime.<member>` expression can carry it.",build:t(e=>typeof e=="string"&&b.test(e)?{expression:y("Runtime",e),imports:["Runtime"]}:void 0,"build")},architecture:{kind:"structured",reason:"the construct reads a CDK `Architecture` member (`ARM_64`, `X86_64`); a value that is not a member name would emit an EMPTY `Architectures` list where omitting the key yields the correct default.",build:t(e=>typeof e=="string"&&b.test(e)?{expression:y("Architecture",e),imports:["Architecture"]}:void 0,"build")},functionUrl:{kind:"structured",reason:"`functionUrl.authType` is a CDK `FunctionUrlAuthType` member; the emitted prop is `{ authType: FunctionUrlAuthType.<member> }`.",build:t(e=>D(e),"build")},services:{kind:"structured",reason:"`services[].scaling.scalingType` is a CDK `ScalingType` member: written as a string it silently scales on CPU whatever was asked, so the array is re-emitted with `ScalingType.<member>` accesses.",build:t(e=>O(e),"build")},enableSSH:{kind:"transform",as:"ssh",apply:t(e=>e===!0?{}:!1,"apply")},secrets:{kind:"planOnly",reason:"the plan's `secrets` RECORD has no construct slot: the Lambda construct reads `secrets` as a string ARRAY of SSM names (the plan's `ssmSecrets`), and ECS secrets live per service \u2014 a record here lands inert and the function deploys without those secrets."},eventSources:{kind:"planOnly",reason:"zero `props.eventSources` reads exist across @fjall/components-infrastructure \u2014 the array lands inert and no event source mapping is created."},functionName:{kind:"planOnly",reason:"the Lambda construct hardcodes `functionName: id` (its construct id), so an override is never read and the function keeps the id-derived name."},keyName:{kind:"planOnly",reason:"the EC2 construct reads only the `ssh` prop's presence; `keyName` is never forwarded, so the instance launches without the named key pair."},userData:{kind:"planOnly",reason:"the EC2 construct wants a live CDK `UserData` object; a plan string is never read, so the instance boots without the requested user data."},securityGroups:{kind:"planOnly",reason:"no EC2 construct prop reads `securityGroups`; the instance deploys with the construct's own groups and the listed ones are never attached."},alarms:{kind:"planOnly",reason:"no construct reads a top-level `alarms`: ECS alarm thresholds live per service (`services[].alarms`) and the Lambda construct reads no alarm config at all, so the thresholds land inert."},...R},crossKey:M,siblings:{keys:["scheduleExpression"],derive:P},expansion:{keys:["needsConnection","connectedDatabase","connectedStorage","connectedMessaging","environment"],derive:I},constructKeyAliases:{memorySize:["memory"],description:["lambdaDescription"],secrets:["ssmSecrets"],secretsImport:["containerSecretsImport"]}};export{$ as compute};
1
+ var A=Object.defineProperty;var t=(e,n)=>A(e,"name",{value:n,configurable:!0});import{connectionEnvSuffix as T}from"../generation/common.js";import{constIncludes as C,SCHEDULE_STACK_PLACEMENTS as v}from"../schemas/constants.js";import{buildConnectionWiringEntries as j,CONNECTION_TYPE_ORDER as R,DATABASE_ACCESSORS as S}from"../generation/connectionWiring.js";import{getArchitectureForInstanceType as P}from"../schemas/instanceTypeArchitecture.js";import{roundTripKeys as D}from"./roundTripKeys.js";const g=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function y(e,n){return{kind:"member",object:{kind:"identifier",name:e},property:n}}t(y,"memberOf");function h(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}t(h,"isPlainRecord");function m(e){return Array.isArray(e)?{kind:"array",elements:e.map(m)}:h(e)?{kind:"object",entries:Object.entries(e).filter(([,n])=>n!==void 0).map(([n,s])=>({key:n,value:m(s)}))}:{kind:"literal",value:e}}t(m,"toStructuredLiteral");function O(e){if(typeof e=="string"&&g.test(e))return{expression:y("ScalingType",e),imports:["ScalingType"]}}t(O,"scalingTypeBinding");function M(e){if(!Array.isArray(e))return{expression:m(e)};let n=!1;const s=[];for(const o of e){if(!h(o))return{expression:m(e)};const i=[];for(const[a,c]of Object.entries(o)){if(c===void 0)continue;if(a!=="scaling"||!h(c)){i.push({key:a,value:m(c)});continue}const d=[];for(const[p,l]of Object.entries(c))if(l!==void 0){if(p==="scalingType"){const r=O(l);if(r!==void 0){n=!0,d.push({key:p,value:r.expression});continue}}d.push({key:p,value:m(l)})}i.push({key:a,value:{kind:"object",entries:d}})}s.push({kind:"object",entries:i})}return{expression:{kind:"array",elements:s},...n&&{imports:["ScalingType"]}}}t(M,"buildServicesBinding");function K(e){return h(e)&&Object.keys(e).length===1&&typeof e.authType=="string"&&g.test(e.authType)?{expression:{kind:"object",entries:[{key:"authType",value:y("FunctionUrlAuthType",e.authType)}]},imports:["FunctionUrlAuthType"]}:{expression:m(e)}}t(K,"buildFunctionUrlBinding");const _=[{property:"deployment",reason:"a Lambda needs a deployment mode: pass `deployment=container` (the image carries code and runtime) or `deployment=code` with a `codePath` for `Code.fromAsset(...)`.",refuseWhen:t(e=>e.type==="lambda"&&e.deployment===void 0&&e.code===void 0,"refuseWhen")},{property:"codePath",reason:"a container Lambda takes its code from the image, so `codePath` is never read \u2014 drop it, or use `deployment=code`.",refuseWhen:t(e=>e.deployment==="container"&&e.codePath!==void 0,"refuseWhen")},{property:"handler",reason:"a container Lambda takes its handler from the image (`Handler.FROM_IMAGE`), so `handler` is never read \u2014 drop it, or use `deployment=code`.",refuseWhen:t(e=>e.deployment==="container"&&e.handler!==void 0,"refuseWhen")},{property:"runtime",reason:"a container Lambda takes its runtime from the image (`Runtime.FROM_IMAGE`), so `runtime` is never read \u2014 drop it, or use `deployment=code`.",refuseWhen:t(e=>e.deployment==="container"&&e.runtime!==void 0,"refuseWhen")},{property:"codePath",reason:"`deployment=code` needs a `codePath` for `Code.fromAsset(...)`: without one the statement takes the whole app's synth down with `Cannot read properties of undefined (reading 'bind')` \u2014 naming no resource. Pass `codePath=<dir>`, or use `deployment=container`.",refuseWhen:t(e=>e.deployment==="code"&&e.code===void 0&&e.codePath===void 0,"refuseWhen")},{property:"scheduleExpression",reason:"`scheduleExpression` expands into an `app.addSchedule(...)` statement targeting this compute, and only a Lambda is a schedule target \u2014 drop it, or use `type=lambda`.",refuseWhen:t(e=>e.scheduleExpression!==void 0&&typeof e.type=="string"&&e.type!=="lambda","refuseWhen")},{property:"services",reason:'an x86 instance type mismatches the default linux/arm64 (Graviton) Docker build, so the service would pull images the instance cannot run. Use a Graviton instance type (t4g, c6g, r6g, m6g, \u2026), or set `amiHardwareType: "STANDARD"` on that service\'s `ec2Config` to acknowledge x86.',refuseWhen:t(e=>e.type==="ecs"&&Array.isArray(e.services)&&e.services.some(n=>{if(!h(n))return!1;const s=n.ec2Config;return!h(s)||typeof s.instanceType!="string"||s.instanceType===""||s.amiHardwareType!==void 0?!1:P(s.instanceType)!=="ARM"}),"refuseWhen")},{property:"architecture",reason:"`X86_64` on a container Lambda mismatches the default linux/arm64 Docker build. Use `ARM_64` (recommended), or author the statement by hand with a build pipeline that targets linux/amd64.",refuseWhen:t(e=>e.type==="lambda"&&e.deployment==="container"&&e.architecture==="X86_64","refuseWhen")}];function N(e,n){const s=e.scheduleExpression,o=e.scheduleStackPlacement;return typeof s!="string"?o!==void 0?{siblings:[],unprojectable:[{key:"scheduleStackPlacement",reason:"`scheduleStackPlacement` places the `app.addSchedule(...)` sibling statement and there is no `scheduleExpression` to place \u2014 pass `scheduleExpression=<expr>` alongside it, or drop it.",kind:"cross-key"}]}:{siblings:[],unprojectable:[]}:o!==void 0&&(typeof o!="string"||!C(v,o))?{siblings:[],unprojectable:[{key:"scheduleStackPlacement",reason:`\`scheduleStackPlacement\` must be one of ${v.map(i=>`\`${i}\``).join(", ")} \u2014 the addSchedule construct accepts no other placement.`,kind:"cross-key"}]}:typeof e.type=="string"&&e.type!=="lambda"?{siblings:[],unprojectable:[{key:"scheduleExpression",reason:"`scheduleExpression` expands into an `app.addSchedule(...)` statement targeting this compute, and only a Lambda is a schedule target.",kind:"cross-key"}]}:n.resourceName===void 0?{siblings:[],unprojectable:[{key:"scheduleExpression",reason:"`scheduleExpression` expands into an `app.addSchedule(...)` statement whose construct id derives from the resource name, and this caller supplied none.",kind:"missing-context"}]}:{siblings:[{planKey:"scheduleExpression",constructId:`${n.resourceName}Schedule`,appMethod:"addSchedule",props:[{key:"schedule",value:{kind:"literal",value:s}},{key:"target",value:{kind:"structured",expression:{kind:"primary-binding"}}},{key:"stackPlacement",value:{kind:"literal",value:o??"compute"}}]}],unprojectable:[]}}t(N,"deriveScheduleSibling");const L={database:"connectedDatabase",storage:"connectedStorage",messaging:"connectedMessaging"};function I(e){const n=[],s=[];for(const o of R){const i=L[o],a=e[i];if(!Array.isArray(a)||a.length===0)continue;const c=a.filter(d=>typeof d=="string"&&d.length>0);if(c.length!==a.length){const p=typeof a.find(l=>typeof l!="string"||l.length===0)=="string"?'the empty string ""':"not a string";s.push({key:i,reason:`\`${i}\` lists sibling resources by name and one element is ${p} \u2014 nothing can be wired to a nameless resource, and dropping the element would deploy the compute with the requested wiring silently missing. Replace the element with the resource's name, or drop it.`,kind:"unresolved-binding"});continue}n.push({planKey:i,resourceType:o,names:c})}return{requests:n,unprojectable:s}}t(I,"readConnectionRequests");function U(e,n){switch(e.kind){case"accessor":return{kind:"call",callee:{kind:"member",object:{kind:"identifier",name:n},property:e.method},args:[]};case"credential":return{kind:"call",callee:{kind:"member",object:{kind:"call",callee:{kind:"member",object:{kind:"identifier",name:n},property:S.CREDENTIALS},args:[]},property:S.IMPORT},args:[{kind:"literal",value:e.credentialKey}]};case"literal":return{kind:"literal",value:e.value}}}t(U,"wiringValueToStructured");function b(e,n,s){return{props:[],unprojectable:[{key:e,reason:n,kind:s}]}}t(b,"expansionRefusal");function W(e,n){const{requests:s,unprojectable:o}=I(e);if(o.length>0)return{props:[],unprojectable:o};const i=h(e.environment)?e.environment:void 0;if(s.length===0)return{props:i!==void 0?[{key:"environment",value:{kind:"literal",value:i}}]:[],unprojectable:[]};const[a]=s;if(a===void 0)return{props:[],unprojectable:[]};if(n.editingExisting===!0)return b(a.planKey,"connection keys rebuild the statement's `environment`, `secretsImport` and `connections` props wholesale, which an edit to an existing compute cannot do safely. Wire the connection when creating the compute (`fjall add compute \u2026 connectedDatabase=<Name>`), add it from the resource's own side (`fjall add <database|storage|messaging>` connecting to this compute's services), or author the wiring in infrastructure.ts by hand.","cross-key");if(typeof e.type=="string"&&e.type!=="lambda")return b(a.planKey,"top-level connection wiring is a Lambda shape (`environment`/`secretsImport`/`connections` are Lambda construct props); an ECS cluster wires connections per SERVICE \u2014 add the resource from its own side (`fjall add <database|storage|messaging>` connecting to the services), or author the per-service wiring by hand.","cross-key");if(s.some(r=>r.resourceType==="database")&&e.needsConnection!==!0)return b("connectedDatabase","`connectedDatabase` wires only when `needsConnection` is true \u2014 database wiring is gated on it (storage and messaging wiring are not). Pass `needsConnection=true` alongside `connectedDatabase`.","cross-key");const c=[];for(const r of s){const u=n.resolveBindings?.(r.names,r.planKey);if(u===void 0)return b(r.planKey,`\`${r.planKey}\` names planned sibling resources and the wiring reads live bindings in their place; no unique ${r.resourceType} binding could be resolved for every listed name in this file.`,"unresolved-binding");c.push({request:r,variables:[...u]})}const d=new Map,p=[];for(const{request:r,variables:u}of c)u.forEach((E,w)=>{const x=T(w);for(const f of j(r.resourceType,x)){const k=U(f.value,E);f.target==="secretsImport"?p.push({key:f.key,value:k}):d.set(f.key,k)}});if(i!==void 0)for(const[r,u]of Object.entries(i))u!==void 0&&d.set(r,{kind:"literal",value:u});const l=[{key:"environment",value:{kind:"structured",expression:{kind:"object",entries:[...d].map(([r,u])=>({key:r,value:u}))}}}];return p.length>0&&l.push({key:"secretsImport",value:{kind:"structured",expression:{kind:"object",entries:p}}}),l.push({key:"connections",value:{kind:"structured",expression:{kind:"array",elements:c.flatMap(({variables:r})=>r.map(u=>({kind:"identifier",name:u})))}}}),{props:l,unprojectable:[]}}t(W,"deriveConnectionExpansion");const H={keys:{memory:{kind:"prop",as:"memorySize"},ssmSecrets:{kind:"prop",as:"secrets"},codePath:{kind:"structured",as:"code",reason:"`codePath` becomes `code: Code.fromAsset(<dir>)` and needs a non-empty directory path; nothing else can feed `Code.fromAsset`.",build:t(e=>typeof e=="string"&&e.length>0?{expression:{kind:"call",callee:y("Code","fromAsset"),args:[{kind:"literal",value:e}]},imports:["Code"]}:void 0,"build")},runtime:{kind:"structured",reason:"the construct reads a CDK `Runtime` member, so pass the MEMBER name (`NODEJS_22_X`), not a version string: `nodejs20.x` passes the plan schema but no `Runtime.<member>` expression can carry it.",build:t(e=>typeof e=="string"&&g.test(e)?{expression:y("Runtime",e),imports:["Runtime"]}:void 0,"build")},architecture:{kind:"structured",reason:"the construct reads a CDK `Architecture` member (`ARM_64`, `X86_64`); a value that is not a member name would emit an EMPTY `Architectures` list where omitting the key yields the correct default.",build:t(e=>typeof e=="string"&&g.test(e)?{expression:y("Architecture",e),imports:["Architecture"]}:void 0,"build")},functionUrl:{kind:"structured",reason:"`functionUrl.authType` is a CDK `FunctionUrlAuthType` member; the emitted prop is `{ authType: FunctionUrlAuthType.<member> }`.",build:t(e=>K(e),"build")},services:{kind:"structured",reason:"`services[].scaling.scalingType` is a CDK `ScalingType` member: written as a string it silently scales on CPU whatever was asked, so the array is re-emitted with `ScalingType.<member>` accesses.",build:t(e=>M(e),"build")},enableSSH:{kind:"transform",as:"ssh",apply:t(e=>e===!0?{}:!1,"apply")},secrets:{kind:"planOnly",reason:"the plan's `secrets` RECORD has no construct slot: the Lambda construct reads `secrets` as a string ARRAY of SSM names (the plan's `ssmSecrets`), and ECS secrets live per service \u2014 a record here lands inert and the function deploys without those secrets."},eventSources:{kind:"planOnly",reason:"zero `props.eventSources` reads exist across @fjall/components-infrastructure \u2014 the array lands inert and no event source mapping is created."},functionName:{kind:"planOnly",reason:"the Lambda construct hardcodes `functionName: id` (its construct id), so an override is never read and the function keeps the id-derived name."},keyName:{kind:"planOnly",reason:"the EC2 construct reads only the `ssh` prop's presence; `keyName` is never forwarded, so the instance launches without the named key pair."},userData:{kind:"planOnly",reason:"the EC2 construct wants a live CDK `UserData` object; a plan string is never read, so the instance boots without the requested user data."},securityGroups:{kind:"planOnly",reason:"no EC2 construct prop reads `securityGroups`; the instance deploys with the construct's own groups and the listed ones are never attached."},alarms:{kind:"planOnly",reason:"no construct reads a top-level `alarms`: ECS alarm thresholds live per service (`services[].alarms`) and the Lambda construct reads no alarm config at all, so the thresholds land inert."},...D},crossKey:_,siblings:{keys:["scheduleExpression","scheduleStackPlacement"],derive:N},expansion:{keys:["needsConnection","connectedDatabase","connectedStorage","connectedMessaging","environment"],derive:W},constructKeyAliases:{memorySize:["memory"],description:["lambdaDescription"],secrets:["ssmSecrets"],secretsImport:["containerSecretsImport"]}};export{H as compute,O as scalingTypeBinding};
@@ -734,6 +734,10 @@ export declare const ApplicationResourcePlanSchema: z.ZodObject<{
734
734
  }, z.core.$strict>>;
735
735
  description: z.ZodOptional<z.ZodString>;
736
736
  scheduleExpression: z.ZodOptional<z.ZodString>;
737
+ scheduleStackPlacement: z.ZodOptional<z.ZodEnum<{
738
+ compute: "compute";
739
+ messaging: "messaging";
740
+ }>>;
737
741
  architecture: z.ZodOptional<z.ZodEnum<{
738
742
  ARM_64: "ARM_64";
739
743
  X86_64: "X86_64";
@@ -879,12 +883,12 @@ export declare const ApplicationResourcePlanSchema: z.ZodObject<{
879
883
  storage: "storage";
880
884
  database: "database";
881
885
  compute: "compute";
886
+ messaging: "messaging";
882
887
  pattern: "pattern";
883
888
  import: "import";
884
889
  "app-init": "app-init";
885
890
  tags: "tags";
886
891
  network: "network";
887
- messaging: "messaging";
888
892
  cdn: "cdn";
889
893
  "vpc-peer": "vpc-peer";
890
894
  "vpc-peer-accepter": "vpc-peer-accepter";
@@ -119,12 +119,12 @@ export declare const AstStatementTypeSchema: z.ZodEnum<{
119
119
  storage: "storage";
120
120
  database: "database";
121
121
  compute: "compute";
122
+ messaging: "messaging";
122
123
  pattern: "pattern";
123
124
  import: "import";
124
125
  "app-init": "app-init";
125
126
  tags: "tags";
126
127
  network: "network";
127
- messaging: "messaging";
128
128
  cdn: "cdn";
129
129
  "vpc-peer": "vpc-peer";
130
130
  "vpc-peer-accepter": "vpc-peer-accepter";
@@ -151,12 +151,12 @@ export declare const CustomCodeBlockSchema: z.ZodObject<{
151
151
  storage: "storage";
152
152
  database: "database";
153
153
  compute: "compute";
154
+ messaging: "messaging";
154
155
  pattern: "pattern";
155
156
  import: "import";
156
157
  "app-init": "app-init";
157
158
  tags: "tags";
158
159
  network: "network";
159
- messaging: "messaging";
160
160
  cdn: "cdn";
161
161
  "vpc-peer": "vpc-peer";
162
162
  "vpc-peer-accepter": "vpc-peer-accepter";
@@ -496,6 +496,10 @@ export declare const ComputeResourcePlanSchema: z.ZodObject<{
496
496
  }, z.core.$strict>>;
497
497
  description: z.ZodOptional<z.ZodString>;
498
498
  scheduleExpression: z.ZodOptional<z.ZodString>;
499
+ scheduleStackPlacement: z.ZodOptional<z.ZodEnum<{
500
+ compute: "compute";
501
+ messaging: "messaging";
502
+ }>>;
499
503
  architecture: z.ZodOptional<z.ZodEnum<{
500
504
  ARM_64: "ARM_64";
501
505
  X86_64: "X86_64";
@@ -1 +1 @@
1
- var W=Object.defineProperty;var h=(n,t)=>W(n,"name",{value:t,configurable:!0});import{z as e}from"zod";import{VALIDATION_PATTERNS as m,VALIDATION_MESSAGES as o}from"../validation/patterns.js";import{COMPUTE_TYPES as f,ECS_CAPACITY_PROVIDERS as O,EC2_INSTANCE_TYPES as w,HTTP_METHODS as V,MIN_LAMBDA_MEMORY as K,MAX_LAMBDA_MEMORY as F,MIN_LAMBDA_TIMEOUT as S,MAX_LAMBDA_TIMEOUT as N,MIN_ECS_CAPACITY as x,MAX_ECS_CAPACITY as L,MAX_SCALING_CAPACITY as p,MAX_WARM_POOL_SIZE as Q,constIncludes as Z,COMPUTE_ARCHITECTURES as z,FUNCTION_URL_AUTH_TYPES as D,DEPLOYMENT_TYPES as $,AMI_HARDWARE_TYPES as q,LOAD_BALANCER_TYPES as J,SCALING_TYPES as ee,ECS_SERVICE_TYPES as H}from"./constants.js";import{validateArchitectureMatch as oe,getArchitectureForInstanceType as ne}from"./instanceTypeArchitecture.js";import{optionalOrDisabled as te,CAPACITY_REFINEMENT as r,memoryLimitMiBSchema as I,ResourceNameSchema as c,AppNameSchema as s,PortSchema as T,ExtraPropertySchema as E,EnvironmentRecordSchema as l,SecretsImportRecordSchema as ie}from"./baseSchemas.js";import{DockerBuildSchema as A}from"@fjall/util/manifest/schemas";import{EcsServiceAlarmConfigSchema as ae,LambdaAlarmConfigSchema as re}from"./alarmSchemas.js";function ce(n){return!(n.image!==void 0&&n.docker!==void 0)}h(ce,"imageDockerMutexCheck");const G=e.number().int(o.CAPACITY.MIN.INTEGER).min(x,o.GENERATOR_CAPACITY.MIN.MIN).max(L,o.GENERATOR_CAPACITY.MIN.MAX),U=e.number().int(o.CAPACITY.MAX.INTEGER).min(x,o.GENERATOR_CAPACITY.MAX.MIN).max(L,o.GENERATOR_CAPACITY.MAX.MAX),g=e.number().int(o.LAMBDA.MEMORY.INTEGER).min(K,o.LAMBDA.MEMORY.MIN).max(F,o.LAMBDA.MEMORY.MAX).refine(n=>n===128||n%64===0,o.LAMBDA.MEMORY.MULTIPLE),Y=e.string().regex(m.LAMBDA_RUNTIME_IDENTIFIER,o.LAMBDA.RUNTIME),d=e.number().int(o.CPU.INTEGER).min(256,o.CPU.MIN).max(4096,o.CPU.MAX),u=e.number().int(o.CAPACITY.DESIRED.INTEGER).min(0,o.CAPACITY.DESIRED.MIN).max(p,o.CAPACITY.DESIRED.MAX),C=e.object({connectToDatabase:e.array(e.string()).optional()}).strict(),se=e.object({minSize:e.number().int(o.CAPACITY.WARM_POOL.MIN_SIZE.INTEGER).min(0,o.CAPACITY.WARM_POOL.MIN_SIZE.MIN).max(Q,o.CAPACITY.WARM_POOL.MIN_SIZE.MAX).optional(),reuseOnScaleIn:e.boolean().optional()}).strict(),_=e.object({instanceType:e.string().optional(),amiHardwareType:e.enum(q).optional(),minCapacity:e.number().int(o.CAPACITY.MIN.INTEGER).min(0,o.CAPACITY.MIN.MIN_0).max(p,o.CAPACITY.MIN.MAX).optional(),maxCapacity:e.number().int(o.CAPACITY.MAX.INTEGER).min(1,o.CAPACITY.MAX.MIN_1).max(p,o.CAPACITY.MAX.MAX).optional(),memoryLimitMiB:I(128).optional(),warmPool:se.optional(),extraProperties:e.array(E).optional()}).strict().superRefine((n,t)=>{if(!n.instanceType||!n.amiHardwareType)return;const i=oe(n.instanceType,n.amiHardwareType);i.valid||t.addIssue({code:"custom",message:i.message??o.ARCHITECTURE_MISMATCH,path:["instanceType"]})}).superRefine((n,t)=>{n.minCapacity===0&&!n.warmPool&&t.addIssue({code:"custom",message:o.CAPACITY.WARM_POOL_REQUIRED,path:["minCapacity"]}),n.warmPool?.minSize!==void 0&&n.maxCapacity!==void 0&&n.warmPool.minSize>n.maxCapacity&&t.addIssue({code:"custom",message:o.CAPACITY.WARM_POOL.MIN_SIZE_EXCEEDS_MAX_CAPACITY,path:["warmPool","minSize"]})}),me=e.enum(f).describe(`Compute type must be one of: ${f.join(", ")}`),y=e.enum(O).describe(`ECS capacity provider must be one of: ${O.join(", ")}`),P=e.string().refine(n=>Z(w,n),{message:o.INSTANCE_TYPE}),v=e.object({sourceType:e.enum(["sqs","dynamodb","eventbridge"]),sourceRef:e.string().describe("Name of the source resource"),batchSize:e.number().int(o.BATCH_SIZE.INTEGER).min(1,o.BATCH_SIZE.MIN).max(1e4,o.BATCH_SIZE.MAX).optional(),startingPosition:e.enum(["TRIM_HORIZON","LATEST"]).optional(),maxBatchingWindow:e.number().int(o.BATCHING_WINDOW.INTEGER).min(0,o.BATCHING_WINDOW.MIN).max(300,o.BATCHING_WINDOW.MAX).optional(),reportBatchItemFailures:e.boolean().optional()}).strict(),pe=e.object({name:e.string().min(1,o.REQUIRED.CONTAINER_NAME).optional(),image:e.string().optional(),port:T.optional(),environment:l.optional(),secretsImport:ie.optional(),command:e.array(e.string()).optional(),entryPoint:e.array(e.string()).optional(),essential:e.boolean().optional(),healthCheck:e.object({command:e.array(e.string()),interval:e.number().int(o.HEALTH_CHECK.INTERVAL.INTEGER).min(5,o.HEALTH_CHECK.INTERVAL.MIN).max(300,o.HEALTH_CHECK.INTERVAL.MAX).optional(),timeout:e.number().int(o.HEALTH_CHECK.TIMEOUT.INTEGER).min(2,o.HEALTH_CHECK.TIMEOUT.MIN).max(60,o.HEALTH_CHECK.TIMEOUT.MAX).optional(),retries:e.number().int(o.HEALTH_CHECK.RETRIES.INTEGER).min(1,o.HEALTH_CHECK.RETRIES.MIN).max(10,o.HEALTH_CHECK.RETRIES.MAX).optional(),startPeriod:e.number().int(o.HEALTH_CHECK.START_PERIOD.INTEGER).min(0,o.HEALTH_CHECK.START_PERIOD.MIN).max(300,o.HEALTH_CHECK.START_PERIOD.MAX).optional()}).strict().optional(),ssmSecrets:e.array(e.string().regex(m.SECRET_NAME,o.SECRET_NAME)).optional(),extraProperties:e.array(E).optional()}).strict(),B=e.string().min(1,o.REQUIRED.SERVICE_NAME).max(255,o.MAX_LENGTH.SERVICE_NAME).regex(m.ECS_SERVICE_NAME,o.ECS_SERVICE_NAME),X=e.object({domain:e.string().optional(),loadBalancer:e.union([e.literal(!1),e.enum(J)]).optional(),directAccess:e.boolean().optional(),extraProperties:e.array(E).optional()}).strict().refine(n=>!(n.directAccess&&n.domain),{message:o.DIRECT_ACCESS.NO_DOMAIN,path:["directAccess"]}).refine(n=>!(n.directAccess&&typeof n.loadBalancer=="string"),{message:o.DIRECT_ACCESS.NO_LOAD_BALANCER}).describe("Cluster-level configuration"),M=e.object({path:e.string().optional(),host:e.string().optional(),priority:e.number().int(o.PRIORITY.INTEGER).min(1,o.PRIORITY.MIN).max(5e4,o.PRIORITY.MAX).optional(),healthCheckPath:e.string().optional()}).strict().describe("Path/host-based routing configuration"),Ee=e.object({desiredCount:u.optional(),minCapacity:e.number().int(o.CAPACITY.MIN.INTEGER).min(0,o.CAPACITY.MIN.MIN_0).max(p,o.CAPACITY.MIN.MAX).optional(),maxCapacity:e.number().int(o.CAPACITY.MAX.INTEGER).min(1,o.CAPACITY.MAX.MIN_1).max(p,o.CAPACITY.MAX.MAX).optional(),scalingType:e.enum(ee).optional()}).strict().refine(r.check,r.params).describe("ECS service scaling configuration"),j=e.object({name:B,docker:A.optional(),needsDatabaseConnection:e.boolean().optional(),needsStorageConnection:e.boolean().optional(),needsMessagingConnection:e.boolean().optional(),image:e.string().optional(),containers:e.array(pe).optional(),routing:e.union([M,e.array(M).min(1)]).optional(),serviceType:e.enum(H).optional(),cpu:d.optional(),memoryLimitMiB:I(512).optional(),desiredCount:u.optional(),scaling:te(Ee).optional(),capacityProvider:y,ec2Config:_.optional(),ssmSecretsPath:e.string().regex(m.SSM_PATH,o.SSM_PATH).optional(),extraProperties:e.array(E).optional(),alarms:ae.optional()}).strict().superRefine((n,t)=>{ce(n)||t.addIssue({code:"custom",path:["docker"],message:o.IMAGE_DOCKER_MUTEX})}).describe("Configuration for a service in an ECS cluster"),de=e.object({name:c,type:me,needsConnection:e.boolean(),connectedDatabase:e.array(e.string().min(1,o.REQUIRED.CONNECTED_RESOURCE_NAME)).optional(),connectedStorage:e.array(e.string().min(1,o.REQUIRED.CONNECTED_RESOURCE_NAME)).optional(),connectedMessaging:e.array(e.string().min(1,o.REQUIRED.CONNECTED_RESOURCE_NAME)).optional(),cluster:X.optional(),services:e.array(j).optional(),docker:A.partial().optional(),deployment:e.enum($).optional(),codePath:e.string().optional(),timeout:e.number().int(o.LAMBDA.TIMEOUT.INTEGER).min(S,o.LAMBDA.TIMEOUT.MIN).max(N,o.LAMBDA.TIMEOUT.MAX).optional(),memory:g.optional(),handler:e.string().optional(),runtime:Y.optional(),environment:l.optional(),secrets:l.optional(),eventSources:e.array(v).optional(),functionUrl:e.object({authType:e.enum(D)}).strict().optional(),description:e.string().optional(),scheduleExpression:e.string().optional(),architecture:e.enum(z).optional(),ephemeralStorageSize:e.number().int(o.EPHEMERAL_STORAGE.INTEGER).min(512,o.EPHEMERAL_STORAGE.MIN).max(10240,o.EPHEMERAL_STORAGE.MAX).optional(),functionName:e.string().optional(),ssmSecrets:e.array(e.string()).optional(),ssmSecretsPath:e.string().optional(),alarms:re.optional(),instanceType:P.optional(),enableSSH:e.boolean().optional(),keyName:e.string().optional(),userData:e.string().optional(),securityGroups:e.array(e.string()).optional(),variableName:e.string().optional(),extraProperties:e.array(E).optional()}).strict().superRefine((n,t)=>{if(n.type==="ecs"&&n.services)for(let i=0;i<n.services.length;i++){const a=n.services[i];a?.ec2Config?.instanceType&&!a.ec2Config.amiHardwareType&&ne(a.ec2Config.instanceType)!=="ARM"&&t.addIssue({code:"custom",message:`Service '${a.name??i}' uses instance type '${a.ec2Config.instanceType}' (x86), which requires Docker images built for linux/amd64. The default build targets linux/arm64 (Graviton). Use a Graviton instance type (t4g, c6g, r6g, m6g, etc.) or set amiHardwareType: "STANDARD" to acknowledge x86.`,path:["services",i,"ec2Config","instanceType"]})}n.type==="lambda"&&n.deployment==="container"&&n.architecture==="X86_64"&&t.addIssue({code:"custom",message:"Lambda architecture 'X86_64' requires Docker images built for linux/amd64, but the default build targets linux/arm64. Use 'ARM_64' for Graviton Lambdas (recommended) or ensure your build pipeline targets linux/amd64.",path:["architecture"]})}),_e=e.object({appName:s,clusterName:c,containerPort:T,nameProvidedByFlag:e.boolean().optional(),ecrRepository:e.string().optional(),capacityProvider:y.optional(),useAppEcr:e.boolean().optional(),desiredCount:u.optional(),cpu:d.optional(),memoryLimitMiB:I(512).optional(),minCapacity:G.optional(),maxCapacity:U.optional(),ec2Config:_.optional(),connectionConfig:C.optional()}).strict().refine(r.check,r.params),ye=e.object({appName:s,functionName:c,nameProvidedByFlag:e.boolean().optional(),lambdaType:e.enum(["basic","web","custom"]).optional(),ecrRepository:e.string().optional(),timeout:e.number().int(o.LAMBDA.TIMEOUT.INTEGER).min(S,o.LAMBDA.TIMEOUT.MIN).max(N,o.LAMBDA.TIMEOUT.MAX).optional(),memory:g.optional(),enableFunctionUrl:e.boolean().optional(),description:e.string().optional(),enableCors:e.boolean().optional(),corsOrigins:e.string().optional(),corsHeaders:e.string().optional(),corsMethods:e.array(e.enum(V)).optional(),corsCredentials:e.boolean().optional(),connectionConfig:C.optional()}).strict(),Pe=e.object({appName:s,instanceName:c,nameProvidedByFlag:e.boolean().optional(),instanceType:P.optional(),enableSSH:e.boolean().optional(),minCapacity:G.optional(),maxCapacity:U.optional(),connectionConfig:C.optional()}).strict().refine(r.check,r.params),be=e.object({appName:s,clusterName:c,serviceName:B,capacityProvider:y,containerPort:T.optional(),cpu:d.optional(),memoryLimitMiB:I(512).optional(),desiredCount:u.optional(),ec2Config:_.optional(),routing:e.union([M,e.array(M).min(1)]).optional(),docker:A.partial().optional(),nameProvidedByFlag:e.boolean().optional(),connectionConfig:C.optional()}).strict(),b=e.object({appName:s,computeName:c,nameProvidedByFlag:e.boolean().optional(),connectionConfig:C.optional()}).strict(),le=b.extend({type:e.literal("ecs"),cluster:X.optional(),services:e.array(j).min(1,o.SERVICE.MIN_REQUIRED),docker:A.partial().optional()}).strict().refine(n=>{const t=n.services.filter(i=>i.containers?.some(a=>a.port));return t.length>1?t.every(i=>(Array.isArray(i.routing)?i.routing:i.routing?[i.routing]:[]).some(R=>R.path||R.host)):!0},{message:o.SERVICE.ROUTING_REQUIRED}).refine(n=>{const t=n.services.map(i=>i.name);return new Set(t).size===t.length},{message:o.SERVICE.UNIQUE_WITHIN_CLUSTER}),Ae=b.extend({type:e.literal("lambda"),timeout:e.number().int(o.LAMBDA.TIMEOUT.INTEGER).min(S,o.LAMBDA.TIMEOUT.MIN).max(N,o.LAMBDA.TIMEOUT.MAX).optional(),memory:g.optional(),handler:e.string().optional(),runtime:Y.optional(),environment:l.optional(),secrets:l.optional(),description:e.string().optional(),functionUrl:e.union([e.object({authType:e.enum(D).optional()}).strict(),e.literal(!1)]).optional(),eventSources:e.array(v).optional()}).strict(),Ce=b.extend({type:e.literal("ec2"),instanceType:P.optional(),enableSSH:e.boolean().optional(),keyName:e.string().optional(),userData:e.string().optional(),securityGroups:e.array(e.string()).optional()}).strict(),he=e.discriminatedUnion("type",[le,Ae,Ce]),k=e.object({path:e.string().min(1,o.REQUIRED.ROUTING_PATH),priority:e.number().int(o.PRIORITY.INTEGER).min(1,o.PRIORITY.MIN).max(5e4,o.PRIORITY.MAX).optional()}).strict(),fe=e.object({name:e.string().min(1,o.REQUIRED.SERVICE_NAME).max(255,o.MAX_LENGTH.SERVICE_NAME).regex(m.RESOURCE_NAME,o.RESOURCE_NAME),serviceType:e.enum(H).optional(),docker:A.partial().optional(),containerPort:T.optional(),needsDatabaseConnection:e.boolean().optional(),routing:e.union([k,e.array(k).min(1)]).optional()}).strict().superRefine((n,t)=>{n.serviceType==="worker"&&(n.containerPort!==void 0&&t.addIssue({code:"custom",path:["containerPort"],message:"Worker services are not reachable inbound; remove containerPort."}),n.routing!==void 0&&t.addIssue({code:"custom",path:["routing"],message:"Worker services have no ALB route; remove routing."}))}),Oe=e.object({appName:s,instanceType:e.string().optional()}).strict();export{be as AddServiceGeneratorSchema,fe as ApplicationServiceConfigSchema,k as ApplicationServiceRoutingSchema,he as ComputeGeneratorSchema,de as ComputeResourcePlanSchema,me as ComputeTypeSchema,pe as ContainerConfigSchema,Pe as EC2GeneratorSchema,_e as ECSGeneratorSchema,_ as Ec2ConfigSchema,y as EcsCapacityProviderSchema,X as EcsClusterConfigSchema,M as EcsRoutingConfigSchema,Ee as EcsScalingConfigSchema,j as EcsServiceConfigSchema,B as EcsServiceNameSchema,P as InstanceTypeSchema,v as LambdaEventSourceSchema,ye as LambdaGeneratorSchema,g as LambdaMemorySchema,Y as LambdaRuntimeSchema,Oe as TunnelGeneratorSchema,se as WarmPoolSchema};
1
+ var W=Object.defineProperty;var h=(n,t)=>W(n,"name",{value:t,configurable:!0});import{z as e}from"zod";import{VALIDATION_PATTERNS as m,VALIDATION_MESSAGES as o}from"../validation/patterns.js";import{COMPUTE_TYPES as f,ECS_CAPACITY_PROVIDERS as O,EC2_INSTANCE_TYPES as w,HTTP_METHODS as V,MIN_LAMBDA_MEMORY as K,MAX_LAMBDA_MEMORY as F,MIN_LAMBDA_TIMEOUT as S,MAX_LAMBDA_TIMEOUT as N,MIN_ECS_CAPACITY as x,MAX_ECS_CAPACITY as L,MAX_SCALING_CAPACITY as p,MAX_WARM_POOL_SIZE as Q,constIncludes as Z,COMPUTE_ARCHITECTURES as z,FUNCTION_URL_AUTH_TYPES as D,DEPLOYMENT_TYPES as $,AMI_HARDWARE_TYPES as q,LOAD_BALANCER_TYPES as J,SCALING_TYPES as ee,SCHEDULE_STACK_PLACEMENTS as oe,ECS_SERVICE_TYPES as H}from"./constants.js";import{validateArchitectureMatch as ne,getArchitectureForInstanceType as te}from"./instanceTypeArchitecture.js";import{optionalOrDisabled as ie,CAPACITY_REFINEMENT as r,memoryLimitMiBSchema as I,ResourceNameSchema as c,AppNameSchema as s,PortSchema as T,ExtraPropertySchema as E,EnvironmentRecordSchema as l,SecretsImportRecordSchema as ae}from"./baseSchemas.js";import{DockerBuildSchema as A}from"@fjall/util/manifest/schemas";import{EcsServiceAlarmConfigSchema as re,LambdaAlarmConfigSchema as ce}from"./alarmSchemas.js";function se(n){return!(n.image!==void 0&&n.docker!==void 0)}h(se,"imageDockerMutexCheck");const G=e.number().int(o.CAPACITY.MIN.INTEGER).min(x,o.GENERATOR_CAPACITY.MIN.MIN).max(L,o.GENERATOR_CAPACITY.MIN.MAX),U=e.number().int(o.CAPACITY.MAX.INTEGER).min(x,o.GENERATOR_CAPACITY.MAX.MIN).max(L,o.GENERATOR_CAPACITY.MAX.MAX),g=e.number().int(o.LAMBDA.MEMORY.INTEGER).min(K,o.LAMBDA.MEMORY.MIN).max(F,o.LAMBDA.MEMORY.MAX).refine(n=>n===128||n%64===0,o.LAMBDA.MEMORY.MULTIPLE),Y=e.string().regex(m.LAMBDA_RUNTIME_IDENTIFIER,o.LAMBDA.RUNTIME),d=e.number().int(o.CPU.INTEGER).min(256,o.CPU.MIN).max(4096,o.CPU.MAX),u=e.number().int(o.CAPACITY.DESIRED.INTEGER).min(0,o.CAPACITY.DESIRED.MIN).max(p,o.CAPACITY.DESIRED.MAX),C=e.object({connectToDatabase:e.array(e.string()).optional()}).strict(),me=e.object({minSize:e.number().int(o.CAPACITY.WARM_POOL.MIN_SIZE.INTEGER).min(0,o.CAPACITY.WARM_POOL.MIN_SIZE.MIN).max(Q,o.CAPACITY.WARM_POOL.MIN_SIZE.MAX).optional(),reuseOnScaleIn:e.boolean().optional()}).strict(),_=e.object({instanceType:e.string().optional(),amiHardwareType:e.enum(q).optional(),minCapacity:e.number().int(o.CAPACITY.MIN.INTEGER).min(0,o.CAPACITY.MIN.MIN_0).max(p,o.CAPACITY.MIN.MAX).optional(),maxCapacity:e.number().int(o.CAPACITY.MAX.INTEGER).min(1,o.CAPACITY.MAX.MIN_1).max(p,o.CAPACITY.MAX.MAX).optional(),memoryLimitMiB:I(128).optional(),warmPool:me.optional(),extraProperties:e.array(E).optional()}).strict().superRefine((n,t)=>{if(!n.instanceType||!n.amiHardwareType)return;const i=ne(n.instanceType,n.amiHardwareType);i.valid||t.addIssue({code:"custom",message:i.message??o.ARCHITECTURE_MISMATCH,path:["instanceType"]})}).superRefine((n,t)=>{n.minCapacity===0&&!n.warmPool&&t.addIssue({code:"custom",message:o.CAPACITY.WARM_POOL_REQUIRED,path:["minCapacity"]}),n.warmPool?.minSize!==void 0&&n.maxCapacity!==void 0&&n.warmPool.minSize>n.maxCapacity&&t.addIssue({code:"custom",message:o.CAPACITY.WARM_POOL.MIN_SIZE_EXCEEDS_MAX_CAPACITY,path:["warmPool","minSize"]})}),pe=e.enum(f).describe(`Compute type must be one of: ${f.join(", ")}`),y=e.enum(O).describe(`ECS capacity provider must be one of: ${O.join(", ")}`),P=e.string().refine(n=>Z(w,n),{message:o.INSTANCE_TYPE}),v=e.object({sourceType:e.enum(["sqs","dynamodb","eventbridge"]),sourceRef:e.string().describe("Name of the source resource"),batchSize:e.number().int(o.BATCH_SIZE.INTEGER).min(1,o.BATCH_SIZE.MIN).max(1e4,o.BATCH_SIZE.MAX).optional(),startingPosition:e.enum(["TRIM_HORIZON","LATEST"]).optional(),maxBatchingWindow:e.number().int(o.BATCHING_WINDOW.INTEGER).min(0,o.BATCHING_WINDOW.MIN).max(300,o.BATCHING_WINDOW.MAX).optional(),reportBatchItemFailures:e.boolean().optional()}).strict(),Ee=e.object({name:e.string().min(1,o.REQUIRED.CONTAINER_NAME).optional(),image:e.string().optional(),port:T.optional(),environment:l.optional(),secretsImport:ae.optional(),command:e.array(e.string()).optional(),entryPoint:e.array(e.string()).optional(),essential:e.boolean().optional(),healthCheck:e.object({command:e.array(e.string()),interval:e.number().int(o.HEALTH_CHECK.INTERVAL.INTEGER).min(5,o.HEALTH_CHECK.INTERVAL.MIN).max(300,o.HEALTH_CHECK.INTERVAL.MAX).optional(),timeout:e.number().int(o.HEALTH_CHECK.TIMEOUT.INTEGER).min(2,o.HEALTH_CHECK.TIMEOUT.MIN).max(60,o.HEALTH_CHECK.TIMEOUT.MAX).optional(),retries:e.number().int(o.HEALTH_CHECK.RETRIES.INTEGER).min(1,o.HEALTH_CHECK.RETRIES.MIN).max(10,o.HEALTH_CHECK.RETRIES.MAX).optional(),startPeriod:e.number().int(o.HEALTH_CHECK.START_PERIOD.INTEGER).min(0,o.HEALTH_CHECK.START_PERIOD.MIN).max(300,o.HEALTH_CHECK.START_PERIOD.MAX).optional()}).strict().optional(),ssmSecrets:e.array(e.string().regex(m.SECRET_NAME,o.SECRET_NAME)).optional(),extraProperties:e.array(E).optional()}).strict(),B=e.string().min(1,o.REQUIRED.SERVICE_NAME).max(255,o.MAX_LENGTH.SERVICE_NAME).regex(m.ECS_SERVICE_NAME,o.ECS_SERVICE_NAME),X=e.object({domain:e.string().optional(),loadBalancer:e.union([e.literal(!1),e.enum(J)]).optional(),directAccess:e.boolean().optional(),extraProperties:e.array(E).optional()}).strict().refine(n=>!(n.directAccess&&n.domain),{message:o.DIRECT_ACCESS.NO_DOMAIN,path:["directAccess"]}).refine(n=>!(n.directAccess&&typeof n.loadBalancer=="string"),{message:o.DIRECT_ACCESS.NO_LOAD_BALANCER}).describe("Cluster-level configuration"),M=e.object({path:e.string().optional(),host:e.string().optional(),priority:e.number().int(o.PRIORITY.INTEGER).min(1,o.PRIORITY.MIN).max(5e4,o.PRIORITY.MAX).optional(),healthCheckPath:e.string().optional()}).strict().describe("Path/host-based routing configuration"),le=e.object({desiredCount:u.optional(),minCapacity:e.number().int(o.CAPACITY.MIN.INTEGER).min(0,o.CAPACITY.MIN.MIN_0).max(p,o.CAPACITY.MIN.MAX).optional(),maxCapacity:e.number().int(o.CAPACITY.MAX.INTEGER).min(1,o.CAPACITY.MAX.MIN_1).max(p,o.CAPACITY.MAX.MAX).optional(),scalingType:e.enum(ee).optional()}).strict().refine(r.check,r.params).describe("ECS service scaling configuration"),k=e.object({name:B,docker:A.optional(),needsDatabaseConnection:e.boolean().optional(),needsStorageConnection:e.boolean().optional(),needsMessagingConnection:e.boolean().optional(),image:e.string().optional(),containers:e.array(Ee).optional(),routing:e.union([M,e.array(M).min(1)]).optional(),serviceType:e.enum(H).optional(),cpu:d.optional(),memoryLimitMiB:I(512).optional(),desiredCount:u.optional(),scaling:ie(le).optional(),capacityProvider:y,ec2Config:_.optional(),ssmSecretsPath:e.string().regex(m.SSM_PATH,o.SSM_PATH).optional(),extraProperties:e.array(E).optional(),alarms:re.optional()}).strict().superRefine((n,t)=>{se(n)||t.addIssue({code:"custom",path:["docker"],message:o.IMAGE_DOCKER_MUTEX})}).describe("Configuration for a service in an ECS cluster"),_e=e.object({name:c,type:pe,needsConnection:e.boolean(),connectedDatabase:e.array(e.string().min(1,o.REQUIRED.CONNECTED_RESOURCE_NAME)).optional(),connectedStorage:e.array(e.string().min(1,o.REQUIRED.CONNECTED_RESOURCE_NAME)).optional(),connectedMessaging:e.array(e.string().min(1,o.REQUIRED.CONNECTED_RESOURCE_NAME)).optional(),cluster:X.optional(),services:e.array(k).optional(),docker:A.partial().optional(),deployment:e.enum($).optional(),codePath:e.string().optional(),timeout:e.number().int(o.LAMBDA.TIMEOUT.INTEGER).min(S,o.LAMBDA.TIMEOUT.MIN).max(N,o.LAMBDA.TIMEOUT.MAX).optional(),memory:g.optional(),handler:e.string().optional(),runtime:Y.optional(),environment:l.optional(),secrets:l.optional(),eventSources:e.array(v).optional(),functionUrl:e.object({authType:e.enum(D)}).strict().optional(),description:e.string().optional(),scheduleExpression:e.string().optional(),scheduleStackPlacement:e.enum(oe).optional(),architecture:e.enum(z).optional(),ephemeralStorageSize:e.number().int(o.EPHEMERAL_STORAGE.INTEGER).min(512,o.EPHEMERAL_STORAGE.MIN).max(10240,o.EPHEMERAL_STORAGE.MAX).optional(),functionName:e.string().optional(),ssmSecrets:e.array(e.string()).optional(),ssmSecretsPath:e.string().optional(),alarms:ce.optional(),instanceType:P.optional(),enableSSH:e.boolean().optional(),keyName:e.string().optional(),userData:e.string().optional(),securityGroups:e.array(e.string()).optional(),variableName:e.string().optional(),extraProperties:e.array(E).optional()}).strict().superRefine((n,t)=>{if(n.type==="ecs"&&n.services)for(let i=0;i<n.services.length;i++){const a=n.services[i];a?.ec2Config?.instanceType&&!a.ec2Config.amiHardwareType&&te(a.ec2Config.instanceType)!=="ARM"&&t.addIssue({code:"custom",message:`Service '${a.name??i}' uses instance type '${a.ec2Config.instanceType}' (x86), which requires Docker images built for linux/amd64. The default build targets linux/arm64 (Graviton). Use a Graviton instance type (t4g, c6g, r6g, m6g, etc.) or set amiHardwareType: "STANDARD" to acknowledge x86.`,path:["services",i,"ec2Config","instanceType"]})}n.type==="lambda"&&n.deployment==="container"&&n.architecture==="X86_64"&&t.addIssue({code:"custom",message:"Lambda architecture 'X86_64' requires Docker images built for linux/amd64, but the default build targets linux/arm64. Use 'ARM_64' for Graviton Lambdas (recommended) or ensure your build pipeline targets linux/amd64.",path:["architecture"]})}),ye=e.object({appName:s,clusterName:c,containerPort:T,nameProvidedByFlag:e.boolean().optional(),ecrRepository:e.string().optional(),capacityProvider:y.optional(),useAppEcr:e.boolean().optional(),desiredCount:u.optional(),cpu:d.optional(),memoryLimitMiB:I(512).optional(),minCapacity:G.optional(),maxCapacity:U.optional(),ec2Config:_.optional(),connectionConfig:C.optional()}).strict().refine(r.check,r.params),Pe=e.object({appName:s,functionName:c,nameProvidedByFlag:e.boolean().optional(),lambdaType:e.enum(["basic","web","custom"]).optional(),ecrRepository:e.string().optional(),timeout:e.number().int(o.LAMBDA.TIMEOUT.INTEGER).min(S,o.LAMBDA.TIMEOUT.MIN).max(N,o.LAMBDA.TIMEOUT.MAX).optional(),memory:g.optional(),enableFunctionUrl:e.boolean().optional(),description:e.string().optional(),enableCors:e.boolean().optional(),corsOrigins:e.string().optional(),corsHeaders:e.string().optional(),corsMethods:e.array(e.enum(V)).optional(),corsCredentials:e.boolean().optional(),connectionConfig:C.optional()}).strict(),be=e.object({appName:s,instanceName:c,nameProvidedByFlag:e.boolean().optional(),instanceType:P.optional(),enableSSH:e.boolean().optional(),minCapacity:G.optional(),maxCapacity:U.optional(),connectionConfig:C.optional()}).strict().refine(r.check,r.params),he=e.object({appName:s,clusterName:c,serviceName:B,capacityProvider:y,containerPort:T.optional(),cpu:d.optional(),memoryLimitMiB:I(512).optional(),desiredCount:u.optional(),ec2Config:_.optional(),routing:e.union([M,e.array(M).min(1)]).optional(),docker:A.partial().optional(),nameProvidedByFlag:e.boolean().optional(),connectionConfig:C.optional()}).strict(),b=e.object({appName:s,computeName:c,nameProvidedByFlag:e.boolean().optional(),connectionConfig:C.optional()}).strict(),Ae=b.extend({type:e.literal("ecs"),cluster:X.optional(),services:e.array(k).min(1,o.SERVICE.MIN_REQUIRED),docker:A.partial().optional()}).strict().refine(n=>{const t=n.services.filter(i=>i.containers?.some(a=>a.port));return t.length>1?t.every(i=>(Array.isArray(i.routing)?i.routing:i.routing?[i.routing]:[]).some(R=>R.path||R.host)):!0},{message:o.SERVICE.ROUTING_REQUIRED}).refine(n=>{const t=n.services.map(i=>i.name);return new Set(t).size===t.length},{message:o.SERVICE.UNIQUE_WITHIN_CLUSTER}),Ce=b.extend({type:e.literal("lambda"),timeout:e.number().int(o.LAMBDA.TIMEOUT.INTEGER).min(S,o.LAMBDA.TIMEOUT.MIN).max(N,o.LAMBDA.TIMEOUT.MAX).optional(),memory:g.optional(),handler:e.string().optional(),runtime:Y.optional(),environment:l.optional(),secrets:l.optional(),description:e.string().optional(),functionUrl:e.union([e.object({authType:e.enum(D).optional()}).strict(),e.literal(!1)]).optional(),eventSources:e.array(v).optional()}).strict(),Ie=b.extend({type:e.literal("ec2"),instanceType:P.optional(),enableSSH:e.boolean().optional(),keyName:e.string().optional(),userData:e.string().optional(),securityGroups:e.array(e.string()).optional()}).strict(),fe=e.discriminatedUnion("type",[Ae,Ce,Ie]),j=e.object({path:e.string().min(1,o.REQUIRED.ROUTING_PATH),priority:e.number().int(o.PRIORITY.INTEGER).min(1,o.PRIORITY.MIN).max(5e4,o.PRIORITY.MAX).optional()}).strict(),Oe=e.object({name:e.string().min(1,o.REQUIRED.SERVICE_NAME).max(255,o.MAX_LENGTH.SERVICE_NAME).regex(m.RESOURCE_NAME,o.RESOURCE_NAME),serviceType:e.enum(H).optional(),docker:A.partial().optional(),containerPort:T.optional(),needsDatabaseConnection:e.boolean().optional(),routing:e.union([j,e.array(j).min(1)]).optional()}).strict().superRefine((n,t)=>{n.serviceType==="worker"&&(n.containerPort!==void 0&&t.addIssue({code:"custom",path:["containerPort"],message:"Worker services are not reachable inbound; remove containerPort."}),n.routing!==void 0&&t.addIssue({code:"custom",path:["routing"],message:"Worker services have no ALB route; remove routing."}))}),xe=e.object({appName:s,instanceType:e.string().optional()}).strict();export{he as AddServiceGeneratorSchema,Oe as ApplicationServiceConfigSchema,j as ApplicationServiceRoutingSchema,fe as ComputeGeneratorSchema,_e as ComputeResourcePlanSchema,pe as ComputeTypeSchema,Ee as ContainerConfigSchema,be as EC2GeneratorSchema,ye as ECSGeneratorSchema,_ as Ec2ConfigSchema,y as EcsCapacityProviderSchema,X as EcsClusterConfigSchema,M as EcsRoutingConfigSchema,le as EcsScalingConfigSchema,k as EcsServiceConfigSchema,B as EcsServiceNameSchema,P as InstanceTypeSchema,v as LambdaEventSourceSchema,Pe as LambdaGeneratorSchema,g as LambdaMemorySchema,Y as LambdaRuntimeSchema,xe as TunnelGeneratorSchema,me as WarmPoolSchema};
@@ -35,6 +35,8 @@ export declare const LOAD_BALANCER_TYPES: readonly ["public", "internal"];
35
35
  export type LoadBalancerType = (typeof LOAD_BALANCER_TYPES)[number];
36
36
  export declare const SCALING_TYPES: readonly ["CPU", "MEMORY"];
37
37
  export type ScalingType = (typeof SCALING_TYPES)[number];
38
+ export declare const SCHEDULE_STACK_PLACEMENTS: readonly ["messaging", "compute"];
39
+ export type ScheduleStackPlacement = (typeof SCHEDULE_STACK_PLACEMENTS)[number];
38
40
  export declare const AMI_HARDWARE_TYPES: readonly ["ARM", "STANDARD"];
39
41
  export type AmiHardwareType = (typeof AMI_HARDWARE_TYPES)[number];
40
42
  export declare const PATTERN_DATABASE_TYPES: readonly ["Instance", "Aurora"];
@@ -1 +1 @@
1
- var t=Object.defineProperty;var a=(e,r)=>t(e,"name",{value:r,configurable:!0});const x=Object.freeze({RESOURCE_SUFFIXES:Object.freeze({storage:"Storage",database:"Database",cluster:"Cluster",function:"Function",instance:"Instance",compute:"Compute"})});import{DATABASE_TYPES as w}from"./sharedTypes.js";const E=["ecs","lambda","ec2"],o=Object.freeze({ECS:"ecs",LAMBDA:"lambda",EC2:"ec2"}),l=["code","container"],T=Object.freeze({CODE:"code",CONTAINER:"container"}),A=["ARM_64","X86_64"],c="ARM_64",_=["NONE","AWS_IAM"],n=["public","internal"],s=["CPU","MEMORY"],P=["ARM","STANDARD"],S=["Instance","Aurora"],p=["postgresql","mysql"],R=["web","worker"],O=["foundation","compliance","hardened"];import{ECS_CAPACITY_PROVIDERS as Z}from"./sharedTypes.js";const C="FARGATE";import{PATTERN_TYPE_VALUES as k,PATTERN_TYPES as v,isPatternType as J,PATTERN_REGISTRY as Q,DEPLOYABLE_PATTERN_TYPES as $,OPENNEXT_PATTERN_TYPES as ee,isOpenNextPatternType as re}from"@fjall/util";import{APP_TYPES as te,CUSTOM_TIER as ge}from"./sharedTypes.js";const N=["t3.nano","t3.micro","t3.small","t3.medium","t3.large","t3.xlarge","t3.2xlarge","t3a.nano","t3a.micro","t3a.small","t3a.medium","t3a.large","t3a.xlarge","t3a.2xlarge","t4g.nano","t4g.micro","t4g.small","t4g.medium","t4g.large","t4g.xlarge","t4g.2xlarge","c5.large","c5.xlarge","c5.2xlarge","c5.4xlarge","c5.9xlarge","c5.12xlarge","c5.18xlarge","c5.24xlarge","c5a.large","c5a.xlarge","c5a.2xlarge","c5a.4xlarge","c5a.8xlarge","c5a.12xlarge","c5a.16xlarge","c5a.24xlarge","c6g.medium","c6g.large","c6g.xlarge","c6g.2xlarge","c6g.4xlarge","c6g.8xlarge","c6g.12xlarge","c6g.16xlarge","r5.large","r5.xlarge","r5.2xlarge","r5.4xlarge","r5.8xlarge","r5.12xlarge","r5.16xlarge","r5.24xlarge","r5a.large","r5a.xlarge","r5a.2xlarge","r5a.4xlarge","r5a.8xlarge","r5a.12xlarge","r5a.16xlarge","r5a.24xlarge","r6g.medium","r6g.large","r6g.xlarge","r6g.2xlarge","r6g.4xlarge","r6g.8xlarge","r6g.12xlarge","r6g.16xlarge","i3.large","i3.xlarge","i3.2xlarge","i3.4xlarge","i3.8xlarge","i3.16xlarge","p3.2xlarge","p3.8xlarge","p3.16xlarge","g4dn.xlarge","g4dn.2xlarge","g4dn.4xlarge","g4dn.8xlarge","g4dn.12xlarge","g4dn.16xlarge","m5.large","m5.xlarge","m5.2xlarge","m5.4xlarge","m5.8xlarge","m5.12xlarge","m5.16xlarge","m5.24xlarge","m5a.large","m5a.xlarge","m5a.2xlarge","m5a.4xlarge","m5a.8xlarge","m5a.12xlarge","m5a.16xlarge","m5a.24xlarge"],m=[0,1,5,10,15,30,60];function I(e,r){return e.includes(r)}a(I,"constIncludes");const M=1,D=65535,Y=Object.freeze({postgresql:5432,mysql:3306}),L=128,i=10240,U=1,d=900,u=1,f=1e3,F=100,b=100,B=1,G=!1,X=3e3,H="t4g.micro",V=30,j=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"],z=["standard","assets","upload","website"],W=["AES256","KMS"];import{BACKUP_VAULT_TIERS as Ee}from"./sharedTypes.js";export{P as AMI_HARDWARE_TYPES,te as APP_TYPES,Ee as BACKUP_VAULT_TIERS,A as COMPUTE_ARCHITECTURES,o as COMPUTE_TYPE,E as COMPUTE_TYPES,ge as CUSTOM_TIER,p as DATABASE_ENGINES,w as DATABASE_TYPES,x as DEFAULTS,C as DEFAULT_CAPACITY_PROVIDER,c as DEFAULT_COMPUTE_ARCHITECTURE,X as DEFAULT_CONTAINER_PORT,H as DEFAULT_EC2_INSTANCE_TYPE,V as DEFAULT_SECRET_ROTATION_DAYS,B as DEFAULT_WARM_POOL_MIN_SIZE,G as DEFAULT_WARM_POOL_REUSE_ON_SCALE_IN,$ as DEPLOYABLE_PATTERN_TYPES,T as DEPLOYMENT_TYPE,l as DEPLOYMENT_TYPES,N as EC2_INSTANCE_TYPES,Z as ECS_CAPACITY_PROVIDERS,R as ECS_SERVICE_TYPES,Y as ENGINE_DEFAULT_DATABASE_PORTS,_ as FUNCTION_URL_AUTH_TYPES,O as GOVERNANCE_PRESETS,j as HTTP_METHODS,n as LOAD_BALANCER_TYPES,f as MAX_ECS_CAPACITY,i as MAX_LAMBDA_MEMORY,d as MAX_LAMBDA_TIMEOUT,D as MAX_PORT,F as MAX_SCALING_CAPACITY,b as MAX_WARM_POOL_SIZE,u as MIN_ECS_CAPACITY,L as MIN_LAMBDA_MEMORY,U as MIN_LAMBDA_TIMEOUT,M as MIN_PORT,ee as OPENNEXT_PATTERN_TYPES,S as PATTERN_DATABASE_TYPES,Q as PATTERN_REGISTRY,v as PATTERN_TYPES,k as PATTERN_TYPE_VALUES,W as S3_ENCRYPTION_TYPES,s as SCALING_TYPES,z as STORAGE_PRESET_TYPES,m as VALID_MONITORING_INTERVALS,I as constIncludes,re as isOpenNextPatternType,J as isPatternType};
1
+ var t=Object.defineProperty;var a=(e,r)=>t(e,"name",{value:r,configurable:!0});const x=Object.freeze({RESOURCE_SUFFIXES:Object.freeze({storage:"Storage",database:"Database",cluster:"Cluster",function:"Function",instance:"Instance",compute:"Compute"})});import{DATABASE_TYPES as K}from"./sharedTypes.js";const E=["ecs","lambda","ec2"],o=Object.freeze({ECS:"ecs",LAMBDA:"lambda",EC2:"ec2"}),l=["code","container"],T=Object.freeze({CODE:"code",CONTAINER:"container"}),A=["ARM_64","X86_64"],c="ARM_64",_=["NONE","AWS_IAM"],n=["public","internal"],s=["CPU","MEMORY"],S=["messaging","compute"],P=["ARM","STANDARD"],p=["Instance","Aurora"],R=["postgresql","mysql"],O=["web","worker"],C=["foundation","compliance","hardened"];import{ECS_CAPACITY_PROVIDERS as h}from"./sharedTypes.js";const N="FARGATE";import{PATTERN_TYPE_VALUES as v,PATTERN_TYPES as J,isPatternType as Q,PATTERN_REGISTRY as $,DEPLOYABLE_PATTERN_TYPES as ee,OPENNEXT_PATTERN_TYPES as re,isOpenNextPatternType as ae}from"@fjall/util";import{APP_TYPES as ge,CUSTOM_TIER as xe}from"./sharedTypes.js";const m=["t3.nano","t3.micro","t3.small","t3.medium","t3.large","t3.xlarge","t3.2xlarge","t3a.nano","t3a.micro","t3a.small","t3a.medium","t3a.large","t3a.xlarge","t3a.2xlarge","t4g.nano","t4g.micro","t4g.small","t4g.medium","t4g.large","t4g.xlarge","t4g.2xlarge","c5.large","c5.xlarge","c5.2xlarge","c5.4xlarge","c5.9xlarge","c5.12xlarge","c5.18xlarge","c5.24xlarge","c5a.large","c5a.xlarge","c5a.2xlarge","c5a.4xlarge","c5a.8xlarge","c5a.12xlarge","c5a.16xlarge","c5a.24xlarge","c6g.medium","c6g.large","c6g.xlarge","c6g.2xlarge","c6g.4xlarge","c6g.8xlarge","c6g.12xlarge","c6g.16xlarge","r5.large","r5.xlarge","r5.2xlarge","r5.4xlarge","r5.8xlarge","r5.12xlarge","r5.16xlarge","r5.24xlarge","r5a.large","r5a.xlarge","r5a.2xlarge","r5a.4xlarge","r5a.8xlarge","r5a.12xlarge","r5a.16xlarge","r5a.24xlarge","r6g.medium","r6g.large","r6g.xlarge","r6g.2xlarge","r6g.4xlarge","r6g.8xlarge","r6g.12xlarge","r6g.16xlarge","i3.large","i3.xlarge","i3.2xlarge","i3.4xlarge","i3.8xlarge","i3.16xlarge","p3.2xlarge","p3.8xlarge","p3.16xlarge","g4dn.xlarge","g4dn.2xlarge","g4dn.4xlarge","g4dn.8xlarge","g4dn.12xlarge","g4dn.16xlarge","m5.large","m5.xlarge","m5.2xlarge","m5.4xlarge","m5.8xlarge","m5.12xlarge","m5.16xlarge","m5.24xlarge","m5a.large","m5a.xlarge","m5a.2xlarge","m5a.4xlarge","m5a.8xlarge","m5a.12xlarge","m5a.16xlarge","m5a.24xlarge"],I=[0,1,5,10,15,30,60];function M(e,r){return e.includes(r)}a(M,"constIncludes");const D=1,L=65535,Y=Object.freeze({postgresql:5432,mysql:3306}),i=128,U=10240,d=1,u=900,f=1,F=1e3,b=100,B=100,G=1,H=!1,X=3e3,V="t4g.micro",j=30,z=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"],W=["standard","assets","upload","website"],q=["AES256","KMS"];import{BACKUP_VAULT_TIERS as oe}from"./sharedTypes.js";export{P as AMI_HARDWARE_TYPES,ge as APP_TYPES,oe as BACKUP_VAULT_TIERS,A as COMPUTE_ARCHITECTURES,o as COMPUTE_TYPE,E as COMPUTE_TYPES,xe as CUSTOM_TIER,R as DATABASE_ENGINES,K as DATABASE_TYPES,x as DEFAULTS,N as DEFAULT_CAPACITY_PROVIDER,c as DEFAULT_COMPUTE_ARCHITECTURE,X as DEFAULT_CONTAINER_PORT,V as DEFAULT_EC2_INSTANCE_TYPE,j as DEFAULT_SECRET_ROTATION_DAYS,G as DEFAULT_WARM_POOL_MIN_SIZE,H as DEFAULT_WARM_POOL_REUSE_ON_SCALE_IN,ee as DEPLOYABLE_PATTERN_TYPES,T as DEPLOYMENT_TYPE,l as DEPLOYMENT_TYPES,m as EC2_INSTANCE_TYPES,h as ECS_CAPACITY_PROVIDERS,O as ECS_SERVICE_TYPES,Y as ENGINE_DEFAULT_DATABASE_PORTS,_ as FUNCTION_URL_AUTH_TYPES,C as GOVERNANCE_PRESETS,z as HTTP_METHODS,n as LOAD_BALANCER_TYPES,F as MAX_ECS_CAPACITY,U as MAX_LAMBDA_MEMORY,u as MAX_LAMBDA_TIMEOUT,L as MAX_PORT,b as MAX_SCALING_CAPACITY,B as MAX_WARM_POOL_SIZE,f as MIN_ECS_CAPACITY,i as MIN_LAMBDA_MEMORY,d as MIN_LAMBDA_TIMEOUT,D as MIN_PORT,re as OPENNEXT_PATTERN_TYPES,p as PATTERN_DATABASE_TYPES,$ as PATTERN_REGISTRY,J as PATTERN_TYPES,v as PATTERN_TYPE_VALUES,q as S3_ENCRYPTION_TYPES,s as SCALING_TYPES,S as SCHEDULE_STACK_PLACEMENTS,W as STORAGE_PRESET_TYPES,I as VALID_MONITORING_INTERVALS,M as constIncludes,ae as isOpenNextPatternType,Q as isPatternType};
@@ -1 +1 @@
1
- export declare const GENERATOR_VERSION = "14.3.0";
1
+ export declare const GENERATOR_VERSION = "16.0.0";
@@ -1 +1 @@
1
- const E="14.3.0";export{E as GENERATOR_VERSION};
1
+ const E="16.0.0";export{E as GENERATOR_VERSION};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fjall/generator",
3
- "version": "14.3.0",
3
+ "version": "16.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/fjall-tech/fjall.git",
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "license": "SEE LICENSE IN LICENSE",
59
59
  "dependencies": {
60
- "@fjall/util": "^14.3.0",
60
+ "@fjall/util": "^16.0.0",
61
61
  "ast-types": "^0.16.1",
62
62
  "recast": "^0.23.12",
63
63
  "ts-morph": "^28.0.0",