diff --git a/core/README.md b/core/README.md index 76f4d4c86..1a66748f6 100644 --- a/core/README.md +++ b/core/README.md @@ -14,7 +14,7 @@ ## Artifacts The StartOS backend is packed into a single binary `startbox` that is symlinked under -several different names for different behaviour: +several different names for different behavior: - `startd`: This is the main daemon of StartOS - `start-cli`: This is a CLI tool that will allow you to issue commands to diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 497f28c49..000000000 --- a/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "embassy-os", - "lockfileVersion": 2, - "requires": true, - "packages": {} -} diff --git a/web/package-lock.json b/web/package-lock.json index f86534510..3a9c7eeb5 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1982,7 +1982,7 @@ }, "../sdk/dist": { "name": "@start9labs/start-sdk", - "version": "0.3.6-alpha6", + "version": "0.3.6-alpha8", "license": "MIT", "dependencies": { "@iarna/toml": "^2.2.5", @@ -1995,10 +1995,8 @@ "yaml": "^2.2.2" }, "devDependencies": { - "@iarna/toml": "^2.2.5", "@types/jest": "^29.4.0", "@types/lodash.merge": "^4.6.2", - "copyfiles": "^2.4.1", "jest": "^29.4.3", "peggy": "^3.0.2", "prettier": "^3.2.5", @@ -2006,8 +2004,7 @@ "ts-node": "^10.9.1", "ts-pegjs": "^4.2.1", "tsx": "^4.7.1", - "typescript": "^5.0.4", - "yaml": "^2.2.2" + "typescript": "^5.0.4" } }, "node_modules/@ampproject/remapping": { @@ -4922,6 +4919,7 @@ }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", + "dev": true, "license": "MIT", "optional": true, "engines": { @@ -7546,6 +7544,7 @@ }, "node_modules/encoding": { "version": "0.1.13", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -7554,6 +7553,7 @@ }, "node_modules/encoding/node_modules/iconv-lite": { "version": "0.6.3", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -8152,6 +8152,7 @@ }, "node_modules/fsevents": { "version": "2.3.3", + "dev": true, "license": "MIT", "optional": true, "os": [ diff --git a/web/projects/marketplace/package.json b/web/projects/marketplace/package.json index 969f5c56a..ef061a11e 100644 --- a/web/projects/marketplace/package.json +++ b/web/projects/marketplace/package.json @@ -1,13 +1,13 @@ { "name": "@start9labs/marketplace", - "version": "0.3.28", + "version": "0.3.32", "peerDependencies": { "@angular/common": ">=13.2.0", "@angular/core": ">=13.2.0", "@start9labs/shared": ">=0.3.2", - "@taiga-ui/cdk": "4.0.0-rc.6", - "@taiga-ui/core": "4.0.0-rc.6", - "@taiga-ui/layout": "4.0.0-rc.6", + "@taiga-ui/cdk": ">=4.0.0", + "@taiga-ui/core": ">=4.0.0", + "@taiga-ui/layout": ">=4.0.0", "@tinkoff/ng-dompurify": ">=4.0.0", "fuse.js": "^6.4.6" }, diff --git a/web/projects/marketplace/src/components/menu/menu.component.html b/web/projects/marketplace/src/components/menu/menu.component.html index 7c24e946d..45498ba50 100644 --- a/web/projects/marketplace/src/components/menu/menu.component.html +++ b/web/projects/marketplace/src/components/menu/menu.component.html @@ -9,7 +9,7 @@ [marketplace]="iconConfig" />

- {{ store?.info?.name || 'Loading store' }} + {{ store?.info?.name || 'Loading store...' }}

