mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-08 07:00:54 +03:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea1ea2aa68 | ||
|
|
90d06d71d3 | ||
|
|
11f2deb7a6 | ||
|
|
0f5edf023a | ||
|
|
3be0621647 | ||
|
|
fc07bfdb85 | ||
|
|
581a989304 | ||
|
|
047d6a85ab | ||
|
|
90f6a07d4a | ||
|
|
8f4a53db64 | ||
|
|
c2dd51c638 | ||
|
|
cdd98af86a | ||
|
|
883f2bc0f9 | ||
|
|
94f1eabbc7 | ||
|
|
902bc6628e | ||
|
|
460b741f17 | ||
|
|
d5c488196d | ||
|
|
9ad9c9feb2 | ||
|
|
6576e4a74c | ||
|
|
950872109e | ||
|
|
87051d27ed | ||
|
|
3451803b37 | ||
|
|
ac15153e8f | ||
|
|
924f5dc682 | ||
|
|
ff9be6a213 | ||
|
|
883728570e | ||
|
|
0435f17f9a | ||
|
|
1e1268fff0 | ||
|
|
252d7817e3 |
@@ -1,10 +1,8 @@
|
|||||||
node_modules
|
.circleci
|
||||||
.git
|
|
||||||
.tox
|
|
||||||
.DS_Store
|
|
||||||
firefox
|
|
||||||
assets
|
|
||||||
docs
|
|
||||||
test
|
|
||||||
coverage
|
|
||||||
.nyc_output
|
.nyc_output
|
||||||
|
.vscode
|
||||||
|
.DS_Store
|
||||||
|
coverage
|
||||||
|
docs
|
||||||
|
firefox
|
||||||
|
node_modules
|
||||||
60
Dockerfile
60
Dockerfile
@@ -1,19 +1,59 @@
|
|||||||
FROM node:10 AS builder
|
##
|
||||||
RUN addgroup --gid 10001 app && adduser --disabled-password --gecos '' --gid 10001 --home /app --uid 10001 app
|
# Firefox Send - Mozilla
|
||||||
COPY package*.json /app/
|
#
|
||||||
WORKDIR /app
|
# License https://github.com/mozilla/send/blob/master/LICENSE
|
||||||
RUN npm install --production
|
##
|
||||||
|
|
||||||
FROM node:10-slim
|
|
||||||
RUN addgroup --gid 10001 app && adduser --disabled-password --gecos '' --gid 10001 --home /app --uid 10001 app
|
# Build project
|
||||||
|
FROM node:10 AS builder
|
||||||
|
RUN set -x \
|
||||||
|
# Add user
|
||||||
|
&& addgroup --gid 10001 app \
|
||||||
|
&& adduser --disabled-password \
|
||||||
|
--gecos '' \
|
||||||
|
--gid 10001 \
|
||||||
|
--home /app \
|
||||||
|
--uid 10001 \
|
||||||
|
app
|
||||||
|
COPY --chown=app:app . /app
|
||||||
USER app
|
USER app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --chown=app:app --from=builder /app .
|
RUN ls -la
|
||||||
COPY --chown=app:app . .
|
RUN set -x \
|
||||||
|
# Build
|
||||||
|
&& npm ci \
|
||||||
|
&& npm run build
|
||||||
|
|
||||||
|
|
||||||
|
# Main image
|
||||||
|
FROM node:10-slim
|
||||||
|
RUN set -x \
|
||||||
|
# Add user
|
||||||
|
&& addgroup --gid 10001 app \
|
||||||
|
&& adduser --disabled-password \
|
||||||
|
--gecos '' \
|
||||||
|
--gid 10001 \
|
||||||
|
--home /app \
|
||||||
|
--uid 10001 \
|
||||||
|
app
|
||||||
|
RUN apt-get update && apt-get -y install git-core
|
||||||
|
USER app
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --chown=app:app package*.json ./
|
||||||
|
COPY --chown=app:app app app
|
||||||
|
COPY --chown=app:app common common
|
||||||
|
COPY --chown=app:app public/locales public/locales
|
||||||
|
COPY --chown=app:app server server
|
||||||
|
COPY --chown=app:app --from=builder /app/dist dist
|
||||||
|
|
||||||
|
RUN ls -la
|
||||||
|
RUN npm ci --production && npm cache clean --force
|
||||||
RUN mkdir -p /app/.config/configstore
|
RUN mkdir -p /app/.config/configstore
|
||||||
RUN ln -s dist/version.json version.json
|
RUN ln -s dist/version.json version.json
|
||||||
|
|
||||||
ENV PORT=1443
|
ENV PORT=1443
|
||||||
EXPOSE $PORT
|
|
||||||
|
EXPOSE ${PORT}
|
||||||
|
|
||||||
CMD ["node", "server/bin/prod.js"]
|
CMD ["node", "server/bin/prod.js"]
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ A file sharing experiment which allows you to send encrypted files to other user
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- [Node.js 10.0+](https://nodejs.org/)
|
- [Node.js 10.x](https://nodejs.org/)
|
||||||
- [Redis server](https://redis.io/) (optional for development)
|
- [Redis server](https://redis.io/) (optional for development)
|
||||||
- [AWS S3](https://aws.amazon.com/s3/) or compatible service. (optional)
|
- [AWS S3](https://aws.amazon.com/s3/) or compatible service. (optional)
|
||||||
|
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ async function polyfillStreams() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default async function getCapabilities() {
|
export default async function getCapabilities() {
|
||||||
const serviceWorker =
|
const browser = browserName();
|
||||||
'serviceWorker' in navigator && browserName() !== 'edge';
|
const serviceWorker = 'serviceWorker' in navigator && browser !== 'edge';
|
||||||
let crypto = await checkCrypto();
|
let crypto = await checkCrypto();
|
||||||
const nativeStreams = checkStreams();
|
const nativeStreams = checkStreams();
|
||||||
let polyStreams = false;
|
let polyStreams = false;
|
||||||
@@ -97,13 +97,16 @@ export default async function getCapabilities() {
|
|||||||
window.matchMedia('(display-mode: standalone)').matches ||
|
window.matchMedia('(display-mode: standalone)').matches ||
|
||||||
navigator.standalone;
|
navigator.standalone;
|
||||||
|
|
||||||
|
const mobileFirefox =
|
||||||
|
browser === 'firefox' && /mobile/i.test(navigator.userAgent);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
account,
|
account,
|
||||||
crypto,
|
crypto,
|
||||||
serviceWorker,
|
serviceWorker,
|
||||||
streamUpload: nativeStreams || polyStreams,
|
streamUpload: nativeStreams || polyStreams,
|
||||||
streamDownload:
|
streamDownload:
|
||||||
nativeStreams && serviceWorker && browserName() !== 'safari',
|
nativeStreams && serviceWorker && browser !== 'safari' && !mobileFirefox,
|
||||||
multifile: nativeStreams || polyStreams,
|
multifile: nativeStreams || polyStreams,
|
||||||
share,
|
share,
|
||||||
standalone
|
standalone
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ if (process.env.NODE_ENV === 'production') {
|
|||||||
fileInfo: null
|
fileInfo: null
|
||||||
};
|
};
|
||||||
|
|
||||||
const app = routes(choo());
|
const app = routes(choo({ hash: true }));
|
||||||
// eslint-disable-next-line require-atomic-updates
|
// eslint-disable-next-line require-atomic-updates
|
||||||
window.app = app;
|
window.app = app;
|
||||||
app.use(experiments);
|
app.use(experiments);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ const choo = require('choo');
|
|||||||
const download = require('./ui/download');
|
const download = require('./ui/download');
|
||||||
const body = require('./ui/body');
|
const body = require('./ui/body');
|
||||||
|
|
||||||
module.exports = function(app = choo()) {
|
module.exports = function(app = choo({ hash: true })) {
|
||||||
app.route('/', body(require('./ui/home')));
|
app.route('/', body(require('./ui/home')));
|
||||||
app.route('/download/:id', body(download));
|
app.route('/download/:id', body(download));
|
||||||
app.route('/download/:id/:key', body(download));
|
app.route('/download/:id/:key', body(download));
|
||||||
|
|||||||
@@ -11,13 +11,14 @@ const map = new Map();
|
|||||||
const IMAGES = /.*\.(png|svg|jpg)$/;
|
const IMAGES = /.*\.(png|svg|jpg)$/;
|
||||||
const VERSIONED_ASSET = /\.[A-Fa-f0-9]{8}\.(js|css|png|svg|jpg)$/;
|
const VERSIONED_ASSET = /\.[A-Fa-f0-9]{8}\.(js|css|png|svg|jpg)$/;
|
||||||
const DOWNLOAD_URL = /\/api\/download\/([A-Fa-f0-9]{4,})/;
|
const DOWNLOAD_URL = /\/api\/download\/([A-Fa-f0-9]{4,})/;
|
||||||
|
const FONT = /\.woff2?$/;
|
||||||
|
|
||||||
self.addEventListener('install', event => {
|
self.addEventListener('install', () => {
|
||||||
event.waitUntil(precache());
|
self.skipWaiting();
|
||||||
});
|
});
|
||||||
|
|
||||||
self.addEventListener('activate', event => {
|
self.addEventListener('activate', event => {
|
||||||
event.waitUntil(self.clients.claim());
|
event.waitUntil(self.clients.claim().then(precache));
|
||||||
});
|
});
|
||||||
|
|
||||||
async function decryptStream(id) {
|
async function decryptStream(id) {
|
||||||
@@ -83,16 +84,28 @@ async function decryptStream(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function precache() {
|
async function precache() {
|
||||||
|
try {
|
||||||
|
await cleanCache();
|
||||||
|
const cache = await caches.open(version);
|
||||||
|
const images = assets.match(IMAGES);
|
||||||
|
await cache.addAll(images);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
// cache will get populated on demand
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function cleanCache() {
|
||||||
const oldCaches = await caches.keys();
|
const oldCaches = await caches.keys();
|
||||||
for (const c of oldCaches) {
|
for (const c of oldCaches) {
|
||||||
if (c !== version) {
|
if (c !== version) {
|
||||||
await caches.delete(c);
|
await caches.delete(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const cache = await caches.open(version);
|
}
|
||||||
const images = assets.match(IMAGES);
|
|
||||||
await cache.addAll(images);
|
function cacheable(url) {
|
||||||
return self.skipWaiting();
|
return VERSIONED_ASSET.test(url) || FONT.test(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function cachedOrFetched(req) {
|
async function cachedOrFetched(req) {
|
||||||
@@ -102,7 +115,7 @@ async function cachedOrFetched(req) {
|
|||||||
return cached;
|
return cached;
|
||||||
}
|
}
|
||||||
const fetched = await fetch(req);
|
const fetched = await fetch(req);
|
||||||
if (fetched.ok && VERSIONED_ASSET.test(req.url)) {
|
if (fetched.ok && cacheable(req.url)) {
|
||||||
cache.put(req, fetched.clone());
|
cache.put(req, fetched.clone());
|
||||||
}
|
}
|
||||||
return fetched;
|
return fetched;
|
||||||
@@ -115,7 +128,7 @@ self.onfetch = event => {
|
|||||||
const dlmatch = DOWNLOAD_URL.exec(url.pathname);
|
const dlmatch = DOWNLOAD_URL.exec(url.pathname);
|
||||||
if (dlmatch) {
|
if (dlmatch) {
|
||||||
event.respondWith(decryptStream(dlmatch[1]));
|
event.respondWith(decryptStream(dlmatch[1]));
|
||||||
} else if (VERSIONED_ASSET.test(url.pathname)) {
|
} else if (cacheable(url.pathname)) {
|
||||||
event.respondWith(cachedOrFetched(req));
|
event.respondWith(cachedOrFetched(req));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# Custom Loaders
|
# Custom Loaders
|
||||||
|
|
||||||
## Generate Asset Map
|
## Android Index Plugin
|
||||||
|
|
||||||
This loader enumerates all the files in `assets/` so that `common/assets.js` can provide mappings from the source filename to the hashed filename used on the site.
|
Generates the `index.html` page for the native android client
|
||||||
|
|
||||||
## Version Plugin
|
## Version Plugin
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const genmap = require('../build/generate_asset_map');
|
const genmap = require('./generate_asset_map');
|
||||||
const isServer = typeof genmap === 'function';
|
const isServer = typeof genmap === 'function';
|
||||||
let prefix = '';
|
let prefix = '';
|
||||||
let manifest = {};
|
let manifest = {};
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
# Common Code
|
# Common Code
|
||||||
|
|
||||||
This directory contains code loaded by both the frontend `app` and backend `server`. The code here can be challenging to understand at first because the contexts for the two (three counting the dev server) environments that include them are quite different, but the purpose of these modules are quite simple, to provide mappings from the source assets (`copy-16.png`) to the concrete production assets (`copy-16.db66e0bf.svg`).
|
This directory contains code loaded by both the frontend `app` and backend `server`. The code here can be challenging to understand at first because the contexts for the two (three counting the dev server) environments that include them are quite different, but the purpose of these modules are quite simple, to provide mappings from the source assets (`copy-16.png`) to the concrete production assets (`copy-16.db66e0bf.svg`).
|
||||||
|
|
||||||
|
## Generate Asset Map
|
||||||
|
|
||||||
|
This loader enumerates all the files in `assets/` so that `common/assets.js` can provide mappings from the source filename to the hashed filename used on the site.
|
||||||
@@ -1,13 +1,6 @@
|
|||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
Before building the Docker image, you must build the production assets:
|
Run `docker build -t send:latest .` to create an image or `docker-compose up` to run a full testable stack. *We don't recommend using docker-compose for production.*
|
||||||
|
|
||||||
```sh
|
|
||||||
npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
Then you can run either `docker build` or `docker-compose up`.
|
|
||||||
|
|
||||||
|
|
||||||
## Environment variables:
|
## Environment variables:
|
||||||
|
|
||||||
|
|||||||
1686
package-lock.json
generated
1686
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
59
package.json
59
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "firefox-send",
|
"name": "firefox-send",
|
||||||
"description": "File Sharing Experiment",
|
"description": "File Sharing Experiment",
|
||||||
"version": "3.0.16",
|
"version": "3.0.19",
|
||||||
"author": "Mozilla (https://mozilla.org)",
|
"author": "Mozilla (https://mozilla.org)",
|
||||||
"repository": "mozilla/send",
|
"repository": "mozilla/send",
|
||||||
"homepage": "https://github.com/mozilla/send/",
|
"homepage": "https://github.com/mozilla/send/",
|
||||||
@@ -35,7 +35,8 @@
|
|||||||
"hooks": {
|
"hooks": {
|
||||||
"pre-commit": "lint-staged",
|
"pre-commit": "lint-staged",
|
||||||
"pre-push": "npm test",
|
"pre-push": "npm test",
|
||||||
"post-merge": "npm install"
|
"post-merge": "npm install",
|
||||||
|
"post-checkout": "scripts/sync-npm-dependencies.sh"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
@@ -57,17 +58,17 @@
|
|||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0 <11.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.5.5",
|
"@babel/core": "^7.6.0",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.5.5",
|
"@babel/plugin-proposal-class-properties": "^7.5.5",
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||||
"@babel/preset-env": "^7.5.5",
|
"@babel/preset-env": "^7.6.0",
|
||||||
"@dannycoates/webcrypto-liner": "^0.1.37",
|
"@dannycoates/webcrypto-liner": "^0.1.37",
|
||||||
"@fullhuman/postcss-purgecss": "^1.2.0",
|
"@fullhuman/postcss-purgecss": "^1.3.0",
|
||||||
"@mattiasbuelens/web-streams-polyfill": "0.2.1",
|
"@mattiasbuelens/web-streams-polyfill": "0.2.1",
|
||||||
"@sentry/browser": "^5.6.1",
|
"@sentry/browser": "^5.6.3",
|
||||||
"asmcrypto.js": "^0.22.0",
|
"asmcrypto.js": "^0.22.0",
|
||||||
"babel-loader": "^8.0.6",
|
"babel-loader": "^8.0.6",
|
||||||
"babel-plugin-istanbul": "^5.2.0",
|
"babel-plugin-istanbul": "^5.2.0",
|
||||||
@@ -76,14 +77,14 @@
|
|||||||
"copy-webpack-plugin": "^5.0.4",
|
"copy-webpack-plugin": "^5.0.4",
|
||||||
"core-js": "^3.2.1",
|
"core-js": "^3.2.1",
|
||||||
"crc": "^3.8.0",
|
"crc": "^3.8.0",
|
||||||
"cross-env": "^5.2.0",
|
"cross-env": "^5.2.1",
|
||||||
"css-loader": "^3.2.0",
|
"css-loader": "^3.2.0",
|
||||||
"css-mqpacker": "^7.0.0",
|
"css-mqpacker": "^7.0.0",
|
||||||
"cssnano": "^4.1.10",
|
"cssnano": "^4.1.10",
|
||||||
"eslint": "^6.1.0",
|
"eslint": "^6.4.0",
|
||||||
"eslint-config-prettier": "^6.0.0",
|
"eslint-config-prettier": "^6.3.0",
|
||||||
"eslint-plugin-mocha": "^6.0.0",
|
"eslint-plugin-mocha": "^6.1.1",
|
||||||
"eslint-plugin-node": "^9.1.0",
|
"eslint-plugin-node": "^9.2.0",
|
||||||
"eslint-plugin-security": "^1.4.0",
|
"eslint-plugin-security": "^1.4.0",
|
||||||
"expose-loader": "^0.7.5",
|
"expose-loader": "^0.7.5",
|
||||||
"extract-loader": "^3.1.0",
|
"extract-loader": "^3.1.0",
|
||||||
@@ -93,13 +94,13 @@
|
|||||||
"git-rev-sync": "^1.12.0",
|
"git-rev-sync": "^1.12.0",
|
||||||
"html-loader": "^0.5.5",
|
"html-loader": "^0.5.5",
|
||||||
"http_ece": "^1.1.0",
|
"http_ece": "^1.1.0",
|
||||||
"husky": "^3.0.3",
|
"husky": "^3.0.5",
|
||||||
"intl-pluralrules": "^1.0.3",
|
"intl-pluralrules": "^1.0.3",
|
||||||
"lint-staged": "^9.2.1",
|
"lint-staged": "^9.3.0",
|
||||||
"mocha": "^6.2.0",
|
"mocha": "^6.2.0",
|
||||||
"morgan": "^1.9.1",
|
"morgan": "^1.9.1",
|
||||||
"nanobus": "^4.4.0",
|
"nanobus": "^4.4.0",
|
||||||
"nanohtml": "^1.7.0",
|
"nanohtml": "^1.8.1",
|
||||||
"nanotiming": "^7.3.1",
|
"nanotiming": "^7.3.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"nyc": "^14.1.1",
|
"nyc": "^14.1.1",
|
||||||
@@ -107,19 +108,19 @@
|
|||||||
"postcss-preset-env": "^6.7.0",
|
"postcss-preset-env": "^6.7.0",
|
||||||
"prettier": "^1.18.2",
|
"prettier": "^1.18.2",
|
||||||
"proxyquire": "^2.1.3",
|
"proxyquire": "^2.1.3",
|
||||||
"puppeteer": "^1.19.0",
|
"puppeteer": "^1.20.0",
|
||||||
"raw-loader": "^3.1.0",
|
"raw-loader": "^3.1.0",
|
||||||
"redis-mock": "^0.45.0",
|
"redis-mock": "^0.46.0",
|
||||||
"rimraf": "^2.6.3",
|
"rimraf": "^3.0.0",
|
||||||
"script-loader": "^0.7.2",
|
"script-loader": "^0.7.2",
|
||||||
"sinon": "^7.4.1",
|
"sinon": "^7.5.0",
|
||||||
"string-hash": "^1.1.3",
|
"string-hash": "^1.1.3",
|
||||||
"stylelint": "^10.1.0",
|
"stylelint": "^10.1.0",
|
||||||
"stylelint-config-standard": "^18.3.0",
|
"stylelint-config-standard": "^18.3.0",
|
||||||
"stylelint-no-unsupported-browser-features": "^3.0.2",
|
"stylelint-no-unsupported-browser-features": "^3.0.2",
|
||||||
"svgo": "^1.3.0",
|
"svgo": "^1.3.0",
|
||||||
"svgo-loader": "^2.2.1",
|
"svgo-loader": "^2.2.1",
|
||||||
"tailwindcss": "^1.1.1",
|
"tailwindcss": "^1.1.2",
|
||||||
"val-loader": "^1.1.1",
|
"val-loader": "^1.1.1",
|
||||||
"wdio-docker-service": "^1.4.2",
|
"wdio-docker-service": "^1.4.2",
|
||||||
"wdio-dot-reporter": "0.0.10",
|
"wdio-dot-reporter": "0.0.10",
|
||||||
@@ -130,27 +131,27 @@
|
|||||||
"wdio-spec-reporter": "^0.1.5",
|
"wdio-spec-reporter": "^0.1.5",
|
||||||
"webdriverio": "^4.14.4",
|
"webdriverio": "^4.14.4",
|
||||||
"webpack": "4.38.0",
|
"webpack": "4.38.0",
|
||||||
"webpack-cli": "^3.3.6",
|
"webpack-cli": "^3.3.9",
|
||||||
"webpack-dev-middleware": "^3.7.0",
|
"webpack-dev-middleware": "^3.7.1",
|
||||||
"webpack-dev-server": "^3.8.0",
|
"webpack-dev-server": "^3.8.1",
|
||||||
"webpack-manifest-plugin": "^2.0.4",
|
"webpack-manifest-plugin": "^2.1.0",
|
||||||
"webpack-unassert-loader": "^1.2.0"
|
"webpack-unassert-loader": "^1.2.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dannycoates/express-ws": "^5.0.3",
|
"@dannycoates/express-ws": "^5.0.3",
|
||||||
"@fluent/bundle": "^0.13.0",
|
"@fluent/bundle": "^0.13.0",
|
||||||
"@fluent/langneg": "^0.3.0",
|
"@fluent/langneg": "^0.3.0",
|
||||||
"@google-cloud/storage": "^3.1.0",
|
"@google-cloud/storage": "^3.3.0",
|
||||||
"@sentry/node": "^5.6.1",
|
"@sentry/node": "^5.6.2",
|
||||||
"aws-sdk": "^2.507.0",
|
"aws-sdk": "^2.533.0",
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
"choo": "^6.13.3",
|
"choo": "^7.0.0",
|
||||||
"cldr-core": "^35.1.0",
|
"cldr-core": "^35.1.0",
|
||||||
"configstore": "github:dannycoates/configstore#master",
|
"configstore": "github:dannycoates/configstore#master",
|
||||||
"convict": "^5.1.0",
|
"convict": "^5.1.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"fxa-geodb": "^1.0.4",
|
"fxa-geodb": "^1.0.4",
|
||||||
"helmet": "^3.20.0",
|
"helmet": "^3.21.1",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.1",
|
||||||
"mozlog": "^2.2.0",
|
"mozlog": "^2.2.0",
|
||||||
"node-fetch": "^2.6.0",
|
"node-fetch": "^2.6.0",
|
||||||
|
|||||||
@@ -182,4 +182,5 @@ shareLinkDescription = شارِك الرابط الذي يصل إلى الملف
|
|||||||
shareLinkButton = شارِك الرابط
|
shareLinkButton = شارِك الرابط
|
||||||
# $name is the name of the file
|
# $name is the name of the file
|
||||||
shareMessage = نزِّل ”{ $name }“ عبر { -send-brand }: خدمة لمشاركة الملفات بلا عناء وبخصوصية تامة
|
shareMessage = نزِّل ”{ $name }“ عبر { -send-brand }: خدمة لمشاركة الملفات بلا عناء وبخصوصية تامة
|
||||||
|
trailheadPromo = يمكنك حماية خصوصيتك، طبعا. انضم إلى فَيَرفُكس.
|
||||||
learnMore = اطّلع على المزيد.
|
learnMore = اطّلع على المزيد.
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ addPassword = Protegido con contraseña
|
|||||||
emailPlaceholder = Ingresa tu correo electrónico
|
emailPlaceholder = Ingresa tu correo electrónico
|
||||||
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
||||||
signInSizeBump = Iniciar sesión para enviar hasta { $size }
|
signInSizeBump = Iniciar sesión para enviar hasta { $size }
|
||||||
signInButton = Iniciar sesión/registrarse
|
signInOnlyButton = Iniciar sesión
|
||||||
accountBenefitTitle = Crear una cuenta de { -firefox } o iniciar sesión
|
accountBenefitTitle = Crear una cuenta de { -firefox } o iniciar sesión
|
||||||
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
||||||
accountBenefitLargeFiles = Compartir archivos de hasta { $size }
|
accountBenefitLargeFiles = Compartir archivos de hasta { $size }
|
||||||
@@ -145,3 +145,11 @@ noStreamsWarning = Puede que este navegador no pueda descifrar un archivo tan gr
|
|||||||
noStreamsOptionCopy = Copiar el enlace para abrir en otro navegador
|
noStreamsOptionCopy = Copiar el enlace para abrir en otro navegador
|
||||||
noStreamsOptionFirefox = Prueba nuestro navegador favorito
|
noStreamsOptionFirefox = Prueba nuestro navegador favorito
|
||||||
noStreamsOptionDownload = Continuar con este navegador
|
noStreamsOptionDownload = Continuar con este navegador
|
||||||
|
downloadFirefoxPromo = { -send-short-brand } te lo ofrece el nuevo { -firefox }.
|
||||||
|
# the next line after the colon contains a file name
|
||||||
|
shareLinkDescription = Comparte el enlace a tu archivo:
|
||||||
|
shareLinkButton = Enlace para compartir
|
||||||
|
# $name is the name of the file
|
||||||
|
shareMessage = Descarga «{ $name }» con { -send-brand }: es sencillo y seguro
|
||||||
|
trailheadPromo = Existe una forma de proteger tu privacidad. Únete a Firefox.
|
||||||
|
learnMore = Saber más.
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ passwordSetError = امکان ثبت این گذواژه نیست
|
|||||||
-send-short-brand = ارسال
|
-send-short-brand = ارسال
|
||||||
-firefox = فایرفاکس
|
-firefox = فایرفاکس
|
||||||
-mozilla = موزیلا
|
-mozilla = موزیلا
|
||||||
|
introTitle = اشتراکگذاری ساده و خصوصیِ پروندهها
|
||||||
# byte abbreviation
|
# byte abbreviation
|
||||||
bytes = B
|
bytes = B
|
||||||
# kibibyte abbreviation
|
# kibibyte abbreviation
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
# Firefox Send is a brand name and should not be localized.
|
# Firefox Send is a brand name and should not be localized.
|
||||||
title = Firefox Send
|
title = Firefox Send
|
||||||
siteFeedback = משוב
|
siteFeedback = משוב
|
||||||
importingFile = מתבצע ייבוא...
|
importingFile = מתבצע ייבוא…
|
||||||
encryptingFile = מתבצעת הצפנה...
|
encryptingFile = מתבצעת הצפנה...
|
||||||
decryptingFile = מתבצע פענוח...
|
decryptingFile = מתבצע פענוח...
|
||||||
downloadCount =
|
downloadCount =
|
||||||
{ $num ->
|
{ $num ->
|
||||||
[one] הורדה אחת
|
[one] הורדה אחת
|
||||||
*[other] { $number } הורדות
|
*[other] { $num } הורדות
|
||||||
}
|
}
|
||||||
timespanHours =
|
timespanHours =
|
||||||
{ $num ->
|
{ $num ->
|
||||||
[one] שעה אחת
|
[one] שעה אחת
|
||||||
[two] שעתיים
|
[two] שעתיים
|
||||||
*[other] { $number } שעות
|
*[other] { $num } שעות
|
||||||
}
|
}
|
||||||
copiedUrl = הועתק!
|
copiedUrl = הועתק!
|
||||||
unlockInputPlaceholder = ססמה
|
unlockInputPlaceholder = ססמה
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ dragAndDropFiles = Traher e deponer files
|
|||||||
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
||||||
orClickWithSize = o cliccar pro inviar usque { $size }
|
orClickWithSize = o cliccar pro inviar usque { $size }
|
||||||
addPassword = Proteger per contrasigno
|
addPassword = Proteger per contrasigno
|
||||||
emailPlaceholder = Insere tu adresse email
|
emailPlaceholder = Insere tu adresse de e-mail
|
||||||
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
||||||
signInSizeBump = Accede pro inviar usque { $size }
|
signInSizeBump = Accede pro inviar usque { $size }
|
||||||
signInOnlyButton = Authentica te
|
signInOnlyButton = Authentica te
|
||||||
|
|||||||
@@ -140,4 +140,5 @@ shareLinkDescription = ファイルへのリンクを共有しましょう:
|
|||||||
shareLinkButton = リンクを共有
|
shareLinkButton = リンクを共有
|
||||||
# $name is the name of the file
|
# $name is the name of the file
|
||||||
shareMessage = { -send-brand } で "{ $name }" をダウンロード: シンプルで安全なファイル共有
|
shareMessage = { -send-brand } で "{ $name }" をダウンロード: シンプルで安全なファイル共有
|
||||||
|
trailheadPromo = プライバシーを保護する方法があります。Firefox を試してください。
|
||||||
learnMore = 詳細情報
|
learnMore = 詳細情報
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ importingFile = 가져오는 중…
|
|||||||
encryptingFile = 암호화 중…
|
encryptingFile = 암호화 중…
|
||||||
decryptingFile = 복호화 중…
|
decryptingFile = 복호화 중…
|
||||||
downloadCount = 다운로드 { $num }회
|
downloadCount = 다운로드 { $num }회
|
||||||
timespanHours = 1 시간
|
timespanHours = { $num }시간
|
||||||
copiedUrl = 복사 완료!
|
copiedUrl = 복사 완료!
|
||||||
unlockInputPlaceholder = 비밀번호
|
unlockInputPlaceholder = 비밀번호
|
||||||
unlockButtonLabel = 잠금 해제
|
unlockButtonLabel = 잠금 해제
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ passwordSetError = Essa senha não pôde ser definida
|
|||||||
-firefox = Firefox
|
-firefox = Firefox
|
||||||
-mozilla = Mozilla
|
-mozilla = Mozilla
|
||||||
introTitle = Compartilhamento de arquivos fácil e privativo
|
introTitle = Compartilhamento de arquivos fácil e privativo
|
||||||
introDescription = O { -send-brand } permite compartilhar arquivos com criptografia ponto a ponto e um link que expira automaticamente. Assim você pode manter o que compartilha privativo e ter certeza que suas coisas não ficarão online para sempre.
|
introDescription = O { -send-brand } permite compartilhar arquivos com criptografia de ponta a ponta e um link que expira automaticamente. Assim você pode manter o que compartilha privativo e ter certeza que suas coisas não ficarão online para sempre.
|
||||||
notifyUploadEncryptDone = Seu arquivo foi criptografado e está pronto para ser enviado
|
notifyUploadEncryptDone = Seu arquivo foi criptografado e está pronto para ser enviado
|
||||||
# downloadCount is from the downloadCount string and timespan is a timespanMinutes string. ex. 'Expires after 2 downloads or 25 minutes'
|
# downloadCount is from the downloadCount string and timespan is a timespanMinutes string. ex. 'Expires after 2 downloads or 25 minutes'
|
||||||
archiveExpiryInfo = Expirar após { $downloadCount } ou { $timespan }
|
archiveExpiryInfo = Expirar após { $downloadCount } ou { $timespan }
|
||||||
@@ -94,7 +94,7 @@ totalSize = Tamanho total: { $size }
|
|||||||
copyLinkDescription = Copie o link para compartilhar seu arquivo:
|
copyLinkDescription = Copie o link para compartilhar seu arquivo:
|
||||||
copyLinkButton = Copiar link
|
copyLinkButton = Copiar link
|
||||||
downloadTitle = Baixar arquivos
|
downloadTitle = Baixar arquivos
|
||||||
downloadDescription = Este arquivo foi compartilhado via { -send-brand } com criptografia ponto a ponto e um link que expira automaticamente.
|
downloadDescription = Este arquivo foi compartilhado via { -send-brand } com criptografia de ponta a ponta e um link que expira automaticamente.
|
||||||
trySendDescription = Experimente o { -send-brand } para compartilhamento de arquivos simples e seguro.
|
trySendDescription = Experimente o { -send-brand } para compartilhamento de arquivos simples e seguro.
|
||||||
# count will always be > 10
|
# count will always be > 10
|
||||||
tooManyFiles =
|
tooManyFiles =
|
||||||
@@ -127,17 +127,17 @@ emailPlaceholder = Informe seu e-mail
|
|||||||
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
||||||
signInSizeBump = Entre na sua conta para enviar até { $size }
|
signInSizeBump = Entre na sua conta para enviar até { $size }
|
||||||
signInOnlyButton = Entrar
|
signInOnlyButton = Entrar
|
||||||
accountBenefitTitle = Crie uma Conta { -firefox } ou entre na sua conta
|
accountBenefitTitle = Crie uma Conta { -firefox } ou entre se já tiver
|
||||||
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
||||||
accountBenefitLargeFiles = Compartilhe arquivos até { $size }
|
accountBenefitLargeFiles = Compartilhe arquivos até { $size }.
|
||||||
accountBenefitDownloadCount = Compartilhe arquivos com mais pessoas
|
accountBenefitDownloadCount = Compartilhe arquivos com mais pessoas.
|
||||||
accountBenefitTimeLimit =
|
accountBenefitTimeLimit =
|
||||||
{ $count ->
|
{ $count ->
|
||||||
[one] Mantenha links ativos por até 1 dia
|
[one] Mantenha links ativos por até 1 dia.
|
||||||
*[other] Mantenha links ativos por até { $count } dias
|
*[other] Mantenha links ativos por até { $count } dias.
|
||||||
}
|
}
|
||||||
accountBenefitSync = Gerencie arquivos compartilhados a partir de qualquer dispositivo
|
accountBenefitSync = Gerencie arquivos compartilhados a partir de qualquer dispositivo.
|
||||||
accountBenefitMoz = Conheça outros serviços da { -mozilla }
|
accountBenefitMoz = Conheça outros serviços da { -mozilla }.
|
||||||
signOut = Sair
|
signOut = Sair
|
||||||
okButton = OK
|
okButton = OK
|
||||||
downloadingTitle = Baixando
|
downloadingTitle = Baixando
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ totalSize = Tổng kích thước: { $size }
|
|||||||
# the next line after the colon contains a file name
|
# the next line after the colon contains a file name
|
||||||
copyLinkDescription = Sao chép liên kết để chia sẻ tập tin của bạn:
|
copyLinkDescription = Sao chép liên kết để chia sẻ tập tin của bạn:
|
||||||
copyLinkButton = Sao chép liên kết
|
copyLinkButton = Sao chép liên kết
|
||||||
downloadTitle = Tải tập tin
|
downloadTitle = Tải xuống tập tin
|
||||||
downloadDescription = Tập tin này đã được chia sẻ qua { -send-brand } với mã hóa đầu cuối và liên kết tự động hết hạn.
|
downloadDescription = Tập tin này đã được chia sẻ qua { -send-brand } với mã hóa đầu cuối và liên kết tự động hết hạn.
|
||||||
trySendDescription = Hãy thử { -send-brand } để chia sẻ tập tin đơn giản, an toàn.
|
trySendDescription = Hãy thử { -send-brand } để chia sẻ tập tin đơn giản, an toàn.
|
||||||
# count will always be > 10
|
# count will always be > 10
|
||||||
|
|||||||
13
scripts/sync-npm-dependencies.sh
Executable file
13
scripts/sync-npm-dependencies.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "checking package-lock.json for changes"
|
||||||
|
IFS=' '
|
||||||
|
read -ra G_PARAMS <<< "$HUSKY_GIT_PARAMS"
|
||||||
|
PREV=${G_PARAMS[0]}
|
||||||
|
NEXT=${G_PARAMS[1]}
|
||||||
|
if [ "$PREV" != "$NEXT" ]; then
|
||||||
|
DIFF=$(git diff $PREV $NEXT package-lock.json)
|
||||||
|
if [ "$DIFF" != "" ]; then
|
||||||
|
npm install
|
||||||
|
fi
|
||||||
|
fi
|
||||||
@@ -67,7 +67,10 @@ module.exports = function(app) {
|
|||||||
}
|
}
|
||||||
app.use(function(req, res, next) {
|
app.use(function(req, res, next) {
|
||||||
res.set('Pragma', 'no-cache');
|
res.set('Pragma', 'no-cache');
|
||||||
res.set('Cache-Control', 'no-cache');
|
res.set(
|
||||||
|
'Cache-Control',
|
||||||
|
'private, no-cache, no-store, must-revalidate, max-age=0'
|
||||||
|
);
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
app.use(bodyParser.json());
|
app.use(bodyParser.json());
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ const serviceWorker = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
// loads all assets from assets/ for use by common/assets.js
|
// loads all assets from assets/ for use by common/assets.js
|
||||||
test: require.resolve('./build/generate_asset_map.js'),
|
test: require.resolve('./common/generate_asset_map.js'),
|
||||||
use: ['babel-loader', 'val-loader']
|
use: ['babel-loader', 'val-loader']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -176,7 +176,7 @@ const web = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
// loads all assets from assets/ for use by common/assets.js
|
// loads all assets from assets/ for use by common/assets.js
|
||||||
test: require.resolve('./build/generate_asset_map.js'),
|
test: require.resolve('./common/generate_asset_map.js'),
|
||||||
use: ['babel-loader', 'val-loader']
|
use: ['babel-loader', 'val-loader']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user