dslinter 0.1.1 → 0.1.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/CHANGELOG.md +4 -0
- package/README.md +43 -0
- package/bin/dslinter.mjs +6 -0
- package/bin/modes/init.mjs +73 -0
- package/dashboard-dist/assets/index-BN-Qjczl.js +205 -0
- package/dashboard-dist/index.html +1 -1
- package/index.cjs +52 -52
- package/package.json +7 -6
- package/src/components/ComponentInspectPane.tsx +20 -0
- package/src/index.ts +21 -1
- package/src/playground/buildPlaygroundEntriesFromReport.ts +46 -6
- package/src/playground/createPlaygroundRegistry.ts +48 -0
- package/src/playground/playgroundJoin.test.ts +74 -0
- package/src/playground/playgroundJoin.ts +116 -0
- package/src/shell/DashboardLayout.tsx +11 -0
- package/templates/playground/buildRegistry.ts +26 -0
- package/templates/vite.dslinter.snippet.ts +28 -0
- package/dashboard-dist/assets/index-B6zsYv3h.js +0 -206
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>DSLinter</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-BN-Qjczl.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-BhDQfrwA.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body class="bg-background antialiased">
|
package/index.cjs
CHANGED
|
@@ -77,8 +77,8 @@ function requireNative() {
|
|
|
77
77
|
try {
|
|
78
78
|
const binding = require('@dslinter/binding-android-arm64')
|
|
79
79
|
const bindingPackageVersion = require('@dslinter/binding-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '0.1.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
80
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
81
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
82
|
}
|
|
83
83
|
return binding
|
|
84
84
|
} catch (e) {
|
|
@@ -93,8 +93,8 @@ function requireNative() {
|
|
|
93
93
|
try {
|
|
94
94
|
const binding = require('@dslinter/binding-android-arm-eabi')
|
|
95
95
|
const bindingPackageVersion = require('@dslinter/binding-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '0.1.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
96
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
97
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
98
|
}
|
|
99
99
|
return binding
|
|
100
100
|
} catch (e) {
|
|
@@ -114,8 +114,8 @@ function requireNative() {
|
|
|
114
114
|
try {
|
|
115
115
|
const binding = require('@dslinter/binding-win32-x64-gnu')
|
|
116
116
|
const bindingPackageVersion = require('@dslinter/binding-win32-x64-gnu/package.json').version
|
|
117
|
-
if (bindingPackageVersion !== '0.1.
|
|
118
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
117
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
118
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
119
119
|
}
|
|
120
120
|
return binding
|
|
121
121
|
} catch (e) {
|
|
@@ -130,8 +130,8 @@ function requireNative() {
|
|
|
130
130
|
try {
|
|
131
131
|
const binding = require('@dslinter/binding-win32-x64-msvc')
|
|
132
132
|
const bindingPackageVersion = require('@dslinter/binding-win32-x64-msvc/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '0.1.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
133
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
134
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
135
|
}
|
|
136
136
|
return binding
|
|
137
137
|
} catch (e) {
|
|
@@ -147,8 +147,8 @@ function requireNative() {
|
|
|
147
147
|
try {
|
|
148
148
|
const binding = require('@dslinter/binding-win32-ia32-msvc')
|
|
149
149
|
const bindingPackageVersion = require('@dslinter/binding-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '0.1.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
150
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -163,8 +163,8 @@ function requireNative() {
|
|
|
163
163
|
try {
|
|
164
164
|
const binding = require('@dslinter/binding-win32-arm64-msvc')
|
|
165
165
|
const bindingPackageVersion = require('@dslinter/binding-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '0.1.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
166
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
167
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
168
|
}
|
|
169
169
|
return binding
|
|
170
170
|
} catch (e) {
|
|
@@ -182,8 +182,8 @@ function requireNative() {
|
|
|
182
182
|
try {
|
|
183
183
|
const binding = require('@dslinter/binding-darwin-universal')
|
|
184
184
|
const bindingPackageVersion = require('@dslinter/binding-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '0.1.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
185
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
186
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
187
|
}
|
|
188
188
|
return binding
|
|
189
189
|
} catch (e) {
|
|
@@ -198,8 +198,8 @@ function requireNative() {
|
|
|
198
198
|
try {
|
|
199
199
|
const binding = require('@dslinter/binding-darwin-x64')
|
|
200
200
|
const bindingPackageVersion = require('@dslinter/binding-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '0.1.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
201
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
202
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
203
|
}
|
|
204
204
|
return binding
|
|
205
205
|
} catch (e) {
|
|
@@ -214,8 +214,8 @@ function requireNative() {
|
|
|
214
214
|
try {
|
|
215
215
|
const binding = require('@dslinter/binding-darwin-arm64')
|
|
216
216
|
const bindingPackageVersion = require('@dslinter/binding-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '0.1.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
217
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
218
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
219
|
}
|
|
220
220
|
return binding
|
|
221
221
|
} catch (e) {
|
|
@@ -234,8 +234,8 @@ function requireNative() {
|
|
|
234
234
|
try {
|
|
235
235
|
const binding = require('@dslinter/binding-freebsd-x64')
|
|
236
236
|
const bindingPackageVersion = require('@dslinter/binding-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '0.1.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
237
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
238
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
239
|
}
|
|
240
240
|
return binding
|
|
241
241
|
} catch (e) {
|
|
@@ -250,8 +250,8 @@ function requireNative() {
|
|
|
250
250
|
try {
|
|
251
251
|
const binding = require('@dslinter/binding-freebsd-arm64')
|
|
252
252
|
const bindingPackageVersion = require('@dslinter/binding-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '0.1.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
253
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
254
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
255
|
}
|
|
256
256
|
return binding
|
|
257
257
|
} catch (e) {
|
|
@@ -271,8 +271,8 @@ function requireNative() {
|
|
|
271
271
|
try {
|
|
272
272
|
const binding = require('@dslinter/binding-linux-x64-musl')
|
|
273
273
|
const bindingPackageVersion = require('@dslinter/binding-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '0.1.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
274
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
275
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
276
|
}
|
|
277
277
|
return binding
|
|
278
278
|
} catch (e) {
|
|
@@ -287,8 +287,8 @@ function requireNative() {
|
|
|
287
287
|
try {
|
|
288
288
|
const binding = require('@dslinter/binding-linux-x64-gnu')
|
|
289
289
|
const bindingPackageVersion = require('@dslinter/binding-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '0.1.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
290
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
291
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
292
|
}
|
|
293
293
|
return binding
|
|
294
294
|
} catch (e) {
|
|
@@ -305,8 +305,8 @@ function requireNative() {
|
|
|
305
305
|
try {
|
|
306
306
|
const binding = require('@dslinter/binding-linux-arm64-musl')
|
|
307
307
|
const bindingPackageVersion = require('@dslinter/binding-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '0.1.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
308
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
309
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
310
|
}
|
|
311
311
|
return binding
|
|
312
312
|
} catch (e) {
|
|
@@ -321,8 +321,8 @@ function requireNative() {
|
|
|
321
321
|
try {
|
|
322
322
|
const binding = require('@dslinter/binding-linux-arm64-gnu')
|
|
323
323
|
const bindingPackageVersion = require('@dslinter/binding-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '0.1.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
324
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
325
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
326
|
}
|
|
327
327
|
return binding
|
|
328
328
|
} catch (e) {
|
|
@@ -339,8 +339,8 @@ function requireNative() {
|
|
|
339
339
|
try {
|
|
340
340
|
const binding = require('@dslinter/binding-linux-arm-musleabihf')
|
|
341
341
|
const bindingPackageVersion = require('@dslinter/binding-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '0.1.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
342
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
343
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
344
|
}
|
|
345
345
|
return binding
|
|
346
346
|
} catch (e) {
|
|
@@ -355,8 +355,8 @@ function requireNative() {
|
|
|
355
355
|
try {
|
|
356
356
|
const binding = require('@dslinter/binding-linux-arm-gnueabihf')
|
|
357
357
|
const bindingPackageVersion = require('@dslinter/binding-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '0.1.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
358
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
359
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
360
|
}
|
|
361
361
|
return binding
|
|
362
362
|
} catch (e) {
|
|
@@ -373,8 +373,8 @@ function requireNative() {
|
|
|
373
373
|
try {
|
|
374
374
|
const binding = require('@dslinter/binding-linux-loong64-musl')
|
|
375
375
|
const bindingPackageVersion = require('@dslinter/binding-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '0.1.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
376
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
377
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
378
|
}
|
|
379
379
|
return binding
|
|
380
380
|
} catch (e) {
|
|
@@ -389,8 +389,8 @@ function requireNative() {
|
|
|
389
389
|
try {
|
|
390
390
|
const binding = require('@dslinter/binding-linux-loong64-gnu')
|
|
391
391
|
const bindingPackageVersion = require('@dslinter/binding-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '0.1.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
392
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
393
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
394
|
}
|
|
395
395
|
return binding
|
|
396
396
|
} catch (e) {
|
|
@@ -407,8 +407,8 @@ function requireNative() {
|
|
|
407
407
|
try {
|
|
408
408
|
const binding = require('@dslinter/binding-linux-riscv64-musl')
|
|
409
409
|
const bindingPackageVersion = require('@dslinter/binding-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '0.1.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
410
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
411
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
412
|
}
|
|
413
413
|
return binding
|
|
414
414
|
} catch (e) {
|
|
@@ -423,8 +423,8 @@ function requireNative() {
|
|
|
423
423
|
try {
|
|
424
424
|
const binding = require('@dslinter/binding-linux-riscv64-gnu')
|
|
425
425
|
const bindingPackageVersion = require('@dslinter/binding-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '0.1.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
426
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
427
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
428
|
}
|
|
429
429
|
return binding
|
|
430
430
|
} catch (e) {
|
|
@@ -440,8 +440,8 @@ function requireNative() {
|
|
|
440
440
|
try {
|
|
441
441
|
const binding = require('@dslinter/binding-linux-ppc64-gnu')
|
|
442
442
|
const bindingPackageVersion = require('@dslinter/binding-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '0.1.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
443
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -456,8 +456,8 @@ function requireNative() {
|
|
|
456
456
|
try {
|
|
457
457
|
const binding = require('@dslinter/binding-linux-s390x-gnu')
|
|
458
458
|
const bindingPackageVersion = require('@dslinter/binding-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.1.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
459
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -476,8 +476,8 @@ function requireNative() {
|
|
|
476
476
|
try {
|
|
477
477
|
const binding = require('@dslinter/binding-openharmony-arm64')
|
|
478
478
|
const bindingPackageVersion = require('@dslinter/binding-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '0.1.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
479
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
480
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
481
|
}
|
|
482
482
|
return binding
|
|
483
483
|
} catch (e) {
|
|
@@ -492,8 +492,8 @@ function requireNative() {
|
|
|
492
492
|
try {
|
|
493
493
|
const binding = require('@dslinter/binding-openharmony-x64')
|
|
494
494
|
const bindingPackageVersion = require('@dslinter/binding-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '0.1.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
495
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
496
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
497
|
}
|
|
498
498
|
return binding
|
|
499
499
|
} catch (e) {
|
|
@@ -508,8 +508,8 @@ function requireNative() {
|
|
|
508
508
|
try {
|
|
509
509
|
const binding = require('@dslinter/binding-openharmony-arm')
|
|
510
510
|
const bindingPackageVersion = require('@dslinter/binding-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '0.1.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
511
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
512
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
513
|
}
|
|
514
514
|
return binding
|
|
515
515
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dslinter",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "DSLinter dashboard UI: playground shell, token wall, and governance panels (consumes dslint-report.json).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"index.cjs",
|
|
67
67
|
"index.d.ts",
|
|
68
68
|
"src",
|
|
69
|
+
"templates",
|
|
69
70
|
"components.json",
|
|
70
71
|
"README.md",
|
|
71
72
|
"LICENSE",
|
|
@@ -108,11 +109,11 @@
|
|
|
108
109
|
"vitest": "^3.2.4"
|
|
109
110
|
},
|
|
110
111
|
"optionalDependencies": {
|
|
111
|
-
"@dslinter/binding-darwin-arm64": "0.1.
|
|
112
|
-
"@dslinter/binding-darwin-x64": "0.1.
|
|
113
|
-
"@dslinter/binding-linux-arm64-gnu": "0.1.
|
|
114
|
-
"@dslinter/binding-linux-x64-gnu": "0.1.
|
|
115
|
-
"@dslinter/binding-win32-x64-msvc": "0.1.
|
|
112
|
+
"@dslinter/binding-darwin-arm64": "0.1.2",
|
|
113
|
+
"@dslinter/binding-darwin-x64": "0.1.2",
|
|
114
|
+
"@dslinter/binding-linux-arm64-gnu": "0.1.2",
|
|
115
|
+
"@dslinter/binding-linux-x64-gnu": "0.1.2",
|
|
116
|
+
"@dslinter/binding-win32-x64-msvc": "0.1.2"
|
|
116
117
|
},
|
|
117
118
|
"scripts": {
|
|
118
119
|
"build:napi": "napi build --platform --release --cwd ../.. --output-dir packages/dashboard --package-json-path packages/dashboard/package.json --js-package-name @dslinter/binding --js index.cjs --no-default-features --features napi",
|
|
@@ -21,6 +21,8 @@ import { FindingsList } from "../dashboard/FindingsList";
|
|
|
21
21
|
import { shortPath } from "../dashboard/paths";
|
|
22
22
|
import { findingsForComponent } from "../report/findingsForComponent";
|
|
23
23
|
import type { WorkspaceReport } from "../types/report";
|
|
24
|
+
import type { PlaygroundJoinSkip } from "../playground/playgroundJoin";
|
|
25
|
+
import { findPlaygroundSpec } from "../playground/playgroundJoin";
|
|
24
26
|
import { Section } from "./Section";
|
|
25
27
|
|
|
26
28
|
type Props = {
|
|
@@ -28,6 +30,8 @@ type Props = {
|
|
|
28
30
|
workspaceReport: WorkspaceReport | null;
|
|
29
31
|
reportReady: boolean;
|
|
30
32
|
hasPlaygroundSpec: boolean;
|
|
33
|
+
/** When the report row exists but Vite could not load the module/export. */
|
|
34
|
+
playgroundJoinSkip?: PlaygroundJoinSkip;
|
|
31
35
|
onBackToGovernance: () => void;
|
|
32
36
|
};
|
|
33
37
|
|
|
@@ -36,8 +40,10 @@ export function ComponentInspectPane({
|
|
|
36
40
|
workspaceReport,
|
|
37
41
|
reportReady,
|
|
38
42
|
hasPlaygroundSpec,
|
|
43
|
+
playgroundJoinSkip,
|
|
39
44
|
onBackToGovernance,
|
|
40
45
|
}: Props) {
|
|
46
|
+
const playgroundSpec = findPlaygroundSpec(workspaceReport, componentId);
|
|
41
47
|
const definitions = useMemo(() => {
|
|
42
48
|
if (!workspaceReport) return [];
|
|
43
49
|
return aggregateDefinitions(workspaceReport).get(componentId) ?? [];
|
|
@@ -66,6 +72,15 @@ export function ComponentInspectPane({
|
|
|
66
72
|
? "A preview was expected for this component but the module could not be loaded in the dashboard bundle (check the file path, export name, or that npx dslinter was run from the project root)."
|
|
67
73
|
: "No playable component definition was found in a .tsx/.jsx file under the scanned workspace — only names from JSX usage appear in the catalog.";
|
|
68
74
|
|
|
75
|
+
const joinDetail =
|
|
76
|
+
playgroundJoinSkip?.reason === "module_not_found"
|
|
77
|
+
? `Vite glob is missing key "${playgroundJoinSkip.globKey}" for report path "${playgroundJoinSkip.rel_path}". Run npx dslinter init and wire import.meta.glob in src/playground/buildRegistry.ts.`
|
|
78
|
+
: playgroundJoinSkip?.reason === "export_not_found"
|
|
79
|
+
? `Module loaded but named export "${playgroundJoinSkip.export_name}" was not found. Use export function ${playgroundJoinSkip.export_name}(…) in ${playgroundJoinSkip.rel_path}.`
|
|
80
|
+
: playgroundSpec
|
|
81
|
+
? `Report path: ${playgroundSpec.rel_path} (export ${playgroundSpec.export_name}). Ensure buildRegistry.ts glob covers this file and globKeyFromRelPath matches your import.meta.glob keys.`
|
|
82
|
+
: null;
|
|
83
|
+
|
|
69
84
|
return (
|
|
70
85
|
<div className="flex min-h-0 flex-1 flex-col overflow-hidden bg-background">
|
|
71
86
|
<div className="min-h-0 flex-1 overflow-auto">
|
|
@@ -81,6 +96,11 @@ export function ComponentInspectPane({
|
|
|
81
96
|
<p className="mt-2 max-w-2xl text-sm text-muted-foreground">
|
|
82
97
|
Scan snapshot — no live preview. {previewNote}
|
|
83
98
|
</p>
|
|
99
|
+
{joinDetail ? (
|
|
100
|
+
<p className="mt-2 max-w-2xl font-mono text-xs text-muted-foreground">
|
|
101
|
+
{joinDetail}
|
|
102
|
+
</p>
|
|
103
|
+
) : null}
|
|
84
104
|
</div>
|
|
85
105
|
<Button type="button" size="sm" variant="outline" onClick={onBackToGovernance}>
|
|
86
106
|
Back to governance
|
package/src/index.ts
CHANGED
|
@@ -15,10 +15,30 @@ export { defaultArgsFromControls } from "./types/controls";
|
|
|
15
15
|
export { definePlayground } from "./playground/definePlayground";
|
|
16
16
|
export {
|
|
17
17
|
buildPlaygroundEntriesFromReport,
|
|
18
|
+
buildPlaygroundEntriesFromReportWithSkips,
|
|
18
19
|
playgroundCatalogId,
|
|
19
20
|
resolvePlaygroundEntry,
|
|
21
|
+
defaultConsumerGlobKeyFromRelPath,
|
|
22
|
+
defaultEmbedGlobKeyFromRelPath,
|
|
23
|
+
diagnosePlaygroundJoinSkips,
|
|
24
|
+
findPlaygroundJoinSkip,
|
|
25
|
+
findPlaygroundSpec,
|
|
26
|
+
logPlaygroundJoinSkips,
|
|
20
27
|
} from "./playground/buildPlaygroundEntriesFromReport";
|
|
21
|
-
export type {
|
|
28
|
+
export type {
|
|
29
|
+
BuildPlaygroundModules,
|
|
30
|
+
BuildPlaygroundOptions,
|
|
31
|
+
BuildPlaygroundResult,
|
|
32
|
+
} from "./playground/buildPlaygroundEntriesFromReport";
|
|
33
|
+
export type {
|
|
34
|
+
PlaygroundJoinSkip,
|
|
35
|
+
PlaygroundJoinSkipReason,
|
|
36
|
+
} from "./playground/buildPlaygroundEntriesFromReport";
|
|
37
|
+
export {
|
|
38
|
+
createPlaygroundRegistry,
|
|
39
|
+
createPlaygroundRegistryEntriesOnly,
|
|
40
|
+
} from "./playground/createPlaygroundRegistry";
|
|
41
|
+
export type { CreatePlaygroundRegistryOptions } from "./playground/createPlaygroundRegistry";
|
|
22
42
|
export type { DefinedPlayground } from "./playground/definePlayground";
|
|
23
43
|
export type { PlaygroundPreviewProps, PlaygroundPreviewComponent } from "./types/preview";
|
|
24
44
|
export type {
|
|
@@ -2,6 +2,12 @@ import { createElement, type ComponentType } from "react";
|
|
|
2
2
|
import type { PlaygroundArgs, PlaygroundControl } from "../types/controls";
|
|
3
3
|
import type { DeclaredPropKind, PlaygroundSpec, WorkspaceReport } from "../types/report";
|
|
4
4
|
import type { PlaygroundEntry, PlaygroundMeta, PlaygroundPreviewComponent } from "../types/playground";
|
|
5
|
+
import {
|
|
6
|
+
defaultEmbedGlobKeyFromRelPath,
|
|
7
|
+
diagnosePlaygroundJoinSkips,
|
|
8
|
+
logPlaygroundJoinSkips,
|
|
9
|
+
type PlaygroundJoinSkip,
|
|
10
|
+
} from "./playgroundJoin";
|
|
5
11
|
|
|
6
12
|
export type BuildPlaygroundModules = Record<string, Record<string, unknown>>;
|
|
7
13
|
|
|
@@ -10,13 +16,29 @@ export type BuildPlaygroundOptions = {
|
|
|
10
16
|
globKeyFromRelPath?: (relPath: string) => string;
|
|
11
17
|
controlOverrides?: Record<string, PlaygroundControl[]>;
|
|
12
18
|
staticDefaults?: Record<string, Record<string, unknown>>;
|
|
19
|
+
/** When true (default in Vite dev), log specs that failed to join to `modules`. */
|
|
20
|
+
logJoinSkips?: boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type BuildPlaygroundResult = {
|
|
24
|
+
entries: PlaygroundEntry[];
|
|
25
|
+
skipped: PlaygroundJoinSkip[];
|
|
13
26
|
};
|
|
14
27
|
|
|
15
28
|
function defaultGlobKeyFromRelPath(relPath: string): string {
|
|
16
|
-
|
|
17
|
-
return `@dslint-scan/${trimmed}`;
|
|
29
|
+
return defaultEmbedGlobKeyFromRelPath(relPath);
|
|
18
30
|
}
|
|
19
31
|
|
|
32
|
+
export type { PlaygroundJoinSkip, PlaygroundJoinSkipReason } from "./playgroundJoin";
|
|
33
|
+
export {
|
|
34
|
+
defaultConsumerGlobKeyFromRelPath,
|
|
35
|
+
defaultEmbedGlobKeyFromRelPath,
|
|
36
|
+
diagnosePlaygroundJoinSkips,
|
|
37
|
+
findPlaygroundJoinSkip,
|
|
38
|
+
findPlaygroundSpec,
|
|
39
|
+
logPlaygroundJoinSkips,
|
|
40
|
+
} from "./playgroundJoin";
|
|
41
|
+
|
|
20
42
|
function coerceDeclaredPropKind(v: unknown): DeclaredPropKind | undefined {
|
|
21
43
|
if (v === "boolean" || v === "string" || v === "number" || v === "unknown")
|
|
22
44
|
return v;
|
|
@@ -281,19 +303,27 @@ export function resolvePlaygroundEntry(
|
|
|
281
303
|
}
|
|
282
304
|
|
|
283
305
|
/** Build playground entries from report specs + eager Vite modules. */
|
|
284
|
-
export function
|
|
306
|
+
export function buildPlaygroundEntriesFromReportWithSkips(
|
|
285
307
|
report: WorkspaceReport | null | undefined,
|
|
286
308
|
modules: BuildPlaygroundModules,
|
|
287
309
|
options: BuildPlaygroundOptions = {},
|
|
288
|
-
):
|
|
310
|
+
): BuildPlaygroundResult {
|
|
289
311
|
const specs = report?.playgrounds;
|
|
290
|
-
if (!specs?.length) return [];
|
|
312
|
+
if (!specs?.length) return { entries: [], skipped: [] };
|
|
291
313
|
|
|
292
314
|
const globKeyFromRelPath =
|
|
293
315
|
options.globKeyFromRelPath ?? defaultGlobKeyFromRelPath;
|
|
294
316
|
const controlOverrides = options.controlOverrides ?? {};
|
|
295
317
|
const staticDefaultsMap = options.staticDefaults ?? {};
|
|
296
318
|
|
|
319
|
+
const skipped = diagnosePlaygroundJoinSkips(report, modules, {
|
|
320
|
+
globKeyFromRelPath,
|
|
321
|
+
});
|
|
322
|
+
const shouldLog =
|
|
323
|
+
options.logJoinSkips ??
|
|
324
|
+
(typeof import.meta !== "undefined" && Boolean(import.meta.env?.DEV));
|
|
325
|
+
if (shouldLog) logPlaygroundJoinSkips(skipped);
|
|
326
|
+
|
|
297
327
|
const out: PlaygroundEntry[] = [];
|
|
298
328
|
for (const spec of specs) {
|
|
299
329
|
const globKey = globKeyFromRelPath(spec.rel_path);
|
|
@@ -345,5 +375,15 @@ export function buildPlaygroundEntriesFromReport(
|
|
|
345
375
|
if (ga !== gb) return ga.localeCompare(gb);
|
|
346
376
|
return a.meta.title.localeCompare(b.meta.title);
|
|
347
377
|
});
|
|
348
|
-
return out;
|
|
378
|
+
return { entries: out, skipped };
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/** Build playground entries from report specs + eager Vite modules. */
|
|
382
|
+
export function buildPlaygroundEntriesFromReport(
|
|
383
|
+
report: WorkspaceReport | null | undefined,
|
|
384
|
+
modules: BuildPlaygroundModules,
|
|
385
|
+
options: BuildPlaygroundOptions = {},
|
|
386
|
+
): PlaygroundEntry[] {
|
|
387
|
+
return buildPlaygroundEntriesFromReportWithSkips(report, modules, options)
|
|
388
|
+
.entries;
|
|
349
389
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { PlaygroundEntry } from "../types/playground";
|
|
2
|
+
import type { WorkspaceReport } from "../types/report";
|
|
3
|
+
import {
|
|
4
|
+
buildPlaygroundEntriesFromReportWithSkips,
|
|
5
|
+
type BuildPlaygroundModules,
|
|
6
|
+
type BuildPlaygroundOptions,
|
|
7
|
+
type BuildPlaygroundResult,
|
|
8
|
+
} from "./buildPlaygroundEntriesFromReport";
|
|
9
|
+
import { defaultConsumerGlobKeyFromRelPath } from "./playgroundJoin";
|
|
10
|
+
|
|
11
|
+
export type CreatePlaygroundRegistryOptions = Omit<
|
|
12
|
+
BuildPlaygroundOptions,
|
|
13
|
+
"globKeyFromRelPath"
|
|
14
|
+
> & {
|
|
15
|
+
/** Defaults to {@link defaultConsumerGlobKeyFromRelPath} (`src/playground` → `src/components`). */
|
|
16
|
+
globKeyFromRelPath?: (relPath: string) => string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Factory for consumer apps: pass eager `import.meta.glob` modules from your Vite app.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const modules = import.meta.glob("../components/**\/*.{tsx,jsx}", { eager: true });
|
|
25
|
+
* export const buildPlaygroundEntries = createPlaygroundRegistry(modules);
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export function createPlaygroundRegistry(
|
|
29
|
+
modules: BuildPlaygroundModules,
|
|
30
|
+
options: CreatePlaygroundRegistryOptions = {},
|
|
31
|
+
): (report: WorkspaceReport | null | undefined) => BuildPlaygroundResult {
|
|
32
|
+
const globKeyFromRelPath =
|
|
33
|
+
options.globKeyFromRelPath ?? defaultConsumerGlobKeyFromRelPath;
|
|
34
|
+
return (report) =>
|
|
35
|
+
buildPlaygroundEntriesFromReportWithSkips(report, modules, {
|
|
36
|
+
...options,
|
|
37
|
+
globKeyFromRelPath,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Convenience when you only need entries (skips are still logged in dev). */
|
|
42
|
+
export function createPlaygroundRegistryEntriesOnly(
|
|
43
|
+
modules: BuildPlaygroundModules,
|
|
44
|
+
options: CreatePlaygroundRegistryOptions = {},
|
|
45
|
+
): (report: WorkspaceReport | null | undefined) => PlaygroundEntry[] {
|
|
46
|
+
const build = createPlaygroundRegistry(modules, options);
|
|
47
|
+
return (report) => build(report).entries;
|
|
48
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import type { WorkspaceReport } from "../types/report";
|
|
3
|
+
import {
|
|
4
|
+
defaultConsumerGlobKeyFromRelPath,
|
|
5
|
+
diagnosePlaygroundJoinSkips,
|
|
6
|
+
} from "./playgroundJoin";
|
|
7
|
+
import { buildPlaygroundEntriesFromReportWithSkips } from "./buildPlaygroundEntriesFromReport";
|
|
8
|
+
|
|
9
|
+
describe("defaultConsumerGlobKeyFromRelPath", () => {
|
|
10
|
+
it("maps nested ui paths for src/playground registry", () => {
|
|
11
|
+
expect(defaultConsumerGlobKeyFromRelPath("src/components/ui/button.tsx")).toBe(
|
|
12
|
+
"../components/ui/button.tsx",
|
|
13
|
+
);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it("maps flat component paths", () => {
|
|
17
|
+
expect(defaultConsumerGlobKeyFromRelPath("src/components/Button.tsx")).toBe(
|
|
18
|
+
"../components/Button.tsx",
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
describe("diagnosePlaygroundJoinSkips", () => {
|
|
24
|
+
const report: WorkspaceReport = {
|
|
25
|
+
root: "/repo",
|
|
26
|
+
files: [],
|
|
27
|
+
findings: [],
|
|
28
|
+
scores: {
|
|
29
|
+
system_health: 0,
|
|
30
|
+
token_adoption: 0,
|
|
31
|
+
component_adoption: 0,
|
|
32
|
+
ux_consistency: 0,
|
|
33
|
+
},
|
|
34
|
+
ownership: [],
|
|
35
|
+
duplicate_components: [],
|
|
36
|
+
usage_by_component: [],
|
|
37
|
+
playgrounds: [
|
|
38
|
+
{
|
|
39
|
+
id: "Button",
|
|
40
|
+
export_name: "Button",
|
|
41
|
+
rel_path: "src/components/ui/button.tsx",
|
|
42
|
+
declared_props: [],
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
it("flags module_not_found when glob key is missing", () => {
|
|
48
|
+
const skipped = diagnosePlaygroundJoinSkips(report, {}, {
|
|
49
|
+
globKeyFromRelPath: defaultConsumerGlobKeyFromRelPath,
|
|
50
|
+
});
|
|
51
|
+
expect(skipped).toHaveLength(1);
|
|
52
|
+
expect(skipped[0]?.reason).toBe("module_not_found");
|
|
53
|
+
expect(skipped[0]?.globKey).toBe("../components/ui/button.tsx");
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it("joins when module and export exist", () => {
|
|
57
|
+
const key = defaultConsumerGlobKeyFromRelPath("src/components/ui/button.tsx");
|
|
58
|
+
const modules = {
|
|
59
|
+
[key]: {
|
|
60
|
+
Button: function Button() {
|
|
61
|
+
return null;
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
const { entries, skipped } = buildPlaygroundEntriesFromReportWithSkips(
|
|
66
|
+
report,
|
|
67
|
+
modules,
|
|
68
|
+
{ globKeyFromRelPath: defaultConsumerGlobKeyFromRelPath, logJoinSkips: false },
|
|
69
|
+
);
|
|
70
|
+
expect(skipped).toHaveLength(0);
|
|
71
|
+
expect(entries).toHaveLength(1);
|
|
72
|
+
expect(entries[0]?.id).toBe("Button");
|
|
73
|
+
});
|
|
74
|
+
});
|