@intentius/chant-lexicon-gcp 0.124.31 → 0.124.33

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 (612) hide show
  1. package/dist/actions/index.js +45 -0
  2. package/dist/api/read-client.js +105 -0
  3. package/dist/codegen/docs-cli.js +6 -0
  4. package/dist/codegen/docs.js +115 -0
  5. package/dist/codegen/generate-cli.js +17 -0
  6. package/dist/codegen/generate.js +218 -0
  7. package/dist/codegen/naming.js +164 -0
  8. package/dist/codegen/package.js +43 -0
  9. package/dist/composites/catalog.d.ts.map +1 -1
  10. package/dist/composites/catalog.js +1251 -0
  11. package/dist/composites/cloud-function.js +65 -0
  12. package/dist/composites/cloud-run-service.d.ts +7 -3
  13. package/dist/composites/cloud-run-service.d.ts.map +1 -1
  14. package/dist/composites/cloud-run-service.js +75 -0
  15. package/dist/composites/cloud-sql-instance.js +85 -0
  16. package/dist/composites/gcs-bucket.js +64 -0
  17. package/dist/composites/gke-cluster.js +113 -0
  18. package/dist/composites/gke-crdb-region.js +137 -0
  19. package/dist/composites/gpu-node-pool.js +74 -0
  20. package/dist/composites/index.js +15 -0
  21. package/dist/composites/landing-zone.js +89 -0
  22. package/dist/composites/managed-certificate.js +46 -0
  23. package/dist/composites/memorystore-redis.js +52 -0
  24. package/dist/composites/multi-region-vpc.js +108 -0
  25. package/dist/composites/private-service.js +50 -0
  26. package/dist/composites/pubsub-pipeline.js +63 -0
  27. package/dist/composites/secure-project.js +85 -0
  28. package/dist/composites/vpc-network.js +113 -0
  29. package/dist/coverage.js +28 -0
  30. package/dist/deep-observe-hooks.js +152 -0
  31. package/dist/deep-observe.js +273 -0
  32. package/dist/default-labels.js +67 -0
  33. package/dist/describe-resources.js +264 -0
  34. package/dist/detect.js +16 -0
  35. package/dist/export-resources.js +59 -0
  36. package/dist/generated/index.d.ts.map +1 -1
  37. package/dist/generated/index.js +1804 -0
  38. package/dist/generated/runtime.js +4 -0
  39. package/dist/governance.js +98 -0
  40. package/dist/health.d.ts +42 -0
  41. package/dist/health.d.ts.map +1 -0
  42. package/dist/health.js +87 -0
  43. package/dist/import/generator.js +68 -0
  44. package/dist/import/live-export.js +73 -0
  45. package/dist/import/parser.js +61 -0
  46. package/dist/index.d.ts +1 -0
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +38 -0
  49. package/dist/integrity.json +5 -5
  50. package/dist/lint/audit-catalog.js +38 -0
  51. package/dist/lint/audit-lineage.js +63 -0
  52. package/dist/lint/post-synth/gcp-helpers.js +91 -0
  53. package/dist/lint/post-synth/index.js +54 -0
  54. package/dist/lint/post-synth/schema-registry.d.ts.map +1 -1
  55. package/dist/lint/post-synth/schema-registry.js +69 -0
  56. package/dist/lint/post-synth/wgc101.js +47 -0
  57. package/dist/lint/post-synth/wgc102.js +29 -0
  58. package/dist/lint/post-synth/wgc103.js +37 -0
  59. package/dist/lint/post-synth/wgc104.js +34 -0
  60. package/dist/lint/post-synth/wgc105.js +39 -0
  61. package/dist/lint/post-synth/wgc106.js +30 -0
  62. package/dist/lint/post-synth/wgc107.js +33 -0
  63. package/dist/lint/post-synth/wgc108.js +34 -0
  64. package/dist/lint/post-synth/wgc109.js +33 -0
  65. package/dist/lint/post-synth/wgc110.js +32 -0
  66. package/dist/lint/post-synth/wgc111.js +47 -0
  67. package/dist/lint/post-synth/wgc112.js +46 -0
  68. package/dist/lint/post-synth/wgc113.js +35 -0
  69. package/dist/lint/post-synth/wgc201.js +30 -0
  70. package/dist/lint/post-synth/wgc202.js +33 -0
  71. package/dist/lint/post-synth/wgc203.js +35 -0
  72. package/dist/lint/post-synth/wgc204.js +33 -0
  73. package/dist/lint/post-synth/wgc301.js +28 -0
  74. package/dist/lint/post-synth/wgc302.js +28 -0
  75. package/dist/lint/post-synth/wgc303.js +29 -0
  76. package/dist/lint/post-synth/wgc401.js +50 -0
  77. package/dist/lint/post-synth/wgc402.js +46 -0
  78. package/dist/lint/post-synth/wgc403.js +74 -0
  79. package/dist/lint/post-synth/wgc501.js +63 -0
  80. package/dist/lint/post-synth/wgc502.js +37 -0
  81. package/dist/lint/post-synth/wgc503.js +49 -0
  82. package/dist/lint/rules/hardcoded-project.js +51 -0
  83. package/dist/lint/rules/hardcoded-region.js +51 -0
  84. package/dist/lint/rules/index.js +3 -0
  85. package/dist/lint/rules/public-iam.js +37 -0
  86. package/dist/lsp/completions.d.ts.map +1 -1
  87. package/dist/lsp/completions.js +15 -0
  88. package/dist/lsp/hover.d.ts.map +1 -1
  89. package/dist/lsp/hover.js +46 -0
  90. package/dist/manifest.json +1 -1
  91. package/dist/meta.json +1848 -481
  92. package/dist/okf/types/API.md +2 -0
  93. package/dist/okf/types/APIConfig.md +3 -0
  94. package/dist/okf/types/APIQuotaAdjusterSettings.md +2 -0
  95. package/dist/okf/types/APIQuotaPreference.md +2 -0
  96. package/dist/okf/types/AccessBoundaryPolicy.md +2 -0
  97. package/dist/okf/types/AccessLevel.md +2 -0
  98. package/dist/okf/types/AccessLevelCondition.md +1 -0
  99. package/dist/okf/types/AccessPolicy.md +4 -0
  100. package/dist/okf/types/AddonsConfig.md +1 -0
  101. package/dist/okf/types/AgentPool.md +2 -0
  102. package/dist/okf/types/AiplatformModel.md +2 -0
  103. package/dist/okf/types/AistreamsCluster.md +2 -0
  104. package/dist/okf/types/AlertPolicy.md +2 -0
  105. package/dist/okf/types/AlloydbBackup.md +9 -0
  106. package/dist/okf/types/AlloydbCluster.md +5 -0
  107. package/dist/okf/types/AlloydbInstance.md +10 -0
  108. package/dist/okf/types/AnalyticsAccount.md +2 -0
  109. package/dist/okf/types/AndroidApp.md +4 -0
  110. package/dist/okf/types/AnywhereCache.md +2 -0
  111. package/dist/okf/types/ApigatewayGateway.md +3 -0
  112. package/dist/okf/types/ApigeeEnvironment.md +5 -0
  113. package/dist/okf/types/ApigeeInstance.md +2 -0
  114. package/dist/okf/types/ApihubDeployment.md +2 -0
  115. package/dist/okf/types/ApikeysKey.md +2 -0
  116. package/dist/okf/types/AppConnection.md +1 -0
  117. package/dist/okf/types/AppConnector.md +2 -0
  118. package/dist/okf/types/AppGateway.md +3 -0
  119. package/dist/okf/types/AppProfile.md +3 -0
  120. package/dist/okf/types/Application.md +2 -0
  121. package/dist/okf/types/ArtifactRegistryRepository.md +4 -0
  122. package/dist/okf/types/Assignment.md +2 -0
  123. package/dist/okf/types/Attestor.md +2 -0
  124. package/dist/okf/types/AuthorizationPolicy.md +4 -0
  125. package/dist/okf/types/AuthorizedView.md +2 -0
  126. package/dist/okf/types/AutokeyConfig.md +2 -0
  127. package/dist/okf/types/Automation.md +2 -0
  128. package/dist/okf/types/Autoscaler.md +3 -0
  129. package/dist/okf/types/AutoscalingPolicy.md +2 -0
  130. package/dist/okf/types/BQJob.md +3 -0
  131. package/dist/okf/types/BackendBucket.md +3 -0
  132. package/dist/okf/types/BackendBucketSignedURLKey.md +1 -0
  133. package/dist/okf/types/BackendService.md +5 -0
  134. package/dist/okf/types/BackendServiceSignedURLKey.md +1 -0
  135. package/dist/okf/types/BackupPlanAssociation.md +2 -0
  136. package/dist/okf/types/BackupPolicy.md +2 -0
  137. package/dist/okf/types/BackupdrBackupPlan.md +2 -0
  138. package/dist/okf/types/BackupdrBackupVault.md +2 -0
  139. package/dist/okf/types/Batch.md +2 -0
  140. package/dist/okf/types/BatchJob.md +2 -0
  141. package/dist/okf/types/BatchTask.md +3 -0
  142. package/dist/okf/types/BigLakeCatalog.md +2 -0
  143. package/dist/okf/types/BigLakeDatabase.md +2 -0
  144. package/dist/okf/types/BigLakeTable.md +2 -0
  145. package/dist/okf/types/BigQueryDataPolicy.md +2 -0
  146. package/dist/okf/types/BigQueryDataset.md +6 -0
  147. package/dist/okf/types/BigQueryExport.md +2 -0
  148. package/dist/okf/types/BigQueryTable.md +11 -0
  149. package/dist/okf/types/BigqueryconnectionConnection.md +2 -0
  150. package/dist/okf/types/BigquerydatatransferConfig.md +2 -0
  151. package/dist/okf/types/BigqueryreservationReservation.md +2 -0
  152. package/dist/okf/types/BigtableInstance.md +1 -0
  153. package/dist/okf/types/BigtableTable.md +2 -0
  154. package/dist/okf/types/BillingAccount.md +2 -0
  155. package/dist/okf/types/BinaryauthorizationPolicy.md +3 -0
  156. package/dist/okf/types/Brand.md +2 -0
  157. package/dist/okf/types/BtBackup.md +2 -0
  158. package/dist/okf/types/BtCluster.md +2 -0
  159. package/dist/okf/types/Bucket.md +2 -0
  160. package/dist/okf/types/BucketAccessControl.md +3 -0
  161. package/dist/okf/types/Budget.md +2 -0
  162. package/dist/okf/types/CAPool.md +1 -0
  163. package/dist/okf/types/CapacityCommitment.md +5 -0
  164. package/dist/okf/types/CertificateAuthority.md +7 -0
  165. package/dist/okf/types/CertificateIssuanceConfig.md +2 -0
  166. package/dist/okf/types/CertificateMap.md +3 -0
  167. package/dist/okf/types/CertificateMapEntry.md +4 -0
  168. package/dist/okf/types/CertificateTemplate.md +3 -0
  169. package/dist/okf/types/CertificatemanagerCertificate.md +1 -0
  170. package/dist/okf/types/ClientConnectorService.md +2 -0
  171. package/dist/okf/types/ClientTLSPolicy.md +3 -0
  172. package/dist/okf/types/CloudBatchResourceAllowance.md +2 -0
  173. package/dist/okf/types/CloudFunction.md +4 -0
  174. package/dist/okf/types/CloudRunJob.md +13 -0
  175. package/dist/okf/types/CloudRunService.md +13 -0
  176. package/dist/okf/types/CloudbuildTrigger.md +4 -0
  177. package/dist/okf/types/ClouddmsPrivateConnection.md +2 -0
  178. package/dist/okf/types/CloudidentityGroup.md +5 -0
  179. package/dist/okf/types/CloudidentityMembership.md +6 -0
  180. package/dist/okf/types/CloudidsEndpoint.md +1 -0
  181. package/dist/okf/types/CloudschedulerJob.md +5 -0
  182. package/dist/okf/types/ComposerEnvironment.md +2 -0
  183. package/dist/okf/types/ComputeAddress.md +4 -0
  184. package/dist/okf/types/ComputeDisk.md +9 -0
  185. package/dist/okf/types/ComputeFirewallPolicy.md +7 -0
  186. package/dist/okf/types/ComputeHealthCheck.md +4 -0
  187. package/dist/okf/types/ComputeInstance.md +8 -0
  188. package/dist/okf/types/ComputeNetworkPeering.md +3 -0
  189. package/dist/okf/types/ComputeNodeGroup.md +3 -0
  190. package/dist/okf/types/ComputeReservation.md +6 -0
  191. package/dist/okf/types/ComputeRoute.md +3 -0
  192. package/dist/okf/types/ComputeSnapshot.md +7 -0
  193. package/dist/okf/types/ConfigcontrollerInstance.md +3 -0
  194. package/dist/okf/types/ConnectionProfile.md +2 -0
  195. package/dist/okf/types/ConnectivityTest.md +2 -0
  196. package/dist/okf/types/Connector.md +3 -0
  197. package/dist/okf/types/ConsentStore.md +1 -0
  198. package/dist/okf/types/ConsumerGroup.md +2 -0
  199. package/dist/okf/types/ConsumerQuotaOverride.md +2 -0
  200. package/dist/okf/types/Contact.md +2 -0
  201. package/dist/okf/types/ContainerattachedCluster.md +8 -0
  202. package/dist/okf/types/ConversionWorkspace.md +2 -0
  203. package/dist/okf/types/CryptoKeyVersion.md +5 -0
  204. package/dist/okf/types/CustomClass.md +2 -0
  205. package/dist/okf/types/CustomConstraint.md +2 -0
  206. package/dist/okf/types/CustomRole.md +3 -0
  207. package/dist/okf/types/CustomTargetType.md +2 -0
  208. package/dist/okf/types/DICOMStore.md +2 -0
  209. package/dist/okf/types/DNSAuthorization.md +2 -0
  210. package/dist/okf/types/DNSManagedZone.md +3 -0
  211. package/dist/okf/types/DNSRecordSet.md +1 -0
  212. package/dist/okf/types/Dashboard.md +2 -0
  213. package/dist/okf/types/DataExchange.md +2 -0
  214. package/dist/okf/types/DataLabelingJob.md +2 -0
  215. package/dist/okf/types/DataPolicy.md +2 -0
  216. package/dist/okf/types/DataStore.md +2 -0
  217. package/dist/okf/types/DataStoreTargetSite.md +2 -0
  218. package/dist/okf/types/Database.md +2 -0
  219. package/dist/okf/types/DatacatalogEntryGroup.md +2 -0
  220. package/dist/okf/types/DataflowJob.md +4 -0
  221. package/dist/okf/types/DataformRepository.md +2 -0
  222. package/dist/okf/types/DatafusionInstance.md +10 -0
  223. package/dist/okf/types/DataplexEntryGroup.md +2 -0
  224. package/dist/okf/types/DataplexTask.md +2 -0
  225. package/dist/okf/types/DataprocCluster.md +2 -0
  226. package/dist/okf/types/DataprocJob.md +2 -0
  227. package/dist/okf/types/DataprocNodeGroup.md +2 -0
  228. package/dist/okf/types/DataprocSession.md +2 -0
  229. package/dist/okf/types/DatasetAccess.md +2 -0
  230. package/dist/okf/types/DatastoreIndex.md +2 -0
  231. package/dist/okf/types/DatastreamPrivateConnection.md +2 -0
  232. package/dist/okf/types/DatastreamRoute.md +2 -0
  233. package/dist/okf/types/DefaultObjectAccessControl.md +5 -0
  234. package/dist/okf/types/DefaultSupportedIDPConfig.md +2 -0
  235. package/dist/okf/types/DeidentifyTemplate.md +4 -0
  236. package/dist/okf/types/DeliveryPipeline.md +2 -0
  237. package/dist/okf/types/DenyPolicy.md +2 -0
  238. package/dist/okf/types/DeployPolicy.md +2 -0
  239. package/dist/okf/types/DeploymentResourcePool.md +2 -0
  240. package/dist/okf/types/DeploymentmanagerDeployment.md +4 -0
  241. package/dist/okf/types/Device.md +8 -0
  242. package/dist/okf/types/DeviceRegistry.md +1 -0
  243. package/dist/okf/types/DevicestreamingSession.md +2 -0
  244. package/dist/okf/types/DialogflowAgent.md +2 -0
  245. package/dist/okf/types/DialogflowEntityType.md +2 -0
  246. package/dist/okf/types/DialogflowIntent.md +3 -0
  247. package/dist/okf/types/DialogflowcxAgent.md +3 -0
  248. package/dist/okf/types/DialogflowcxEntityType.md +2 -0
  249. package/dist/okf/types/DialogflowcxIntent.md +2 -0
  250. package/dist/okf/types/DiscoveredService.md +2 -0
  251. package/dist/okf/types/DiscoveredWorkload.md +2 -0
  252. package/dist/okf/types/DiskResourcePolicyAttachment.md +1 -0
  253. package/dist/okf/types/DnsPolicy.md +1 -0
  254. package/dist/okf/types/Document.md +2 -0
  255. package/dist/okf/types/DomainMapping.md +2 -0
  256. package/dist/okf/types/EdgeCacheKeyset.md +1 -0
  257. package/dist/okf/types/EdgeCacheOrigin.md +1 -0
  258. package/dist/okf/types/EdgeCacheService.md +1 -0
  259. package/dist/okf/types/EdgecontainerCluster.md +9 -0
  260. package/dist/okf/types/EdgecontainerNodePool.md +4 -0
  261. package/dist/okf/types/EdgenetworkNetwork.md +4 -0
  262. package/dist/okf/types/EndpointAttachment.md +2 -0
  263. package/dist/okf/types/EndpointPolicy.md +3 -0
  264. package/dist/okf/types/Engine.md +2 -0
  265. package/dist/okf/types/Enrollment.md +2 -0
  266. package/dist/okf/types/Entitlement.md +2 -0
  267. package/dist/okf/types/Entry.md +2 -0
  268. package/dist/okf/types/EntryType.md +2 -0
  269. package/dist/okf/types/Envgroup.md +2 -0
  270. package/dist/okf/types/EnvgroupAttachment.md +2 -0
  271. package/dist/okf/types/EventarcChannel.md +2 -0
  272. package/dist/okf/types/EventarcTrigger.md +5 -0
  273. package/dist/okf/types/ExampleStore.md +2 -0
  274. package/dist/okf/types/ExternalAccessRule.md +2 -0
  275. package/dist/okf/types/ExternalAddress.md +2 -0
  276. package/dist/okf/types/ExternalVPNGateway.md +3 -0
  277. package/dist/okf/types/FHIRStore.md +2 -0
  278. package/dist/okf/types/Feature.md +4 -0
  279. package/dist/okf/types/FeatureMembership.md +1 -0
  280. package/dist/okf/types/Featurestore.md +2 -0
  281. package/dist/okf/types/FeaturestoreEntityType.md +5 -0
  282. package/dist/okf/types/FeaturestoreEntityTypeFeature.md +5 -0
  283. package/dist/okf/types/Federation.md +2 -0
  284. package/dist/okf/types/Feed.md +2 -0
  285. package/dist/okf/types/Field.md +2 -0
  286. package/dist/okf/types/FilestoreBackup.md +7 -0
  287. package/dist/okf/types/FilestoreInstance.md +5 -0
  288. package/dist/okf/types/FilestoreSnapshot.md +4 -0
  289. package/dist/okf/types/FirebaseProject.md +3 -0
  290. package/dist/okf/types/FirebasedatabaseInstance.md +4 -0
  291. package/dist/okf/types/FirebasehostingChannel.md +2 -0
  292. package/dist/okf/types/FirestoreBackupSchedule.md +2 -0
  293. package/dist/okf/types/FirestoreIndex.md +2 -0
  294. package/dist/okf/types/Firewall.md +3 -0
  295. package/dist/okf/types/FirewallPolicyAssociation.md +2 -0
  296. package/dist/okf/types/FirewallPolicyRule.md +4 -0
  297. package/dist/okf/types/FirewallRule.md +1 -0
  298. package/dist/okf/types/FlexTemplateJob.md +4 -0
  299. package/dist/okf/types/FlexibleAppVersion.md +2 -0
  300. package/dist/okf/types/Flow.md +2 -0
  301. package/dist/okf/types/FolderFeed.md +3 -0
  302. package/dist/okf/types/ForwardingRule.md +10 -0
  303. package/dist/okf/types/Fulfillment.md +2 -0
  304. package/dist/okf/types/Function.md +5 -0
  305. package/dist/okf/types/FutureReservation.md +2 -0
  306. package/dist/okf/types/GCPServiceAccount.md +5 -0
  307. package/dist/okf/types/GCPUserAccessBinding.md +2 -0
  308. package/dist/okf/types/GCPolicy.md +1 -0
  309. package/dist/okf/types/GKECluster.md +8 -0
  310. package/dist/okf/types/GRPCRoute.md +4 -0
  311. package/dist/okf/types/GcsFolder.md +2 -0
  312. package/dist/okf/types/GkebackupBackup.md +2 -0
  313. package/dist/okf/types/GkebackupBackupPlan.md +2 -0
  314. package/dist/okf/types/GkehubMembership.md +6 -0
  315. package/dist/okf/types/GkehubNamespace.md +2 -0
  316. package/dist/okf/types/GlobalNetworkEndpoint.md +1 -0
  317. package/dist/okf/types/GlobalNetworkEndpointGroup.md +2 -0
  318. package/dist/okf/types/GoogleChannelConfig.md +2 -0
  319. package/dist/okf/types/GuestPolicy.md +4 -0
  320. package/dist/okf/types/HL7V2Store.md +2 -0
  321. package/dist/okf/types/HMACKey.md +5 -0
  322. package/dist/okf/types/HTTPHealthCheck.md +3 -0
  323. package/dist/okf/types/HTTPRoute.md +4 -0
  324. package/dist/okf/types/HTTPSHealthCheck.md +3 -0
  325. package/dist/okf/types/HealthcareDataset.md +2 -0
  326. package/dist/okf/types/Hub.md +5 -0
  327. package/dist/okf/types/IAMAuditConfig.md +1 -0
  328. package/dist/okf/types/IAMPolicy.md +1 -0
  329. package/dist/okf/types/IAMPolicyMember.md +1 -0
  330. package/dist/okf/types/IdentityAwareProxyClient.md +2 -0
  331. package/dist/okf/types/IdentityplatformConfig.md +2 -0
  332. package/dist/okf/types/Image.md +5 -0
  333. package/dist/okf/types/ImportJob.md +2 -0
  334. package/dist/okf/types/InboundSAMLConfig.md +1 -0
  335. package/dist/okf/types/IndexEndpoint.md +6 -0
  336. package/dist/okf/types/InspectTemplate.md +4 -0
  337. package/dist/okf/types/InstanceAttachment.md +2 -0
  338. package/dist/okf/types/InstanceConfig.md +2 -0
  339. package/dist/okf/types/InstanceEndpoint.md +1 -0
  340. package/dist/okf/types/InstanceGroup.md +3 -0
  341. package/dist/okf/types/InstanceGroupManager.md +8 -0
  342. package/dist/okf/types/InstanceGroupNamedPort.md +1 -0
  343. package/dist/okf/types/InstanceTemplate.md +5 -0
  344. package/dist/okf/types/InterceptDeployment.md +2 -0
  345. package/dist/okf/types/InterceptEndpointGroup.md +2 -0
  346. package/dist/okf/types/Interconnect.md +2 -0
  347. package/dist/okf/types/InterconnectAttachment.md +9 -0
  348. package/dist/okf/types/InternalRange.md +2 -0
  349. package/dist/okf/types/JobTrigger.md +5 -0
  350. package/dist/okf/types/KMSCryptoKey.md +2 -0
  351. package/dist/okf/types/KMSKeyRing.md +2 -0
  352. package/dist/okf/types/KeyHandle.md +2 -0
  353. package/dist/okf/types/KeyRingImportJob.md +4 -0
  354. package/dist/okf/types/LBRouteExtension.md +2 -0
  355. package/dist/okf/types/Lake.md +2 -0
  356. package/dist/okf/types/Lien.md +3 -0
  357. package/dist/okf/types/Link.md +2 -0
  358. package/dist/okf/types/Listing.md +2 -0
  359. package/dist/okf/types/LocationTagBinding.md +3 -0
  360. package/dist/okf/types/LogBucket.md +4 -0
  361. package/dist/okf/types/LogExclusion.md +3 -0
  362. package/dist/okf/types/LogMetric.md +3 -0
  363. package/dist/okf/types/LogSink.md +2 -0
  364. package/dist/okf/types/LogView.md +3 -0
  365. package/dist/okf/types/LogicalView.md +3 -0
  366. package/dist/okf/types/Machine.md +2 -0
  367. package/dist/okf/types/MachineImage.md +2 -0
  368. package/dist/okf/types/ManagedFolder.md +2 -0
  369. package/dist/okf/types/ManagedSSLCertificate.md +1 -0
  370. package/dist/okf/types/ManagedkafkaCluster.md +2 -0
  371. package/dist/okf/types/ManagedkafkaTopic.md +2 -0
  372. package/dist/okf/types/ManagementServer.md +2 -0
  373. package/dist/okf/types/MaterializedView.md +3 -0
  374. package/dist/okf/types/MembershipBinding.md +2 -0
  375. package/dist/okf/types/MemcacheInstance.md +4 -0
  376. package/dist/okf/types/MemorystoreInstance.md +2 -0
  377. package/dist/okf/types/Mesh.md +4 -0
  378. package/dist/okf/types/MetadataStore.md +2 -0
  379. package/dist/okf/types/MetastoreBackup.md +2 -0
  380. package/dist/okf/types/MetastoreService.md +2 -0
  381. package/dist/okf/types/MetricDescriptor.md +2 -0
  382. package/dist/okf/types/MigrationJob.md +2 -0
  383. package/dist/okf/types/MlengineModel.md +1 -0
  384. package/dist/okf/types/MonGroup.md +1 -0
  385. package/dist/okf/types/MonService.md +1 -0
  386. package/dist/okf/types/MonitoredProject.md +2 -0
  387. package/dist/okf/types/MuteConfig.md +2 -0
  388. package/dist/okf/types/NATAddress.md +3 -0
  389. package/dist/okf/types/NetappBackupVault.md +2 -0
  390. package/dist/okf/types/NetworkAttachment.md +2 -0
  391. package/dist/okf/types/NetworkEdgeSecurityService.md +2 -0
  392. package/dist/okf/types/NetworkEndpoint.md +1 -0
  393. package/dist/okf/types/NetworkEndpointGroup.md +3 -0
  394. package/dist/okf/types/NetworkFirewallPolicy.md +7 -0
  395. package/dist/okf/types/NetworkFirewallPolicyAssociation.md +2 -0
  396. package/dist/okf/types/NetworkFirewallPolicyRule.md +3 -0
  397. package/dist/okf/types/NetworkPeeringRoutesConfig.md +1 -0
  398. package/dist/okf/types/NetworkPolicy.md +2 -0
  399. package/dist/okf/types/NetworkservicesGateway.md +4 -0
  400. package/dist/okf/types/Node.md +2 -0
  401. package/dist/okf/types/NodePool.md +2 -0
  402. package/dist/okf/types/NodeTemplate.md +4 -0
  403. package/dist/okf/types/Note.md +3 -0
  404. package/dist/okf/types/NotebookInstance.md +2 -0
  405. package/dist/okf/types/NotebooksEnvironment.md +2 -0
  406. package/dist/okf/types/Notification.md +3 -0
  407. package/dist/okf/types/NotificationChannel.md +3 -0
  408. package/dist/okf/types/NotificationConfig.md +3 -0
  409. package/dist/okf/types/OAuthIDPConfig.md +1 -0
  410. package/dist/okf/types/OSPolicyAssignment.md +9 -0
  411. package/dist/okf/types/Occurrence.md +5 -0
  412. package/dist/okf/types/Organization.md +10 -0
  413. package/dist/okf/types/OrganizationFeed.md +2 -0
  414. package/dist/okf/types/OrganizationSecurityPolicy.md +3 -0
  415. package/dist/okf/types/OrganizationSecurityPolicyAssociation.md +2 -0
  416. package/dist/okf/types/OrganizationSecurityPolicyRule.md +1 -0
  417. package/dist/okf/types/OrgpolicyPolicy.md +2 -0
  418. package/dist/okf/types/PacketMirroring.md +4 -0
  419. package/dist/okf/types/Page.md +2 -0
  420. package/dist/okf/types/Parameter.md +2 -0
  421. package/dist/okf/types/ParameterVersion.md +2 -0
  422. package/dist/okf/types/PartialPolicy.md +1 -0
  423. package/dist/okf/types/PatchDeployment.md +5 -0
  424. package/dist/okf/types/PeeredDNSDomain.md +2 -0
  425. package/dist/okf/types/PerInstanceConfig.md +1 -0
  426. package/dist/okf/types/PhraseSet.md +2 -0
  427. package/dist/okf/types/PlatformPolicy.md +2 -0
  428. package/dist/okf/types/PolicyTag.md +3 -0
  429. package/dist/okf/types/PrivateCloud.md +2 -0
  430. package/dist/okf/types/PrivatecaCertificate.md +5 -0
  431. package/dist/okf/types/Processor.md +2 -0
  432. package/dist/okf/types/ProcessorDefaultVersion.md +1 -0
  433. package/dist/okf/types/ProcessorVersion.md +2 -0
  434. package/dist/okf/types/ProjectDefaultConfig.md +2 -0
  435. package/dist/okf/types/ProjectFeed.md +2 -0
  436. package/dist/okf/types/ProjectMetadata.md +1 -0
  437. package/dist/okf/types/PubSubSnapshot.md +2 -0
  438. package/dist/okf/types/PubSubSubscription.md +1 -0
  439. package/dist/okf/types/PubSubTopic.md +1 -0
  440. package/dist/okf/types/PubsubliteReservation.md +1 -0
  441. package/dist/okf/types/PubsubliteTopic.md +1 -0
  442. package/dist/okf/types/RecaptchaenterpriseFirewallPolicy.md +2 -0
  443. package/dist/okf/types/RecaptchaenterpriseKey.md +2 -0
  444. package/dist/okf/types/Recognizer.md +2 -0
  445. package/dist/okf/types/RedisCluster.md +2 -0
  446. package/dist/okf/types/RedisInstance.md +8 -0
  447. package/dist/okf/types/RegionAutoscaler.md +3 -0
  448. package/dist/okf/types/RegionDiskResourcePolicyAttachment.md +1 -0
  449. package/dist/okf/types/RegionNetworkEndpointGroup.md +2 -0
  450. package/dist/okf/types/RegionPerInstanceConfig.md +1 -0
  451. package/dist/okf/types/RegionSSLPolicy.md +4 -0
  452. package/dist/okf/types/RegionalEndpoint.md +2 -0
  453. package/dist/okf/types/ResourceBundle.md +2 -0
  454. package/dist/okf/types/ResourcePolicy.md +3 -0
  455. package/dist/okf/types/ResourcemanagerFolder.md +5 -0
  456. package/dist/okf/types/ResourcemanagerPolicy.md +3 -0
  457. package/dist/okf/types/ResourcemanagerProject.md +2 -0
  458. package/dist/okf/types/ResponsePolicy.md +1 -0
  459. package/dist/okf/types/ResponsePolicyRule.md +1 -0
  460. package/dist/okf/types/Restore.md +2 -0
  461. package/dist/okf/types/RestorePlan.md +2 -0
  462. package/dist/okf/types/Router.md +3 -0
  463. package/dist/okf/types/RouterInterface.md +1 -0
  464. package/dist/okf/types/RouterNAT.md +1 -0
  465. package/dist/okf/types/RouterPeer.md +2 -0
  466. package/dist/okf/types/Routine.md +3 -0
  467. package/dist/okf/types/Runtime.md +2 -0
  468. package/dist/okf/types/RuntimeTemplate.md +2 -0
  469. package/dist/okf/types/SQLDatabase.md +2 -0
  470. package/dist/okf/types/SQLInstance.md +10 -0
  471. package/dist/okf/types/SQLUser.md +1 -0
  472. package/dist/okf/types/SSHPublicKey.md +2 -0
  473. package/dist/okf/types/SSLCert.md +8 -0
  474. package/dist/okf/types/SSLCertificate.md +5 -0
  475. package/dist/okf/types/SSLPolicy.md +4 -0
  476. package/dist/okf/types/SavedQuery.md +2 -0
  477. package/dist/okf/types/Schema.md +1 -0
  478. package/dist/okf/types/Scope.md +5 -0
  479. package/dist/okf/types/ScopeRBACRoleBinding.md +2 -0
  480. package/dist/okf/types/SecretCiphertext.md +2 -0
  481. package/dist/okf/types/SecretManagerSecret.md +3 -0
  482. package/dist/okf/types/SecretManagerSecretVersion.md +6 -0
  483. package/dist/okf/types/SecuresourcemanagerInstance.md +2 -0
  484. package/dist/okf/types/SecuresourcemanagerRepository.md +2 -0
  485. package/dist/okf/types/SecurityPolicy.md +3 -0
  486. package/dist/okf/types/ServerTLSPolicy.md +3 -0
  487. package/dist/okf/types/ServiceAccountKey.md +6 -0
  488. package/dist/okf/types/ServiceAttachment.md +5 -0
  489. package/dist/okf/types/ServiceBinding.md +2 -0
  490. package/dist/okf/types/ServiceConnectionPolicy.md +2 -0
  491. package/dist/okf/types/ServiceIdentity.md +2 -0
  492. package/dist/okf/types/ServiceLevelObjective.md +4 -0
  493. package/dist/okf/types/ServicePerimeter.md +4 -0
  494. package/dist/okf/types/ServicePerimeterResource.md +1 -0
  495. package/dist/okf/types/ServiceProjectAttachment.md +2 -0
  496. package/dist/okf/types/ServiceSplitTraffic.md +1 -0
  497. package/dist/okf/types/ServicedirectoryEndpoint.md +2 -0
  498. package/dist/okf/types/ServicedirectoryNamespace.md +2 -0
  499. package/dist/okf/types/ServicedirectoryService.md +2 -0
  500. package/dist/okf/types/ServicenetworkingConnection.md +2 -0
  501. package/dist/okf/types/ServiceusageService.md +1 -0
  502. package/dist/okf/types/Settings.md +2 -0
  503. package/dist/okf/types/SharedVPCHostProject.md +1 -0
  504. package/dist/okf/types/SharedVPCServiceProject.md +1 -0
  505. package/dist/okf/types/Site.md +3 -0
  506. package/dist/okf/types/Source.md +2 -0
  507. package/dist/okf/types/SourcerepoRepository.md +3 -0
  508. package/dist/okf/types/SpannerBackupSchedule.md +2 -0
  509. package/dist/okf/types/SpannerDatabase.md +2 -0
  510. package/dist/okf/types/SpannerInstance.md +3 -0
  511. package/dist/okf/types/Spoke.md +5 -0
  512. package/dist/okf/types/StandardAppVersion.md +2 -0
  513. package/dist/okf/types/StorageBucket.md +3 -0
  514. package/dist/okf/types/StoragetransferJob.md +5 -0
  515. package/dist/okf/types/StoredInfoType.md +1 -0
  516. package/dist/okf/types/Stream.md +3 -0
  517. package/dist/okf/types/Subnet.md +5 -0
  518. package/dist/okf/types/Subnetwork.md +8 -0
  519. package/dist/okf/types/Subscription.md +1 -0
  520. package/dist/okf/types/SyncAuthorization.md +2 -0
  521. package/dist/okf/types/TCPRoute.md +4 -0
  522. package/dist/okf/types/TLSRoute.md +4 -0
  523. package/dist/okf/types/Tag.md +2 -0
  524. package/dist/okf/types/TagBinding.md +3 -0
  525. package/dist/okf/types/TagKey.md +6 -0
  526. package/dist/okf/types/TagTemplate.md +2 -0
  527. package/dist/okf/types/TagValue.md +6 -0
  528. package/dist/okf/types/Target.md +2 -0
  529. package/dist/okf/types/TargetGRPCProxy.md +5 -0
  530. package/dist/okf/types/TargetHTTPProxy.md +4 -0
  531. package/dist/okf/types/TargetHTTPSProxy.md +5 -0
  532. package/dist/okf/types/TargetInstance.md +3 -0
  533. package/dist/okf/types/TargetPool.md +2 -0
  534. package/dist/okf/types/TargetSSLProxy.md +4 -0
  535. package/dist/okf/types/TargetTCPProxy.md +5 -0
  536. package/dist/okf/types/TargetVPNGateway.md +4 -0
  537. package/dist/okf/types/TasksQueue.md +2 -0
  538. package/dist/okf/types/Taxonomy.md +3 -0
  539. package/dist/okf/types/Tenant.md +1 -0
  540. package/dist/okf/types/TenantDefaultSupportedIDPConfig.md +2 -0
  541. package/dist/okf/types/TenantInboundSAMLConfig.md +1 -0
  542. package/dist/okf/types/TenantOAuthIDPConfig.md +1 -0
  543. package/dist/okf/types/Tensorboard.md +6 -0
  544. package/dist/okf/types/URLMap.md +5 -0
  545. package/dist/okf/types/UptimeCheckConfig.md +1 -0
  546. package/dist/okf/types/User.md +2 -0
  547. package/dist/okf/types/VPCNetwork.md +3 -0
  548. package/dist/okf/types/VPNGateway.md +2 -0
  549. package/dist/okf/types/VPNTunnel.md +7 -0
  550. package/dist/okf/types/VertexaiDataset.md +1 -0
  551. package/dist/okf/types/VertexaiEndpoint.md +1 -0
  552. package/dist/okf/types/VertexaiIndex.md +1 -0
  553. package/dist/okf/types/VirtualMachine.md +2 -0
  554. package/dist/okf/types/VmwareengineNetwork.md +2 -0
  555. package/dist/okf/types/VmwareengineNetworkPeering.md +2 -0
  556. package/dist/okf/types/VpnConnection.md +3 -0
  557. package/dist/okf/types/WasmPlugin.md +2 -0
  558. package/dist/okf/types/WebApp.md +3 -0
  559. package/dist/okf/types/Webhook.md +3 -0
  560. package/dist/okf/types/WorkerPool.md +2 -0
  561. package/dist/okf/types/Workflow.md +2 -0
  562. package/dist/okf/types/WorkflowTemplate.md +4 -0
  563. package/dist/okf/types/WorkflowsExecution.md +2 -0
  564. package/dist/okf/types/WorkforcePool.md +3 -0
  565. package/dist/okf/types/WorkforcePoolProvider.md +2 -0
  566. package/dist/okf/types/Workload.md +2 -0
  567. package/dist/okf/types/WorkloadIdentityPool.md +2 -0
  568. package/dist/okf/types/WorkloadIdentityPoolProvider.md +2 -0
  569. package/dist/okf/types/Workstation.md +2 -0
  570. package/dist/okf/types/WorkstationCluster.md +2 -0
  571. package/dist/okf/types/WorkstationConfig.md +2 -0
  572. package/dist/okf/types/Zone.md +2 -0
  573. package/dist/op/activities/floci-gcp.js +49 -0
  574. package/dist/op/activities/gcp-apply.js +618 -0
  575. package/dist/op/activities/index.js +10 -0
  576. package/dist/op/builders.js +50 -0
  577. package/dist/ownership.js +38 -0
  578. package/dist/package-cli.js +20 -0
  579. package/dist/plugin.d.ts.map +1 -1
  580. package/dist/plugin.js +377 -0
  581. package/dist/pseudo.js +15 -0
  582. package/dist/rules/schema-registry.ts +2 -1
  583. package/dist/serializer.d.ts.map +1 -1
  584. package/dist/serializer.js +247 -0
  585. package/dist/spec/fetch.js +107 -0
  586. package/dist/spec/parse.d.ts +1 -1
  587. package/dist/spec/parse.js +339 -0
  588. package/dist/types/index.d.ts +1367 -0
  589. package/dist/validate-cli.js +11 -0
  590. package/dist/validate.js +24 -0
  591. package/dist/variables.js +15 -0
  592. package/package.json +8 -8
  593. package/src/attributes.test.ts +16 -0
  594. package/src/codegen/generate.ts +8 -3
  595. package/src/codegen/package.ts +2 -2
  596. package/src/composites/catalog.ts +7 -1
  597. package/src/composites/cloud-run-service.ts +12 -5
  598. package/src/composites/composites.test.ts +17 -0
  599. package/src/generated/index.d.ts +1367 -0
  600. package/src/generated/index.ts +487 -487
  601. package/src/generated/lexicon-gcp.json +1848 -481
  602. package/src/health.test.ts +59 -0
  603. package/src/health.ts +123 -0
  604. package/src/index.ts +3 -0
  605. package/src/lint/post-synth/schema-registry.ts +2 -1
  606. package/src/lsp/completions.ts +2 -1
  607. package/src/lsp/hover.ts +2 -1
  608. package/src/plugin.ts +8 -0
  609. package/src/serializer-outputs.test.ts +26 -0
  610. package/src/serializer.ts +21 -3
  611. package/src/spec/parse.test.ts +42 -2
  612. package/src/spec/parse.ts +17 -1
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env tsx
2
+ import { validate } from "./validate.js";
3
+ import { printValidationResult } from "@intentius/chant/codegen/validate";
4
+ async function main() {
5
+ const result = await validate();
6
+ printValidationResult(result);
7
+ }
8
+ main().catch((err) => {
9
+ console.error(err);
10
+ process.exit(1);
11
+ });
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Validate generated lexicon-gcp artifacts.
3
+ */
4
+ import { dirname } from "path";
5
+ import { fileURLToPath } from "url";
6
+ import { validateLexiconArtifacts } from "@intentius/chant/codegen/validate";
7
+ const REQUIRED_NAMES = [
8
+ "ComputeInstance", "StorageBucket", "GKECluster", "SQLInstance",
9
+ "GCPServiceAccount", "IAMPolicyMember", "CloudRunService", "PubSubTopic",
10
+ "VPCNetwork",
11
+ ];
12
+ export async function validate(opts) {
13
+ const basePath = opts?.basePath ?? dirname(dirname(fileURLToPath(import.meta.url)));
14
+ return validateLexiconArtifacts({
15
+ lexiconJsonFilename: "lexicon-gcp.json",
16
+ requiredNames: REQUIRED_NAMES,
17
+ basePath,
18
+ coverageThresholds: {
19
+ minPropertyPct: 0,
20
+ minLifecyclePct: 0,
21
+ minAttrPct: 1,
22
+ },
23
+ });
24
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Well-known Config Connector annotation keys.
3
+ */
4
+ export const GcpAnnotations = {
5
+ /** Bind a resource to a specific GCP project. */
6
+ ProjectId: "cnrm.cloud.google.com/project-id",
7
+ /** Control what happens when a resource is deleted from K8s. */
8
+ DeletionPolicy: "cnrm.cloud.google.com/deletion-policy",
9
+ /** Whether to merge observed spec back into the resource. */
10
+ StateIntoSpec: "cnrm.cloud.google.com/state-into-spec",
11
+ /** Strategy when another controller manages the same resource. */
12
+ ManagementConflictPolicy: "cnrm.cloud.google.com/management-conflict-prevention-policy",
13
+ /** Disable dependent resource reconciliation. */
14
+ SkipDependentResources: "cnrm.cloud.google.com/skip-dependent-resources",
15
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-gcp",
3
- "version": "0.124.31",
3
+ "version": "0.124.33",
4
4
  "description": "Google Cloud lexicon for chant — declarative IaC in TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -32,27 +32,27 @@
32
32
  ".": {
33
33
  "development": "./src/index.ts",
34
34
  "types": "./dist/index.d.ts",
35
- "default": "./src/index.ts"
35
+ "default": "./dist/index.js"
36
36
  },
37
37
  "./*": {
38
38
  "development": "./src/*.ts",
39
39
  "types": "./dist/*.d.ts",
40
- "default": "./src/*.ts"
40
+ "default": "./dist/*.js"
41
41
  },
42
42
  "./detect": {
43
43
  "development": "./src/detect.ts",
44
44
  "types": "./dist/detect.d.ts",
45
- "default": "./src/detect.ts"
45
+ "default": "./dist/detect.js"
46
46
  },
47
47
  "./op/activities": {
48
48
  "development": "./src/op/activities/index.ts",
49
49
  "types": "./dist/op/activities/index.d.ts",
50
- "default": "./src/op/activities/index.ts"
50
+ "default": "./dist/op/activities/index.js"
51
51
  },
52
52
  "./lint/post-synth": {
53
53
  "development": "./src/lint/post-synth/index.ts",
54
54
  "types": "./dist/lint/post-synth/index.d.ts",
55
- "default": "./src/lint/post-synth/index.ts"
55
+ "default": "./dist/lint/post-synth/index.js"
56
56
  },
57
57
  "./manifest": "./dist/manifest.json",
58
58
  "./meta": "./dist/meta.json",
@@ -64,7 +64,7 @@
64
64
  "validate": "tsx src/validate-cli.ts",
65
65
  "docs": "tsx src/codegen/docs-cli.ts",
66
66
  "prepack": "npm run generate && npm run bundle && npm run validate && npm run build",
67
- "build": "../../scripts/tsc7.sh -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && find dist -type f \\( -name \"*.js\" -o -name \"*.js.map\" \\) -delete"
67
+ "build": "../../scripts/tsc7.sh -p tsconfig.build.json --sourceMap false && tsc-alias -p tsconfig.build.json"
68
68
  },
69
69
  "dependencies": {
70
70
  "fflate": "^0.8.2",
@@ -76,6 +76,6 @@
76
76
  "typescript": "^5.9.3"
77
77
  },
78
78
  "peerDependencies": {
79
- "@intentius/chant": "^0.124.31"
79
+ "@intentius/chant": "^0.124.33"
80
80
  }
81
81
  }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * A RunService's URL is referenceable (#4179), so DNS in another lexicon can
