@postplus/cli 0.1.29 → 0.1.30
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/build/doctor.js +16 -1
- package/package.json +1 -1
package/build/doctor.js
CHANGED
|
@@ -166,6 +166,11 @@ async function checkHostedCapabilities(input, skillScope) {
|
|
|
166
166
|
.map((value) => readCapabilityFailureLabel(value, skillScope))
|
|
167
167
|
.filter((value) => value !== null);
|
|
168
168
|
if (skillScope && hasHostedRequirements(skillScope.skill.requirements)) {
|
|
169
|
+
const subscription = readSubscriptionStatusField(payload).label;
|
|
170
|
+
if (requiresSocialPublishingPlan(skillScope.skill.requirements) &&
|
|
171
|
+
subscription === 'none') {
|
|
172
|
+
failedLabels.push(`PostPlus Plus or Pro plan required; current subscription ${subscription}`);
|
|
173
|
+
}
|
|
169
174
|
const missingRequirements = collectMissingHostedRequirementLabels(relevantCapabilities, skillScope.skill.requirements);
|
|
170
175
|
failedLabels.push(...missingRequirements);
|
|
171
176
|
}
|
|
@@ -261,7 +266,7 @@ function capabilityMatchesRequirements(capability, requirements) {
|
|
|
261
266
|
if (prefix &&
|
|
262
267
|
suffix &&
|
|
263
268
|
hostedCapabilities.has(prefix) &&
|
|
264
|
-
requirementKeys.has(suffix)) {
|
|
269
|
+
(isWholeFamilyHostedCapability(prefix) || requirementKeys.has(suffix))) {
|
|
265
270
|
return true;
|
|
266
271
|
}
|
|
267
272
|
return requirementKeys.has(identifier) || requirementKeys.has(suffix);
|
|
@@ -310,6 +315,12 @@ function collectHostedRequirementKeys(requirements) {
|
|
|
310
315
|
...requirements.sourceKeys,
|
|
311
316
|
]);
|
|
312
317
|
}
|
|
318
|
+
function isWholeFamilyHostedCapability(prefix) {
|
|
319
|
+
return prefix === 'social-publishing';
|
|
320
|
+
}
|
|
321
|
+
function requiresSocialPublishingPlan(requirements) {
|
|
322
|
+
return requirements.hostedCapabilities.includes('social-publishing');
|
|
323
|
+
}
|
|
313
324
|
function hasHostedRequirements(requirements) {
|
|
314
325
|
return (requirements.accountConnections.length > 0 ||
|
|
315
326
|
requirements.collectionKeys.length > 0 ||
|
|
@@ -337,6 +348,10 @@ function identifierMatchesKey(identifier, key) {
|
|
|
337
348
|
if (identifier === key) {
|
|
338
349
|
return true;
|
|
339
350
|
}
|
|
351
|
+
if (key === 'social-publishing-workspace' &&
|
|
352
|
+
identifierMatchesCapability(identifier, 'social-publishing')) {
|
|
353
|
+
return true;
|
|
354
|
+
}
|
|
340
355
|
const [, suffix] = splitCapabilityIdentifier(identifier);
|
|
341
356
|
return suffix === key;
|
|
342
357
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postplus/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"packageManager": "pnpm@10.30.3+sha512.c961d1e0a2d8e354ecaa5166b822516668b7f44cb5bd95122d590dd81922f606f5473b6d23ec4a5be05e7fcd18e8488d47d978bbe981872f1145d06e9a740017",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "PostPlus CLI for PostPlus Cloud auth, status, and diagnostics.",
|