@startupjs/server-aggregate
Advanced tools
Comparing version 0.55.0-alpha.1 to 0.55.0-alpha.12
@@ -1,2 +0,3 @@ | ||
const racer = require('racer') | ||
import racer from 'racer' | ||
const { Model } = racer | ||
@@ -3,0 +4,0 @@ |
@@ -1,2 +0,2 @@ | ||
module.exports.ACCESS_ERROR_CODES = { | ||
export const ACCESS_ERROR_CODES = { | ||
ERR_ACCESS_ONLY_SERVER_AGGREATE: 'ERR_ACCESS_DENY_CREATE', | ||
@@ -3,0 +3,0 @@ ERR_ACCESS_NO_SERVER_AGGREGATE_NAME: 'ERR_ACCESS_DENY_READ', |
18
error.js
@@ -1,19 +0,11 @@ | ||
const ACCESS_ERROR_CODES = require('./constants').ACCESS_ERROR_CODES | ||
import { ACCESS_ERROR_CODES } from './constants.js' | ||
// there is no way to transfer any fields other than message and code, becouse https://github.com/share/sharedb/blob/master/lib/agent.js#L278 | ||
class ShareDBAccessError extends Error { | ||
export default class ShareDBAccessError extends Error { | ||
constructor (code, message) { | ||
super() | ||
super(message) | ||
this.CODES = ACCESS_ERROR_CODES | ||
this.code = code | ||
this.name = 'ShareDBAccessError' | ||
this.code = code | ||
this.message = message || '' | ||
if (Error.captureStackTrace) { | ||
Error.captureStackTrace(this, ShareDBAccessError) | ||
} else { | ||
this.stack = new Error().stack | ||
} | ||
} | ||
} | ||
module.exports = ShareDBAccessError |
{ | ||
"name": "@startupjs/server-aggregate", | ||
"version": "0.55.0-alpha.1", | ||
"version": "0.55.0-alpha.12", | ||
"description": "Module for describing aggregations on the server", | ||
"main": "server.js", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"type": "module", | ||
"main": "server.js", | ||
"dependencies": { | ||
"racer": "1.0.1" | ||
}, | ||
"license": "MIT", | ||
"gitHead": "f9f14627172890e54490aa3717e21f19614a958b" | ||
"gitHead": "d9fdf45341ca733978cdc4fa2562055922e0c2ed" | ||
} |
@@ -1,2 +0,4 @@ | ||
const ShareDBAccessError = require('./error') | ||
import ShareDBAccessError from './error.js' | ||
import { ACCESS_ERROR_CODES } from './constants.js' | ||
const { | ||
@@ -6,7 +8,7 @@ ERR_ACCESS_ONLY_SERVER_AGGREATE, | ||
ERR_ACCESS_IN_SERVER_QUERY | ||
} = require('./constants').ACCESS_ERROR_CODES | ||
} = ACCESS_ERROR_CODES | ||
const QUERIES = {} | ||
module.exports = (backend, customCheck) => { | ||
export default (backend, customCheck) => { | ||
backend.addAggregate = (collection, queryName, queryFunction) => { | ||
@@ -13,0 +15,0 @@ QUERIES[collection + '.' + queryName] = queryFunction |
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
No License Found
License(Experimental) License information could not be found.
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
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
0
Yes
4600
1
76