Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@thisisagile/easy

Package Overview
Dependencies
Maintainers
2
Versions
1266
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thisisagile/easy - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

dist/services/Route.d.ts

1

dist/services/index.d.ts
export * from "./HttpStatus";
export * from "./HttpVerb";
export * from "./Route";
export * from "./Verb";

@@ -15,3 +15,4 @@ "use strict";

__exportStar(require("./HttpVerb"), exports);
__exportStar(require("./Route"), exports);
__exportStar(require("./Verb"), exports);
//# sourceMappingURL=index.js.map

1

dist/services/Verb.d.ts

@@ -8,3 +8,2 @@ import { HttpVerb } from './HttpVerb';

};
export declare const verb: <T>(verb: Verb) => PropertyDecorator;
export declare const get: (onOk?: HttpStatus, onError?: HttpStatus) => PropertyDecorator;

@@ -11,0 +10,0 @@ export declare const put: (onOk?: HttpStatus, onError?: HttpStatus) => PropertyDecorator;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.del = exports.post = exports.patch = exports.put = exports.get = exports.verb = void 0;
exports.del = exports.post = exports.patch = exports.put = exports.get = void 0;
const utils_1 = require("../utils");
const HttpVerb_1 = require("./HttpVerb");
const HttpStatus_1 = require("./HttpStatus");
exports.verb = (verb) => (subject, property) => {
const verb = (verb) => (subject, property) => {
utils_1.meta(subject).property(property).set('verb', verb);
};
exports.get = (onOk = HttpStatus_1.HttpStatus.Ok, onError = HttpStatus_1.HttpStatus.NotFound) => exports.verb({ verb: HttpVerb_1.HttpVerb.Get, onOk, onError });
exports.put = (onOk = HttpStatus_1.HttpStatus.Ok, onError = HttpStatus_1.HttpStatus.BadRequest) => exports.verb({ verb: HttpVerb_1.HttpVerb.Put, onOk, onError });
exports.patch = (onOk = HttpStatus_1.HttpStatus.Ok, onError = HttpStatus_1.HttpStatus.BadRequest) => exports.verb({ verb: HttpVerb_1.HttpVerb.Patch, onOk, onError });
exports.post = (onOk = HttpStatus_1.HttpStatus.Created, onError = HttpStatus_1.HttpStatus.BadRequest) => exports.verb({ verb: HttpVerb_1.HttpVerb.Post, onOk, onError });
exports.del = (onOk = HttpStatus_1.HttpStatus.NoContent, onError = HttpStatus_1.HttpStatus.BadRequest) => exports.verb({ verb: HttpVerb_1.HttpVerb.Delete, onOk, onError });
exports.get = (onOk = HttpStatus_1.HttpStatus.Ok, onError = HttpStatus_1.HttpStatus.NotFound) => verb({ verb: HttpVerb_1.HttpVerb.Get, onOk, onError });
exports.put = (onOk = HttpStatus_1.HttpStatus.Ok, onError = HttpStatus_1.HttpStatus.BadRequest) => verb({ verb: HttpVerb_1.HttpVerb.Put, onOk, onError });
exports.patch = (onOk = HttpStatus_1.HttpStatus.Ok, onError = HttpStatus_1.HttpStatus.BadRequest) => verb({ verb: HttpVerb_1.HttpVerb.Patch, onOk, onError });
exports.post = (onOk = HttpStatus_1.HttpStatus.Created, onError = HttpStatus_1.HttpStatus.BadRequest) => verb({ verb: HttpVerb_1.HttpVerb.Post, onOk, onError });
exports.del = (onOk = HttpStatus_1.HttpStatus.NoContent, onError = HttpStatus_1.HttpStatus.BadRequest) => verb({ verb: HttpVerb_1.HttpVerb.Delete, onOk, onError });
//# sourceMappingURL=Verb.js.map

@@ -8,4 +8,4 @@ import { List } from '../utils';

export declare const uri: {
part: (key: string) => Segment;
host: (key?: string) => Segment;
segment: (key: string) => Segment;
path: (key: string) => Segment;

@@ -12,0 +12,0 @@ query: (key: string) => Segment;

@@ -7,6 +7,2 @@ "use strict";

exports.uri = {
part: (key) => ({
key,
segment: `${key}`,
}),
host: (key) => ({

@@ -16,2 +12,6 @@ key,

}),
segment: (key) => ({
key,
segment: `${key}`,
}),
path: (key) => ({

@@ -31,3 +31,3 @@ key,

this.host = exports.uri.host();
this.resource = exports.uri.part('$resource');
this.resource = exports.uri.segment('$resource');
this.set = (segment, value) => {

@@ -34,0 +34,0 @@ this.props.push({ segment, value });

{
"name": "@thisisagile/easy",
"version": "1.6.0",
"version": "1.7.0",
"description": "Straightforward library for building domain-driven microservice architectures",

@@ -5,0 +5,0 @@ "author": "Sander Hoogendoorn",

@@ -24,1 +24,3 @@ # easy

Likely we will use jest for unit testing, wrap axios for request handling, and a simple mongodb connector, and wrap tsyringe for dependency injection.
### Please note: we are slowly adding more value to the library, step by step. Most of our additions are useful as such, both it will take some effort for the full architecture to be in place to implement fully working microservices. Please bare with us.
export * from "./HttpStatus";
export * from "./HttpVerb";
export * from "./Route";
export * from "./Verb";

@@ -7,3 +7,3 @@ import { meta } from '../utils';

export const verb = <T>(verb: Verb): PropertyDecorator =>
const verb = <T>(verb: Verb): PropertyDecorator =>
(subject: unknown, property: string): void => {

@@ -10,0 +10,0 @@ meta(subject).property(property).set('verb', verb);

@@ -7,6 +7,2 @@ import { list, List } from '../utils';

export const uri = {
part: (key: string): Segment => ({
key,
segment: `${key}`,
}),

@@ -18,2 +14,7 @@ host: (key?: string): Segment => ({

segment: (key: string): Segment => ({
key,
segment: `${key}`,
}),
path: (key: string): Segment => ({

@@ -35,3 +36,3 @@ key,

readonly host = uri.host();
readonly resource = uri.part('$resource');
readonly resource = uri.segment('$resource');

@@ -38,0 +39,0 @@ constructor(readonly segments: Segment[], private props: List<{ segment: Segment, value: unknown }> = list()) {}

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