@fluid-app/fluid-cli-portal 0.1.41 → 0.1.43

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/README.md CHANGED
@@ -71,14 +71,30 @@ fluid portal version activate <version-id> # promote a specific version
71
71
  ## Publish widget runtime artifacts
72
72
 
73
73
  Portal widget packages are published separately from the hosted portal shell.
74
- The portal CLI only publishes company-owned portal widget packages:
74
+ Create a Remote DOM widget and register it in the single source package:
75
+
76
+ ```bash
77
+ fluid portal widget create stock-ticker
78
+ ```
79
+
80
+ The scaffold writes the widget under `src/widgets/` and creates or updates
81
+ `src/widgets.config.ts` using `defineWidget` and `defineWidgetPackage` from the
82
+ worker-safe Portal SDK entry. `portal.config.ts`, `customWidgets`, and legacy
83
+ manifest endpoints are not part of widget discovery.
84
+
85
+ The portal CLI publishes company-owned portal widget packages:
75
86
 
76
87
  ```bash
77
88
  fluid portal deploy
78
89
  ```
79
90
 
80
- - Builds `defineWidgetPackage` runtime artifacts (`widget.js`, `manifest.json`,
81
- CSS, source maps) into `.fluid/widget-dist` by default.
91
+ - Builds `defineWidgetPackage` into `widget.js`, scoped CSS, `manifest.json`,
92
+ and `publish-manifest.json` under `.fluid/widget-dist` by default.
93
+ - `manifest.json` uses the canonical Remote DOM descriptor. Its
94
+ `workerEntryUrl` and CSS URLs are package-local artifact paths; the catalog
95
+ resolves them to absolute public URLs before hosts consume the descriptor.
96
+ Company and droplet package IDs remain fully qualified (`company.*` or
97
+ `droplet.*`). The publish manifest records the artifact inventory and hashes.
82
98
  - Publishes a **company-owned** portal widget package for Fluid OS usage.
83
99
  - Defaults to `--environment production` (an output/reporting label) and
84
100
  `--out-dir .fluid/widget-dist`.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { Command } from "commander";
2
2
  import { CliError, FetchClient, FluidPlugin, Result } from "@fluid-app/fluid-cli";
3
+ import { components } from "@fluid-app/fluidos-api-client";
4
+ import { JsonObject, RemoteDomWidgetDefinition, RemoteDomWidgetPackageDescriptor } from "@fluid-app/portal-core/remote-dom-widget-package";
3
5
 
4
6
  //#region src/types.d.ts
5
7
  /**
@@ -317,8 +319,22 @@ declare function gitAheadBehindVsFetchHead(cwd: string): Promise<{
317
319
  /** Fast-forward HEAD to FETCH_HEAD. Fails (non-zero exit) if not
318
320
  * fast-forwardable — callers check the ahead-count first. */
319
321
  declare function gitMergeFastForward(cwd: string): Promise<void>;
322
+ interface GitAutoCommitOptions {
323
+ /**
324
+ * Stage with `git add --ignore-removal .` (new + modified files only)
325
+ * instead of `git add -A`, so files present in the index but absent
326
+ * from the working tree are NOT recorded as deletions. Used by the
327
+ * first-push adoption path in git-sync: a directory populated by
328
+ * `fluid portal pull` (content-only sync) has no idea what the full
329
+ * repo tracks, so local additions/edits win but remote-only files are
330
+ * preserved — deletions only ever ship from full checkouts.
331
+ */
332
+ readonly ignoreRemovals?: boolean;
333
+ }
320
334
  /**
321
- * `git add -A && git commit -m <message>`.
335
+ * `git add -A && git commit -m <message>` (or, with
336
+ * `{ ignoreRemovals: true }`, `git add --ignore-removal .` — see
337
+ * GitAutoCommitOptions).
322
338
  *
323
339
  * `git add -A` intentionally stages the whole work tree: a portal's
324
340
  * provisioned repo tracks the entire project (it's seeded from the
@@ -332,7 +348,7 @@ declare function gitMergeFastForward(cwd: string): Promise<void>;
332
348
  * identity so the commit isn't rejected. "nothing to commit" is treated
333
349
  * as a no-op, not an error.
334
350
  */
335
- declare function gitAutoCommit(cwd: string, message: string): Promise<void>;
351
+ declare function gitAutoCommit(cwd: string, message: string, options?: GitAutoCommitOptions): Promise<void>;
336
352
  /**
337
353
  * `git push <cleanUrl> HEAD:<branch>` — credentials supplied via
338
354
  * GIT_ASKPASS, never argv. `http.…/.extraheader=` clears any cached
@@ -578,394 +594,6 @@ declare function diffAgainstSnapshot(portalDir: string, snapshot: Snapshot): Pro
578
594
  */
579
595
  declare function buildSnapshot(portalDir: string, definitionName: string, definitionId: number): Promise<Snapshot>;
580
596
  //#endregion
