temp
This commit is contained in:
parent
2b90bbab6f
commit
bb571631d6
@ -52,6 +52,7 @@
|
||||
"strip-ansi": "^7.1.0",
|
||||
"tar": "^7.4.3",
|
||||
"uuid": "^11.1.0",
|
||||
"pm2": "^5.4.3",
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -73,7 +74,6 @@
|
||||
"concurrently": "^9.1.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"nodemon": "^3.1.9",
|
||||
"pm2": "^5.4.3",
|
||||
"rimraf": "^6.0.1",
|
||||
"rollup": "^4.34.8",
|
||||
"rollup-plugin-copy": "^3.5.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { sequelize } from '../modules/sequelize.ts';
|
||||
import { DataTypes, Model } from 'sequelize';
|
||||
|
||||
import { DataTypes, Model, Sequelize } from 'sequelize';
|
||||
import { useContextKey } from '@kevisual/use-config/context';
|
||||
const sequelize = useContextKey<Sequelize>('sequelize');
|
||||
export class Org extends Model {
|
||||
declare id: string;
|
||||
declare username: string;
|
||||
@ -40,3 +40,5 @@ Org.init(
|
||||
Org.sync({ alter: true, logging: false }).catch((e) => {
|
||||
console.error('Org sync', e);
|
||||
});
|
||||
|
||||
useContextKey('OrgModel', () => Org);
|
||||
|
@ -1,13 +1,15 @@
|
||||
import { useConfig } from '@kevisual/use-config';
|
||||
import { sequelize } from '@/modules/sequelize.ts';
|
||||
import { DataTypes, Model, Op } from 'sequelize';
|
||||
import { DataTypes, Model, Op, Sequelize } from 'sequelize';
|
||||
import { createToken, checkToken } from '@kevisual/auth';
|
||||
import { cryptPwd } from '@kevisual/auth';
|
||||
import { customRandom, nanoid, customAlphabet } from 'nanoid';
|
||||
import { CustomError } from '@kevisual/router';
|
||||
import { Org } from './org.ts';
|
||||
import { redis } from '@/app.ts';
|
||||
|
||||
import { useContextKey } from '@kevisual/use-config/context';
|
||||
import { Redis } from 'ioredis';
|
||||
export const redis = useContextKey<Redis>('redis');
|
||||
const sequelize = useContextKey<Sequelize>('sequelize');
|
||||
const config = useConfig<{ tokenSecret: string }>();
|
||||
|
||||
type UserData = {
|
||||
@ -281,3 +283,5 @@ export class UserServices extends User {
|
||||
static initializeUser = initializeUser;
|
||||
static createDemoUser = createDemoUser;
|
||||
}
|
||||
|
||||
useContextKey('UserModel', () => UserServices);
|
||||
|
@ -10,7 +10,7 @@
|
||||
"baseUrl": "./",
|
||||
"typeRoots": [
|
||||
"node_modules/@types",
|
||||
"node_modules/@kevisual/types"
|
||||
"//node_modules/@kevisual/types"
|
||||
],
|
||||
"declaration": true,
|
||||
"noEmit": false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user