@sdk-usage/plugin-typescript 0.1.0 → 0.2.0-next.1792970377727.2c76fca
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/package.json +20 -20
- package/dist/index.cjs +0 -21
- package/dist/index.d.ts +0 -4
- package/dist/index.mjs +0 -21
package/package.json
CHANGED
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdk-usage/plugin-typescript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-next.1792970377727.2c76fca",
|
|
4
4
|
"description": "sdk-usage parser plugin to enable types syntax analysis",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"analyze",
|
|
7
7
|
"analyzer",
|
|
8
|
+
"api",
|
|
8
9
|
"inspect",
|
|
9
|
-
"scan",
|
|
10
|
-
"monitor",
|
|
11
|
-
"sonar",
|
|
12
|
-
"usage",
|
|
13
10
|
"jsx",
|
|
11
|
+
"monitor",
|
|
14
12
|
"react",
|
|
15
|
-
"
|
|
13
|
+
"scan",
|
|
14
|
+
"sonar",
|
|
15
|
+
"usage"
|
|
16
16
|
],
|
|
17
17
|
"homepage": "https://github.com/adbayb/sdk-usage/tree/main/packages/core#readme",
|
|
18
18
|
"bugs": {
|
|
19
19
|
"url": "https://github.com/adbayb/sdk-usage/issues"
|
|
20
20
|
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"author": "Ayoub Adib <adbayb@gmail.com>",
|
|
21
23
|
"repository": {
|
|
22
24
|
"type": "git",
|
|
23
25
|
"url": "https://github.com/adbayb/sdk-usage.git",
|
|
24
26
|
"directory": "libraries/plugin-typescript"
|
|
25
27
|
},
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
29
31
|
"type": "module",
|
|
32
|
+
"sideEffects": false,
|
|
30
33
|
"exports": {
|
|
31
34
|
".": {
|
|
32
35
|
"source": "./src/index.ts",
|
|
@@ -36,21 +39,18 @@
|
|
|
36
39
|
"default": "./dist/index.mjs"
|
|
37
40
|
}
|
|
38
41
|
},
|
|
39
|
-
"files": [
|
|
40
|
-
"dist"
|
|
41
|
-
],
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@types/node": "24.12.4",
|
|
44
|
-
"quickbundle": "3.0.0",
|
|
45
|
-
"@sdk-usage/core": "0.1.0"
|
|
46
|
-
},
|
|
47
|
-
"peerDependencies": {
|
|
48
|
-
"@sdk-usage/core": "^0.0.0 || <1.0.0"
|
|
49
|
-
},
|
|
50
42
|
"publishConfig": {
|
|
51
43
|
"access": "public",
|
|
52
44
|
"registry": "https://registry.npmjs.org"
|
|
53
45
|
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@sdk-usage/core": "0.1.1-next.1792970377727.2c76fca",
|
|
48
|
+
"@types/node": "24.19.2",
|
|
49
|
+
"quickbundle": "3.2.2"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@sdk-usage/core": "0.1.1-next.1792970377727.2c76fca"
|
|
53
|
+
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "quickbundle build",
|
|
56
56
|
"watch": "quickbundle watch"
|
package/dist/index.cjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
let _sdk_usage_core = require("@sdk-usage/core");
|
|
2
|
-
|
|
3
|
-
//#region src/index.ts
|
|
4
|
-
var src_default = (0, _sdk_usage_core.createPlugin)((context) => {
|
|
5
|
-
return { TsType(node) {
|
|
6
|
-
let typeValue = "";
|
|
7
|
-
if (node.type === "TsTypeReference" && node.typeName.type === "Identifier") typeValue = node.typeName.value;
|
|
8
|
-
if (node.type === "TsIndexedAccessType" && node.objectType.type === "TsTypeReference" && node.objectType.typeName.type === "Identifier") typeValue = node.objectType.typeName.value;
|
|
9
|
-
const importMetadata = context.imports.get(typeValue);
|
|
10
|
-
if (!importMetadata) return;
|
|
11
|
-
return {
|
|
12
|
-
module: importMetadata.module,
|
|
13
|
-
name: importMetadata.name,
|
|
14
|
-
offset: node.span.start,
|
|
15
|
-
type: "typescript/type"
|
|
16
|
-
};
|
|
17
|
-
} };
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
module.exports = src_default;
|
package/dist/index.d.ts
DELETED
package/dist/index.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { createPlugin } from "@sdk-usage/core";
|
|
2
|
-
|
|
3
|
-
//#region src/index.ts
|
|
4
|
-
var src_default = createPlugin((context) => {
|
|
5
|
-
return { TsType(node) {
|
|
6
|
-
let typeValue = "";
|
|
7
|
-
if (node.type === "TsTypeReference" && node.typeName.type === "Identifier") typeValue = node.typeName.value;
|
|
8
|
-
if (node.type === "TsIndexedAccessType" && node.objectType.type === "TsTypeReference" && node.objectType.typeName.type === "Identifier") typeValue = node.objectType.typeName.value;
|
|
9
|
-
const importMetadata = context.imports.get(typeValue);
|
|
10
|
-
if (!importMetadata) return;
|
|
11
|
-
return {
|
|
12
|
-
module: importMetadata.module,
|
|
13
|
-
name: importMetadata.name,
|
|
14
|
-
offset: node.span.start,
|
|
15
|
-
type: "typescript/type"
|
|
16
|
-
};
|
|
17
|
-
} };
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { src_default as default };
|