diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b48c74..55aed5d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,8 +33,8 @@ jobs: - run: npm run build --if-present - run: npm test - - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: ./coverage/lcov.info + # - name: Coveralls + # uses: coverallsapp/github-action@master + # with: + # github-token: ${{ secrets.GITHUB_TOKEN }} + # path-to-lcov: ./coverage/lcov.info diff --git a/dist/s3-store.js b/dist/s3-store.js index 2039d34..d7b8f6b 100644 --- a/dist/s3-store.js +++ b/dist/s3-store.js @@ -356,7 +356,7 @@ async function s3_store(options) { process: async function (trigger, gateway) { let { record, event } = trigger; return gateway({ ...msg, record, event }, trigger); - } + }, }; return gatewayHandler; }; diff --git a/dist/s3-store.js.map b/dist/s3-store.js.map index 93ca80c..eed39e3 100644 --- a/dist/s3-store.js.map +++ b/dist/s3-store.js.map @@ -1 +1 @@ -{"version":3,"file":"s3-store.js","sourceRoot":"","sources":["../src/s3-store.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;;;AAEzD,gDAAuB;AACvB,2DAA6B;AAE7B,wDAA+B;AAE/B,+BAAmE;AAEnE,kDAK2B;AAE3B,wEAA4D;AAE5D,gCAAgC;AAEhC,QAAQ,CAAC,QAAQ,GAAG;IAClB,KAAK,EAAE,KAAK;IAEZ,MAAM,EAAE,IAAA,YAAK,EAAC,cAAc,CAAC;IAC7B,MAAM,EAAE,IAAA,YAAK,EAAC,OAAO,CAAC;IACtB,MAAM,EAAE,IAAA,UAAG,GAAE;IACb,EAAE,EAAE,EAAE;IAEN,yBAAyB;IACzB,GAAG,EAAE,IAAA,WAAI,EAAC,EAAE,CAAC;IAEb,MAAM,EAAE,IAAA,WAAI,EAAC,EAAE,CAAC;IAEhB,+DAA+D;IAC/D,KAAK,EAAE;QACL,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,EAAE;QACV,KAAK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E,UAAU,EAAE,CAAC,CAAA;AAC9D,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAA"} \ No newline at end of file diff --git a/package.json b/package.json index e1e155b..2bbf7c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@seneca/s3-store", - "version": "1.1.0", + "version": "2.0.0", "description": "Entity store using AWS S3.", "main": "dist/s3-store.js", "type": "commonjs", diff --git a/src/s3-store.ts b/src/s3-store.ts index 53d079e..711e12a 100644 --- a/src/s3-store.ts +++ b/src/s3-store.ts @@ -71,7 +71,7 @@ async function s3_store(this: any, options: any) { let local_folder: string = '' - seneca.init(function(reply: () => void) { + seneca.init(function (reply: () => void) { if (options.local.active) { let folder: string = options.local.folder local_folder = @@ -116,8 +116,7 @@ async function s3_store(this: any, options: any) { // .on('ready', () => console.log('WATCH initial scan complete. ready for changes')); } } - } - else { + } else { const s3_opts = { s3ForcePathStyle: true, ...options.s3, @@ -130,7 +129,7 @@ async function s3_store(this: any, options: any) { let store = { name: 's3-store', - save: function(msg: any, reply: any) { + save: function (msg: any, reply: any) { // console.log('MSG', msg) let canon = msg.ent.entity$ @@ -225,7 +224,7 @@ async function s3_store(this: any, options: any) { } }, - load: function(msg: any, reply: any) { + load: function (msg: any, reply: any) { let canon = msg.ent.entity$ let qent = msg.qent let id = '' + msg.q.id @@ -313,11 +312,11 @@ async function s3_store(this: any, options: any) { }, // NOTE: S3 folder listing not supported yet. - list: function(_msg: any, reply: any) { + list: function (_msg: any, reply: any) { reply([]) }, - remove: function(msg: any, reply: any) { + remove: function (msg: any, reply: any) { let canon = (msg.ent || msg.qent).entity$ let id = '' + msg.q.id let entSpec = options.ent[canon] @@ -360,11 +359,11 @@ async function s3_store(this: any, options: any) { } }, - close: function(_msg: any, reply: () => void) { + close: function (_msg: any, reply: () => void) { reply() }, - native: function(_msg: any, reply: any) { + native: function (_msg: any, reply: any) { reply({ client: aws_s3, local: { ...options.local } }) }, } @@ -432,7 +431,6 @@ async function s3_store(this: any, options: any) { } } - const makeGatewayHandler = (msg: object) => { const gatewayHandler = { name: 's3', @@ -441,11 +439,14 @@ async function s3_store(this: any, options: any) { console.log('S3 MATCHED', matched, trigger) return matched }, - process: async function( - this: typeof seneca, trigger: { record: any, event: any }, gateway: Function) { + process: async function ( + this: typeof seneca, + trigger: { record: any; event: any }, + gateway: Function, + ) { let { record, event } = trigger return gateway({ ...msg, record, event }, trigger) - } + }, } return gatewayHandler } @@ -465,11 +466,11 @@ function make_s3id(id: string, ent: any, options: any, bin: boolean) { null == id ? null : (null == options.folder - ? options.prefix + ent.entity$ - : options.folder) + - ('' == options.folder ? '' : '/') + - id + - (bin ? '' : options.suffix) + ? options.prefix + ent.entity$ + : options.folder) + + ('' == options.folder ? '' : '/') + + id + + (bin ? '' : options.suffix) // console.log('make_s3id', s3id, id, ent, options) return s3id diff --git a/test/coverage.html b/test/coverage.html index 947ec26..bd9d33a 100644 --- a/test/coverage.html +++ b/test/coverage.html @@ -547,7 +547,7 @@