diff --git a/package-lock.json b/package-lock.json index 541d951..f91c889 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,8 +7,7 @@ "@apiglobal/typedrequest-interfaces": { "version": "1.0.13", "resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest-interfaces/-/typedrequest-interfaces-1.0.13.tgz", - "integrity": "sha512-3mk0mMC7unqh+Bb0mPEMwEfJcLAGl5ZjA1If/OGyk56KQOBqA2mLATS40HREeGoAEcUOHU2VCwPuU/tpSVMY/w==", - "dev": true + "integrity": "sha512-3mk0mMC7unqh+Bb0mPEMwEfJcLAGl5ZjA1If/OGyk56KQOBqA2mLATS40HREeGoAEcUOHU2VCwPuU/tpSVMY/w==" }, "@babel/code-frame": { "version": "7.10.1", @@ -1285,7 +1284,6 @@ "version": "2.0.20", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-interfaces/-/smartlog-interfaces-2.0.20.tgz", "integrity": "sha512-PR3l5UVor+//UoeOLws7hX4AtL2eWEHUC4uvjRY9wkrZt3XxemzWzPYXXlBUrdr5DPqt1b7tKcOx8xyUoUei9g==", - "dev": true, "requires": { "@apiglobal/typedrequest-interfaces": "^1.0.13" } diff --git a/package.json b/package.json index a583fd3..9645e23 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@pushrocks/smartfile-destination-file", + "name": "@pushrocks/smartlog-destination-file", "version": "1.0.2", "private": false, "description": "a smartlog destination for transparently writing to a file", @@ -20,7 +20,9 @@ "tslint": "^5.11.0", "tslint-config-prettier": "^1.15.0" }, - "dependencies": {}, + "dependencies": { + "@pushrocks/smartlog-interfaces": "^2.0.20" + }, "files": [ "ts/**/*", "ts_web/**/*", diff --git a/ts/index.ts b/ts/index.ts index ebb74a8..6959f59 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,3 +1,14 @@ import * as plugins from './smartfile-destination-file.plugins'; -export let standardExport = 'Hi there! :) This is an exported string'; +export class SmartlogDestinationFile implements plugins.smartlogInterfaces.ILogDestination { + + public async handleLog (logPackageArg: plugins.smartlogInterfaces.ILogPackage) { + + } + + constructor() { + const fileStream = plugins.fs.createWriteStream(plugins.path.join(paths.nogitDir, 'output.txt'), { + flags: 'a+' + }); + } +} diff --git a/ts/smartfile-destination-file.plugins.ts b/ts/smartfile-destination-file.plugins.ts index 29aa9da..e1444c0 100644 --- a/ts/smartfile-destination-file.plugins.ts +++ b/ts/smartfile-destination-file.plugins.ts @@ -1,2 +1,14 @@ -const removeme = {}; -export { removeme }; +// node native scope +import * as fs from 'fs'; +import * as path from 'path'; + +export { + fs +}; + +// pushrocks scope +import * as smartlogInterfaces from '@pushrocks/smartlog-interfaces'; + +export { + smartlogInterfaces +};