including dist files

This commit is contained in:
2019-03-14 21:09:30 +01:00
parent 58ed4fc0ce
commit 44838bb380
39 changed files with 325 additions and 5 deletions

10
dist/domain/dependencies.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
import { IPortResolver } from "./exports/IPortResolver";
import { IMusicRepository } from "./imports/IMusicRepository";
declare class Dependencies {
private portResolver;
private resolve;
setResolver(portResolver: IPortResolver): void;
readonly MusicRepository: IMusicRepository;
}
declare const dependencies: Dependencies;
export default dependencies;

21
dist/domain/dependencies.js vendored Normal file
View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Dependencies = /** @class */ (function () {
function Dependencies() {
}
Dependencies.prototype.resolve = function (name) {
return this.portResolver.resolve(name);
};
Dependencies.prototype.setResolver = function (portResolver) {
this.portResolver = portResolver;
};
Object.defineProperty(Dependencies.prototype, "MusicRepository", {
get: function () { return this.resolve('IMusicRepository'); },
enumerable: true,
configurable: true
});
return Dependencies;
}());
var dependencies = new Dependencies();
exports.default = dependencies;
//# sourceMappingURL=dependencies.js.map

1
dist/domain/dependencies.js.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../src/domain/dependencies.ts"],"names":[],"mappings":";;AAIA;IAAA;IAWA,CAAC;IARW,8BAAO,GAAf,UAAmB,IAAa;QAC5B,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IACM,kCAAW,GAAlB,UAAmB,YAA4B;QAC3C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACrC,CAAC;IAED,sBAAI,yCAAe;aAAnB,cAAwB,OAAO,IAAI,CAAC,OAAO,CAAmB,kBAAkB,CAAC,CAAC,CAAC,CAAC;;;OAAA;IACxF,mBAAC;AAAD,CAAC,AAXD,IAWC;AACD,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AACxC,kBAAe,YAAY,CAAC"}

10
dist/domain/domain.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
import { IPortResolver } from "./exports/IPortResolver";
import { IMusicCatalog } from "./exports/IMusicCatalog";
declare class Domain {
private portResolver;
private resolve;
setResolver(portResolver: IPortResolver): void;
readonly musicCatalog: IMusicCatalog;
}
declare const domain: Domain;
export default domain;

21
dist/domain/domain.js vendored Normal file
View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Domain = /** @class */ (function () {
function Domain() {
}
Domain.prototype.resolve = function (name) {
return this.portResolver.resolve(name);
};
Domain.prototype.setResolver = function (portResolver) {
this.portResolver = portResolver;
};
Object.defineProperty(Domain.prototype, "musicCatalog", {
get: function () { return this.resolve('IMusicCatalog'); },
enumerable: true,
configurable: true
});
return Domain;
}());
var domain = new Domain();
exports.default = domain;
//# sourceMappingURL=domain.js.map

1
dist/domain/domain.js.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"domain.js","sourceRoot":"","sources":["../../src/domain/domain.ts"],"names":[],"mappings":";;AAIA;IAAA;IAWA,CAAC;IARW,wBAAO,GAAf,UAAmB,IAAa;QAC5B,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IACM,4BAAW,GAAlB,UAAmB,YAA4B;QAC3C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACrC,CAAC;IAED,sBAAW,gCAAY;aAAvB,cAA4B,OAAO,IAAI,CAAC,OAAO,CAAgB,eAAe,CAAC,CAAC,CAAC,CAAC;;;OAAA;IACtF,aAAC;AAAD,CAAC,AAXD,IAWC;AACD,IAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;AAC5B,kBAAe,MAAM,CAAC"}

View File

@@ -0,0 +1,8 @@
import { Track } from "../models/Track";
export interface IMusicCatalog {
get(): Track[];
getById(id: number): Track;
add(track: Track): number;
edit(id: number, track: Track): Track;
delete(id: number): Track;
}

