npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cq-utils

v1.0.0

Published

JavaScript library for working with ClearQuest OSLC API

Downloads

10

Readme

JavaScript library for working with ClearQuest OSLC API Build Status

Functions

Typedefs

getBasePath() ⇒ string

Get base URL i.e. everything till the port number, e.g. http://localhost:8080

Kind: global function Returns: string - base URL

adjustHeight()

Adjusts the gadget height by calling the gadget api after adding a delay

Kind: global function

setVisibilityOf(divId, visible)

Sets the visibility of an element. Also adjusts the height of the gadget after changing the visibility

Kind: global function

| Param | Type | | --- | --- | | divId | string | | visible | boolean |

getRepoNameFromDbUrl(dbUrl) ⇒ string

Get name of the schema repository from user database URL

Kind: global function Returns: string - schema repository name

| Param | Type | Description | | --- | --- | --- | | dbUrl | string | The url of the user database in which the record is stored e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL |

getDbNameFromDbUrl(dbUrl) ⇒ string

Get name of the user database from its URL

Kind: global function Returns: string - user database name

| Param | Type | Description | | --- | --- | --- | | dbUrl | string | The url of the user database in which the record is stored e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL |

getRecordPreviewHtml(recordUrl, callback)

Get the html preview of a record

Kind: global function

| Param | Type | Description | | --- | --- | --- | | recordUrl | string | The record URL e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL/record/16777224-33602104 | | callback | htmlCallback | callback to process the response. Response will contain the HTML representing the record |

doGet(url, callback, isOSLCv2)

Send a proxied async GET request to the given URL using OAuth

Kind: global function

| Param | Type | Description | | --- | --- | --- | | url | string | URL to send the request to. e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL/record/16777224-33602104 | | callback | requestCallback | callback to process the response. Response will be in the form of json | | isOSLCv2 | boolean | flag to indicate which version of CQ OSLC API needs to be used. By default version 1 will be used if nothing is provided |

doGetXML(url, callback, isOSLCv2)

Send a proxied async GET request to the given URL using OAuth

Kind: global function

| Param | Type | Description | | --- | --- | --- | | url | string | URL to send the request to. e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL/record/16777224-33602104 | | callback | requestCallback | callback to process the response. Response will be in the form of XML | | isOSLCv2 | boolean | flag to indicate which version of CQ OSLC API needs to be used. By default version 1 will be used if nothing is provided |

doPost(url, callback, postData)

Send a proxied async POST request to the given URL using OAuth

Kind: global function

| Param | Type | Description | | --- | --- | --- | | url | string | URL to send the request to. e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL/record/16777224-33602104 | | callback | requestCallback | callback to process the response. Response will be in the form of json | | postData | boolean | data for the POST body |

getOAuthFriendsApiUrl() ⇒

Get the URL to fetch ClearQuest OAuthFriends

Kind: global function Returns: URL to fetch ClearQuest OAuthFriends

checkIfFTSenabled(dbUrl, callback)

Checks if Full text search (FTS) is enabled

Kind: global function

| Param | Type | Description | | --- | --- | --- | | dbUrl | string | The url of the user database in which the record is stored e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL | | callback | boolean | callback to do handle the response |

getSchemaRepositories(cqWebUrl, callback)

Get all schema repositories of CQWeb

Kind: global function

| Param | Type | Description | | --- | --- | --- | | cqWebUrl | string | The url of CQWeb e.g. http://localhost:9080/cqweb | | callback | arrayCallback | callback to process the response. Response will contain an array of objects, each object representing a schema repository |

getUserDatabases(repoUrl, callback)

Get all user databases of a schema repository

Kind: global function

| Param | Type | Description | | --- | --- | --- | | repoUrl | string | The url of the schema repository e.g. http://localhost:9080/cqweb/oslc/repo/reponame | | callback | arrayCallback | callback to process the response. Response will contain an array of objects, each object representing a user database |

getRecordTypes(dbUrl, callback)

Get all record types of a user database

Kind: global function

| Param | Type | Description | | --- | --- | --- | | dbUrl | string | The url of the user database in which the record is stored e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL | | callback | arrayCallback | callback to process the response. Response will contain an array of objects, each object representing a record type |

getRecord(dbUrl, recordType, name, callback)

Get a record by name.

Kind: global function

| Param | Type | Description | | --- | --- | --- | | dbUrl | string | The url of the user database in which the record is stored e.g. http://localhost:9080/cqweb/oslc/repo/reponame/db/SAMPL | | recordType | string | type of record e.g. defect, customer etc. | | name | string | name of the record | | callback | singleObjectCallback | callback to process the response. Response will contain a single object representing the record |

singleObjectCallback : function

A callback to process only a single object

Kind: global typedef

| Param | Type | | --- | --- | | object | Object |

arrayCallback : function

A callback to process an array of objects

Kind: global typedef

| Param | Type | | --- | --- | | arr | Array.<Object> |

htmlCallback : function

A callback to process html as a string

Kind: global typedef

| Param | Type | | --- | --- | | html | string |

requestCallback : function

A callback to process response of a AJAX request

Kind: global typedef

| Param | Type | | --- | --- | | response | object |