@intentius/chant-lexicon-gcp 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/integrity.json +36 -0
- package/dist/manifest.json +12 -0
- package/dist/meta.json +10919 -0
- package/dist/rules/gcp-helpers.ts +117 -0
- package/dist/rules/hardcoded-project.ts +58 -0
- package/dist/rules/hardcoded-region.ts +56 -0
- package/dist/rules/public-iam.ts +43 -0
- package/dist/rules/wgc101.ts +56 -0
- package/dist/rules/wgc102.ts +35 -0
- package/dist/rules/wgc103.ts +45 -0
- package/dist/rules/wgc104.ts +42 -0
- package/dist/rules/wgc105.ts +46 -0
- package/dist/rules/wgc106.ts +36 -0
- package/dist/rules/wgc107.ts +39 -0
- package/dist/rules/wgc108.ts +41 -0
- package/dist/rules/wgc109.ts +39 -0
- package/dist/rules/wgc110.ts +38 -0
- package/dist/rules/wgc111.ts +54 -0
- package/dist/rules/wgc112.ts +56 -0
- package/dist/rules/wgc113.ts +42 -0
- package/dist/rules/wgc201.ts +36 -0
- package/dist/rules/wgc202.ts +39 -0
- package/dist/rules/wgc203.ts +44 -0
- package/dist/rules/wgc204.ts +39 -0
- package/dist/rules/wgc301.ts +34 -0
- package/dist/rules/wgc302.ts +34 -0
- package/dist/rules/wgc303.ts +37 -0
- package/dist/skills/chant-gcp-patterns.md +367 -0
- package/dist/skills/chant-gcp-security.md +276 -0
- package/dist/skills/chant-gcp.md +108 -0
- package/dist/types/index.d.ts +26529 -0
- package/package.json +35 -0
- package/src/actions/index.ts +52 -0
- package/src/codegen/docs-cli.ts +7 -0
- package/src/codegen/docs.ts +820 -0
- package/src/codegen/generate-cli.ts +24 -0
- package/src/codegen/generate.ts +252 -0
- package/src/codegen/naming.test.ts +49 -0
- package/src/codegen/naming.ts +132 -0
- package/src/codegen/package.ts +66 -0
- package/src/composites/cloud-function.ts +117 -0
- package/src/composites/cloud-run-service.ts +124 -0
- package/src/composites/cloud-sql-instance.ts +126 -0
- package/src/composites/composites.test.ts +432 -0
- package/src/composites/gcs-bucket.ts +111 -0
- package/src/composites/gke-cluster.ts +125 -0
- package/src/composites/index.ts +20 -0
- package/src/composites/managed-certificate.ts +79 -0
- package/src/composites/private-service.ts +95 -0
- package/src/composites/pubsub-pipeline.ts +102 -0
- package/src/composites/secure-project.ts +128 -0
- package/src/composites/vpc-network.ts +165 -0
- package/src/coverage.test.ts +27 -0
- package/src/coverage.ts +51 -0
- package/src/default-labels.test.ts +111 -0
- package/src/default-labels.ts +93 -0
- package/src/generated/index.d.ts +26529 -0
- package/src/generated/index.ts +1723 -0
- package/src/generated/lexicon-gcp.json +10919 -0
- package/src/generated/runtime.ts +4 -0
- package/src/import/generator.test.ts +125 -0
- package/src/import/generator.ts +82 -0
- package/src/import/parser.test.ts +167 -0
- package/src/import/parser.ts +80 -0
- package/src/import/roundtrip.test.ts +66 -0
- package/src/index.ts +54 -0
- package/src/lint/post-synth/gcp-helpers.ts +117 -0
- package/src/lint/post-synth/index.ts +20 -0
- package/src/lint/post-synth/post-synth.test.ts +693 -0
- package/src/lint/post-synth/wgc101.ts +56 -0
- package/src/lint/post-synth/wgc102.ts +35 -0
- package/src/lint/post-synth/wgc103.ts +45 -0
- package/src/lint/post-synth/wgc104.ts +42 -0
- package/src/lint/post-synth/wgc105.ts +46 -0
- package/src/lint/post-synth/wgc106.ts +36 -0
- package/src/lint/post-synth/wgc107.ts +39 -0
- package/src/lint/post-synth/wgc108.ts +41 -0
- package/src/lint/post-synth/wgc109.ts +39 -0
- package/src/lint/post-synth/wgc110.ts +38 -0
- package/src/lint/post-synth/wgc111.ts +54 -0
- package/src/lint/post-synth/wgc112.ts +56 -0
- package/src/lint/post-synth/wgc113.ts +42 -0
- package/src/lint/post-synth/wgc201.ts +36 -0
- package/src/lint/post-synth/wgc202.ts +39 -0
- package/src/lint/post-synth/wgc203.ts +44 -0
- package/src/lint/post-synth/wgc204.ts +39 -0
- package/src/lint/post-synth/wgc301.ts +34 -0
- package/src/lint/post-synth/wgc302.ts +34 -0
- package/src/lint/post-synth/wgc303.ts +37 -0
- package/src/lint/rules/hardcoded-project.ts +58 -0
- package/src/lint/rules/hardcoded-region.ts +56 -0
- package/src/lint/rules/index.ts +3 -0
- package/src/lint/rules/public-iam.ts +43 -0
- package/src/lint/rules/rules.test.ts +63 -0
- package/src/lsp/completions.test.ts +67 -0
- package/src/lsp/completions.ts +17 -0
- package/src/lsp/hover.test.ts +66 -0
- package/src/lsp/hover.ts +54 -0
- package/src/package-cli.ts +24 -0
- package/src/plugin.test.ts +250 -0
- package/src/plugin.ts +405 -0
- package/src/pseudo.test.ts +40 -0
- package/src/pseudo.ts +19 -0
- package/src/serializer.test.ts +250 -0
- package/src/serializer.ts +232 -0
- package/src/skills/chant-gcp-patterns.md +367 -0
- package/src/skills/chant-gcp-security.md +276 -0
- package/src/skills/chant-gcp.md +108 -0
- package/src/spec/fetch.test.ts +16 -0
- package/src/spec/fetch.ts +121 -0
- package/src/spec/parse.test.ts +163 -0
- package/src/spec/parse.ts +432 -0
- package/src/testdata/compute-instance.yaml +93 -0
- package/src/testdata/iam-policy-member.yaml +66 -0
- package/src/testdata/manifests/compute-instance.yaml +18 -0
- package/src/testdata/manifests/full-app.yaml +34 -0
- package/src/testdata/manifests/storage-bucket.yaml +12 -0
- package/src/testdata/storage-bucket.yaml +100 -0
- package/src/validate-cli.ts +13 -0
- package/src/validate.test.ts +38 -0
- package/src/validate.ts +30 -0
- package/src/variables.ts +15 -0
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@intentius/chant-lexicon-gcp",
|
|
3
|
+
"version": "0.0.15",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/",
|
|
8
|
+
"dist/"
|
|
9
|
+
],
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": "./src/index.ts",
|
|
15
|
+
"./*": "./src/*.ts",
|
|
16
|
+
"./manifest": "./dist/manifest.json",
|
|
17
|
+
"./meta": "./dist/meta.json",
|
|
18
|
+
"./types": "./dist/types/index.d.ts"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"generate": "bun run src/codegen/generate-cli.ts",
|
|
22
|
+
"bundle": "bun run src/package-cli.ts",
|
|
23
|
+
"validate": "bun run src/validate-cli.ts",
|
|
24
|
+
"docs": "bun run src/codegen/docs-cli.ts",
|
|
25
|
+
"prepack": "bun run generate && bun run bundle && bun run validate"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@intentius/chant": "0.0.15",
|
|
29
|
+
"fflate": "^0.8.2",
|
|
30
|
+
"js-yaml": "^4.1.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"typescript": "^5.9.3"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GCP IAM role constants for common patterns.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export const StorageRoles = {
|
|
6
|
+
Admin: "roles/storage.admin",
|
|
7
|
+
ObjectAdmin: "roles/storage.objectAdmin",
|
|
8
|
+
ObjectViewer: "roles/storage.objectViewer",
|
|
9
|
+
ObjectCreator: "roles/storage.objectCreator",
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
export const ComputeRoles = {
|
|
13
|
+
Admin: "roles/compute.admin",
|
|
14
|
+
Viewer: "roles/compute.viewer",
|
|
15
|
+
NetworkAdmin: "roles/compute.networkAdmin",
|
|
16
|
+
InstanceAdmin: "roles/compute.instanceAdmin.v1",
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
export const ContainerRoles = {
|
|
20
|
+
Admin: "roles/container.admin",
|
|
21
|
+
Developer: "roles/container.developer",
|
|
22
|
+
Viewer: "roles/container.viewer",
|
|
23
|
+
ClusterAdmin: "roles/container.clusterAdmin",
|
|
24
|
+
} as const;
|
|
25
|
+
|
|
26
|
+
export const IAMRoles = {
|
|
27
|
+
Admin: "roles/iam.serviceAccountAdmin",
|
|
28
|
+
User: "roles/iam.serviceAccountUser",
|
|
29
|
+
TokenCreator: "roles/iam.serviceAccountTokenCreator",
|
|
30
|
+
WorkloadIdentityUser: "roles/iam.workloadIdentityUser",
|
|
31
|
+
} as const;
|
|
32
|
+
|
|
33
|
+
export const SQLRoles = {
|
|
34
|
+
Admin: "roles/cloudsql.admin",
|
|
35
|
+
Client: "roles/cloudsql.client",
|
|
36
|
+
Editor: "roles/cloudsql.editor",
|
|
37
|
+
Viewer: "roles/cloudsql.viewer",
|
|
38
|
+
} as const;
|
|
39
|
+
|
|
40
|
+
export const RunRoles = {
|
|
41
|
+
Admin: "roles/run.admin",
|
|
42
|
+
Developer: "roles/run.developer",
|
|
43
|
+
Invoker: "roles/run.invoker",
|
|
44
|
+
Viewer: "roles/run.viewer",
|
|
45
|
+
} as const;
|
|
46
|
+
|
|
47
|
+
export const PubSubRoles = {
|
|
48
|
+
Admin: "roles/pubsub.admin",
|
|
49
|
+
Publisher: "roles/pubsub.publisher",
|
|
50
|
+
Subscriber: "roles/pubsub.subscriber",
|
|
51
|
+
Viewer: "roles/pubsub.viewer",
|
|
52
|
+
} as const;
|