Commit Graph

28 Commits

Author SHA1 Message Date
ricolin 9bbf3d8a97 retire js-openstack-lib
This project is being retired

Release update: https://review.opendev.org/c/openstack/governance/+/771789

ML: http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019847.html
Codesearch: https://codesearch.opendev.org/?q=js-openstack-lib&i=nope&files=&excludeFiles=&repos=

Change-Id: I94c42c0ac3ec23c685d1b50d35383ad078916f06
2023-10-19 12:29:20 -07:00
Monty Taylor 346f7eeda0 Update eslint and switch to standard
The openstack eslint package is just really not needed at this
point. Use standardjs and run --fix on it.

Switch away from using node 8 to run linters and tests.

Change-Id: I51f68d4ec30c8da5d1601ef00045e53f90d0554b
2020-06-12 13:04:59 -05:00
Monty Taylor 7f843d7ecb Update babel, webpack, karma, jasmine and istanbul
Update to babel v7 and webpack v4

Remove runtime depend on corejs-2 which is
unsupported. Just switch to runtime which requires polyfills be
provided by the end user.

Remove NSP - the service is being shut down and the important bits
are built in to npm now.

istanbul has been replaced by the nyc runner. Update karma
to latest.

Update yaml-loader and json-loader

Disable browser testing for now - we'll bring it back in a followup.

Change-Id: I45d1f77bb43e5d67f4154c5149fac77b853e3686
2020-06-12 12:35:09 -05:00
Ian Wienand 448cc5df6b Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: Iec8bb72bc9036beac9eea7f1c9dd686ddb0f5d02
2019-03-24 20:33:56 +00:00
Corentin Ardeois f137472a44 Release 0.0.2
Looks like version 0.0.1 was already published 5 months ago:
https://www.npmjs.com/package/openstack-lib

Change-Id: Ib225e45d6f2370c0cc7f3229916869201620f5d4
2016-10-19 19:52:10 -04:00
Michael Krotscheck abfe901b5e
AbstractService will try to detect the versions resource in more places.
We have no guarantees that the keystone service catalog will have the
root resource of any given service registered. As most versioned API
endpoints require tokens, we can reasonably assume that a 401 will
be encountered. This patch adds an extra check against the response
from the provided URL, and should a 401 be encountered, attempts
to resolve the versions from the root resource of the provided URL.

Change-Id: I655409f0eb9bfbd3489827db46faef026ede82f9
2016-09-22 07:36:39 -07:00
Vitaly Kramskikh e33758f9db Use babel-plugin-transform-runtime instead of babel-polyfill
babel-plugin-transform-runtime allows to reduce size of the
resulting bundle dramatically (from 260kb to 24kb).

Change-Id: I3cceb1caddfb5b0b2048b7d4efc2cebfee26ab91
2016-09-05 19:25:18 +03:00
Michael Krotscheck c98bc9cd23 Added loglevel
This patch adds loglevel back in as our logging framework, as
an assistatn for debugging the in/outbound HTTP requests.

Change-Id: I545e27f5c957f9c5c7a2dc73730b9db91600c1ce
2016-09-01 11:00:29 -07:00
Michael Krotscheck 2d61baca21 Added jsdoc3 output to doc generation
This patch adds jsdoc3-generated documentation to our docs build.
It does so by using publicly available sphinx.rst templates, writing
them into a .gitignore'd folder in the docs directory, and providing
references to these autogenerated documents in our own site.

There are some notable bugs:
- jsdoc-sphinx templates do not honor @ignore and @private
- jsdoc-sphinx templates do not ignore private variables (listed under
  members at the bottom).
- jsdoc-sphinx templates add superfluous 'Children' section to the
  top as subsection navigation.

It would make quite a bit of sense for us to contribute to
jsdoc-sphinx so that the above mentioned bugs are resolved. However,
as some documentation is better than no documentation, right now this
is fine.

Change-Id: I2905358a6410d5dace96c25dc57dda100fae4b48
2016-08-30 14:26:10 -07:00
Michael Krotscheck e96c828cd6 Removed loglevel
Removed dependency which we're not actually using for anything.

Change-Id: I4ced0fa4437b7c731c6a8c2e6bc7fa65be901820
2016-08-24 13:43:16 -07:00
Michael Krotscheck 193668fc17 Added jasmine-core to dev dependencies.
This will address this error from the logs:

The peer dependency jasmine-core@* included from karma-jasmine will no
longer be automatically installed to fulfill the peerDependency
in npm 3+. Your application will need to depend on it explicitly.

Change-Id: I02455eb0c6e438154741e516e6cfb9a9791a23ff
2016-08-22 16:14:19 -07:00
Vitaly Kramskikh 348b5927e6 Update eslint and eslint-config-openstack to latest versions
The newest eslint-config-openstack provides all the
ES2015-related extra rules we had in the local .eslintrc,
so that they can be removed.

Also, cloudsYamlPath.js was modified to adapt to
`keyword-spacing` rule modifications in eslint v3.

Change-Id: I55198a323a0ada7a74f425d21db42306d9548cb7
2016-08-10 17:44:02 +03:00
Corentin Ardeois 327dceee2b Add configure-devstack task for devstack gate
This patch adds 'configure-devstack' task to enable CORS headers in
keystone before functional-test are run.
No 'ini' library was used as I didn't find any supporting section
syntax "[[post-config|$KEYSTONE_CONF]]"

Change-Id: I7f335bbba3a768387a7d77916df019ba46e5519f
2016-08-08 16:22:25 -04:00
Corentin Ardeois bf8deba64e Add functional tests for devstack gate
This patch adds 'functional' tests that will be run by DSVM gate.
A 'cloudsConfig.js' file reads 'clouds.yaml' and converts it to json.
'clouds.yaml' file is searched from the following locations:
 - current directory
 - ~/.config/openstack
 - /etc/openstack
