@fjall/generator 7.2.0 → 7.3.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/.build-source-hash +19 -14
- package/dist/.minified +1 -1
- package/dist/src/codemod/edits/addResource/propertyBuilder.d.ts +8 -1
- package/dist/src/codemod/edits/addResource/propertyBuilder.js +1 -1
- package/dist/src/codemod/edits/addResource.js +1 -1
- package/dist/src/codemod/edits/modifyResource.js +1 -1
- package/dist/src/codemod/emitProjection.d.ts +29 -0
- package/dist/src/codemod/emitProjection.js +1 -0
- package/dist/src/codemod/registry.d.ts +15 -10
- package/dist/src/codemod/registry.js +1 -1
- package/dist/src/generation/common.d.ts +7 -0
- package/dist/src/generation/common.js +6 -5
- package/dist/src/generation/storage.js +27 -33
- package/dist/src/planning/index.d.ts +1 -1
- package/dist/src/planning/index.js +1 -1
- package/dist/src/planning/resourcePlanning.d.ts +14 -2
- package/dist/src/planning/resourcePlanning.js +1 -1
- package/dist/src/projection/index.d.ts +3 -0
- package/dist/src/projection/index.js +1 -0
- package/dist/src/projection/project.d.ts +22 -0
- package/dist/src/projection/project.js +1 -0
- package/dist/src/projection/tables.d.ts +32 -0
- package/dist/src/projection/tables.js +1 -0
- package/dist/src/projection/types.d.ts +108 -0
- package/dist/src/projection/types.js +0 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +2 -2
package/dist/.build-source-hash
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"package.json",
|
|
10
10
|
"tsconfig.json"
|
|
11
11
|
],
|
|
12
|
-
"hash": "
|
|
12
|
+
"hash": "940dd689f74de4aba85a336a7c2c2f48358a0b9740fabec971c03be2294e0714",
|
|
13
13
|
"files": {
|
|
14
14
|
"src/ast/astTestHelpers.ts": "026cac849eb88bdb",
|
|
15
15
|
"src/ast/domain/astDomainParser.ts": "bac0b16eb2e62552",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"src/codemod/drift/merge.ts": "29093929befa9abd",
|
|
42
42
|
"src/codemod/drift/snapshot.ts": "f8ef6b4097aa3d10",
|
|
43
43
|
"src/codemod/drift/types.ts": "7f1d7899e420e4d7",
|
|
44
|
-
"src/codemod/edits/addResource.ts": "
|
|
44
|
+
"src/codemod/edits/addResource.ts": "c8fe476d5ef589fe",
|
|
45
45
|
"src/codemod/edits/addResource/appBinding.ts": "3553fdb30fe06335",
|
|
46
46
|
"src/codemod/edits/addResource/bodyIndex.ts": "3e179eac10d7bcf4",
|
|
47
|
-
"src/codemod/edits/addResource/propertyBuilder.ts": "
|
|
47
|
+
"src/codemod/edits/addResource/propertyBuilder.ts": "9102dff7e9fab376",
|
|
48
48
|
"src/codemod/edits/appendAccountToStage.ts": "2b92f93734497303",
|
|
49
49
|
"src/codemod/edits/controlFlowPolicy.ts": "e32bbe2894f76c65",
|
|
50
50
|
"src/codemod/edits/crossPlanConnection.ts": "54a4ecb7b3368160",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"src/codemod/edits/ensureImports.ts": "3ca0b6d446c4333c",
|
|
53
53
|
"src/codemod/edits/findInsertionPosition.ts": "20cd34fdcf781017",
|
|
54
54
|
"src/codemod/edits/index.ts": "bea5ed7c3983342b",
|
|
55
|
-
"src/codemod/edits/modifyResource.ts": "
|
|
55
|
+
"src/codemod/edits/modifyResource.ts": "8f19d8c272c2613e",
|
|
56
56
|
"src/codemod/edits/modifyResource/literalConversion.ts": "31295cccd59131b7",
|
|
57
57
|
"src/codemod/edits/removeResource.ts": "2c7c8fe67bc3a866",
|
|
58
58
|
"src/codemod/edits/removeResource/commentHeuristic.ts": "90b6ce7ba5aa2a48",
|
|
@@ -60,7 +60,8 @@
|
|
|
60
60
|
"src/codemod/edits/unmanagedShapeErrors.ts": "47a2644913c8e619",
|
|
61
61
|
"src/codemod/edits/vpcPeer.ts": "0bcf90c2e6d16ca4",
|
|
62
62
|
"src/codemod/edits/vpcPeerAccepter.ts": "c9eace933e9e2345",
|
|
63
|
-
"src/codemod/emitGuard.ts": "
|
|
63
|
+
"src/codemod/emitGuard.ts": "652d9b188276acf8",
|
|
64
|
+
"src/codemod/emitProjection.ts": "9a47ef44995be65f",
|
|
64
65
|
"src/codemod/fileRewriter/builders.ts": "46a0d43240ff0818",
|
|
65
66
|
"src/codemod/fileRewriter/index.ts": "fd715b41176a7999",
|
|
66
67
|
"src/codemod/fileRewriter/locateByRange.ts": "889ee6256201c1fe",
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
"src/codemod/llmFallback/telemetryEvents.ts": "33a85939739693ab",
|
|
83
84
|
"src/codemod/llmFallback/tierRunner.ts": "a26094accd78cf15",
|
|
84
85
|
"src/codemod/llmFallback/types.ts": "14af8d2bd9afae12",
|
|
85
|
-
"src/codemod/registry.ts": "
|
|
86
|
+
"src/codemod/registry.ts": "bb0d629f33e5bf59",
|
|
86
87
|
"src/codemod/semanticIndex/classifyControlFlow.ts": "ed96215d91a3cae3",
|
|
87
88
|
"src/codemod/semanticIndex/findReferences.ts": "96aea37418d1e91a",
|
|
88
89
|
"src/codemod/semanticIndex/index.ts": "cfcd212d34ab20fb",
|
|
@@ -106,7 +107,7 @@
|
|
|
106
107
|
"src/dns/domainRecords.ts": "17f895ff9a7b719b",
|
|
107
108
|
"src/dns/index.ts": "b476ef3d7b381dc8",
|
|
108
109
|
"src/dns/types.ts": "82d6db9d7d26dbc2",
|
|
109
|
-
"src/generation/common.ts": "
|
|
110
|
+
"src/generation/common.ts": "73fa0ad5ffeeeed4",
|
|
110
111
|
"src/generation/compute.ts": "4029a0d8e3197686",
|
|
111
112
|
"src/generation/compute/ec2.ts": "4d8187d293a57fb1",
|
|
112
113
|
"src/generation/compute/ecs.ts": "72190132fdaa1847",
|
|
@@ -117,15 +118,15 @@
|
|
|
117
118
|
"src/generation/index.ts": "fd58a833e13bcf07",
|
|
118
119
|
"src/generation/infrastructure.ts": "6381d502f4733926",
|
|
119
120
|
"src/generation/messagingConnections.ts": "1f070088c39e9749",
|
|
120
|
-
"src/generation/storage.ts": "
|
|
121
|
+
"src/generation/storage.ts": "2c0171aeeec3d79e",
|
|
121
122
|
"src/generation/storageConnections.ts": "db1ab6ccdc19afab",
|
|
122
123
|
"src/index.ts": "fc8f27b8ffade9ef",
|
|
123
124
|
"src/planning/generateResourceChange.ts": "1c6411f9a12e7acb",
|
|
124
|
-
"src/planning/index.ts": "
|
|
125
|
+
"src/planning/index.ts": "64c4a88a38e9956d",
|
|
125
126
|
"src/planning/openNextPlanning.ts": "4af9cb9061f7d21e",
|
|
126
127
|
"src/planning/resourceAddition.ts": "45b010d2eaf96522",
|
|
127
128
|
"src/planning/resourceConnections.ts": "a6b7db8f733e560f",
|
|
128
|
-
"src/planning/resourcePlanning.ts": "
|
|
129
|
+
"src/planning/resourcePlanning.ts": "6c966fe586fff080",
|
|
129
130
|
"src/planning/staticSitePlanning.ts": "242af1e9618821ab",
|
|
130
131
|
"src/presets/clickhouseTierPreset.ts": "72b2b8a8caf4bdb4",
|
|
131
132
|
"src/presets/index.ts": "8332c0198b2a6fe9",
|
|
@@ -133,6 +134,10 @@
|
|
|
133
134
|
"src/presets/storagePresets.ts": "5df2d4d7d21a66d8",
|
|
134
135
|
"src/presets/tierPresets.ts": "c0148771bffbef9b",
|
|
135
136
|
"src/presets/tierTypes.ts": "96d33201ebddf6e6",
|
|
137
|
+
"src/projection/index.ts": "f46e0e482bb33565",
|
|
138
|
+
"src/projection/project.ts": "2104026f10a27264",
|
|
139
|
+
"src/projection/tables.ts": "00904da382c06cf5",
|
|
140
|
+
"src/projection/types.ts": "da0845cb34bfd12b",
|
|
136
141
|
"src/schemas/alarmSchemas.ts": "9016095d8031f006",
|
|
137
142
|
"src/schemas/applicationSchemas.ts": "d85771a4607cf2da",
|
|
138
143
|
"src/schemas/baseSchemas.ts": "93d9bd1c0adfcaa0",
|
|
@@ -157,11 +162,11 @@
|
|
|
157
162
|
"src/validation/patterns.ts": "f9629eafdad7ac3e",
|
|
158
163
|
"src/validation/validationMessages.ts": "c727ade4690274f4",
|
|
159
164
|
"src/validation/validationPatterns.ts": "865f3d688975b7c8",
|
|
160
|
-
"src/version.ts": "
|
|
165
|
+
"src/version.ts": "cb82d9efdb80e56a",
|
|
161
166
|
"../scripts/minify-dist.mjs": "6b2e4b0df8aec601",
|
|
162
|
-
"package.json": "
|
|
167
|
+
"package.json": "7b8ea09642d00081",
|
|
163
168
|
"tsconfig.json": "1929cf3f99fe9b1e"
|
|
164
169
|
},
|
|
165
|
-
"outputHash": "
|
|
166
|
-
"outputFileCount":
|
|
170
|
+
"outputHash": "fbeb7c7236155acb29d05407d96d62c5e210f2478b90d1809a51fc9c2c96cd02",
|
|
171
|
+
"outputFileCount": 305
|
|
167
172
|
}
|
package/dist/.minified
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
152 files minified at 2026-08-06T23:10:36.463Z
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { type namedTypes as n } from "ast-types";
|
|
2
2
|
import { type Result } from "../../../types/Result.js";
|
|
3
3
|
import { type ObjectPropertyInput, type QuoteStyle } from "../../fileRewriter/index.js";
|
|
4
|
+
import type { LiteralProp } from "../../emitProjection.js";
|
|
4
5
|
import type { InvalidPropertyError } from "../../types.js";
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Build the emitted object literal from CONSTRUCT-vocabulary props.
|
|
8
|
+
*
|
|
9
|
+
* The caller has already run the plan fragment through the projection, so
|
|
10
|
+
* every key here is one a construct reads, in emission order.
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildPropertyInputs(properties: ReadonlyArray<LiteralProp>, quoteStyle: QuoteStyle): Result<ObjectPropertyInput[], InvalidPropertyError>;
|
|
6
13
|
export declare function toAstValue(value: unknown, quoteStyle: QuoteStyle): n.Property["value"] | undefined;
|
|
7
14
|
export declare function makeStringLiteral(value: string, quote: QuoteStyle): n.StringLiteral;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var c=Object.defineProperty;var f=(r,e)=>c(r,"name",{value:e,configurable:!0});import{builders as i}from"ast-types";import{failure as u,success as a}from"../../../types/Result.js";import{buildObjectProperty as d}from"../../fileRewriter/index.js";function
|
|
1
|
+
var c=Object.defineProperty;var f=(r,e)=>c(r,"name",{value:e,configurable:!0});import{builders as i}from"ast-types";import{failure as u,success as a}from"../../../types/Result.js";import{buildObjectProperty as d}from"../../fileRewriter/index.js";function x(r,e){const n=[];for(const{key:t,value:o}of r){const s=p(o,e);if(s===void 0)return u({kind:"InvalidPropertyError",property:t,reason:`Unsupported property value for "${t}" (accepts string/number/boolean/null/array/object of the same).`});n.push({key:t,value:s})}return a(n)}f(x,"buildPropertyInputs");function p(r,e){if(typeof r=="string")return l(r,e);if(typeof r=="number"&&Number.isFinite(r))return i.numericLiteral(r);if(typeof r=="boolean")return i.booleanLiteral(r);if(r===null)return i.nullLiteral();if(Array.isArray(r)){const n=[];for(const t of r){const o=p(t,e);if(o===void 0)return;n.push(o)}return i.arrayExpression(n)}if(typeof r=="object"&&r!==null){const n=[];for(const[t,o]of Object.entries(r)){const s=p(o,e);if(s===void 0)return;n.push(d(t,s,e))}return i.objectExpression(n)}}f(p,"toAstValue");function l(r,e){const n=e==="single"?"'":'"',t=e==="single"?r.replace(/\\/g,"\\\\").replace(/'/g,"\\'"):r.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),o=`${n}${t}${n}`;return i.stringLiteral.from({value:r,extra:{rawValue:r,raw:o}})}f(l,"makeStringLiteral");export{x as buildPropertyInputs,l as makeStringLiteral,p as toAstValue};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var D=Object.defineProperty;var u=(r,e)=>D(r,"name",{value:e,configurable:!0});import{failure as t,success as P}from"../../types/Result.js";import{DEFAULT_FILE_PATH as F,computeLinesDelta as M,extractProgramBody as C,isRecord as v}from"../_internal.js";import{evaluateEmitGuard as x}from"../emitGuard.js";import{projectEmittedProperties as w}from"../emitProjection.js";import{appendSpecifier as G,buildAppMethodWrappedStatement as N,buildFactoryStatement as Q,buildImportDeclaration as B,detectQuoteStyle as U,parse as _,printFile as O}from"../fileRewriter/index.js";import{STATEMENT_REGISTRY as W}from"../registry.js";import{locateAllShapes as j,locateByShape as Y}from"../semanticIndex/index.js";import{checkControlFlowPolicy as q}from"./controlFlowPolicy.js";import{driftGate as H,runPipeline as $,schemaGate as z}from"../validationGate/index.js";import{resolveAppBindingName as J}from"./addResource/appBinding.js";import{buildUnmanagedDuplicateError as K}from"./unmanagedShapeErrors.js";import{buildResourceLocations as V,indexBody as X,orderByEndPos as Z,resolveInsertIndex as ee}from"./addResource/bodyIndex.js";import{buildPropertyInputs as re}from"./addResource/propertyBuilder.js";import{findInsertionPosition as te}from"./findInsertionPosition.js";const k="@fjall/components-infrastructure";function ge(r,e,m={}){const s=e.filePath??F,o=_(r,s);if(!o.success)return t(o.error);const a=Y(r,{type:e.type,name:e.name},s);if(!a.success)return a.error.kind==="TemplateLiteralNameError"?t(a.error):t({kind:"SemanticQueryError",reason:a.error.reason,cause:a.error.cause});if(a.data!==void 0){if(a.data.managed===!1)return t(K(e.type,a.data.symbolName));const d=q({ast:o.data,target:a.data,resource:{type:e.type,name:e.name},op:"add"});if(d.refusal!==void 0)return t(d.refusal);const h=$([z,H],{content:r,plan:{type:e.type,name:e.name,properties:e.properties,op:"add"},baseline:m.baseline,policy:e.driftPolicy});return h.success?h.data.action==="skip"?P({content:r,linesChanged:{added:0,removed:0},skipped:!0}):t({kind:"DuplicateResourceError",type:e.type,name:e.name}):t(ae(h.error))}const f=U(o.data),l=w(e.type,e.properties);if("refusal"in l)return t(l.refusal);const y=re(l.props,f);if(!y.success)return t(y.error);const c=C(o.data);if(c===void 0)return t({kind:"SemanticQueryError",reason:"recast File is missing program.body"});const i=W[e.type],I=x(i.emitGuard,e.properties);if(I!==void 0)return t(I);const S={factory:i.factoryIdentifier,name:e.name,properties:y.data,quoteStyle:f};let E;if(i.emitWrapper!==void 0){const d=J(c);if(d===void 0)return t({kind:"MissingAppInitError",type:e.type,appMethod:i.emitWrapper.appMethod});E=N({...S,appIdentifier:d,appMethod:i.emitWrapper.appMethod})}else E=Q(S);const p=X(c,r),n=j(r,s);if(!n.success)return n.error.kind==="TemplateLiteralNameError"?t(n.error):t({kind:"SemanticQueryError",reason:n.error.reason,cause:n.error.cause});const L=V(p.anchors,n.data),R=Z([...p.appInitLocations,...L]),b=te(p.importInfos,R,e.type,p.programEnd),T=ee(p.anchors,b);c.splice(T,0,E),oe(c,i.factoryIdentifier,f);const g=O(o.data,r),A=M(r,g);return P({content:g,linesChanged:A})}u(ge,"addResource");function ae(r){switch(r.kind){case"ParseError":case"TemplateLiteralNameError":case"DuplicateResourceError":case"InvalidPropertyError":case"SemanticQueryError":case"MissingAppInitError":case"DriftConflictError":case"ControlFlowClassifierError":return r;default:return{kind:"SemanticQueryError",reason:`Unexpected codemod error in validation-gate pipeline: ${r.kind}`}}}u(ae,"narrowGateError");function oe(r,e,m){for(const o of r){if(o.type!=="ImportDeclaration")continue;const a=o.source;if(!(!v(a)||a.type!=="StringLiteral")&&a.value===k){G(o,e);return}}const s=B([e],k,m);r.unshift(s)}u(oe,"ensureFactoryImport");export{ge as addResource};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var T=Object.defineProperty;var
|
|
1
|
+
var T=Object.defineProperty;var u=(r,e)=>T(r,"name",{value:e,configurable:!0});import{failure as s,success as y}from"../../types/Result.js";import{DEFAULT_FILE_PATH as A,computeLinesDelta as F,extractProgramBody as L,isRecord as g}from"../_internal.js";import{buildObjectProperty as G,detectQuoteStyle as O,parse as Q,printFile as U}from"../fileRewriter/index.js";import{STATEMENT_REGISTRY as b}from"../registry.js";import{locateAllShapes as I,locateByShape as D}from"../semanticIndex/index.js";import{buildUnmanagedEditRefusal as K}from"./unmanagedShapeErrors.js";import{checkControlFlowPolicy as V}from"./controlFlowPolicy.js";import{driftGate as B,runPipeline as _,schemaGate as M}from"../validationGate/index.js";import{toAstValue as $}from"./addResource/propertyBuilder.js";import{buildMergedLiteral as v,collectPropertyKeys as H,isNodeShape as S,readKeyName as Y}from"./modifyResource/literalConversion.js";import{evaluateEmitGuard as q,UNRESOLVED as z}from"../emitGuard.js";import{projectEmittedProperties as J,projectionRefusal as W}from"../emitProjection.js";function he(r,e,t={}){const n=e.filePath??A,i=Q(r,n);if(!i.success)return s(i.error);const a=D(r,{type:e.type,name:e.name},n);if(!a.success)return a.error.kind==="TemplateLiteralNameError"?s(a.error):s({kind:"SemanticQueryError",reason:a.error.reason,cause:a.error.cause});if(a.data===void 0)return s({kind:"ResourceNotFoundError",type:e.type,name:e.name,knownNames:ne(r,e.type,n)});if(a.data.managed===!1)return s(K(e.type,"modify"));const o=V({ast:i.data,target:a.data,resource:{type:e.type,name:e.name},op:"modify"});if(o.refusal!==void 0)return s(o.refusal);const c=_([M,B],{content:r,plan:{type:e.type,name:e.name,properties:e.properties,op:"modify"},baseline:t.baseline,policy:e.driftPolicy});if(!c.success)return s(X(c.error));if(c.data.action==="skip")return y({content:r,linesChanged:{added:0,removed:0},skipped:!0});const d=L(i.data);if(d===void 0)return s({kind:"SemanticQueryError",reason:"recast File is missing program.body"});const l=Z(d,a.data);if(l===void 0)return s({kind:"SemanticQueryError",reason:"Unable to resolve config ObjectExpression for the located resource."});const R=O(i.data),x=v(l,e.properties),C=b[e.type].emitGuard,E=u(f=>q(C,f)??W(e.type,f),"judge"),N=E(w(l,v(l,{}))),p=E(w(l,x));if(p!==void 0&&p.property!==N?.property)return s(p);const h=b[e.type].schemaFragment.safeParse(e.properties);if(!h.success){const f=h.error.issues[0];return s({kind:"InvalidPropertyError",property:f!==void 0&&f.path.length>0?String(f.path[0]):Object.keys(e.properties)[0]??"<unknown>",reason:f?.message??"Schema validation failed"})}const m=J(e.type,e.properties,{editingExisting:!0});if("refusal"in m)return s(m.refusal);const k=ee(l,m.props,R);if(!k.success)return s(k.error);const P=U(i.data,r),j=o.warning!==void 0?[o.warning.message]:void 0;return y({content:P,linesChanged:F(r,P),warnings:j})}u(he,"modifyResource");function w(r,e){const t={...e};for(const n of H(r))n in t||(t[n]=z);return t}u(w,"buildGuardView");function X(r){switch(r.kind){case"ParseError":case"ResourceNotFoundError":case"InvalidPropertyError":case"TemplateLiteralNameError":case"SemanticQueryError":case"DriftConflictError":case"ControlFlowClassifierError":return r;default:return{kind:"SemanticQueryError",reason:`Unexpected codemod error in validation-gate pipeline: ${r.kind}`}}}u(X,"narrowGateError");function Z(r,e){const t=e.start+e.length;let n;const i=u(a=>{if(n!==void 0||a.type!=="CallExpression")return;const o=a.arguments;if(!Array.isArray(o)||o.length<2)return;const c=o[0];if(!S(c)||c.type!=="StringLiteral"||c.start!==e.start||c.end!==t)return;const d=o[1];S(d)&&d.type==="ObjectExpression"&&(n=d)},"visitor");for(const a of r)if(ie(a,i),n!==void 0)break;return n}u(Z,"findConfigObject");function ee(r,e,t){const n=te(r);for(const{key:i,value:a}of e){const o=$(a,t);if(o===void 0)return s({kind:"InvalidPropertyError",property:i,reason:`Unsupported property value for "${i}" (accepts string/number/boolean/null/array/object of the same).`});const c=re(r,i);if(c!==void 0){c.value=o;continue}const d=G(i,o,t);n&&(d.extra={...d.extra??{},trailingComma:!0}),r.properties.push(d)}return y(void 0)}u(ee,"applyPropertyEdits");function re(r,e){return r.properties.find(t=>(t.type==="Property"||t.type==="ObjectProperty")&&t.shorthand!==!0&&t.computed!==!0&&Y(t.key)===e)}u(re,"findPropertyByKey");function te(r){return r.properties[r.properties.length-1]?.extra?.trailingComma===!0}u(te,"detectTrailingCommaStyle");function ne(r,e,t){const n=I(r,t);return n.success?n.data.filter(i=>i.type===e).map(i=>i.symbolName):[]}u(ne,"collectKnownNames");function ie(r,e){const t=[r];for(;t.length>0;){const n=t.pop();if(g(n)){typeof n.type=="string"&&e(n);for(const i of Object.keys(n)){if(i==="loc"||i==="comments"||i==="tokens")continue;const a=n[i];if(Array.isArray(a))for(const o of a)g(o)&&t.push(o);else g(a)&&t.push(a)}}}}u(ie,"visit");export{he as modifyResource};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ProjectionContext } from "../projection/index.js";
|
|
2
|
+
import { type EmitGuardProperties } from "./emitGuard.js";
|
|
3
|
+
import type { InvalidPropertyError, StatementType } from "./types.js";
|
|
4
|
+
/** One emitted construct prop, resolved to a serialisable value. */
|
|
5
|
+
export interface LiteralProp {
|
|
6
|
+
key: string;
|
|
7
|
+
value: unknown;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The first plan key in `properties` that this type cannot turn into a
|
|
11
|
+
* construct prop, as the codebase's actionable error shape.
|
|
12
|
+
*
|
|
13
|
+
* Values are passed through verbatim, `UNRESOLVED` included: a plan-only key
|
|
14
|
+
* is inert whatever it holds, which is exactly the presence test the
|
|
15
|
+
* `silentlyDropped` rules applied.
|
|
16
|
+
*/
|
|
17
|
+
export declare function projectionRefusal(type: StatementType, properties: EmitGuardProperties): InvalidPropertyError | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The construct props to write for `properties`, or the refusal that stops
|
|
20
|
+
* the write.
|
|
21
|
+
*
|
|
22
|
+
* A non-projectable type is emitted as it always was — its plan keys go into
|
|
23
|
+
* the file verbatim and its `emitGuard` is what decides whether that is safe.
|
|
24
|
+
*/
|
|
25
|
+
export declare function projectEmittedProperties(type: StatementType, properties: Readonly<Record<string, unknown>>, context?: ProjectionContext): {
|
|
26
|
+
props: LiteralProp[];
|
|
27
|
+
} | {
|
|
28
|
+
refusal: InvalidPropertyError;
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var y=Object.defineProperty;var n=(e,r)=>y(e,"name",{value:r,configurable:!0});import{isProjectableType as u,projectPlanToConstructProps as a}from"../projection/index.js";import{AUTHOR_BY_HAND as p}from"./emitGuard.js";function l(e,r){return{kind:"InvalidPropertyError",property:e,reason:`${r} \`fjall add\` would write it into the factory call and the resource would deploy without it. ${p}`}}n(l,"unprojectableRefusal");function v(e,r){if(!u(e))return;const[t]=a(e,r).unprojectable;if(t!==void 0)return l(t.key,t.reason)}n(v,"projectionRefusal");function h(e,r,t={}){if(!u(e))return{props:Object.entries(r).map(([o,d])=>({key:o,value:d}))};const{props:c,unprojectable:f}=a(e,r,t),[i]=f;if(i!==void 0)return{refusal:l(i.key,i.reason)};const s=[];for(const o of c){if(o.value.kind==="expression")return{refusal:{kind:"InvalidPropertyError",property:o.key,reason:`\`${o.key}\` needs a live construct expression, which this command cannot resolve against a file it did not write. ${p}`}};s.push({key:o.key,value:o.value.value})}return{props:s}}n(h,"projectEmittedProperties");export{h as projectEmittedProperties,v as projectionRefusal};
|
|
@@ -61,13 +61,16 @@ export interface StatementTypeEntry {
|
|
|
61
61
|
* Property shapes the ADD and MODIFY paths must REFUSE to write, checked
|
|
62
62
|
* before any file is touched. Declared here, beside `emitWrapper`, because
|
|
63
63
|
* `emitWrapper` is precisely what creates the hazard: wrapping makes the
|
|
64
|
-
* emitted props load-bearing at synth, and the
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* `
|
|
69
|
-
*
|
|
70
|
-
*
|
|
64
|
+
* emitted props load-bearing at synth, and the plan and construct
|
|
65
|
+
* vocabularies disagree.
|
|
66
|
+
*
|
|
67
|
+
* ONLY for types the plan→construct projection cannot describe. Where it
|
|
68
|
+
* can (`src/projection/tables.ts`), the disagreement is TRANSLATED at
|
|
69
|
+
* emission and no rule belongs here — `emitProjection.ts` reports what is
|
|
70
|
+
* left from the projection's own `unprojectable` list. What survives is
|
|
71
|
+
* props needing a live sibling construct (`cdn`'s origin, `compute`'s
|
|
72
|
+
* connection expansion) and cross-key conditions no per-key table can
|
|
73
|
+
* state.
|
|
71
74
|
*
|
|
72
75
|
* Rules cover exactly two classes, and nothing else:
|
|
73
76
|
*
|
|
@@ -88,9 +91,11 @@ export interface StatementTypeEntry {
|
|
|
88
91
|
* through (a separate, recorded gap).
|
|
89
92
|
*
|
|
90
93
|
* Absent = every expressible property shape for this type reaches a
|
|
91
|
-
* synthesising statement. That is a claim, not an oversight
|
|
92
|
-
* `
|
|
93
|
-
*
|
|
94
|
+
* synthesising statement. That is a claim, not an oversight, and it is now
|
|
95
|
+
* true two ways: `network` and `buildkite` have outright plan/construct
|
|
96
|
+
* parity, while `database`, `storage` and `messaging` reach it through the
|
|
97
|
+
* projection. The components-infrastructure materialisation contract pins
|
|
98
|
+
* both.
|
|
94
99
|
*/
|
|
95
100
|
emitGuard?: ReadonlyArray<EmitGuardRule>;
|
|
96
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var C=Object.defineProperty;var n=(e,t)=>C(e,"name",{value:t,configurable:!0});import{z as d}from"zod";import{BuildkitePropsObjectSchema as v,CDNResourcePlanSchema as R,ComputeResourcePlanSchema as k,CrossPlanConnectionResourcePlanSchema as T,DatabaseResourcePlanSchema as A,NetworkResourcePlanSchema as E,NextJSPatternConfigSchema as w,OrganisationResourcePlanSchema as F,PayloadPatternConfigSchema as N,S3ResourcePlanSchema as M,SQSResourcePlanSchema as D,StaticSitePatternConfigSchema as _,VpcPeerAccepterResourcePlanSchema as O,VpcPeerResourcePlanSchema as W}from"../schemas/index.js";import{failure as x}from"../types/Result.js";import{isRecord as G}from"./_internal.js";import{AUTHOR_BY_HAND as c,requiresLiveValue as g,silentlyDropped as a,UNRESOLVED as m,whenAbsent as p}from"./emitGuard.js";const r={database:"DatabaseFactory",storage:"StorageFactory",compute:"ComputeFactory",messaging:"MessagingFactory",cdn:"CdnFactory",network:"NetworkFactory",pattern:"PatternFactory","vpc-peer":"VpcPeerFactory","vpc-peer-accepter":"VpcPeerAccepterFactory","cross-plan-connection":"CrossPlanConnectionFactory",organisation:"OrganisationFactory",buildkite:"BuildkiteFactory"};function s(e){const{name:t,...i}=e.shape;return d.object(i).partial().strict()}n(s,"fragmentOf");const I=s(A),B=s(M),j=(()=>{const{name:e,...t}=k.shape;return d.object(t).partial().strict()})(),L=s(D),V=s(R),Y=s(E),q=(()=>{const{name:e,type:t,cdn:i,...f}=N.shape,{name:ae,type:re,cdn:oe,...b}=w.shape,{name:se,type:ie,domain:ce,cdn:S,...P}=_.shape;return d.object({...f,...b,...P,cdn:d.union([i,S])}).partial().strict()})(),K=s(W),U=s(O),z=s(T),H=s(F),Q=s(v);function l(e,t){return x({kind:"SemanticQueryError",reason:`StatementTypeEntry.${e} for ${t} is not wired; existing types dispatch through the shared locator/generator.`})}n(l,"notWiredError");function $(e){return{factoryIdentifier:e,findByShape:n(()=>l("locator.findByShape",e),"findByShape"),validateContext:n(()=>l("locator.validateContext",e),"validateContext")}}n($,"createLocator");function J(e){return{build:n(()=>{const t=l("generator.build",e);throw new Error(t.success?"unreachable":t.error.reason)},"build")}}n(J,"createGenerator");const X=a("variableName","`variableName` is a plan-only round-trip key naming the `const <var> =` binding the scaffold emits; no construct reads it."),y=a("extraProperties","`extraProperties` is a plan-only round-trip key: the scaffold flattens each `{ key, sourceText }` entry into a sibling property, and no construct reads the array."),u="the connection keys are scaffold inputs, not construct props: the scaffold expands them into environment variables and a `connections: [...]` array, and the compute constructs read none of them.",Z=[{property:"deployment",refuseWhen:n(e=>(e.type==="lambda"||e.deployment!==void 0)&&e.deployment!=="container"&&e.code!==m,"refuseWhen"),reason:"a code-deployed Lambda requires `code: Code`, a CDK object built by `Code.fromAsset(...)` that no flag value can carry, so the statement takes the whole app's synth down with `Cannot read properties of undefined (reading 'bind')` \u2014 naming no resource. Use `--deployment container`, which is fully expressible, or write this compute in infrastructure.ts by hand."},a("codePath","`codePath` is the scaffold's input to `Code.fromAsset(...)`; no compute construct reads it, and a container Lambda takes its code from the image."),g("runtime","the construct expects a CDK `Runtime`, not a version string, and a container Lambda takes its runtime from the image (`Runtime.FROM_IMAGE`) regardless."),g("architecture","the construct expects a CDK `Architecture`, not a string: `--architecture ARM_64` emits an EMPTY `Architectures` list, whereas omitting the flag emits the correct default."),a("memory","the Lambda construct reads `memorySize`, so `--memory 1024` deploys a function at the 128 MB default."),a("ssmSecrets","the Lambda construct reads `secrets`, so `--ssmSecrets` deploys a function with no SSM wiring and no secrets environment at all."),a("scheduleExpression","`scheduleExpression` is not a compute prop: the scaffold turns it into a SEPARATE `app.addSchedule(...)` statement, which this command cannot emit."),a("needsConnection",u),a("connectedDatabase",u),a("connectedStorage",u),a("connectedMessaging",u),X,y],ee=[{property:"originType",refuseWhen:p("originType"),reason:"`Cdn` selects its origin implementation from an `originType` discriminator that the CDN vocabulary does not carry, so a distribution built from CDN properties throws `Unsupported CDN origin type: undefined` the moment `app.addCdn` materialises it. "+c},{property:"originType",refuseWhen:n(e=>e.originType==="s3"&&e.bucket!==m,"refuseWhen"),reason:"an s3 origin needs `bucket` to be an `IBucket` or a Fjall `Storage` \u2014 a live construct, not a name, and not a string; omitting it throws `Cannot read properties of undefined (reading 'bucketRegionalDomainName')` at synth. "+c},{property:"originType",refuseWhen:n(e=>e.originType==="alb"&&e.loadBalancer!==m,"refuseWhen"),reason:'an alb origin needs `loadBalancer` to be an `IApplicationLoadBalancer` or an ECS compute \u2014 a live construct, not a name, and not a string; a string reaches CloudFormation as `Supplied properties not correct for "OriginProperty"`. '+c},{property:"behaviours",refuseWhen:n(e=>Array.isArray(e.behaviours)&&e.behaviours.some(t=>G(t)&&t.originRef!==void 0),"refuseWhen"),reason:"the plan's `behaviours[].originRef` names another planned resource, while the construct's behaviour takes a live origin object; the plan shape throws `Cannot read properties of undefined (reading 'computeType')` at synth. "+c},a("customDomain","the distribution reads `domainNames`, so `--customDomain` deploys a distribution with no alias."),a("defaultOriginRef","`defaultOriginRef` names another planned resource for the scaffold to resolve into a live origin; no CDN construct reads it."),y],te=[{property:"name",refuseWhen:p("name"),reason:"every pattern construct requires a `name` PROPERTY in addition to its construct id, and `fjall add --name` binds the construct id, so no invocation can deliver it \u2014 `toPascalCase(props.name)` throws at synth and takes the whole app down. "+c},{property:"type",refuseWhen:p("type"),reason:"`PatternFactory.build` reads `PATTERN_REGISTRY[props.type]` before it even returns the thunk, and the pattern vocabulary carries no `type` discriminator. "+c}],ne=[{property:"peerAppName",refuseWhen:p("peerAppName"),reason:"`peerAppName` is required: it is the SSM prefix every remote lookup is built from, and omitting it does NOT fail \u2014 synth succeeds and the app deploys a peering connection pointed at `/fjall/default/undefined/vpc-id`. Pass `--peerAppName <remote app>`."},{property:"peerAccountId",refuseWhen:p("peerAccountId"),reason:"`peerAccountId` is required: omitting it does NOT fail, it deploys a VPC peering connection with no `PeerOwnerId`. Pass `--peerAccountId <12-digit account>`."}];function o(e,t,i={}){return{factoryIdentifier:e,locator:$(e),generator:J(e),schemaFragment:t,...i}}n(o,"createEntry");const h={database:o(r.database,I,{emitWrapper:{appMethod:"addDatabase"}}),storage:o(r.storage,B,{emitWrapper:{appMethod:"addStorage"}}),compute:o(r.compute,j,{emitWrapper:{appMethod:"addCompute"},emitGuard:Z}),messaging:o(r.messaging,L,{emitWrapper:{appMethod:"addMessaging"}}),cdn:o(r.cdn,V,{emitWrapper:{appMethod:"addCdn"},emitGuard:ee}),network:o(r.network,Y,{emitWrapper:{appMethod:"addNetwork"}}),pattern:o(r.pattern,q,{emitWrapper:{appMethod:"addPattern"},emitGuard:te}),"vpc-peer":o(r["vpc-peer"],K,{emitWrapper:{appMethod:"addVpcPeer"},emitGuard:ne}),"vpc-peer-accepter":o(r["vpc-peer-accepter"],U,{emitWrapper:{appMethod:"addVpcPeerAccepter"}}),"cross-plan-connection":o(r["cross-plan-connection"],z),organisation:o(r.organisation,H),buildkite:o(r.buildkite,Q,{emitWrapper:{appMethod:"addBuildkite",propsOverloadConstructId:"Buildkite"}})},ge=Object.keys(h);function ye(e){const t=Object.keys(h);for(const i of t)if(h[i].factoryIdentifier===e)return i}n(ye,"findTypeByIdentifier");export{ge as REGISTERED_STATEMENT_TYPES,h as STATEMENT_REGISTRY,ye as findTypeByIdentifier};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared helper functions used across all generation modules.
|
|
5
5
|
*/
|
|
6
|
+
import type { ProjectedProp } from "../projection/types.js";
|
|
6
7
|
import type { IdentifierValue, ExpressionValue, CallValue, SpecialValue } from "../schemas/resourceSchemas.js";
|
|
7
8
|
export type { IdentifierValue, ExpressionValue, CallValue, SpecialValue };
|
|
8
9
|
export { toPascalCase, toKebab, toValidDatabaseName } from "@fjall/util";
|
|
@@ -76,6 +77,12 @@ export declare function resolveResourceVariable(plan: {
|
|
|
76
77
|
* Simple objects (few primitive values) are kept on one line.
|
|
77
78
|
*/
|
|
78
79
|
export declare function formatValue(value: unknown, baseIndent?: string): string;
|
|
80
|
+
/**
|
|
81
|
+
* Render projected construct props as the body of an object literal —
|
|
82
|
+
* `\n<indent>key: value` per prop, comma-separated, no trailing comma. The
|
|
83
|
+
* caller supplies the surrounding braces and whatever it appends after.
|
|
84
|
+
*/
|
|
85
|
+
export declare function emitProjectedProps(props: ReadonlyArray<ProjectedProp>, indent?: string): string;
|
|
79
86
|
type PropertyFormat = "raw" | "string" | "object" | "boolean-or-object";
|
|
80
87
|
/**
|
|
81
88
|
* Build a property string for code generation.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
${
|
|
1
|
+
var u=Object.defineProperty;var n=(e,t)=>u(e,"name",{value:t,configurable:!0});import{toPascalCase as P,toKebab as T,toValidDatabaseName as h}from"@fjall/util";function c(e){return JSON.stringify(e)}n(c,"escapeStringLiteral");function g(e){return e.map(c).join(", ")}n(g,"formatStringArray");const b="import:SharedAlarmTopicArn";function _(e=" "){return`
|
|
2
|
+
${e}...(getConfig().environment === "production" ? { alertsTopic: ${c(b)} } : {}),`}n(_,"emitProductionAlertsTopicSpread");function l(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.__identifier=="string"||typeof t.__expression=="string"||typeof t.__call=="string"}n(l,"isSpecialValue");function m(e){return e.replace(/[^a-zA-Z0-9]/g," ").split(" ").map((t,r)=>r===0?t.charAt(0).toLowerCase()+t.slice(1):t.charAt(0).toUpperCase()+t.slice(1)).join("")}n(m,"toVariableName");function $(e){return e.variableName??m(e.name)}n($,"getVariableName");function x(e,t){for(const r of e.database)if(r.name===t&&r.variableName)return r.variableName;for(const r of e.s3)if(r.name===t&&r.variableName)return r.variableName;for(const r of e.compute)if(r.name===t&&r.variableName)return r.variableName;for(const r of e.dynamodb??[])if(r.name===t&&r.variableName)return r.variableName;for(const r of e.sqs??[])if(r.name===t&&r.variableName)return r.variableName;return m(t)}n(x,"resolveResourceVariable");function d(e){const t=Object.entries(e);return t.length===0?!0:t.length>1?!1:t.every(([,r])=>typeof r=="string"||typeof r=="number"||typeof r=="boolean"||r===null)}n(d,"isSimpleObject");function f(e,t=" "){if(e==null)return"undefined";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(l(e)){if("__identifier"in e)return e.__identifier;if("__expression"in e)return e.__expression;if("__call"in e)return e.__call}if(Array.isArray(e))return`[${e.map(r=>f(r,t)).join(", ")}]`;if(typeof e=="object"){const r=Object.entries(e).filter(([,a])=>a!==void 0);if(d(e)){const a=r.map(([s,p])=>`${s}: ${f(p,t)}`).join(", ");return a?`{ ${a} }`:"{}"}const o=t+" ",i=r.map(([a,s])=>`${o}${a}: ${f(s,o)}`).join(`,
|
|
3
3
|
`);return i?`{
|
|
4
4
|
${i}
|
|
5
|
-
${
|
|
6
|
-
|
|
7
|
-
${
|
|
5
|
+
${t}}`:"{}"}return JSON.stringify(e)}n(f,"formatValue");function j(e,t=" "){return e.map(r=>{const o=r.value.kind==="expression"?r.value.source:f(r.value.value,t);return`
|
|
6
|
+
${t}${r.key}: ${o}`}).join(",")}n(j,"emitProjectedProps");function N(e,t,r,o="raw"){if(!e)return"";let i;switch(o){case"string":i=c(String(r));break;case"object":i=f(r);break;case"boolean-or-object":i=r===!1?"false":f(r);break;default:i=String(r)}return`
|
|
7
|
+
${t}: ${i},`}n(N,"buildProperty");function S(e,t=" "){return e?.length?e.map(r=>`
|
|
8
|
+
${t}${r.key}: ${r.sourceText},`).join(""):""}n(S,"emitExtraProperties");export{b as PRODUCTION_ALERTS_TOPIC_IMPORT,N as buildProperty,S as emitExtraProperties,_ as emitProductionAlertsTopicSpread,j as emitProjectedProps,c as escapeStringLiteral,g as formatStringArray,f as formatValue,$ as getVariableName,l as isSpecialValue,x as resolveResourceVariable,T as toKebab,P as toPascalCase,h as toValidDatabaseName,m as toVariableName};
|
|
@@ -1,50 +1,44 @@
|
|
|
1
|
-
var g=Object.defineProperty;var s=(e,t)=>g(e,"name",{value:t,configurable:!0});import{buildProperty as
|
|
2
|
-
`:"",
|
|
3
|
-
StorageFactory.build(${r
|
|
1
|
+
var g=Object.defineProperty;var s=(e,t)=>g(e,"name",{value:t,configurable:!0});import{projectPlanToConstructProps as $}from"../projection/index.js";import{buildProperty as i,getVariableName as m,emitExtraProperties as u,emitProductionAlertsTopicSpread as b,emitProjectedProps as P,escapeStringLiteral as o}from"./common.js";function x(e){let t="";return t+=i(e.bucketName!==void 0,"bucketName",e.bucketName,"string"),t+=i(e.stackPlacement!==void 0&&e.stackPlacement!=="storage","stackPlacement",e.stackPlacement,"string"),t+=i(e.publicReadAccess===!0,"publicReadAccess",!0),t+=i(e.websiteHosting!==void 0,"websiteHosting",e.websiteHosting,"object"),t+=i(e.backupVaultTier!==void 0,"backupVaultTier",e.backupVaultTier,"string"),t+=i(e.versioned!==void 0,"versioned",e.versioned),t+=i(e.encryption!==void 0,"encryption",e.encryption,"string"),t+=i(e.kmsKeyArn!==void 0,"kmsKeyArn",e.kmsKeyArn,"string"),t+=i(e.cors!==void 0&&e.cors.length>0,"cors",e.cors,"object"),t+=i(e.deployment!==void 0,"deployment",e.deployment,"object"),t+=i(e.retain===!0,"retain",!0),t}s(x,"generateS3BucketProps");function K(e,t){return!!(t.compute.some(r=>r.connectedStorage?.includes(e.name))||t.cdn&&(t.cdn.defaultOriginRef===e.name||t.cdn.behaviours?.some(r=>r.originRef===e.name)))}s(K,"s3NeedsVariable");function R(e){if(e.s3.length===0)return"";let t="";for(let n=0;n<e.s3.length;n++){const r=e.s3[n],c=m(r),a=K(r,e),l=e.database.length>0||n>0?`
|
|
2
|
+
`:"",p=x(r),y=a?`const ${c} = `:"",f=u(r.extraProperties);p||f?t+=`${l}${y}app.addStorage(
|
|
3
|
+
StorageFactory.build(${o(r.name)}, {${p}${f}
|
|
4
4
|
})
|
|
5
5
|
);
|
|
6
|
-
`:t+=`${
|
|
7
|
-
StorageFactory.build(${r
|
|
6
|
+
`:t+=`${l}${y}app.addStorage(
|
|
7
|
+
StorageFactory.build(${o(r.name)}, {})
|
|
8
8
|
);
|
|
9
|
-
`}return t}s(
|
|
10
|
-
const ${
|
|
11
|
-
DatabaseFactory.build(${
|
|
9
|
+
`}return t}s(R,"generateS3Code");function T(e){if(!e.dynamodb||e.dynamodb.length===0)return"";let t="";for(const n of e.dynamodb){const r=m(n);if(t+=`
|
|
10
|
+
const ${r} = app.addDatabase(
|
|
11
|
+
DatabaseFactory.build(${o(n.name)}, {
|
|
12
12
|
type: "DynamoDB",
|
|
13
13
|
partitionKey: {
|
|
14
|
-
name: ${
|
|
15
|
-
type: ${
|
|
14
|
+
name: ${o(n.partitionKey.name)},
|
|
15
|
+
type: ${o(n.partitionKey.type)},
|
|
16
16
|
}`,n.sortKey&&(t+=`,
|
|
17
17
|
sortKey: {
|
|
18
|
-
name: ${
|
|
19
|
-
type: ${
|
|
20
|
-
}`),n.globalSecondaryIndexes&&n.globalSecondaryIndexes.length>0){const
|
|
21
|
-
indexName: ${
|
|
18
|
+
name: ${o(n.sortKey.name)},
|
|
19
|
+
type: ${o(n.sortKey.type)},
|
|
20
|
+
}`),n.globalSecondaryIndexes&&n.globalSecondaryIndexes.length>0){const c=n.globalSecondaryIndexes.map(a=>{let d=`{
|
|
21
|
+
indexName: ${o(a.indexName)},
|
|
22
22
|
partitionKey: {
|
|
23
|
-
name: ${
|
|
24
|
-
type: ${
|
|
25
|
-
},`;return a.sortKey&&(
|
|
23
|
+
name: ${o(a.partitionKey.name)},
|
|
24
|
+
type: ${o(a.partitionKey.type)},
|
|
25
|
+
},`;return a.sortKey&&(d+=`
|
|
26
26
|
sortKey: {
|
|
27
|
-
name: ${
|
|
28
|
-
type: ${
|
|
29
|
-
},`),
|
|
30
|
-
}`,
|
|
27
|
+
name: ${o(a.sortKey.name)},
|
|
28
|
+
type: ${o(a.sortKey.type)},
|
|
29
|
+
},`),d+=`
|
|
30
|
+
}`,d}).join(`,
|
|
31
31
|
`);t+=`,
|
|
32
32
|
globalSecondaryIndexes: [
|
|
33
|
-
${
|
|
33
|
+
${c}
|
|
34
34
|
]`}n.ttlAttribute&&(t+=`,
|
|
35
|
-
ttlAttribute: ${
|
|
36
|
-
stream: true`),t+=
|
|
35
|
+
ttlAttribute: ${o(n.ttlAttribute)}`),n.stream&&(t+=`,
|
|
36
|
+
stream: true`),t+=u(n.extraProperties),t+=`
|
|
37
37
|
})
|
|
38
38
|
);
|
|
39
|
-
`}return t}s(
|
|
39
|
+
`}return t}s(T,"generateDynamoDBCode");function S(e,t){return t.compute.some(n=>n.connectedMessaging?.includes(e.name))}s(S,"sqsNeedsVariable");function V(e){if(!e.sqs||e.sqs.length===0)return"";let t="";for(const n of e.sqs){const r=m(n),a=S(n,e)?`const ${r} = `:"",{props:d}=$("messaging",{queueType:n.queueType,visibilityTimeout:n.visibilityTimeout,retentionPeriod:n.retentionPeriod,...n.contentBasedDeduplication===!0&&{contentBasedDeduplication:!0},removalPolicy:n.removalPolicy});t+=`
|
|
40
40
|
${a}app.addMessaging(
|
|
41
|
-
MessagingFactory.build(${
|
|
42
|
-
type: "queue",
|
|
43
|
-
queueType: ${r(n.queueType)}`,n.visibilityTimeout!==void 0&&(t+=`,
|
|
44
|
-
visibilityTimeout: ${n.visibilityTimeout}`),n.retentionPeriod!==void 0&&(t+=`,
|
|
45
|
-
messageRetentionPeriod: ${n.retentionPeriod}`),n.contentBasedDeduplication&&(t+=`,
|
|
46
|
-
contentBasedDeduplication: true`),n.removalPolicy!==void 0&&(t+=`,
|
|
47
|
-
removalPolicy: ${r(n.removalPolicy)}`),t+=",",t+=l(n.extraProperties),t+=$(),t+=`
|
|
41
|
+
MessagingFactory.build(${o(n.name)}, {${P(d)}`,t+=",",t+=u(n.extraProperties),t+=b(),t+=`
|
|
48
42
|
})
|
|
49
43
|
);
|
|
50
|
-
`}return t}s(
|
|
44
|
+
`}return t}s(V,"generateSQSCode");export{T as generateDynamoDBCode,R as generateS3Code,V as generateSQSCode,K as s3NeedsVariable,S as sqsNeedsVariable};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { planApplicationResources, toUserServiceConfigs, type GenerationOptions, generateInfrastructureFromPlan, } from "./resourcePlanning.js";
|
|
1
|
+
export { planApplicationResources, planServiceFromTierPreset, toUserServiceConfigs, type GenerationOptions, generateInfrastructureFromPlan, } from "./resourcePlanning.js";
|
|
2
2
|
export { type OpenNextResourceOptions, planOpenNextResources, } from "./openNextPlanning.js";
|
|
3
3
|
export { type StaticSiteResourceOptions, planStaticSiteResources, } from "./staticSitePlanning.js";
|
|
4
4
|
export { type ConnectionType, applyComputeConnections, applyServiceConnections, } from "./resourceConnections.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{planApplicationResources as
|
|
1
|
+
import{planApplicationResources as o,planServiceFromTierPreset as t,toUserServiceConfigs as n,generateInfrastructureFromPlan as a}from"./resourcePlanning.js";import{planOpenNextResources as s}from"./openNextPlanning.js";import{planStaticSiteResources as c}from"./staticSitePlanning.js";import{applyComputeConnections as u,applyServiceConnections as m}from"./resourceConnections.js";import{addResourceToPlan as x,validateResourceAddition as R,listAvailableResources as d}from"./resourceAddition.js";import{generateResourceChange as C}from"./generateResourceChange.js";export{x as addResourceToPlan,u as applyComputeConnections,m as applyServiceConnections,a as generateInfrastructureFromPlan,C as generateResourceChange,d as listAvailableResources,o as planApplicationResources,s as planOpenNextResources,t as planServiceFromTierPreset,c as planStaticSiteResources,n as toUserServiceConfigs,R as validateResourceAddition};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type UserServiceConfig, type AppType } from "../presets/tierPresets.js";
|
|
1
|
+
import { type TierEcsServiceConfig, type UserServiceConfig, type AppType } from "../presets/tierPresets.js";
|
|
2
2
|
import { type Result } from "../types/Result.js";
|
|
3
|
-
import type { ApplicationResourcePlan } from "../schemas/resourceSchemas.js";
|
|
3
|
+
import type { ApplicationResourcePlan, EcsServiceConfig } from "../schemas/resourceSchemas.js";
|
|
4
4
|
import type { ApplicationServiceConfig } from "../schemas/computeSchemas.js";
|
|
5
5
|
/**
|
|
6
6
|
* Adapt the wire-level service config (`ApplicationServiceConfig`, validated by
|
|
@@ -14,6 +14,18 @@ export declare function planApplicationResources(appName: string, appType: AppTy
|
|
|
14
14
|
snapshotIdentifier?: string;
|
|
15
15
|
snapshotUsername?: string;
|
|
16
16
|
}): ApplicationResourcePlan;
|
|
17
|
+
/**
|
|
18
|
+
* The one translation from a tier preset's service entry to the plan shape.
|
|
19
|
+
*
|
|
20
|
+
* The two differ in exactly one place: the preset carries `minCapacity` /
|
|
21
|
+
* `maxCapacity` flat, the plan nests them under `scaling`. Every other key
|
|
22
|
+
* passes through, so a new preset field reaches the plan without touching this
|
|
23
|
+
* function. Exported because anything deriving a plan from a tier — the app
|
|
24
|
+
* planner below, the dogfood deploy-test suites — must apply the same rule, and
|
|
25
|
+
* a second copy of it would drift silently: an unnested `minCapacity` is an
|
|
26
|
+
* excess property the plan schema rejects only at parse time.
|
|
27
|
+
*/
|
|
28
|
+
export declare function planServiceFromTierPreset(tierService: TierEcsServiceConfig): EcsServiceConfig;
|
|
17
29
|
export interface GenerationOptions {
|
|
18
30
|
/** Resource name mapping from old names to new names (for custom code repositioning) */
|
|
19
31
|
resourceMapping?: Map<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var b=Object.defineProperty;var
|
|
1
|
+
var b=Object.defineProperty;var i=(e,n)=>b(e,"name",{value:n,configurable:!0});import{TIER_PRESETS as l,getDefaultDatabaseTypeForTier as P,applyTierDefaultsToServices as k}from"../presets/tierPresets.js";import{COMPUTE_TYPE as D,DEFAULT_CONTAINER_PORT as T}from"../schemas/constants.js";import{success as f,failure as h}from"../types/Result.js";import{injectCustomCodeBlocks as p}from"../ast/mutation/astCodeInjection.js";import{toVariableName as m,toValidDatabaseName as v,generateImports as S,generateAppInit as E,generateTags as R,generateNetworkCode as C,generateDatabaseCode as y,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,r=!0,c,t){const o={appName:e,type:n,database:[],s3:[],compute:[]};if(n==="custom")return o;const s=n,a=l[s];return{...o,database:$(e,a,s,r,t),compute:W(e,a,s,r,c),network:a.network,backup:a.backup}}i(K,"planApplicationResources");function $(e,n,r,c,t){const o=P(r),s=n.database[o];return!c||s===null?[]:[{name:e,type:o,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:r,...c}=e;return{...c,...N(n,r)}}i(H,"planServiceFromTierPreset");function M(e,n){const r=H(e),c=n?.serviceType==="worker",t=n?.containerPort??T,o=n?.docker;return{...r,...o?.path!==void 0&&{docker:{path:o.path,...o.context!==void 0&&{context:o.context},...o.target!==void 0&&{target:o.target}}},...n?.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:n.needsDatabaseConnection},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,r,c,t){const o=n.compute.ecs,a=(t&&t.length>0?k(r,t):o.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(o.cluster,g),services:a}]}i(W,"buildComputePlan");function O(e,n){const r=[S(e),E(e),R(e)];if(F(e))r.push(_(e),C(e));else{const t=j(e);r.push(C(e),y(e),I(e),w(e),x(e),A(e),B(e,t),U(e))}const c=r.join("");if(e.customCodeBlocks&&e.customCodeBlocks.length>0){const t=p(c,e.customCodeBlocks,n?.resourceMapping);return t.success?f(t.content):h(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};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { projectPlanToConstructProps } from "./project.js";
|
|
2
|
+
export { isProjectableType, TYPE_PROJECTIONS, type ProjectableType, } from "./tables.js";
|
|
3
|
+
export type { PlanKeyRule, Projection, ProjectionContext, ProjectedProp, ProjectedValue, TypeProjection, UnprojectableProp, } from "./types.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{projectPlanToConstructProps as e}from"./project.js";import{isProjectableType as p,TYPE_PROJECTIONS as P}from"./tables.js";export{P as TYPE_PROJECTIONS,p as isProjectableType,e as projectPlanToConstructProps};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ProjectableType } from "./tables.js";
|
|
2
|
+
import type { Projection, ProjectionContext } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Project a resource-plan fragment onto its construct's props.
|
|
5
|
+
*
|
|
6
|
+
* Keys with no rule pass through under their own name — the two vocabularies
|
|
7
|
+
* agree far more often than they disagree, and enumerating the agreements
|
|
8
|
+
* would be a second inventory to keep in step with the schemas.
|
|
9
|
+
*
|
|
10
|
+
* `undefined` values are skipped rather than emitted: a construct prop
|
|
11
|
+
* explicitly set to `undefined` is not the same as an absent one for a
|
|
12
|
+
* `.strict()` Zod props schema, and the plan's optional keys arrive as
|
|
13
|
+
* `undefined` routinely.
|
|
14
|
+
*
|
|
15
|
+
* A fragment key landing on a constant's construct key REPLACES it, in the
|
|
16
|
+
* constant's position. Constants exist to supply what the plan vocabulary
|
|
17
|
+
* cannot say; a caller who says it anyway (a hand-written `type: "queue"`,
|
|
18
|
+
* a round-tripped statement) is not disagreeing with the projection, and
|
|
19
|
+
* emitting the key twice would be a syntax-level duplicate that the last
|
|
20
|
+
* writer silently wins.
|
|
21
|
+
*/
|
|
22
|
+
export declare function projectPlanToConstructProps(type: ProjectableType, fragment: Readonly<Record<string, unknown>>, context?: ProjectionContext): Projection;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var k=Object.defineProperty;var f=(o,s)=>k(o,"name",{value:s,configurable:!0});import{TYPE_PROJECTIONS as y}from"./tables.js";function O(o,s,r={}){const u=y[o],l=r.editingExisting===!0?[]:u.constants??[],t=new Map(l.map(n=>[n.key,n])),i=[];for(const[n,c]of Object.entries(s)){if(c===void 0)continue;const e=u.keys?.[n];if(e===void 0||e.kind==="prop"){const d=e?.as??n;t.set(d,{key:d,value:{kind:"literal",value:c}});continue}if(e.kind==="planOnly"){i.push({key:n,reason:e.reason});continue}const a=e.bind(c,r);if(a===void 0){i.push({key:n,reason:e.reason});continue}const p=e.as??n;t.set(p,{key:p,value:{kind:"expression",source:a}})}return{props:[...t.values()],unprojectable:i}}f(O,"projectPlanToConstructProps");export{O as projectPlanToConstructProps};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-type plan→construct projections.
|
|
3
|
+
*
|
|
4
|
+
* Every entry here was, before this module, a `silentlyDropped` /
|
|
5
|
+
* `requiresLiveValue` rule in `codemod/registry.ts` describing a translation
|
|
6
|
+
* the scaffold generator performed and the codemod could not. The reasons are
|
|
7
|
+
* carried over verbatim where they still apply, because they record what was
|
|
8
|
+
* actually observed to happen at synth — not what the vocabulary suggests.
|
|
9
|
+
*
|
|
10
|
+
* Two plan keys recur on nearly every type and are declared once:
|
|
11
|
+
* `variableName` (the `const <var> =` binding the scaffold emits) and
|
|
12
|
+
* `extraProperties` (round-trip preservation the scaffold flattens into
|
|
13
|
+
* sibling properties). Neither is a construct prop anywhere.
|
|
14
|
+
*
|
|
15
|
+
* `compute`, `cdn`, `pattern` and `vpc-peer` are deliberately ABSENT. Their
|
|
16
|
+
* disagreements are not renames: a CDN origin needs the live `IBucket` or
|
|
17
|
+
* load balancer its sibling resource became, and a compute's four connection
|
|
18
|
+
* keys expand into environment variables plus a whole second statement
|
|
19
|
+
* (`app.addSchedule(...)`). Both need a projection that can carry bindings
|
|
20
|
+
* and emit more than one statement, which is the next increment; until then
|
|
21
|
+
* they keep their `emitGuard` tables and a type is projected or guarded,
|
|
22
|
+
* never both.
|
|
23
|
+
*/
|
|
24
|
+
import type { TypeProjection } from "./types.js";
|
|
25
|
+
export declare const TYPE_PROJECTIONS: {
|
|
26
|
+
readonly messaging: TypeProjection;
|
|
27
|
+
readonly storage: TypeProjection;
|
|
28
|
+
readonly database: TypeProjection;
|
|
29
|
+
readonly network: TypeProjection;
|
|
30
|
+
};
|
|
31
|
+
export type ProjectableType = keyof typeof TYPE_PROJECTIONS;
|
|
32
|
+
export declare function isProjectableType(value: string): value is ProjectableType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s=Object.defineProperty;var a=(n,t)=>s(n,"name",{value:t,configurable:!0});const r={kind:"planOnly",reason:"`variableName` is a plan-only round-trip key naming the `const <var> =` binding the scaffold emits; no construct reads it."},o={kind:"planOnly",reason:"`extraProperties` is a plan-only round-trip key: the scaffold flattens each `{ key, sourceText }` entry into a sibling property, and no construct reads the array."},e={variableName:r,extraProperties:o},i={constants:[{key:"type",value:{kind:"literal",value:"queue"}}],keys:{retentionPeriod:{kind:"prop",as:"messageRetentionPeriod"},...e}},l={keys:{...e}},p={keys:{engineExpression:{kind:"planOnly",reason:"`engineExpression` carries a raw CDK engine expression for the scaffold to inline; the construct reads `databaseEngine` instead, so a cluster pinned to `DatabaseClusterEngine.auroraMysql(...)` still deploys as aurora-postgresql."},...e}},c={keys:{...e}},y={messaging:i,storage:l,database:p,network:c};function u(n){return Object.prototype.hasOwnProperty.call(y,n)}a(u,"isProjectableType");export{y as TYPE_PROJECTIONS,u as isProjectableType};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plan→construct projection vocabulary.
|
|
3
|
+
*
|
|
4
|
+
* A resource PLAN and a CDK construct's PROPS are two different vocabularies
|
|
5
|
+
* for the same resource. They agree on most keys and disagree on a handful,
|
|
6
|
+
* and every disagreement has been, until now, encoded twice: once in the
|
|
7
|
+
* scaffold generator (which translates on the way out) and once in the
|
|
8
|
+
* codemod's `emitGuard` tables (which refuse what they cannot translate).
|
|
9
|
+
* Two encodings of one fact is drift waiting to happen — and it happened, in
|
|
10
|
+
* the direction that hurts: the guards are what stop `fjall add messaging`
|
|
11
|
+
* and `fjall add cdn` working at all.
|
|
12
|
+
*
|
|
13
|
+
* This module is that encoding, and the codemod reads it for every type in
|
|
14
|
+
* TYPE_PROJECTIONS. The scaffold does NOT yet, except for `messaging`
|
|
15
|
+
* (generation/storage.ts) — storage, database and network still emit their
|
|
16
|
+
* props by hand there, so for those three this is one of two encodings still.
|
|
17
|
+
* Converging the scaffold's remaining emitters is what makes the "single"
|
|
18
|
+
* claim true; until then, a table entry proves the codemod's behaviour and
|
|
19
|
+
* only documents the scaffold's.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* A construct prop's value. `literal` is a plain JS value the emitter
|
|
23
|
+
* serialises; `expression` is TypeScript source spliced in verbatim, which
|
|
24
|
+
* only a caller that can supply live bindings may ask for.
|
|
25
|
+
*/
|
|
26
|
+
export type ProjectedValue = {
|
|
27
|
+
kind: "literal";
|
|
28
|
+
value: unknown;
|
|
29
|
+
} | {
|
|
30
|
+
kind: "expression";
|
|
31
|
+
source: string;
|
|
32
|
+
};
|
|
33
|
+
/** One construct prop, in construct vocabulary. */
|
|
34
|
+
export interface ProjectedProp {
|
|
35
|
+
key: string;
|
|
36
|
+
value: ProjectedValue;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A plan key this context cannot turn into a construct prop, and why. The
|
|
40
|
+
* scaffold ignores these — it consumes such keys through its own paths. The
|
|
41
|
+
* codemod refuses the whole statement, because writing the key would either
|
|
42
|
+
* take synth down or deploy something other than what was asked for.
|
|
43
|
+
*/
|
|
44
|
+
export interface UnprojectableProp {
|
|
45
|
+
key: string;
|
|
46
|
+
reason: string;
|
|
47
|
+
}
|
|
48
|
+
export interface Projection {
|
|
49
|
+
props: ProjectedProp[];
|
|
50
|
+
unprojectable: UnprojectableProp[];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* What the caller can offer beyond the plan fragment itself.
|
|
54
|
+
*
|
|
55
|
+
* `resolveBinding` is the whole difference between the two emission paths: the
|
|
56
|
+
* scaffold knows the identifier it bound each planned resource to, so it can
|
|
57
|
+
* answer; a codemod appending to a file someone else wrote generally cannot,
|
|
58
|
+
* and a key needing a live sibling is unprojectable for it.
|
|
59
|
+
*/
|
|
60
|
+
export interface ProjectionContext {
|
|
61
|
+
resolveBinding?: (planResourceName: string) => string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* The fragment is an EDIT to an existing statement rather than a whole
|
|
64
|
+
* resource. Constants describe the statement, so an edit must not carry
|
|
65
|
+
* them: `fjall modify messaging --retentionPeriod` asked to change the
|
|
66
|
+
* retention, not to write a `type` discriminator its author never mentioned.
|
|
67
|
+
*/
|
|
68
|
+
editingExisting?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* How one plan key becomes (or fails to become) a construct prop.
|
|
72
|
+
*
|
|
73
|
+
* - `prop` — carried through as a literal, under `as` when the two
|
|
74
|
+
* vocabularies name it differently.
|
|
75
|
+
* - `planOnly` — never a construct prop. The scaffold consumes it (a
|
|
76
|
+
* `const <var> =` binding, flattened extra properties); anywhere else it is
|
|
77
|
+
* inert, so it is reported rather than silently dropped.
|
|
78
|
+
* - `live` — the construct wants an object, not a value. `bind` gets the plan
|
|
79
|
+
* value and the context and returns the source text of an expression, or
|
|
80
|
+
* undefined when this context cannot produce one.
|
|
81
|
+
*/
|
|
82
|
+
export type PlanKeyRule = {
|
|
83
|
+
kind: "prop";
|
|
84
|
+
as?: string;
|
|
85
|
+
} | {
|
|
86
|
+
kind: "planOnly";
|
|
87
|
+
reason: string;
|
|
88
|
+
} | {
|
|
89
|
+
kind: "live";
|
|
90
|
+
as?: string;
|
|
91
|
+
reason: string;
|
|
92
|
+
bind: (value: unknown, context: ProjectionContext) => string | undefined;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* One resource type's projection.
|
|
96
|
+
*
|
|
97
|
+
* `constants` are props every statement of the type carries no matter what
|
|
98
|
+
* the plan says — the discriminators the constructs switch on and the plan
|
|
99
|
+
* vocabulary never carried.
|
|
100
|
+
*
|
|
101
|
+
* `keys` is consulted per plan key; a key with no entry passes through under
|
|
102
|
+
* its own name, which is the common case and is why the tables stay short
|
|
103
|
+
* enough to read as the specification they are.
|
|
104
|
+
*/
|
|
105
|
+
export interface TypeProjection {
|
|
106
|
+
constants?: ProjectedProp[];
|
|
107
|
+
keys?: Record<string, PlanKeyRule>;
|
|
108
|
+
}
|
|
File without changes
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const GENERATOR_VERSION = "7.
|
|
1
|
+
export declare const GENERATOR_VERSION = "7.3.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const E="7.
|
|
1
|
+
const E="7.3.0";export{E as GENERATOR_VERSION};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjall/generator",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/fjall-tech/fjall.git",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"license": "SEE LICENSE IN LICENSE",
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@fjall/util": "^7.
|
|
56
|
+
"@fjall/util": "^7.3.0",
|
|
57
57
|
"ast-types": "^0.16.1",
|
|
58
58
|
"recast": "^0.23.12",
|
|
59
59
|
"ts-morph": "^28.0.0",
|