licensed 3.0.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +19 -0
- data/.github/workflows/release.yml +4 -4
- data/.github/workflows/test.yml +180 -47
- data/.ruby-version +1 -1
- data/CHANGELOG.md +60 -1
- data/README.md +25 -79
- data/docker/Dockerfile.build-linux +1 -1
- data/docs/adding_a_new_source.md +11 -8
- data/docs/commands/README.md +59 -0
- data/docs/commands/cache.md +35 -0
- data/docs/commands/env.md +10 -0
- data/docs/commands/list.md +23 -0
- data/docs/commands/migrate.md +10 -0
- data/docs/commands/notices.md +12 -0
- data/docs/commands/status.md +74 -0
- data/docs/commands/version.md +3 -0
- data/docs/configuration/README.md +11 -0
- data/docs/configuration/allowed_licenses.md +17 -0
- data/docs/configuration/application_name.md +63 -0
- data/docs/configuration/application_source.md +64 -0
- data/docs/configuration/configuration_root.md +27 -0
- data/docs/configuration/configuring_multiple_apps.md +58 -0
- data/docs/configuration/dependency_source_enumerators.md +28 -0
- data/docs/configuration/ignoring_dependencies.md +19 -0
- data/docs/configuration/metadata_cache.md +106 -0
- data/docs/configuration/reviewing_dependencies.md +18 -0
- data/docs/configuration.md +9 -161
- data/docs/sources/swift.md +4 -0
- data/lib/licensed/cli.rb +2 -2
- data/lib/licensed/commands/cache.rb +19 -20
- data/lib/licensed/commands/command.rb +104 -72
- data/lib/licensed/commands/environment.rb +12 -11
- data/lib/licensed/commands/list.rb +0 -19
- data/lib/licensed/commands/notices.rb +0 -19
- data/lib/licensed/commands/status.rb +13 -15
- data/lib/licensed/configuration.rb +105 -12
- data/lib/licensed/report.rb +44 -0
- data/lib/licensed/reporters/cache_reporter.rb +48 -64
- data/lib/licensed/reporters/json_reporter.rb +19 -21
- data/lib/licensed/reporters/list_reporter.rb +45 -58
- data/lib/licensed/reporters/notices_reporter.rb +33 -46
- data/lib/licensed/reporters/reporter.rb +37 -104
- data/lib/licensed/reporters/status_reporter.rb +58 -56
- data/lib/licensed/reporters/yaml_reporter.rb +19 -21
- data/lib/licensed/sources/bundler/definition.rb +36 -0
- data/lib/licensed/sources/bundler/missing_specification.rb +1 -1
- data/lib/licensed/sources/bundler.rb +38 -86
- data/lib/licensed/sources/dep.rb +2 -2
- data/lib/licensed/sources/go.rb +3 -3
- data/lib/licensed/sources/gradle.rb +2 -2
- data/lib/licensed/sources/helpers/content_versioning.rb +2 -1
- data/lib/licensed/sources/npm.rb +4 -3
- data/lib/licensed/sources/nuget.rb +56 -27
- data/lib/licensed/sources/swift.rb +69 -0
- data/lib/licensed/sources.rb +1 -0
- data/lib/licensed/version.rb +1 -1
- data/lib/licensed.rb +1 -0
- data/licensed.gemspec +4 -4
- data/script/source-setup/go +1 -1
- data/script/source-setup/swift +22 -0
- metadata +48 -13
- data/docs/commands.md +0 -95
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.4
|
1
|
+
2.7.4
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,65 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## 3.2.1
|
10
|
+
|
11
|
+
2021-09-06
|
12
|
+
|
13
|
+
### Changed
|
14
|
+
|
15
|
+
- Updated multiple dependency versions (:tada: @mmorel-35 https://github.com/github/licensed/pull/385, https://github.com/github/licensed/pull/389)
|
16
|
+
- Go homepage links use pkg.go.dev instead of godoc.org (:tada: @mmorel-35 https://github.com/github/licensed/commit/73cfbbe954a3e8c8cbaf8b68253053b157e01b79)
|
17
|
+
- Local development ruby version changed to 2.7.4 (https://github.com/github/licensed/pull/393)
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
|
21
|
+
- Bundler source correctly finds platform specific dependencies (https://github.com/github/licensed/pull/392)
|
22
|
+
|
23
|
+
## 3.2.0
|
24
|
+
|
25
|
+
2021-08-19
|
26
|
+
|
27
|
+
### Added
|
28
|
+
|
29
|
+
- Application names can be dynamically generated based on the path to the application source (https://github.com/github/licensed/pull/375)
|
30
|
+
|
31
|
+
### Changed
|
32
|
+
|
33
|
+
- Updated command documentation (https://github.com/github/licensed/pull/378, https://github.com/github/licensed/pull/380/files)
|
34
|
+
- Updated configuration documentation (https://github.com/github/licensed/pull/375)
|
35
|
+
- Cache and status commands give additional diagnostic output when using JSON and YAML formatters (https://github.com/github/licensed/pull/378)
|
36
|
+
- Status command will give users a link to documentation when compliance checks fail (https://github.com/github/licensed/pull/381)
|
37
|
+
|
38
|
+
### Fixed
|
39
|
+
|
40
|
+
- The bundler source correctly checks that the path bundler specifies a gem is loaded from is a file (https://github.com/github/licensed/pull/379)
|
41
|
+
|
42
|
+
## 3.1.0
|
43
|
+
|
44
|
+
2021-06-16
|
45
|
+
|
46
|
+
### Added
|
47
|
+
|
48
|
+
- Licensed supports Swift/Swift package manager as a dependency source (:tada: @mattt https://github.com/github/licensed/pull/363)'
|
49
|
+
|
50
|
+
### Changed
|
51
|
+
|
52
|
+
- The `source_path` configuration property accepts arrays of inclusion and exclusion glob patterns (https://github.com/github/licensed/pull/368)
|
53
|
+
- The Nuget source now uses configured fallback folders to find dependencies that are not in found in the project folder (https://github.com/github/licensed/pull/366)
|
54
|
+
- The Nuget source supports a configurable property for the path from the project source path to the project's `obj` folder (https://github.com/github/licensed/pull/365)
|
55
|
+
|
56
|
+
### Fixed
|
57
|
+
- The Go source's checks for local packages will correctly find paths in case-insensitive file systems (https://github.com/github/licensed/pull/370)
|
58
|
+
- The Bundler source will no longer unnecessarily reset the local Bundler environment configuration (https://github.com/github/licensed/pull/372)
|
59
|
+
|
60
|
+
## 3.0.1
|
61
|
+
|
62
|
+
2021-05-17
|
63
|
+
|
64
|
+
### Fixed
|
65
|
+
|
66
|
+
- The bundler source will correctly enumerate dependencies pulled with a `git:` directive (https://github.com/github/licensed/pull/360)
|
67
|
+
|
9
68
|
## 3.0.0
|
10
69
|
|
11
70
|
2021-04-27
|
@@ -421,4 +480,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
421
480
|
|
422
481
|
Initial release :tada:
|
423
482
|
|
424
|
-
[Unreleased]: https://github.com/github/licensed/compare/3.
|
483
|
+
[Unreleased]: https://github.com/github/licensed/compare/3.2.1...HEAD
|
data/README.md
CHANGED
@@ -37,13 +37,13 @@ See the [v2 migration documentation](./docs/migrations/v2.md) for more info on m
|
|
37
37
|
|
38
38
|
Licensed uses the `libgit2` bindings for Ruby provided by `rugged`. `rugged` requires `cmake` and `pkg-config` which you may need to install before you can install Licensed.
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
> OS X
|
40
|
+
```bash
|
41
|
+
# Ubuntu
|
42
|
+
sudo apt-get install cmake pkg-config
|
45
43
|
|
46
|
-
|
44
|
+
# macOS
|
45
|
+
brew install cmake pkg-config
|
46
|
+
```
|
47
47
|
|
48
48
|
### With a Gemfile
|
49
49
|
|
@@ -56,7 +56,7 @@ gem 'licensed', :group => 'development'
|
|
56
56
|
And then execute:
|
57
57
|
|
58
58
|
```bash
|
59
|
-
|
59
|
+
$> bundle
|
60
60
|
```
|
61
61
|
|
62
62
|
### As an executable
|
@@ -64,24 +64,27 @@ $ bundle
|
|
64
64
|
Download a package from GitHub and extract the executable. Executable packages are available for each release starting with version 1.2.0.
|
65
65
|
|
66
66
|
```bash
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
67
|
+
$> curl -sSL https://github.com/github/licensed/releases/download/<version>/licensed-<version>-<os>-x64.tar.gz > licensed.tar.gz
|
68
|
+
$> tar -xzf licensed.tar.gz
|
69
|
+
$> rm -f licensed.tar.gz
|
70
|
+
$> ./licensed list
|
71
71
|
```
|
72
72
|
|
73
73
|
For system wide usage, install licensed to a location on `$PATH`, e.g. `/usr/local/bin`.
|
74
74
|
|
75
75
|
## Usage
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
- `licensed notices`: Write a `NOTICE` file for each application configuration.
|
81
|
-
- `licensed version`: Show current installed version of Licensed. Aliases: `-v|--version`
|
82
|
-
- `licensed env`: Output environment information from the licensed configuration.
|
77
|
+
### Available commands
|
78
|
+
|
79
|
+
See the [commands documentation](./docs/commands) for documentation on available commands, or run `licensed -h` to see all of the current available commands.
|
83
80
|
|
84
|
-
|
81
|
+
### Configuration options
|
82
|
+
|
83
|
+
A configuration file is required for most commands. See the [configuration file documentation](./docs/configuration.md) for more details on the configuration format and available configuration options.
|
84
|
+
|
85
|
+
### Available dependency sources
|
86
|
+
|
87
|
+
Licensed can enumerate dependency for many languages, package managers, and frameworks. See the [sources documentation](./docs/sources) for the list of currently available sources. Sources can be explicitly enabled and disabled as a [configuration option](./docs/configuration/dependency_source_enumerators.md.md).
|
85
88
|
|
86
89
|
### Automation
|
87
90
|
|
@@ -95,79 +98,22 @@ The [licensed-ci](https://github.com/marketplace/actions/licensed-ci) GitHub Act
|
|
95
98
|
|
96
99
|
The [setup-licensed](https://github.com/marketplace/actions/setup-github-licensed) GitHub Action installs `licensed` to the workflow environment. See the linked actions for usage and details.
|
97
100
|
|
98
|
-
### Configuration
|
99
|
-
|
100
|
-
All commands, except `version`, accept a `-c|--config` option to specify a path to a configuration file or directory.
|
101
|
-
|
102
|
-
If a directory is specified, `licensed` will look in that directory for a file named (in order of preference):
|
103
|
-
1. `.licensed.yml`
|
104
|
-
2. `.licensed.yaml`
|
105
|
-
3. `.licensed.json`
|
106
|
-
|
107
|
-
If the option is not specified, the value will be set to the current directory.
|
108
|
-
|
109
|
-
See the [configuration file documentation](./docs/configuration.md) for more details on the configuration format.
|
110
|
-
|
111
|
-
### Sources
|
112
|
-
|
113
|
-
Dependencies will be automatically detected for all of the following sources by default.
|
114
|
-
1. [Bower](./docs/sources/bower.md)
|
115
|
-
1. [Bundler](./docs/sources/bundler.md)
|
116
|
-
1. [Cabal](./docs/sources/cabal.md)
|
117
|
-
1. [Composer](./docs/sources/composer.md)
|
118
|
-
1. [Git Submodules (git_submodule)](./docs/sources/git_submodule.md)
|
119
|
-
1. [Go](./docs/sources/go.md)
|
120
|
-
1. [Go Dep (dep)](./docs/sources/dep.md)
|
121
|
-
1. [Gradle](./docs/sources/gradle.md)
|
122
|
-
1. [Manifest lists (manifests)](./docs/sources/manifests.md)
|
123
|
-
1. [Mix](./docs/sources/mix.md)
|
124
|
-
1. [npm](./docs/sources/npm.md)
|
125
|
-
1. [NuGet](./docs/sources/nuget.md)
|
126
|
-
1. [Pip](./docs/sources/pip.md)
|
127
|
-
1. [Pipenv](./docs/sources/pipenv.md)
|
128
|
-
1. [Yarn](./docs/sources/yarn.md)
|
129
|
-
|
130
|
-
You can disable any of them in the configuration file:
|
131
|
-
|
132
|
-
```yml
|
133
|
-
sources:
|
134
|
-
bundler: false
|
135
|
-
npm: false
|
136
|
-
bower: false
|
137
|
-
cabal: false
|
138
|
-
```
|
139
|
-
|
140
101
|
## Development
|
141
102
|
|
142
103
|
To get started after checking out the repo, run
|
104
|
+
|
143
105
|
1. `script/bootstrap` to install dependencies
|
144
106
|
2. `script/setup` to setup test fixtures.
|
145
107
|
- `script/setup -f` will force a clean test fixture environment
|
146
|
-
3. `script/cibuild` to run the tests
|
108
|
+
3. `script/cibuild` to run the tests
|
147
109
|
|
148
110
|
You can also run `script/console` for an interactive prompt that will allow you to experiment.
|
149
111
|
|
150
112
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
151
113
|
|
152
|
-
|
153
|
-
|
154
|
-
When adding new dependency sources, ensure that `script/bootstrap` scripting and tests are only run if the required tooling is available on the development machine.
|
155
|
-
|
156
|
-
* See `script/bootstrap` for examples of gating scripting based on whether tooling executables are found.
|
157
|
-
* Use `Licensed::Shell.tool_available?` when writing test files to gate running a test suite when tooling executables aren't available.
|
158
|
-
```ruby
|
159
|
-
if Licensed::Shell.tool_available?('bundle')
|
160
|
-
describe Licensed::Source::Bundler do
|
161
|
-
...
|
162
|
-
end
|
163
|
-
end
|
164
|
-
```
|
165
|
-
|
166
|
-
See the [documentation on adding new sources](./docs/adding_a_new_source.md) for more information.
|
167
|
-
|
168
|
-
#### Adding Commands
|
114
|
+
### Adding a new source
|
169
115
|
|
170
|
-
See the [documentation on
|
116
|
+
See the [documentation on adding new sources](./docs/adding_a_new_source.md) for detailed information on what's required to add a new dependency source enumerator.
|
171
117
|
|
172
118
|
## Contributing
|
173
119
|
|
data/docs/adding_a_new_source.md
CHANGED
@@ -4,13 +4,15 @@
|
|
4
4
|
|
5
5
|
Dependency enumerators inherit and override the [`Licensed::Sources::Source`](../lib/licensed/sources/source.rb) class.
|
6
6
|
|
7
|
-
|
7
|
+
### Required method overrides
|
8
|
+
|
8
9
|
1. `Licensed::Sources::Source#enabled?`
|
9
10
|
- Returns whether dependencies can be enumerated in the current environment.
|
10
11
|
2. `Licensed::Sources::Source#enumerate_dependencies`
|
11
12
|
- Returns an enumeration of `Licensed::Dependency` objects found which map to the dependencies of the current project.
|
12
13
|
|
13
|
-
|
14
|
+
### Optional method overrides
|
15
|
+
|
14
16
|
1. `Licensed::Sources::Source.type`
|
15
17
|
- Returns the name of the current dependency enumerator as it is found in a licensed configuration file.
|
16
18
|
|
@@ -22,12 +24,13 @@ whether `Licensed::Source::Sources#enumerate_dependencies` should be called on t
|
|
22
24
|
Determining whether dependencies should be enumerated depends on whether all the tools or files needed to find dependencies are present.
|
23
25
|
For example, to enumerate `npm` dependencies the `npm` CLI tool must be found with `Licensed::Shell.tool_available?` and a `package.json` file needs to exist in the licensed app's configured [`source_path`](./configuration.md#configuration-paths).
|
24
26
|
|
25
|
-
|
27
|
+
### Gating functionality when required tools are not available.
|
26
28
|
|
27
29
|
When adding new dependency sources, ensure that `script/bootstrap` scripting and tests are only run if the required tooling is available on the development machine.
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
+
- See `script/bootstrap` for examples of gating scripting based on whether tooling executables are found.
|
32
|
+
- Use `Licensed::Shell.tool_available?` when writing test files to gate running a test suite when tooling executables aren't available.
|
33
|
+
|
31
34
|
```ruby
|
32
35
|
if Licensed::Shell.tool_available?('bundle')
|
33
36
|
describe Licensed::Source::Bundler do
|
@@ -47,11 +50,11 @@ Relying on external tools always has a risk that the tool could change. It's ge
|
|
47
50
|
or other implementation details as these could change over time. CLI tools that provides the necessary information are generally preferred
|
48
51
|
as they will more likely have requirements for backwards compatibility.
|
49
52
|
|
50
|
-
|
53
|
+
### Creating dependency objects
|
51
54
|
|
52
55
|
Creating a new `Licensed::Dependency` object requires name, version, and path arguments. Dependency objects optionally accept a path to use as search root when finding licenses along with any other metadata that is useful to identify the dependency.
|
53
56
|
|
54
|
-
|
57
|
+
#### `Licensed::Dependency` arguments
|
55
58
|
|
56
59
|
1. name (required)
|
57
60
|
- The name of the dependency. Together with the version, this should uniquely identify the dependency.
|
@@ -71,7 +74,7 @@ Creating a new `Licensed::Dependency` object requires name, version, and path ar
|
|
71
74
|
6. errors (optional)
|
72
75
|
- Any errors found when loading dependency information.
|
73
76
|
|
74
|
-
|
77
|
+
#### Creating specialized Dependency objects
|
75
78
|
|
76
79
|
`Licensed::Dependency` objects inherit from `Licensee::Projects::FsProject` and can override or extend the default `Licensee` behavior to find files for a dependency.
|
77
80
|
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Commands
|
2
|
+
|
3
|
+
Run `licensed -h` to see help content for running licensed commands.
|
4
|
+
|
5
|
+
- [cache](cache.md)
|
6
|
+
- [env](env.md)
|
7
|
+
- [list](list.md)
|
8
|
+
- [migrate](migrate.md)
|
9
|
+
- [notices](notices.md)
|
10
|
+
- [status](status.md)
|
11
|
+
- [version](verison.md)
|
12
|
+
|
13
|
+
Most commands accept a `-c`/`--config` option to specify a path to a configuration file or directory. If a directory is specified, `licensed` will look in that directory for a file named (in order of preference):
|
14
|
+
|
15
|
+
1. `.licensed.yml`
|
16
|
+
2. `.licensed.yaml`
|
17
|
+
3. `.licensed.json`
|
18
|
+
|
19
|
+
If the option is not specified, the value will be set to the current directory.
|
20
|
+
|
21
|
+
## Adding a new command
|
22
|
+
|
23
|
+
### Implement new `Command` class
|
24
|
+
|
25
|
+
Licensed commands inherit and override the [`Licensed::Sources::Command`](../lib/licensed/commands/command.rb) class.
|
26
|
+
|
27
|
+
### Required method overrides
|
28
|
+
|
29
|
+
1. `Licensed::Commands::Command#evaluate_dependency`
|
30
|
+
- Runs a command execution on an application dependency.
|
31
|
+
|
32
|
+
The `evaluate_dependency` method should contain the specific command logic. This method has access to the application configuration, dependency source enumerator and dependency currently being evaluated as well as a reporting hash to contain information about the command execution.
|
33
|
+
|
34
|
+
### Optional method overrides
|
35
|
+
|
36
|
+
The following methods break apart the different levels of command execution. Each method wraps lower levels of command execution in a corresponding reporter method.
|
37
|
+
|
38
|
+
1. `Licensed::Commands::Command#run`
|
39
|
+
- Runs `run_app` for each application configuration found. Wraps the execution of all applications in `Reporter#report_run`.
|
40
|
+
2. `Licensed::Commands::Command#run_app`
|
41
|
+
- Runs `run_source` for each dependency source enumerator enabled for the application configuration. Wraps the execution of all sources in `Reporter#report_app`.
|
42
|
+
3. `Licensed::Commands::Command#run_source`
|
43
|
+
- Runs `run_dependency` for each dependency found in the source. Wraps the execution of all dependencies in `Reporter#report_source`.
|
44
|
+
4. `Licensed::Commands::Command#run_dependency`
|
45
|
+
- Runs `evaluate_dependency` for the dependency. Wraps the execution of all dependencies in `Reporter#report_dependency`.
|
46
|
+
|
47
|
+
As an example, `Licensed::Commands::Command#run_app` calls `Reporter#report_app` to wrap every call to `Licensed::Commands::Command#run_source`.
|
48
|
+
|
49
|
+
### Specifying additional report data
|
50
|
+
|
51
|
+
The `run` methods can be overridden and pass a block to `super` to provide additional reporting data or functionality.
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
def run_app(app)
|
55
|
+
super do |report|
|
56
|
+
report["my_app_data"] = true
|
57
|
+
end
|
58
|
+
end
|
59
|
+
```
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# `licensed cache`
|
2
|
+
|
3
|
+
The cache command finds all dependencies and ensures that each dependency has an up-to-date cached record.
|
4
|
+
|
5
|
+
Dependency records will be saved if:
|
6
|
+
|
7
|
+
1. The `force` option is set
|
8
|
+
2. No cached record is found
|
9
|
+
3. The cached record's version is different than the current dependency's version
|
10
|
+
- If the cached record's license text contents matches the current dependency's license text then the `license` metadata from the cached record is retained for the new saved record.
|
11
|
+
|
12
|
+
After the cache command is run, any cached records that don't match up to a current application dependency will be deleted.
|
13
|
+
|
14
|
+
## Options
|
15
|
+
|
16
|
+
- `--config`/`-c`: the path to the licensed configuration file
|
17
|
+
- default value: `./.licensed.yml`
|
18
|
+
- `--sources`/`-s`: runtime filter on which dependency sources are run. Sources must also be enabled in the licensed configuration file.
|
19
|
+
- default value: not set, all configured sources
|
20
|
+
- `--format`/`-f`: the output format
|
21
|
+
- default value: `yaml`
|
22
|
+
- `--force`: if set, forces all dependency metadata files to be recached
|
23
|
+
- default value: not set
|
24
|
+
|
25
|
+
## Reported Data
|
26
|
+
|
27
|
+
The following data is reported for each dependency when the YAML or JSON report formats are used
|
28
|
+
|
29
|
+
- name: the licensed recognized name for the dependency including the app and source name
|
30
|
+
- e.g. the full name for the `thor` bundler dependency used by this tool is `licensed.bundler.thor`
|
31
|
+
- cached: true when the dependency's cached metadata file was updated, false otherwise
|
32
|
+
- version: the version of the enumerated dependency
|
33
|
+
- license: the dependency's SPDX license identifier
|
34
|
+
- filename: the full path on disk to the dependency's cached metadata file, if available
|
35
|
+
- warnings: any warning messages encountered while enumerating and caching dependency metadata, if available
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# `licensed env`
|
2
|
+
|
3
|
+
Prints the runtime environment used by licensed after loading a configuration file. This can be different from the configuration file inputs, for example all paths will be given as absolute file paths and glob paths may be expanded.
|
4
|
+
|
5
|
+
## Options
|
6
|
+
|
7
|
+
- `--config`/`-c`: the path to the licensed configuration file
|
8
|
+
- default value: `./.licensed.yml`
|
9
|
+
- `--format`/`-f`: the output format
|
10
|
+
- default value: `yaml`
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# `licensed list`
|
2
|
+
|
3
|
+
The list command finds and prints the dependencies for all sources in all configured applications. No additional actions are taken on dependencies.
|
4
|
+
|
5
|
+
## Options
|
6
|
+
|
7
|
+
- `--config`/`-c`: the path to the licensed configuration file
|
8
|
+
- default value: `./.licensed.yml`
|
9
|
+
- `--sources`/`-s`: runtime filter on which dependency sources are run. Sources must also be enabled in the licensed configuration file.
|
10
|
+
- default value: not set, all configured sources
|
11
|
+
- `--format`/`-f`: the output format
|
12
|
+
- default value: `yaml`
|
13
|
+
- `--licenses`/`-l`: if set, includes each dependency's detected license in the output
|
14
|
+
- default value: not set
|
15
|
+
|
16
|
+
### Reported Data
|
17
|
+
|
18
|
+
The following data is reported for each dependency when the YAML or JSON report formats are used
|
19
|
+
|
20
|
+
- name: the licensed recognized name for the dependency including the app and source name
|
21
|
+
- e.g. the full name for the `thor` bundler dependency used by this tool is `licensed.bundler.thor`
|
22
|
+
- version: the version of the enumerated dependency
|
23
|
+
- license: (optional) the dependency's SPDX license identifier
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# `licensed migrate`
|
2
|
+
|
3
|
+
Migrates the licensed configuration and cached metadata files from a previous version to the most recent version. This is not required for all major version updates. See [migrations documentation](../migrations) for details on the migrations needed for each major version.
|
4
|
+
|
5
|
+
## Options
|
6
|
+
|
7
|
+
- `--config`/`-c`: the path to the licensed configuration file
|
8
|
+
- default value: `./.licensed.yml`
|
9
|
+
- `--from`/`-f`: the licensed version to migrate from
|
10
|
+
- required
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# `licensed notices`
|
2
|
+
|
3
|
+
Outputs license and notice text for all dependencies in each app into a `NOTICE` file in the app's `cache_path`. If an app uses a shared cache path, the file name will contain the app name as well, e.g. `NOTICE.my_app`.
|
4
|
+
|
5
|
+
`NOTICE` file contents are retrieved from cached records, with the assumption that cached records have already been reviewed in a compliance workflow.
|
6
|
+
|
7
|
+
## Options
|
8
|
+
|
9
|
+
- `--config`/`-c`: the path to the licensed configuration file
|
10
|
+
- default value: `./.licensed.yml`
|
11
|
+
- `--sources`/`-s`: runtime filter on which dependency sources are run. Sources must also be enabled in the licensed configuration file.
|
12
|
+
- default value: not set, all configured sources
|