Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
blank_issues_enabled: false
contact_links:
- name: GitHub Discussions
url: https://github.com/trustification/exhort-javascript-api/discussions/
url: https://github.com/guacsec/exhort-javascript-api/discussions/
about: You can also use Discussions for questions and ideas.
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
call-shared:
uses: trustification/exhort-integration-tests/.github/workflows/integration.yml@main
uses: guacsec/exhort-integration-tests/.github/workflows/integration.yml@main
with:
language: javascript
repo-url: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Create .npmrc
run: |
echo "@trustification:registry=https://npm.pkg.github.com" >> .npmrc
echo "@guacsec:registry=https://npm.pkg.github.com" >> .npmrc

- name: Install commitlint
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Create .npmrc
run: |
echo "@trustification:registry=https://npm.pkg.github.com" >> .npmrc
echo "@guacsec:registry=https://npm.pkg.github.com" >> .npmrc

- name: Enable Corepack
run: corepack enable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- name: Create .npmrc
run: |
echo "@trustification:registry=https://npm.pkg.github.com" >> .npmrc
echo "@guacsec:registry=https://npm.pkg.github.com" >> .npmrc

- name: Configure git
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
stage:
runs-on: ubuntu-latest
# Branches that starts with `release/` shouldn't trigger this workflow, as these are triggering the release workflow.
if: github.repository_owner == 'trustification' && github.event.pull_request.merged == true && !startsWith(github.head_ref, 'release/')
if: github.repository_owner == 'guacsec' && github.event.pull_request.merged == true && !startsWith(github.head_ref, 'release/')
environment: staging
name: Stage the project
steps:
Expand All @@ -50,7 +50,7 @@ jobs:

- name: Create .npmrc
run: |
echo "@trustification:registry=https://npm.pkg.github.com" >> .npmrc
echo "@guacsec:registry=https://npm.pkg.github.com" >> .npmrc

- name: Enable Corepack
run: corepack enable
Expand Down
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Mocha (Test single file)",
"type": "node",
"request": "launch",
"runtimeArgs": [
"${workspaceRoot}/node_modules/.bin/mocha",
"--inspect-brk",
"${relativeFile}",
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
// "port": 9229
}
]
}
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

### OpenAPI Specifications

