requestnetwork-data-format
Advanced tools
Comparing version 0.1.2 to 0.1.4
@@ -25,3 +25,3 @@ # Invoice format | ||
| format | constant | Mandatory | value: "rnf_invoice" | | ||
| version | constant | Mandatory | value: "0.0.1"| | ||
| version | constant | Mandatory | value: "0.0.2"| | ||
@@ -72,6 +72,6 @@ | ||
| quantity | number | Mandatory | quantity (minimum 0) | | ||
| unitPrice | number | Mandatory | unit price (minimum 0) | | ||
| discount | number | Optional | price of the discount | | ||
| unitPrice | string | Mandatory | unit price (integer in currency base unit) | | ||
| discount | string | Optional | price of the discount (integer in currency base unit) | | ||
| taxPercent | number | Mandatory | taxation percentage of the item | | ||
| currency | string | Mandatory | ISO 4217 currency code | | ||
| currency | string | Mandatory | currency code | | ||
| deliveryDate | date-time | Optional | expected delivery date | | ||
@@ -89,4 +89,4 @@ | deliveryPeriod | string | Optional | period of delivery if the item is a service | | ||
| lateFeesPercent | number | Optional | percentage of fees applied if late payment | | ||
| lateFeesFix | number | Optional | fixed fees applied if late payment | | ||
| lateFeesFix | string | Optional | fixed fees applied if late payment (integer in currency base unit) | | ||
| miscellaneous | object | Optional | Miscellaneous information | | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// JSON Schema of an address | ||
// JSON Schema of an address | ||
var schemaAddress = require('./format/address.json'); | ||
@@ -23,8 +23,6 @@ // another json validator from https://github.com/epoberezkin/ajv | ||
return { valid: false, errors: [{ message: 'meta.version not found' }] }; | ||
// Generate the path of the schema json | ||
var schemaPath = "./format/" + data.meta.format + "/" + data.meta.format + "-" + data.meta.version + ".json"; | ||
// Try to retreive the schema json | ||
var schema; | ||
try { | ||
schema = require(schemaPath); | ||
schema = require("./format/" + data.meta.format + "/" + data.meta.format + "-" + data.meta.version + ".json"); | ||
} | ||
@@ -31,0 +29,0 @@ catch (e) { |
{ | ||
"name": "requestnetwork-data-format", | ||
"version": "0.1.2", | ||
"version": "0.1.4", | ||
"description": "Data format for the Request Network protocol", | ||
@@ -16,3 +16,4 @@ "homepage": "https://github.com/RequestNetwork/requestNetwork/tree/master/packages/requestNetworkDataFormat", | ||
"build": "npm run clean && tsc && shx cp -r ./src/format ./dist/src/ && shx cp -r ./test/data ./dist/test/", | ||
"test": "npm run build && mocha --timeout 60000 dist/test/*.js" | ||
"test": "npm run build && mocha --timeout 60000 dist/test/*.js", | ||
"prepare": "npm run build" | ||
}, | ||
@@ -40,3 +41,4 @@ "devDependencies": { | ||
"dist/src" | ||
] | ||
], | ||
"gitHead": "7da634598a715ebfcd0ab9c8924cd4708975d78f" | ||
} |
@@ -11,2 +11,6 @@ # Request Network Data Format | ||
## Request Hub Slack | ||
If you need help, [join the Request Hub Slack](https://request-slack.herokuapp.com/). | ||
## Available JSON Schema | ||
@@ -13,0 +17,0 @@ | Name | Last version | Last version | Description | |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
21666
9
425
39
1