@ucptools/validator 1.0.0
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/CLAUDE.md +109 -0
- package/CONTRIBUTING.md +113 -0
- package/LICENSE +21 -0
- package/README.md +203 -0
- package/api/analyze-feed.js +140 -0
- package/api/badge.js +185 -0
- package/api/benchmark.js +177 -0
- package/api/directory-stats.ts +29 -0
- package/api/directory.ts +73 -0
- package/api/generate-compliance.js +143 -0
- package/api/generate-schema.js +457 -0
- package/api/generate.js +132 -0
- package/api/security-scan.js +133 -0
- package/api/simulate.js +187 -0
- package/api/tsconfig.json +10 -0
- package/api/validate.js +1351 -0
- package/apify-actor/.actor/actor.json +68 -0
- package/apify-actor/.actor/input_schema.json +32 -0
- package/apify-actor/APIFY-STORE-LISTING.md +412 -0
- package/apify-actor/Dockerfile +8 -0
- package/apify-actor/README.md +166 -0
- package/apify-actor/main.ts +111 -0
- package/apify-actor/package.json +17 -0
- package/apify-actor/src/main.js +199 -0
- package/docs/BRAND-IDENTITY.md +238 -0
- package/docs/BRAND-STYLE-GUIDE.md +356 -0
- package/drizzle/0000_black_king_cobra.sql +39 -0
- package/drizzle/meta/0000_snapshot.json +309 -0
- package/drizzle/meta/_journal.json +13 -0
- package/drizzle.config.ts +10 -0
- package/examples/full-profile.json +70 -0
- package/examples/minimal-profile.json +23 -0
- package/package.json +69 -0
- package/public/.well-known/ucp +25 -0
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/brand.css +321 -0
- package/public/directory.html +701 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/guides/bigcommerce.html +743 -0
- package/public/guides/fastucp.html +838 -0
- package/public/guides/magento.html +779 -0
- package/public/guides/shopify.html +726 -0
- package/public/guides/squarespace.html +749 -0
- package/public/guides/wix.html +747 -0
- package/public/guides/woocommerce.html +733 -0
- package/public/index.html +3835 -0
- package/public/learn.html +396 -0
- package/public/logo.jpeg +0 -0
- package/public/og-image-icon.png +0 -0
- package/public/og-image.png +0 -0
- package/public/robots.txt +6 -0
- package/public/site.webmanifest +31 -0
- package/public/sitemap.xml +69 -0
- package/public/social/linkedin-banner-1128x191.png +0 -0
- package/public/social/temp.PNG +0 -0
- package/public/social/x-header-1500x500.png +0 -0
- package/public/verify.html +410 -0
- package/scripts/generate-favicons.js +44 -0
- package/scripts/generate-ico.js +23 -0
- package/scripts/generate-og-image.js +45 -0
- package/scripts/reset-db.ts +77 -0
- package/scripts/seed-db.ts +71 -0
- package/scripts/setup-benchmark-db.js +70 -0
- package/src/api/server.ts +266 -0
- package/src/cli/index.ts +302 -0
- package/src/compliance/compliance-generator.ts +452 -0
- package/src/compliance/index.ts +28 -0
- package/src/compliance/templates.ts +338 -0
- package/src/compliance/types.ts +170 -0
- package/src/db/index.ts +28 -0
- package/src/db/schema.ts +84 -0
- package/src/feed-analyzer/feed-analyzer.ts +726 -0
- package/src/feed-analyzer/index.ts +34 -0
- package/src/feed-analyzer/types.ts +354 -0
- package/src/generator/index.ts +7 -0
- package/src/generator/key-generator.ts +124 -0
- package/src/generator/profile-builder.ts +402 -0
- package/src/hosting/artifacts-generator.ts +679 -0
- package/src/hosting/index.ts +6 -0
- package/src/index.ts +105 -0
- package/src/security/index.ts +15 -0
- package/src/security/security-scanner.ts +604 -0
- package/src/security/types.ts +55 -0
- package/src/services/directory.ts +434 -0
- package/src/simulator/agent-simulator.ts +941 -0
- package/src/simulator/index.ts +7 -0
- package/src/simulator/types.ts +170 -0
- package/src/types/generator.ts +140 -0
- package/src/types/index.ts +7 -0
- package/src/types/ucp-profile.ts +140 -0
- package/src/types/validation.ts +89 -0
- package/src/validator/index.ts +194 -0
- package/src/validator/network-validator.ts +417 -0
- package/src/validator/rules-validator.ts +297 -0
- package/src/validator/sdk-validator.ts +330 -0
- package/src/validator/structural-validator.ts +476 -0
- package/tests/fixtures/non-compliant-profile.json +25 -0
- package/tests/fixtures/official-sample-profile.json +75 -0
- package/tests/integration/benchmark.test.ts +207 -0
- package/tests/integration/database.test.ts +163 -0
- package/tests/integration/directory-api.test.ts +268 -0
- package/tests/integration/simulate-api.test.ts +230 -0
- package/tests/integration/validate-api.test.ts +269 -0
- package/tests/setup.ts +15 -0
- package/tests/unit/agent-simulator.test.ts +575 -0
- package/tests/unit/compliance-generator.test.ts +374 -0
- package/tests/unit/directory-service.test.ts +272 -0
- package/tests/unit/feed-analyzer.test.ts +517 -0
- package/tests/unit/lint-suggestions.test.ts +423 -0
- package/tests/unit/official-samples.test.ts +211 -0
- package/tests/unit/pdf-report.test.ts +390 -0
- package/tests/unit/sdk-validator.test.ts +531 -0
- package/tests/unit/security-scanner.test.ts +410 -0
- package/tests/unit/validation.test.ts +390 -0
- package/tsconfig.json +20 -0
- package/vercel.json +34 -0
- package/vitest.config.ts +22 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UCP Profile Manager
|
|
3
|
+
* Generate, validate, and host UCP Business Profiles
|
|
4
|
+
*
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// Types
|
|
9
|
+
export * from './types/index.js';
|
|
10
|
+
|
|
11
|
+
// Generator
|
|
12
|
+
export {
|
|
13
|
+
buildProfile,
|
|
14
|
+
generateMinimalProfile,
|
|
15
|
+
generateSigningKeyPair,
|
|
16
|
+
validatePublicKey,
|
|
17
|
+
} from './generator/index.js';
|
|
18
|
+
|
|
19
|
+
// Validator
|
|
20
|
+
export {
|
|
21
|
+
validateProfile,
|
|
22
|
+
validateRemote,
|
|
23
|
+
validateQuick,
|
|
24
|
+
validateJsonString,
|
|
25
|
+
validateStructure,
|
|
26
|
+
validateRules,
|
|
27
|
+
validateNetwork,
|
|
28
|
+
clearSchemaCache,
|
|
29
|
+
} from './validator/index.js';
|
|
30
|
+
|
|
31
|
+
// Simulator
|
|
32
|
+
export {
|
|
33
|
+
simulateAgentInteraction,
|
|
34
|
+
simulateDiscoveryFlow,
|
|
35
|
+
inspectCapabilities,
|
|
36
|
+
inspectServices,
|
|
37
|
+
simulateRestApi,
|
|
38
|
+
simulateCheckoutFlow,
|
|
39
|
+
simulatePaymentReadiness,
|
|
40
|
+
} from './simulator/index.js';
|
|
41
|
+
|
|
42
|
+
// Hosting
|
|
43
|
+
export { generateHostingArtifacts } from './hosting/index.js';
|
|
44
|
+
|
|
45
|
+
// Security Scanner
|
|
46
|
+
export {
|
|
47
|
+
scanEndpointSecurity,
|
|
48
|
+
SecurityCheckIds,
|
|
49
|
+
} from './security/index.js';
|
|
50
|
+
export type {
|
|
51
|
+
SecurityCheck,
|
|
52
|
+
SecurityScanResult,
|
|
53
|
+
SecurityScanOptions,
|
|
54
|
+
SecuritySeverity,
|
|
55
|
+
SecurityCheckStatus,
|
|
56
|
+
SecurityCheckId,
|
|
57
|
+
} from './security/index.js';
|
|
58
|
+
|
|
59
|
+
// Compliance Generator
|
|
60
|
+
export {
|
|
61
|
+
generateComplianceDocuments,
|
|
62
|
+
getAvailableRegions,
|
|
63
|
+
getLawfulBasisOptions,
|
|
64
|
+
getAiPlatformOptions,
|
|
65
|
+
AI_PLATFORM_PROCESSORS,
|
|
66
|
+
REGION_NAMES,
|
|
67
|
+
LAWFUL_BASIS_DESCRIPTIONS,
|
|
68
|
+
} from './compliance/index.js';
|
|
69
|
+
export type {
|
|
70
|
+
ComplianceRegion,
|
|
71
|
+
LawfulBasis,
|
|
72
|
+
AgentPlatform,
|
|
73
|
+
ComplianceGeneratorInput,
|
|
74
|
+
ComplianceGeneratorOutput,
|
|
75
|
+
ComplianceDocument,
|
|
76
|
+
ComplianceSection,
|
|
77
|
+
DataProcessor,
|
|
78
|
+
} from './compliance/index.js';
|
|
79
|
+
|
|
80
|
+
// Feed Analyzer
|
|
81
|
+
export {
|
|
82
|
+
analyzeProductFeed,
|
|
83
|
+
analyzeProductFeedFromHtml,
|
|
84
|
+
analyzeProduct,
|
|
85
|
+
extractProductsFromHtml,
|
|
86
|
+
validateGtin,
|
|
87
|
+
QUALITY_CHECKS,
|
|
88
|
+
VALID_AVAILABILITY_VALUES,
|
|
89
|
+
CATEGORY_WEIGHTS,
|
|
90
|
+
GRADE_THRESHOLDS,
|
|
91
|
+
} from './feed-analyzer/index.js';
|
|
92
|
+
export type {
|
|
93
|
+
ProductData,
|
|
94
|
+
ProductOffer,
|
|
95
|
+
ProductAnalysis,
|
|
96
|
+
QualityCheck,
|
|
97
|
+
FeedAnalysisResult,
|
|
98
|
+
FeedAnalysisInput,
|
|
99
|
+
CategoryScores,
|
|
100
|
+
Recommendation,
|
|
101
|
+
FeedSummary,
|
|
102
|
+
GtinValidation,
|
|
103
|
+
IssueSeverity,
|
|
104
|
+
CheckCategory,
|
|
105
|
+
} from './feed-analyzer/index.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security Scanner Module
|
|
3
|
+
* Exports security scanning functionality for UCP endpoints
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export { scanEndpointSecurity } from './security-scanner.js';
|
|
7
|
+
export type {
|
|
8
|
+
SecurityCheck,
|
|
9
|
+
SecurityScanResult,
|
|
10
|
+
SecurityScanOptions,
|
|
11
|
+
SecuritySeverity,
|
|
12
|
+
SecurityCheckStatus,
|
|
13
|
+
SecurityCheckId,
|
|
14
|
+
} from './types.js';
|
|
15
|
+
export { SecurityCheckIds } from './types.js';
|