@persistr/js
Advanced tools
Comparing version 4.13.2 to 4.13.3
const { DateTime } = require('luxon') | ||
const uuidv4 = require('uuid/v4') | ||
module.exports = async function(http, { db, name, source }) { | ||
await http.put({ endpoint: `/db/${db}/fn/${name}`, body: source, headers: { 'content-type': 'text/javascript' }}) | ||
} |
const { DateTime } = require('luxon') | ||
const uuidv4 = require('uuid/v4') | ||
module.exports = async function(http, { db, name, options }) { | ||
await http.post({ endpoint: `/db/${db}/triggers/${name}`, body: options }) | ||
} |
const { DateTime } = require('luxon') | ||
const uuidv4 = require('uuid/v4') | ||
module.exports = async function(http, { db, id, data }) { | ||
await http.put({ endpoint: `/db/${db}/objects/${id}`, body: data }) | ||
} |
const { DateTime } = require('luxon') | ||
const uuidv4 = require('uuid/v4') | ||
const uuid = require('uuid') | ||
module.exports = async function(http, { db, ns, stream, data, meta, id }) { | ||
const event = { meta: { tz: DateTime.local().zoneName, ...meta, id: id ?? uuidv4(), db, ns, stream }, data: data ?? {} } | ||
const event = { meta: { tz: DateTime.local().zoneName, ...meta, id: id ?? uuid.v4(), db, ns, stream }, data: data ?? {} } | ||
await http.put({ endpoint: `/events/${event.meta.id}`, body: event }) | ||
return event | ||
} |
@@ -1,2 +0,2 @@ | ||
const uuidv4 = require('uuid/v4') | ||
const uuid = require('uuid') | ||
@@ -19,3 +19,3 @@ class DatabaseObjects { | ||
async create (name, id = uuidv4()) { | ||
async create (name, id = uuid.v4()) { | ||
const db = this.db | ||
@@ -22,0 +22,0 @@ const registration = this.types[name] |
const Annotation = require('./Annotation') | ||
const Event = require('./Event') | ||
const Events = require('./Events') | ||
const uuidv4 = require('uuid/v4') | ||
const uuid = require('uuid') | ||
class Stream { | ||
constructor(id, ns, details) { | ||
this.id = id || uuidv4() | ||
this.id = id || uuid.v4() | ||
this.ns = ns | ||
@@ -10,0 +10,0 @@ |
{ | ||
"name": "@persistr/js", | ||
"version": "4.13.2", | ||
"version": "4.13.3", | ||
"description": "Persistr client for Javascript", | ||
@@ -27,3 +27,3 @@ "main": "./lib/persistr", | ||
"dependencies": { | ||
"@persistr/store": "^4.9.1", | ||
"@persistr/store": "^4.9.3", | ||
"async-queue": "^0.1.0", | ||
@@ -35,11 +35,11 @@ "bluebird": "^3.7.2", | ||
"d3-array": "^2.4.0", | ||
"dotenv": "^8.0.0", | ||
"dotenv": "^16.0.3", | ||
"eventsource": "^1.0.7", | ||
"fetch-retry": "^4.0.1", | ||
"glob": "^7.2.0", | ||
"lru-cache": "^5.1.1", | ||
"luxon": "^1.3.2", | ||
"matcher": "^2.0.0", | ||
"sift": "^11.1.8", | ||
"uuid": "^3.3.2" | ||
"fetch-retry": "^5.0.3", | ||
"glob": "^8.0.3", | ||
"lru-cache": "^7.14.0", | ||
"luxon": "^3.1.0", | ||
"matcher": "^5.0.0", | ||
"sift": "^16.0.0", | ||
"uuid": "^9.0.0" | ||
}, | ||
@@ -51,4 +51,4 @@ "devDependencies": { | ||
"babelify": "^10.0.0", | ||
"mustache": "^3.0.1", | ||
"tinyify": "^3.0.0" | ||
"mustache": "^4.2.0", | ||
"tinyify": "^4.0.0" | ||
}, | ||
@@ -55,0 +55,0 @@ "browserify": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
851238
103
4007
+ Addedbrace-expansion@2.0.1(transitive)
+ Addeddotenv@16.4.7(transitive)
+ Addedescape-string-regexp@5.0.0(transitive)
+ Addedfetch-retry@5.0.6(transitive)
+ Addedglob@8.1.0(transitive)
+ Addedlru-cache@7.18.3(transitive)
+ Addedluxon@3.5.0(transitive)
+ Addedmatcher@5.0.0(transitive)
+ Addedminimatch@5.1.6(transitive)
+ Addedsift@16.0.1(transitive)
+ Addeduuid@9.0.1(transitive)
- Removeddotenv@8.6.0(transitive)
- Removedfetch-retry@4.1.1(transitive)
- Removedlru-cache@5.1.1(transitive)
- Removedsift@11.1.8(transitive)
- Removeduuid@3.4.0(transitive)
- Removedyallist@3.1.1(transitive)
Updated@persistr/store@^4.9.3
Updateddotenv@^16.0.3
Updatedfetch-retry@^5.0.3
Updatedglob@^8.0.3
Updatedlru-cache@^7.14.0
Updatedluxon@^3.1.0
Updatedmatcher@^5.0.0
Updatedsift@^16.0.0
Updateduuid@^9.0.0