1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-08 02:24:45 +02:00

Compare commits

...

7 Commits
2.9.0 ... 2.9.1

Author SHA1 Message Date
syuilo
345084a764 2.9.1 2018-05-18 12:08:26 +09:00
syuilo
27582319fa Catch error 2018-05-18 12:08:05 +09:00
syuilo
44bb99259c Merge pull request #1597 from mei23/mei-doc1
Fix can't convert i18n docs
2018-05-18 11:29:24 +09:00
mei23
9b0e83d971 Fix can't convert i18n docs 2018-05-18 11:00:50 +09:00
syuilo
db882ebb6f Update appveyor.yml 2018-05-18 11:00:38 +09:00
syuilo
c501bf4e16 Update appveyor.yml 2018-05-18 10:53:39 +09:00
syuilo
c0eb873feb Create appveyor.yml 2018-05-18 10:41:49 +09:00
5 changed files with 55 additions and 10 deletions

41
appveyor.yml Normal file
View File

@@ -0,0 +1,41 @@
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml
environment:
matrix:
- nodejs_version: 10.1.0
cache:
- node_modules
build: off
install:
# Update Node.js
# 標準で入っている Node.js を更新します (2014/11/13 時点では、v0.10.32 が標準)
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
- node --version
# Update NPM
- npm install -g npm
- npm --version
# Update node-gyp
# 必須! node-gyp のバージョンを上げないと、ネイティブモジュールのコンパイルに失敗します
- npm install -g node-gyp
- npm install
init:
# git clone の際の改行を変換しないようにします
- git config --global core.autocrlf false
before_test:
# 設定ファイルを配置
- cp ./.travis/default.yml ./.config
- cp ./.travis/test.yml ./.config
- npm run build
test_script:
- npm test

View File

@@ -1,7 +1,7 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "2.9.0",
"version": "2.9.1",
"clientVersion": "1.0.5394",
"codename": "nighthike",
"main": "./built/index.js",

View File

@@ -127,7 +127,7 @@ gulp.task('doc:api:endpoints', async () => {
return;
}
const i18n = new I18nReplacer(lang);
html = html.replace(i18n.pattern, i18n.replacement.bind(null, null));
html = html.replace(i18n.pattern, i18n.replacement);
html = fa(html);
const htmlPath = `./built/client/docs/${lang}/api/endpoints/${ep.endpoint}.html`;
mkdirp(path.dirname(htmlPath), (mkdirErr) => {
@@ -171,7 +171,7 @@ gulp.task('doc:api:entities', async () => {
return;
}
const i18n = new I18nReplacer(lang);
html = html.replace(i18n.pattern, i18n.replacement.bind(null, null));
html = html.replace(i18n.pattern, i18n.replacement);
html = fa(html);
const htmlPath = `./built/client/docs/${lang}/api/entities/${kebab(entity.name)}.html`;
mkdirp(path.dirname(htmlPath), (mkdirErr) => {

View File

@@ -53,7 +53,7 @@ gulp.task('doc:docs', async () => {
return;
}
const i18n = new I18nReplacer(lang);
html = html.replace(i18n.pattern, i18n.replacement.bind(null, null));
html = html.replace(i18n.pattern, i18n.replacement);
html = fa(html);
const htmlPath = `./built/client/docs/${lang}/${name}.html`;
mkdirp(path.dirname(htmlPath), (mkdirErr) => {

View File

@@ -2,14 +2,18 @@ import * as Koa from 'koa';
import summaly from 'summaly';
module.exports = async (ctx: Koa.Context) => {
const summary = await summaly(ctx.query.url);
summary.icon = wrap(summary.icon);
summary.thumbnail = wrap(summary.thumbnail);
try {
const summary = await summaly(ctx.query.url);
summary.icon = wrap(summary.icon);
summary.thumbnail = wrap(summary.thumbnail);
// Cache 7days
ctx.set('Cache-Control', 'max-age=604800, immutable');
// Cache 7days
ctx.set('Cache-Control', 'max-age=604800, immutable');
ctx.body = summary;
ctx.body = summary;
} catch (e) {
ctx.status = 500;
}
};
function wrap(url: string): string {