Skip to content

Commit

Permalink
Updated some code for metrics and updated license details
Browse files Browse the repository at this point in the history
  • Loading branch information
mrinc committed Oct 28, 2024
1 parent 551df58 commit 9166458
Show file tree
Hide file tree
Showing 64 changed files with 2,183 additions and 325 deletions.
44 changes: 14 additions & 30 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -618,44 +618,28 @@ copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
- File header:
BSB (Better-Service-Base) is an event-bus based microservice framework.
Copyright (C) 2024 BetterCorp (PTY) Ltd

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Alternatively, you may obtain a commercial license for this program.
The commercial license allows you to use the Program in a closed-source manner,
including the right to create derivative works that are not subject to the terms
of the AGPL.

To obtain a commercial license, please contact the copyright holders at
https://www.bettercorp.dev. The terms and conditions of the commercial license
will be provided upon request.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.

You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,28 @@ Simplicity, flexibility and expandability were the key points when developing th

## Documentation/Usage

See [Getting Started](https://bsbcode.dev/GettingStarted/) for more details
See [Getting Started](https://bsbcode.dev/GettingStarted/) for more details

## License

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Alternatively, you may obtain a commercial license for this program.
The commercial license allows you to use the Program in a closed-source manner,
including the right to create derivative works that are not subject to the terms
of the AGPL.

To obtain a commercial license, please contact the copyright holders at
https://www.bettercorp.dev. The terms and conditions of the commercial license
will be provided upon request.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
26 changes: 26 additions & 0 deletions nodejs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# BSB (Better-Service-Base) is an event-bus based microservice framework.
# Copyright (C) 2024 BetterCorp (PTY) Ltd

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# Alternatively, you may obtain a commercial license for this program.
# The commercial license allows you to use the Program in a closed-source manner,
# including the right to create derivative works that are not subject to the terms
# of the AGPL.

# To obtain a commercial license, please contact the copyright holders at
# https://www.bettercorp.dev. The terms and conditions of the commercial license
# will be provided upon request.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.

# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

# BSB Build
# Using 18 until nodejs fixes a bug with v20 - https://github.com/nodejs/docker-node/issues/1829
FROM node:18 as builder
Expand Down Expand Up @@ -28,6 +53,7 @@ ENV BSB_CONTAINER true
ENV BSB_PLUGIN_DIR /mnt/plugins

COPY entrypoint.sh /home/bsb/entrypoint.sh
COPY LICENSE /home/bsb/LICENSE

COPY --from=builder /home/bsb/package.json /home/bsb/package.json
COPY --from=builder /home/bsb/package-lock.json /home/bsb/package-lock.json
Expand Down
44 changes: 14 additions & 30 deletions nodejs/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -618,44 +618,28 @@ copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
- File header:
BSB (Better-Service-Base) is an event-bus based microservice framework.
Copyright (C) 2024 BetterCorp (PTY) Ltd

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Alternatively, you may obtain a commercial license for this program.
The commercial license allows you to use the Program in a closed-source manner,
including the right to create derivative works that are not subject to the terms
of the AGPL.

To obtain a commercial license, please contact the copyright holders at
https://www.bettercorp.dev. The terms and conditions of the commercial license
will be provided upon request.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.

You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
27 changes: 27 additions & 0 deletions nodejs/build-lib-clients.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
/**
* BSB (Better-Service-Base) is an event-bus based microservice framework.
* Copyright (C) 2024 BetterCorp (PTY) Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alternatively, you may obtain a commercial license for this program.
* The commercial license allows you to use the Program in a closed-source manner,
* including the right to create derivative works that are not subject to the terms
* of the AGPL.
*
* To obtain a commercial license, please contact the copyright holders at
* https://www.bettercorp.dev. The terms and conditions of the commercial license
* will be provided upon request.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const fs = require("fs");
const path = require("path");
const process = require("process");
Expand Down
27 changes: 27 additions & 0 deletions nodejs/entrypoint.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
/**
* BSB (Better-Service-Base) is an event-bus based microservice framework.
* Copyright (C) 2024 BetterCorp (PTY) Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alternatively, you may obtain a commercial license for this program.
* The commercial license allows you to use the Program in a closed-source manner,
* including the right to create derivative works that are not subject to the terms
* of the AGPL.
*
* To obtain a commercial license, please contact the copyright holders at
* https://www.bettercorp.dev. The terms and conditions of the commercial license
* will be provided upon request.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const fs = require("fs");
const execSync = require("child_process").execSync;

Expand Down
26 changes: 26 additions & 0 deletions nodejs/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
#!/bin/sh

# BSB (Better-Service-Base) is an event-bus based microservice framework.
# Copyright (C) 2024 BetterCorp (PTY) Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Alternatively, you may obtain a commercial license for this program.
# The commercial license allows you to use the Program in a closed-source manner,
# including the right to create derivative works that are not subject to the terms
# of the AGPL.
#
# To obtain a commercial license, please contact the copyright holders at
# https://www.bettercorp.dev. The terms and conditions of the commercial license
# will be provided upon request.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.


# if [ "$BSB_CONTAINER" == "true" ]; then
# cd /mnt/bsb-plugins
# node /root/entrypoint.js
Expand Down
2 changes: 1 addition & 1 deletion nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bettercorp/service-base",
"license": "AGPL-3.0-only",
"license": "AGPL-3.0 or Commercial",
"repository": {
"url": "git+https://github.com/BetterCorp/better-service-base.git"
},
Expand Down
27 changes: 27 additions & 0 deletions nodejs/src/base/BSBConfig.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
/**
* BSB (Better-Service-Base) is an event-bus based microservice framework.
* Copyright (C) 2024 BetterCorp (PTY) Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alternatively, you may obtain a commercial license for this program.
* The commercial license allows you to use the Program in a closed-source manner,
* including the right to create derivative works that are not subject to the terms
* of the AGPL.
*
* To obtain a commercial license, please contact the copyright holders at
* https://www.bettercorp.dev. The terms and conditions of the commercial license
* will be provided upon request.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

/* eslint-disable @typescript-eslint/no-unused-vars */
import {EventsConfig, LoggingConfig, PluginDefinition, PluginType} from "../interfaces";
import {BaseWithLogging, BaseWithLoggingConfig} from "./base";
Expand Down
27 changes: 27 additions & 0 deletions nodejs/src/base/BSBEvents.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
/**
* BSB (Better-Service-Base) is an event-bus based microservice framework.
* Copyright (C) 2024 BetterCorp (PTY) Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alternatively, you may obtain a commercial license for this program.
* The commercial license allows you to use the Program in a closed-source manner,
* including the right to create derivative works that are not subject to the terms
* of the AGPL.
*
* To obtain a commercial license, please contact the copyright holders at
* https://www.bettercorp.dev. The terms and conditions of the commercial license
* will be provided upon request.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

/* eslint-disable @typescript-eslint/no-unused-vars */
import {Readable} from "node:stream";
import {BaseWithLoggingAndConfig, BaseWithLoggingAndConfigConfig} from "./base";
Expand Down
Loading

0 comments on commit 9166458

Please sign in to comment.