@spinajs/session-provider-db 1.2.138 → 1.2.141
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/lib/migrations/UserSessionDBSqlMigration_2022_06_28_01_01_01.d.ts +1 -1
- package/lib/migrations/UserSessionDBSqlMigration_2022_06_28_01_01_01.js +6 -6
- package/lib/migrations/UserSessionDBSqlMigration_2022_06_28_01_01_01.js.map +1 -1
- package/package.json +5 -5
- package/lib/migrations/AclSessionDBSqlMigration_2022_06_28_01_01_01.d.ts +0 -5
- package/lib/migrations/AclSessionDBSqlMigration_2022_06_28_01_01_01.js +0 -30
- package/lib/migrations/AclSessionDBSqlMigration_2022_06_28_01_01_01.js.map +0 -1
- package/lib/models/Session.d.ts +0 -9
- package/lib/models/Session.js +0 -30
- package/lib/models/Session.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OrmMigration, OrmDriver } from '@spinajs/orm';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class UserSessionDBSqlMigration_2022_06_28_01_01_01 extends OrmMigration {
|
|
3
3
|
up(connection: OrmDriver): Promise<void>;
|
|
4
4
|
down(_: OrmDriver): Promise<void>;
|
|
5
5
|
}
|
|
@@ -6,9 +6,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.UserSessionDBSqlMigration_2022_06_28_01_01_01 = void 0;
|
|
10
10
|
const orm_1 = require("@spinajs/orm");
|
|
11
|
-
let
|
|
11
|
+
let UserSessionDBSqlMigration_2022_06_28_01_01_01 = class UserSessionDBSqlMigration_2022_06_28_01_01_01 extends orm_1.OrmMigration {
|
|
12
12
|
async up(connection) {
|
|
13
13
|
await connection.schema().createTable('user_sessions', (table) => {
|
|
14
14
|
table.int('Id').primaryKey().autoIncrement();
|
|
@@ -18,13 +18,13 @@ let AclSessionDBSqlMigration_2022_06_28_01_01_01 = class AclSessionDBSqlMigratio
|
|
|
18
18
|
table.text('Data').notNull();
|
|
19
19
|
});
|
|
20
20
|
// create index explicit, otherwise sqlite driver cannot extract unique index from sqlite_master
|
|
21
|
-
await connection.index().table('
|
|
21
|
+
await connection.index().table('user_sessions').name('session_id_user_session_idx').columns(['SessionId']).unique();
|
|
22
22
|
}
|
|
23
23
|
// tslint:disable-next-line: no-empty
|
|
24
24
|
async down(_) { }
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
UserSessionDBSqlMigration_2022_06_28_01_01_01 = __decorate([
|
|
27
27
|
(0, orm_1.Migration)('default')
|
|
28
|
-
],
|
|
29
|
-
exports.
|
|
28
|
+
], UserSessionDBSqlMigration_2022_06_28_01_01_01);
|
|
29
|
+
exports.UserSessionDBSqlMigration_2022_06_28_01_01_01 = UserSessionDBSqlMigration_2022_06_28_01_01_01;
|
|
30
30
|
//# sourceMappingURL=UserSessionDBSqlMigration_2022_06_28_01_01_01.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserSessionDBSqlMigration_2022_06_28_01_01_01.js","sourceRoot":"","sources":["../../src/migrations/UserSessionDBSqlMigration_2022_06_28_01_01_01.ts"],"names":[],"mappings":";;;;;;;;;AAAA,sCAAkE;AAGlE,IAAa,
|
|
1
|
+
{"version":3,"file":"UserSessionDBSqlMigration_2022_06_28_01_01_01.js","sourceRoot":"","sources":["../../src/migrations/UserSessionDBSqlMigration_2022_06_28_01_01_01.ts"],"names":[],"mappings":";;;;;;;;;AAAA,sCAAkE;AAGlE,IAAa,6CAA6C,GAA1D,MAAa,6CAA8C,SAAQ,kBAAY;IACtE,KAAK,CAAC,EAAE,CAAC,UAAqB;QACnC,MAAM,UAAU,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE;YAC/D,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC,aAAa,EAAE,CAAC;YAC7C,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;YACzC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,CAAC;YAClC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC;YACnC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,gGAAgG;QAChG,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACtH,CAAC;IAED,qCAAqC;IAC9B,KAAK,CAAC,IAAI,CAAC,CAAY,IAAkB,CAAC;CAClD,CAAA;AAhBY,6CAA6C;IADzD,IAAA,eAAS,EAAC,SAAS,CAAC;GACR,6CAA6C,CAgBzD;AAhBY,sGAA6C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spinajs/session-provider-db",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.141",
|
|
4
4
|
"description": "Simple session provider based on relational db. Usefull for testing or small projects",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"@spinajs/di": "^1.2.127",
|
|
43
43
|
"@spinajs/exceptions": "^1.2.127",
|
|
44
44
|
"@spinajs/log": "^1.2.137",
|
|
45
|
-
"@spinajs/orm": "^1.2.
|
|
46
|
-
"@spinajs/rbac": "^1.2.
|
|
45
|
+
"@spinajs/orm": "^1.2.140",
|
|
46
|
+
"@spinajs/rbac": "^1.2.140",
|
|
47
47
|
"@spinajs/reflection": "^1.2.137",
|
|
48
48
|
"luxon": "^2.4.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@spinajs/orm-sqlite": "^1.2.
|
|
51
|
+
"@spinajs/orm-sqlite": "^1.2.140"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "19a502b90590ed7bdd2461d2549d6b53a1294a09"
|
|
54
54
|
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.AclSessionDBSqlMigration_2022_06_28_01_01_01 = void 0;
|
|
10
|
-
const orm_1 = require("@spinajs/orm");
|
|
11
|
-
let AclSessionDBSqlMigration_2022_06_28_01_01_01 = class AclSessionDBSqlMigration_2022_06_28_01_01_01 extends orm_1.OrmMigration {
|
|
12
|
-
async up(connection) {
|
|
13
|
-
await connection.schema().createTable('acl_sessions', (table) => {
|
|
14
|
-
table.int('Id').primaryKey().autoIncrement();
|
|
15
|
-
table.string('SessionId', 255).notNull();
|
|
16
|
-
table.date('CreatedAt').notNull();
|
|
17
|
-
table.date('Expiration').notNull();
|
|
18
|
-
table.text('Data').notNull();
|
|
19
|
-
});
|
|
20
|
-
// create index explicit, otherwise sqlite driver cannot extract unique index from sqlite_master
|
|
21
|
-
await connection.index().table('acl_sessions').name('session_id_acl_session_idx').columns(['SessionId']).unique();
|
|
22
|
-
}
|
|
23
|
-
// tslint:disable-next-line: no-empty
|
|
24
|
-
async down(_) { }
|
|
25
|
-
};
|
|
26
|
-
AclSessionDBSqlMigration_2022_06_28_01_01_01 = __decorate([
|
|
27
|
-
(0, orm_1.Migration)('default')
|
|
28
|
-
], AclSessionDBSqlMigration_2022_06_28_01_01_01);
|
|
29
|
-
exports.AclSessionDBSqlMigration_2022_06_28_01_01_01 = AclSessionDBSqlMigration_2022_06_28_01_01_01;
|
|
30
|
-
//# sourceMappingURL=AclSessionDBSqlMigration_2022_06_28_01_01_01.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AclSessionDBSqlMigration_2022_06_28_01_01_01.js","sourceRoot":"","sources":["../../src/migrations/AclSessionDBSqlMigration_2022_06_28_01_01_01.ts"],"names":[],"mappings":";;;;;;;;;AAAA,sCAAkE;AAGlE,IAAa,4CAA4C,GAAzD,MAAa,4CAA6C,SAAQ,kBAAY;IACrE,KAAK,CAAC,EAAE,CAAC,UAAqB;QACnC,MAAM,UAAU,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,KAAK,EAAE,EAAE;YAC9D,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC,aAAa,EAAE,CAAC;YAC7C,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;YACzC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,CAAC;YAClC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC;YACnC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,gGAAgG;QAChG,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpH,CAAC;IAED,qCAAqC;IAC9B,KAAK,CAAC,IAAI,CAAC,CAAY,IAAkB,CAAC;CAClD,CAAA;AAhBY,4CAA4C;IADxD,IAAA,eAAS,EAAC,SAAS,CAAC;GACR,4CAA4C,CAgBxD;AAhBY,oGAA4C"}
|
package/lib/models/Session.d.ts
DELETED
package/lib/models/Session.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.DbSession = void 0;
|
|
13
|
-
const orm_1 = require("@spinajs/orm");
|
|
14
|
-
const luxon_1 = require("luxon");
|
|
15
|
-
let DbSession = class DbSession extends orm_1.ModelBase {
|
|
16
|
-
};
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, orm_1.Primary)(),
|
|
19
|
-
__metadata("design:type", Number)
|
|
20
|
-
], DbSession.prototype, "Id", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, orm_1.CreatedAt)(),
|
|
23
|
-
__metadata("design:type", luxon_1.DateTime)
|
|
24
|
-
], DbSession.prototype, "CreatedAt", void 0);
|
|
25
|
-
DbSession = __decorate([
|
|
26
|
-
(0, orm_1.Connection)('default'),
|
|
27
|
-
(0, orm_1.Model)('acl_sessions')
|
|
28
|
-
], DbSession);
|
|
29
|
-
exports.DbSession = DbSession;
|
|
30
|
-
//# sourceMappingURL=Session.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Session.js","sourceRoot":"","sources":["../../src/models/Session.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sCAAgF;AAChF,iCAAiC;AAIjC,IAAa,SAAS,GAAtB,MAAa,SAAU,SAAQ,eAAS;CAYvC,CAAA;AAVC;IADC,IAAA,aAAO,GAAE;;qCACQ;AAKlB;IADC,IAAA,eAAS,GAAE;8BACM,gBAAQ;4CAAC;AAPhB,SAAS;IAFrB,IAAA,gBAAU,EAAC,SAAS,CAAC;IACrB,IAAA,WAAK,EAAC,cAAc,CAAC;GACT,SAAS,CAYrB;AAZY,8BAAS"}
|