Home Reference Source
import {SharedOpsUtil} from 'cables-shared-api'
public class | source

SharedOpsUtil

Extends:

cables_dev/shared/api/shared_util.js~SharedUtil → SharedOpsUtil

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

FXHASH_OP_NAME: string

public
public

INFIX_DEVOPS: string

public
public

INVISIBLE_NAMESPACES: undefined[]

public

OPS_CODE_PREFIX: string

public

OP_NAMESPACE_SUMMARIES: undefined[]

public
public
public
public
public
public
public
public

PATCHOPS_ID_REPLACEMENTS: {"-": string}

public
public

PREFIX_OPS: string

public

PREFIX_PATCHOPS: string

public

PREFIX_TEAMOPS: string

public

PREFIX_USEROPS: string

public
public
public

SUFFIX_VERSION: string

public
public
public
public
public

cli: *

public get
Private Members
private

Method Summary

Public Methods
public

addAttachment(opName: *, attName: *, content: *): *

public

addOpChangelog(user: *, opName: *, newEntry: *, referenceDate: undefined, update: boolean)

public

addOpDependency(opName: *, newDependency: *): boolean

public

addOpDependencyFile(opName: *, fileName: *, buffer: *): boolean

public

addOpDocsForCollections(opNames: *, opDocs: *[], forceRebuild: boolean): *

public

addPermissionsToOps(ops: *, user: *, teams: *[], project: undefined): *

public

addVersionInfoToOps(opDocs: *, forceUpdate: boolean): *

public

buildCode(basePath: *, codePrefix: *, filterOldVersions: boolean, filterDeprecated: boolean, opDocs: undefined): *

public

buildFullCode(ops: *, codePrefix: *, filterOldVersions: boolean, filterDeprecated: boolean, opDocs: undefined, prepareForExport: boolean, minifyGlsl: boolean): *

public

buildOpDocsForCollection(collectionName: *, singleOpName: boolean): *

public

buildPreviewCode(opNames: *): *

public

cloneOp(oldName: *, newName: *, user: *, targetDir: undefined): {"name": *, "id": *, "opDoc": *, "code": *, "attachments": *}

public

createOp(opName: *, author: *, code: undefined, opDocDefaults: undefined, attachments: undefined, targetDir: undefined): *

public

deleteAttachment(opName: *, attName: *): boolean

public

deleteOp(opName: *): boolean

public
public

getAllOps(sessionUser: *, opDocs: *): *

public
public
public
public

getAttachment(opName: *, attachmentName: *): *

public

getAttachmentFiles(opName: *): *

public

getAttachments(opName: *): *

public

getCollectionDir(name: *, relative: boolean): *

public

getCollectionDocs(name: *): *

public

getCollectionJsonPath(name: *, create: boolean): *

public

getCollectionName(opName: *): *

public

getCollectionNamespace(opName: *): *

public

getCollectionOpDocFile(collectionName: *): *

public

getCollectionOpNames(collectionName: *, filterInvisibleOps: boolean): *

public

getCollectionVisibility(name: *, defaultVisibility: *): *

public

getExampleScreenshotPath(opName: *): *

public

getExtensionDir(name: *, relative: boolean): *

public

getExtensionJsonPath(name: *, create: boolean): *

public
public

getExtensionShortName(extensionName: *): *

public

getFullTeamNamespaceName(shortName: *): *

public

getHighestVersionNumber(opName: *, opDocs: *): *

public

getHighestVersionOpName(opName: *, opDocs: boolean): *

public

getNamespace(opname: *, topLevel: boolean): *

public

getNamespaceHierarchyProblem(outerName: *, innerName: *): boolean

public

getNextVersionOpName(opName: *, opDocs: *): *

public

getOpAbsoluteFileName(opName: *): *

public
public

getOpAbsolutePath(opName: *): *

public

getOpAssetPorts(op: *, includeLibraryAssets: boolean): *

