@aglyn/plugins-marketplace 1.15.2 → 1.17.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.
Files changed (32) hide show
  1. package/package.json +15 -15
  2. package/src/lib/components/listing-content.component.js +32 -14
  3. package/src/lib/components/listing-content.component.js.map +1 -1
  4. package/src/lib/components/site-plugin-connections-card.component.js +4 -3
  5. package/src/lib/components/site-plugin-connections-card.component.js.map +1 -1
  6. package/src/lib/model/editor-connections.d.ts +1 -1
  7. package/src/lib/model/editor-connections.js +13 -2
  8. package/src/lib/model/editor-connections.js.map +1 -1
  9. package/src/lib/model/marketplace.d.ts +11 -0
  10. package/src/lib/model/marketplace.js +12 -2
  11. package/src/lib/model/marketplace.js.map +1 -1
  12. package/src/lib/model/plugin-connection-card.d.ts +6 -0
  13. package/src/lib/model/plugin-connection-card.js +8 -0
  14. package/src/lib/model/plugin-connection-card.js.map +1 -1
  15. package/src/lib/model/plugin-connections.d.ts +14 -0
  16. package/src/lib/model/plugin-connections.js +18 -1
  17. package/src/lib/model/plugin-connections.js.map +1 -1
  18. package/src/lib/native-nav.js +26 -1
  19. package/src/lib/native-nav.js.map +1 -1
  20. package/src/lib/server/admin-reviews.js +9 -0
  21. package/src/lib/server/admin-reviews.js.map +1 -1
  22. package/src/lib/server/admin-trust.js +11 -0
  23. package/src/lib/server/admin-trust.js.map +1 -1
  24. package/src/lib/server/connections/site-records-platform.js +8 -5
  25. package/src/lib/server/connections/site-records-platform.js.map +1 -1
  26. package/src/lib/server/install-plugin.js +34 -19
  27. package/src/lib/server/install-plugin.js.map +1 -1
  28. package/src/lib/server/listing-versions.js +7 -2
  29. package/src/lib/server/listing-versions.js.map +1 -1
  30. package/src/lib/server/revoke-cache-drop.d.ts +29 -34
  31. package/src/lib/server/revoke-cache-drop.js +43 -49
  32. package/src/lib/server/revoke-cache-drop.js.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-marketplace",
3
- "version": "1.15.2",
3
+ "version": "1.17.0",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,20 +25,20 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.15.2",
29
- "@aglyn/aglyn-markdown-editor": "1.15.2",
30
- "@aglyn/shared-data-enums": "1.15.2",
31
- "@aglyn/shared-data-mdi": "1.15.2",
32
- "@aglyn/shared-ui-jsx": "1.15.2",
33
- "@aglyn/shared-ui-next": "1.15.2",
34
- "@aglyn/shared-ui-snackstack": "1.15.2",
35
- "@aglyn/shared-util-email": "1.15.2",
36
- "@aglyn/shared-util-http": "1.15.2",
37
- "@aglyn/shared-util-timestamp": "1.15.2",
38
- "@aglyn/shared-util-tools": "1.15.2",
39
- "@aglyn/tenant-data-admin": "1.15.2",
40
- "@aglyn/tenant-feature-instance": "1.15.2",
41
- "@aglyn/tenant-runtime": "1.15.2",
28
+ "@aglyn/aglyn": "1.17.0",
29
+ "@aglyn/aglyn-markdown-editor": "1.17.0",
30
+ "@aglyn/shared-data-enums": "1.17.0",
31
+ "@aglyn/shared-data-mdi": "1.17.0",
32
+ "@aglyn/shared-ui-jsx": "1.17.0",
33
+ "@aglyn/shared-ui-next": "1.17.0",
34
+ "@aglyn/shared-ui-snackstack": "1.17.0",
35
+ "@aglyn/shared-util-email": "1.17.0",
36
+ "@aglyn/shared-util-http": "1.17.0",
37
+ "@aglyn/shared-util-timestamp": "1.17.0",
38
+ "@aglyn/shared-util-tools": "1.17.0",
39
+ "@aglyn/tenant-data-admin": "1.17.0",
40
+ "@aglyn/tenant-feature-instance": "1.17.0",
41
+ "@aglyn/tenant-runtime": "1.17.0",
42
42
  "@swc/helpers": "0.5.23"
43
43
  },
