@backstage/backend-app-api 0.6.3-next.0 → 0.7.0-next.1
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 +32 -0
- package/alpha/package.json +1 -1
- package/dist/index.cjs.js +823 -253
- package/dist/index.cjs.js.map +1 -1
- package/migrations/20240327104803_public_keys.js +50 -0
- package/package.json +17 -12
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 The Backstage Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// @ts-check
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param { import("knex").Knex } knex
|
|
21
|
+
* @returns { Promise<void> }
|
|
22
|
+
*/
|
|
23
|
+
exports.up = async function up(knex) {
|
|
24
|
+
await knex.schema.createTable(
|
|
25
|
+
'backstage_backend_public_keys__keys',
|
|
26
|
+
table => {
|
|
27
|
+
table
|
|
28
|
+
.string('id')
|
|
29
|
+
.primary()
|
|
30
|
+
.notNullable()
|
|
31
|
+
.comment('The unique ID of a public key');
|
|
32
|
+
|
|
33
|
+
table.text('key').notNullable().comment('JSON serialized public key');
|
|
34
|
+
|
|
35
|
+
// Expiration is stored as a string for simplicity, all checks are done client-side
|
|
36
|
+
table
|
|
37
|
+
.string('expires_at')
|
|
38
|
+
.notNullable()
|
|
39
|
+
.comment('The time that the key expires');
|
|
40
|
+
},
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @param { import("knex").Knex } knex
|
|
46
|
+
* @returns { Promise<void> }
|
|
47
|
+
*/
|
|
48
|
+
exports.down = async function down(knex) {
|
|
49
|
+
return knex.schema.dropTable('backstage_backend_public_keys__keys');
|
|
50
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/backend-app-api",
|
|
3
3
|
"description": "Core API used by Backstage backend apps",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0-next.1",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"publishConfig": {
|
|
@@ -35,24 +35,24 @@
|
|
|
35
35
|
"license": "Apache-2.0",
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "backstage-cli package build",
|
|
38
|
+
"clean": "backstage-cli package clean",
|
|
38
39
|
"lint": "backstage-cli package lint",
|
|
39
|
-
"test": "backstage-cli package test",
|
|
40
40
|
"prepack": "backstage-cli package prepack",
|
|
41
41
|
"postpack": "backstage-cli package postpack",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
42
|
+
"start": "backstage-cli package start",
|
|
43
|
+
"test": "backstage-cli package test"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@backstage/backend-common": "^0.21.7-next.
|
|
47
|
-
"@backstage/backend-plugin-api": "^0.6.17-next.
|
|
48
|
-
"@backstage/backend-tasks": "^0.5.22-next.
|
|
46
|
+
"@backstage/backend-common": "^0.21.7-next.1",
|
|
47
|
+
"@backstage/backend-plugin-api": "^0.6.17-next.1",
|
|
48
|
+
"@backstage/backend-tasks": "^0.5.22-next.1",
|
|
49
49
|
"@backstage/cli-common": "^0.1.13",
|
|
50
50
|
"@backstage/cli-node": "^0.2.4",
|
|
51
51
|
"@backstage/config": "^1.2.0",
|
|
52
52
|
"@backstage/config-loader": "^1.8.0-next.0",
|
|
53
53
|
"@backstage/errors": "^1.2.4",
|
|
54
|
-
"@backstage/plugin-auth-node": "^0.4.12-next.
|
|
55
|
-
"@backstage/plugin-permission-node": "^0.7.28-next.
|
|
54
|
+
"@backstage/plugin-auth-node": "^0.4.12-next.1",
|
|
55
|
+
"@backstage/plugin-permission-node": "^0.7.28-next.1",
|
|
56
56
|
"@backstage/types": "^1.1.1",
|
|
57
57
|
"@manypkg/get-packages": "^1.1.3",
|
|
58
58
|
"@types/cors": "^2.8.6",
|
|
@@ -65,8 +65,10 @@
|
|
|
65
65
|
"fs-extra": "^11.2.0",
|
|
66
66
|
"helmet": "^6.0.0",
|
|
67
67
|
"jose": "^5.0.0",
|
|
68
|
+
"knex": "^3.0.0",
|
|
68
69
|
"lodash": "^4.17.21",
|
|
69
70
|
"logform": "^2.3.2",
|
|
71
|
+
"luxon": "^3.0.0",
|
|
70
72
|
"minimatch": "^9.0.0",
|
|
71
73
|
"minimist": "^1.2.5",
|
|
72
74
|
"morgan": "^1.10.0",
|
|
@@ -74,12 +76,13 @@
|
|
|
74
76
|
"path-to-regexp": "^6.2.1",
|
|
75
77
|
"selfsigned": "^2.0.0",
|
|
76
78
|
"stoppable": "^1.1.0",
|
|
79
|
+
"uuid": "^9.0.0",
|
|
77
80
|
"winston": "^3.2.1",
|
|
78
81
|
"winston-transport": "^4.5.0"
|
|
79
82
|
},
|
|
80
83
|
"devDependencies": {
|
|
81
|
-
"@backstage/backend-test-utils": "^0.3.7-next.
|
|
82
|
-
"@backstage/cli": "^0.26.3-next.
|
|
84
|
+
"@backstage/backend-test-utils": "^0.3.7-next.1",
|
|
85
|
+
"@backstage/cli": "^0.26.3-next.1",
|
|
83
86
|
"@types/compression": "^1.7.0",
|
|
84
87
|
"@types/fs-extra": "^11.0.0",
|
|
85
88
|
"@types/http-errors": "^2.0.0",
|
|
@@ -88,12 +91,14 @@
|
|
|
88
91
|
"@types/node-forge": "^1.3.0",
|
|
89
92
|
"@types/stoppable": "^1.1.0",
|
|
90
93
|
"http-errors": "^2.0.0",
|
|
94
|
+
"msw": "^1.0.0",
|
|
91
95
|
"supertest": "^6.1.3"
|
|
92
96
|
},
|
|
93
97
|
"configSchema": "config.d.ts",
|
|
94
98
|
"files": [
|
|
95
99
|
"dist",
|
|
96
100
|
"config.d.ts",
|
|
97
|
-
"alpha"
|
|
101
|
+
"alpha",
|
|
102
|
+
"migrations/**/*.{js,d.ts}"
|
|
98
103
|
]
|
|
99
104
|
}
|