public

getOpById(opDocs: *, id: *): *

public

getOpCode(opName: *): *

public

getOpCodeWarnings(opName: *, jsFile: undefined): *

public

getOpCoreLibs(opName: *): *[]

public

getOpDefaults(opName: *, author: undefined): *

public

getOpEnvironmentDocs(opIdentifier: *, cb: *)

public

getOpEnvironmentUrls(opIdentifier: *): *

public

getOpFileName(opName: *): *

public

getOpFullCode(fn: *, opName: *, opId: *, prepareForExport: boolean, minifyGlsl: boolean): string

public

getOpIdByObjName(objName: *): *

public

getOpInfo(opName: *): *

public

getOpJsonFilename(opName: *): *

public

getOpJsonPath(opName: *, createPath: boolean): *

public

getOpLibs(opName: *): *[]

public

getOpNameByAbsoluteFileName(fileName: *): string

public

getOpNameById(id: *): string

public

getOpNameWithoutVersion(opname: *): *

public

getOpRenameConsequences(newName: *, oldName: *): *

public

getOpRenameProblems(newName: *, oldName: *, userObj: *, teams: *[], newOpProject: undefined, oldOpProject: undefined, opUsages: *[], checkUsages: boolean, targetDir: undefined): *

public

getOpSVG(opName: *, backgroundOptions: *): *

public

getOpShortName(opName: *): *

public

getOpSourceDir(opName: *, relative: boolean): *

public

getOpTargetDir(opName: *, relative: boolean): *

public

getOpVersionNumbers(opname: *, opDocs: *): *

public

getPatchIdFromOpName(opName: *): *

public

getPatchOpDir(name: *, relative: boolean): *

public

getPatchOpNamespace(opName: *): *

public
public

getPortTypeString(type: *): string

public

getScreenshot(opName: *): *

public

getSubPatchOpAttachment(opName: *): *

public

getTeamNamespaceByOpName(opName: *): *

public

getTeamNamespaceDir(name: *, relative: boolean): *

public

getTeamNamespaceJsonPath(name: *, create: boolean): *

public

getTeamNamespaceShortName(namespaceName: *): *

public

getTeamOpNames(team: *): *

public

getUserNamespace(username: *): *

public

getVersionFromOpName(opname: *): number

public

isCallbackOp(opname: *): *

public

isCollection(name: *): *

public

isCoreNamespace(namespace: *): *

public

isCoreOp(opName: *): *

public

isDeprecated(opname: *): *

public

isDevOp(opname: *): *

public

isExtension(name: *): *

public

isExtensionNamespace(name: *): *

public

isExtensionOp(opname: *): *

public

isExtensionOpOfTeam(opname: *, team: *): *

public

isFunctionOp(opname: *): *

public

isInvisible(opName: *): *

public

isOpId(id: *): *

public

isOpNameValid(name: *): *

public

isOpOfTeam(opName: *, team: *): *

public

isOpOldVersion(opname: *, opDocs: undefined): boolean

public

isPatchOp(opname: *): boolean

public

isPatchOpNamespace(name: *): *

public

isPatchOpOfProject(opname: *, project: *): *

public

isPrivateOp(opname: *): *

public

isStandaloneOp(opname: *): *

public

isSubPatch(opname: *): *

public

isSubPatchOp(op: *): *

public

isTeamNamespace(name: *): *

public

isTeamOp(opname: *): *

public

isTeamOpOfTeam(opName: *, team: *): *

public

isUserOp(opName: *): *

public

isUserOpNamespace(name: *): *

public

isVariableSetter(opname: *): *

public

namespaceExists(namespaceName: *, opDocs: undefined): boolean

public

namespaceExistsInCore(name: *, opDocs: *): *

public

opExists(opName: *, updateCache: boolean): *

public

opGetNamespaceColor(ns: *): string

public

opGetPortColor(type: *): string

