Skip to content

Commit

Permalink
fix(rules): add GCP BigTable
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Aug 7, 2023
1 parent a737e2d commit 521dc76
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/common/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const list: TechItem[] = [
{ key: 'flyio', name: 'Fly.io', type: 'hosting' },
{ key: 'gcp', name: 'GCP', type: 'hosting' },
{ key: 'gcp.bigquery', name: 'Big Query', type: 'db' },
{ key: 'gcp.bigtable', name: 'Big Table', type: 'db' },
{ key: 'gcp.cloudrun', name: 'Cloud Run', type: 'hosting' },
{ key: 'gcp.pubsub', name: 'PubSub', type: 'messaging' },
{ key: 'gcp.gce', name: 'Compute Engine', type: 'hosting' },
Expand Down
17 changes: 17 additions & 0 deletions src/rules/db/gcp.bigtable.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { register } from '../../rules.js';

register({
tech: 'gcp.bigtable',
dependencies: [
{ type: 'npm', name: '@google-cloud/bigtable' },
{
type: 'terraform.resource',
name: 'google_bigtable_instance',
},
{
type: 'terraform.resource',
name: 'google_bigtable_table',
},
{ type: 'ruby', name: 'google-cloud-bigtable' },
],
});
1 change: 1 addition & 0 deletions src/rules/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import './cockroachdb.js';
import './couchbase.js';
import './elasticsearch.js';
import './gcp.bigquery.js';
import './gcp.bigtable.js';
import './gcp.sql.js';
import './influxdb.js';
import './mariadb.js';
Expand Down
1 change: 1 addition & 0 deletions src/rules/hosting/gcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { register } from '../../rules.js';
register({
tech: 'gcp',
dependencies: [
{ type: 'npm', name: 'googleapis' },
{ type: 'npm', name: /^@google-cloud\//, example: '@google-cloud/storage' },
{ type: 'terraform', name: 'registry.terraform.io/hashicorp/google' },
{ type: 'ruby', name: /^google-cloud-/, example: 'google-cloud-storage' },
Expand Down
5 changes: 4 additions & 1 deletion src/rules/js/angular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ import { register } from '../../rules.js';
register({
tech: 'angular',
files: ['angular.json'],
dependencies: [{ type: 'npm', name: 'angular' }],
dependencies: [
{ type: 'npm', name: 'angular' },
{ type: 'npm', name: /^@angular\//, example: '@angular/forms' },
],
});
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 @@ -22,6 +22,7 @@ exports[`npm > should match everything 1`] = `
"firebase",
"gcp",
"gcp.bigquery",
"gcp.bigtable",
"gcp.cloudrun",
"gcp.gce",
"gcp.gcs",
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 @@ -9,6 +9,7 @@ Set {
"elasticsearch",
"gcp",
"gcp.bigquery",
"gcp.bigtable",
"gcp.sql",
"influxdb",
"mariadb",
Expand Down Expand Up @@ -163,6 +164,11 @@ exports[`ruby (component) > should match everything 2`] = `
"google-cloud-bigquery",
"1.0.0",
],
[
"ruby",
"google-cloud-bigtable",
"1.0.0",
],
[
"ruby",
"google-cloud-compute",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"datadog",
"gcp",
"gcp.bigquery",
"gcp.bigtable",
"gcp.cloudrun",
"gcp.gce",
"gcp.gcs",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export type AllowedKeys =
| 'firebase'
| 'flyio'
| 'gcp.bigquery'
| 'gcp.bigtable'
| 'gcp.cloudrun'
| 'gcp.gce'
| 'gcp.gcs'
Expand Down

0 comments on commit 521dc76

Please sign in to comment.