Merge pull request #20723 from backstage/rugvip/remove-exp-types
cli: remove support for --experimental-type-build
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/cli-node': minor
|
||||
'@backstage/cli': minor
|
||||
---
|
||||
|
||||
Removed support for the `publishConfig.alphaTypes` and `.betaTypes` fields that were used together with `--experimental-type-build` to generate `/alpha` and `/beta` entry points. Use the `exports` field to achieve this instead.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/repo-tools': minor
|
||||
'@backstage/cli': minor
|
||||
---
|
||||
|
||||
Remove support for the deprecated `--experimental-type-build` option for `package build`.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
'@backstage/plugin-user-settings-backend': patch
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
'@backstage/plugin-periskop-backend': patch
|
||||
'@backstage/plugin-scaffolder-node': patch
|
||||
'@backstage/plugin-bazaar-backend': patch
|
||||
'@backstage/plugin-kafka-backend': patch
|
||||
'@backstage/plugin-proxy-backend': patch
|
||||
'@backstage/plugin-sonarqube': patch
|
||||
'@backstage/plugin-todo': patch
|
||||
---
|
||||
|
||||
Switched to using `"exports"` field for `/alpha` subpath export.
|
||||
+1
-7
@@ -172,13 +172,7 @@ We generate API Reports using the [API Extractor](https://api-extractor.com/) to
|
||||
|
||||
Each API report contains a list of all the exported types of each package. As long as the API report does not have any warnings it will contain the full publicly facing API of the package, meaning you do not need to consider any other changes to the package from the point of view of TypeScript API stability.
|
||||
|
||||
Exported types can be marked with either `@public`, `@alpha` or `@beta` release tags. It is only the `@public` exports that we consider to be part of the stable API. The `@alpha` and `@beta` exports are considered unstable and can be changed at any time without needing a breaking package versions bump. However, this **ONLY** applies if the package has been configured to use experimental type builds, which looks like this in `package.json`:
|
||||
|
||||
```json
|
||||
"build": "backstage-cli package build --experimental-type-build"
|
||||
```
|
||||
|
||||
If a package does not have this configuration, then all exported types are considered stable, even if they are marked as `@alpha` or `@beta`.
|
||||
Exported types can be marked with either `@public`, `@alpha` or `@beta` release tags. It is only the `@public` exports that we consider to be part of the stable API. The `@alpha` and `@beta` exports are considered unstable and can be changed at any time without needing a breaking package versions bump.
|
||||
|
||||
#### Changes that are Not Considered Breaking
|
||||
|
||||
|
||||
@@ -674,38 +674,3 @@ To add subpath exports to an existing package, simply add the desired `"exports"
|
||||
```bash
|
||||
yarn backstage-cli migrate package-exports
|
||||
```
|
||||
|
||||
## Experimental Type Build
|
||||
|
||||
> Note: Experimental type builds are deprecated and will be removed in the future. They have been replaced by [subpath exports](#subpath-exports).
|
||||
|
||||
The Backstage CLI has an experimental feature where multiple different type definition files can be generated for different release stages. The release stages are marked in the [TSDoc](https://tsdoc.org/) for each individual export, using either `@public`, `@alpha`, or `@beta`. Rather than just building a single `index.d.ts` file, the build process will instead output `index.d.ts`, `index.beta.d.ts`, and `index.alpha.d.ts`. Each of these files will have exports from more unstable release stages stripped, meaning that `index.d.ts` will omit all exports marked with `@alpha` or `@beta`, while `index.beta.d.ts` will omit all exports marked with `@alpha`.
|
||||
|
||||
This feature is aimed at projects that publish to package registries and wish to maintain different levels of API stability within each package. There is no need to use this within a single monorepo, as it has no effect due to only applying to built and published packages.
|
||||
|
||||
In order for the experimental type build to work, `@microsoft/api-extractor` must be installed in your project, as it is an optional peer dependency of the Backstage CLI. There are then three steps that need to be taken for each package where you want to enable this feature:
|
||||
|
||||
- Add the `--experimental-type-build` flag to the `"build"` script of the package.
|
||||
- Add either one or both of `"alphaTypes"` and `"betaTypes"` to the `"publishConfig"` of the package:
|
||||
```json
|
||||
"publishConfig": {
|
||||
...
|
||||
"types": "dist/index.d.ts",
|
||||
"alphaTypes": "dist/index.alpha.d.ts",
|
||||
"betaTypes": "dist/index.beta.d.ts"
|
||||
},
|
||||
```
|
||||
- Add either one or both of `"alpha"` and `"beta"` to the `"files"` of the package:
|
||||
```json
|
||||
"files": [
|
||||
"dist",
|
||||
"alpha",
|
||||
"beta"
|
||||
]
|
||||
```
|
||||
|
||||
Once this setup is complete, users of the published packages will only be able to access the stable API via the main package entry point, for example `@acme/my-plugin`. Exports marked with `@alpha` or `@beta` will only be available via the `/alpha` entry point, for example `@acme/my-plugin/alpha`, and exports marked with `@beta` will only be available via `/beta`. This does not apply within the monorepo that contains the package. There all exports still have to be imported via the main entry point.
|
||||
|
||||
Note that these different entry points are only separated during type checking. At runtime they all share the same code which contains the exports from all releases stages.
|
||||
|
||||
An example of this setup can be seen in the [`@backstage/catalog-model`](https://github.com/backstage/backstage/blob/da0675bf9f28ed1460f03635a22d3c26abd14707/packages/catalog-model/package.json#L14) package, which has enabled `alpha` type exports. With this setup, exports marked as `@alpha` are only available for import via `@backstage/catalog-model/alpha`. The `@backstage/catalog-model` package currently does not have any exports marked as `@beta`, or a `/beta` entry point.
|
||||
|
||||
@@ -349,7 +349,7 @@ import { createRouter } from './service/router';
|
||||
/**
|
||||
* The example TODO list backend plugin.
|
||||
*
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export const exampleTodoListPlugin = createBackendPlugin({
|
||||
pluginId: 'exampleTodoList',
|
||||
|
||||
@@ -39,7 +39,7 @@ backend.add(
|
||||
import('@backstage/plugin-permission-backend-module-allow-all-policy'),
|
||||
);
|
||||
backend.add(import('@backstage/plugin-permission-backend/alpha'));
|
||||
backend.add(import('@backstage/plugin-proxy-backend'));
|
||||
backend.add(import('@backstage/plugin-proxy-backend/alpha'));
|
||||
backend.add(import('@backstage/plugin-scaffolder-backend/alpha'));
|
||||
backend.add(import('@backstage/plugin-search-backend-module-catalog/alpha'));
|
||||
backend.add(import('@backstage/plugin-search-backend-module-explore/alpha'));
|
||||
|
||||
@@ -53,8 +53,6 @@ export interface BackstagePackageJson {
|
||||
access?: 'public' | 'restricted';
|
||||
directory?: string;
|
||||
registry?: string;
|
||||
alphaTypes?: string;
|
||||
betaTypes?: string;
|
||||
};
|
||||
// (undocumented)
|
||||
scripts?: {
|
||||
|
||||
@@ -56,8 +56,6 @@ export interface BackstagePackageJson {
|
||||
access?: 'public' | 'restricted';
|
||||
directory?: string;
|
||||
registry?: string;
|
||||
alphaTypes?: string;
|
||||
betaTypes?: string;
|
||||
};
|
||||
|
||||
dependencies?: {
|
||||
|
||||
@@ -224,7 +224,6 @@ Usage: backstage-cli package build [options]
|
||||
Options:
|
||||
--role <name>
|
||||
--minify
|
||||
--experimental-type-build
|
||||
--skip-build-dependencies
|
||||
--stats
|
||||
--config <path>
|
||||
|
||||
@@ -174,16 +174,12 @@
|
||||
"type-fest": "^2.19.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@microsoft/api-extractor": "^7.21.2",
|
||||
"@vitejs/plugin-react": "^4.0.4",
|
||||
"vite": "^4.4.9",
|
||||
"vite-plugin-html": "^3.2.0",
|
||||
"vite-plugin-node-polyfills": "^0.14.1"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@microsoft/api-extractor": {
|
||||
"optional": true
|
||||
},
|
||||
"@vitejs/plugin-react": {
|
||||
"optional": true
|
||||
},
|
||||
|
||||
@@ -65,6 +65,5 @@ export async function command(opts: OptionValues): Promise<void> {
|
||||
return buildPackage({
|
||||
outputs,
|
||||
minify: Boolean(opts.minify),
|
||||
useApiExtractor: Boolean(opts.experimentalTypeBuild),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -130,10 +130,6 @@ export function registerScriptCommand(program: Command) {
|
||||
'--minify',
|
||||
'Minify the generated code. Does not apply to app or backend packages.',
|
||||
)
|
||||
.option(
|
||||
'--experimental-type-build',
|
||||
'Enable experimental type build. Does not apply to app or backend packages. [DEPRECATED]',
|
||||
)
|
||||
.option(
|
||||
'--skip-build-dependencies',
|
||||
'Skip the automatic building of local dependencies. Applies to backend packages only.',
|
||||
|
||||
@@ -49,9 +49,6 @@ export async function command() {
|
||||
if (scripts.build?.includes('--minify')) {
|
||||
buildCmd.push('--minify');
|
||||
}
|
||||
if (scripts.build?.includes('--experimental-type-build')) {
|
||||
buildCmd.push('--experimental-type-build');
|
||||
}
|
||||
if (scripts.build?.includes('--config')) {
|
||||
buildCmd.push(...(scripts.build.match(configArgPattern) ?? []));
|
||||
}
|
||||
|
||||
@@ -137,7 +137,6 @@ export async function command(opts: OptionValues, cmd: Command): Promise<void> {
|
||||
outputs,
|
||||
logPrefix: `${chalk.cyan(relativePath(paths.targetRoot, pkg.dir))}: `,
|
||||
minify: buildOptions.minify,
|
||||
useApiExtractor: buildOptions.experimentalTypeBuild,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
/*
|
||||
* Copyright 2020 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import chalk from 'chalk';
|
||||
import { relative as relativePath, resolve as resolvePath } from 'path';
|
||||
import { paths } from '../paths';
|
||||
import { buildTypeDefinitionsWorker } from './buildTypeDefinitionsWorker';
|
||||
import { runWorkerThreads } from '../parallel';
|
||||
|
||||
// These message types are ignored since we want to avoid duplicating the logic of
|
||||
// handling them correctly, and we already have the API Reports warning about them.
|
||||
const ignoredMessages = new Set(['tsdoc-undefined-tag', 'ae-forgotten-export']);
|
||||
|
||||
export async function buildTypeDefinitions(
|
||||
targetDirs: string[] = [paths.targetDir],
|
||||
) {
|
||||
const packageDirs = targetDirs.map(dir =>
|
||||
relativePath(paths.targetRoot, dir),
|
||||
);
|
||||
const entryPoints = await Promise.all(
|
||||
packageDirs.map(async dir => {
|
||||
const entryPoint = paths.resolveTargetRoot(
|
||||
'dist-types',
|
||||
dir,
|
||||
'src/index.d.ts',
|
||||
);
|
||||
|
||||
const declarationsExist = await fs.pathExists(entryPoint);
|
||||
if (!declarationsExist) {
|
||||
throw new Error(
|
||||
`No declaration files found at ${entryPoint}, be sure to run ${chalk.bgRed.white(
|
||||
'yarn tsc',
|
||||
)} to generate .d.ts files before packaging`,
|
||||
);
|
||||
}
|
||||
return entryPoint;
|
||||
}),
|
||||
);
|
||||
|
||||
const workerConfigs = packageDirs.map(packageDir => {
|
||||
const targetDir = paths.resolveTargetRoot(packageDir);
|
||||
const targetTypesDir = paths.resolveTargetRoot('dist-types', packageDir);
|
||||
const extractorOptions = {
|
||||
configObject: {
|
||||
mainEntryPointFilePath: resolvePath(targetTypesDir, 'src/index.d.ts'),
|
||||
bundledPackages: [],
|
||||
|
||||
compiler: {
|
||||
skipLibCheck: true,
|
||||
tsconfigFilePath: paths.resolveTargetRoot('tsconfig.json'),
|
||||
},
|
||||
|
||||
dtsRollup: {
|
||||
enabled: true,
|
||||
untrimmedFilePath: resolvePath(targetDir, 'dist/index.alpha.d.ts'),
|
||||
betaTrimmedFilePath: resolvePath(targetDir, 'dist/index.beta.d.ts'),
|
||||
publicTrimmedFilePath: resolvePath(targetDir, 'dist/index.d.ts'),
|
||||
},
|
||||
|
||||
newlineKind: 'lf',
|
||||
|
||||
projectFolder: targetDir,
|
||||
},
|
||||
configObjectFullPath: targetDir,
|
||||
packageJsonFullPath: resolvePath(targetDir, 'package.json'),
|
||||
};
|
||||
return { extractorOptions, targetTypesDir };
|
||||
});
|
||||
|
||||
const typescriptDir = paths.resolveTargetRoot('node_modules/typescript');
|
||||
const hasTypescript = await fs.pathExists(typescriptDir);
|
||||
const typescriptCompilerFolder = hasTypescript ? typescriptDir : undefined;
|
||||
await runWorkerThreads({
|
||||
threadCount: 1,
|
||||
workerData: {
|
||||
entryPoints,
|
||||
workerConfigs,
|
||||
typescriptCompilerFolder,
|
||||
},
|
||||
worker: buildTypeDefinitionsWorker,
|
||||
onMessage: ({
|
||||
message,
|
||||
targetTypesDir,
|
||||
}: {
|
||||
message: any;
|
||||
targetTypesDir: string;
|
||||
}) => {
|
||||
if (ignoredMessages.has(message.messageId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
let text = `${message.text} (${message.messageId})`;
|
||||
if (message.sourceFilePath) {
|
||||
text += ' at ';
|
||||
text += relativePath(targetTypesDir, message.sourceFilePath);
|
||||
if (message.sourceFileLine) {
|
||||
text += `:${message.sourceFileLine}`;
|
||||
if (message.sourceFileColumn) {
|
||||
text += `:${message.sourceFileColumn}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (message.logLevel === 'error') {
|
||||
console.error(chalk.red(`Error: ${text}`));
|
||||
} else if (
|
||||
message.logLevel === 'warning' ||
|
||||
message.category === 'Extractor'
|
||||
) {
|
||||
console.warn(`Warning: ${text}`);
|
||||
} else {
|
||||
console.log(text);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This is a worker thread function that is stringified and executed
|
||||
* within a `worker_threads.Worker`. Everything in this function must
|
||||
* be self-contained.
|
||||
* Using TypeScript is fine as it is transpiled before being stringified.
|
||||
*/
|
||||
export async function buildTypeDefinitionsWorker(
|
||||
workerData: any,
|
||||
sendMessage: (message: any) => void,
|
||||
) {
|
||||
try {
|
||||
require('@microsoft/api-extractor');
|
||||
} catch (error) {
|
||||
throw new Error(
|
||||
'Failed to resolve @microsoft/api-extractor, it must best installed ' +
|
||||
'as a dependency of your project in order to use experimental type builds',
|
||||
);
|
||||
}
|
||||
|
||||
const { dirname } = require('path');
|
||||
const { entryPoints, workerConfigs, typescriptCompilerFolder } = workerData;
|
||||
|
||||
const apiExtractor = require('@microsoft/api-extractor');
|
||||
const { Extractor, ExtractorConfig, CompilerState } = apiExtractor;
|
||||
|
||||
/**
|
||||
* All of this monkey patching below is because Material UI has these bare package.json file as a method
|
||||
* for making TypeScript accept imports like `@material-ui/core/Button`, and improve tree-shaking
|
||||
* by declaring them side effect free.
|
||||
*
|
||||
* The package.json lookup logic in api-extractor really doesn't like that though, as it enforces
|
||||
* that the 'name' field exists in all package.json files that it discovers. This below is just
|
||||
* making sure that we ignore those file package.json files instead of crashing.
|
||||
*/
|
||||
const {
|
||||
PackageJsonLookup,
|
||||
// eslint-disable-next-line @backstage/no-undeclared-imports
|
||||
} = require('@rushstack/node-core-library/lib/PackageJsonLookup');
|
||||
|
||||
const old = PackageJsonLookup.prototype.tryGetPackageJsonFilePathFor;
|
||||
PackageJsonLookup.prototype.tryGetPackageJsonFilePathFor =
|
||||
function tryGetPackageJsonFilePathForPatch(path: string) {
|
||||
if (
|
||||
path.includes('@material-ui') &&
|
||||
!dirname(path).endsWith('@material-ui')
|
||||
) {
|
||||
return undefined;
|
||||
}
|
||||
return old.call(this, path);
|
||||
};
|
||||
|
||||
let compilerState;
|
||||
for (const { extractorOptions, targetTypesDir } of workerConfigs) {
|
||||
const extractorConfig = ExtractorConfig.prepare(extractorOptions);
|
||||
|
||||
if (!compilerState) {
|
||||
compilerState = CompilerState.create(extractorConfig, {
|
||||
additionalEntryPoints: entryPoints,
|
||||
});
|
||||
}
|
||||
|
||||
const extractorResult = Extractor.invoke(extractorConfig, {
|
||||
compilerState,
|
||||
localBuild: false,
|
||||
typescriptCompilerFolder,
|
||||
showVerboseMessages: false,
|
||||
showDiagnostics: false,
|
||||
messageCallback: (message: any) => {
|
||||
message.handled = true;
|
||||
sendMessage({ message, targetTypesDir });
|
||||
},
|
||||
});
|
||||
|
||||
if (!extractorResult.succeeded) {
|
||||
throw new Error(
|
||||
`Type definition build completed with ${extractorResult.errorCount} errors` +
|
||||
` and ${extractorResult.warningCount} warnings`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,7 +151,7 @@ export async function makeRollupConfigs(
|
||||
});
|
||||
}
|
||||
|
||||
if (options.outputs.has(Output.types) && !options.useApiExtractor) {
|
||||
if (options.outputs.has(Output.types)) {
|
||||
const input = Object.fromEntries(
|
||||
scriptEntryPoints.map(e => [
|
||||
e.name,
|
||||
|
||||
@@ -21,7 +21,6 @@ import { relative as relativePath, resolve as resolvePath } from 'path';
|
||||
import { paths } from '../paths';
|
||||
import { makeRollupConfigs } from './config';
|
||||
import { BuildOptions, Output } from './types';
|
||||
import { buildTypeDefinitions } from './buildTypeDefinitions';
|
||||
import { PackageRoles } from '@backstage/cli-node';
|
||||
import { runParallelWorkers } from '../parallel';
|
||||
|
||||
@@ -112,10 +111,6 @@ export const buildPackage = async (options: BuildOptions) => {
|
||||
|
||||
const buildTasks = rollupConfigs.map(rollupBuild);
|
||||
|
||||
if (options.outputs.has(Output.types) && options.useApiExtractor) {
|
||||
buildTasks.push(buildTypeDefinitions());
|
||||
}
|
||||
|
||||
await Promise.all(buildTasks);
|
||||
};
|
||||
|
||||
@@ -131,18 +126,6 @@ export const buildPackages = async (options: BuildOptions[]) => {
|
||||
|
||||
const buildTasks = rollupConfigs.flat().map(opts => () => rollupBuild(opts));
|
||||
|
||||
const typeDefinitionTargetDirs = options
|
||||
.filter(
|
||||
({ outputs, useApiExtractor }) =>
|
||||
outputs.has(Output.types) && useApiExtractor,
|
||||
)
|
||||
.map(_ => _.targetDir!);
|
||||
|
||||
if (typeDefinitionTargetDirs.length > 0) {
|
||||
// Make sure this one is started first
|
||||
buildTasks.unshift(() => buildTypeDefinitions(typeDefinitionTargetDirs));
|
||||
}
|
||||
|
||||
await runParallelWorkers({
|
||||
items: buildTasks,
|
||||
worker: async task => task(),
|
||||
|
||||
@@ -28,5 +28,4 @@ export type BuildOptions = {
|
||||
packageJson?: BackstagePackageJson;
|
||||
outputs: Set<Output>;
|
||||
minify?: boolean;
|
||||
useApiExtractor?: boolean;
|
||||
};
|
||||
|
||||
@@ -206,7 +206,6 @@ export async function createDistWorkspace(
|
||||
logPrefix: `${chalk.cyan(relativePath(paths.targetRoot, pkg.dir))}: `,
|
||||
// No need to detect these for the backend builds, we assume no minification or types
|
||||
minify: false,
|
||||
useApiExtractor: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import { readEntryPoints } from '../entryPoints';
|
||||
const PKG_PATH = 'package.json';
|
||||
const PKG_BACKUP_PATH = 'package.json-prepack';
|
||||
|
||||
const SKIPPED_KEYS = ['access', 'registry', 'tag', 'alphaTypes', 'betaTypes'];
|
||||
const SKIPPED_KEYS = ['access', 'registry', 'tag'];
|
||||
const SCRIPT_EXTS = ['.js', '.jsx', '.ts', '.tsx'];
|
||||
|
||||
interface ProductionPackOptions {
|
||||
@@ -42,14 +42,6 @@ export async function productionPack(options: ProductionPackOptions) {
|
||||
await fs.writeFile(PKG_BACKUP_PATH, pkgContent);
|
||||
}
|
||||
|
||||
const hasStageEntry =
|
||||
!!pkg.publishConfig?.alphaTypes || !!pkg.publishConfig?.betaTypes;
|
||||
if (pkg.exports && hasStageEntry) {
|
||||
throw new Error(
|
||||
'Combining both exports and alpha/beta types is not supported',
|
||||
);
|
||||
}
|
||||
|
||||
// This mutates pkg to fill in index exports, so call it before applying publishConfig
|
||||
const writeCompatibilityEntryPoints = await prepareExportsEntryPoints(
|
||||
pkg,
|
||||
@@ -99,12 +91,6 @@ export async function productionPack(options: ProductionPackOptions) {
|
||||
await fs.writeJson(pkgPath, pkg, { encoding: 'utf8', spaces: 2 });
|
||||
}
|
||||
|
||||
if (publishConfig.alphaTypes) {
|
||||
await writeReleaseStageEntrypoint(pkg, 'alpha', targetDir ?? packageDir);
|
||||
}
|
||||
if (publishConfig.betaTypes) {
|
||||
await writeReleaseStageEntrypoint(pkg, 'beta', targetDir ?? packageDir);
|
||||
}
|
||||
if (writeCompatibilityEntryPoints) {
|
||||
await writeCompatibilityEntryPoints(targetDir ?? packageDir);
|
||||
}
|
||||
@@ -118,12 +104,6 @@ export async function revertProductionPack(packageDir: string) {
|
||||
|
||||
// Check if we're shipping types for other release stages, clean up in that case
|
||||
const pkg = await fs.readJson(PKG_PATH);
|
||||
if (pkg.publishConfig?.alphaTypes) {
|
||||
await fs.remove(resolvePath(packageDir, 'alpha'));
|
||||
}
|
||||
if (pkg.publishConfig?.betaTypes) {
|
||||
await fs.remove(resolvePath(packageDir, 'beta'));
|
||||
}
|
||||
|
||||
// Remove any extra entrypoint backwards compatibility directories
|
||||
const entryPoints = readEntryPoints(pkg);
|
||||
@@ -140,32 +120,6 @@ export async function revertProductionPack(packageDir: string) {
|
||||
}
|
||||
}
|
||||
|
||||
function resolveEntrypoint(pkg: any, name: string) {
|
||||
const targetEntry = pkg.publishConfig[name] || pkg[name];
|
||||
return targetEntry && posixPath.join('..', targetEntry);
|
||||
}
|
||||
|
||||
// Writes e.g. alpha/package.json
|
||||
async function writeReleaseStageEntrypoint(
|
||||
pkg: BackstagePackageJson,
|
||||
stage: 'alpha' | 'beta',
|
||||
targetDir: string,
|
||||
) {
|
||||
await fs.ensureDir(resolvePath(targetDir, stage));
|
||||
await fs.writeJson(
|
||||
resolvePath(targetDir, stage, PKG_PATH),
|
||||
{
|
||||
name: pkg.name,
|
||||
version: pkg.version,
|
||||
main: resolveEntrypoint(pkg, 'main'),
|
||||
module: resolveEntrypoint(pkg, 'module'),
|
||||
browser: resolveEntrypoint(pkg, 'browser'),
|
||||
types: posixPath.join('..', pkg.publishConfig![`${stage}Types`]!),
|
||||
},
|
||||
{ encoding: 'utf8', spaces: 2 },
|
||||
);
|
||||
}
|
||||
|
||||
const EXPORT_MAP = {
|
||||
import: '.esm.js',
|
||||
require: '.cjs.js',
|
||||
|
||||
@@ -304,7 +304,6 @@ async function findPackageEntryPoints(packageDirs: string[]): Promise<
|
||||
Array<{
|
||||
packageDir: string;
|
||||
name: string;
|
||||
usesExperimentalTypeBuild?: boolean;
|
||||
}>
|
||||
> {
|
||||
return Promise.all(
|
||||
@@ -317,9 +316,6 @@ async function findPackageEntryPoints(packageDirs: string[]): Promise<
|
||||
getPackageExportNames(pkg)?.map(name => ({ packageDir, name })) ?? {
|
||||
packageDir,
|
||||
name: 'index',
|
||||
usesExperimentalTypeBuild: pkg.scripts?.build?.includes(
|
||||
'--experimental-type-build',
|
||||
),
|
||||
}
|
||||
);
|
||||
}),
|
||||
@@ -367,11 +363,7 @@ export async function runApiExtraction({
|
||||
}
|
||||
const warnings = new Array<string>();
|
||||
|
||||
for (const {
|
||||
packageDir,
|
||||
name,
|
||||
usesExperimentalTypeBuild,
|
||||
} of packageEntryPoints) {
|
||||
for (const { packageDir, name } of packageEntryPoints) {
|
||||
console.log(`## Processing ${packageDir}`);
|
||||
const noBail = Array.isArray(allowWarnings)
|
||||
? allowWarnings.some(aw => aw === packageDir || minimatch(packageDir, aw))
|
||||
@@ -511,7 +503,6 @@ export async function runApiExtraction({
|
||||
// The root index entrypoint is only allowed @public exports, while /alpha and /beta only allow @alpha and @beta.
|
||||
if (
|
||||
validateReleaseTags &&
|
||||
!usesExperimentalTypeBuild &&
|
||||
fs.pathExistsSync(extractorConfig.reportFilePath)
|
||||
) {
|
||||
if (['index', 'alpha', 'beta'].includes(name)) {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
## API Report File for "@backstage/plugin-bazaar-backend"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
|
||||
// @alpha
|
||||
const _default: () => BackendFeature;
|
||||
export default _default;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -3,17 +3,12 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
import { Config } from '@backstage/config';
|
||||
import express from 'express';
|
||||
import { IdentityApi } from '@backstage/plugin-auth-node';
|
||||
import { Logger } from 'winston';
|
||||
import { PluginDatabaseManager } from '@backstage/backend-common';
|
||||
|
||||
// @alpha
|
||||
const bazaarPlugin: () => BackendFeature;
|
||||
export default bazaarPlugin;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createRouter(options: RouterOptions): Promise<express.Router>;
|
||||
|
||||
|
||||
@@ -5,10 +5,22 @@
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"alphaTypes": "dist/index.alpha.d.ts"
|
||||
"access": "public"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./alpha": "./src/alpha.ts",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"alpha": [
|
||||
"src/alpha.ts"
|
||||
],
|
||||
"package.json": [
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
},
|
||||
"backstage": {
|
||||
"role": "backend-plugin"
|
||||
@@ -21,7 +33,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"start": "backstage-cli package start",
|
||||
"build": "backstage-cli package build --experimental-type-build",
|
||||
"build": "backstage-cli package build",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
"prepack": "backstage-cli package prepack",
|
||||
|
||||
@@ -26,7 +26,7 @@ import { createRouter } from './service/router';
|
||||
*
|
||||
* @alpha
|
||||
*/
|
||||
export const bazaarPlugin = createBackendPlugin({
|
||||
export default createBackendPlugin({
|
||||
pluginId: 'bazaar',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
@@ -15,4 +15,3 @@
|
||||
*/
|
||||
|
||||
export * from './service/router';
|
||||
export { bazaarPlugin as default } from './plugin';
|
||||
|
||||
@@ -11,7 +11,7 @@ import { Logger } from 'winston';
|
||||
// @public
|
||||
export function createRouter(options: RouterOptions): Promise<express.Router>;
|
||||
|
||||
// @alpha
|
||||
// @public
|
||||
const exampleTodoListPlugin: () => BackendFeature;
|
||||
export default exampleTodoListPlugin;
|
||||
|
||||
|
||||
@@ -17,12 +17,11 @@
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"alphaTypes": "dist/index.alpha.d.ts"
|
||||
"types": "dist/index.d.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "backstage-cli package start",
|
||||
"build": "backstage-cli package build --experimental-type-build",
|
||||
"build": "backstage-cli package build",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
"prepack": "backstage-cli package prepack",
|
||||
|
||||
@@ -24,7 +24,7 @@ import { createRouter } from './service/router';
|
||||
/**
|
||||
* The example TODO list backend plugin.
|
||||
*
|
||||
* @alpha
|
||||
* @public
|
||||
*/
|
||||
export const exampleTodoListPlugin = createBackendPlugin({
|
||||
pluginId: 'exampleTodoList',
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
## API Report File for "@backstage/plugin-kafka-backend"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
|
||||
// @alpha
|
||||
const _default: () => BackendFeature;
|
||||
export default _default;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -3,7 +3,6 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
import { Config } from '@backstage/config';
|
||||
import express from 'express';
|
||||
import { Logger } from 'winston';
|
||||
@@ -11,10 +10,6 @@ import { Logger } from 'winston';
|
||||
// @public (undocumented)
|
||||
export function createRouter(options: RouterOptions): Promise<express.Router>;
|
||||
|
||||
// @alpha
|
||||
const kafkaPlugin: () => BackendFeature;
|
||||
export default kafkaPlugin;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RouterOptions {
|
||||
// (undocumented)
|
||||
|
||||
@@ -6,10 +6,22 @@
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"alphaTypes": "dist/index.alpha.d.ts"
|
||||
"access": "public"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./alpha": "./src/alpha.ts",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"alpha": [
|
||||
"src/alpha.ts"
|
||||
],
|
||||
"package.json": [
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
},
|
||||
"backstage": {
|
||||
"role": "backend-plugin"
|
||||
@@ -27,7 +39,7 @@
|
||||
"configSchema": "config.d.ts",
|
||||
"scripts": {
|
||||
"start": "backstage-cli package start",
|
||||
"build": "backstage-cli package build --experimental-type-build",
|
||||
"build": "backstage-cli package build",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
"prepack": "backstage-cli package prepack",
|
||||
|
||||
@@ -26,7 +26,7 @@ import { createRouter } from './service/router';
|
||||
*
|
||||
* @alpha
|
||||
*/
|
||||
export const kafkaPlugin = createBackendPlugin({
|
||||
export default createBackendPlugin({
|
||||
pluginId: 'kafka',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
@@ -22,4 +22,3 @@
|
||||
|
||||
export type { RouterOptions } from './service/router';
|
||||
export { createRouter } from './service/router';
|
||||
export { kafkaPlugin as default } from './plugin';
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
## API Report File for "@backstage/plugin-periskop-backend"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
|
||||
// @alpha
|
||||
const _default: () => BackendFeature;
|
||||
export default _default;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -3,7 +3,6 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
import { Config } from '@backstage/config';
|
||||
import express from 'express';
|
||||
import { Logger } from 'winston';
|
||||
@@ -11,10 +10,6 @@ import { Logger } from 'winston';
|
||||
// @public (undocumented)
|
||||
export function createRouter(options: RouterOptions): Promise<express.Router>;
|
||||
|
||||
// @alpha
|
||||
const periskopPlugin: () => BackendFeature;
|
||||
export default periskopPlugin;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RouterOptions {
|
||||
// (undocumented)
|
||||
|
||||
@@ -14,14 +14,26 @@
|
||||
"directory": "plugins/periskop-backend"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"alphaTypes": "dist/index.alpha.d.ts"
|
||||
"access": "public"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./alpha": "./src/alpha.ts",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"alpha": [
|
||||
"src/alpha.ts"
|
||||
],
|
||||
"package.json": [
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"start": "backstage-cli package start",
|
||||
"build": "backstage-cli package build --experimental-type-build",
|
||||
"build": "backstage-cli package build",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
"prepack": "backstage-cli package prepack",
|
||||
|
||||
@@ -26,7 +26,7 @@ import { createRouter } from './service/router';
|
||||
*
|
||||
* @alpha
|
||||
*/
|
||||
export const periskopPlugin = createBackendPlugin({
|
||||
export default createBackendPlugin({
|
||||
pluginId: 'periskop',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
@@ -15,4 +15,3 @@
|
||||
*/
|
||||
|
||||
export * from './service/router';
|
||||
export { periskopPlugin as default } from './plugin';
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
## API Report File for "@backstage/plugin-proxy-backend"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
|
||||
// @alpha
|
||||
const _default: () => BackendFeature;
|
||||
export default _default;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -3,7 +3,6 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
import { Config } from '@backstage/config';
|
||||
import express from 'express';
|
||||
import { Logger } from 'winston';
|
||||
@@ -12,10 +11,6 @@ import { PluginEndpointDiscovery } from '@backstage/backend-common';
|
||||
// @public
|
||||
export function createRouter(options: RouterOptions): Promise<express.Router>;
|
||||
|
||||
// @alpha
|
||||
const proxyPlugin: () => BackendFeature;
|
||||
export default proxyPlugin;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RouterOptions {
|
||||
// (undocumented)
|
||||
|
||||
@@ -6,10 +6,22 @@
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"alphaTypes": "dist/index.alpha.d.ts"
|
||||
"access": "public"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./alpha": "./src/alpha.ts",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"alpha": [
|
||||
"src/alpha.ts"
|
||||
],
|
||||
"package.json": [
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
},
|
||||
"backstage": {
|
||||
"role": "backend-plugin"
|
||||
@@ -25,7 +37,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"start": "backstage-cli package start",
|
||||
"build": "backstage-cli package build --experimental-type-build",
|
||||
"build": "backstage-cli package build",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
"prepack": "backstage-cli package prepack",
|
||||
|
||||
@@ -26,7 +26,7 @@ import { createRouter } from './service/router';
|
||||
*
|
||||
* @alpha
|
||||
*/
|
||||
export const proxyPlugin = createBackendPlugin({
|
||||
export default createBackendPlugin({
|
||||
pluginId: 'proxy',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
@@ -21,4 +21,3 @@
|
||||
*/
|
||||
|
||||
export * from './service';
|
||||
export { proxyPlugin as default } from './plugin';
|
||||
|
||||
@@ -22,14 +22,16 @@ import { loggerToWinstonLogger } from '@backstage/backend-common';
|
||||
import { ScmIntegrations } from '@backstage/integration';
|
||||
import { catalogServiceRef } from '@backstage/plugin-catalog-node/alpha';
|
||||
import {
|
||||
scaffolderActionsExtensionPoint,
|
||||
scaffolderTaskBrokerExtensionPoint,
|
||||
scaffolderTemplatingExtensionPoint,
|
||||
TaskBroker,
|
||||
TemplateAction,
|
||||
TemplateFilter,
|
||||
TemplateGlobal,
|
||||
} from '@backstage/plugin-scaffolder-node';
|
||||
import {
|
||||
scaffolderActionsExtensionPoint,
|
||||
scaffolderTaskBrokerExtensionPoint,
|
||||
scaffolderTemplatingExtensionPoint,
|
||||
} from '@backstage/plugin-scaffolder-node/alpha';
|
||||
import { createBuiltinActions } from './scaffolder';
|
||||
import { createRouter } from './service/router';
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
## API Report File for "@backstage/plugin-scaffolder-node"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { ExtensionPoint } from '@backstage/backend-plugin-api';
|
||||
import { TaskBroker } from '@backstage/plugin-scaffolder-node';
|
||||
import { TemplateAction } from '@backstage/plugin-scaffolder-node';
|
||||
import { TemplateFilter } from '@backstage/plugin-scaffolder-node';
|
||||
import { TemplateGlobal } from '@backstage/plugin-scaffolder-node';
|
||||
|
||||
// @alpha
|
||||
export interface ScaffolderActionsExtensionPoint {
|
||||
// (undocumented)
|
||||
addActions(...actions: TemplateAction<any, any>[]): void;
|
||||
}
|
||||
|
||||
// @alpha
|
||||
export const scaffolderActionsExtensionPoint: ExtensionPoint<ScaffolderActionsExtensionPoint>;
|
||||
|
||||
// @alpha
|
||||
export interface ScaffolderTaskBrokerExtensionPoint {
|
||||
// (undocumented)
|
||||
setTaskBroker(taskBroker: TaskBroker): void;
|
||||
}
|
||||
|
||||
// @alpha
|
||||
export const scaffolderTaskBrokerExtensionPoint: ExtensionPoint<ScaffolderTaskBrokerExtensionPoint>;
|
||||
|
||||
// @alpha
|
||||
export interface ScaffolderTemplatingExtensionPoint {
|
||||
// (undocumented)
|
||||
addTemplateFilters(filters: Record<string, TemplateFilter>): void;
|
||||
// (undocumented)
|
||||
addTemplateGlobals(filters: Record<string, TemplateGlobal>): void;
|
||||
}
|
||||
|
||||
// @alpha
|
||||
export const scaffolderTemplatingExtensionPoint: ExtensionPoint<ScaffolderTemplatingExtensionPoint>;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -5,7 +5,6 @@
|
||||
```ts
|
||||
/// <reference types="node" />
|
||||
|
||||
import { ExtensionPoint } from '@backstage/backend-plugin-api';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { Logger } from 'winston';
|
||||
@@ -13,11 +12,7 @@ import { Observable } from '@backstage/types';
|
||||
import { Schema } from 'jsonschema';
|
||||
import { ScmIntegrations } from '@backstage/integration';
|
||||
import { SpawnOptionsWithoutStdio } from 'child_process';
|
||||
import { TaskBroker as TaskBroker_2 } from '@backstage/plugin-scaffolder-node';
|
||||
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateAction as TemplateAction_2 } from '@backstage/plugin-scaffolder-node';
|
||||
import { TemplateFilter as TemplateFilter_2 } from '@backstage/plugin-scaffolder-node';
|
||||
import { TemplateGlobal as TemplateGlobal_2 } from '@backstage/plugin-scaffolder-node';
|
||||
import { TemplateInfo } from '@backstage/plugin-scaffolder-common';
|
||||
import { UrlReader } from '@backstage/backend-common';
|
||||
import { UserEntity } from '@backstage/catalog-model';
|
||||
@@ -109,35 +104,6 @@ export function fetchFile(options: {
|
||||
outputPath: string;
|
||||
}): Promise<void>;
|
||||
|
||||
// @alpha
|
||||
export interface ScaffolderActionsExtensionPoint {
|
||||
// (undocumented)
|
||||
addActions(...actions: TemplateAction_2<any, any>[]): void;
|
||||
}
|
||||
|
||||
// @alpha
|
||||
export const scaffolderActionsExtensionPoint: ExtensionPoint<ScaffolderActionsExtensionPoint>;
|
||||
|
||||
// @alpha
|
||||
export interface ScaffolderTaskBrokerExtensionPoint {
|
||||
// (undocumented)
|
||||
setTaskBroker(taskBroker: TaskBroker_2): void;
|
||||
}
|
||||
|
||||
// @alpha
|
||||
export const scaffolderTaskBrokerExtensionPoint: ExtensionPoint<ScaffolderTaskBrokerExtensionPoint>;
|
||||
|
||||
// @alpha
|
||||
export interface ScaffolderTemplatingExtensionPoint {
|
||||
// (undocumented)
|
||||
addTemplateFilters(filters: Record<string, TemplateFilter_2>): void;
|
||||
// (undocumented)
|
||||
addTemplateGlobals(filters: Record<string, TemplateGlobal_2>): void;
|
||||
}
|
||||
|
||||
// @alpha
|
||||
export const scaffolderTemplatingExtensionPoint: ExtensionPoint<ScaffolderTemplatingExtensionPoint>;
|
||||
|
||||
// @public
|
||||
export type SerializedTask = {
|
||||
id: string;
|
||||
|
||||
@@ -6,10 +6,22 @@
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"alphaTypes": "dist/index.alpha.d.ts",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "dist/index.d.ts"
|
||||
"access": "public"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./alpha": "./src/alpha.ts",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"alpha": [
|
||||
"src/alpha.ts"
|
||||
],
|
||||
"package.json": [
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
},
|
||||
"backstage": {
|
||||
"role": "node-library"
|
||||
@@ -22,7 +34,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"start": "backstage-cli package start",
|
||||
"build": "backstage-cli package build --experimental-type-build",
|
||||
"build": "backstage-cli package build",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
"clean": "backstage-cli package clean",
|
||||
|
||||
@@ -23,11 +23,3 @@
|
||||
export * from './actions';
|
||||
export * from './tasks';
|
||||
export type { TemplateFilter, TemplateGlobal } from './types';
|
||||
export {
|
||||
scaffolderActionsExtensionPoint,
|
||||
type ScaffolderActionsExtensionPoint,
|
||||
scaffolderTaskBrokerExtensionPoint,
|
||||
type ScaffolderTaskBrokerExtensionPoint,
|
||||
scaffolderTemplatingExtensionPoint,
|
||||
type ScaffolderTemplatingExtensionPoint,
|
||||
} from './extensions';
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.esm.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"alphaTypes": "dist/index.alpha.d.ts"
|
||||
"types": "dist/index.d.ts"
|
||||
},
|
||||
"backstage": {
|
||||
"role": "frontend-plugin"
|
||||
@@ -27,7 +26,7 @@
|
||||
],
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"build": "backstage-cli package build --experimental-type-build",
|
||||
"build": "backstage-cli package build",
|
||||
"start": "backstage-cli package start",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.esm.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"alphaTypes": "dist/index.alpha.d.ts"
|
||||
"types": "dist/index.d.ts"
|
||||
},
|
||||
"backstage": {
|
||||
"role": "frontend-plugin"
|
||||
@@ -22,7 +21,7 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"build": "backstage-cli package build --experimental-type-build",
|
||||
"build": "backstage-cli package build",
|
||||
"start": "backstage-cli package start",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
## API Report File for "@backstage/plugin-user-settings-backend"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
|
||||
// @alpha
|
||||
const _default: () => BackendFeature;
|
||||
export default _default;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -3,7 +3,6 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
import express from 'express';
|
||||
import { IdentityApi } from '@backstage/plugin-auth-node';
|
||||
import { PluginDatabaseManager } from '@backstage/backend-common';
|
||||
@@ -19,9 +18,5 @@ export interface RouterOptions {
|
||||
identity: IdentityApi;
|
||||
}
|
||||
|
||||
// @alpha
|
||||
const userSettingsPlugin: () => BackendFeature;
|
||||
export default userSettingsPlugin;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
|
||||
@@ -9,10 +9,22 @@
|
||||
"role": "backend-plugin"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"alphaTypes": "dist/index.alpha.d.ts"
|
||||
"access": "public"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./alpha": "./src/alpha.ts",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"alpha": [
|
||||
"src/alpha.ts"
|
||||
],
|
||||
"package.json": [
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
},
|
||||
"homepage": "https://backstage.io",
|
||||
"repository": {
|
||||
@@ -22,7 +34,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"start": "backstage-cli package start",
|
||||
"build": "backstage-cli package build --experimental-type-build",
|
||||
"build": "backstage-cli package build",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
"prepack": "backstage-cli package prepack",
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import { createRouter } from './service/router';
|
||||
*
|
||||
* @alpha
|
||||
*/
|
||||
export const userSettingsPlugin = createBackendPlugin({
|
||||
export default createBackendPlugin({
|
||||
pluginId: 'userSettings',
|
||||
register(env) {
|
||||
env.registerInit({
|
||||
@@ -16,4 +16,3 @@
|
||||
|
||||
export * from './service';
|
||||
export * from './database';
|
||||
export { userSettingsPlugin as default } from './plugin';
|
||||
|
||||
@@ -3869,14 +3869,11 @@ __metadata:
|
||||
yn: ^4.0.0
|
||||
zod: ^3.21.4
|
||||
peerDependencies:
|
||||
"@microsoft/api-extractor": ^7.21.2
|
||||
"@vitejs/plugin-react": ^4.0.4
|
||||
vite: ^4.4.9
|
||||
vite-plugin-html: ^3.2.0
|
||||
vite-plugin-node-polyfills: ^0.14.1
|
||||
peerDependenciesMeta:
|
||||
"@microsoft/api-extractor":
|
||||
optional: true
|
||||
"@vitejs/plugin-react":
|
||||
optional: true
|
||||
vite:
|
||||
|
||||
Reference in New Issue
Block a user