oc 0.50.49 → 0.50.51

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.
Files changed (37) hide show
  1. package/.turbo/turbo-build.log +4 -4
  2. package/.turbo/turbo-test.log +47 -36
  3. package/CHANGELOG.md +12 -0
  4. package/dist/cli/facade/dev.d.ts +12 -12
  5. package/dist/components/oc-client/_package/package.json +5 -5
  6. package/dist/components/oc-client/_package/server.js +1 -1
  7. package/dist/components/oc-client/_package/src/oc-client.js +54 -56
  8. package/dist/components/oc-client/_package/src/oc-client.min.js +1 -1
  9. package/dist/components/oc-client/_package/src/oc-client.min.map +1 -1
  10. package/dist/components/oc-client/package-lock.json +2635 -10333
  11. package/dist/components/oc-client/package.json +2 -2
  12. package/dist/components/oc-client/src/oc-client.js +54 -56
  13. package/dist/components/oc-client/src/oc-client.min.js +1 -1
  14. package/dist/components/oc-client/src/oc-client.min.map +1 -1
  15. package/dist/registry/domain/extract-package.d.ts +2 -0
  16. package/dist/registry/domain/extract-package.js +3 -1
  17. package/dist/registry/domain/repository.js +4 -2
  18. package/dist/registry/routes/components.js +2 -2
  19. package/dist/registry/routes/publish.js +7 -0
  20. package/dist/registry/views/index.js +2 -1
  21. package/dist/registry/views/info.js +4 -3
  22. package/dist/registry/views/partials/component-parameters.js +6 -2
  23. package/dist/registry/views/partials/components-dependencies.js +1 -1
  24. package/dist/registry/views/partials/components-list.js +1 -1
  25. package/dist/registry/views/partials/components-plugins.js +1 -1
  26. package/dist/registry/views/partials/components-templates.js +3 -3
  27. package/dist/registry/views/partials/icon.d.ts +6 -0
  28. package/dist/registry/views/partials/icon.js +22 -0
  29. package/dist/registry/views/partials/layout.js +8 -4
  30. package/dist/registry/views/static/index.d.ts +1 -1
  31. package/dist/registry/views/static/index.js +22 -4
  32. package/dist/registry/views/static/info.d.ts +1 -1
  33. package/dist/registry/views/static/info.js +29 -0
  34. package/dist/registry/views/static/style.d.ts +1 -1
  35. package/dist/registry/views/static/style.js +799 -962
  36. package/package.json +24 -23
  37. package/tsconfig.json +1 -0
@@ -1,17 +1,17 @@
1
1
 
2
2
  
3
- > oc@0.50.49 prebuild
3
+ > oc@0.50.50 prebuild
4
4
  > rimraf dist
5
5
 
6
6
  ⠙
7
- > oc@0.50.49 build
7
+ > oc@0.50.50 build
8
8
  > npm run lint && tsc && node tasks/build.js
9
9
 
10
10
  ⠙
11
- > oc@0.50.49 lint
11
+ > oc@0.50.50 lint
12
12
  > npx @biomejs/biome check preview src test tasks
13
13
 
14
- ⠙⠹⠸⠼Checked 128 files in 43ms. No fixes applied.
14
+ ⠙⠹⠸⠼Checked 128 files in 36ms. 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.47 test
3
+ > oc@0.50.50 test
4
4
  > npm run build && node tasks/mochaTest.js
5
5
 
6
6
 
7
- > oc@0.50.47 prebuild
7
+ > oc@0.50.50 prebuild
8
8
  > rimraf dist
9
9
 
10
10
  ⠙
11
- > oc@0.50.47 build
11
+ > oc@0.50.50 build
12
12
  > npm run lint && tsc && node tasks/build.js
13
13
 
14
14
  ⠙
15
- > oc@0.50.47 lint
15
+ > oc@0.50.50 lint
16
16
  > npx @biomejs/biome check preview src test tasks
17
17
 
18
- ⠙⠹Checked 128 files in 26ms. No fixes applied.
18
+ ⠙⠹⠸Checked 128 files in 33ms. 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,13 +35,6 @@ 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
-
45
38
   cli : domain : clean
46
39
   when fetching the list of folders to clean