581
- //#region ../../api-clients/fluidos/src/generated/fluid-os-v0.d.ts
582
- interface components {
583
- schemas: {
584
- Meta: {
585
- request_id?: string; /** Format: date-time */
586
- timestamp?: string;
587
- };
588
- PaginatedMeta: {
589
- current_page: number;
590
- request_id: string; /** Format: date-time */
591
- timestamp: string;
592
- total_count: number;
593
- total_pages: number;
594
- };
595
- ErrorResponse: {
596
- error_message: string;
597
- errors: components["schemas"]["ErrorBag"];
598
- meta: components["schemas"]["Meta"];
599
- };
600
- UnauthorizedResponse: {
601
- message: string;
602
- }; /** @description Any valid JSON value for provider, integration, theme, metadata, or other dynamic payloads whose keys are not fixed by the API contract. */
603
- JsonValue: string | number | boolean | null | components["schemas"]["JsonValue"][] | {
604
- [key: string]: components["schemas"]["JsonValue"];
605
- }; /** @description A validation or API error value. */
606
- ErrorValue: string | string[] | components["schemas"]["JsonValue"]; /** @description Validation errors keyed by field, a list of errors, a single error message, or null when no structured error details are available. */
607
- ErrorBag: string | components["schemas"]["ErrorValue"][] | {
608
- [key: string]: components["schemas"]["ErrorValue"];
609
- } | null; /** @description An API error message represented as text or structured JSON. */
610
- ErrorMessage: string | components["schemas"]["ErrorBag"] | null; /** @description Common legacy error response envelope. Older endpoints may return one or more of these fields depending on the controller path. */
611
- StandardErrorResponse: {
612
- message?: string;
613
- error?: components["schemas"]["ErrorMessage"];
614
- error_message?: components["schemas"]["ErrorMessage"];
615
- errors?: components["schemas"]["ErrorBag"];
616
- meta?: components["schemas"]["Meta"];
617
- } & {
618
- [key: string]: components["schemas"]["JsonValue"];
619
- }; /** @description Common legacy unauthorized response envelope. */
620
- StandardUnauthorizedResponse: components["schemas"]["StandardErrorResponse"];
621
- FluidOSDefinitionListResponse: {
622
- definitions: components["schemas"]["FluidOSDefinitionBasic"][];
623
- meta: components["schemas"]["PaginatedMeta"];
624
- };
625
- FluidOSDefinitionRequest: {
626
- definition?: {
627
- name: string;
628
- active?: boolean;
629
- } | null;
630
- };
631
- FluidOSDefinitionUpdateRequest: {
632
- definition?: {
633
- name?: string;
634
- active?: boolean;
635
- } | null;
636
- };
637
- FluidOSNavigationItemCreateRequest: {
638
- navigation_item?: {
639
- icon?: string;
640
- label: string;
641
- position: number;
642
- parent_id?: number | null;
643
- screen_id?: number | null;
644
- slug?: string | null;
645
- source?: "user" | "system" | "code" | null;
646
- } | null;
647
- };
648
- FluidOSNavigationCreateRequest: {
649
- navigation?: {
650
- name: string;
651
- platform: string;
652
- } | null;
653
- };
654
- FluidOSProfileCreateRequest: {
655
- profile?: {
656
- name: string;
657
- default?: boolean;
658
- navigation_id?: number;
659
- mobile_navigation_id?: number;
660
- navigation_attributes?: {
661
- name: string;
662
- navigation_items_attributes?: Partial<NonNullable<components["schemas"]["FluidOSNavigationItemCreateRequest"]["navigation_item"]>>[];
663
- };
664
- mobile_navigation_attributes?: {
665
- name: string;
666
- navigation_items_attributes?: Partial<NonNullable<components["schemas"]["FluidOSNavigationItemCreateRequest"]["navigation_item"]>>[];
667
- };
668
- theme_ids?: number[];
669
- permissions?: components["schemas"]["FluidOSDynamicPayload"];
670
- } | null;
671
- };
672
- FluidOSScreenCreateRequest: {
673
- screen?: {
674
- name: string;
675
- slug: string;
676
- component_tree?: components["schemas"]["FluidOSDynamicPayload"] | null;
677
- } | null;
678
- };
679
- FluidOSThemeCreateRequest: {
680
- theme?: {
681
- config: components["schemas"]["FluidOSDynamicPayload"];
682
- name: string;
683
- active?: boolean;
684
- } | null;
685
- };
686
- FluidOSNavigationItemUpdateRequest: {
687
- navigation_item?: Partial<NonNullable<components["schemas"]["FluidOSNavigationItemCreateRequest"]["navigation_item"]>> | null;
688
- };
689
- FluidOSNavigationUpdateRequest: {
690
- navigation?: {
691
- name?: string;
692
- platform?: "web" | "mobile";
693
- } | null;
694
- };
695
- FluidOSProfileUpdateRequest: {
696
- profile?: {
697
- name?: string;
698
- default?: boolean;
699
- navigation_id?: number;
700
- mobile_navigation_id?: number;
701
- theme_ids?: number[];
702
- permissions?: components["schemas"]["FluidOSDynamicPayload"];
703
- } | null;
704
- };
705
- FluidOSScreenUpdateRequest: {
706
- screen?: {
707
- name?: string;
708
- slug?: string;
709
- component_tree?: components["schemas"]["FluidOSDynamicPayload"] | null;
710
- } | null;
711
- };
712
- FluidOSThemeUpdateRequest: {
713
- theme?: {
714
- name?: string;
715
- active?: boolean;
716
- config?: components["schemas"]["FluidOSDynamicPayload"];
717
- } | null;
718
- };
719
- FluidOSVersionUpdateRequest: {
720
- version?: {
721
- active?: boolean;
722
- } | null;
723
- }; /** FluidOS::NavigationItem */
724
- FluidOSNavigationItem: {
725
- id: number;
726
- icon?: string | null;
727
- label?: string | null;
728
- parent_id?: number | null;
729
- position?: number | null;
730
- screen_id?: number | null;
731
- slug?: string | null; /** @enum {string} */
732
- source?: "user" | "system" | "code";
733
- children?: components["schemas"]["FluidOSNavigationItem"][];
734
- }; /** FluidOS::Screen */
735
- FluidOSScreenBasic: {
736
- id: number;
737
- name?: string | null;
738
- slug?: string | null;
739
- definition_id: number;
740
- }; /** FluidOS::Screen */
741
- FluidOSScreen: {
742
- id: number;
743
- name?: string | null;
744
- slug?: string | null;
745
- definition_id: number;
746
- component_tree?: components["schemas"]["FluidOSDynamicPayload"];
747
- }; /** FluidOS::Theme */
748
- FluidOSTheme: {
749
- id: number;
750
- config?: components["schemas"]["FluidOSDynamicPayload"];
751
- active?: boolean | null;
752
- name?: string | null;
753
- definition_id: number;
754
- }; /** FluidOS::Navigation */
755
- FluidOSNavigationBasic: {
756
- id: number;
757
- name?: string | null;
758
- definition_id: number; /** @enum {string} */
759
- platform: "web" | "mobile";
760
- }; /** FluidOS::Navigation */
761
- FluidOSNavigation: {
762
- id: number;
763
- name?: string | null;
764
- definition_id: number; /** @enum {string} */
765
- platform: "web" | "mobile";
766
- screens?: components["schemas"]["FluidOSScreen"][];
767
- }; /** FluidOS::Navigation */
768
- FluidOSNavigationWithItems: {
769
- id: number;
770
- name?: string | null;
771
- definition_id: number; /** @enum {string} */
772
- platform: "web" | "mobile";
773
- navigation_items?: components["schemas"]["FluidOSNavigationItem"][];
774
- }; /** FluidOS::Profile */
775
- FluidOSProfile: {
776
- id: number;
777
- name?: string | null;
778
- default?: boolean | null;
779
- permissions?: components["schemas"]["FluidOSDynamicPayload"];
780
- definition_id: number;
781
- navigation?: components["schemas"]["FluidOSNavigationWithItems"] | null;
782
- mobile_navigation?: components["schemas"]["FluidOSNavigationWithItems"];
783
- themes?: components["schemas"]["FluidOSTheme"][];
784
- }; /** FluidOS::Profile */
785
- FluidOSProfileWithScreens: {
786
- id: number;
787
- name?: string | null;
788
- default?: boolean | null;
789
- permissions?: components["schemas"]["FluidOSDynamicPayload"];
790
- definition_id: number;
791
- navigation?: components["schemas"]["FluidOSNavigationWithItems"] | null;
792
- mobile_navigation?: components["schemas"]["FluidOSNavigationWithItems"];
793
- themes?: components["schemas"]["FluidOSTheme"][];
794
- screens?: components["schemas"]["FluidOSScreen"][];
795
- }; /** FluidOS::Definition */
796
- FluidOSDefinitionBasic: {
797
- id: number;
798
- name?: string | null;
799
- active?: boolean | null;
800
- }; /** FluidOS::Definition */
801
- FluidOSDefinition: {
802
- id: number;
803
- name?: string | null;
804
- active?: boolean | null;
805
- profiles?: components["schemas"]["FluidOSProfile"][];
806
- screens?: components["schemas"]["FluidOSScreenBasic"][];
807
- navigations?: components["schemas"]["FluidOSNavigationBasic"][];
808
- themes?: components["schemas"]["FluidOSTheme"][];
809
- }; /** FluidOS::Version */
810
- FluidOSVersion: {
811
- id: number;
812
- active?: boolean | null;
813
- manifest?: components["schemas"]["FluidOSDynamicPayload"]; /** Format: date-time */
814
- published_at?: string | null;
815
- definition_id: number;
816
- }; /** @description Couples each widget package artifact path class with the only accepted contentType value. */
817
- FluidOSWidgetPackageVersionArtifactContentTypeConstraint: {
818
- /** @constant */path: "widget.js"; /** @constant */
819
- contentType: "application/javascript";
820
- } | {
821
- /** @constant */path: "manifest.json"; /** @constant */
822
- contentType: "application/json";
823
- } | {
824
- path: string; /** @constant */
825
- contentType: "text/css";
826
- } | {
827
- path: string; /** @constant */
828
- contentType: "application/json";
829
- }; /** @description Couples each widget package artifact path class with the only accepted contentType/content_type alias values when supplied. */
830
- FluidOSWidgetPackageVersionCompletionArtifactContentTypeConstraint: {
831
- /** @constant */path: "widget.js"; /** @constant */
832
- contentType?: "application/javascript"; /** @constant */
833
- content_type?: "application/javascript";
834
- } | {
835
- /** @constant */path: "manifest.json"; /** @constant */
836
- contentType?: "application/json"; /** @constant */
837
- content_type?: "application/json";
838
- } | {
839
- path: string; /** @constant */
840
- contentType?: "text/css"; /** @constant */
841
- content_type?: "text/css";
842
- } | {
843
- path: string; /** @constant */
844
- contentType?: "application/json"; /** @constant */
845
- content_type?: "application/json";
846
- }; /** @description Artifact metadata required before Fluid OS widget package upload URLs can be issued. Artifact paths must be unique within the request, and the artifact list must include widget.js and manifest.json before upload URLs are issued. Artifact paths are top-level package artifact filenames only; accepted names are widget.js, manifest.json, *.css, and *.js.map with no slash paths. Accepted content types are application/javascript for widget.js, application/json for manifest.json and *.js.map, and text/css for *.css. Byte sizes are non-negative and checked against configured per-artifact and bundle limits; defaults are 5 MiB per artifact and 10 MiB per bundle unless environment config changes them. */
847
- FluidOSWidgetPackageVersionArtifactInput: {
848
- /** @description Top-level package artifact filename. Accepted names are widget.js, manifest.json, *.css, or *.js.map; slash paths are not accepted. */path: string; /** @description Expected SHA256 checksum for the artifact content. */
849
- sha256: string; /** @description Expected artifact size in bytes. Checked against configured per-artifact and bundle limits; defaults are 5 MiB per artifact and 10 MiB per bundle unless environment config changes them. */
850
- bytes: number;
851
- /**
852
- * @description MIME content type used when uploading the artifact. Accepted values are application/javascript for widget.js, application/json for manifest.json and *.js.map, and text/css for *.css.
853
- * @enum {string}
854
- */
855
- contentType: "application/javascript" | "application/json" | "text/css";
856
- } & components["schemas"]["FluidOSWidgetPackageVersionArtifactContentTypeConstraint"]; /** @description Request payload for starting a company-owned Fluid OS widget package version publish flow. Artifact paths must be unique top-level package artifact filenames. The artifacts list must include widget.js and manifest.json so the API can issue upload URLs and later verify the completed upload. */
857
- FluidOSWidgetPackageVersionCreateRequest: {
858
- /** @description Non-empty, object-path-safe company-owned widget package key. Use URL-safe characters only; . and .. are not accepted. */package_key: string; /** @description Non-empty, object-path-safe widget package version identifier accepted in the URL and upload path. Dotted versions such as 1.0.0 are accepted; only exact . or .. path segments and characters outside [A-Za-z0-9._~-] are rejected. */
859
- version: string; /** @description Fluid OS builder version that produced this package. */
860
- builder_version: string; /** @description Fluid OS CLI version that published this package. */
861
- cli_version: string; /** @description Fluid OS runtime version targeted by this package. */
862
- runtime_version: string; /** @description SHA256 checksum of the serialized manifest JSON. */
863
- manifest_hash: string; /** @description Widget package manifest JSON. It must use the supported widget manifest structure, contain at least one extractable widget type, and every widget type in that structure must use the company-owned prefix `company.<package_key>.`. */
864
- manifest: {
865
- [key: string]: components["schemas"]["JsonValue"];
866
- }; /** @description Top-level package artifacts to upload. The list must include widget.js and manifest.json. */
867
- artifacts: components["schemas"]["FluidOSWidgetPackageVersionArtifactInput"][] & (unknown & unknown); /** @description Optional publisher metadata stored with the package version. */
868
- build_metadata?: {
869
- [key: string]: components["schemas"]["JsonValue"];
870
- };
871
- }; /** @description Upload instructions for a widget package artifact. */
872
- FluidOSWidgetPackageVersionUpload: {
873
- /** @description Top-level package artifact filename. */path: string; /** Format: uri */
874
- upload_url: string; /** Format: uri */
875
- public_url: string;
876
- }; /** @description Upload session details for a pending Fluid OS widget package version. */
877
- FluidOSWidgetPackageVersionCreateResponse: {
878
- version_id: number; /** Format: uri */
879
- artifact_base_url: string;
880
- uploads: components["schemas"]["FluidOSWidgetPackageVersionUpload"][];
881
- }; /** @description Optional artifact metadata supplied when completing a widget package upload. Artifact paths must be unique top-level package artifact filenames within the request; accepted names are widget.js, manifest.json, *.css, and *.js.map with no slash paths. Accepted content types are application/javascript for widget.js, application/json for manifest.json and *.js.map, and text/css for *.css. Byte sizes are non-negative and checked against configured per-artifact and bundle limits; defaults are 5 MiB per artifact and 10 MiB per bundle unless environment config changes them. sha256/checksum, bytes/size, and contentType/content_type are accepted aliases and must match when both aliases are present; supplied artifact metadata is compared with the stored upload-session/package version artifact metadata during verification. If artifacts are supplied, they must include exactly the stored upload-session artifact paths. Manifest verification is separate and happens against uploaded artifact content. */
882
- FluidOSWidgetPackageVersionCompletionArtifactInput: {
883
- /** @description Top-level package artifact filename. Accepted names are widget.js, manifest.json, *.css, or *.js.map; slash paths are not accepted. */path: string; /** @description Expected SHA256 checksum for the artifact content. */
884
- sha256?: string; /** @description Alias for sha256. */
885
- checksum?: string; /** @description Expected artifact size in bytes. Checked against configured per-artifact and bundle limits; defaults are 5 MiB per artifact and 10 MiB per bundle unless environment config changes them. */
886
- bytes?: number; /** @description Alias for bytes; checked against the same configured per-artifact and bundle limits. */
887
- size?: number;
888
- /**
889
- * @description MIME content type for the artifact. Accepted values are application/javascript for widget.js, application/json for manifest.json and *.js.map, and text/css for *.css.
890
- * @enum {string}
891
- */
892
- contentType?: "application/javascript" | "application/json" | "text/css";
893
- /**
894
- * @description Alias for contentType.
895
- * @enum {string}
896
- */
897
- content_type?: "application/javascript" | "application/json" | "text/css";
898
- } & components["schemas"]["FluidOSWidgetPackageVersionCompletionArtifactContentTypeConstraint"]; /** @description Request payload for verifying uploaded company-owned Fluid OS widget package artifacts. The version path parameter, optional package_key, and any supplied artifact metadata must match the stored upload-session/package version artifact metadata before the package version is approved. If artifacts are supplied, they must include exactly the stored upload-session artifact paths. Uploaded manifest.json is verified for matching packageId, matching version, and valid company-owned `company.<package_key>.` widget type prefixes. */
899
- FluidOSWidgetPackageVersionCompleteUploadRequest: {
900
- /** @description Optional non-empty, object-path-safe widget package key. When omitted, the company's widget package is used; . and .. are not accepted. */package_key?: string | null; /** @description Optional artifact metadata to compare with the stored upload session. When supplied, the list must include exactly the stored upload-session artifact paths; omissions and extras are rejected. */
901
- artifacts?: components["schemas"]["FluidOSWidgetPackageVersionCompletionArtifactInput"][];
902
- }; /** @description Approved Fluid OS widget package version details. */
903
- FluidOSWidgetPackageVersionCompleteUploadResponse: {
904
- status: string;
905
- packageId: string; /** @description Non-empty, object-path-safe widget package version identifier. Dotted versions such as 1.0.0 are accepted; only exact . or .. path segments and characters outside [A-Za-z0-9._~-] are rejected. */
906
- version: string; /** Format: uri */
907
- scriptUrl: string;
908
- cssUrls: string[]; /** Format: uri */
909
- manifestUrl: string;
910
- }; /** @description Flat verification failure response returned when uploaded artifacts do not match the package manifest or expected metadata. */
911
- FluidOSWidgetPackageVersionVerificationErrorResponse: {
912
- /** @enum {string} */status: "error";
913
- error_message: string;
914
- details: {
915
- [key: string]: components["schemas"]["JsonValue"];
916
- };
917
- }; /** @description Dynamic Fluid OS JSON payload whose keys are defined by the app builder configuration. */
918
- FluidOSDynamicPayload: {
919
- [key: string]: components["schemas"]["JsonValue"];
920
- } | null;
921
- FluidOSWidgetPackageCatalogEntry: {
922
- /**
923
- * @description Package ownership source for the shared widget loading path.
924
- * @enum {string}
925
- */
926
- source: "company" | "droplet";
927
- /**
928
- * @description Runtime package identifier prefixed by source.
929
- * @example company.portal-home
930
- * @example droplet.reviews
931
- */
932
- packageId: string; /** @description Approved package version currently active for this owner. */
933
- version: string; /** @description Public module script URL for the package runtime artifact. */
934
- scriptUrl: string | null; /** @description Public stylesheet URLs for the package runtime artifacts. */
935
- cssUrls: string[]; /** @description Public URL for the package manifest artifact. */
936
- manifestUrl: string | null; /** @description Approved package manifest JSON used by the runtime loader. */
937
- manifest: {
938
- [key: string]: components["schemas"]["JsonValue"];
939
- };
940
- };
941
- FluidOSWidgetPackageCatalogResponse: {
942
- packages: components["schemas"]["FluidOSWidgetPackageCatalogEntry"][];
943
- };
944
- FluidOSWidgetPackageDropletForbiddenResponse: {
945
- error: {
946
- message: string;
947
- details?: {
948
- [key: string]: components["schemas"]["JsonValue"];
949
- };
950
- }; /** @enum {integer} */
951
- status: 403;
952
- meta?: components["schemas"]["Meta"];
953
- };
954
- FluidOSWidgetPackageRoleForbiddenResponse: {
955
- message: string;
956
- };
957
- FluidOSWidgetPackagePermissionForbiddenResponse: {
958
- error: string;
959
- };
960
- FluidOSWidgetPackageForbiddenResponse: components["schemas"]["FluidOSWidgetPackageDropletForbiddenResponse"] | components["schemas"]["FluidOSWidgetPackageRoleForbiddenResponse"] | components["schemas"]["FluidOSWidgetPackagePermissionForbiddenResponse"];
961
- };
962
- responses: never;
963
- parameters: never;
964
- requestBodies: never;
965
- headers: never;
966
- pathItems: never;
967
- }
968
- //#endregion
969
597
  //#region src/utils/transform.d.ts
