@rindo/core 2.17.4 → 2.22.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 +33 -21
- package/cli/index.cjs +693 -401
- package/cli/index.d.ts +3 -0
- package/cli/index.js +693 -401
- package/cli/package.json +1 -1
- package/compiler/lib.dom.d.ts +898 -184
- package/compiler/lib.dom.iterable.d.ts +22 -4
- package/compiler/lib.es2015.collection.d.ts +62 -1
- package/compiler/lib.es2015.core.d.ts +3 -3
- package/compiler/lib.es2015.iterable.d.ts +2 -1
- package/compiler/lib.es2015.promise.d.ts +9 -4
- package/compiler/lib.es2015.proxy.d.ts +91 -2
- package/compiler/lib.es2015.reflect.d.ts +26 -3
- package/compiler/lib.es2015.symbol.wellknown.d.ts +3 -3
- package/compiler/lib.es2017.intl.d.ts +16 -1
- package/compiler/lib.es2019.d.ts +1 -0
- package/compiler/lib.es2019.intl.d.ts +25 -0
- package/compiler/lib.es2020.bigint.d.ts +7 -5
- package/compiler/lib.es2020.d.ts +2 -0
- package/compiler/lib.es2020.date.d.ts +44 -0
- package/compiler/lib.es2020.intl.d.ts +81 -16
- package/compiler/lib.es2020.number.d.ts +30 -0
- package/compiler/lib.es2021.intl.d.ts +116 -6
- package/compiler/lib.es2022.array.d.ts +123 -0
- package/compiler/lib.es2022.d.ts +27 -0
- package/compiler/lib.es2022.error.d.ts +75 -0
- package/compiler/lib.es2022.full.d.ts +25 -0
- package/compiler/lib.es2022.intl.d.ts +111 -0
- package/compiler/lib.es2022.object.d.ts +28 -0
- package/compiler/lib.es2022.sharedmemory.d.ts +27 -0
- package/compiler/lib.es2022.string.d.ts +27 -0
- package/compiler/lib.es5.d.ts +62 -31
- package/compiler/lib.esnext.d.ts +1 -1
- package/compiler/lib.esnext.intl.d.ts +8 -1
- package/compiler/lib.webworker.d.ts +540 -81
- package/compiler/lib.webworker.iterable.d.ts +19 -4
- package/compiler/package.json +1 -1
- package/compiler/rindo.d.ts +3 -25
- package/compiler/rindo.js +54678 -52205
- package/compiler/rindo.min.js +2 -2
- package/compiler/sys/in-memory-fs.d.ts +218 -0
- package/compiler/transpile.d.ts +32 -0
- package/dependencies.json +12 -1
- package/dev-server/client/app-error.d.ts +1 -1
- package/dev-server/client/index.d.ts +2 -2
- package/dev-server/client/index.js +241 -241
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +3 -3
- package/dev-server/index.d.ts +1 -1
- package/dev-server/index.js +2 -2
- package/dev-server/open-in-editor-api.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +1192 -1158
- package/dev-server/ws.js +1 -1
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +2 -2
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +1130 -823
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +19 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/polyfills/css-shim.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +154 -143
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.d.ts +1 -1
- package/internal/hydrate/runner.js +106 -106
- package/internal/package.json +1 -1
- package/internal/rindo-core/index.d.ts +9 -10
- package/internal/rindo-private.d.ts +149 -184
- package/internal/rindo-public-compiler.d.ts +83 -38
- package/internal/rindo-public-docs.d.ts +24 -0
- package/internal/rindo-public-runtime.d.ts +79 -7
- package/internal/testing/index.js +187 -175
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +526 -501
- package/mock-doc/index.d.ts +15 -14
- package/mock-doc/index.js +526 -501
- package/mock-doc/package.json +1 -1
- package/package.json +48 -59
- package/readme.md +44 -31
- package/screenshot/compare/build/p-f4745c2f.entry.js +1 -1
- package/screenshot/index.d.ts +1 -1
- package/screenshot/index.js +13 -13
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +983 -849
- package/sys/node/autoprefixer.js +2 -2
- package/sys/node/glob.js +1 -1
- package/sys/node/index.d.ts +4 -0
- package/sys/node/index.js +399 -413
- package/sys/node/package.json +1 -1
- package/sys/node/prompts.js +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.d.ts +6 -6
- package/testing/index.js +684 -839
- package/testing/jest/jest-config.d.ts +1 -1
- package/testing/jest/jest-preprocessor.d.ts +3 -3
- package/testing/jest/jest-serializer.d.ts +1 -2
- package/testing/matchers/index.d.ts +3 -3
- package/testing/mock-fetch.d.ts +1 -1
- package/testing/mocks.d.ts +2 -2
- package/testing/package.json +1 -1
- package/testing/puppeteer/puppeteer-declarations.d.ts +5 -5
- package/testing/puppeteer/puppeteer-element.d.ts +2 -2
- package/testing/puppeteer/puppeteer-events.d.ts +1 -1
- package/testing/testing-logger.d.ts +1 -1
- package/testing/testing-utils.d.ts +6 -5
- package/testing/testing.d.ts +1 -1
package/cli/config-flags.d.ts
CHANGED
|
@@ -2,22 +2,23 @@ import type { LogLevel, TaskCommand } from '../internal/index';
|
|
|
2
2
|
/**
|
|
3
3
|
* All the Boolean options supported by the Rindo CLI
|
|
4
4
|
*/
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const BOOLEAN_CLI_FLAGS: readonly ["build", "cache", "checkVersion", "ci", "compare", "debug", "dev", "devtools", "docs", "e2e", "es5", "esm", "headless", "help", "log", "open", "prerender", "prerenderExternal", "prod", "profile", "serviceWorker", "screenshot", "serve", "skipNodeCheck", "spec", "ssr", "stats", "updateScreenshot", "verbose", "version", "watch", "all", "automock", "bail", "changedFilesWithAncestor", "clearCache", "clearMocks", "collectCoverage", "color", "colors", "coverage", "detectLeaks", "detectOpenHandles", "errorOnDeprecated", "expand", "findRelatedTests", "forceExit", "init", "injectGlobals", "json", "lastCommit", "listTests", "logHeapUsage", "noStackTrace", "notify", "onlyChanged", "onlyFailures", "passWithNoTests", "resetMocks", "resetModules", "restoreMocks", "runInBand", "runTestsByPath", "showConfig", "silent", "skipFilter", "testLocationInResults", "updateSnapshot", "useStderr", "watchAll", "watchman"];
|
|
6
6
|
/**
|
|
7
7
|
* All the Number options supported by the Rindo CLI
|
|
8
8
|
*/
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const NUMBER_CLI_FLAGS: readonly ["port", "maxConcurrency", "testTimeout"];
|
|
10
10
|
/**
|
|
11
11
|
* All the String options supported by the Rindo CLI
|
|
12
12
|
*/
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const STRING_CLI_FLAGS: readonly ["address", "config", "docsApi", "docsJson", "emulate", "root", "screenshotConnector", "cacheDirectory", "changedSince", "collectCoverageFrom", "coverageDirectory", "coverageThreshold", "env", "filter", "globalSetup", "globalTeardown", "globals", "haste", "moduleNameMapper", "notifyMode", "outputFile", "preset", "prettierPath", "resolver", "rootDir", "runner", "testEnvironment", "testEnvironmentOptions", "testFailureExitCode", "testNamePattern", "testResultsProcessor", "testRunner", "testSequencer", "testURL", "timers", "transform"];
|
|
14
|
+
export declare const STRING_ARRAY_CLI_FLAGS: readonly ["collectCoverageOnlyFrom", "coveragePathIgnorePatterns", "coverageReporters", "moduleDirectories", "moduleFileExtensions", "modulePathIgnorePatterns", "modulePaths", "projects", "reporters", "roots", "selectProjects", "setupFiles", "setupFilesAfterEnv", "snapshotSerializers", "testMatch", "testPathIgnorePatterns", "testPathPattern", "testRegex", "transformIgnorePatterns", "unmockedModulePathPatterns", "watchPathIgnorePatterns"];
|
|
14
15
|
/**
|
|
15
16
|
* All the CLI arguments which may have string or number values
|
|
16
17
|
*
|
|
17
18
|
* `maxWorkers` is an argument which is used both by Rindo _and_ by Jest,
|
|
18
19
|
* which means that we need to support parsing both string and number values.
|
|
19
20
|
*/
|
|
20
|
-
export declare const
|
|
21
|
+
export declare const STRING_NUMBER_CLI_FLAGS: readonly ["maxWorkers"];
|
|
21
22
|
/**
|
|
22
23
|
* All the LogLevel-type options supported by the Rindo CLI
|
|
23
24
|
*
|
|
@@ -25,24 +26,30 @@ export declare const STRING_NUMBER_CLI_ARGS: readonly ["maxWorkers"];
|
|
|
25
26
|
* but this approach lets us make sure that we're handling all
|
|
26
27
|
* our arguments in a type-safe way.
|
|
27
28
|
*/
|
|
28
|
-
export declare const
|
|
29
|
+
export declare const LOG_LEVEL_CLI_FLAGS: readonly ["logLevel"];
|
|
29
30
|
/**
|
|
30
31
|
* A type which gives the members of a `ReadonlyArray<string>` as
|
|
31
32
|
* an enum-like type which can be used for e.g. keys in a `Record`
|
|
32
33
|
* (as in the `AliasMap` type below)
|
|
33
34
|
*/
|
|
34
|
-
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
type ArrayValuesAsUnion<T extends ReadonlyArray<string>> = T[number];
|
|
36
|
+
export type BooleanCLIFlag = ArrayValuesAsUnion<typeof BOOLEAN_CLI_FLAGS>;
|
|
37
|
+
export type StringCLIFlag = ArrayValuesAsUnion<typeof STRING_CLI_FLAGS>;
|
|
38
|
+
export type StringArrayCLIFlag = ArrayValuesAsUnion<typeof STRING_ARRAY_CLI_FLAGS>;
|
|
39
|
+
export type NumberCLIFlag = ArrayValuesAsUnion<typeof NUMBER_CLI_FLAGS>;
|
|
40
|
+
export type StringNumberCLIFlag = ArrayValuesAsUnion<typeof STRING_NUMBER_CLI_FLAGS>;
|
|
41
|
+
export type LogCLIFlag = ArrayValuesAsUnion<typeof LOG_LEVEL_CLI_FLAGS>;
|
|
42
|
+
export type KnownCLIFlag = BooleanCLIFlag | StringCLIFlag | StringArrayCLIFlag | NumberCLIFlag | StringNumberCLIFlag | LogCLIFlag;
|
|
43
|
+
type AliasMap = Partial<Record<string, KnownCLIFlag>>;
|
|
42
44
|
/**
|
|
43
45
|
* For a small subset of CLI options we support a short alias e.g. `'h'` for `'help'`
|
|
44
46
|
*/
|
|
45
|
-
export declare const
|
|
47
|
+
export declare const CLI_FLAG_ALIASES: AliasMap;
|
|
48
|
+
/**
|
|
49
|
+
* A regular expression which can be used to match a CLI flag for one of our
|
|
50
|
+
* short aliases.
|
|
51
|
+
*/
|
|
52
|
+
export declare const CLI_FLAG_REGEX: RegExp;
|
|
46
53
|
/**
|
|
47
54
|
* Given two types `K` and `T` where `K` extends `ReadonlyArray<string>`,
|
|
48
55
|
* construct a type which maps the strings in `K` as keys to values of type `T`.
|
|
@@ -51,34 +58,39 @@ export declare const CLI_ARG_ALIASES: AliasMap;
|
|
|
51
58
|
* for which we want optional keys, we make all the properties optional (w/ `'?'`)
|
|
52
59
|
* and possibly null.
|
|
53
60
|
*/
|
|
54
|
-
|
|
61
|
+
type ObjectFromKeys<K extends ReadonlyArray<string>, T> = {
|
|
55
62
|
[key in K[number]]?: T | null;
|
|
56
63
|
};
|
|
57
64
|
/**
|
|
58
65
|
* Type containing the possible Boolean configuration flags, to be included
|
|
59
66
|
* in ConfigFlags, below
|
|
60
67
|
*/
|
|
61
|
-
|
|
68
|
+
type BooleanConfigFlags = ObjectFromKeys<typeof BOOLEAN_CLI_FLAGS, boolean>;
|
|
62
69
|
/**
|
|
63
70
|
* Type containing the possible String configuration flags, to be included
|
|
64
71
|
* in ConfigFlags, below
|
|
65
72
|
*/
|
|
66
|
-
|
|
73
|
+
type StringConfigFlags = ObjectFromKeys<typeof STRING_CLI_FLAGS, string>;
|
|
74
|
+
/**
|
|
75
|
+
* Type containing the possible String Array configuration flags. This is
|
|
76
|
+
* one of the 'constituent types' for `ConfigFlags`.
|
|
77
|
+
*/
|
|
78
|
+
type StringArrayConfigFlags = ObjectFromKeys<typeof STRING_ARRAY_CLI_FLAGS, string[]>;
|
|
67
79
|
/**
|
|
68
80
|
* Type containing the possible numeric configuration flags, to be included
|
|
69
81
|
* in ConfigFlags, below
|
|
70
82
|
*/
|
|
71
|
-
|
|
83
|
+
type NumberConfigFlags = ObjectFromKeys<typeof NUMBER_CLI_FLAGS, number>;
|
|
72
84
|
/**
|
|
73
85
|
* Type containing the configuration flags which may be set to either string
|
|
74
86
|
* or number values.
|
|
75
87
|
*/
|
|
76
|
-
|
|
88
|
+
type StringNumberConfigFlags = ObjectFromKeys<typeof STRING_NUMBER_CLI_FLAGS, string | number>;
|
|
77
89
|
/**
|
|
78
90
|
* Type containing the possible LogLevel configuration flags, to be included
|
|
79
91
|
* in ConfigFlags, below
|
|
80
92
|
*/
|
|
81
|
-
|
|
93
|
+
type LogLevelFlags = ObjectFromKeys<typeof LOG_LEVEL_CLI_FLAGS, LogLevel>;
|
|
82
94
|
/**
|
|
83
95
|
* The configuration flags which can be set by the user on the command line.
|
|
84
96
|
* This interface captures both known arguments (which are enumerated and then
|
|
@@ -93,7 +105,7 @@ declare type LogLevelFlags = ObjectFromKeys<typeof LOG_LEVEL_CLI_ARGS, LogLevel>
|
|
|
93
105
|
* options we support and a runtime list of strings which can be used to match
|
|
94
106
|
* on actual flags passed by the user.
|
|
95
107
|
*/
|
|
96
|
-
export interface ConfigFlags extends BooleanConfigFlags, StringConfigFlags, NumberConfigFlags, StringNumberConfigFlags, LogLevelFlags {
|
|
108
|
+
export interface ConfigFlags extends BooleanConfigFlags, StringConfigFlags, StringArrayConfigFlags, NumberConfigFlags, StringNumberConfigFlags, LogLevelFlags {
|
|
97
109
|
task: TaskCommand | null;
|
|
98
110
|
args: string[];
|
|
99
111
|
knownArgs: string[];
|