@fluid-app/fluid-cli-droplets 0.1.126 → 0.1.128

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/dist/index.mjs CHANGED
@@ -247,10 +247,9 @@ function apiStatus(error) {
247
247
  const status = error.status;
248
248
  return typeof status === "number" ? status : void 0;
249
249
  }
250
- /** Publish review is released per publishing company; without it the
251
- * request endpoints answer 404. */
250
+ /** The request endpoints answer 404 for a droplet another company owns. */
252
251
  function notAvailable(dropletUuid) {
253
- return new DropletsCliError(`${dropletUuid} is not one of this company's droplets, or asking Fluid to publish is not turned on for this company.`);
252
+ return new DropletsCliError(`${dropletUuid} is not one of this company's droplets.`);
254
253
  }
255
254
  /**
256
255
  * Ask Fluid to publish a draft or internal droplet. Asking again while a
@@ -281,15 +280,14 @@ async function withdrawPublish(client, dropletUuid) {
281
280
  }
282
281
  }
283
282
  /**
284
- * Where a droplet stands: its status, whether this company can ask Fluid to
285
- * publish it, and Fluid's latest decision (with the reason once rejected).
283
+ * Where a droplet stands: its status and Fluid's latest publish decision
284
+ * (with the reason once rejected).
286
285
  */
287
286
  async function publishStatus(client, dropletUuid) {
288
287
  const detail = await client.get(`/api/company/v2026-10/droplets/${encodeURIComponent(dropletUuid)}`);
289
288
  return {
290
289
  droplet_uuid: dropletUuid,
291
290
  status: detail.droplet?.status,
292
- publish_review_available: detail.droplet?.publish_review_available === true,
293
291
  latest_publish_review: detail.droplet?.latest_publish_review ?? null
294
292
  };
295
293
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-app/fluid-cli-droplets",
3
- "version": "0.1.126",
3
+ "version": "0.1.128",
4
4
  "description": "Fluid CLI commands for droplet management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -17,7 +17,7 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "@fluid-app/fluid-cli": "0.1.122",
20
+ "@fluid-app/fluid-cli": "0.1.123",
21
21
  "commander": "^12.0.0"
22
22
  },
23
23
  "devDependencies": {
@@ -69,7 +69,7 @@ describe("requestPublish", () => {
69
69
  expect(calls).toEqual([{ method: "POST", endpoint: path }]);
70
70
  });
71
71
 
72
- it("explains a 404: not the company's droplet, or not turned on", async () => {
72
+ it("explains a 404: not the company's droplet", async () => {
73
73
  const { client } = fakeClient({
74
74
  [`POST ${publishRequestPath("drp_1")}`]: [apiError(404)],
75
75
  });
@@ -122,7 +122,6 @@ describe("publishStatus", () => {
122
122
  droplet: {
123
123
  uuid: "drp_1",
124
124
  status: "internal",
125
- publish_review_available: true,
126
125
  latest_publish_review: rejected,
127
126
  },
128
127
  },
@@ -132,12 +131,11 @@ describe("publishStatus", () => {
132
131
  await expect(publishStatus(client, "drp_1")).resolves.toEqual({
133
132
  droplet_uuid: "drp_1",
134
133
  status: "internal",
135
- publish_review_available: true,
136
134
  latest_publish_review: rejected,
137
135
  });
138
136
  });
139
137
 
140
- it("reads review as unavailable when the fields are missing", async () => {
138
+ it("reads no decision when the droplet has none", async () => {
141
139
  const { client } = fakeClient({
142
140
  "GET /api/company/v2026-10/droplets/drp_1": [
143
141
  { droplet: { uuid: "drp_1", status: "draft" } },
@@ -145,7 +143,6 @@ describe("publishStatus", () => {
145
143
  });
146
144
 
147
145
  await expect(publishStatus(client, "drp_1")).resolves.toMatchObject({
148
- publish_review_available: false,
149
146
  latest_publish_review: null,
150
147
  });
151
148
  });
@@ -31,7 +31,6 @@ interface DropletDetail {
31
31
  title?: string | null;
32
32
  status?: string;
33
33
  latest_publish_review?: PublishReview | null;
34
- publish_review_available?: boolean;
35
34
  };
36
35
  }
37
36
 
@@ -60,11 +59,10 @@ function apiStatus(error: unknown): number | undefined {
60
59
  return typeof status === "number" ? status : undefined;
61
60
  }
62
61
 
63
- /** Publish review is released per publishing company; without it the
64
- * request endpoints answer 404. */
62
+ /** The request endpoints answer 404 for a droplet another company owns. */
65
63
  function notAvailable(dropletUuid: string): DropletsCliError {
66
64
  return new DropletsCliError(
67
- `${dropletUuid} is not one of this company's droplets, or asking Fluid to publish is not turned on for this company.`,
65
+ `${dropletUuid} is not one of this company's droplets.`,
68
66
  );
69
67
  }
70
68
 
@@ -105,8 +103,8 @@ export async function withdrawPublish(
105
103
  }
106
104
 
107
105
  /**
108
- * Where a droplet stands: its status, whether this company can ask Fluid to
109
- * publish it, and Fluid's latest decision (with the reason once rejected).
106
+ * Where a droplet stands: its status and Fluid's latest publish decision
107
+ * (with the reason once rejected).
110
108
  */
111
109
  export async function publishStatus(
112
110
  client: DropletsClient,
@@ -114,7 +112,6 @@ export async function publishStatus(
114
112
  ): Promise<{
115
113
  droplet_uuid: string;
116
114
  status: string | undefined;
117
- publish_review_available: boolean;
118
115
  latest_publish_review: PublishReview | null;
119
116
  }> {
120
117
  const detail = await client.get<DropletDetail>(
@@ -123,7 +120,6 @@ export async function publishStatus(
123
120
  return {
124
121
  droplet_uuid: dropletUuid,
125
122
  status: detail.droplet?.status,
126
- publish_review_available: detail.droplet?.publish_review_available === true,
127
123
  latest_publish_review: detail.droplet?.latest_publish_review ?? null,
128
124
  };
129
125
  }