{"_id":"@cyber-crafts/ltc-core","_rev":"1-2b7add418830c47e2131b73e7399efb8","name":"@cyber-crafts/ltc-core","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@cyber-crafts/ltc-core","version":"1.0.0","main":"./lib/index","typings":"./lib/index","license":"MIT","scripts":{"test":"jest --watch --coverage --config=jest.config.js","test:staged":"jest --forceExit","lib:generate":"rm -rf ./lib/* && tsc && git add ./lib/**","lint":"tslint -p tslint.json","start":"tsc --watch"},"pre-commit":["lint","lib:generate","test:staged"],"dependencies":{"@types/express":"^4.16.1","@types/lodash":"^4.14.126","@types/memoizee":"^0.4.2","@types/node":"^10.14.6","async-eventemitter":"^0.2.4","c2v":"^1.3.0","cors":"^2.8.5","express":"^4.16.4","faker":"^4.1.0","inversify":"^4.11.1","json8-patch":"^0.4.1","lodash":"^4.17.5","memoizee":"^0.4.14","reflect-metadata":"^0.1.13","winston":"^3.2.1"},"devDependencies":{"jest":"^22.4.3","pre-commit":"^1.2.2"},"gitHead":"609a36798569932f81e31f1626f0caebbbb5e5b0","description":"this is the main class that is used to glue all the plugins together\r into one application, it handles the registration and initialization of\r plugins and [merges the GraphQl Schemas](#app-getExecutableSchema)\r from all plugins","_id":"@cyber-crafts/ltc-core@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"romany-saad","email":"contact@cyber-crafts.com"},"dist":{"integrity":"sha512-ceDx7LO0VbAVXt3H9DT6WB/6bSJrkTGgikLFyevzr/Z32VVP4Wl7laHaMJv7AQI2IKFmKt9SD8bGDF7e2yWvQQ==","shasum":"0682456c25e26fe5f4e1b100f3cf442605e4ff80","tarball":"https://registry.npmjs.org/@cyber-crafts/ltc-core/-/ltc-core-1.0.0.tgz","fileCount":66,"unpackedSize":44705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDnPXCRA9TVsSAnZWagAAHxMP/it65XXFIBcY8s2kwyrT\nKlG33dbTC9b+PMiYhy4xsNqdnwutHe+S/lCwBt4EqmCIpfZiN4oaxfq4ODIo\nwdP162BTPiJACTvVJobPsQYa5GNvx+UIN5Mm0+Ls3y6TEA1nJLQtPw7xn4/O\nDp+bOr4JF6nDJuipjGDp937FtpCwMj3mohNr3Zh6mF7EKFHZn1Ysgm1BBLoP\nv+tzUu7b3Ntet8rUE7wBvqfZh/uqRM0Plc2nFFD4sXCCT6WXyBDeS4qsHbGZ\ns2r7F0QgjRx8hFgemmv0S0HswPhGZHthF7dFzn5fZm8o2M3ygOPbj2sKppKC\n4gYP2z03jwrelGh1NJY2QWb8x5RaeUg0r253zs7VEWoZdMDpJ73w7icyIW02\n7WlNCdAMRQEK4GEczQh3u6BZt3qjrLOPQ9oxsGCqyg57GNqXyC/6ZpaZ7rmt\n7Je30pD/FH7ZWBankPqdRJknmALt6npwpHzr+FmTIFXVJWglMd46PciPTtOS\nWmlpfU/jymxd5LiXfWlGjH/DViLSwsgVlruXp5O3YnK9iKqUdrSTbtZm/PdY\ndbTc88SP6NQZmoXSDO4Et2tz75GKHHI+Yh+/hAFVh65IJVz4wpV7tFUMOVQl\nGiX9opQO2orhwu3JXx+11/KrBbd/CnABAyvoMS0LD/0BNxGFP/t8cZ860Rai\nvTq8\r\n=lOj5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVctOzhplnaIgOrQrvc2YZOzq10qlQ9bu+WWJjeH6AYQIhALIZNtqmACe659E6edgQHGGwaNhpB6pRZ4554zr6LfbE"}]},"maintainers":[{"name":"romany-saad","email":"contact@cyber-crafts.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ltc-core_1.0.0_1561228246594_0.47245557028462204"},"_hasShrinkwrap":false}},"time":{"created":"2019-06-22T18:30:46.594Z","1.0.0":"2019-06-22T18:30:46.709Z","modified":"2022-04-05T02:24:01.235Z"},"maintainers":[{"name":"romany-saad","email":"contact@cyber-crafts.com"}],"description":"this is the main class that is used to glue all the plugins together\r into one application, it handles the registration and initialization of\r plugins and [merges the GraphQl Schemas](#app-getExecutableSchema)\r from all plugins","license":"MIT","readme":"# Main Classes\r\n## App\r\nthis is the main class that is used to glue all the plugins together\r\ninto one application, it handles the registration and initialization of\r\nplugins and [merges the GraphQl Schemas](#app-getExecutableSchema)\r\nfrom all plugins\r\n\r\n### `App.getExecutableSchema(): GraphQLSchema`\r\nmerges all schemas and resolvers from all plugins and returns an\r\ninstance of `GraphQLSchema`\r\n\r\n# Contracts\r\ncontracts are just interfaces but we use the term contract just to make\r\nless vague as the term Interface is used in many contexts in different\r\nmeanings\r\n\r\n## `ISerializable`\r\n\r\n### Methods\r\n\r\n#### `serialize(model: IModel): object`\r\nserializes a given IModel instance into a plain JS object\r\n\r\n## `IModel`\r\nspecifies the constraints on which an object can be used as a DB Model\r\n\r\n### Methods\r\nthe `IModel` interface extends the `ISerializable` interface so it has\r\nits methods in addition to the following.\r\n\r\n#### `parse(data: object): IModel`\r\nparses a given plain JS object into an IModel instance\r\n\r\n#### `getIdFieldName(): string`\r\nreturns the name of the id field to be used in setId\r\n\r\n#### `set(data: object): void`\r\nsets all the keys of `data` object to the inner state of the model also\r\nif a key is equal to value from `getIdFieldName()` it will should be\r\nhandled handle by using `setId()` instead of directly setting it\r\n\r\n#### `setId(id: string): void`\r\nsets the `id` property of the model and do any aside logic related to\r\nthis operation\r\n\r\n#### `getId(): string`\r\nreturns the model `id` property\r\n\r\n#### `getSchema (): IStringKeyedObject`\r\nreturns the schema used to validate the state of the model\r\n\r\n#### `selfValidate (): boolean`\r\nvalidates the value returned from IModel.serialize() against\r\nthe model's schema\r\n\r\n#### `getErrors (): object`\r\nreturns an array of errors that resulted from the last validation\r\n","readmeFilename":"README.md"}