@suffolklitlab/alkiln 5.0.0-experimental4 → 5.0.0-experimental6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/lib/scope.js +21 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -58,11 +58,11 @@ Format:
|
|
|
58
58
|
- Docassemble Project name prefix now includes ALKiln in it for clarity
|
|
59
59
|
|
|
60
60
|
### Fixed
|
|
61
|
+
- DOCKER UPDATE (for ALKilnInThePlayground): Allows ALKilnInThePlayground to upload files. See https://github.com/SuffolkLITLab/docassemble-ALKilnInThePlayground/issues/18. This may require some developers to update their system (updating their docker image) as described in [the documentation](https://suffolklitlab.org/legal-tech-class/docs/practical-guide-docassemble/maintaining-docassemble#updates-to-the-docassemble-container). Updating to a new docker images is something that all docassemble users will have to do sometime anyway, sometimes for security.
|
|
62
|
+
- Conform upload file behavior to that of other Story Table rows - avoid erroring when field isn't set properly unless using all variables is required.
|
|
61
63
|
- Projects created in da each have a unique name. https://github.com/SuffolkLITLab/ALKiln/issues/663
|
|
62
64
|
- Shorten path names to try to accommodate limitations of windows systems while still keeping enough useful information to help devs identify the test outputs. https://github.com/SuffolkLITLab/ALKiln/issues/618
|
|
63
65
|
- Updated field decoding to handle new object field encoding. See [#711](https://github.com/SuffolkLITLab/ALKiln/issues/711)
|
|
64
|
-
- Allows ALKilnInThePlayground to upload files. See https://github.com/SuffolkLITLab/docassemble-ALKilnInThePlayground/issues/18.
|
|
65
|
-
- Conform upload file behavior to that of other Story Table rows - avoid erroring when field isn't set properly unless using all variables is required.
|
|
66
66
|
|
|
67
67
|
### Security
|
|
68
68
|
- Pass docassemble API keys through HTTP headers instead of as parameters.
|
package/lib/scope.js
CHANGED
|
@@ -1794,8 +1794,11 @@ module.exports = {
|
|
|
1794
1794
|
return false;
|
|
1795
1795
|
}
|
|
1796
1796
|
|
|
1797
|
+
// `/usr/share/docassemble/files/playgroundsources/${session_vars.get_user_id()}/${session_vars.get_user_project_name()}/*.feature`);
|
|
1798
|
+
// `/tmp/playgroundsources/${session_vars.get_user_id()}/${session_vars.get_user_project_name()}/*.feature`);
|
|
1799
|
+
|
|
1797
1800
|
// Make sure sources directory exists
|
|
1798
|
-
let dirs = fg.sync([
|
|
1801
|
+
let dirs = fg.sync([ `${ process.cwd() }/**/docassemble/**/data/sources` ], { onlyFiles: false });
|
|
1799
1802
|
if ( dirs.length === 0 ) {
|
|
1800
1803
|
await scope.addToReport( scope, {
|
|
1801
1804
|
type: `warning`,
|
|
@@ -1803,19 +1806,32 @@ module.exports = {
|
|
|
1803
1806
|
});
|
|
1804
1807
|
return false;
|
|
1805
1808
|
}
|
|
1806
|
-
let dir =
|
|
1809
|
+
let dir = null;
|
|
1807
1810
|
|
|
1808
1811
|
let paths = [];
|
|
1809
|
-
let missing_files = [];
|
|
1812
|
+
let missing_files = []; // For any user warnings
|
|
1810
1813
|
for ( let name of uploads_names ) {
|
|
1811
1814
|
let trimmed_name = name.trim();
|
|
1812
|
-
let matching_paths =
|
|
1815
|
+
let matching_paths = [];
|
|
1816
|
+
if ( dir === null ) {
|
|
1817
|
+
for ( let one_dir of dirs ) {
|
|
1818
|
+
console.log( one_dir );
|
|
1819
|
+
matching_paths = fg.sync([ `${ one_dir }/${ trimmed_name }` ]);
|
|
1820
|
+
if ( matching_paths.length > 0 ) {
|
|
1821
|
+
dir = one_dir;
|
|
1822
|
+
break;
|
|
1823
|
+
}
|
|
1824
|
+
} // ends for each dir
|
|
1825
|
+
} else {
|
|
1826
|
+
matching_paths = fg.sync([ `${ dir }/${ trimmed_name }` ]);
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1813
1829
|
if ( matching_paths.length === 0 ) {
|
|
1814
1830
|
missing_files.push( trimmed_name );
|
|
1815
1831
|
} else {
|
|
1816
1832
|
paths.push( matching_paths[0] );
|
|
1817
1833
|
}
|
|
1818
|
-
}
|
|
1834
|
+
} // ends for each file
|
|
1819
1835
|
|
|
1820
1836
|
if ( missing_files.length > 0 ) {
|
|
1821
1837
|
await scope.addToReport( scope, {
|
package/package.json
CHANGED