@financial-times/biz-ops-schema
Advanced tools
Comparing version 2.0.0-beta.6 to 2.0.0-beta.7
const primitiveTypes = require('./primitive-types-map'); | ||
const sendSchemaToS3 = require('./send-schema-to-s3'); | ||
const getSchemaFilename = require('./get-schema-filename'); | ||
const RawData = require('./raw-data'); | ||
@@ -30,2 +30,3 @@ const getDataAccessors = require('../data-accessors'); | ||
sendSchemaToS3.bind(env, rawData.getAll()), | ||
getSchemaFilename, | ||
}, | ||
@@ -32,0 +33,0 @@ validate, |
const semver = require('semver'); | ||
const { version: libVersion } = require('../package.json'); | ||
const getSchemaFilename = version => { | ||
const getSchemaFilename = (version = libVersion) => { | ||
const majorVersion = semver.major(version); | ||
@@ -5,0 +6,0 @@ const isPrerelease = !!semver.prerelease(version); |
@@ -15,3 +15,10 @@ const EventEmitter = require('events'); | ||
this.configure(options); | ||
if (this.updateMode === 'dev') { | ||
// TODO improve this | ||
// currently when creating new instance defaults to dev, so always tries to fetch rawData from | ||
// yaml before the app gets a change to call configure to take out of dev mode | ||
// need to think of a way to delay this. | ||
// Mayeb configure should be called init() instead | ||
// Maybe a static method getDevInstance() woudl be useful for tests | ||
// but then tests don't use the same code as src... hmmm | ||
try { | ||
this.rawData = deepFreeze({ | ||
@@ -24,3 +31,3 @@ schema: { | ||
}); | ||
} else { | ||
} catch (e) { | ||
this.rawData = {}; | ||
@@ -27,0 +34,0 @@ } |
{ | ||
"name": "@financial-times/biz-ops-schema", | ||
"version": "2.0.0-beta.6", | ||
"version": "2.0.0-beta.7", | ||
"description": "Schema for biz-ops data store and api. It provides two things: - yaml files which define which types, properties and relationships are allowed - a nodejs library for extracting subsets of this information", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
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
31575
799