oc 0.50.51 → 0.50.52
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oc-client",
|
|
3
3
|
"description": "The OpenComponents client-side javascript client",
|
|
4
|
-
"version": "0.50.
|
|
4
|
+
"version": "0.50.51",
|
|
5
5
|
"repository": "https://github.com/opencomponents/oc/tree/master/components/oc-client",
|
|
6
6
|
"author": "Matteo Figus <matteofigus@gmail.com>",
|
|
7
7
|
"oc": {
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dataProvider": {
|
|
25
25
|
"type": "node.js",
|
|
26
|
-
"hashKey": "
|
|
26
|
+
"hashKey": "eb6f0f6e8adbdc8373db06539b04c840ac3faa2a",
|
|
27
27
|
"src": "server.js",
|
|
28
28
|
"size": 644
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
-
"version": "0.50.
|
|
31
|
+
"version": "0.50.51",
|
|
32
32
|
"packaged": true,
|
|
33
|
-
"date":
|
|
33
|
+
"date": 1781764817361
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"oc-template-es6-compiler": "^8.0.0"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=(t,s)=>{const{staticPath:e,templates:a}=t;return s(null,{staticPath:e,templates:a})},r=(t,s)=>{o(t,(e,a,i={})=>{if(e)return s(e);if(a==null)return s(null,{__oc_emptyResponse:!0});const n=t.action?a:Object.assign({},a,{_staticPath:t.staticPath,_baseUrl:t.baseUrl,_componentName:"oc-client",_componentVersion:"0.50.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=(t,s)=>{const{staticPath:e,templates:a}=t;return s(null,{staticPath:e,templates:a})},r=(t,s)=>{o(t,(e,a,i={})=>{if(e)return s(e);if(a==null)return s(null,{__oc_emptyResponse:!0});const n=t.action?a:Object.assign({},a,{_staticPath:t.staticPath,_baseUrl:t.baseUrl,_componentName:"oc-client",_componentVersion:"0.50.51"}),c=t.staticPath.indexOf("http")===0?t.staticPath:"https:"+t.staticPath;return s(null,Object.assign({},{component:{key:"c4abb6bf4dc6657fb718a45b64bd6b2cb92e874a",src:c+"template.js",props:n,esm:!1,development:void 0}}))})};exports.data=r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oc-client",
|
|
3
3
|
"description": "The OpenComponents client-side javascript client",
|
|
4
|
-
"version": "0.50.
|
|
4
|
+
"version": "0.50.51",
|
|
5
5
|
"repository": "https://github.com/opencomponents/oc/tree/master/components/oc-client",
|
|
6
6
|
"author": "Matteo Figus <matteofigus@gmail.com>",
|
|
7
7
|
"oc": {
|
package/dist/utils/put.js
CHANGED
|
@@ -7,6 +7,10 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
7
7
|
const form_data_1 = __importDefault(require("form-data"));
|
|
8
8
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
9
9
|
const undici_1 = require("undici");
|
|
10
|
+
// undici v8 enables HTTP/2 by default when the TLS server negotiates it via
|
|
11
|
+
// ALPN. Some gateways/proxies reset large multipart uploads over h2, surfacing
|
|
12
|
+
// as "Premature close". Force HTTP/1.1 for the publish upload to avoid this.
|
|
13
|
+
const dispatcher = new undici_1.Agent({ allowH2: false });
|
|
10
14
|
async function put(urlPath, files, headers) {
|
|
11
15
|
const form = new form_data_1.default();
|
|
12
16
|
if (!Array.isArray(files)) {
|
|
@@ -19,7 +23,8 @@ async function put(urlPath, files, headers) {
|
|
|
19
23
|
const res = await (0, undici_1.request)(urlPath, {
|
|
20
24
|
headers: { ...headers, ...form.getHeaders() },
|
|
21
25
|
method: 'PUT',
|
|
22
|
-
body: form
|
|
26
|
+
body: form,
|
|
27
|
+
dispatcher
|
|
23
28
|
});
|
|
24
29
|
const response = await res.body.text();
|
|
25
30
|
if (res.statusCode !== 200) {
|