oc 0.50.51 → 0.50.53

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.
@@ -1,17 +1,17 @@
1
1
 
2
2
  
3
- > oc@0.50.50 prebuild
3
+ > oc@0.50.52 prebuild
4
4
  > rimraf dist
5
5
 
6
6
  ⠙
7
- > oc@0.50.50 build
7
+ > oc@0.50.52 build
8
8
  > npm run lint && tsc && node tasks/build.js
9
9
 
10
10
  ⠙
11
- > oc@0.50.50 lint
11
+ > oc@0.50.52 lint
12
12
  > npx @biomejs/biome check preview src test tasks
13
13
 
14
- ⠙⠹⠸⠼Checked 128 files in 36ms. No fixes applied.
14
+ ⠙⠹⠸⠼⠴Checked 129 files in 39ms. No fixes applied.
15
15
  ⠙⠙Building client
16
16
  compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/src/components/oc-client/
17
17
  Client has been built and packaged 👍
@@ -1,21 +1,21 @@
1
1
 
2
2
  
3
- > oc@0.50.50 test
3
+ > oc@0.50.52 test
4
4
  > npm run build && node tasks/mochaTest.js
5
5
 
6
6
 
7
- > oc@0.50.50 prebuild
7
+ > oc@0.50.52 prebuild
8
8
  > rimraf dist
9
9
 
10
10
  ⠙
11
- > oc@0.50.50 build
11
+ > oc@0.50.52 build
12
12
  > npm run lint && tsc && node tasks/build.js
13
13
 
14
14
  ⠙
15
- > oc@0.50.50 lint
15
+ > oc@0.50.52 lint
16
16
  > npx @biomejs/biome check preview src test tasks
17
17
 
18
- ⠙⠹⠸Checked 128 files in 33ms. No fixes applied.
18
+ ⠙⠹⠸Checked 129 files in 40ms. No fixes applied.
19
19
  ⠙⠙Building client
20
20
  compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/src/components/oc-client/
21
21
  Client has been built and packaged 👍
@@ -35,6 +35,13 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
35
35
  Test components packaged 👍
36
36
 
37
37
  
38
+  The targz dependency
39
+  when compressing a folder with targz
40
+  ✔ should create the file
41
+  when decompressing the created file
42
+  ✔ should throw no error
43
+  ✔ should contain the files
44
+
38
45
   cli : domain : clean
39
46
   when fetching the list of folders to clean
40
47
   happy path
@@ -286,7 +293,7 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
286
293
   ✔ should show error message
287
294
   when href = /component
288
295
   ✔ href should be /component/~preview/
289
- (node:92394) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
296
+ (node:24225) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
290
297
  (Use `node --trace-deprecation ...` to show where the warning was created)
291
298
   when href = /component/1.X.X
292
299
   ✔ href should be /component/1.X.X/~preview/
@@ -675,29 +682,29 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
675
682
 
676
683
   registry : domain : options-sanitiser
677
684
   when options is empty
678
-  ✔ should set prefix to "/" (192ms)
679
-  ✔ should set tempDir to "./temp/" (84ms)
680
-  ✔ should set hotReloading to false (69ms)
681
-  ✔ should set verbosity to 0 (88ms)
682
-  ✔ should set customHeadersToSkipOnWeakVersion to [] (68ms)
683
-  ✔ should set timeout to 120000 (64ms)
685
+  ✔ should set prefix to "/" (268ms)
686
+  ✔ should set tempDir to "./temp/" (96ms)
687
+  ✔ should set hotReloading to false (103ms)
688
+  ✔ should set verbosity to 0 (73ms)
689
+  ✔ should set customHeadersToSkipOnWeakVersion to [] (85ms)
690
+  ✔ should set timeout to 120000 (65ms)
684
691
   when verbosity is provided
685
-  ✔ should leave value untouched (64ms)
692
+  ✔ should leave value untouched (65ms)
686
693
   customHeadersToSkipOnWeakVersion
687
694
   when it contains valid elements
688
-  ✔ should convert the array elements to lower case (64ms)
695
+  ✔ should convert the array elements to lower case (68ms)
689
696
   fallbackRegistryUrl
690
697
   when fallbackRegistryUrl doesn't contain / at the end of url
691
-  ✔ should add `/` at the end of url (60ms)
698
+  ✔ should add `/` at the end of url (62ms)
692
699
   when fallbackRegistryUrl contains `/` at the end of url
693
-  ✔ should not modify fallbackRegistryUrl url (58ms)
700
+  ✔ should not modify fallbackRegistryUrl url (62ms)
694
701
   prefix and baseUrl sanitization
695
-  ✔ should support various scenarios correctly (901ms)
702
+  ✔ should support various scenarios correctly (832ms)
696
703
   when pollingInterval
697
704
   is provided
698
-  ✔ should not modify it (56ms)
705
+  ✔ should not modify it (58ms)
699
706
   is not provided
700
-  ✔ should initialize it as 5000 (59ms)
707
+  ✔ should initialize it as 5000 (62ms)
701
708
   when templates