47
40
   happy path
@@ -293,7 +286,7 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
293
286
   ✔ should show error message
294
287
   when href = /component
295
288
   ✔ href should be /component/~preview/
296
- (node:98422) [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.
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.
297
290
  (Use `node --trace-deprecation ...` to show where the warning was created)
298
291
   when href = /component/1.X.X
299
292
   ✔ href should be /component/1.X.X/~preview/
@@ -579,6 +572,7 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
579
572
   ✔ should not error
580
573
   ✔ should return the details
581
574
   ✔ should fetch the details from components-details.json
575
+  ✔ should cache the details after the first fetch
582
576
   when details file does not exist on cdn
583
577
   ✔ should return an error
584
578
   refresh()
@@ -596,6 +590,7 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
596
590
   when component details save succeeds
597
591
   ✔ should not error
598
592
   ✔ should return result
593
+  ✔ should cache the refreshed details
599
594
   when details file is up-to-date on cdn
600
595
   ✔ should not error
601
596
   ✔ should not save it
@@ -613,6 +608,13 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
613
608
   when component details save succeeds
614
609
   ✔ should not error
615
610
   ✔ should return result
611
+  polling
612
+  ✔ should start the polling loop using the configured interval
613
+  ✔ should clear the previous loop when refreshing again
614
+  ✔ should restart the loop after each poll
615
+  ✔ should update the cache when the polled data is newer
616
+  ✔ should keep the cached data when the polled data is not newer
617
+  ✔ should fire an error event when polling fails
616
618
 
617
619
   registry : domain : events-handler
618
620
   when requiring it multiple times
@@ -673,57 +675,57 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
673
675
 
674
676
   registry : domain : options-sanitiser
675
677
   when options is empty
676
-  ✔ should set prefix to "/" (177ms)
678
+  ✔ should set prefix to "/" (192ms)
677
679
   ✔ should set tempDir to "./temp/" (84ms)
678
-  ✔ should set hotReloading to false (66ms)
679
-  ✔ should set verbosity to 0 (65ms)
680
-  ✔ should set customHeadersToSkipOnWeakVersion to [] (63ms)
681
-  ✔ should set timeout to 120000 (82ms)
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)
682
684
   when verbosity is provided
683
-  ✔ should leave value untouched (60ms)
685
+  ✔ should leave value untouched (64ms)
684
686
   customHeadersToSkipOnWeakVersion
685
687
   when it contains valid elements
686
-  ✔ should convert the array elements to lower case (62ms)
688
+  ✔ should convert the array elements to lower case (64ms)
687
689
   fallbackRegistryUrl
688
690
   when fallbackRegistryUrl doesn't contain / at the end of url
689
-  ✔ should add `/` at the end of url (57ms)
691
+  ✔ should add `/` at the end of url (60ms)
690
692
   when fallbackRegistryUrl contains `/` at the end of url
691
-  ✔ should not modify fallbackRegistryUrl url (57ms)
693
+  ✔ should not modify fallbackRegistryUrl url (58ms)
692
694
   prefix and baseUrl sanitization
693
-  ✔ should support various scenarios correctly (745ms)
695
+  ✔ should support various scenarios correctly (901ms)
694
696
   when pollingInterval
695
697
   is provided
696
-  ✔ should not modify it (54ms)
698
+  ✔ should not modify it (56ms)
697
699
   is not provided
698
-  ✔ should initialize it as 5000 (56ms)
700
+  ✔ should initialize it as 5000 (59ms)
699
701
   when templates
700
702
   is provided
701
703
   ✔ should not modify it
702
704
   is not provided
703
-  ✔ should initialize it as 5000 (54ms)
705
+  ✔ should initialize it as 5000 (56ms)
704
706
   when env
705
707
   is provided
706
-  ✔ should not modify it (52ms)
708
+  ✔ should not modify it (54ms)
707
709
   is not provided
708
-  ✔ should initialize it as an empty {} (53ms)
710
+  ✔ should initialize it as an empty {} (58ms)
709
711
   storage adapter configuration
710
712
   when legacy "s3" param
711
713
   is provided
712
-  ✔ should create a storage.adapter configuration accordingly (236ms)
714
+  ✔ should create a storage.adapter configuration accordingly (289ms)
713
715
   when no storage adapter