3
dist/domain/exports/IMusicCatalog.js vendored Normal file
View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IMusicCatalog.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"IMusicCatalog.js","sourceRoot":"","sources":["../../../src/domain/exports/IMusicCatalog.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,3 @@
export interface IPortResolver {
resolve<T>(name: string): T;
}

3
dist/domain/exports/IPortResolver.js vendored Normal file
View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IPortResolver.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"IPortResolver.js","sourceRoot":"","sources":["../../../src/domain/exports/IPortResolver.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,8 @@
import { Track } from "../models/Track";
export interface IMusicRepository {
get(): Track[];
getById(id: number): Track;
add(track: Track): number;
edit(id: number, track: Track): Track;
delete(id: number): Track;
}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IMusicRepository.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"IMusicRepository.js","sourceRoot":"","sources":["../../../src/domain/imports/IMusicRepository.ts"],"names":[],"mappings":""}

7
dist/domain/models/Track.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
export declare class Track {
constructor(id: number, title: string, artist: string, duration: number);
id: number;
title: string;
artist: string;
duration: number;
}

13
dist/domain/models/Track.js vendored Normal file
View File

@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Track = /** @class */ (function () {
function Track(id, title, artist, duration) {
this.id = id;
this.title = title;
this.artist = artist;
this.duration = duration;
}
return Track;
}());
exports.Track = Track;
//# sourceMappingURL=Track.js.map

1
dist/domain/models/Track.js.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Track.js","sourceRoot":"","sources":["../../../src/domain/models/Track.ts"],"names":[],"mappings":";;AACA;IACI,eAAY,EAAU,EAAE,KAAa,EAAE,MAAc,EAAE,QAAe;QAClE,IAAI,CAAC,EAAE,GAAE,EAAE,CAAC;QACZ,IAAI,CAAC,KAAK,GAAE,KAAK,CAAC;QAClB,IAAI,CAAC,MAAM,GAAE,MAAM,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAE,QAAQ,CAAC;IAC5B,CAAC;IAML,YAAC;AAAD,CAAC,AAZD,IAYC;AAZY,sBAAK"}

3
dist/domain/services/BaseService.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
export declare class BaseService {
constructor();
}

9
dist/domain/services/BaseService.js vendored Normal file
View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var BaseService = /** @class */ (function () {
function BaseService() {
}
return BaseService;
}());
exports.BaseService = BaseService;
//# sourceMappingURL=BaseService.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"BaseService.js","sourceRoot":"","sources":["../../../src/domain/services/BaseService.ts"],"names":[],"mappings":";;AAEA;IACI;IAEA,CAAC;IACL,kBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,kCAAW"}

View File

@@ -0,0 +1,10 @@
import { BaseService } from './BaseService';
import { Track } from "../../domain/models/Track";
export declare class MusicCatalogService extends BaseService {
constructor();
get(): Track[];
getById(id: number): Track | null;
add(track: Track): number;
edit(id: number, track: Track): Track;
delete(id: number): Track | null;
}

View File

@@ -0,0 +1,41 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var BaseService_1 = require("./BaseService");
var dependencies_1 = require("../../domain/dependencies");
var MusicCatalogService = /** @class */ (function (_super) {
__extends(MusicCatalogService, _super);
function MusicCatalogService() {
return _super.call(this) || this;
}
MusicCatalogService.prototype.get = function () {
return dependencies_1.default.MusicRepository.get();
};
MusicCatalogService.prototype.getById = function (id) {
return dependencies_1.default.MusicRepository.getById(id);
};
MusicCatalogService.prototype.add = function (track) {
return dependencies_1.default.MusicRepository.add(track);
};
MusicCatalogService.prototype.edit = function (id, track) {
return dependencies_1.default.MusicRepository.edit(id, track);
};
MusicCatalogService.prototype.delete = function (id) {
return dependencies_1.default.MusicRepository.delete(id);
};
return MusicCatalogService;
}(BaseService_1.BaseService));
exports.MusicCatalogService = MusicCatalogService;
//# sourceMappingURL=MusicCatalogService.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MusicCatalogService.js","sourceRoot":"","sources":["../../../src/domain/services/MusicCatalogService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAE5C,0DAAqD;AAGrD;IAAyC,uCAAW;IAChD;eACI,iBAAO;IACX,CAAC;IACD,iCAAG,GAAH;QACI,OAAO,sBAAY,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC;IAC9C,CAAC;IACD,qCAAO,GAAP,UAAQ,EAAU;QACf,OAAO,sBAAY,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACnD,CAAC;IACD,iCAAG,GAAH,UAAI,KAAY;QACZ,OAAO,sBAAY,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IACD,kCAAI,GAAJ,UAAK,EAAU,EAAE,KAAY;QAC1B,OAAO,sBAAY,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACvD,CAAC;IACD,oCAAM,GAAN,UAAO,EAAU;QACf,OAAO,sBAAY,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACjD,CAAC;IACL,0BAAC;AAAD,CAAC,AAnBD,CAAyC,yBAAW,GAmBnD;AAnBY,kDAAmB"}