@backstage/plugin-app-node 0.0.0-nightly-20230808022043
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +5 -0
- package/dist/index.cjs.js +12 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/package.json +35 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# @backstage/plugin-app-node
|
|
2
|
+
|
|
3
|
+
## 0.0.0-nightly-20230808022043
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9fbe95ef6503: Added the `app` plugin node library, initially providing an extension point that can be used to configure a static fallback handler.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/backend-plugin-api@0.0.0-nightly-20230808022043
|
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
6
|
+
|
|
7
|
+
const staticFallbackHandlerExtensionPoint = backendPluginApi.createExtensionPoint({
|
|
8
|
+
id: "app.staticFallbackHandler"
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
exports.staticFallbackHandlerExtensionPoint = staticFallbackHandlerExtensionPoint;
|
|
12
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/extensions.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createExtensionPoint } from '@backstage/backend-plugin-api';\nimport { Handler } from 'express';\n\n/**\n * The interface for {@link staticFallbackHandlerExtensionPoint}.\n *\n * @public\n */\nexport interface StaticFallbackHandlerExtensionPoint {\n /**\n * Sets the static fallback handler. This can only be done once.\n */\n setStaticFallbackHandler(handler: Handler): void;\n}\n\n/**\n * An extension point the exposes the ability to configure a static fallback handler for the app backend.\n *\n * The static fallback handler is a request handler to handle requests for static content that is not\n * present in the app bundle.\n *\n * This can be used to avoid issues with clients on older deployment versions trying to access lazy\n * loaded content that is no longer present. Typically the requests would fall back to a long-term\n * object store where all recently deployed versions of the app are present.\n *\n * Another option is to provide a `database` that will take care of storing the static assets instead.\n *\n * If both `database` and `staticFallbackHandler` are provided, the `database` will attempt to serve\n * static assets first, and if they are not found, the `staticFallbackHandler` will be called.\n *\n * @public\n */\nexport const staticFallbackHandlerExtensionPoint =\n createExtensionPoint<StaticFallbackHandlerExtensionPoint>({\n id: 'app.staticFallbackHandler',\n });\n"],"names":["createExtensionPoint"],"mappings":";;;;;;AAgDO,MAAM,sCACXA,qCAA0D,CAAA;AAAA,EACxD,EAAI,EAAA,2BAAA;AACN,CAAC;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
+
import { Handler } from 'express';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The interface for {@link staticFallbackHandlerExtensionPoint}.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
interface StaticFallbackHandlerExtensionPoint {
|
|
10
|
+
/**
|
|
11
|
+
* Sets the static fallback handler. This can only be done once.
|
|
12
|
+
*/
|
|
13
|
+
setStaticFallbackHandler(handler: Handler): void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* An extension point the exposes the ability to configure a static fallback handler for the app backend.
|
|
17
|
+
*
|
|
18
|
+
* The static fallback handler is a request handler to handle requests for static content that is not
|
|
19
|
+
* present in the app bundle.
|
|
20
|
+
*
|
|
21
|
+
* This can be used to avoid issues with clients on older deployment versions trying to access lazy
|
|
22
|
+
* loaded content that is no longer present. Typically the requests would fall back to a long-term
|
|
23
|
+
* object store where all recently deployed versions of the app are present.
|
|
24
|
+
*
|
|
25
|
+
* Another option is to provide a `database` that will take care of storing the static assets instead.
|
|
26
|
+
*
|
|
27
|
+
* If both `database` and `staticFallbackHandler` are provided, the `database` will attempt to serve
|
|
28
|
+
* static assets first, and if they are not found, the `staticFallbackHandler` will be called.
|
|
29
|
+
*
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
declare const staticFallbackHandlerExtensionPoint: _backstage_backend_plugin_api.ExtensionPoint<StaticFallbackHandlerExtensionPoint>;
|
|
33
|
+
|
|
34
|
+
export { StaticFallbackHandlerExtensionPoint, staticFallbackHandlerExtensionPoint };
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@backstage/plugin-app-node",
|
|
3
|
+
"description": "Node.js library for the app plugin",
|
|
4
|
+
"version": "0.0.0-nightly-20230808022043",
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public",
|
|
10
|
+
"main": "dist/index.cjs.js",
|
|
11
|
+
"types": "dist/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"backstage": {
|
|
14
|
+
"role": "node-library"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "backstage-cli package build",
|
|
18
|
+
"lint": "backstage-cli package lint",
|
|
19
|
+
"test": "backstage-cli package test",
|
|
20
|
+
"clean": "backstage-cli package clean",
|
|
21
|
+
"prepack": "backstage-cli package prepack",
|
|
22
|
+
"postpack": "backstage-cli package postpack"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@backstage/cli": "^0.0.0-nightly-20230808022043"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@backstage/backend-plugin-api": "^0.0.0-nightly-20230808022043",
|
|
32
|
+
"@types/express": "^4.17.6",
|
|
33
|
+
"express": "^4.17.1"
|
|
34
|
+
}
|
|
35
|
+
}
|