Skip to content

Commit

Permalink
fix(rules): add GCP Vision
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Aug 7, 2023
1 parent 8e29414 commit 5f8fcd5
Show file tree
Hide file tree
Showing 6 changed files with 23 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 @@ -60,6 +60,7 @@ export const list: TechItem[] = [
{ key: 'gcp.secretmanager', name: 'Secret manager', type: 'db' },
{ key: 'gcp.translate', name: 'Translate', type: 'api' },
{ key: 'gcp.speech', name: 'Speech', type: 'api' },
{ key: 'gcp.vision', name: 'Vision', type: 'api' },
{ key: 'gcp.pubsub', name: 'PubSub', type: 'messaging' },
{ key: 'gcp.gce', name: 'Compute Engine', type: 'hosting' },
{ key: 'gcp.gcs', name: 'Cloud Storage', type: 'storage' },
Expand Down
13 changes: 13 additions & 0 deletions src/rules/api/gcp.vision.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { register } from '../../rules.js';

register({
tech: 'gcp.vision',
dependencies: [
{ type: 'npm', name: '@google-cloud/vision' },
{
type: 'ruby',
name: /^google-cloud-vision/,
example: 'google-cloud-vision-v1',
},
],
});
1 change: 1 addition & 0 deletions src/rules/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ import './gcp.language.js';
import './gcp.maps.js';
import './gcp.speech.js';
import './gcp.translate.js';
import './gcp.vision.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 @@ -38,6 +38,7 @@ exports[`npm > should match everything 1`] = `
"gcp.speech",
"gcp.sql",
"gcp.translate",
"gcp.vision",
"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 @@ -8,6 +8,7 @@ Set {
"gcp.maps",
"gcp.speech",
"gcp.translate",
"gcp.vision",
"zookeeper",
"aws",
"aws.dynamodb",
Expand Down Expand Up @@ -255,6 +256,11 @@ exports[`ruby (component) > should match everything 2`] = `
"google-cloud-translate-v1",
"1.0.0",
],
[
"ruby",
"google-cloud-vision-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 @@ -76,6 +76,7 @@ export type AllowedKeys =
| 'gcp.speech'
| 'gcp.sql'
| 'gcp.translate'
| 'gcp.vision'
| 'gcp'
| 'github.actions'
| 'github.pages'
Expand Down

0 comments on commit 5f8fcd5

Please sign in to comment.