Socket
Socket
Sign inDemoInstall

@wmfs/cardscript-extract-defaults

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wmfs/cardscript-extract-defaults - npm Package Compare versions

Comparing version 1.7.1 to 1.8.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [1.8.0](https://github.com/wmfs/cardscript-extract-defaults/compare/v1.7.1...v1.8.0) (2019-08-06)
### ✨ Features
* allow enter map coords ([2798e3b](https://github.com/wmfs/cardscript-extract-defaults/commit/2798e3b))
## [1.7.1](https://github.com/wmfs/cardscript-extract-defaults/compare/v1.7.0...v1.7.1) (2019-07-23)

@@ -2,0 +9,0 @@

@@ -178,2 +178,35 @@ module.exports = function extractDefaults (cardscript) {

break
case 'Map':
case 'Input.Map':
const markers = element.markers ? [...element.markers] : []
if (element.centre && element.centre.show) markers.push(element.centre)
for (const [idx] of markers.entries()) {
const id_ = `MAP_PROMPT_${idx}`
const defaultValue_ = {
show: false,
lat: null,
lng: null
}
if (cardListPath.length === 0) {
if (apiLookupPath.length === 0) {
defaultValues.rootView[id_] = defaultValue_
} else {
const apiLookupId = apiLookupPath[apiLookupPath.length - 1]
defaultValues.rootView[apiLookupId].params[id_] = defaultValue_
}
} else {
if (apiLookupPath.length === 0) {
const cardListId = cardListPath[cardListPath.length - 1]
defaultValues.cardLists[cardListId][id_] = defaultValue_
} else {
// TODO: not sure about this...
const apiLookupId = apiLookupPath[apiLookupPath.length - 1]
const cardListId = cardListPath[cardListPath.length - 1]
defaultValues.cardLists[apiLookupId].params[cardListId][id_] = defaultValue_
}
}
}
break
}

@@ -180,0 +213,0 @@ }

2

package.json
{
"name": "@wmfs/cardscript-extract-defaults",
"description": "Extracts sensible defaults from some Cardscript.",
"version": "1.7.1",
"version": "1.8.0",
"author": "West Midlands Fire Service",

@@ -6,0 +6,0 @@ "keywords": [

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