714
716
   is provided
715
-  ✔ should default to the oc-s3-storage-adapter (54ms)
717
+  ✔ should default to the oc-s3-storage-adapter (63ms)
716
718
   when refreshInterval
717
719
   is provided
718
-  ✔ should pass the refreshInterval to the storage options (54ms)
720
+  ✔ should pass the refreshInterval to the storage options (66ms)
719
721
   when verbosity
720
722
   is provided
721
-  ✔ should pass the verbosity to the storage options (55ms)
723
+  ✔ should pass the verbosity to the storage options (60ms)
722
724
   when storage.path
723
725
   does not include a protocol
724
-  ✔ should sanitize the path to rely on the https protocol (53ms)
726
+  ✔ should sanitize the path to rely on the https protocol (63ms)
725
727
   does include a prefix
726
-  ✔ should not modify it (53ms)
728
+  ✔ should not modify it (63ms)
727
729
 
728
730
   registry : domain : plugins-initialiser
729
731
   when initialising not valid plugins
@@ -807,6 +809,8 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
807
809
   ✔ should refresh cached components list
808
810
   ✔ should refresh componens details
809
811
   ✔ should store the component in the correct directory
812
+  when refreshing details is slow
813
+  ✔ should resolve publish before details refresh finishes
810
814
   when on local configuration
811
815
   when getting the list of available components
812
816
   ✔ should respond without an error
@@ -1154,7 +1158,7 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
1154
1158
   ✔ should return component's name and request version for both requests
1155
1159
   when getting a component that implements a plugin
1156
1160
   when plugin not declared in package.json
1157
- (node:98422) [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.)
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.)
1158
1162
   ✔ should return 500 status code
1159
1163
   ✔ should respond with GENERIC_ERROR error code
1160
1164
   ✔ should respond with error message including missing plugin
@@ -1451,6 +1455,13 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
1451
1455
   when a version is not included
1452
1456
   ✔ should return the unmodified dependency
1453
1457
 
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
+
1454
1465
   registry (ui interface)
1455
1466
   GET / with Accept: text/html
1456
1467
   ✔ should not error
@@ -1607,6 +1618,6 @@ compiling component /Users/Ricardo.Agullo/Work/oc/packages/oc/test/fixtures/comp
1607
1618
   ✔ should respond with components parameters
1608
1619
 
1609
1620
 
1610
-   838 passing (8s)
1621
+   847 passing (10s)
1611
1622
 
1612
1623
  ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## Change Log
2
2
 
3
+ ## 0.50.51
4
+
5
+ ### Patch Changes
6
+
7
+ - improve UI. clean publish temp. improve perf
8
+
9
+ ## 0.50.50
10
+
11
+ ### Patch Changes
12
+
13
+ - Refresh component details on background after publish to not delay response to client
14
+
3
15
  ## 0.50.48
4
16
 
5
17
  ### Patch Changes
