@social.dev/server-sdk 0.0.1-alpha.1 → 0.0.1-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1756201302119-migrations.d.ts +6 -0
- package/dist/1756201302119-migrations.js +84 -0
- package/dist/1756201302119-migrations.js.map +1 -0
- package/dist/app.module.js +2 -11
- package/dist/app.module.js.map +1 -1
- package/dist/db.d.ts +3 -0
- package/dist/db.js +22 -0
- package/dist/db.js.map +1 -0
- package/dist/migrations/1756201406330-Initial.d.ts +6 -0
- package/dist/migrations/1756201406330-Initial.js +85 -0
- package/dist/migrations/1756201406330-Initial.js.map +1 -0
- package/dist/network/network.service.js +1 -1
- package/dist/network/network.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migrations1756201302119 = void 0;
|
|
4
|
+
class Migrations1756201302119 {
|
|
5
|
+
name = 'Migrations1756201302119';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "network" ("id" SERIAL NOT NULL, "name" character varying NOT NULL, "fqdn" character varying NOT NULL, CONSTRAINT "PK_8f8264c2d37cbbd8282ee9a3c97" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`CREATE TYPE "public"."community_privacy_enum" AS ENUM('PUBLIC', 'PRIVATE', 'HIDDEN')`);
|
|
9
|
+
await queryRunner.query(`CREATE TABLE "community" ("id" SERIAL NOT NULL, "name" character varying NOT NULL, "privacy" "public"."community_privacy_enum" NOT NULL DEFAULT 'PUBLIC', "networkId" integer NOT NULL, CONSTRAINT "PK_cae794115a383328e8923de4193" PRIMARY KEY ("id"))`);
|
|
10
|
+
await queryRunner.query(`CREATE TYPE "public"."community_member_role_enum" AS ENUM('MEMBER', 'MODERATOR', 'ADMIN', 'OWNER')`);
|
|
11
|
+
await queryRunner.query(`CREATE TYPE "public"."community_member_status_enum" AS ENUM('ACTIVE', 'REQUESTED', 'INVITED', 'BANNED')`);
|
|
12
|
+
await queryRunner.query(`CREATE TABLE "community_member" ("communityId" integer NOT NULL, "userId" integer NOT NULL, "role" "public"."community_member_role_enum" NOT NULL, "status" "public"."community_member_status_enum" NOT NULL, "invitedById" integer, CONSTRAINT "PK_48777696f39fa15d444ab3bb435" PRIMARY KEY ("communityId", "userId"))`);
|
|
13
|
+
await queryRunner.query(`CREATE TABLE "user" ("id" SERIAL NOT NULL, "name" character varying(30) NOT NULL, "username" character varying(15) NOT NULL, "email" character varying(40) NOT NULL, "password" character varying, "networkId" integer, CONSTRAINT "username_unique" UNIQUE ("username"), CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))`);
|
|
14
|
+
await queryRunner.query(`CREATE TABLE "media" ("id" SERIAL NOT NULL, "pathname" character varying, "sizeBytes" integer NOT NULL, "deleted" boolean NOT NULL, "durationSecs" integer, "type" character varying NOT NULL, "networkId" integer NOT NULL, "ownerId" integer NOT NULL, "postId" integer, CONSTRAINT "PK_f4e0fcac36e050de337b670d8bd" PRIMARY KEY ("id"))`);
|
|
15
|
+
await queryRunner.query(`CREATE INDEX "IDX_637a0dd7f9068a9ca80decee00" ON "media" ("type") `);
|
|
16
|
+
await queryRunner.query(`CREATE TABLE "post_reaction" ("userId" integer NOT NULL, "postId" integer NOT NULL, "emoji" character varying, CONSTRAINT "PK_8f0e895fae24ab37d0f5eb53c2f" PRIMARY KEY ("userId", "postId"))`);
|
|
17
|
+
await queryRunner.query(`CREATE TABLE "post" ("id" SERIAL NOT NULL, "message" text, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), "networkId" integer NOT NULL, "communityId" integer, "replyToId" integer, "ownerId" integer NOT NULL, CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))`);
|
|
18
|
+
await queryRunner.query(`CREATE TABLE "chat_conversation_member" ("conversationId" integer NOT NULL, "userId" integer NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_f105c5e3b4e656950c6e72ef434" PRIMARY KEY ("conversationId", "userId"))`);
|
|
19
|
+
await queryRunner.query(`CREATE TYPE "public"."chat_conversation_type_enum" AS ENUM('ONE_ON_ONE')`);
|
|
20
|
+
await queryRunner.query(`CREATE TABLE "chat_conversation" ("id" SERIAL NOT NULL, "type" "public"."chat_conversation_type_enum" NOT NULL DEFAULT 'ONE_ON_ONE', "name" character varying, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_0c5b7697e69f674eb983b1e83cc" PRIMARY KEY ("id"))`);
|
|
21
|
+
await queryRunner.query(`CREATE TABLE "chat_message" ("id" SERIAL NOT NULL, "text" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "conversationId" integer, "senderId" integer NOT NULL, CONSTRAINT "PK_3cc0d85193aade457d3077dd06b" PRIMARY KEY ("id"))`);
|
|
22
|
+
await queryRunner.query(`CREATE TABLE "oidc_user" ("providerId" character varying NOT NULL, "sub" character varying NOT NULL, "networkId" integer NOT NULL, "userId" integer, CONSTRAINT "REL_28242cc8b902f234841dc9d5e5" UNIQUE ("userId"), CONSTRAINT "PK_f1d744a99f9a8dc6566e11b1490" PRIMARY KEY ("providerId", "sub"))`);
|
|
23
|
+
await queryRunner.query(`ALTER TABLE "community" ADD CONSTRAINT "FK_dd53c7e12f12655271aef28717b" FOREIGN KEY ("networkId") REFERENCES "network"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
24
|
+
await queryRunner.query(`ALTER TABLE "community_member" ADD CONSTRAINT "FK_2951a66589069ef105a6784b494" FOREIGN KEY ("communityId") REFERENCES "community"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
25
|
+
await queryRunner.query(`ALTER TABLE "community_member" ADD CONSTRAINT "FK_b63d16b2a505c9f6376107acc2c" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE "community_member" ADD CONSTRAINT "FK_99327f5cec6d5d0423c7373b125" FOREIGN KEY ("invitedById") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
27
|
+
await queryRunner.query(`ALTER TABLE "user" ADD CONSTRAINT "FK_67c127a235009d85d73bedeea72" FOREIGN KEY ("networkId") REFERENCES "network"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
28
|
+
await queryRunner.query(`ALTER TABLE "media" ADD CONSTRAINT "FK_34b56128ffce9202f2b80ceb54e" FOREIGN KEY ("networkId") REFERENCES "network"("id") ON DELETE RESTRICT ON UPDATE NO ACTION`);
|
|
29
|
+
await queryRunner.query(`ALTER TABLE "media" ADD CONSTRAINT "FK_138d7762e76b7fee9de6db0f8eb" FOREIGN KEY ("ownerId") REFERENCES "user"("id") ON DELETE RESTRICT ON UPDATE NO ACTION`);
|
|
30
|
+
await queryRunner.query(`ALTER TABLE "media" ADD CONSTRAINT "FK_9dcde1b1308b5f22f34b8454e28" FOREIGN KEY ("postId") REFERENCES "post"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
31
|
+
await queryRunner.query(`ALTER TABLE "post_reaction" ADD CONSTRAINT "FK_5019c594c963270ac7a6bfafbec" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
32
|
+
await queryRunner.query(`ALTER TABLE "post_reaction" ADD CONSTRAINT "FK_5e7b98f3cea583c73a0bbbe0de1" FOREIGN KEY ("postId") REFERENCES "post"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
33
|
+
await queryRunner.query(`ALTER TABLE "post" ADD CONSTRAINT "FK_f03bf599ee6be89cb1551d4c749" FOREIGN KEY ("networkId") REFERENCES "network"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
34
|
+
await queryRunner.query(`ALTER TABLE "post" ADD CONSTRAINT "FK_eff802f635e95c8aef1998b4843" FOREIGN KEY ("communityId") REFERENCES "community"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
35
|
+
await queryRunner.query(`ALTER TABLE "post" ADD CONSTRAINT "FK_343ffc7266f858cc02c8397035e" FOREIGN KEY ("replyToId") REFERENCES "post"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
36
|
+
await queryRunner.query(`ALTER TABLE "post" ADD CONSTRAINT "FK_4490d00e1925ca046a1f52ddf04" FOREIGN KEY ("ownerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
37
|
+
await queryRunner.query(`ALTER TABLE "chat_conversation_member" ADD CONSTRAINT "FK_39828751da8c4d3e3c1845757cb" FOREIGN KEY ("conversationId") REFERENCES "chat_conversation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
38
|
+
await queryRunner.query(`ALTER TABLE "chat_conversation_member" ADD CONSTRAINT "FK_500b5c2b79a7abbf504693e1071" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
39
|
+
await queryRunner.query(`ALTER TABLE "chat_message" ADD CONSTRAINT "FK_71d77a16df3f16e830d645f31f6" FOREIGN KEY ("conversationId") REFERENCES "chat_conversation"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
40
|
+
await queryRunner.query(`ALTER TABLE "chat_message" ADD CONSTRAINT "FK_a2be22c99b34156574f4e02d0a0" FOREIGN KEY ("senderId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
41
|
+
await queryRunner.query(`ALTER TABLE "oidc_user" ADD CONSTRAINT "FK_b1833282b002faf5ec48d9d1678" FOREIGN KEY ("networkId") REFERENCES "network"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
42
|
+
await queryRunner.query(`ALTER TABLE "oidc_user" ADD CONSTRAINT "FK_28242cc8b902f234841dc9d5e59" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
43
|
+
}
|
|
44
|
+
async down(queryRunner) {
|
|
45
|
+
await queryRunner.query(`ALTER TABLE "oidc_user" DROP CONSTRAINT "FK_28242cc8b902f234841dc9d5e59"`);
|
|
46
|
+
await queryRunner.query(`ALTER TABLE "oidc_user" DROP CONSTRAINT "FK_b1833282b002faf5ec48d9d1678"`);
|
|
47
|
+
await queryRunner.query(`ALTER TABLE "chat_message" DROP CONSTRAINT "FK_a2be22c99b34156574f4e02d0a0"`);
|
|
48
|
+
await queryRunner.query(`ALTER TABLE "chat_message" DROP CONSTRAINT "FK_71d77a16df3f16e830d645f31f6"`);
|
|
49
|
+
await queryRunner.query(`ALTER TABLE "chat_conversation_member" DROP CONSTRAINT "FK_500b5c2b79a7abbf504693e1071"`);
|
|
50
|
+
await queryRunner.query(`ALTER TABLE "chat_conversation_member" DROP CONSTRAINT "FK_39828751da8c4d3e3c1845757cb"`);
|
|
51
|
+
await queryRunner.query(`ALTER TABLE "post" DROP CONSTRAINT "FK_4490d00e1925ca046a1f52ddf04"`);
|
|
52
|
+
await queryRunner.query(`ALTER TABLE "post" DROP CONSTRAINT "FK_343ffc7266f858cc02c8397035e"`);
|
|
53
|
+
await queryRunner.query(`ALTER TABLE "post" DROP CONSTRAINT "FK_eff802f635e95c8aef1998b4843"`);
|
|
54
|
+
await queryRunner.query(`ALTER TABLE "post" DROP CONSTRAINT "FK_f03bf599ee6be89cb1551d4c749"`);
|
|
55
|
+
await queryRunner.query(`ALTER TABLE "post_reaction" DROP CONSTRAINT "FK_5e7b98f3cea583c73a0bbbe0de1"`);
|
|
56
|
+
await queryRunner.query(`ALTER TABLE "post_reaction" DROP CONSTRAINT "FK_5019c594c963270ac7a6bfafbec"`);
|
|
57
|
+
await queryRunner.query(`ALTER TABLE "media" DROP CONSTRAINT "FK_9dcde1b1308b5f22f34b8454e28"`);
|
|
58
|
+
await queryRunner.query(`ALTER TABLE "media" DROP CONSTRAINT "FK_138d7762e76b7fee9de6db0f8eb"`);
|
|
59
|
+
await queryRunner.query(`ALTER TABLE "media" DROP CONSTRAINT "FK_34b56128ffce9202f2b80ceb54e"`);
|
|
60
|
+
await queryRunner.query(`ALTER TABLE "user" DROP CONSTRAINT "FK_67c127a235009d85d73bedeea72"`);
|
|
61
|
+
await queryRunner.query(`ALTER TABLE "community_member" DROP CONSTRAINT "FK_99327f5cec6d5d0423c7373b125"`);
|
|
62
|
+
await queryRunner.query(`ALTER TABLE "community_member" DROP CONSTRAINT "FK_b63d16b2a505c9f6376107acc2c"`);
|
|
63
|
+
await queryRunner.query(`ALTER TABLE "community_member" DROP CONSTRAINT "FK_2951a66589069ef105a6784b494"`);
|
|
64
|
+
await queryRunner.query(`ALTER TABLE "community" DROP CONSTRAINT "FK_dd53c7e12f12655271aef28717b"`);
|
|
65
|
+
await queryRunner.query(`DROP TABLE "oidc_user"`);
|
|
66
|
+
await queryRunner.query(`DROP TABLE "chat_message"`);
|
|
67
|
+
await queryRunner.query(`DROP TABLE "chat_conversation"`);
|
|
68
|
+
await queryRunner.query(`DROP TYPE "public"."chat_conversation_type_enum"`);
|
|
69
|
+
await queryRunner.query(`DROP TABLE "chat_conversation_member"`);
|
|
70
|
+
await queryRunner.query(`DROP TABLE "post"`);
|
|
71
|
+
await queryRunner.query(`DROP TABLE "post_reaction"`);
|
|
72
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_637a0dd7f9068a9ca80decee00"`);
|
|
73
|
+
await queryRunner.query(`DROP TABLE "media"`);
|
|
74
|
+
await queryRunner.query(`DROP TABLE "user"`);
|
|
75
|
+
await queryRunner.query(`DROP TABLE "community_member"`);
|
|
76
|
+
await queryRunner.query(`DROP TYPE "public"."community_member_status_enum"`);
|
|
77
|
+
await queryRunner.query(`DROP TYPE "public"."community_member_role_enum"`);
|
|
78
|
+
await queryRunner.query(`DROP TABLE "community"`);
|
|
79
|
+
await queryRunner.query(`DROP TYPE "public"."community_privacy_enum"`);
|
|
80
|
+
await queryRunner.query(`DROP TABLE "network"`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.Migrations1756201302119 = Migrations1756201302119;
|
|
84
|
+
//# sourceMappingURL=1756201302119-migrations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1756201302119-migrations.js","sourceRoot":"","sources":["../src/1756201302119-migrations.ts"],"names":[],"mappings":";;;AAEA,MAAa,uBAAuB;IAChC,IAAI,GAAG,yBAAyB,CAAA;IAEzB,KAAK,CAAC,EAAE,CAAC,WAAwB;QACpC,MAAM,WAAW,CAAC,KAAK,CAAC,qLAAqL,CAAC,CAAC;QAC/M,MAAM,WAAW,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;QAChH,MAAM,WAAW,CAAC,KAAK,CAAC,yPAAyP,CAAC,CAAC;QACnR,MAAM,WAAW,CAAC,KAAK,CAAC,oGAAoG,CAAC,CAAC;QAC9H,MAAM,WAAW,CAAC,KAAK,CAAC,yGAAyG,CAAC,CAAC;QACnI,MAAM,WAAW,CAAC,KAAK,CAAC,yTAAyT,CAAC,CAAC;QACnV,MAAM,WAAW,CAAC,KAAK,CAAC,2UAA2U,CAAC,CAAC;QACrW,MAAM,WAAW,CAAC,KAAK,CAAC,4UAA4U,CAAC,CAAC;QACtW,MAAM,WAAW,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;QAC9F,MAAM,WAAW,CAAC,KAAK,CAAC,8LAA8L,CAAC,CAAC;QACxN,MAAM,WAAW,CAAC,KAAK,CAAC,8TAA8T,CAAC,CAAC;QACxV,MAAM,WAAW,CAAC,KAAK,CAAC,4OAA4O,CAAC,CAAC;QACtQ,MAAM,WAAW,CAAC,KAAK,CAAC,0EAA0E,CAAC,CAAC;QACpG,MAAM,WAAW,CAAC,KAAK,CAAC,8QAA8Q,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MAAM,WAAW,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAClD,MAAM,WAAW,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACrD,MAAM,WAAW,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAC1D,MAAM,WAAW,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;QAC5E,MAAM,WAAW,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACjE,MAAM,WAAW,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC7C,MAAM,WAAW,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACtD,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC9C,MAAM,WAAW,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC7C,MAAM,WAAW,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACzD,MAAM,WAAW,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;QAC7E,MAAM,WAAW,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;QAC3E,MAAM,WAAW,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAClD,MAAM,WAAW,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACvE,MAAM,WAAW,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACpD,CAAC;CAEJ;AAjFD,0DAiFC"}
|
package/dist/app.module.js
CHANGED
|
@@ -30,9 +30,9 @@ const context_1 = require("./core/context/context");
|
|
|
30
30
|
const context_service_1 = require("./core/context/context.service");
|
|
31
31
|
const chat_module_1 = require("./chat/chat.module");
|
|
32
32
|
const core_module_1 = require("./core/core.module");
|
|
33
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
34
33
|
const context_module_1 = require("./core/context/context.module");
|
|
35
34
|
const typeorm_2 = require("typeorm");
|
|
35
|
+
const db_1 = __importDefault(require("./db"));
|
|
36
36
|
let AppModule = class AppModule {
|
|
37
37
|
contextService;
|
|
38
38
|
dataSource;
|
|
@@ -57,16 +57,7 @@ exports.AppModule = AppModule = __decorate([
|
|
|
57
57
|
envFilePath: '../../.env',
|
|
58
58
|
isGlobal: true,
|
|
59
59
|
}),
|
|
60
|
-
typeorm_1.TypeOrmModule.forRoot(
|
|
61
|
-
type: 'postgres',
|
|
62
|
-
host: process.env.POSTGRES_HOST || 'localhost',
|
|
63
|
-
port: parseInt(process.env.POSTGRES_PORT || '') || 5432,
|
|
64
|
-
username: process.env.POSTGRES_USER || 'root',
|
|
65
|
-
password: process.env.POSTGRES_PASSWORD || 'root',
|
|
66
|
-
database: process.env.POSTGRES_DB || 'socialdev',
|
|
67
|
-
entities: [node_path_1.default.join(__dirname, '**/*.entity.js')],
|
|
68
|
-
synchronize: true,
|
|
69
|
-
}),
|
|
60
|
+
typeorm_1.TypeOrmModule.forRoot(db_1.default.options),
|
|
70
61
|
core_module_1.CoreModule,
|
|
71
62
|
user_module_1.UserModule,
|
|
72
63
|
network_module_1.NetworkModule,
|
package/dist/app.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKwB;AACxB,6CAAgD;AAChD,2CAA8C;AAC9C,oDAAgD;AAEhD,6DAAyD;AAEzD,mEAA+D;AAC/D,oDAAgD;AAEhD,uCAA0D;AAC1D,oDAAgD;AAChD,4DAAwD;AACxD,6DAAyD;AACzD,qEAAwE;AACxE,uDAAmD;
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAKwB;AACxB,6CAAgD;AAChD,2CAA8C;AAC9C,oDAAgD;AAEhD,6DAAyD;AAEzD,mEAA+D;AAC/D,oDAAgD;AAEhD,u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AAC;gBACL,CAAC;aACF;SACF;KACF,CAAC;qCAGmC,gCAAc;QAClB,oBAAU;GAH9B,SAAS,CAerB"}
|
package/dist/db.d.ts
ADDED
package/dist/db.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const typeorm_1 = require("typeorm");
|
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const opts = {
|
|
9
|
+
type: 'postgres',
|
|
10
|
+
host: process.env.POSTGRES_HOST || 'localhost',
|
|
11
|
+
port: parseInt(process.env.POSTGRES_PORT || '') || 5432,
|
|
12
|
+
username: process.env.POSTGRES_USER || 'root',
|
|
13
|
+
password: process.env.POSTGRES_PASSWORD || 'root',
|
|
14
|
+
database: process.env.POSTGRES_DB || 'socialdev',
|
|
15
|
+
entities: [node_path_1.default.join(__dirname, '**/*.entity.js')],
|
|
16
|
+
migrationsTableName: 'social_dev_migrations',
|
|
17
|
+
migrations: ['dist/migrations/*.js'],
|
|
18
|
+
migrationsRun: true,
|
|
19
|
+
synchronize: process.env.SOCIAL_DEV_DEVMODE === 'true',
|
|
20
|
+
};
|
|
21
|
+
exports.default = new typeorm_1.DataSource(opts);
|
|
22
|
+
//# sourceMappingURL=db.js.map
|
package/dist/db.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db.js","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":";;;;;AAAA,qCAAwD;AACxD,0DAA6B;AAE7B,MAAM,IAAI,GAAsB;IAC9B,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,WAAW;IAC9C,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC,IAAI,IAAI;IACvD,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,MAAM;IAC7C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,MAAM;IACjD,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,WAAW;IAChD,QAAQ,EAAE,CAAC,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IAClD,mBAAmB,EAAE,uBAAuB;IAC5C,UAAU,EAAE,CAAC,sBAAsB,CAAC;IACpC,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,KAAK,MAAM;CACvD,CAAC;AAEF,kBAAe,IAAI,oBAAU,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Initial1756201406330 = void 0;
|
|
4
|
+
class Initial1756201406330 {
|
|
5
|
+
name = 'Initial1756201406330';
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "network" ("id" SERIAL NOT NULL, "name" character varying NOT NULL, "fqdn" character varying NOT NULL, CONSTRAINT "PK_8f8264c2d37cbbd8282ee9a3c97" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`CREATE TYPE "public"."community_privacy_enum" AS ENUM('PUBLIC', 'PRIVATE', 'HIDDEN')`);
|
|
9
|
+
await queryRunner.query(`CREATE TABLE "community" ("id" SERIAL NOT NULL, "name" character varying NOT NULL, "privacy" "public"."community_privacy_enum" NOT NULL DEFAULT 'PUBLIC', "networkId" integer NOT NULL, CONSTRAINT "PK_cae794115a383328e8923de4193" PRIMARY KEY ("id"))`);
|
|
10
|
+
await queryRunner.query(`CREATE TYPE "public"."community_member_role_enum" AS ENUM('MEMBER', 'MODERATOR', 'ADMIN', 'OWNER')`);
|
|
11
|
+
await queryRunner.query(`CREATE TYPE "public"."community_member_status_enum" AS ENUM('ACTIVE', 'REQUESTED', 'INVITED', 'BANNED')`);
|
|
12
|
+
await queryRunner.query(`CREATE TABLE "community_member" ("communityId" integer NOT NULL, "userId" integer NOT NULL, "role" "public"."community_member_role_enum" NOT NULL, "status" "public"."community_member_status_enum" NOT NULL, "invitedById" integer, CONSTRAINT "PK_48777696f39fa15d444ab3bb435" PRIMARY KEY ("communityId", "userId"))`);
|
|
13
|
+
await queryRunner.query(`CREATE TABLE "user" ("id" SERIAL NOT NULL, "name" character varying(30) NOT NULL, "username" character varying(15) NOT NULL, "email" character varying(40) NOT NULL, "password" character varying, "networkId" integer, CONSTRAINT "username_unique" UNIQUE ("username"), CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))`);
|
|
14
|
+
await queryRunner.query(`CREATE TABLE "media" ("id" SERIAL NOT NULL, "pathname" character varying, "sizeBytes" integer NOT NULL, "deleted" boolean NOT NULL, "durationSecs" integer, "type" character varying NOT NULL, "networkId" integer NOT NULL, "ownerId" integer NOT NULL, "postId" integer, CONSTRAINT "PK_f4e0fcac36e050de337b670d8bd" PRIMARY KEY ("id"))`);
|
|
15
|
+
await queryRunner.query(`CREATE INDEX "IDX_637a0dd7f9068a9ca80decee00" ON "media" ("type") `);
|
|
16
|
+
await queryRunner.query(`CREATE TABLE "post_reaction" ("userId" integer NOT NULL, "postId" integer NOT NULL, "emoji" character varying, CONSTRAINT "PK_8f0e895fae24ab37d0f5eb53c2f" PRIMARY KEY ("userId", "postId"))`);
|
|
17
|
+
await queryRunner.query(`CREATE TABLE "post" ("id" SERIAL NOT NULL, "message" text, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), "networkId" integer NOT NULL, "communityId" integer, "replyToId" integer, "ownerId" integer NOT NULL, CONSTRAINT "PK_be5fda3aac270b134ff9c21cdee" PRIMARY KEY ("id"))`);
|
|
18
|
+
await queryRunner.query(`CREATE TABLE "chat_conversation_member" ("conversationId" integer NOT NULL, "userId" integer NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_f105c5e3b4e656950c6e72ef434" PRIMARY KEY ("conversationId", "userId"))`);
|
|
19
|
+
await queryRunner.query(`CREATE TYPE "public"."chat_conversation_type_enum" AS ENUM('ONE_ON_ONE')`);
|
|
20
|
+
await queryRunner.query(`CREATE TABLE "chat_conversation" ("id" SERIAL NOT NULL, "type" "public"."chat_conversation_type_enum" NOT NULL DEFAULT 'ONE_ON_ONE', "name" character varying, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_0c5b7697e69f674eb983b1e83cc" PRIMARY KEY ("id"))`);
|
|
21
|
+
await queryRunner.query(`CREATE TABLE "chat_message" ("id" SERIAL NOT NULL, "text" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "conversationId" integer, "senderId" integer NOT NULL, CONSTRAINT "PK_3cc0d85193aade457d3077dd06b" PRIMARY KEY ("id"))`);
|
|
22
|
+
await queryRunner.query(`CREATE TABLE "oidc_user" ("providerId" character varying NOT NULL, "sub" character varying NOT NULL, "networkId" integer NOT NULL, "userId" integer, CONSTRAINT "REL_28242cc8b902f234841dc9d5e5" UNIQUE ("userId"), CONSTRAINT "PK_f1d744a99f9a8dc6566e11b1490" PRIMARY KEY ("providerId", "sub"))`);
|
|
23
|
+
await queryRunner.query(`ALTER TABLE "community" ADD CONSTRAINT "FK_dd53c7e12f12655271aef28717b" FOREIGN KEY ("networkId") REFERENCES "network"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
24
|
+
await queryRunner.query(`ALTER TABLE "community_member" ADD CONSTRAINT "FK_2951a66589069ef105a6784b494" FOREIGN KEY ("communityId") REFERENCES "community"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
25
|
+
await queryRunner.query(`ALTER TABLE "community_member" ADD CONSTRAINT "FK_b63d16b2a505c9f6376107acc2c" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE "community_member" ADD CONSTRAINT "FK_99327f5cec6d5d0423c7373b125" FOREIGN KEY ("invitedById") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
27
|
+
await queryRunner.query(`ALTER TABLE "user" ADD CONSTRAINT "FK_67c127a235009d85d73bedeea72" FOREIGN KEY ("networkId") REFERENCES "network"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
28
|
+
await queryRunner.query(`ALTER TABLE "media" ADD CONSTRAINT "FK_34b56128ffce9202f2b80ceb54e" FOREIGN KEY ("networkId") REFERENCES "network"("id") ON DELETE RESTRICT ON UPDATE NO ACTION`);
|
|
29
|
+
await queryRunner.query(`ALTER TABLE "media" ADD CONSTRAINT "FK_138d7762e76b7fee9de6db0f8eb" FOREIGN KEY ("ownerId") REFERENCES "user"("id") ON DELETE RESTRICT ON UPDATE NO ACTION`);
|
|
30
|
+
await queryRunner.query(`ALTER TABLE "media" ADD CONSTRAINT "FK_9dcde1b1308b5f22f34b8454e28" FOREIGN KEY ("postId") REFERENCES "post"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
31
|
+
await queryRunner.query(`ALTER TABLE "post_reaction" ADD CONSTRAINT "FK_5019c594c963270ac7a6bfafbec" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
32
|
+
await queryRunner.query(`ALTER TABLE "post_reaction" ADD CONSTRAINT "FK_5e7b98f3cea583c73a0bbbe0de1" FOREIGN KEY ("postId") REFERENCES "post"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
33
|
+
await queryRunner.query(`ALTER TABLE "post" ADD CONSTRAINT "FK_f03bf599ee6be89cb1551d4c749" FOREIGN KEY ("networkId") REFERENCES "network"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
34
|
+
await queryRunner.query(`ALTER TABLE "post" ADD CONSTRAINT "FK_eff802f635e95c8aef1998b4843" FOREIGN KEY ("communityId") REFERENCES "community"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
35
|
+
await queryRunner.query(`ALTER TABLE "post" ADD CONSTRAINT "FK_343ffc7266f858cc02c8397035e" FOREIGN KEY ("replyToId") REFERENCES "post"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
36
|
+
await queryRunner.query(`ALTER TABLE "post" ADD CONSTRAINT "FK_4490d00e1925ca046a1f52ddf04" FOREIGN KEY ("ownerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
37
|
+
await queryRunner.query(`ALTER TABLE "chat_conversation_member" ADD CONSTRAINT "FK_39828751da8c4d3e3c1845757cb" FOREIGN KEY ("conversationId") REFERENCES "chat_conversation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
38
|
+
await queryRunner.query(`ALTER TABLE "chat_conversation_member" ADD CONSTRAINT "FK_500b5c2b79a7abbf504693e1071" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
39
|
+
await queryRunner.query(`ALTER TABLE "chat_message" ADD CONSTRAINT "FK_71d77a16df3f16e830d645f31f6" FOREIGN KEY ("conversationId") REFERENCES "chat_conversation"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
40
|
+
await queryRunner.query(`ALTER TABLE "chat_message" ADD CONSTRAINT "FK_a2be22c99b34156574f4e02d0a0" FOREIGN KEY ("senderId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
41
|
+
await queryRunner.query(`ALTER TABLE "oidc_user" ADD CONSTRAINT "FK_b1833282b002faf5ec48d9d1678" FOREIGN KEY ("networkId") REFERENCES "network"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
42
|
+
await queryRunner.query(`ALTER TABLE "oidc_user" ADD CONSTRAINT "FK_28242cc8b902f234841dc9d5e59" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
43
|
+
await queryRunner.query(`INSERT INTO "network" (name, fqdn) VALUES ('Social.Dev', '*')`);
|
|
44
|
+
}
|
|
45
|
+
async down(queryRunner) {
|
|
46
|
+
await queryRunner.query(`ALTER TABLE "oidc_user" DROP CONSTRAINT "FK_28242cc8b902f234841dc9d5e59"`);
|
|
47
|
+
await queryRunner.query(`ALTER TABLE "oidc_user" DROP CONSTRAINT "FK_b1833282b002faf5ec48d9d1678"`);
|
|
48
|
+
await queryRunner.query(`ALTER TABLE "chat_message" DROP CONSTRAINT "FK_a2be22c99b34156574f4e02d0a0"`);
|
|
49
|
+
await queryRunner.query(`ALTER TABLE "chat_message" DROP CONSTRAINT "FK_71d77a16df3f16e830d645f31f6"`);
|
|
50
|
+
await queryRunner.query(`ALTER TABLE "chat_conversation_member" DROP CONSTRAINT "FK_500b5c2b79a7abbf504693e1071"`);
|
|
51
|
+
await queryRunner.query(`ALTER TABLE "chat_conversation_member" DROP CONSTRAINT "FK_39828751da8c4d3e3c1845757cb"`);
|
|
52
|
+
await queryRunner.query(`ALTER TABLE "post" DROP CONSTRAINT "FK_4490d00e1925ca046a1f52ddf04"`);
|
|
53
|
+
await queryRunner.query(`ALTER TABLE "post" DROP CONSTRAINT "FK_343ffc7266f858cc02c8397035e"`);
|
|
54
|
+
await queryRunner.query(`ALTER TABLE "post" DROP CONSTRAINT "FK_eff802f635e95c8aef1998b4843"`);
|
|
55
|
+
await queryRunner.query(`ALTER TABLE "post" DROP CONSTRAINT "FK_f03bf599ee6be89cb1551d4c749"`);
|
|
56
|
+
await queryRunner.query(`ALTER TABLE "post_reaction" DROP CONSTRAINT "FK_5e7b98f3cea583c73a0bbbe0de1"`);
|
|
57
|
+
await queryRunner.query(`ALTER TABLE "post_reaction" DROP CONSTRAINT "FK_5019c594c963270ac7a6bfafbec"`);
|
|
58
|
+
await queryRunner.query(`ALTER TABLE "media" DROP CONSTRAINT "FK_9dcde1b1308b5f22f34b8454e28"`);
|
|
59
|
+
await queryRunner.query(`ALTER TABLE "media" DROP CONSTRAINT "FK_138d7762e76b7fee9de6db0f8eb"`);
|
|
60
|
+
await queryRunner.query(`ALTER TABLE "media" DROP CONSTRAINT "FK_34b56128ffce9202f2b80ceb54e"`);
|
|
61
|
+
await queryRunner.query(`ALTER TABLE "user" DROP CONSTRAINT "FK_67c127a235009d85d73bedeea72"`);
|
|
62
|
+
await queryRunner.query(`ALTER TABLE "community_member" DROP CONSTRAINT "FK_99327f5cec6d5d0423c7373b125"`);
|
|
63
|
+
await queryRunner.query(`ALTER TABLE "community_member" DROP CONSTRAINT "FK_b63d16b2a505c9f6376107acc2c"`);
|
|
64
|
+
await queryRunner.query(`ALTER TABLE "community_member" DROP CONSTRAINT "FK_2951a66589069ef105a6784b494"`);
|
|
65
|
+
await queryRunner.query(`ALTER TABLE "community" DROP CONSTRAINT "FK_dd53c7e12f12655271aef28717b"`);
|
|
66
|
+
await queryRunner.query(`DROP TABLE "oidc_user"`);
|
|
67
|
+
await queryRunner.query(`DROP TABLE "chat_message"`);
|
|
68
|
+
await queryRunner.query(`DROP TABLE "chat_conversation"`);
|
|
69
|
+
await queryRunner.query(`DROP TYPE "public"."chat_conversation_type_enum"`);
|
|
70
|
+
await queryRunner.query(`DROP TABLE "chat_conversation_member"`);
|
|
71
|
+
await queryRunner.query(`DROP TABLE "post"`);
|
|
72
|
+
await queryRunner.query(`DROP TABLE "post_reaction"`);
|
|
73
|
+
await queryRunner.query(`DROP INDEX "public"."IDX_637a0dd7f9068a9ca80decee00"`);
|
|
74
|
+
await queryRunner.query(`DROP TABLE "media"`);
|
|
75
|
+
await queryRunner.query(`DROP TABLE "user"`);
|
|
76
|
+
await queryRunner.query(`DROP TABLE "community_member"`);
|
|
77
|
+
await queryRunner.query(`DROP TYPE "public"."community_member_status_enum"`);
|
|
78
|
+
await queryRunner.query(`DROP TYPE "public"."community_member_role_enum"`);
|
|
79
|
+
await queryRunner.query(`DROP TABLE "community"`);
|
|
80
|
+
await queryRunner.query(`DROP TYPE "public"."community_privacy_enum"`);
|
|
81
|
+
await queryRunner.query(`DROP TABLE "network"`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.Initial1756201406330 = Initial1756201406330;
|
|
85
|
+
//# sourceMappingURL=1756201406330-Initial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1756201406330-Initial.js","sourceRoot":"","sources":["../../src/migrations/1756201406330-Initial.ts"],"names":[],"mappings":";;;AAEA,MAAa,oBAAoB;IAC/B,IAAI,GAAG,sBAAsB,CAAC;IAEvB,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CACrB,qLAAqL,CACtL,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,sFAAsF,CACvF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,yPAAyP,CAC1P,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,oGAAoG,CACrG,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,yGAAyG,CAC1G,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,yTAAyT,CAC1T,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,2UAA2U,CAC5U,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,4UAA4U,CAC7U,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,oEAAoE,CACrE,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,8LAA8L,CAC/L,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,8TAA8T,CAC/T,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,4OAA4O,CAC7O,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,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ClF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,0EAA0E,CAC3E,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAClD,MAAM,WAAW,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACrD,MAAM,WAAW,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAC1D,MAAM,WAAW,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;QAC5E,MAAM,WAAW,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACjE,MAAM,WAAW,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC7C,MAAM,WAAW,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACtD,MAAM,WAAW,CAAC,KAAK,CACrB,sDAAsD,CACvD,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC9C,MAAM,WAAW,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC7C,MAAM,WAAW,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACzD,MAAM,WAAW,CAAC,KAAK,CACrB,mDAAmD,CACpD,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;QAC3E,MAAM,WAAW,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAClD,MAAM,WAAW,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACvE,MAAM,WAAW,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAClD,CAAC;CACF;AAxMD,oDAwMC"}
|
|
@@ -32,7 +32,7 @@ let NetworkService = class NetworkService {
|
|
|
32
32
|
return `This action returns a #${id} network`;
|
|
33
33
|
}
|
|
34
34
|
findByFqdn(fqdn) {
|
|
35
|
-
return this.networkRepository.findOneBy({ fqdn });
|
|
35
|
+
return this.networkRepository.findOneBy({ fqdn: (0, typeorm_2.In)([fqdn, '*']) });
|
|
36
36
|
}
|
|
37
37
|
update(id, updateNetworkDto) {
|
|
38
38
|
return `This action updates a #${id} network`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.service.js","sourceRoot":"","sources":["../../src/network/network.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAG5C,6CAAmD;AACnD,8DAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"network.service.js","sourceRoot":"","sources":["../../src/network/network.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAG5C,6CAAmD;AACnD,8DAAoD;AACpD,qCAAyC;AAGlC,IAAM,cAAc,GAApB,MAAM,cAAc;IAGN;IAFnB,YAEmB,iBAAsC;QAAtC,sBAAiB,GAAjB,iBAAiB,CAAqB;IACtD,CAAC;IACJ,MAAM,CAAC,gBAAkC;QACvC,OAAO,gCAAgC,CAAC;IAC1C,CAAC;IAED,OAAO;QACL,OAAO,iCAAiC,CAAC;IAC3C,CAAC;IAED,OAAO,CAAC,EAAU;QAChB,OAAO,0BAA0B,EAAE,UAAU,CAAC;IAChD,CAAC;IAKD,UAAU,CAAC,IAAY;QACrB,OAAO,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,IAAA,YAAE,EAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,gBAAkC;QACnD,OAAO,0BAA0B,EAAE,UAAU,CAAC;IAChD,CAAC;IAED,MAAM,CAAC,EAAU;QACf,OAAO,0BAA0B,EAAE,UAAU,CAAC;IAChD,CAAC;CACF,CAAA;AA/BY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,wBAAO,CAAC,CAAA;qCACU,oBAAU;GAHrC,cAAc,CA+B1B"}
|