0.0.17 • Published 12 months ago

@noodle-graph/scanner v0.0.17

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Scanner

Scanning

  1. Login to GitHub user.
  2. Clone repositories.
  3. Scan the files in each repository and search Noodle comments.
  4. Enrich and return the result object.

Noodle comment

A code comment that represents a relationship with another resource. It has (roughly) the following structure: noodle --{action}-> {resourceId} ({tags})

For example:

  • // noodle --requests from-> another-api-service (http,get,feature1,feature1)
  • // noodle <-receive from-- sqs-my-queue (sqs,feature2,data)
  • /* noodle --uploads to-> s3-my-bucket (s3,feature1) */
  • # noodle --publish to-> sns-topic1 (sns,feature2)
  • // noodle --> sns-topic2 (sns,feature2)
  • // noodle <-> sns-topic3

Every time the scanner finds a Noodle comment it will add the relationship to the results.

Undeclared resources

Resources that were discovered during the scan and were not listed in the scan config file.

Scan output

Here is a sample of scan output:

{
  "resources": [
    {
      "id":"some-service",
      "url":"./someService",
      "name":"Some Service",
      "tags": [
        "feature1",
        "feature2",
        "service"
      ],
      "type":"aws/ecs",
      "source":"local",
      "relationships": [
        {
          "action":"requests from",
          "resourceId":"another-service",
          "tags":[
            "feature",
            "hello"
          ],
          "url":"./someService",
          "from":false,
          "to":true
        }
      ],
      "additionalLinks": []
    },
    {
      "id":"another-service",
      "url":"./anotherService",
      "name":"Another Service",
      "tags": [
        "feature1",
        "service"
      ],
      "type":"aws/ecs",
      "source":"local",
      "relationships": [
        {
          "action":"query",
          "resourceId":"some-db",
          "tags":[
            "feature"
          ],
          "url":"./anotherService",
          "from":false,
          "to":true
        }
      ],
      "additionalLinks": []
    },
    {
      "id":"some-db",
      "name":"Some DB",
      "tags": [
        "feature1",
        "feature2",
        "service"
      ],
      "type":"aws/aurora",
      "additionalLinks": []
    }
  ]
}

Note that this is very similar to the scan config file, except the relationships field

Relationship object

FieldDescription
resourceIdThe identifier of the related resource.
actionThe action declared in the relationship.
tagsThe tags of the relationship for filtering.
urlThe link to the exact line of the Noodle comment.
fromWhether arrow should be in the "from" resource.
toWhether arrow should be in the "to" resource.
0.0.17

12 months ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.11-rc.1

1 year ago

0.0.14

1 year ago

0.0.15-rc.1

1 year ago

0.0.15

1 year ago

0.0.9

1 year ago

0.0.16

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago