Socket
Socket
Sign inDemoInstall

@architect/parser

Package Overview
Dependencies
Maintainers
7
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 1.1.3 to 1.1.4

66

_json.js

@@ -37,2 +37,34 @@ /**

if (section === 'http') {
result.http = json[section].map(route=> {
let method = Object.keys(route)[0]
let path = route[method]
return [method, path]
})
}
if (section === 'events')
result.events = json[section]
if (section === 'queues')
result.queues = json[section]
if (section === 'tables')
result.tables = json[section]
if (section === 'indexes')
result.indexes= json[section]
if (section === 'scheduled') {
result.scheduled = []
Object.keys(json[section]).forEach(name=> {
let val = json[section][name]
result.scheduled.push([name, val])
})
}
if (section === 'slack')
result.slack = json[section]
// TODO START OF DEPRECATED METHODS
if (section === 'html') {

@@ -70,26 +102,5 @@ result.html = json[section].map(route=> {

}
// TODO END DEPRECATED
if (section === 'events')
result.events = json[section]
if (section === 'queues')
result.queues = json[section]
if (section === 'tables')
result.tables = json[section]
if (section === 'indexes')
result.indexes= json[section]
if (section === 'scheduled') {
result.scheduled = []
Object.keys(json[section]).forEach(name=> {
let val = json[section][name]
result.scheduled.push([name, val])
})
}
if (section === 'slack')
result.slack = json[section]
})

@@ -116,2 +127,12 @@ return result

}
if (raw.http) {
result += `@http\n`
raw.http.forEach(route=> {
let verb = Object.keys(route)[0]
let path = route[verb]
result += `${verb} ${path}\n`
})
result += '\n'
}
// TODO START DEPREC
if (raw.html) {

@@ -165,2 +186,3 @@ result += `@html\n`

}
// TODO END DEPREC
if (raw.events) {

@@ -167,0 +189,0 @@ result += `@events\n`

{
"name": "@architect/parser",
"version": "1.1.3",
"version": "1.1.4",
"description": "function that accepts .arc text and returns a plain JavaScript Object",

@@ -8,3 +8,3 @@ "main": "index.js",

"test": "tape test/**/*-test.js | tap-spec",
"t": "node test/04-scheduled.js | tap-spec"
"t": "node test/05-arc-json-test.js | tap-spec"
},

@@ -11,0 +11,0 @@ "author": "Brian LeRoux",

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