diff --git a/web/projects/ui/src/app/routes/portal/routes/system/marketplace/components/registry.component.ts b/web/projects/marketplace/src/components/registry.component.ts similarity index 73% rename from web/projects/ui/src/app/routes/portal/routes/system/marketplace/components/registry.component.ts rename to web/projects/marketplace/src/components/registry.component.ts index 6dd4bee97..acdfe300b 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/marketplace/components/registry.component.ts +++ b/web/projects/marketplace/src/components/registry.component.ts @@ -1,12 +1,7 @@ -import { - ChangeDetectionStrategy, - Component, - inject, - Input, -} from '@angular/core' -import { StoreIconComponentModule } from '@start9labs/marketplace' +import { ChangeDetectionStrategy, Component, Input } from '@angular/core' import { TuiIcon, TuiTitle } from '@taiga-ui/core' -import { ConfigService } from 'src/app/services/config.service' +import { StoreIconComponentModule } from './store-icon/store-icon.component.module' +import { MarketplaceConfig } from '@start9labs/shared' @Component({ standalone: true, @@ -28,7 +23,8 @@ import { ConfigService } from 'src/app/services/config.service' imports: [StoreIconComponentModule, TuiIcon, TuiTitle], }) export class MarketplaceRegistryComponent { - readonly marketplace = inject(ConfigService).marketplace + @Input() + marketplace!: MarketplaceConfig @Input() registry!: { url: string; selected: boolean; name?: string } diff --git a/web/projects/marketplace/src/modals/release-notes.component.ts b/web/projects/marketplace/src/modals/release-notes.component.ts index d9110d2cd..467b37660 100644 --- a/web/projects/marketplace/src/modals/release-notes.component.ts +++ b/web/projects/marketplace/src/modals/release-notes.component.ts @@ -1,6 +1,6 @@ import { CommonModule } from '@angular/common' import { ChangeDetectionStrategy, Component, inject } from '@angular/core' -import { MarketplacePkg } from '@start9labs/marketplace' +import { MarketplacePkg } from '../../src/types' import { Exver, MarkdownPipeModule } from '@start9labs/shared' import { TuiButton, TuiDialogContext, TuiLoader } from '@taiga-ui/core' import { TuiAccordion } from '@taiga-ui/kit' diff --git a/web/projects/marketplace/src/pages/list/item/item.component.html b/web/projects/marketplace/src/pages/list/item/item.component.html index cd3215b6f..a46b00f9c 100644 --- a/web/projects/marketplace/src/pages/list/item/item.component.html +++ b/web/projects/marketplace/src/pages/list/item/item.component.html @@ -1,22 +1,12 @@ -
+
- {{ pkg.title }} Icon + {{ pkg.title }} Icon
- {{ pkg.title }} Icon + {{ pkg.title }} Icon
{{ pkg.title }} diff --git a/web/projects/marketplace/src/pages/list/item/item.component.ts b/web/projects/marketplace/src/pages/list/item/item.component.ts index a3e439dcd..bc0baf188 100644 --- a/web/projects/marketplace/src/pages/list/item/item.component.ts +++ b/web/projects/marketplace/src/pages/list/item/item.component.ts @@ -1,11 +1,5 @@ -import { - ChangeDetectionStrategy, - Component, - Input, - inject, -} from '@angular/core' -import { MarketplacePkg, StoreIdentity } from '../../../types' -import { AbstractMarketplaceService } from '../../../services/marketplace.service' +import { ChangeDetectionStrategy, Component, Input } from '@angular/core' +import { MarketplacePkg } from '../../../types' @Component({ selector: 'marketplace-item', @@ -17,15 +11,9 @@ export class ItemComponent { @Input({ required: true }) pkg!: MarketplacePkg - private readonly marketplaceService = inject(AbstractMarketplaceService) - readonly marketplace$ = this.marketplaceService.getSelectedHost$() - - determineIcon(marketplace: StoreIdentity | null): string { - try { - const iconUrl = new URL(this.pkg.icon) - return iconUrl.href - } catch (e) { - return `${marketplace?.url}package/v0/icon/${this.pkg.id}` - } + determineIcon(): string { + return this.pkg.icon + ? this.pkg.icon + : 'assets/img/service-icons/fallback.png' } } diff --git a/web/projects/marketplace/src/pages/show/about/about.component.html b/web/projects/marketplace/src/pages/show/about/about.component.html index 549c744ad..618ba9a75 100644 --- a/web/projects/marketplace/src/pages/show/about/about.component.html +++ b/web/projects/marketplace/src/pages/show/about/about.component.html @@ -2,7 +2,13 @@

New in {{ pkg.version }}

-

About

@@ -11,6 +17,8 @@ *ngIf="pkg.marketingSite as url" tuiButton iconEnd="@tui.external-link" + size="s" + appearance="glass" target="_blank" rel="noreferrer" [href]="url" diff --git a/web/projects/marketplace/src/pages/show/dependencies/dependency-item.component.ts b/web/projects/marketplace/src/pages/show/dependencies/dependency-item.component.ts index bf6eb6f7b..171ff1051 100644 --- a/web/projects/marketplace/src/pages/show/dependencies/dependency-item.component.ts +++ b/web/projects/marketplace/src/pages/show/dependencies/dependency-item.component.ts @@ -1,27 +1,17 @@ import { CommonModule, KeyValue } from '@angular/common' -import { - ChangeDetectionStrategy, - Component, - inject, - Input, -} from '@angular/core' +import { ChangeDetectionStrategy, Component, Input } from '@angular/core' import { RouterModule } from '@angular/router' import { ExverPipesModule } from '@start9labs/shared' import { T } from '@start9labs/start-sdk' import { TuiLet } from '@taiga-ui/cdk' import { TuiAvatar, TuiLineClamp } from '@taiga-ui/kit' -import { AbstractMarketplaceService } from '../../../services/marketplace.service' -import { MarketplacePkg, StoreIdentity } from '../../../types' +import { MarketplacePkg } from '../../../types' @Component({ selector: 'marketplace-dep-item', template: ` -
- +
+
@@ -117,24 +107,9 @@ export class MarketplaceDepItemComponent { @Input({ required: true }) dep!: KeyValue - private readonly marketplaceService = inject(AbstractMarketplaceService) - readonly marketplace$ = this.marketplaceService.getSelectedHost$() - - getImage(key: string, marketplace: StoreIdentity | null) { + getImage(key: string) { const icon = this.pkg.dependencyMetadata[key]?.icon - const camelToSnakeCase = (str: string) => - str.replace(/[A-Z]/g, letter => `-${letter.toLowerCase()}`) - - if (icon) { - try { - const iconUrl = new URL(icon) - return iconUrl.href - } catch (e) { - return `${marketplace?.url}package/v0/icon/${camelToSnakeCase(key)}` - } - } else { - return key.substring(0, 2) - } + return icon ? icon : 'assets/img/service-icons/fallback.png' } getTitle(key: string): string { diff --git a/web/projects/marketplace/src/pages/show/hero/hero.component.ts b/web/projects/marketplace/src/pages/show/hero/hero.component.ts index e79dd6a8f..915d5aaad 100644 --- a/web/projects/marketplace/src/pages/show/hero/hero.component.ts +++ b/web/projects/marketplace/src/pages/show/hero/hero.component.ts @@ -1,31 +1,18 @@ import { CommonModule } from '@angular/common' -import { - ChangeDetectionStrategy, - Component, - inject, - Input, -} from '@angular/core' +import { ChangeDetectionStrategy, Component, Input } from '@angular/core' import { SharedPipesModule, TickerModule } from '@start9labs/shared' import { TuiLet } from '@taiga-ui/cdk' -import { AbstractMarketplaceService } from '../../../services/marketplace.service' -import { MarketplacePkg, StoreIdentity } from '../../../types' @Component({ selector: 'marketplace-package-hero', template: ` -
+
- {{ pkg.title }} Icon + {{ pkg.title }} Icon
- {{ pkg.title }} background image + {{ pkg.title }} background image
@@ -158,7 +145,6 @@ import { MarketplacePkg, StoreIdentity } from '../../../types' imports: [CommonModule, SharedPipesModule, TickerModule, TuiLet], }) export class MarketplacePackageHeroComponent { - // @TODO Matt this used to be MarketplacePkg @Input({ required: true }) pkg!: { id: string @@ -168,15 +154,9 @@ export class MarketplacePackageHeroComponent { icon: string } - private readonly marketplaceService = inject(AbstractMarketplaceService) - readonly marketplace$ = this.marketplaceService.getSelectedHost$() - - determineIcon(marketplace: StoreIdentity | null) { - try { - const iconUrl = new URL(this.pkg.icon) - return iconUrl.href - } catch (e) { - return `${marketplace?.url}package/v0/icon/${this.pkg.id}` - } + determineIcon() { + return this.pkg.icon + ? this.pkg.icon + : 'assets/img/service-icons/fallback.png' } } diff --git a/web/projects/marketplace/src/public-api.ts b/web/projects/marketplace/src/public-api.ts index 17d76eee3..1a2a3e42d 100644 --- a/web/projects/marketplace/src/public-api.ts +++ b/web/projects/marketplace/src/public-api.ts @@ -27,6 +27,7 @@ export * from './components/store-icon/store-icon.component.module' export * from './components/store-icon/store-icon.component' export * from './components/menu/menu.component.module' export * from './components/menu/menu.component' +export * from './components/registry.component' export * from './services/marketplace.service' export * from './services/category.service' diff --git a/web/projects/shared/package.json b/web/projects/shared/package.json index 0a8f52d9a..9bae1334d 100644 --- a/web/projects/shared/package.json +++ b/web/projects/shared/package.json @@ -1,15 +1,15 @@ { "name": "@start9labs/shared", - "version": "0.3.13", + "version": "0.3.15", "peerDependencies": { - "@angular/common": "^17.0.6", - "@angular/core": "^17.0.6", - "@angular/router": "^17.0.6", + "@angular/common": ">=13.2.0", + "@angular/core": ">=13.2.0", + "@angular/router": ">=13.2.0", "@ng-web-apis/mutation-observer": ">=4.0.0", "@ng-web-apis/resize-observer": ">=4.0.0", - "@taiga-ui/cdk": "4.0.0-rc.7", - "@taiga-ui/core": "4.0.0-rc.7", - "@taiga-ui/layout": "4.0.0-rc.7", + "@taiga-ui/cdk": ">=4.0.0", + "@taiga-ui/core": ">=4.0.0", + "@taiga-ui/layout": ">=4.0.0", "@tinkoff/ng-dompurify": ">=4.0.0", "ansi-to-html": "^0.7.2" }, diff --git a/web/projects/ui/src/app/routes/portal/routes/system/marketplace/modals/preview.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/marketplace/modals/preview.component.ts index 53a91ccd7..d36e06e93 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/marketplace/modals/preview.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/marketplace/modals/preview.component.ts @@ -31,11 +31,9 @@ import { BehaviorSubject, combineLatest, filter, - firstValueFrom, map, startWith, switchMap, - tap, } from 'rxjs' @Component({ @@ -204,15 +202,14 @@ export class MarketplacePreviewComponent { readonly flavors$ = this.flavor$.pipe( switchMap(current => - this.marketplaceService - .getSelectedStore$() - .pipe( - map(({ packages }) => - packages.filter( - ({ id, flavor }) => id === this.pkgId && flavor !== current, - ), + this.marketplaceService.getSelectedStore$().pipe( + map(({ packages }) => + packages.filter( + ({ id, flavor }) => id === this.pkgId && flavor !== current, ), ), + filter(p => p.length > 0), + ), ), ) diff --git a/web/projects/ui/src/app/routes/portal/routes/system/marketplace/modals/registry.component.ts b/web/projects/ui/src/app/routes/portal/routes/system/marketplace/modals/registry.component.ts index cd4e7feb3..8326aec8f 100644 --- a/web/projects/ui/src/app/routes/portal/routes/system/marketplace/modals/registry.component.ts +++ b/web/projects/ui/src/app/routes/portal/routes/system/marketplace/modals/registry.component.ts @@ -11,6 +11,7 @@ import { import { AbstractMarketplaceService, StoreIconComponentModule, + MarketplaceRegistryComponent, } from '@start9labs/marketplace' import { TuiDialogService, TuiIcon, TuiTitle, TuiButton } from '@taiga-ui/core' import { PolymorpheusComponent } from '@taiga-ui/polymorpheus' @@ -21,8 +22,8 @@ import { ApiService } from 'src/app/services/api/embassy-api.service' import { DataModel, UIStore } from 'src/app/services/patch-db/data-model' import { MarketplaceService } from 'src/app/services/marketplace.service' import { FormDialogService } from 'src/app/services/form-dialog.service' -import { MarketplaceRegistryComponent } from '../components/registry.component' import { getMarketplaceValueSpec, getPromptOptions } from '../utils/registry' +import { ConfigService } from 'src/app/services/config.service' @Component({ standalone: true, @@ -33,6 +34,7 @@ import { getMarketplaceValueSpec, getPromptOptions } from '../utils/registry' @@ -47,6 +49,7 @@ import { getMarketplaceValueSpec, getPromptOptions } from '../utils/registry'