Skip to content

Commit

Permalink
fix(rules): add Azure storage
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Nov 8, 2023
1 parent 7e9a577 commit d1832dc
Show file tree
Hide file tree
Showing 9 changed files with 178 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 @@ -91,6 +91,7 @@ exports[`all > should match everything 1`] = `
"azure.redis",
"azure.sql",
"azure.staticwebapps",
"azure.storage",
"bash",
"betterstack",
"bigcommerce",
Expand Down
21 changes: 21 additions & 0 deletions src/rules/spec/nodejs/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ exports[`npm > should match everything 1`] = `
"azure.redis",
"azure.sql",
"azure.staticwebapps",
"azure.storage",
"betterstack",
"bigcommerce",
"blitzjs",
Expand Down Expand Up @@ -773,6 +774,26 @@ exports[`npm > should match everything 2`] = `
"@azure/static-web-apps-cli",
"0.0.0",
],
[
"npm",
"@azure/storage-blob",
"0.0.0",
],
[
"npm",
"@azure/storage-file-datalake",
"0.0.0",
],
[
"npm",
"@azure/storage-file-share",
"0.0.0",
],
[
"npm",
"@azure/storage-queue",
"0.0.0",
],
[
"npm",
"@bigcommerce/checkout-sdk",
Expand Down
37 changes: 37 additions & 0 deletions src/rules/spec/php/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ exports[`php > should match everything 1`] = `
"aws.s3",
"aws.sns",
"aws.sqs",
"azure",
"azure.storage",
"betterstack",
"bigcommerce",
"blackfire",
Expand Down Expand Up @@ -700,6 +702,11 @@ exports[`php > should match everything 2`] = `
"league/flysystem-aws-s3-v3",
"0.0.0",
],
[
"php",
"league/flysystem-azure-blob-storage",
"0.0.0",
],
[
"php",
"league/flysystem-google-cloud-storage",
Expand Down Expand Up @@ -775,6 +782,11 @@ exports[`php > should match everything 2`] = `
"martin-georgiev/postgresql-for-doctrine",
"0.0.0",
],
[
"php",
"matthewbdaly/laravel-azure-storage",
"0.0.0",
],
[
"php",
"meilisearch/meilisearch-php ",
Expand All @@ -785,6 +797,31 @@ exports[`php > should match everything 2`] = `
"mglaman/phpstan-drupal",
"0.0.0",
],
[
"php",
"microsoft/azure-storage-blob",
"0.0.0",
],
[
"php",
"microsoft/azure-storage-common",
"0.0.0",
],
[
"php",
"microsoft/azure-storage-file",
"0.0.0",
],
[
"php",
"microsoft/azure-storage-queue",
"0.0.0",
],
[
"php",
"microsoft/azure-storage-table",
"0.0.0",
],
[
"php",
"mixpanel/mixpanel-php",
Expand Down
51 changes: 51 additions & 0 deletions src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ exports[`ruby (component) > should match everything 1`] = `
"azure.redis",
"azure.sql",
"azure.staticwebapps",
"azure.storage",
"betterstack",
"brevo",
"cloudflare",
Expand Down Expand Up @@ -414,6 +415,36 @@ exports[`ruby (component) > should match everything 2`] = `
"azure-armrest",
"1.0.0",
],
[
"ruby",
"azure-storage",
"1.0.0",
],
[
"ruby",
"azure-storage-blob",
"1.0.0",
],
[
"ruby",
"azure-storage-common",
"1.0.0",
],
[
"ruby",
"azure-storage-file",
"1.0.0",
],
[
"ruby",
"azure-storage-queue",
"1.0.0",
],
[
"ruby",
"azure-storage-table",
"1.0.0",
],
[
"ruby",
"azure_mgmt_cosmosdb",
Expand Down Expand Up @@ -444,6 +475,11 @@ exports[`ruby (component) > should match everything 2`] = `
"azure_mgmt_sql",
"1.0.0",
],
[
"ruby",
"azure_mgmt_storage",
"1.0.0",
],
[
"ruby",
"azure_mgmt_web",
Expand Down Expand Up @@ -549,6 +585,16 @@ exports[`ruby (component) > should match everything 2`] = `
"fluent-plugin-azurefunctions",
"1.0.0",
],
[
"ruby",
"fluent-plugin-azurestorage",
"1.0.0",
],
[
"ruby",
"fluent-plugin-azurestorage-gen2",
"1.0.0",
],
[
"ruby",
"fluent-plugin-kafka",
Expand Down Expand Up @@ -779,6 +825,11 @@ exports[`ruby (component) > should match everything 2`] = `
"logstash-filter-translate",
"1.0.0",
],
[
"ruby",
"logstash-input-azureblob",
"1.0.0",
],
[
"ruby",
"logstash-input-kafka",
Expand Down
21 changes: 21 additions & 0 deletions src/rules/spec/rust/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ exports[`rust (component) > should match everything 1`] = `
"azure.postgres",
"azure.redis",
"azure.sql",
"azure.storage",
"cloudflare",
"couchbase",
"datadog",
Expand Down Expand Up @@ -357,6 +358,26 @@ exports[`rust (component) > should match everything 2`] = `
"azure_mgmt_sql",
"1.0.0",
],
[
"rust",
"azure_storage",
"1.0.0",
],
[
"rust",
"azure_storage_blobs",
"1.0.0",
],
[
"rust",
"azure_storage_datalake",
"1.0.0",
],
[
"rust",
"azure_storage_queues",
"1.0.0",
],
[
"rust",
"cassandra-cpp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"azure.redis",
"azure.sql",
"azure.staticwebapps",
"azure.storage",
"cloudflare",
"cloudflare.pages",
"cloudflare.workers",
Expand Down
44 changes: 44 additions & 0 deletions src/rules/storage/azure.storage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { register } from '../../register.js';

register({
tech: 'azure.storage',
name: 'Azure Storage',
type: 'storage',
dependencies: [
{
type: 'terraform.resource',
name: /^azurerm_hpc_/,
example: 'azurerm_hpc_cache',
},
{
type: 'terraform.resource',
name: /^azurerm_storage_/,
example: 'azurerm_storage_account',
},
{ type: 'npm', name: '@azure/storage-blob' },
{ type: 'npm', name: '@azure/storage-queue' },
{ type: 'npm', name: '@azure/storage-file-share' },
{ type: 'npm', name: '@azure/storage-file-datalake' },
{ type: 'ruby', name: 'azure-storage' },
{ type: 'ruby', name: 'azure-storage-common' },
{ type: 'ruby', name: 'azure-storage-blob' },
{ type: 'ruby', name: 'azure-storage-table' },
{ type: 'ruby', name: 'azure-storage-file' },
{ type: 'ruby', name: 'azure-storage-queue' },
{ type: 'ruby', name: 'azure_mgmt_storage' },
{ type: 'ruby', name: 'fluent-plugin-azurestorage' },
{ type: 'ruby', name: 'fluent-plugin-azurestorage-gen2' },
{ type: 'ruby', name: 'logstash-input-azureblob' },
{ type: 'php', name: 'microsoft/azure-storage-common' },
{ type: 'php', name: 'microsoft/azure-storage-blob' },
{ type: 'php', name: 'microsoft/azure-storage-table' },
{ type: 'php', name: 'microsoft/azure-storage-file' },
{ type: 'php', name: 'microsoft/azure-storage-queue' },
{ type: 'php', name: 'matthewbdaly/laravel-azure-storage' },
{ type: 'php', name: 'league/flysystem-azure-blob-storage' },
{ type: 'rust', name: 'azure_storage' },
{ type: 'rust', name: 'azure_storage_queues' },
{ type: 'rust', name: 'azure_storage_blobs' },
{ type: 'rust', name: 'azure_storage_datalake' },
],
});
1 change: 1 addition & 0 deletions src/rules/storage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import './aws.ecr.js';
import './aws.efs.js';
import './aws.glacier.js';
import './aws.s3.js';
import './azure.storage.js';
import './gcp.artifactregistry.js';
import './gcp.containerregistry.js';
import './gcp.gcs.js';
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export type AllowedKeys =
| 'azure.redis'
| 'azure.sql'
| 'azure.staticwebapps'
| 'azure.storage'
| 'azure'
| 'bash'
| 'betterstack'
Expand Down

0 comments on commit d1832dc

Please sign in to comment.