Skip to content

Commit

Permalink
extension namespace visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
steam0r committed Nov 15, 2024
1 parent d1b0961 commit 6ef91de
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions shared/api/utils/shared_doc_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ export default class SharedDocUtil extends SharedUtil
return cleanDocs;
}

getAllExtensionDocs(filterOldVersions = false, filterDeprecated = false)
getAllExtensionDocs(filterOldVersions = false, filterDeprecated = false, publicOnly = true)
{
const collectionPath = this._cables.getExtensionOpsPath();
const extensions = [];
Expand All @@ -679,7 +679,16 @@ export default class SharedDocUtil extends SharedUtil
catch (e) {}
exDirs.forEach((extensionName) =>
{
if (this._opsUtil.isExtension(extensionName) && this._opsUtil.getCollectionVisibility(extensionName) === this._opsUtil.VISIBILITY_PUBLIC)
if (!publicOnly)
{
const extensionOps = this._opsUtil.getCollectionOpNames(extensionName);
if (extensionOps.length > 0)
{
const extDocs = this.getExtensionDoc(extensionName, filterOldVersions, filterDeprecated);
if (extDocs) extensions.push(extDocs);
}
}
else if (this._opsUtil.isExtension(extensionName) && this._opsUtil.getCollectionVisibility(extensionName) === this._opsUtil.VISIBILITY_PUBLIC)
{
const extensionOps = this._opsUtil.getCollectionOpNames(extensionName);
if (extensionOps.length > 0)
Expand Down
1 change: 1 addition & 0 deletions shared/api/utils/shared_ops_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default class SharedOpsUtil extends SharedUtil
this.VISIBILITY_PUBLIC = "public";
this.VISIBILITY_UNLISTED = "unlisted";
this.VISIBILITY_PRIVATE = "private";
this.VISIBILITY_HIDDEN = "hidden";
this.OPS_CODE_PREFIX = "\"use strict\";\n\nvar CABLES=CABLES||{};\nCABLES.OPS=CABLES.OPS||{};\n\n";

this.cli = new this._CLIEngine(this._getCLIConfig());
Expand Down

0 comments on commit 6ef91de

Please sign in to comment.