@fjall/generator 2.13.0 → 2.14.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.
- package/dist/.minified +1 -1
- package/dist/src/aws/regions.d.ts +3 -10
- package/dist/src/aws/regions.js +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/schemas/baseSchemas.js +2 -2
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +3 -3
package/dist/.minified
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
138 files minified at 2026-06-
|
|
1
|
+
138 files minified at 2026-06-12T01:12:40.430Z
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
city: string;
|
|
5
|
-
country: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const DEFAULT_REGION = "us-east-2";
|
|
8
|
-
export declare const regions: readonly string[];
|
|
9
|
-
export declare const AWS_REGIONS_METADATA: readonly RegionInfo[];
|
|
1
|
+
import { type RegionInfo } from "@fjall/util";
|
|
2
|
+
export { AWS_REGIONS_METADATA, DEFAULT_REGION, getRegionInfo, regions, suggestRegionForTimezone, type RegionCode, type RegionInfo, } from "@fjall/util";
|
|
10
3
|
export declare const topRegions: readonly RegionInfo[];
|
|
11
|
-
export declare const commonRegions: readonly
|
|
4
|
+
export declare const commonRegions: readonly ["us-east-2", "us-west-2", "us-east-1", "eu-west-1", "ap-southeast-1"];
|
|
12
5
|
export declare function parseRegionList(value: string): string[];
|
|
13
6
|
export declare function isValidRegion(region: string): boolean;
|
|
14
7
|
export declare function isValidRegionFormat(region: string): boolean;
|
package/dist/src/aws/regions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{AWS_REGIONS_METADATA as s,getRegionInfo as f,regions as c}from"@fjall/util";import{AWS_REGIONS_METADATA as y,DEFAULT_REGION as S,getRegionInfo as $,regions as z,suggestRegionForTimezone as D}from"@fjall/util";const g=["us-east-2","us-west-2","us-east-1","eu-west-1","eu-central-1","ap-southeast-1"],O=Object.freeze(g.flatMap(t=>{const e=f(t);return e?[e]:[]})),u=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"]);function a(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function p(t){return c.includes(t)}function l(t){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(t)}function R(t){if(!t)return u.slice(0,3);const e=t.toLowerCase().split("-"),n=e[0],o=e.length>1?e[1]:"";let r=[];return n&&o&&(r=c.filter(i=>i.startsWith(`${n}-${o}`))),r.length===0&&n&&(r=c.filter(i=>i.startsWith(`${n}-`))),r.length>0?r.slice(0,3):u.slice(0,3)}function d(t){if(p(t))return!0;const e=R(t);return l(t)?`Unknown region. Try: ${e.join(", ")}`:`Invalid format. Try: ${e.join(", ")}`}function A(t){if(!t||t.trim()==="")return!0;const e=a(t);for(const n of e){const o=d(n);if(o!==!0)return o}return!0}function x(t,e){return t.filter(n=>n!==e)}function E(){return s.map(t=>({label:t.city,value:t.code,description:t.code}))}function T(t){return s.filter(e=>e.code!==t).map(e=>({label:e.city,value:e.code,description:e.code}))}function h(t){const e=s.find(n=>n.code===t);return e?e.city:t}function I(t){return e=>{const n=a(e);return x(n,t)}}export{y as AWS_REGIONS_METADATA,S as DEFAULT_REGION,u as commonRegions,I as createRegionFormatter,x as filterDuplicateRegions,$ as getRegionInfo,h as getRegionName,E as getRegionOptions,T as getRegionOptionsExcluding,R as getSuggestions,p as isValidRegion,l as isValidRegionFormat,a as parseRegionList,z as regions,D as suggestRegionForTimezone,O as topRegions,d as validateRegion,A as validateRegionList};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { normaliseError, getErrorMessage } from "./util/errorUtils.js";
|
|
2
2
|
export { type Result, isSuccess, isFailure, success, failure, tryAsync, trySync, } from "./types/Result.js";
|
|
3
3
|
export { VALIDATION_PATTERNS, VALIDATION_MESSAGES, parseRateExpression, type ValidationPatternKey, type ValidationMessageKey, } from "./validation/patterns.js";
|
|
4
|
-
export { type RegionInfo, DEFAULT_REGION, regions, AWS_REGIONS_METADATA, topRegions, commonRegions, parseRegionList, isValidRegion, isValidRegionFormat, getSuggestions, validateRegion, validateRegionList, filterDuplicateRegions, getRegionOptions, getRegionOptionsExcluding, getRegionName, createRegionFormatter, } from "./aws/regions.js";
|
|
4
|
+
export { type RegionCode, type RegionInfo, DEFAULT_REGION, regions, AWS_REGIONS_METADATA, getRegionInfo, suggestRegionForTimezone, topRegions, commonRegions, parseRegionList, isValidRegion, isValidRegionFormat, getSuggestions, validateRegion, validateRegionList, filterDuplicateRegions, getRegionOptions, getRegionOptionsExcluding, getRegionName, createRegionFormatter, } from "./aws/regions.js";
|
|
5
5
|
export { GENERATOR_VERSION } from "./version.js";
|
|
6
6
|
export * from "./schemas/index.js";
|
|
7
7
|
export * from "./generation/index.js";
|
package/dist/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{normaliseError as r,getErrorMessage as i}from"./util/errorUtils.js";import{isSuccess as s,isFailure as g,success as n,failure as R,tryAsync as a,trySync as
|
|
1
|
+
import{normaliseError as r,getErrorMessage as i}from"./util/errorUtils.js";import{isSuccess as s,isFailure as g,success as n,failure as R,tryAsync as a,trySync as m}from"./types/Result.js";import{VALIDATION_PATTERNS as f,VALIDATION_MESSAGES as E,parseRateExpression as x}from"./validation/patterns.js";import{DEFAULT_REGION as c,regions as l,AWS_REGIONS_METADATA as S,getRegionInfo as T,suggestRegionForTimezone as u,topRegions as I,commonRegions as N,parseRegionList as O,isValidRegion as _,isValidRegionFormat as d,getSuggestions as D,validateRegion as F,validateRegionList as L,filterDuplicateRegions as V,getRegionOptions as y,getRegionOptionsExcluding as G,getRegionName as M,createRegionFormatter as v}from"./aws/regions.js";import{GENERATOR_VERSION as P}from"./version.js";export*from"./schemas/index.js";export*from"./generation/index.js";export*from"./presets/index.js";export*from"./ast/index.js";export*from"./planning/index.js";export*from"./dns/index.js";export{S as AWS_REGIONS_METADATA,c as DEFAULT_REGION,P as GENERATOR_VERSION,E as VALIDATION_MESSAGES,f as VALIDATION_PATTERNS,N as commonRegions,v as createRegionFormatter,R as failure,V as filterDuplicateRegions,i as getErrorMessage,T as getRegionInfo,M as getRegionName,y as getRegionOptions,G as getRegionOptionsExcluding,D as getSuggestions,g as isFailure,s as isSuccess,_ as isValidRegion,d as isValidRegionFormat,r as normaliseError,x as parseRateExpression,O as parseRegionList,l as regions,n as success,u as suggestRegionForTimezone,I as topRegions,a as tryAsync,m as trySync,F as validateRegion,L as validateRegionList};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{z as e}from"zod";import{VALIDATION_PATTERNS as o,VALIDATION_MESSAGES as t}from"../validation/patterns.js";import{APP_TYPES as i,PATTERN_TYPE_VALUES as s,MIN_PORT as p,MAX_PORT as E,BACKUP_VAULT_TIERS as A,GOVERNANCE_PRESETS as N}from"./constants.js";import{regions as
|
|
2
|
-
`)}export{j as AppNameSchema,
|
|
1
|
+
import{z as e}from"zod";import{VALIDATION_PATTERNS as o,VALIDATION_MESSAGES as t}from"../validation/patterns.js";import{APP_TYPES as i,PATTERN_TYPE_VALUES as s,MIN_PORT as p,MAX_PORT as E,BACKUP_VAULT_TIERS as A,GOVERNANCE_PRESETS as N}from"./constants.js";import{DEFAULT_REGION as g,regions as _}from"../aws/regions.js";const L=n=>e.union([e.literal(!1),n]),y={check:n=>n.minCapacity!==void 0&&n.maxCapacity!==void 0?n.minCapacity<=n.maxCapacity:!0,params:{message:t.CAPACITY_CONSTRAINT.MIN_LTE_MAX,path:["maxCapacity"]}},D=n=>e.number().int(t.MEMORY_LIMIT.INTEGER).min(n,n===128?t.MEMORY_LIMIT.MIN_128:t.MEMORY_LIMIT.MIN_512).max(30720,t.MEMORY_LIMIT.MAX),U=e.string().min(1,t.REQUIRED.RESOURCE_NAME).max(63,t.MAX_LENGTH.RESOURCE_NAME).regex(o.RESOURCE_NAME,t.RESOURCE_NAME),G=e.string().min(1,t.REQUIRED.BUCKET_NAME).max(63,t.MAX_LENGTH.BUCKET_NAME).regex(o.BUCKET_NAME,t.BUCKET_NAME),V=e.string().min(1,t.REQUIRED.DATABASE_NAME).max(63,t.MAX_LENGTH.DATABASE_NAME).regex(o.DATABASE_NAME,t.DATABASE_NAME);function c(n){return e.string().min(2,t.IDENTIFIER_MIN_LENGTH).max(50,n).regex(o.IDENTIFIER,t.IDENTIFIER).refine(r=>!r.endsWith("-"),{message:t.IDENTIFIER_NO_TRAILING_HYPHEN}).refine(r=>!r.includes("--"),{message:t.IDENTIFIER_NO_CONSECUTIVE_HYPHENS})}const j=c(t.MAX_LENGTH.APP_NAME),B=e.number().int(t.PORT.INTEGER).min(p,t.PORT.MIN).max(E,t.PORT.MAX),H=e.object({key:e.string(),sourceText:e.string()}).strict(),T=e.object({__identifier:e.string()}).strict(),I=e.object({__expression:e.string()}).strict(),l=e.object({__call:e.string()}).strict(),S=e.union([T,I,l]),x=e.union([e.string(),e.number(),e.boolean(),S]),Y=e.record(e.string().regex(o.ENV_VAR_NAME,t.ENV_VAR_NAME),x),u=e.object({id:e.string(),name:e.string().optional(),arn:e.string().optional(),field:e.string().optional()}).strict().refine(n=>n.name!==void 0!=(n.arn!==void 0),{message:"secretsImport requires exactly one of `name` or `arn`."}),X=e.record(e.string(),u),k=e.record(e.string(),e.unknown()),F=e.enum(i).describe(`Application type must be one of: ${i.join(", ")}`),K=e.enum(s).describe(`OpenNext deployment pattern: ${s.join(", ")}`),M=e.enum(["before-imports","after-imports","after-app-init","after-tags","after-resource","end-of-file"]),R=e.enum(["import","app-init","tags","database","compute","storage","network","messaging","cdn","pattern","vpc-peer","vpc-peer-accepter","cross-plan-connection","custom"]),$=e.object({sourceText:e.string(),position:M,afterManagedResource:e.object({type:R,name:e.string().optional()}).strict().optional(),originalLine:e.number().int().optional(),leadingComments:e.array(e.string()).optional(),orphaned:e.boolean().optional(),orphanedComment:e.string().optional()}).strict(),v=e.union([e.object({tier:e.enum(A)}).strict(),e.literal(!1)]),Q=e.union([e.object({instanceType:e.string().optional()}).strict(),e.literal(!1)]),h=c(t.MAX_LENGTH.ORGANISATION_NAME),f=e.string().regex(o.EMAIL,t.EMAIL),m=e.string().refine(n=>_.includes(n),{message:t.REGION}),w=e.object({name:h,email:f,accountName:e.string().optional(),primaryRegion:m.optional().default(g),secondaryRegions:e.array(m).optional(),security:e.enum(N).optional(),force:e.boolean().optional()}).strict();function q(n){return n.issues.map(a=>`${a.path.length>0?`${a.path.join(".")}: `:""}${a.message}`).join(`
|
|
2
|
+
`)}export{j as AppNameSchema,F as AppTypeSchema,R as AstStatementTypeSchema,v as BackupConfigSchema,G as BucketNameSchema,y as CAPACITY_REFINEMENT,l as CallValueSchema,$ as CustomCodeBlockSchema,M as CustomCodePositionSchema,V as DatabaseNameSchema,f as EmailSchema,Y as EnvironmentRecordSchema,x as EnvironmentValueSchema,I as ExpressionValueSchema,H as ExtraPropertySchema,T as IdentifierValueSchema,k as MetadataRecordSchema,w as OrganisationGeneratorSchema,h as OrganisationNameSchema,K as PatternSchema,B as PortSchema,m as RegionSchema,U as ResourceNameSchema,u as SecretImportSchema,X as SecretsImportRecordSchema,S as SpecialValueSchema,Q as TunnelConfigSchema,q as getZodErrorMessage,D as memoryLimitMiBSchema,L as optionalOrDisabled};
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const GENERATOR_VERSION = "2.
|
|
1
|
+
export declare const GENERATOR_VERSION = "2.13.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const E="2.
|
|
1
|
+
const E="2.13.0";export{E as GENERATOR_VERSION};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjall/generator",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "Pure infrastructure generation logic for Fjall",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"license": "SEE LICENSE IN LICENSE",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@fjall/util": "^2.
|
|
46
|
+
"@fjall/util": "^2.14.0",
|
|
47
47
|
"ast-types": "^0.16.1",
|
|
48
48
|
"recast": "^0.23.11",
|
|
49
49
|
"ts-morph": "^28.0.0",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"typescript-eslint": "^8.59.1",
|
|
60
60
|
"vitest": "^4.1.5"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "ce434478f9e3d5e5ccf979c152a237c81e4acee5"
|
|
63
63
|
}
|