Skip to content

Commit a122dc7

Browse files
fix failing tests from state management changes
1 parent 968e190 commit a122dc7

File tree

92 files changed

+1451
-1454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1451
-1454
lines changed

cline_docs/marketplace/implementation/01-architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ classDiagram
249249
- Coordinates repository operations
250250
- Provides filtering and sorting
251251

252-
4. **packageManagerMessageHandler**
252+
4. **marketplaceMessageHandler**
253253
- Routes messages between UI and backend
254254
- Processes commands from the UI
255255
- Returns data and status updates

cline_docs/marketplace/implementation/02-core-components.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class PackageManagerManager {
159159
}
160160

161161
/**
162-
* Get package manager items from sources
162+
* Get marketplace items from sources
163163
*/
164164
public async getPackageManagerItems(
165165
sources: PackageManagerSource[],
@@ -251,14 +251,14 @@ The PackageManagerSourceValidation component handles validation of marketplace s
251251
```typescript
252252
export class PackageManagerSourceValidation {
253253
/**
254-
* Validates a package manager source URL
254+
* Validates a marketplace source URL
255255
*/
256256
public static validateSourceUrl(url: string): ValidationError[] {
257257
// Implementation details
258258
}
259259

260260
/**
261-
* Validates a package manager source name
261+
* Validates a marketplace source name
262262
*/
263263
public static validateSourceName(name?: string): ValidationError[] {
264264
// Implementation details

cline_docs/marketplace/implementation/03-data-structures.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ This interface represents a complete repository:
5151

5252
```typescript
5353
/**
54-
* Represents an individual package manager item
54+
* Represents an individual marketplace item
5555
*/
5656
export interface PackageManagerItem {
5757
name: string
@@ -113,7 +113,7 @@ Enhanced match tracking:
113113

114114
```typescript
115115
/**
116-
* Error type for package manager source validation
116+
* Error type for marketplace source validation
117117
*/
118118
export interface ValidationError {
119119
field: string
@@ -154,7 +154,7 @@ Manages UI state:
154154
- **isFetching**: Loading state indicator
155155
- **activeTab**: Current view tab
156156
- **refreshingUrls**: Sources being refreshed
157-
- **sources**: Package manager sources
157+
- **sources**: Marketplace sources
158158
- **filters**: Active filters
159159
- **sortConfig**: Sort configuration
160160

cline_docs/marketplace/implementation/05-ui-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const PackageManagerView: React.FC<PackageManagerViewProps> = ({ onDone }) => {
2323
<Tab>
2424
<TabHeader>
2525
<div className="flex justify-between items-center">
26-
<h3>Package Manager</h3>
26+
<h3>Marketplace</h3>
2727
<div className="flex gap-2">
2828
<Button
2929
variant={state.activeTab === "browse" ? "default" : "secondary"}

cline_docs/marketplace/implementation/06-testing-strategy.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -420,15 +420,15 @@ Integration tests verify that different components work together correctly.
420420
### Backend Integration Tests
421421

422422
```typescript
423-
describe("Package Manager Integration", () => {
423+
describe("Marketplace Integration", () => {
424424
let manager: PackageManagerManager
425425
let metadataScanner: MetadataScanner
426426
let templateItems: PackageManagerItem[]
427427

428428
beforeAll(async () => {
429429
// Load real data from template
430430
metadataScanner = new MetadataScanner()
431-
const templatePath = path.resolve(__dirname, "../../../../package-manager-template")
431+
const templatePath = path.resolve(__dirname, "../../../../marketplace-template")
432432
templateItems = await metadataScanner.scanDirectory(templatePath, "https://example.com")
433433
})
434434

@@ -507,7 +507,7 @@ describe("Package Manager Integration", () => {
507507
### Frontend Integration Tests
508508

509509
```typescript
510-
describe("Package Manager UI Integration", () => {
510+
describe("Marketplace UI Integration", () => {
511511
const mockItems: PackageManagerItem[] = [
512512
{
513513
name: "Test Package",
@@ -665,7 +665,7 @@ Real template data is used for integration tests:
665665
beforeAll(async () => {
666666
// Load real data from template
667667
metadataScanner = new MetadataScanner()
668-
const templatePath = path.resolve(__dirname, "../../../../package-manager-template")
668+
const templatePath = path.resolve(__dirname, "../../../../marketplace-template")
669669
templateItems = await metadataScanner.scanDirectory(templatePath, "https://example.com")
670670
})
671671
```
@@ -911,7 +911,7 @@ The Marketplace tests are organized by functionality rather than by file structu
911911
### Consolidated Test Files
912912

913913
```
914-
src/services/package-manager/__tests__/
914+
src/services/marketplace/__tests__/
915915
├── PackageManager.consolidated.test.ts # Combined tests
916916
├── searchUtils.test.ts # Search utility tests
917917
└── PackageSubcomponents.test.ts # Subcomponent tests
@@ -922,7 +922,7 @@ src/services/package-manager/__tests__/
922922
Tests are organized into logical groups:
923923

924924
```typescript
925-
describe("Package Manager", () => {
925+
describe("Marketplace", () => {
926926
// Shared setup
927927

928928
describe("Direct Filtering", () => {
@@ -964,7 +964,7 @@ module.exports = {
964964
lines: 85,
965965
statements: 85,
966966
},
967-
"src/services/package-manager/*.ts": {
967+
"src/services/marketplace/*.ts": {
968968
branches: 90,
969969
functions: 90,
970970
lines: 90,
@@ -1003,7 +1003,7 @@ describe("containsSearchTerm", () => {
10031003

10041004
```typescript
10051005
// Optimized integration tests
1006-
describe("Package Manager Integration", () => {
1006+
describe("Marketplace Integration", () => {
10071007
// Load template data once for all tests
10081008
beforeAll(async () => {
10091009
templateItems = await metadataScanner.scanDirectory(templatePath)
@@ -1098,7 +1098,7 @@ describe("Complex integration test", () => {
10981098
it("should handle complex search", async () => {
10991099
// Enable debug logging for this test
11001100
const originalDebug = process.env.DEBUG
1101-
process.env.DEBUG = "package-manager:*"
1101+
process.env.DEBUG = "marketplace:*"
11021102

11031103
// Test logic...
11041104

@@ -1167,4 +1167,4 @@ describe("Package filtering", () => {
11671167

11681168
---
11691169

1170-
**Previous**: [UI Component Design](./05-ui-components.md) | **Next**: [Extending the Package Manager](./07-extending.md)
1170+
**Previous**: [UI Component Design](./05-ui-components.md) | **Next**: [Extending the Marketplace](./07-extending.md)

cline_docs/marketplace/implementation/07-extending.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Register your template with the Marketplace:
184184
// In your extension code
185185
const registerTemplates = (context: vscode.ExtensionContext) => {
186186
const templatePath = path.join(context.extensionPath, "templates", "your-template")
187-
packageManager.registerTemplate(templatePath)
187+
marketplace.registerTemplate(templatePath)
188188
}
189189
```
190190

@@ -336,7 +336,7 @@ const ViewModeSelector: React.FC<{
336336
4. **Integrate with the Main UI**:
337337

338338
```tsx
339-
<div className="package-manager-container">
339+
<div className="marketplace-container">
340340
<div className="toolbar">
341341
<ViewModeSelector viewMode={viewMode} setViewMode={setViewMode} />
342342
{/* Other toolbar items */}
@@ -476,7 +476,7 @@ const PackageManagerView: React.FC<{
476476
const PackageCard = componentOverrides.PackageCard || PackageManagerItemCard
477477

478478
return (
479-
<div className="package-manager">
479+
<div className="marketplace">
480480
{items.map((item) => (
481481
<PackageCard
482482
key={item.name}
@@ -584,8 +584,8 @@ class CustomSourceProvider implements SourceProvider {
584584

585585
```typescript
586586
// In your extension code
587-
const registerSourceProviders = (packageManager: PackageManagerManager) => {
588-
packageManager.registerSourceProvider(new CustomSourceProvider())
587+
const registerSourceProviders = (marketplace: PackageManagerManager) => {
588+
marketplace.registerSourceProvider(new CustomSourceProvider())
589589
}
590590
```
591591

@@ -637,7 +637,7 @@ To add support for custom messages:
637637
const extendMessageHandler = () => {
638638
const originalHandler = handlePackageManagerMessages
639639

640-
return async (message: any, packageManager: PackageManagerManager) => {
640+
return async (message: any, marketplace: PackageManagerManager) => {
641641
// Handle custom messages
642642
if (message.type === "yourCustomMessage") {
643643
// Your custom message handling
@@ -650,7 +650,7 @@ const extendMessageHandler = () => {
650650
}
651651

652652
// Fall back to the original handler
653-
return originalHandler(message, packageManager)
653+
return originalHandler(message, marketplace)
654654
}
655655
}
656656
```
@@ -661,8 +661,8 @@ const extendMessageHandler = () => {
661661
// In your extension code
662662
const customMessageHandler = extendMessageHandler()
663663
context.subscriptions.push(
664-
vscode.commands.registerCommand("packageManager.handleMessage", (message) => {
665-
return customMessageHandler(message, packageManager)
664+
vscode.commands.registerCommand("marketplace.handleMessage", (message) => {
665+
return customMessageHandler(message, marketplace)
666666
}),
667667
)
668668
```
@@ -728,8 +728,8 @@ class ApiSourceProvider implements SourceProvider {
728728

729729
```typescript
730730
// In your extension code
731-
const registerApiProvider = (packageManager: PackageManagerManager) => {
732-
packageManager.registerSourceProvider(new ApiSourceProvider("https://your-api.example.com"))
731+
const registerApiProvider = (marketplace: PackageManagerManager) => {
732+
marketplace.registerSourceProvider(new ApiSourceProvider("https://your-api.example.com"))
733733
}
734734
```
735735

@@ -829,7 +829,7 @@ class LocalDevProvider {
829829
}
830830
```
831831

832-
2. **Integrate with the Package Manager**:
832+
2. **Integrate with the Marketplace**:
833833

834834
```typescript
835835
// In your extension code
@@ -845,15 +845,15 @@ const registerLocalDevTools = (context: vscode.ExtensionContext) => {
845845

846846
// Register commands
847847
context.subscriptions.push(
848-
vscode.commands.registerCommand("packageManager.createLocal", async (template, name) => {
848+
vscode.commands.registerCommand("marketplace.createLocal", async (template, name) => {
849849
return localDevProvider.createLocalPackage(template, name)
850850
}),
851851

852-
vscode.commands.registerCommand("packageManager.buildLocal", async (packagePath) => {
852+
vscode.commands.registerCommand("marketplace.buildLocal", async (packagePath) => {
853853
return localDevProvider.buildLocalPackage(packagePath)
854854
}),
855855

856-
vscode.commands.registerCommand("packageManager.testLocal", async (packagePath) => {
856+
vscode.commands.registerCommand("marketplace.testLocal", async (packagePath) => {
857857
return localDevProvider.testLocalPackage(packagePath)
858858
}),
859859
)

knip.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"src/schemas/ipc.ts",
2727
"src/extension.ts",
2828
"scripts/**",
29-
"package-manager-template/**",
29+
"marketplace-template/**",
3030
"src/utils/git.ts"
3131
],
3232
"workspaces": {

package-manager-template/README.md renamed to marketplace-template/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Package Manager Template
1+
# Marketplace Template
22

3-
This template provides a basic structure for creating a package manager source repository. The structure follows the required format for Roo Code's package manager.
3+
This template provides a basic structure for creating a marketplace source repository. The structure follows the required format for Roo Code's marketplace.
44

55
## Structure
66

@@ -33,7 +33,7 @@ version: "1.0.0"
3333
3434
## Usage
3535
36-
1. Copy this template to create your own package manager repository
36+
1. Copy this template to create your own marketplace repository
3737
2. Update the metadata.en.yml with your repository information
3838
3. Add your MCP servers, roles, or other components
3939
4. Each component must have its own metadata.en.yml file with the required fields

0 commit comments

Comments
 (0)