This commit is contained in:
Med Mouine
2024-04-18 10:23:04 -04:00
parent aab6410176
commit 089a1cd890
19385 changed files with 147197 additions and 230 deletions

0
dynamic-plugins/.gitkeep Normal file
View File

View File

@@ -0,0 +1 @@
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);

View File

@@ -0,0 +1,59 @@
const fs = require('fs');
const path = require('path');
const process = require('process');
process.chdir(path.join(__dirname, '..'));
if (!process.argv[2]) {
console.log('Usage: node copy-plugins.js <destination directory>');
process.exit(1);
}
const destination = process.argv[2];
fs.mkdirSync(destination, { recursive: true });
const wrappersDir = path.join('.', 'wrappers');
const importsDir = path.join('.', 'imports');
const wrappers = fs
.readdirSync(wrappersDir, {
withFileTypes: true,
})
.filter(dirent => dirent.isDirectory())
.map(dirent => path.join(wrappersDir, dirent.name));
const imports = fs
.readdirSync(importsDir, {
withFileTypes: true,
})
.filter(dirent => dirent.isDirectory())
.map(dirent => path.join(importsDir, dirent.name));
for (const directory of [...imports, ...wrappers]) {
const distDynamicDir = path.join(directory, 'dist-dynamic');
const packageToCopy = fs.existsSync(distDynamicDir)
? distDynamicDir
: directory;
const pkgJsonPath = path.join(packageToCopy, 'package.json');
if (!fs.existsSync(pkgJsonPath)) {
console.error(`No 'package.json' in '${directory}': skipping`);
continue;
}
const pkgJson = require(fs.realpathSync(pkgJsonPath));
if (!pkgJson?.name) {
console.error(
`Package '${directory}' is missing 'package.json' or 'name' attribute.`,
);
continue;
}
const copyName = pkgJson.name.replace(/^@/, '').replace(/\//, '-');
console.log(`Copying ${packageToCopy} to ${destination}`);
const destinationDir = path.join(destination, copyName);
fs.rmSync(destinationDir, { recursive: true, force: true });
fs.cpSync(fs.realpathSync(packageToCopy), destinationDir, {
recursive: true,
});
}

View File

@@ -0,0 +1,16 @@
{
"name": "dynamic-plugins-utils",
"version": "0.0.0",
"license": "Apache-2.0",
"private": true,
"backstage": {
"role": "cli"
},
"scripts": {
"copy-dynamic-plugins": "node ./copy-plugins.js",
"lint": "backstage-cli package lint"
},
"devDependencies": {
"@backstage/cli": "0.26.2"
}
}

View File

@@ -0,0 +1 @@
#/*/*

View File

@@ -0,0 +1 @@
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);

View File

