Merge branch 'develop'
This commit is contained in:
commit
8b1e940d0a
18
package.json
18
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "swaf",
|
"name": "swaf",
|
||||||
"version": "0.24.4",
|
"version": "0.24.5",
|
||||||
"description": "Structure Web Application Framework.",
|
"description": "Structure Web Application Framework.",
|
||||||
"repository": "https://eternae.ink/ashpie/swaf",
|
"repository": "https://eternae.ink/ashpie/swaf",
|
||||||
"author": "Alice Gaudon <alice@gaudon.pro>",
|
"author": "Alice Gaudon <alice@gaudon.pro>",
|
||||||
@ -24,8 +24,6 @@
|
|||||||
"release": "yarn build && yarn lint && yarn test && cd dist && yarn publish"
|
"release": "yarn build && yarn lint && yarn test && cd dist && yarn publish"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^21.0.1",
|
|
||||||
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
||||||
"@sveltejs/eslint-config": "sveltejs/eslint-config",
|
"@sveltejs/eslint-config": "sveltejs/eslint-config",
|
||||||
"@tsconfig/svelte": "^2.0.1",
|
"@tsconfig/svelte": "^2.0.1",
|
||||||
"@types/compression": "^1.7.0",
|
"@types/compression": "^1.7.0",
|
||||||
@ -66,12 +64,6 @@
|
|||||||
"node-fetch": "^3.0.0",
|
"node-fetch": "^3.0.0",
|
||||||
"nodemon": "^2.0.6",
|
"nodemon": "^2.0.6",
|
||||||
"require-from-string": "^2.0.2",
|
"require-from-string": "^2.0.2",
|
||||||
"rollup": "^2.42.3",
|
|
||||||
"rollup-plugin-css-only": "^3.1.0",
|
|
||||||
"rollup-plugin-imagemin": "^0.4.1",
|
|
||||||
"rollup-plugin-livereload": "^2.0.0",
|
|
||||||
"rollup-plugin-svelte": "^7.1.0",
|
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
|
||||||
"sass": "^1.32.12",
|
"sass": "^1.32.12",
|
||||||
"supertest": "^6.0.0",
|
"supertest": "^6.0.0",
|
||||||
"svelte-check": "^2.2.8",
|
"svelte-check": "^2.2.8",
|
||||||
@ -79,6 +71,8 @@
|
|||||||
"typescript": "^4.0.2"
|
"typescript": "^4.0.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@rollup/plugin-commonjs": "^21.0.1",
|
||||||
|
"@rollup/plugin-node-resolve": "^13.0.6",
|
||||||
"argon2": "^0.28.2",
|
"argon2": "^0.28.2",
|
||||||
"clear-module": "^4.1.1",
|
"clear-module": "^4.1.1",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
@ -98,6 +92,12 @@
|
|||||||
"nunjucks": "^3.2.1",
|
"nunjucks": "^3.2.1",
|
||||||
"on-finished": "^2.3.0",
|
"on-finished": "^2.3.0",
|
||||||
"redis": "^3.0.2",
|
"redis": "^3.0.2",
|
||||||
|
"rollup": "^2.42.3",
|
||||||
|
"rollup-plugin-css-only": "^3.1.0",
|
||||||
|
"rollup-plugin-imagemin": "^0.4.1",
|
||||||
|
"rollup-plugin-livereload": "^2.0.0",
|
||||||
|
"rollup-plugin-svelte": "^7.1.0",
|
||||||
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"svelte": "^3.35.0",
|
"svelte": "^3.35.0",
|
||||||
"svelte-preprocess": "4.6.9",
|
"svelte-preprocess": "4.6.9",
|
||||||
"ts-node": "^10.4.0",
|
"ts-node": "^10.4.0",
|
||||||
|
@ -7,6 +7,7 @@ const {copyRecursively} = require('./_functions.js');
|
|||||||
'yarn.lock',
|
'yarn.lock',
|
||||||
'README.md',
|
'README.md',
|
||||||
'config/',
|
'config/',
|
||||||
|
'rollup.config.js',
|
||||||
].forEach(file => {
|
].forEach(file => {
|
||||||
copyRecursively(file, 'dist');
|
copyRecursively(file, 'dist');
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const {copyRecursively} = require("./_functions");
|
|
||||||
|
|
||||||
// These folders must exist for nodemon not to loop indefinitely.
|
// These folders must exist for nodemon not to loop indefinitely.
|
||||||
[
|
[
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
import PasswordPanel from "./PasswordPanel.svelte";
|
import PasswordPanel from "./PasswordPanel.svelte";
|
||||||
import Form from "../../utils/Form.svelte";
|
import Form from "../../utils/Form.svelte";
|
||||||
import Field from "../../utils/Field.svelte";
|
import Field from "../../utils/Field.svelte";
|
||||||
import {route} from "../../../../common/Routing";
|
import {hasRoute, route} from "../../../../common/Routing";
|
||||||
|
|
||||||
const mainEmail = $locals.main_email?.email;
|
const mainEmail = $locals.main_email?.email;
|
||||||
const personalInfoFields = $locals.user_personal_info_fields || [];
|
const personalInfoFields = $locals.user_personal_info_fields || [];
|
||||||
@ -88,6 +88,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{#if hasRoute('add-email')}
|
||||||
<Form action={route('add-email')} class="sub-panel"
|
<Form action={route('add-email')} class="sub-panel"
|
||||||
submitIcon="plus" submitText="Add email address">
|
submitIcon="plus" submitText="Add email address">
|
||||||
<h3>Add an email address:</h3>
|
<h3>Add an email address:</h3>
|
||||||
@ -96,6 +97,7 @@
|
|||||||
hint="An email address we can use to identify you in case you lose access to your account"
|
hint="An email address we can use to identify you in case you lose access to your account"
|
||||||
required/>
|
required/>
|
||||||
</Form>
|
</Form>
|
||||||
|
{/if}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
|
@ -17,9 +17,11 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<BaseLayout title="{$locals.app.name} - Review accounts" h1={false}>
|
<BaseLayout title="{$locals.app.name} - Review accounts" h1={false}>
|
||||||
|
{#if hasRoute('backend')}
|
||||||
<Breadcrumb currentPageTitle="Accounts pending review" pages={[
|
<Breadcrumb currentPageTitle="Accounts pending review" pages={[
|
||||||
{link: route('backend'), title:'Backend'},
|
{link: route('backend'), title:'Backend'},
|
||||||
]}/>
|
]}/>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<h1>Accounts pending review</h1>
|
<h1>Accounts pending review</h1>
|
||||||
|
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
import child_process from "child_process";
|
import child_process from "child_process";
|
||||||
import config from "config";
|
import config from "config";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
|
import path from "path";
|
||||||
|
|
||||||
import {logger} from "../Logger.js";
|
import {logger} from "../Logger.js";
|
||||||
import {listFilesRecursively} from "../Utils.js";
|
import {doesFileExist, listFilesRecursively} from "../Utils.js";
|
||||||
|
|
||||||
|
const ROLLUP_CONFIG_FILE_NAME = 'rollup.config.js';
|
||||||
|
|
||||||
export default class AssetCompiler {
|
export default class AssetCompiler {
|
||||||
private rollup?: child_process.ChildProcess;
|
private rollup?: child_process.ChildProcess;
|
||||||
@ -35,9 +38,12 @@ export default class AssetCompiler {
|
|||||||
|
|
||||||
const production = !config.get<boolean>('view.dev');
|
const production = !config.get<boolean>('view.dev');
|
||||||
if (!this.rollup) {
|
if (!this.rollup) {
|
||||||
|
const rollupConfigPath = await doesFileExist(ROLLUP_CONFIG_FILE_NAME) ?
|
||||||
|
ROLLUP_CONFIG_FILE_NAME :
|
||||||
|
path.resolve('node_modules/swaf/' + ROLLUP_CONFIG_FILE_NAME);
|
||||||
const args = [
|
const args = [
|
||||||
'rollup',
|
'rollup',
|
||||||
'-c', 'rollup.config.js',
|
'-c', rollupConfigPath,
|
||||||
'--environment', `ENV:${production ? 'production' : 'dev'},BUILD_DIR:${this.sourceDir},PUBLIC_DIR:${this.targetDir},INPUT:${input.join(':')}`,
|
'--environment', `ENV:${production ? 'production' : 'dev'},BUILD_DIR:${this.sourceDir},PUBLIC_DIR:${this.targetDir},INPUT:${input.join(':')}`,
|
||||||
];
|
];
|
||||||
if (watch) args.push('--watch');
|
if (watch) args.push('--watch');
|
||||||
|
Loading…
Reference in New Issue
Block a user