@@ -18,7 +18,7 @@ declare const dev: ({ local, logger }: {
18
18
  verbose?: boolean;
19
19
  production?: boolean;
20
20
  }): Promise<{
21
- close: (callback: (err?: Error | undefined | string) => void) => void | import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
21
+ close: (callback: (err?: Error | undefined | string) => void) => void | import("node:http").Server<typeof import("node:http").IncomingMessage, typeof import("node:http").ServerResponse>;
22
22
  on: <T extends keyof {
23
23
  error: {
24
24
  code: string;
@@ -28,9 +28,9 @@ declare const dev: ({ local, logger }: {
28
28
  'cache-poll': number;
29
29
  request: import("../../registry/domain/events-handler").RequestData;
30
30
  'component-retrieved': {
31
- headers: import("http").IncomingHttpHeaders;
31
+ headers: import("node:http").IncomingHttpHeaders;
32
32
  name: string;
33
- parameters: import("http").IncomingHttpHeaders;
33
+ parameters: import("node:http").IncomingHttpHeaders;
34
34
  requestVersion: string;
35
35
  duration: number;
36
36
  };
@@ -58,9 +58,9 @@ declare const dev: ({ local, logger }: {
58
58
  'cache-poll': number;
59
59
  request: import("../../registry/domain/events-handler").RequestData;
60
60
  'component-retrieved': {
61
- headers: import("http").IncomingHttpHeaders;
61
+ headers: import("node:http").IncomingHttpHeaders;
62
62
  name: string;
63
- parameters: import("http").IncomingHttpHeaders;
63
+ parameters: import("node:http").IncomingHttpHeaders;
64
64
  requestVersion: string;
65
65
  duration: number;
66
66
  };
@@ -83,7 +83,7 @@ declare const dev: ({ local, logger }: {
83
83
  register: <T = any>(plugin: oc.Plugin<T>, callback?: ((...args: any[]) => void) | undefined) => void;
84
84
  start: (callback: (err: unknown, data?: {
85
85
  app: import("express").Express;
86
- server: import("http").Server;
86
+ server: import("node:http").Server;
87
87
  } | undefined) => void) => Promise<void>;
88
88
  app: import("express").Express;
89
89
  }>;
@@ -100,7 +100,7 @@ declare const dev: ({ local, logger }: {
100
100
  verbose?: boolean;
101
101
  production?: boolean;
102
102
  }, arguments__1: (error: unknown, value: {
103
- close: (callback: (err?: Error | undefined | string) => void) => void | import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
103
+ close: (callback: (err?: Error | undefined | string) => void) => void | import("node:http").Server<typeof import("node:http").IncomingMessage, typeof import("node:http").ServerResponse>;
104
104
  on: <T extends keyof {
105
105
  error: {
106
106
  code: string;
@@ -110,9 +110,9 @@ declare const dev: ({ local, logger }: {
110
110
  'cache-poll': number;
111
111
  request: import("../../registry/domain/events-handler").RequestData;
112
112
  'component-retrieved': {
113
- headers: import("http").IncomingHttpHeaders;
113
+ headers: import("node:http").IncomingHttpHeaders;
114
114
  name: string;
115
- parameters: import("http").IncomingHttpHeaders;
115
+ parameters: import("node:http").IncomingHttpHeaders;
116
116
  requestVersion: string;
117
117
  duration: number;
118
118
  };
@@ -140,9 +140,9 @@ declare const dev: ({ local, logger }: {
140
140
  'cache-poll': number;
141
141
  request: import("../../registry/domain/events-handler").RequestData;
142
142
  'component-retrieved': {
143
- headers: import("http").IncomingHttpHeaders;
143
+ headers: import("node:http").IncomingHttpHeaders;
144
144
  name: string;
145
- parameters: import("http").IncomingHttpHeaders;
145
+ parameters: import("node:http").IncomingHttpHeaders;
146
146
  requestVersion: string;
147
147
  duration: number;
148
148
  };
@@ -165,7 +165,7 @@ declare const dev: ({ local, logger }: {
165
165
  register: <T = any>(plugin: oc.Plugin<T>, callback?: ((...args: any[]) => void) | undefined) => void;
166
166
  start: (callback: (err: unknown, data?: {
167
167
  app: import("express").Express;
168
- server: import("http").Server;
168
+ server: import("node:http").Server;
169
169
  } | undefined) => void) => Promise<void>;
170
170
  app: import("express").Express;
171
171
  }) => void): void;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oc-client",
3
3
  "description": "The OpenComponents client-side javascript client",
4
- "version": "0.50.49",
4
+ "version": "0.50.50",
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,16 +23,16 @@
23
23
  ],
24
24
  "dataProvider": {
25
25
  "type": "node.js",
26
- "hashKey": "565e122da74048798512fe8b39341e936177caaa",
26
+ "hashKey": "6c80f5fa8b874aa6454c4283f87796382ef83789",
27
27
  "src": "server.js",
28
28
  "size": 644
29
29
  }
30
30
  },
31
- "version": "0.50.49",
31
+ "version": "0.50.50",
32
32
  "packaged": true,
33
- "date": 1780829268553
33
+ "date": 1781709858511
34
34
  },
35
35
  "devDependencies": {
36
- "oc-template-es6-compiler": "^1.0.1"
36
+ "oc-template-es6-compiler": "^8.0.0"
37
37
  }
38
38
  }
@@ -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.49"}),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.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;