@serve.zone/catalog 1.1.0 → 2.0.1

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.
@@ -96713,8 +96713,8 @@ __export(elements_exports, {
96713
96713
  SzPlatformServiceDetailView: () => SzPlatformServiceDetailView,
96714
96714
  SzPlatformServicesCard: () => SzPlatformServicesCard,
96715
96715
  SzQuickActionsCard: () => SzQuickActionsCard,
96716
+ SzRegistryAdvertisement: () => SzRegistryAdvertisement,
96716
96717
  SzRegistryExternalView: () => SzRegistryExternalView,
96717
- SzRegistryOneboxView: () => SzRegistryOneboxView,
96718
96718
  SzResourceUsageCard: () => SzResourceUsageCard,
96719
96719
  SzReverseProxyCard: () => SzReverseProxyCard,
96720
96720
  SzServiceCreateView: () => SzServiceCreateView,
@@ -99514,11 +99514,11 @@ __publicField(SzNetworkDomainsView, "styles", [
99514
99514
  ]);
99515
99515
  __runInitializers(_init16, 1, SzNetworkDomainsView);
99516
99516
 
99517
- // ts_web/elements/sz-registry-onebox-view.ts
99517
+ // ts_web/elements/sz-registry-advertisement.ts
99518
99518
  init_dist_ts29();
99519
- var _registryUrl_dec, _status_dec, _a17, _SzRegistryOneboxView_decorators, _init17, _status, _registryUrl;
99520
- _SzRegistryOneboxView_decorators = [t4("sz-registry-onebox-view")];
99521
- var SzRegistryOneboxView = class extends (_a17 = DeesElement, _status_dec = [n5({ type: String })], _registryUrl_dec = [n5({ type: String })], _a17) {
99519
+ var _registryUrl_dec, _status_dec, _a17, _SzRegistryAdvertisement_decorators, _init17, _status, _registryUrl;
99520
+ _SzRegistryAdvertisement_decorators = [t4("sz-registry-advertisement")];
99521
+ var SzRegistryAdvertisement = class extends (_a17 = DeesElement, _status_dec = [n5({ type: String })], _registryUrl_dec = [n5({ type: String })], _a17) {
99522
99522
  constructor() {
99523
99523
  super(...arguments);
99524
99524
  __privateAdd(this, _status, __runInitializers(_init17, 8, this, "stopped")), __runInitializers(_init17, 11, this);
@@ -99535,10 +99535,10 @@ var SzRegistryOneboxView = class extends (_a17 = DeesElement, _status_dec = [n5(
99535
99535
  </div>
99536
99536
  <div class="header-info">
99537
99537
  <div class="header-title">
99538
- Onebox Registry (Built-in)
99538
+ Registry Advertisement
99539
99539
  <span class="default-badge">Default</span>
99540
99540
  </div>
99541
- <div class="header-subtitle">Built-in container registry for your services</div>
99541
+ <div class="header-subtitle">Container registry for your services</div>
99542
99542
  </div>
99543
99543
  </div>
99544
99544
 
@@ -99564,10 +99564,10 @@ var SzRegistryOneboxView = class extends (_a17 = DeesElement, _status_dec = [n5(
99564
99564
 
99565
99565
  <div class="quick-start">
99566
99566
  <div class="quick-start-title">Quick Start</div>
99567
- <div class="quick-start-desc">To push images to the Onebox registry, use a CI or Global token:</div>
99567
+ <div class="quick-start-desc">To push images to the registry, use a CI or Global token:</div>
99568
99568
  <div class="code-block">
99569
99569
  <div class="code-line code-comment"># Login to the registry</div>
99570
- <div class="code-line code-command">docker login ${this.registryUrl.split("/")[0]} -u onebox -p YOUR_TOKEN</div>
99570
+ <div class="code-line code-command">docker login ${this.registryUrl.split("/")[0]} -u registry -p YOUR_TOKEN</div>
99571
99571
  <div class="code-line code-comment"># Tag and push your image</div>
99572
99572
  <div class="code-line code-command">docker tag myapp ${this.registryUrl.split("/")[0]}/myservice:latest</div>
99573
99573
  <div class="code-line code-command">docker push ${this.registryUrl.split("/")[0]}/myservice:latest</div>
@@ -99584,19 +99584,19 @@ var SzRegistryOneboxView = class extends (_a17 = DeesElement, _status_dec = [n5(
99584
99584
  _init17 = __decoratorStart(_a17);
99585
99585
  _status = new WeakMap();
99586
99586
  _registryUrl = new WeakMap();
99587
- __decorateElement(_init17, 4, "status", _status_dec, SzRegistryOneboxView, _status);
99588
- __decorateElement(_init17, 4, "registryUrl", _registryUrl_dec, SzRegistryOneboxView, _registryUrl);
99589
- SzRegistryOneboxView = __decorateElement(_init17, 0, "SzRegistryOneboxView", _SzRegistryOneboxView_decorators, SzRegistryOneboxView);
99590
- __publicField(SzRegistryOneboxView, "demo", () => b2`
99587
+ __decorateElement(_init17, 4, "status", _status_dec, SzRegistryAdvertisement, _status);
99588
+ __decorateElement(_init17, 4, "registryUrl", _registryUrl_dec, SzRegistryAdvertisement, _registryUrl);
99589
+ SzRegistryAdvertisement = __decorateElement(_init17, 0, "SzRegistryAdvertisement", _SzRegistryAdvertisement_decorators, SzRegistryAdvertisement);
99590
+ __publicField(SzRegistryAdvertisement, "demo", () => b2`
99591
99591
  <div style="padding: 24px; max-width: 800px;">
99592
- <sz-registry-onebox-view
99592
+ <sz-registry-advertisement
99593
99593
  status="running"
99594
99594
  registryUrl="localhost:3000/v2"
99595
- ></sz-registry-onebox-view>
99595
+ ></sz-registry-advertisement>
99596
99596
  </div>
99597
99597
  `);
99598
- __publicField(SzRegistryOneboxView, "demoGroups", ["Auth & Settings"]);
99599
- __publicField(SzRegistryOneboxView, "styles", [
99598
+ __publicField(SzRegistryAdvertisement, "demoGroups", ["Auth & Settings"]);
99599
+ __publicField(SzRegistryAdvertisement, "styles", [
99600
99600
  cssManager.defaultStyles,
99601
99601
  i`
99602
99602
  :host {
@@ -99762,7 +99762,7 @@ __publicField(SzRegistryOneboxView, "styles", [
99762
99762
  }
99763
99763
  `
99764
99764
  ]);
99765
- __runInitializers(_init17, 1, SzRegistryOneboxView);
99765
+ __runInitializers(_init17, 1, SzRegistryAdvertisement);
99766
99766
 
99767
99767
  // ts_web/elements/sz-registry-external-view.ts
99768
99768
  init_dist_ts29();
@@ -100597,9 +100597,9 @@ __runInitializers(_init20, 1, SzServicesBackupsView);
100597
100597
 
100598
100598
  // ts_web/elements/sz-service-detail-view.ts
100599
100599
  init_dist_ts29();
100600
- var _streaming_dec2, _logs_dec2, _backups_dec2, _stats_dec3, _service_dec, _a21, _SzServiceDetailView_decorators, _init21, _service, _stats3, _backups2, _logs2, _streaming2;
100600
+ var _currentView_dec, _workspacePath_dec, _workspaceEnvironment_dec, _streaming_dec2, _logs_dec2, _backups_dec2, _stats_dec3, _service_dec, _a21, _SzServiceDetailView_decorators, _init21, _service, _stats3, _backups2, _logs2, _streaming2, _workspaceEnvironment, _workspacePath, _currentView;
100601
100601
  _SzServiceDetailView_decorators = [t4("sz-service-detail-view")];
100602
- var SzServiceDetailView = class extends (_a21 = DeesElement, _service_dec = [n5({ type: Object })], _stats_dec3 = [n5({ type: Object })], _backups_dec2 = [n5({ type: Array })], _logs_dec2 = [n5({ type: Array })], _streaming_dec2 = [n5({ type: Boolean })], _a21) {
100602
+ var SzServiceDetailView = class extends (_a21 = DeesElement, _service_dec = [n5({ type: Object })], _stats_dec3 = [n5({ type: Object })], _backups_dec2 = [n5({ type: Array })], _logs_dec2 = [n5({ type: Array })], _streaming_dec2 = [n5({ type: Boolean })], _workspaceEnvironment_dec = [n5({ type: Object })], _workspacePath_dec = [n5({ type: String })], _currentView_dec = [r5()], _a21) {
100603
100603
  constructor() {
100604
100604
  super(...arguments);
100605
100605
  __privateAdd(this, _service, __runInitializers(_init21, 8, this, {
@@ -100625,8 +100625,36 @@ var SzServiceDetailView = class extends (_a21 = DeesElement, _service_dec = [n5(
100625
100625
  __privateAdd(this, _backups2, __runInitializers(_init21, 16, this, [])), __runInitializers(_init21, 19, this);
100626
100626
  __privateAdd(this, _logs2, __runInitializers(_init21, 20, this, [])), __runInitializers(_init21, 23, this);
100627
100627
  __privateAdd(this, _streaming2, __runInitializers(_init21, 24, this, false)), __runInitializers(_init21, 27, this);
100628
+ __privateAdd(this, _workspaceEnvironment, __runInitializers(_init21, 28, this, null)), __runInitializers(_init21, 31, this);
100629
+ __privateAdd(this, _workspacePath, __runInitializers(_init21, 32, this, "/")), __runInitializers(_init21, 35, this);
100630
+ __privateAdd(this, _currentView, __runInitializers(_init21, 36, this, "details")), __runInitializers(_init21, 39, this);
100628
100631
  }
100629
100632
  render() {
100633
+ if (this.currentView === "workspace") {
100634
+ return this.renderWorkspaceView();
100635
+ }
100636
+ return this.renderDetailsView();
100637
+ }
100638
+ renderWorkspaceView() {
100639
+ return b2`
100640
+ <div class="workspace-wrapper">
100641
+ <div class="workspace-header">
100642
+ <div class="workspace-back-link" @click=${() => this.handleCloseWorkspace()}>
100643
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
100644
+ <polyline points="15 18 9 12 15 6"></polyline>
100645
+ </svg>
100646
+ Back to Details
100647
+ </div>
100648
+ <span class="workspace-service-name">${this.service.name}</span>
100649
+ <span class="workspace-status-badge ${this.service.status}"></span>
100650
+ </div>
100651
+ <div class="workspace-container">
100652
+ <dees-workspace .executionEnvironment=${this.workspaceEnvironment}></dees-workspace>
100653
+ </div>
100654
+ </div>
100655
+ `;
100656
+ }
100657
+ renderDetailsView() {
100630
100658
  return b2`
100631
100659
  <div class="header">
100632
100660
  <div class="back-link" @click=${() => this.handleBack()}>
@@ -100750,6 +100778,13 @@ var SzServiceDetailView = class extends (_a21 = DeesElement, _service_dec = [n5(
100750
100778
  <div class="actions-grid">
100751
100779
  ${this.service.status === "running" ? b2`<button class="action-button" @click=${() => this.handleAction("stop")}>Stop Service</button>` : b2`<button class="action-button" @click=${() => this.handleAction("start")}>Start Service</button>`}
100752
100780
  <button class="action-button" @click=${() => this.handleAction("restart")}>Restart Service</button>
100781
+ <button class="action-button" @click=${() => this.handleOpenWorkspace()}>
100782
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="display: inline; vertical-align: middle; margin-right: 4px;">
100783
+ <polyline points="4 17 10 11 4 5"></polyline>
100784
+ <line x1="12" y1="19" x2="20" y2="19"></line>
100785
+ </svg>
100786
+ Open Workspace
100787
+ </button>
100753
100788
  <button class="action-button danger" @click=${() => this.handleAction("delete")}>Delete Service</button>
100754
100789
  </div>
100755
100790
  </div>
@@ -100860,6 +100895,29 @@ var SzServiceDetailView = class extends (_a21 = DeesElement, _service_dec = [n5(
100860
100895
  handleDeleteBackup(backup) {
100861
100896
  this.dispatchEvent(new CustomEvent("delete-backup", { detail: backup, bubbles: true, composed: true }));
100862
100897
  }
100898
+ handleOpenWorkspace() {
100899
+ if (this.workspaceEnvironment) {
100900
+ this.currentView = "workspace";
100901
+ this.classList.add("workspace-mode");
100902
+ } else {
100903
+ this.dispatchEvent(new CustomEvent("request-workspace", {
100904
+ detail: { service: this.service },
100905
+ bubbles: true,
100906
+ composed: true
100907
+ }));
100908
+ }
100909
+ }
100910
+ handleCloseWorkspace() {
100911
+ this.currentView = "details";
100912
+ this.classList.remove("workspace-mode");
100913
+ }
100914
+ updated(changedProperties) {
100915
+ super.updated(changedProperties);
100916
+ if (changedProperties.has("workspaceEnvironment") && this.workspaceEnvironment && this.currentView === "details") {
100917
+ this.currentView = "workspace";
100918
+ this.classList.add("workspace-mode");
100919
+ }
100920
+ }
100863
100921
  };
100864
100922
  _init21 = __decoratorStart(_a21);
100865
100923
  _service = new WeakMap();
@@ -100867,11 +100925,17 @@ _stats3 = new WeakMap();
100867
100925
  _backups2 = new WeakMap();
100868
100926
  _logs2 = new WeakMap();
100869
100927
  _streaming2 = new WeakMap();
100928
+ _workspaceEnvironment = new WeakMap();
100929
+ _workspacePath = new WeakMap();
100930
+ _currentView = new WeakMap();
100870
100931
  __decorateElement(_init21, 4, "service", _service_dec, SzServiceDetailView, _service);
100871
100932
  __decorateElement(_init21, 4, "stats", _stats_dec3, SzServiceDetailView, _stats3);
100872
100933
  __decorateElement(_init21, 4, "backups", _backups_dec2, SzServiceDetailView, _backups2);
100873
100934
  __decorateElement(_init21, 4, "logs", _logs_dec2, SzServiceDetailView, _logs2);
100874
100935
  __decorateElement(_init21, 4, "streaming", _streaming_dec2, SzServiceDetailView, _streaming2);
100936
+ __decorateElement(_init21, 4, "workspaceEnvironment", _workspaceEnvironment_dec, SzServiceDetailView, _workspaceEnvironment);
100937
+ __decorateElement(_init21, 4, "workspacePath", _workspacePath_dec, SzServiceDetailView, _workspacePath);
100938
+ __decorateElement(_init21, 4, "currentView", _currentView_dec, SzServiceDetailView, _currentView);
100875
100939
  SzServiceDetailView = __decorateElement(_init21, 0, "SzServiceDetailView", _SzServiceDetailView_decorators, SzServiceDetailView);
100876
100940
  __publicField(SzServiceDetailView, "demo", () => b2`
100877
100941
  <div style="padding: 24px; max-width: 1200px;">
@@ -101240,6 +101304,71 @@ __publicField(SzServiceDetailView, "styles", [
101240
101304
  font-size: 12px;
101241
101305
  font-weight: 500;
101242
101306
  }
101307
+
101308
+ :host(.workspace-mode) {
101309
+ display: flex;
101310
+ flex-direction: column;
101311
+ height: 100%;
101312
+ }
101313
+
101314
+ .workspace-wrapper {
101315
+ display: flex;
101316
+ flex-direction: column;
101317
+ height: 100%;
101318
+ }
101319
+
101320
+ .workspace-header {
101321
+ display: flex;
101322
+ align-items: center;
101323
+ gap: 12px;
101324
+ padding: 12px 16px;
101325
+ border-bottom: 1px solid ${cssManager.bdTheme("#e4e4e7", "#27272a")};
101326
+ background: ${cssManager.bdTheme("#ffffff", "#09090b")};
101327
+ flex-shrink: 0;
101328
+ }
101329
+
101330
+ .workspace-back-link {
101331
+ display: inline-flex;
101332
+ align-items: center;
101333
+ gap: 6px;
101334
+ font-size: 14px;
101335
+ font-weight: 500;
101336
+ color: ${cssManager.bdTheme("#2563eb", "#60a5fa")};
101337
+ cursor: pointer;
101338
+ transition: color 200ms ease;
101339
+ }
101340
+
101341
+ .workspace-back-link:hover {
101342
+ color: ${cssManager.bdTheme("#1d4ed8", "#93c5fd")};
101343
+ }
101344
+
101345
+ .workspace-service-name {
101346
+ font-size: 14px;
101347
+ font-weight: 600;
101348
+ color: ${cssManager.bdTheme("#18181b", "#fafafa")};
101349
+ }
101350
+
101351
+ .workspace-status-badge {
101352
+ display: inline-flex;
101353
+ align-items: center;
101354
+ width: 8px;
101355
+ height: 8px;
101356
+ border-radius: 50%;
101357
+ }
101358
+
101359
+ .workspace-status-badge.running {
101360
+ background: ${cssManager.bdTheme("#22c55e", "#22c55e")};
101361
+ }
101362
+
101363
+ .workspace-status-badge.stopped {
101364
+ background: ${cssManager.bdTheme("#ef4444", "#ef4444")};
101365
+ }
101366
+
101367
+ .workspace-container {
101368
+ position: relative;
101369
+ flex: 1;
101370
+ min-height: 0;
101371
+ }
101243
101372
  `
101244
101373
  ]);
101245
101374
  __runInitializers(_init21, 1, SzServiceDetailView);
@@ -104487,13 +104616,13 @@ __runInitializers(_init28, 1, SzDemoViewDashboard);
104487
104616
 
104488
104617
  // ts_web/elements/sz-demo-view-services.ts
104489
104618
  init_dist_ts29();
104490
- var _selectedPlatformService_dec, _selectedService_dec, _currentView_dec, _a29, _SzDemoViewServices_decorators, _init29, _currentView, _selectedService, _selectedPlatformService;
104619
+ var _selectedPlatformService_dec, _selectedService_dec, _currentView_dec2, _a29, _SzDemoViewServices_decorators, _init29, _currentView2, _selectedService, _selectedPlatformService;
104491
104620
  _SzDemoViewServices_decorators = [t4("sz-demo-view-services")];
104492
- var SzDemoViewServices = class extends (_a29 = DeesElement, _currentView_dec = [r5()], _selectedService_dec = [r5()], _selectedPlatformService_dec = [r5()], _a29) {
104621
+ var SzDemoViewServices = class extends (_a29 = DeesElement, _currentView_dec2 = [r5()], _selectedService_dec = [r5()], _selectedPlatformService_dec = [r5()], _a29) {
104493
104622
  constructor() {
104494
104623
  super(...arguments);
104495
104624
  __publicField(this, "appui", null);
104496
- __privateAdd(this, _currentView, __runInitializers(_init29, 8, this, "list")), __runInitializers(_init29, 11, this);
104625
+ __privateAdd(this, _currentView2, __runInitializers(_init29, 8, this, "list")), __runInitializers(_init29, 11, this);
104497
104626
  __privateAdd(this, _selectedService, __runInitializers(_init29, 12, this, null)), __runInitializers(_init29, 15, this);
104498
104627
  __privateAdd(this, _selectedPlatformService, __runInitializers(_init29, 16, this, null)), __runInitializers(_init29, 19, this);
104499
104628
  __publicField(this, "demoServices", [
@@ -104678,6 +104807,7 @@ var SzDemoViewServices = class extends (_a29 = DeesElement, _currentView_dec = [
104678
104807
  @start=${() => console.log("Start")}
104679
104808
  @stop=${() => console.log("Stop")}
104680
104809
  @restart=${() => console.log("Restart")}
104810
+ @request-workspace=${(e11) => console.log("Workspace requested for:", e11.detail.service.name)}
104681
104811
  ></sz-service-detail-view>
104682
104812
  `;
104683
104813
  }
@@ -104776,10 +104906,10 @@ var SzDemoViewServices = class extends (_a29 = DeesElement, _currentView_dec = [
104776
104906
  }
104777
104907
  };
104778
104908
  _init29 = __decoratorStart(_a29);
104779
- _currentView = new WeakMap();
104909
+ _currentView2 = new WeakMap();
104780
104910
  _selectedService = new WeakMap();
104781
104911
  _selectedPlatformService = new WeakMap();
104782
- __decorateElement(_init29, 4, "currentView", _currentView_dec, SzDemoViewServices, _currentView);
104912
+ __decorateElement(_init29, 4, "currentView", _currentView_dec2, SzDemoViewServices, _currentView2);
104783
104913
  __decorateElement(_init29, 4, "selectedService", _selectedService_dec, SzDemoViewServices, _selectedService);
104784
104914
  __decorateElement(_init29, 4, "selectedPlatformService", _selectedPlatformService_dec, SzDemoViewServices, _selectedPlatformService);
104785
104915
  SzDemoViewServices = __decorateElement(_init29, 0, "SzDemoViewServices", _SzDemoViewServices_decorators, SzDemoViewServices);
@@ -105293,7 +105423,7 @@ var SzDemoViewRegistries = class extends (_a31 = DeesElement, _currentTab_dec2 =
105293
105423
  this.appui = context2.appui;
105294
105424
  this.appui.setContentTabs([
105295
105425
  {
105296
- key: "Onebox Registry",
105426
+ key: "Registry Advertisement",
105297
105427
  action: () => {
105298
105428
  this.currentTab = "onebox";
105299
105429
  this.updateSecondaryMenu();
@@ -105313,7 +105443,7 @@ var SzDemoViewRegistries = class extends (_a31 = DeesElement, _currentTab_dec2 =
105313
105443
  if (!this.appui) return;
105314
105444
  if (this.currentTab === "onebox") {
105315
105445
  this.appui.setSecondaryMenu({
105316
- heading: "Onebox Registry",
105446
+ heading: "Registry Advertisement",
105317
105447
  groups: [
105318
105448
  {
105319
105449
  name: "Actions",
@@ -105370,7 +105500,7 @@ var SzDemoViewRegistries = class extends (_a31 = DeesElement, _currentTab_dec2 =
105370
105500
  render() {
105371
105501
  return b2`
105372
105502
  ${this.currentTab === "onebox" ? b2`
105373
- <sz-registry-onebox-view
105503
+ <sz-registry-advertisement
105374
105504
  .images=${this.demoOneboxImages}
105375
105505
  .stats=${{
105376
105506
  totalImages: 4,
@@ -105380,7 +105510,7 @@ var SzDemoViewRegistries = class extends (_a31 = DeesElement, _currentTab_dec2 =
105380
105510
  @view-image=${(e11) => console.log("View image:", e11.detail)}
105381
105511
  @delete-image=${(e11) => console.log("Delete image:", e11.detail)}
105382
105512
  @delete-tag=${(e11) => console.log("Delete tag:", e11.detail)}
105383
- ></sz-registry-onebox-view>
105513
+ ></sz-registry-advertisement>
105384
105514
  ` : b2`
105385
105515
  <sz-registry-external-view
105386
105516
  .registries=${this.demoExternalRegistries}