including dist files
This commit is contained in:
8
dist/adapters/PortResolver.d.ts
vendored
Normal file
8
dist/adapters/PortResolver.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { IPortResolver } from '../domain/exports/IPortResolver';
|
||||
export declare class PortResolver implements IPortResolver {
|
||||
private _container;
|
||||
constructor();
|
||||
register<T>(name: string, fn: () => T): void;
|
||||
registerInstance<T>(name: string, fn: () => T): void;
|
||||
resolve<T>(name: string): T;
|
||||
}
|
||||
31
dist/adapters/PortResolver.js
vendored
Normal file
31
dist/adapters/PortResolver.js
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var PortResolver = /** @class */ (function () {
|
||||
function PortResolver() {
|
||||
this._container = {};
|
||||
}
|
||||
PortResolver.prototype.register = function (name, fn) {
|
||||
this._container[name] = fn;
|
||||
};
|
||||
PortResolver.prototype.registerInstance = function (name, fn) {
|
||||
var _instance = null;
|
||||
var getInstance = function (fn) {
|
||||
return function () {
|
||||
if (!_instance) {
|
||||
_instance = fn();
|
||||
}
|
||||
return _instance;
|
||||
};
|
||||
};
|
||||
this._container[name] = getInstance(fn);
|
||||
};
|
||||
PortResolver.prototype.resolve = function (name) {
|
||||
if (name in this._container && typeof this._container[name] == 'function') {
|
||||
return this._container[name]();
|
||||
}
|
||||
throw new Error('PortResolver can not resolve ' + name);
|
||||
};
|
||||
return PortResolver;
|
||||
}());
|
||||
exports.PortResolver = PortResolver;
|
||||
//# sourceMappingURL=PortResolver.js.map
|
||||
1
dist/adapters/PortResolver.js.map
vendored
Normal file
1
dist/adapters/PortResolver.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"PortResolver.js","sourceRoot":"","sources":["../../src/adapters/PortResolver.ts"],"names":[],"mappings":";;AAIA;IAEI;QADQ,eAAU,GAAS,EAAE,CAAC;IAG9B,CAAC;IACD,+BAAQ,GAAR,UAAY,IAAa,EAAE,EAAY;QACnC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IAC/B,CAAC;IACD,uCAAgB,GAAhB,UAAoB,IAAc,EAAE,EAAY;QAC5C,IAAI,SAAS,GAAS,IAAI,CAAC;QAC3B,IAAI,WAAW,GAAG,UAAC,EAAa;YAC5B,OAAO;gBACH,IAAI,CAAC,SAAS,EAAE;oBACZ,SAAS,GAAG,EAAE,EAAE,CAAC;iBACpB;gBACD,OAAO,SAAS,CAAC;YACrB,CAAC,CAAC;QACN,CAAC,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC;IACD,8BAAO,GAAP,UAAW,IAAa;QACpB,IAAI,IAAI,IAAI,IAAI,CAAC,UAAU,IAAI,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,EAAE;YACvE,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;SAClC;QACD,MAAM,IAAI,KAAK,CAAC,+BAA+B,GAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;IACL,mBAAC;AAAD,CAAC,AA1BD,IA0BC;AA1BY,oCAAY"}
|
||||
10
dist/adapters/music/VinylCatalog.d.ts
vendored
Normal file
10
dist/adapters/music/VinylCatalog.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Track } from "../../domain/models/Track";
|
||||
import { IMusicRepository } from "../../domain/imports/IMusicRepository";
|
||||
export declare class VinylCatalog implements IMusicRepository {
|
||||
private vinylList;
|
||||
get(): Track[];
|
||||
getById(id: number): Track;
|
||||
add(track: Track): number;
|
||||
edit(id: number, track: Track): Track;
|
||||
delete(id: number): Track;
|
||||
}
|
||||
40
dist/adapters/music/VinylCatalog.js
vendored
Normal file
40
dist/adapters/music/VinylCatalog.js
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var Track_1 = require("../../domain/models/Track");
|
||||
var VinylCatalog = /** @class */ (function () {
|
||||
function VinylCatalog() {
|
||||
this.vinylList = new Array(new Track_1.Track(1, "DNA.", "Kendrick Lamar", 340), new Track_1.Track(2, "Come Down", "Anderson Paak.", 430), new Track_1.Track(3, "DNA.", "Kendrick Lamar", 340), new Track_1.Track(4, "DNA.", "Kendrick Lamar", 340), new Track_1.Track(5, "DNA.", "Kendrick Lamar", 340));
|
||||
}
|
||||
VinylCatalog.prototype.get = function () {
|
||||
return this.vinylList;
|
||||
};
|
||||
VinylCatalog.prototype.getById = function (id) {
|
||||
return this.vinylList.filter(function (track) { return track.id == id; }).pop();
|
||||
};
|
||||
VinylCatalog.prototype.add = function (track) {
|
||||
return this.vinylList.push(track);
|
||||
};
|
||||
VinylCatalog.prototype.edit = function (id, track) {
|
||||
var existingTrack = this.getById(id);
|
||||
if (existingTrack) {
|
||||
existingTrack.artist = track.artist;
|
||||
existingTrack.title = track.title;
|
||||
existingTrack.duration = track.duration;
|
||||
return existingTrack;
|
||||
}
|
||||
throw new Error("Track not found");
|
||||
};
|
||||
VinylCatalog.prototype.delete = function (id) {
|
||||
var track = this.getById(id);
|
||||
if (track) {
|
||||
var targetIndex = this.vinylList.indexOf(track);
|
||||
if (targetIndex < -1)
|
||||
return null;
|
||||
return this.vinylList.splice(targetIndex, 1)[0];
|
||||
}
|
||||
return null;
|
||||
};
|
||||
return VinylCatalog;
|
||||
}());
|
||||
exports.VinylCatalog = VinylCatalog;
|
||||
//# sourceMappingURL=VinylCatalog.js.map
|
||||
1
dist/adapters/music/VinylCatalog.js.map
vendored
Normal file
1
dist/adapters/music/VinylCatalog.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"VinylCatalog.js","sourceRoot":"","sources":["../../../src/adapters/music/VinylCatalog.ts"],"names":[],"mappings":";;AAAA,mDAAkD;AAGlD;IAAA;QAEY,cAAS,GAAY,IAAI,KAAK,CAClC,IAAI,aAAK,CAAC,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,CAAC,EAC3C,IAAI,aAAK,CAAC,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,CAAC,EAChD,IAAI,aAAK,CAAC,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,CAAC,EAC3C,IAAI,aAAK,CAAC,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,CAAC,EAC3C,IAAI,aAAK,CAAC,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,CAAC,CAC9C,CAAC;IA8BN,CAAC;IA5BG,0BAAG,GAAH;QACI,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IACD,8BAAO,GAAP,UAAQ,EAAU;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,EAAE,IAAI,EAAE,EAAd,CAAc,CAAC,CAAC,GAAG,EAAE,CAAC;IAChE,CAAC;IACD,0BAAG,GAAH,UAAI,KAAY;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IACD,2BAAI,GAAJ,UAAK,EAAU,EAAE,KAAY;QACzB,IAAI,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACrC,IAAI,aAAa,EAAE;YACf,aAAa,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YACpC,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;YAClC,aAAa,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;YACxC,OAAO,aAAa,CAAC;SACxB;QACD,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;IACD,6BAAM,GAAN,UAAO,EAAU;QACb,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC7B,IAAI,KAAK,EAAE;YACP,IAAI,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAChD,IAAI,WAAW,GAAG,CAAC,CAAC;gBAAE,OAAO,IAAI,CAAC;YAClC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACnD;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IACL,mBAAC;AAAD,CAAC,AAtCD,IAsCC;AAtCY,oCAAY"}
|
||||
10
dist/domain/dependencies.d.ts
vendored
Normal file
10
dist/domain/dependencies.d.ts
vendored
Normal 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
21
dist/domain/dependencies.js
vendored
Normal 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
1
dist/domain/dependencies.js.map
vendored
Normal 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
10
dist/domain/domain.d.ts
vendored
Normal 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
21
dist/domain/domain.js
vendored
Normal 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
1
dist/domain/domain.js.map
vendored
Normal 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"}
|
||||
8
dist/domain/exports/IMusicCatalog.d.ts
vendored
Normal file
8
dist/domain/exports/IMusicCatalog.d.ts
vendored
Normal 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
3
dist/domain/exports/IMusicCatalog.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=IMusicCatalog.js.map
|
||||
1
dist/domain/exports/IMusicCatalog.js.map
vendored
Normal file
1
dist/domain/exports/IMusicCatalog.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IMusicCatalog.js","sourceRoot":"","sources":["../../../src/domain/exports/IMusicCatalog.ts"],"names":[],"mappings":""}
|
||||
3
dist/domain/exports/IPortResolver.d.ts
vendored
Normal file
3
dist/domain/exports/IPortResolver.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export interface IPortResolver {
|
||||
resolve<T>(name: string): T;
|
||||
}
|
||||
3
dist/domain/exports/IPortResolver.js
vendored
Normal file
3
dist/domain/exports/IPortResolver.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=IPortResolver.js.map
|
||||
1
dist/domain/exports/IPortResolver.js.map
vendored
Normal file
1
dist/domain/exports/IPortResolver.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IPortResolver.js","sourceRoot":"","sources":["../../../src/domain/exports/IPortResolver.ts"],"names":[],"mappings":""}
|
||||
8
dist/domain/imports/IMusicRepository.d.ts
vendored
Normal file
8
dist/domain/imports/IMusicRepository.d.ts
vendored
Normal 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;
|
||||
}
|
||||
3
dist/domain/imports/IMusicRepository.js
vendored
Normal file
3
dist/domain/imports/IMusicRepository.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=IMusicRepository.js.map
|
||||
1
dist/domain/imports/IMusicRepository.js.map
vendored
Normal file
1
dist/domain/imports/IMusicRepository.js.map
vendored
Normal 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
7
dist/domain/models/Track.d.ts
vendored
Normal 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
13
dist/domain/models/Track.js
vendored
Normal 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
1
dist/domain/models/Track.js.map
vendored
Normal 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
3
dist/domain/services/BaseService.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare class BaseService {
|
||||
constructor();
|
||||
}
|
||||
9
dist/domain/services/BaseService.js
vendored
Normal file
9
dist/domain/services/BaseService.js
vendored
Normal 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
|
||||
1
dist/domain/services/BaseService.js.map
vendored
Normal file
1
dist/domain/services/BaseService.js.map
vendored
Normal 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"}
|
||||
10
dist/domain/services/MusicCatalogService.d.ts
vendored
Normal file
10
dist/domain/services/MusicCatalogService.d.ts
vendored
Normal 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;
|
||||
}
|
||||
41
dist/domain/services/MusicCatalogService.js
vendored
Normal file
41
dist/domain/services/MusicCatalogService.js
vendored
Normal 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
|
||||
1
dist/domain/services/MusicCatalogService.js.map
vendored
Normal file
1
dist/domain/services/MusicCatalogService.js.map
vendored
Normal 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"}
|
||||
4
dist/index.d.ts
vendored
Normal file
4
dist/index.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import './wiring/Wiring';
|
||||
import { Track } from './domain/models/Track';
|
||||
declare const musicCatalog: import("./domain/exports/IMusicCatalog").IMusicCatalog;
|
||||
export { musicCatalog, Track };
|
||||
10
dist/index.js
vendored
Normal file
10
dist/index.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("./wiring/Wiring");
|
||||
var Track_1 = require("./domain/models/Track");
|
||||
exports.Track = Track_1.Track;
|
||||
var domain_1 = require("./domain/domain");
|
||||
var musicCatalog = domain_1.default.musicCatalog;
|
||||
exports.musicCatalog = musicCatalog;
|
||||
// MusicRepository
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dist/index.js.map
vendored
Normal file
1
dist/index.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,2BAAyB;AACzB,+CAA8C;AAIvB,gBAJd,aAAK,CAIc;AAH5B,0CAAqC;AACrC,IAAM,YAAY,GAAG,gBAAM,CAAC,YAAY,CAAC;AAEhC,oCAAY;AAErB,kBAAkB"}
|
||||
5
dist/wiring/Wiring.d.ts
vendored
Normal file
5
dist/wiring/Wiring.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare class Wiring {
|
||||
constructor();
|
||||
}
|
||||
declare const wiring: Wiring;
|
||||
export default wiring;
|
||||
23
dist/wiring/Wiring.js
vendored
Normal file
23
dist/wiring/Wiring.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var domain_1 = require("../domain/domain");
|
||||
var dependencies_1 = require("../domain/dependencies");
|
||||
var PortResolver_1 = require("../adapters/PortResolver");
|
||||
var VinylCatalog_1 = require("../adapters/music/VinylCatalog");
|
||||
var MusicCatalogService_1 = require("../domain/services/MusicCatalogService");
|
||||
var Wiring = /** @class */ (function () {
|
||||
function Wiring() {
|
||||
var portResolver = new PortResolver_1.PortResolver();
|
||||
domain_1.default.setResolver(portResolver);
|
||||
dependencies_1.default.setResolver(portResolver);
|
||||
// register imports
|
||||
portResolver.registerInstance('IMusicRepository', function () { return new VinylCatalog_1.VinylCatalog(); });
|
||||
// register exports
|
||||
portResolver.registerInstance('IMusicCatalog', function () { return new MusicCatalogService_1.MusicCatalogService(); });
|
||||
}
|
||||
return Wiring;
|
||||
}());
|
||||
exports.Wiring = Wiring;
|
||||
var wiring = new Wiring();
|
||||
exports.default = wiring;
|
||||
//# sourceMappingURL=Wiring.js.map
|
||||
1
dist/wiring/Wiring.js.map
vendored
Normal file
1
dist/wiring/Wiring.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Wiring.js","sourceRoot":"","sources":["../../src/wiring/Wiring.ts"],"names":[],"mappings":";;AAAA,2CAAqC;AACrC,uDAAiD;AACjD,yDAAwD;AACxD,+DAA8D;AAG9D,8EAA6E;AAE7E;IACI;QACI,IAAM,YAAY,GAAG,IAAI,2BAAY,EAAE,CAAC;QACxC,gBAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QACjC,sBAAY,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAEvC,mBAAmB;QACnB,YAAY,CAAC,gBAAgB,CAAmB,kBAAkB,EAAE,cAAM,OAAA,IAAI,2BAAY,EAAE,EAAlB,CAAkB,CAAC,CAAC;QAE9F,mBAAmB;QACnB,YAAY,CAAC,gBAAgB,CAAgB,eAAe,EAAE,cAAM,OAAA,IAAI,yCAAmB,EAAE,EAAzB,CAAyB,CAAC,CAAC;IACnG,CAAC;IACL,aAAC;AAAD,CAAC,AAZD,IAYC;AAZY,wBAAM;AAcnB,IAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;AAC5B,kBAAe,MAAM,CAAC"}
|
||||
Reference in New Issue
Block a user