44
44
  "peerDependencies": {
@@ -76,6 +76,20 @@ const renderInlines = (inlines)=>inlines.map((inline, index)=>{
76
76
  return /*#__PURE__*/ _jsx("em", {
77
77
  children: inline.text
78
78
  }, index);
79
+ // A setting, host or scope the README names in backticks (AGL-4197).
80
+ case 'code':
81
+ return /*#__PURE__*/ _jsx(Box, {
82
+ component: "code",
83
+ sx: {
84
+ px: 0.5,
85
+ borderRadius: 0.5,
86
+ bgcolor: 'action.hover',
87
+ fontFamily: 'monospace',
88
+ fontSize: '0.9em',
89
+ overflowWrap: 'anywhere'
90
+ },
91
+ children: inline.text
92
+ }, index);
79
93
  case 'link':
80
94
  {
81
95
  /*
@@ -106,7 +120,7 @@ const renderInlines = (inlines)=>inlines.map((inline, index)=>{
106
120
  });
107
121
  /**
108
122
  * Publisher README (AGL-431), rendered through markdown-lite — the parser
109
- * only ever emits text/bold/italic/http(s)-links/images, so publisher-
123
+ * only ever emits text/bold/italic/code/http(s)-links/images, so publisher-
110
124
  * written docs can't inject markup or javascript: URLs. Code blocks and
111
125
  * tables carry text only (AGL-974); the same guarantee holds for both.
112
126
  */ /**
@@ -191,7 +205,9 @@ const renderInlines = (inlines)=>inlines.map((inline, index)=>{
191
205
  }
192
206
  // Exported for the renderer-parity spec (AGL-1315).
193
207
  export function ListingReadme({ readme }) {
194
- const blocks = useMemo(()=>parseMarkdownLite(readme.slice(0, LISTING_README_MAX_CHARS)), [
208
+ const blocks = useMemo(()=>parseMarkdownLite(readme.slice(0, LISTING_README_MAX_CHARS), {
209
+ inlineCode: true
210
+ }), [
195
211
  readme
196
212
  ]);
197
213
  return /*#__PURE__*/ _jsx(Stack, {
@@ -379,7 +395,7 @@ export function ListingReadme({ readme }) {
379
395
  * 'marketplaceListing' widget slot. Full description, preview image,
380
396
  * version history, publisher block, and the install/buy CTA.
381
397
  */ export function MarketplaceListingContent({ hostId, listingId, permissions, orgScoped, orgSlug: orgSlugProp, hosts }) {
382
- var _ref, _ref1, _pluginState_scope, _ref2, _ref3, _ref4, _listing_ratingAverage, _listing_ratingAverage1, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19;
398
+ var _ref, _ref1, _pluginState_scope, _ref2, _ref3, _ref4, _listing_ratingAverage, _listing_ratingAverage1, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20;
383
399
  var _componentInstall_marketplace, _profile_displayName;
384
400
  // The publisher link was `/{hostDocId}/marketplace/publisher/{id}` — the
385
401
  // pre-AGL-621 shape, dead since. The sibling browse grid was fixed for
@@ -1331,7 +1347,9 @@ export function ListingReadme({ readme }) {
1331
1347
  children: "What's included"
1332
1348
  }),
1333
1349
  listingInclusions(listing != null ? listing : {}, {
1334
- reviewedVersion: (listing == null ? void 0 : listing.latestVersionReviewState) === 'approved'
1350
+ reviewedVersion: (listing == null ? void 0 : listing.latestVersionReviewState) === 'approved',
1351
+ realmTrusted: (latestEntry == null ? void 0 : latestEntry.trust) === 'realm',
1352
+ connections: (_ref9 = latestEntry == null ? void 0 : latestEntry.connections) != null ? _ref9 : []
1335
1353
  }).map((row)=>/*#__PURE__*/ _jsxs(Stack, {
1336
1354
  direction: "row",
1337
1355
  spacing: 1,
@@ -1586,14 +1604,14 @@ export function ListingReadme({ readme }) {
1586
1604
  children: [
1587
1605
  /*#__PURE__*/ _jsx(Avatar, {
1588
1606
  src: safePublisherImageSrc(profile == null ? void 0 : profile.avatarUrl),
1589
- alt: (_ref9 = profile == null ? void 0 : profile.displayName) != null ? _ref9 : 'Publisher',
1607
+ alt: (_ref10 = profile == null ? void 0 : profile.displayName) != null ? _ref10 : 'Publisher',
1590
1608
  variant: "rounded",
1591
1609
  sx: {
1592
1610
  width: 40,
1593
1611
  height: 40,
1594
1612
  mb: 0.5
1595
1613
  },
1596
- children: String((_ref10 = (_ref11 = profile == null ? void 0 : profile.displayName) != null ? _ref11 : profile == null ? void 0 : profile.handle) != null ? _ref10 : '?').slice(0, 1).toUpperCase()
1614
+ children: String((_ref11 = (_ref12 = profile == null ? void 0 : profile.displayName) != null ? _ref12 : profile == null ? void 0 : profile.handle) != null ? _ref11 : '?').slice(0, 1).toUpperCase()
1597
1615
  }),
1598
1616
  /*#__PURE__*/ _jsx(MuiLink, {
1599
1617
  href: !(listing == null ? void 0 : listing.profileId) ? undefined : orgScoped ? orgSlug ? buildRoute(Route.ORG_MARKETPLACE_PUBLISHER, {
@@ -1601,15 +1619,15 @@ export function ListingReadme({ readme }) {
1601
1619
  // Handle, not id (AGL-1001); the id
1602
1620
  // still resolves for the beat
1603
1621
  // before the profile loads.
1604
- handle: (_ref12 = profile == null ? void 0 : profile.handle) != null ? _ref12 : listing.profileId
1622
+ handle: (_ref13 = profile == null ? void 0 : profile.handle) != null ? _ref13 : listing.profileId
1605
1623
  }) : undefined : orgSlug && subdomain ? buildRoute(Route.ORG_MARKETPLACE_PUBLISHER, {
1606
1624
  orgSlug,
1607
- handle: (_ref13 = profile == null ? void 0 : profile.handle) != null ? _ref13 : listing.profileId
1625
+ handle: (_ref14 = profile == null ? void 0 : profile.handle) != null ? _ref14 : listing.profileId
1608
1626
  }) : undefined,
1609
1627
  color: "primary",
1610
1628
  underline: "hover",
1611
1629
  variant: "body2",
1612
- children: (_ref14 = profile == null ? void 0 : profile.displayName) != null ? _ref14 : (profile == null ? void 0 : profile.handle) ? `@${profile.handle}` : '…'
1630
+ children: (_ref15 = profile == null ? void 0 : profile.displayName) != null ? _ref15 : (profile == null ? void 0 : profile.handle) ? `@${profile.handle}` : '…'
1613
1631
  }),
1614
1632
  (profile == null ? void 0 : profile.handle) ? /*#__PURE__*/ _jsx(Typography, {
1615
1633
  variant: "caption",
@@ -1787,7 +1805,7 @@ export function ListingReadme({ readme }) {
1787
1805
  }) : versionHistory.length === 0 ? /*#__PURE__*/ _jsx(Typography, {
1788
1806
  variant: "body2",
1789
1807
  color: "text.secondary",
1790
- children: `Latest version: v${(_ref15 = listing == null ? void 0 : listing.latestVersion) != null ? _ref15 : '…'}`
1808
+ children: `Latest version: v${(_ref16 = listing == null ? void 0 : listing.latestVersion) != null ? _ref16 : '…'}`
1791
1809
  }) : /*#__PURE__*/ _jsx(Stack, {
1792
1810
  spacing: 0.5,
1793
1811
  children: versionHistory.map((entry, index)=>{
@@ -1823,7 +1841,7 @@ export function ListingReadme({ readme }) {
1823
1841
  }),
1824
1842
  /*#__PURE__*/ _jsx(ReportTarget, {
1825
1843
  listingId: listingId,
1826
- label: String((_ref16 = listing == null ? void 0 : listing.displayName) != null ? _ref16 : 'this listing')
1844
+ label: String((_ref17 = listing == null ? void 0 : listing.displayName) != null ? _ref17 : 'this listing')
1827
1845
  })
1828
1846
  ]
1829
1847
  })
@@ -1892,7 +1910,7 @@ export function ListingReadme({ readme }) {
1892
1910
  /*#__PURE__*/ _jsx(ArtifactUpdateDialog, {
1893
1911
  open: updateOpen,
1894
1912
  onClose: ()=>setUpdateOpen(false),
1895
- artifactName: (_ref17 = listing == null ? void 0 : listing.displayName) != null ? _ref17 : 'this listing',
1913
+ artifactName: (_ref18 = listing == null ? void 0 : listing.displayName) != null ? _ref18 : 'this listing',
1896
1914
  preview: updatePreview,
1897
1915
  loading: updateLoading,
1898
1916
  onApplyMerge: (takePaths, confirmDestructive)=>void runUpdate('merge', takePaths, confirmDestructive),
@@ -1901,8 +1919,8 @@ export function ListingReadme({ readme }) {
1901
1919
  /*#__PURE__*/ _jsx(UninstallImpactDialog, {
1902
1920
  open: pendingUninstall !== null,
1903
1921
  listing: listing,
1904
- scope: (_ref18 = pendingUninstall == null ? void 0 : pendingUninstall.scope) != null ? _ref18 : 'host',
1905
- targets: (_ref19 = pendingUninstall == null ? void 0 : pendingUninstall.targets) != null ? _ref19 : [],
1922
+ scope: (_ref19 = pendingUninstall == null ? void 0 : pendingUninstall.scope) != null ? _ref19 : 'host',
1923
+ targets: (_ref20 = pendingUninstall == null ? void 0 : pendingUninstall.targets) != null ? _ref20 : [],
1906
1924
  onCancel: ()=>setPendingUninstall(null),
1907
1925
  onConfirm: async ()=>{
1908
1926
  const target = pendingUninstall;