Родитель
c70d6d648f
Коммит
b8aef660e6
|
@ -1,6 +1,7 @@
|
|||
extends:
|
||||
- eslint:recommended
|
||||
- plugin:mozilla/recommended
|
||||
- plugin:node/recommended
|
||||
|
||||
env:
|
||||
node: true
|
||||
|
@ -12,6 +13,7 @@ parserOptions:
|
|||
root: true
|
||||
|
||||
rules:
|
||||
node/no-unpublished-require: off
|
||||
no-console: off
|
||||
|
||||
overrides:
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
#!/usr/bin/env node
|
||||
const fs = require("fs");
|
||||
const { URL } = require("url");
|
||||
const Hawk = require("hawk");
|
||||
const request = require("request-promise-native");
|
||||
const program = require("commander");
|
||||
const { devCredentials } = require("../lib/constants");
|
||||
const packageData = require("../package.json");
|
||||
|
||||
let endpointURL = null;
|
||||
|
@ -62,7 +59,7 @@ async function main() {
|
|||
formData.notes = program.notes;
|
||||
}
|
||||
|
||||
return await request({
|
||||
return request({
|
||||
method: "POST",
|
||||
url,
|
||||
headers: { Authorization },
|
||||
|
|
|
@ -208,7 +208,7 @@ describe("functions/accept.post", () => {
|
|||
expect(mocks.putObject.args[0][0]).to.deep.equal({
|
||||
Bucket: CONTENT_BUCKET,
|
||||
Key: imageKey,
|
||||
Body: new Buffer(imageContent),
|
||||
Body: Buffer.from(imageContent),
|
||||
ContentType: imageContentType
|
||||
});
|
||||
expect(mocks.getQueueUrl.args[0][0]).to.deep.equal({
|
||||
|
|
|
@ -39,7 +39,7 @@ global.constants = {
|
|||
ETag: '"ae1e7accaab42504a930ecc6e6aa34c2"',
|
||||
ContentType: "image/jpeg",
|
||||
Metadata: {},
|
||||
Body: new Buffer("THIS IS NOT AN IMAGE")
|
||||
Body: Buffer.from("THIS IS NOT AN IMAGE")
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -9,7 +9,7 @@
|
|||
"deploy:master": "cross-env STAGE=dev NODE_ENV=development ENABLE_DEV_AUTH=1 UPSTREAM_SERVICE_URL=https://watchdog-proxy.dev.mozaws.net/mock/upstream UPSTREAM_SERVICE_KEY=__MOCK__ METRICS_URL=https://watchdog-proxy.dev.mozaws.net/mock/log EMAIL_FROM=lorchard@mozilla.com serverless deploy",
|
||||
"info": "serverless info",
|
||||
"lint": "npm-run-all lint:*",
|
||||
"lint:js": "eslint functions lib",
|
||||
"lint:js": "eslint .",
|
||||
"prettier": "prettier --write \"{functions,lib,bin}/**/*.js\"",
|
||||
"logs": "serverless logs",
|
||||
"postlint": "nsp check -o summary",
|
||||
|
@ -23,6 +23,9 @@
|
|||
"watch:test": "onchange \"{functions,lib}/**/*.js\" -v -i -p -- npm run test",
|
||||
"client": "node bin/client.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"npm run prettier",
|
||||
|
@ -61,6 +64,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"busboy": "0.2.14",
|
||||
"eslint-plugin-node": "7.0.1",
|
||||
"hawk": "7.0.7",
|
||||
"request": "2.87.0",
|
||||
"request-promise-native": "1.0.5"
|
||||
|
|
Загрузка…
Ссылка в новой задаче