@fjall/generator 14.1.0 → 14.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.
Files changed (86) hide show
  1. package/dist/.build-source-hash +50 -45
  2. package/dist/.minified +1 -1
  3. package/dist/src/ast/astTestHelpers.d.ts +2 -0
  4. package/dist/src/ast/domain/astDomainParser.d.ts +24 -0
  5. package/dist/src/ast/domain/astDomainParser.js +1 -1
  6. package/dist/src/ast/index.d.ts +1 -1
  7. package/dist/src/ast/index.js +1 -1
  8. package/dist/src/ast/parsers/resources/astCdnParser.js +1 -1
  9. package/dist/src/ast/parsers/resources/astComputeParser.js +1 -1
  10. package/dist/src/codemod/drift/index.d.ts +1 -1
  11. package/dist/src/codemod/drift/index.js +1 -1
  12. package/dist/src/codemod/drift/snapshot.d.ts +33 -1
  13. package/dist/src/codemod/drift/snapshot.js +1 -1
  14. package/dist/src/codemod/drift/types.d.ts +16 -1
  15. package/dist/src/codemod/drift/types.js +1 -1
  16. package/dist/src/codemod/edits/addResource/propertyBuilder.d.ts +8 -0
  17. package/dist/src/codemod/edits/addResource/propertyBuilder.js +1 -1
  18. package/dist/src/codemod/edits/addResource/siblingEmission.d.ts +61 -0
  19. package/dist/src/codemod/edits/addResource/siblingEmission.js +1 -0
  20. package/dist/src/codemod/edits/addResource.js +1 -1
  21. package/dist/src/codemod/edits/connectResourceToCompute.js +1 -1
  22. package/dist/src/codemod/edits/ensureImports.d.ts +18 -0
  23. package/dist/src/codemod/edits/ensureImports.js +1 -1
  24. package/dist/src/codemod/edits/modifyResource.js +1 -1
  25. package/dist/src/codemod/edits/resourceStatementLocator.d.ts +3 -0
  26. package/dist/src/codemod/edits/resourceStatementLocator.js +1 -1
  27. package/dist/src/codemod/edits/siblingBindingResolution.d.ts +54 -1
  28. package/dist/src/codemod/edits/siblingBindingResolution.js +1 -1
  29. package/dist/src/codemod/emitGuard.d.ts +2 -30
  30. package/dist/src/codemod/emitGuard.js +1 -1
  31. package/dist/src/codemod/emitProjection.d.ts +31 -2
  32. package/dist/src/codemod/emitProjection.js +1 -1
  33. package/dist/src/codemod/fileRewriter/builders.d.ts +18 -0
  34. package/dist/src/codemod/fileRewriter/builders.js +1 -1
  35. package/dist/src/codemod/fileRewriter/index.d.ts +1 -1
  36. package/dist/src/codemod/fileRewriter/index.js +1 -1
  37. package/dist/src/codemod/index.d.ts +3 -2
  38. package/dist/src/codemod/index.js +1 -1
  39. package/dist/src/codemod/llmFallback/index.d.ts +1 -1
  40. package/dist/src/codemod/llmFallback/index.js +1 -1
  41. package/dist/src/codemod/llmFallback/shouldTryFallback.d.ts +9 -0
  42. package/dist/src/codemod/llmFallback/shouldTryFallback.js +1 -1
  43. package/dist/src/codemod/registry.d.ts +26 -27
  44. package/dist/src/codemod/registry.js +1 -1
  45. package/dist/src/codemod/validationGate/gates/projection.js +1 -1
  46. package/dist/src/dns/domainFileGenerator.js +8 -3
  47. package/dist/src/dns/domainRecords.d.ts +30 -0
  48. package/dist/src/dns/domainRecords.js +1 -1
  49. package/dist/src/dns/tsEmitter.js +9 -9
  50. package/dist/src/generation/common.js +8 -8
  51. package/dist/src/generation/connectionWiring.d.ts +83 -0
  52. package/dist/src/generation/connectionWiring.js +1 -0
  53. package/dist/src/generation/database.d.ts +3 -34
  54. package/dist/src/generation/database.js +20 -20
  55. package/dist/src/generation/index.d.ts +1 -0
  56. package/dist/src/generation/index.js +1 -1
  57. package/dist/src/generation/infrastructure.d.ts +11 -0
  58. package/dist/src/generation/infrastructure.js +38 -28
  59. package/dist/src/generation/messagingConnections.d.ts +1 -4
  60. package/dist/src/generation/messagingConnections.js +1 -1
  61. package/dist/src/generation/storageConnections.d.ts +1 -12
  62. package/dist/src/generation/storageConnections.js +1 -1
  63. package/dist/src/planning/resourceAddition.d.ts +3 -0
  64. package/dist/src/planning/resourceAddition.js +1 -1
  65. package/dist/src/projection/compute.d.ts +31 -0
  66. package/dist/src/projection/compute.js +1 -0
  67. package/dist/src/projection/index.d.ts +3 -2
  68. package/dist/src/projection/index.js +1 -1
  69. package/dist/src/projection/project.d.ts +16 -1
  70. package/dist/src/projection/project.js +1 -1
  71. package/dist/src/projection/roundTripKeys.d.ts +12 -0
  72. package/dist/src/projection/roundTripKeys.js +1 -0
  73. package/dist/src/projection/tables.d.ts +13 -9
  74. package/dist/src/projection/tables.js +1 -1
  75. package/dist/src/projection/types.d.ts +204 -4
  76. package/dist/src/projection/unresolved.d.ts +17 -0
  77. package/dist/src/projection/unresolved.js +1 -0
  78. package/dist/src/schemas/applicationSchemas.d.ts +2 -0
  79. package/dist/src/schemas/cdnSchemas.d.ts +4 -0
  80. package/dist/src/schemas/cdnSchemas.js +1 -1
  81. package/dist/src/schemas/computeSchemas.js +1 -1
  82. package/dist/src/validation/validationMessages.d.ts +1 -0
  83. package/dist/src/validation/validationMessages.js +1 -1
  84. package/dist/src/version.d.ts +1 -1
  85. package/dist/src/version.js +1 -1
  86. package/package.json +2 -2
@@ -9,11 +9,11 @@
9
9
  "package.json",
10
10
  "tsconfig.json"
11
11
  ],
