Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .rhdh/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ COPY $EXTERNAL_SOURCE_NESTED/packages/theme-wrapper/package.json ./packages/them
COPY $EXTERNAL_SOURCE_NESTED/packages/plugin-utils/package.json ./packages/plugin-utils/package.json
COPY $EXTERNAL_SOURCE_NESTED/packages/backend/package.json ./packages/backend/package.json
COPY $EXTERNAL_SOURCE_NESTED/packages/app/package.json ./packages/app/package.json
COPY $EXTERNAL_SOURCE_NESTED/packages/app-utils/package.json ./packages/app-utils/package.json
COPY $EXTERNAL_SOURCE_NESTED/packages/app-next/package.json ./packages/app-next/package.json
COPY $EXTERNAL_SOURCE_NESTED/package.json ./package.json
# END COPY package.json files
Expand Down
1 change: 1 addition & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ COPY $EXTERNAL_SOURCE_NESTED/packages/theme-wrapper/package.json ./packages/them
COPY $EXTERNAL_SOURCE_NESTED/packages/plugin-utils/package.json ./packages/plugin-utils/package.json
COPY $EXTERNAL_SOURCE_NESTED/packages/backend/package.json ./packages/backend/package.json
COPY $EXTERNAL_SOURCE_NESTED/packages/app/package.json ./packages/app/package.json
COPY $EXTERNAL_SOURCE_NESTED/packages/app-utils/package.json ./packages/app-utils/package.json
COPY $EXTERNAL_SOURCE_NESTED/packages/app-next/package.json ./packages/app-next/package.json
COPY $EXTERNAL_SOURCE_NESTED/package.json ./package.json
# END COPY package.json files
Expand Down
12 changes: 12 additions & 0 deletions packages/app-utils/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const backstageConfig = require('@backstage/cli/config/eslint-factory')(
__dirname,
);

module.exports = {
...backstageConfig,
rules: {
...backstageConfig.rules,
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
},
};
4 changes: 4 additions & 0 deletions packages/app-utils/.lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*": "prettier --ignore-unknown --write",
"*.{js,jsx,ts,tsx,mjs,cjs}": "backstage-cli package lint --fix"
}
2 changes: 2 additions & 0 deletions packages/app-utils/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
coverage
20 changes: 20 additions & 0 deletions packages/app-utils/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// @ts-check

/** @type {import("@ianvs/prettier-plugin-sort-imports").PrettierConfig} */
module.exports = {
...require('@backstage/cli/config/prettier.json'),
plugins: ['@ianvs/prettier-plugin-sort-imports'],
importOrder: [
'^react(.*)$',
'',
'^@backstage/(.*)$',
'',
'<THIRD_PARTY_MODULES>',
'',
'^@janus-idp/(.*)$',
'',
'<BUILTIN_MODULES>',
'',
'^[.]',
],
};
77 changes: 77 additions & 0 deletions packages/app-utils/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"name": "@red-hat-developer-hub/app-utils",
"version": "1.0.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts"
},
"backstage": {
"role": "common-library",
"supported-versions": "1.0.0",
"pluginId": "app-utils",
"pluginPackage": "@red-hat-developer-hub/app-utils",
"pluginPackages": [
"@red-hat-developer-hub/app-utils"
]
},
"scripts": {
"build": "backstage-cli package build",
"clean": "backstage-cli package clean",
"test": "backstage-cli package test --passWithNoTests --coverage",
"lint:check": "backstage-cli package lint",
"lint:fix": "backstage-cli package lint --fix",
"tsc": "tsc",
"prettier:check": "prettier --ignore-unknown --check .",
"prettier:fix": "prettier --ignore-unknown --write ."
},
"dependencies": {
"@backstage/catalog-model": "1.7.5",
"@backstage/config": "1.3.3",
"@backstage/core-app-api": "1.18.0",
"@backstage/core-plugin-api": "1.10.9",
"@backstage/plugin-api-docs": "0.12.10",
"@backstage/plugin-catalog": "1.31.2",
"@backstage/plugin-catalog-import": "0.13.4",
"@backstage/plugin-org": "0.6.43",
"@backstage/plugin-scaffolder": "1.34.0",
"@mui/material": "5.18.0",
"lodash": "4.17.21"
},
"devDependencies": {
"@backstage/cli": "0.34.1",
"@backstage/test-utils": "1.7.11",
"@testing-library/dom": "9.3.4",
"@testing-library/jest-dom": "6.9.1",
"@testing-library/react": "14.3.1",
"@testing-library/react-hooks": "8.0.1",
"@types/node": "22.18.11",
"@types/react": "18.3.26",
"@types/react-dom": "18.3.7",
"prettier": "3.6.2",
"react": "18.3.1",
"typescript": "5.9.3"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"files": [
"dist"
],
"peerDependencies": {
"react": "16.13.1 || ^17.0.0 || ^18.2.0"
}
}
1 change: 1 addition & 0 deletions packages/app-utils/src/components/MenuIcon/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './MenuIcon';
1 change: 1 addition & 0 deletions packages/app-utils/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './MenuIcon';
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { Entity } from '@backstage/catalog-model';

import extractDynamicConfig, {
conditionsArrayMapper,
configIfToCallable,
DynamicPluginConfig,
} from './extractDynamicConfig';
import { extractDynamicConfig } from './extractDynamicConfig';
import { DynamicPluginConfig } from './types';
import { conditionsArrayMapper, configIfToCallable } from './utils';

describe('conditionsArrayMapper', () => {
it.each([
Expand Down
Loading
Loading