oc 0.50.63 → 0.50.64-beta.0

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,5 +1,5 @@
1
1
 
2
- > oc@0.50.61 test
2
+ > oc@0.50.63 test
3
3
  > node tasks/mochaTest.js
4
4
 
5
5
  compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/test/fixtures/components/circular-json-error
@@ -18,19 +18,6 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
18
18
  Test components packaged 👍
19
19
 
20
20
 
21
- utils : put
22
- when the registry edge resets streamed uploads over HTTP/2
23
- (node:52796) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
24
- (Use `node --trace-warnings ...` to show where the warning was created)
25
- ✔ uploads successfully by falling back to HTTP/1.1
26
-
27
- The targz dependency
28
- when compressing a folder with targz
29
- ✔ should create the file
30
- when decompressing the created file
31
- ✔ should throw no error
32
- ✔ should contain the files
33
-
34
21
  cli : domain : clean
35
22
  when fetching the list of folders to clean
36
23
  happy path
@@ -298,7 +285,8 @@ Test components packaged 👍
298
285
  ✔ should show error message
299
286
  when href = /component
300
287
  ✔ href should be /component/~preview/
301
- (node:52796) [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.
288
+ (node:87249) [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
+ (Use `node --trace-deprecation ...` to show where the warning was created)
302
290
  when href = /component/1.X.X
303
291
  ✔ href should be /component/1.X.X/~preview/
304
292
  when href = /component?hello=world
@@ -474,6 +462,7 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
474
462
 
475
463
  cli : facade : registry : migrate-metadata
476
464
  ✔ should backfill metadata from the configured registry storage
465
+ ✔ should report existing metadata rows as skipped
477
466
  ✔ should load native ESM registry config modules
478
467
  ✔ should pass top-level manageSchema to the configured metadata adapter
479
468
  ✔ should scan storage directories when components-details.json is missing
@@ -710,9 +699,13 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
710
699
  ✔ should map components-details.json content to metadata rows
711
700
  backfillMetadataRows()
712
701
  ✔ should insert rows into the metadata store
713
- ✔ should treat existing metadata rows as skipped
702
+ ✔ should prefilter existing metadata rows
703
+ ✔ should skip all rows when they already exist
704
+ ✔ should avoid metadata reads and writes when there are no rows
705
+ ✔ should treat metadata rows inserted after the prefetch as skipped
714
706
  ✔ should insert rows concurrently with a bounded limit
715
707
  ✔ should treat active metadata reservations as skipped
708
+ ✔ should propagate metadata prefetch errors without inserting rows
716
709
  ✔ should rethrow non-idempotent metadata insert errors
717
710
  backfillMetadataFromComponentsDetails()
718
711
  ✔ should backfill rows from components details
@@ -766,88 +759,88 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
766
759
 
767
760
  registry : domain : options-sanitiser : deprecations
768
761
  when the legacy "s3" shortcut is provided
769
- ✔ emits a deprecation notice pointing to storage.adapter/storage.options (308ms)
762
+ ✔ emits a deprecation notice pointing to storage.adapter/storage.options (264ms)
770
763
  when "refreshInterval" is provided alongside storage
771
- ✔ emits a deprecation notice pointing to pollingInterval (108ms)
772
- ✔ emits a deprecation notice even when the value is falsy (85ms)
773
- ✔ forwards the value into storage.options, initialising it if missing (99ms)
764
+ ✔ emits a deprecation notice pointing to pollingInterval (103ms)
765
+ ✔ emits a deprecation notice even when the value is falsy (82ms)
766
+ ✔ forwards the value into storage.options, initialising it if missing (85ms)
774
767
  when "discovery" is a boolean
775
- ✔ emits a deprecation notice pointing to the object form (86ms)
768
+ ✔ emits a deprecation notice pointing to the object form (78ms)
776
769
  when "discovery" is already an object
777
- ✔ does not emit a deprecation notice (79ms)
770
+ ✔ does not emit a deprecation notice (81ms)
778
771
  when none of the deprecated options are used
779
- ✔ does not emit any deprecation notice (78ms)
772
+ ✔ does not emit any deprecation notice (80ms)
780
773
 
781
774
  registry : domain : options-sanitiser
782
775
  when options is empty
783
- ✔ should set prefix to "/" (69ms)
784
- ✔ should set tempDir to "./temp/" (71ms)
785
- ✔ should set hotReloading to false (69ms)
786
- ✔ should set verbosity to 0 (63ms)
787
- ✔ should set customHeadersToSkipOnWeakVersion to [] (66ms)
788
- ✔ should set cors to {"origin":"*","credentials":true,"allowedHeaders":"Origin, X-Requested-With, Content-Type, Accept, traceparent","methods":"GET, OPTIONS, PUT, POST"} (61ms)
789
- ✔ should set timeout to 120000 (60ms)
790
- ✔ should set dataProvider to {"enabled":true} (56ms)
791
- ✔ should default to the Express HTTP server adapter (112ms)
776
+ ✔ should set prefix to "/" (111ms)
777
+ ✔ should set tempDir to "./temp/" (143ms)
778
+ ✔ should set hotReloading to false (91ms)
779
+ ✔ should set verbosity to 0 (89ms)
780
+ ✔ should set customHeadersToSkipOnWeakVersion to [] (112ms)
781
+ ✔ should set cors to {"origin":"*","credentials":true,"allowedHeaders":"Origin, X-Requested-With, Content-Type, Accept, traceparent","methods":"GET, OPTIONS, PUT, POST"} (100ms)
782
+ ✔ should set timeout to 120000 (79ms)
783
+ ✔ should set dataProvider to {"enabled":true} (70ms)
784
+ ✔ should default to the Express HTTP server adapter (123ms)
792
785
  dataProvider configuration
793
- ✔ should keep dataProvider.enabled when explicitly disabled (58ms)
794
- ✔ should default dataProvider.enabled to true when the object is partial (56ms)
786
+ ✔ should keep dataProvider.enabled when explicitly disabled (59ms)
787
+ ✔ should default dataProvider.enabled to true when the object is partial (58ms)
795
788
  server adapter configuration
796
789
  when no server adapter is provided
797
- ✔ should default to the Express HTTP server adapter (57ms)
790
+ ✔ should default to the Express HTTP server adapter (60ms)
798
791
  when no server options are provided
799
- ✔ should pass the port to the server options (56ms)
792
+ ✔ should pass the port to the server options (58ms)
800
793
  when server options are provided
801
- ✔ should leave them untouched (63ms)
794
+ ✔ should leave them untouched (56ms)
802
795
  when verbosity is provided
803
- ✔ should leave value untouched (63ms)
796
+ ✔ should leave value untouched (58ms)
804
797
  customHeadersToSkipOnWeakVersion
805
798
  when it contains valid elements
806
- ✔ should convert the array elements to lower case (57ms)
799
+ ✔ should convert the array elements to lower case (58ms)
807
800
  cors configuration
808
- ✔ should normalize partial custom values (58ms)
801
+ ✔ should normalize partial custom values (59ms)
809
802
  fallbackRegistryUrl
810
803
  when fallbackRegistryUrl doesn't contain / at the end of url
811
804
  ✔ should add `/` at the end of url (59ms)
812
805
  when fallbackRegistryUrl contains `/` at the end of url
813
- ✔ should not modify fallbackRegistryUrl url (58ms)
806
+ ✔ should not modify fallbackRegistryUrl url (57ms)
814
807
  prefix and baseUrl sanitization
815
- ✔ should support various scenarios correctly (785ms)
808
+ ✔ should support various scenarios correctly (816ms)
816
809
  when pollingInterval
817
810
  is provided
818
- ✔ should not modify it (49ms)
811
+ ✔ should not modify it (55ms)
819
812
  is not provided
820
- ✔ should initialize it as 5000 (55ms)
813
+ ✔ should initialize it as 5000 (57ms)
821
814
  when templates
822
815
  is provided
823
816
  ✔ should not modify it
824
817
  is not provided
825
- ✔ should initialize it as 5000 (56ms)
818
+ ✔ should initialize it as 5000 (57ms)
826
819
  when env
827
820
  is provided
828
821
  ✔ should not modify it (58ms)
829
822
  is not provided
830
- ✔ should initialize it as an empty {} (56ms)
823
+ ✔ should initialize it as an empty {} (55ms)
831
824
  storage adapter configuration
832
825
  when legacy "s3" param
833
826
  is provided
834
- ✔ should create a storage.adapter configuration accordingly (115ms)
835
- (node:52796) DeprecationWarning: The `s3` config shortcut is deprecated and will be removed in OpenComponents v1 - use explicit `storage.adapter`/`storage.options` instead.
827
+ ✔ should create a storage.adapter configuration accordingly (114ms)
828
+ (node:87249) DeprecationWarning: The `s3` config shortcut is deprecated and will be removed in OpenComponents v1 - use explicit `storage.adapter`/`storage.options` instead.
836
829
  when no storage adapter
837
830
  is provided
838
- ✔ should default to the oc-s3-storage-adapter (53ms)
831
+ ✔ should default to the oc-s3-storage-adapter (57ms)
839
832
  when refreshInterval
840
833
  is provided
841
- ✔ should pass the refreshInterval to the storage options (53ms)
842
- (node:52796) DeprecationWarning: The `refreshInterval` option is deprecated and will be removed in OpenComponents v1 - use `pollingInterval` instead.
834
+ ✔ should pass the refreshInterval to the storage options (56ms)
835
+ (node:87249) DeprecationWarning: The `refreshInterval` option is deprecated and will be removed in OpenComponents v1 - use `pollingInterval` instead.
843
836
  when verbosity
844
837
  is provided
845
- ✔ should pass the verbosity to the storage options (52ms)
838
+ ✔ should pass the verbosity to the storage options (58ms)
846
839
  when storage.path
847
840
  does not include a protocol
848
- ✔ should sanitize the path to rely on the https protocol (54ms)
841
+ ✔ should sanitize the path to rely on the https protocol (60ms)
849
842
  does include a prefix
850
- ✔ should not modify it (55ms)
843
+ ✔ should not modify it (57ms)
851
844
 
852
845
  registry : domain : plugins-initialiser
853
846
  ✔ should keep deferred plugins isolated across concurrent initialisations
@@ -861,7 +854,7 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
861
854
  when plugin does not expose an execute method
862
855
  ✔ should error
863
856
  when initialising valid plugins
864
- (node:52796) DeprecationWarning: Plugin register callbacks is deprecated and will be removed in OpenComponents v1 - use an async register(options, dependencies) function instead.
857
+ (node:87249) DeprecationWarning: Plugin register callbacks is deprecated and will be removed in OpenComponents v1 - use an async register(options, dependencies) function instead.
865
858
  ✔ should register plugin with passed options
866
859
  ✔ should expose the functionalities using the plugin names
867
860
  ✔ should expose descriptions on the plugin functions if defined
@@ -888,17 +881,18 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
888
881
  and additional template is already part of core-templates
889
882
  ✔ should correctly register core-templates only
890
883
 
891
- registry : domain : repository : manifest cache
884
+ registry : domain : repository : component info cache
892
885
  ✔ caches repeated exact and range requests after resolving an exact version
893
886
  ✔ coalesces concurrent loads and retries after a rejected load
894
887
  ✔ recursively freezes cached state while returning a fresh top-level result
895
- ✔ bounds manifests at 1000 entries and evicts the true LRU key
896
- ✔ does not share manifest values between repository instances
897
- ✔ caches local source and packaged manifests only when hot reloading is disabled
888
+ ✔ bounds component info at 1000 entries and evicts the true LRU key
889
+ ✔ does not share component info between repository instances
890
+ ✔ caches local source versions and packaged component info only when hot reloading is disabled
898
891
  ✔ prevents invalidated legacy in-flight loads from repopulating the cache
899
892
  ✔ keeps older in-flight cleanup from deleting a newer load
900
893
  ✔ reconciles genuinely new concurrent legacy publishes before later reads
901
- ✔ invalidates metadata manifests only after a successful commit
894
+ ✔ attaches refreshed versions to cached component info after publish
895
+ ✔ invalidates metadata-backed component info only after a successful commit
902
896
  ✔ keeps invalidation state bounded to live loads across 1001 publishes
903
897
 
904
898
  registry : domain : repository
@@ -1036,10 +1030,14 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
1036
1030
  ✔ should throw
1037
1031
 
1038
1032
  registry : domain : adapter
1033
+ component file privacy
1034
+ ✔ keeps server.js and dot-files private on any platform
1035
+ ✔ keeps other component files public
1039
1036
  when is not a legacy adapter
1040
1037
  ✔ returns the same adapter
1041
1038
  when is a legacy adapter
1042
1039
  ✔ returns a universalified adapter
1040
+ ✔ keeps the optional classifier out of the legacy callback slot
1043
1041
  when is an official adapter
1044
1042
  ✔ Shows a deprecation warning asking to upgrade
1045
1043
  when is not an official adapter
@@ -1331,7 +1329,13 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
1331
1329
  ✔ should apply custom security headers across the HTTP adapter
1332
1330
 
1333
1331
  registry : router : artifact cache
1334
- ✔ shares cold artifact loads between GET and batch routes (42ms)
1332
+ ✔ shares cold artifact loads between GET and batch routes (41ms)
1333
+
1334
+ registry : routes : component info mutation isolation
1335
+ ✔ renders the index view from recursively frozen component info
1336
+ ✔ returns unchanged component-info JSON without attaching requestVersion
1337
+ ✔ returns unchanged preview JSON without attaching requestVersion
1338
+ ✔ renders a component while its repository component info is recursively frozen
1335
1339
 
1336
1340
  registry : routes : component
1337
1341
  when getting a component with server.js execution timeout
@@ -1363,7 +1367,7 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
1363
1367
  ✔ should return component's name and request version for both requests
1364
1368
  when getting a component that implements a plugin
1365
1369
  when plugin not declared in package.json
1366
- (node:52796) [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.)
1370
+ (node:87249) [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.)
1367
1371
  ✔ should return 500 status code
1368
1372
  ✔ should respond with GENERIC_ERROR error code
1369
1373
  ✔ should respond with error message including missing plugin
@@ -1473,6 +1477,57 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
1473
1477
  when string parameter is null
1474
1478
  ✔ should return requestParameters with default values of optional parameters
1475
1479
 
1480
+ registry : routes : helpers : component-parameter-processor
1481
+ parity with original three-stage pipeline
1482
+ ✔ should match original for: empty/undefined schema with no request parameters
1483
+ ✔ should match original for: empty schema with no request parameters
1484
+ ✔ should match original for: empty schema with ordinary undeclared parameters
1485
+ ✔ should match original for: removal of __ocAcceptLanguage from provider params
1486
+ ✔ should match original for: array-shaped request parameters
1487
+ ✔ should match original for: optional defaults for string
1488
+ ✔ should match original for: optional defaults for false
1489
+ ✔ should match original for: optional defaults for zero
1490
+ ✔ should match original for: optional defaults for empty string
1491
+ ✔ should match original for: explicit request values overriding defaults
1492
+ ✔ should match original for: missing mandatory parameters and exact error text/order
1493
+ ✔ should match original for: string/number/boolean coercion
1494
+ ✔ should match original for: mixed-case types validate without enabling coercion
1495
+ ✔ should match original for: invalid type
1496
+ ✔ should match original for: invalid enum values
1497
+ ✔ should match original for: multiple missing/invalid parameters and exact joined message
1498
+ ✔ should match original for: defaults with null should be replaced
1499
+ ✔ should match original for: defaults with undefined should be replaced
1500
+ ✔ should match original for: number coercion of string numeric
1501
+ ✔ should match original for: boolean coercion true
1502
+ ✔ should match original for: boolean coercion false
1503
+ ✔ should match original for: string null becomes empty string
1504
+ ✔ should match original for: mandatory missing order preserved
1505
+ ✔ should match original for: type errors order preserved
1506
+ ✔ should match original for: combined mandatory and type errors message
1507
+ ✔ should preserve mutation behavior: applying defaults mutates original request object
1508
+ ✔ should preserve distinct object: sanitized params are a distinct object from input
1509
+ ✔ should keep __ocAcceptLanguage available to language selection (original not mutated for that key)
1510
+ ✔ should preserve __ocAcceptLanguage when it is a declared parameter
1511
+ schema compilation
1512
+ ✔ should compile empty/missing schemas to shared singleton
1513
+ ✔ should reject malformed parameter descriptors
1514
+ ✔ should compile non-empty schema with ordered defaults/mandatory/types
1515
+ ✔ should normalize type names during compilation
1516
+ ✔ should not capture request data in compiled object
1517
+ empty-schema fast lane
1518
+ ✔ should skip defaults/mandatory/type/enum and preserve undeclared params
1519
+ ✔ should produce distinct objects for empty schema
1520
+ output and error objects are not shared between requests
1521
+ ✔ should return fresh params and errors each call
1522
+ ✔ should return fresh objects for valid case as well
1523
+ hot-reload schema identity
1524
+ ✔ should produce new defaults/validation immediately for new schema identity
1525
+ compilation caching via get-component WeakMap
1526
+ ✔ should compile same schema object once across repeated renders
1527
+ ✔ should compile different schema identities independently
1528
+ enum behavior preservation
1529
+ ✔ should use strict equality (includes) for enum checks
1530
+
1476
1531
  registry : routes : helpers : get-available-dependencies
1477
1532
  happy path
1478
1533
  ✔ should map to structured view-model
@@ -1485,6 +1540,30 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
1485
1540
  registry : routes : helpers : get-component-fallback
1486
1541
  ✔ should not forward accept-encoding header when fetching from fallback registry
1487
1542
 
1543
+ registry : routes : helpers : get-component timing
1544
+ callback ordering invariants
1545
+ ✔ returns from the renderer call before completion and preserves provider → event → callback order
1546
+ ✔ does not look up env or invoke the provider before repository resolution completes
1547
+ ✔ invokes the provider only after env resolution completes
1548
+ exact-once completion invariants
1549
+ ✔ produces exactly one error result when a provider throws synchronously
1550
+ ✔ produces exactly one result for an asynchronously succeeding provider
1551
+ ✔ produces exactly one error result for an asynchronously failing provider
1552
+ ✔ completes exactly once when a provider calls back twice
1553
+ timeout invariants
1554
+ ✔ clears the timeout before dispatching the retrieval event and the public callback
1555
+ retrieval event payload invariants
1556
+ ✔ fires component-retrieved exactly once with final fields immediately before the public callback on success
1557
+ ✔ preserves response fields in the component-retrieved payload for errors
1558
+ local diagnostics invariants
1559
+ ✔ finishes stack enrichment before the retrieval event and the public callback
1560
+ ✔ falls back to the original stack when enrichment fails
1561
+ warm env cache invariants
1562
+ ✔ serves consecutive renders without a second repository env lookup
1563
+ dynamic listener semantics with the real events handler
1564
+ ✔ delivers the completion event to a listener added mid-flight
1565
+ ✔ does not deliver the completion event to a listener removed mid-flight
1566
+
1488
1567
  registry : routes : helpers : get-component
1489
1568
  when the component has an env file
1490
1569
  ✔ should put the env data as part of the context, available to the server
@@ -1531,12 +1610,6 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
1531
1610
  when url responds with text/html
1532
1611
  ✔ should be discoverable
1533
1612
 
1534
- registry : routes : manifest mutation isolation
1535
- ✔ renders the index view from a recursively frozen manifest
1536
- ✔ returns unchanged component-info JSON without attaching requestVersion
1537
- ✔ returns unchanged preview JSON without attaching requestVersion
1538
- ✔ renders a component while its repository manifest is recursively frozen
1539
-
1540
1613
  registry : routes : plugins
1541
1614
  when is not discoverable
1542
1615
  ✔ should return 401 status code
@@ -1635,7 +1708,7 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
1635
1708
 
1636
1709
  tasks : server benchmark verify CLI
1637
1710
  ✔ exits zero for a compatible passing result (268ms)
1638
- ✔ exits nonzero for every mismatch class (2204ms)
1711
+ ✔ exits nonzero for every mismatch class (2300ms)
1639
1712
 
1640
1713
  utils : bounded cache
1641
1714
  ✔ rejects invalid capacities
@@ -1722,85 +1795,180 @@ compiling component /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/tes
1722
1795
  when a version is not included
1723
1796
  ✔ should return the unmodified dependency
1724
1797
 
1798
+ utils : put
1799
+ when the registry edge resets streamed uploads over HTTP/2
1800
+ (node:87249) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
1801
+ ✔ uploads successfully by falling back to HTTP/1.1
1802
+
1803
+ The targz dependency
1804
+ when compressing a folder with targz
1805
+ ✔ should create the file
1806
+ when decompressing the created file
1807
+ ✔ should throw no error
1808
+ ✔ should contain the files
1809
+
1725
1810
  registry (ui interface)
1726
- (node:52796) DeprecationWarning: The boolean form of the `discovery` option is deprecated and will be removed in OpenComponents v1 - use the object form (`discovery: { ui, api, ... }`) instead.
1727
- 1) "before all" hook in "registry (ui interface)"
1728
- 2) "after all" hook in "registry (ui interface)"
1811
+ (node:87249) DeprecationWarning: The boolean form of the `discovery` option is deprecated and will be removed in OpenComponents v1 - use the object form (`discovery: { ui, api, ... }`) instead.
1812
+ GET / with Accept: text/html
1813
+ ✔ should not error
1814
+ ✔ should respond with html result
1815
+ GET /oc-client/~info with Accept: text/html
1816
+ ✔ should not error
1817
+ ✔ should respond with html result
1818
+ GET /welcome-with-optional-parameters/~info with Accept: text/html
1819
+ ✔ should not error
1820
+ ✔ should respond with html result
1821
+ ✔ should include parameter input fields
1822
+ ✔ should include parameter update JavaScript
1729
1823
 
