{"id":19437804,"url":"https://github.com/architect/parser","last_synced_at":"2025-04-24T21:32:13.535Z","repository":{"id":23161629,"uuid":"97773595","full_name":"architect/parser","owner":"architect","description":"arc.app, .arc, arc.json, and arc.yaml support","archived":false,"fork":false,"pushed_at":"2025-04-14T02:50:33.000Z","size":588,"stargazers_count":24,"open_issues_count":2,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-14T03:36:52.955Z","etag":null,"topics":["api-gateway","arc","arc-parser","aws","dynamodb","lambda","sns"],"latest_commit_sha":null,"homepage":"https://arc.codes","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/architect.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":".github/code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-07-20T00:39:33.000Z","updated_at":"2025-03-26T03:33:42.000Z","dependencies_parsed_at":"2024-01-08T20:25:51.197Z","dependency_job_id":"cc0fc5cc-b1d5-4fb3-ac92-e541399b0256","html_url":"https://github.com/architect/parser","commit_stats":{"total_commits":316,"total_committers":14,"mean_commits":"22.571428571428573","dds":0.6012658227848101,"last_synced_commit":"903661a69e2c50b20b90d908065cafe1c72a98e3"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/architect","download_url":"https://codeload.github.com/architect/parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250713084,"owners_count":21475131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-gateway","arc","arc-parser","aws","dynamodb","lambda","sns"],"created_at":"2024-11-10T15:15:55.892Z","updated_at":"2025-04-24T21:32:13.529Z","avatar_url":"https://github.com/architect.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [`@architect/parser`](https://www.npmjs.com/package/@architect/parser) [![GitHub CI status](https://github.com/architect/parser/workflows/Node%20CI/badge.svg)](https://github.com/architect/parser/actions?query=workflow%3A%22Node+CI%22)\n\u003c!-- [![codecov](https://codecov.io/gh/architect/parser/branch/master/graph/badge.svg)](https://codecov.io/gh/architect/parser) --\u003e\n\nOpenJS Architect is an Infrastructure as Code (IaC) solution. The critical insight of *Infastructure as Code* is determinism. Infrastructure resources are defined in a declarative manifest file with the code that depends on them. This ensures deployment artifacts alway have the exact runtime resources expected for every version of the code.\n\nArchitect looks in the following places for the primary definition/configuration manifest file:\n\n- `.arc`\n- `app.arc` - [example](/examples/arc.arc)\n- `arc.json` - [example](/examples/arc.json) - [schema](https://github.com/architect/syntaxes)\n- `arc.yaml` - [example](/examples/arc.yml)\n\n\u003e The `.arc` format is unique to Architect with many readability advantages; but is *not required*\n\n---\n\n# `.arc`\n\n\u003e `.arc` is a text format for storing structured configuration data; it is not for serializing or transporting data\n\nThe `.arc` format:\n\n- Comments follow `#` symbols\n- Top level keys start with `@` (example: `@pragma`)\n- Pragmas contain: scalar values or complex values\n- Scalar values are: `string`, `number` and `boolean`\n- Complex values are: `array`, `vector` and `map`\n- Whitespace is significant\n\n## Example\n\nConsider a file `some-arc-file.txt` with the following contents:\n\n```\n# this is a comment\n@section-one\nsimple-string-value # String\nanother-value\n4.2 # Number\ntrue # Boolean\n\n@section-of-arrays\nvector of values\nvector tuple\n\n@vectors-section\nnamed\n  vector\n  of\n  values\n\n@this-section-has-a-map\nhello-world\n  name some-value\n```\n\nParsing the file with the following code:\n\n```javascript\n#!/usr/bin/env node\nconst parse = require('@architect/parser')\nconst fs = require('fs')\nconst text = fs.readFileSync('./some-arc-file.txt').toString()\nconst result = parse(text)\n\nconsole.log(result)\n```\n\nPrints the following plain object to the console:\n\n```javascript\n{\n  \"section-one\": [\n    \"simple-string-value\",\n    \"another-value\",\n    4.2,\n    true\n  ],\n  \"section-of-arrays\": [\n    [\"vector\", \"of\", \"values\"],\n    [\"vector\", \"tuple\"]\n  ],\n  \"vectors-section\": [\n    {named: [\"vector\", \"of\", \"values\"]},\n  ],\n  \"this-section-has-a-map\": [{\n    \"hello-world\": {\n      \"name\": \"some-value\"\n    }\n  }]\n}\n```\n\nThings to notice:\n\n- `array` values are space seperated scalar values on a single line\n- `vector` is a named `array` with scalar values indented two spaces on newlines\n- `map` is a named value followed by keys and values indented two spaces\n\n[npm]: https://www.npmjs.com/package/@architect/parser\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchitect%2Fparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchitect%2Fparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchitect%2Fparser/lists"}