docs/releases/v1.2.0-next.2-changelog.md
template.yaml manifestallowedImageNames option, which needs to list any image name for it to be allowed as imageName input.template.yaml manifeste0a6360b80: Added a stream() method to complement the buffer() method on ReadUrlResponse. A ReadUrlResponseFactory utility class is now also available, providing a simple, consistent way to provide a valid ReadUrlResponse.
This method, though optional for now, will be required on the responses of UrlReader.readUrl() implementations in a future release.
4b811aafce: Implemented the UrlReader.search() method for Google Cloud Storage. Due to limitations in the underlying storage API, only prefix-based searches are supported right now (for example, https://storage.cloud.google.com/your-bucket/some-path/*).
Updated dependencies
73480846dd: TaskScheduleDefinition has been updated to also accept an options object containing duration information in the form of days, hours, seconds and so on. This allows for scheduling without importing luxon.
-import { Duration } from 'luxon';
// omitted other code
const schedule = env.scheduler.createScheduledTaskRunner({
- frequency: Duration.fromObject({ minutes: 10 }),
- timeout: Duration.fromObject({ minutes: 15 }),
+ frequency: { minutes: 10 },
+ timeout: { minutes: 15 },
// omitted other code
});
ebbec677e1: Correctly set next run time for tasks
Updated dependencies
create-github-app command to prompt for read or write permissions to simplify setup.@types/node to ^16.0.0.@types/node to ^16.0.0.@types/react-syntax-highlighter to ^15.0.0.73480846dd: Simplified the search collator scheduling by removing the need for the luxon dependency.
For existing installations the scheduling can be simplified by removing the luxon dependency and using the human friendly duration object instead.
Please note that this only applies if luxon is not used elsewhere in your installation.
packages/backend/package.json
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
- "luxon": "^2.0.2",
packages/backend/src/plugins/search.ts
import { Router } from 'express';
-import { Duration } from 'luxon';
// omitted other code
const schedule = env.scheduler.createScheduledTaskRunner({
- frequency: Duration.fromObject({ minutes: 10 }),
- timeout: Duration.fromObject({ minutes: 15 }),
+ frequency: { minutes: 10 },
+ timeout: { minutes: 15 },
// A 3 second delay gives the backend server a chance to initialize before
// any collators are executed, which may attempt requests against the API.
- initialDelay: Duration.fromObject({ seconds: 3 }),
+ initialDelay: { seconds: 3 },
});
7cda923c16: Tweaked the .dockerignore file so that it's easier to add additional backend packages if desired.
To apply this change to an existing app, make the following change to .dockerignore:
cypress
microsite
node_modules
-packages
-!packages/backend/dist
+packages/*/src
+packages/*/node_modules
plugins
f55414f895: Added sample catalog data to the template under a top-level examples directory. This includes some simple entities, org data, and a template. You can find the sample data at https://github.com/backstage/backstage/tree/master/packages/create-app/templates/default-app/examples.
3a74e203a8: Implement highlighting matching terms in search results. To enable this for an existing app, make the following changes:
// packages/app/src/components/search/SearchPage.tsx
...
- {results.map(({ type, document }) => {
+ {results.map(({ type, document, highlight }) => {
switch (type) {
case 'software-catalog':
return (
<CatalogSearchResultListItem
key={document.location}
result={document}
+ highlight={highlight}
/>
);
case 'techdocs':
return (
<TechDocsSearchResultListItem
key={document.location}
result={document}
+ highlight={highlight}
/>
);
default:
return (
<DefaultResultListItem
key={document.location}
result={document}
+ highlight={highlight}
/>
);
}
})}
...
Updated dependencies
@types/node to ^16.0.0.@types/node to ^16.0.0.isGroupEntity function.a7de43f648: GitHubOrgEntityProvider.fromConfig now supports a schedule option like other
entity providers, that makes it more convenient to leverage using the common
task scheduler.
If you want to use this in your own project, it is used something like the following:
// In packages/backend/src/plugins/catalog.ts
builder.addEntityProvider(
GitHubOrgEntityProvider.fromConfig(env.config, {
id: 'production',
orgUrl: 'https://github.com/backstage',
schedule: env.scheduler.createScheduledTaskRunner({
frequency: { cron: '*/30 * * * *' },
timeout: { minutes: 10 },
}),
logger: env.logger,
}),
);
Updated dependencies
@types/codemirror to ^5.0.0.use-immer to ^0.7.0.event-source-polyfill to 1.0.26.event-source-polyfill to 1.0.26.bota with extended charactersTechDocsAddonTester class may now be extended if custom test configuration is needed.52419be116: Create a TechDocs <TextSize/> addon that allows users to set a font size in the browser's local storage for the text of documentation pages.
Here's an example on how to use it in a Backstage app:
import {
DefaultTechDocsHome,
TechDocsIndexPage,
TechDocsReaderPage,
} from '@backstage/plugin-techdocs';
import { TechDocsAddons } from '@backstage/plugin-techdocs-react/alpha';
+import { TextSize } from '@backstage/plugin-techdocs-module-addons-contrib';
const AppRoutes = () => {
<FlatRoutes>
// other plugin routes
<Route path="/docs" element={<TechDocsIndexPage />}>
<DefaultTechDocsHome />
</Route>
<Route
path="/docs/:namespace/:kind/:name/*"
element={<TechDocsReaderPage />}
>
<TechDocsAddons>
+ <TextSize />
</TechDocsAddons>
</Route>
</FlatRoutes>;
};
Updated dependencies
52419be116: Create a new addon location called "Settings", it is designed for addons that allow users to customize the reading experience in documentation pages.
Usage example:
const TextSize = techdocsModuleAddonsContribPlugin.provide(
createTechDocsAddonExtension({
name: 'TextSize',
location: TechDocsAddonLocations.Settings,
component: TextSizeAddon,
}),
);
Updated dependencies