@rindo/core 2.17.1 → 2.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/cli/config-flags.d.ts +12 -4
- package/cli/index.cjs +113 -73
- package/cli/index.d.ts +1 -1
- package/cli/index.js +113 -73
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/rindo.js +348 -61
- package/compiler/rindo.min.js +2 -2
- package/dependencies.json +1 -1
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +1 -1
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +1 -1
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/package.json +1 -1
- package/internal/package.json +1 -1
- package/internal/rindo-private.d.ts +12 -2
- package/internal/rindo-public-compiler.d.ts +1 -1
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +41 -3
- package/mock-doc/index.d.ts +15 -0
- package/mock-doc/index.js +41 -3
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/package.json +1 -1
- package/sys/node/index.js +1 -1
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +37 -22
- package/testing/mocks.d.ts +7 -6
- package/testing/package.json +1 -1
package/mock-doc/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Mock Doc (CommonJS) v2.17.
|
|
2
|
+
Rindo Mock Doc (CommonJS) v2.17.2 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
var mockDoc = (function(exports) {
|
|
5
5
|
'use strict';
|
|
@@ -689,6 +689,25 @@ class MockMouseEvent extends MockEvent {
|
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
|
+
class MockUIEvent extends MockEvent {
|
|
693
|
+
constructor(type, uiEventInitDic) {
|
|
694
|
+
super(type);
|
|
695
|
+
this.detail = null;
|
|
696
|
+
this.view = null;
|
|
697
|
+
if (uiEventInitDic != null) {
|
|
698
|
+
Object.assign(this, uiEventInitDic);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
class MockFocusEvent extends MockUIEvent {
|
|
703
|
+
constructor(type, focusEventInitDic) {
|
|
704
|
+
super(type);
|
|
705
|
+
this.relatedTarget = null;
|
|
706
|
+
if (focusEventInitDic != null) {
|
|
707
|
+
Object.assign(this, focusEventInitDic);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}
|
|
692
711
|
class MockEventListener {
|
|
693
712
|
constructor(type, handler) {
|
|
694
713
|
this.type = type;
|
|
@@ -1603,7 +1622,7 @@ class MockElement extends MockNode {
|
|
|
1603
1622
|
return shadowRoot;
|
|
1604
1623
|
}
|
|
1605
1624
|
blur() {
|
|
1606
|
-
|
|
1625
|
+
dispatchEvent(this, new MockFocusEvent('blur', { relatedTarget: null, bubbles: true, cancelable: true, composed: true }));
|
|
1607
1626
|
}
|
|
1608
1627
|
get shadowRoot() {
|
|
1609
1628
|
return this.__shadowRoot || null;
|
|
@@ -1673,7 +1692,9 @@ class MockElement extends MockNode {
|
|
|
1673
1692
|
get firstElementChild() {
|
|
1674
1693
|
return this.children[0] || null;
|
|
1675
1694
|
}
|
|
1676
|
-
focus(_options) {
|
|
1695
|
+
focus(_options) {
|
|
1696
|
+
dispatchEvent(this, new MockFocusEvent('focus', { relatedTarget: null, bubbles: true, cancelable: true, composed: true }));
|
|
1697
|
+
}
|
|
1677
1698
|
getAttribute(attrName) {
|
|
1678
1699
|
if (attrName === 'style') {
|
|
1679
1700
|
if (this.__style != null && this.__style.length > 0) {
|
|
@@ -2018,6 +2039,9 @@ class MockElement extends MockNode {
|
|
|
2018
2039
|
set title(value) {
|
|
2019
2040
|
this.setAttributeNS(null, 'title', value);
|
|
2020
2041
|
}
|
|
2042
|
+
animate() {
|
|
2043
|
+
/**/
|
|
2044
|
+
}
|
|
2021
2045
|
onanimationstart() {
|
|
2022
2046
|
/**/
|
|
2023
2047
|
}
|
|
@@ -2282,6 +2306,18 @@ class MockElement extends MockNode {
|
|
|
2282
2306
|
onwheel() {
|
|
2283
2307
|
/**/
|
|
2284
2308
|
}
|
|
2309
|
+
requestFullscreen() {
|
|
2310
|
+
/**/
|
|
2311
|
+
}
|
|
2312
|
+
scrollBy() {
|
|
2313
|
+
/**/
|
|
2314
|
+
}
|
|
2315
|
+
scrollTo() {
|
|
2316
|
+
/**/
|
|
2317
|
+
}
|
|
2318
|
+
scrollIntoView() {
|
|
2319
|
+
/**/
|
|
2320
|
+
}
|
|
2285
2321
|
toString(opts) {
|
|
2286
2322
|
return serializeNodeToHtml(this, opts);
|
|
2287
2323
|
}
|
|
@@ -3432,6 +3468,7 @@ const WINDOW_PROPS = [
|
|
|
3432
3468
|
'HTMLElement',
|
|
3433
3469
|
'Node',
|
|
3434
3470
|
'NodeList',
|
|
3471
|
+
'FocusEvent',
|
|
3435
3472
|
'KeyboardEvent',
|
|
3436
3473
|
'MouseEvent',
|
|
3437
3474
|
];
|
|
@@ -3439,6 +3476,7 @@ const GLOBAL_CONSTRUCTORS = [
|
|
|
3439
3476
|
['CustomEvent', MockCustomEvent],
|
|
3440
3477
|
['Event', MockEvent],
|
|
3441
3478
|
['Headers', MockHeaders],
|
|
3479
|
+
['FocusEvent', MockFocusEvent],
|
|
3442
3480
|
['KeyboardEvent', MockKeyboardEvent],
|
|
3443
3481
|
['MouseEvent', MockMouseEvent],
|
|
3444
3482
|
['Request', MockRequest],
|
package/mock-doc/index.d.ts
CHANGED
|
@@ -386,6 +386,15 @@ declare class MockMouseEvent extends MockEvent {
|
|
|
386
386
|
relatedTarget: EventTarget;
|
|
387
387
|
constructor(type: string, mouseEventInitDic?: MouseEventInit);
|
|
388
388
|
}
|
|
389
|
+
declare class MockUIEvent extends MockEvent {
|
|
390
|
+
detail: number | null;
|
|
391
|
+
view: MockWindow | null;
|
|
392
|
+
constructor(type: string, uiEventInitDic?: UIEventInit);
|
|
393
|
+
}
|
|
394
|
+
declare class MockFocusEvent extends MockUIEvent {
|
|
395
|
+
relatedTarget: EventTarget | null;
|
|
396
|
+
constructor(type: 'blur' | 'focus', focusEventInitDic?: FocusEventInit);
|
|
397
|
+
}
|
|
389
398
|
declare class MockEventListener {
|
|
390
399
|
type: string;
|
|
391
400
|
handler: (ev?: any) => void;
|
|
@@ -588,6 +597,7 @@ declare class MockElement extends MockNode {
|
|
|
588
597
|
set textContent(value: string);
|
|
589
598
|
get title(): string;
|
|
590
599
|
set title(value: string);
|
|
600
|
+
animate(): void;
|
|
591
601
|
onanimationstart(): void;
|
|
592
602
|
onanimationend(): void;
|
|
593
603
|
onanimationiteration(): void;
|
|
@@ -676,6 +686,10 @@ declare class MockElement extends MockNode {
|
|
|
676
686
|
onwebkitfullscreenchange(): void;
|
|
677
687
|
onwebkitfullscreenerror(): void;
|
|
678
688
|
onwheel(): void;
|
|
689
|
+
requestFullscreen(): void;
|
|
690
|
+
scrollBy(): void;
|
|
691
|
+
scrollTo(): void;
|
|
692
|
+
scrollIntoView(): void;
|
|
679
693
|
toString(opts?: SerializeNodeToHtmlOptions): string;
|
|
680
694
|
}
|
|
681
695
|
declare function resetElement(elm: MockElement): void;
|
|
@@ -833,6 +847,7 @@ declare class MockWindow {
|
|
|
833
847
|
CustomEvent: typeof MockCustomEvent;
|
|
834
848
|
Event: typeof MockEvent;
|
|
835
849
|
Headers: typeof MockHeaders;
|
|
850
|
+
FocusEvent: typeof MockFocusEvent;
|
|
836
851
|
KeyboardEvent: typeof MockKeyboardEvent;
|
|
837
852
|
MouseEvent: typeof MockMouseEvent;
|
|
838
853
|
constructor(html?: string | boolean);
|
package/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Mock Doc v2.17.
|
|
2
|
+
Rindo Mock Doc v2.17.2 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
const CONTENT_REF_ID = 'r';
|
|
5
5
|
const ORG_LOCATION_ID = 'o';
|
|
@@ -686,6 +686,25 @@ class MockMouseEvent extends MockEvent {
|
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
|
+
class MockUIEvent extends MockEvent {
|
|
690
|
+
constructor(type, uiEventInitDic) {
|
|
691
|
+
super(type);
|
|
692
|
+
this.detail = null;
|
|
693
|
+
this.view = null;
|
|
694
|
+
if (uiEventInitDic != null) {
|
|
695
|
+
Object.assign(this, uiEventInitDic);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
class MockFocusEvent extends MockUIEvent {
|
|
700
|
+
constructor(type, focusEventInitDic) {
|
|
701
|
+
super(type);
|
|
702
|
+
this.relatedTarget = null;
|
|
703
|
+
if (focusEventInitDic != null) {
|
|
704
|
+
Object.assign(this, focusEventInitDic);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
689
708
|
class MockEventListener {
|
|
690
709
|
constructor(type, handler) {
|
|
691
710
|
this.type = type;
|
|
@@ -1600,7 +1619,7 @@ class MockElement extends MockNode {
|
|
|
1600
1619
|
return shadowRoot;
|
|
1601
1620
|
}
|
|
1602
1621
|
blur() {
|
|
1603
|
-
|
|
1622
|
+
dispatchEvent(this, new MockFocusEvent('blur', { relatedTarget: null, bubbles: true, cancelable: true, composed: true }));
|
|
1604
1623
|
}
|
|
1605
1624
|
get shadowRoot() {
|
|
1606
1625
|
return this.__shadowRoot || null;
|
|
@@ -1670,7 +1689,9 @@ class MockElement extends MockNode {
|
|
|
1670
1689
|
get firstElementChild() {
|
|
1671
1690
|
return this.children[0] || null;
|
|
1672
1691
|
}
|
|
1673
|
-
focus(_options) {
|
|
1692
|
+
focus(_options) {
|
|
1693
|
+
dispatchEvent(this, new MockFocusEvent('focus', { relatedTarget: null, bubbles: true, cancelable: true, composed: true }));
|
|
1694
|
+
}
|
|
1674
1695
|
getAttribute(attrName) {
|
|
1675
1696
|
if (attrName === 'style') {
|
|
1676
1697
|
if (this.__style != null && this.__style.length > 0) {
|
|
@@ -2015,6 +2036,9 @@ class MockElement extends MockNode {
|
|
|
2015
2036
|
set title(value) {
|
|
2016
2037
|
this.setAttributeNS(null, 'title', value);
|
|
2017
2038
|
}
|
|
2039
|
+
animate() {
|
|
2040
|
+
/**/
|
|
2041
|
+
}
|
|
2018
2042
|
onanimationstart() {
|
|
2019
2043
|
/**/
|
|
2020
2044
|
}
|
|
@@ -2279,6 +2303,18 @@ class MockElement extends MockNode {
|
|
|
2279
2303
|
onwheel() {
|
|
2280
2304
|
/**/
|
|
2281
2305
|
}
|
|
2306
|
+
requestFullscreen() {
|
|
2307
|
+
/**/
|
|
2308
|
+
}
|
|
2309
|
+
scrollBy() {
|
|
2310
|
+
/**/
|
|
2311
|
+
}
|
|
2312
|
+
scrollTo() {
|
|
2313
|
+
/**/
|
|
2314
|
+
}
|
|
2315
|
+
scrollIntoView() {
|
|
2316
|
+
/**/
|
|
2317
|
+
}
|
|
2282
2318
|
toString(opts) {
|
|
2283
2319
|
return serializeNodeToHtml(this, opts);
|
|
2284
2320
|
}
|
|
@@ -3429,6 +3465,7 @@ const WINDOW_PROPS = [
|
|
|
3429
3465
|
'HTMLElement',
|
|
3430
3466
|
'Node',
|
|
3431
3467
|
'NodeList',
|
|
3468
|
+
'FocusEvent',
|
|
3432
3469
|
'KeyboardEvent',
|
|
3433
3470
|
'MouseEvent',
|
|
3434
3471
|
];
|
|
@@ -3436,6 +3473,7 @@ const GLOBAL_CONSTRUCTORS = [
|
|
|
3436
3473
|
['CustomEvent', MockCustomEvent],
|
|
3437
3474
|
['Event', MockEvent],
|
|
3438
3475
|
['Headers', MockHeaders],
|
|
3476
|
+
['FocusEvent', MockFocusEvent],
|
|
3439
3477
|
['KeyboardEvent', MockKeyboardEvent],
|
|
3440
3478
|
['MouseEvent', MockMouseEvent],
|
|
3441
3479
|
['Request', MockRequest],
|
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/package.json
CHANGED
package/sys/node/index.js
CHANGED
package/sys/node/package.json
CHANGED
package/sys/node/worker.js
CHANGED
package/testing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Testing v2.17.
|
|
2
|
+
Rindo Testing v2.17.2 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
function _lazyRequire(e) {
|
|
5
5
|
return new Proxy({}, {
|
|
@@ -449,38 +449,40 @@ function versionIncluded(e) {
|
|
|
449
449
|
return matchesRange(e);
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
function mockConfig(e) {
|
|
452
|
+
function mockConfig(e = {}) {
|
|
453
453
|
const t = path__default.default.resolve("/");
|
|
454
|
-
|
|
454
|
+
let {sys: r} = e;
|
|
455
|
+
return r || (r = createTestingSystem()), r.getCurrentDirectory = () => t, {
|
|
455
456
|
_isTesting: !0,
|
|
456
|
-
namespace: "Testing",
|
|
457
|
-
rootDir: t,
|
|
458
|
-
globalScript: null,
|
|
459
|
-
devMode: !0,
|
|
460
|
-
enableCache: !1,
|
|
461
457
|
buildAppCore: !1,
|
|
462
458
|
buildDist: !0,
|
|
463
|
-
flags: {},
|
|
464
|
-
bundles: null,
|
|
465
|
-
outputTargets: null,
|
|
466
459
|
buildEs5: !1,
|
|
460
|
+
bundles: null,
|
|
461
|
+
devMode: !0,
|
|
462
|
+
enableCache: !1,
|
|
463
|
+
extras: {},
|
|
464
|
+
flags: createConfigFlags(),
|
|
465
|
+
globalScript: null,
|
|
467
466
|
hashFileNames: !1,
|
|
468
467
|
logger: new TestingLogger,
|
|
469
468
|
maxConcurrentWorkers: 0,
|
|
470
469
|
minifyCss: !1,
|
|
471
470
|
minifyJs: !1,
|
|
472
|
-
|
|
473
|
-
testing: null,
|
|
474
|
-
validateTypes: !1,
|
|
475
|
-
extras: {},
|
|
471
|
+
namespace: "Testing",
|
|
476
472
|
nodeResolve: {
|
|
477
473
|
customResolveOptions: {}
|
|
478
474
|
},
|
|
479
|
-
|
|
475
|
+
outputTargets: null,
|
|
480
476
|
rollupPlugins: {
|
|
481
477
|
before: [],
|
|
482
478
|
after: []
|
|
483
|
-
}
|
|
479
|
+
},
|
|
480
|
+
rootDir: t,
|
|
481
|
+
sourceMap: !0,
|
|
482
|
+
sys: r,
|
|
483
|
+
testing: null,
|
|
484
|
+
validateTypes: !1,
|
|
485
|
+
...e
|
|
484
486
|
};
|
|
485
487
|
}
|
|
486
488
|
|
|
@@ -3044,7 +3046,7 @@ const createSystem = e => {
|
|
|
3044
3046
|
u("/");
|
|
3045
3047
|
const D = {
|
|
3046
3048
|
name: "in-memory",
|
|
3047
|
-
version: "2.17.
|
|
3049
|
+
version: "2.17.2",
|
|
3048
3050
|
events: i,
|
|
3049
3051
|
access: async e => c(e),
|
|
3050
3052
|
accessSync: c,
|
|
@@ -3416,6 +3418,14 @@ class TestingLogger {
|
|
|
3416
3418
|
printDiagnostics(e) {}
|
|
3417
3419
|
}
|
|
3418
3420
|
|
|
3421
|
+
const createConfigFlags = (e = {}) => ({
|
|
3422
|
+
task: null,
|
|
3423
|
+
args: [],
|
|
3424
|
+
knownArgs: [],
|
|
3425
|
+
unknownArgs: [],
|
|
3426
|
+
...e
|
|
3427
|
+
});
|
|
3428
|
+
|
|
3419
3429
|
class EventSpy {
|
|
3420
3430
|
constructor(e) {
|
|
3421
3431
|
this.eventName = e, this.events = [], this.cursor = 0, this.queuedHandler = [];
|
|
@@ -3981,11 +3991,16 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3981
3991
|
hasVdomText: !1,
|
|
3982
3992
|
hasVdomXlink: !1,
|
|
3983
3993
|
...e
|
|
3984
|
-
}), exports.mockValidatedConfig = function mockValidatedConfig(e) {
|
|
3994
|
+
}), exports.mockValidatedConfig = function mockValidatedConfig(e = {}) {
|
|
3995
|
+
var t;
|
|
3996
|
+
const r = mockConfig(e);
|
|
3985
3997
|
return {
|
|
3986
|
-
...
|
|
3987
|
-
flags:
|
|
3988
|
-
logger: mockLogger()
|
|
3998
|
+
...r,
|
|
3999
|
+
flags: createConfigFlags(),
|
|
4000
|
+
logger: mockLogger(),
|
|
4001
|
+
outputTargets: null !== (t = r.outputTargets) && void 0 !== t ? t : [],
|
|
4002
|
+
sys: createTestingSystem(),
|
|
4003
|
+
...e
|
|
3989
4004
|
};
|
|
3990
4005
|
}, exports.mockWindow = function mockWindow(e = null) {
|
|
3991
4006
|
return new index_cjs.MockWindow(e);
|
package/testing/mocks.d.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import type { BuildCtx, Cache, CompilerCtx,
|
|
1
|
+
import type { BuildCtx, Cache, CompilerCtx, Config, LoadConfigInit, ValidatedConfig, Module, UnvalidatedConfig } from '@rindo/core/internal';
|
|
2
2
|
import { TestingSystem } from './testing-sys';
|
|
3
3
|
import { TestingLogger } from './testing-logger';
|
|
4
4
|
/**
|
|
5
5
|
* Creates a mock instance of an internal, validated Rindo configuration object
|
|
6
|
-
* @param sys an optional compiler system to associate with the config. If one is not provided, one will be created for
|
|
7
6
|
* the caller
|
|
7
|
+
* @param overrides a partial implementation of `ValidatedConfig`. Any provided fields will override the defaults
|
|
8
|
+
* provided by this function.
|
|
8
9
|
* @returns the mock Rindo configuration
|
|
9
10
|
*/
|
|
10
|
-
export declare function mockValidatedConfig(
|
|
11
|
+
export declare function mockValidatedConfig(overrides?: Partial<ValidatedConfig>): ValidatedConfig;
|
|
11
12
|
/**
|
|
12
13
|
* Creates a mock instance of a Rindo configuration entity. The mocked configuration has no guarantees around the
|
|
13
14
|
* types/validity of its data.
|
|
14
|
-
* @param
|
|
15
|
-
*
|
|
15
|
+
* @param overrides a partial implementation of `UnvalidatedConfig`. Any provided fields will override the defaults
|
|
16
|
+
* provided by this function.
|
|
16
17
|
* @returns the mock Rindo configuration
|
|
17
18
|
*/
|
|
18
|
-
export declare function mockConfig(
|
|
19
|
+
export declare function mockConfig(overrides?: Partial<UnvalidatedConfig>): UnvalidatedConfig;
|
|
19
20
|
/**
|
|
20
21
|
* Creates a configuration object used to bootstrap a Rindo task invocation
|
|
21
22
|
*
|