forked from KelvinTegelaar/CIPP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
- Loading branch information
Showing
191 changed files
with
20,476 additions
and
13,185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: CLA - Contributor License Agreement | ||
description: Sign the CLA for CIPP and CIPP-API | ||
labels: [CLA] | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: > | ||
CONTRIBUTOR LICENSE AGREEMENT ("Agreement") | ||
Version 1.0 | ||
1. Definitions | ||
"Contribution" means any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to Kelvin Tegelaar for inclusion in, or documentation of, any of the products owned or managed by Kelvin Tegelaar (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to Kelvin Tegelaar or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Kelvin Tegelaar for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution." | ||
"You" (or "Your") means the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Kelvin Tegelaar. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single contributor. This Agreement applies both to future Contributions and Contributions made prior to the date of this Agreement. | ||
2. Grant of Copyright License | ||
Subject to the terms and conditions of this Agreement, You hereby grant to Kelvin Tegelaar and to recipients of software distributed by Kelvin Tegelaar a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works for the purpose of dual licensing the application. | ||
3. Grant of Patent License | ||
You grant Kelvin Tegelaar, and those who receive the Contribution directly or indirectly from Kelvin Tegelaar, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under Your patent claims that are necessarily infringed by the Contribution or the combination of the Contribution with the Project to which it was submitted, to make, have made, use, offer to sell, sell, import, and otherwise dispose of the Contribution alone or with the Project. | ||
4. Other Rights Reserved | ||
Each party reserves all rights not expressly granted in this Agreement. No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are granted by implication, exhaustion, estoppel, or otherwise. | ||
You are not expected to provide support for your Contributions, except to the extent you desire to provide | ||
support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in | ||
writing, you provide your Contributions on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES | ||
OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A | ||
PARTICULAR PURPOSE. | ||
5. Representations | ||
You represent that you are legally entitled to grant the above licenses. If your employer(s) has rights to intellectual property that you create, you represent that you have received permission to make Contributions on behalf of that employer, or that your employer has waived such rights for your Contributions to Kelvin Tegelaar. | ||
You represent that each of Your Contributions is Your original creation. You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions. | ||
6. Project Sale | ||
In the event that the Project is sold or otherwise transferred in ownership in its entirety to a third party, a sum equivalent to fifteen percent (15%) of the total sale price or value of the consideration received shall be set aside. This sum shall be divided amongst all Contributors who have entered into this Agreement, with each Contributor receiving a portion proportional to the relative quantity and significance of their Contributions to the Project, as determined by Kelvin Tegelaar. The method and timeframe of the distribution shall be at the discretion of Kelvin Tegelaar and shall be communicated | ||
- type: textarea | ||
attributes: | ||
label: Description | ||
description: > | ||
Type "I Agree" in the text area. | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: CIPP Development Frontend CI/CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
build_and_deploy_job: | ||
if: github.event.repository.fork == false && github.event_name == 'push' | ||
runs-on: ubuntu-latest | ||
name: Build and Deploy Job | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Build And Deploy | ||
id: builddeploy | ||
uses: Azure/static-web-apps-deploy@v1 | ||
with: | ||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} # change this to your repository secret name | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) | ||
action: 'upload' | ||
###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### | ||
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig | ||
app_location: '/' # App source code path | ||
api_location: '' # Api source code path - optional | ||
output_location: '' # Built app content directory - optional | ||
###### End of Repository/Build Configurations ###### | ||
|
||
close_pull_request_job: | ||
if: github.event.repository.fork == false && github.event_name == 'pull_request' && github.event.action == 'closed' | ||
runs-on: ubuntu-latest | ||
name: Close Pull Request Job | ||
steps: | ||
- name: Close Pull Request | ||
id: closepullrequest | ||
uses: Azure/static-web-apps-deploy@v1 | ||
with: | ||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} # change this to your repository secret name | ||
action: 'close' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
dist/ | ||
build/ | ||
importsMap.jsx | ||
Generate-Import-Map.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Using ES Module syntax compatible with Node.js 18 and ensuring cross-platform compatibility | ||
import fs from 'fs/promises' | ||
import path from 'path' | ||
import { fileURLToPath } from 'url' | ||
|
||
// Convert __dirname equivalent for ES Modules | ||
const __filename = fileURLToPath(import.meta.url) | ||
const __dirname = path.dirname(__filename) | ||
|
||
// Adjust the relative path as necessary to point to your routes.json location | ||
const routesPath = path.join(__dirname, './src/routes.json') // Example path | ||
|
||
// Load routes.json with an import assertion for JSON | ||
const routes = await import(`file://${routesPath}`, { assert: { type: 'json' } }).then( | ||
(module) => module.default, | ||
) | ||
|
||
let importsMap = "import React from 'react'\n export const importsMap = {\n" | ||
|
||
routes.forEach((route) => { | ||
if (route.component) { | ||
// Adjust the import path to be relative to the importsMap.js file location | ||
const importPath = route.component.replace('views', './views') | ||
// Ensure paths are Unix-like for the dynamic import to work cross-platform | ||
const unixImportPath = importPath.split(path.sep).join('/') | ||
importsMap += ` "${route.path}": React.lazy(() => import('${unixImportPath}')), \n` | ||
} | ||
}) | ||
|
||
importsMap += '}\nexport default importsMap' | ||
|
||
// Specify the output file path for the generated imports map | ||
const outputPath = path.join(__dirname, './src/importsMap.jsx') | ||
await fs.writeFile(outputPath, importsMap) | ||
console.log('Import map generated.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// generate-imports-map.js | ||
const fs = require('fs') | ||
const path = require('path') | ||
const routes = require('./path/to/routes.json') | ||
|
||
let importsMap = 'export const importsMap = {\n' | ||
|
||
routes.forEach(route => { | ||
if (route.component) { | ||
// Convert the path to a format that's relative to where you'll be importing from | ||
const importPath = route.component.replace('views', './views') | ||
const componentName = path.basename(importPath) | ||
|
||
// Create an import statement for the component | ||
importsMap += "${route.path}": React.lazy(() = > import('${importPath}')), \n`; | ||
} | ||
}) | ||
|
||
importsMap += '};\n' | ||
|
||
fs.writeFileSync(path.resolve(__dirname,'./src/importsMap.js'), importsMap) | ||
console.log('Import map generated.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
Custom licenses are available upon agreement via Github Sponsorships. Custom licenses will not have to be published in this repository. All contributors automatically agree with this provision. | ||
Custom licenses are available upon agreement via Github Sponsorships. Custom licenses will not have to be published in this repository. All contributors automatically agree with this provision. | ||
|
||
A CLA is signed by contributors if they have contributed before these provisions. Only contributions currently in the running latest release require the CLA to be signed. The CLA is signed by creating a issue using the issue template "CLA". the agreement will be related directly to available CLA template. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,13 @@ | ||
 | ||
 | ||
|
||
<hr> | ||
|
||
[](https://github.com/KelvinTegelaar/CIPP/releases) | ||
 | ||
[](https://github.com/KelvinTegelaar/CIPP/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement) | ||
[](https://github.com/KelvinTegelaar/CIPP/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement+label%3Abug) | ||
[](https://discord.com/invite/cyberdrain) | ||
[](https://github.com/sponsors/KelvinTegelaar) | ||
|
||
<hr> | ||
|
||
<center><h1>Sponsored by</h1></center> | ||
<p align="center"> | ||
|
||
 | ||
 | ||
 | ||
 | ||
 | ||
 | ||
|
||
</p> | ||
|
||
# What is this? | ||
|
||
The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners. The current Microsoft partner landscape makes it fairly hard to manage multi tenant situations, with loads of manual work. Microsoft Lighthouse might resolve this in the future but development of this is lagging far behind development of the current market for Microsoft Partners. | ||
The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners. The current Microsoft partner landscape makes it fairly hard to manage multi tenant situations, with loads of manual work. Microsoft Lighthouse might resolve this in the future but development of this is lagging far behind development of the current market for Microsoft Partners. | ||
This project is a way to help you with administration, with user management, and deploying your own preferred standards. It's not a replacement for security tools, or a way to cut costs on specific subscriptions. The tool should assist you in removing the gripes with standard partner management and save you several hours per engineer per month. | ||
For more information, we recommend checking out our website [here](https://cipp.app) | ||
For detailed documentation about features of CIPP, please check out our [documentation.](https://docs.cipp.app) | ||
|
||
This project is a way to help you with administration, with user management, and deploying your own preferred standards. It's not a replacement for security tools, or a way to cut costs on specific subscriptions. The tool should assist you in removing the gripes with standard partner management and save you several hours per engineer per month. | ||
# Our sponsors | ||
|
||
for more information, we recommend checking out our website [here](https://cipp.app) | ||
You can find our sponsors [here.](https://docs.cipp.app/#our-sponsors) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Write-Host "Starting CIPP Dev Emulators" | ||
$Path = (Get-Item $PSScriptRoot).Parent.Parent.FullName | ||
wt --title CIPP`; new-tab --title 'Azurite' -d $Path pwsh -c azurite`; new-tab --title 'FunctionApp' -d $Path\CIPP-API pwsh -c func start`; new-tab --title 'CIPP Frontend' -d $Path\CIPP pwsh -c npm run start`; new-tab --title 'SWA' -d $Path\CIPP pwsh -c npm run start-swa | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Param($Version) | ||
Set-Location (Get-Item $PSScriptRoot).Parent.FullName | ||
$Files = @('version_latest.txt', 'public/version_latest.txt') | ||
foreach ($File in $Files) { | ||
Set-Content $File -Value $Version | ||
} | ||
|
||
$Package = Get-Content package.json | ConvertFrom-Json | ||
$Package.version = $Version | ||
$Package | ConvertTo-Json -Depth 10 | Set-Content package.json |
Oops, something went wrong.