Skip to content

Commit 59b7b12

Browse files
author
Andrew Welch
committed
Merge branch 'release/1.2.13' into v1
2 parents 58f9207 + ec34981 commit 59b7b12

File tree

79 files changed

+19682
-15887
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+19682
-15887
lines changed

.gitignore

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
1+
# Craft .gitignore
2+
#
3+
# Example .gitignore file for Craft CMS projects
4+
#
5+
# @author nystudio107
6+
# @copyright Copyright (c) 2017 nystudio107
7+
# @link https://nystudio107.com/
8+
# @package craft-scripts
9+
# @since 1.1.0
10+
# @license MIT
11+
12+
# This file should be renamed to '.gitignore' and placed in your
13+
# Craft CMS project root directory
14+
115
# CRAFT ENVIRONMENT
2-
.env.php
3-
.env.sh
416
.env
517

618
# COMPOSER
719
/vendor
820

921
# BUILD FILES
10-
/bower_components/*
11-
/node_modules/*
12-
/build/*
13-
/yarn-error.log
22+
bower_components
23+
node_modules
24+
yarn-error.log
25+
npm-error.log
1426

1527
# MISC FILES
1628
.cache
@@ -30,5 +42,3 @@
3042
!.vscode/extensions.json
3143
config.codekit3
3244
prepros-6.config
33-
34-
# BUILD FILES

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Transcoder Changelog
22

3+
## 1.2.13 - 2020.12.21 [CRITICAL]
4+
### Security
5+
* Added a `$enableDownloadFileEndpoint` settings/config option (set to `false` by default) to control whether the download files action is publicly accessible
6+
* The download files action now strips any relative paths from the incoming request
7+
* The download files action now restricts downloads to Craft's [allowedFileExtensions](https://craftcms.com/docs/3.x/config/config-settings.html#allowedfileextensions)
8+
9+
### Changed
10+
* Moved the CSS/JS buildchain over to webpack 5
11+
312
## 1.2.12 - 2020.04.06
413
### Added
514
* Added `seekInSecs` option to audio encoding options

buildchain/.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# webpack example settings for Homestead/Vagrant
2+
PUBLIC_PATH=""
3+
DEVSERVER_PUBLIC="http://192.168.10.10:8080"
4+
DEVSERVER_HOST="0.0.0.0"
5+
DEVSERVER_POLL=1000
6+
DEVSERVER_PORT=8080

buildchain/.eslintignore

Whitespace-only changes.

buildchain/.eslintrc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"root": true,
3+
"parser": "vue-eslint-parser",
4+
"parserOptions": {
5+
"parser": "@typescript-eslint/parser",
6+
"ecmaVersion": 2020,
7+
"sourceType": "module"
8+
},
9+
"rules": {
10+
"@typescript-eslint/no-var-requires": 0
11+
},
12+
"env": {
13+
"browser": true,
14+
"amd": true,
15+
"node": true
16+
},
17+
"plugins": [
18+
"@typescript-eslint"
19+
],
20+
"extends": [
21+
"eslint:recommended",
22+
"plugin:@typescript-eslint/recommended",
23+
"plugin:vue/vue3-recommended"
24+
]
25+
}

buildchain/.stylelintrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "stylelint-config-recommended",
3+
"rules": {
4+
"at-rule-no-unknown": [ true, {
5+
"ignoreAtRules": [
6+
"screen",
7+
"extends",
8+
"responsive",
9+
"tailwind"
10+
]
11+
}],
12+
"block-no-empty": null
13+
}
14+
}

buildchain/get-webpack-config.js

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
// node modules
2+
const { merge } = require('webpack-merge');
3+
4+
/**
5+
* return a webpack settings file
6+
* @param name string
7+
* @returns {{}}
8+
*/
9+
const getWebpackSettings = (name) => {
10+
let settings = {};
11+
try {
12+
settings = require('./webpack-settings/' + name + '.settings.js');
13+
} catch (e) {
14+
// that's okay
15+
}
16+
17+
return settings;
18+
};
19+
20+
/**
21+
* return a webpack settings file combined with the 'app' settings
22+
* @param name string
23+
* @returns {{}}
24+
*/
25+
const getCombinedWebpackSettings = (name) => ({
26+
...getWebpackSettings('app'),
27+
...getWebpackSettings(name),
28+
});
29+
30+
/**
31+
* return a legacy webpack config file
32+
* @param name
33+
* @returns {{}}
34+
*/
35+
const getLegacyWebpackConfig = (name) => require('./webpack-configs/' + name + '.config.js')('legacy', getCombinedWebpackSettings(name));
36+
37+
/**
38+
* return a modern webpack config file
39+
* @param name
40+
* @returns {{}}
41+
*/
42+
const getModernWebpackConfig = (name) => require('./webpack-configs/' + name + '.config.js')('modern', getCombinedWebpackSettings(name));
43+
44+
/**
45+
* return an array of webpack configs using the function provided in getWebpackConfig
46+
* @param names string[]
47+
* @param getWebpackConfig function
48+
* @returns {{}}
49+
*/
50+
const webpackConfigs = (names, getWebpackConfig) => {
51+
let config = {};
52+
names.forEach((name) => config = merge(config, getWebpackConfig(name)));
53+
54+
return config;
55+
};
56+
57+
/**
58+
* return an array of build webpack configs
59+
* @param names string
60+
* @returns {{}}
61+
*/
62+
const buildWebpackConfigs = (...names) => webpackConfigs(names, getModernWebpackConfig);
63+
64+
/**
65+
* return an array of legacy webpack configs
66+
* @param names string
67+
* @returns {{}}
68+
*/
69+
const legacyWebpackConfigs = (...names) => webpackConfigs(names, getLegacyWebpackConfig);
70+
71+
/**
72+
* return an array of modern webpack configs
73+
* @param names string
74+
* @returns {{}}
75+
*/
76+
const modernWebpackConfigs = (...names) => webpackConfigs(names, getModernWebpackConfig);
77+
78+
// module exports
79+
module.exports = {
80+
getWebpackSettings,
81+
getLegacyWebpackConfig,
82+
getModernWebpackConfig,
83+
buildWebpackConfigs,
84+
legacyWebpackConfigs,
85+
modernWebpackConfigs,
86+
};

buildchain/nodemon.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"watch": [
3+
"webpack.dev.js",
4+
"webpack-configs/*.js",
5+
"webpack-settings/*.js"
6+
],
7+
"exec": "webpack serve --config webpack.dev.js"
8+
}

0 commit comments

Comments
 (0)