702
709
   is provided
703
710
   ✔ should not modify it
@@ -705,27 +712,27 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
705
712
   ✔ should initialize it as 5000 (56ms)
706
713
   when env
707
714
   is provided
708
-  ✔ should not modify it (54ms)
715
+  ✔ should not modify it (57ms)
709
716
   is not provided
710
-  ✔ should initialize it as an empty {} (58ms)
717
+  ✔ should initialize it as an empty {} (56ms)
711
718
   storage adapter configuration
712
719
   when legacy "s3" param
713
720
   is provided
714
-  ✔ should create a storage.adapter configuration accordingly (289ms)
721
+  ✔ should create a storage.adapter configuration accordingly (272ms)
715
722
   when no storage adapter
716
723
   is provided
717
-  ✔ should default to the oc-s3-storage-adapter (63ms)
724
+  ✔ should default to the oc-s3-storage-adapter (57ms)
718
725
   when refreshInterval
719
726
   is provided
720
727
   ✔ should pass the refreshInterval to the storage options (66ms)
721
728
   when verbosity
722
729
   is provided
723
-  ✔ should pass the verbosity to the storage options (60ms)
730
+  ✔ should pass the verbosity to the storage options (54ms)
724
731
   when storage.path
725
732
   does not include a protocol
726
-  ✔ should sanitize the path to rely on the https protocol (63ms)
733
+  ✔ should sanitize the path to rely on the https protocol (78ms)
727
734
   does include a prefix
728
-  ✔ should not modify it (63ms)
735
+  ✔ should not modify it (56ms)
729
736
 
730
737
   registry : domain : plugins-initialiser
731
738
   when initialising not valid plugins
@@ -1158,7 +1165,7 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
1158
1165
   ✔ should return component's name and request version for both requests
1159
1166
   when getting a component that implements a plugin
1160
1167
   when plugin not declared in package.json
1161
- (node:92394) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. (Triggered by calling processImmediate on process.)
1168
+ (node:24225) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. (Triggered by calling processImmediate on process.)
1162
1169
   ✔ should return 500 status code
1163
1170
   ✔ should respond with GENERIC_ERROR error code
1164
1171
   ✔ should respond with error message including missing plugin
@@ -1323,6 +1330,10 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
1323
1330
   when is discoverable
1324
1331
   ✔ should return the list of plugins
1325
1332
 
1333
+  registry : routes : publish
1334
+  when publish finishes
1335
+  ✔ should remove only the uploaded package and extracted package folder
1336
+
1326
1337
   registry : routes : validate
1327
1338
   when packageJson is missing in body
1328
1339
   ✔ should return 400 status
@@ -1455,13 +1466,6 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
1455
1466
   when a version is not included
1456
1467
   ✔ should return the unmodified dependency
1457
1468
 
1458
-  The targz dependency
1459
-  when compressing a folder with targz
1460
-  ✔ should create the file
1461
-  when decompressing the created file
1462
-  ✔ should throw no error
1463
-  ✔ should contain the files
1464
-
1465
1469
   registry (ui interface)
1466
1470
   GET / with Accept: text/html
1467
1471
   ✔ should not error
@@ -1618,6 +1622,6 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
1618
1622
   ✔ should respond with components parameters
1619
1623
 
1620
1624
 
1621
-   847 passing (10s)
1625
+   848 passing (9s)
1622
1626
 
1623
1627
  ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## Change Log
2
2
 
3
+ ## 0.50.53
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix publish cli to not call twice
8
+
9
+ ## 0.50.52
10
+
11
+ ### Patch Changes
12
+
13
+ - Fix undici breaking change on v8
14
+
3
15
  ## 0.50.51
4
16
 
5
17
  ### Patch Changes
@@ -107,7 +107,10 @@ const publish = ({ logger, registry, local }) => (0, universalify_1.fromPromise)
107
107
  }
108
108
  await putComponentToRegistry({
109
109
  route: componentRoute,
110
- path: compressedPackagePath
110
+ path: compressedPackagePath,
111
+ username: opts.username,
112
+ password: opts.password,
113
+ token: opts.token
111
114
  });
112
115
  }
113
116
  await local.cleanup(compressedPackagePath);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oc-client",
3
3
  "description": "The OpenComponents client-side javascript client",
4
- "version": "0.50.50",
4
+ "version": "0.50.52",
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": "6c80f5fa8b874aa6454c4283f87796382ef83789",
26
+ "hashKey": "e81ba1f42539b678079cb54ba2d4f72005ee12dd",
27
27
  "src": "server.js",
28
28
  "size": 644
29
29
  }
30
30
  },
31
- "version": "0.50.50",
31
+ "version": "0.50.52",
32
32
  "packaged": true,
33
- "date": 1781709858511
33
+ "date": 1781776190510
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.50"}),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
+ "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.52"}),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.50",
4
+ "version": "0.50.52",
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc",
3
- "version": "0.50.51",
3
+ "version": "0.50.53",
4
4
  "description": "A framework for developing and distributing html components",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",