@architect/parser
Advanced tools
Comparing version 2.0.1 to 2.1.0-RC.0
{ | ||
"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} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
476953
38
11744
10
3