king-design-analyzer 2.0.1 → 2.0.3
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/ast/index.js +3 -3
- package/dist/ast/index.mjs +1 -1
- package/dist/{chunk-6ZHVWMNH.js → chunk-2W4XVSA3.js} +2 -2
- package/dist/{chunk-74XF3JB4.mjs → chunk-56IDUUT3.mjs} +1 -1
- package/dist/{chunk-CEPXZKU4.js → chunk-ATICOJFK.js} +3 -2
- package/dist/{chunk-RQBLMKWL.mjs → chunk-LRFJMATV.mjs} +2 -1
- package/dist/full/index.js +4 -4
- package/dist/full/index.mjs +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +2 -2
- package/dist/metadata/index.js +5 -1
- package/dist/metadata/index.mjs +4 -1
- package/package.json +1 -1
package/dist/ast/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../chunk-YTEYDSDW.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkATICOJFK_js = require('../chunk-ATICOJFK.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "analyzeCodeWithAST", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkATICOJFK_js.analyzeCodeWithAST; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "componentRegistry", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkATICOJFK_js.componentRegistry; }
|
|
15
15
|
});
|
package/dist/ast/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../chunk-5H7N2A5X.mjs';
|
|
2
|
-
export { analyzeCodeWithAST, componentRegistry } from '../chunk-
|
|
2
|
+
export { analyzeCodeWithAST, componentRegistry } from '../chunk-LRFJMATV.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkATICOJFK_js = require('./chunk-ATICOJFK.js');
|
|
4
4
|
var chunk2L37YJOJ_js = require('./chunk-2L37YJOJ.js');
|
|
5
5
|
|
|
6
6
|
// src/tools/unifiedValidator.ts
|
|
@@ -63,7 +63,7 @@ function validateCompilation(code) {
|
|
|
63
63
|
}
|
|
64
64
|
async function validateAST(code) {
|
|
65
65
|
try {
|
|
66
|
-
const violations = await
|
|
66
|
+
const violations = await chunkATICOJFK_js.analyzeCodeWithAST(code);
|
|
67
67
|
if (violations.length > 0) {
|
|
68
68
|
return {
|
|
69
69
|
name: "AST\u89C4\u5219\u68C0\u67E5",
|
|
@@ -32,7 +32,7 @@ var path__namespace = /*#__PURE__*/_interopNamespace(path);
|
|
|
32
32
|
var ts__namespace = /*#__PURE__*/_interopNamespace(ts);
|
|
33
33
|
|
|
34
34
|
// src/analysis/componentRegistry.ts
|
|
35
|
-
var __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
35
|
+
var __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-ATICOJFK.js', document.baseURI).href)));
|
|
36
36
|
var __dirname$1 = path__namespace.dirname(__filename$1);
|
|
37
37
|
var ComponentRegistry = class {
|
|
38
38
|
constructor() {
|
|
@@ -40,7 +40,8 @@ var ComponentRegistry = class {
|
|
|
40
40
|
this.loaded = false;
|
|
41
41
|
this.watcher = null;
|
|
42
42
|
// Path to components directory relative to this module (works when installed as npm package)
|
|
43
|
-
|
|
43
|
+
// From dist/*.mjs -> ../components (one level up to package root, then into components)
|
|
44
|
+
this.metadataPath = path__namespace.join(__dirname$1, "../components");
|
|
44
45
|
}
|
|
45
46
|
async load() {
|
|
46
47
|
if (this.loaded) return;
|
|
@@ -14,7 +14,8 @@ var ComponentRegistry = class {
|
|
|
14
14
|
this.loaded = false;
|
|
15
15
|
this.watcher = null;
|
|
16
16
|
// Path to components directory relative to this module (works when installed as npm package)
|
|
17
|
-
|
|
17
|
+
// From dist/*.mjs -> ../components (one level up to package root, then into components)
|
|
18
|
+
this.metadataPath = path.join(__dirname$1, "../components");
|
|
18
19
|
}
|
|
19
20
|
async load() {
|
|
20
21
|
if (this.loaded) return;
|
package/dist/full/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunk2W4XVSA3_js = require('../chunk-2W4XVSA3.js');
|
|
4
|
+
require('../chunk-ATICOJFK.js');
|
|
5
5
|
require('../chunk-2L37YJOJ.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "validateCode", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunk2W4XVSA3_js.validateCode; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "validateCodeSync", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunk2W4XVSA3_js.validateCodeSync; }
|
|
16
16
|
});
|
package/dist/full/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { validateCode, validateCodeSync } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { validateCode, validateCodeSync } from '../chunk-56IDUUT3.mjs';
|
|
2
|
+
import '../chunk-LRFJMATV.mjs';
|
|
3
3
|
import '../chunk-WJAGRAWV.mjs';
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var chunkREPE4KTQ_js = require('./chunk-REPE4KTQ.js');
|
|
4
4
|
require('./chunk-YTEYDSDW.js');
|
|
5
5
|
var chunkBJXTWCDK_js = require('./chunk-BJXTWCDK.js');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var chunk2W4XVSA3_js = require('./chunk-2W4XVSA3.js');
|
|
7
|
+
var chunkATICOJFK_js = require('./chunk-ATICOJFK.js');
|
|
8
8
|
var chunk2L37YJOJ_js = require('./chunk-2L37YJOJ.js');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -19,19 +19,19 @@ Object.defineProperty(exports, "validateRuntimePrecheck", {
|
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "validateCode", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk2W4XVSA3_js.validateCode; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "validateCodeSync", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk2W4XVSA3_js.validateCodeSync; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "analyzeCodeWithAST", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkATICOJFK_js.analyzeCodeWithAST; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "componentRegistry", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkATICOJFK_js.componentRegistry; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "compileSFC", {
|
|
37
37
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { validateCompilation } from './chunk-YYKRQHUZ.mjs';
|
|
2
2
|
import './chunk-5H7N2A5X.mjs';
|
|
3
3
|
export { validateRuntimePrecheck } from './chunk-X7PYJSHF.mjs';
|
|
4
|
-
export { validateCode, validateCodeSync } from './chunk-
|
|
5
|
-
export { analyzeCodeWithAST, componentRegistry } from './chunk-
|
|
4
|
+
export { validateCode, validateCodeSync } from './chunk-56IDUUT3.mjs';
|
|
5
|
+
export { analyzeCodeWithAST, componentRegistry } from './chunk-LRFJMATV.mjs';
|
|
6
6
|
export { compileSFC, scopeStyles } from './chunk-WJAGRAWV.mjs';
|
package/dist/metadata/index.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var fs = require('fs');
|
|
4
4
|
var path = require('path');
|
|
5
|
+
var url = require('url');
|
|
5
6
|
|
|
7
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
6
8
|
function _interopNamespace(e) {
|
|
7
9
|
if (e && e.__esModule) return e;
|
|
8
10
|
var n = Object.create(null);
|
|
@@ -25,7 +27,9 @@ var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
|
25
27
|
var path__namespace = /*#__PURE__*/_interopNamespace(path);
|
|
26
28
|
|
|
27
29
|
// src/metadata/index.ts
|
|
28
|
-
var
|
|
30
|
+
var __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.js', document.baseURI).href)));
|
|
31
|
+
var __dirname$1 = path__namespace.dirname(__filename$1);
|
|
32
|
+
var COMPONENTS_DIR = path__namespace.resolve(__dirname$1, "../components");
|
|
29
33
|
function getComponentsList() {
|
|
30
34
|
try {
|
|
31
35
|
return fs__namespace.readdirSync(COMPONENTS_DIR).filter((f) => f.endsWith(".json")).map((f) => f.replace(".json", ""));
|
package/dist/metadata/index.mjs
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
2
|
import * as path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
3
4
|
|
|
4
5
|
// src/metadata/index.ts
|
|
5
|
-
var
|
|
6
|
+
var __filename$1 = fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname$1 = path.dirname(__filename$1);
|
|
8
|
+
var COMPONENTS_DIR = path.resolve(__dirname$1, "../components");
|
|
6
9
|
function getComponentsList() {
|
|
7
10
|
try {
|
|
8
11
|
return fs.readdirSync(COMPONENTS_DIR).filter((f) => f.endsWith(".json")).map((f) => f.replace(".json", ""));
|
package/package.json
CHANGED