npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@arktect-co/archimate-model-importer

v1.0.1

Published

In memory Archimate model importer compatible with Archi (.archimate), AOEFF and GRAFICO (distributed Archi file)

Downloads

13

Readme

archimate-model-importer

In memory Archimate model importer compatible with Archi (.archimate), AOEFF and GRAFICO (distributed Archi file).

Installation

Using npm:

npm i --save @arktect-co/archimate-model-importer

Using Yarn:

yarn add @arktect-co/archimate-model-importer

Usage Example

const {InputProcessingDirector} = require("@arktect-co/archimate-model-importer");

let inputProcessorDirector = new InputProcessorDirector({
    label: "Your Model Name",
    description: "Model Description",
    options: {
        skipViews: true // False by default
    }
});

await inputProcessorDirector.translateModelFile('./your_model_file.archimate');

let response = inputProcessorDirector.getOutputModel();

Output

The output is in the form of an instance of the Model class. For example, the following illustrates a valid output:

{
    "description": "Your Model Name",
    "label": "Model Description",
    "statistics": {
        "totalNodes": 97,
        "totalRelationships": 46,
        "totalViews": 4,
    },
    "totalByType": {
        "nodeTypes": {
            "andjunction": 1,
            "applicationcollaboration": 2,
            "applicationcomponent": 6,
            ...
        },
        "relationshipTypes": {
            "access": 4,
            "aggregation": 1,
            "assignment": 6,
            ...
        }
    },
    "model": {
        "nodes": {
            "resource": [
                {
                    "identifier": "40eb5bd6-4d7c-4c27-98a8-602f935ed405",
                    "name": "Resource"
                }
            ],
            "capability": [
                {
                    "identifier": "6be02ba1-0489-4ea4-b62b-a22d302cbefe",
                    "name": "Capability"
                }
            ],
            ...
        },
        "relationships": {
            "aggregationrelationship": [
                {
                    "identifier": "bc8c928b-dafb-4e61-91b3-7c3e5b93a900",
                    "sourceId": "d0c22546-6ae6-4ba9-a141-222cc6eea16d",
                    "targetId": "cc07d17e-8450-4adf-84d1-ea7d92ec01ab"
                }
            ],
            "assignmentrelationship": [
                {
                    "identifier": "c8eacb29-df66-4c8a-98bf-159b8e894b94",
                    "sourceId": "3a17d18c-78b4-47e1-bf17-0ff3ac741b7a",
                    "targetId": "cc07d17e-8450-4adf-84d1-ea7d92ec01ab"
                }
                ...
            ],
            "associationrelationship": [
                {
                    "identifier": "013254aa",
                    "sourceId": "6eb2e507",
                    "targetId": "3a5ca9b5",
                    "isBidirectional": true
                },
            ],
            ...
        },
        "views": [
            {
                "bounds": {
                    "vertical": {
                        "min": 24,
                        "max": 497
                    },
                    "horizontal": {
                        "min": 38,
                        "max": 1218
                    }
                },
                "id": "57147c58-d2fc-463e-977b-b0812b23500a",
                "name": "Elements",
                "viewNodes": [
                    {
                        "modelNodeId": "8ab8d668-3852-4bf8-a43e-2fcc89c01c79",
                        "viewNodeId": "96f41f9a-44fd-420b-8e81-e669a490fd2d",
                        "name": "Location",
                        "type": "location",
                        "x": 38,
                        "y": 25,
                        "width": 120,
                        "height": 55,
                        "parent": null
                    },
                    {

                        "modelNodeId": "1aef2a19-28fe-4c6a-9273-ea0603ff9a8d",
                        "viewNodeId": "90587bb4-b903-4d1e-af17-ec1deb1a6a3e",
                        "name": "Goal",
                        "type": "goal",
                        "x": 324,
                        "y": 80,
                        "width": 120,
                        "height": 55,
                        "parent": "4ac2c3f6-739a-4598-9e8f-2600e0964ace"
                    }
                    ...
                ],
                "viewRelationships": [
                    {

                        "modelRelationshipId": "c8eacb29-df66-4c8a-98bf-159b8e894b94",
                        "sourceId": "0d48039d-ed53-4e60-8045-1af4f1e5db6f",
                        "targetId": "1620e51a-453c-411e-8c1c-8bf9d7545c93",
                        "viewRelationshipId": "b370c707-37eb-4f93-b6f4-c54867832ec7",
                        "type": "assignment",
                        "bendpoints": [{"x": 2, "y": 2}]
                    },
                    ...
                ]
            },
            ...
        ],
        "landscape": [
            {
                "children": [
                    {
                        "text": "New Folder",
                        "isDirectory": true,
                        "children": [
                            {
                                "id": "57147c58-d2fc-463e-977b-b0812b23500a",
                                "text": "Elements",
                                "isDirectory": false
                            },
                            {
                                "id": "9a578be1-0cde-4e09-91e6-f0742708a0da",
                                "text": "Relationships",
                                "isDirectory": false
                            },
                            ...
                        ]
                    }
                ],
                "text": "Views",
                "isDirectory": true
            }
        ]
    }
}

Compatibility

This importer is compatible with File-Based models and Folder Based models.

File Based

  • Archi File (.archimate)
  • Archimate Open Exchange File Format

Folder Based

  • GRAFICO (Compatible with CoArchi Plugin)