Skip to content

Commit

Permalink
fix(rules): add GCP Translate
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Aug 7, 2023
1 parent 55020f6 commit 8e29414
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/common/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const list: TechItem[] = [
{ key: 'gcp.maps', name: 'Maps', type: 'api' },
{ key: 'gcp.language', name: 'Language', type: 'api' },
{ key: 'gcp.secretmanager', name: 'Secret manager', type: 'db' },
{ key: 'gcp.translate', name: 'Translate', type: 'api' },
{ key: 'gcp.speech', name: 'Speech', type: 'api' },
{ key: 'gcp.pubsub', name: 'PubSub', type: 'messaging' },
{ key: 'gcp.gce', name: 'Compute Engine', type: 'hosting' },
Expand Down
14 changes: 14 additions & 0 deletions src/rules/api/gcp.translate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { register } from '../../rules.js';

register({
tech: 'gcp.translate',
dependencies: [
{ type: 'npm', name: '@google-cloud/translate' },
{ type: 'terraform.resource', name: '' },
{
type: 'ruby',
name: /^google-cloud-translate/,
example: 'google-cloud-translate-v1',
},
],
});
1 change: 1 addition & 0 deletions src/rules/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ import './gcp.aiplatform.js';
import './gcp.language.js';
import './gcp.maps.js';
import './gcp.speech.js';
import './gcp.translate.js';
1 change: 1 addition & 0 deletions src/rules/spec/nodejs/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ exports[`npm > should match everything 1`] = `
"gcp.secretmanager",
"gcp.speech",
"gcp.sql",
"gcp.translate",
"github",
"hotjar",
"influxdb",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/ruby/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Set {
"gcp.language",
"gcp.maps",
"gcp.speech",
"gcp.translate",
"zookeeper",
"aws",
"aws.dynamodb",
Expand Down Expand Up @@ -249,6 +250,11 @@ exports[`ruby (component) > should match everything 2`] = `
"google-cloud-storage",
"1.0.0",
],
[
"ruby",
"google-cloud-translate-v1",
"1.0.0",
],
[
"ruby",
"google_maps_service",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export type AllowedKeys =
| 'gcp.secretmanager'
| 'gcp.speech'
| 'gcp.sql'
| 'gcp.translate'
| 'gcp'
| 'github.actions'
| 'github.pages'
Expand Down

0 comments on commit 8e29414

Please sign in to comment.