update packages and run prettier
This commit is contained in:
parent
32ee928b6c
commit
422b4a73c4
|
@ -1,4 +1,3 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: rubikscraft
|
||||
|
||||
|
|
|
@ -10,5 +10,4 @@ yarn-error.log
|
|||
!.yarn/versions
|
||||
.pnp.*
|
||||
|
||||
|
||||
temp
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
node_modules
|
||||
dist
|
||||
.angular
|
||||
.yarn
|
||||
|
|
|
@ -2,6 +2,6 @@ nodeLinker: node-modules
|
|||
|
||||
plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
|
||||
spec: "@yarnpkg/plugin-version"
|
||||
spec: '@yarnpkg/plugin-version'
|
||||
|
||||
yarnPath: .yarn/releases/yarn-berry.cjs
|
||||
|
|
|
@ -56,7 +56,7 @@ Every featured marked here should work in the latest release.
|
|||
- [x] Deletable images
|
||||
- [x] Proper DB migrations
|
||||
- [x] Show own images in list
|
||||
- [X] Correct previews on chats
|
||||
- [x] Correct previews on chats
|
||||
|
||||
- [ ] Expiring images
|
||||
- [ ] White mode
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@fastify/helmet": "^10.0.0",
|
||||
"@fastify/multipart": "^7.1.1",
|
||||
"@fastify/multipart": "^7.1.2",
|
||||
"@fastify/static": "^6.5.0",
|
||||
"@nestjs/common": "^9.0.11",
|
||||
"@nestjs/config": "^2.2.0",
|
||||
|
@ -52,28 +52,28 @@
|
|||
"reflect-metadata": "^0.1.13",
|
||||
"rimraf": "^3.0.2",
|
||||
"rxjs": "^7.5.6",
|
||||
"sharp": "^0.30.7",
|
||||
"sharp": "^0.31.0",
|
||||
"stream-parser": "^0.3.1",
|
||||
"thunks": "^4.9.6",
|
||||
"typeorm": "0.3.9",
|
||||
"zod": "^3.18.0"
|
||||
"zod": "^3.19.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "^9.1.1",
|
||||
"@nestjs/schematics": "^9.0.2",
|
||||
"@nestjs/cli": "^9.1.2",
|
||||
"@nestjs/schematics": "^9.0.3",
|
||||
"@nestjs/testing": "^9.0.11",
|
||||
"@types/bcrypt": "^5.0.0",
|
||||
"@types/cors": "^2.8.12",
|
||||
"@types/ms": "^0.7.31",
|
||||
"@types/multer": "^1.4.7",
|
||||
"@types/node": "^18.7.14",
|
||||
"@types/node": "^18.7.15",
|
||||
"@types/passport-jwt": "^3.0.6",
|
||||
"@types/passport-local": "^1.0.34",
|
||||
"@types/passport-strategy": "^0.2.35",
|
||||
"@types/sharp": "^0.30.5",
|
||||
"@types/supertest": "^2.0.12",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.1",
|
||||
"@typescript-eslint/parser": "^5.36.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
||||
"@typescript-eslint/parser": "^5.36.2",
|
||||
"eslint": "^8.23.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
|
|
|
@ -2,14 +2,14 @@ import { Injectable, Logger } from '@nestjs/common';
|
|||
import {
|
||||
DecodedPref,
|
||||
PrefValueType,
|
||||
PrefValueTypeStrings
|
||||
PrefValueTypeStrings,
|
||||
} from 'picsur-shared/dist/dto/preferences.dto';
|
||||
import {
|
||||
AsyncFailable,
|
||||
Fail,
|
||||
Failable,
|
||||
FT,
|
||||
HasFailed
|
||||
HasFailed,
|
||||
} from 'picsur-shared/dist/types';
|
||||
|
||||
type Enum = Record<string, string>;
|
||||
|
|
|
@ -3,18 +3,18 @@ import { InjectRepository } from '@nestjs/typeorm';
|
|||
import {
|
||||
DecodedSysPref,
|
||||
PrefValueType,
|
||||
PrefValueTypeStrings
|
||||
PrefValueTypeStrings,
|
||||
} from 'picsur-shared/dist/dto/preferences.dto';
|
||||
import { SysPreference } from 'picsur-shared/dist/dto/sys-preferences.enum';
|
||||
import { AsyncFailable, Fail, FT, HasFailed } from 'picsur-shared/dist/types';
|
||||
import { Repository } from 'typeorm';
|
||||
import {
|
||||
ESysPreferenceBackend,
|
||||
ESysPreferenceSchema
|
||||
ESysPreferenceSchema,
|
||||
} from '../../database/entities/sys-preference.entity';
|
||||
import {
|
||||
SysPreferenceList,
|
||||
SysPreferenceValueTypes
|
||||
SysPreferenceValueTypes,
|
||||
} from '../../models/constants/syspreferences.const';
|
||||
import { MutexFallBack } from '../../util/mutex-fallback';
|
||||
import { PreferenceCommonService } from './preference-common.service';
|
||||
|
|
|
@ -3,18 +3,18 @@ import { InjectRepository } from '@nestjs/typeorm';
|
|||
import {
|
||||
DecodedUsrPref,
|
||||
PrefValueType,
|
||||
PrefValueTypeStrings
|
||||
PrefValueTypeStrings,
|
||||
} from 'picsur-shared/dist/dto/preferences.dto';
|
||||
import { UsrPreference } from 'picsur-shared/dist/dto/usr-preferences.enum';
|
||||
import { AsyncFailable, Fail, FT, HasFailed } from 'picsur-shared/dist/types';
|
||||
import { Repository } from 'typeorm';
|
||||
import {
|
||||
EUsrPreferenceBackend,
|
||||
EUsrPreferenceSchema
|
||||
EUsrPreferenceSchema,
|
||||
} from '../../database/entities/usr-preference.entity';
|
||||
import {
|
||||
UsrPreferenceList,
|
||||
UsrPreferenceValueTypes
|
||||
UsrPreferenceValueTypes,
|
||||
} from '../../models/constants/usrpreferences.const';
|
||||
import { MutexFallBack } from '../../util/mutex-fallback';
|
||||
import { PreferenceCommonService } from './preference-common.service';
|
||||
|
|
|
@ -7,7 +7,7 @@ import { ERoleBackend } from '../../database/entities/role.entity';
|
|||
import {
|
||||
ImmutableRolesList,
|
||||
SystemRoleDefaults,
|
||||
SystemRolesList
|
||||
SystemRolesList,
|
||||
} from '../../models/constants/roles.const';
|
||||
import { RoleDbService } from './role-db.service';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
Fail,
|
||||
FT,
|
||||
HasFailed,
|
||||
HasSuccess
|
||||
HasSuccess,
|
||||
} from 'picsur-shared/dist/types';
|
||||
import { makeUnique } from 'picsur-shared/dist/util/unique';
|
||||
import { In, Repository } from 'typeorm';
|
||||
|
@ -14,7 +14,7 @@ import { ERoleBackend } from '../../database/entities/role.entity';
|
|||
import { Permissions } from '../../models/constants/permissions.const';
|
||||
import {
|
||||
ImmutableRolesList,
|
||||
UndeletableRolesList
|
||||
UndeletableRolesList,
|
||||
} from '../../models/constants/roles.const';
|
||||
|
||||
@Injectable()
|
||||
|
@ -24,8 +24,7 @@ export class RoleDbService {
|
|||
constructor(
|
||||
@InjectRepository(ERoleBackend)
|
||||
private readonly rolesRepository: Repository<ERoleBackend>,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public async create(
|
||||
name: string,
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
Fail,
|
||||
FT,
|
||||
HasFailed,
|
||||
HasSuccess
|
||||
HasSuccess,
|
||||
} from 'picsur-shared/dist/types';
|
||||
import { FindResult } from 'picsur-shared/dist/types/find-result';
|
||||
import { makeUnique } from 'picsur-shared/dist/util/unique';
|
||||
|
@ -16,12 +16,12 @@ import { EUserBackend } from '../../database/entities/user.entity';
|
|||
import { Permissions } from '../../models/constants/permissions.const';
|
||||
import {
|
||||
DefaultRolesList,
|
||||
SoulBoundRolesList
|
||||
SoulBoundRolesList,
|
||||
} from '../../models/constants/roles.const';
|
||||
import {
|
||||
ImmutableUsersList,
|
||||
LockedLoginUsersList,
|
||||
UndeletableUsersList
|
||||
UndeletableUsersList,
|
||||
} from '../../models/constants/special-users.const';
|
||||
import { GetCols } from '../../util/collection';
|
||||
import { SysPreferenceDbService } from '../preference-db/sys-preference-db.service';
|
||||
|
@ -198,7 +198,7 @@ export class UserDbService {
|
|||
select: ['id'],
|
||||
});
|
||||
|
||||
return { available: !found};
|
||||
return { available: !found };
|
||||
} catch (e) {
|
||||
return Fail(FT.Database, e);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import { ConfigService } from '@nestjs/config';
|
|||
import {
|
||||
ParseBool,
|
||||
ParseInt,
|
||||
ParseString
|
||||
ParseString,
|
||||
} from 'picsur-shared/dist/util/parse-simple';
|
||||
import { EnvPrefix } from '../config.static';
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Injectable, Logger } from '@nestjs/common';
|
|||
import { ConfigService } from '@nestjs/config';
|
||||
import {
|
||||
ServeStaticModuleOptions,
|
||||
ServeStaticModuleOptionsFactory
|
||||
ServeStaticModuleOptionsFactory,
|
||||
} from '@nestjs/serve-static';
|
||||
import { join } from 'path';
|
||||
import { ParseString } from 'picsur-shared/dist/util/parse-simple';
|
||||
|
|
|
@ -31,10 +31,7 @@ export class TypeOrmConfigService implements TypeOrmOptionsFactory {
|
|||
this.configService.get(`${EnvPrefix}DB_HOST`),
|
||||
'localhost',
|
||||
),
|
||||
port: ParseInt(
|
||||
this.configService.get(`${EnvPrefix}DB_PORT`),
|
||||
5432,
|
||||
),
|
||||
port: ParseInt(this.configService.get(`${EnvPrefix}DB_PORT`), 5432),
|
||||
username: ParseString(
|
||||
this.configService.get(`${EnvPrefix}DB_USERNAME`),
|
||||
DefaultName,
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import { EApiKeySchema } from 'picsur-shared/dist/entities/apikey.entity';
|
||||
import {
|
||||
Column, Entity,
|
||||
Column,
|
||||
Entity,
|
||||
Index,
|
||||
ManyToOne, PrimaryGeneratedColumn
|
||||
ManyToOne,
|
||||
PrimaryGeneratedColumn,
|
||||
} from 'typeorm';
|
||||
import { z } from 'zod';
|
||||
import { EUserBackend } from './user.entity';
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
import { EUserSchema } from 'picsur-shared/dist/entities/user.entity';
|
||||
import { Column, Entity, Index, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
Index,
|
||||
OneToMany,
|
||||
PrimaryGeneratedColumn,
|
||||
} from 'typeorm';
|
||||
import { z } from 'zod';
|
||||
import { EApiKeyBackend } from './apikey.entity';
|
||||
|
||||
|
|
|
@ -1,44 +1,93 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class V030A1661692206479 implements MigrationInterface {
|
||||
name = 'V030A1661692206479'
|
||||
name = 'V030A1661692206479';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`CREATE TABLE "e_image_derivative_backend" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "image_id" character varying NOT NULL, "key" character varying NOT NULL, "filetype" character varying NOT NULL, "last_read" TIMESTAMP NOT NULL, "data" bytea NOT NULL, CONSTRAINT "UQ_fa03f5333afd74c5cc5ff780d75" UNIQUE ("image_id", "key"), CONSTRAINT "PK_ff1ecff935b8d7bdcea89087810" PRIMARY KEY ("_id"))`);
|
||||
await queryRunner.query(`CREATE INDEX "IDX_37055605f39b3f8847232d604f" ON "e_image_derivative_backend" ("image_id") `);
|
||||
await queryRunner.query(`CREATE INDEX "IDX_7dc534a666f442383341896062" ON "e_image_derivative_backend" ("key") `);
|
||||
await queryRunner.query(`CREATE TABLE "e_image_file_backend" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "image_id" character varying NOT NULL, "variant" character varying NOT NULL, "filetype" character varying NOT NULL, "data" bytea NOT NULL, CONSTRAINT "UQ_872384f20feaf7bfd27e28b8d4a" UNIQUE ("image_id", "variant"), CONSTRAINT "PK_95953be58a506e5de46feec6186" PRIMARY KEY ("_id"))`);
|
||||
await queryRunner.query(`CREATE INDEX "IDX_8055f37d3b9f52f421b94ee84d" ON "e_image_file_backend" ("image_id") `);
|
||||
await queryRunner.query(`CREATE INDEX "IDX_d0500b00b0b4109b623f897c2d" ON "e_image_file_backend" ("variant") `);
|
||||
await queryRunner.query(`CREATE TABLE "e_image_backend" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "user_id" character varying NOT NULL, "created" TIMESTAMP NOT NULL, CONSTRAINT "PK_5f7993001a7c82564ec5300540d" PRIMARY KEY ("id"))`);
|
||||
await queryRunner.query(`CREATE TABLE "e_role_backend" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying NOT NULL, "permissions" text array NOT NULL, CONSTRAINT "UQ_cbedb9f42a98a82d91422e7fedf" UNIQUE ("name"), CONSTRAINT "PK_af7ba6a46bf69a7b10c425f0367" PRIMARY KEY ("id"))`);
|
||||
await queryRunner.query(`CREATE INDEX "IDX_cbedb9f42a98a82d91422e7fed" ON "e_role_backend" ("name") `);
|
||||
await queryRunner.query(`CREATE TABLE "e_sys_preference_backend" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "key" character varying NOT NULL, "value" character varying NOT NULL, CONSTRAINT "UQ_b04e47c4814fb6e315c5879fa75" UNIQUE ("key"), CONSTRAINT "PK_b79f051e19b46e74cf255e9ba3b" PRIMARY KEY ("id"))`);
|
||||
await queryRunner.query(`CREATE INDEX "IDX_b04e47c4814fb6e315c5879fa7" ON "e_sys_preference_backend" ("key") `);
|
||||
await queryRunner.query(`CREATE TABLE "e_user_backend" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "username" character varying NOT NULL, "roles" text array NOT NULL, "hashed_password" character varying NOT NULL, CONSTRAINT "UQ_ae538430fd08b28f4ab297eff09" UNIQUE ("username"), CONSTRAINT "PK_0b9d256d52e55a48d32e8b64d96" PRIMARY KEY ("id"))`);
|
||||
await queryRunner.query(`CREATE INDEX "IDX_ae538430fd08b28f4ab297eff0" ON "e_user_backend" ("username") `);
|
||||
await queryRunner.query(`CREATE TABLE "e_usr_preference_backend" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "key" character varying NOT NULL, "value" character varying NOT NULL, "user_id" character varying NOT NULL, CONSTRAINT "UQ_576678406a479d569123a33e132" UNIQUE ("key", "user_id"), CONSTRAINT "PK_8f8251016cd9283e7eb04c5498b" PRIMARY KEY ("id"))`);
|
||||
await queryRunner.query(`CREATE INDEX "IDX_673fe530e2484ff7e31ac81099" ON "e_usr_preference_backend" ("key") `);
|
||||
await queryRunner.query(`CREATE INDEX "IDX_f1a427e855045fa793c275861a" ON "e_usr_preference_backend" ("user_id") `);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP INDEX "public"."IDX_f1a427e855045fa793c275861a"`);
|
||||
await queryRunner.query(`DROP INDEX "public"."IDX_673fe530e2484ff7e31ac81099"`);
|
||||
await queryRunner.query(`DROP TABLE "e_usr_preference_backend"`);
|
||||
await queryRunner.query(`DROP INDEX "public"."IDX_ae538430fd08b28f4ab297eff0"`);
|
||||
await queryRunner.query(`DROP TABLE "e_user_backend"`);
|
||||
await queryRunner.query(`DROP INDEX "public"."IDX_b04e47c4814fb6e315c5879fa7"`);
|
||||
await queryRunner.query(`DROP TABLE "e_sys_preference_backend"`);
|
||||
await queryRunner.query(`DROP INDEX "public"."IDX_cbedb9f42a98a82d91422e7fed"`);
|
||||
await queryRunner.query(`DROP TABLE "e_role_backend"`);
|
||||
await queryRunner.query(`DROP TABLE "e_image_backend"`);
|
||||
await queryRunner.query(`DROP INDEX "public"."IDX_d0500b00b0b4109b623f897c2d"`);
|
||||
await queryRunner.query(`DROP INDEX "public"."IDX_8055f37d3b9f52f421b94ee84d"`);
|
||||
await queryRunner.query(`DROP TABLE "e_image_file_backend"`);
|
||||
await queryRunner.query(`DROP INDEX "public"."IDX_7dc534a666f442383341896062"`);
|
||||
await queryRunner.query(`DROP INDEX "public"."IDX_37055605f39b3f8847232d604f"`);
|
||||
await queryRunner.query(`DROP TABLE "e_image_derivative_backend"`);
|
||||
}
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "e_image_derivative_backend" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "image_id" character varying NOT NULL, "key" character varying NOT NULL, "filetype" character varying NOT NULL, "last_read" TIMESTAMP NOT NULL, "data" bytea NOT NULL, CONSTRAINT "UQ_fa03f5333afd74c5cc5ff780d75" UNIQUE ("image_id", "key"), CONSTRAINT "PK_ff1ecff935b8d7bdcea89087810" PRIMARY KEY ("_id"))`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_37055605f39b3f8847232d604f" ON "e_image_derivative_backend" ("image_id") `,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_7dc534a666f442383341896062" ON "e_image_derivative_backend" ("key") `,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "e_image_file_backend" ("_id" uuid NOT NULL DEFAULT uuid_generate_v4(), "image_id" character varying NOT NULL, "variant" character varying NOT NULL, "filetype" character varying NOT NULL, "data" bytea NOT NULL, CONSTRAINT "UQ_872384f20feaf7bfd27e28b8d4a" UNIQUE ("image_id", "variant"), CONSTRAINT "PK_95953be58a506e5de46feec6186" PRIMARY KEY ("_id"))`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_8055f37d3b9f52f421b94ee84d" ON "e_image_file_backend" ("image_id") `,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_d0500b00b0b4109b623f897c2d" ON "e_image_file_backend" ("variant") `,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "e_image_backend" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "user_id" character varying NOT NULL, "created" TIMESTAMP NOT NULL, CONSTRAINT "PK_5f7993001a7c82564ec5300540d" PRIMARY KEY ("id"))`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "e_role_backend" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying NOT NULL, "permissions" text array NOT NULL, CONSTRAINT "UQ_cbedb9f42a98a82d91422e7fedf" UNIQUE ("name"), CONSTRAINT "PK_af7ba6a46bf69a7b10c425f0367" PRIMARY KEY ("id"))`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_cbedb9f42a98a82d91422e7fed" ON "e_role_backend" ("name") `,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "e_sys_preference_backend" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "key" character varying NOT NULL, "value" character varying NOT NULL, CONSTRAINT "UQ_b04e47c4814fb6e315c5879fa75" UNIQUE ("key"), CONSTRAINT "PK_b79f051e19b46e74cf255e9ba3b" PRIMARY KEY ("id"))`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_b04e47c4814fb6e315c5879fa7" ON "e_sys_preference_backend" ("key") `,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "e_user_backend" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "username" character varying NOT NULL, "roles" text array NOT NULL, "hashed_password" character varying NOT NULL, CONSTRAINT "UQ_ae538430fd08b28f4ab297eff09" UNIQUE ("username"), CONSTRAINT "PK_0b9d256d52e55a48d32e8b64d96" PRIMARY KEY ("id"))`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_ae538430fd08b28f4ab297eff0" ON "e_user_backend" ("username") `,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "e_usr_preference_backend" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "key" character varying NOT NULL, "value" character varying NOT NULL, "user_id" character varying NOT NULL, CONSTRAINT "UQ_576678406a479d569123a33e132" UNIQUE ("key", "user_id"), CONSTRAINT "PK_8f8251016cd9283e7eb04c5498b" PRIMARY KEY ("id"))`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_673fe530e2484ff7e31ac81099" ON "e_usr_preference_backend" ("key") `,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_f1a427e855045fa793c275861a" ON "e_usr_preference_backend" ("user_id") `,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`DROP INDEX "public"."IDX_f1a427e855045fa793c275861a"`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`DROP INDEX "public"."IDX_673fe530e2484ff7e31ac81099"`,
|
||||
);
|
||||
await queryRunner.query(`DROP TABLE "e_usr_preference_backend"`);
|
||||
await queryRunner.query(
|
||||
`DROP INDEX "public"."IDX_ae538430fd08b28f4ab297eff0"`,
|
||||
);
|
||||
await queryRunner.query(`DROP TABLE "e_user_backend"`);
|
||||
await queryRunner.query(
|
||||
`DROP INDEX "public"."IDX_b04e47c4814fb6e315c5879fa7"`,
|
||||
);
|
||||
await queryRunner.query(`DROP TABLE "e_sys_preference_backend"`);
|
||||
await queryRunner.query(
|
||||
`DROP INDEX "public"."IDX_cbedb9f42a98a82d91422e7fed"`,
|
||||
);
|
||||
await queryRunner.query(`DROP TABLE "e_role_backend"`);
|
||||
await queryRunner.query(`DROP TABLE "e_image_backend"`);
|
||||
await queryRunner.query(
|
||||
`DROP INDEX "public"."IDX_d0500b00b0b4109b623f897c2d"`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`DROP INDEX "public"."IDX_8055f37d3b9f52f421b94ee84d"`,
|
||||
);
|
||||
await queryRunner.query(`DROP TABLE "e_image_file_backend"`);
|
||||
await queryRunner.query(
|
||||
`DROP INDEX "public"."IDX_7dc534a666f442383341896062"`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`DROP INDEX "public"."IDX_37055605f39b3f8847232d604f"`,
|
||||
);
|
||||
await queryRunner.query(`DROP TABLE "e_image_derivative_backend"`);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class V032A1662029904716 implements MigrationInterface {
|
||||
name = 'V032A1662029904716'
|
||||
name = 'V032A1662029904716';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "e_image_backend" ADD "file_name" character varying NOT NULL DEFAULT 'image'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "e_image_backend" DROP COLUMN "file_name"`);
|
||||
}
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "e_image_backend" ADD "file_name" character varying NOT NULL DEFAULT 'image'`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "e_image_backend" DROP COLUMN "file_name"`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,33 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class V040A1662314197741 implements MigrationInterface {
|
||||
name = 'V040A1662314197741'
|
||||
name = 'V040A1662314197741';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`CREATE TABLE "e_api_key_backend" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "key" character varying NOT NULL, "name" character varying NOT NULL, "created" TIMESTAMP NOT NULL, "last_used" TIMESTAMP, "userId" uuid NOT NULL, CONSTRAINT "UQ_a244964afdff398bab8a45017c8" UNIQUE ("key"), CONSTRAINT "PK_e31f7dfe2db917a6ed1024f4e8b" PRIMARY KEY ("id"))`);
|
||||
await queryRunner.query(`CREATE INDEX "IDX_a244964afdff398bab8a45017c" ON "e_api_key_backend" ("key") `);
|
||||
await queryRunner.query(`ALTER TABLE "e_image_backend" ADD "delete_key" character varying`);
|
||||
await queryRunner.query(`ALTER TABLE "e_api_key_backend" ADD CONSTRAINT "FK_3a32374df29b25152a84f0d1025" FOREIGN KEY ("userId") REFERENCES "e_user_backend"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "e_api_key_backend" DROP CONSTRAINT "FK_3a32374df29b25152a84f0d1025"`);
|
||||
await queryRunner.query(`ALTER TABLE "e_image_backend" DROP COLUMN "delete_key"`);
|
||||
await queryRunner.query(`DROP INDEX "public"."IDX_a244964afdff398bab8a45017c"`);
|
||||
await queryRunner.query(`DROP TABLE "e_api_key_backend"`);
|
||||
}
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "e_api_key_backend" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "key" character varying NOT NULL, "name" character varying NOT NULL, "created" TIMESTAMP NOT NULL, "last_used" TIMESTAMP, "userId" uuid NOT NULL, CONSTRAINT "UQ_a244964afdff398bab8a45017c8" UNIQUE ("key"), CONSTRAINT "PK_e31f7dfe2db917a6ed1024f4e8b" PRIMARY KEY ("id"))`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE INDEX "IDX_a244964afdff398bab8a45017c" ON "e_api_key_backend" ("key") `,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "e_image_backend" ADD "delete_key" character varying`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "e_api_key_backend" ADD CONSTRAINT "FK_3a32374df29b25152a84f0d1025" FOREIGN KEY ("userId") REFERENCES "e_user_backend"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "e_api_key_backend" DROP CONSTRAINT "FK_3a32374df29b25152a84f0d1025"`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "e_image_backend" DROP COLUMN "delete_key"`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`DROP INDEX "public"."IDX_a244964afdff398bab8a45017c"`,
|
||||
);
|
||||
await queryRunner.query(`DROP TABLE "e_api_key_backend"`);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { NestFactory } from '@nestjs/core';
|
||||
import {
|
||||
FastifyAdapter, NestFastifyApplication
|
||||
FastifyAdapter,
|
||||
NestFastifyApplication,
|
||||
} from '@nestjs/platform-fastify';
|
||||
import { DataSource } from 'typeorm';
|
||||
import { TypeOrmConfigService } from './config/early/type-orm.config.service';
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
import {
|
||||
ArgumentMetadata, Injectable,
|
||||
PipeTransform
|
||||
} from '@nestjs/common';
|
||||
import { ArgumentMetadata, Injectable, PipeTransform } from '@nestjs/common';
|
||||
import { Fail, FT } from 'picsur-shared/dist/types';
|
||||
import { UUIDRegex } from 'picsur-shared/dist/util/common-regex';
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import { MultipartFields, MultipartFile } from '@fastify/multipart';
|
||||
import {
|
||||
ArgumentMetadata, Injectable,
|
||||
ArgumentMetadata,
|
||||
Injectable,
|
||||
Logger,
|
||||
PipeTransform,
|
||||
Scope
|
||||
Scope,
|
||||
} from '@nestjs/common';
|
||||
import { FastifyRequest } from 'fastify';
|
||||
import { Fail, FT, HasFailed } from 'picsur-shared/dist/types';
|
||||
|
@ -11,7 +12,7 @@ import { ZodDtoStatic } from 'picsur-shared/dist/util/create-zod-dto';
|
|||
import { MultipartConfigService } from '../../config/early/multipart.config.service';
|
||||
import {
|
||||
CreateMultiPartFieldDto,
|
||||
CreateMultiPartFileDto
|
||||
CreateMultiPartFileDto,
|
||||
} from '../../models/dto/multipart.dto';
|
||||
|
||||
@Injectable({ scope: Scope.REQUEST })
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
import { Multipart } from '@fastify/multipart';
|
||||
import {
|
||||
Injectable,
|
||||
Logger,
|
||||
PipeTransform,
|
||||
Scope
|
||||
} from '@nestjs/common';
|
||||
import { Injectable, Logger, PipeTransform, Scope } from '@nestjs/common';
|
||||
import { FastifyRequest } from 'fastify';
|
||||
import { Fail, FT } from 'picsur-shared/dist/types';
|
||||
import { MultipartConfigService } from '../../config/early/multipart.config.service';
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import {
|
||||
createParamDecorator,
|
||||
ExecutionContext,
|
||||
SetMetadata,
|
||||
UseGuards
|
||||
createParamDecorator,
|
||||
ExecutionContext,
|
||||
SetMetadata,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { Fail, FT } from 'picsur-shared/dist/types';
|
||||
import { CombineFCDecorators } from 'picsur-shared/dist/util/decorator';
|
||||
|
@ -29,7 +29,11 @@ export const HasPermission = createParamDecorator(
|
|||
const req: AuthFastifyRequest = ctx.switchToHttp().getRequest();
|
||||
const permissions = req.userPermissions;
|
||||
if (!permissions) {
|
||||
throw Fail(FT.Internal, undefined, 'Permissions are missing from request');
|
||||
throw Fail(
|
||||
FT.Internal,
|
||||
undefined,
|
||||
'Permissions are missing from request',
|
||||
);
|
||||
}
|
||||
|
||||
return permissions.includes(data);
|
||||
|
@ -41,7 +45,11 @@ export const GetPermissions = createParamDecorator(
|
|||
const req: AuthFastifyRequest = ctx.switchToHttp().getRequest();
|
||||
const permissions = req.userPermissions;
|
||||
if (!permissions) {
|
||||
throw Fail(FT.Internal, undefined, 'Permissions are missing from request');
|
||||
throw Fail(
|
||||
FT.Internal,
|
||||
undefined,
|
||||
'Permissions are missing from request',
|
||||
);
|
||||
}
|
||||
|
||||
return permissions;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import {
|
||||
ArgumentsHost,
|
||||
Catch, ExceptionFilter,
|
||||
Catch,
|
||||
ExceptionFilter,
|
||||
ForbiddenException,
|
||||
Logger,
|
||||
MethodNotAllowedException,
|
||||
NotFoundException,
|
||||
UnauthorizedException
|
||||
UnauthorizedException,
|
||||
} from '@nestjs/common';
|
||||
import { FastifyReply, FastifyRequest } from 'fastify';
|
||||
import { ApiErrorResponse } from 'picsur-shared/dist/dto/api/api.dto';
|
||||
|
@ -13,7 +14,7 @@ import {
|
|||
Fail,
|
||||
Failure,
|
||||
FT,
|
||||
IsFailure
|
||||
IsFailure,
|
||||
} from 'picsur-shared/dist/types/failable';
|
||||
|
||||
// This will catch any exception that is made in any request
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
Injectable,
|
||||
Logger,
|
||||
NestInterceptor,
|
||||
Optional
|
||||
Optional,
|
||||
} from '@nestjs/common';
|
||||
import { Reflector } from '@nestjs/core';
|
||||
import { FastifyReply } from 'fastify';
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
ArgumentMetadata,
|
||||
Injectable,
|
||||
Optional,
|
||||
PipeTransform
|
||||
PipeTransform,
|
||||
} from '@nestjs/common';
|
||||
import { Fail, FT } from 'picsur-shared/dist/types';
|
||||
import { ZodDtoStatic } from 'picsur-shared/dist/util/create-zod-dto';
|
||||
|
@ -36,11 +36,7 @@ export class ZodValidationPipe implements PipeTransform {
|
|||
const parseResult = zodSchema.safeParse(value);
|
||||
|
||||
if (!parseResult.success) {
|
||||
throw Fail(
|
||||
FT.UsrValidation,
|
||||
'Invalid data',
|
||||
parseResult.error
|
||||
);
|
||||
throw Fail(FT.UsrValidation, 'Invalid data', parseResult.error);
|
||||
}
|
||||
|
||||
return parseResult.data;
|
||||
|
|
|
@ -3,7 +3,7 @@ import multipart from '@fastify/multipart';
|
|||
import { NestFactory, Reflector } from '@nestjs/core';
|
||||
import {
|
||||
FastifyAdapter,
|
||||
NestFastifyApplication
|
||||
NestFastifyApplication,
|
||||
} from '@nestjs/platform-fastify';
|
||||
import { AppModule } from './app.module';
|
||||
import { UserDbService } from './collections/user-db/user-db.service';
|
||||
|
|
|
@ -6,7 +6,7 @@ import { PreferenceDbModule } from '../../collections/preference-db/preference-d
|
|||
import { UserDbModule } from '../../collections/user-db/user-db.module';
|
||||
import {
|
||||
JwtConfigService,
|
||||
JwtSecretProvider
|
||||
JwtSecretProvider,
|
||||
} from '../../config/late/jwt.config.service';
|
||||
import { LateConfigModule } from '../../config/late/late-config.module';
|
||||
import { AuthManagerService } from './auth.service';
|
||||
|
|
|
@ -2,9 +2,7 @@ import { Injectable } from '@nestjs/common';
|
|||
import { PassportStrategy } from '@nestjs/passport';
|
||||
import { Strategy } from 'passport-local';
|
||||
import { EUser } from 'picsur-shared/dist/entities/user.entity';
|
||||
import {
|
||||
AsyncFailable, ThrowIfFailed
|
||||
} from 'picsur-shared/dist/types';
|
||||
import { AsyncFailable, ThrowIfFailed } from 'picsur-shared/dist/types';
|
||||
import { UserDbService } from '../../../collections/user-db/user-db.service';
|
||||
import { EUserBackend2EUser } from '../../../models/transformers/user.transformer';
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import ms from 'ms';
|
|||
import { ImageRequestParams } from 'picsur-shared/dist/dto/api/image.dto';
|
||||
import {
|
||||
FileType,
|
||||
SupportedFileTypeCategory
|
||||
SupportedFileTypeCategory,
|
||||
} from 'picsur-shared/dist/dto/mimes.dto';
|
||||
import { SysPreference } from 'picsur-shared/dist/dto/sys-preferences.enum';
|
||||
import { AsyncFailable, Fail, FT, HasFailed } from 'picsur-shared/dist/types';
|
||||
|
@ -72,7 +72,7 @@ export class ImageConverterService {
|
|||
|
||||
// Do modifications
|
||||
if (options.height || options.width) {
|
||||
if ((options.height && options.width)) {
|
||||
if (options.height && options.width) {
|
||||
sharpWrapper.operation('resize', {
|
||||
width: options.width,
|
||||
height: options.height,
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
|
|||
import {
|
||||
FileType,
|
||||
ImageFileType,
|
||||
SupportedFileTypeCategory
|
||||
SupportedFileTypeCategory,
|
||||
} from 'picsur-shared/dist/dto/mimes.dto';
|
||||
|
||||
import { AsyncFailable, Fail, FT, HasFailed } from 'picsur-shared/dist/types';
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
AnimFileType,
|
||||
FileType,
|
||||
ImageFileType,
|
||||
Mime2FileType
|
||||
Mime2FileType,
|
||||
} from 'picsur-shared/dist/dto/mimes.dto';
|
||||
import { SysPreference } from 'picsur-shared/dist/dto/sys-preferences.enum';
|
||||
import { UsrPreference } from 'picsur-shared/dist/dto/usr-preferences.enum';
|
||||
|
|
|
@ -8,14 +8,14 @@ import {
|
|||
ApiKeyListRequest,
|
||||
ApiKeyListResponse,
|
||||
ApiKeyUpdateRequest,
|
||||
ApiKeyUpdateResponse
|
||||
ApiKeyUpdateResponse,
|
||||
} from 'picsur-shared/dist/dto/api/apikeys.dto';
|
||||
import { Permission } from 'picsur-shared/dist/dto/permissions.enum';
|
||||
import { ThrowIfFailed } from 'picsur-shared/dist/types';
|
||||
import { ApiKeyDbService } from '../../../collections/apikey-db/apikey-db.service';
|
||||
import {
|
||||
HasPermission,
|
||||
RequiredPermissions
|
||||
RequiredPermissions,
|
||||
} from '../../../decorators/permissions.decorator';
|
||||
import { ReqUserID } from '../../../decorators/request-user.decorator';
|
||||
import { Returns } from '../../../decorators/returns.decorator';
|
||||
|
|
|
@ -13,7 +13,7 @@ export class ExperimentController {
|
|||
@Returns(UserInfoResponse)
|
||||
async testRoute(
|
||||
@Request() req: AuthFastifyRequest,
|
||||
@Response({passthrough: true}) res: FastifyReply,
|
||||
@Response({ passthrough: true }) res: FastifyReply,
|
||||
): Promise<UserInfoResponse> {
|
||||
res.header('Location', '/error/delete-success');
|
||||
res.code(302);
|
||||
|
|
|
@ -2,9 +2,14 @@ import { Controller, Get } from '@nestjs/common';
|
|||
import {
|
||||
AllFormatsResponse,
|
||||
AllPermissionsResponse,
|
||||
InfoResponse
|
||||
InfoResponse,
|
||||
} from 'picsur-shared/dist/dto/api/info.dto';
|
||||
import { FileType2Ext, FileType2Mime, SupportedAnimFileTypes, SupportedImageFileTypes } from 'picsur-shared/dist/dto/mimes.dto';
|
||||
import {
|
||||
FileType2Ext,
|
||||
FileType2Mime,
|
||||
SupportedAnimFileTypes,
|
||||
SupportedImageFileTypes,
|
||||
} from 'picsur-shared/dist/dto/mimes.dto';
|
||||
import { HostConfigService } from '../../../config/early/host.config.service';
|
||||
import { NoPermissions } from '../../../decorators/permissions.decorator';
|
||||
import { Returns } from '../../../decorators/returns.decorator';
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Get, Logger,
|
||||
Param,
|
||||
Post
|
||||
} from '@nestjs/common';
|
||||
import { Body, Controller, Get, Logger, Param, Post } from '@nestjs/common';
|
||||
import {
|
||||
GetPreferenceResponse,
|
||||
MultiplePreferencesResponse,
|
||||
UpdatePreferenceRequest,
|
||||
UpdatePreferenceResponse
|
||||
UpdatePreferenceResponse,
|
||||
} from 'picsur-shared/dist/dto/api/pref.dto';
|
||||
import { ThrowIfFailed } from 'picsur-shared/dist/types';
|
||||
import { SysPreferenceDbService } from '../../../collections/preference-db/sys-preference-db.service';
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Get, Logger,
|
||||
Param,
|
||||
Post
|
||||
} from '@nestjs/common';
|
||||
import { Body, Controller, Get, Logger, Param, Post } from '@nestjs/common';
|
||||
import {
|
||||
GetPreferenceResponse,
|
||||
MultiplePreferencesResponse,
|
||||
UpdatePreferenceRequest,
|
||||
UpdatePreferenceResponse
|
||||
UpdatePreferenceResponse,
|
||||
} from 'picsur-shared/dist/dto/api/pref.dto';
|
||||
import { ThrowIfFailed } from 'picsur-shared/dist/types';
|
||||
import { UsrPreferenceDbService } from '../../../collections/preference-db/usr-preference-db.service';
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Get, Logger,
|
||||
Post
|
||||
} from '@nestjs/common';
|
||||
import { Body, Controller, Get, Logger, Post } from '@nestjs/common';
|
||||
import {
|
||||
RoleCreateRequest,
|
||||
RoleCreateResponse,
|
||||
|
@ -14,7 +9,7 @@ import {
|
|||
RoleListResponse,
|
||||
RoleUpdateRequest,
|
||||
RoleUpdateResponse,
|
||||
SpecialRolesResponse
|
||||
SpecialRolesResponse,
|
||||
} from 'picsur-shared/dist/dto/api/roles.dto';
|
||||
import { Fail, FT, ThrowIfFailed } from 'picsur-shared/dist/types';
|
||||
import { RoleDbService } from '../../../collections/role-db/role-db.service';
|
||||
|
@ -26,7 +21,7 @@ import {
|
|||
DefaultRolesList,
|
||||
ImmutableRolesList,
|
||||
SoulBoundRolesList,
|
||||
UndeletableRolesList
|
||||
UndeletableRolesList,
|
||||
} from '../../../models/constants/roles.const';
|
||||
import { isPermissionsArray } from '../../../models/validators/permissions.validator';
|
||||
|
||||
|
@ -102,9 +97,7 @@ export class RolesController {
|
|||
await this.rolesService.delete(role.name),
|
||||
);
|
||||
|
||||
ThrowIfFailed(
|
||||
await this.usersService.removeRoleEveryone(role.name),
|
||||
);
|
||||
ThrowIfFailed(await this.usersService.removeRoleEveryone(role.name));
|
||||
|
||||
return deletedRole;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Get, Logger,
|
||||
Post
|
||||
} from '@nestjs/common';
|
||||
import { Body, Controller, Get, Logger, Post } from '@nestjs/common';
|
||||
import {
|
||||
GetSpecialUsersResponse,
|
||||
UserCreateRequest,
|
||||
|
@ -15,7 +10,7 @@ import {
|
|||
UserListRequest,
|
||||
UserListResponse,
|
||||
UserUpdateRequest,
|
||||
UserUpdateResponse
|
||||
UserUpdateResponse,
|
||||
} from 'picsur-shared/dist/dto/api/user-manage.dto';
|
||||
import { ThrowIfFailed } from 'picsur-shared/dist/types';
|
||||
import { UserDbService } from '../../../collections/user-db/user-db.service';
|
||||
|
@ -25,7 +20,7 @@ import { Permission } from '../../../models/constants/permissions.const';
|
|||
import {
|
||||
ImmutableUsersList,
|
||||
LockedLoginUsersList,
|
||||
UndeletableUsersList
|
||||
UndeletableUsersList,
|
||||
} from '../../../models/constants/special-users.const';
|
||||
import { EUserBackend2EUser } from '../../../models/transformers/user.transformer';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
UserMePermissionsResponse,
|
||||
UserMeResponse,
|
||||
UserRegisterRequest,
|
||||
UserRegisterResponse
|
||||
UserRegisterResponse,
|
||||
} from 'picsur-shared/dist/dto/api/user.dto';
|
||||
import type { EUser } from 'picsur-shared/dist/entities/user.entity';
|
||||
import { ThrowIfFailed } from 'picsur-shared/dist/types';
|
||||
|
@ -14,7 +14,7 @@ import { UserDbService } from '../../../collections/user-db/user-db.service';
|
|||
import {
|
||||
NoPermissions,
|
||||
RequiredPermissions,
|
||||
UseLocalAuth
|
||||
UseLocalAuth,
|
||||
} from '../../../decorators/permissions.decorator';
|
||||
import { ReqUser, ReqUserID } from '../../../decorators/request-user.decorator';
|
||||
import { Returns } from '../../../decorators/returns.decorator';
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
Logger,
|
||||
Param,
|
||||
Post,
|
||||
Res
|
||||
Res,
|
||||
} from '@nestjs/common';
|
||||
import type { FastifyReply } from 'fastify';
|
||||
import {
|
||||
|
@ -15,14 +15,14 @@ import {
|
|||
ImageDeleteWithKeyResponse,
|
||||
ImageListRequest,
|
||||
ImageListResponse,
|
||||
ImageUploadResponse
|
||||
ImageUploadResponse,
|
||||
} from 'picsur-shared/dist/dto/api/image-manage.dto';
|
||||
import { Permission } from 'picsur-shared/dist/dto/permissions.enum';
|
||||
import { HasFailed, ThrowIfFailed } from 'picsur-shared/dist/types';
|
||||
import { MultiPart } from '../../decorators/multipart/multipart.decorator';
|
||||
import {
|
||||
HasPermission,
|
||||
RequiredPermissions
|
||||
RequiredPermissions,
|
||||
} from '../../decorators/permissions.decorator';
|
||||
import { ReqUserID } from '../../decorators/request-user.decorator';
|
||||
import { Returns } from '../../decorators/returns.decorator';
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Controller, Get, Head, Logger, Query, Res } from '@nestjs/common';
|
|||
import type { FastifyReply } from 'fastify';
|
||||
import {
|
||||
ImageMetaResponse,
|
||||
ImageRequestParams
|
||||
ImageRequestParams,
|
||||
} from 'picsur-shared/dist/dto/api/image.dto';
|
||||
import { ImageEntryVariant } from 'picsur-shared/dist/dto/image-entry-variant.enum';
|
||||
import { FileType2Mime } from 'picsur-shared/dist/dto/mimes.dto';
|
||||
|
|
|
@ -30,7 +30,7 @@ export async function GetBrandMessage(
|
|||
BrandMessageCache[name] = {
|
||||
type: 'image/png',
|
||||
data: file,
|
||||
}
|
||||
};
|
||||
return BrandMessageCache[name];
|
||||
} catch (e) {
|
||||
return Fail(FT.Internal, e);
|
||||
|
|
|
@ -2,7 +2,9 @@ import { ObjectLiteral, Repository } from 'typeorm';
|
|||
|
||||
// This is a function that returns an array of all available columns in a database table
|
||||
// It is used to fetch hidden columns from the database
|
||||
export function GetCols<T extends ObjectLiteral>(repository: Repository<T>): (keyof T)[] {
|
||||
export function GetCols<T extends ObjectLiteral>(
|
||||
repository: Repository<T>,
|
||||
): (keyof T)[] {
|
||||
return repository.metadata.columns.map(
|
||||
(col) => col.propertyName,
|
||||
) as (keyof T)[];
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
Fail,
|
||||
Failable,
|
||||
FT,
|
||||
HasFailed
|
||||
HasFailed,
|
||||
} from 'picsur-shared/dist/types';
|
||||
import { Sharp, SharpOptions } from 'sharp';
|
||||
import {
|
||||
|
@ -17,7 +17,7 @@ import {
|
|||
SharpWorkerRecieveMessage,
|
||||
SharpWorkerResultMessage,
|
||||
SharpWorkerSendMessage,
|
||||
SupportedSharpWorkerFunctions
|
||||
SupportedSharpWorkerFunctions,
|
||||
} from './sharp/sharp.message';
|
||||
import { SharpResult } from './sharp/universal-sharp';
|
||||
|
||||
|
@ -41,7 +41,11 @@ export class SharpWrapper {
|
|||
private readonly memory_limit: number,
|
||||
) {}
|
||||
|
||||
public async start(image: Buffer, filetype: FileType, sharpOptions?: SharpOptions): AsyncFailable<true> {
|
||||
public async start(
|
||||
image: Buffer,
|
||||
filetype: FileType,
|
||||
sharpOptions?: SharpOptions,
|
||||
): AsyncFailable<true> {
|
||||
this.worker = fork(SharpWrapper.WORKER_PATH, {
|
||||
serialization: 'advanced',
|
||||
timeout: this.instance_timeout,
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
SharpWorkerInitMessage,
|
||||
SharpWorkerOperationMessage,
|
||||
SharpWorkerRecieveMessage,
|
||||
SharpWorkerSendMessage
|
||||
SharpWorkerSendMessage,
|
||||
} from './sharp.message';
|
||||
import { UniversalSharpIn, UniversalSharpOut } from './universal-sharp';
|
||||
|
||||
|
@ -59,7 +59,11 @@ export class SharpWorker {
|
|||
}
|
||||
|
||||
this.startTime = Date.now();
|
||||
this.sharpi = UniversalSharpIn(message.image, message.filetype, message.options);
|
||||
this.sharpi = UniversalSharpIn(
|
||||
message.image,
|
||||
message.filetype,
|
||||
message.options,
|
||||
);
|
||||
}
|
||||
|
||||
private operation(message: SharpWorkerOperationMessage): void {
|
||||
|
|
|
@ -2,7 +2,7 @@ import { BMPdecode, BMPencode } from 'bmp-img';
|
|||
import {
|
||||
AnimFileType,
|
||||
FileType,
|
||||
ImageFileType
|
||||
ImageFileType,
|
||||
} from 'picsur-shared/dist/dto/mimes.dto';
|
||||
import { QOIdecode, QOIencode } from 'qoi-img';
|
||||
import sharp, { Sharp, SharpOptions } from 'sharp';
|
||||
|
|
|
@ -29,11 +29,14 @@
|
|||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": ["src/assets", {
|
||||
"glob": "**/*",
|
||||
"input": "../branding",
|
||||
"output": "./assets/branding"
|
||||
}],
|
||||
"assets": [
|
||||
"src/assets",
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../branding",
|
||||
"output": "./assets/branding"
|
||||
}
|
||||
],
|
||||
"styles": ["src/styles.scss"],
|
||||
"scripts": [],
|
||||
"allowedCommonJsDependencies": [
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import webpack from 'webpack';
|
||||
|
||||
export default {
|
||||
plugins: [
|
||||
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en/),
|
||||
],
|
||||
plugins: [new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en/)],
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
"reflect-metadata": "^0.1.13",
|
||||
"rxjs": "~7.5.6",
|
||||
"tslib": "^2.4.0",
|
||||
"zod": "^3.18.0",
|
||||
"zod": "^3.19.0",
|
||||
"zone.js": "~0.11.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -50,7 +50,7 @@
|
|||
"@fontsource/material-icons": "^4.5.4",
|
||||
"@fontsource/material-icons-outlined": "^4.5.4",
|
||||
"@fontsource/roboto": "^4.5.8",
|
||||
"@types/node": "^18.7.14",
|
||||
"@types/node": "^18.7.15",
|
||||
"@types/resize-observer-browser": "^0.1.7",
|
||||
"@types/validator": "^13.7.6",
|
||||
"typescript": "4.8.2"
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
ActivatedRoute,
|
||||
NavigationEnd,
|
||||
NavigationError,
|
||||
Router
|
||||
Router,
|
||||
} from '@angular/router';
|
||||
import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator';
|
||||
import { RouteTransitionAnimations } from './app.animation';
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
ChangeDetectorRef,
|
||||
Component,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator';
|
||||
import { InfoService } from 'src/app/services/api/info.service';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
EventEmitter,
|
||||
Input,
|
||||
OnInit,
|
||||
Output
|
||||
Output,
|
||||
} from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator';
|
||||
|
@ -31,7 +31,7 @@ export class HeaderComponent implements OnInit {
|
|||
private readonly userService: UserService,
|
||||
private readonly permissionService: PermissionService,
|
||||
private readonly changeDetector: ChangeDetectorRef,
|
||||
private readonly errorService: ErrorService
|
||||
private readonly errorService: ErrorService,
|
||||
) {}
|
||||
|
||||
@Input('enableHamburger') public set enableHamburger(value: boolean) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
Input,
|
||||
OnDestroy,
|
||||
QueryList,
|
||||
ViewChildren
|
||||
ViewChildren,
|
||||
} from '@angular/core';
|
||||
import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator';
|
||||
import { combineLatest, Subscription } from 'rxjs';
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
Input,
|
||||
OnChanges,
|
||||
SimpleChanges,
|
||||
ViewChild
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
import { FileType, ImageFileType } from 'picsur-shared/dist/dto/mimes.dto';
|
||||
import { AsyncFailable, HasFailed } from 'picsur-shared/dist/types';
|
||||
|
@ -88,8 +88,6 @@ export class PicsurImgComponent implements OnChanges {
|
|||
const result = await this.apiService.getBuffer(url);
|
||||
if (HasFailed(result)) return result;
|
||||
|
||||
|
||||
|
||||
const img = this.img.nativeElement;
|
||||
|
||||
const blob = new Blob([result.buffer]);
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Component, Input, OnInit } from '@angular/core';
|
|||
import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator';
|
||||
import {
|
||||
DecodedPref,
|
||||
PrefValueType
|
||||
PrefValueType,
|
||||
} from 'picsur-shared/dist/dto/preferences.dto';
|
||||
import { AsyncFailable, HasFailed } from 'picsur-shared/dist/types';
|
||||
import { Subject } from 'rxjs';
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
CanActivate,
|
||||
CanActivateChild,
|
||||
Router,
|
||||
RouterStateSnapshot
|
||||
RouterStateSnapshot,
|
||||
} from '@angular/router';
|
||||
import { isPermissionsArray } from 'picsur-shared/dist/validators/permissions.validator';
|
||||
import { PRouteData } from '../models/dto/picsur-routes.dto';
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
CreatePasswordError,
|
||||
CreateUsernameError,
|
||||
PasswordValidators,
|
||||
UsernameValidators
|
||||
UsernameValidators,
|
||||
} from '../validators/user.validator';
|
||||
|
||||
export class LoginControl {
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
CreatePasswordError,
|
||||
CreateUsernameError,
|
||||
PasswordValidators,
|
||||
UsernameValidators
|
||||
UsernameValidators,
|
||||
} from '../validators/user.validator';
|
||||
|
||||
export class RegisterControl {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div *ngFor="let image of images" class="m-2" masonry-item>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>{{image.file_name | truncate}}</mat-card-title>
|
||||
<mat-card-title>{{ image.file_name | truncate }}</mat-card-title>
|
||||
<mat-card-subtitle>
|
||||
Uploaded {{ image.created | amTimeAgo }}
|
||||
</mat-card-subtitle>
|
||||
|
|
|
@ -30,8 +30,7 @@ export class ProcessingComponent implements OnInit {
|
|||
history.replaceState(null, '');
|
||||
|
||||
const id = await this.imageService.UploadImage(state.imageFile);
|
||||
if (HasFailed(id))
|
||||
return this.errorService.quitFailure(id, this.logger);
|
||||
if (HasFailed(id)) return this.errorService.quitFailure(id, this.logger);
|
||||
|
||||
this.router.navigate([`/view/`, id], { replaceUrl: true });
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<mat-form-field class="editfield" appearance="outline">
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput [formControl]="field" (change)="update($event)">
|
||||
<mat-error *ngIf="field.invalid">{{getErrorMessage()}}</mat-error>
|
||||
<input matInput [formControl]="field" (change)="update($event)" />
|
||||
<mat-error *ngIf="field.invalid">{{ getErrorMessage() }}</mat-error>
|
||||
</mat-form-field>
|
||||
|
|
|
@ -4,7 +4,7 @@ mat-table {
|
|||
|
||||
.mat-column-actions {
|
||||
justify-content: end;
|
||||
flex-grow: .5;
|
||||
flex-grow: 0.5;
|
||||
}
|
||||
|
||||
.mat-column-key {
|
||||
|
|
|
@ -159,9 +159,9 @@ export class SettingsApiKeysComponent implements OnInit {
|
|||
pageIndex,
|
||||
this.userService.snapshot?.id,
|
||||
);
|
||||
if (HasFailed(response)){
|
||||
this.errorService.showFailure(response, this.logger);
|
||||
return false;
|
||||
if (HasFailed(response)) {
|
||||
this.errorService.showFailure(response, this.logger);
|
||||
return false;
|
||||
}
|
||||
|
||||
this.dataSubject.next(response.results);
|
||||
|
|
|
@ -86,7 +86,8 @@ export class SettingsShareXComponent implements OnInit {
|
|||
50,
|
||||
Math.floor(this.loaded / 50),
|
||||
);
|
||||
if (HasFailed(newApiKeys)) return this.errorService.showFailure(newApiKeys, this.logger);
|
||||
if (HasFailed(newApiKeys))
|
||||
return this.errorService.showFailure(newApiKeys, this.logger);
|
||||
this.loaded += newApiKeys.results.length;
|
||||
this.available = newApiKeys.total;
|
||||
|
||||
|
|
|
@ -36,4 +36,3 @@ a {
|
|||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<div class="container centered">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>{{ image?.file_name ?? "image" | truncate }} uploaded by {{ imageUser?.username }}</h1>
|
||||
<h1>
|
||||
{{ image?.file_name ?? 'image' | truncate }} uploaded by
|
||||
{{ imageUser?.username }}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-12" *ngIf="image !== null">
|
||||
|
@ -62,7 +65,12 @@
|
|||
<button mat-mini-fab matTooltip="Share image" (click)="share()">
|
||||
<mat-icon fontSet="material-icons-outlined"> share </mat-icon>
|
||||
</button>
|
||||
<button *ngIf="canDelete" mat-mini-fab matTooltip="Delete image" (click)="deleteImage()">
|
||||
<button
|
||||
*ngIf="canDelete"
|
||||
mat-mini-fab
|
||||
matTooltip="Delete image"
|
||||
(click)="deleteImage()"
|
||||
>
|
||||
<mat-icon fontSet="material-icons-outlined"> delete </mat-icon>
|
||||
</button>
|
||||
</speed-dial>
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
AnimFileType,
|
||||
FileType,
|
||||
ImageFileType,
|
||||
SupportedFileTypeCategory
|
||||
SupportedFileTypeCategory,
|
||||
} from 'picsur-shared/dist/dto/mimes.dto';
|
||||
import { Permission } from 'picsur-shared/dist/dto/permissions.enum';
|
||||
|
||||
|
@ -26,7 +26,7 @@ import { UtilService } from 'src/app/util/util.service';
|
|||
|
||||
import {
|
||||
CustomizeDialogComponent,
|
||||
CustomizeDialogData
|
||||
CustomizeDialogData,
|
||||
} from './customize-dialog/customize-dialog.component';
|
||||
|
||||
@Component({
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
Fail,
|
||||
FT,
|
||||
HasFailed,
|
||||
HasSuccess
|
||||
HasSuccess,
|
||||
} from 'picsur-shared/dist/types';
|
||||
import { ZodDtoStatic } from 'picsur-shared/dist/util/create-zod-dto';
|
||||
import { ParseMime2FileType } from 'picsur-shared/dist/util/parse-mime';
|
||||
|
|
|
@ -4,11 +4,11 @@ import {
|
|||
ImageDeleteResponse,
|
||||
ImageListRequest,
|
||||
ImageListResponse,
|
||||
ImageUploadResponse
|
||||
ImageUploadResponse,
|
||||
} from 'picsur-shared/dist/dto/api/image-manage.dto';
|
||||
import {
|
||||
ImageMetaResponse,
|
||||
ImageRequestParams
|
||||
ImageRequestParams,
|
||||
} from 'picsur-shared/dist/dto/api/image.dto';
|
||||
import { ImageLinks } from 'picsur-shared/dist/dto/image-links.class';
|
||||
import { FileType2Ext } from 'picsur-shared/dist/dto/mimes.dto';
|
||||
|
@ -19,7 +19,7 @@ import {
|
|||
FT,
|
||||
HasFailed,
|
||||
HasSuccess,
|
||||
Open
|
||||
Open,
|
||||
} from 'picsur-shared/dist/types/failable';
|
||||
import { UtilService } from 'src/app/util/util.service';
|
||||
import { ImageUploadRequest } from '../../models/dto/image-upload-request.dto';
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
RoleInfoResponse,
|
||||
RoleListResponse,
|
||||
RoleUpdateRequest,
|
||||
RoleUpdateResponse
|
||||
RoleUpdateResponse,
|
||||
} from 'picsur-shared/dist/dto/api/roles.dto';
|
||||
import { ERole } from 'picsur-shared/dist/entities/role.entity';
|
||||
import { AsyncFailable, Open } from 'picsur-shared/dist/types';
|
||||
|
|
|
@ -4,19 +4,19 @@ import {
|
|||
GetPreferenceResponse,
|
||||
MultiplePreferencesResponse,
|
||||
UpdatePreferenceRequest,
|
||||
UpdatePreferenceResponse
|
||||
UpdatePreferenceResponse,
|
||||
} from 'picsur-shared/dist/dto/api/pref.dto';
|
||||
import { Permission } from 'picsur-shared/dist/dto/permissions.enum';
|
||||
import {
|
||||
DecodedPref,
|
||||
PrefValueType
|
||||
PrefValueType,
|
||||
} from 'picsur-shared/dist/dto/preferences.dto';
|
||||
import {
|
||||
AsyncFailable,
|
||||
Fail,
|
||||
FT,
|
||||
HasFailed,
|
||||
Map
|
||||
Map,
|
||||
} from 'picsur-shared/dist/types';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { ErrorService } from 'src/app/util/error-manager/error.service';
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
UserListRequest,
|
||||
UserListResponse,
|
||||
UserUpdateRequest,
|
||||
UserUpdateResponse
|
||||
UserUpdateResponse,
|
||||
} from 'picsur-shared/dist/dto/api/user-manage.dto';
|
||||
import { EUser } from 'picsur-shared/dist/entities/user.entity';
|
||||
import { AsyncFailable } from 'picsur-shared/dist/types';
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
UserLoginResponse,
|
||||
UserMeResponse,
|
||||
UserRegisterRequest,
|
||||
UserRegisterResponse
|
||||
UserRegisterResponse,
|
||||
} from 'picsur-shared/dist/dto/api/user.dto';
|
||||
import { JwtDataSchema } from 'picsur-shared/dist/dto/jwt.dto';
|
||||
import { EUser } from 'picsur-shared/dist/entities/user.entity';
|
||||
|
@ -16,7 +16,7 @@ import {
|
|||
Fail,
|
||||
FT,
|
||||
HasFailed,
|
||||
Open
|
||||
Open,
|
||||
} from 'picsur-shared/dist/types';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { Logger } from '../logger/logger.service';
|
||||
|
|
|
@ -4,19 +4,19 @@ import {
|
|||
GetPreferenceResponse,
|
||||
MultiplePreferencesResponse,
|
||||
UpdatePreferenceRequest,
|
||||
UpdatePreferenceResponse
|
||||
UpdatePreferenceResponse,
|
||||
} from 'picsur-shared/dist/dto/api/pref.dto';
|
||||
import { Permission } from 'picsur-shared/dist/dto/permissions.enum';
|
||||
import {
|
||||
DecodedPref,
|
||||
PrefValueType
|
||||
PrefValueType,
|
||||
} from 'picsur-shared/dist/dto/preferences.dto';
|
||||
import {
|
||||
AsyncFailable,
|
||||
Fail,
|
||||
FT,
|
||||
HasFailed,
|
||||
Map
|
||||
Map,
|
||||
} from 'picsur-shared/dist/types';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { ErrorService } from 'src/app/util/error-manager/error.service';
|
||||
|
|
|
@ -2,7 +2,10 @@ import { ComponentType } from '@angular/cdk/portal';
|
|||
import { Injectable } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { Logger } from 'src/app/services/logger/logger.service';
|
||||
import { ConfirmDialogComponent, ConfirmDialogData } from './confirm-dialog/confirm-dialog.component';
|
||||
import {
|
||||
ConfirmDialogComponent,
|
||||
ConfirmDialogData,
|
||||
} from './confirm-dialog/confirm-dialog.component';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'any',
|
||||
|
@ -10,9 +13,7 @@ import { ConfirmDialogComponent, ConfirmDialogData } from './confirm-dialog/conf
|
|||
export class DialogService {
|
||||
private readonly logger = new Logger(DialogService.name);
|
||||
|
||||
constructor(
|
||||
private readonly dialog: MatDialog,
|
||||
) {}
|
||||
constructor(private readonly dialog: MatDialog) {}
|
||||
|
||||
public async showCustomDialog<T>(
|
||||
component: ComponentType<T>,
|
||||
|
|
|
@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common';
|
|||
import { ModuleWithProviders, NgModule } from '@angular/core';
|
||||
import {
|
||||
MatSnackBarModule,
|
||||
MAT_SNACK_BAR_DEFAULT_OPTIONS
|
||||
MAT_SNACK_BAR_DEFAULT_OPTIONS,
|
||||
} from '@angular/material/snack-bar';
|
||||
import { SnackBarService } from './snackbar.service';
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import { Inject, Injectable } from '@angular/core';
|
||||
import { LOCATION } from '@ng-web-apis/common';
|
||||
import { FileType2Ext, SupportedFileTypes } from 'picsur-shared/dist/dto/mimes.dto';
|
||||
import {
|
||||
FileType2Ext,
|
||||
SupportedFileTypes,
|
||||
} from 'picsur-shared/dist/dto/mimes.dto';
|
||||
import { HasFailed } from 'picsur-shared/dist/types';
|
||||
import { Logger } from '../services/logger/logger.service';
|
||||
|
||||
|
@ -22,9 +25,7 @@ export class UtilService {
|
|||
filetype: string = 'application/octet-stream',
|
||||
) {
|
||||
const a = document.createElement('a');
|
||||
a.href = URL.createObjectURL(
|
||||
new Blob([buffer], { type: filetype }),
|
||||
);
|
||||
a.href = URL.createObjectURL(new Blob([buffer], { type: filetype }));
|
||||
a.download = filename;
|
||||
a.target = '_self';
|
||||
a.click();
|
||||
|
|
|
@ -10,10 +10,6 @@
|
|||
"lib": ["es2020", "dom"]
|
||||
},
|
||||
"files": ["src/main.ts", "src/polyfills.ts"],
|
||||
"include": [
|
||||
"src/**/*.d.ts",
|
||||
"src/app/**/*.ts",
|
||||
"src/app/**/*.html",
|
||||
],
|
||||
"include": ["src/**/*.d.ts", "src/app/**/*.ts", "src/app/**/*.html"],
|
||||
"exclude": ["src/**/*.worker.ts", "src/**/*.exclude.ts"]
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true,
|
||||
"enableIvy": true,
|
||||
|
||||
"enableIvy": true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,12 +14,13 @@
|
|||
"build": "./support/build.sh",
|
||||
"setversion": "./support/setversion.sh",
|
||||
"purge": "rm -rf ./node_modules",
|
||||
"purge-all": "./support/purge-all.sh"
|
||||
"purge-all": "./support/purge-all.sh",
|
||||
"format": "prettier --write ."
|
||||
},
|
||||
"resolutions": {
|
||||
"fastify": "^4.5.2",
|
||||
"terser": "^5.14.2",
|
||||
"typeorm": "^0.3.9",
|
||||
"fastify": ">=4.5.2",
|
||||
"terser": ">=5.14.2",
|
||||
"typeorm": ">=0.3.9",
|
||||
"typescript": "4.7.4",
|
||||
"fastify-static": "npm:@fastify/static@*",
|
||||
"fastify-formbody": "npm:@fastify/formbody@*",
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
"main": "./dist/index.js",
|
||||
"dependencies": {
|
||||
"tsc-watch": "^5.0.3",
|
||||
"zod": "^3.18.0"
|
||||
"zod": "^3.19.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.7.14",
|
||||
"@types/node": "^18.7.15",
|
||||
"typescript": "4.8.2"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
@ -4,7 +4,7 @@ import {
|
|||
Mime2FileType,
|
||||
SupportedAnimFileTypes,
|
||||
SupportedFileTypeCategory,
|
||||
SupportedImageFileTypes
|
||||
SupportedImageFileTypes,
|
||||
} from '../dto/mimes.dto';
|
||||
import { Fail, Failable, FT, HasFailed } from '../types';
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
PACKAGE_URL="ghcr.io/rubikscraft/picsur"
|
||||
|
||||
if [ "$1" == "alpha" ]; then
|
||||
PACKAGE_URL="$PACKAGE_URL-alpha"
|
||||
PACKAGE_URL="$PACKAGE_URL-alpha"
|
||||
elif [ "$1" == "stable" ]; then
|
||||
true;
|
||||
true
|
||||
else
|
||||
echo "Usage: $0 [alpha|stable]"
|
||||
exit 1
|
||||
echo "Usage: $0 [alpha|stable]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Go to this script
|
||||
|
|
294
yarn.lock
294
yarn.lock
|
@ -176,24 +176,6 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@angular-devkit/core@npm:14.2.0":
|
||||
version: 14.2.0
|
||||
resolution: "@angular-devkit/core@npm:14.2.0"
|
||||
dependencies:
|
||||
ajv: 8.11.0
|
||||
ajv-formats: 2.1.1
|
||||
jsonc-parser: 3.1.0
|
||||
rxjs: 6.6.7
|
||||
source-map: 0.7.4
|
||||
peerDependencies:
|
||||
chokidar: ^3.5.2
|
||||
peerDependenciesMeta:
|
||||
chokidar:
|
||||
optional: true
|
||||
checksum: 32de43e3a1ad743d525a915231d2bd6e115cacf0654974f65e97fd0ee603098e8125f192beebf4937a8a35aa3433bd504805252c1e89c25ac2f8e249555332be
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@angular-devkit/core@npm:14.2.1, @angular-devkit/core@npm:^14.0.0":
|
||||
version: 14.2.1
|
||||
resolution: "@angular-devkit/core@npm:14.2.1"
|
||||
|
@ -212,19 +194,19 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@angular-devkit/schematics-cli@npm:14.2.0":
|
||||
version: 14.2.0
|
||||
resolution: "@angular-devkit/schematics-cli@npm:14.2.0"
|
||||
"@angular-devkit/schematics-cli@npm:14.2.1":
|
||||
version: 14.2.1
|
||||
resolution: "@angular-devkit/schematics-cli@npm:14.2.1"
|
||||
dependencies:
|
||||
"@angular-devkit/core": 14.2.0
|
||||
"@angular-devkit/schematics": 14.2.0
|
||||
"@angular-devkit/core": 14.2.1
|
||||
"@angular-devkit/schematics": 14.2.1
|
||||
ansi-colors: 4.1.3
|
||||
inquirer: 8.2.4
|
||||
symbol-observable: 4.0.0
|
||||
yargs-parser: 21.1.1
|
||||
bin:
|
||||
schematics: bin/schematics.js
|
||||
checksum: 6890eebebece7e150730000ce1f0dd488a98594765afee4779920211dabf6d6deed180e6aa1beb41f3a604788676a917febaac18bdfd1dced016b7a60ad46c27
|
||||
checksum: 54c54ad332f3f3e966026f54ea48bb8a965fa8a3133fd8808e090fbde01e53223229de31a9ab97fa7f01cdd2f34991c2c6885549bd8b867f559a4dc54e860147
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -241,19 +223,6 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@angular-devkit/schematics@npm:14.2.0":
|
||||
version: 14.2.0
|
||||
resolution: "@angular-devkit/schematics@npm:14.2.0"
|
||||
dependencies:
|
||||
"@angular-devkit/core": 14.2.0
|
||||
jsonc-parser: 3.1.0
|
||||
magic-string: 0.26.2
|
||||
ora: 5.4.1
|
||||
rxjs: 6.6.7
|
||||
checksum: 55d1195ba03318c67213122687fabf4dfa6e895f2f64b6a0814050329c3f5eb0029f977f2a5e8269e8f583d3d732ca791b0b2ec38e3b86f81a546be6d58a0f02
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@angular-devkit/schematics@npm:14.2.1":
|
||||
version: 14.2.1
|
||||
resolution: "@angular-devkit/schematics@npm:14.2.1"
|
||||
|
@ -2327,9 +2296,9 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@fastify/multipart@npm:^7.1.1":
|
||||
version: 7.1.1
|
||||
resolution: "@fastify/multipart@npm:7.1.1"
|
||||
"@fastify/multipart@npm:^7.1.2":
|
||||
version: 7.1.2
|
||||
resolution: "@fastify/multipart@npm:7.1.2"
|
||||
dependencies:
|
||||
"@fastify/busboy": ^1.0.0
|
||||
"@fastify/deepmerge": ^1.0.0
|
||||
|
@ -2339,7 +2308,7 @@ __metadata:
|
|||
hexoid: ^1.0.0
|
||||
secure-json-parse: ^2.4.0
|
||||
stream-wormhole: ^1.1.0
|
||||
checksum: f3d17fd1add75f362ad2ce7d0ef0d2bb4de1a2640a6201c40e267d1ff647f59522e1ad4eaf84d44df1dd9adcdefd6aabbe6095b9334421cea0e8155d8456e924
|
||||
checksum: c65c51fcd5eb8762aa780b5078b6ad1b3e215968a3926b91ae572ee67b287a0c955a87ed6f02a98994527ee2130cf42ee7f3e48645bc65991b8173f1367fabfb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -2536,13 +2505,13 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@nestjs/cli@npm:^9.1.1":
|
||||
version: 9.1.1
|
||||
resolution: "@nestjs/cli@npm:9.1.1"
|
||||
"@nestjs/cli@npm:^9.1.2":
|
||||
version: 9.1.2
|
||||
resolution: "@nestjs/cli@npm:9.1.2"
|
||||
dependencies:
|
||||
"@angular-devkit/core": 14.2.0
|
||||
"@angular-devkit/schematics": 14.2.0
|
||||
"@angular-devkit/schematics-cli": 14.2.0
|
||||
"@angular-devkit/core": 14.2.1
|
||||
"@angular-devkit/schematics": 14.2.1
|
||||
"@angular-devkit/schematics-cli": 14.2.1
|
||||
"@nestjs/schematics": ^9.0.0
|
||||
chalk: 3.0.0
|
||||
chokidar: 3.5.3
|
||||
|
@ -2560,11 +2529,11 @@ __metadata:
|
|||
tsconfig-paths: 4.1.0
|
||||
tsconfig-paths-webpack-plugin: 4.0.0
|
||||
typescript: 4.7.4
|
||||
webpack: 5.73.0
|
||||
webpack: 5.74.0
|
||||
webpack-node-externals: 3.0.0
|
||||
bin:
|
||||
nest: bin/nest.js
|
||||
checksum: a1012aa9484a74c2fe2fe51ddc17a613749aab15432df8c001df6a70e42e02a51a590278e0127bc715a22f6bcb88db310a054dd566dca40eb0bd60f9c32cb214
|
||||
checksum: 3a4fffd874c43dd4fded929f3f4f7c2d0e28262fb314b0ca400c71ab805365565e854b6fdc9f8c8b144df170de962ed8e8c4f90844491d24b8101fffa4ae7ce0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -2699,9 +2668,9 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@nestjs/schematics@npm:^9.0.2":
|
||||
version: 9.0.2
|
||||
resolution: "@nestjs/schematics@npm:9.0.2"
|
||||
"@nestjs/schematics@npm:^9.0.3":
|
||||
version: 9.0.3
|
||||
resolution: "@nestjs/schematics@npm:9.0.3"
|
||||
dependencies:
|
||||
"@angular-devkit/core": 14.2.1
|
||||
"@angular-devkit/schematics": 14.2.1
|
||||
|
@ -2710,7 +2679,7 @@ __metadata:
|
|||
pluralize: 8.0.0
|
||||
peerDependencies:
|
||||
typescript: ^4.3.5
|
||||
checksum: 2b324cd590de14e101b21e14e889fee37eba7a9920fcce1acac4597af54b0789fbbd90c1189b401ce6898d0d1b8ad4301ac73d92c263c5ac8a9657c4db06e819
|
||||
checksum: 8439f211f1df75e60092a730d62cfeb22b9d51c864a2740ca8723a5e64284fe63375152b430f4c7d7f54d6f6deedea905d4769f864fe64fa0ce90ea1f4683fbe
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -3187,10 +3156,10 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:^18.7.14":
|
||||
version: 18.7.14
|
||||
resolution: "@types/node@npm:18.7.14"
|
||||
checksum: 99cf28ff854100158de875cca23c7acc3cc01dfee526a52b90b7f36767c821bcbaf2be0a98a70f06f3b78f3c60639168ff949d725b61e2e124f9f71f1fb8043d
|
||||
"@types/node@npm:^18.7.15":
|
||||
version: 18.7.15
|
||||
resolution: "@types/node@npm:18.7.15"
|
||||
checksum: 1435fc7fe44744467a3ba8ace646455be228516530dbb3db64a03cca6abcfdc5ba2e48a3eafc71f25f836d2ca871132361c58a5e760237a53674cb09151147d9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -3352,13 +3321,13 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/eslint-plugin@npm:^5.36.1":
|
||||
version: 5.36.1
|
||||
resolution: "@typescript-eslint/eslint-plugin@npm:5.36.1"
|
||||
"@typescript-eslint/eslint-plugin@npm:^5.36.2":
|
||||
version: 5.36.2
|
||||
resolution: "@typescript-eslint/eslint-plugin@npm:5.36.2"
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager": 5.36.1
|
||||
"@typescript-eslint/type-utils": 5.36.1
|
||||
"@typescript-eslint/utils": 5.36.1
|
||||
"@typescript-eslint/scope-manager": 5.36.2
|
||||
"@typescript-eslint/type-utils": 5.36.2
|
||||
"@typescript-eslint/utils": 5.36.2
|
||||
debug: ^4.3.4
|
||||
functional-red-black-tree: ^1.0.1
|
||||
ignore: ^5.2.0
|
||||
|
@ -3371,43 +3340,43 @@ __metadata:
|
|||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
checksum: a4c555688d840c3ff0d3d71ceca583291e206cc523eade45c56fb8e1c8af84ae50ef8d344cdf8e3f9c38f430bc03c95eb8d49870094e0e5b57e0fa3e61c0ec91
|
||||
checksum: edcd9fcecdeb22a689b421cafe3b7adc859bf2fd6227aecdd7412c319c808e7bab063c8f94af32116cfc971962f9780d181cb0a4aa999951c2d2be1f84c6c376
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/parser@npm:^5.36.1":
|
||||
version: 5.36.1
|
||||
resolution: "@typescript-eslint/parser@npm:5.36.1"
|
||||
"@typescript-eslint/parser@npm:^5.36.2":
|
||||
version: 5.36.2
|
||||
resolution: "@typescript-eslint/parser@npm:5.36.2"
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager": 5.36.1
|
||||
"@typescript-eslint/types": 5.36.1
|
||||
"@typescript-eslint/typescript-estree": 5.36.1
|
||||
"@typescript-eslint/scope-manager": 5.36.2
|
||||
"@typescript-eslint/types": 5.36.2
|
||||
"@typescript-eslint/typescript-estree": 5.36.2
|
||||
debug: ^4.3.4
|
||||
peerDependencies:
|
||||
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
checksum: 0f0f94e56ae1d55b6e7223ce5a2b0c93e5cc082ef2951a2b24ae4b22bb8ffbeb90d2d16682bfa8bc972ba2c7fb4703aedd79b7dbd09bcee397e1ab90d11506d9
|
||||
checksum: d6cc22cbc7aacb5ecebf55eb1d681cb6b964b108e147b418295c3e48701a77768cff128c16da421ae50eabb9f1296ecec7fa3cc5f2ccb63a3febf79f98b4195f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/scope-manager@npm:5.36.1":
|
||||
version: 5.36.1
|
||||
resolution: "@typescript-eslint/scope-manager@npm:5.36.1"
|
||||
"@typescript-eslint/scope-manager@npm:5.36.2":
|
||||
version: 5.36.2
|
||||
resolution: "@typescript-eslint/scope-manager@npm:5.36.2"
|
||||
dependencies:
|
||||
"@typescript-eslint/types": 5.36.1
|
||||
"@typescript-eslint/visitor-keys": 5.36.1
|
||||
checksum: c46497226af75baed7458838ec0bfbddf19f8084115d78b915b46a8ceb4c05619ac61da127dfd3c8ee11bc916896d57bf8b9f936b0306ce69658160f910e3ad0
|
||||
"@typescript-eslint/types": 5.36.2
|
||||
"@typescript-eslint/visitor-keys": 5.36.2
|
||||
checksum: 93ff655f7c237c88ec6dc5911202dd8f81bd8909b27f1a758a9d77e9791040f1ee6fe2891314bde75c808ce586246e98003a1b1396937b0312f2440016dea751
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/type-utils@npm:5.36.1":
|
||||
version: 5.36.1
|
||||
resolution: "@typescript-eslint/type-utils@npm:5.36.1"
|
||||
"@typescript-eslint/type-utils@npm:5.36.2":
|
||||
version: 5.36.2
|
||||
resolution: "@typescript-eslint/type-utils@npm:5.36.2"
|
||||
dependencies:
|
||||
"@typescript-eslint/typescript-estree": 5.36.1
|
||||
"@typescript-eslint/utils": 5.36.1
|
||||
"@typescript-eslint/typescript-estree": 5.36.2
|
||||
"@typescript-eslint/utils": 5.36.2
|
||||
debug: ^4.3.4
|
||||
tsutils: ^3.21.0
|
||||
peerDependencies:
|
||||
|
@ -3415,23 +3384,23 @@ __metadata:
|
|||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
checksum: d2905289e253a83a9eacbad765cfba03440663086c8beb1b19345b46593c9053fb051ee13d3cc27ccd800fe95ffbf3be2b1273b0f0ac6a59452fc94e6460898b
|
||||
checksum: c202b7d2cd08ed7f7d1ad7e430e9e1596478e147f0d485d02babfda0211c55fa950de1dc4d1c950008a8a047a31c1e982e97fe5558f93d496830eb9d9532bc71
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/types@npm:5.36.1":
|
||||
version: 5.36.1
|
||||
resolution: "@typescript-eslint/types@npm:5.36.1"
|
||||
checksum: 10c8965c64e16bc6920dc0c62aae2b139062aca945d03df2ad6fe7c299d2faa684621d571f8d9807a67643d4e9fa5217c69d5f538f9936fc757f9df5ded57623
|
||||
"@typescript-eslint/types@npm:5.36.2":
|
||||
version: 5.36.2
|
||||
resolution: "@typescript-eslint/types@npm:5.36.2"
|
||||
checksum: 736cb8a76b58f2f9a7d066933094c5510ffe31479ea8b804a829ec85942420f1b55e0eb2688fbdaaaa9c0e5b3b590fb8f14bbd745353696b4fd33fda620d417b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/typescript-estree@npm:5.36.1":
|
||||
version: 5.36.1
|
||||
resolution: "@typescript-eslint/typescript-estree@npm:5.36.1"
|
||||
"@typescript-eslint/typescript-estree@npm:5.36.2":
|
||||
version: 5.36.2
|
||||
resolution: "@typescript-eslint/typescript-estree@npm:5.36.2"
|
||||
dependencies:
|
||||
"@typescript-eslint/types": 5.36.1
|
||||
"@typescript-eslint/visitor-keys": 5.36.1
|
||||
"@typescript-eslint/types": 5.36.2
|
||||
"@typescript-eslint/visitor-keys": 5.36.2
|
||||
debug: ^4.3.4
|
||||
globby: ^11.1.0
|
||||
is-glob: ^4.0.3
|
||||
|
@ -3440,33 +3409,33 @@ __metadata:
|
|||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
checksum: acaf2938001673918dbbe690a353cf92e2cfabc79f74cd5946e303a8c24eb9c08ae2053dd261810ed0c9c471ebe879f386564c1b01dd2504dc84f4ce5f4dc696
|
||||
checksum: 2827ff57a114b6107ea6d555f3855007133b08a7c2bafba0cfa0c935d8b99fd7b49e982d48cccc1c5ba550d95748d0239f5e2109893f12a165d76ed64a0d261b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/utils@npm:5.36.1":
|
||||
version: 5.36.1
|
||||
resolution: "@typescript-eslint/utils@npm:5.36.1"
|
||||
"@typescript-eslint/utils@npm:5.36.2":
|
||||
version: 5.36.2
|
||||
resolution: "@typescript-eslint/utils@npm:5.36.2"
|
||||
dependencies:
|
||||
"@types/json-schema": ^7.0.9
|
||||
"@typescript-eslint/scope-manager": 5.36.1
|
||||
"@typescript-eslint/types": 5.36.1
|
||||
"@typescript-eslint/typescript-estree": 5.36.1
|
||||
"@typescript-eslint/scope-manager": 5.36.2
|
||||
"@typescript-eslint/types": 5.36.2
|
||||
"@typescript-eslint/typescript-estree": 5.36.2
|
||||
eslint-scope: ^5.1.1
|
||||
eslint-utils: ^3.0.0
|
||||
peerDependencies:
|
||||
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
|
||||
checksum: 77853d526af86ac508d7938916046ed4ad6374c7414981064c5122a2baa96fa234751137f481ac264a07387fd4dcec1cd26b33e29732cc58e855aae77a001d7c
|
||||
checksum: 45356cf55a8733e3ab1f2c3c19cdaefdb79857e35eb1433c29b81f3df071e9cef8a286bc407abe243889a21d9e793e999f92f03b9c727a0fac1c17a48e64c42a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/visitor-keys@npm:5.36.1":
|
||||
version: 5.36.1
|
||||
resolution: "@typescript-eslint/visitor-keys@npm:5.36.1"
|
||||
"@typescript-eslint/visitor-keys@npm:5.36.2":
|
||||
version: 5.36.2
|
||||
resolution: "@typescript-eslint/visitor-keys@npm:5.36.2"
|
||||
dependencies:
|
||||
"@typescript-eslint/types": 5.36.1
|
||||
"@typescript-eslint/types": 5.36.2
|
||||
eslint-visitor-keys: ^3.3.0
|
||||
checksum: 45ab7c2fd455a8e4beff418bed6c9e7e1f9f66bcaad3bfaed868f97a3f8cfec1fa4faa45948af1a1c32ce573a7b1c6d10427119c257622445b06b488fefd8b49
|
||||
checksum: 87ccdcfa5cdedaa3a1aac30d656969f4f5910b62bcaacdf80a514dbf0cbbd8e79b55f8e987eab34cc79ece8ce4b8c19d5caf8b0afb74e0b0d7ab39fb29aa8eba
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -3799,7 +3768,7 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ajv@npm:8.11.0, ajv@npm:^8.0.0, ajv@npm:^8.1.0, ajv@npm:^8.10.0, ajv@npm:^8.8.0":
|
||||
"ajv@npm:8.11.0, ajv@npm:^8.0.0, ajv@npm:^8.10.0, ajv@npm:^8.8.0":
|
||||
version: 8.11.0
|
||||
resolution: "ajv@npm:8.11.0"
|
||||
dependencies:
|
||||
|
@ -5272,7 +5241,7 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.7.0, enhanced-resolve@npm:^5.9.3":
|
||||
"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.7.0":
|
||||
version: 5.9.3
|
||||
resolution: "enhanced-resolve@npm:5.9.3"
|
||||
dependencies:
|
||||
|
@ -6008,9 +5977,9 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fastify@npm:^4.5.2":
|
||||
version: 4.5.2
|
||||
resolution: "fastify@npm:4.5.2"
|
||||
"fastify@npm:>=4.5.2":
|
||||
version: 4.5.3
|
||||
resolution: "fastify@npm:4.5.3"
|
||||
dependencies:
|
||||
"@fastify/ajv-compiler": ^3.1.1
|
||||
"@fastify/error": ^3.0.0
|
||||
|
@ -6018,7 +5987,7 @@ __metadata:
|
|||
abstract-logging: ^2.0.1
|
||||
avvio: ^8.1.3
|
||||
find-my-way: ^7.0.0
|
||||
light-my-request: ^5.0.0
|
||||
light-my-request: ^5.5.1
|
||||
pino: ^8.0.0
|
||||
process-warning: ^2.0.0
|
||||
proxy-addr: ^2.0.7
|
||||
|
@ -6026,7 +5995,7 @@ __metadata:
|
|||
secure-json-parse: ^2.4.0
|
||||
semver: ^7.3.7
|
||||
tiny-lru: ^8.0.2
|
||||
checksum: 9067d4f176f2c7597546bd5d3e375a207f2a22738898b450f8fa322955f6f8eff1e317ee5d92727424677906ab27e581bec88d026f95fc8e04409146ea3c868f
|
||||
checksum: 2c5b1d10ced5517a443127146986ffe7100c2e964fba67b4521361d2d26173faf109f2d7b060dd09beec54e04abe67280b3070728a2fd1cf4cb8d8d543873aff
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -7447,15 +7416,14 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"light-my-request@npm:^5.0.0":
|
||||
version: 5.0.0
|
||||
resolution: "light-my-request@npm:5.0.0"
|
||||
"light-my-request@npm:^5.5.1":
|
||||
version: 5.5.1
|
||||
resolution: "light-my-request@npm:5.5.1"
|
||||
dependencies:
|
||||
ajv: ^8.1.0
|
||||
cookie: ^0.5.0
|
||||
process-warning: ^1.0.0
|
||||
process-warning: ^2.0.0
|
||||
set-cookie-parser: ^2.4.1
|
||||
checksum: 55b493658ee8a36f27026c27c58594761a64228e37e4d4fb44f0e8300ca6d4beb12bbfb27b42993b78c4dffc4952a20d7c372dff680ad9e6516db3deaaacbb96
|
||||
checksum: 100f11fe91470dcbf1cd610100055ea658afa3099a99ae134cb3aa7e299cb22a75d37ed1f9f2a1eb0dbd7460f71b75c458497e66af2bc98d245f848b0235f6d5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -8977,16 +8945,16 @@ __metadata:
|
|||
resolution: "picsur-backend@workspace:backend"
|
||||
dependencies:
|
||||
"@fastify/helmet": ^10.0.0
|
||||
"@fastify/multipart": ^7.1.1
|
||||
"@fastify/multipart": ^7.1.2
|
||||
"@fastify/static": ^6.5.0
|
||||
"@nestjs/cli": ^9.1.1
|
||||
"@nestjs/cli": ^9.1.2
|
||||
"@nestjs/common": ^9.0.11
|
||||
"@nestjs/config": ^2.2.0
|
||||
"@nestjs/core": ^9.0.11
|
||||
"@nestjs/jwt": ^9.0.0
|
||||
"@nestjs/passport": ^9.0.0
|
||||
"@nestjs/platform-fastify": ^9.0.11
|
||||
"@nestjs/schematics": ^9.0.2
|
||||
"@nestjs/schematics": ^9.0.3
|
||||
"@nestjs/serve-static": ^3.0.0
|
||||
"@nestjs/testing": ^9.0.11
|
||||
"@nestjs/typeorm": ^9.0.1
|
||||
|
@ -8994,14 +8962,14 @@ __metadata:
|
|||
"@types/cors": ^2.8.12
|
||||
"@types/ms": ^0.7.31
|
||||
"@types/multer": ^1.4.7
|
||||
"@types/node": ^18.7.14
|
||||
"@types/node": ^18.7.15
|
||||
"@types/passport-jwt": ^3.0.6
|
||||
"@types/passport-local": ^1.0.34
|
||||
"@types/passport-strategy": ^0.2.35
|
||||
"@types/sharp": ^0.30.5
|
||||
"@types/supertest": ^2.0.12
|
||||
"@typescript-eslint/eslint-plugin": ^5.36.1
|
||||
"@typescript-eslint/parser": ^5.36.1
|
||||
"@typescript-eslint/eslint-plugin": ^5.36.2
|
||||
"@typescript-eslint/parser": ^5.36.2
|
||||
bcrypt: ^5.0.1
|
||||
bmp-img: ^1.2.1
|
||||
cors: ^2.8.5
|
||||
|
@ -9025,7 +8993,7 @@ __metadata:
|
|||
reflect-metadata: ^0.1.13
|
||||
rimraf: ^3.0.2
|
||||
rxjs: ^7.5.6
|
||||
sharp: ^0.30.7
|
||||
sharp: ^0.31.0
|
||||
source-map-support: ^0.5.21
|
||||
stream-parser: ^0.3.1
|
||||
thunks: ^4.9.6
|
||||
|
@ -9035,7 +9003,7 @@ __metadata:
|
|||
typeorm: 0.3.9
|
||||
typescript: 4.8.2
|
||||
webpack: ^5.74.0
|
||||
zod: ^3.18.0
|
||||
zod: ^3.19.0
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
|
@ -9063,7 +9031,7 @@ __metadata:
|
|||
"@ng-web-apis/common": ^2.0.1
|
||||
"@ng-web-apis/resize-observer": ^2.0.0
|
||||
"@ngui/common": ^1.0.0
|
||||
"@types/node": ^18.7.14
|
||||
"@types/node": ^18.7.15
|
||||
"@types/resize-observer-browser": ^0.1.7
|
||||
"@types/validator": ^13.7.6
|
||||
bootstrap: ^5.2.0
|
||||
|
@ -9079,7 +9047,7 @@ __metadata:
|
|||
rxjs: ~7.5.6
|
||||
tslib: ^2.4.0
|
||||
typescript: 4.8.2
|
||||
zod: ^3.18.0
|
||||
zod: ^3.19.0
|
||||
zone.js: ~0.11.8
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
@ -9088,10 +9056,10 @@ __metadata:
|
|||
version: 0.0.0-use.local
|
||||
resolution: "picsur-shared@workspace:shared"
|
||||
dependencies:
|
||||
"@types/node": ^18.7.14
|
||||
"@types/node": ^18.7.15
|
||||
tsc-watch: ^5.0.3
|
||||
typescript: 4.8.2
|
||||
zod: ^3.18.0
|
||||
zod: ^3.19.0
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
|
@ -9762,13 +9730,6 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"process-warning@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "process-warning@npm:1.0.0"
|
||||
checksum: c708a03241deec3cabaeee39c4f9ee8c4d71f1c5ef9b746c8252cdb952a6059068cfcdaf348399775244cbc441b6ae5e26a9c87ed371f88335d84f26d19180f9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"process-warning@npm:^2.0.0":
|
||||
version: 2.0.0
|
||||
resolution: "process-warning@npm:2.0.0"
|
||||
|
@ -10586,9 +10547,9 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"sharp@npm:^0.30.7":
|
||||
version: 0.30.7
|
||||
resolution: "sharp@npm:0.30.7"
|
||||
"sharp@npm:^0.31.0":
|
||||
version: 0.31.0
|
||||
resolution: "sharp@npm:0.31.0"
|
||||
dependencies:
|
||||
color: ^4.2.3
|
||||
detect-libc: ^2.0.1
|
||||
|
@ -10599,7 +10560,7 @@ __metadata:
|
|||
simple-get: ^4.0.1
|
||||
tar-fs: ^2.1.1
|
||||
tunnel-agent: ^0.6.0
|
||||
checksum: bbc63ca3c7ea8a5bff32cd77022cfea30e25a03f5bd031e935924bf6cf0e11e3388e8b0e22b3137bf8816aa73407f1e4fbeb190f3a35605c27ffca9f32b91601
|
||||
checksum: 1ab73fea3a506f0bf290eb9dff6e7bab7947813e69bf8ca3eebcbe96498cb23dd6c8d8d02d67575fd8e9b555b01d9529d140c5a66e3a774855ba758455a90f3e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -11160,7 +11121,7 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"terser@npm:^5.14.2":
|
||||
"terser@npm:>=5.14.2":
|
||||
version: 5.15.0
|
||||
resolution: "terser@npm:5.15.0"
|
||||
dependencies:
|
||||
|
@ -11500,7 +11461,7 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"typeorm@npm:^0.3.9":
|
||||
"typeorm@npm:>=0.3.9":
|
||||
version: 0.3.9
|
||||
resolution: "typeorm@npm:0.3.9"
|
||||
dependencies:
|
||||
|
@ -11758,7 +11719,7 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"watchpack@npm:^2.3.1, watchpack@npm:^2.4.0":
|
||||
"watchpack@npm:^2.4.0":
|
||||
version: 2.4.0
|
||||
resolution: "watchpack@npm:2.4.0"
|
||||
dependencies:
|
||||
|
@ -11891,43 +11852,6 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"webpack@npm:5.73.0":
|
||||
version: 5.73.0
|
||||
resolution: "webpack@npm:5.73.0"
|
||||
dependencies:
|
||||
"@types/eslint-scope": ^3.7.3
|
||||
"@types/estree": ^0.0.51
|
||||
"@webassemblyjs/ast": 1.11.1
|
||||
"@webassemblyjs/wasm-edit": 1.11.1
|
||||
"@webassemblyjs/wasm-parser": 1.11.1
|
||||
acorn: ^8.4.1
|
||||
acorn-import-assertions: ^1.7.6
|
||||
browserslist: ^4.14.5
|
||||
chrome-trace-event: ^1.0.2
|
||||
enhanced-resolve: ^5.9.3
|
||||
es-module-lexer: ^0.9.0
|
||||
eslint-scope: 5.1.1
|
||||
events: ^3.2.0
|
||||
glob-to-regexp: ^0.4.1
|
||||
graceful-fs: ^4.2.9
|
||||
json-parse-even-better-errors: ^2.3.1
|
||||
loader-runner: ^4.2.0
|
||||
mime-types: ^2.1.27
|
||||
neo-async: ^2.6.2
|
||||
schema-utils: ^3.1.0
|
||||
tapable: ^2.1.1
|
||||
terser-webpack-plugin: ^5.1.3
|
||||
watchpack: ^2.3.1
|
||||
webpack-sources: ^3.2.3
|
||||
peerDependenciesMeta:
|
||||
webpack-cli:
|
||||
optional: true
|
||||
bin:
|
||||
webpack: bin/webpack.js
|
||||
checksum: aa434a241bad6176b68e1bf0feb1972da4dcbf27cb3d94ae24f6eb31acc37dceb9c4aae55e068edca75817bfe91f13cd20b023ac55d9b1b2f8b66a4037c9468f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"webpack@npm:5.74.0, webpack@npm:^5.74.0":
|
||||
version: 5.74.0
|
||||
resolution: "webpack@npm:5.74.0"
|
||||
|
@ -12179,10 +12103,10 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"zod@npm:^3.18.0":
|
||||
version: 3.18.0
|
||||
resolution: "zod@npm:3.18.0"
|
||||
checksum: 86a9a9928f4b40a07020d4b9832842fa4a70050c2d7bd1b2866bc1acfd734aa53a40f87a99a4312a637341a608b0105770c7a1f83b56df78e97691b4f5badcd8
|
||||
"zod@npm:^3.19.0":
|
||||
version: 3.19.0
|
||||
resolution: "zod@npm:3.19.0"
|
||||
checksum: 35b9270ba73ff15e1cc3e529cdd49b78ceb5f9204770b974ffa5d1728ad1be8429315aa25263d088edecaa99ecc3631339fe79313435154060951706294f47e5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
|
Loading…
Reference in New Issue