@backstage/plugin-auth-backend 0.12.2 → 0.12.3
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @backstage/plugin-auth-backend
|
|
2
2
|
|
|
3
|
+
## 0.12.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix migrations to do the right thing on sqlite databases, and reapply the column type fix for those who are _not_ on sqlite databases.
|
|
8
|
+
|
|
9
|
+
Reconstruction of #10317 in the form of a patch release instead.
|
|
10
|
+
|
|
3
11
|
## 0.12.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
exports.up = async function up(knex) {
|
|
23
23
|
// Sqlite does not support alter column.
|
|
24
|
-
if (knex.client.config.client.includes('sqlite3')) {
|
|
24
|
+
if (!knex.client.config.client.includes('sqlite3')) {
|
|
25
25
|
await knex.schema.alterTable('signing_keys', table => {
|
|
26
26
|
table
|
|
27
27
|
.timestamp('created_at', { useTz: true, precision: 0 })
|
|
@@ -38,7 +38,7 @@ exports.up = async function up(knex) {
|
|
|
38
38
|
*/
|
|
39
39
|
exports.down = async function down(knex) {
|
|
40
40
|
// Sqlite does not support alter column.
|
|
41
|
-
if (knex.client.config.client.includes('sqlite3')) {
|
|
41
|
+
if (!knex.client.config.client.includes('sqlite3')) {
|
|
42
42
|
await knex.schema.alterTable('signing_keys', table => {
|
|
43
43
|
table
|
|
44
44
|
.timestamp('created_at', { useTz: false, precision: 0 })
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 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
|
+
// NOTE: This may look like a plain duplicate of the previous one, but that
|
|
20
|
+
// file had a bug added when improving sqlite driver support:
|
|
21
|
+
// https://github.com/backstage/backstage/pull/10053/files#diff-30bb343265e71ca2f1cdcccd5ac8fdbb2a597507c5531bf26945059783377b15R24
|
|
22
|
+
// Since the old file was released to end users, those who created a new
|
|
23
|
+
// Backstage app specifically for PostgreSQL since the release will be missing
|
|
24
|
+
// this fix on their table. So we re-apply it.
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @param {import('knex').Knex} knex
|
|
28
|
+
*/
|
|
29
|
+
exports.up = async function up(knex) {
|
|
30
|
+
// Sqlite does not support alter column.
|
|
31
|
+
if (!knex.client.config.client.includes('sqlite3')) {
|
|
32
|
+
await knex.schema.alterTable('signing_keys', table => {
|
|
33
|
+
table
|
|
34
|
+
.timestamp('created_at', { useTz: true, precision: 0 })
|
|
35
|
+
.notNullable()
|
|
36
|
+
.defaultTo(knex.fn.now())
|
|
37
|
+
.comment('The creation time of the key')
|
|
38
|
+
.alter({ alterType: true });
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @param {import('knex').Knex} knex
|
|
45
|
+
*/
|
|
46
|
+
exports.down = async function down(knex) {
|
|
47
|
+
// Sqlite does not support alter column.
|
|
48
|
+
if (!knex.client.config.client.includes('sqlite3')) {
|
|
49
|
+
await knex.schema.alterTable('signing_keys', table => {
|
|
50
|
+
table
|
|
51
|
+
.timestamp('created_at', { useTz: false, precision: 0 })
|
|
52
|
+
.notNullable()
|
|
53
|
+
.defaultTo(knex.fn.now())
|
|
54
|
+
.comment('The creation time of the key')
|
|
55
|
+
.alter({ alterType: true });
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-auth-backend",
|
|
3
3
|
"description": "A Backstage backend plugin that handles authentication",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.3",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"config.d.ts"
|
|
98
98
|
],
|
|
99
99
|
"configSchema": "config.d.ts",
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "ad8baedf3924e9d43c7bc98cab11a750a4d837f3"
|
|
101
101
|
}
|