The first file found wins.

For browser, webpack uses a 'yaml' loader and rewrites
'helper/cloudsConfig.js' requirement to 'json!yaml!clouds.yaml'.

A dummy test has been added to demonstrate use of devstack config.

Change-Id: I55909862c70a4cbe22b2820e51c2969d68d8154a
2016-08-05 13:27:17 -04:00
Michael Krotscheck 4e9cf48b43 Enabled fetch-mock with tests.
This patch adds the fetch-mock library, demonstrating how it may be
used to properly mock out API calls. An important change that was
made was the way that 'isomorphic-fetch' was included. Since
fetch-mock makes the assumption that only the window.fetch object
should be overridden, we cannot invoke it via a variable. Instead,
I've simply imported the library, which during import will override
global.fetch if necessary.

Change-Id: Ibd88b61595b4492f375294a8a08031a1a001a10c
2016-08-04 12:03:04 -07:00
Jenkins c9051d8f42 Merge "Switch back from node-fetch to isomorphic-fetch" 2016-07-27 17:02:41 +00:00
Vitaly Kramskikh 1b9d90f7c0 Switch back from node-fetch to isomorphic-fetch
node-fetch utilizes Node.js standard library to work, so it
cannot be used in browsers. So we need to switch back to
isomorphic-fetch which works both in browsers and Node.js.

Change-Id: Idc8d18021a3226fb8339c99e3009dc53cbc15b2a
2016-07-25 12:55:52 +03:00
Michael Krotscheck b5c93d14d1 Renamed doc command to docs.
This patch changes the `npm run doc` command to `npm run docs`.
I'm doing this because throughout infra, most of the job names use
'docs' as a short for 'documentation', and it's useful to remain
consistent.

Change-Id: I9dad6ddd18695f48a7e2dbd33963e378bd1b4e03
2016-07-22 07:22:20 -07:00
Vitaly Kramskikh fd53f563e2 Added node-fetch
This commit adds a node-fetch library to dependencies and adds
a simple method to the Test class which calls it with provided
arguments.

Change-Id: I159d93b37388e3c6884f81a8e6026a514351b71d
2016-07-20 13:51:05 +00:00
Vitaly Kramskikh e8d39a4747 Added Istanbul integration
This commits introduces integration with Istanbul which allows
to track code coverage.

Change-Id: Ia106b256308a8d0f7c286134f997c7efd4bcf624
Co-Authored-By: Michael Krotscheck <krotscheck@gmail.com>
2016-07-20 16:50:06 +03:00
Vitaly Kramskikh 6f1a300585 Added Karma integration
This commit introduces Karma test runner which allows running
Jasmine-based tests in browsers.

Change-Id: I11652f31fb56e9f6ee0dbfd3359259bb3e4f68fd
Co-Authored-By: Michael Krotscheck <krotscheck@gmail.com>
2016-07-19 12:19:35 -07:00
Vitaly Kramskikh 2120a13542 Added Webpack integration
This commit allows to create js-openstack-lib build which can be
used in browsers. Webpack library is used to create the build.

Change-Id: I382244c9399cee83720858d0bb2768e9ce3b7c9a
2016-07-14 15:59:01 +03:00
Michael Krotscheck 9877477cef Added jasmine-based testing harness.
This patch adds jasmine-based testing harnesses for node tests.
A dummy test has also been added to demonstrate use of ES6
features.

Change-Id: I6d7249ba0224107f79a453eff0676e1c49424eb6
2016-07-14 13:12:09 +03:00
Michael Krotscheck effd5b100c Invoke babel to generate a ES5-compatible library.
This patch creates a very simple index.js file which uses
ES2015. It then creates a very simple Babel compile step
which converts this into a usable library.

Change-Id: I6a64843793297bcf784372002853d506f348c0d5
2016-07-13 16:32:56 +03:00
Michael Krotscheck 4c80eab9e7 Added Sphinx-based documentation framework and specs repo.
All of openstack's documentation infrastructure is run via sphinx, including
templates, html parsing, uploading, and more. Thus it behooves us to keep
our javascript documentation build as similar as possible. Since we want to
avoid using tox, and littering the project with pythonic artifacts, we're
instead using Sphinx' own recommended build method: A Makefile.

This patch adds a small but complete documentation tree for this project,
including the build tools needed to create it. It satisfies the need for
narrative documentation, but does not (yet) satisfy the need for code
doc generation. It also includes a section for specifications, as this
effort is not yet large enough to warrant its own specification repo.

Code documentation will need to be added in a subsequent patch, using
Sphinx' jsdoc plugins.

Change-Id: I40eab962d4e4c6eafd1b1499bb00e6af5d72ede0
2016-06-23 06:55:17 -07:00
Michael Krotscheck b7c4155384 Added node-security-project checks
This projects' dependencies will now be checked against the
node-security list of advisories. A build will fail if a CVE is
detected.

Change-Id: I9ec06fe00794f0b178389548ed0c88f6036b6e86
2016-06-23 12:53:07 +00:00
Michael Krotscheck 0e09469508 Updated eslint
Eslint has been moved from dependencies to devDependencies. The
.eslintrc file has been updated to enable ecma 2015 features,
and a .eslintignore file has been added with common file exclusions.

Change-Id: Icb12699bc1517bd4d1ab7e8632d57dc8e32524e5
2016-06-22 06:24:41 -07:00
Michael Krotscheck 9003076f2c
Initial commit of project.
An initial commit of the project, with the OpenStack's CTI elements
enabled. No actual code has been added yet.
2016-05-20 12:12:21 -07:00