public

opNameTaken(opName: *, caseSensitive: boolean): boolean

public

ownsUserOp(opname: *, user: *): boolean

public

removeOpChangelog(user: *, opName: *, date: *)

public

removeOpDependency(opName: *, dep: *): boolean

public

renameToCoreOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): *

public

renameToExtensionOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): *

public

renameToPatchOp(oldName: *, newName: *, currentUser: *, removeOld: *, newId: *, cb: undefined): *

public

renameToTeamOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): *

public

renameToUserOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): *

public

saveLayout(opName: *, layout: *): boolean

public

setOpDefaults(opname: *, author: undefined): *

public

updateAttachment(opName: *, attName: *, content: *, force: boolean, res: boolean): *

public

updateAttachments(opName: *, attachments: *): *

public

updateCoreLibs(opName: *, libNames: *): *

public

updateOp(user: *, opName: *, updates: *, options: {}): *

public

updateOpCode(opName: *, author: *, code: *): *

public

userHasWriteRightsOp(user: *, opName: *, teams: *[], project: undefined, ignoreAdmin: boolean): boolean

public
Private Methods
private

_getCLIConfig(): {"fix": boolean, "baseConfig": *, "envs": *, "useEslintrc": *, "globals": *, "env": *, "parserOptions": *, "rules": *}

private

_getErrorSvg(opName: *, err: *, backgroundOptions: *): *

private

_minifyGlsl(glsl: *): *

private

_renameOp(oldName: *, newName: *, currentUser: *, formatCode: *, removeOld: *, newId: *, oldOpDir: *, newOpDir: *, cb: undefined): boolean

private

_writeOpChangelog(opName: *, changes: *, update: boolean)

Public Constructors

public constructor() source

Public Members

public FXHASH_OP_NAME: string source

public INFIX_DEPRECATED: string source

public INFIX_DEVOPS: string source

public INFIX_STANDALONEOPS: string source

public INVISIBLE_NAMESPACES: undefined[] source

public OPS_CODE_PREFIX: string source

public OP_NAMESPACE_SUMMARIES: undefined[] source

public OP_NAME_MIN_LENGTH: number source

public OP_PORT_TYPE_ARRAY: number source

public OP_PORT_TYPE_DYNAMIC: number source

public OP_PORT_TYPE_NUMBER: number source

public OP_PORT_TYPE_OBJECT: number source

public OP_PORT_TYPE_STRING: number source

public OP_PORT_TYPE_TRIGGER: number source

public PATCHOPS_ID_REPLACEMENTS: {"-": string} source

public PREFIX_EXTENSIONOPS: string source

public PREFIX_OPS: string source

public PREFIX_PATCHOPS: string source

public PREFIX_TEAMOPS: string source

public PREFIX_USEROPS: string source

public SUBPATCH_ATTACHMENT_NAME: string source

public SUBPATCH_ATTACHMENT_PORTS: string source

public SUFFIX_VERSION: string source

public VISIBILITY_HIDDEN: string source

public VISIBILITY_PRIVATE: string source

public VISIBILITY_PUBLIC: string source

public VISIBILITY_UNLISTED: string source

public cli: * source

public get utilName: * source

Private Members

private _CLIEngine: * source

Public Methods

public addAttachment(opName: *, attName: *, content: *): * source

Params:

NameTypeAttributeDescription
opName *
attName *
content *

Return:

*

public addOpChangelog(user: *, opName: *, newEntry: *, referenceDate: undefined, update: boolean) source

Params:

NameTypeAttributeDescription
user *
opName *
newEntry *
referenceDate undefined
  • optional
  • default: undefined
update boolean
  • optional
  • default: false

public addOpDependency(opName: *, newDependency: *): boolean source

Params:

NameTypeAttributeDescription
opName *
newDependency *

Return:

boolean

public addOpDependencyFile(opName: *, fileName: *, buffer: *): boolean source

