@rsdoctor/types 0.0.0-next-20240620044732
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 +21 -0
- package/README.md +22 -0
- package/dist/babel.d.ts +14 -0
- package/dist/babel.d.ts.map +1 -0
- package/dist/babel.js +2 -0
- package/dist/client.d.ts +109 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +29 -0
- package/dist/common.d.ts +27 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +2 -0
- package/dist/constants.d.ts +17 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +43 -0
- package/dist/emo.d.ts +29 -0
- package/dist/emo.d.ts.map +1 -0
- package/dist/emo.js +9 -0
- package/dist/error.d.ts +138 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +10 -0
- package/dist/esbuild.d.ts +31 -0
- package/dist/esbuild.d.ts.map +1 -0
- package/dist/esbuild.js +2 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/linter/diagnostic.d.ts +49 -0
- package/dist/linter/diagnostic.d.ts.map +1 -0
- package/dist/linter/diagnostic.js +5 -0
- package/dist/linter/index.d.ts +3 -0
- package/dist/linter/index.d.ts.map +1 -0
- package/dist/linter/index.js +18 -0
- package/dist/linter/rule.d.ts +108 -0
- package/dist/linter/rule.d.ts.map +1 -0
- package/dist/linter/rule.js +2 -0
- package/dist/logger.d.ts +10 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +12 -0
- package/dist/manifest.d.ts +68 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +17 -0
- package/dist/modules.d.ts +8 -0
- package/dist/modules.d.ts.map +1 -0
- package/dist/modules.js +2 -0
- package/dist/plugin/baseCompiler.d.ts +27 -0
- package/dist/plugin/baseCompiler.d.ts.map +1 -0
- package/dist/plugin/baseCompiler.js +2 -0
- package/dist/plugin/baseLoader.d.ts +74 -0
- package/dist/plugin/baseLoader.d.ts.map +1 -0
- package/dist/plugin/baseLoader.js +2 -0
- package/dist/plugin/baseStats.d.ts +118 -0
- package/dist/plugin/baseStats.d.ts.map +1 -0
- package/dist/plugin/baseStats.js +2 -0
- package/dist/plugin/index.d.ts +5 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +20 -0
- package/dist/plugin/plugin.d.ts +33 -0
- package/dist/plugin/plugin.d.ts.map +1 -0
- package/dist/plugin/plugin.js +2 -0
- package/dist/rule/code/E1001.d.ts +4 -0
- package/dist/rule/code/E1001.d.ts.map +1 -0
- package/dist/rule/code/E1001.js +31 -0
- package/dist/rule/code/E1002.d.ts +4 -0
- package/dist/rule/code/E1002.d.ts.map +1 -0
- package/dist/rule/code/E1002.js +31 -0
- package/dist/rule/code/E1003.d.ts +4 -0
- package/dist/rule/code/E1003.d.ts.map +1 -0
- package/dist/rule/code/E1003.js +39 -0
- package/dist/rule/code/E1004.d.ts +4 -0
- package/dist/rule/code/E1004.d.ts.map +1 -0
- package/dist/rule/code/E1004.js +15 -0
- package/dist/rule/code/index.d.ts +24 -0
- package/dist/rule/code/index.d.ts.map +1 -0
- package/dist/rule/code/index.js +51 -0
- package/dist/rule/code/type.d.ts +28 -0
- package/dist/rule/code/type.d.ts.map +1 -0
- package/dist/rule/code/type.js +23 -0
- package/dist/rule/data.d.ts +133 -0
- package/dist/rule/data.d.ts.map +1 -0
- package/dist/rule/data.js +2 -0
- package/dist/rule/index.d.ts +3 -0
- package/dist/rule/index.d.ts.map +1 -0
- package/dist/rule/index.js +18 -0
- package/dist/sdk/chunk.d.ts +126 -0
- package/dist/sdk/chunk.d.ts.map +1 -0
- package/dist/sdk/chunk.js +2 -0
- package/dist/sdk/config.d.ts +12 -0
- package/dist/sdk/config.d.ts.map +1 -0
- package/dist/sdk/config.js +2 -0
- package/dist/sdk/context.d.ts +24 -0
- package/dist/sdk/context.d.ts.map +1 -0
- package/dist/sdk/context.js +2 -0
- package/dist/sdk/envinfo.d.ts +20 -0
- package/dist/sdk/envinfo.d.ts.map +1 -0
- package/dist/sdk/envinfo.js +2 -0
- package/dist/sdk/hooks.d.ts +15 -0
- package/dist/sdk/hooks.d.ts.map +1 -0
- package/dist/sdk/hooks.js +2 -0
- package/dist/sdk/index.d.ts +17 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +32 -0
- package/dist/sdk/instance.d.ts +153 -0
- package/dist/sdk/instance.d.ts.map +1 -0
- package/dist/sdk/instance.js +2 -0
- package/dist/sdk/loader.d.ts +65 -0
- package/dist/sdk/loader.d.ts.map +1 -0
- package/dist/sdk/loader.js +2 -0
- package/dist/sdk/module.d.ts +306 -0
- package/dist/sdk/module.d.ts.map +1 -0
- package/dist/sdk/module.js +30 -0
- package/dist/sdk/package.d.ts +114 -0
- package/dist/sdk/package.d.ts.map +1 -0
- package/dist/sdk/package.js +2 -0
- package/dist/sdk/plugin.d.ts +22 -0
- package/dist/sdk/plugin.d.ts.map +1 -0
- package/dist/sdk/plugin.js +2 -0
- package/dist/sdk/process.d.ts +11 -0
- package/dist/sdk/process.d.ts.map +1 -0
- package/dist/sdk/process.js +2 -0
- package/dist/sdk/resolver.d.ts +53 -0
- package/dist/sdk/resolver.d.ts.map +1 -0
- package/dist/sdk/resolver.js +2 -0
- package/dist/sdk/result.d.ts +42 -0
- package/dist/sdk/result.d.ts.map +1 -0
- package/dist/sdk/result.js +2 -0
- package/dist/sdk/server/apis/alerts.d.ts +27 -0
- package/dist/sdk/server/apis/alerts.d.ts.map +1 -0
- package/dist/sdk/server/apis/alerts.js +3 -0
- package/dist/sdk/server/apis/graph.d.ts +42 -0
- package/dist/sdk/server/apis/graph.d.ts.map +1 -0
- package/dist/sdk/server/apis/graph.js +3 -0
- package/dist/sdk/server/apis/index.d.ts +130 -0
- package/dist/sdk/server/apis/index.d.ts.map +1 -0
- package/dist/sdk/server/apis/index.js +72 -0
- package/dist/sdk/server/apis/loader.d.ts +47 -0
- package/dist/sdk/server/apis/loader.d.ts.map +1 -0
- package/dist/sdk/server/apis/loader.js +3 -0
- package/dist/sdk/server/apis/pagination.d.ts +12 -0
- package/dist/sdk/server/apis/pagination.d.ts.map +1 -0
- package/dist/sdk/server/apis/pagination.js +2 -0
- package/dist/sdk/server/apis/plugin.d.ts +20 -0
- package/dist/sdk/server/apis/plugin.d.ts.map +1 -0
- package/dist/sdk/server/apis/plugin.js +3 -0
- package/dist/sdk/server/apis/project.d.ts +17 -0
- package/dist/sdk/server/apis/project.d.ts.map +1 -0
- package/dist/sdk/server/apis/project.js +3 -0
- package/dist/sdk/server/apis/resolver.d.ts +19 -0
- package/dist/sdk/server/apis/resolver.d.ts.map +1 -0
- package/dist/sdk/server/apis/resolver.js +3 -0
- package/dist/sdk/server/index.d.ts +25 -0
- package/dist/sdk/server/index.d.ts.map +1 -0
- package/dist/sdk/server/index.js +27 -0
- package/dist/sdk/statement.d.ts +178 -0
- package/dist/sdk/statement.d.ts.map +1 -0
- package/dist/sdk/statement.js +147 -0
- package/dist/sdk/summary.d.ts +19 -0
- package/dist/sdk/summary.d.ts.map +1 -0
- package/dist/sdk/summary.js +2 -0
- package/dist/sdk/treeShaking.d.ts +153 -0
- package/dist/sdk/treeShaking.d.ts.map +1 -0
- package/dist/sdk/treeShaking.js +2 -0
- package/dist/thirdparty.d.ts +3 -0
- package/dist/thirdparty.d.ts.map +1 -0
- package/dist/thirdparty.js +2 -0
- package/package.json +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-present Bytedance, Inc. and its affiliates.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Rsdoctor Types
|
|
2
|
+
|
|
3
|
+
This package is the Rsdoctor‘s types package.
|
|
4
|
+
|
|
5
|
+
## features
|
|
6
|
+
|
|
7
|
+
- Rsdoctor is a one-stop tool for diagnosing and analyzing the build process and build artifacts.
|
|
8
|
+
- Rsdoctor is a tool that supports Webpack and Rspack build analysis.
|
|
9
|
+
- Rsdoctor is an analysis tool that can display the time-consuming and behavioral details of the compilation.
|
|
10
|
+
- Rsdoctor is a tool that provides bundle Diff and other anti-degradation capabilities simultaneously.
|
|
11
|
+
|
|
12
|
+
## Documentation
|
|
13
|
+
|
|
14
|
+
https://rsdoctor.dev/
|
|
15
|
+
|
|
16
|
+
## Contributing
|
|
17
|
+
|
|
18
|
+
Please read the [Contributing Guide](https://github.com/web-infra-dev/rsdoctor/blob/main/CONTRIBUTING.md).
|
|
19
|
+
|
|
20
|
+
## License
|
|
21
|
+
|
|
22
|
+
Rsdoctor is [MIT licensed](https://github.com/web-infra-dev/rsdoctor/blob/main/LICENSE).
|
package/dist/babel.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"babel.d.ts","sourceRoot":"","sources":["../src/babel.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH"}
|
package/dist/babel.js
ADDED
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export declare enum RsdoctorClientUrlQuery {
|
|
2
|
+
BundleDiffFiles = "__bundle_files__",
|
|
3
|
+
ManifestFile = "manifest"
|
|
4
|
+
}
|
|
5
|
+
export declare enum RsdoctorClientRoutes {
|
|
6
|
+
Overall = "/overall",
|
|
7
|
+
WebpackLoaderOverall = "/webpack/loaders/overall",
|
|
8
|
+
WebpackLoaderAnalysis = "/webpack/loaders/analysis",
|
|
9
|
+
ModuleResolve = "/module/resolve",
|
|
10
|
+
WebpackPlugins = "/webpack/plugins",
|
|
11
|
+
BundleSize = "/bundle/size",
|
|
12
|
+
ModuleAnalyze = "/module/analyze",
|
|
13
|
+
TreeShaking = "/treeshaking",
|
|
14
|
+
BundleDiff = "/resources/bundle/diff",
|
|
15
|
+
RuleIndex = "/resources/rules",
|
|
16
|
+
Uploader = "/resources/uploader",
|
|
17
|
+
EmoCheck = "/emo/check"
|
|
18
|
+
}
|
|
19
|
+
export declare enum RsdoctorClientDiffState {
|
|
20
|
+
Equal = "-",
|
|
21
|
+
Up = "UP",
|
|
22
|
+
Down = "DOWN"
|
|
23
|
+
}
|
|
24
|
+
export interface RsdoctorClientAssetsDiffItem {
|
|
25
|
+
size: {
|
|
26
|
+
baseline: number;
|
|
27
|
+
current: number;
|
|
28
|
+
};
|
|
29
|
+
count: {
|
|
30
|
+
baseline: number;
|
|
31
|
+
current: number;
|
|
32
|
+
};
|
|
33
|
+
percent: number;
|
|
34
|
+
state: RsdoctorClientDiffState;
|
|
35
|
+
}
|
|
36
|
+
export interface RsdoctorClientAssetsDiffResult {
|
|
37
|
+
all: {
|
|
38
|
+
total: RsdoctorClientAssetsDiffItem;
|
|
39
|
+
};
|
|
40
|
+
js: {
|
|
41
|
+
total: RsdoctorClientAssetsDiffItem;
|
|
42
|
+
initial: RsdoctorClientAssetsDiffItem;
|
|
43
|
+
};
|
|
44
|
+
css: {
|
|
45
|
+
total: RsdoctorClientAssetsDiffItem;
|
|
46
|
+
initial: RsdoctorClientAssetsDiffItem;
|
|
47
|
+
};
|
|
48
|
+
imgs: {
|
|
49
|
+
total: RsdoctorClientAssetsDiffItem;
|
|
50
|
+
};
|
|
51
|
+
html: {
|
|
52
|
+
total: RsdoctorClientAssetsDiffItem;
|
|
53
|
+
};
|
|
54
|
+
media: {
|
|
55
|
+
total: RsdoctorClientAssetsDiffItem;
|
|
56
|
+
};
|
|
57
|
+
fonts: {
|
|
58
|
+
total: RsdoctorClientAssetsDiffItem;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* files exclude these extensions above
|
|
62
|
+
*/
|
|
63
|
+
others: {
|
|
64
|
+
total: RsdoctorClientAssetsDiffItem;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
interface AssetInfo {
|
|
68
|
+
size: number;
|
|
69
|
+
count: number;
|
|
70
|
+
files: {
|
|
71
|
+
path: string;
|
|
72
|
+
size: number;
|
|
73
|
+
initial: boolean;
|
|
74
|
+
content: string | void;
|
|
75
|
+
}[];
|
|
76
|
+
}
|
|
77
|
+
export interface RsdoctorClientAssetsSummary {
|
|
78
|
+
all: {
|
|
79
|
+
total: AssetInfo;
|
|
80
|
+
};
|
|
81
|
+
js: {
|
|
82
|
+
total: AssetInfo;
|
|
83
|
+
initial: AssetInfo;
|
|
84
|
+
};
|
|
85
|
+
css: {
|
|
86
|
+
total: AssetInfo;
|
|
87
|
+
initial: AssetInfo;
|
|
88
|
+
};
|
|
89
|
+
imgs: {
|
|
90
|
+
total: AssetInfo;
|
|
91
|
+
};
|
|
92
|
+
html: {
|
|
93
|
+
total: AssetInfo;
|
|
94
|
+
};
|
|
95
|
+
media: {
|
|
96
|
+
total: AssetInfo;
|
|
97
|
+
};
|
|
98
|
+
fonts: {
|
|
99
|
+
total: AssetInfo;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* files exclude these extensions above
|
|
103
|
+
*/
|
|
104
|
+
others: {
|
|
105
|
+
total: AssetInfo;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
export {};
|
|
109
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAChC,eAAe,qBAAqB;IACpC,YAAY,aAAa;CAC1B;AAED,oBAAY,oBAAoB;IAC9B,OAAO,aAAa;IACpB,oBAAoB,6BAA6B;IACjD,qBAAqB,8BAA8B;IACnD,aAAa,oBAAoB;IACjC,cAAc,qBAAqB;IACnC,UAAU,iBAAiB;IAC3B,aAAa,oBAAoB;IACjC,WAAW,iBAAiB;IAC5B,UAAU,2BAA2B;IACrC,SAAS,qBAAqB;IAC9B,QAAQ,wBAAwB;IAChC,QAAQ,eAAe;CACxB;AAED,oBAAY,uBAAuB;IACjC,KAAK,MAAM;IACX,EAAE,OAAO;IACT,IAAI,SAAS;CACd;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KAC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O,EAAE,SAAS,CAAC;KACpB,CAAC;IACF,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;IACF,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;IACF,KAAK,EAAE;QACL,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;IACF,KAAK,EAAE;QACL,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;IACF;;OAEG;IACH,MAAM,EAAE;QACN,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;CACH"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RsdoctorClientDiffState = exports.RsdoctorClientRoutes = exports.RsdoctorClientUrlQuery = void 0;
|
|
4
|
+
var RsdoctorClientUrlQuery;
|
|
5
|
+
(function (RsdoctorClientUrlQuery) {
|
|
6
|
+
RsdoctorClientUrlQuery["BundleDiffFiles"] = "__bundle_files__";
|
|
7
|
+
RsdoctorClientUrlQuery["ManifestFile"] = "manifest";
|
|
8
|
+
})(RsdoctorClientUrlQuery || (exports.RsdoctorClientUrlQuery = RsdoctorClientUrlQuery = {}));
|
|
9
|
+
var RsdoctorClientRoutes;
|
|
10
|
+
(function (RsdoctorClientRoutes) {
|
|
11
|
+
RsdoctorClientRoutes["Overall"] = "/overall";
|
|
12
|
+
RsdoctorClientRoutes["WebpackLoaderOverall"] = "/webpack/loaders/overall";
|
|
13
|
+
RsdoctorClientRoutes["WebpackLoaderAnalysis"] = "/webpack/loaders/analysis";
|
|
14
|
+
RsdoctorClientRoutes["ModuleResolve"] = "/module/resolve";
|
|
15
|
+
RsdoctorClientRoutes["WebpackPlugins"] = "/webpack/plugins";
|
|
16
|
+
RsdoctorClientRoutes["BundleSize"] = "/bundle/size";
|
|
17
|
+
RsdoctorClientRoutes["ModuleAnalyze"] = "/module/analyze";
|
|
18
|
+
RsdoctorClientRoutes["TreeShaking"] = "/treeshaking";
|
|
19
|
+
RsdoctorClientRoutes["BundleDiff"] = "/resources/bundle/diff";
|
|
20
|
+
RsdoctorClientRoutes["RuleIndex"] = "/resources/rules";
|
|
21
|
+
RsdoctorClientRoutes["Uploader"] = "/resources/uploader";
|
|
22
|
+
RsdoctorClientRoutes["EmoCheck"] = "/emo/check";
|
|
23
|
+
})(RsdoctorClientRoutes || (exports.RsdoctorClientRoutes = RsdoctorClientRoutes = {}));
|
|
24
|
+
var RsdoctorClientDiffState;
|
|
25
|
+
(function (RsdoctorClientDiffState) {
|
|
26
|
+
RsdoctorClientDiffState["Equal"] = "-";
|
|
27
|
+
RsdoctorClientDiffState["Up"] = "UP";
|
|
28
|
+
RsdoctorClientDiffState["Down"] = "DOWN";
|
|
29
|
+
})(RsdoctorClientDiffState || (exports.RsdoctorClientDiffState = RsdoctorClientDiffState = {}));
|
package/dist/common.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type NonFunctionPropertyNames<T> = {
|
|
2
|
+
[K in keyof T]: T[K] extends Function ? never : K;
|
|
3
|
+
}[keyof T];
|
|
4
|
+
export type NonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>;
|
|
5
|
+
export type PlainObject<T = any> = {
|
|
6
|
+
[key: string]: T;
|
|
7
|
+
};
|
|
8
|
+
export type PromiseReturnType<T> = T extends (...args: any[]) => Promise<infer P> ? P : T;
|
|
9
|
+
export type DeepRequired<T> = T extends PlainObject ? {
|
|
10
|
+
[K in keyof T]-?: DeepRequired<T[K]>;
|
|
11
|
+
} : T;
|
|
12
|
+
export type OrPromise<T> = T | Promise<T>;
|
|
13
|
+
export type Constructor<T> = T extends abstract new (...args: infer P1) => infer R1 ? new (...args: P1) => R1 : T extends new (...args: infer P2) => infer R2 ? new (...args: P2) => R2 : never;
|
|
14
|
+
export type Function<P extends any[] = any[], R = any> = (...args: P) => R;
|
|
15
|
+
export type FunctionPropertyNames<T> = {
|
|
16
|
+
[K in keyof T]: T[K] extends Function ? K : never;
|
|
17
|
+
}[keyof T];
|
|
18
|
+
export type Get<T, K, F = never> = K extends keyof T ? T[K] : F;
|
|
19
|
+
export type ObjectPropertyNames<T> = {
|
|
20
|
+
[K in keyof T]: T[K] extends PlainObject ? K : never;
|
|
21
|
+
}[keyof T];
|
|
22
|
+
export type ArrayToUnion<T extends any[]> = T[number];
|
|
23
|
+
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
24
|
+
export type LastOf<T> = UnionToIntersection<T extends any ? () => T : never> extends () => infer R ? R : never;
|
|
25
|
+
export type Push<T extends any[], V> = [...T, V];
|
|
26
|
+
export type UnionToTuple<T, L = LastOf<T>, N = [T] extends [never] ? true : false> = true extends N ? [] : Push<UnionToTuple<Exclude<T, L>>, L>;
|
|
27
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI;KACvC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GAAG,KAAK,GAAG,CAAC;CAClD,CAAC,MAAM,CAAC,CAAC,CAAC;AACX,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5E,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,GAAG,IAAI;IACjC,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,CAAC,SAAS,CAC3C,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,OAAO,CAAC,MAAM,CAAC,CAAC,GACjB,CAAC,GACD,CAAC,CAAC;AAEN,MAAM,MAAM,YAA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C,CAAC,SAAS,GAAG,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CACnC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,GAAG,KAAK,CACvC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,IAAI,GAC1B,CAAC,GACD,KAAK,CAAC;AAEV,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,mBAAmB,CACzC,CAAC,SAAS,GAAG,GAAG,MAAM,CAAC,GAAG,KAAK,CAChC,SAAS,MAAM,MAAM,CAAC,GACnB,CAAC,GACD,KAAK,CAAC;AAEV,MAAM,MAAM,IAAI,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAEjD,MAAM,MAAM,YAAY,CACtB,CAAC,EACD,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,EACb,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,KAAK,IACpC,IAAI,SAAS,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
package/dist/common.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const JSExtension = ".js";
|
|
2
|
+
export declare const CSSExtension = ".css";
|
|
3
|
+
export declare const HtmlExtension = ".html";
|
|
4
|
+
export declare const ImgExtensions: string[];
|
|
5
|
+
export declare const MediaExtensions: string[];
|
|
6
|
+
export declare const FontExtensions: string[];
|
|
7
|
+
export declare const MapExtensions: string[];
|
|
8
|
+
export declare const RsdoctorOutputFolder = ".rsdoctor";
|
|
9
|
+
export declare const RsdoctorOutputManifest = "manifest.json";
|
|
10
|
+
export declare const RsdoctorOutputManifestPath: ".rsdoctor/manifest.json";
|
|
11
|
+
export declare const StatsFilePath = "dist/stats.json";
|
|
12
|
+
export declare const RsdoctorMonitorNodeBId = "Rsdoctor";
|
|
13
|
+
export declare const RsdoctorMonitorWebBId = "Rsdoctor-Client";
|
|
14
|
+
export declare const RsdoctorMonitorDocBId = "Rsdoctor-Doc";
|
|
15
|
+
export declare const RsdoctorProcessEnvDebugKey = "RSDOCTOR_DEBUG";
|
|
16
|
+
export declare const RsdoctorClientUrl = "";
|
|
17
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAQ,CAAC;AAEjC,eAAO,MAAM,YAAY,SAAS,CAAC;AAEnC,eAAO,MAAM,aAAa,UAAU,CAAC;AAErC,eAAO,MAAM,aAAa,UAQzB,CAAC;AAEF,eAAO,MAAM,eAAe,UAS3B,CAAC;AAEF,eAAO,MAAM,cAAc,UAO1B,CAAC;AAEF,eAAO,MAAM,aAAa,UAAqD,CAAC;AAEhF,eAAO,MAAM,oBAAoB,cAAc,CAAC;AAEhD,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AAEtD,eAAO,MAAM,0BAA0B,2BACuB,CAAC;AAE/D,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAE/C,eAAO,MAAM,sBAAsB,aAAa,CAAC;AAEjD,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAEvD,eAAO,MAAM,qBAAqB,iBAAiB,CAAC;AAEpD,eAAO,MAAM,0BAA0B,mBAAmB,CAAC;AAE3D,eAAO,MAAM,iBAAiB,KAAK,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RsdoctorClientUrl = exports.RsdoctorProcessEnvDebugKey = exports.RsdoctorMonitorDocBId = exports.RsdoctorMonitorWebBId = exports.RsdoctorMonitorNodeBId = exports.StatsFilePath = exports.RsdoctorOutputManifestPath = exports.RsdoctorOutputManifest = exports.RsdoctorOutputFolder = exports.MapExtensions = exports.FontExtensions = exports.MediaExtensions = exports.ImgExtensions = exports.HtmlExtension = exports.CSSExtension = exports.JSExtension = void 0;
|
|
4
|
+
exports.JSExtension = '.js';
|
|
5
|
+
exports.CSSExtension = '.css';
|
|
6
|
+
exports.HtmlExtension = '.html';
|
|
7
|
+
exports.ImgExtensions = [
|
|
8
|
+
'.png',
|
|
9
|
+
'.jpg',
|
|
10
|
+
'.svg',
|
|
11
|
+
'.webp',
|
|
12
|
+
'.jpeg',
|
|
13
|
+
'.gif',
|
|
14
|
+
'.bmp',
|
|
15
|
+
];
|
|
16
|
+
exports.MediaExtensions = [
|
|
17
|
+
'.mp3',
|
|
18
|
+
'.mp4',
|
|
19
|
+
'.avi',
|
|
20
|
+
'.wav',
|
|
21
|
+
'.flv',
|
|
22
|
+
'.mov',
|
|
23
|
+
'.mpg',
|
|
24
|
+
'.mpeg',
|
|
25
|
+
];
|
|
26
|
+
exports.FontExtensions = [
|
|
27
|
+
'.ttf',
|
|
28
|
+
'.fnt',
|
|
29
|
+
'.fon',
|
|
30
|
+
'.otf',
|
|
31
|
+
'.woff',
|
|
32
|
+
'.woff2',
|
|
33
|
+
];
|
|
34
|
+
exports.MapExtensions = ['.js.map', '.css.map', '.ts.map', '.LICENSE.txt'];
|
|
35
|
+
exports.RsdoctorOutputFolder = '.rsdoctor';
|
|
36
|
+
exports.RsdoctorOutputManifest = 'manifest.json';
|
|
37
|
+
exports.RsdoctorOutputManifestPath = `${exports.RsdoctorOutputFolder}/${exports.RsdoctorOutputManifest}`;
|
|
38
|
+
exports.StatsFilePath = 'dist/stats.json';
|
|
39
|
+
exports.RsdoctorMonitorNodeBId = 'Rsdoctor';
|
|
40
|
+
exports.RsdoctorMonitorWebBId = 'Rsdoctor-Client';
|
|
41
|
+
exports.RsdoctorMonitorDocBId = 'Rsdoctor-Doc';
|
|
42
|
+
exports.RsdoctorProcessEnvDebugKey = 'RSDOCTOR_DEBUG';
|
|
43
|
+
exports.RsdoctorClientUrl = ''; // TODO: rsdoctor client url
|
package/dist/emo.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type WorkspaceCheckDataType = {
|
|
2
|
+
message: string;
|
|
3
|
+
type: 'issues' | 'message' | 'code';
|
|
4
|
+
title: string;
|
|
5
|
+
severity?: EmoCheckSeverity;
|
|
6
|
+
result?: {
|
|
7
|
+
package: string;
|
|
8
|
+
data: Record<string, string | string[]>[];
|
|
9
|
+
tag?: string;
|
|
10
|
+
} | {
|
|
11
|
+
path: string;
|
|
12
|
+
line?: number;
|
|
13
|
+
column?: number;
|
|
14
|
+
}[] | Record<string, {
|
|
15
|
+
version: string;
|
|
16
|
+
pkgname: string;
|
|
17
|
+
}>;
|
|
18
|
+
issues?: string[];
|
|
19
|
+
};
|
|
20
|
+
export type EmoCheckData = {
|
|
21
|
+
projectInfo: Record<string, string | Object>;
|
|
22
|
+
workspaceRes: Record<string, WorkspaceCheckDataType[]>;
|
|
23
|
+
};
|
|
24
|
+
export declare enum EmoCheckSeverity {
|
|
25
|
+
Error = 0,
|
|
26
|
+
Warn = 1,
|
|
27
|
+
Info = 2
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=emo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emo.d.ts","sourceRoot":"","sources":["../src/emo.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,MAAM,CAAC,EACH;QACE,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC;QAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,GACD;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,GAClD,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC7C,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,EAAE,CAAC,CAAC;CACxD,CAAC;AAEF,oBAAY,gBAAgB;IAC1B,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;CACT"}
|
package/dist/emo.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmoCheckSeverity = void 0;
|
|
4
|
+
var EmoCheckSeverity;
|
|
5
|
+
(function (EmoCheckSeverity) {
|
|
6
|
+
EmoCheckSeverity[EmoCheckSeverity["Error"] = 0] = "Error";
|
|
7
|
+
EmoCheckSeverity[EmoCheckSeverity["Warn"] = 1] = "Warn";
|
|
8
|
+
EmoCheckSeverity[EmoCheckSeverity["Info"] = 2] = "Info";
|
|
9
|
+
})(EmoCheckSeverity || (exports.EmoCheckSeverity = EmoCheckSeverity = {}));
|
package/dist/error.d.ts
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { NonFunctionProperties } from './common';
|
|
2
|
+
import type { BaseRuleStoreData } from './rule';
|
|
3
|
+
/**
|
|
4
|
+
* Position
|
|
5
|
+
* - `line` start with `1`
|
|
6
|
+
* - `column` start with `0`
|
|
7
|
+
*/
|
|
8
|
+
export interface Position {
|
|
9
|
+
line: number;
|
|
10
|
+
column: number;
|
|
11
|
+
}
|
|
12
|
+
/** Range of Position */
|
|
13
|
+
export interface Range {
|
|
14
|
+
start: Position;
|
|
15
|
+
end: Position;
|
|
16
|
+
}
|
|
17
|
+
/** Offset range */
|
|
18
|
+
export interface OffsetRange {
|
|
19
|
+
start: number;
|
|
20
|
+
end: number;
|
|
21
|
+
}
|
|
22
|
+
/** Error Level */
|
|
23
|
+
export declare enum ErrorLevel {
|
|
24
|
+
Ignore = 0,
|
|
25
|
+
Warn = 1,
|
|
26
|
+
Error = 2
|
|
27
|
+
}
|
|
28
|
+
/** Code prompt location */
|
|
29
|
+
export interface CodeFramePosition {
|
|
30
|
+
line: number;
|
|
31
|
+
column?: number;
|
|
32
|
+
}
|
|
33
|
+
/** File options where the code is located */
|
|
34
|
+
export interface CodeFrameFileOption {
|
|
35
|
+
filePath: string;
|
|
36
|
+
}
|
|
37
|
+
/** Code indication options */
|
|
38
|
+
export interface CodeFrameNormalOption {
|
|
39
|
+
filePath: string;
|
|
40
|
+
fileContent: string;
|
|
41
|
+
start?: CodeFramePosition;
|
|
42
|
+
end?: CodeFramePosition;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Code indication options
|
|
46
|
+
* - This type is mainly for compatibility with esbuild.
|
|
47
|
+
*/
|
|
48
|
+
export interface CodeFrameLineOption {
|
|
49
|
+
/** File path */
|
|
50
|
+
filePath: string;
|
|
51
|
+
/** Error line text */
|
|
52
|
+
lineText: string;
|
|
53
|
+
/** Starting point */
|
|
54
|
+
start?: CodeFramePosition;
|
|
55
|
+
/** Error character length */
|
|
56
|
+
length?: number;
|
|
57
|
+
}
|
|
58
|
+
export type CodeFrameOption = CodeFrameFileOption | CodeFrameNormalOption | CodeFrameLineOption;
|
|
59
|
+
/** Control item */
|
|
60
|
+
export interface ControllerOption {
|
|
61
|
+
/**
|
|
62
|
+
* Hide stack information
|
|
63
|
+
* - default is `true`
|
|
64
|
+
*/
|
|
65
|
+
noStack?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Do not display colors
|
|
68
|
+
* - default is `false`
|
|
69
|
+
*/
|
|
70
|
+
noColor?: boolean;
|
|
71
|
+
}
|
|
72
|
+
/** repair data */
|
|
73
|
+
export interface FixData {
|
|
74
|
+
/** Modify the starting position of string in the original text. */
|
|
75
|
+
start: number;
|
|
76
|
+
/** Modify string in the key position of the original text */
|
|
77
|
+
end: number;
|
|
78
|
+
/**
|
|
79
|
+
* Replaced new text
|
|
80
|
+
* - If empty, delete the original text.
|
|
81
|
+
*/
|
|
82
|
+
newText?: string;
|
|
83
|
+
/** Has it been fixed */
|
|
84
|
+
isFixed?: boolean;
|
|
85
|
+
}
|
|
86
|
+
/** Error Data */
|
|
87
|
+
export interface DevToolErrorData {
|
|
88
|
+
/** Error number */
|
|
89
|
+
id: number;
|
|
90
|
+
/** Wrong code */
|
|
91
|
+
code?: string;
|
|
92
|
+
/** Error category */
|
|
93
|
+
category?: string;
|
|
94
|
+
title: string;
|
|
95
|
+
message: string;
|
|
96
|
+
stack?: string;
|
|
97
|
+
fixData?: FixData;
|
|
98
|
+
detail?: any;
|
|
99
|
+
/** Absolute path where the error is located. */
|
|
100
|
+
path?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Error level
|
|
103
|
+
* - default is `'Error'`
|
|
104
|
+
*/
|
|
105
|
+
level?: keyof typeof ErrorLevel;
|
|
106
|
+
/** Error prompt */
|
|
107
|
+
hint?: string;
|
|
108
|
+
/** Description link */
|
|
109
|
+
referenceUrl?: string;
|
|
110
|
+
codeFrame?: CodeFrameOption;
|
|
111
|
+
}
|
|
112
|
+
/** Error data */
|
|
113
|
+
export interface DevToolErrorInstance extends DevToolErrorData {
|
|
114
|
+
/** Output stored data */
|
|
115
|
+
toData(): BaseRuleStoreData;
|
|
116
|
+
toString(): string;
|
|
117
|
+
toJSON(): {
|
|
118
|
+
message: string;
|
|
119
|
+
name: string;
|
|
120
|
+
stack?: string;
|
|
121
|
+
};
|
|
122
|
+
/** Set control items */
|
|
123
|
+
setControllerOption(opt: ControllerOption): void;
|
|
124
|
+
/** Set code instructions */
|
|
125
|
+
setCodeFrame(opt: CodeFrameOption): void;
|
|
126
|
+
/** Is the error the same */
|
|
127
|
+
isSame<T extends DevToolErrorInstance>(error: T): boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface DevToolErrorsData {
|
|
130
|
+
errors: DevToolErrorInstance[];
|
|
131
|
+
warnings: DevToolErrorInstance[];
|
|
132
|
+
}
|
|
133
|
+
/** Incorrect data input */
|
|
134
|
+
export type DevToolErrorParams = Omit<NonFunctionProperties<DevToolErrorInstance>, 'message' | 'title' | 'path' | 'id'> & {
|
|
135
|
+
controller?: ControllerOption;
|
|
136
|
+
codeFrame?: CodeFrameOption;
|
|
137
|
+
};
|
|
138
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAwB;AACxB,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,QAAQ,CAAC;IAChB,GAAG,EAAE,QAAQ,CAAC;CACf;AAED,oBAAoB;AACpB,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,kBAAkB;AAClB,oBAAY,UAAU;IACpB,MAAM,IAAI;IACV,IAAI,IAAI;IACR,KAAK,IAAI;CACV;AAED,2BA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AC;IAC9B,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B,CAAC"}
|
package/dist/error.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorLevel = void 0;
|
|
4
|
+
/** Error Level */
|
|
5
|
+
var ErrorLevel;
|
|
6
|
+
(function (ErrorLevel) {
|
|
7
|
+
ErrorLevel[ErrorLevel["Ignore"] = 0] = "Ignore";
|
|
8
|
+
ErrorLevel[ErrorLevel["Warn"] = 1] = "Warn";
|
|
9
|
+
ErrorLevel[ErrorLevel["Error"] = 2] = "Error";
|
|
10
|
+
})(ErrorLevel || (exports.ErrorLevel = ErrorLevel = {}));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Esbuild Error */
|
|
2
|
+
export interface Error {
|
|
3
|
+
id: string;
|
|
4
|
+
pluginName: string;
|
|
5
|
+
text: string;
|
|
6
|
+
location: Location | null;
|
|
7
|
+
notes: Note[];
|
|
8
|
+
/**
|
|
9
|
+
* Optional user-specified data that is passed through unmodified. You can
|
|
10
|
+
* use this to stash the original error, for example.
|
|
11
|
+
*/
|
|
12
|
+
detail: any;
|
|
13
|
+
}
|
|
14
|
+
interface Note {
|
|
15
|
+
text: string;
|
|
16
|
+
location: Location | null;
|
|
17
|
+
}
|
|
18
|
+
interface Location {
|
|
19
|
+
file: string;
|
|
20
|
+
namespace: string;
|
|
21
|
+
/** 1-based */
|
|
22
|
+
line: number;
|
|
23
|
+
/** 0-based, in bytes */
|
|
24
|
+
column: number;
|
|
25
|
+
/** in bytes */
|
|
26
|
+
length: number;
|
|
27
|
+
lineText: string;
|
|
28
|
+
suggestion: string;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=esbuild.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"esbuild.d.ts","sourceRoot":"","sources":["../src/esbuild.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,IAAI,EAAE,CAAC;IAEd;;;OAGG;IACH,MAAM,EAAE,GAAG,CAAC;CACb;AAED,UAAU,IAAI;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC3B;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc;IACd,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
package/dist/esbuild.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * as Manifest from './manifest';
|
|
2
|
+
export * as Esbuild from './esbuild';
|
|
3
|
+
export * as Babel from './babel';
|
|
4
|
+
export * as Common from './common';
|
|
5
|
+
export * as Err from './error';
|
|
6
|
+
export * as Logger from './logger';
|
|
7
|
+
export * as SDK from './sdk';
|
|
8
|
+
export * as Modules from './modules';
|
|
9
|
+
export * as Linter from './linter';
|
|
10
|
+
export * as Rule from './rule';
|
|
11
|
+
export * as Thirdparty from './thirdparty';
|
|
12
|
+
export * as Client from './client';
|
|
13
|
+
export * as Constants from './constants';
|
|
14
|
+
export * as Plugin from './plugin';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAEzC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Plugin = exports.Constants = exports.Client = exports.Thirdparty = exports.Rule = exports.Linter = exports.Modules = exports.SDK = exports.Logger = exports.Err = exports.Common = exports.Babel = exports.Esbuild = exports.Manifest = void 0;
|
|
27
|
+
exports.Manifest = __importStar(require("./manifest"));
|
|
28
|
+
exports.Esbuild = __importStar(require("./esbuild"));
|
|
29
|
+
exports.Babel = __importStar(require("./babel"));
|
|
30
|
+
exports.Common = __importStar(require("./common"));
|
|
31
|
+
exports.Err = __importStar(require("./error"));
|
|
32
|
+
exports.Logger = __importStar(require("./logger"));
|
|
33
|
+
exports.SDK = __importStar(require("./sdk"));
|
|
34
|
+
exports.Modules = __importStar(require("./modules"));
|
|
35
|
+
exports.Linter = __importStar(require("./linter"));
|
|
36
|
+
exports.Rule = __importStar(require("./rule"));
|
|
37
|
+
exports.Thirdparty = __importStar(require("./thirdparty"));
|
|
38
|
+
exports.Client = __importStar(require("./client"));
|
|
39
|
+
exports.Constants = __importStar(require("./constants"));
|
|
40
|
+
exports.Plugin = __importStar(require("./plugin"));
|