@flourish/sdk 3.17.1 → 3.17.2

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/RELEASE_NOTES.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 3.17.2
2
+ * Fixes an issue which could cause template publication to fail
3
+
1
4
  # 3.17.1
2
5
  * Update version of @flourish/interpreter
3
6
 
@@ -95,14 +95,16 @@ function zipUpTemplate(template_dir, config) {
95
95
  });
96
96
  }
97
97
 
98
- function uploadTemplate(server_opts, template_id, external_version, zip_filename) {
98
+ async function uploadTemplate(server_opts, template_id, external_version, zip_filename) {
99
99
  const body = new FormData();
100
+ const stat = await fs.promises.stat(zip_filename);
100
101
 
101
102
  body.append("id", template_id);
102
103
  body.append("version", external_version);
103
104
  body.append("template", fs.createReadStream(zip_filename), {
104
105
  contentType: "application/zip",
105
- filename: "template.zip"
106
+ filename: "template.zip",
107
+ knownLength: stat.size
106
108
  });
107
109
 
108
110
  return sdk.request(server_opts, "template/publish", body);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flourish/sdk",
3
- "version": "3.17.1",
3
+ "version": "3.17.2",
4
4
  "description": "The Flourish SDK",
5
5
  "module": "src/index.js",
6
6
  "scripts": {