@suffolklitlab/alkiln 5.0.0-experimental4 → 5.0.0-experimental5

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 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
@@ -1803,19 +1803,32 @@ module.exports = {
1803
1803
  });
1804
1804
  return false;
1805
1805
  }
1806
- let dir = dirs[0];
1806
+ let dir = null;
1807
1807
 
1808
1808
  let paths = [];
1809
- let missing_files = [];
1809
+ let missing_files = []; // For any user warnings
1810
1810
  for ( let name of uploads_names ) {
1811
1811
  let trimmed_name = name.trim();
1812
- let matching_paths = fg.sync([ `${ dir }/${ trimmed_name }` ]);
1812
+ let matching_paths = [];
1813
+ if ( dir === null ) {
1814
+ for ( let one_dir of dirs ) {
1815
+ console.log( one_dir );
1816
+ matching_paths = fg.sync([ `${ one_dir }/${ trimmed_name }` ]);
1817
+ if ( matching_paths.length > 0 ) {
1818
+ dir = one_dir;
1819
+ break;
1820
+ }
1821
+ } // ends for each dir
1822
+ } else {
1823
+ matching_paths = fg.sync([ `${ dir }/${ trimmed_name }` ]);
1824
+ }
1825
+
1813
1826
  if ( matching_paths.length === 0 ) {
1814
1827
  missing_files.push( trimmed_name );
1815
1828
  } else {
1816
1829
  paths.push( matching_paths[0] );
1817
1830
  }
1818
- }
1831
+ } // ends for each file
1819
1832
 
1820
1833
  if ( missing_files.length > 0 ) {
1821
1834
  await scope.addToReport( scope, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suffolklitlab/alkiln",
3
- "version": "5.0.0-experimental4",
3
+ "version": "5.0.0-experimental5",
4
4
  "description": "Integrated automated end-to-end testing with docassemble, puppeteer, and cucumber.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {