@aglyn/plugins-marketplace 1.0.0-beta.219 → 1.0.0-beta.221

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 (28) hide show
  1. package/package.json +15 -15
  2. package/src/lib/components/listing-content.component.js +13 -7
  3. package/src/lib/components/listing-content.component.js.map +1 -1
  4. package/src/lib/components/marketplace-browse.component.js +21 -19
  5. package/src/lib/components/marketplace-browse.component.js.map +1 -1
  6. package/src/lib/components/org-publish-panel.component.js +12 -3
  7. package/src/lib/components/org-publish-panel.component.js.map +1 -1
  8. package/src/lib/components/publish-artifact-dialog.component.js +1 -1
  9. package/src/lib/components/publish-artifact-dialog.component.js.map +1 -1
  10. package/src/lib/components/publish-plugin-form.component.js +2 -1
  11. package/src/lib/components/publish-plugin-form.component.js.map +1 -1
  12. package/src/lib/model/listing-price-floor.d.ts +123 -0
  13. package/src/lib/model/listing-price-floor.js +170 -0
  14. package/src/lib/model/listing-price-floor.js.map +1 -0
  15. package/src/lib/model/marketplace.js +1 -1
  16. package/src/lib/model/marketplace.js.map +1 -1
  17. package/src/lib/server/admin-reviews.js +127 -18
  18. package/src/lib/server/admin-reviews.js.map +1 -1
  19. package/src/lib/server/publish-plugin.js +3 -1
  20. package/src/lib/server/publish-plugin.js.map +1 -1
  21. package/src/lib/server/revenue-source.js +2 -2
  22. package/src/lib/server/revenue-source.js.map +1 -1
  23. package/src/lib/server/sale-risk.d.ts +4 -2
  24. package/src/lib/server/sale-risk.js +28 -7
  25. package/src/lib/server/sale-risk.js.map +1 -1
  26. package/src/lib/testing/stand-in-dataset-list.d.ts +30 -0
  27. package/src/lib/testing/stand-in-dataset-list.js +71 -0
  28. package/src/lib/testing/stand-in-dataset-list.js.map +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-marketplace",
3
- "version": "1.0.0-beta.219",
3
+ "version": "1.0.0-beta.221",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,19 +25,19 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.0.0-beta.219",
29
- "@aglyn/aglyn-markdown-editor": "1.0.0-beta.219",
30
- "@aglyn/shared-data-enums": "1.0.0-beta.219",
31
- "@aglyn/shared-data-mdi": "1.0.0-beta.219",
32
- "@aglyn/shared-ui-jsx": "1.0.0-beta.219",
33
- "@aglyn/shared-ui-next": "1.0.0-beta.219",
34
- "@aglyn/shared-ui-snackstack": "1.0.0-beta.219",
35
- "@aglyn/shared-util-email": "1.0.0-beta.219",
36
- "@aglyn/shared-util-http": "1.0.0-beta.219",
37
- "@aglyn/shared-util-timestamp": "1.0.0-beta.219",
38
- "@aglyn/tenant-data-admin": "1.0.0-beta.219",
39
- "@aglyn/tenant-feature-instance": "1.0.0-beta.219",
40
- "@aglyn/tenant-runtime": "1.0.0-beta.219",
28
+ "@aglyn/aglyn": "1.0.0-beta.221",
29
+ "@aglyn/aglyn-markdown-editor": "1.0.0-beta.221",
30
+ "@aglyn/shared-data-enums": "1.0.0-beta.221",
31
+ "@aglyn/shared-data-mdi": "1.0.0-beta.221",
32
+ "@aglyn/shared-ui-jsx": "1.0.0-beta.221",
33
+ "@aglyn/shared-ui-next": "1.0.0-beta.221",
34
+ "@aglyn/shared-ui-snackstack": "1.0.0-beta.221",
35
+ "@aglyn/shared-util-email": "1.0.0-beta.221",
36
+ "@aglyn/shared-util-http": "1.0.0-beta.221",
37
+ "@aglyn/shared-util-timestamp": "1.0.0-beta.221",
38
+ "@aglyn/tenant-data-admin": "1.0.0-beta.221",
39
+ "@aglyn/tenant-feature-instance": "1.0.0-beta.221",
40
+ "@aglyn/tenant-runtime": "1.0.0-beta.221",
41
41
  "@swc/helpers": "0.5.23"
42
42
  },
43
43
  "peerDependencies": {
@@ -45,7 +45,7 @@
45
45
  "@mui/x-data-grid": "^9.12.0",
46
46
  "firebase": "^12.18.0",
47
47
  "firebase-admin": "^14.3.0",
48
- "next": "16.3.3",
48
+ "next": "^16.3.3",
49
49
  "react": "^19.2.8"
50
50
  },
51
51
  "sideEffects": false,
@@ -34,6 +34,7 @@ import { useConsoleHostRoute, useFirestore, useFirestoreCollection, useFirestore
34
34
  * Firestore hooks, and a query builder imported through that barrel disappears
35
35
  * under the mock. Neither of these is a hook.
36
36
  */ import { ceilingedWindow, collectionCeiling } from "@aglyn/tenant-feature-instance/hooks/host-collection-queries";
37
+ import { pluginRecordListQuery, pluginRecordsFromRows } from "@aglyn/aglyn/plugin-manager/plugin-record-lists";
37
38
  import ListingReviews from "./listing-reviews.component.js";
38
39
  import ReportTarget from "./report-target.component.js";
39
40
  import PluginSiteSet from "./plugin-site-set.component.js";
@@ -577,10 +578,15 @@ export function ListingReadme({ readme }) {
577
578
  *
578
579
  * `documentId()` is what the existing composite index on
579
580
  * (`source.listingId`, `visibleTo`) already orders by — Firestore appends the
580
- * document name to every index — so this needs no new one.
581
- */ const { data: datasetInstalls } = useFirestoreCollection(()=>orgId && scopeLoaded ? query(collection(firestore, 'orgs', orgId, 'datasets'), where('source.listingId', '==', listingId || '-missing-'), ...needsScope ? [
582
- where('visibleTo', 'array-contains-any', scopeTokens)
583
- ] : [], orderBy(documentId()), limit(ARTIFACT_INSTALL_CEILING)) : null, [
581
+ * document name to every index — so this needs no new one. The datasets are
582
+ * the data plugin's, asked through the source it publishes (AGL-3080),
583
+ * which orders them the same way.
584
+ */ const { data: datasetInstalls } = useFirestoreCollection(()=>orgId && scopeLoaded ? pluginRecordListQuery('dataset', firestore, {
585
+ orgId,
586
+ installedFrom: listingId || '-missing-',
587
+ memberScope: needsScope ? scopeTokens : null,
588
+ limit: ARTIFACT_INSTALL_CEILING
589
+ }) : null, [
584
590
  firestore,
585
591
  orgId,
586
592
  scopeLoaded,
@@ -614,10 +620,10 @@ export function ListingReadme({ readme }) {
614
620
  const artifactInstall = useMemo(()=>{
615
621
  if (artifactType === 'datasetSchema') {
616
622
  var _ref;
617
- var _hit_source;
618
- const hit = (datasetInstalls != null ? datasetInstalls : []).find((entry)=>!entry.deletedAt);
623
+ const hit = pluginRecordsFromRows('dataset', datasetInstalls)[0];
624
+ const origin = hit == null ? void 0 : hit.facts['installedFrom'];
619
625
  return hit ? {
620
- version: (_ref = (_hit_source = hit.source) == null ? void 0 : _hit_source.version) != null ? _ref : null
626
+ version: (_ref = origin == null ? void 0 : origin.version) != null ? _ref : null
621
627
  } : undefined;
622
628
  }
623
629
  if (artifactType === 'emailTemplate') {