@fjall/generator 15.0.0 → 16.0.1

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.
@@ -9,7 +9,7 @@
9
9
  "package.json",
10
10
  "tsconfig.json"
11
11
  ],
12
- "hash": "bea8a4133881b869aa3d0a86b65db2f142a1ab00b04301315bc5fa46ca3ba2b4",
12
+ "hash": "f6685c608cca04beb979959ce118ac282ad9f421c377fd89eb01269914ce21d1",
13
13
  "files": {
14
14
  "src/ast/astTestHelpers.ts": "026cac849eb88bdb",
15
15
  "src/ast/domain/astDomainParser.ts": "54a50bcec75a8306",
@@ -35,7 +35,7 @@
35
35
  "src/ast/parsers/resources/astScheduleParser.ts": "dbdac640c75b8bd3",
36
36
  "src/ast/parsers/resources/astStorageParser.ts": "309bc3257f46cfdf",
37
37
  "src/aws/regions.ts": "a028bcb92b0e41d9",
38
- "src/codemod/_internal.ts": "e865b7172fcc457b",
38
+ "src/codemod/_internal.ts": "bdc01126b7d4c9b3",
39
39
  "src/codemod/drift/detect.ts": "05f17c36c25a76ad",
40
40
  "src/codemod/drift/index.ts": "bff894032fd0ae09",
41
41
  "src/codemod/drift/merge.ts": "29093929befa9abd",
@@ -44,7 +44,7 @@
44
44
  "src/codemod/edits/addResource.ts": "bdc90708af588ff4",
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": "05f947d640ee1c42",
47
+ "src/codemod/edits/addResource/propertyBuilder.ts": "bcc1e8692ba426b1",
48
48
  "src/codemod/edits/addResource/siblingEmission.ts": "a305b45583272eca",
49
49
  "src/codemod/edits/appendAccountToStage.ts": "1796d909fa3ef79d",
50
50
  "src/codemod/edits/computeServiceLocator.ts": "7f86483d9a35e053",
@@ -181,11 +181,11 @@
181
181
  "src/validation/patterns.ts": "f9629eafdad7ac3e",
182
182
  "src/validation/validationMessages.ts": "772ae6e5a897a301",
183
183
  "src/validation/validationPatterns.ts": "865f3d688975b7c8",
184
- "src/version.ts": "e5f68bfd6ec4186d",
184
+ "src/version.ts": "919ec14858eb12a9",
185
185
  "../scripts/minify-dist.mjs": "6b2e4b0df8aec601",
186
- "package.json": "82c1047d2bfe256a",
186
+ "package.json": "0a080fff7d342c98",
187
187
  "tsconfig.json": "1929cf3f99fe9b1e"
188
188
  },
189
- "outputHash": "19b59493ade88ac7ce614d91f1c445d691310a62ac92c968801636ea999f3cbd",
189
+ "outputHash": "dd1cb1a73d2014acf9225083326ab2a5713313fb3d7fe4cad0f0e519286e056d",
190
190
  "outputFileCount": 343
191
191
  }
package/dist/.minified CHANGED
@@ -1 +1 @@
1
- 171 files minified at 2026-08-21T10:08:42.329Z
1
+ 171 files minified at 2026-08-22T04:03:49.206Z
@@ -1 +1 @@
1
- var u=Object.defineProperty;var n=(r,t)=>u(r,"name",{value:t,configurable:!0});import{detectLineTerminator as c}from"./fileRewriter/index.js";const m="/__codemod__/input.ts";function d(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}n(d,"isRecord");function p(r){if(!d(r))return;const t=r.program;if(!d(t))return;const e=t.body;if(Array.isArray(e)&&e.every(d))return e}n(p,"extractProgramBody");function i(r,t){return r.length===0?0:r.split(t).length}n(i,"countLines");function s(r,t){const e=c(r),o=i(t,e)-i(r,e);return o>=0?{added:o,removed:0}:{added:0,removed:-o}}n(s,"computeLinesDelta");export{m as DEFAULT_FILE_PATH,s as computeLinesDelta,p as extractProgramBody,d as isRecord};
1
+ var u=Object.defineProperty;var n=(r,t)=>u(r,"name",{value:t,configurable:!0});import{detectLineTerminator as c}from"./fileRewriter/print.js";const m="/__codemod__/input.ts";function d(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}n(d,"isRecord");function p(r){if(!d(r))return;const t=r.program;if(!d(t))return;const e=t.body;if(Array.isArray(e)&&e.every(d))return e}n(p,"extractProgramBody");function i(r,t){return r.length===0?0:r.split(t).length}n(i,"countLines");function s(r,t){const e=c(r),o=i(t,e)-i(r,e);return o>=0?{added:o,removed:0}:{added:0,removed:-o}}n(s,"computeLinesDelta");export{m as DEFAULT_FILE_PATH,s as computeLinesDelta,p as extractProgramBody,d as isRecord};
@@ -1,7 +1,7 @@
1
1
  import { type namedTypes as n } from "ast-types";