Params:

NameTypeAttributeDescription
opName *
fileName *
buffer *

Return:

boolean

public addOpDocsForCollections(opNames: *, opDocs: *[], forceRebuild: boolean): * source

Params:

NameTypeAttributeDescription
opNames *
opDocs *[]
  • optional
  • default: []
forceRebuild boolean
  • optional
  • default: false

Return:

*

public addPermissionsToOps(ops: *, user: *, teams: *[], project: undefined): * source

Params:

NameTypeAttributeDescription
ops *
user *
teams *[]
  • optional
  • default: []
project undefined
  • optional
  • default: undefined

Return:

*

public addVersionInfoToOps(opDocs: *, forceUpdate: boolean): * source

Params:

NameTypeAttributeDescription
opDocs *
forceUpdate boolean
  • optional
  • default: false

Return:

*

public buildCode(basePath: *, codePrefix: *, filterOldVersions: boolean, filterDeprecated: boolean, opDocs: undefined): * source

Params:

NameTypeAttributeDescription
basePath *
codePrefix *
filterOldVersions boolean
  • optional
  • default: false
filterDeprecated boolean
  • optional
  • default: false
opDocs undefined
  • optional
  • default: undefined

Return:

*

public buildFullCode(ops: *, codePrefix: *, filterOldVersions: boolean, filterDeprecated: boolean, opDocs: undefined, prepareForExport: boolean, minifyGlsl: boolean): * source

Params:

NameTypeAttributeDescription
ops *
codePrefix *
filterOldVersions boolean
  • optional
  • default: false
filterDeprecated boolean
  • optional
  • default: false
opDocs undefined
  • optional
  • default: undefined
prepareForExport boolean
  • optional
  • default: false
minifyGlsl boolean
  • optional
  • default: false

Return:

*

public buildOpDocsForCollection(collectionName: *, singleOpName: boolean): * source

Params:

NameTypeAttributeDescription
collectionName *
singleOpName boolean
  • optional
  • default: false

Return:

*

public buildPreviewCode(opNames: *): * source

Params:

NameTypeAttributeDescription
opNames *

Return:

*

public cloneOp(oldName: *, newName: *, user: *, targetDir: undefined): {"name": *, "id": *, "opDoc": *, "code": *, "attachments": *} source

Params:

NameTypeAttributeDescription
oldName *
newName *
user *
targetDir undefined
  • optional
  • default: undefined

Return:

{"name": *, "id": *, "opDoc": *, "code": *, "attachments": *}

public createOp(opName: *, author: *, code: undefined, opDocDefaults: undefined, attachments: undefined, targetDir: undefined): * source

Params:

NameTypeAttributeDescription
opName *
author *
code undefined
  • optional
  • default: undefined
opDocDefaults undefined
  • optional
  • default: undefined
attachments undefined
  • optional
  • default: undefined
targetDir undefined
  • optional
  • default: undefined

Return:

*

public deleteAttachment(opName: *, attName: *): boolean source

Params:

NameTypeAttributeDescription
opName *
attName *

Return:

boolean

public deleteOp(opName: *): boolean source

Params:

NameTypeAttributeDescription
opName *

Return:

boolean

public getAllExtensionOpNames(): * source

Return:

*

public getAllOps(sessionUser: *, opDocs: *): * source

Params:

NameTypeAttributeDescription
sessionUser *
opDocs *

Return:

*

public getAllPatchOpNames(): * source

Return:

*

public getAllTeamOpNames(): * source

Return:

*

public getAllUserOpNames(): * source

Return:

*

public getAttachment(opName: *, attachmentName: *): * source

Params:

NameTypeAttributeDescription
opName *
attachmentName *

Return:

*

