Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Source #112

Merged
merged 11 commits into from
Feb 12, 2024
Merged
5 changes: 5 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) 2022-2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
module.exports = {
root: true,
parserOptions: {
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2020-2024 Digital Bazaar, Inc.
#
# SPDX-License-Identifier: BSD-3-Clause

name: Bedrock Node.js CI

on: [push]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ coverage
node_modules
reports
.cache
package-lock.json
137 changes: 25 additions & 112 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,115 +1,28 @@
Bedrock Non-Commercial License v1.0
===================================
BSD 3-Clause License

Copyright (c) 2011-2019 Digital Bazaar, Inc.
All rights reserved.

Summary
=======

This license allows the licensee to use Bedrock and its software modules
for non-commercial purposes such as self-study, research, personal
projects, or for evaluation purposes. If the licensee uses Bedrock
directly or indirectly to generate revenue, or to provide products or
services to more than 500 people (users), the licensee must immediately
obtain a non-profit or commercial license.

Examples
========

These are examples of cases that are allowed by this license:

* The licensee is an individual that creates Bedrock-dependent software for
personal use only.
* The licensee is an individual or group of students/researchers that uses
Bedrock to experiment with an idea for a non-commercial project.
* The licensee is a startup company that prototypes a Bedrock-dependent
product before they have cash flow and will be testing the prototype
software with less than 500 users. The service will not generate revenue
of any kind.
* The licensee is a for-profit organization that creates a product or
service that is used by less than 500 users and is built with or
integrates with Bedrock. The service must be exclusively provided for free
and no parent, subsidiary, agent, or affiliate organization may profit
from its direct or indirect use.

These cases require a non-profit or commercial license:

* The licensee is a non-profit that receives funding to create and/or run a
Bedrock-dependent service.
* The licensee is a startup company with Bedrock-dependent software that is
funded by another organization.
* The licensee is a startup company that is going into production with
Bedrock-dependent software.
* The licensee has more than 500 users using a Bedrock-dependent service
either directly or indirectly.
* The licensee is a medium to large organization that builds or integrates a
commercial product or service with Bedrock.

THE LICENSE
===========

This section and all subsequent sections of this document constitute the
agreement between the licensee and Digital Bazaar, Inc.

DEFINITIONS
===========

* Product - The Bedrock software and any modules associated with Bedrock
where Digital Bazaar, Inc. owns the copyright.

CONDITIONS
==========
Copyright (c) 2011-2024, Digital Bazaar, Inc.

Redistribution and use in source and binary forms, with or without
modification, are permitted for NON-COMMERCIAL PURPOSES as long as the
following conditions are met:

1. Any use of the Product must not generate revenue for the licensee or
any parent, subsidiary, agent, or affiliate of the licensee. Use of
Product includes, but is not limited to, interacting with any of the
licensee's Product-dependent products or services over a network.

2. The aggregate number of individual people (users) of the licensee's
products or services that use Product must be less than 500.

3. Redistributions of source code must retain the above copyright notice
intact, this list of conditions and the following disclaimer.

4. Redistributions in binary form must reproduce the above copyright
notice, this license and the following disclaimer in the documentation and
on a web page available via interactive use and/or other materials
provided with the distribution.

5. Neither the name of the copyright holder, the names of its
contributors, nor any trademarks held by the copyright holder may be used
to endorse or promote products or services built using the Product without
specific prior written permission.

6. Any modifications are clearly outlined in release documentation and are
specifically mentioned as not being a part of an official Product release.
No additional restrictions to this license may be made when distributing
modifications.

7. For the avoidance of doubt, this license prohibits sublicensing of the
Product.

8. Any breach of this license by licensee must be resolved within 30 days.
Failure to do so results in the termination of this license.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

To obtain a non-profit or commercial license for Product, please contact
Digital Bazaar, Inc. at the following email address:

Digital Bazaar <[email protected]>
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11 changes: 11 additions & 0 deletions LICENSES/BSD-3-Clause.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright (c) <year> <owner>.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2012-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import * as bedrock from './lib/index.js';

Expand Down
4 changes: 3 additions & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2012-2021 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import {fileURLToPath} from 'node:url';
import path from 'node:path';
Expand Down
4 changes: 3 additions & 1 deletion lib/configUtil.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2012-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import {config as brConfig} from './config.js';
import {getByPath, setByPath, toPath} from './helpers.js';
Expand Down
4 changes: 3 additions & 1 deletion lib/events.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2012-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bummer that we need this in every file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an alternative for spelling out copyright in a .reuse/dep5 file--which I've added for formats where comments are cumbersome/odd (Markdown uses HTML comments) or not available (.json): 45a2af2

The more explicit we are, the less confusion the could/would be when we include any outside contribution, file, or directory (which would contain it's own copyright info).

The wildcard approach of a single LICENSE file just isn't as clear.

*/
import {EventEmitter} from '@digitalbazaar/async-node-events';

Expand Down
5 changes: 4 additions & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/*!
* Copyright (c) 2012-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

// eslint-disable-next-line max-len
const PROPERTY_REGEX = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
const ESCAPE_REGEX = /\\(\\)?/g;
Expand Down
4 changes: 3 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2012-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2022 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import * as brUtil from './util.js';
import {boolify, getByPath} from './helpers.js';
Expand Down
4 changes: 3 additions & 1 deletion lib/loggers/WorkerTransport.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2012-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import cycle from 'cycle';
import Transport from 'winston-transport';
Expand Down
4 changes: 3 additions & 1 deletion lib/loggers/fileLogger.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2012-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import * as brUtil from '../util.js';
import * as formatters from './formatters.js';
Expand Down
4 changes: 3 additions & 1 deletion lib/loggers/formatters.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2012-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import jsonStringify from 'fast-safe-stringify';
import {MESSAGE} from 'triple-beam';
Expand Down
4 changes: 3 additions & 1 deletion lib/loggers/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2012-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import * as fileLogger from './fileLogger.js';
import * as formatters from './formatters.js';
Expand Down
4 changes: 3 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2012-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2022 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import {config} from './config.js';
import {serializeError} from 'serialize-error';
Expand Down
4 changes: 3 additions & 1 deletion lib/worker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2012-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2022 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
// wait for initialization options from primary
process.on('message', init);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "6.0.2-0",
"type": "module",
"description": "A core foundation for rich Web applications.",
"license": "SEE LICENSE IN LICENSE.md",
"license": "BSD-3-Clause",
"author": {
"name": "Digital Bazaar, Inc.",
"email": "[email protected]",
Expand Down
4 changes: 3 additions & 1 deletion test/mocha/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2012-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2012-2022 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import * as bedrock from '@bedrock/core';
const {util: {BedrockError}} = bedrock;
Expand Down
4 changes: 3 additions & 1 deletion test/test.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2019-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2019-2024 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import {config} from '@bedrock/core';
import {fileURLToPath} from 'node:url';
Expand Down
4 changes: 3 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*!
* Copyright (c) 2019-2022 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2019-2022 Digital Bazaar, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
import * as bedrock from '@bedrock/core';
import '@bedrock/test';
Expand Down
Loading