Skip to content

Commit

Permalink
fix(rules): add Railway
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Oct 31, 2023
1 parent edfba8d commit f60616a
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rules/__snapshots__/cloud.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ exports[`hosting > should match everything with files 1`] = `
"firebase",
"flyio",
"netlify",
"railway",
"vercel",
]
`;
5 changes: 5 additions & 0 deletions src/rules/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ exports[`all > should match everything 1`] = `
"qovery.cluster",
"qovery.database",
"rabbitmq",
"railway",
"railway.mongodb",
"railway.mysql",
"railway.postgres",
"railway.redis",
"react",
"reactemail",
"redis",
Expand Down
1 change: 1 addition & 0 deletions src/rules/cloud/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import './nextcloud.js';
import './oraclecloud.js';
import './ovh.js';
import './qovery.js';
import './railway.js';
import './scaleway.js';
import './supabase.js';
import './upstash.js';
Expand Down
17 changes: 17 additions & 0 deletions src/rules/cloud/railway.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { register } from '../../register.js';

register({
tech: 'railway',
name: 'Railway',
type: 'cloud',
files: ['railway.toml', 'railway.json'],
dependencies: [
{
type: 'terraform',
name: 'registry.terraform.io/terraform-community-providers/railway',
},
{ type: 'npm', name: 'railway' },
{ type: 'npm', name: '@railway/cli' },
{ type: 'githubAction', name: 'bervProject/railway-deploy' },
],
});
4 changes: 4 additions & 0 deletions src/rules/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ import './percona.js';
import './planetscale.js';
import './postgres.js';
import './qovery.database.js';
import './railway.mongodb.js';
import './railway.mysql.js';
import './railway.postgres.js';
import './railway.redis.js';
import './redis.js';
import './replit.database.js';
import './replit.postgres.js';
Expand Down
7 changes: 7 additions & 0 deletions src/rules/db/railway.mongodb.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { register } from '../../register.js';

register({
tech: 'railway.mongodb',
name: 'Railway MongoDB',
type: 'db',
});
7 changes: 7 additions & 0 deletions src/rules/db/railway.mysql.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { register } from '../../register.js';

register({
tech: 'railway.mysql',
name: 'Railway MySQL',
type: 'db',
});
7 changes: 7 additions & 0 deletions src/rules/db/railway.postgres.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { register } from '../../register.js';

register({
tech: 'railway.postgres',
name: 'Railway Postgres',
type: 'db',
});
7 changes: 7 additions & 0 deletions src/rules/db/railway.redis.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { register } from '../../register.js';

register({
tech: 'railway.redis',
name: 'Railway Redis',
type: 'db',
});
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ exports[`docker > should match all dependencies 1`] = `
"planetscale",
"postgresql",
"qovery",
"railway",
"rollbar",
"scaleway",
"sentry",
Expand Down Expand Up @@ -316,6 +317,11 @@ exports[`docker > should match all dependencies 2`] = `
"azure/sql-action",
"1",
],
[
"githubAction",
"bervProject/railway-deploy",
"1",
],
[
"githubAction",
"bitovi/github-actions-deploy-docker-to-ec2",
Expand Down
11 changes: 11 additions & 0 deletions src/rules/spec/nodejs/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ exports[`npm > should match everything 1`] = `
"puppeteer",
"qovery",
"rabbitmq",
"railway",
"react",
"reactemail",
"redis",
Expand Down Expand Up @@ -1183,6 +1184,11 @@ exports[`npm > should match everything 2`] = `
"@placekit/client-js",
"0.0.0",
],
[
"npm",
"@railway/cli",
"0.0.0",
],
[
"npm",
"@redwoodjs/api",
Expand Down Expand Up @@ -2123,6 +2129,11 @@ exports[`npm > should match everything 2`] = `
"qovery_api",
"0.0.0",
],
[
"npm",
"railway",
"0.0.0",
],
[
"npm",
"react",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ exports[`terraform (lockfile) > should match everything 1`] = `
"pagerduty",
"prismacloud",
"qovery",
"railway",
"rollbar",
"scaleway",
"slack",
Expand Down
5 changes: 5 additions & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,11 @@ export type AllowedKeys =
| 'qovery.database'
| 'qovery'
| 'rabbitmq'
| 'railway.mongodb'
| 'railway.mysql'
| 'railway.postgres'
| 'railway.redis'
| 'railway'
| 'react'
| 'reactemail'
| 'redis'
Expand Down

0 comments on commit f60616a

Please sign in to comment.