3
+ * point at it: `status.uri` is read through `status_uri`.
4
+ */
5
+
6
+ import { describe, expect, test } from "vitest";
7
+ import { AttrRef } from "@intentius/chant";
8
+ import { CloudRunService } from "./index";
9
+
10
+ describe("status attributes", () => {
11
+ test("a RunService exposes status.uri as an AttrRef", () => {
12
+ const svc = new CloudRunService({ location: "us-central1", projectRef: { external: "p" }, template: {} }) as unknown as Record<string, unknown>;
13
+ expect(svc.status_uri).toBeInstanceOf(AttrRef);
14
+ expect((svc.status_uri as AttrRef).attribute).toBe("status.uri");
15
+ });
16
+ });
@@ -125,7 +125,7 @@ function generateLexiconJSON(results: GcpParseResult[], naming: NamingStrategy):
125
125
  required: r.resource.properties.filter((p) => p.required).map((p) => p.name),
126
126
  },
127
127
  attrs: Object.fromEntries(
128
- r.resource.attributes.map((a) => [a.name, a.tsType]),
128
+ r.resource.attributes.map((a) => [attrKey(a.name), a.tsType]),
129
129
  ),
130
130
  };
131
131
 
@@ -170,7 +170,7 @@ function generateTypeScriptDeclarations(results: GcpParseResult[], naming: Namin
170
170
 
171
171
  // Attributes
172
172
  for (const attr of r.resource.attributes) {
173
- lines.push(` readonly ${attr.name}: ${attr.tsType};`);
173
+ lines.push(` readonly ${attrKey(attr.name)}: ${attr.tsType};`);
174
174
  }
175
175
 
176
176
  lines.push(`}`);
@@ -222,6 +222,11 @@ function generateTypeScriptDeclarations(results: GcpParseResult[], naming: Namin
222
222
 
223
223
  // ── Runtime index generation ────────────────────────────────────────
224
224
 
225
+ /** The property an attribute is read through: `status.uri` is `status_uri`, as AWS's `Endpoint.Address` is `Endpoint_Address`. */
226
+ function attrKey(name: string): string {
227
+ return name.replace(/\./g, "_");
228
+ }
229
+
225
230
  function generateRuntimeIndex(results: GcpParseResult[], naming: NamingStrategy): string {
226
231
  const resourceEntries: RuntimeIndexEntry[] = [];
227
232
  const propertyEntries: RuntimeIndexPropertyEntry[] = [];
@@ -234,7 +239,7 @@ function generateRuntimeIndex(results: GcpParseResult[], naming: NamingStrategy)
234
239
 
235
240
  const attrs: Record<string, string> = {};
236
241
  for (const a of r.resource.attributes) {
237
- attrs[a.name] = a.name;
242
+ attrs[attrKey(a.name)] = a.name;
238
243
  }
239
244
 
240
245
  resourceEntries.push({ tsName, resourceType: cfnType, attrs });
@@ -6,7 +6,7 @@
6
6
  import { readFileSync } from "fs";
7
7
  import { gcpPlugin } from "../plugin";
8
8
  import { dirname } from "path";
9
- import { fileURLToPath } from "url";
9
+ import { moduleSourceDir } from "@intentius/chant/module-source";
10
10
  import {
11
11
  packagePipeline,
12
12
  collectSkills,
@@ -18,7 +18,7 @@ import { generate } from "./generate";
18
18
  export type { PackageOptions, PackageResult };
19
19
 
20
20
  // src/codegen/package.ts → dirname x2 → src/ (srcDir for rule collection)
21
- const pkgDir = dirname(dirname(fileURLToPath(import.meta.url)));
21
+ const pkgDir = dirname(moduleSourceDir(import.meta.url));
22
22
 
23
23
  /**
24
24
  * Package the GCP lexicon into a distributable BundleSpec.
@@ -119,7 +119,13 @@ export const compositeCatalog: CompositeEntry[] = [
119
119
  "name": "location",
120
120
  "type": "string",
121
121
  "required": false,
122
- "description": "GCP region."
122
+ "description": "GCP region (default: GCP.Region, resolved from GCP_REGION at build)."
123
+ },
124
+ {
125
+ "name": "projectId",
126
+ "type": "string",
127
+ "required": false,
128
+ "description": "GCP project the service runs in, as `projectRef.external` (default: GCP.ProjectId, resolved from GCP_PROJECT_ID at build)."
123
129
  },
124
130
  {
125
131
  "name": "port",
@@ -7,14 +7,17 @@ import {
7
7
  CloudRunService as CloudRunServiceResource,
8
8
  IAMPolicyMember,
9
9
  } from "../generated";
10
+ import { GCP } from "../pseudo";
10
11
 
11
12
  export interface CloudRunServiceProps {
12
13
  /** Service name. */
13
14
  name: string;
14
15
  /** Container image. */
15
16
  image: string;
16
- /** GCP region. */
17
+ /** GCP region (default: GCP.Region, resolved from GCP_REGION at build). */
17
18
  location?: string;
19
+ /** GCP project the service runs in, as `projectRef.external` (default: GCP.ProjectId, resolved from GCP_PROJECT_ID at build). */
20
+ projectId?: string;
18
21
  /** Port the container listens on (default: 8080). */
19
22
  port?: number;
20
23
  /** CPU limit (default: "1000m"). */
@@ -47,10 +50,12 @@ export interface CloudRunServiceProps {
47
50
  *
48
51
  * @example
49
52
  * ```ts
50
- * import { CloudRunService } from "@intentius/chant-lexicon-gcp";
53
+ * import { CloudRunServiceComposite } from "@intentius/chant-lexicon-gcp";
51
54
  *
52
- * const { service, publicIam } = CloudRunService({
55
+ * const { service, publicIam } = CloudRunServiceComposite({
53
56
  * name: "my-api",
57
+ * projectId: "my-project",
58
+ * location: "us-central1",
54
59
  * image: "gcr.io/my-project/my-api:latest",
55
60
  * publicAccess: true,
56
61
  * });
@@ -61,6 +66,7 @@ export const CloudRunServiceComposite = Composite((props: CloudRunServiceProps)
61
66
  name,
62
67
  image,
63
68
  location,
69
+ projectId,
64
70
  port = 8080,
65
71
  cpuLimit = "1000m",
66
72
  memoryLimit = "512Mi",
@@ -97,7 +103,8 @@ export const CloudRunServiceComposite = Composite((props: CloudRunServiceProps)
97
103
  ...(namespace && { namespace }),
98
104
  labels: { ...commonLabels, "app.kubernetes.io/component": "service" },
99
105
  },
100
- ...(location && { location }),
106
+ location: location ?? GCP.Region,
107
+ projectRef: { external: projectId ?? GCP.ProjectId },
101
108
  template: {
102
109
  maxInstanceRequestConcurrency,
103
110
  scaling: {
@@ -106,7 +113,7 @@ export const CloudRunServiceComposite = Composite((props: CloudRunServiceProps)
106
113
  },
107
114
  containers,
108
115
  },
109
- } as Record<string, unknown>, defs?.service));
116
+ }, defs?.service));
110
117
 
111
118
  const result: Record<string, any> = { service };
112
119
 
@@ -83,6 +83,23 @@ describe("CloudRunServiceComposite", () => {
83
83
  expect(result.service).toBeDefined();
84
84
  });
85
85
 
86
+ test("sets projectRef and location, which the RunService CRD requires", () => {
87
+ const result = CloudRunServiceComposite({
88
+ name: "api",
89
+ image: "gcr.io/p/api:1",
90
+ projectId: "proj",
91
+ location: "us-central1",
92
+ });
93
+ expect(p(result.service).projectRef).toEqual({ external: "proj" });
94
+ expect(p(result.service).location).toBe("us-central1");
95
+ });
96
+
97
+ test("defaults projectRef and location to the GCP pseudo-parameters", () => {
98
+ const result = CloudRunServiceComposite({ name: "api", image: "gcr.io/p/api:1" });
99
+ expect(JSON.parse(JSON.stringify(p(result.service).projectRef))).toEqual({ external: { Ref: "GCP::ProjectId" } });
100
+ expect(JSON.parse(JSON.stringify(p(result.service).location))).toEqual({ Ref: "GCP::Region" });
101
+ });
102
+
86
103
  test("no public IAM by default", () => {
87
104
  const result = CloudRunServiceComposite({ name: "api", image: "gcr.io/p/api:1" });
88
105
  expect(result.publicIam).toBeUndefined();