12
- "hash": "297a6c78a2367a9f5699e6a8403f8ecebdec5cae2296e6a76c477ea3f41823eb",
12
+ "hash": "c197865438d6a6214248a8902160c0d9169037282836cf9111df93c3bb3f793f",
13
13
  "files": {
14
14
  "src/ast/astTestHelpers.ts": "026cac849eb88bdb",
15
- "src/ast/domain/astDomainParser.ts": "940ce5742507477d",
16
- "src/ast/index.ts": "502a507c3764acbf",
15
+ "src/ast/domain/astDomainParser.ts": "54a50bcec75a8306",
16
+ "src/ast/index.ts": "48c73220502e5201",
17
17
  "src/ast/mutation/astCodeInjection.ts": "c1ebf483fb1e2332",
18
18
  "src/ast/mutation/astExpressionEvaluator.ts": "6082789268b91212",
19
19
  "src/ast/mutation/astSurgicalModification.ts": "9c512e11e8239c4d",
@@ -22,10 +22,10 @@
22
22
  "src/ast/parsers/common/astStatementQueries.ts": "e40e31e0fcdc15e3",
23
23
  "src/ast/parsers/orchestrator/astInfrastructureParser.ts": "07fd7a94796ebf5f",
24
24
  "src/ast/parsers/orchestrator/astPlanConverter.ts": "eb9b1f0ab90f6999",
25
- "src/ast/parsers/resources/astCdnParser.ts": "e00d034378374811",
25
+ "src/ast/parsers/resources/astCdnParser.ts": "726b298b0b580d68",
26
26
  "src/ast/parsers/resources/astClickHouseParser.ts": "cf49943b3d2bbd48",
27
27
  "src/ast/parsers/resources/astComputeConnectionParser.ts": "e0f1533845f3ce8a",
28
- "src/ast/parsers/resources/astComputeParser.ts": "98e4a2e6b2d634fa",
28
+ "src/ast/parsers/resources/astComputeParser.ts": "8caa5cc22af1913a",
29
29
  "src/ast/parsers/resources/astComputeParserHelpers.ts": "b824f221f8c7e3d9",
30
30
  "src/ast/parsers/resources/astDatabaseParser.ts": "e18f5483f5e23297",
31
31
  "src/ast/parsers/resources/astDynamoDBParser.ts": "809c2c633447b388",
@@ -37,62 +37,63 @@
37
37
  "src/aws/regions.ts": "a028bcb92b0e41d9",
38
38
  "src/codemod/_internal.ts": "e865b7172fcc457b",
39
39
  "src/codemod/drift/detect.ts": "05f17c36c25a76ad",
40
- "src/codemod/drift/index.ts": "e87e1ced35eefa44",
40
+ "src/codemod/drift/index.ts": "bff894032fd0ae09",
41
41
  "src/codemod/drift/merge.ts": "29093929befa9abd",
42
- "src/codemod/drift/snapshot.ts": "e389b8dbc41f6dc3",
43
- "src/codemod/drift/types.ts": "7f1d7899e420e4d7",
44
- "src/codemod/edits/addResource.ts": "7d0fb772913f64c7",
42
+ "src/codemod/drift/snapshot.ts": "42748d69d1bc5142",
43
+ "src/codemod/drift/types.ts": "a1d07d77aa48dc17",
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": "3152f13c4a0f600d",
47
+ "src/codemod/edits/addResource/propertyBuilder.ts": "04d04e8207041381",
48
+ "src/codemod/edits/addResource/siblingEmission.ts": "a305b45583272eca",
48
49
  "src/codemod/edits/appendAccountToStage.ts": "1796d909fa3ef79d",
49
50
  "src/codemod/edits/computeServiceLocator.ts": "7f86483d9a35e053",
50
- "src/codemod/edits/connectResourceToCompute.ts": "ab704b6e75a7f173",
51
+ "src/codemod/edits/connectResourceToCompute.ts": "6c1c2ea2f761760f",
51
52
  "src/codemod/edits/controlFlowPolicy.ts": "e32bbe2894f76c65",
52
53
  "src/codemod/edits/crossPlanConnection.ts": "54a4ecb7b3368160",
53
54
  "src/codemod/edits/driftPolicy.ts": "5d9b7bb3505f987d",
54
- "src/codemod/edits/ensureImports.ts": "3ca0b6d446c4333c",
55
+ "src/codemod/edits/ensureImports.ts": "f1ac65fd7b4b826e",
55
56
  "src/codemod/edits/findInsertionPosition.ts": "20cd34fdcf781017",
56
57
  "src/codemod/edits/index.ts": "bea5ed7c3983342b",
57
- "src/codemod/edits/modifyResource.ts": "a9882dc62dacb11e",
58
+ "src/codemod/edits/modifyResource.ts": "987e14d973caa83e",
58
59
  "src/codemod/edits/modifyResource/literalConversion.ts": "31295cccd59131b7",
59
60
  "src/codemod/edits/moduleConstResolver.ts": "85a8597427849a80",
60
61
  "src/codemod/edits/objectGraph.ts": "5efc4181547237f8",
61
62
  "src/codemod/edits/removeResource.ts": "6af70ee482fabc06",
62
63
  "src/codemod/edits/removeResource/commentHeuristic.ts": "90b6ce7ba5aa2a48",
63
64
  "src/codemod/edits/removeResource/importPruning.ts": "f22783108b40f6cb",
64
- "src/codemod/edits/resourceStatementLocator.ts": "e3094282860c764f",
65
+ "src/codemod/edits/resourceStatementLocator.ts": "47ce6a99fe5858c9",
65
66
  "src/codemod/edits/secretsProvability.ts": "d723283918e31efd",
66
67
  "src/codemod/edits/setContainerSecrets.ts": "24478c4205e79cbd",
67
- "src/codemod/edits/siblingBindingResolution.ts": "7ed8938cfff4b38d",
68
+ "src/codemod/edits/siblingBindingResolution.ts": "7f313b04b5f53633",
68
69
  "src/codemod/edits/unmanagedShapeErrors.ts": "47a2644913c8e619",
69
70
  "src/codemod/edits/vpcPeer.ts": "0bcf90c2e6d16ca4",
70
71
  "src/codemod/edits/vpcPeerAccepter.ts": "c9eace933e9e2345",
71
- "src/codemod/emitGuard.ts": "c04655a3cbfea38b",
72
- "src/codemod/emitProjection.ts": "26909ef16e498ac2",
73
- "src/codemod/fileRewriter/builders.ts": "46a0d43240ff0818",
74
- "src/codemod/fileRewriter/index.ts": "fd715b41176a7999",
72
+ "src/codemod/emitGuard.ts": "d199ccbf91166618",
73
+ "src/codemod/emitProjection.ts": "bdc862dedf8d649a",
74
+ "src/codemod/fileRewriter/builders.ts": "9b7ab0f797c9ab56",
75
+ "src/codemod/fileRewriter/index.ts": "222aa7493cedbb01",
75
76
  "src/codemod/fileRewriter/locateByRange.ts": "889ee6256201c1fe",
76
77
  "src/codemod/fileRewriter/parse.ts": "b12026c31562a13c",
77
78
  "src/codemod/fileRewriter/print.ts": "f5ff7afb5b7786bf",
78
79
  "src/codemod/historyPaths.ts": "ef8084013146db57",
79
- "src/codemod/index.ts": "b90c77ffc82e09df",
80
+ "src/codemod/index.ts": "49bf31b304603e50",
80
81
  "src/codemod/listResources.ts": "97f206a50edbea20",
81
82
  "src/codemod/llmFallback/apply.ts": "2e656a6e55b3b4e3",
82
83
  "src/codemod/llmFallback/claudeTier.ts": "ace3e3baa51383c9",
83
84
  "src/codemod/llmFallback/egressGate.ts": "1b9076a5c51508fc",
84
85
  "src/codemod/llmFallback/egressGate.types.ts": "e30947f12ee546ff",
85
86
  "src/codemod/llmFallback/gateFallbackOutput.ts": "c630f3f0215ef077",
86
- "src/codemod/llmFallback/index.ts": "d32779fa95df6b94",
87
+ "src/codemod/llmFallback/index.ts": "b23cd7643ee5db3c",
87
88
  "src/codemod/llmFallback/morphTier.ts": "adcc1cf280f9a65d",
88
89
  "src/codemod/llmFallback/prompt.ts": "60e8f4ab434bf9ec",
89
90
  "src/codemod/llmFallback/runFallback.ts": "03880734d6c456af",
90
- "src/codemod/llmFallback/shouldTryFallback.ts": "df6038f97612b8ee",
91
+ "src/codemod/llmFallback/shouldTryFallback.ts": "0ea7eeabf341f2c9",
91
92
  "src/codemod/llmFallback/signals.ts": "298bae6465b5f173",
92
93
  "src/codemod/llmFallback/telemetryEvents.ts": "827282cb185eea6c",
93
94
  "src/codemod/llmFallback/tierRunner.ts": "a26094accd78cf15",
94
95
  "src/codemod/llmFallback/types.ts": "0b528ccbab7d48b8",
95
- "src/codemod/registry.ts": "4b55358c3db17cea",
96
+ "src/codemod/registry.ts": "cb04890990f06ec0",
96
97
  "src/codemod/semanticIndex/classifyControlFlow.ts": "ed96215d91a3cae3",
97
98
  "src/codemod/semanticIndex/findReferences.ts": "96aea37418d1e91a",
98
99
  "src/codemod/semanticIndex/index.ts": "cfcd212d34ab20fb",
@@ -106,37 +107,38 @@
106
107
  "src/codemod/validationGate/gates/drift.ts": "bd603a216fbb91a9",
107
108
  "src/codemod/validationGate/gates/locate.ts": "2c186c32edbb97ce",
108
109
  "src/codemod/validationGate/gates/parse.ts": "5433c5c8ffa35324",
109
- "src/codemod/validationGate/gates/projection.ts": "a29d627ce75bc6c0",
110
+ "src/codemod/validationGate/gates/projection.ts": "461051f3dc6bf6b2",
110
111
  "src/codemod/validationGate/gates/schema.ts": "7ed5acaec0620a46",
111
112
  "src/codemod/validationGate/index.ts": "bbe1f460330a11cf",
112
113
  "src/codemod/validationGate/types.ts": "4a1cfa054e3383d5",
113
114
  "src/detection/index.ts": "b4ad9a935564cb3e",
114
115
  "src/dns/bindParser.ts": "376d274bf9e4bf9f",
115
116
  "src/dns/bindWriter.ts": "c296911ce5aef77c",
116
- "src/dns/domainFileGenerator.ts": "179258ce9d15d990",
117
- "src/dns/domainRecords.ts": "ab917006b92ae916",
117
+ "src/dns/domainFileGenerator.ts": "cb03cd1a6b1bf452",
118
+ "src/dns/domainRecords.ts": "912ee83fc9ebdfcf",
118
119
  "src/dns/index.ts": "266288ae3b851e3d",
119
- "src/dns/tsEmitter.ts": "2f2f13061d1850db",
120
+ "src/dns/tsEmitter.ts": "1667fe66013e767d",
120
121
  "src/dns/types.ts": "82d6db9d7d26dbc2",
121
- "src/generation/common.ts": "ab66eac580bc227f",
122
+ "src/generation/common.ts": "20075ada839797fb",
122
123
  "src/generation/compute.ts": "4029a0d8e3197686",
123
124
  "src/generation/compute/ec2.ts": "4d8187d293a57fb1",
124
125
  "src/generation/compute/ecs.ts": "38a345cbd45c40d4",
125
126
  "src/generation/compute/lambda.ts": "4f5e31080941b83a",
126
127
  "src/generation/compute/shared.ts": "3724d4bfe92cfcb7",
127
- "src/generation/database.ts": "dd4a1540986ad350",
128
+ "src/generation/connectionWiring.ts": "9afb0227f2584ab2",
129
+ "src/generation/database.ts": "07c09dd692c8c4be",
128
130
  "src/generation/generatePatternCode.ts": "ab752292dd72b676",
129
- "src/generation/index.ts": "fd58a833e13bcf07",
130
- "src/generation/infrastructure.ts": "6381d502f4733926",
131
- "src/generation/messagingConnections.ts": "fef976a8261c6751",
131
+ "src/generation/index.ts": "5745098c57819b3a",
132
+ "src/generation/infrastructure.ts": "0e0c70437195bb0e",
133
+ "src/generation/messagingConnections.ts": "09e70af97e055712",
132
134
  "src/generation/storage.ts": "2c0171aeeec3d79e",
133
- "src/generation/storageConnections.ts": "a4020c9d6c36dc3f",
135
+ "src/generation/storageConnections.ts": "c0dc86aebf7158ae",
134
136
  "src/index.ts": "fc8f27b8ffade9ef",
135
137
  "src/planning/generateResourceChange.ts": "1c6411f9a12e7acb",
136
138
  "src/planning/index.ts": "8ef807b31c43310c",
137
139
  "src/planning/openNextPlanning.ts": "4af9cb9061f7d21e",
138
140
  "src/planning/planBuilders.ts": "bea93d0c05caef21",
139
- "src/planning/resourceAddition.ts": "ba27203af283d840",
141
+ "src/planning/resourceAddition.ts": "7d0320620a74fdcd",
140
142
  "src/planning/resourceConnections.ts": "a6b7db8f733e560f",
141
143
  "src/planning/resourcePlanning.ts": "1fefdbc93e12ba7f",
142
144
  "src/planning/staticSitePlanning.ts": "242af1e9618821ab",
@@ -146,16 +148,19 @@
146
148
  "src/presets/storagePresets.ts": "5df2d4d7d21a66d8",
147
149
  "src/presets/tierPresets.ts": "c0148771bffbef9b",
148
150
  "src/presets/tierTypes.ts": "6526373876daacf0",
149
- "src/projection/index.ts": "85d17974561fb3d9",
150
- "src/projection/project.ts": "5613c875194dede9",
151
- "src/projection/tables.ts": "21786d551ca8cfd0",
152
- "src/projection/types.ts": "588ef43b70ab3127",
151
+ "src/projection/compute.ts": "b26369999600a11f",
152
+ "src/projection/index.ts": "3ddb1d53f5781805",
153
+ "src/projection/project.ts": "06e6a3b872d10243",
154
+ "src/projection/roundTripKeys.ts": "a6996fc1ae067d27",
155
+ "src/projection/tables.ts": "5ed946e03b08f705",
156
+ "src/projection/types.ts": "68045bc02a36cee9",
157
+ "src/projection/unresolved.ts": "885c8d3c1624b328",
153
158
  "src/schemas/alarmSchemas.ts": "a6f6ac07b2a102de",
154
159
  "src/schemas/applicationSchemas.ts": "d85771a4607cf2da",
155
160
  "src/schemas/baseSchemas.ts": "93d9bd1c0adfcaa0",
156
161
  "src/schemas/buildkiteSchemas.ts": "a28ec3b40f7851ec",
157
- "src/schemas/cdnSchemas.ts": "a982034c7903a31a",
158
- "src/schemas/computeSchemas.ts": "907747add0b1e1a9",
162
+ "src/schemas/cdnSchemas.ts": "16784f15894c62ba",
163
+ "src/schemas/computeSchemas.ts": "e06dee92ede421d3",
159
164
  "src/schemas/constants.ts": "732a290de68e4ff8",
160
165
  "src/schemas/databaseSchemas.ts": "3c05f176e1aadb46",
161
166
  "src/schemas/devRolePolicies.ts": "6ca70fb20f5fbebc",
@@ -172,13 +177,13 @@
172
177
  "src/types/Result.ts": "6a078a91fc3072e3",
173
178
  "src/util/errorUtils.ts": "c021c57804424a5d",
174
179
  "src/validation/patterns.ts": "f9629eafdad7ac3e",
175
- "src/validation/validationMessages.ts": "c727ade4690274f4",
180
+ "src/validation/validationMessages.ts": "772ae6e5a897a301",
176
181
  "src/validation/validationPatterns.ts": "865f3d688975b7c8",
177
- "src/version.ts": "5cb1aaed65be54d1",
182
+ "src/version.ts": "f45b030d713c0c00",
178
183
  "../scripts/minify-dist.mjs": "6b2e4b0df8aec601",
179
- "package.json": "7e84c64bccf6c4e4",
184
+ "package.json": "300a99e3aa568d7d",
180
185
  "tsconfig.json": "1929cf3f99fe9b1e"
181
186
  },
182
- "outputHash": "f239c914eb6571c0854f15d2296c3483d5876eaffe7f062932377379a2328a3e",
183
- "outputFileCount": 329
187
+ "outputHash": "b1a6f9021e616997964204947d103b53edf2f79639e97e05eea0dcb8d79d76cd",
188
+ "outputFileCount": 339
184
189
  }
package/dist/.minified CHANGED
@@ -1 +1 @@
1
- 164 files minified at 2026-08-17T10:22:05.564Z
1
+ 169 files minified at 2026-08-20T22:18:56.335Z
@@ -711,6 +711,8 @@ export declare function parseAndConvert(code: string): {
711
711
  }[] | undefined;
712
712
  customDomain?: string | undefined;
713
713
  certificateArn?: string | undefined;