970
598
  type ApiScreen = components["schemas"]["FluidOSScreen"];
971
599
  type ApiTheme = components["schemas"]["FluidOSTheme"];
@@ -1101,19 +729,22 @@ declare function validateCrossReferences(portalDir: string, mappings: PortalMapp
1101
729
  //#endregion
1102
730
  //#region src/utils/widget-package-validation.d.ts
1103
731
  type WidgetPackageOwnerKind = "company" | "droplet";
1104
- type WidgetRuntimeContainer = "inline" | "block" | "card" | "fullscreen";
1105
- type WidgetRuntimeResizable = boolean | "horizontal" | "vertical" | "both";
732
+ interface WidgetCapabilityMetadata {
733
+ readonly name: string;
734
+ readonly version?: string;
735
+ }
1106
736
  interface SourceWidgetMetadata {
1107
737
  readonly name: string;
1108
738
  readonly displayName?: string;
1109
739
  readonly description?: string;
1110
740
  readonly icon?: string;
1111
741
  readonly category?: string;
1112
- readonly propertySchema?: Record<string, unknown>;
1113
- readonly defaultProps?: Record<string, unknown>;
742
+ readonly propertySchema?: JsonObject;
743
+ readonly defaultProps?: JsonObject;
1114
744
  readonly container?: unknown;
1115
745
  readonly minSdkVersion?: string;
1116
746
  readonly resizable?: unknown;
747
+ readonly capabilities?: readonly WidgetCapabilityMetadata[];
1117
748
  }
1118
749
  interface SourceWidgetPackageMetadata {
1119
750
  readonly manifestVersion?: number;
@@ -1125,27 +756,30 @@ interface SourceWidgetPackageMetadata {
1125
756
  readonly widgets: readonly SourceWidgetMetadata[];
1126
757
  readonly cssUrls?: readonly string[];
1127
758
  }
1128
- interface WidgetDescriptorMetadata {
1129
- readonly type: string;
759
+ interface WidgetDescriptorMetadata extends RemoteDomWidgetDefinition {
1130
760
  readonly name: string;
1131
- readonly displayName: string;
1132
- readonly description: string;
1133
- readonly icon: string;
1134
- readonly category: string;
1135
- readonly propertySchema: Record<string, unknown>;
1136
- readonly defaultProps: Record<string, unknown>;
1137
- readonly container: WidgetRuntimeContainer;
1138
- readonly minSdkVersion: string;
1139
- readonly resizable: WidgetRuntimeResizable;
1140
761
  }
1141
- interface WidgetPackageDescriptorMetadata {
762
+ declare const WIDGET_PACKAGE_ARTIFACT_PATH: unique symbol;
763
+ /** A package-local artifact path written into the uploaded manifest. */
764
+ type WidgetPackageArtifactPath = string & {
765
+ readonly [WIDGET_PACKAGE_ARTIFACT_PATH]: true;
766
+ };
767
+ /**
768
+ * Upload-time manifest whose artifact references are package-local paths.
769
+ *
770
+ * This is deliberately distinct from RemoteDomWidgetPackageDescriptor, whose
771
+ * catalog-facing artifact fields must already be resolved to absolute URLs.
772
+ */
773
+ interface WidgetPackagePublishManifest {
1142
774
  readonly manifestVersion: 1;
775
+ readonly runtime: "remote-dom";
1143
776
  readonly packageId: string;
1144
- readonly packageType: WidgetPackageOwnerKind;
777
+ readonly source: WidgetPackageOwnerKind;
1145
778
  readonly version: string;
1146
- readonly remoteEntryUrl: string;
1147
- readonly cssUrls: readonly string[];
1148
- readonly widgets: readonly WidgetDescriptorMetadata[];
779
+ readonly workerEntryUrl: WidgetPackageArtifactPath;
780
+ readonly cssUrls: readonly WidgetPackageArtifactPath[];
781
+ readonly assetUrls: readonly WidgetPackageArtifactPath[];
782
+ readonly widgets: readonly RemoteDomWidgetDefinition[];
1149
783
  }
1150
784
  interface ValidatedWidgetPackageBuild {
1151
785
  readonly sourcePackage: SourceWidgetPackageMetadata;
@@ -1170,10 +804,9 @@ interface ValidateSourceWidgetPackageOptions {
1170
804
  readonly owner?: WidgetPackageOwnerKind;
1171
805
  }
1172
806
  declare function validateSingleSourceWidgetPackage(sourcePackages: readonly unknown[], options?: ValidateSourceWidgetPackageOptions): WidgetPackageValidationResult;
1173
- declare function buildWidgetPackageDescriptor(validated: ValidatedWidgetPackageBuild, options?: {
1174
- readonly remoteEntryUrl?: string;
807
+ declare function buildWidgetPackagePublishManifest(validated: ValidatedWidgetPackageBuild, options?: {
1175
808
  readonly cssUrls?: readonly string[];
1176
- }): WidgetPackageDescriptorMetadata;
809
+ }): WidgetPackagePublishManifest;
1177
810
  //#endregion
1178
811
  //#region src/utils/widget-package-builder.d.ts
1179
812
  interface BuildSharedWidgetPackageOptions {
@@ -1197,6 +830,7 @@ interface SharedWidgetPackageBuildError {
1197
830
  declare function buildSharedWidgetPackage(options: BuildSharedWidgetPackageOptions): Promise<Result<SharedWidgetPackageBuildResult, SharedWidgetPackageBuildError>>;
1198
831
  declare function createWidgetPackageEntrySource(options: {
1199
832
  readonly configImportPath: string;
833
+ readonly cssImportPath?: string;
1200
834
  readonly validated: ValidatedWidgetPackageBuild;
1201
835
  }): string;
1202
836
  //#endregion
@@ -1382,5 +1016,5 @@ declare function validateWidgetPublishOutDir(projectDir: string, outDir: string)
1382
1016
  //#region src/index.d.ts
1383
1017
  declare const plugin: FluidPlugin;
1384
1018
  //#endregion
1385
- export { type ArtifactMetadata, type BuildOptions, type BuildSharedWidgetPackageOptions, CANONICAL_PROJECT_NAME, type CategorizedChanges, type CreateOptions, type CreatePortalGitCredentialOptions, type DefinitionMapping, type DevOptions, FILE_SYSTEM_ERRORS, type FileHash, type FileHashMap, type FileSystemError, type FileSystemErrorCode, type GitCredentialOutcome, GitError, type LocalNavigation, type LocalNavigationItem, type LocalProfile, type LocalScreen, type LocalTheme, type MappedResourceType, type PortalDeployOptions, type PortalGitCredential, type PortalGitSyncOptions, type PortalGitSyncResult, type PortalMappings, type ProjectConfig, type PublishManifestMetadata, type PublishWidgetPackageVersionOptions, type PublishWidgetRuntimeArtifactsDependencies, type PublishWidgetRuntimeArtifactsOptions, type PublishWidgetRuntimeArtifactsResult, type ScaffoldFromGitHubOptions, type SelectedPageTemplate, type SharedWidgetPackageBuildError, type SharedWidgetPackageBuildResult, type Snapshot, type SnapshotDiff, type SourceWidgetMetadata, type SourceWidgetPackageMetadata, TEMPLATES, TEMPLATE_REPO_URL, type TemplateName, type TemplatePaths, type TemplateVariables, type ValidateSourceWidgetPackageOptions, type ValidatedWidgetPackageBuild, type ValidationError, WIDGET_PACKAGE_BUILDER_VERSION, type WidgetCreateOptions, type WidgetDescriptorMetadata, type WidgetPackageArtifactMetadata, type WidgetPackageArtifactPayload, type WidgetPackageArtifactUploadResult, type WidgetPackageCompleteResult, type WidgetPackageCompleteUploadPayload, type WidgetPackageDescriptorMetadata, type WidgetPackageOwnerKind, type WidgetPackagePublishRequest, type WidgetPackagePublishResult, type WidgetPackageSessionRequest, type WidgetPackageSignedUpload, type WidgetPackageUploadArtifact, WidgetPackageUploadError, type WidgetPackageUploadFetch, type WidgetPackageUploadOwner, type WidgetPackageUploadSession, type WidgetPackageUploadSessionPayload, type WidgetPackageValidationError, type WidgetPackageValidationErrorCode, type WidgetPackageValidationResult, type WidgetPublishOptions, type WidgetSourceConfig, type WidgetSourceConfigLoadError, buildIdToSlugMap, buildNavigationIdToSlugMap, buildSharedWidgetPackage, buildSnapshot, buildThemeIdToSlugMap, buildWidgetPackageCompleteUploadPayload, buildWidgetPackageDescriptor, buildWidgetPackageUploadSessionPayload, categorizeChanges, cloneCommand, collectWidgetPackageArtifacts, completeWidgetPackageUpload, computeArtifactMetadata, computeFileHash, copyTemplate, copyTemplateSafe, createAuthenticatedWidgetPackageClient, createCommand, createDirectory, createDirectorySafe, createPortalGitCredential, createPublishManifestMetadata, createWidgetPackageEntrySource, createWidgetPackagePublishRequest, plugin as default, deployCommand, deriveScreenSlug, deriveSlug, diffAgainstSnapshot, directoryExists, doctorCommand, ensureGitAvailable, fileExists, getArtifactContentType, getInstallCommand, getOriginUrl, getRunCommand, getSdkVersion, getSdkVersionSafe, getTemplatePaths, getWidgetPackageCompleteUploadRoute, getWidgetPackageUploadSessionRoute, gitAheadBehindVsFetchHead, gitAutoCommit, gitClone, gitFetch, gitInit, gitMergeFastForward, gitMissingError, gitPush, hasUncommittedChanges, installDependencies, isGitAvailable, isGitRepo, loadSourceWidgetPackages, normalizeWidgetPackageCompleteResponse, normalizeWidgetPackageUploadSession, pathExists, portalGitCredentialPath, printDryRunSessionPayload, printRuntimeOnlyNotice, printWidgetPublishSummary, promptProjectConfig, publishWidgetPackageVersion, publishWidgetRuntimeArtifacts, pullCommand, pushCommand, readFileSafe, readMappings, readSnapshot, removeMapping, requestWidgetPackageUploadSession, resolveIdToSlug, resolvePortalWidgetSourceConfig, resolveSlugToId, rewriteProjectName, runPackageManager, runPortalGitSync, scaffoldFromGitHub, sha256, slugFromPath, topLevelWidgetCommand, transformNavigation, transformNavigationItems, transformProfile, transformScreen, transformTheme, updateMapping, uploadWidgetPackageArtifacts, validateCrossReferences, validateSingleSourceWidgetPackage, validateWidgetPublishOutDir, versionCommand, widgetCommand, writeFileSafe, writeFluidrcProfile, writeMappings, writeSnapshot };
1019
+ export { type ArtifactMetadata, type BuildOptions, type BuildSharedWidgetPackageOptions, CANONICAL_PROJECT_NAME, type CategorizedChanges, type CreateOptions, type CreatePortalGitCredentialOptions, type DefinitionMapping, type DevOptions, FILE_SYSTEM_ERRORS, type FileHash, type FileHashMap, type FileSystemError, type FileSystemErrorCode, type GitCredentialOutcome, GitError, type LocalNavigation, type LocalNavigationItem, type LocalProfile, type LocalScreen, type LocalTheme, type MappedResourceType, type PortalDeployOptions, type PortalGitCredential, type PortalGitSyncOptions, type PortalGitSyncResult, type PortalMappings, type ProjectConfig, type PublishManifestMetadata, type PublishWidgetPackageVersionOptions, type PublishWidgetRuntimeArtifactsDependencies, type PublishWidgetRuntimeArtifactsOptions, type PublishWidgetRuntimeArtifactsResult, type RemoteDomWidgetPackageDescriptor, type ScaffoldFromGitHubOptions, type SelectedPageTemplate, type SharedWidgetPackageBuildError, type SharedWidgetPackageBuildResult, type Snapshot, type SnapshotDiff, type SourceWidgetMetadata, type SourceWidgetPackageMetadata, TEMPLATES, TEMPLATE_REPO_URL, type TemplateName, type TemplatePaths, type TemplateVariables, type ValidateSourceWidgetPackageOptions, type ValidatedWidgetPackageBuild, type ValidationError, WIDGET_PACKAGE_BUILDER_VERSION, type WidgetCreateOptions, type WidgetDescriptorMetadata, type WidgetPackageArtifactMetadata, type WidgetPackageArtifactPath, type WidgetPackageArtifactPayload, type WidgetPackageArtifactUploadResult, type WidgetPackageCompleteResult, type WidgetPackageCompleteUploadPayload, type WidgetPackageOwnerKind, type WidgetPackagePublishManifest, type WidgetPackagePublishRequest, type WidgetPackagePublishResult, type WidgetPackageSessionRequest, type WidgetPackageSignedUpload, type WidgetPackageUploadArtifact, WidgetPackageUploadError, type WidgetPackageUploadFetch, type WidgetPackageUploadOwner, type WidgetPackageUploadSession, type WidgetPackageUploadSessionPayload, type WidgetPackageValidationError, type WidgetPackageValidationErrorCode, type WidgetPackageValidationResult, type WidgetPublishOptions, type WidgetSourceConfig, type WidgetSourceConfigLoadError, buildIdToSlugMap, buildNavigationIdToSlugMap, buildSharedWidgetPackage, buildSnapshot, buildThemeIdToSlugMap, buildWidgetPackageCompleteUploadPayload, buildWidgetPackagePublishManifest, buildWidgetPackageUploadSessionPayload, categorizeChanges, cloneCommand, collectWidgetPackageArtifacts, completeWidgetPackageUpload, computeArtifactMetadata, computeFileHash, copyTemplate, copyTemplateSafe, createAuthenticatedWidgetPackageClient, createCommand, createDirectory, createDirectorySafe, createPortalGitCredential, createPublishManifestMetadata, createWidgetPackageEntrySource, createWidgetPackagePublishRequest, plugin as default, deployCommand, deriveScreenSlug, deriveSlug, diffAgainstSnapshot, directoryExists, doctorCommand, ensureGitAvailable, fileExists, getArtifactContentType, getInstallCommand, getOriginUrl, getRunCommand, getSdkVersion, getSdkVersionSafe, getTemplatePaths, getWidgetPackageCompleteUploadRoute, getWidgetPackageUploadSessionRoute, gitAheadBehindVsFetchHead, gitAutoCommit, gitClone, gitFetch, gitInit, gitMergeFastForward, gitMissingError, gitPush, hasUncommittedChanges, installDependencies, isGitAvailable, isGitRepo, loadSourceWidgetPackages, normalizeWidgetPackageCompleteResponse, normalizeWidgetPackageUploadSession, pathExists, portalGitCredentialPath, printDryRunSessionPayload, printRuntimeOnlyNotice, printWidgetPublishSummary, promptProjectConfig, publishWidgetPackageVersion, publishWidgetRuntimeArtifacts, pullCommand, pushCommand, readFileSafe, readMappings, readSnapshot, removeMapping, requestWidgetPackageUploadSession, resolveIdToSlug, resolvePortalWidgetSourceConfig, resolveSlugToId, rewriteProjectName, runPackageManager, runPortalGitSync, scaffoldFromGitHub, sha256, slugFromPath, topLevelWidgetCommand, transformNavigation, transformNavigationItems, transformProfile, transformScreen, transformTheme, updateMapping, uploadWidgetPackageArtifacts, validateCrossReferences, validateSingleSourceWidgetPackage, validateWidgetPublishOutDir, versionCommand, widgetCommand, writeFileSafe, writeFluidrcProfile, writeMappings, writeSnapshot };
1386
1020
  //# sourceMappingURL=index.d.mts.map