2
2
  import type { StructuredValue } from "../../../projection/index.js";
3
3
  import { type Result } from "../../../types/Result.js";
4
- import { type ObjectPropertyInput, type QuoteStyle } from "../../fileRewriter/index.js";
4
+ import { type ObjectPropertyInput, type QuoteStyle } from "../../fileRewriter/builders.js";
5
5
  import type { EmittedProp } from "../../emitProjection.js";
6
6
  import type { InvalidPropertyError } from "../../types.js";
7
7
  /**
@@ -1 +1 @@
1
- var E=Object.defineProperty;var u=(e,r)=>E(e,"name",{value:r,configurable:!0});import{builders as o}from"ast-types";import{failure as a,success as c}from"../../../types/Result.js";import{buildObjectProperty as b}from"../../fileRewriter/index.js";function P(e,r){const i=[];for(const n of e){const t=x(n,r);if(!t.success)return a(t.error);i.push({key:n.key,value:t.data})}return c(i)}u(P,"buildPropertyInputs");const h=/^[A-Za-z_$][A-Za-z0-9_$]*$/,g=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield","implements","interface","package","private","protected","public","let","static","eval","arguments"]);function x(e,r){if(e.kind==="expression")return h.test(e.source)?g.has(e.source)?a({kind:"InvalidPropertyError",property:e.key,reason:`\`${e.key}\` resolved to \`${e.source}\`, which is a JavaScript reserved word \u2014 no binding can carry that name, so splicing it would write a file that does not parse.`}):c(o.identifier(e.source)):a({kind:"InvalidPropertyError",property:e.key,reason:`\`${e.key}\` resolved to the expression \`${e.source}\`, which is not a bare identifier; this emitter only splices the name of a live binding.`});if(e.kind==="structured")return d(e.key,e.expression,r);const i=f(e.value,r);return i===void 0?a({kind:"InvalidPropertyError",property:e.key,reason:`Unsupported property value for "${e.key}" (accepts string/number/boolean/null/array/object of the same).`}):c(i)}u(x,"buildEmittedValue");function p(e,r){if(!h.test(r))return{kind:"InvalidPropertyError",property:e,reason:`\`${e}\` produced the expression segment \`${r}\`, which is not a bare identifier; structured expressions emit validated identifier segments only.`};if(g.has(r))return{kind:"InvalidPropertyError",property:e,reason:`\`${e}\` produced the expression segment \`${r}\`, which is a JavaScript reserved word \u2014 emitting it would write a file that does not parse.`}}u(p,"identifierSegmentRefusal");function y(e){return{kind:"InvalidPropertyError",property:e,reason:`Unsupported property value for "${e}" (accepts string/number/boolean/null/array/object of the same).`}}u(y,"unsupportedLiteralRefusal");function d(e,r,i){switch(r.kind){case"primary-binding":return a({kind:"InvalidPropertyError",property:e,reason:`\`${e}\` carries an unsubstituted primary-binding marker \u2014 only a sibling statement's props may reference the primary construct, and the sibling engine substitutes the marker before anything is built.`});case"literal":{const n=f(r.value,i);return n===void 0?a(y(e)):c(n)}case"identifier":{const n=p(e,r.name);return n!==void 0?a(n):c(o.identifier(r.name))}case"member":{const n=p(e,r.property);if(n!==void 0)return a(n);const t=d(e,r.object,i);return t.success?c(o.memberExpression(t.data,o.identifier(r.property),!1)):t}case"call":{const n=d(e,r.callee,i);if(!n.success)return n;const t=[];for(const s of r.args){if(s.kind==="identifier"){const m=p(e,s.name);if(m!==void 0)return a(m);t.push(o.identifier(s.name));continue}const l=f(s.value,i);if(l===void 0)return a(y(e));t.push(l)}return c(o.callExpression(n.data,t))}case"object":{const n=[];for(const t of r.entries){const s=d(e,t.value,i);if(!s.success)return s;n.push(b(t.key,s.data,i))}return c(o.objectExpression(n))}case"array":{const n=[];for(const t of r.elements){const s=d(e,t,i);if(!s.success)return s;n.push(s.data)}return c(o.arrayExpression(n))}}}u(d,"buildStructuredValue");function f(e,r){if(typeof e=="string")return w(e,r);if(typeof e=="number"&&Number.isFinite(e))return o.numericLiteral(e);if(typeof e=="boolean")return o.booleanLiteral(e);if(e===null)return o.nullLiteral();if(Array.isArray(e)){const i=[];for(const n of e){const t=f(n,r);if(t===void 0)return;i.push(t)}return o.arrayExpression(i)}if(typeof e=="object"&&e!==null){const i=[];for(const[n,t]of Object.entries(e)){const s=f(t,r);if(s===void 0)return;i.push(b(n,s,r))}return o.objectExpression(i)}}u(f,"toAstValue");function w(e,r){const i=r==="single"?"'":'"',n=r==="single"?e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"):e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),t=`${i}${n}${i}`;return o.stringLiteral.from({value:e,extra:{rawValue:e,raw:t}})}u(w,"makeStringLiteral");export{h as IDENTIFIER_SOURCE_PATTERN,g as RESERVED_IDENTIFIER_NAMES,x as buildEmittedValue,P as buildPropertyInputs,d as buildStructuredValue,w as makeStringLiteral,f as toAstValue};
1
+ var E=Object.defineProperty;var u=(e,r)=>E(e,"name",{value:r,configurable:!0});import{builders as o}from"ast-types";import{failure as a,success as c}from"../../../types/Result.js";import{buildObjectProperty as b}from"../../fileRewriter/builders.js";function P(e,r){const i=[];for(const n of e){const t=x(n,r);if(!t.success)return a(t.error);i.push({key:n.key,value:t.data})}return c(i)}u(P,"buildPropertyInputs");const h=/^[A-Za-z_$][A-Za-z0-9_$]*$/,g=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield","implements","interface","package","private","protected","public","let","static","eval","arguments"]);function x(e,r){if(e.kind==="expression")return h.test(e.source)?g.has(e.source)?a({kind:"InvalidPropertyError",property:e.key,reason:`\`${e.key}\` resolved to \`${e.source}\`, which is a JavaScript reserved word \u2014 no binding can carry that name, so splicing it would write a file that does not parse.`}):c(o.identifier(e.source)):a({kind:"InvalidPropertyError",property:e.key,reason:`\`${e.key}\` resolved to the expression \`${e.source}\`, which is not a bare identifier; this emitter only splices the name of a live binding.`});if(e.kind==="structured")return d(e.key,e.expression,r);const i=f(e.value,r);return i===void 0?a({kind:"InvalidPropertyError",property:e.key,reason:`Unsupported property value for "${e.key}" (accepts string/number/boolean/null/array/object of the same).`}):c(i)}u(x,"buildEmittedValue");function p(e,r){if(!h.test(r))return{kind:"InvalidPropertyError",property:e,reason:`\`${e}\` produced the expression segment \`${r}\`, which is not a bare identifier; structured expressions emit validated identifier segments only.`};if(g.has(r))return{kind:"InvalidPropertyError",property:e,reason:`\`${e}\` produced the expression segment \`${r}\`, which is a JavaScript reserved word \u2014 emitting it would write a file that does not parse.`}}u(p,"identifierSegmentRefusal");function y(e){return{kind:"InvalidPropertyError",property:e,reason:`Unsupported property value for "${e}" (accepts string/number/boolean/null/array/object of the same).`}}u(y,"unsupportedLiteralRefusal");function d(e,r,i){switch(r.kind){case"primary-binding":return a({kind:"InvalidPropertyError",property:e,reason:`\`${e}\` carries an unsubstituted primary-binding marker \u2014 only a sibling statement's props may reference the primary construct, and the sibling engine substitutes the marker before anything is built.`});case"literal":{const n=f(r.value,i);return n===void 0?a(y(e)):c(n)}case"identifier":{const n=p(e,r.name);return n!==void 0?a(n):c(o.identifier(r.name))}case"member":{const n=p(e,r.property);if(n!==void 0)return a(n);const t=d(e,r.object,i);return t.success?c(o.memberExpression(t.data,o.identifier(r.property),!1)):t}case"call":{const n=d(e,r.callee,i);if(!n.success)return n;const t=[];for(const s of r.args){if(s.kind==="identifier"){const m=p(e,s.name);if(m!==void 0)return a(m);t.push(o.identifier(s.name));continue}const l=f(s.value,i);if(l===void 0)return a(y(e));t.push(l)}return c(o.callExpression(n.data,t))}case"object":{const n=[];for(const t of r.entries){const s=d(e,t.value,i);if(!s.success)return s;n.push(b(t.key,s.data,i))}return c(o.objectExpression(n))}case"array":{const n=[];for(const t of r.elements){const s=d(e,t,i);if(!s.success)return s;n.push(s.data)}return c(o.arrayExpression(n))}}}u(d,"buildStructuredValue");function f(e,r){if(typeof e=="string")return w(e,r);if(typeof e=="number"&&Number.isFinite(e))return o.numericLiteral(e);if(typeof e=="boolean")return o.booleanLiteral(e);if(e===null)return o.nullLiteral();if(Array.isArray(e)){const i=[];for(const n of e){const t=f(n,r);if(t===void 0)return;i.push(t)}return o.arrayExpression(i)}if(typeof e=="object"&&e!==null){const i=[];for(const[n,t]of Object.entries(e)){const s=f(t,r);if(s===void 0)return;i.push(b(n,s,r))}return o.objectExpression(i)}}u(f,"toAstValue");function w(e,r){const i=r==="single"?"'":'"',n=r==="single"?e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"):e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),t=`${i}${n}${i}`;return o.stringLiteral.from({value:e,extra:{rawValue:e,raw:t}})}u(w,"makeStringLiteral");export{h as IDENTIFIER_SOURCE_PATTERN,g as RESERVED_IDENTIFIER_NAMES,x as buildEmittedValue,P as buildPropertyInputs,d as buildStructuredValue,w as makeStringLiteral,f as toAstValue};
@@ -1 +1 @@
1
- export declare const GENERATOR_VERSION = "15.0.0";
1
+ export declare const GENERATOR_VERSION = "16.0.1";
@@ -1 +1 @@
1
- const E="15.0.0";export{E as GENERATOR_VERSION};
1
+ const E="16.0.1";export{E as GENERATOR_VERSION};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fjall/generator",
3
- "version": "15.0.0",
3
+ "version": "16.0.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/fjall-tech/fjall.git",
@@ -57,7 +57,8 @@
57
57
  },
58
58
  "license": "SEE LICENSE IN LICENSE",
59
59
  "dependencies": {
60
- "@fjall/util": "^15.0.0",
60
+ "@babel/parser": "^7.29.8",
61
+ "@fjall/util": "^16.0.1",
61
62
  "ast-types": "^0.16.1",
62
63
  "recast": "^0.23.12",
63
64
  "ts-morph": "^28.0.0",