714
+ domain?: string | undefined;
715
+ originHostname?: string | undefined;
714
716
  accessGate?: false | {
715
717
  type: "basic-auth";
716
718
  username: string;
@@ -52,12 +52,16 @@ export interface ParsedStandardRecord {
52
52
  readonly name: string;
53
53
  readonly value: string | string[];
54
54
  readonly ttl?: number;
55
+ /** Construct-id override (stable-mode collision escape hatch). */
56
+ readonly id?: string;
55
57
  }
56
58
  export interface ParsedAliasRecord {
57
59
  readonly kind: "alias";
58
60
  readonly type: "A" | "AAAA";
59
61
  readonly name: string;
60
62
  readonly target: ParsedFjallTarget;
63
+ /** Construct-id override (stable-mode collision escape hatch). */
64
+ readonly id?: string;
61
65
  }
62
66
  export type ParsedDnsRecordFromAst = ParsedStandardRecord | ParsedAliasRecord;
63
67
  export interface ParsedCertificateFromAst {
@@ -74,6 +78,14 @@ export interface ParsedCertificateFromAst {
74
78
  }
75
79
  interface ParsedDomainCommon {
76
80
  readonly zoneName: string;
81
+ /**
82
+ * Records-list construct-id scheme (`DomainCommonProps.recordIds`);
83
+ * `undefined` means the construct default (`"indexed"`). Parsed
84
+ * fail-closed: dropping it on a round trip would silently flip a
85
+ * stable-mode zone back to indexed IDs — a full delete+recreate of its
86
+ * record sets at the next deploy.
87
+ */
88
+ readonly recordIds: "indexed" | "stable" | undefined;
77
89
  readonly description: string | undefined;
78
90
  readonly costAllocationEnvironment: string | undefined;
79
91
  readonly tags: Record<string, string> | undefined;
@@ -159,6 +171,18 @@ export type ParseDomainError = {
159
171
  export declare function parseDomainProps(propsObjectLiteral: ts.ObjectLiteralExpression): Result<ParsedDomainProps, ParseDomainError>;
160
172
  /** Human-readable single-line message for a `ParseDomainError`. */
161
173
  export declare function parseDomainErrorMessage(err: ParseDomainError): string;
174
+ /**
175
+ * Parse a domain component's infrastructure.ts SOURCE TEXT into the typed
176
+ * Domain props (single-Domain convention). Pure on its inputs — no
177
+ * filesystem — so both the CLI (cwd-resolved paths, ambient masking) and
178
+ * deploy-core's worker provider (job-checkout paths, explicit params) share
179
+ * ONE parse composition instead of each re-assembling
180
+ * createSourceFile + findDomainConstructCall + parseDomainProps.
181
+ *
182
+ * Error messages are unmasked here; callers with sensitive-output masking
183
+ * apply it at their boundary.
184
+ */
185
+ export declare function parseDomainInfrastructureSource(sourceText: string, infraPath: string, domainName: string): Result<ParsedDomainProps, Error>;
162
186
  /**
163
187
  * Split a comma-separated argument list into top-level args, respecting
164
188
  * nested parens/braces/brackets and string literals. Does NOT attempt to
@@ -1 +1 @@
1
- var R=Object.defineProperty;var u=(n,e)=>R(n,"name",{value:e,configurable:!0});import*as m from"typescript";import{parseObjectLiteral as T,asString as c,asStringUnion as k,asStringArray as y,asBoolean as b,asNumber as $,isCallRef as E,isParsedObject as g}from"../parsers/common/astCommonParser.js";import{success as l,failure as a}from"../../types/Result.js";import{DnsRecordTypeSchema as L}from"../../dns/types.js";import{DomainRegistrarSchema as j,DomainDeployPhaseSchema as Z,AliasRecordTypeSchema as O,TYPED_FJALL_TARGET_KINDS as C}from"../../dns/domainRecords.js";const N=j.options,x=Z.options,P=L.options,V=O.options;function ie(n){const e=[],t=u(r=>{if(m.isNewExpression(r)&&z(r.expression)){const d=F(r);d!==void 0&&e.push(d)}m.forEachChild(r,t)},"visit");if(t(n),e.length===0)return l(void 0);if(e.length>1)return a(new Error(`Expected exactly one 'new Domain(...)' call per infrastructure file, found ${e.length}`));const s=e[0];return s?l(s):l(void 0)}u(ie,"findDomainConstructCall");function z(n){return m.isIdentifier(n)&&n.text==="Domain"}u(z,"isDomainIdentifier");function F(n){const e=n.arguments;if(!e||e.length<3)return;const t=e[0],s=e[1],r=e[2];if(!t||!s||!r||!m.isObjectLiteralExpression(r))return;const d=M(n);if(d===void 0)return;const o=q(n),i=m.isStringLiteral(s)?s.text:void 0;return{callExpression:n,containingStatement:d,propsObjectLiteral:r,domainVarId:o,scopeArgumentText:t.getText(),constructIdLiteral:i}}u(F,"buildMatch");function M(n){let e=n;for(;e!==void 0;){if(m.isExpressionStatement(e)||m.isVariableStatement(e))return e;e=e.parent}}u(M,"findContainingTopLevelStatement");function q(n){let e=n.parent;for(;e!==void 0;){if(m.isVariableDeclaration(e)&&m.isIdentifier(e.name)&&e.initializer===n)return e.name.text;e=e.parent}}u(q,"extractDomainVarId");function B(n){switch(n.kind){case"registrar_required":return"'registrar' property is required";case"registrar_unsupported":return`'registrar' must be one of ${N.join(", ")}, got ${JSON.stringify(n.value)}`;case"missing_field":return`'${n.field}' property is required`;case"invalid_literal":return`'${n.field}' ${n.reason}`;case"removed_field":return`'${n.field}' was removed from the Domain API \u2014 ${n.cure}`}}u(B,"errorMessage");const J="declare the delegated child as its own Domain with registrar: 'external-delegated' and set 'parentDelegationRoleArn' (the CLI injects it via ManagedDomainBinding.delegationRoleArn); the child UPSERTs its NS records into the parent zone";function re(n){const e=T(n),t=k(e.registrar,N);if(t===void 0){const i=e.registrar;if(i===void 0)return a({kind:"registrar_required"});const f=typeof i=="string"?i:_(i);return a({kind:"registrar_unsupported",value:f})}const s=c(e.zoneName);if(s===void 0)return a({kind:"missing_field",field:"zoneName"});const r=U(e.records);if(!r.success)return r;const d=Q(e.certificates);if(!d.success)return d;if(e.delegations!==void 0)return a({kind:"removed_field",field:"delegations",cure:J});const o={zoneName:s,description:c(e.description),costAllocationEnvironment:c(e.costAllocationEnvironment),tags:W(e.tags),records:r.data,certificates:d.data};switch(t){case"route53":return l({...o,registrar:t,hostedZoneId:c(e.hostedZoneId)});case"external-delegated":{const i=c(e.delegatedSubdomain);if(i===void 0)return a({kind:"missing_field",field:"delegatedSubdomain"});const f=c(e.hostedZoneId);if(e.hostedZoneId!==void 0&&f===void 0)return a({kind:"invalid_literal",field:"hostedZoneId",reason:"must be a literal string zone id on external-delegated \u2014 dynamic expressions cannot be round-tripped"});const h=y(e.adoptedNameServers);if(e.adoptedNameServers!==void 0&&h===void 0)return a({kind:"invalid_literal",field:"adoptedNameServers",reason:"must be an array of literal NS hostname strings \u2014 the parent NS UPSERT writes them verbatim"});if(f===void 0!=(h===void 0))return a({kind:"invalid_literal",field:f===void 0?"hostedZoneId":"adoptedNameServers",reason:"adopting an existing child zone requires hostedZoneId and adoptedNameServers together (both-or-neither) \u2014 an imported zone exposes no name-server attribute at synth"});const S=c(e.parentDelegationRoleArn);if(e.parentDelegationRoleArn!==void 0&&S===void 0)return a({kind:"invalid_literal",field:"parentDelegationRoleArn",reason:"must be a literal string ARN (VD2-a) \u2014 the CLI injects it via ManagedDomainBinding.delegationRoleArn; dynamic expressions such as Fn.importValue are not supported"});const A=k(e.phase,x);return e.phase!==void 0&&A===void 0?a({kind:"invalid_literal",field:"phase",reason:`must be one of ${x.map(I=>`'${I}'`).join(", ")}`}):l({...o,registrar:t,delegatedSubdomain:i,hostedZoneId:f,adoptedNameServers:h,parentDelegationRoleArn:S,phase:A})}case"external-records":return l({...o,registrar:t})}}u(re,"parseDomainProps");function se(n){return B(n)}u(se,"parseDomainErrorMessage");function U(n){if(n===void 0)return l([]);if(!Array.isArray(n))return a({kind:"invalid_literal",field:"records",reason:"must be an array"});const e=[];for(let t=0;t<n.length;t++){const s=n[t];if(!g(s))return a({kind:"invalid_literal",field:`records[${t}]`,reason:"must be an object literal"});const r=G(s,t);if(!r.success)return r;e.push(r.data)}return l(e)}u(U,"parseRecordsArray");function G(n,e){const t=c(n.type),s=c(n.name);if(t===void 0)return a({kind:"missing_field",field:`records[${e}].type`});if(s===void 0)return a({kind:"missing_field",field:`records[${e}].name`});if(n.target!==void 0){if(!V.some(f=>f===t))return a({kind:"invalid_literal",field:`records[${e}]`,reason:`alias records must have type 'A' or 'AAAA', got '${t}'`});const i=H(n.target);return l({kind:"alias",type:t,name:s,target:i})}if(!P.some(i=>i===t))return a({kind:"invalid_literal",field:`records[${e}]`,reason:`unsupported record type '${t}'`});const r=Y(n.value);if(r===void 0)return a({kind:"invalid_literal",field:`records[${e}].value`,reason:`must be a string or array of strings (got ${JSON.stringify(n.value)})`});const d=$(n.ttl),o={kind:"standard",type:t,name:s,value:r,...d!==void 0?{ttl:d}:{}};return l(o)}u(G,"parseRecord");function Y(n){if(n===void 0)return;if(typeof n=="string")return n;const e=y(n);if(e!==void 0)return e}u(Y,"parseRecordValue");function H(n){if(E(n))return K(n);if(g(n)){const e=k(n.kind,C);if(e==="ecs"||e==="cdn"){const t=c(n.appName);if(t!==void 0)return{kind:e,appName:t}}if(e==="bucket"){const t=c(n.bucketName);if(t!==void 0)return{kind:e,bucketName:t}}if(e==="custom"){const t=c(n.dnsName),s=c(n.hostedZoneId);if(t!==void 0&&s!==void 0)return{kind:e,dnsName:t,hostedZoneId:s}}}return{kind:"unresolved",sourceText:_(n)}}u(H,"parseTarget");function K(n){const e=n.__call.trim(),t=e.match(/^([A-Za-z_][\w$]*)\s*\(([\s\S]*)\)\s*$/);if(!t)return{kind:"unresolved",sourceText:e};const s=t[1],r=t[2]??"",d=v(r);switch(s){case"fjallApp":{const o=p(d,0);if(o===void 0)return{kind:"dynamic",sourceText:e};if(d.length<2)return{kind:"ecs",appName:o};const i=p(d,1);return i===void 0?{kind:"dynamic",sourceText:e}:{kind:"ecs",appName:o,computeName:i}}case"fjallCdn":{const o=p(d,0);return o===void 0?{kind:"dynamic",sourceText:e}:{kind:"cdn",appName:o}}case"fjallBucket":{const o=p(d,0);return o===void 0?{kind:"dynamic",sourceText:e}:{kind:"bucket",bucketName:o}}case"aliasTo":{if(d.length>=2){const o=p(d,0),i=p(d,1);return o!==void 0&&i!==void 0?{kind:"custom",dnsName:o,hostedZoneId:i}:{kind:"dynamic",sourceText:e}}if(d.length===1){const o=d[0]?.trim()??"",i=D(o,"dnsName"),f=D(o,"hostedZoneId");return i!==void 0&&f!==void 0?{kind:"custom",dnsName:i,hostedZoneId:f}:{kind:"dynamic",sourceText:e}}return{kind:"unresolved",sourceText:e}}default:return{kind:"unresolved",sourceText:e}}}u(K,"resolveCallRefTarget");function v(n){const e=[];let t=0,s=null,r="";for(let o=0;o<n.length;o++){const i=n[o];if(s!==null){if(r+=i,i==="\\"&&o+1<n.length){const f=n[o+1];f!==void 0&&(r+=f,o+=1);continue}i===s&&(s=null);continue}if(i==='"'||i==="'"||i==="`"){s=i,r+=i;continue}if(i==="("||i==="{"||i==="["){t+=1,r+=i;continue}if(i===")"||i==="}"||i==="]"){t-=1,r+=i;continue}if(i===","&&t===0){e.push(r.trim()),r="";continue}r+=i}const d=r.trim();return d.length>0&&e.push(d),e}u(v,"splitTopLevelArgs");function p(n,e){const t=n[e];if(t===void 0)return;const s=t.trim();if(s.length<2)return;const r=s[0],d=s[s.length-1];if(r===d&&!(r!=='"'&&r!=="'"&&r!=="`"))return s.slice(1,-1)}u(p,"extractStringLiteralArg");function D(n,e){const t=n.trim().replace(/^\{|\}$/g,""),s=v(t);for(const r of s){const d=r.indexOf(":");if(d<0||r.slice(0,d).trim().replace(/["'`]/g,"")!==e)continue;const i=r.slice(d+1).trim();return p([i],0)}}u(D,"extractObjectFieldString");function Q(n){if(n===void 0)return l([]);if(!Array.isArray(n))return a({kind:"invalid_literal",field:"certificates",reason:"must be an array"});const e=[];for(let t=0;t<n.length;t++){const s=n[t];if(typeof s=="string"){e.push({domainName:s});continue}if(!g(s))return a({kind:"invalid_literal",field:`certificates[${t}]`,reason:"must be a string or object literal"});const r=c(s.domainName);if(r===void 0)return a({kind:"missing_field",field:`certificates[${t}].domainName`});const d=y(s.subjectAlternativeNames),o=b(s.transparencyLogging),i=b(s.cloudFront);if(s.cloudFront!==void 0&&i===void 0)return a({kind:"invalid_literal",field:`certificates[${t}].cloudFront`,reason:"must be a boolean literal \u2014 the CloudFront designation drives the zone-level us-east-1 export contract and cannot be round-tripped from a dynamic expression"});e.push({domainName:r,...d!==void 0?{subjectAlternativeNames:d}:{},...o!==void 0?{transparencyLogging:o}:{},...i!==void 0?{cloudFront:i}:{}})}return l(e)}u(Q,"parseCertificatesArray");function W(n){if(n===void 0||!g(n))return;const e={};for(const[t,s]of Object.entries(n)){const r=c(s);r!==void 0&&(e[t]=r)}return Object.keys(e).length===0?void 0:e}u(W,"parseStringRecord");function _(n){if(n===void 0)return"undefined";if(n===null)return"null";if(typeof n=="string")return JSON.stringify(n);if(typeof n=="number"||typeof n=="boolean")return String(n);if(Array.isArray(n))return`[${n.map(e=>_(e)).join(", ")}]`;if(typeof n=="object"){if("__call"in n)return String(n.__call);if("__identifier"in n)return String(n.__identifier);if("__expression"in n)return String(n.__expression);if("__unknown"in n)return String(n.__unknown)}return String(n)}u(_,"stringifyParsedValue");export{ie as findDomainConstructCall,se as parseDomainErrorMessage,re as parseDomainProps,v as splitTopLevelArgs};
1
+ var T=Object.defineProperty;var u=(n,e)=>T(n,"name",{value:e,configurable:!0});import*as m from"typescript";import{parseObjectLiteral as E,asString as f,asStringUnion as h,asStringArray as k,asBoolean as D,asNumber as L,isCallRef as j,isParsedObject as S}from"../parsers/common/astCommonParser.js";import{success as l,failure as a}from"../../types/Result.js";import{DnsRecordTypeSchema as O}from"../../dns/types.js";import{DomainRegistrarSchema as C,DomainDeployPhaseSchema as Z,AliasRecordTypeSchema as F,RecordConstructIdSchema as V,RecordIdsModeSchema as P,TYPED_FJALL_TARGET_KINDS as z}from"../../dns/domainRecords.js";const N=C.options,x=Z.options,I=P.options,M=O.options,q=F.options;function B(n){const e=[],t=u(r=>{if(m.isNewExpression(r)&&J(r.expression)){const d=U(r);d!==void 0&&e.push(d)}m.forEachChild(r,t)},"visit");if(t(n),e.length===0)return l(void 0);if(e.length>1)return a(new Error(`Expected exactly one 'new Domain(...)' call per infrastructure file, found ${e.length}`));const i=e[0];return i?l(i):l(void 0)}u(B,"findDomainConstructCall");function J(n){return m.isIdentifier(n)&&n.text==="Domain"}u(J,"isDomainIdentifier");function U(n){const e=n.arguments;if(!e||e.length<3)return;const t=e[0],i=e[1],r=e[2];if(!t||!i||!r||!m.isObjectLiteralExpression(r))return;const d=w(n);if(d===void 0)return;const o=G(n),s=m.isStringLiteral(i)?i.text:void 0;return{callExpression:n,containingStatement:d,propsObjectLiteral:r,domainVarId:o,scopeArgumentText:t.getText(),constructIdLiteral:s}}u(U,"buildMatch");function w(n){let e=n;for(;e!==void 0;){if(m.isExpressionStatement(e)||m.isVariableStatement(e))return e;e=e.parent}}u(w,"findContainingTopLevelStatement");function G(n){let e=n.parent;for(;e!==void 0;){if(m.isVariableDeclaration(e)&&m.isIdentifier(e.name)&&e.initializer===n)return e.name.text;e=e.parent}}u(G,"extractDomainVarId");function Y(n){switch(n.kind){case"registrar_required":return"'registrar' property is required";case"registrar_unsupported":return`'registrar' must be one of ${N.join(", ")}, got ${JSON.stringify(n.value)}`;case"missing_field":return`'${n.field}' property is required`;case"invalid_literal":return`'${n.field}' ${n.reason}`;case"removed_field":return`'${n.field}' was removed from the Domain API \u2014 ${n.cure}`}}u(Y,"errorMessage");const K="declare the delegated child as its own Domain with registrar: 'external-delegated' and set 'parentDelegationRoleArn' (the CLI injects it via ManagedDomainBinding.delegationRoleArn); the child UPSERTs its NS records into the parent zone";function H(n){const e=E(n),t=h(e.registrar,N);if(t===void 0){const c=e.registrar;if(c===void 0)return a({kind:"registrar_required"});const p=typeof c=="string"?c:y(c);return a({kind:"registrar_unsupported",value:p})}const i=f(e.zoneName);if(i===void 0)return a({kind:"missing_field",field:"zoneName"});const r=h(e.recordIds,I);if(e.recordIds!==void 0&&r===void 0)return a({kind:"invalid_literal",field:"recordIds",reason:`must be one of ${I.map(c=>`'${c}'`).join(", ")}`});const d=Q(e.records);if(!d.success)return d;const o=te(e.certificates);if(!o.success)return o;if(e.delegations!==void 0)return a({kind:"removed_field",field:"delegations",cure:K});const s={zoneName:i,recordIds:r,description:f(e.description),costAllocationEnvironment:f(e.costAllocationEnvironment),tags:re(e.tags),records:d.data,certificates:o.data};switch(t){case"route53":return l({...s,registrar:t,hostedZoneId:f(e.hostedZoneId)});case"external-delegated":{const c=f(e.delegatedSubdomain);if(c===void 0)return a({kind:"missing_field",field:"delegatedSubdomain"});const p=f(e.hostedZoneId);if(e.hostedZoneId!==void 0&&p===void 0)return a({kind:"invalid_literal",field:"hostedZoneId",reason:"must be a literal string zone id on external-delegated \u2014 dynamic expressions cannot be round-tripped"});const _=k(e.adoptedNameServers);if(e.adoptedNameServers!==void 0&&_===void 0)return a({kind:"invalid_literal",field:"adoptedNameServers",reason:"must be an array of literal NS hostname strings \u2014 the parent NS UPSERT writes them verbatim"});if(p===void 0!=(_===void 0))return a({kind:"invalid_literal",field:p===void 0?"hostedZoneId":"adoptedNameServers",reason:"adopting an existing child zone requires hostedZoneId and adoptedNameServers together (both-or-neither) \u2014 an imported zone exposes no name-server attribute at synth"});const A=f(e.parentDelegationRoleArn);if(e.parentDelegationRoleArn!==void 0&&A===void 0)return a({kind:"invalid_literal",field:"parentDelegationRoleArn",reason:"must be a literal string ARN (VD2-a) \u2014 the CLI injects it via ManagedDomainBinding.delegationRoleArn; dynamic expressions such as Fn.importValue are not supported"});const b=h(e.phase,x);return e.phase!==void 0&&b===void 0?a({kind:"invalid_literal",field:"phase",reason:`must be one of ${x.map($=>`'${$}'`).join(", ")}`}):l({...s,registrar:t,delegatedSubdomain:c,hostedZoneId:p,adoptedNameServers:_,parentDelegationRoleArn:A,phase:b})}case"external-records":return l({...s,registrar:t})}}u(H,"parseDomainProps");function ue(n){return Y(n)}u(ue,"parseDomainErrorMessage");function ce(n,e,t){const i=m.createSourceFile(e,n,m.ScriptTarget.Latest,!0,m.ScriptKind.TS),r=B(i);if(!r.success)return a(new Error(r.error.message));if(r.data===void 0)return a(new Error(`Domain '${t}': no 'new Domain(...)' call found in ${e} \u2014 the file is not a Fjall domain component.`));const d=H(r.data.propsObjectLiteral);return d.success?l(d.data):a(new Error(`Domain '${t}': infrastructure.ts could not be parsed (${d.error.kind}).`))}u(ce,"parseDomainInfrastructureSource");function Q(n){if(n===void 0)return l([]);if(!Array.isArray(n))return a({kind:"invalid_literal",field:"records",reason:"must be an array"});const e=[];for(let t=0;t<n.length;t++){const i=n[t];if(!S(i))return a({kind:"invalid_literal",field:`records[${t}]`,reason:"must be an object literal"});const r=W(i,t);if(!r.success)return r;e.push(r.data)}return l(e)}u(Q,"parseRecordsArray");function W(n,e){const t=f(n.type),i=f(n.name);if(t===void 0)return a({kind:"missing_field",field:`records[${e}].type`});if(i===void 0)return a({kind:"missing_field",field:`records[${e}].name`});const r=f(n.id);if(n.id!==void 0&&(r===void 0||!V.safeParse(r).success))return a({kind:"invalid_literal",field:`records[${e}].id`,reason:"must be a literal alphanumeric string starting with a letter \u2014 it becomes a CloudFormation logical-ID segment"});if(n.target!==void 0){if(!q.some(p=>p===t))return a({kind:"invalid_literal",field:`records[${e}]`,reason:`alias records must have type 'A' or 'AAAA', got '${t}'`});const c=ee(n.target);return l({kind:"alias",type:t,name:i,target:c,...r!==void 0?{id:r}:{}})}if(!M.some(c=>c===t))return a({kind:"invalid_literal",field:`records[${e}]`,reason:`unsupported record type '${t}'`});const d=X(n.value);if(d===void 0)return a({kind:"invalid_literal",field:`records[${e}].value`,reason:`must be a string or array of strings (got ${JSON.stringify(n.value)})`});const o=L(n.ttl),s={kind:"standard",type:t,name:i,value:d,...o!==void 0?{ttl:o}:{},...r!==void 0?{id:r}:{}};return l(s)}u(W,"parseRecord");function X(n){if(n===void 0)return;if(typeof n=="string")return n;const e=k(n);if(e!==void 0)return e}u(X,"parseRecordValue");function ee(n){if(j(n))return ne(n);if(S(n)){const e=h(n.kind,z);if(e==="ecs"||e==="cdn"){const t=f(n.appName);if(t!==void 0)return{kind:e,appName:t}}if(e==="bucket"){const t=f(n.bucketName);if(t!==void 0)return{kind:e,bucketName:t}}if(e==="custom"){const t=f(n.dnsName),i=f(n.hostedZoneId);if(t!==void 0&&i!==void 0)return{kind:e,dnsName:t,hostedZoneId:i}}}return{kind:"unresolved",sourceText:y(n)}}u(ee,"parseTarget");function ne(n){const e=n.__call.trim(),t=e.match(/^([A-Za-z_][\w$]*)\s*\(([\s\S]*)\)\s*$/);if(!t)return{kind:"unresolved",sourceText:e};const i=t[1],r=t[2]??"",d=v(r);switch(i){case"fjallApp":{const o=g(d,0);if(o===void 0)return{kind:"dynamic",sourceText:e};if(d.length<2)return{kind:"ecs",appName:o};const s=g(d,1);return s===void 0?{kind:"dynamic",sourceText:e}:{kind:"ecs",appName:o,computeName:s}}case"fjallCdn":{const o=g(d,0);return o===void 0?{kind:"dynamic",sourceText:e}:{kind:"cdn",appName:o}}case"fjallBucket":{const o=g(d,0);return o===void 0?{kind:"dynamic",sourceText:e}:{kind:"bucket",bucketName:o}}case"aliasTo":{if(d.length>=2){const o=g(d,0),s=g(d,1);return o!==void 0&&s!==void 0?{kind:"custom",dnsName:o,hostedZoneId:s}:{kind:"dynamic",sourceText:e}}if(d.length===1){const o=d[0]?.trim()??"",s=R(o,"dnsName"),c=R(o,"hostedZoneId");return s!==void 0&&c!==void 0?{kind:"custom",dnsName:s,hostedZoneId:c}:{kind:"dynamic",sourceText:e}}return{kind:"unresolved",sourceText:e}}default:return{kind:"unresolved",sourceText:e}}}u(ne,"resolveCallRefTarget");function v(n){const e=[];let t=0,i=null,r="";for(let o=0;o<n.length;o++){const s=n[o];if(i!==null){if(r+=s,s==="\\"&&o+1<n.length){const c=n[o+1];c!==void 0&&(r+=c,o+=1);continue}s===i&&(i=null);continue}if(s==='"'||s==="'"||s==="`"){i=s,r+=s;continue}if(s==="("||s==="{"||s==="["){t+=1,r+=s;continue}if(s===")"||s==="}"||s==="]"){t-=1,r+=s;continue}if(s===","&&t===0){e.push(r.trim()),r="";continue}r+=s}const d=r.trim();return d.length>0&&e.push(d),e}u(v,"splitTopLevelArgs");function g(n,e){const t=n[e];if(t===void 0)return;const i=t.trim();if(i.length<2)return;const r=i[0],d=i[i.length-1];if(r===d&&!(r!=='"'&&r!=="'"&&r!=="`"))return i.slice(1,-1)}u(g,"extractStringLiteralArg");function R(n,e){const t=n.trim().replace(/^\{|\}$/g,""),i=v(t);for(const r of i){const d=r.indexOf(":");if(d<0||r.slice(0,d).trim().replace(/["'`]/g,"")!==e)continue;const s=r.slice(d+1).trim();return g([s],0)}}u(R,"extractObjectFieldString");function te(n){if(n===void 0)return l([]);if(!Array.isArray(n))return a({kind:"invalid_literal",field:"certificates",reason:"must be an array"});const e=[];for(let t=0;t<n.length;t++){const i=n[t];if(typeof i=="string"){e.push({domainName:i});continue}if(!S(i))return a({kind:"invalid_literal",field:`certificates[${t}]`,reason:"must be a string or object literal"});const r=f(i.domainName);if(r===void 0)return a({kind:"missing_field",field:`certificates[${t}].domainName`});const d=k(i.subjectAlternativeNames),o=D(i.transparencyLogging),s=D(i.cloudFront);if(i.cloudFront!==void 0&&s===void 0)return a({kind:"invalid_literal",field:`certificates[${t}].cloudFront`,reason:"must be a boolean literal \u2014 the CloudFront designation drives the zone-level us-east-1 export contract and cannot be round-tripped from a dynamic expression"});e.push({domainName:r,...d!==void 0?{subjectAlternativeNames:d}:{},...o!==void 0?{transparencyLogging:o}:{},...s!==void 0?{cloudFront:s}:{}})}return l(e)}u(te,"parseCertificatesArray");function re(n){if(n===void 0||!S(n))return;const e={};for(const[t,i]of Object.entries(n)){const r=f(i);r!==void 0&&(e[t]=r)}return Object.keys(e).length===0?void 0:e}u(re,"parseStringRecord");function y(n){if(n===void 0)return"undefined";if(n===null)return"null";if(typeof n=="string")return JSON.stringify(n);if(typeof n=="number"||typeof n=="boolean")return String(n);if(Array.isArray(n))return`[${n.map(e=>y(e)).join(", ")}]`;if(typeof n=="object"){if("__call"in n)return String(n.__call);if("__identifier"in n)return String(n.__identifier);if("__expression"in n)return String(n.__expression);if("__unknown"in n)return String(n.__unknown)}return String(n)}u(y,"stringifyParsedValue");export{B as findDomainConstructCall,ue as parseDomainErrorMessage,ce as parseDomainInfrastructureSource,H as parseDomainProps,v as splitTopLevelArgs};
@@ -2,4 +2,4 @@ export { type IdentifierRef, type ExpressionRef, type CallRef, type ParsedValue,
2
2
  export { type ParsedInfrastructure, type ParsedDatabaseResource, type ParsedS3Resource, type ParsedComputeResource, type ParsedSQSResource, type ParsedCDNResource, type ParsedNetworkResource, type ParsedDynamoDBResource, type ParsedLambdaConfig, type ParsedPatternResource, type ImportInfo, type AstStatementType, type ClassifiedStatement, type CustomCodeBlock, parseInfrastructure, convertToResourcePlan, classifyStatements, extractCustomCodeBlocks, findManagedResourcePosition, getLastManagedStatementOfType, getManagedResourcesByType, } from "./parsers/orchestrator/astInfrastructureParser.js";
3
3
  export { type SurgicalModificationResult, type InsertionOptions, type UpdateOptions, type DeleteOptions, addResourceSurgically, updateResourceSurgically, removeResourceSurgically, } from "./mutation/astSurgicalModification.js";
4
4
  export { type FileValidationResult, ensureImports, injectCustomCodeBlocks, validateModifiedFile, } from "./mutation/astCodeInjection.js";
5
- export { type DomainCallMatch, type ParsedFjallTarget, type ParsedDnsRecordFromAst, type ParsedCertificateFromAst, type ParsedDomainProps, type ParsedRoute53ApexDomainProps, type ParsedExternalDelegatedDomainProps, type ParsedExternalRecordsDomainProps, type ParseDomainError, findDomainConstructCall, parseDomainProps, parseDomainErrorMessage, splitTopLevelArgs, } from "./domain/astDomainParser.js";
5
+ export { type DomainCallMatch, type ParsedFjallTarget, type ParsedDnsRecordFromAst, type ParsedCertificateFromAst, type ParsedDomainProps, type ParsedRoute53ApexDomainProps, type ParsedExternalDelegatedDomainProps, type ParsedExternalRecordsDomainProps, type ParseDomainError, findDomainConstructCall, parseDomainProps, parseDomainErrorMessage, parseDomainInfrastructureSource, splitTopLevelArgs, } from "./domain/astDomainParser.js";
@@ -1 +1 @@
1
- import{isPlainObject as s,isIdentifierRef as o,isExpressionRef as a,isCallRef as t,isParsedObject as i,asString as n,asNumber as c,asBoolean as l,asStringArray as p,asStringUnion as u,captureExtraProperties as d}from"./parsers/common/astCommonParser.js";import{parseInfrastructure as m,convertToResourcePlan as g,classifyStatements as R,extractCustomCodeBlocks as x,findManagedResourcePosition as y,getLastManagedStatementOfType as S,getManagedResourcesByType as C}from"./parsers/orchestrator/astInfrastructureParser.js";import{addResourceSurgically as M,updateResourceSurgically as v,removeResourceSurgically as B}from"./mutation/astSurgicalModification.js";import{ensureImports as b,injectCustomCodeBlocks as j,validateModifiedFile as D}from"./mutation/astCodeInjection.js";import{findDomainConstructCall as I,parseDomainProps as O,parseDomainErrorMessage as k,splitTopLevelArgs as A}from"./domain/astDomainParser.js";export{M as addResourceSurgically,l as asBoolean,c as asNumber,n as asString,p as asStringArray,u as asStringUnion,d as captureExtraProperties,R as classifyStatements,g as convertToResourcePlan,b as ensureImports,x as extractCustomCodeBlocks,I as findDomainConstructCall,y as findManagedResourcePosition,S as getLastManagedStatementOfType,C as getManagedResourcesByType,j as injectCustomCodeBlocks,t as isCallRef,a as isExpressionRef,o as isIdentifierRef,i as isParsedObject,s as isPlainObject,k as parseDomainErrorMessage,O as parseDomainProps,m as parseInfrastructure,B as removeResourceSurgically,A as splitTopLevelArgs,v as updateResourceSurgically,D as validateModifiedFile};
1
+ import{isPlainObject as s,isIdentifierRef as a,isExpressionRef as o,isCallRef as t,isParsedObject as i,asString as n,asNumber as c,asBoolean as u,asStringArray as l,asStringUnion as p,captureExtraProperties as f}from"./parsers/common/astCommonParser.js";import{parseInfrastructure as d,convertToResourcePlan as g,classifyStatements as R,extractCustomCodeBlocks as S,findManagedResourcePosition as x,getLastManagedStatementOfType as y,getManagedResourcesByType as C}from"./parsers/orchestrator/astInfrastructureParser.js";import{addResourceSurgically as M,updateResourceSurgically as v,removeResourceSurgically as B}from"./mutation/astSurgicalModification.js";import{ensureImports as I,injectCustomCodeBlocks as T,validateModifiedFile as b}from"./mutation/astCodeInjection.js";import{findDomainConstructCall as E,parseDomainProps as O,parseDomainErrorMessage as k,parseDomainInfrastructureSource as A,splitTopLevelArgs as L}from"./domain/astDomainParser.js";export{M as addResourceSurgically,u as asBoolean,c as asNumber,n as asString,l as asStringArray,p as asStringUnion,f as captureExtraProperties,R as classifyStatements,g as convertToResourcePlan,I as ensureImports,S as extractCustomCodeBlocks,E as findDomainConstructCall,x as findManagedResourcePosition,y as getLastManagedStatementOfType,C as getManagedResourcesByType,T as injectCustomCodeBlocks,t as isCallRef,o as isExpressionRef,a as isIdentifierRef,i as isParsedObject,s as isPlainObject,k as parseDomainErrorMessage,A as parseDomainInfrastructureSource,O as parseDomainProps,d as parseInfrastructure,B as removeResourceSurgically,L as splitTopLevelArgs,v as updateResourceSurgically,b as validateModifiedFile};
@@ -1 +1 @@
1
- var y=Object.defineProperty;var u=(e,n)=>y(e,"name",{value:n,configurable:!0});import*as m from"typescript";import{asString as c,asStringArray as I,asStringUnion as p,captureExtraProperties as O,findFirstInAst as P,isFactoryBuildCall as _,isFactoryMethodCall as x,isIdentifierRef as E,isParsedObject as A,parseObjectLiteral as G}from"../common/astCommonParser.js";function S(e){if(e.arguments.length<2)return null;const n=e.arguments[0],s=e.arguments[1];return!m.isStringLiteral(n)||!m.isObjectLiteralExpression(s)?null:{resourceName:n.text,config:G(s),node:e}}u(S,"extractCDNResource");function v(e,n,s){const f=n.find(i=>i.variableName===e);if(f)return f.resourceName;const r=s.find(i=>i.variableName===e||i.resourceName.charAt(0).toLowerCase()+i.resourceName.slice(1)===e);return r?r.resourceName:e}u(v,"resolveOriginIdentifier");const C=["CACHING_OPTIMIZED","CACHING_DISABLED"];function w(e){return P(e,n=>{if(!m.isCallExpression(n)||!x(n,"addCdn"))return;const s=n.arguments[0];if(_(s,"CdnFactory"))return S(s)??void 0})}u(w,"findCDNResource");function F(e,n,s){if(!e)return;const f=e,r=f.config,i=u(t=>E(t)?v(t.__identifier,n,s):c(t)??"","resolveOrigin"),D=i(r.origin),a={name:f.resourceName,defaultOriginRef:D};if(Array.isArray(r.behaviours)){const t=r.behaviours.filter(A).map(o=>({pathPattern:c(o.pathPattern)??"",originRef:i(o.origin),...p(o.cachePolicy,C)!==void 0&&{cachePolicy:p(o.cachePolicy,C)}}));t.length>0&&(a.behaviours=t)}const g=c(r.customDomain);if(g)a.customDomain=g;else{const t=I(r.domainNames);t&&t.length>0&&(a.customDomain=t[0])}const d=c(r.certificateArn);if(d&&(a.certificateArn=d),r.accessGate!==void 0){if(r.accessGate===!1)a.accessGate=!1;else if(A(r.accessGate)){const t=r.accessGate,o=c(t.type),l=c(t.username),h=c(t.password);o==="basic-auth"&&l&&h&&(a.accessGate={type:"basic-auth",username:l,password:h})}}const N=O(r,new Set(["originType","origin","behaviours","customDomain","domainNames","certificateArn","accessGate"]));return N.length>0&&(a.extraProperties=N),a}u(F,"convertCDNResource");export{F as convertCDNResource,w as findCDNResource};
1
+ var I=Object.defineProperty;var u=(r,a)=>I(r,"name",{value:a,configurable:!0});import*as h from"typescript";import{asString as t,asStringArray as S,asStringUnion as b,captureExtraProperties as _,findFirstInAst as v,isFactoryBuildCall as x,isFactoryMethodCall as E,isIdentifierRef as G,isParsedObject as N,parseObjectLiteral as H}from"../common/astCommonParser.js";function L(r){if(r.arguments.length<2)return null;const a=r.arguments[0],i=r.arguments[1];return!h.isStringLiteral(a)||!h.isObjectLiteralExpression(i)?null:{resourceName:a.text,config:H(i),node:r}}u(L,"extractCDNResource");function T(r,a,i){const m=a.find(c=>c.variableName===r);if(m)return m.resourceName;const n=i.find(c=>c.variableName===r||c.resourceName.charAt(0).toLowerCase()+c.resourceName.slice(1)===r);return n?n.resourceName:r}u(T,"resolveOriginIdentifier");const O=["CACHING_OPTIMIZED","CACHING_DISABLED"];function R(r){return v(r,a=>{if(!h.isCallExpression(a)||!E(a,"addCdn"))return;const i=a.arguments[0];if(x(i,"CdnFactory"))return L(i)??void 0})}u(R,"findCDNResource");function j(r,a,i){if(!r)return;const m=r,n=m.config,c=u(e=>G(e)?T(e.__identifier,a,i):t(e)??"","resolveOrigin"),C=t(n.originType)==="alb";let g;if(C){const e=c(n.loadBalancer),o=i.some(f=>f.resourceName===e),l=t(n.protocolPolicy);if(!o||l!=="HTTP_ONLY")throw new Error(`CDN '${m.resourceName}': only the generated alb lane is plan-mappable \u2014 originType "alb" with loadBalancer referencing a compute declared in this app and protocolPolicy "HTTP_ONLY". Reshape the statement to that form, or manage this CDN outside the generator lane.`);g=e}else g=c(n.origin);const s={name:m.resourceName,defaultOriginRef:g};if(Array.isArray(n.behaviours)){const e=n.behaviours.filter(N).map(o=>({pathPattern:t(o.pathPattern)??"",originRef:c(o.origin),...b(o.cachePolicy,O)!==void 0&&{cachePolicy:b(o.cachePolicy,O)}}));e.length>0&&(s.behaviours=e)}const y=t(n.customDomain);if(y)s.customDomain=y;else{const e=S(n.domainNames);e&&e.length>0&&(s.customDomain=e[0])}const A=t(n.certificateArn);A&&(s.certificateArn=A);const p=t(n.originHostname);p&&(s.originHostname=p);let D=!1;if(N(n.domainConfig)){const e=n.domainConfig,o=t(e.domainName);o!==void 0&&Object.keys(e).every(f=>f==="domainName"||f==="record")&&(e.record===void 0||t(e.record)==="alias")&&(s.domain=o,D=!0)}if(n.accessGate!==void 0){if(n.accessGate===!1)s.accessGate=!1;else if(N(n.accessGate)){const e=n.accessGate,o=t(e.type),l=t(e.username),f=t(e.password);o==="basic-auth"&&l&&f&&(s.accessGate={type:"basic-auth",username:l,password:f})}}const d=new Set(["originType","origin","behaviours","customDomain","domainNames","certificateArn","accessGate"]);D&&d.add("domainConfig"),C&&(d.add("loadBalancer"),d.add("protocolPolicy")),p&&d.add("originHostname");const P=_(n,d);return P.length>0&&(s.extraProperties=P),s}u(j,"convertCDNResource");export{j as convertCDNResource,R as findCDNResource};
@@ -1 +1 @@
1
- var v=Object.defineProperty;var a=(e,n)=>v(e,"name",{value:n,configurable:!0});import*as E from"typescript";import{asString as f,asNumber as y,asBoolean as m,asStringArray as C,asStringUnion as d,captureExtraProperties as T,collectFromAst as _,extractVariableName as b,isFactoryBuildCall as A,isFactoryMethodCall as x,isParsedObject as S,parseObjectLiteral as O}from"../common/astCommonParser.js";import{COMPUTE_ARCHITECTURES as D,COMPUTE_TYPES as R,DEPLOYMENT_TYPES as Y,EC2_INSTANCE_TYPES as K,FUNCTION_URL_AUTH_TYPES as U}from"../../../schemas/constants.js";import{assignIfDefined as c,extractCallStringArg as F,extractClusterConfig as L,extractEnumString as N,isEnvironmentRecord as h,parseEcsService as k}from"./astComputeParserHelpers.js";import{inferDatabaseConnectionsFromEnv as H,inferStorageConnectionsFromEnv as V,resolveConnectedDatabaseNames as M,resolveConnectedStorageNames as W}from"./astComputeConnectionParser.js";function z(e){if(e.arguments.length<2)return null;const n=e.arguments[0],i=e.arguments[1];if(!E.isStringLiteral(n)||!E.isObjectLiteralExpression(i))return null;const t=n.text,r=O(i);return{resourceName:t,type:f(r.type)??"ecs",config:r,node:e}}a(z,"extractComputeResource");function Z(e){return _(e,n=>{if(!E.isCallExpression(n)||!x(n,"addCompute"))return null;const i=n.arguments[0];if(!A(i,"ComputeFactory"))return null;const t=z(i);if(t){const r=b(n);r&&(t.variableName=r)}return t})}a(Z,"findComputeResources");function u(e,n,i){const t=T(e.config,i);t.length>0&&(n.extraProperties=t)}a(u,"applyExtras");function I(e,n){const i=e.config.docker;if(S(i)){const o=f(i.path),g=f(i.context),l=f(i.target);(o!==void 0||g!==void 0||l!==void 0)&&(n.docker={...o!==void 0&&{path:o},...g!==void 0&&{context:g},...l!==void 0&&{target:l}})}const t=e.config.cluster;t!==void 0&&(n.cluster=L(t));const r=e.config.services;r!==void 0&&Array.isArray(r)&&(n.services=r.filter(o=>S(o)).map(k)),u(e,n,new Set(["type","ecrRepository","docker","cluster","services","connections"]))}a(I,"convertEcsCompute");function B(e,n){if(c(n,"deployment",d(e.config.deployment,Y)),c(n,"timeout",y(e.config.timeout)),c(n,"memory",y(e.config.memorySize)??y(e.config.memory)),c(n,"handler",f(e.config.handler)),c(n,"runtime",N(e.config.runtime,"Runtime")),h(e.config.environment)&&(n.environment=e.config.environment),h(e.config.secrets))n.secrets=e.config.secrets;else{const s=C(e.config.secrets);s&&(n.ssmSecrets=s)}const i=e.config.functionUrl;if(S(i)){const s=d(N(i.authType,"FunctionUrlAuthType"),U);s!==void 0&&(n.functionUrl={authType:s})}const t=e.config.code;if(t!==void 0){const s=F(t);s&&(n.codePath=s)}c(n,"description",f(e.config.lambdaDescription)),c(n,"architecture",d(N(e.config.architecture,"Architecture"),D)),c(n,"ephemeralStorageSize",y(e.config.ephemeralStorageSize)),c(n,"functionName",f(e.config.functionName)),c(n,"ssmSecretsPath",f(e.config.ssmSecretsPath)),u(e,n,new Set(["type","deployment","timeout","memorySize","memory","handler","runtime","environment","secrets","functionUrl","code","connections","ecrRepository","containerSecretsImport","lambdaDescription","architecture","ephemeralStorageSize","functionName","ssmSecretsPath"]))}a(B,"convertLambdaCompute");function G(e,n){c(n,"instanceType",d(e.config.instanceType,K));const i=e.config.ssh;i===!1?n.enableSSH=!1:i!==void 0&&S(i)?n.enableSSH=!0:c(n,"enableSSH",m(e.config.enableSSH)),c(n,"keyName",f(e.config.keyName)),c(n,"userData",f(e.config.userData)),e.config.securityGroups!==void 0&&(n.securityGroups=C(e.config.securityGroups)),u(e,n,new Set(["type","instanceType","ssh","enableSSH","keyName","userData","securityGroups","connections"]))}a(G,"convertEc2Compute");function j(e,n,i,t){let r=n.config.connections;if(!r&&Array.isArray(n.config.services)){const g=n.config.services[0];S(g)&&(r=g.connections)}if(!r)return;const s=M(r,i);s.length>0&&(e.needsConnection=!0,e.connectedDatabase=s);const o=W(r,t);o.length>0&&(e.connectedStorage=o)}a(j,"applyConnectionConfig");function w(e,n){({ecs:I,lambda:B,ec2:G})[e.type]?.(n,e)}a(w,"applyTypeSpecificConfig");function $(e,n,i,t){return e.map(r=>{const s=d(r.config.type,R)??"ecs",o={name:r.resourceName,type:s,needsConnection:!1,connectedDatabase:[],...r.variableName&&{variableName:r.variableName}};return j(o,r,n,i),w(o,r),H(o,r.config.services,t.database),V(o,r.config.services,t.s3),o})}a($,"convertComputeResources");export{$ as convertComputeResources,Z as findComputeResources};
1
+ var v=Object.defineProperty;var f=(e,n)=>v(e,"name",{value:n,configurable:!0});import*as E from"typescript";import{asString as a,asNumber as y,asBoolean as m,asStringArray as u,asStringUnion as d,captureExtraProperties as T,collectFromAst as _,extractVariableName as b,isFactoryBuildCall as A,isFactoryMethodCall as x,isParsedObject as S,parseObjectLiteral as O}from"../common/astCommonParser.js";import{COMPUTE_ARCHITECTURES as D,COMPUTE_TYPES as R,DEPLOYMENT_TYPES as Y,EC2_INSTANCE_TYPES as K,FUNCTION_URL_AUTH_TYPES as U}from"../../../schemas/constants.js";import{assignIfDefined as c,extractCallStringArg as F,extractClusterConfig as L,extractEnumString as N,isEnvironmentRecord as h,parseEcsService as k}from"./astComputeParserHelpers.js";import{inferDatabaseConnectionsFromEnv as H,inferStorageConnectionsFromEnv as V,resolveConnectedDatabaseNames as I,resolveConnectedStorageNames as M}from"./astComputeConnectionParser.js";function W(e){if(e.arguments.length<2)return null;const n=e.arguments[0],i=e.arguments[1];if(!E.isStringLiteral(n)||!E.isObjectLiteralExpression(i))return null;const t=n.text,r=O(i);return{resourceName:t,type:a(r.type)??"ecs",config:r,node:e}}f(W,"extractComputeResource");function Z(e){return _(e,n=>{if(!E.isCallExpression(n)||!x(n,"addCompute"))return null;const i=n.arguments[0];if(!A(i,"ComputeFactory"))return null;const t=W(i);if(t){const r=b(n);r&&(t.variableName=r)}return t})}f(Z,"findComputeResources");function C(e,n,i){const t=T(e.config,i);t.length>0&&(n.extraProperties=t)}f(C,"applyExtras");function z(e,n){const i=e.config.docker;if(S(i)){const o=a(i.path),g=a(i.context),l=a(i.target);(o!==void 0||g!==void 0||l!==void 0)&&(n.docker={...o!==void 0&&{path:o},...g!==void 0&&{context:g},...l!==void 0&&{target:l}})}const t=e.config.cluster;t!==void 0&&(n.cluster=L(t));const r=e.config.services;r!==void 0&&Array.isArray(r)&&(n.services=r.filter(o=>S(o)).map(k)),C(e,n,new Set(["type","ecrRepository","docker","cluster","services","connections"]))}f(z,"convertEcsCompute");function p(e,n){if(c(n,"deployment",d(e.config.deployment,Y)),c(n,"timeout",y(e.config.timeout)),c(n,"memory",y(e.config.memorySize)??y(e.config.memory)),c(n,"handler",a(e.config.handler)),c(n,"runtime",N(e.config.runtime,"Runtime")),h(e.config.environment)&&(n.environment=e.config.environment),h(e.config.secrets))n.secrets=e.config.secrets;else{const s=u(e.config.secrets);s&&(n.ssmSecrets=s)}const i=e.config.functionUrl;if(S(i)){const s=d(N(i.authType,"FunctionUrlAuthType"),U);s!==void 0&&(n.functionUrl={authType:s})}const t=e.config.code;if(t!==void 0){const s=F(t);s&&(n.codePath=s)}c(n,"description",a(e.config.description)??a(e.config.lambdaDescription)),c(n,"architecture",d(N(e.config.architecture,"Architecture"),D)),c(n,"ephemeralStorageSize",y(e.config.ephemeralStorageSize)),c(n,"functionName",a(e.config.functionName)),c(n,"ssmSecretsPath",a(e.config.ssmSecretsPath)),C(e,n,new Set(["type","deployment","timeout","memorySize","memory","handler","runtime","environment","secrets","functionUrl","code","connections","ecrRepository","containerSecretsImport","secretsImport","lambdaDescription","description","architecture","ephemeralStorageSize","functionName","ssmSecretsPath"]))}f(p,"convertLambdaCompute");function B(e,n){c(n,"instanceType",d(e.config.instanceType,K));const i=e.config.ssh;i===!1?n.enableSSH=!1:i!==void 0&&S(i)?n.enableSSH=!0:c(n,"enableSSH",m(e.config.enableSSH)),c(n,"keyName",a(e.config.keyName)),c(n,"userData",a(e.config.userData)),e.config.securityGroups!==void 0&&(n.securityGroups=u(e.config.securityGroups)),C(e,n,new Set(["type","instanceType","ssh","enableSSH","keyName","userData","securityGroups","connections"]))}f(B,"convertEc2Compute");function G(e,n,i,t){let r=n.config.connections;if(!r&&Array.isArray(n.config.services)){const g=n.config.services[0];S(g)&&(r=g.connections)}if(!r)return;const s=I(r,i);s.length>0&&(e.needsConnection=!0,e.connectedDatabase=s);const o=M(r,t);o.length>0&&(e.connectedStorage=o)}f(G,"applyConnectionConfig");function j(e,n){({ecs:z,lambda:p,ec2:B})[e.type]?.(n,e)}f(j,"applyTypeSpecificConfig");function $(e,n,i,t){return e.map(r=>{const s=d(r.config.type,R)??"ecs",o={name:r.resourceName,type:s,needsConnection:!1,connectedDatabase:[],...r.variableName&&{variableName:r.variableName}};return G(o,r,n,i),j(o,r),H(o,r.config.services,t.database),V(o,r.config.services,t.s3),o})}f($,"convertComputeResources");export{$ as convertComputeResources,Z as findComputeResources};
@@ -1,4 +1,4 @@
1
1
  export { detectDrift, type DriftOp, type DriftPlan } from "./detect.js";
2
2
  export { mergeProperties, type MergeResult } from "./merge.js";
3
3
  export { snapshotProperties } from "./snapshot.js";
4
- export { DriftPolicySchema, DriftStateSchema, PropertyDeltaSchema, ResourceSnapshotSchema, type DriftPolicy, type DriftState, type PropertyDelta, type ResourceSnapshot, } from "./types.js";
4
+ export { DriftPolicySchema, DriftStateSchema, PropertyDeltaSchema, RESOURCE_SNAPSHOT_SCHEMA_VERSION, ResourceSnapshotSchema, type DriftPolicy, type DriftState, type PropertyDelta, type ResourceSnapshot, } from "./types.js";
@@ -1 +1 @@
1
- import{detectDrift as t}from"./detect.js";import{mergeProperties as m}from"./merge.js";import{snapshotProperties as a}from"./snapshot.js";import{DriftPolicySchema as f,DriftStateSchema as h,PropertyDeltaSchema as i,ResourceSnapshotSchema as s}from"./types.js";export{f as DriftPolicySchema,h as DriftStateSchema,i as PropertyDeltaSchema,s as ResourceSnapshotSchema,t as detectDrift,m as mergeProperties,a as snapshotProperties};
1
+ import{detectDrift as t}from"./detect.js";import{mergeProperties as S}from"./merge.js";import{snapshotProperties as p}from"./snapshot.js";import{DriftPolicySchema as c,DriftStateSchema as f,PropertyDeltaSchema as h,RESOURCE_SNAPSHOT_SCHEMA_VERSION as i,ResourceSnapshotSchema as s}from"./types.js";export{c as DriftPolicySchema,f as DriftStateSchema,h as PropertyDeltaSchema,i as RESOURCE_SNAPSHOT_SCHEMA_VERSION,s as ResourceSnapshotSchema,t as detectDrift,S as mergeProperties,p as snapshotProperties};
@@ -1,8 +1,40 @@
1
1
  import { type Result } from "../../types/Result.js";
2
2
  import { type NodeShapeLike, type ObjectExpressionNodeLike } from "../edits/modifyResource/literalConversion.js";
3
3
  import type { CodemodError, ResourceName, StatementType } from "../types.js";
4
- import type { ResourceSnapshot } from "./types.js";
4
+ import { type ResourceSnapshot } from "./types.js";
5
5
  export declare function snapshotProperties(content: string, type: StatementType, name: ResourceName): Result<ResourceSnapshot, CodemodError>;
6
+ export interface PlanSpelling {
7
+ planKey: string;
8
+ precedence: number;
9
+ }
10
+ export declare const PRECEDENCE_CANONICAL = 2;
11
+ export declare const PRECEDENCE_PLAN_LEAK = 1;
12
+ export declare const PRECEDENCE_ALIAS = 0;
13
+ /**
14
+ * File-spelling → plan-key map for extraction. Since Increment C the file
15
+ * speaks construct vocabulary while the plan (and the baseline compared
16
+ * against it) speaks plan vocabulary, so extraction must recognise a plan
17
+ * key's construct spelling (`retentionPeriod` is emitted as
18
+ * `messageRetentionPeriod`) and any declared alias spellings, normalising
19
+ * every occurrence to the plan spelling — otherwise a hand-edit to a
20
+ * translated construct key is invisible to drift.
21
+ *
22
+ * Claims derive from what the projection can EMIT under a spelling, not from
23
+ * schema-key identity. A plan key claims its own spelling only if the
24
+ * projection can emit it under that spelling: a rule without `as`, or a
25
+ * key/type outside the projection tables (where plan vocabulary is written
26
+ * verbatim). A planOnly key is NEVER emitted as a construct prop, so it
27
+ * claims no file spelling at all — its name stays free for a sibling key's
28
+ * rename target (compute's `ssmSecrets` is emitted as `secrets`, which is
29
+ * itself a planOnly plan key; the file's `secrets` prop can only ever mean
30
+ * the SSM array). Precedence encodes what the construct actually reads when
31
+ * one statement carries several spellings of the same key: canonical
32
+ * construct spelling beats a plan-vocabulary leak beats a declared alias.
33
+ *
34
+ * Exported for the projection-invariant test only; production consumption
35
+ * goes through {@link snapshotProperties}.
36
+ */
37
+ export declare function planSpellingsFor(type: StatementType): Map<string, PlanSpelling>;
6
38
  /**
7
39
  * Resolve the config `ObjectExpression` for a located statement by matching
8
40
  * the recast/babel span of the factory call's name `StringLiteral` against
@@ -1 +1 @@
1
- var h=Object.defineProperty;var u=(r,e)=>h(r,"name",{value:e,configurable:!0});import{failure as f,success as b}from"../../types/Result.js";import{extractProgramBody as g}from"../_internal.js";import{astToLiteral as E,isNodeShape as l,NON_LITERAL as x,readKeyName as k}from"../edits/modifyResource/literalConversion.js";import{visit as N}from"../edits/objectGraph.js";import{parse as O}from"../fileRewriter/index.js";import{listResources as S}from"../listResources.js";import{locateNamesFor as j,STATEMENT_REGISTRY as P}from"../registry.js";function Q(r,e,o){const n=S(r);if(!n.success)return f(n.error);const d=j(e,o),s=n.data.resources.find(t=>t.type===e&&d.includes(t.name));if(s===void 0)return f({kind:"ResourceNotFoundError",type:e,name:o,knownNames:n.data.resources.filter(t=>t.type===e).map(t=>t.name)});const i=O(r,s.filePath);if(!i.success)return f(i.error);const a=g(i.data);if(a===void 0)return f({kind:"SemanticQueryError",reason:"recast File is missing program.body"});const c=T(a,s);if(c===void 0)return f({kind:"SemanticQueryError",reason:"Unable to resolve config ObjectExpression for the located resource."});const y=new Set(Object.keys(P[e].schemaFragment.shape)),m={};for(const t of c.properties){if(t.type!=="Property"&&t.type!=="ObjectProperty"||t.shorthand===!0||t.computed===!0)continue;const p=k(t.key);p===void 0||!y.has(p)||t.value!==void 0&&(m[p]=v(t.value,r))}return b({type:e,name:o,properties:m,schemaVersion:1})}u(Q,"snapshotProperties");function T(r,e){const o=e.start+e.length;let n;const d=u(s=>{if(n!==void 0||s.type!=="CallExpression")return;const i=s.arguments;if(!Array.isArray(i)||i.length<2)return;const a=i[0];if(!l(a)||a.type!=="StringLiteral"||a.start!==e.start||a.end!==o)return;const c=i[1];l(c)&&c.type==="ObjectExpression"&&(n=c)},"visitor");for(const s of r)if(N(s,d),n!==void 0)break;return n}u(T,"findConfigObject");function v(r,e){const o=E(r);return o!==x?o:R(r,e)}u(v,"extractPropertyValue");function R(r,e){const o=typeof r.start=="number"?r.start:void 0,n=typeof r.end=="number"?r.end:void 0;return{kind:"expression",text:o!==void 0&&n!==void 0&&o<n?e.slice(o,n):""}}u(R,"toExpressionValue");export{T as findConfigObject,Q as snapshotProperties};
1
+ var h=Object.defineProperty;var f=(t,n)=>h(t,"name",{value:n,configurable:!0});import*as x from"recast";import{GENERATOR_VERSION as P}from"../../version.js";import{failure as d,success as b}from"../../types/Result.js";import{extractProgramBody as R}from"../_internal.js";import{astToLiteral as S,isNodeShape as g,NON_LITERAL as A,readKeyName as K}from"../edits/modifyResource/literalConversion.js";import{visit as C}from"../edits/objectGraph.js";import{parse as k}from"../fileRewriter/index.js";import{listResources as T}from"../listResources.js";import{constructKeyAliasesFor as _,isProjectableType as j,TYPE_PROJECTIONS as L}from"../../projection/index.js";import{locateNamesFor as I,STATEMENT_REGISTRY as v}from"../registry.js";import{RESOURCE_SNAPSHOT_SCHEMA_VERSION as F}from"./types.js";function ee(t,n,o){const s=T(t);if(!s.success)return d(s.error);const u=I(n,o),c=s.data.resources.find(i=>i.type===n&&u.includes(i.name));if(c===void 0)return d({kind:"ResourceNotFoundError",type:n,name:o,knownNames:s.data.resources.filter(i=>i.type===n).map(i=>i.name)});const e=k(t,c.filePath);if(!e.success)return d(e.error);const r=R(e.data);if(r===void 0)return d({kind:"SemanticQueryError",reason:"recast File is missing program.body"});const a=D(r,c);if(a===void 0)return d({kind:"SemanticQueryError",reason:"Unable to resolve config ObjectExpression for the located resource."});const l=w(n),m={},y=new Map;for(const i of a.properties){if(i.type!=="Property"&&i.type!=="ObjectProperty"||i.shorthand===!0||i.computed===!0)continue;const E=K(i.key);if(E===void 0)continue;const p=l.get(E);if(p===void 0||i.value===void 0)continue;const N=y.get(p.planKey);N!==void 0&&N>p.precedence||(y.set(p.planKey,p.precedence),m[p.planKey]=G(i.value,t))}return b({type:n,name:o,properties:m,schemaVersion:F,generatorVersion:P})}f(ee,"snapshotProperties");const O=2,V=1,M=0;function w(t){const n=new Map,o=Object.keys(v[t].schemaFragment.shape),s=j(t)?L[t].keys??{}:{},u=f(e=>s[e]?.kind==="planOnly","isPlanOnly"),c=f(e=>{const r=s[e];return r!==void 0&&"as"in r&&r.as!==void 0?r.as:e},"constructKeyOf");for(const e of o)u(e)||c(e)===e&&n.set(e,{planKey:e,precedence:O});for(const e of o){if(u(e))continue;const r=c(e);r!==e&&(n.has(r)||n.set(r,{planKey:e,precedence:O}))}for(const e of o)u(e)||c(e)!==e&&(n.has(e)||n.set(e,{planKey:e,precedence:V}));for(const[e,r]of Object.entries(_(t))){const a=n.get(e);if(a!==void 0)for(const l of r)n.has(l)||n.set(l,{planKey:a.planKey,precedence:M})}return n}f(w,"planSpellingsFor");function D(t,n){const o=n.start+n.length;let s;const u=f(c=>{if(s!==void 0||c.type!=="CallExpression")return;const e=c.arguments;if(!Array.isArray(e)||e.length<2)return;const r=e[0];if(!g(r)||r.type!=="StringLiteral"||r.start!==n.start||r.end!==o)return;const a=e[1];g(a)&&a.type==="ObjectExpression"&&(s=a)},"visitor");for(const c of t)if(C(c,u),s!==void 0)break;return s}f(D,"findConfigObject");function G(t,n){const o=S(t);return o!==A?o:H(t,n)}f(G,"extractPropertyValue");function H(t,n){try{return{kind:"expression",text:x.prettyPrint(t,{tabWidth:2}).code}}catch{const o=typeof t.start=="number"?t.start:void 0,s=typeof t.end=="number"?t.end:void 0;return{kind:"expression",text:o!==void 0&&s!==void 0&&o<s?n.slice(o,s):""}}}f(H,"toExpressionValue");export{M as PRECEDENCE_ALIAS,O as PRECEDENCE_CANONICAL,V as PRECEDENCE_PLAN_LEAK,D as findConfigObject,w as planSpellingsFor,ee as snapshotProperties};
@@ -2,6 +2,20 @@ import { z } from "zod";
2
2
  import { PropertyDeltaSchema } from "../types.js";
3
3
  export { DriftPolicySchema, type DriftPolicy } from "../types.js";
4
4
  export { PropertyDeltaSchema };
5
+ /**
6
+ * Version of the baseline snapshot format. Version 2 records FILE truth:
7
+ * `properties` is `snapshotProperties(...)` of the statement as written —
8
+ * plan-normalised spelling, snapshot value encoding — never the property set
9
+ * a command happened to carry, and `generatorVersion` stamps the emitting
10
+ * `@fjall/generator` so a persisted baseline from another vocabulary era can
11
+ * be discarded at read time.
12
+ */
13
+ export declare const RESOURCE_SNAPSHOT_SCHEMA_VERSION = 2;
14
+ /**
15
+ * Canonical home of the baseline snapshot schema. The CLI baseline store
16
+ * (`cli/src/operations/codemod/codemodBaselineStore.ts`) consumes THIS
17
+ * schema — re-export, never redeclare (coupled-discriminated-union rule).
18
+ */
5
19
  export declare const ResourceSnapshotSchema: z.ZodObject<{
6
20
  type: z.ZodEnum<{
7
21
  storage: "storage";
@@ -19,7 +33,8 @@ export declare const ResourceSnapshotSchema: z.ZodObject<{
19
33
  }>;
20
34
  name: z.ZodString;
21
35
  properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
22
- schemaVersion: z.ZodLiteral<1>;
36
+ schemaVersion: z.ZodLiteral<2>;
37
+ generatorVersion: z.ZodString;
23
38
  }, z.core.$strict>;
24
39
  export declare const DriftStateSchema: z.ZodObject<{
25
40
  resource: z.ZodObject<{
@@ -1 +1 @@
1
- import{z as e}from"zod";import{PropertyDeltaSchema as t,ResourceNameSchema as r,StatementTypeSchema as o}from"../types.js";import{DriftPolicySchema as s}from"../types.js";const m=e.object({type:o,name:r,properties:e.record(e.string(),e.unknown()),schemaVersion:e.literal(1)}).strict(),n=e.object({resource:e.object({type:o,name:r}).strict(),deltas:e.array(t),summary:e.enum(["clean","no-op","drifted-compatible","drifted-conflict","unknown"])}).strict();export{s as DriftPolicySchema,n as DriftStateSchema,t as PropertyDeltaSchema,m as ResourceSnapshotSchema};
1
+ import{z as e}from"zod";import{PropertyDeltaSchema as t,ResourceNameSchema as r,StatementTypeSchema as o}from"../types.js";import{DriftPolicySchema as S}from"../types.js";const c=2,m=e.object({type:o,name:r,properties:e.record(e.string(),e.unknown()),schemaVersion:e.literal(c),generatorVersion:e.string().min(1)}).strict(),i=e.object({resource:e.object({type:o,name:r}).strict(),deltas:e.array(t),summary:e.enum(["clean","no-op","drifted-compatible","drifted-conflict","unknown"])}).strict();export{S as DriftPolicySchema,i as DriftStateSchema,t as PropertyDeltaSchema,c as RESOURCE_SNAPSHOT_SCHEMA_VERSION,m as ResourceSnapshotSchema};
@@ -1,4 +1,5 @@
1
1
  import { type namedTypes as n } from "ast-types";
2
+ import type { StructuredValue } from "../../../projection/index.js";
2
3
  import { type Result } from "../../../types/Result.js";
3
4
  import { type ObjectPropertyInput, type QuoteStyle } from "../../fileRewriter/index.js";
4
5
  import type { EmittedProp } from "../../emitProjection.js";
@@ -40,5 +41,12 @@ export declare const RESERVED_IDENTIFIER_NAMES: ReadonlySet<string>;
40
41
  * they land in does not parse.
41
42
  */
42
43
  export declare function buildEmittedValue(prop: EmittedProp, quoteStyle: QuoteStyle): Result<n.Property["value"], InvalidPropertyError>;
44
+ /**
45
+ * Serialise a {@link StructuredValue} to its AST node — the ONE place
46
+ * structured expressions become source. Every identifier segment is
47
+ * validated; literals go through {@link toAstValue}; object entries reuse
48
+ * `buildObjectProperty`, which quotes keys that are not valid identifiers.
49
+ */
50
+ export declare function buildStructuredValue(key: string, value: StructuredValue, quoteStyle: QuoteStyle): Result<n.Property["value"], InvalidPropertyError>;
43
51
  export declare function toAstValue(value: unknown, quoteStyle: QuoteStyle): n.Property["value"] | undefined;
44
52
  export declare function makeStringLiteral(value: string, quote: QuoteStyle): n.StringLiteral;
@@ -1 +1 @@
1
- var d=Object.defineProperty;var s=(e,t)=>d(e,"name",{value:t,configurable:!0});import{builders as o}from"ast-types";import{failure as a,success as c}from"../../../types/Result.js";import{buildObjectProperty as l}from"../../fileRewriter/index.js";function w(e,t){const r=[];for(const i of e){const n=m(i,t);if(!n.success)return a(n.error);r.push({key:i.key,value:n.data})}return c(r)}s(w,"buildPropertyInputs");const p=/^[A-Za-z_$][A-Za-z0-9_$]*$/,y=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 m(e,t){if(e.kind==="expression")return p.test(e.source)?y.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.`});const r=u(e.value,t);return r===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(r)}s(m,"buildEmittedValue");function u(e,t){if(typeof e=="string")return b(e,t);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 r=[];for(const i of e){const n=u(i,t);if(n===void 0)return;r.push(n)}return o.arrayExpression(r)}if(typeof e=="object"&&e!==null){const r=[];for(const[i,n]of Object.entries(e)){const f=u(n,t);if(f===void 0)return;r.push(l(i,f,t))}return o.objectExpression(r)}}s(u,"toAstValue");function b(e,t){const r=t==="single"?"'":'"',i=t==="single"?e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"):e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),n=`${r}${i}${r}`;return o.stringLiteral.from({value:e,extra:{rawValue:e,raw:n}})}s(b,"makeStringLiteral");export{y as RESERVED_IDENTIFIER_NAMES,m as buildEmittedValue,w as buildPropertyInputs,b as makeStringLiteral,u 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/index.js";function P(e,r){const i=[];for(const n of e){const t=w(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 w(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(w,"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 x(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 x(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(x,"makeStringLiteral");export{g as RESERVED_IDENTIFIER_NAMES,w as buildEmittedValue,P as buildPropertyInputs,d as buildStructuredValue,x as makeStringLiteral,f as toAstValue};