public getAttachmentFiles(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getAttachments(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getCollectionDir(name: *, relative: boolean): * source

Params:

NameTypeAttributeDescription
name *
relative boolean
  • optional
  • default: false

Return:

*

public getCollectionDocs(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public getCollectionJsonPath(name: *, create: boolean): * source

Params:

NameTypeAttributeDescription
name *
create boolean
  • optional
  • default: true

Return:

*

public getCollectionName(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getCollectionNamespace(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getCollectionOpDocFile(collectionName: *): * source

Params:

NameTypeAttributeDescription
collectionName *

Return:

*

public getCollectionOpNames(collectionName: *, filterInvisibleOps: boolean): * source

Params:

NameTypeAttributeDescription
collectionName *
filterInvisibleOps boolean
  • optional
  • default: false

Return:

*

public getCollectionVisibility(name: *, defaultVisibility: *): * source

Params:

NameTypeAttributeDescription
name *
defaultVisibility *
  • optional

Return:

*

public getExampleScreenshotPath(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getExtensionDir(name: *, relative: boolean): * source

Params:

NameTypeAttributeDescription
name *
relative boolean
  • optional
  • default: false

Return:

*

public getExtensionJsonPath(name: *, create: boolean): * source

Params:

NameTypeAttributeDescription
name *
create boolean
  • optional
  • default: true

Return:

*

public getExtensionNamespaceByOpName(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getExtensionShortName(extensionName: *): * source

Params:

NameTypeAttributeDescription
extensionName *

Return:

*

public getFullTeamNamespaceName(shortName: *): * source

Params:

NameTypeAttributeDescription
shortName *

Return:

*

public getHighestVersionNumber(opName: *, opDocs: *): * source

Params:

NameTypeAttributeDescription
opName *
opDocs *

Return:

*

public getHighestVersionOpName(opName: *, opDocs: boolean): * source

Params:

NameTypeAttributeDescription
opName *
opDocs boolean
  • optional
  • default: false

Return:

*

public getNamespace(opname: *, topLevel: boolean): * source

Params:

NameTypeAttributeDescription
opname *
topLevel boolean
  • optional
  • default: false

Return:

*

public getNamespaceHierarchyProblem(outerName: *, innerName: *): boolean source

Params:

NameTypeAttributeDescription
outerName *
innerName *

Return:

boolean

public getNextVersionOpName(opName: *, opDocs: *): * source

Params:

NameTypeAttributeDescription
opName *
opDocs *

Return:

*

public getOpAbsoluteFileName(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getOpAbsoluteJsonFilename(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getOpAbsolutePath(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getOpAssetPorts(op: *, includeLibraryAssets: boolean): * source

Params:

NameTypeAttributeDescription
op *
includeLibraryAssets boolean
  • optional
  • default: false

Return:

*

public getOpById(opDocs: *, id: *): * source

Params:

NameTypeAttributeDescription
opDocs *
id *

Return:

*

public getOpCode(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getOpCodeWarnings(opName: *, jsFile: undefined): * source

Params:

NameTypeAttributeDescription
opName *
jsFile undefined
  • optional
  • default: undefined

Return:

*

public getOpCoreLibs(opName: *): *[] source

Params:

NameTypeAttributeDescription
opName *

Return:

*[]

public getOpDefaults(opName: *, author: undefined): * source

Params:

NameTypeAttributeDescription
opName *
author undefined
  • optional
  • default: undefined

Return:

*

public getOpEnvironmentDocs(opIdentifier: *, cb: *) source

Params:

NameTypeAttributeDescription
opIdentifier *
cb *

public getOpEnvironmentUrls(opIdentifier: *): * source

Params:

NameTypeAttributeDescription
opIdentifier *

Return:

*

public getOpFileName(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getOpFullCode(fn: *, opName: *, opId: *, prepareForExport: boolean, minifyGlsl: boolean): string source

Params:

NameTypeAttributeDescription
fn *
opName *
opId *
prepareForExport boolean
  • optional
  • default: false
minifyGlsl boolean
  • optional
  • default: false

Return:

string

public getOpIdByObjName(objName: *): * source

Params:

NameTypeAttributeDescription
objName *

Return:

*

public getOpInfo(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getOpJsonFilename(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getOpJsonPath(opName: *, createPath: boolean): * source

Params:

NameTypeAttributeDescription
opName *
createPath boolean
  • optional
  • default: false

Return:

*

public getOpLibs(opName: *): *[] source

Params:

NameTypeAttributeDescription
opName *

Return:

*[]

public getOpNameByAbsoluteFileName(fileName: *): string source

Params:

NameTypeAttributeDescription
fileName *

Return:

string

public getOpNameById(id: *): string source

Params:

NameTypeAttributeDescription
id *

Return:

string

public getOpNameWithoutVersion(opname: *): * source

Params:

NameTypeAttributeDescription
opname *

Return:

*

public getOpRenameConsequences(newName: *, oldName: *): * source

Params:

NameTypeAttributeDescription
newName *
oldName *

Return:

*

public getOpRenameProblems(newName: *, oldName: *, userObj: *, teams: *[], newOpProject: undefined, oldOpProject: undefined, opUsages: *[], checkUsages: boolean, targetDir: undefined): * source

Params:

NameTypeAttributeDescription
newName *
oldName *
userObj *
teams *[]
  • optional
  • default: []
newOpProject undefined
  • optional
  • default: undefined
oldOpProject undefined
  • optional
  • default: undefined
opUsages *[]
  • optional
  • default: []
checkUsages boolean
  • optional
  • default: true
targetDir undefined
  • optional
  • default: undefined

Return:

*

public getOpSVG(opName: *, backgroundOptions: *): * source

Params:

NameTypeAttributeDescription
opName *
backgroundOptions *

Return:

*

public getOpShortName(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getOpSourceDir(opName: *, relative: boolean): * source

Params:

NameTypeAttributeDescription
opName *
relative boolean
  • optional
  • default: false

Return:

*

public getOpTargetDir(opName: *, relative: boolean): * source

Params:

NameTypeAttributeDescription
opName *
relative boolean
  • optional
  • default: false

Return:

*

public getOpVersionNumbers(opname: *, opDocs: *): * source

Params:

NameTypeAttributeDescription
opname *
opDocs *

Return:

*

public getPatchIdFromOpName(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getPatchOpDir(name: *, relative: boolean): * source

Params:

NameTypeAttributeDescription
name *
relative boolean
  • optional
  • default: false

Return:

*

public getPatchOpNamespace(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getPatchOpsNamespaceForProject(proj: *): * source

Params:

NameTypeAttributeDescription
proj *

Return:

*

public getPortTypeString(type: *): string source

Params:

NameTypeAttributeDescription
type *

Return:

string

public getScreenshot(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getSubPatchOpAttachment(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getTeamNamespaceByOpName(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getTeamNamespaceDir(name: *, relative: boolean): * source

Params:

NameTypeAttributeDescription
name *
relative boolean
  • optional
  • default: false

Return:

*

public getTeamNamespaceJsonPath(name: *, create: boolean): * source

Params:

NameTypeAttributeDescription
name *
create boolean
  • optional
  • default: true

Return:

*

public getTeamNamespaceShortName(namespaceName: *): * source

Params:

NameTypeAttributeDescription
namespaceName *

Return:

*

public getTeamOpNames(team: *): * source

Params:

NameTypeAttributeDescription
team *

Return:

*

public getUserNamespace(username: *): * source

Params:

NameTypeAttributeDescription
username *

Return:

*

public getVersionFromOpName(opname: *): number source

Params:

NameTypeAttributeDescription
opname *

Return:

number

public isCallbackOp(opname: *): * source

Params:

NameTypeAttributeDescription
opname *

Return:

*

public isCollection(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public isCoreNamespace(namespace: *): * source

Params:

NameTypeAttributeDescription
namespace *

Return:

*

public isCoreOp(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public isDeprecated(opname: *): * source

Params:

NameTypeAttributeDescription
opname *

Return:

*

public isDevOp(opname: *): * source

Params:

NameTypeAttributeDescription
opname *

Return:

*

public isExtension(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public isExtensionNamespace(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public isExtensionOp(opname: *): * source

Params:

NameTypeAttributeDescription
opname *

Return:

*

public isExtensionOpOfTeam(opname: *, team: *): * source

Params:

NameTypeAttributeDescription
opname *
team *

Return:

*

public isFunctionOp(opname: *): * source

Params:

NameTypeAttributeDescription
opname *

Return:

*

public isInvisible(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public isOpId(id: *): * source

Params:

NameTypeAttributeDescription
id *

Return:

*

public isOpNameValid(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public isOpOfTeam(opName: *, team: *): * source

Params:

NameTypeAttributeDescription
opName *
team *

Return:

*

public isOpOldVersion(opname: *, opDocs: undefined): boolean source

Params:

NameTypeAttributeDescription
opname *
opDocs undefined
  • optional
  • default: undefined

Return:

boolean

public isPatchOp(opname: *): boolean source

Params:

NameTypeAttributeDescription
opname *

Return:

boolean

public isPatchOpNamespace(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public isPatchOpOfProject(opname: *, project: *): * source

Params:

NameTypeAttributeDescription
opname *
project *

Return:

*

public isPrivateOp(opname: *): * source

Params:

NameTypeAttributeDescription
opname *

Return:

*

public isStandaloneOp(opname: *): * source

Params:

NameTypeAttributeDescription
opname *

Return:

*

public isSubPatch(opname: *): * source

Params:

NameTypeAttributeDescription
opname *

Return:

*

public isSubPatchOp(op: *): * source

Params:

NameTypeAttributeDescription
op *

Return:

*

public isTeamNamespace(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public isTeamOp(opname: *): * source

Params:

NameTypeAttributeDescription
opname *

Return:

*

public isTeamOpOfTeam(opName: *, team: *): * source

Params:

NameTypeAttributeDescription
opName *
team *

Return:

*

public isUserOp(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public isUserOpNamespace(name: *): * source

Params:

NameTypeAttributeDescription
name *

Return:

*

public isVariableSetter(opname: *): * source

Params:

NameTypeAttributeDescription
opname *

Return:

*

public namespaceExists(namespaceName: *, opDocs: undefined): boolean source

Params:

NameTypeAttributeDescription
namespaceName *
opDocs undefined
  • optional
  • default: undefined

Return:

boolean

public namespaceExistsInCore(name: *, opDocs: *): * source

Params:

NameTypeAttributeDescription
name *
opDocs *

Return:

*

public opExists(opName: *, updateCache: boolean): * source

Params:

NameTypeAttributeDescription
opName *
updateCache boolean
  • optional
  • default: true

Return:

*

public opGetNamespaceColor(ns: *): string source

Params:

NameTypeAttributeDescription
ns *

Return:

string

public opGetPortColor(type: *): string source

Params:

NameTypeAttributeDescription
type *

Return:

string

public opNameTaken(opName: *, caseSensitive: boolean): boolean source

Params:

NameTypeAttributeDescription
opName *
caseSensitive boolean
  • optional
  • default: false

Return:

boolean

public ownsUserOp(opname: *, user: *): boolean source

Params:

NameTypeAttributeDescription
opname *
user *

Return:

boolean

public removeOpChangelog(user: *, opName: *, date: *) source

Params:

NameTypeAttributeDescription
user *
opName *
date *

public removeOpDependency(opName: *, dep: *): boolean source

Params:

NameTypeAttributeDescription
opName *
dep *

Return:

boolean

public renameToCoreOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): * source

Params:

NameTypeAttributeDescription
oldName *
newName *
currentUser *
removeOld *
cb undefined
  • optional
  • default: undefined

Return:

*

public renameToExtensionOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): * source

Params:

NameTypeAttributeDescription
oldName *
newName *
currentUser *
removeOld *
cb undefined
  • optional
  • default: undefined

Return:

*

public renameToPatchOp(oldName: *, newName: *, currentUser: *, removeOld: *, newId: *, cb: undefined): * source

Params:

NameTypeAttributeDescription
oldName *
newName *
currentUser *
removeOld *
newId *
cb undefined
  • optional
  • default: undefined

Return:

*

public renameToTeamOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): * source

Params:

NameTypeAttributeDescription
oldName *
newName *
currentUser *
removeOld *
cb undefined
  • optional
  • default: undefined

Return:

*

public renameToUserOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): * source

Params:

NameTypeAttributeDescription
oldName *
newName *
currentUser *
removeOld *
cb undefined
  • optional
  • default: undefined

Return:

*

public saveLayout(opName: *, layout: *): boolean source

Params:

NameTypeAttributeDescription
opName *
layout *

Return:

boolean

public setOpDefaults(opname: *, author: undefined): * source

Params:

NameTypeAttributeDescription
opname *
author undefined
  • optional
  • default: undefined

Return:

*

public updateAttachment(opName: *, attName: *, content: *, force: boolean, res: boolean): * source

Params:

NameTypeAttributeDescription
opName *
attName *
content *
force boolean
  • optional
  • default: false
res boolean
  • optional
  • default: false

Return:

*

public updateAttachments(opName: *, attachments: *): * source

Params:

NameTypeAttributeDescription
opName *
attachments *

Return:

*

public updateCoreLibs(opName: *, libNames: *): * source

Params:

NameTypeAttributeDescription
opName *
libNames *

Return:

*

public updateOp(user: *, opName: *, updates: *, options: {}): * source

Params:

NameTypeAttributeDescription
user *
opName *
updates *
options {}
  • optional
  • default: {}

Return:

*

public updateOpCode(opName: *, author: *, code: *): * source

Params:

NameTypeAttributeDescription
opName *
author *
code *

Return:

*

public userHasWriteRightsOp(user: *, opName: *, teams: *[], project: undefined, ignoreAdmin: boolean): boolean source

Params:

NameTypeAttributeDescription
user *
opName *
teams *[]
  • optional
  • default: []
project undefined
  • optional
  • default: undefined
ignoreAdmin boolean
  • optional
  • default: false

Return:

boolean

public validateAndFormatOpCode(code: *): * source

Params:

NameTypeAttributeDescription
code *

Return:

*

Private Methods

private _getCLIConfig(): {"fix": boolean, "baseConfig": *, "envs": *, "useEslintrc": *, "globals": *, "env": *, "parserOptions": *, "rules": *} source

Return:

{"fix": boolean, "baseConfig": *, "envs": *, "useEslintrc": *, "globals": *, "env": *, "parserOptions": *, "rules": *}

private _getErrorSvg(opName: *, err: *, backgroundOptions: *): * source

Params:

NameTypeAttributeDescription
opName *
err *
backgroundOptions *

Return:

*

private _minifyGlsl(glsl: *): * source

Params:

NameTypeAttributeDescription
glsl *

Return:

*

private _renameOp(oldName: *, newName: *, currentUser: *, formatCode: *, removeOld: *, newId: *, oldOpDir: *, newOpDir: *, cb: undefined): boolean source

Params:

NameTypeAttributeDescription
oldName *
newName *
currentUser *
formatCode *
removeOld *
newId *
oldOpDir *
newOpDir *
cb undefined
  • optional
  • default: undefined

Return:

boolean

private _writeOpChangelog(opName: *, changes: *, update: boolean) source

Params:

NameTypeAttributeDescription
opName *
changes *
update boolean
  • optional
  • default: false