Skip to content

Commit

Permalink
fix(rules): add Azure Static Web Apps
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Nov 8, 2023
1 parent 27a24c1 commit 7e9a577
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rules/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ exports[`all > should match everything 1`] = `
"azure.postgres",
"azure.redis",
"azure.sql",
"azure.staticwebapps",
"bash",
"betterstack",
"bigcommerce",
Expand Down
29 changes: 29 additions & 0 deletions src/rules/hosting/azure.staticwebapps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { register } from '../../register.js';

register({
tech: 'azure.staticwebapps',
name: 'Azure Static Web Apps',
type: 'hosting',
dependencies: [
{
type: 'terraform.resource',
name: /^azurerm_app_service/,
example: 'azurerm_app_service',
},
{
type: 'terraform.resource',
name: /^azurerm_linux_web_app/,
example: 'azurerm_linux_web_app',
},
{
type: 'terraform.resource',
name: /^azurerm_windows_web_app/,
example: 'azurerm_windows_web_app',
},
{ type: 'npm', name: '@azure/static-web-apps-cli' },
{ type: 'ruby', name: 'azure_mgmt_web' },
{ type: 'githubAction', name: 'Azure/webapps-deploy' },
{ type: 'githubAction', name: 'Azure/static-web-apps-deploy' },
{ type: 'githubAction', name: 'Azure/appservice-build' },
],
});
1 change: 1 addition & 0 deletions src/rules/hosting/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import './gcp.gce.js';
import './gcp.gke.js';
import './gcp.tasks.js';
import './github.pages.js';
import './azure.staticwebapps.js';
import './koyeb.js';
import './kubernetes.js';
import './mongodbatlas.js';
Expand Down
16 changes: 16 additions & 0 deletions src/rules/spec/githubActions/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ exports[`docker > should match all dependencies 1`] = `
"azure.mysql",
"azure.postgres",
"azure.sql",
"azure.staticwebapps",
"cloudflare",
"cloudflare.pages",
"cloudflare.workers",
Expand Down Expand Up @@ -91,6 +92,11 @@ exports[`docker > should match all dependencies 2`] = `
"8398a7/action-slack",
"1",
],
[
"githubAction",
"Azure/appservice-build",
"1",
],
[
"githubAction",
"Azure/functions-action",
Expand All @@ -101,6 +107,16 @@ exports[`docker > should match all dependencies 2`] = `
"Azure/functions-container-action",
"1",
],
[
"githubAction",
"Azure/static-web-apps-deploy",
"1",
],
[
"githubAction",
"Azure/webapps-deploy",
"1",
],
[
"githubAction",
"Bhacaz/docs-as-code-confluence",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/nodejs/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ exports[`npm > should match everything 1`] = `
"azure.postgres",
"azure.redis",
"azure.sql",
"azure.staticwebapps",
"betterstack",
"bigcommerce",
"blitzjs",
Expand Down Expand Up @@ -767,6 +768,11 @@ exports[`npm > should match everything 2`] = `
"@azure/functions",
"0.0.0",
],
[
"npm",
"@azure/static-web-apps-cli",
"0.0.0",
],
[
"npm",
"@bigcommerce/checkout-sdk",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ exports[`ruby (component) > should match everything 1`] = `
"azure.postgres",
"azure.redis",
"azure.sql",
"azure.staticwebapps",
"betterstack",
"brevo",
"cloudflare",
Expand Down Expand Up @@ -443,6 +444,11 @@ exports[`ruby (component) > should match everything 2`] = `
"azure_mgmt_sql",
"1.0.0",
],
[
"ruby",
"azure_mgmt_web",
"1.0.0",
],
[
"ruby",
"browserstack-local",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"azure.postgres",
"azure.redis",
"azure.sql",
"azure.staticwebapps",
"cloudflare",
"cloudflare.pages",
"cloudflare.workers",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export type AllowedKeys =
| 'azure.postgres'
| 'azure.redis'
| 'azure.sql'
| 'azure.staticwebapps'
| 'azure'
| 'bash'
| 'betterstack'
Expand Down

0 comments on commit 7e9a577

Please sign in to comment.