1730
1824
  registry
1731
- 3) "before all" hook in "registry"
1732
- 4) "after all" hook in "registry"
1825
+ when initialised with invalid configuration
1826
+ ✔ should throw an error
1827
+ GET /hello-world-custom-headers
1828
+ with the default configuration (no customHeadersToSkipOnWeakVersion defined) and strong version 1.0.0
1829
+ ✔ should return the component with custom headers
1830
+ with the default configuration (no customHeadersToSkipOnWeakVersion defined) and weak version 1.x.x
1831
+ ✔ should return the component with custom headers
1832
+ with a custom configuration with customHeadersToSkipOnWeakVersion defined
1833
+ when strong version is requested 1.0.0
1834
+ ✔ should return the component with the custom headers
1835
+ when weak version is requested 1.x.x
1836
+ ✔ should skip Cache-Control header
1837
+ GET /hello-world-custom-cookies
1838
+ with the default configuration and strong version 1.0.0
1839
+ ✔ should return the component and set cookies
1840
+ POST /hello-world-custom-headers
1841
+ with the default configuration (no customHeadersToSkipOnWeakVersion defined) and strong version 1.0.0
1842
+ ✔ should set HTTP custom headers
1843
+ ✔ should return the component with custom headers
1844
+ request with two components
1845
+ ✔ should not set HTTP custom headers
1846
+ with the default configuration (no customHeadersToSkipOnWeakVersion defined) and weak version 1.x.x
1847
+ ✔ should set HTTP custom headers
1848
+ ✔ should return the component with custom headers in the response body
1849
+ with a custom configuration with customHeadersToSkipOnWeakVersion defined
1850
+ when strong version is requested 1.0.0
1851
+ ✔ should set HTTP custom headers
1852
+ ✔ should return the component with the custom headers
1853
+ when weak version is requested 1.x.x
1854
+ ✔ should have HTTP custom headers
1855
+ ✔ should skip Cache-Control header
1856
+ POST /hello-world-custom-cookies
1857
+ with the default configuration and strong version 1.0.0
1858
+ ✔ should set HTTP cookies
1859
+ ✔ should return the component and keep headers in body the same
1860
+ GET /
1861
+ ✔ should respond with the correct href
1862
+ ✔ should list the components
1863
+ POST / (with circular-json)
1864
+ ✔ should respond with 500 status code
1865
+ ✔ should respond with rendering error
1866
+ GET /circular-json-error
1867
+ ✔ should respond with 500 status code
1868
+ ✔ should respond with rendering error
1869
+ GET /handlebars3-component
1870
+ ✔ should respond with 500 status code
1871
+ ✔ should respond with error for unsupported handlebars version
1872
+ GET /jade-filters
1873
+ ✔ should respond with 200 status code
1874
+ GET /hello-world
1875
+ when Accept header not specified
1876
+ ✔ should respond with the correct href
1877
+ ✔ should respond with requested version
1878
+ ✔ should respond with resolved version
1879
+ ✔ should respond with component name
1880
+ ✔ should respond with the rendered template
1881
+ ✔ should respond with render type = rendered
1882
+ when Accept header set to application/vnd.oc.unrendered+json
1883
+ ✔ should respond with the correct href
1884
+ ✔ should respond with requested version
1885
+ ✔ should respond with resolved version
1886
+ ✔ should respond with component name
1887
+ ✔ should respond with the un-rendered template
1888
+ ✔ should respond with proper render type
1889
+ GET /container-with-nested
1890
+ ✔ should respond with the correct href
1891
+ ✔ should respond with the rendered template including the nested rendered component
1892
+ ✔ should respond with proper render type
1893
+ GET /container-with-multiple-nested
1894
+ ✔ should respond with the correct href
1895
+ ✔ should respond with the rendered template including the nested rendered component
1896
+ ✔ should respond with proper render type
1897
+ GET /no-containers
1898
+ when Accept header not specified
1899
+ ✔ should respond with the correct href
1900
+ ✔ should respond with the rendered template without the outer container and without render info script
1901
+ ✔ should respond with proper render type
1902
+ GET /language
1903
+ when Accept-Language: en-US
1904
+ ✔ should respond with correct href
1905
+ ✔ should contain english language
1906
+ when Accept-Language: ja-JP
1907
+ ✔ should respond with correct href
1908
+ ✔ should contain japanese language
1909
+ when Accept-Language: ja-JP but __ocAcceptLanguage overrides with en-US (client-side failover)
1910
+ ✔ should respond with correct href
1911
+ ✔ should contain japanese language
1912
+ GET /lodash-component
1913
+ ✔ should respond with the correct href
1914
+ ✔ should respond correctly after using lodash server dependency
1915
+ GET /empty
1916
+ rendered
1917
+ ✔ should respond with the correct href
1918
+ ✔ should respond with an empty response
1919
+ unrendered
1920
+ ✔ should respond with the correct href
1921
+ ✔ should respond with a minimal empty view-model
1922
+ POST /
1923
+ when body is malformed
1924
+ ✔ should respond with 400 status code
1925
+ ✔ should respond with error
1926
+ when body contains multiple components
1927
+ when Accept header not specified
1928
+ ✔ should respond with two 200 status codes
1929
+ ✔ should respond with two rendered components
1930
+ when omitHref=true
1931
+ when getting rendered components
1932
+ ✔ should respond without href parameter
1933
+ when getting unrendered components
1934
+ ✔ should respond without href parameter
1935
+ when Accept header set to application/vnd.oc.unrendered+json
1936
+ ✔ should respond with two unrendered components
1937
+ when components require params
1938
+ when each component requires different params
1939
+ ✔ should render components with expected parameters
1940
+ when components require same parameters
1941
+ ✔ should render components with expected parameters
1942
+ when components have some common parameters and some different
1943
+ ✔ should render components with expected parameters
1944
+ when components have global parameters with local overrides
1945
+ ✔ should render components with expected parameters
1946
+ when components accept optional parameters
1947
+ ✔ should render first component with provided parameters
1948
+ ✔ should render second and third components with default value of nick
1949
+ ✔ should render fourth component without value of lastName
1950
+ GET /:componentName/:componentVersion/static/*splat (local-mode static route)
1951
+ when requesting an existing packaged file
1952
+ ✔ should respond with 200
1953
+ ✔ should respond with the packaged file contents
1954
+ when requesting a missing file
1955
+ ✔ should respond with 404
1733
1956
 
1734
1957
  registry
1735
1958
  when fallbackRegistryUrl is specified
1736
- 5) "before all" hook in "when fallbackRegistryUrl is specified"
1737
- 6) "after all" hook in "when fallbackRegistryUrl is specified"
1738
-
1739
-
1740
- 939 passing (12s)
1741
- 6 failing
1742
-
1743
- 1) registry (ui interface)
1744
- "before all" hook in "registry (ui interface)":
1745
- Error: listen EADDRINUSE: address already in use :::3030
1746
- at Server.setupListenHandle [as _listen2] (node:net:2008:16)
1747
- at listenInCluster (node:net:2065:12)
1748
- at Server.listen (node:net:2170:7)
1749
- at /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/dist/registry/domain/http-server/express-adapter.js:149:26
1750
- at new Promise (<anonymous>)
1751
- at ExpressHttpServerAdapter.listen (dist/registry/domain/http-server/express-adapter.js:134:16)
1752
- at listenAdapter (dist/registry/index.js:77:28)
1753
- at startPromise (dist/registry/index.js:143:35)
1754
- at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
1755
-
1756
- 2) registry (ui interface)
1757
- "after all" hook in "registry (ui interface)":
1758
- Error: done() invoked with non-Error: not opened
1759
- at /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/dist/registry/index.js:123:13
1760
-
1761
- 3) registry
1762
- "before all" hook in "registry":
1763
- Error: listen EADDRINUSE: address already in use :::3030
1764
- at Server.setupListenHandle [as _listen2] (node:net:2008:16)
1765
- at listenInCluster (node:net:2065:12)
1766
- at Server.listen (node:net:2170:7)
1767
- at /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/dist/registry/domain/http-server/express-adapter.js:149:26
1768
- at new Promise (<anonymous>)
1769
- at ExpressHttpServerAdapter.listen (dist/registry/domain/http-server/express-adapter.js:134:16)
1770
- at listenAdapter (dist/registry/index.js:77:28)
1771
- at startPromise (dist/registry/index.js:143:35)
1772
-
1773
- 4) registry
1774
- "after all" hook in "registry":
1775
- Error: done() invoked with non-Error: not opened
1776
- at /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/dist/registry/index.js:123:13
1777
-
1778
- 5) registry
1779
- when fallbackRegistryUrl is specified
1780
- "before all" hook in "when fallbackRegistryUrl is specified":
1781
- Error: listen EADDRINUSE: address already in use :::3031
1782
- at Server.setupListenHandle [as _listen2] (node:net:2008:16)
1783
- at listenInCluster (node:net:2065:12)
1784
- at Server.listen (node:net:2170:7)
1785
- at /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/dist/registry/domain/http-server/express-adapter.js:149:26
1786
- at new Promise (<anonymous>)
1787
- at ExpressHttpServerAdapter.listen (dist/registry/domain/http-server/express-adapter.js:134:16)
1788
- at listenAdapter (dist/registry/index.js:77:28)
1789
- at startPromise (dist/registry/index.js:143:35)
1790
- at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
1791
-
1792
- 6) registry
1793
- when fallbackRegistryUrl is specified
1794
- "after all" hook in "when fallbackRegistryUrl is specified":
1795
- Error: done() invoked with non-Error: not opened
1796
- at /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc/dist/registry/index.js:123:13
1797
-
1798
-
1799
-
1800
- npm error Lifecycle script `test` failed with error:
1801
- npm error code 6
1802
- npm error path /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc
1803
- npm error workspace oc@0.50.61
1804
- npm error location /Users/Ricardo.Agullo/Work/opencomponents/oc/packages/oc
1805
- npm error command failed
1806
- npm error command sh -c node tasks/mochaTest.js
1959
+ GET /welcome
1960
+ ✔ should respond with the local registry url
1961
+ ✔ should respond the `Hello world!` html
1962
+ GET /fallback-hello-world
1963
+ ✔ should respond with the fallback registry url
1964
+ ✔ should respond the `Hello world!` html
1965
+ GET /fallback-hello-world/~info
1966
+ ✔ should respond with requested component
1967
+ ✔ should respond with components parameters
1968
+ GET /fallback-hello-world/~preview
1969
+ ✔ should respond with requested component
1970
+ ✔ should respond with components parameters
1971
+
1972
+
1973
+ 1097 passing (13s)
1974
+
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oc-client",
3
3
  "description": "The OpenComponents client-side javascript client",
4
- "version": "0.50.63",
4
+ "version": "0.50.64-beta.0",
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": "879a222b2e89b6a0685c2bad8ca3eb9798b6cc55",
26
+ "hashKey": "d2efc3e306af52e418ffd7096fbbb84097a2332b",
27
27
  "src": "server.js",
28
- "size": 644
28
+ "size": 651
29
29
  }
30
30
  },
31
- "version": "0.50.63",
31
+ "version": "0.50.64-beta.0",
32
32
  "packaged": true,
33
- "date": 1787207196137
33
+ "date": 1788948987478
34
34
  },
35
35
  "devDependencies": {
36
36
  "oc-template-es6-compiler": "^8.0.0"