@rindo/core 1.17.4 → 2.5.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/LICENSE.md +27 -27
- package/bin/cli.ts +20 -0
- package/bin/rindo +51 -56
- package/cli/index.cjs +1263 -0
- package/cli/index.d.ts +1 -1
- package/cli/index.js +1232 -495
- package/cli/package.json +9 -4
- package/compiler/lib.d.ts +24 -0
- package/compiler/lib.dom.d.ts +20230 -0
- package/compiler/lib.dom.iterable.d.ts +351 -0
- package/compiler/lib.es2015.collection.d.ts +89 -0
- package/compiler/lib.es2015.core.d.ts +517 -0
- package/compiler/lib.es2015.d.ts +30 -0
- package/compiler/lib.es2015.generator.d.ts +79 -0
- package/compiler/lib.es2015.iterable.d.ts +505 -0
- package/compiler/lib.es2015.promise.d.ts +150 -0
- package/compiler/lib.es2015.proxy.d.ts +41 -0
- package/compiler/lib.es2015.reflect.d.ts +123 -0
- package/compiler/lib.es2015.symbol.d.ts +48 -0
- package/compiler/lib.es2015.symbol.wellknown.d.ts +324 -0
- package/compiler/lib.es2016.array.include.d.ts +118 -0
- package/compiler/lib.es2016.d.ts +22 -0
- package/compiler/lib.es2016.full.d.ts +25 -0
- package/compiler/lib.es2017.d.ts +26 -0
- package/compiler/lib.es2017.full.d.ts +25 -0
- package/compiler/lib.es2017.intl.d.ts +32 -0
- package/compiler/lib.es2017.object.d.ts +51 -0
- package/compiler/lib.es2017.sharedmemory.d.ts +137 -0
- package/compiler/lib.es2017.string.d.ts +47 -0
- package/compiler/lib.es2017.typedarrays.d.ts +55 -0
- package/compiler/lib.es2018.asyncgenerator.d.ts +79 -0
- package/compiler/lib.es2018.asynciterable.d.ts +45 -0
- package/compiler/lib.es2018.d.ts +26 -0
- package/compiler/lib.es2018.full.d.ts +25 -0
- package/compiler/lib.es2018.intl.d.ts +61 -0
- package/compiler/lib.es2018.promise.d.ts +32 -0
- package/compiler/lib.es2018.regexp.d.ts +39 -0
- package/compiler/lib.es2019.array.d.ts +85 -0
- package/compiler/lib.es2019.d.ts +25 -0
- package/compiler/lib.es2019.full.d.ts +25 -0
- package/compiler/lib.es2019.object.d.ts +35 -0
- package/compiler/lib.es2019.string.d.ts +33 -0
- package/compiler/lib.es2019.symbol.d.ts +26 -0
- package/compiler/lib.es2020.bigint.d.ts +728 -0
- package/compiler/lib.es2020.d.ts +27 -0
- package/compiler/lib.es2020.full.d.ts +25 -0
- package/compiler/lib.es2020.intl.d.ts +310 -0
- package/compiler/lib.es2020.promise.d.ts +50 -0
- package/compiler/lib.es2020.sharedmemory.d.ts +99 -0
- package/compiler/lib.es2020.string.d.ts +30 -0
- package/compiler/lib.es2020.symbol.wellknown.d.ts +39 -0
- package/compiler/lib.es5.d.ts +4435 -0
- package/compiler/lib.es6.d.ts +25 -0
- package/compiler/lib.esnext.d.ts +25 -0
- package/compiler/lib.esnext.full.d.ts +25 -0
- package/compiler/lib.esnext.intl.d.ts +32 -0
- package/compiler/lib.esnext.promise.d.ts +43 -0
- package/compiler/lib.esnext.string.d.ts +35 -0
- package/compiler/lib.esnext.weakref.d.ts +75 -0
- package/compiler/lib.scripthost.d.ts +327 -0
- package/compiler/lib.webworker.d.ts +6042 -0
- package/compiler/lib.webworker.importscripts.d.ts +26 -0
- package/compiler/lib.webworker.iterable.d.ts +166 -0
- package/compiler/package.json +3 -3
- package/compiler/rindo.d.ts +0 -16
- package/compiler/rindo.js +42738 -40541
- package/compiler/rindo.min.js +2 -15
- package/dependencies.json +73 -50
- package/dev-server/client/index.js +33 -10
- package/dev-server/client/package.json +3 -3
- package/dev-server/connector.html +3 -3
- package/dev-server/index.d.ts +3 -6
- package/dev-server/index.js +256 -252
- package/dev-server/package.json +3 -3
- package/dev-server/server-process.js +1738 -0
- package/dev-server/server-worker-thread.js +39 -0
- package/dev-server/templates/initial-load.html +160 -160
- package/dev-server/ws.js +1 -1
- package/internal/app-data/{index.cjs.js → index.cjs} +7 -5
- package/internal/app-data/index.d.ts +1 -0
- package/internal/app-data/index.js +7 -6
- package/internal/app-data/package.json +11 -5
- package/internal/client/css-shim.js +2 -2
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +193 -119
- package/internal/client/package.json +4 -3
- package/internal/client/{patch.js → patch-browser.js} +8 -24
- package/internal/client/patch-esm.js +23 -0
- package/internal/client/polyfills/css-shim.js +1 -1
- package/internal/client/polyfills/index.js +34 -34
- package/internal/client/shadow-css.js +9 -3
- package/internal/hydrate/index.js +305 -281
- package/internal/hydrate/package.json +2 -2
- package/internal/hydrate/runner.d.ts +24 -12
- package/internal/hydrate/runner.js +153 -124
- package/internal/hydrate/shadow-css.js +24 -24
- package/internal/package.json +5 -4
- package/internal/rindo-core/index.cjs +1 -0
- package/internal/rindo-core/index.d.ts +51 -2
- package/internal/rindo-core/index.js +15 -1
- package/internal/rindo-ext-modules.d.ts +41 -39
- package/internal/rindo-private.d.ts +93 -148
- package/internal/rindo-public-compiler.d.ts +231 -155
- package/internal/rindo-public-runtime.d.ts +42 -39
- package/internal/testing/index.js +144 -121
- package/internal/testing/package.json +2 -2
- package/internal/testing/shadow-css.js +24 -24
- package/mock-doc/index.cjs +4610 -0
- package/mock-doc/index.d.ts +12 -1
- package/mock-doc/index.js +177 -67
- package/mock-doc/package.json +11 -5
- package/package.json +132 -133
- package/readme.md +21 -95
- package/screenshot/compare/build/app.js +33 -33
- package/screenshot/compare/build/p-f4745c2f.entry.js +1 -1
- package/screenshot/connector-base.d.ts +1 -1
- package/screenshot/connector-local.d.ts +1 -1
- package/screenshot/index.js +63 -46
- package/screenshot/package.json +10 -3
- package/screenshot/pixel-match.js +54 -57
- package/screenshot/screenshot-compare.d.ts +1 -1
- package/screenshot/screenshot-fs.d.ts +1 -1
- package/sys/deno/index.js +1785 -0
- package/sys/deno/node-compat.js +2654 -0
- package/sys/deno/worker.js +44 -0
- package/sys/node/autoprefixer.js +8 -1
- package/sys/node/glob.js +1 -1
- package/sys/node/graceful-fs.js +1 -1
- package/sys/node/index.d.ts +1 -1
- package/sys/node/index.js +689 -705
- package/sys/node/node-fetch.js +1 -1
- package/sys/node/package.json +3 -3
- package/sys/node/prompts.js +1 -1
- package/sys/node/worker.js +38 -19
- package/testing/index.d.ts +3 -3
- package/testing/index.js +863 -749
- package/testing/jest/jest-config.d.ts +2 -89
- package/testing/jest/jest-environment.d.ts +1 -1
- package/testing/jest/jest-runner.d.ts +1 -1
- package/testing/jest/jest-screenshot.d.ts +1 -1
- package/testing/jest-preset.js +32 -32
- package/testing/matchers/events.d.ts +1 -1
- package/testing/matchers/screenshot.d.ts +1 -1
- package/testing/mock-fetch.d.ts +1 -1
- package/testing/mocks.d.ts +1 -1
- package/testing/package.json +3 -3
- package/testing/puppeteer/index.d.ts +1 -1
- package/testing/puppeteer/puppeteer-browser.d.ts +2 -2
- package/testing/puppeteer/puppeteer-declarations.d.ts +11 -11
- package/testing/puppeteer/puppeteer-element.d.ts +3 -3
- package/testing/puppeteer/puppeteer-emulate.d.ts +1 -1
- package/testing/puppeteer/puppeteer-events.d.ts +3 -3
- package/testing/puppeteer/puppeteer-page.d.ts +1 -1
- package/testing/puppeteer/puppeteer-screenshot.d.ts +2 -2
- package/testing/reset-build-conditionals.d.ts +1 -1
- package/testing/spec-page.d.ts +1 -1
- package/testing/test-transpile.d.ts +1 -1
- package/testing/testing-logger.d.ts +1 -1
- package/testing/testing-utils.d.ts +1 -1
- package/testing/testing.d.ts +1 -1
- package/cli/index.cjs.js +0 -524
- package/dev-server/content-type-db.json +0 -1
- package/dev-server/server-worker.js +0 -1570
- package/mock-doc/index.cjs.js +0 -4500
|
@@ -1,92 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import * as d from '@rindo/core/internal';
|
|
1
|
+
import type * as d from '@rindo/core/internal';
|
|
3
2
|
import type { Config } from '@jest/types';
|
|
4
|
-
export declare function buildJestArgv(config: d.Config):
|
|
5
|
-
all: boolean;
|
|
6
|
-
automock: boolean;
|
|
7
|
-
bail: number | boolean;
|
|
8
|
-
browser: boolean;
|
|
9
|
-
cache: boolean;
|
|
10
|
-
cacheDirectory: string;
|
|
11
|
-
changedFilesWithAncestor: boolean;
|
|
12
|
-
changedSince: string;
|
|
13
|
-
ci: boolean;
|
|
14
|
-
clearCache: boolean;
|
|
15
|
-
clearMocks: boolean;
|
|
16
|
-
collectCoverage: boolean;
|
|
17
|
-
collectCoverageFrom: string;
|
|
18
|
-
collectCoverageOnlyFrom: string[];
|
|
19
|
-
color: boolean;
|
|
20
|
-
colors: boolean;
|
|
21
|
-
config: string;
|
|
22
|
-
coverage: boolean;
|
|
23
|
-
coverageDirectory: string;
|
|
24
|
-
coveragePathIgnorePatterns: string[];
|
|
25
|
-
coverageReporters: string[];
|
|
26
|
-
coverageThreshold: string;
|
|
27
|
-
debug: boolean;
|
|
28
|
-
env: string;
|
|
29
|
-
expand: boolean;
|
|
30
|
-
findRelatedTests: boolean;
|
|
31
|
-
forceExit: boolean;
|
|
32
|
-
globals: string;
|
|
33
|
-
globalSetup: string;
|
|
34
|
-
globalTeardown: string;
|
|
35
|
-
haste: string;
|
|
36
|
-
init: boolean;
|
|
37
|
-
json: boolean;
|
|
38
|
-
lastCommit: boolean;
|
|
39
|
-
logHeapUsage: boolean;
|
|
40
|
-
maxWorkers: string | number;
|
|
41
|
-
moduleDirectories: string[];
|
|
42
|
-
moduleFileExtensions: string[];
|
|
43
|
-
moduleNameMapper: string;
|
|
44
|
-
modulePathIgnorePatterns: string[];
|
|
45
|
-
modulePaths: string[];
|
|
46
|
-
noStackTrace: boolean;
|
|
47
|
-
notify: boolean;
|
|
48
|
-
notifyMode: string;
|
|
49
|
-
onlyChanged: boolean;
|
|
50
|
-
outputFile: string;
|
|
51
|
-
preset: string;
|
|
52
|
-
projects: string[];
|
|
53
|
-
prettierPath: string;
|
|
54
|
-
resetMocks: boolean;
|
|
55
|
-
resetModules: boolean;
|
|
56
|
-
resolver: string;
|
|
57
|
-
restoreMocks: boolean;
|
|
58
|
-
rootDir: string;
|
|
59
|
-
roots: string[];
|
|
60
|
-
runInBand: boolean;
|
|
61
|
-
setupFiles: string[];
|
|
62
|
-
setupFilesAfterEnv: string[];
|
|
63
|
-
showConfig: boolean;
|
|
64
|
-
silent: boolean;
|
|
65
|
-
snapshotSerializers: string[];
|
|
66
|
-
testEnvironment: string;
|
|
67
|
-
testFailureExitCode: string;
|
|
68
|
-
testMatch: string[];
|
|
69
|
-
testNamePattern: string;
|
|
70
|
-
testPathIgnorePatterns: string[];
|
|
71
|
-
testPathPattern: string[];
|
|
72
|
-
testRegex: string | string[];
|
|
73
|
-
testResultsProcessor: string;
|
|
74
|
-
testRunner: string;
|
|
75
|
-
testSequencer: string;
|
|
76
|
-
testURL: string;
|
|
77
|
-
testTimeout: number;
|
|
78
|
-
timers: string;
|
|
79
|
-
transform: string;
|
|
80
|
-
transformIgnorePatterns: string[];
|
|
81
|
-
unmockedModulePathPatterns: string[];
|
|
82
|
-
updateSnapshot: boolean;
|
|
83
|
-
useStderr: boolean;
|
|
84
|
-
verbose: boolean;
|
|
85
|
-
version: boolean;
|
|
86
|
-
watch: boolean;
|
|
87
|
-
watchAll: boolean;
|
|
88
|
-
watchman: boolean;
|
|
89
|
-
watchPathIgnorePatterns: string[];
|
|
90
|
-
}>>;
|
|
3
|
+
export declare function buildJestArgv(config: d.Config): Config.Argv;
|
|
91
4
|
export declare function buildJestConfig(config: d.Config): string;
|
|
92
5
|
export declare function getProjectListFromCLIArgs(config: d.Config, argv: Config.Argv): Config.Path[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as d from '@rindo/core/internal';
|
|
1
|
+
import type * as d from '@rindo/core/internal';
|
|
2
2
|
export declare function runJest(config: d.Config, env: d.E2EProcessEnv): Promise<boolean>;
|
|
3
3
|
export declare function createTestRunner(): any;
|
|
4
4
|
export declare function includeTestFile(testPath: string, env: d.E2EProcessEnv): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as d from '@rindo/core/internal';
|
|
1
|
+
import type * as d from '@rindo/core/internal';
|
|
2
2
|
export declare function runJestScreenshot(config: d.Config, env: d.E2EProcessEnv): Promise<boolean>;
|
package/testing/jest-preset.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const testingDir = __dirname;
|
|
3
|
-
const rootDir = path.join(testingDir, '..');
|
|
4
|
-
const internalDir = path.join(rootDir, 'internal');
|
|
5
|
-
|
|
6
|
-
// NOTE: if you change this, also change compiler/transpile.ts
|
|
7
|
-
const moduleExtensions = ['ts', 'tsx', 'js', 'mjs', 'jsx'];
|
|
8
|
-
const moduleExtensionRegexp = '(' + moduleExtensions.join('|') + ')';
|
|
9
|
-
|
|
10
|
-
module.exports = {
|
|
11
|
-
moduleFileExtensions: [...moduleExtensions, 'json', 'd.ts'],
|
|
12
|
-
moduleNameMapper: {
|
|
13
|
-
'^@rindo/core/cli$': path.join(rootDir, 'cli', 'index.js'),
|
|
14
|
-
'^@rindo/core/compiler$': path.join(rootDir, 'compiler', 'rindo.js'),
|
|
15
|
-
'^@rindo/core/internal$': path.join(internalDir, 'testing', 'index.js'),
|
|
16
|
-
'^@rindo/core/internal/app-data$': path.join(internalDir, 'app-data', 'index.cjs
|
|
17
|
-
'^@rindo/core/internal/app-globals$': path.join(internalDir, 'app-globals', 'index.js'),
|
|
18
|
-
'^@rindo/core/internal/testing$': path.join(internalDir, 'testing', 'index.js'),
|
|
19
|
-
'^@rindo/core/mock-doc$': path.join(rootDir, 'mock-doc', 'index.cjs
|
|
20
|
-
'^@rindo/core/sys$': path.join(rootDir, 'sys', 'node', 'index.js'),
|
|
21
|
-
'^@rindo/core/testing$': path.join(testingDir, 'index.js'),
|
|
22
|
-
'^@rindo/core$': path.join(internalDir, 'testing', 'index.js'),
|
|
23
|
-
},
|
|
24
|
-
setupFilesAfterEnv: [path.join(testingDir, 'jest-setuptestframework.js')],
|
|
25
|
-
testEnvironment: path.join(testingDir, 'jest-environment.js'),
|
|
26
|
-
testPathIgnorePatterns: ['/.cache', '/.rindo', '/.vscode', '/dist', '/node_modules', '/www'],
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const testingDir = __dirname;
|
|
3
|
+
const rootDir = path.join(testingDir, '..');
|
|
4
|
+
const internalDir = path.join(rootDir, 'internal');
|
|
5
|
+
|
|
6
|
+
// NOTE: if you change this, also change compiler/transpile.ts
|
|
7
|
+
const moduleExtensions = ['ts', 'tsx', 'js', 'mjs', 'jsx'];
|
|
8
|
+
const moduleExtensionRegexp = '(' + moduleExtensions.join('|') + ')';
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
moduleFileExtensions: [...moduleExtensions, 'json', 'd.ts'],
|
|
12
|
+
moduleNameMapper: {
|
|
13
|
+
'^@rindo/core/cli$': path.join(rootDir, 'cli', 'index.js'),
|
|
14
|
+
'^@rindo/core/compiler$': path.join(rootDir, 'compiler', 'rindo.js'),
|
|
15
|
+
'^@rindo/core/internal$': path.join(internalDir, 'testing', 'index.js'),
|
|
16
|
+
'^@rindo/core/internal/app-data$': path.join(internalDir, 'app-data', 'index.cjs'),
|
|
17
|
+
'^@rindo/core/internal/app-globals$': path.join(internalDir, 'app-globals', 'index.js'),
|
|
18
|
+
'^@rindo/core/internal/testing$': path.join(internalDir, 'testing', 'index.js'),
|
|
19
|
+
'^@rindo/core/mock-doc$': path.join(rootDir, 'mock-doc', 'index.cjs'),
|
|
20
|
+
'^@rindo/core/sys$': path.join(rootDir, 'sys', 'node', 'index.js'),
|
|
21
|
+
'^@rindo/core/testing$': path.join(testingDir, 'index.js'),
|
|
22
|
+
'^@rindo/core$': path.join(internalDir, 'testing', 'index.js'),
|
|
23
|
+
},
|
|
24
|
+
setupFilesAfterEnv: [path.join(testingDir, 'jest-setuptestframework.js')],
|
|
25
|
+
testEnvironment: path.join(testingDir, 'jest-environment.js'),
|
|
26
|
+
testPathIgnorePatterns: ['/.cache', '/.rindo', '/.vscode', '/dist', '/node_modules', '/www'],
|
|
27
|
+
testRegex: '(/__tests__/.*|\\.?(test|spec))\\.' + moduleExtensionRegexp + '$',
|
|
28
|
+
transform: {
|
|
29
|
+
'^.+\\.(ts|tsx|jsx|css)$': path.join(testingDir, 'jest-preprocessor.js'),
|
|
30
|
+
},
|
|
31
|
+
watchPathIgnorePatterns: ['^.+\\.d\\.ts$'],
|
|
32
|
+
};
|
package/testing/mock-fetch.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export declare const mockFetch: {
|
|
|
8
8
|
reject(rsp?: MockResponse, url?: string): void;
|
|
9
9
|
reset: typeof mockFetchReset;
|
|
10
10
|
};
|
|
11
|
-
export { MockHeaders, MockRequest, MockRequestInit, MockRequestInfo, MockResponse, MockResponseInit } from '../mock-doc';
|
|
11
|
+
export { MockHeaders, MockRequest, MockRequestInit, MockRequestInfo, MockResponse, MockResponseInit, } from '../mock-doc';
|
package/testing/mocks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuildCtx, Cache, CompilerCtx, CompilerSystem, Config } from '@rindo/core/internal';
|
|
1
|
+
import type { BuildCtx, Cache, CompilerCtx, CompilerSystem, Config } from '@rindo/core/internal';
|
|
2
2
|
import { TestingLogger } from './testing-logger';
|
|
3
3
|
export declare function mockConfig(sys?: CompilerSystem): Config;
|
|
4
4
|
export declare function mockCompilerCtx(config?: Config): CompilerCtx;
|
package/testing/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { E2EElement, E2EPage } from './puppeteer-declarations';
|
|
1
|
+
export type { E2EElement, E2EPage } from './puppeteer-declarations';
|
|
2
2
|
export { newE2EPage } from './puppeteer-page';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Config } from '@rindo/core/internal';
|
|
2
|
-
import * as puppeteer from 'puppeteer';
|
|
1
|
+
import type { Config } from '@rindo/core/internal';
|
|
2
|
+
import type * as puppeteer from 'puppeteer';
|
|
3
3
|
export declare function startPuppeteerBrowser(config: Config): Promise<any>;
|
|
4
4
|
export declare function connectBrowser(): Promise<any>;
|
|
5
5
|
export declare function disconnectBrowser(browser: puppeteer.Browser): Promise<void>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { EventInitDict, EventSpy, ScreenshotDiff, ScreenshotOptions } from '@rindo/core/internal';
|
|
3
|
-
import
|
|
4
|
-
export interface NewE2EPageOptions extends
|
|
2
|
+
import type { EventInitDict, EventSpy, ScreenshotDiff, ScreenshotOptions } from '@rindo/core/internal';
|
|
3
|
+
import type { ClickOptions, NavigationOptions, Page, PageCloseOptions, ScreenshotOptions as PuppeteerScreenshotOptions, Response } from 'puppeteer';
|
|
4
|
+
export interface NewE2EPageOptions extends NavigationOptions {
|
|
5
5
|
url?: string;
|
|
6
6
|
html?: string;
|
|
7
7
|
failOnConsoleError?: boolean;
|
|
8
8
|
failOnNetworkError?: boolean;
|
|
9
9
|
}
|
|
10
10
|
declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
11
|
-
declare type PuppeteerPage = Omit<
|
|
11
|
+
declare type PuppeteerPage = Omit<Page, 'bringToFront' | 'browser' | 'screenshot' | 'emulate' | 'emulateMedia' | 'frames' | 'goBack' | 'goForward' | 'isClosed' | 'mainFrame' | 'pdf' | 'reload' | 'target' | 'title' | 'viewport' | 'waitForNavigation' | 'screenshot' | 'workers' | 'addListener' | 'prependListener' | 'prependOnceListener' | 'removeAllListeners' | 'setMaxListeners' | 'getMaxListeners' | 'listeners' | 'rawListeners' | 'emit' | 'eventNames' | 'listenerCount' | '$x' | 'waitForXPath'>;
|
|
12
12
|
export interface PageDiagnostic {
|
|
13
13
|
type: 'error' | 'pageerror' | 'requestfailed';
|
|
14
14
|
message?: string;
|
|
@@ -77,14 +77,14 @@ export interface E2EPage extends PuppeteerPage {
|
|
|
77
77
|
* a localhost address. A shortcut to `page.goto(url)` is to set the `url` option
|
|
78
78
|
* when creating a new page, such as `const page = await newE2EPage({ url })`.
|
|
79
79
|
*/
|
|
80
|
-
goTo(url: string, options?:
|
|
80
|
+
goTo(url: string, options?: NavigationOptions): Promise<Response | null>;
|
|
81
81
|
/**
|
|
82
82
|
* Instead of testing a url directly, html content can be mocked using
|
|
83
83
|
* `page.setContent(html)`. A shortcut to `page.setContent(html)` is to set
|
|
84
84
|
* the `html` option when creating a new page, such as
|
|
85
85
|
* `const page = await newE2EPage({ html })`.
|
|
86
86
|
*/
|
|
87
|
-
setContent(html: string, options?:
|
|
87
|
+
setContent(html: string, options?: NavigationOptions): Promise<void>;
|
|
88
88
|
/**
|
|
89
89
|
* Used to test if an event was, or was not dispatched. This method
|
|
90
90
|
* returns a promise, that resolves with an EventSpy. The EventSpy
|
|
@@ -113,9 +113,9 @@ export interface E2EPageInternal extends E2EPage {
|
|
|
113
113
|
_e2eElements: E2EElementInternal[];
|
|
114
114
|
_e2eEvents: Map<number, WaitForEvent>;
|
|
115
115
|
_e2eEventIds: number;
|
|
116
|
-
_e2eGoto(url: string, options?: Partial<
|
|
117
|
-
_e2eClose(options?:
|
|
118
|
-
screenshot(options?:
|
|
116
|
+
_e2eGoto(url: string, options?: Partial<NavigationOptions>): Promise<Response | null>;
|
|
117
|
+
_e2eClose(options?: PageCloseOptions): Promise<void>;
|
|
118
|
+
screenshot(options?: PuppeteerScreenshotOptions): Promise<Buffer>;
|
|
119
119
|
}
|
|
120
120
|
export interface E2EElement {
|
|
121
121
|
/**
|
|
@@ -159,7 +159,7 @@ export interface E2EElement {
|
|
|
159
159
|
* then uses `page.mouse` to click in the center of the element.
|
|
160
160
|
* Please see the puppeteer docs for more information.
|
|
161
161
|
*/
|
|
162
|
-
click(options?:
|
|
162
|
+
click(options?: ClickOptions): Promise<void>;
|
|
163
163
|
/**
|
|
164
164
|
* Find a child element that matches the selector, which is the same as
|
|
165
165
|
* `element.querySelector(selector)`. Use `>>>` within the
|
|
@@ -257,7 +257,7 @@ export interface E2EElement {
|
|
|
257
257
|
* text option can be specified to force an input event to be generated.
|
|
258
258
|
* Note: Modifier keys DO effect `elementHandle.press`. Holding down Shift
|
|
259
259
|
* will type the text in upper case.
|
|
260
|
-
* Key names: https://github.com/
|
|
260
|
+
* Key names: https://github.com/puppeteer/puppeteer/blob/main/src/common/USKeyboardLayout.ts
|
|
261
261
|
*/
|
|
262
262
|
press(key: string, options?: {
|
|
263
263
|
text?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EventInitDict } from '@rindo/core/internal';
|
|
2
|
-
import * as pd from './puppeteer-declarations';
|
|
3
|
-
import * as puppeteer from 'puppeteer';
|
|
1
|
+
import type { EventInitDict } from '@rindo/core/internal';
|
|
2
|
+
import type * as pd from './puppeteer-declarations';
|
|
3
|
+
import type * as puppeteer from 'puppeteer';
|
|
4
4
|
import { EventSpy } from './puppeteer-events';
|
|
5
5
|
import { MockHTMLElement } from '@rindo/core/mock-doc';
|
|
6
6
|
export declare class E2EElement extends MockHTMLElement implements pd.E2EElementInternal {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { E2EProcessEnv, EmulateConfig } from '@rindo/core/internal';
|
|
1
|
+
import type { E2EProcessEnv, EmulateConfig } from '@rindo/core/internal';
|
|
2
2
|
export declare function setScreenshotEmulateData(userEmulateConfig: EmulateConfig, env: E2EProcessEnv): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SerializedEvent } from '@rindo/core/internal';
|
|
2
|
-
import * as pd from './puppeteer-declarations';
|
|
3
|
-
import * as puppeteer from 'puppeteer';
|
|
1
|
+
import type { SerializedEvent } from '@rindo/core/internal';
|
|
2
|
+
import type * as pd from './puppeteer-declarations';
|
|
3
|
+
import type * as puppeteer from 'puppeteer';
|
|
4
4
|
export declare function initPageEvents(page: pd.E2EPageInternal): Promise<void>;
|
|
5
5
|
export declare function waitForEvent(page: pd.E2EPageInternal, eventName: string, elementHandle: puppeteer.ElementHandle): Promise<any>;
|
|
6
6
|
export declare class EventSpy implements EventSpy {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { E2EPage, NewE2EPageOptions } from './puppeteer-declarations';
|
|
1
|
+
import type { E2EPage, NewE2EPageOptions } from './puppeteer-declarations';
|
|
2
2
|
export declare function newE2EPage(opts?: NewE2EPageOptions): Promise<E2EPage>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E2EProcessEnv, ScreenshotDiff, ScreenshotOptions } from '@rindo/core/internal';
|
|
2
|
-
import * as pd from './puppeteer-declarations';
|
|
1
|
+
import type { E2EProcessEnv, ScreenshotDiff, ScreenshotOptions } from '@rindo/core/internal';
|
|
2
|
+
import type * as pd from './puppeteer-declarations';
|
|
3
3
|
export declare function initPageScreenshot(page: pd.E2EPageInternal): void;
|
|
4
4
|
export declare function pageCompareScreenshot(page: pd.E2EPageInternal, env: E2EProcessEnv, desc: string, testPath: string, opts: ScreenshotOptions): Promise<ScreenshotDiff>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as d from '@rindo/core/internal';
|
|
1
|
+
import type * as d from '@rindo/core/internal';
|
|
2
2
|
export declare function resetBuildConditionals(b: d.BuildConditionals): void;
|
package/testing/spec-page.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NewSpecPageOptions, SpecPage } from '@rindo/core/internal';
|
|
1
|
+
import type { NewSpecPageOptions, SpecPage } from '@rindo/core/internal';
|
|
2
2
|
export declare function newSpecPage(opts: NewSpecPageOptions): Promise<SpecPage>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TranspileOptions, TranspileResults } from '@rindo/core/internal';
|
|
1
|
+
import type { TranspileOptions, TranspileResults } from '@rindo/core/internal';
|
|
2
2
|
export declare function transpile(input: string, opts?: TranspileOptions): TranspileResults;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Diagnostic, Logger, LogLevel, LoggerTimeSpan } from '@rindo/core/internal';
|
|
1
|
+
import type { Diagnostic, Logger, LogLevel, LoggerTimeSpan } from '@rindo/core/internal';
|
|
2
2
|
export declare class TestingLogger implements Logger {
|
|
3
3
|
private isEnabled;
|
|
4
4
|
setLevel(_level: LogLevel): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as d from '@rindo/core/internal';
|
|
1
|
+
import type * as d from '@rindo/core/internal';
|
|
2
2
|
export declare function shuffleArray(array: any[]): any[];
|
|
3
3
|
export declare function expectFiles(fs: d.InMemoryFileSystem, filePaths: string[]): void;
|
|
4
4
|
export declare function doNotExpectFiles(fs: d.InMemoryFileSystem, filePaths: string[]): void;
|
package/testing/testing.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Config, Testing } from '@rindo/core/internal';
|
|
1
|
+
import type { Config, Testing } from '@rindo/core/internal';
|
|
2
2
|
export declare const createTesting: (config: Config) => Promise<Testing>;
|