The OpenAPI specification is located in the [`exhort-api-spec`](https://github.com/trustification/exhort-api-spec) where the Java and Javascript libraries are generated.
The OpenAPI specification is located in the [`exhort-api-spec`](https://github.com/guacsec/exhort-api-spec) where the Java and Javascript libraries are generated.

### Code Walkthrough

Expand Down Expand Up @@ -86,7 +86,7 @@ scripts in [integration/testers](integration/testers).<br/>

We have 3 _testers_:
* [integration/testers/cli](integration/testers/cli) is a _package.json_ used for installing the _ESM module_.
Invoking the CLI Script is done against the _@trustification/exhort-javascript-api/dist/src/cli.js_ in the tester's
Invoking the CLI Script is done against the _@guacsec/exhort-javascript-api/dist/src/cli.js_ in the tester's
_node_modules_.
* [integration/testers/javascript](integration/testers/javascript) is a _javascript_ script invoking the _ESM module_.
* [integration/testers/typescript](integration/testers/typescript) is a _typescript_ script invoking the _ESM module_.
Expand Down Expand Up @@ -119,7 +119,7 @@ contribution. See the [DCO](DCO) file for details.

<!-- Real links -->
[0]: https://www.conventionalcommits.org/en/v1.0.0/
[1]: https://github.com/trustification/exhort/blob/0.1.x/src/main/resources/META-INF/openapi.yaml
[1]: https://github.com/guacsec/exhort/blob/0.1.x/src/main/resources/META-INF/openapi.yaml

<!-- Badge links -->
[10]: https://badgen.net/badge/NodeJS%20Version/18/68a063
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Exhort JavaScript API<br/>![latest-no-snapshot][0] ![latest-snapshot][1]

* Looking for the OpenAPI Spec? Try [Exhort API Spec](https://github.com/trustification/exhort-api-spec)
* Looking for our Java API? Try [Exhort Java API](https://github.com/trustification/exhort-java-api).
* Looking for our Backend implementation? Try [Exhort](https://github.com/trustification/exhort).
* Looking for the OpenAPI Spec? Try [Exhort API Spec](https://github.com/guacsec/exhort-api-spec)
* Looking for our Java API? Try [Exhort Java API](https://github.com/guacsec/exhort-java-api).
* Looking for our Backend implementation? Try [Exhort](https://github.com/guacsec/exhort).

The _Exhort JavaScript API_ module is deployed to _GitHub Package Registry_.

Expand Down Expand Up @@ -31,11 +31,11 @@ See [GH Docs](https://docs.github.com/en/packages/working-with-a-github-packages

<h3>Usage</h3>
<p>
Configuring <em>NPM</em> to look in <em>GHPR</em> for the <em>trustification</em> namespace is done by adding
<code>@trustification:registry=https://npm.pkg.github.com</code> to <em>.npmrc</em> in the project root or user home.
Configuring <em>NPM</em> to look in <em>GHPR</em> for the <em>guacsec</em> namespace is done by adding
<code>@guacsec:registry=https://npm.pkg.github.com</code> to <em>.npmrc</em> in the project root or user home.

```shell
echo "@trustification:registry=https://npm.pkg.github.com" >> .npmrc
echo "@guacsec:registry=https://npm.pkg.github.com" >> .npmrc
```
</p>

Expand All @@ -44,11 +44,11 @@ echo "@trustification:registry=https://npm.pkg.github.com" >> .npmrc
Use as ESM Module from an ESM module

```shell
npm install @trustification/exhort-javascript-api
npm install @guacsec/exhort-javascript-api
```

```javascript
import exhort from '@trustification/exhort-javascript-api'
import exhort from '@guacsec/exhort-javascript-api'
import fs from 'node:fs'

// Get stack analysis in JSON format
Expand All @@ -65,14 +65,14 @@ let componentAnalysis = await exhort.componentAnalysis('/path/to/pom.xml')
Use as ESM Module from Common-JS module

```shell
npm install @trustification/exhort-javascript-api
npm install @guacsec/exhort-javascript-api
```

```javascript
async function loadExhort()
{
// dynamic import is the only way to import ESM module into commonJS module
const { default: exhort } = await import('@trustification/exhort-javascript-api');
const { default: exhort } = await import('@guacsec/exhort-javascript-api');
return exhort
}
const runExhort = (manifestPath) => {
Expand All @@ -98,7 +98,7 @@ Use as CLI Script
<summary>Click for help menu</summary>

```shell
$ npx @trustification/exhort-javascript-api help
$ npx @guacsec/exhort-javascript-api help

Usage: exhort-javascript-api {component|stack}

Expand All @@ -113,24 +113,24 @@ Options:

```shell
# get stack analysis in json format
$ npx @trustification/exhort-javascript-api stack /path/to/pom.xml
$ npx @guacsec/exhort-javascript-api stack /path/to/pom.xml

# get stack analysis in json format (summary only)
$ npx @trustification/exhort-javascript-api stack /path/to/pom.xml --summary
$ npx @guacsec/exhort-javascript-api stack /path/to/pom.xml --summary

# get stack analysis in html format format
$ npx @trustification/exhort-javascript-api stack /path/to/pom.xml --html
$ npx @guacsec/exhort-javascript-api stack /path/to/pom.xml --html

# get component analysis
$ npx @trustification/exhort-javascript-api component /path/to/pom.xml
$ npx @guacsec/exhort-javascript-api component /path/to/pom.xml
```
</li>

<li>
Use as Global Binary

```shell
npm install --global @trustification/exhort-javascript-api
npm install --global @guacsec/exhort-javascript-api
```

```shell
Expand Down Expand Up @@ -206,7 +206,7 @@ Excluding a package from any analysis can be achieved by marking the package for

<em>Golang</em> users can add in go.mod a comment with //exhortignore next to the package to be ignored, or to "piggyback" on existing comment ( e.g - //indirect) , for example:
```go
module github.com/trustification/SaaSi/deployer
module github.com/guacsec/SaaSi/deployer

go 1.19

Expand Down Expand Up @@ -295,7 +295,7 @@ for various customization.
However, <em>ESM Module</em> users, can opt for customizing programmatically:

```javascript
import exhort from '@trustification/exhort-javascript-api'
import exhort from '@guacsec/exhort-javascript-api'
import fs from 'node:fs'

let options = {
Expand Down Expand Up @@ -500,8 +500,8 @@ For some ecosystems we support passing additional CLI arguments to the underlyin


<!-- Badge links -->
[0]: https://img.shields.io/github/v/release/trustification/exhort-javascript-api?color=green&label=latest
[1]: https://img.shields.io/github/v/release/trustification/exhort-javascript-api?color=yellow&include_prereleases&label=early-access
[0]: https://img.shields.io/github/v/release/guacsec/exhort-javascript-api?color=green&label=latest
[1]: https://img.shields.io/github/v/release/guacsec/exhort-javascript-api?color=yellow&include_prereleases&label=early-access

### Known Issues

Expand Down
8 changes: 4 additions & 4 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ kind: Component
metadata:
annotations:
backstage.io/kubernetes-id: exhort-javascript-api
github.com/project-slug: trustification/exhort-javascript-api
github.com/project-slug: guacsec/exhort-javascript-api
github.com/project-readme-path: README.md
backstage.io/view-url: https://github.com/trustification/exhort-javascript-api/blob/main/catalog-info.yaml
backstage.io/edit-url: https://github.com/trustification/exhort-javascript-api/blob/main/catalog-info.yaml
backstage.io/source-location: url:https://github.com/trustification/exhort-javascript-api
backstage.io/view-url: https://github.com/guacsec/exhort-javascript-api/blob/main/catalog-info.yaml
backstage.io/edit-url: https://github.com/guacsec/exhort-javascript-api/blob/main/catalog-info.yaml
backstage.io/source-location: url:https://github.com/guacsec/exhort-javascript-api
rhda/manifest-file-path: package.json
backstage.io/techdocs-ref: dir:README.md
name: exhort-javascript-api
Expand Down
4 changes: 2 additions & 2 deletions docker-image/Dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ COPY configs/.npmrc .
# replace placeholder with the actual environment variable
RUN sed -i "s/__PACKAGE_REGISTRY_ACCESS_TOKEN__/${PACKAGE_REGISTRY_ACCESS_TOKEN}/g" ./.npmrc
# install Exhort javascript API
RUN npm install --global @trustification/exhort-javascript-api@${EXHORT_JAVASCRIPT_API_VERSION}
RUN npm install --global @guacsec/exhort-javascript-api@${EXHORT_JAVASCRIPT_API_VERSION}

# add RHDA script
COPY scripts/rhda.sh /rhda.sh
Expand All @@ -47,7 +47,7 @@ USER default
# second stage
FROM registry.access.redhat.com/ubi9/nodejs-20-minimal

LABEL org.opencontainers.image.source=https://github.com/trustification/exhort-javascript-api
LABEL org.opencontainers.image.source=https://github.com/guacsec/exhort-javascript-api

# assign rhda source for exhort tracking purposes
ENV RHDA_SOURCE=''
Expand Down
2 changes: 1 addition & 1 deletion integration/testers/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"type": "module",
"license": "Apache-2.0",
"dependencies": {
"@trustification/exhort-javascript-api": "file:../../../"
"@guacsec/exhort-javascript-api": "file:../../../"
}
}
2 changes: 1 addition & 1 deletion integration/testers/javascript/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

import exhort from '@trustification/exhort-javascript-api'
import exhort from '@guacsec/exhort-javascript-api'
import process from 'node:process'

const [,, ...args] = process.argv
Expand Down
2 changes: 1 addition & 1 deletion integration/testers/javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"type": "module",
"license": "Apache-2.0",
"dependencies": {
"@trustification/exhort-javascript-api": "file:../../../"
"@guacsec/exhort-javascript-api": "file:../../../"
}
}
4 changes: 2 additions & 2 deletions integration/testers/typescript/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env node

import exhort from '@trustification/exhort-javascript-api'
import exhort from '@guacsec/exhort-javascript-api'
import process from 'node:process'
import { AnalysisReport } from '@trustification/exhort-api-spec/model/v4/AnalysisReport'
import { AnalysisReport } from '@guacsec/exhort-api-spec/model/v4/AnalysisReport'

const [,, ...args] = process.argv

Expand Down
2 changes: 1 addition & 1 deletion integration/testers/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"compile": "tsc -p tsconfig.json"
},
"dependencies": {
"@trustification/exhort-javascript-api": "file:../../../"
"@guacsec/exhort-javascript-api": "file:../../../"
},
"devDependencies": {
"typescript": "^5.1.3"
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@trustification/exhort-javascript-api",
"name": "@guacsec/exhort-javascript-api",
"version": "0.2.4-ea.9",
"description": "Code-Ready Dependency Analytics JavaScript API.",
"license": "Apache-2.0",
"homepage": "https://github.com/trustification/exhort-javascript-api#README.md",
"bugs": "https://github.com/trustification/exhort-javascript-api/issues",
"repository": "github:trustification/exhort-javascript-api",
"homepage": "https://github.com/guacsec/exhort-javascript-api#README.md",
"bugs": "https://github.com/guacsec/exhort-javascript-api/issues",
"repository": "github:guacsec/exhort-javascript-api",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
Expand Down Expand Up @@ -56,7 +56,7 @@
},
"devDependencies": {
"@babel/core": "^7.23.2",
"@trustification/exhort-api-spec": "^1.0.18",
"@guacsec/exhort-api-spec": "^1.0.18",
"@types/node": "^20.17.30",
"@types/which": "^3.0.4",
"babel-plugin-rewire": "^1.2.0",
Expand Down
Loading
Loading