Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@architect/parser

Package Overview
Dependencies
Maintainers
4
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@architect/parser - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0-RC.0

changelog.md

11

package.json
{
"name": "@architect/parser",
"version": "2.0.1",
"version": "2.1.0-RC.0",
"description": "Architect Parser accepts plaintext, JSON, or YAML .arc manifests and returns a plain JavaScript Object",

@@ -12,3 +12,4 @@ "main": "./src/index.js",

"t": "npm run lint && npm run test:unit",
"rc": "npm version prerelease --preid RC"
"rc": "npm version prerelease --preid RC",
"build": "rollup -c"
},

@@ -22,6 +23,10 @@ "repository": {

"devDependencies": {
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-json": "^4.0.2",
"assert-diff": "^2.0.3",
"codecov": "^3.6.1",
"eslint": "^6.6.0",
"nyc": "^14.1.1",
"nyc": "^15.0.0",
"rollup": "^1.31.1",
"rollup-plugin-terser": "^5.2.0",
"tap-spec": "^5.0.0",

@@ -28,0 +33,0 @@ "tape": "^4.11.0"

@@ -45,4 +45,3 @@ {

"required": [
"app",
"aws"
"app"
],

@@ -49,0 +48,0 @@ "additionalProperties": {

@@ -15,2 +15,10 @@ let lexer = require('./lexer')

let defaultArc = `@app
app-default
@static
@http
`
/**

@@ -36,4 +44,6 @@ * Look up .arc falling back to: app.arc, arc.json, arc.yaml, arc.yml, arc.toml

let arc
let filepath
if (exists(arcDefaultPath)) {
filepath = arcDefaultPath
raw = read(arcDefaultPath)

@@ -43,2 +53,3 @@ arc = parser(lexer(raw))

else if (exists(appDotArcPath)) {
filepath = appDotArcPath
raw = read(appDotArcPath)

@@ -48,2 +59,3 @@ arc = parser(lexer(raw))

else if (exists(arcJsonPath)) {
filepath = arcJsonPath
raw = read(arcJsonPath)

@@ -53,2 +65,3 @@ arc = json(raw)

else if (exists(arcYamlPath)) {
filepath = arcYamlPath
raw = read(arcYamlPath)

@@ -58,2 +71,3 @@ arc = yaml(raw)

else if (exists(arcYmlPath)) {
filepath = arcYmlPath
raw = read(arcYmlPath)

@@ -63,2 +77,3 @@ arc = yaml(raw)

else if (exists(arcTomlPath)) {
filepath = arcTomlPath
raw = read(arcTomlPath)

@@ -68,7 +83,9 @@ arc = toml(raw)

else {
throw Error('not_found')
filepath = false
raw = defaultArc
arc = parser(lexer(raw))
}
let errors = validate(arc)
return {arc, raw, errors}
return {arc, raw, filepath, errors}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc