@skillsmith/core 0.5.3 → 0.5.5
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 +14 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/src/activation/ActivationManager.d.ts +7 -0
- package/dist/src/activation/ActivationManager.d.ts.map +1 -1
- package/dist/src/activation/ActivationManager.js +13 -4
- package/dist/src/activation/ActivationManager.js.map +1 -1
- package/dist/src/analysis/adapters/python.d.ts +16 -11
- package/dist/src/analysis/adapters/python.d.ts.map +1 -1
- package/dist/src/analysis/adapters/python.js +46 -61
- package/dist/src/analysis/adapters/python.js.map +1 -1
- package/dist/src/analysis/router.test.d.ts +2 -0
- package/dist/src/analysis/router.test.d.ts.map +1 -0
- package/dist/src/analysis/router.test.js +411 -0
- package/dist/src/analysis/router.test.js.map +1 -0
- package/dist/src/analysis/tree-sitter/manager.d.ts.map +1 -1
- package/dist/src/analysis/tree-sitter/manager.js +12 -5
- package/dist/src/analysis/tree-sitter/manager.js.map +1 -1
- package/dist/src/analysis/tree-sitter/pythonExtractor.d.ts +45 -0
- package/dist/src/analysis/tree-sitter/pythonExtractor.d.ts.map +1 -0
- package/dist/src/analysis/tree-sitter/pythonExtractor.js +264 -0
- package/dist/src/analysis/tree-sitter/pythonExtractor.js.map +1 -0
- package/dist/src/analysis/tree-sitter/pythonExtractor.test.d.ts +12 -0
- package/dist/src/analysis/tree-sitter/pythonExtractor.test.d.ts.map +1 -0
- package/dist/src/analysis/tree-sitter/pythonExtractor.test.js +74 -0
- package/dist/src/analysis/tree-sitter/pythonExtractor.test.js.map +1 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.d.ts +93 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.d.ts.map +1 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.hardening.test.d.ts +22 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.hardening.test.d.ts.map +1 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.hardening.test.js +229 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.hardening.test.js.map +1 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.js +287 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.js.map +1 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.test.d.ts +17 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.test.d.ts.map +1 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.test.js +142 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.test.js.map +1 -0
- package/dist/src/analysis/tree-sitter/queries/python.d.ts +43 -0
- package/dist/src/analysis/tree-sitter/queries/python.d.ts.map +1 -0
- package/dist/src/analysis/tree-sitter/queries/python.js +88 -0
- package/dist/src/analysis/tree-sitter/queries/python.js.map +1 -0
- package/dist/src/analysis/tree-sitter/queryExtractionMatchesOrExceedsRegex.test.d.ts +13 -0
- package/dist/src/analysis/tree-sitter/queryExtractionMatchesOrExceedsRegex.test.d.ts.map +1 -0
- package/dist/src/analysis/tree-sitter/queryExtractionMatchesOrExceedsRegex.test.js +174 -0
- package/dist/src/analysis/tree-sitter/queryExtractionMatchesOrExceedsRegex.test.js.map +1 -0
- package/dist/src/analytics/ROIDashboardService.csv.d.ts +11 -0
- package/dist/src/analytics/ROIDashboardService.csv.d.ts.map +1 -0
- package/dist/src/analytics/ROIDashboardService.csv.js +43 -0
- package/dist/src/analytics/ROIDashboardService.csv.js.map +1 -0
- package/dist/src/analytics/ROIDashboardService.d.ts +64 -3
- package/dist/src/analytics/ROIDashboardService.d.ts.map +1 -1
- package/dist/src/analytics/ROIDashboardService.js +116 -45
- package/dist/src/analytics/ROIDashboardService.js.map +1 -1
- package/dist/src/api/client.d.ts +4 -66
- package/dist/src/api/client.d.ts.map +1 -1
- package/dist/src/api/client.events.d.ts.map +1 -1
- package/dist/src/api/client.events.js +10 -1
- package/dist/src/api/client.events.js.map +1 -1
- package/dist/src/api/client.js +40 -66
- package/dist/src/api/client.js.map +1 -1
- package/dist/src/api/client.token-refresh.d.ts +3 -0
- package/dist/src/api/client.token-refresh.d.ts.map +1 -0
- package/dist/src/api/client.token-refresh.js +19 -0
- package/dist/src/api/client.token-refresh.js.map +1 -0
- package/dist/src/api/client.token-refresh.test.d.ts +2 -0
- package/dist/src/api/client.token-refresh.test.d.ts.map +1 -0
- package/dist/src/api/client.token-refresh.test.js +73 -0
- package/dist/src/api/client.token-refresh.test.js.map +1 -0
- package/dist/src/api/client.types.d.ts +2 -0
- package/dist/src/api/client.types.d.ts.map +1 -1
- package/dist/src/api/index.d.ts +1 -1
- package/dist/src/api/index.d.ts.map +1 -1
- package/dist/src/api/index.js +1 -1
- package/dist/src/api/index.js.map +1 -1
- package/dist/src/api/schemas.d.ts +60 -60
- package/dist/src/api/schemas.d.ts.map +1 -1
- package/dist/src/benchmarks/incrementalParseBenchmark.d.ts +18 -0
- package/dist/src/benchmarks/incrementalParseBenchmark.d.ts.map +1 -0
- package/dist/src/benchmarks/incrementalParseBenchmark.js +121 -0
- package/dist/src/benchmarks/incrementalParseBenchmark.js.map +1 -0
- package/dist/src/billing/GDPRComplianceService.test.d.ts +2 -0
- package/dist/src/billing/GDPRComplianceService.test.d.ts.map +1 -0
- package/dist/src/billing/GDPRComplianceService.test.js +405 -0
- package/dist/src/billing/GDPRComplianceService.test.js.map +1 -0
- package/dist/src/config/index.d.ts +4 -0
- package/dist/src/config/index.d.ts.map +1 -1
- package/dist/src/config/index.js +6 -0
- package/dist/src/config/index.js.map +1 -1
- package/dist/src/config/token-credentials.d.ts +13 -0
- package/dist/src/config/token-credentials.d.ts.map +1 -0
- package/dist/src/config/token-credentials.js +126 -0
- package/dist/src/config/token-credentials.js.map +1 -0
- package/dist/src/config/token-credentials.test.d.ts +10 -0
- package/dist/src/config/token-credentials.test.d.ts.map +1 -0
- package/dist/src/config/token-credentials.test.js +91 -0
- package/dist/src/config/token-credentials.test.js.map +1 -0
- package/dist/src/index.d.ts +7 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/indexer/SkillParser.coverage.test.d.ts +10 -0
- package/dist/src/indexer/SkillParser.coverage.test.d.ts.map +1 -0
- package/dist/src/indexer/SkillParser.coverage.test.js +76 -0
- package/dist/src/indexer/SkillParser.coverage.test.js.map +1 -0
- package/dist/src/indexer/SkillParser.test.d.ts +2 -0
- package/dist/src/indexer/SkillParser.test.d.ts.map +1 -0
- package/dist/src/indexer/SkillParser.test.js +375 -0
- package/dist/src/indexer/SkillParser.test.js.map +1 -0
- package/dist/src/scripts/__tests__/scan-imported-skills.test.js +34 -5
- package/dist/src/scripts/__tests__/scan-imported-skills.test.js.map +1 -1
- package/dist/src/scripts/github-import/blocklist.d.ts +65 -0
- package/dist/src/scripts/github-import/blocklist.d.ts.map +1 -0
- package/dist/src/scripts/github-import/blocklist.js +124 -0
- package/dist/src/scripts/github-import/blocklist.js.map +1 -0
- package/dist/src/scripts/github-import/index.d.ts +1 -0
- package/dist/src/scripts/github-import/index.d.ts.map +1 -1
- package/dist/src/scripts/github-import/index.js +3 -0
- package/dist/src/scripts/github-import/index.js.map +1 -1
- package/dist/src/scripts/github-import/signal-of-intent.d.ts +87 -0
- package/dist/src/scripts/github-import/signal-of-intent.d.ts.map +1 -0
- package/dist/src/scripts/github-import/signal-of-intent.js +213 -0
- package/dist/src/scripts/github-import/signal-of-intent.js.map +1 -0
- package/dist/src/scripts/github-import/types.d.ts +22 -0
- package/dist/src/scripts/github-import/types.d.ts.map +1 -1
- package/dist/src/scripts/github-import/types.js.map +1 -1
- package/dist/src/scripts/import-github-skills.js +73 -3
- package/dist/src/scripts/import-github-skills.js.map +1 -1
- package/dist/src/scripts/skill-scanner/allowlist.d.ts +38 -0
- package/dist/src/scripts/skill-scanner/allowlist.d.ts.map +1 -0
- package/dist/src/scripts/skill-scanner/allowlist.js +178 -0
- package/dist/src/scripts/skill-scanner/allowlist.js.map +1 -0
- package/dist/src/scripts/skill-scanner/scanner.d.ts +10 -2
- package/dist/src/scripts/skill-scanner/scanner.d.ts.map +1 -1
- package/dist/src/scripts/skill-scanner/scanner.js +15 -3
- package/dist/src/scripts/skill-scanner/scanner.js.map +1 -1
- package/dist/src/scripts/skill-scanner/trust-scorer.d.ts +20 -6
- package/dist/src/scripts/skill-scanner/trust-scorer.d.ts.map +1 -1
- package/dist/src/scripts/skill-scanner/trust-scorer.js +28 -9
- package/dist/src/scripts/skill-scanner/trust-scorer.js.map +1 -1
- package/dist/src/scripts/skill-scanner/types.d.ts +50 -0
- package/dist/src/scripts/skill-scanner/types.d.ts.map +1 -1
- package/dist/src/scripts/validation/types.d.ts +14 -24
- package/dist/src/scripts/validation/types.d.ts.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.helpers.d.ts +18 -0
- package/dist/src/security/scanner/SecurityScanner.helpers.d.ts.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.helpers.js +54 -6
- package/dist/src/security/scanner/SecurityScanner.helpers.js.map +1 -1
- package/dist/src/security/scanner/patterns.d.ts.map +1 -1
- package/dist/src/security/scanner/patterns.js +45 -5
- package/dist/src/security/scanner/patterns.js.map +1 -1
- package/dist/src/services/skill-config-schema.d.ts +4 -36
- package/dist/src/services/skill-config-schema.d.ts.map +1 -1
- package/dist/src/sources/LocalFilesystemAdapter.d.ts +104 -10
- package/dist/src/sources/LocalFilesystemAdapter.d.ts.map +1 -1
- package/dist/src/sources/LocalFilesystemAdapter.helpers.d.ts +92 -0
- package/dist/src/sources/LocalFilesystemAdapter.helpers.d.ts.map +1 -0
- package/dist/src/sources/LocalFilesystemAdapter.helpers.js +157 -0
- package/dist/src/sources/LocalFilesystemAdapter.helpers.js.map +1 -0
- package/dist/src/sources/LocalFilesystemAdapter.js +218 -159
- package/dist/src/sources/LocalFilesystemAdapter.js.map +1 -1
- package/dist/src/sources/LocalFilesystemAdapter.scan.d.ts +78 -0
- package/dist/src/sources/LocalFilesystemAdapter.scan.d.ts.map +1 -0
- package/dist/src/sources/LocalFilesystemAdapter.scan.js +118 -0
- package/dist/src/sources/LocalFilesystemAdapter.scan.js.map +1 -0
- package/dist/src/sources/index.d.ts +1 -1
- package/dist/src/sources/index.d.ts.map +1 -1
- package/dist/src/sources/index.js.map +1 -1
- package/dist/src/sources/types.d.ts +28 -0
- package/dist/src/sources/types.d.ts.map +1 -1
- package/dist/src/telemetry/tracer-imports.d.ts +13 -0
- package/dist/src/telemetry/tracer-imports.d.ts.map +1 -0
- package/dist/src/telemetry/tracer-imports.js +26 -0
- package/dist/src/telemetry/tracer-imports.js.map +1 -0
- package/dist/src/telemetry/tracer.d.ts.map +1 -1
- package/dist/src/telemetry/tracer.js +18 -21
- package/dist/src/telemetry/tracer.js.map +1 -1
- package/dist/src/utils/rate-limit.d.ts +39 -0
- package/dist/src/utils/rate-limit.d.ts.map +1 -0
- package/dist/src/utils/rate-limit.js +48 -0
- package/dist/src/utils/rate-limit.js.map +1 -0
- package/dist/src/utils/rate-limit.test.d.ts +11 -0
- package/dist/src/utils/rate-limit.test.d.ts.map +1 -0
- package/dist/src/utils/rate-limit.test.js +86 -0
- package/dist/src/utils/rate-limit.test.js.map +1 -0
- package/dist/src/webhooks/WebhookDeadLetterRepository.d.ts +178 -0
- package/dist/src/webhooks/WebhookDeadLetterRepository.d.ts.map +1 -0
- package/dist/src/webhooks/WebhookDeadLetterRepository.js +196 -0
- package/dist/src/webhooks/WebhookDeadLetterRepository.js.map +1 -0
- package/dist/src/webhooks/WebhookQueue.d.ts +1 -0
- package/dist/src/webhooks/WebhookQueue.d.ts.map +1 -1
- package/dist/src/webhooks/WebhookQueue.js +19 -0
- package/dist/src/webhooks/WebhookQueue.js.map +1 -1
- package/dist/src/webhooks/WebhookQueue.types.d.ts +11 -0
- package/dist/src/webhooks/WebhookQueue.types.d.ts.map +1 -1
- package/dist/src/webhooks/index.d.ts +1 -0
- package/dist/src/webhooks/index.d.ts.map +1 -1
- package/dist/src/webhooks/index.js +2 -0
- package/dist/src/webhooks/index.js.map +1 -1
- package/dist/src/webhooks/webhook-schemas.d.ts +117 -1212
- package/dist/src/webhooks/webhook-schemas.d.ts.map +1 -1
- package/dist/tests/ActivationManager.test.d.ts +13 -0
- package/dist/tests/ActivationManager.test.d.ts.map +1 -0
- package/dist/tests/ActivationManager.test.js +218 -0
- package/dist/tests/ActivationManager.test.js.map +1 -0
- package/dist/tests/LocalFilesystemAdapter.coverage.test.d.ts +13 -0
- package/dist/tests/LocalFilesystemAdapter.coverage.test.d.ts.map +1 -0
- package/dist/tests/LocalFilesystemAdapter.coverage.test.js +314 -0
- package/dist/tests/LocalFilesystemAdapter.coverage.test.js.map +1 -0
- package/dist/tests/LocalFilesystemAdapter.security.test.d.ts +18 -0
- package/dist/tests/LocalFilesystemAdapter.security.test.d.ts.map +1 -0
- package/dist/tests/LocalFilesystemAdapter.security.test.js +344 -0
- package/dist/tests/LocalFilesystemAdapter.security.test.js.map +1 -0
- package/dist/tests/LocalFilesystemAdapter.test.d.ts +12 -0
- package/dist/tests/LocalFilesystemAdapter.test.d.ts.map +1 -0
- package/dist/tests/LocalFilesystemAdapter.test.js +301 -0
- package/dist/tests/LocalFilesystemAdapter.test.js.map +1 -0
- package/dist/tests/ROIDashboardService.coverage.test.d.ts +9 -0
- package/dist/tests/ROIDashboardService.coverage.test.d.ts.map +1 -0
- package/dist/tests/ROIDashboardService.coverage.test.js +118 -0
- package/dist/tests/ROIDashboardService.coverage.test.js.map +1 -0
- package/dist/tests/ROIDashboardService.test.js +87 -0
- package/dist/tests/ROIDashboardService.test.js.map +1 -1
- package/dist/tests/ScraperAdapters.gitlab-coverage.test.d.ts +14 -0
- package/dist/tests/ScraperAdapters.gitlab-coverage.test.d.ts.map +1 -0
- package/dist/tests/ScraperAdapters.gitlab-coverage.test.js +169 -0
- package/dist/tests/ScraperAdapters.gitlab-coverage.test.js.map +1 -0
- package/dist/tests/ScraperAdapters.test.d.ts +5 -1
- package/dist/tests/ScraperAdapters.test.d.ts.map +1 -1
- package/dist/tests/ScraperAdapters.test.js +6 -336
- package/dist/tests/ScraperAdapters.test.js.map +1 -1
- package/dist/tests/WebhookDeadLetterRepository.test.d.ts +2 -0
- package/dist/tests/WebhookDeadLetterRepository.test.d.ts.map +1 -0
- package/dist/tests/WebhookDeadLetterRepository.test.js +333 -0
- package/dist/tests/WebhookDeadLetterRepository.test.js.map +1 -0
- package/dist/tests/WebhookHandler.test.js +93 -1
- package/dist/tests/WebhookHandler.test.js.map +1 -1
- package/dist/tests/WebhookQueue.coverage.test.d.ts +19 -0
- package/dist/tests/WebhookQueue.coverage.test.d.ts.map +1 -0
- package/dist/tests/WebhookQueue.coverage.test.js +190 -0
- package/dist/tests/WebhookQueue.coverage.test.js.map +1 -0
- package/dist/tests/api/client.events.test.d.ts +10 -0
- package/dist/tests/api/client.events.test.d.ts.map +1 -0
- package/dist/tests/api/client.events.test.js +85 -0
- package/dist/tests/api/client.events.test.js.map +1 -0
- package/dist/tests/billing/GDPRCompliance.test.d.ts +2 -2
- package/dist/tests/billing/GDPRCompliance.test.js +221 -36
- package/dist/tests/billing/GDPRCompliance.test.js.map +1 -1
- package/dist/tests/github-import/blocklist.test.d.ts +15 -0
- package/dist/tests/github-import/blocklist.test.d.ts.map +1 -0
- package/dist/tests/github-import/blocklist.test.js +182 -0
- package/dist/tests/github-import/blocklist.test.js.map +1 -0
- package/dist/tests/github-import/signal-of-intent.test.d.ts +15 -0
- package/dist/tests/github-import/signal-of-intent.test.d.ts.map +1 -0
- package/dist/tests/github-import/signal-of-intent.test.js +171 -0
- package/dist/tests/github-import/signal-of-intent.test.js.map +1 -0
- package/dist/tests/security/scanner-regression-guard.test.d.ts +12 -0
- package/dist/tests/security/scanner-regression-guard.test.d.ts.map +1 -1
- package/dist/tests/security/scanner-regression-guard.test.js +15 -3
- package/dist/tests/security/scanner-regression-guard.test.js.map +1 -1
- package/dist/tests/security/scanner-wave2-fixtures.test.d.ts +12 -0
- package/dist/tests/security/scanner-wave2-fixtures.test.d.ts.map +1 -0
- package/dist/tests/security/scanner-wave2-fixtures.test.js +173 -0
- package/dist/tests/security/scanner-wave2-fixtures.test.js.map +1 -0
- package/dist/tests/security.test.js +1 -0
- package/dist/tests/security.test.js.map +1 -1
- package/dist/tests/skill-scanner/allowlist.test.d.ts +16 -0
- package/dist/tests/skill-scanner/allowlist.test.d.ts.map +1 -0
- package/dist/tests/skill-scanner/allowlist.test.js +332 -0
- package/dist/tests/skill-scanner/allowlist.test.js.map +1 -0
- package/dist/tests/telemetry.test.js +126 -0
- package/dist/tests/telemetry.test.js.map +1 -1
- package/dist/tests/webhooks/WebhookDeadLetterRepository.test.d.ts +10 -0
- package/dist/tests/webhooks/WebhookDeadLetterRepository.test.d.ts.map +1 -0
- package/dist/tests/webhooks/WebhookDeadLetterRepository.test.js +109 -0
- package/dist/tests/webhooks/WebhookDeadLetterRepository.test.js.map +1 -0
- package/package.json +8 -3
|
@@ -38,16 +38,16 @@ export declare const ApiSearchResultSchema: z.ZodObject<{
|
|
|
38
38
|
id: string;
|
|
39
39
|
name: string;
|
|
40
40
|
description: string | null;
|
|
41
|
+
trust_tier: "unknown" | "verified" | "curated" | "community" | "experimental";
|
|
41
42
|
author: string | null;
|
|
42
|
-
tags: string[];
|
|
43
43
|
quality_score: number | null;
|
|
44
|
-
|
|
45
|
-
created_at?: string | undefined;
|
|
44
|
+
tags: string[];
|
|
46
45
|
content?: string | null | undefined;
|
|
47
|
-
stars?: number | null | undefined;
|
|
48
46
|
publisher?: string | null | undefined;
|
|
49
47
|
repo_url?: string | null | undefined;
|
|
48
|
+
stars?: number | null | undefined;
|
|
50
49
|
installable?: boolean | null | undefined;
|
|
50
|
+
created_at?: string | undefined;
|
|
51
51
|
updated_at?: string | undefined;
|
|
52
52
|
categories?: string[] | undefined;
|
|
53
53
|
security_score?: number | null | undefined;
|
|
@@ -60,14 +60,14 @@ export declare const ApiSearchResultSchema: z.ZodObject<{
|
|
|
60
60
|
description: string | null;
|
|
61
61
|
author: string | null;
|
|
62
62
|
quality_score: number | null;
|
|
63
|
-
created_at?: string | undefined;
|
|
64
63
|
content?: string | null | undefined;
|
|
65
|
-
|
|
66
|
-
stars?: number | null | undefined;
|
|
64
|
+
trust_tier?: "unknown" | "verified" | "curated" | "community" | "experimental" | undefined;
|
|
67
65
|
publisher?: string | null | undefined;
|
|
68
66
|
repo_url?: string | null | undefined;
|
|
69
|
-
|
|
67
|
+
tags?: string[] | undefined;
|
|
68
|
+
stars?: number | null | undefined;
|
|
70
69
|
installable?: boolean | null | undefined;
|
|
70
|
+
created_at?: string | undefined;
|
|
71
71
|
updated_at?: string | undefined;
|
|
72
72
|
categories?: string[] | undefined;
|
|
73
73
|
security_score?: number | null | undefined;
|
|
@@ -121,15 +121,15 @@ export declare const TelemetryEventSchema: z.ZodObject<{
|
|
|
121
121
|
anonymous_id: z.ZodString;
|
|
122
122
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
123
123
|
}, "strip", z.ZodTypeAny, {
|
|
124
|
-
event: "
|
|
124
|
+
event: "search" | "recommend" | "skill_view" | "skill_install" | "skill_uninstall" | "skill_rate" | "compare" | "validate";
|
|
125
125
|
anonymous_id: string;
|
|
126
|
-
metadata?: Record<string, unknown> | undefined;
|
|
127
126
|
skill_id?: string | undefined;
|
|
127
|
+
metadata?: Record<string, unknown> | undefined;
|
|
128
128
|
}, {
|
|
129
|
-
event: "
|
|
129
|
+
event: "search" | "recommend" | "skill_view" | "skill_install" | "skill_uninstall" | "skill_rate" | "compare" | "validate";
|
|
130
130
|
anonymous_id: string;
|
|
131
|
-
metadata?: Record<string, unknown> | undefined;
|
|
132
131
|
skill_id?: string | undefined;
|
|
132
|
+
metadata?: Record<string, unknown> | undefined;
|
|
133
133
|
}>;
|
|
134
134
|
/**
|
|
135
135
|
* Request schema for batched telemetry: `{ events: [...] }` (1..=20).
|
|
@@ -141,29 +141,29 @@ export declare const TelemetryEventBatchSchema: z.ZodObject<{
|
|
|
141
141
|
anonymous_id: z.ZodString;
|
|
142
142
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
143
143
|
}, "strip", z.ZodTypeAny, {
|
|
144
|
-
event: "
|
|
144
|
+
event: "search" | "recommend" | "skill_view" | "skill_install" | "skill_uninstall" | "skill_rate" | "compare" | "validate";
|
|
145
145
|
anonymous_id: string;
|
|
146
|
-
metadata?: Record<string, unknown> | undefined;
|
|
147
146
|
skill_id?: string | undefined;
|
|
147
|
+
metadata?: Record<string, unknown> | undefined;
|
|
148
148
|
}, {
|
|
149
|
-
event: "
|
|
149
|
+
event: "search" | "recommend" | "skill_view" | "skill_install" | "skill_uninstall" | "skill_rate" | "compare" | "validate";
|
|
150
150
|
anonymous_id: string;
|
|
151
|
-
metadata?: Record<string, unknown> | undefined;
|
|
152
151
|
skill_id?: string | undefined;
|
|
152
|
+
metadata?: Record<string, unknown> | undefined;
|
|
153
153
|
}>, "many">;
|
|
154
154
|
}, "strip", z.ZodTypeAny, {
|
|
155
155
|
events: {
|
|
156
|
-
event: "
|
|
156
|
+
event: "search" | "recommend" | "skill_view" | "skill_install" | "skill_uninstall" | "skill_rate" | "compare" | "validate";
|
|
157
157
|
anonymous_id: string;
|
|
158
|
-
metadata?: Record<string, unknown> | undefined;
|
|
159
158
|
skill_id?: string | undefined;
|
|
159
|
+
metadata?: Record<string, unknown> | undefined;
|
|
160
160
|
}[];
|
|
161
161
|
}, {
|
|
162
162
|
events: {
|
|
163
|
-
event: "
|
|
163
|
+
event: "search" | "recommend" | "skill_view" | "skill_install" | "skill_uninstall" | "skill_rate" | "compare" | "validate";
|
|
164
164
|
anonymous_id: string;
|
|
165
|
-
metadata?: Record<string, unknown> | undefined;
|
|
166
165
|
skill_id?: string | undefined;
|
|
166
|
+
metadata?: Record<string, unknown> | undefined;
|
|
167
167
|
}[];
|
|
168
168
|
}>;
|
|
169
169
|
/**
|
|
@@ -178,27 +178,27 @@ export declare const TelemetryBatchResponseSchema: z.ZodObject<{
|
|
|
178
178
|
index: z.ZodNumber;
|
|
179
179
|
reason: z.ZodString;
|
|
180
180
|
}, "strip", z.ZodTypeAny, {
|
|
181
|
-
reason: string;
|
|
182
181
|
index: number;
|
|
183
|
-
}, {
|
|
184
182
|
reason: string;
|
|
183
|
+
}, {
|
|
185
184
|
index: number;
|
|
185
|
+
reason: string;
|
|
186
186
|
}>, "many">>;
|
|
187
187
|
}, "strip", z.ZodTypeAny, {
|
|
188
|
-
rejected: number;
|
|
189
|
-
accepted: number;
|
|
190
188
|
ok: boolean;
|
|
189
|
+
accepted: number;
|
|
190
|
+
rejected: number;
|
|
191
191
|
errors?: {
|
|
192
|
-
reason: string;
|
|
193
192
|
index: number;
|
|
193
|
+
reason: string;
|
|
194
194
|
}[] | undefined;
|
|
195
195
|
}, {
|
|
196
|
-
rejected: number;
|
|
197
|
-
accepted: number;
|
|
198
196
|
ok: boolean;
|
|
197
|
+
accepted: number;
|
|
198
|
+
rejected: number;
|
|
199
199
|
errors?: {
|
|
200
|
-
reason: string;
|
|
201
200
|
index: number;
|
|
201
|
+
reason: string;
|
|
202
202
|
}[] | undefined;
|
|
203
203
|
}>;
|
|
204
204
|
export type TelemetryEventPayload = z.infer<typeof TelemetryEventSchema>;
|
|
@@ -233,16 +233,16 @@ export declare const SearchResponseSchema: z.ZodObject<{
|
|
|
233
233
|
id: string;
|
|
234
234
|
name: string;
|
|
235
235
|
description: string | null;
|
|
236
|
+
trust_tier: "unknown" | "verified" | "curated" | "community" | "experimental";
|
|
236
237
|
author: string | null;
|
|
237
|
-
tags: string[];
|
|
238
238
|
quality_score: number | null;
|
|
239
|
-
|
|
240
|
-
created_at?: string | undefined;
|
|
239
|
+
tags: string[];
|
|
241
240
|
content?: string | null | undefined;
|
|
242
|
-
stars?: number | null | undefined;
|
|
243
241
|
publisher?: string | null | undefined;
|
|
244
242
|
repo_url?: string | null | undefined;
|
|
243
|
+
stars?: number | null | undefined;
|
|
245
244
|
installable?: boolean | null | undefined;
|
|
245
|
+
created_at?: string | undefined;
|
|
246
246
|
updated_at?: string | undefined;
|
|
247
247
|
categories?: string[] | undefined;
|
|
248
248
|
security_score?: number | null | undefined;
|
|
@@ -255,14 +255,14 @@ export declare const SearchResponseSchema: z.ZodObject<{
|
|
|
255
255
|
description: string | null;
|
|
256
256
|
author: string | null;
|
|
257
257
|
quality_score: number | null;
|
|
258
|
-
created_at?: string | undefined;
|
|
259
258
|
content?: string | null | undefined;
|
|
260
|
-
|
|
261
|
-
stars?: number | null | undefined;
|
|
259
|
+
trust_tier?: "unknown" | "verified" | "curated" | "community" | "experimental" | undefined;
|
|
262
260
|
publisher?: string | null | undefined;
|
|
263
261
|
repo_url?: string | null | undefined;
|
|
264
|
-
|
|
262
|
+
tags?: string[] | undefined;
|
|
263
|
+
stars?: number | null | undefined;
|
|
265
264
|
installable?: boolean | null | undefined;
|
|
265
|
+
created_at?: string | undefined;
|
|
266
266
|
updated_at?: string | undefined;
|
|
267
267
|
categories?: string[] | undefined;
|
|
268
268
|
security_score?: number | null | undefined;
|
|
@@ -276,16 +276,16 @@ export declare const SearchResponseSchema: z.ZodObject<{
|
|
|
276
276
|
id: string;
|
|
277
277
|
name: string;
|
|
278
278
|
description: string | null;
|
|
279
|
+
trust_tier: "unknown" | "verified" | "curated" | "community" | "experimental";
|
|
279
280
|
author: string | null;
|
|
280
|
-
tags: string[];
|
|
281
281
|
quality_score: number | null;
|
|
282
|
-
|
|
283
|
-
created_at?: string | undefined;
|
|
282
|
+
tags: string[];
|
|
284
283
|
content?: string | null | undefined;
|
|
285
|
-
stars?: number | null | undefined;
|
|
286
284
|
publisher?: string | null | undefined;
|
|
287
285
|
repo_url?: string | null | undefined;
|
|
286
|
+
stars?: number | null | undefined;
|
|
288
287
|
installable?: boolean | null | undefined;
|
|
288
|
+
created_at?: string | undefined;
|
|
289
289
|
updated_at?: string | undefined;
|
|
290
290
|
categories?: string[] | undefined;
|
|
291
291
|
security_score?: number | null | undefined;
|
|
@@ -301,14 +301,14 @@ export declare const SearchResponseSchema: z.ZodObject<{
|
|
|
301
301
|
description: string | null;
|
|
302
302
|
author: string | null;
|
|
303
303
|
quality_score: number | null;
|
|
304
|
-
created_at?: string | undefined;
|
|
305
304
|
content?: string | null | undefined;
|
|
306
|
-
|
|
307
|
-
stars?: number | null | undefined;
|
|
305
|
+
trust_tier?: "unknown" | "verified" | "curated" | "community" | "experimental" | undefined;
|
|
308
306
|
publisher?: string | null | undefined;
|
|
309
307
|
repo_url?: string | null | undefined;
|
|
310
|
-
|
|
308
|
+
tags?: string[] | undefined;
|
|
309
|
+
stars?: number | null | undefined;
|
|
311
310
|
installable?: boolean | null | undefined;
|
|
311
|
+
created_at?: string | undefined;
|
|
312
312
|
updated_at?: string | undefined;
|
|
313
313
|
categories?: string[] | undefined;
|
|
314
314
|
security_score?: number | null | undefined;
|
|
@@ -347,16 +347,16 @@ export declare const SingleSkillResponseSchema: z.ZodObject<{
|
|
|
347
347
|
id: string;
|
|
348
348
|
name: string;
|
|
349
349
|
description: string | null;
|
|
350
|
+
trust_tier: "unknown" | "verified" | "curated" | "community" | "experimental";
|
|
350
351
|
author: string | null;
|
|
351
|
-
tags: string[];
|
|
352
352
|
quality_score: number | null;
|
|
353
|
-
|
|
354
|
-
created_at?: string | undefined;
|
|
353
|
+
tags: string[];
|
|
355
354
|
content?: string | null | undefined;
|
|
356
|
-
stars?: number | null | undefined;
|
|
357
355
|
publisher?: string | null | undefined;
|
|
358
356
|
repo_url?: string | null | undefined;
|
|
357
|
+
stars?: number | null | undefined;
|
|
359
358
|
installable?: boolean | null | undefined;
|
|
359
|
+
created_at?: string | undefined;
|
|
360
360
|
updated_at?: string | undefined;
|
|
361
361
|
categories?: string[] | undefined;
|
|
362
362
|
security_score?: number | null | undefined;
|
|
@@ -369,14 +369,14 @@ export declare const SingleSkillResponseSchema: z.ZodObject<{
|
|
|
369
369
|
description: string | null;
|
|
370
370
|
author: string | null;
|
|
371
371
|
quality_score: number | null;
|
|
372
|
-
created_at?: string | undefined;
|
|
373
372
|
content?: string | null | undefined;
|
|
374
|
-
|
|
375
|
-
stars?: number | null | undefined;
|
|
373
|
+
trust_tier?: "unknown" | "verified" | "curated" | "community" | "experimental" | undefined;
|
|
376
374
|
publisher?: string | null | undefined;
|
|
377
375
|
repo_url?: string | null | undefined;
|
|
378
|
-
|
|
376
|
+
tags?: string[] | undefined;
|
|
377
|
+
stars?: number | null | undefined;
|
|
379
378
|
installable?: boolean | null | undefined;
|
|
379
|
+
created_at?: string | undefined;
|
|
380
380
|
updated_at?: string | undefined;
|
|
381
381
|
categories?: string[] | undefined;
|
|
382
382
|
security_score?: number | null | undefined;
|
|
@@ -390,16 +390,16 @@ export declare const SingleSkillResponseSchema: z.ZodObject<{
|
|
|
390
390
|
id: string;
|
|
391
391
|
name: string;
|
|
392
392
|
description: string | null;
|
|
393
|
+
trust_tier: "unknown" | "verified" | "curated" | "community" | "experimental";
|
|
393
394
|
author: string | null;
|
|
394
|
-
tags: string[];
|
|
395
395
|
quality_score: number | null;
|
|
396
|
-
|
|
397
|
-
created_at?: string | undefined;
|
|
396
|
+
tags: string[];
|
|
398
397
|
content?: string | null | undefined;
|
|
399
|
-
stars?: number | null | undefined;
|
|
400
398
|
publisher?: string | null | undefined;
|
|
401
399
|
repo_url?: string | null | undefined;
|
|
400
|
+
stars?: number | null | undefined;
|
|
402
401
|
installable?: boolean | null | undefined;
|
|
402
|
+
created_at?: string | undefined;
|
|
403
403
|
updated_at?: string | undefined;
|
|
404
404
|
categories?: string[] | undefined;
|
|
405
405
|
security_score?: number | null | undefined;
|
|
@@ -415,14 +415,14 @@ export declare const SingleSkillResponseSchema: z.ZodObject<{
|
|
|
415
415
|
description: string | null;
|
|
416
416
|
author: string | null;
|
|
417
417
|
quality_score: number | null;
|
|
418
|
-
created_at?: string | undefined;
|
|
419
418
|
content?: string | null | undefined;
|
|
420
|
-
|
|
421
|
-
stars?: number | null | undefined;
|
|
419
|
+
trust_tier?: "unknown" | "verified" | "curated" | "community" | "experimental" | undefined;
|
|
422
420
|
publisher?: string | null | undefined;
|
|
423
421
|
repo_url?: string | null | undefined;
|
|
424
|
-
|
|
422
|
+
tags?: string[] | undefined;
|
|
423
|
+
stars?: number | null | undefined;
|
|
425
424
|
installable?: boolean | null | undefined;
|
|
425
|
+
created_at?: string | undefined;
|
|
426
426
|
updated_at?: string | undefined;
|
|
427
427
|
categories?: string[] | undefined;
|
|
428
428
|
security_score?: number | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/api/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB;;GAEG;AACH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/api/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;EAM1B,CAAA;AAMF;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwBhC,CAAA;AAMF;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC;;;kBAK5E;AAMD;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAA;AAMF;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;iBAc/B,CAAA;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;iBAEpC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;iBAYvC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACxE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAC3E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAMjF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA0D,CAAA;AAE3F;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAiD,CAAA;AAMvF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE5E;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAE1E;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEpF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env npx tsx
|
|
2
|
+
/**
|
|
3
|
+
* SMI-4293: Incremental parsing benchmark.
|
|
4
|
+
*
|
|
5
|
+
* Runs the Python adapter's full parse vs incremental parse over a
|
|
6
|
+
* synthetic module of ~500 function/class/import constructs. Targets:
|
|
7
|
+
* • Single-file re-parse < 100ms (SMI-1309 success criterion)
|
|
8
|
+
* • Unchanged re-parse ≥ 5× faster than a cold full parse
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* npx tsx src/benchmarks/incrementalParseBenchmark.ts
|
|
12
|
+
* # or via npm script:
|
|
13
|
+
* npm run benchmark:incremental-parse -w @skillsmith/core
|
|
14
|
+
*
|
|
15
|
+
* @see docs/internal/implementation/github-wave-5c-tree-sitter-incremental.md
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=incrementalParseBenchmark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"incrementalParseBenchmark.d.ts","sourceRoot":"","sources":["../../../src/benchmarks/incrementalParseBenchmark.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
#!/usr/bin/env npx tsx
|
|
2
|
+
/**
|
|
3
|
+
* SMI-4293: Incremental parsing benchmark.
|
|
4
|
+
*
|
|
5
|
+
* Runs the Python adapter's full parse vs incremental parse over a
|
|
6
|
+
* synthetic module of ~500 function/class/import constructs. Targets:
|
|
7
|
+
* • Single-file re-parse < 100ms (SMI-1309 success criterion)
|
|
8
|
+
* • Unchanged re-parse ≥ 5× faster than a cold full parse
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* npx tsx src/benchmarks/incrementalParseBenchmark.ts
|
|
12
|
+
* # or via npm script:
|
|
13
|
+
* npm run benchmark:incremental-parse -w @skillsmith/core
|
|
14
|
+
*
|
|
15
|
+
* @see docs/internal/implementation/github-wave-5c-tree-sitter-incremental.md
|
|
16
|
+
*/
|
|
17
|
+
import { performance } from 'perf_hooks';
|
|
18
|
+
import { PythonIncrementalParser } from '../analysis/tree-sitter/pythonIncremental.js';
|
|
19
|
+
function makePythonSource(functionCount, classCount) {
|
|
20
|
+
const lines = [];
|
|
21
|
+
lines.push('import os');
|
|
22
|
+
lines.push('import sys');
|
|
23
|
+
lines.push('from typing import Optional, List, Dict, Any');
|
|
24
|
+
lines.push('from dataclasses import dataclass');
|
|
25
|
+
lines.push('');
|
|
26
|
+
for (let i = 0; i < classCount; i++) {
|
|
27
|
+
lines.push(`class Model${i}:`);
|
|
28
|
+
lines.push(` """Auto-generated model ${i}."""`);
|
|
29
|
+
lines.push(` def __init__(self, a: int, b: str):`);
|
|
30
|
+
lines.push(` self.a = a`);
|
|
31
|
+
lines.push(` self.b = b`);
|
|
32
|
+
lines.push('');
|
|
33
|
+
lines.push(` def describe${i}(self) -> str:`);
|
|
34
|
+
lines.push(` return f"{self.a}:{self.b}"`);
|
|
35
|
+
lines.push('');
|
|
36
|
+
}
|
|
37
|
+
for (let i = 0; i < functionCount; i++) {
|
|
38
|
+
lines.push(`def fn_${i}(x: int, y: int) -> int:`);
|
|
39
|
+
lines.push(` return x + y + ${i}`);
|
|
40
|
+
lines.push('');
|
|
41
|
+
}
|
|
42
|
+
return lines.join('\n');
|
|
43
|
+
}
|
|
44
|
+
function applySingleCharEdit(src) {
|
|
45
|
+
// Replace the first occurrence of "+ 0" with "+ 1" (roughly middle of
|
|
46
|
+
// the module); a minimal edit that doesn't shift line counts.
|
|
47
|
+
const target = '+ 0';
|
|
48
|
+
const idx = src.indexOf(target);
|
|
49
|
+
if (idx === -1)
|
|
50
|
+
return src + '\n# tail\n';
|
|
51
|
+
return src.slice(0, idx + 2) + '1' + src.slice(idx + 3);
|
|
52
|
+
}
|
|
53
|
+
async function time(label, fn, iterations = 1) {
|
|
54
|
+
// Warm-up
|
|
55
|
+
await fn();
|
|
56
|
+
const start = performance.now();
|
|
57
|
+
for (let i = 0; i < iterations; i++) {
|
|
58
|
+
await fn();
|
|
59
|
+
}
|
|
60
|
+
const total = performance.now() - start;
|
|
61
|
+
const avg = total / iterations;
|
|
62
|
+
console.log(` ${label}: ${avg.toFixed(2)}ms (avg over ${iterations} iterations)`);
|
|
63
|
+
return avg;
|
|
64
|
+
}
|
|
65
|
+
async function main() {
|
|
66
|
+
const source = makePythonSource(500, 50);
|
|
67
|
+
const edited = applySingleCharEdit(source);
|
|
68
|
+
console.log(`Python source: ${source.length} bytes, ${source.split('\n').length} lines`);
|
|
69
|
+
const parser = new PythonIncrementalParser();
|
|
70
|
+
await parser.ensureReady();
|
|
71
|
+
if (!parser.isReady) {
|
|
72
|
+
console.error('[benchmark] WASM parser unavailable; aborting.');
|
|
73
|
+
process.exit(2);
|
|
74
|
+
}
|
|
75
|
+
console.log('\n=== Full (cold) parse ===');
|
|
76
|
+
// Cold: dispose+reinit before each iteration so we measure a fresh parse.
|
|
77
|
+
const coldParser = new PythonIncrementalParser();
|
|
78
|
+
await coldParser.ensureReady();
|
|
79
|
+
const coldAvg = await time('cold full parse', () => {
|
|
80
|
+
coldParser.invalidate('bench.py');
|
|
81
|
+
coldParser.parseSync(source, 'bench.py');
|
|
82
|
+
}, 5);
|
|
83
|
+
console.log('\n=== Warm full parse (no cache hit: fresh file path) ===');
|
|
84
|
+
let counter = 0;
|
|
85
|
+
const warmFullAvg = await time('warm full parse', () => {
|
|
86
|
+
parser.parseSync(source, `fresh-${counter++}.py`);
|
|
87
|
+
}, 5);
|
|
88
|
+
console.log('\n=== Unchanged re-parse (cache hit) ===');
|
|
89
|
+
parser.parseSync(source, 'bench-unchanged.py'); // seed
|
|
90
|
+
const unchangedAvg = await time('unchanged re-parse', () => {
|
|
91
|
+
parser.parseSync(source, 'bench-unchanged.py');
|
|
92
|
+
}, 20);
|
|
93
|
+
console.log('\n=== Incremental edit (tree.edit reuse) ===');
|
|
94
|
+
parser.parseSync(source, 'bench-incr.py'); // seed
|
|
95
|
+
const incrAvg = await time('incremental edit', () => {
|
|
96
|
+
parser.parseSync(edited, 'bench-incr.py');
|
|
97
|
+
parser.parseSync(source, 'bench-incr.py'); // flip back for the next iteration
|
|
98
|
+
}, 10);
|
|
99
|
+
console.log('\n=== Summary ===');
|
|
100
|
+
console.log(` Cold full parse: ${coldAvg.toFixed(2)}ms`);
|
|
101
|
+
console.log(` Warm full parse: ${warmFullAvg.toFixed(2)}ms`);
|
|
102
|
+
console.log(` Unchanged re-parse: ${unchangedAvg.toFixed(2)}ms`);
|
|
103
|
+
console.log(` Incremental edit: ${incrAvg.toFixed(2)}ms`);
|
|
104
|
+
const speedup = coldAvg > 0 ? coldAvg / unchangedAvg : 0;
|
|
105
|
+
console.log(` Unchanged speedup: ${speedup.toFixed(1)}×`);
|
|
106
|
+
console.log('\n=== Targets ===');
|
|
107
|
+
const singleFileTarget = incrAvg < 100;
|
|
108
|
+
const speedupTarget = speedup >= 5;
|
|
109
|
+
console.log(` Single-file re-parse < 100ms: ${singleFileTarget ? 'PASS' : 'FAIL'} (${incrAvg.toFixed(2)}ms)`);
|
|
110
|
+
console.log(` Unchanged ≥ 5× full parse: ${speedupTarget ? 'PASS' : 'FAIL'} (${speedup.toFixed(1)}×)`);
|
|
111
|
+
parser.dispose();
|
|
112
|
+
coldParser.dispose();
|
|
113
|
+
// Exit non-zero if any target fails so CI / humans notice.
|
|
114
|
+
if (!singleFileTarget || !speedupTarget)
|
|
115
|
+
process.exit(1);
|
|
116
|
+
}
|
|
117
|
+
main().catch((err) => {
|
|
118
|
+
console.error('[benchmark] error:', err);
|
|
119
|
+
process.exit(1);
|
|
120
|
+
});
|
|
121
|
+
//# sourceMappingURL=incrementalParseBenchmark.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"incrementalParseBenchmark.js","sourceRoot":"","sources":["../../../src/benchmarks/incrementalParseBenchmark.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAA;AAEtF,SAAS,gBAAgB,CAAC,aAAqB,EAAE,UAAkB;IACjE,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IACvB,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IACxB,KAAK,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAA;IAC1D,KAAK,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAA;IAC/C,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE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