@@ -0,0 +1,128 @@
const exec = require('child_process').execSync;
const tar = require('tar');
const fs = require('fs');
const path = require('path');
const process = require('process');
const packageJson = require('./package.json');
const devMode = process.argv.includes('--dev', 2);
const dynamicPluginsRoot = path.join(
__dirname,
'..',
'..',
'dynamic-plugins-root',
);
if (devMode && !fs.existsSync(dynamicPluginsRoot)) {
console.warn(
`Directory '${dynamicPluginsRoot}' doesn't exist. Cannot symlink.`,
);
process.exit(1);
}
const cleanMode = process.argv.includes('--clean', 2);
const noInstall = process.argv.includes('--no-install', 2);
const installOnly = process.argv.includes('--install-only', 2);
for (const dep in packageJson.peerDependencies) {
if (!Object.hasOwn(packageJson.peerDependencies, dep)) {
continue;
}
console.log(`Importing: ${dep}@${packageJson.peerDependencies[dep]}`);
// BEGIN-NOSCAN
// This is a dev tool. We don't care about security here.
const archive = exec(`npm pack ${dep}@${packageJson.peerDependencies[dep]}`, {
stdio: ['pipe', 'pipe', 'ignore'],
})
.toString()
.trim();
// END-NOSCAN
const directory = dep.replace(/^@/, '').replace(/\//, '-');
if (cleanMode) {
console.log(
`Deleting previous package directory for: ${dep}@${packageJson.peerDependencies[dep]}`,
);
fs.rmSync(directory, { recursive: true, force: true });
}
fs.mkdirSync(directory, { recursive: true });
if (!installOnly) {
console.log(
`Extracting: ${dep}@${packageJson.peerDependencies[dep]} to ${directory}`,
);
// BEGIN-NOSCAN
// This is a dev tool. We don't care about security here.
// In addition, the tar package filter insecure entries by default
// (see default value for 'preservePaths').
tar.x({
file: archive,
cwd: directory,
strip: 1,
sync: true,
});
} else {
console.log(
`Skipping extraction of : ${dep}@${packageJson.peerDependencies[dep]} since --install-only was passed`,
);
}
// END-NOSCAN
fs.rmSync(archive);
const pkgJson = require(
fs.realpathSync(path.join(directory, 'package.json')),
);
if (!pkgJson?.backstage?.role) {
console.error(
`Package '${directory}' is missing 'backstage.role' attribute.`,
);
continue;
}
if (pkgJson.backstage.role === 'frontend-plugin') {
if (!fs.existsSync(path.join(directory, 'dist-scalprum'))) {
console.error(
`Frontend plugin package '${directory}' is missing 'dist-scalprum' sub-folder.`,
);
}
} else {
const distDynamicDir = path.join(directory, 'dist-dynamic');
if (!fs.existsSync(distDynamicDir)) {
console.error(
`Backend plugin package '${directory}' is missing 'dist-dynamic' sub-folder.`,
);
continue;
}
if (!noInstall) {
console.log(
`Installing dependencies for: ${pkgJson.name}-dynamic@${pkgJson.version}`,
);
// BEGIN-NOSCAN
// This is a dev tool. We assume the right yarn is on the PATH.
exec('yarn install --production --frozen-lockfile', {
cwd: distDynamicDir,
});
// END-NOSCAN
}
}
if (devMode) {
const distDynamicDir = path.join(directory, 'dist-dynamic');
const dedicatedDynamicPackage = fs.existsSync(distDynamicDir);
const packageToLink = dedicatedDynamicPackage ? distDynamicDir : directory;
const linkName = dedicatedDynamicPackage
? `${directory}-dynamic`
: directory;
const linkPath = path.join(dynamicPluginsRoot, linkName);
console.log(`Symlinking ${linkPath} to ${packageToLink}`);
fs.rmSync(linkPath, { force: true });
fs.symlinkSync(fs.realpathSync(packageToLink), linkPath, 'dir');
}
}

View File

@@ -0,0 +1,136 @@
# 3scale Backstage provider
The 3scale Backstage provider plugin synchronizes the 3scale content into the [Backstage](https://backstage.io/) catalog.
## For administrators
### Installation
Run the following command to install the 3scale Backstage provider plugin:
```console
yarn workspace backend add @janus-idp/backstage-plugin-3scale-backend
```
### Configuration
3scale Backstage provider allows configuration of one or multiple providers using the `app-config.yaml` configuration file of Backstage.
#### Legacy Backend Procedure
1. Use a `threeScaleApiEntity` marker to start configuring the `app-config.yaml` file of Backstage:
```yaml title="app-config.yaml"
catalog:
providers:
threeScaleApiEntity:
dev:
baseUrl: https://<TENANT>-admin.3scale.net
accessToken: <ACCESS_TOKEN>
schedule: # optional; same options as in TaskScheduleDefinition
# supports cron, ISO duration, "human duration" as used in code
frequency: { minutes: 30 }
# supports ISO duration, "human duration" as used in code
timeout: { minutes: 3 }
```
2. If installing into the _legacy_ backend, configure the scheduler for the entity provider using one of the following methods:
- **Method 1**: If the scheduler is configured inside the `app-config.yaml` using the schedule config key mentioned previously, add the following code to `packages/backend/src/plugins/catalog.ts` file:
```ts title="packages/backend/src/plugins/catalog.ts"
/* highlight-add-next-line */
import { ThreeScaleApiEntityProvider } from '@janus-idp/backstage-plugin-3scale-backend';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
/* ... other processors and/or providers ... */
/* highlight-add-start */
builder.addEntityProvider(
ThreeScaleApiEntityProvider.fromConfig(env.config, {
logger: env.logger,
scheduler: env.scheduler,
}),
);
/* highlight-add-end */
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return router;
}
```
***
**NOTE**
If you have made any changes to the schedule in the `app-config.yaml` file, then restart to apply the changes.
***
- **Method 2**: Add a schedule directly inside the `packages/backend/src/plugins/catalog.ts` file as follows:
```ts title="packages/backend/src/plugins/catalog.ts"
/* highlight-add-next-line */
import { ThreeScaleApiEntityProvider } from '@janus-idp/backstage-plugin-3scale-backend';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
/* ... other processors and/or providers ... */
/* highlight-add-start */
builder.addEntityProvider(
ThreeScaleApiEntityProvider.fromConfig(env.config, {
logger: env.logger,
schedule: env.scheduler.createScheduledTaskRunner({
frequency: { minutes: 30 },
timeout: { minutes: 3 },
}),
}),
);
/* highlight-add-end */
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return router;
}
```
***
**NOTE**
If both the `schedule` (hard-coded schedule) and `scheduler` (`app-config.yaml` schedule) option are provided in the `packages/backend/src/plugins/catalog.ts`, the `scheduler` option takes precedence. However, if the schedule inside the `app-config.yaml` file is not configured, then the `schedule` option is used.
***
#### New Backend Procedure
1. If installing into the new backend system, make the same configurations to the `app=config.yaml` as in the [Legacy Backend Installation Procedure](#legacy-backend-installation-procedure). Make sure to configure the schedule inside the `app-config.yaml` file. The default schedule is a frequency of 30 minutes and a timeout of 3 minutes.
2. Add the following code to the `packages/backend/src/index.ts` file:
```ts title="packages/backend/src/index.ts"
const backend = createBackend();
/* highlight-add-next-line */
backend.add(import('@janus-idp/backstage-plugin-3scale-backend/alpha'));
backend.start();
```
### Troubleshooting
When you start your Backstage application, you can see some log lines as follows:
```log
[1] 2023-02-13T15:26:09.356Z catalog info Discovered ApiEntity API type=plugin target=ThreeScaleApiEntityProvider:dev
[1] 2023-02-13T15:26:09.423Z catalog info Discovered ApiEntity Red Hat Event (DEV, v1.2.0) type=plugin target=ThreeScaleApiEntityProvider:dev
[1] 2023-02-13T15:26:09.620Z catalog info Discovered ApiEntity Red Hat Event (TEST, v1.1.0) type=plugin target=ThreeScaleApiEntityProvider:dev
[1] 2023-02-13T15:26:09.819Z catalog info Discovered ApiEntity Red Hat Event (PROD, v1.1.0) type=plugin target=ThreeScaleApiEntityProvider:dev
[1] 2023-02-13T15:26:09.819Z catalog info Applying the mutation with 3 entities type=plugin target=ThreeScaleApiEntityProvider:dev
```

View File

@@ -0,0 +1,5 @@
{
"name": "@janus-idp/backstage-plugin-3scale-backend",
"version": "1.4.12",
"main": "../dist/alpha.cjs.js"
}

View File

@@ -0,0 +1,11 @@
catalog:
providers:
threeScaleApiEntity:
dev:
baseUrl: '${THREESCALE_BASE_URL}' # https://<TENANT>-admin.3scale.net
accessToken: '${THREESCALE_ACCESS_TOKEN}'
schedule: # optional; same options as in TaskScheduleDefinition
# supports cron, ISO duration, "human duration" as used in code
frequency: { minutes: 1 }
# supports ISO duration, "human duration" as used in code
timeout: { minutes: 1 }

View File

@@ -0,0 +1,22 @@
import { TaskScheduleDefinitionConfig } from '@backstage/backend-tasks';
export interface Config {
catalog?: {
providers?: {
threeScaleApiEntity?: {
[key: string]: {
/**
* ThreeScaleConfig
*/
baseUrl: string;
/** @visibility secret */
accessToken: string;
systemLabel?: string;
ownerLabel?: string;
addLabels?: boolean;
schedule?: TaskScheduleDefinitionConfig;
};
};
};
};
}

View File

@@ -0,0 +1,136 @@
# 3scale Backstage provider
The 3scale Backstage provider plugin synchronizes the 3scale content into the [Backstage](https://backstage.io/) catalog.
## For administrators
### Installation
Run the following command to install the 3scale Backstage provider plugin:
```console
yarn workspace backend add @janus-idp/backstage-plugin-3scale-backend
```
### Configuration
3scale Backstage provider allows configuration of one or multiple providers using the `app-config.yaml` configuration file of Backstage.
#### Legacy Backend Procedure
1. Use a `threeScaleApiEntity` marker to start configuring the `app-config.yaml` file of Backstage:
```yaml title="app-config.yaml"
catalog:
providers:
threeScaleApiEntity:
dev:
baseUrl: https://<TENANT>-admin.3scale.net
accessToken: <ACCESS_TOKEN>
schedule: # optional; same options as in TaskScheduleDefinition
# supports cron, ISO duration, "human duration" as used in code
frequency: { minutes: 30 }
# supports ISO duration, "human duration" as used in code
timeout: { minutes: 3 }
```
2. If installing into the _legacy_ backend, configure the scheduler for the entity provider using one of the following methods:
- **Method 1**: If the scheduler is configured inside the `app-config.yaml` using the schedule config key mentioned previously, add the following code to `packages/backend/src/plugins/catalog.ts` file:
```ts title="packages/backend/src/plugins/catalog.ts"
/* highlight-add-next-line */
import { ThreeScaleApiEntityProvider } from '@janus-idp/backstage-plugin-3scale-backend';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
/* ... other processors and/or providers ... */
/* highlight-add-start */
builder.addEntityProvider(
ThreeScaleApiEntityProvider.fromConfig(env.config, {
logger: env.logger,
scheduler: env.scheduler,
}),
);
/* highlight-add-end */
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return router;
}
```
***
**NOTE**
If you have made any changes to the schedule in the `app-config.yaml` file, then restart to apply the changes.
***
- **Method 2**: Add a schedule directly inside the `packages/backend/src/plugins/catalog.ts` file as follows:
```ts title="packages/backend/src/plugins/catalog.ts"
/* highlight-add-next-line */
import { ThreeScaleApiEntityProvider } from '@janus-idp/backstage-plugin-3scale-backend';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
/* ... other processors and/or providers ... */
/* highlight-add-start */
builder.addEntityProvider(
ThreeScaleApiEntityProvider.fromConfig(env.config, {
logger: env.logger,
schedule: env.scheduler.createScheduledTaskRunner({
frequency: { minutes: 30 },
timeout: { minutes: 3 },
}),
}),
);
/* highlight-add-end */
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return router;
}
```
***
**NOTE**
If both the `schedule` (hard-coded schedule) and `scheduler` (`app-config.yaml` schedule) option are provided in the `packages/backend/src/plugins/catalog.ts`, the `scheduler` option takes precedence. However, if the schedule inside the `app-config.yaml` file is not configured, then the `schedule` option is used.
***
#### New Backend Procedure
1. If installing into the new backend system, make the same configurations to the `app=config.yaml` as in the [Legacy Backend Installation Procedure](#legacy-backend-installation-procedure). Make sure to configure the schedule inside the `app-config.yaml` file. The default schedule is a frequency of 30 minutes and a timeout of 3 minutes.
2. Add the following code to the `packages/backend/src/index.ts` file:
```ts title="packages/backend/src/index.ts"
const backend = createBackend();
/* highlight-add-next-line */
backend.add(import('@janus-idp/backstage-plugin-3scale-backend/alpha'));
backend.start();
```
### Troubleshooting
When you start your Backstage application, you can see some log lines as follows:
```log
[1] 2023-02-13T15:26:09.356Z catalog info Discovered ApiEntity API type=plugin target=ThreeScaleApiEntityProvider:dev
[1] 2023-02-13T15:26:09.423Z catalog info Discovered ApiEntity Red Hat Event (DEV, v1.2.0) type=plugin target=ThreeScaleApiEntityProvider:dev
[1] 2023-02-13T15:26:09.620Z catalog info Discovered ApiEntity Red Hat Event (TEST, v1.1.0) type=plugin target=ThreeScaleApiEntityProvider:dev
[1] 2023-02-13T15:26:09.819Z catalog info Discovered ApiEntity Red Hat Event (PROD, v1.1.0) type=plugin target=ThreeScaleApiEntityProvider:dev
[1] 2023-02-13T15:26:09.819Z catalog info Applying the mutation with 3 entities type=plugin target=ThreeScaleApiEntityProvider:dev
```

View File

@@ -0,0 +1,5 @@
{
"name": "@janus-idp/backstage-plugin-3scale-backend-dynamic",
"version": "1.4.12",
"main": "../dist/alpha.cjs.js"
}

View File

@@ -0,0 +1,11 @@
catalog:
providers:
threeScaleApiEntity:
dev:
baseUrl: '${THREESCALE_BASE_URL}' # https://<TENANT>-admin.3scale.net
accessToken: '${THREESCALE_ACCESS_TOKEN}'
schedule: # optional; same options as in TaskScheduleDefinition
# supports cron, ISO duration, "human duration" as used in code
frequency: { minutes: 1 }
# supports ISO duration, "human duration" as used in code
timeout: { minutes: 1 }

View File

@@ -0,0 +1,22 @@
import { TaskScheduleDefinitionConfig } from '@backstage/backend-tasks';
export interface Config {
catalog?: {
providers?: {
threeScaleApiEntity?: {
[key: string]: {
/**
* ThreeScaleConfig
*/
baseUrl: string;
/** @visibility secret */
accessToken: string;
systemLabel?: string;
ownerLabel?: string;
addLabels?: boolean;
schedule?: TaskScheduleDefinitionConfig;
};
};
};
};
}

View File

@@ -0,0 +1,63 @@
{
"name": "@janus-idp/backstage-plugin-3scale-backend-dynamic",
"version": "1.4.12",
"license": "Apache-2.0",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts"
},
"backstage": {
"role": "backend-plugin"
},
"exports": {
".": {
"require": "./dist/index.cjs.js",
"default": "./dist/index.cjs.js"
},
"./alpha": {
"require": "./dist/alpha.cjs.js",
"default": "./dist/alpha.cjs.js"
},
"./package.json": "./package.json"
},
"scripts": {},
"dependencies": {
"winston": "^3.11.0"
},
"devDependencies": {},
"files": [
"dist",
"config.d.ts",
"app-config.janus-idp.yaml",
"alpha"
],
"configSchema": "config.d.ts",
"repository": "github:janus-idp/backstage-plugins",
"keywords": [
"backstage",
"plugin"
],
"homepage": "https://janus-idp.io/",
"bugs": "https://github.com/janus-idp/backstage-plugins/issues",
"bundleDependencies": true,
"peerDependencies": {
"@backstage/backend-common": "^0.21.6",
"@backstage/backend-plugin-api": "^0.6.16",
"@backstage/backend-tasks": "^0.5.21",
"@backstage/catalog-model": "^1.4.5",
"@backstage/config": "^1.2.0",
"@backstage/plugin-catalog-node": "^1.11.0",
"@backstage/backend-dynamic-feature-service": "^0.2.8"
},
"overrides": {
"@aws-sdk/util-utf8-browser": {
"@smithy/util-utf8": "^2.0.0"
}
},
"resolutions": {
"@aws-sdk/util-utf8-browser": "npm:@smithy/util-utf8@~2"
}
}

View File

@@ -0,0 +1,234 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@aws-sdk/util-utf8-browser@npm:@smithy/util-utf8@~2":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-2.3.0.tgz#dd96d7640363259924a214313c3cf16e7dd329c5"
integrity sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==
dependencies:
"@smithy/util-buffer-from" "^2.2.0"
tslib "^2.6.2"
"@colors/colors@1.6.0", "@colors/colors@^1.6.0":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.6.0.tgz#ec6cd237440700bc23ca23087f513c75508958b0"
integrity sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==
"@dabh/diagnostics@^2.0.2":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@dabh/diagnostics/-/diagnostics-2.0.3.tgz#7f7e97ee9a725dffc7808d93668cc984e1dc477a"
integrity sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==
dependencies:
colorspace "1.1.x"
enabled "2.0.x"
kuler "^2.0.0"
"@smithy/is-array-buffer@^2.2.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz#f84f0d9f9a36601a9ca9381688bd1b726fd39111"
integrity sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==
dependencies:
tslib "^2.6.2"
"@smithy/util-buffer-from@^2.2.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz#6fc88585165ec73f8681d426d96de5d402021e4b"
integrity sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==
dependencies:
"@smithy/is-array-buffer" "^2.2.0"
tslib "^2.6.2"
"@types/triple-beam@^1.3.2":
version "1.3.5"
resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.5.tgz#74fef9ffbaa198eb8b588be029f38b00299caa2c"
integrity sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==
async@^3.2.3:
version "3.2.5"
resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66"
integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==
color-convert@^1.9.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
dependencies:
color-name "1.1.3"
color-name@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
color-name@^1.0.0:
version "1.1.4"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
color-string@^1.6.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4"
integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==
dependencies:
color-name "^1.0.0"
simple-swizzle "^0.2.2"
color@^3.1.3:
version "3.2.1"
resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164"
integrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==
dependencies:
color-convert "^1.9.3"
color-string "^1.6.0"
colorspace@1.1.x:
version "1.1.4"
resolved "https://registry.yarnpkg.com/colorspace/-/colorspace-1.1.4.tgz#8d442d1186152f60453bf8070cd66eb364e59243"
integrity sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==
dependencies:
color "^3.1.3"
text-hex "1.0.x"
enabled@2.0.x:
version "2.0.0"
resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2"
integrity sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==
fecha@^4.2.0:
version "4.2.3"
resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd"
integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==
fn.name@1.x.x:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc"
integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==
inherits@^2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
is-arrayish@^0.3.1:
version "0.3.2"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03"
integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==
is-stream@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077"
integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==
kuler@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3"
integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==
logform@^2.3.2, logform@^2.4.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/logform/-/logform-2.6.0.tgz#8c82a983f05d6eaeb2d75e3decae7a768b2bf9b5"
integrity sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==
dependencies:
"@colors/colors" "1.6.0"
"@types/triple-beam" "^1.3.2"
fecha "^4.2.0"
ms "^2.1.1"
safe-stable-stringify "^2.3.1"
triple-beam "^1.3.0"
ms@^2.1.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
one-time@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/one-time/-/one-time-1.0.0.tgz#e06bc174aed214ed58edede573b433bbf827cb45"
integrity sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==
dependencies:
fn.name "1.x.x"
readable-stream@^3.4.0, readable-stream@^3.6.0:
version "3.6.2"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
dependencies:
inherits "^2.0.3"
string_decoder "^1.1.1"
util-deprecate "^1.0.1"
safe-buffer@~5.2.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
safe-stable-stringify@^2.3.1:
version "2.4.3"
resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886"
integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==
simple-swizzle@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a"
integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==
dependencies:
is-arrayish "^0.3.1"
stack-trace@0.0.x:
version "0.0.10"
resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0"
integrity sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==
string_decoder@^1.1.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
dependencies:
safe-buffer "~5.2.0"
text-hex@1.0.x:
version "1.0.0"
resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5"
integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==
triple-beam@^1.3.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984"
integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==
tslib@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
util-deprecate@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
winston-transport@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.7.0.tgz#e302e6889e6ccb7f383b926df6936a5b781bd1f0"
integrity sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==
dependencies:
logform "^2.3.2"
readable-stream "^3.6.0"
triple-beam "^1.3.0"
winston@^3.11.0:
version "3.13.0"
resolved "https://registry.yarnpkg.com/winston/-/winston-3.13.0.tgz#e76c0d722f78e04838158c61adc1287201de7ce3"
integrity sha512-rwidmA1w3SE4j0E5MuIufFhyJPBDG7Nu71RkZor1p2+qHvJSZ9GYDA81AyleQcZbh/+V6HjeBdfnTZJm9rSeQQ==
dependencies:
"@colors/colors" "^1.6.0"
"@dabh/diagnostics" "^2.0.2"
async "^3.2.3"
is-stream "^2.0.0"
logform "^2.4.0"
one-time "^1.0.0"
readable-stream "^3.4.0"
safe-stable-stringify "^2.3.1"
stack-trace "0.0.x"
triple-beam "^1.3.0"
winston-transport "^4.7.0"

View File

@@ -0,0 +1,72 @@
{
"name": "@janus-idp/backstage-plugin-3scale-backend",
"version": "1.4.12",
"license": "Apache-2.0",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts"
},
"backstage": {
"role": "backend-plugin"
},
"exports": {
".": {
"require": "./dist/index.cjs.js",
"default": "./dist/index.cjs.js"
},
"./alpha": {
"require": "./dist/alpha.cjs.js",
"default": "./dist/alpha.cjs.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "backstage-cli package build",
"clean": "backstage-cli package clean",
"export-dynamic": "janus-cli package export-dynamic-plugin",
"lint": "backstage-cli package lint",
"postpack": "backstage-cli package postpack",
"postversion": "yarn run export-dynamic",
"prepack": "backstage-cli package prepack",
"start": "backstage-cli package start",
"test": "backstage-cli package test --passWithNoTests --coverage",
"tsc": "tsc"
},
"dependencies": {
"@backstage/backend-common": "^0.21.6",
"@backstage/backend-plugin-api": "^0.6.16",
"@backstage/backend-tasks": "^0.5.21",
"@backstage/catalog-model": "^1.4.5",
"@backstage/config": "^1.2.0",
"@backstage/plugin-catalog-node": "^1.11.0",
"@backstage/backend-dynamic-feature-service": "^0.2.8",
"winston": "^3.11.0"
},
"devDependencies": {
"@backstage/cli": "0.26.2",
"@janus-idp/cli": "1.7.10",
"@types/supertest": "2.0.16",
"msw": "1.3.2",
"supertest": "6.3.3"
},
"files": [
"dist",
"config.d.ts",
"dist-dynamic/*.*",
"dist-dynamic/dist/**",
"dist-dynamic/alpha/*",
"app-config.janus-idp.yaml",
"alpha"
],
"configSchema": "config.d.ts",
"repository": "github:janus-idp/backstage-plugins",
"keywords": [
"backstage",
"plugin"
],
"homepage": "https://janus-idp.io/",
"bugs": "https://github.com/janus-idp/backstage-plugins/issues"
}

View File

@@ -0,0 +1,190 @@
# Ansible Automation Platform Backstage provider plugin
The Ansible Automation Platform (AAP) Backstage provider plugin synchronizes the accessible templates including job templates and workflow job templates from AAP into the [Backstage](https://backstage.io/) catalog.
## For administrators
### Installation and configuration
The AAP Backstage provider plugin allows the configuration of one or multiple providers using the `app-config.yaml` configuration file of Backstage.
#### Legacy Backend Procedure
1. Run the following command to install the AAP Backstage provider plugin:
```console
yarn workspace backend add @janus-idp/backstage-plugin-aap-backend
```
1. Use `aap` marker to configure the `app-config.yaml` file of Backstage as follows:
```yaml title="app-config.yaml"
catalog:
providers:
aap:
dev:
baseUrl: <URL>
authorization: 'Bearer ${AAP_AUTH_TOKEN}'
owner: <owner>
system: <system>
schedule: # optional; same options as in TaskScheduleDefinition
# supports cron, ISO duration, "human duration" as used in code
frequency: { minutes: 1 }
# supports ISO duration, "human duration" as used in code
timeout: { minutes: 1 }
```
1. Configure the scheduler using one of the following options:
- **Method 1**: If the scheduler is configured inside the `app-config.yaml` using the schedule config key mentioned previously, add the following code to `packages/backend/src/plugins/catalog.ts` file:
```ts title="packages/backend/src/plugins/catalog.ts"
/* highlight-add-next-line */
import { AapResourceEntityProvider } from '@janus-idp/backstage-plugin-aap-backend';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
/* ... other processors and/or providers ... */
/* highlight-add-start */
builder.addEntityProvider(
AapResourceEntityProvider.fromConfig(env.config, {
logger: env.logger,
scheduler: env.scheduler,
}),
);
/* highlight-add-end */
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return router;
}
```
***
**NOTE**
If you have made any changes to the schedule in the `app-config.yaml` file, then restart to apply the changes.
***
- **Method 2**: Add a schedule directly inside the `packages/backend/src/plugins/catalog.ts` file as follows:
```ts title="packages/backend/src/plugins/catalog.ts"
/* highlight-add-next-line */
import { AapResourceEntityProvider } from '@janus-idp/backstage-plugin-aap-backend';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
/* ... other processors and/or providers ... */
/* highlight-add-start */
builder.addEntityProvider(
AapResourceEntityProvider.fromConfig(env.config, {
logger: env.logger,
schedule: env.scheduler.createScheduledTaskRunner({
frequency: { minutes: 30 },
timeout: { minutes: 3 },
}),
}),
);
/* highlight-add-end */
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return router;
}
```
***
**NOTE**
If both the `schedule` (hard-coded schedule) and `scheduler` (`app-config.yaml` schedule) option are provided in the `packages/backend/src/plugins/catalog.ts`, the `scheduler` option takes precedence. However, if the schedule inside the `app-config.yaml` file is not configured, then the `schedule` option is used.
***
#### New Backend Procedure
1. Run the following command to install the AAP Backstage provider plugin:
```console
yarn workspace backend add @janus-idp/backstage-plugin-aap-backend
```
1. Use `aap` marker to configure the `app-config.yaml` file of Backstage . The default schedule is a frequency of 30 minutes and a timeout of 3 minutes, please configure the schedule in the `app-config.yaml` as per your requirement.
```yaml title="app-config.yaml"
catalog:
providers:
aap:
dev:
baseUrl: <URL>
authorization: 'Bearer ${AAP_AUTH_TOKEN}'
owner: <owner>
system: <system>
schedule: # optional (defaults to the configurations below if not provided); same options as in TaskScheduleDefinition
# supports cron, ISO duration, "human duration" as used in code
frequency: { minutes: 30 }
# supports ISO duration, "human duration" as used in code
timeout: { minutes: 3 }
```
1. Add the following code to the `packages/backend/src/index.ts` file:
```ts title="packages/backend/src/index.ts"
const backend = createBackend();
/* highlight-add-next-line */
backend.add(import('@janus-idp/backstage-plugin-aap-backend/alpha'));
backend.start();
```
### Troubleshooting
When you start your Backstage application, you can see the following log lines:
```log
[1] 2023-02-13T15:26:09.356Z catalog info Discovered ResourceEntity API type=plugin target=AapResourceEntityProvider:dev
[1] 2023-02-13T15:26:09.423Z catalog info Discovered ResourceEntity Red Hat Event (DEV, v1.2.0) type=plugin target=AapResourceEntityProvider:dev
[1] 2023-02-13T15:26:09.620Z catalog info Discovered ResourceEntity Red Hat Event (TEST, v1.1.0) type=plugin target=AapResourceEntityProvider:dev
[1] 2023-02-13T15:26:09.819Z catalog info Discovered ResourceEntity Red Hat Event (PROD, v1.1.0) type=plugin target=AapResourceEntityProvider:dev
[1] 2023-02-13T15:26:09.819Z catalog info Applying the mutation with 3 entities type=plugin target=AapResourceEntityProvider:dev
```
## For users
### Accessing templates from Ansible Automation Platform in Backstage
Once the AAP Backstage provider plugin is configured successfully, it synchronizes the templates including job templates and workflow job templates from AAP and displays them on the Backstage Catalog page as Resources.
#### Prerequisites
- Your Backstage application is installed and running.
- You have installed the AAP Backstage provider plugin. For installation and configuration instructions, see [Installation and configuration](#installation-and-configuration).
#### Procedure
1. Open your Backstage application and Go to the **Catalog** page.
1. Select **Resource** from the **Kind** drop-down and **job template** or **workflow job template** from the **Type** drop-down on the left side of the page.
![aap-backend-plugin-backstage](./images/aap-backend-plugin-user1.png)
A list of all the available templates from AAP appears on the page.
1. Select a template from the list.
The **OVERVIEW** tab appears containing different cards, such as:
- **About**: Provides detailed information about the template.
- **Relations**: Displays the visual representation of the template and associated aspects.
- **Links**: Contains links to the AAP dashboard and the details page of the template.
- **Has subcomponents**: Displays a list of associated subcomponents.
![aap-backend-plugin-backstage-details](./images/aap-backend-plugin-user2.png)

View File

@@ -0,0 +1,5 @@
{
"name": "@janus-idp/backstage-plugin-aap-backend",
"version": "1.5.10",
"main": "../dist/alpha.cjs.js"
}

View File

@@ -0,0 +1,6 @@
catalog:
providers:
aap:
prod:
baseUrl: '${AAP_BASE_URL}'
authorization: '${AAP_AUTH_TOKEN}'

View File

@@ -0,0 +1,21 @@
import { TaskScheduleDefinitionConfig } from '@backstage/backend-tasks';
export interface Config {
catalog?: {
providers?: {
aap?: {
[key: string]: {
/**
* AapConfig
*/
baseUrl: string;
/** @visibility secret */
authorization: string;
system?: string;
owner?: string;
schedule?: TaskScheduleDefinitionConfig;
};
};
};
};
}

View File

@@ -0,0 +1,190 @@
# Ansible Automation Platform Backstage provider plugin
The Ansible Automation Platform (AAP) Backstage provider plugin synchronizes the accessible templates including job templates and workflow job templates from AAP into the [Backstage](https://backstage.io/) catalog.
## For administrators
### Installation and configuration
The AAP Backstage provider plugin allows the configuration of one or multiple providers using the `app-config.yaml` configuration file of Backstage.
#### Legacy Backend Procedure
1. Run the following command to install the AAP Backstage provider plugin:
```console
yarn workspace backend add @janus-idp/backstage-plugin-aap-backend
```
1. Use `aap` marker to configure the `app-config.yaml` file of Backstage as follows:
```yaml title="app-config.yaml"
catalog:
providers:
aap:
dev:
baseUrl: <URL>
authorization: 'Bearer ${AAP_AUTH_TOKEN}'
owner: <owner>
system: <system>
schedule: # optional; same options as in TaskScheduleDefinition
# supports cron, ISO duration, "human duration" as used in code
frequency: { minutes: 1 }
# supports ISO duration, "human duration" as used in code
timeout: { minutes: 1 }
```
1. Configure the scheduler using one of the following options:
- **Method 1**: If the scheduler is configured inside the `app-config.yaml` using the schedule config key mentioned previously, add the following code to `packages/backend/src/plugins/catalog.ts` file:
```ts title="packages/backend/src/plugins/catalog.ts"
/* highlight-add-next-line */
import { AapResourceEntityProvider } from '@janus-idp/backstage-plugin-aap-backend';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
/* ... other processors and/or providers ... */
/* highlight-add-start */
builder.addEntityProvider(
AapResourceEntityProvider.fromConfig(env.config, {
logger: env.logger,
scheduler: env.scheduler,
}),
);
/* highlight-add-end */
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return router;
}
```
***
**NOTE**
If you have made any changes to the schedule in the `app-config.yaml` file, then restart to apply the changes.
***
- **Method 2**: Add a schedule directly inside the `packages/backend/src/plugins/catalog.ts` file as follows:
```ts title="packages/backend/src/plugins/catalog.ts"
/* highlight-add-next-line */
import { AapResourceEntityProvider } from '@janus-idp/backstage-plugin-aap-backend';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
/* ... other processors and/or providers ... */
/* highlight-add-start */
builder.addEntityProvider(
AapResourceEntityProvider.fromConfig(env.config, {
logger: env.logger,
schedule: env.scheduler.createScheduledTaskRunner({
frequency: { minutes: 30 },
timeout: { minutes: 3 },
}),
}),
);
/* highlight-add-end */
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return router;
}
```
***
**NOTE**
If both the `schedule` (hard-coded schedule) and `scheduler` (`app-config.yaml` schedule) option are provided in the `packages/backend/src/plugins/catalog.ts`, the `scheduler` option takes precedence. However, if the schedule inside the `app-config.yaml` file is not configured, then the `schedule` option is used.
***
#### New Backend Procedure
1. Run the following command to install the AAP Backstage provider plugin:
```console
yarn workspace backend add @janus-idp/backstage-plugin-aap-backend
```
1. Use `aap` marker to configure the `app-config.yaml` file of Backstage . The default schedule is a frequency of 30 minutes and a timeout of 3 minutes, please configure the schedule in the `app-config.yaml` as per your requirement.
```yaml title="app-config.yaml"
catalog:
providers:
aap:
dev:
baseUrl: <URL>
authorization: 'Bearer ${AAP_AUTH_TOKEN}'
owner: <owner>
system: <system>
schedule: # optional (defaults to the configurations below if not provided); same options as in TaskScheduleDefinition
# supports cron, ISO duration, "human duration" as used in code
frequency: { minutes: 30 }
# supports ISO duration, "human duration" as used in code
timeout: { minutes: 3 }
```
1. Add the following code to the `packages/backend/src/index.ts` file:
```ts title="packages/backend/src/index.ts"
const backend = createBackend();
/* highlight-add-next-line */
backend.add(import('@janus-idp/backstage-plugin-aap-backend/alpha'));
backend.start();
```
### Troubleshooting
When you start your Backstage application, you can see the following log lines:
```log
[1] 2023-02-13T15:26:09.356Z catalog info Discovered ResourceEntity API type=plugin target=AapResourceEntityProvider:dev
[1] 2023-02-13T15:26:09.423Z catalog info Discovered ResourceEntity Red Hat Event (DEV, v1.2.0) type=plugin target=AapResourceEntityProvider:dev
[1] 2023-02-13T15:26:09.620Z catalog info Discovered ResourceEntity Red Hat Event (TEST, v1.1.0) type=plugin target=AapResourceEntityProvider:dev
[1] 2023-02-13T15:26:09.819Z catalog info Discovered ResourceEntity Red Hat Event (PROD, v1.1.0) type=plugin target=AapResourceEntityProvider:dev
[1] 2023-02-13T15:26:09.819Z catalog info Applying the mutation with 3 entities type=plugin target=AapResourceEntityProvider:dev
```
## For users
### Accessing templates from Ansible Automation Platform in Backstage
Once the AAP Backstage provider plugin is configured successfully, it synchronizes the templates including job templates and workflow job templates from AAP and displays them on the Backstage Catalog page as Resources.
#### Prerequisites
- Your Backstage application is installed and running.
- You have installed the AAP Backstage provider plugin. For installation and configuration instructions, see [Installation and configuration](#installation-and-configuration).
#### Procedure
1. Open your Backstage application and Go to the **Catalog** page.
1. Select **Resource** from the **Kind** drop-down and **job template** or **workflow job template** from the **Type** drop-down on the left side of the page.
![aap-backend-plugin-backstage](./images/aap-backend-plugin-user1.png)
A list of all the available templates from AAP appears on the page.
1. Select a template from the list.
The **OVERVIEW** tab appears containing different cards, such as:
- **About**: Provides detailed information about the template.
- **Relations**: Displays the visual representation of the template and associated aspects.
- **Links**: Contains links to the AAP dashboard and the details page of the template.
- **Has subcomponents**: Displays a list of associated subcomponents.
![aap-backend-plugin-backstage-details](./images/aap-backend-plugin-user2.png)

View File

@@ -0,0 +1,5 @@
{
"name": "@janus-idp/backstage-plugin-aap-backend-dynamic",
"version": "1.5.10",
"main": "../dist/alpha.cjs.js"
}

View File

@@ -0,0 +1,6 @@
catalog:
providers:
aap:
prod:
baseUrl: '${AAP_BASE_URL}'
authorization: '${AAP_AUTH_TOKEN}'

View File

@@ -0,0 +1,21 @@
import { TaskScheduleDefinitionConfig } from '@backstage/backend-tasks';
export interface Config {
catalog?: {
providers?: {
aap?: {
[key: string]: {
/**
* AapConfig
*/
baseUrl: string;
/** @visibility secret */
authorization: string;
system?: string;
owner?: string;
schedule?: TaskScheduleDefinitionConfig;
};
};
};
};
}

View File

@@ -0,0 +1,63 @@
{
"name": "@janus-idp/backstage-plugin-aap-backend-dynamic",
"version": "1.5.10",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
"license": "Apache-2.0",
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts"
},
"backstage": {
"role": "backend-plugin"
},
"exports": {
".": {
"require": "./dist/index.cjs.js",
"default": "./dist/index.cjs.js"
},
"./alpha": {
"require": "./dist/alpha.cjs.js",
"default": "./dist/alpha.cjs.js"
},
"./package.json": "./package.json"
},
"scripts": {},
"dependencies": {
"winston": "^3.11.0"
},
"devDependencies": {},
"files": [
"dist",
"config.d.ts",
"app-config.janus-idp.yaml",
"alpha"
],
"configSchema": "config.d.ts",
"repository": "github:janus-idp/backstage-plugins",
"keywords": [
"backstage",
"plugin"
],
"homepage": "https://janus-idp.io/",
"bugs": "https://github.com/janus-idp/backstage-plugins/issues",
"bundleDependencies": true,
"peerDependencies": {
"@backstage/backend-common": "^0.21.6",
"@backstage/backend-plugin-api": "^0.6.16",
"@backstage/backend-tasks": "^0.5.21",
"@backstage/catalog-model": "^1.4.5",
"@backstage/config": "^1.2.0",
"@backstage/plugin-catalog-node": "^1.11.0",
"@backstage/backend-dynamic-feature-service": "^0.2.8"
},
"overrides": {
"@aws-sdk/util-utf8-browser": {
"@smithy/util-utf8": "^2.0.0"
}
},
"resolutions": {
"@aws-sdk/util-utf8-browser": "npm:@smithy/util-utf8@~2"
}
}

View File

@@ -0,0 +1,234 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@aws-sdk/util-utf8-browser@npm:@smithy/util-utf8@~2":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-2.3.0.tgz#dd96d7640363259924a214313c3cf16e7dd329c5"
integrity sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==
dependencies:
"@smithy/util-buffer-from" "^2.2.0"
tslib "^2.6.2"
"@colors/colors@1.6.0", "@colors/colors@^1.6.0":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.6.0.tgz#ec6cd237440700bc23ca23087f513c75508958b0"
integrity sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==
"@dabh/diagnostics@^2.0.2":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@dabh/diagnostics/-/diagnostics-2.0.3.tgz#7f7e97ee9a725dffc7808d93668cc984e1dc477a"
integrity sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==
dependencies:
colorspace "1.1.x"
enabled "2.0.x"
kuler "^2.0.0"
"@smithy/is-array-buffer@^2.2.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz#f84f0d9f9a36601a9ca9381688bd1b726fd39111"
integrity sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==
dependencies:
tslib "^2.6.2"
"@smithy/util-buffer-from@^2.2.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz#6fc88585165ec73f8681d426d96de5d402021e4b"
integrity sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==
dependencies:
"@smithy/is-array-buffer" "^2.2.0"
tslib "^2.6.2"
"@types/triple-beam@^1.3.2":
version "1.3.5"
resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.5.tgz#74fef9ffbaa198eb8b588be029f38b00299caa2c"
integrity sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==
async@^3.2.3:
version "3.2.5"
resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66"
integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==
color-convert@^1.9.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
dependencies:
color-name "1.1.3"
color-name@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
color-name@^1.0.0:
version "1.1.4"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
color-string@^1.6.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4"
integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==
dependencies:
color-name "^1.0.0"
simple-swizzle "^0.2.2"
color@^3.1.3:
version "3.2.1"
resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164"
integrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==
dependencies:
color-convert "^1.9.3"
color-string "^1.6.0"
colorspace@1.1.x:
version "1.1.4"
resolved "https://registry.yarnpkg.com/colorspace/-/colorspace-1.1.4.tgz#8d442d1186152f60453bf8070cd66eb364e59243"
integrity sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==
dependencies:
color "^3.1.3"
text-hex "1.0.x"
enabled@2.0.x:
version "2.0.0"
resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2"
integrity sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==
fecha@^4.2.0:
version "4.2.3"
resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd"
integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==
fn.name@1.x.x:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc"
integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==
inherits@^2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
is-arrayish@^0.3.1:
version "0.3.2"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03"
integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==
is-stream@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077"
integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==
kuler@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3"
integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==
logform@^2.3.2, logform@^2.4.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/logform/-/logform-2.6.0.tgz#8c82a983f05d6eaeb2d75e3decae7a768b2bf9b5"
integrity sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==
dependencies:
"@colors/colors" "1.6.0"
"@types/triple-beam" "^1.3.2"
fecha "^4.2.0"
ms "^2.1.1"
safe-stable-stringify "^2.3.1"
triple-beam "^1.3.0"
ms@^2.1.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
one-time@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/one-time/-/one-time-1.0.0.tgz#e06bc174aed214ed58edede573b433bbf827cb45"
integrity sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==
dependencies:
fn.name "1.x.x"
readable-stream@^3.4.0, readable-stream@^3.6.0:
version "3.6.2"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
dependencies:
inherits "^2.0.3"
string_decoder "^1.1.1"
util-deprecate "^1.0.1"
safe-buffer@~5.2.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
safe-stable-stringify@^2.3.1:
version "2.4.3"
resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886"
integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==
simple-swizzle@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a"
integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==
dependencies:
is-arrayish "^0.3.1"
stack-trace@0.0.x:
version "0.0.10"
resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0"
integrity sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==
string_decoder@^1.1.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
dependencies:
safe-buffer "~5.2.0"
text-hex@1.0.x:
version "1.0.0"
resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5"
integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==
triple-beam@^1.3.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984"
integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==
tslib@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
util-deprecate@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
winston-transport@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.7.0.tgz#e302e6889e6ccb7f383b926df6936a5b781bd1f0"
integrity sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==
dependencies:
logform "^2.3.2"
readable-stream "^3.6.0"
triple-beam "^1.3.0"
winston@^3.11.0:
version "3.13.0"
resolved "https://registry.yarnpkg.com/winston/-/winston-3.13.0.tgz#e76c0d722f78e04838158c61adc1287201de7ce3"
integrity sha512-rwidmA1w3SE4j0E5MuIufFhyJPBDG7Nu71RkZor1p2+qHvJSZ9GYDA81AyleQcZbh/+V6HjeBdfnTZJm9rSeQQ==
dependencies:
"@colors/colors" "^1.6.0"
"@dabh/diagnostics" "^2.0.2"
async "^3.2.3"
is-stream "^2.0.0"
logform "^2.4.0"
one-time "^1.0.0"
readable-stream "^3.4.0"
safe-stable-stringify "^2.3.1"
stack-trace "0.0.x"
triple-beam "^1.3.0"
winston-transport "^4.7.0"

View File

@@ -0,0 +1,72 @@
{
"name": "@janus-idp/backstage-plugin-aap-backend",
"version": "1.5.10",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
"license": "Apache-2.0",
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts"
},
"backstage": {
"role": "backend-plugin"
},
"exports": {
".": {
"require": "./dist/index.cjs.js",
"default": "./dist/index.cjs.js"
},
"./alpha": {
"require": "./dist/alpha.cjs.js",
"default": "./dist/alpha.cjs.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "backstage-cli package build",
"clean": "backstage-cli package clean",
"export-dynamic": "janus-cli package export-dynamic-plugin",
"lint": "backstage-cli package lint",
"postpack": "backstage-cli package postpack",
"postversion": "yarn run export-dynamic",
"prepack": "backstage-cli package prepack",
"start": "backstage-cli package start",
"test": "backstage-cli package test --passWithNoTests --coverage",
"tsc": "tsc"
},
"dependencies": {
"@backstage/backend-common": "^0.21.6",
"@backstage/backend-plugin-api": "^0.6.16",
"@backstage/backend-tasks": "^0.5.21",
"@backstage/catalog-model": "^1.4.5",
"@backstage/config": "^1.2.0",
"@backstage/plugin-catalog-node": "^1.11.0",
"@backstage/backend-dynamic-feature-service": "^0.2.8",
"winston": "^3.11.0"
},
"devDependencies": {
"@backstage/cli": "0.26.2",
"@janus-idp/cli": "1.7.10",
"@types/supertest": "2.0.16",
"msw": "1.3.2",
"supertest": "6.3.3"
},
"files": [
"dist",
"config.d.ts",
"dist-dynamic/*.*",
"dist-dynamic/dist/**",
"dist-dynamic/alpha/*",
"app-config.janus-idp.yaml",
"alpha"
],
"configSchema": "config.d.ts",
"repository": "github:janus-idp/backstage-plugins",
"keywords": [
"backstage",
"plugin"
],
"homepage": "https://janus-idp.io/",
"bugs": "https://github.com/janus-idp/backstage-plugins/issues"
}

View File

@@ -0,0 +1,101 @@
# Azure Container Registry plugin for Backstage
The Azure Container Registry (ACR) plugin displays information about your container images available in the Azure Container Registry.
## For administrators
### Installing and configuring the ACR plugin
1. Run the following command to install the ACR plugin:
```bash
yarn workspace app add @janus-idp/backstage-plugin-acr
```
1. Set the proxy to the desired ACR server in the `app-config.yaml` file as follows:
```yaml
# app-config.yaml
proxy:
endpoints:
'/acr/api':
target: 'https://mycontainerregistry.azurecr.io/acr/v1/'
changeOrigin: true
headers:
# If you use Bearer Token for authorization, please replace the 'Basic' with 'Bearer' in the following line.
Authorization: 'Basic ${ACR_AUTH_TOKEN}'
# Change to "false" in case of using self hosted artifactory instance with a self-signed certificate
secure: true
```
1. Set the authorization using one of the following options:
- Basic authorization:
- Navigate to the ACR portal and go to the **Access Keys** tab.
- Retrieve the username and password of the Admin user and use the [Basic Auth Header Generator tool](https://www.debugbear.com/basic-auth-header-generator) or run `echo printf '<username>:<password>' | base64` in a terminal to convert the credentials into a basic token.
- Set the generated token as `ACR_AUTH_TOKEN` in environment variables.
- OAuth2: - Generate bearer access token using the process described in Authenticate with an Azure Container Registry.
- One method is to generate a bearer token using your basic authorization token, i.e.
```bash
curl --location 'https://<yourregistry>.azurecr.io/oauth2/token?scope=repository%3A*%3A*&service=<yourregistry>.azurecr.io' \
--header 'Authorization: Basic <basic_token>'
```
- Set the generated token as `ACR_AUTH_TOKEN` in environment variables. Make sure to replace the `Basic` in the `app-config.yaml` with `Bearer`
1. Enable an additional tab on the entity view page using the `packages/app/src/components/catalog/EntityPage.tsx` file as follows:
```tsx title="packages/app/src/components/catalog/EntityPage.tsx"
/* highlight-add-start */
import { AcrPage, isAcrAvailable } from '@janus-idp/backstage-plugin-acr';
/* highlight-add-end */
const serviceEntityPage = (
<EntityLayout>
// ...
{/* highlight-add-start */}
<EntityLayout.Route
if={e => Boolean(isAcrAvailable(e))}
path="/acr"
title="ACR"
>
<AcrPage />
</EntityLayout.Route>
{/* highlight-add-end */}
</EntityLayout>
);
```
1. Annotate your entity using the following annotations:
```yaml
metadata:
annotations:
'azure-container-registry/repository-name': `<REPOSITORY-NAME>',
```
## For users
### Using the ACR plugin in Backstage
ACR is a front-end plugin that enables you to view information about the container images from your Azure Container Registry in Backstage.
#### Prerequisites
- Your Backstage application is installed and running.
- You have installed the ACR plugin. For installation instructions, see [Installing and configuring the ACR plugin](#installing-and-configuring-the-acr-plugin).
#### Procedure
1. Open your Backstage application and select a component from the Catalog page.
1. Go to the **ACR** tab.
![acr-tab](./images/acr-plugin-user1.png)
The **ACR** tab in the Backstage UI contains a list of container images and related information, such as **TAG**, **CREATED**, **LAST MODIFIED**, and **MANIFEST**.

View File

@@ -0,0 +1,23 @@
proxy:
endpoints:
'/acr/api':
target: ${ACR_URL}
changeOrigin: true
headers:
# If you use Bearer Token for authorization, please replace the 'Basic' with 'Bearer' in the following line.
Authorization: 'Bearer ${ACR_AUTH_TOKEN}'
# Change to "false" in case of using self hosted artifactory instance with a self-signed certificate
secure: true
dynamicPlugins:
frontend:
janus-idp.backstage-plugin-acr:
mountPoints:
- mountPoint: entity.page.image-registry/cards
importName: AcrPage
config:
layout:
gridColumn: 1 / -1
if:
anyOf:
- isAcrAvailable

View File

@@ -0,0 +1,11 @@
{
"name": "janus-idp.backstage-plugin-acr",
"version": "1.2.35",
"extensions": [],
"registrationMethod": "callback",
"baseURL": "auto",
"loadScripts": [
"janus-idp.backstage-plugin-acr.9b1c93d50a6af33d4ebe.js"
],
"buildHash": "9b1c93d50a6af33d4ebeffe26ae2b4a2"
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,16 @@
/**
* A better abstraction over CSS.
*
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
* @website https://github.com/cssinjs/jss
* @license MIT
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,70 @@
.bs-shared-horizontal-stacked-bars {
--bar-gap: 3px;
display: block;
height: 100%;
overflow: hidden;
width: 100%;
cursor: pointer;
}
.bs-shared-horizontal-stacked-bars.is-inline {
display: inline-block;
}
.bs-shared-horizontal-stacked-bars__bars {
display: flex;
flex-direction: row;
height: 100%;
outline: none;
width: calc(100% + var(--bar-gap));
}
.bs-shared-horizontal-stacked-bars__data-bar {
--bar-gap-neg: calc(var(--bar-gap) * -1);
box-shadow: inset var(--bar-gap-neg) 0 0 #fff;
height: 100%;
transition: flex-grow 300ms linear;
}
.bs-shared-task-status-tooltip {
display: inline-grid;
grid-gap: 0.5rem;
text-align: left;
grid-template-columns: 1rem auto;
}
.bs-shared-task-status-tooltip__legend {
height: 1rem;
width: 1rem;
}
.bs-shared-icon-and-text {
align-items: baseline;
display: flex;
font-weight: 400;
font-size: 14px;
}
.bs-shared-icon-and-text__icon {
flex-shrink: 0;
margin-right: 5px;
}
.bs-shared-icon-and-text--lg {
display: block;
}
.bs-shared-icon-and-text--lg .bs-shared-icon-and-text__icon {
font-size: 1.2rem;
margin-right: 1rem;
}
.bs-shared-dashboard-icon {
font-size: 1.2rem;
}
.bs-shared-icon-flex-child {
flex: 0 0 auto;
position: relative;
top: 0.125em;
}
/*# sourceMappingURL=2435.2435.76306af6.css.map*/

View File

@@ -0,0 +1 @@
{"version":3,"file":"static/2435.2435.76306af6.css","mappings":"AAAA;EACE,cAAc;EACd,cAAc;EACd,YAAY;EACZ,gBAAgB;EAChB,WAAW;EACX,eAAe;AACjB;AACA;EACE,qBAAqB;AACvB;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,YAAY;EACZ,aAAa;EACb,kCAAkC;AACpC;AACA;EACE,wCAAwC;EACxC,6CAA6C;EAC7C,YAAY;EACZ,kCAAkC;AACpC;;ACvBA;EACE,oBAAoB;EACpB,gBAAgB;EAChB,gBAAgB;EAChB,gCAAgC;AAClC;;AAEA;EACE,YAAY;EACZ,WAAW;AACb;;ACVA;EACE,qBAAqB;EACrB,aAAa;EACb,gBAAgB;EAChB,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,iBAAiB;AACnB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,YAAY;AACd","sources":["webpack://janus-idp.backstage-plugin-acr/../shared-react/src/components/pipeline/HorizontalStackedBars.css","webpack://janus-idp.backstage-plugin-acr/../shared-react/src/components/pipeline/TaskStatusTooltip.css","webpack://janus-idp.backstage-plugin-acr/../shared-react/src/components/common/StatusIconAndText.css"],"sourcesContent":[".bs-shared-horizontal-stacked-bars {\n --bar-gap: 3px;\n display: block;\n height: 100%;\n overflow: hidden;\n width: 100%;\n cursor: pointer;\n}\n.bs-shared-horizontal-stacked-bars.is-inline {\n display: inline-block;\n}\n.bs-shared-horizontal-stacked-bars__bars {\n display: flex;\n flex-direction: row;\n height: 100%;\n outline: none;\n width: calc(100% + var(--bar-gap));\n}\n.bs-shared-horizontal-stacked-bars__data-bar {\n --bar-gap-neg: calc(var(--bar-gap) * -1);\n box-shadow: inset var(--bar-gap-neg) 0 0 #fff;\n height: 100%;\n transition: flex-grow 300ms linear;\n}\n",".bs-shared-task-status-tooltip {\n display: inline-grid;\n grid-gap: 0.5rem;\n text-align: left;\n grid-template-columns: 1rem auto;\n}\n\n.bs-shared-task-status-tooltip__legend {\n height: 1rem;\n width: 1rem;\n}\n",".bs-shared-icon-and-text {\n align-items: baseline;\n display: flex;\n font-weight: 400;\n font-size: 14px;\n}\n\n.bs-shared-icon-and-text__icon {\n flex-shrink: 0;\n margin-right: 5px;\n}\n\n.bs-shared-icon-and-text--lg {\n display: block;\n}\n\n.bs-shared-icon-and-text--lg .bs-shared-icon-and-text__icon {\n font-size: 1.2rem;\n margin-right: 1rem;\n}\n\n.bs-shared-dashboard-icon {\n font-size: 1.2rem;\n}\n\n.bs-shared-icon-flex-child {\n flex: 0 0 auto;\n position: relative;\n top: 0.125em;\n}\n"],"names":[],"sourceRoot":""}

View File

@@ -0,0 +1,2 @@
(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[2435],{73478:(e,n,i)=>{"use strict";i.r(n),i.d(n,{AcrDashboardPage:()=>A});var t,a,d,r,l,s=i(52322),o=(i(64821),i(22054)),c=i(4351),u=i(8069);i(72779),function(e){e.Completed="Completed"}(t||(t={})),(l=a||(a={})).All="All",l.Cancelling="Cancelling",l.Succeeded="Succeeded",l.Failed="Failed",l.Running="Running",l["In Progress"]="In Progress",l.FailedToStart="FailedToStart",l.PipelineNotStarted="PipelineNotStarted",l.Skipped="Skipped",l.Cancelled="Cancelled",l.Pending="Pending",l.Idle="Idle",l.Other="Other",(r=d||(d={})).PipelineRunCancelled="StoppedRunFinally",r.PipelineRunStopped="CancelledRunFinally",r.TaskRunCancelled="TaskRunCancelled",r.Cancelled="Cancelled",r.PipelineRunStopping="PipelineRunStopping",r.PipelineRunPending="PipelineRunPending",r.TaskRunStopping="TaskRunStopping",r.CreateContainerConfigError="CreateContainerConfigError",r.ExceededNodeResources="ExceededNodeResources",r.ExceededResourceQuota="ExceededResourceQuota",r.ConditionCheckFailed="ConditionCheckFailed";var p=i(38341);function g(e){if(!e||-1===e)return"N/A";const n="number"==typeof e?1e3*e:e;return(0,p.default)(new Date(n),"LLL d, yyyy, h:mm a")}var m=i(58272),f=i(26762),h=i(99135);(0,m.U)({createUnitDependencies:f.E,unitDependencies:h.J}),i(46782),i(76635);var C=i(28880);const x=({title:e,errorText:n})=>(0,s.jsx)(c.GB,{severity:"error",title:e,children:(0,s.jsx)(c.Oi,{language:"text",text:n})});var y=i(10368),v=i(79692),R=i(95544),j=i(7089);const P=(0,v.Z)({chip:{margin:0,marginRight:".2em",height:"1.5em","& > span":{padding:".3em"}}}),S=({label:e,hash:n})=>{const i=P();return(0,s.jsxs)(R.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,s.jsx)(j.Z,{label:e,className:i.chip}),n]})},k=[{title:"Tag",field:"name",type:"string",highlight:!0},{title:"Created",field:"createdTime",type:"date"},{title:"Last Modified",field:"lastModified",type:"date"},{title:"Manifest",field:"manifestDigest",type:"string",render:e=>{var n,i;const t=null==e||null===(n=e.manifestDigest)||void 0===n?void 0:n.substring(0,6),a=null==e||null===(i=e.manifestDigest)||void 0===i?void 0:i.substring(7,19);return(0,s.jsx)(S,{label:t,hash:a})}}],T=(0,y.Z)((e=>({empty:{padding:e.spacing(2),display:"flex",justifyContent:"center"}}))),b=({image:e})=>{const n=(0,u.useApi)(C.h),i=T(),t=`Azure Container Registry Repository: ${e}`,{loading:a,value:d,error:r}=(0,o.Z)((()=>n.getTags(e)));if(a)return(0,s.jsx)("div",{"data-testid":"acr-repository-loading",children:(0,s.jsx)(c.Ex,{})});if(!a&&r)return(0,s.jsx)(x,{title:"Could not fetch data.",errorText:r.toString()});const l=((null==d?void 0:d.tags)||[]).map((e=>({name:e.name,createdTime:g(e.createdTime),lastModified:g(e.lastUpdateTime),manifestDigest:e.digest,id:e.name})));return(0,s.jsx)("div",{"data-testid":"acr-repository-view",style:{border:"1px solid #ddd"},children:(0,s.jsx)(c.iA,{title:t,options:{paging:!0,padding:"dense"},data:l,columns:k,emptyContent:(0,s.jsx)("div",{className:i.empty,children:"No data found."})})})};var N=i(9795),E=i(45973);const A=()=>{const{imageName:e}=(()=>{var e,n;const{entity:i}=(0,N.u)();var t;const a=null!==(t=null==i||null===(n=i.metadata)||void 0===n||null===(e=n.annotations)||void 0===e?void 0:e[E.I])&&void 0!==t?t:"";if(!a)throw new Error("'Azure container registry' annotations are missing");return{imageName:a}})();return(0,s.jsx)(b,{image:e})}},53260:()=>{}}]);
//# sourceMappingURL=2435.b2399c08.chunk.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
"use strict";(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[328,8473],{18473:(e,t,n)=>{n.r(t),n.d(t,{createVersionedContext:()=>c,createVersionedContextForTesting:()=>_,createVersionedValueMap:()=>i,getOrCreateGlobalSingleton:()=>s,useVersionedContext:()=>u});var a=n(64821);const r="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),o=e=>`__@backstage/${e}__`;function s(e,t){const n=o(e);let a=r[n];return a||(a=t(),r[n]=a,a)}function i(e){Object.freeze(e);const t={atVersion:t=>e[t]};return Object.defineProperty(t,"$map",{configurable:!0,enumerable:!0,get:()=>e}),t}function c(e){return s(e,(()=>(0,a.createContext)(void 0)))}function u(e){return(0,a.useContext)(c(e))}function _(e){return{set(t){globalThis[`__@backstage/${e}__`]=(0,a.createContext)(i(t))},reset(){delete globalThis[`__@backstage/${e}__`]}}}}}]);
//# sourceMappingURL=328.5f4098b3.chunk.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"static/328.5f4098b3.chunk.js","mappings":"iVAWA,MAAMA,EARkB,oBAAXC,QAA0BA,OAAOC,OAASA,KAC5CD,OAEW,oBAATE,MAAwBA,KAAKD,OAASA,KACxCC,KAEFC,SAAS,cAATA,GAGHC,EAAWC,GAAO,gBAAgBA,MACxC,SAASC,EAA2BD,EAAIE,GACtC,MAAMC,EAAMJ,EAAQC,GACpB,IAAII,EAAQV,EAAaS,GACzB,OAAIC,IAGJA,EAAQF,IACRR,EAAaS,GAAOC,EACbA,EACT,CAEA,SAASC,EAAwBC,GAC/BC,OAAOC,OAAOF,GACd,MAAMG,EAAiB,CACrBC,UAAUC,GACDL,EAASK,IAUpB,OAPAJ,OAAOK,eAAeH,EAAgB,OAAQ,CAC5CI,cAAc,EACdC,YAAY,EACZC,IAAG,IACMT,IAGJG,CACT,CAEA,SAASO,EAAuBb,GAC9B,OAAOF,EACLE,GACA,KAAM,IAAAc,oBAAc,IAExB,CACA,SAASC,EAAoBf,GAC3B,OAAO,IAAAgB,YAAWH,EAAuBb,GAC3C,CACA,SAASiB,EAAiCjB,GACxC,MAAO,CACL,GAAAkB,CAAIf,GACFgB,WAAW,gBAAgBnB,QAAW,IAAAc,eACpCZ,EAAwBC,GAE5B,EACA,KAAAiB,UACSD,WAAW,gBAAgBnB,MACpC,EAEJ,C","sources":["webpack://janus-idp.backstage-plugin-acr/../../node_modules/@backstage/version-bridge/dist/index.esm.js"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nfunction getGlobalObject() {\n if (typeof window !== \"undefined\" && window.Math === Math) {\n return window;\n }\n if (typeof self !== \"undefined\" && self.Math === Math) {\n return self;\n }\n return Function(\"return this\")();\n}\nconst globalObject = getGlobalObject();\nconst makeKey = (id) => `__@backstage/${id}__`;\nfunction getOrCreateGlobalSingleton(id, supplier) {\n const key = makeKey(id);\n let value = globalObject[key];\n if (value) {\n return value;\n }\n value = supplier();\n globalObject[key] = value;\n return value;\n}\n\nfunction createVersionedValueMap(versions) {\n Object.freeze(versions);\n const versionedValue = {\n atVersion(version) {\n return versions[version];\n }\n };\n Object.defineProperty(versionedValue, \"$map\", {\n configurable: true,\n enumerable: true,\n get() {\n return versions;\n }\n });\n return versionedValue;\n}\n\nfunction createVersionedContext(key) {\n return getOrCreateGlobalSingleton(\n key,\n () => createContext(void 0)\n );\n}\nfunction useVersionedContext(key) {\n return useContext(createVersionedContext(key));\n}\nfunction createVersionedContextForTesting(key) {\n return {\n set(versions) {\n globalThis[`__@backstage/${key}__`] = createContext(\n createVersionedValueMap(versions)\n );\n },\n reset() {\n delete globalThis[`__@backstage/${key}__`];\n }\n };\n}\n\nexport { createVersionedContext, createVersionedContextForTesting, createVersionedValueMap, getOrCreateGlobalSingleton, useVersionedContext };\n//# sourceMappingURL=index.esm.js.map\n"],"names":["globalObject","window","Math","self","Function","makeKey","id","getOrCreateGlobalSingleton","supplier","key","value","createVersionedValueMap","versions","Object","freeze","versionedValue","atVersion","version","defineProperty","configurable","enumerable","get","createVersionedContext","createContext","useVersionedContext","useContext","createVersionedContextForTesting","set","globalThis","reset"],"sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
/**
* React Router v6.17.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,108 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
* decimal.js v10.4.3
* An arbitrary-precision Decimal type for JavaScript.
* https://github.com/MikeMcl/decimal.js
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
* MIT Licence
*/
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
/**
* @license Complex.js v2.1.1 12/05/2020
*
* Copyright (c) 2020, Robert Eisele (robert@xarg.org)
* Dual licensed under the MIT or GPL Version 2 licenses.
**/
/**
* @license Fraction.js v4.3.0 20/08/2023
* https://www.xarg.org/2014/03/rational-numbers-in-javascript/
*
* Copyright (c) 2023, Robert Eisele (robert@raw.org)
* Dual licensed under the MIT or GPL Version 2 licenses.
**/
/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license Material-UI v4.11.3
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license Material-UI v4.12.2
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license Material-UI v4.12.4
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
/**
* @remix-run/router v1.10.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,8 @@
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,19 @@
/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
"use strict";(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[8473,328],{18473:(e,t,n)=>{n.r(t),n.d(t,{createVersionedContext:()=>c,createVersionedContextForTesting:()=>_,createVersionedValueMap:()=>i,getOrCreateGlobalSingleton:()=>s,useVersionedContext:()=>u});var a=n(64821);const r="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),o=e=>`__@backstage/${e}__`;function s(e,t){const n=o(e);let a=r[n];return a||(a=t(),r[n]=a,a)}function i(e){Object.freeze(e);const t={atVersion:t=>e[t]};return Object.defineProperty(t,"$map",{configurable:!0,enumerable:!0,get:()=>e}),t}function c(e){return s(e,(()=>(0,a.createContext)(void 0)))}function u(e){return(0,a.useContext)(c(e))}function _(e){return{set(t){globalThis[`__@backstage/${e}__`]=(0,a.createContext)(i(t))},reset(){delete globalThis[`__@backstage/${e}__`]}}}}}]);
//# sourceMappingURL=8473.331599e7.chunk.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"static/8473.331599e7.chunk.js","mappings":"iVAWA,MAAMA,EARkB,oBAAXC,QAA0BA,OAAOC,OAASA,KAC5CD,OAEW,oBAATE,MAAwBA,KAAKD,OAASA,KACxCC,KAEFC,SAAS,cAATA,GAGHC,EAAWC,GAAO,gBAAgBA,MACxC,SAASC,EAA2BD,EAAIE,GACtC,MAAMC,EAAMJ,EAAQC,GACpB,IAAII,EAAQV,EAAaS,GACzB,OAAIC,IAGJA,EAAQF,IACRR,EAAaS,GAAOC,EACbA,EACT,CAEA,SAASC,EAAwBC,GAC/BC,OAAOC,OAAOF,GACd,MAAMG,EAAiB,CACrBC,UAAUC,GACDL,EAASK,IAUpB,OAPAJ,OAAOK,eAAeH,EAAgB,OAAQ,CAC5CI,cAAc,EACdC,YAAY,EACZC,IAAG,IACMT,IAGJG,CACT,CAEA,SAASO,EAAuBb,GAC9B,OAAOF,EACLE,GACA,KAAM,IAAAc,oBAAc,IAExB,CACA,SAASC,EAAoBf,GAC3B,OAAO,IAAAgB,YAAWH,EAAuBb,GAC3C,CACA,SAASiB,EAAiCjB,GACxC,MAAO,CACL,GAAAkB,CAAIf,GACFgB,WAAW,gBAAgBnB,QAAW,IAAAc,eACpCZ,EAAwBC,GAE5B,EACA,KAAAiB,UACSD,WAAW,gBAAgBnB,MACpC,EAEJ,C","sources":["webpack://janus-idp.backstage-plugin-acr/../../node_modules/@backstage/version-bridge/dist/index.esm.js"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nfunction getGlobalObject() {\n if (typeof window !== \"undefined\" && window.Math === Math) {\n return window;\n }\n if (typeof self !== \"undefined\" && self.Math === Math) {\n return self;\n }\n return Function(\"return this\")();\n}\nconst globalObject = getGlobalObject();\nconst makeKey = (id) => `__@backstage/${id}__`;\nfunction getOrCreateGlobalSingleton(id, supplier) {\n const key = makeKey(id);\n let value = globalObject[key];\n if (value) {\n return value;\n }\n value = supplier();\n globalObject[key] = value;\n return value;\n}\n\nfunction createVersionedValueMap(versions) {\n Object.freeze(versions);\n const versionedValue = {\n atVersion(version) {\n return versions[version];\n }\n };\n Object.defineProperty(versionedValue, \"$map\", {\n configurable: true,\n enumerable: true,\n get() {\n return versions;\n }\n });\n return versionedValue;\n}\n\nfunction createVersionedContext(key) {\n return getOrCreateGlobalSingleton(\n key,\n () => createContext(void 0)\n );\n}\nfunction useVersionedContext(key) {\n return useContext(createVersionedContext(key));\n}\nfunction createVersionedContextForTesting(key) {\n return {\n set(versions) {\n globalThis[`__@backstage/${key}__`] = createContext(\n createVersionedValueMap(versions)\n );\n },\n reset() {\n delete globalThis[`__@backstage/${key}__`];\n }\n };\n}\n\nexport { createVersionedContext, createVersionedContextForTesting, createVersionedValueMap, getOrCreateGlobalSingleton, useVersionedContext };\n//# sourceMappingURL=index.esm.js.map\n"],"names":["globalObject","window","Math","self","Function","makeKey","id","getOrCreateGlobalSingleton","supplier","key","value","createVersionedValueMap","versions","Object","freeze","versionedValue","atVersion","version","defineProperty","configurable","enumerable","get","createVersionedContext","createContext","useVersionedContext","useContext","createVersionedContextForTesting","set","globalThis","reset"],"sourceRoot":""}

View File

@@ -0,0 +1,2 @@
"use strict";(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[9047],{17057:(r,t,n)=>{n.d(t,{Z:()=>u});var e=n(7896),o=n(86522);function i(r){return r&&"object"===(0,o.Z)(r)&&r.constructor===Object}function u(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},o=n.clone?(0,e.Z)({},r):r;return i(r)&&i(t)&&Object.keys(t).forEach((function(e){"__proto__"!==e&&(i(t[e])&&e in r?o[e]=u(r[e],t[e],n):o[e]=t[e])})),o}},926:(r,t,n)=>{function e(r,t){(null==t||t>r.length)&&(t=r.length);for(var n=0,e=new Array(t);n<t;n++)e[n]=r[n];return e}n.d(t,{Z:()=>e})},7896:(r,t,n)=>{function e(){return e=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(r[e]=n[e])}return r},e.apply(this,arguments)}n.d(t,{Z:()=>e})},81079:(r,t,n)=>{function e(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}n.d(t,{Z:()=>e})},59740:(r,t,n)=>{n.d(t,{Z:()=>o});var e=n(31461);function o(r,t){if(null==r)return{};var n,o,i=(0,e.Z)(r,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);for(o=0;o<u.length;o++)n=u[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(i[n]=r[n])}return i}},31461:(r,t,n)=>{function e(r,t){if(null==r)return{};var n,e,o={},i=Object.keys(r);for(e=0;e<i.length;e++)n=i[e],t.indexOf(n)>=0||(o[n]=r[n]);return o}n.d(t,{Z:()=>e})},68079:(r,t,n)=>{n.d(t,{Z:()=>u});var e=n(926),o=n(81079),i=n(59147);function u(r){return function(r){if(Array.isArray(r))return(0,e.Z)(r)}(r)||(0,o.Z)(r)||(0,i.Z)(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},45850:(r,t,n)=>{n.d(t,{Z:()=>o});var e=n(86522);function o(r){var t=function(r,t){if("object"!==(0,e.Z)(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,"string");if("object"!==(0,e.Z)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(r);return"symbol"===(0,e.Z)(t)?t:String(t)}},86522:(r,t,n)=>{function e(r){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e(r)}n.d(t,{Z:()=>e})},59147:(r,t,n)=>{n.d(t,{Z:()=>o});var e=n(926);function o(r,t){if(r){if("string"==typeof r)return(0,e.Z)(r,t);var n=Object.prototype.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,e.Z)(r,t):void 0}}}}]);
//# sourceMappingURL=9047.4d53929a.chunk.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
/**
* React Router DOM v6.17.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
"use strict";(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[6261],{28880:(e,i,t)=>{function a(e,i,t){return i in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e}t.d(i,{E:()=>n,h:()=>r});const r=(0,t(8069).createApiRef)({id:"plugin.acr.service"});class n{async getBaseUrl(){const e=this.configApi.getOptionalString("acr.proxyPath")||"/acr/api";return`${await this.discoveryApi.getBaseUrl("proxy")}${e}`}async fetcher(e){const i=await fetch(e,{headers:{"Content-Type":"application/json"},method:"GET"});if(!i.ok)throw new Error(`failed to fetch data, status ${i.status}: ${i.statusText}`);return await i.json()}async getTags(e){const i=await this.getBaseUrl();return await this.fetcher(`${i}/${e}/_tags`)}constructor(e){a(this,"discoveryApi",void 0),a(this,"configApi",void 0),this.discoveryApi=e.discoveryApi,this.configApi=e.configApi}}},45973:(e,i,t)=>{t.d(i,{I:()=>a});const a="azure-container-registry/repository-name"},22474:(e,i,t)=>{t.r(i),t.d(i,{AcrPage:()=>c,acrPlugin:()=>s,isAcrAvailable:()=>p});var a=t(8069),r=t(28880),n=t(45973);const o=(0,a.createRouteRef)({id:"acr"}),s=(0,a.createPlugin)({id:"acr",routes:{root:o},apis:[(0,a.createApiFactory)({api:r.h,deps:{discoveryApi:a.discoveryApiRef,configApi:a.configApiRef},factory:({discoveryApi:e,configApi:i})=>new r.E({discoveryApi:e,configApi:i})})]}),c=s.provide((0,a.createComponentExtension)({name:"AzureContainerRegistryPage",component:{lazy:()=>Promise.all([t.e(625),t.e(660),t.e(4932),t.e(5215),t.e(233),t.e(5558),t.e(2435)]).then(t.bind(t,73478)).then((e=>e.AcrDashboardPage))}})),p=e=>{var i;return Boolean(null==e||null===(i=e.metadata.annotations)||void 0===i?void 0:i[n.I])}}}]);
//# sourceMappingURL=exposed-PluginRoot.ddd59af5.chunk.js.map

View File

@@ -0,0 +1,2 @@
(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[3494],{64855:e=>{function a(...e){return e.map((e=>{return(a=e)?"string"==typeof a?a:a.source:null;var a})).join("")}e.exports=function(e){const s={ruleDeclaration:/^[a-zA-Z][a-zA-Z0-9-]*/,unexpectedChars:/[!@#$^&',?+~`|:]/},n=e.COMMENT(/;/,/$/),l={className:"attribute",begin:a(s.ruleDeclaration,/(?=\s*=)/)};return{name:"Augmented Backus-Naur Form",illegal:s.unexpectedChars,keywords:["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],contains:[l,n,{className:"symbol",begin:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/},{className:"symbol",begin:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/},{className:"symbol",begin:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/},{className:"symbol",begin:/%[si]/},e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}}}]);
//# sourceMappingURL=react-syntax-highlighter_languages_highlight_abnf.ae27906c.chunk.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"static/react-syntax-highlighter_languages_highlight_abnf.ae27906c.chunk.js","mappings":"8HAoBA,SAASA,KAAUC,GAEjB,OADeA,EAAKC,KAAKC,IAAMC,OAZjBC,EAYwBF,GAVpB,iBAAPE,EAAwBA,EAE5BA,EAAGD,OAHM,KADlB,IAAgBC,CAY0B,IAAEC,KAAK,GAEjD,CA+EAC,EAAOC,QArEP,SAAcC,GACZ,MAAMC,EAAU,CACdC,gBAAiB,yBACjBC,gBAAiB,oBAsBbC,EAAcJ,EAAKK,QAAQ,IAAK,KAsBhCC,EAAsB,CAC1BC,UAAW,YACXC,MAAOjB,EAAOU,EAAQC,gBAAiB,aAGzC,MAAO,CACLO,KAAM,6BACNC,QAAST,EAAQE,gBACjBQ,SAjDe,CACf,QACA,MACA,OACA,KACA,OACA,MACA,QACA,SACA,SACA,OACA,KACA,OACA,QACA,KACA,QACA,OAkCAC,SAAU,CACRN,EACAF,EA/BuB,CACzBG,UAAW,SACXC,MAAO,sCAGmB,CAC1BD,UAAW,SACXC,MAAO,sCAGuB,CAC9BD,UAAW,SACXC,MAAO,+CAG4B,CACnCD,UAAW,SACXC,MAAO,SAmBLR,EAAKa,kBACLb,EAAKc,aAGX,C","sources":["webpack://janus-idp.backstage-plugin-acr/../../node_modules/highlight.js/lib/languages/abnf.js"],"sourcesContent":["/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/*\nLanguage: Augmented Backus-Naur Form\nAuthor: Alex McKibben <alex@nullscope.net>\nWebsite: https://tools.ietf.org/html/rfc5234\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction abnf(hljs) {\n const regexes = {\n ruleDeclaration: /^[a-zA-Z][a-zA-Z0-9-]*/,\n unexpectedChars: /[!@#$^&',?+~`|:]/\n };\n\n const keywords = [\n \"ALPHA\",\n \"BIT\",\n \"CHAR\",\n \"CR\",\n \"CRLF\",\n \"CTL\",\n \"DIGIT\",\n \"DQUOTE\",\n \"HEXDIG\",\n \"HTAB\",\n \"LF\",\n \"LWSP\",\n \"OCTET\",\n \"SP\",\n \"VCHAR\",\n \"WSP\"\n ];\n\n const commentMode = hljs.COMMENT(/;/, /$/);\n\n const terminalBinaryMode = {\n className: \"symbol\",\n begin: /%b[0-1]+(-[0-1]+|(\\.[0-1]+)+){0,1}/\n };\n\n const terminalDecimalMode = {\n className: \"symbol\",\n begin: /%d[0-9]+(-[0-9]+|(\\.[0-9]+)+){0,1}/\n };\n\n const terminalHexadecimalMode = {\n className: \"symbol\",\n begin: /%x[0-9A-F]+(-[0-9A-F]+|(\\.[0-9A-F]+)+){0,1}/\n };\n\n const caseSensitivityIndicatorMode = {\n className: \"symbol\",\n begin: /%[si]/\n };\n\n const ruleDeclarationMode = {\n className: \"attribute\",\n begin: concat(regexes.ruleDeclaration, /(?=\\s*=)/)\n };\n\n return {\n name: 'Augmented Backus-Naur Form',\n illegal: regexes.unexpectedChars,\n keywords: keywords,\n contains: [\n ruleDeclarationMode,\n commentMode,\n terminalBinaryMode,\n terminalDecimalMode,\n terminalHexadecimalMode,\n caseSensitivityIndicatorMode,\n hljs.QUOTE_STRING_MODE,\n hljs.NUMBER_MODE\n ]\n };\n}\n\nmodule.exports = abnf;\n"],"names":["concat","args","map","x","source","re","join","module","exports","hljs","regexes","ruleDeclaration","unexpectedChars","commentMode","COMMENT","ruleDeclarationMode","className","begin","name","illegal","keywords","contains","QUOTE_STRING_MODE","NUMBER_MODE"],"sourceRoot":""}

View File

@@ -0,0 +1,2 @@
(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[5406],{31139:e=>{function n(e){return e?"string"==typeof e?e:e.source:null}function a(...e){return e.map((e=>n(e))).join("")}function l(...e){return"("+e.map((e=>n(e))).join("|")+")"}e.exports=function(e){const n=["GET","POST","HEAD","PUT","DELETE","CONNECT","OPTIONS","PATCH","TRACE"];return{name:"Apache Access Log",contains:[{className:"number",begin:/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?\b/,relevance:5},{className:"number",begin:/\b\d+\b/,relevance:0},{className:"string",begin:a(/"/,l(...n)),end:/"/,keywords:n,illegal:/\n/,relevance:5,contains:[{begin:/HTTP\/[12]\.\d'/,relevance:5}]},{className:"string",begin:/\[\d[^\]\n]{8,}\]/,illegal:/\n/,relevance:1},{className:"string",begin:/\[/,end:/\]/,illegal:/\n/,relevance:0},{className:"string",begin:/"Mozilla\/\d\.\d \(/,end:/"/,illegal:/\n/,relevance:3},{className:"string",begin:/"/,end:/"/,illegal:/\n/,relevance:0}]}}}}]);
//# sourceMappingURL=react-syntax-highlighter_languages_highlight_accesslog.ec97677f.chunk.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"static/react-syntax-highlighter_languages_highlight_accesslog.ec97677f.chunk.js","mappings":"8HASA,SAASA,EAAOC,GACd,OAAKA,EACa,iBAAPA,EAAwBA,EAE5BA,EAAGD,OAHM,IAIlB,CAMA,SAASE,KAAUC,GAEjB,OADeA,EAAKC,KAAKC,GAAML,EAAOK,KAAIC,KAAK,GAEjD,CASA,SAASC,KAAUJ,GAEjB,MADe,IAAMA,EAAKC,KAAKC,GAAML,EAAOK,KAAIC,KAAK,KAAO,GAE9D,CA2FAE,EAAOC,QAhFP,SAAmBC,GAEjB,MAAMC,EAAa,CACjB,MACA,OACA,OACA,MACA,SACA,UACA,UACA,QACA,SAEF,MAAO,CACLC,KAAM,oBACNC,SAAU,CAER,CACEC,UAAW,SACXC,MAAO,mDACPC,UAAW,GAGb,CACEF,UAAW,SACXC,MAAO,UACPC,UAAW,GAGb,CACEF,UAAW,SACXC,MAAOb,EAAO,IAAKK,KAAUI,IAC7BM,IAAK,IACLC,SAAUP,EACVQ,QAAS,KACTH,UAAW,EACXH,SAAU,CACR,CACEE,MAAO,kBACPC,UAAW,KAKjB,CACEF,UAAW,SAIXC,MAAO,oBACPI,QAAS,KACTH,UAAW,GAEb,CACEF,UAAW,SACXC,MAAO,KACPE,IAAK,KACLE,QAAS,KACTH,UAAW,GAGb,CACEF,UAAW,SACXC,MAAO,sBACPE,IAAK,IACLE,QAAS,KACTH,UAAW,GAGb,CACEF,UAAW,SACXC,MAAO,IACPE,IAAK,IACLE,QAAS,KACTH,UAAW,IAInB,C","sources":["webpack://janus-idp.backstage-plugin-acr/../../node_modules/highlight.js/lib/languages/accesslog.js"],"sourcesContent":["/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n return joined;\n}\n\n/*\n Language: Apache Access Log\n Author: Oleg Efimov <efimovov@gmail.com>\n Description: Apache/Nginx Access Logs\n Website: https://httpd.apache.org/docs/2.4/logs.html#accesslog\n Audit: 2020\n */\n\n/** @type LanguageFn */\nfunction accesslog(_hljs) {\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods\n const HTTP_VERBS = [\n \"GET\",\n \"POST\",\n \"HEAD\",\n \"PUT\",\n \"DELETE\",\n \"CONNECT\",\n \"OPTIONS\",\n \"PATCH\",\n \"TRACE\"\n ];\n return {\n name: 'Apache Access Log',\n contains: [\n // IP\n {\n className: 'number',\n begin: /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b/,\n relevance: 5\n },\n // Other numbers\n {\n className: 'number',\n begin: /\\b\\d+\\b/,\n relevance: 0\n },\n // Requests\n {\n className: 'string',\n begin: concat(/\"/, either(...HTTP_VERBS)),\n end: /\"/,\n keywords: HTTP_VERBS,\n illegal: /\\n/,\n relevance: 5,\n contains: [\n {\n begin: /HTTP\\/[12]\\.\\d'/,\n relevance: 5\n }\n ]\n },\n // Dates\n {\n className: 'string',\n // dates must have a certain length, this prevents matching\n // simple array accesses a[123] and [] and other common patterns\n // found in other languages\n begin: /\\[\\d[^\\]\\n]{8,}\\]/,\n illegal: /\\n/,\n relevance: 1\n },\n {\n className: 'string',\n begin: /\\[/,\n end: /\\]/,\n illegal: /\\n/,\n relevance: 0\n },\n // User agent / relevance boost\n {\n className: 'string',\n begin: /\"Mozilla\\/\\d\\.\\d \\(/,\n end: /\"/,\n illegal: /\\n/,\n relevance: 3\n },\n // Strings\n {\n className: 'string',\n begin: /\"/,\n end: /\"/,\n illegal: /\\n/,\n relevance: 0\n }\n ]\n };\n}\n\nmodule.exports = accesslog;\n"],"names":["source","re","concat","args","map","x","join","either","module","exports","_hljs","HTTP_VERBS","name","contains","className","begin","relevance","end","keywords","illegal"],"sourceRoot":""}

View File

@@ -0,0 +1,2 @@
(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[2104],{74257:e=>{function n(...e){return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}e.exports=function(e){return{name:"ActionScript",aliases:["as"],keywords:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"class",beginKeywords:"package",end:/\{/,contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.TITLE_MODE]},{className:"meta",beginKeywords:"import include",end:/;/,keywords:{"meta-keyword":"import include"}},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,illegal:/\S/,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"rest_arg",begin:/[.]{3}/,end:/[a-zA-Z_$][a-zA-Z0-9_$]*/,relevance:10}]},{begin:n(/:\s*/,/([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)/)}]},e.METHOD_GUARD],illegal:/#/}}}}]);
//# sourceMappingURL=react-syntax-highlighter_languages_highlight_actionscript.9f0c4637.chunk.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"static/react-syntax-highlighter_languages_highlight_actionscript.9f0c4637.chunk.js","mappings":"8HAoBA,SAASA,KAAUC,GAEjB,OADeA,EAAKC,KAAKC,IAAMC,OAZjBC,EAYwBF,GAVpB,iBAAPE,EAAwBA,EAE5BA,EAAGD,OAHM,KADlB,IAAgBC,CAY0B,IAAEC,KAAK,GAEjD,CAyFAC,EAAOC,QA/EP,SAAsBC,GAWpB,MAAO,CACLC,KAAM,eACNC,QAAS,CAAE,MACXC,SAAU,CACRC,QAAS,mUAKTC,QAAS,6BAEXC,SAAU,CACRN,EAAKO,iBACLP,EAAKQ,kBACLR,EAAKS,oBACLT,EAAKU,qBACLV,EAAKW,cACL,CACEC,UAAW,QACXC,cAAe,UACfC,IAAK,KACLR,SAAU,CAAEN,EAAKe,aAEnB,CACEH,UAAW,QACXC,cAAe,kBACfC,IAAK,KACLE,YAAY,EACZV,SAAU,CACR,CAAEO,cAAe,sBACjBb,EAAKe,aAGT,CACEH,UAAW,OACXC,cAAe,iBACfC,IAAK,IACLX,SAAU,CAAE,eAAgB,mBAE9B,CACES,UAAW,WACXC,cAAe,WACfC,IAAK,OACLE,YAAY,EACZC,QAAS,KACTX,SAAU,CACRN,EAAKe,WACL,CACEH,UAAW,SACXM,MAAO,KACPJ,IAAK,KACLR,SAAU,CACRN,EAAKO,iBACLP,EAAKQ,kBACLR,EAAKS,oBACLT,EAAKU,qBA9DS,CACxBE,UAAW,WACXM,MAAO,SACPJ,IANe,2BAOfK,UAAW,MA8DL,CAAED,MAAO3B,EAAO,OApEU,qCAuE9BS,EAAKoB,cAEPH,QAAS,IAEb,C","sources":["webpack://janus-idp.backstage-plugin-acr/../../node_modules/highlight.js/lib/languages/actionscript.js"],"sourcesContent":["/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/*\nLanguage: ActionScript\nAuthor: Alexander Myadzel <myadzel@gmail.com>\nCategory: scripting\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction actionscript(hljs) {\n const IDENT_RE = /[a-zA-Z_$][a-zA-Z0-9_$]*/;\n const IDENT_FUNC_RETURN_TYPE_RE = /([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)/;\n\n const AS3_REST_ARG_MODE = {\n className: 'rest_arg',\n begin: /[.]{3}/,\n end: IDENT_RE,\n relevance: 10\n };\n\n return {\n name: 'ActionScript',\n aliases: [ 'as' ],\n keywords: {\n keyword: 'as break case catch class const continue default delete do dynamic each ' +\n 'else extends final finally for function get if implements import in include ' +\n 'instanceof interface internal is namespace native new override package private ' +\n 'protected public return set static super switch this throw try typeof use var void ' +\n 'while with',\n literal: 'true false null undefined'\n },\n contains: [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_NUMBER_MODE,\n {\n className: 'class',\n beginKeywords: 'package',\n end: /\\{/,\n contains: [ hljs.TITLE_MODE ]\n },\n {\n className: 'class',\n beginKeywords: 'class interface',\n end: /\\{/,\n excludeEnd: true,\n contains: [\n { beginKeywords: 'extends implements' },\n hljs.TITLE_MODE\n ]\n },\n {\n className: 'meta',\n beginKeywords: 'import include',\n end: /;/,\n keywords: { 'meta-keyword': 'import include' }\n },\n {\n className: 'function',\n beginKeywords: 'function',\n end: /[{;]/,\n excludeEnd: true,\n illegal: /\\S/,\n contains: [\n hljs.TITLE_MODE,\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n contains: [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n AS3_REST_ARG_MODE\n ]\n },\n { begin: concat(/:\\s*/, IDENT_FUNC_RETURN_TYPE_RE) }\n ]\n },\n hljs.METHOD_GUARD\n ],\n illegal: /#/\n };\n}\n\nmodule.exports = actionscript;\n"],"names":["concat","args","map","x","source","re","join","module","exports","hljs","name","aliases","keywords","keyword","literal","contains","APOS_STRING_MODE","QUOTE_STRING_MODE","C_LINE_COMMENT_MODE","C_BLOCK_COMMENT_MODE","C_NUMBER_MODE","className","beginKeywords","end","TITLE_MODE","excludeEnd","illegal","begin","relevance","METHOD_GUARD"],"sourceRoot":""}

View File

@@ -0,0 +1,2 @@
(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[9051],{84511:e=>{e.exports=function(e){const n="\\d(_|\\d)*",s="[eE][-+]?"+n,a="\\b("+n+"#\\w+(\\.\\w+)?#("+s+")?|"+n+"(\\."+n+")?("+s+")?)",i="[A-Za-z](_?[A-Za-z0-9.])*",r="[]\\{\\}%#'\"",t=e.COMMENT("--","$"),c={begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:r,contains:[{beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",beginKeywords:"not null constant access function procedure in out aliased exception"},{className:"type",begin:i,endsParent:!0,relevance:0}]};return{name:"Ada",case_insensitive:!0,keywords:{keyword:"abort else new return abs elsif not reverse abstract end accept entry select access exception of separate aliased exit or some all others subtype and for out synchronized array function overriding at tagged generic package task begin goto pragma terminate body private then if procedure type case in protected constant interface is raise use declare range delay limited record when delta loop rem while digits renames with do mod requeue xor",literal:"True False"},contains:[t,{className:"string",begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{className:"number",begin:a,relevance:0},{className:"symbol",begin:"'"+i},{className:"title",begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:r},{begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",keywords:"overriding function procedure with is renames return",returnBegin:!0,contains:[t,{className:"title",begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",excludeBegin:!0,excludeEnd:!0,illegal:r},c,{className:"type",begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,excludeEnd:!0,endsParent:!0,illegal:r}]},{className:"type",begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:r},c]}}}}]);
//# sourceMappingURL=react-syntax-highlighter_languages_highlight_ada.64cf14a5.chunk.js.map

View File

@@ -0,0 +1,2 @@
(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[3832],{10634:e=>{e.exports=function(e){var n={className:"built_in",begin:"\\b(void|bool|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|string|ref|array|double|float|auto|dictionary)"},a={className:"symbol",begin:"[a-zA-Z0-9_]+@"},i={className:"keyword",begin:"<",end:">",contains:[n,a]};return n.contains=[i],a.contains=[i],{name:"AngelScript",aliases:["asc"],keywords:"for in|0 break continue while do|0 return if else case switch namespace is cast or and xor not get|0 in inout|10 out override set|0 private public const default|0 final shared external mixin|10 enum typedef funcdef this super import from interface abstract|0 try catch protected explicit property",illegal:"(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])",contains:[{className:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE],relevance:0},{className:"string",begin:'"""',end:'"""'},{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE],relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:"^\\s*\\[",end:"\\]"},{beginKeywords:"interface namespace",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]},{beginKeywords:"class",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+",contains:[{begin:"[:,]\\s*",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]}]}]},n,a,{className:"literal",begin:"\\b(null|true|false)"},{className:"number",relevance:0,begin:"(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)"}]}}}}]);
//# sourceMappingURL=react-syntax-highlighter_languages_highlight_angelscript.2a9a507d.chunk.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"static/react-syntax-highlighter_languages_highlight_angelscript.2a9a507d.chunk.js","mappings":"8HA0HAA,EAAOC,QAlHP,SAAqBC,GACnB,IAAIC,EAAkB,CACpBC,UAAW,WACXC,MAAO,2HAGLC,EAAmB,CACrBF,UAAW,SACXC,MAAO,kBAGLE,EAAc,CAChBH,UAAW,UACXC,MAAO,IAAKG,IAAK,IACjBC,SAAU,CAAEN,EAAiBG,IAM/B,OAHAH,EAAgBM,SAAW,CAAEF,GAC7BD,EAAiBG,SAAW,CAAEF,GAEvB,CACLG,KAAM,cACNC,QAAS,CAAC,OAEVC,SACE,2SAMFC,QAAS,uDAETJ,SAAU,CACR,CACEL,UAAW,SACXC,MAAO,IAAMG,IAAK,IAClBK,QAAS,MACTJ,SAAU,CAAEP,EAAKY,kBACjBC,UAAW,GAIb,CACEX,UAAW,SACXC,MAAO,MAAOG,IAAK,OAGrB,CACEJ,UAAW,SACXC,MAAO,IAAKG,IAAK,IACjBK,QAAS,MACTJ,SAAU,CAAEP,EAAKY,kBACjBC,UAAW,GAGbb,EAAKc,oBACLd,EAAKe,qBAEL,CACEb,UAAW,SACXC,MAAO,WAAYG,IAAK,OAG1B,CACEU,cAAe,sBAAuBV,IAAK,KAC3CK,QAAS,UACTJ,SAAU,CACR,CACEL,UAAW,SACXC,MAAO,mBAKb,CACEa,cAAe,QAASV,IAAK,KAC7BK,QAAS,UACTJ,SAAU,CACR,CACEL,UAAW,SACXC,MAAO,gBACPI,SAAU,CACR,CACEJ,MAAO,WACPI,SAAU,CACR,CACEL,UAAW,SACXC,MAAO,uBASrBF,EACAG,EAEA,CACEF,UAAW,UACXC,MAAO,wBAGT,CACED,UAAW,SACXW,UAAW,EACXV,MAAO,uFAIf,C","sources":["webpack://janus-idp.backstage-plugin-acr/../../node_modules/highlight.js/lib/languages/angelscript.js"],"sourcesContent":["/*\nLanguage: AngelScript\nAuthor: Melissa Geels <melissa@nimble.tools>\nCategory: scripting\nWebsite: https://www.angelcode.com/angelscript/\n*/\n\n/** @type LanguageFn */\nfunction angelscript(hljs) {\n var builtInTypeMode = {\n className: 'built_in',\n begin: '\\\\b(void|bool|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|string|ref|array|double|float|auto|dictionary)'\n };\n\n var objectHandleMode = {\n className: 'symbol',\n begin: '[a-zA-Z0-9_]+@'\n };\n\n var genericMode = {\n className: 'keyword',\n begin: '<', end: '>',\n contains: [ builtInTypeMode, objectHandleMode ]\n };\n\n builtInTypeMode.contains = [ genericMode ];\n objectHandleMode.contains = [ genericMode ];\n\n return {\n name: 'AngelScript',\n aliases: ['asc'],\n\n keywords:\n 'for in|0 break continue while do|0 return if else case switch namespace is cast ' +\n 'or and xor not get|0 in inout|10 out override set|0 private public const default|0 ' +\n 'final shared external mixin|10 enum typedef funcdef this super import from interface ' +\n 'abstract|0 try catch protected explicit property',\n\n // avoid close detection with C# and JS\n illegal: '(^using\\\\s+[A-Za-z0-9_\\\\.]+;$|\\\\bfunction\\\\s*[^\\\\(])',\n\n contains: [\n { // 'strings'\n className: 'string',\n begin: '\\'', end: '\\'',\n illegal: '\\\\n',\n contains: [ hljs.BACKSLASH_ESCAPE ],\n relevance: 0\n },\n\n // \"\"\"heredoc strings\"\"\"\n {\n className: 'string',\n begin: '\"\"\"', end: '\"\"\"'\n },\n\n { // \"strings\"\n className: 'string',\n begin: '\"', end: '\"',\n illegal: '\\\\n',\n contains: [ hljs.BACKSLASH_ESCAPE ],\n relevance: 0\n },\n\n hljs.C_LINE_COMMENT_MODE, // single-line comments\n hljs.C_BLOCK_COMMENT_MODE, // comment blocks\n\n { // metadata\n className: 'string',\n begin: '^\\\\s*\\\\[', end: '\\\\]',\n },\n\n { // interface or namespace declaration\n beginKeywords: 'interface namespace', end: /\\{/,\n illegal: '[;.\\\\-]',\n contains: [\n { // interface or namespace name\n className: 'symbol',\n begin: '[a-zA-Z0-9_]+'\n }\n ]\n },\n\n { // class declaration\n beginKeywords: 'class', end: /\\{/,\n illegal: '[;.\\\\-]',\n contains: [\n { // class name\n className: 'symbol',\n begin: '[a-zA-Z0-9_]+',\n contains: [\n {\n begin: '[:,]\\\\s*',\n contains: [\n {\n className: 'symbol',\n begin: '[a-zA-Z0-9_]+'\n }\n ]\n }\n ]\n }\n ]\n },\n\n builtInTypeMode, // built-in types\n objectHandleMode, // object handles\n\n { // literals\n className: 'literal',\n begin: '\\\\b(null|true|false)'\n },\n\n { // numbers\n className: 'number',\n relevance: 0,\n begin: '(-?)(\\\\b0[xXbBoOdD][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?f?|\\\\.\\\\d+f?)([eE][-+]?\\\\d+f?)?)'\n }\n ]\n };\n}\n\nmodule.exports = angelscript;\n"],"names":["module","exports","hljs","builtInTypeMode","className","begin","objectHandleMode","genericMode","end","contains","name","aliases","keywords","illegal","BACKSLASH_ESCAPE","relevance","C_LINE_COMMENT_MODE","C_BLOCK_COMMENT_MODE","beginKeywords"],"sourceRoot":""}

View File

@@ -0,0 +1,2 @@
(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[5582],{43475:e=>{e.exports=function(e){const n={className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,contains:[n,{className:"number",begin:/:\d{1,5}/},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",begin:/[\$%]\{/,end:/\}/,contains:["self",{className:"number",begin:/[$%]\d+/}]},n,{className:"number",begin:/\d+/},e.QUOTE_STRING_MODE]}}],illegal:/\S/}}}}]);
//# sourceMappingURL=react-syntax-highlighter_languages_highlight_apache.c0d95a1a.chunk.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"static/react-syntax-highlighter_languages_highlight_apache.c0d95a1a.chunk.js","mappings":"8HAwFAA,EAAOC,QA7EP,SAAgBC,GACd,MAQMC,EAAa,CACjBC,UAAW,SACXC,MAAO,iDAMT,MAAO,CACLC,KAAM,gBACNC,QAAS,CAAE,cACXC,kBAAkB,EAClBC,SAAU,CACRP,EAAKQ,kBACL,CACEN,UAAW,UACXC,MAAO,OACPM,IAAK,IACLF,SAAU,CACRN,EAfY,CAClBC,UAAW,SACXC,MAAO,YAiBDH,EAAKU,QAAQV,EAAKW,kBAAmB,CAAEC,UAAW,MAGtD,CACEV,UAAW,YACXC,MAAO,MACPS,UAAW,EAGXC,SAAU,CACRC,SACE,8JAIJC,OAAQ,CACNN,IAAK,IACLG,UAAW,EACXC,SAAU,CAAEG,QAAS,yBACrBT,SAAU,CACR,CACEL,UAAW,OACXC,MAAO,OACPM,IAAK,OAEP,CACEP,UAAW,WACXC,MAAO,UACPM,IAAK,KACLF,SAAU,CACR,OA7DK,CACjBL,UAAW,SACXC,MAAO,aA+DCF,EA7DK,CACbC,UAAW,SACXC,MAAO,OA6DCH,EAAKW,sBAKbM,QAAS,KAEb,C","sources":["webpack://janus-idp.backstage-plugin-acr/../../node_modules/highlight.js/lib/languages/apache.js"],"sourcesContent":["/*\nLanguage: Apache config\nAuthor: Ruslan Keba <rukeba@gmail.com>\nContributors: Ivan Sagalaev <maniac@softwaremaniacs.org>\nWebsite: https://httpd.apache.org\nDescription: language definition for Apache configuration files (httpd.conf & .htaccess)\nCategory: common, config\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction apache(hljs) {\n const NUMBER_REF = {\n className: 'number',\n begin: /[$%]\\d+/\n };\n const NUMBER = {\n className: 'number',\n begin: /\\d+/\n };\n const IP_ADDRESS = {\n className: \"number\",\n begin: /\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?/\n };\n const PORT_NUMBER = {\n className: \"number\",\n begin: /:\\d{1,5}/\n };\n return {\n name: 'Apache config',\n aliases: [ 'apacheconf' ],\n case_insensitive: true,\n contains: [\n hljs.HASH_COMMENT_MODE,\n {\n className: 'section',\n begin: /<\\/?/,\n end: />/,\n contains: [\n IP_ADDRESS,\n PORT_NUMBER,\n // low relevance prevents us from claming XML/HTML where this rule would\n // match strings inside of XML tags\n hljs.inherit(hljs.QUOTE_STRING_MODE, { relevance: 0 })\n ]\n },\n {\n className: 'attribute',\n begin: /\\w+/,\n relevance: 0,\n // keywords arent needed for highlighting per se, they only boost relevance\n // for a very generally defined mode (starts with a word, ends with line-end\n keywords: {\n nomarkup:\n 'order deny allow setenv rewriterule rewriteengine rewritecond documentroot ' +\n 'sethandler errordocument loadmodule options header listen serverroot ' +\n 'servername'\n },\n starts: {\n end: /$/,\n relevance: 0,\n keywords: { literal: 'on off all deny allow' },\n contains: [\n {\n className: 'meta',\n begin: /\\s\\[/,\n end: /\\]$/\n },\n {\n className: 'variable',\n begin: /[\\$%]\\{/,\n end: /\\}/,\n contains: [\n 'self',\n NUMBER_REF\n ]\n },\n IP_ADDRESS,\n NUMBER,\n hljs.QUOTE_STRING_MODE\n ]\n }\n }\n ],\n illegal: /\\S/\n };\n}\n\nmodule.exports = apache;\n"],"names":["module","exports","hljs","IP_ADDRESS","className","begin","name","aliases","case_insensitive","contains","HASH_COMMENT_MODE","end","inherit","QUOTE_STRING_MODE","relevance","keywords","nomarkup","starts","literal","illegal"],"sourceRoot":""}

View File

@@ -0,0 +1,2 @@
(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[8243],{45019:e=>{function t(e){return e?"string"==typeof e?e:e.source:null}function n(...e){return e.map((e=>t(e))).join("")}function i(...e){return"("+e.map((e=>t(e))).join("|")+")"}e.exports=function(e){const t=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),r={className:"params",begin:/\(/,end:/\)/,contains:["self",e.C_NUMBER_MODE,t]},a=e.COMMENT(/--/,/$/),o=[a,e.COMMENT(/\(\*/,/\*\)/,{contains:["self",a]}),e.HASH_COMMENT_MODE];return{name:"AppleScript",aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},contains:[t,e.C_NUMBER_MODE,{className:"built_in",begin:n(/\b/,i(/clipboard info/,/the clipboard/,/info for/,/list (disks|folder)/,/mount volume/,/path to/,/(close|open for) access/,/(get|set) eof/,/current date/,/do shell script/,/get volume settings/,/random number/,/set volume/,/system attribute/,/system info/,/time to GMT/,/(load|run|store) script/,/scripting components/,/ASCII (character|number)/,/localized string/,/choose (application|color|file|file name|folder|from list|remote application|URL)/,/display (alert|dialog)/),/\b/)},{className:"built_in",begin:/^\s*return\b/},{className:"literal",begin:/\b(text item delimiters|current application|missing value)\b/},{className:"keyword",begin:n(/\b/,i(/apart from/,/aside from/,/instead of/,/out of/,/greater than/,/isn't|(doesn't|does not) (equal|come before|come after|contain)/,/(greater|less) than( or equal)?/,/(starts?|ends|begins?) with/,/contained by/,/comes (before|after)/,/a (ref|reference)/,/POSIX (file|path)/,/(date|time) string/,/quoted form/),/\b/)},{beginKeywords:"on",illegal:/[${=;\n]/,contains:[e.UNDERSCORE_TITLE_MODE,r]},...o],illegal:/\/\/|->|=>|\[\[/}}}}]);
//# sourceMappingURL=react-syntax-highlighter_languages_highlight_applescript.bbdd98ea.chunk.js.map

View File

@@ -0,0 +1,2 @@
(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[6088],{93801:e=>{e.exports=function(e){const n="[A-Za-z_][0-9A-Za-z_]*",a={keyword:"if for while var new function do return void else break",literal:"BackSlash DoubleQuote false ForwardSlash Infinity NaN NewLine null PI SingleQuote Tab TextFormatting true undefined",built_in:"Abs Acos Angle Attachments Area AreaGeodetic Asin Atan Atan2 Average Bearing Boolean Buffer BufferGeodetic Ceil Centroid Clip Console Constrain Contains Cos Count Crosses Cut Date DateAdd DateDiff Day Decode DefaultValue Dictionary Difference Disjoint Distance DistanceGeodetic Distinct DomainCode DomainName Equals Exp Extent Feature FeatureSet FeatureSetByAssociation FeatureSetById FeatureSetByPortalItem FeatureSetByRelationshipName FeatureSetByTitle FeatureSetByUrl Filter First Floor Geometry GroupBy Guid HasKey Hour IIf IndexOf Intersection Intersects IsEmpty IsNan IsSelfIntersecting Length LengthGeodetic Log Max Mean Millisecond Min Minute Month MultiPartToSinglePart Multipoint NextSequenceValue Now Number OrderBy Overlaps Point Polygon Polyline Portal Pow Random Relate Reverse RingIsClockWise Round Second SetGeometry Sin Sort Sqrt Stdev Sum SymmetricDifference Tan Text Timestamp Today ToLocal Top Touches ToUTC TrackCurrentTime TrackGeometryWindow TrackIndex TrackStartTime TrackWindow TypeOf Union UrlEncode Variance Weekday When Within Year "},t={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},i={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},r={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,i]};i.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,t,e.REGEXP_MODE];const s=i.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]);return{name:"ArcGIS Arcade",keywords:a,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"symbol",begin:"\\$[datastore|feature|layer|map|measure|sourcefeature|sourcelayer|targetfeature|targetlayer|value|view]+"},t,{begin:/[{,]\s*/,relevance:0,contains:[{begin:n+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:n,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(return)\\b)\\s*",keywords:"return",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+n+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:s}]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:n}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:s}],illegal:/\[|%/},{begin:/\$[(.]/}],illegal:/#(?!!)/}}}}]);
//# sourceMappingURL=react-syntax-highlighter_languages_highlight_arcade.b038cbff.chunk.js.map

View File

@@ -0,0 +1,2 @@
(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[9718],{27945:s=>{s.exports=function(s){const e={variants:[s.COMMENT("^[ \\t]*(?=#)","$",{relevance:0,excludeBegin:!0}),s.COMMENT("[;@]","$",{relevance:0}),s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]};return{name:"ARM Assembly",case_insensitive:!0,aliases:["arm"],keywords:{$pattern:"\\.?"+s.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?(?=\\s)"},e,s.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"[=#]\\w+"}],relevance:0}]}}}}]);
//# sourceMappingURL=react-syntax-highlighter_languages_highlight_armasm.91dc62a4.chunk.js.map

View File

@@ -0,0 +1,2 @@
(self.webpackChunkjanus_idp_backstage_plugin_acr=self.webpackChunkjanus_idp_backstage_plugin_acr||[]).push([[1419],{86322:e=>{function n(...e){return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}e.exports=function(e){const a=[{className:"strong",begin:/\*{2}([^\n]+?)\*{2}/},{className:"strong",begin:n(/\*\*/,/((\*(?!\*)|\\[^\n]|[^*\n\\])+\n)+/,/(\*(?!\*)|\\[^\n]|[^*\n\\])*/,/\*\*/),relevance:0},{className:"strong",begin:/\B\*(\S|\S[^\n]*?\S)\*(?!\w)/},{className:"strong",begin:/\*[^\s]([^\n]+\n)+([^\n]+)\*/}],s=[{className:"emphasis",begin:/_{2}([^\n]+?)_{2}/},{className:"emphasis",begin:n(/__/,/((_(?!_)|\\[^\n]|[^_\n\\])+\n)+/,/(_(?!_)|\\[^\n]|[^_\n\\])*/,/__/),relevance:0},{className:"emphasis",begin:/\b_(\S|\S[^\n]*?\S)_(?!\w)/},{className:"emphasis",begin:/_[^\s]([^\n]+\n)+([^\n]+)_/},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0}];return{name:"AsciiDoc",aliases:["adoc"],contains:[e.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),e.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"section",relevance:10,variants:[{begin:"^(={1,6})[ \t].+?([ \t]\\1)?$"},{begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{className:"meta",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"meta",begin:"^\\[.+?\\]$",relevance:0},{className:"quote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|-+|\\.+|[^\\n]+?::)\\s+"},{className:"symbol",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{begin:/\\[*_`]/},{begin:/\\\\\*{2}[^\n]*?\*{2}/},{begin:/\\\\_{2}[^\n]*_{2}/},{begin:/\\\\`{2}[^\n]*`{2}/},{begin:/[:;}][*_`](?![*_`])/},...a,...s,{className:"string",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:/`{2}/,end:/(\n{2}|`{2})/},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+?\\[[^[]*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}}}]);
//# sourceMappingURL=react-syntax-highlighter_languages_highlight_asciidoc.4050ec2a.chunk.js.map

Some files were not shown because too many files have changed in this diff Show More