@sdeverywhere/plugin-check 0.3.36 → 0.3.38
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/dist/index.d.ts +67 -65
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +660 -899
- package/dist/index.js.map +1 -1
- package/package.json +13 -26
- package/template-report/index.html +7 -5
- package/template-report/polyfills/noop-polyfills.ts +8 -5
- package/template-report/src/bundle-metadata.spec.ts +81 -0
- package/template-report/src/bundle-metadata.ts +66 -0
- package/template-report/src/index.ts +17 -78
- package/template-report/src/load-bundle.ts +1 -4
- package/template-report/src/resolve-bundle.spec.ts +109 -0
- package/template-report/src/resolve-bundle.ts +64 -0
- package/dist/index.cjs +0 -972
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -83
- package/template-report/src/bundles/unused.txt +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Plugin } from
|
|
2
|
-
|
|
1
|
+
import { Plugin } from "@sdeverywhere/build";
|
|
2
|
+
//#region src/options.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Describes a bundle used by model-check.
|
|
5
5
|
*
|
|
@@ -12,72 +12,74 @@ import { Plugin } from '@sdeverywhere/build';
|
|
|
12
12
|
* `check-bundle.js` generated by the build process.
|
|
13
13
|
*/
|
|
14
14
|
interface CheckBundle {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
/** The name of the bundle as displayed in the report (this is typically a branch name). */
|
|
16
|
+
name: string;
|
|
17
|
+
/** The absolute path to the local JS bundle file. */
|
|
18
|
+
path?: string;
|
|
19
|
+
/** The URL of the remote bundle file. */
|
|
20
|
+
url?: string;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* The options that control how the model-check report is generated or served.
|
|
24
24
|
*/
|
|
25
25
|
interface CheckPluginOptions {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The baseline bundle, i.e., the "left" bundle used in comparisons.
|
|
28
|
+
*
|
|
29
|
+
* If `baseline` is undefined, no comparison tests will be run.
|
|
30
|
+
*/
|
|
31
|
+
baseline?: CheckBundle;
|
|
32
|
+
/**
|
|
33
|
+
* The current bundle, i.e., the bundle that is being developed and checked.
|
|
34
|
+
*
|
|
35
|
+
* This will be the "right" bundle that is compared to the "left" (baseline)
|
|
36
|
+
* bundle, if `baseline` is defined. If `baseline` is undefined, no
|
|
37
|
+
* comparison tests will be run, but check tests will still be run using
|
|
38
|
+
* the `current` bundle.
|
|
39
|
+
*
|
|
40
|
+
* If `current` is undefined, the latest `check-bundle.js` generated by
|
|
41
|
+
* the build process will be used as the default `current` bundle, with
|
|
42
|
+
* `name` set to "current".
|
|
43
|
+
*/
|
|
44
|
+
current?: CheckBundle;
|
|
45
|
+
/**
|
|
46
|
+
* The URL to a JSON file containing the list of remote bundles that will be available
|
|
47
|
+
* in local development mode. The JSON file is expected to contain an array of
|
|
48
|
+
* `BundleLocation` objects. If undefined, only local bundles will be available.
|
|
49
|
+
*
|
|
50
|
+
* This value is only used in "development" mode and is ignored in "production"
|
|
51
|
+
* mode (since only the configured `baseline` and `current` bundles are used
|
|
52
|
+
* in that case).
|
|
53
|
+
*/
|
|
54
|
+
remoteBundlesUrl?: string;
|
|
55
|
+
/**
|
|
56
|
+
* A custom function for fetching remote bundle files. This allows for customizing
|
|
57
|
+
* the fetch operation, such as adding authentication headers or other custom logic.
|
|
58
|
+
*
|
|
59
|
+
* If undefined, a default fetch implementation will be used.
|
|
60
|
+
*
|
|
61
|
+
* @param url The URL of the remote bundle file to fetch.
|
|
62
|
+
* @returns The bundle source code as a string.
|
|
63
|
+
*/
|
|
64
|
+
fetchRemoteBundle?: (url: string) => Promise<string>;
|
|
65
|
+
/**
|
|
66
|
+
* The absolute path to the JS file containing the test configuration. If undefined,
|
|
67
|
+
* a default test configuration will be used.
|
|
68
|
+
*/
|
|
69
|
+
testConfigPath?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The absolute path to the directory where the report will be written. If undefined,
|
|
72
|
+
* the report will be written to the configured `prepDir`.
|
|
73
|
+
*/
|
|
74
|
+
reportPath?: string;
|
|
75
|
+
/**
|
|
76
|
+
* The port used for the local dev server (defaults to 8081).
|
|
77
|
+
*/
|
|
78
|
+
serverPort?: number;
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/plugin.d.ts
|
|
82
|
+
export declare function checkPlugin(options?: CheckPluginOptions): Plugin;
|
|
83
|
+
//#endregion
|
|
84
|
+
export type { CheckBundle, CheckPluginOptions };
|
|
85
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/options.d.ts","../src/plugin.d.ts"],"mappings":";;;;;;;;;;;;;UAWiB;;EAEb;;EAEA;;EAEA;;;;;UAKa;;;;;;EAMb,WAAW;;;;;;;;;;;;;EAaX,UAAU;;;;;;;;;;EAUV;;;;;;;;;;EAUA,qBAAqB,gBAAgB;;;;;EAKrC;;;;;EAKA;;;;EAIA;;;;wBCzEoB,YAAY,UAAU,qBAAqB"}
|