New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@castore/core

Package Overview
Dependencies
Maintainers
4
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@castore/core - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

51

dist/cjs/errors/eventAlreadyExists.js

@@ -8,49 +8,14 @@ "use strict";

});
exports.EventAlreadyExistsError = void 0;
exports.isEventAlreadyExistsError = exports.eventAlreadyExistsErrorCode = void 0;
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var eventAlreadyExistsErrorCode = 'EventAlreadyExistsError';
exports.eventAlreadyExistsErrorCode = eventAlreadyExistsErrorCode;
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
var isEventAlreadyExistsError = function isEventAlreadyExistsError(error) {
return (0, _typeof2["default"])(error) === 'object' && error !== null && 'code' in error && error.code === eventAlreadyExistsErrorCode;
};
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
var EventAlreadyExistsError = /*#__PURE__*/function (_Error) {
(0, _inherits2["default"])(EventAlreadyExistsError, _Error);
var _super = _createSuper(EventAlreadyExistsError);
function EventAlreadyExistsError(_ref) {
var _this;
var eventStoreId = _ref.eventStoreId,
aggregateId = _ref.aggregateId,
version = _ref.version;
(0, _classCallCheck2["default"])(this, EventAlreadyExistsError);
_this = _super.call(this, "Event already exists for ".concat(eventStoreId !== null && eventStoreId !== void 0 ? eventStoreId : '', " aggregate ").concat(aggregateId, " and version ").concat(version));
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "eventStoreId", void 0);
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "aggregateId", void 0);
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "version", void 0);
_this.aggregateId = aggregateId;
_this.version = version;
return _this;
}
return (0, _createClass2["default"])(EventAlreadyExistsError);
}( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(Error));
exports.EventAlreadyExistsError = EventAlreadyExistsError;
exports.isEventAlreadyExistsError = isEventAlreadyExistsError;
//# sourceMappingURL=eventAlreadyExists.js.map

12

dist/cjs/index.js

@@ -42,2 +42,14 @@ "use strict";

});
Object.defineProperty(exports, "eventAlreadyExistsErrorCode", {
enumerable: true,
get: function get() {
return _eventAlreadyExists.eventAlreadyExistsErrorCode;
}
});
Object.defineProperty(exports, "isEventAlreadyExistsError", {
enumerable: true,
get: function get() {
return _eventAlreadyExists.isEventAlreadyExistsError;
}
});
Object.defineProperty(exports, "tuple", {

@@ -44,0 +56,0 @@ enumerable: true,

@@ -1,43 +0,6 @@

import _createClass from "@babel/runtime/helpers/createClass";
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
import _inherits from "@babel/runtime/helpers/inherits";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
export var EventAlreadyExistsError = /*#__PURE__*/function (_Error) {
_inherits(EventAlreadyExistsError, _Error);
var _super = _createSuper(EventAlreadyExistsError);
function EventAlreadyExistsError(_ref) {
var _this;
var eventStoreId = _ref.eventStoreId,
aggregateId = _ref.aggregateId,
version = _ref.version;
_classCallCheck(this, EventAlreadyExistsError);
_this = _super.call(this, "Event already exists for ".concat(eventStoreId !== null && eventStoreId !== void 0 ? eventStoreId : '', " aggregate ").concat(aggregateId, " and version ").concat(version));
_defineProperty(_assertThisInitialized(_this), "eventStoreId", void 0);
_defineProperty(_assertThisInitialized(_this), "aggregateId", void 0);
_defineProperty(_assertThisInitialized(_this), "version", void 0);
_this.aggregateId = aggregateId;
_this.version = version;
return _this;
}
return _createClass(EventAlreadyExistsError);
}( /*#__PURE__*/_wrapNativeSuper(Error));
import _typeof from "@babel/runtime/helpers/typeof";
export var eventAlreadyExistsErrorCode = 'EventAlreadyExistsError';
export var isEventAlreadyExistsError = function isEventAlreadyExistsError(error) {
return _typeof(error) === 'object' && error !== null && 'code' in error && error.code === eventAlreadyExistsErrorCode;
};
//# sourceMappingURL=eventAlreadyExists.js.map
export { EventType } from "./event/eventType";
export { AggregateNotFoundError } from "./errors/aggregateNotFound";
export { EventAlreadyExistsError } from "./errors/eventAlreadyExists";
export { EventAlreadyExistsError, isEventAlreadyExistsError, eventAlreadyExistsErrorCode } from "./errors/eventAlreadyExists";
export { UndefinedStorageAdapterError } from "./errors/undefinedStorageAdapterError";

@@ -5,0 +5,0 @@ export { EventStore } from "./eventStore";

@@ -1,11 +0,9 @@

export declare class EventAlreadyExistsError extends Error {
export declare const eventAlreadyExistsErrorCode = "EventAlreadyExistsError";
export interface EventAlreadyExistsError extends Error {
code: typeof eventAlreadyExistsErrorCode;
eventStoreId?: string;
aggregateId: string;
version: number;
constructor({ eventStoreId, aggregateId, version, }: {
eventStoreId?: string;
aggregateId: string;
version: number;
});
}
export declare const isEventAlreadyExistsError: (error: unknown) => error is EventAlreadyExistsError;
//# sourceMappingURL=eventAlreadyExists.d.ts.map

@@ -6,3 +6,3 @@ export type { Aggregate } from './aggregate';

export { AggregateNotFoundError } from './errors/aggregateNotFound';
export { EventAlreadyExistsError } from './errors/eventAlreadyExists';
export { EventAlreadyExistsError, isEventAlreadyExistsError, eventAlreadyExistsErrorCode, } from './errors/eventAlreadyExists';
export { UndefinedStorageAdapterError } from './errors/undefinedStorageAdapterError';

@@ -9,0 +9,0 @@ export type { StorageAdapter } from './storageAdapter';

@@ -76,3 +76,3 @@ {

},
"version": "1.4.2"
"version": "1.4.3"
}

@@ -39,5 +39,5 @@ <p align="center">

- Define your [event stores](#eventstore)
- Fetch and push new [events](#events) seamlessly
- Implement and test your [commands](#command)
- Define your [event stores](#-eventstore)
- Fetch and push new [events](#-events) seamlessly
- Implement and test your [commands](#%EF%B8%8F-command)
- ...and much more!

@@ -505,3 +505,3 @@

const { aggregateIds: firstPage, nextPageToken } =
await userEventStore.getAggregate({ limit: 20 });
await userEventStore.listAggregateIds({ limit: 20 });

@@ -511,4 +511,4 @@ accAggregateIds.push(...firstPage);

if (nextPageToken) {
const { aggregateIds: secondPage } = await userEventStore.getAggregate({
limit: 20,
const { aggregateIds: secondPage } = await userEventStore.listAggregateIds({
// 👇 Previous limit of 20 is passed through the page token
pageToken: nextPageToken,

@@ -515,0 +515,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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