rc #1
|
|
@ -0,0 +1,7 @@
|
|||
# Environment variables declared in this file are automatically made available to Prisma.
|
||||
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
|
||||
|
||||
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
|
||||
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
|
||||
|
||||
DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public"
|
||||
|
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
FROM node:23.11-slim
|
||||
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
|
||||
RUN corepack enable \
|
||||
&& corepack prepare pnpm@latest --activate
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json pnpm-lock.yaml package-lock.json ./
|
||||
|
||||
RUN pnpm install
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV NODE_ENV=development
|
||||
|
||||
CMD ["pnpm", "run", "start:dev"]
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
def notify(
|
||||
String context,
|
||||
String giteaUser,
|
||||
String giteaPass,
|
||||
String repositoryUrl,
|
||||
String repositoryName,
|
||||
String commitHash,
|
||||
String buildStatus
|
||||
) {
|
||||
def status = buildStatus == 'success' ? 'success' : 'failure'
|
||||
def description = buildStatus == 'success' ? 'Build succeeded' : 'Build failed'
|
||||
|
||||
sh """
|
||||
curl -X POST \
|
||||
-u "${giteaUser}:${giteaPass}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"context":"${context}","state": "${status}", "description": "${description}"}' \
|
||||
${repositoryUrl}deployer3000/${repositoryName}/statuses/${commitHash}
|
||||
"""
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
REGISTRY_NAME = 'registry.entcor/trust-module'
|
||||
IMAGE_NAME = "configurator"
|
||||
GITEA_REPOSITORY_URL = "http://git.entcor/api/v1/repos/"
|
||||
}
|
||||
stages {
|
||||
stage ('Initialize variables') {
|
||||
steps {
|
||||
script {
|
||||
def hasTags = sh(script: "git tag -l | wc -l", returnStdout: true).trim().toInteger() > 0
|
||||
echo "${hasTags}"
|
||||
|
||||
def lastVersion = "0.0.0"
|
||||
|
||||
if (hasTags) {
|
||||
lastVersion = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim()
|
||||
}
|
||||
|
||||
echo "Last version: ${lastVersion}"
|
||||
|
||||
def (major, minor, patch) = lastVersion.tokenize('.')
|
||||
def newVersion = "${major}.${minor}.${patch.toInteger() + 1}"
|
||||
echo "New version: ${newVersion}"
|
||||
|
||||
env.IMAGE_TAG = newVersion
|
||||
env.NEW_VERSION = newVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ('Build docker image') {
|
||||
when {
|
||||
expression { env.CHANGE_BRANCH?.startsWith('rc') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def image = docker.build("${env.IMAGE_NAME}:${env.IMAGE_TAG}")
|
||||
sh "docker tag ${env.IMAGE_NAME}:${env.IMAGE_TAG} ${env.REGISTRY_NAME}/${env.IMAGE_NAME}:${env.IMAGE_TAG}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ('Push docker image to registry') {
|
||||
when {
|
||||
expression { env.CHANGE_BRANCH?.startsWith('rc') }
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry('https://registry.entcor/harbor/', 'harbor-credentials-id') {
|
||||
docker.image("${env.REGISTRY_NAME}/${env.IMAGE_NAME}:${env.IMAGE_TAG}").push()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
echo "Cleaning up workspace..."
|
||||
sh "rm -rf ${env.WORKSPACE}/rc/ || true"
|
||||
}
|
||||
}
|
||||
success {
|
||||
script {
|
||||
if (env.CHANGE_BRANCH?.startsWith('rc')) {
|
||||
echo "Attempting to merge PR ${env.CHANGE_ID} into master..."
|
||||
withCredentials([usernamePassword(credentialsId: 'gitea_creds', usernameVariable: 'GITEA_USER', passwordVariable: 'GITEA_PASS')]) {
|
||||
def prId = env.CHANGE_ID
|
||||
|
||||
sh """
|
||||
curl -X POST \
|
||||
-u "${GITEA_USER}:${GITEA_PASS}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"do":"merge"}' \
|
||||
http://git.entcor/api/v1/repos/deployer3000/${env.IMAGE_NAME}/pulls/${prId}/merge
|
||||
"""
|
||||
def commitHash = sh(script: "git rev-parse HEAD~1", returnStdout: true).trim() // необходим для корректного отображения статусов
|
||||
echo "PR ${prId} merged successfully into master!"
|
||||
sleep(time: 15, unit: 'SECONDS')
|
||||
sh "git checkout master && git pull origin master"
|
||||
|
||||
sh """
|
||||
curl -v -X POST -u "${GITEA_USER}:${GITEA_PASS}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"tag_name": "${env.NEW_VERSION}", "name": "Release ${env.NEW_VERSION}", "target_commitish": "master"}' \
|
||||
"${env.GITEA_REPOSITORY_URL}deployer3000/${env.IMAGE_NAME}/releases"
|
||||
"""
|
||||
echo "New release succeeded!"
|
||||
|
||||
def context = "test-org/${env.IMAGE_NAME}/pipeline/pr-${env.CHANGE_TARGET}"
|
||||
notify(context, GITEA_USER, GITEA_PASS, env.GITEA_REPOSITORY_URL, env.IMAGE_NAME, commitHash, "success")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
failure {
|
||||
echo "Pipeline failed. Check the logs for details."
|
||||
}
|
||||
aborted {
|
||||
echo "Pipeline was aborted."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,+CAA2C;AAGpC,IAAM,aAAa,GAAnB,MAAM,aAAa;IACK;IAA7B,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAGvD,QAAQ;QACN,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;CACF,CAAA;AAPY,sCAAa;AAIxB;IADC,IAAA,YAAG,GAAE;;;;6CAGL;wBANU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAE8B,wBAAU;GADxC,aAAa,CAOzB"}
|
||||
{"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,+CAA2C;AAIpC,IAAM,aAAa,GAAnB,MAAM,aAAa;IACK;IAA7B,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAGvD,QAAQ;QACN,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;CACF,CAAA;AAPY,sCAAa;AAIxB;IADC,IAAA,YAAG,GAAE;;;;6CAGL;wBANU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAE8B,wBAAU;GADxC,aAAa,CAOzB"}
|
||||
|
|
@ -10,14 +10,17 @@ exports.AppModule = void 0;
|
|||
const common_1 = require("@nestjs/common");
|
||||
const app_controller_1 = require("./app.controller");
|
||||
const app_service_1 = require("./app.service");
|
||||
const database_module_1 = require("./database/database.module");
|
||||
const mufapi_module_1 = require("./mufapi/mufapi.module");
|
||||
let AppModule = class AppModule {
|
||||
};
|
||||
exports.AppModule = AppModule;
|
||||
exports.AppModule = AppModule = __decorate([
|
||||
(0, common_1.Module)({
|
||||
imports: [],
|
||||
imports: [database_module_1.DatabaseModule, mufapi_module_1.MufapiModule],
|
||||
controllers: [app_controller_1.AppController],
|
||||
providers: [app_service_1.AppService],
|
||||
exports: [],
|
||||
})
|
||||
], AppModule);
|
||||
//# sourceMappingURL=app.module.js.map
|
||||
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+CAA2C;AAOpC,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IALrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;KACxB,CAAC;GACW,SAAS,CAAG"}
|
||||
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+CAA2C;AAC3C,gEAA4D;AAC5D,0DAAsD;AAQ/C,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IANrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,gCAAc,EAAE,4BAAY,CAAC;QACvC,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;QACvB,OAAO,EAAE,EAAE;KACZ,CAAC;GACW,SAAS,CAAG"}
|
||||
|
|
@ -10,7 +10,7 @@ exports.AppService = void 0;
|
|||
const common_1 = require("@nestjs/common");
|
||||
let AppService = class AppService {
|
||||
getHello() {
|
||||
return 'Hello World!';
|
||||
return 'Hello New World!';
|
||||
}
|
||||
};
|
||||
exports.AppService = AppService;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"app.service.js","sourceRoot":"","sources":["../src/app.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,QAAQ;QACN,OAAO,cAAc,CAAC;IACxB,CAAC;CACF,CAAA;AAJY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CAItB"}
|
||||
{"version":3,"file":"app.service.js","sourceRoot":"","sources":["../src/app.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,QAAQ;QACN,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF,CAAA;AAJY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CAItB"}
|
||||
|
|
@ -4,7 +4,7 @@ const core_1 = require("@nestjs/core");
|
|||
const app_module_1 = require("./app.module");
|
||||
async function bootstrap() {
|
||||
const app = await core_1.NestFactory.create(app_module_1.AppModule);
|
||||
await app.listen(process.env.PORT ?? 9000);
|
||||
await app.listen(process.env.PORT ?? 9990);
|
||||
}
|
||||
bootstrap();
|
||||
//# sourceMappingURL=main.js.map
|
||||
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAC3C,6CAAyC;AAEzC,KAAK,UAAU,SAAS;IACtB,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAC,sBAAS,CAAC,CAAC;IAC9C,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;AAE/C,CAAC;AACD,SAAS,EAAE,CAAC"}
|
||||
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAC3C,6CAAyC;AAEzC,KAAK,UAAU,SAAS;IACtB,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAC,sBAAS,CAAC,CAAC;IAC9C,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;AAG/C,CAAC;AACD,SAAS,EAAE,CAAC"}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -23,6 +23,9 @@
|
|||
"@nestjs/common": "^11.0.1",
|
||||
"@nestjs/core": "^11.0.1",
|
||||
"@nestjs/platform-express": "^11.0.1",
|
||||
"axios": "^1.8.4",
|
||||
"class-validator": "^0.14.1",
|
||||
"glob": "7.2.3",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"rxjs": "^7.8.1"
|
||||
},
|
||||
|
|
@ -44,6 +47,7 @@
|
|||
"globals": "^16.0.0",
|
||||
"jest": "^29.7.0",
|
||||
"prettier": "^3.4.2",
|
||||
"prisma": "^6.5.0",
|
||||
"source-map-support": "^0.5.21",
|
||||
"supertest": "^7.0.0",
|
||||
"ts-jest": "^29.2.5",
|
||||
|
|
|
|||
464
pnpm-lock.yaml
464
pnpm-lock.yaml
|
|
@ -10,13 +10,22 @@ importers:
|
|||
dependencies:
|
||||
'@nestjs/common':
|
||||
specifier: ^11.0.1
|
||||
version: 11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
version: 11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
'@nestjs/core':
|
||||
specifier: ^11.0.1
|
||||
version: 11.0.11(@nestjs/common@11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.0.11)(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
version: 11.0.11(@nestjs/common@11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.0.11)(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
'@nestjs/platform-express':
|
||||
specifier: ^11.0.1
|
||||
version: 11.0.11(@nestjs/common@11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.11)
|
||||
version: 11.0.11(@nestjs/common@11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.11)
|
||||
axios:
|
||||
specifier: ^1.8.4
|
||||
version: 1.8.4
|
||||
class-validator:
|
||||
specifier: ^0.14.1
|
||||
version: 0.14.1
|
||||
glob:
|
||||
specifier: 7.2.3
|
||||
version: 7.2.3
|
||||
reflect-metadata:
|
||||
specifier: ^0.2.2
|
||||
version: 0.2.2
|
||||
|
|
@ -32,13 +41,13 @@ importers:
|
|||
version: 9.21.0
|
||||
'@nestjs/cli':
|
||||
specifier: ^11.0.0
|
||||
version: 11.0.5(@swc/cli@0.6.0(@swc/core@1.11.5)(chokidar@4.0.3))(@swc/core@1.11.5)(@types/node@22.13.8)
|
||||
version: 11.0.5(@swc/cli@0.6.0(@swc/core@1.11.5)(chokidar@4.0.3))(@swc/core@1.11.5)(@types/node@22.13.8)(esbuild@0.25.1)
|
||||
'@nestjs/schematics':
|
||||
specifier: ^11.0.0
|
||||
version: 11.0.2(chokidar@4.0.3)(typescript@5.8.2)
|
||||
'@nestjs/testing':
|
||||
specifier: ^11.0.1
|
||||
version: 11.0.11(@nestjs/common@11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.11)(@nestjs/platform-express@11.0.11)
|
||||
version: 11.0.11(@nestjs/common@11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.11)(@nestjs/platform-express@11.0.11)
|
||||
'@swc/cli':
|
||||
specifier: ^0.6.0
|
||||
version: 0.6.0(@swc/core@1.11.5)(chokidar@4.0.3)
|
||||
|
|
@ -75,6 +84,9 @@ importers:
|
|||
prettier:
|
||||
specifier: ^3.4.2
|
||||
version: 3.5.3
|
||||
prisma:
|
||||
specifier: ^6.5.0
|
||||
version: 6.5.0(typescript@5.8.2)
|
||||
source-map-support:
|
||||
specifier: ^0.5.21
|
||||
version: 0.5.21
|
||||
|
|
@ -83,10 +95,10 @@ importers:
|
|||
version: 7.0.0
|
||||
ts-jest:
|
||||
specifier: ^29.2.5
|
||||
version: 29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.8)(ts-node@10.9.2(@swc/core@1.11.5)(@types/node@22.13.8)(typescript@5.8.2)))(typescript@5.8.2)
|
||||
version: 29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(esbuild@0.25.1)(jest@29.7.0(@types/node@22.13.8)(ts-node@10.9.2(@swc/core@1.11.5)(@types/node@22.13.8)(typescript@5.8.2)))(typescript@5.8.2)
|
||||
ts-loader:
|
||||
specifier: ^9.5.2
|
||||
version: 9.5.2(typescript@5.8.2)(webpack@5.98.0(@swc/core@1.11.5))
|
||||
version: 9.5.2(typescript@5.8.2)(webpack@5.98.0(@swc/core@1.11.5)(esbuild@0.25.1))
|
||||
ts-node:
|
||||
specifier: ^10.9.2
|
||||
version: 10.9.2(@swc/core@1.11.5)(@types/node@22.13.8)(typescript@5.8.2)
|
||||
|
|
@ -306,6 +318,156 @@ packages:
|
|||
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
'@esbuild/aix-ppc64@0.25.1':
|
||||
resolution: {integrity: sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ppc64]
|
||||
os: [aix]
|
||||
|
||||
'@esbuild/android-arm64@0.25.1':
|
||||
resolution: {integrity: sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@esbuild/android-arm@0.25.1':
|
||||
resolution: {integrity: sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm]
|
||||
os: [android]
|
||||
|
||||
'@esbuild/android-x64@0.25.1':
|
||||
resolution: {integrity: sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
||||
'@esbuild/darwin-arm64@0.25.1':
|
||||
resolution: {integrity: sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@esbuild/darwin-x64@0.25.1':
|
||||
resolution: {integrity: sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@esbuild/freebsd-arm64@0.25.1':
|
||||
resolution: {integrity: sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [freebsd]
|
||||
|
||||
'@esbuild/freebsd-x64@0.25.1':
|
||||
resolution: {integrity: sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@esbuild/linux-arm64@0.25.1':
|
||||
resolution: {integrity: sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-arm@0.25.1':
|
||||
resolution: {integrity: sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-ia32@0.25.1':
|
||||
resolution: {integrity: sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ia32]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-loong64@0.25.1':
|
||||
resolution: {integrity: sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-mips64el@0.25.1':
|
||||
resolution: {integrity: sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [mips64el]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-ppc64@0.25.1':
|
||||
resolution: {integrity: sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-riscv64@0.25.1':
|
||||
resolution: {integrity: sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-s390x@0.25.1':
|
||||
resolution: {integrity: sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-x64@0.25.1':
|
||||
resolution: {integrity: sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/netbsd-arm64@0.25.1':
|
||||
resolution: {integrity: sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [netbsd]
|
||||
|
||||
'@esbuild/netbsd-x64@0.25.1':
|
||||
resolution: {integrity: sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [netbsd]
|
||||
|
||||
'@esbuild/openbsd-arm64@0.25.1':
|
||||
resolution: {integrity: sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [openbsd]
|
||||
|
||||
'@esbuild/openbsd-x64@0.25.1':
|
||||
resolution: {integrity: sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [openbsd]
|
||||
|
||||
'@esbuild/sunos-x64@0.25.1':
|
||||
resolution: {integrity: sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [sunos]
|
||||
|
||||
'@esbuild/win32-arm64@0.25.1':
|
||||
resolution: {integrity: sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@esbuild/win32-ia32@0.25.1':
|
||||
resolution: {integrity: sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
|
||||
'@esbuild/win32-x64@0.25.1':
|
||||
resolution: {integrity: sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@eslint-community/eslint-utils@4.4.1':
|
||||
resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
|
|
@ -782,6 +944,24 @@ packages:
|
|||
resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
|
||||
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
|
||||
|
||||
'@prisma/config@6.5.0':
|
||||
resolution: {integrity: sha512-sOH/2Go9Zer67DNFLZk6pYOHj+rumSb0VILgltkoxOjYnlLqUpHPAN826vnx8HigqnOCxj9LRhT6U7uLiIIWgw==}
|
||||
|
||||
'@prisma/debug@6.5.0':
|
||||
resolution: {integrity: sha512-fc/nusYBlJMzDmDepdUtH9aBsJrda2JNErP9AzuHbgUEQY0/9zQYZdNlXmKoIWENtio+qarPNe/+DQtrX5kMcQ==}
|
||||
|
||||
'@prisma/engines-version@6.5.0-73.173f8d54f8d52e692c7e27e72a88314ec7aeff60':
|
||||
resolution: {integrity: sha512-iK3EmiVGFDCmXjSpdsKGNqy9hOdLnvYBrJB61far/oP03hlIxrb04OWmDjNTwtmZ3UZdA5MCvI+f+3k2jPTflQ==}
|
||||
|
||||
'@prisma/engines@6.5.0':
|
||||
resolution: {integrity: sha512-FVPQYHgOllJklN9DUyujXvh3hFJCY0NX86sDmBErLvoZjy2OXGiZ5FNf3J/C4/RZZmCypZBYpBKEhx7b7rEsdw==}
|
||||
|
||||
'@prisma/fetch-engine@6.5.0':
|
||||
resolution: {integrity: sha512-3LhYA+FXP6pqY8FLHCjewyE8pGXXJ7BxZw2rhPq+CZAhvflVzq4K8Qly3OrmOkn6wGlz79nyLQdknyCG2HBTuA==}
|
||||
|
||||
'@prisma/get-platform@6.5.0':
|
||||
resolution: {integrity: sha512-xYcvyJwNMg2eDptBYFqFLUCfgi+wZLcj6HDMsj0Qw0irvauG4IKmkbywnqwok0B+k+W+p+jThM2DKTSmoPCkzw==}
|
||||
|
||||
'@sec-ant/readable-stream@0.4.1':
|
||||
resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==}
|
||||
|
||||
|
|
@ -993,6 +1173,9 @@ packages:
|
|||
'@types/supertest@6.0.2':
|
||||
resolution: {integrity: sha512-137ypx2lk/wTQbW6An6safu9hXmajAifU/s7szAHLN/FeIm5w7yR0Wkl9fdJMRSHwOn4HLAI0DaB2TOORuhPDg==}
|
||||
|
||||
'@types/validator@13.12.3':
|
||||
resolution: {integrity: sha512-2ipwZ2NydGQJImne+FhNdhgRM37e9lCev99KnqkbFHd94Xn/mErARWI1RSLem1QA19ch5kOhzIZd7e8CA2FI8g==}
|
||||
|
||||
'@types/yargs-parser@21.0.3':
|
||||
resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==}
|
||||
|
||||
|
|
@ -1250,6 +1433,9 @@ packages:
|
|||
asynckit@0.4.0:
|
||||
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
|
||||
|
||||
axios@1.8.4:
|
||||
resolution: {integrity: sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==}
|
||||
|
||||
b4a@1.6.7:
|
||||
resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==}
|
||||
|
||||
|
|
@ -1406,6 +1592,9 @@ packages:
|
|||
cjs-module-lexer@1.4.3:
|
||||
resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==}
|
||||
|
||||
class-validator@0.14.1:
|
||||
resolution: {integrity: sha512-2VEG9JICxIqTpoK1eMzZqaV+u/EiwEJkMGzTrZf6sU/fwsnOITVgYJ8yojSy6CaXtO9V0Cc6ZQZ8h8m4UBuLwQ==}
|
||||
|
||||
cli-cursor@3.1.0:
|
||||
resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==}
|
||||
engines: {node: '>=8'}
|
||||
|
|
@ -1680,6 +1869,16 @@ packages:
|
|||
resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
esbuild-register@3.6.0:
|
||||
resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==}
|
||||
peerDependencies:
|
||||
esbuild: '>=0.12 <1'
|
||||
|
||||
esbuild@0.25.1:
|
||||
resolution: {integrity: sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==}
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
|
||||
escalade@3.2.0:
|
||||
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
|
||||
engines: {node: '>=6'}
|
||||
|
|
@ -1883,6 +2082,15 @@ packages:
|
|||
flatted@3.3.3:
|
||||
resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==}
|
||||
|
||||
follow-redirects@1.15.9:
|
||||
resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==}
|
||||
engines: {node: '>=4.0'}
|
||||
peerDependencies:
|
||||
debug: '*'
|
||||
peerDependenciesMeta:
|
||||
debug:
|
||||
optional: true
|
||||
|
||||
foreground-child@3.3.1:
|
||||
resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}
|
||||
engines: {node: '>=14'}
|
||||
|
|
@ -2388,6 +2596,9 @@ packages:
|
|||
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
|
||||
libphonenumber-js@1.12.6:
|
||||
resolution: {integrity: sha512-PJiS4ETaUfCOFLpmtKzAbqZQjCCKVu2OhTV4SVNNE7c2nu/dACvtCqj4L0i/KWNnIgRv7yrILvBj5Lonv5Ncxw==}
|
||||
|
||||
lines-and-columns@1.2.4:
|
||||
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
|
||||
|
||||
|
|
@ -2732,6 +2943,16 @@ packages:
|
|||
resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
|
||||
prisma@6.5.0:
|
||||
resolution: {integrity: sha512-yUGXmWqv5F4PByMSNbYFxke/WbnyTLjnJ5bKr8fLkcnY7U5rU9rUTh/+Fja+gOrRxEgtCbCtca94IeITj4j/pg==}
|
||||
engines: {node: '>=18.18'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
typescript: '>=5.1.0'
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
|
||||
process-nextick-args@2.0.1:
|
||||
resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
|
||||
|
||||
|
|
@ -2743,6 +2964,9 @@ packages:
|
|||
resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==}
|
||||
engines: {node: '>= 0.10'}
|
||||
|
||||
proxy-from-env@1.1.0:
|
||||
resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
|
||||
|
||||
punycode@2.3.1:
|
||||
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
|
||||
engines: {node: '>=6'}
|
||||
|
|
@ -3273,6 +3497,10 @@ packages:
|
|||
resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==}
|
||||
engines: {node: '>=10.12.0'}
|
||||
|
||||
validator@13.15.0:
|
||||
resolution: {integrity: sha512-36B2ryl4+oL5QxZ3AzD0t5SsMNGvTtQHpjgFO5tbNxfXbMFkY822ktCDe1MnlqV3301QQI9SLHDNJokDI+Z9pA==}
|
||||
engines: {node: '>= 0.10'}
|
||||
|
||||
vary@1.1.2:
|
||||
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
|
@ -3623,6 +3851,81 @@ snapshots:
|
|||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.9
|
||||
|
||||
'@esbuild/aix-ppc64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/android-arm64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/android-arm@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/android-x64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/darwin-arm64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/darwin-x64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/freebsd-arm64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/freebsd-x64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-arm64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-arm@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-ia32@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-loong64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-mips64el@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-ppc64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-riscv64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-s390x@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-x64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/netbsd-arm64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/netbsd-x64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/openbsd-arm64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/openbsd-x64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/sunos-x64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/win32-arm64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/win32-ia32@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/win32-x64@0.25.1':
|
||||
optional: true
|
||||
|
||||
'@eslint-community/eslint-utils@4.4.1(eslint@9.21.0)':
|
||||
dependencies:
|
||||
eslint: 9.21.0
|
||||
|
|
@ -4086,7 +4389,7 @@ snapshots:
|
|||
'@napi-rs/nice-win32-x64-msvc': 1.0.1
|
||||
optional: true
|
||||
|
||||
'@nestjs/cli@11.0.5(@swc/cli@0.6.0(@swc/core@1.11.5)(chokidar@4.0.3))(@swc/core@1.11.5)(@types/node@22.13.8)':
|
||||
'@nestjs/cli@11.0.5(@swc/cli@0.6.0(@swc/core@1.11.5)(chokidar@4.0.3))(@swc/core@1.11.5)(@types/node@22.13.8)(esbuild@0.25.1)':
|
||||
dependencies:
|
||||
'@angular-devkit/core': 19.1.8(chokidar@4.0.3)
|
||||
'@angular-devkit/schematics': 19.1.8(chokidar@4.0.3)
|
||||
|
|
@ -4097,7 +4400,7 @@ snapshots:
|
|||
chokidar: 4.0.3
|
||||
cli-table3: 0.6.5
|
||||
commander: 4.1.1
|
||||
fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.7.3)(webpack@5.98.0(@swc/core@1.11.5))
|
||||
fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.7.3)(webpack@5.98.0(@swc/core@1.11.5)(esbuild@0.25.1))
|
||||
glob: 11.0.1
|
||||
node-emoji: 1.11.0
|
||||
ora: 5.4.1
|
||||
|
|
@ -4105,7 +4408,7 @@ snapshots:
|
|||
tsconfig-paths: 4.2.0
|
||||
tsconfig-paths-webpack-plugin: 4.2.0
|
||||
typescript: 5.7.3
|
||||
webpack: 5.98.0(@swc/core@1.11.5)
|
||||
webpack: 5.98.0(@swc/core@1.11.5)(esbuild@0.25.1)
|
||||
webpack-node-externals: 3.0.0
|
||||
optionalDependencies:
|
||||
'@swc/cli': 0.6.0(@swc/core@1.11.5)(chokidar@4.0.3)
|
||||
|
|
@ -4116,17 +4419,19 @@ snapshots:
|
|||
- uglify-js
|
||||
- webpack-cli
|
||||
|
||||
'@nestjs/common@11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2)':
|
||||
'@nestjs/common@11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2)':
|
||||
dependencies:
|
||||
iterare: 1.2.1
|
||||
reflect-metadata: 0.2.2
|
||||
rxjs: 7.8.2
|
||||
tslib: 2.8.1
|
||||
uid: 2.0.2
|
||||
optionalDependencies:
|
||||
class-validator: 0.14.1
|
||||
|
||||
'@nestjs/core@11.0.11(@nestjs/common@11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.0.11)(reflect-metadata@0.2.2)(rxjs@7.8.2)':
|
||||
'@nestjs/core@11.0.11(@nestjs/common@11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.0.11)(reflect-metadata@0.2.2)(rxjs@7.8.2)':
|
||||
dependencies:
|
||||
'@nestjs/common': 11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
'@nestjs/common': 11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
'@nuxt/opencollective': 0.4.1
|
||||
fast-safe-stringify: 2.1.1
|
||||
iterare: 1.2.1
|
||||
|
|
@ -4136,12 +4441,12 @@ snapshots:
|
|||
tslib: 2.8.1
|
||||
uid: 2.0.2
|
||||
optionalDependencies:
|
||||
'@nestjs/platform-express': 11.0.11(@nestjs/common@11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.11)
|
||||
'@nestjs/platform-express': 11.0.11(@nestjs/common@11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.11)
|
||||
|
||||
'@nestjs/platform-express@11.0.11(@nestjs/common@11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.11)':
|
||||
'@nestjs/platform-express@11.0.11(@nestjs/common@11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.11)':
|
||||
dependencies:
|
||||
'@nestjs/common': 11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
'@nestjs/core': 11.0.11(@nestjs/common@11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.0.11)(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
'@nestjs/common': 11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
'@nestjs/core': 11.0.11(@nestjs/common@11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.0.11)(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
cors: 2.8.5
|
||||
express: 5.0.1
|
||||
multer: 1.4.5-lts.1
|
||||
|
|
@ -4172,13 +4477,13 @@ snapshots:
|
|||
transitivePeerDependencies:
|
||||
- chokidar
|
||||
|
||||
'@nestjs/testing@11.0.11(@nestjs/common@11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.11)(@nestjs/platform-express@11.0.11)':
|
||||
'@nestjs/testing@11.0.11(@nestjs/common@11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.11)(@nestjs/platform-express@11.0.11)':
|
||||
dependencies:
|
||||
'@nestjs/common': 11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
'@nestjs/core': 11.0.11(@nestjs/common@11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.0.11)(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
'@nestjs/common': 11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
'@nestjs/core': 11.0.11(@nestjs/common@11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.0.11)(reflect-metadata@0.2.2)(rxjs@7.8.2)
|
||||
tslib: 2.8.1
|
||||
optionalDependencies:
|
||||
'@nestjs/platform-express': 11.0.11(@nestjs/common@11.0.11(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.11)
|
||||
'@nestjs/platform-express': 11.0.11(@nestjs/common@11.0.11(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.0.11)
|
||||
|
||||
'@nodelib/fs.scandir@2.1.5':
|
||||
dependencies:
|
||||
|
|
@ -4198,6 +4503,34 @@ snapshots:
|
|||
|
||||
'@pkgr/core@0.1.1': {}
|
||||
|
||||
'@prisma/config@6.5.0':
|
||||
dependencies:
|
||||
esbuild: 0.25.1
|
||||
esbuild-register: 3.6.0(esbuild@0.25.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@prisma/debug@6.5.0': {}
|
||||
|
||||
'@prisma/engines-version@6.5.0-73.173f8d54f8d52e692c7e27e72a88314ec7aeff60': {}
|
||||
|
||||
'@prisma/engines@6.5.0':
|
||||
dependencies:
|
||||
'@prisma/debug': 6.5.0
|
||||
'@prisma/engines-version': 6.5.0-73.173f8d54f8d52e692c7e27e72a88314ec7aeff60
|
||||
'@prisma/fetch-engine': 6.5.0
|
||||
'@prisma/get-platform': 6.5.0
|
||||
|
||||
'@prisma/fetch-engine@6.5.0':
|
||||
dependencies:
|
||||
'@prisma/debug': 6.5.0
|
||||
'@prisma/engines-version': 6.5.0-73.173f8d54f8d52e692c7e27e72a88314ec7aeff60
|
||||
'@prisma/get-platform': 6.5.0
|
||||
|
||||
'@prisma/get-platform@6.5.0':
|
||||
dependencies:
|
||||
'@prisma/debug': 6.5.0
|
||||
|
||||
'@sec-ant/readable-stream@0.4.1': {}
|
||||
|
||||
'@sinclair/typebox@0.27.8': {}
|
||||
|
|
@ -4413,6 +4746,8 @@ snapshots:
|
|||
'@types/methods': 1.1.4
|
||||
'@types/superagent': 8.1.9
|
||||
|
||||
'@types/validator@13.12.3': {}
|
||||
|
||||
'@types/yargs-parser@21.0.3': {}
|
||||
|
||||
'@types/yargs@17.0.33':
|
||||
|
|
@ -4735,6 +5070,14 @@ snapshots:
|
|||
|
||||
asynckit@0.4.0: {}
|
||||
|
||||
axios@1.8.4:
|
||||
dependencies:
|
||||
follow-redirects: 1.15.9
|
||||
form-data: 4.0.2
|
||||
proxy-from-env: 1.1.0
|
||||
transitivePeerDependencies:
|
||||
- debug
|
||||
|
||||
b4a@1.6.7: {}
|
||||
|
||||
babel-jest@29.7.0(@babel/core@7.26.9):
|
||||
|
|
@ -4936,6 +5279,12 @@ snapshots:
|
|||
|
||||
cjs-module-lexer@1.4.3: {}
|
||||
|
||||
class-validator@0.14.1:
|
||||
dependencies:
|
||||
'@types/validator': 13.12.3
|
||||
libphonenumber-js: 1.12.6
|
||||
validator: 13.15.0
|
||||
|
||||
cli-cursor@3.1.0:
|
||||
dependencies:
|
||||
restore-cursor: 3.1.0
|
||||
|
|
@ -5157,6 +5506,41 @@ snapshots:
|
|||
has-tostringtag: 1.0.2
|
||||
hasown: 2.0.2
|
||||
|
||||
esbuild-register@3.6.0(esbuild@0.25.1):
|
||||
dependencies:
|
||||
debug: 4.4.0
|
||||
esbuild: 0.25.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
esbuild@0.25.1:
|
||||
optionalDependencies:
|
||||
'@esbuild/aix-ppc64': 0.25.1
|
||||
'@esbuild/android-arm': 0.25.1
|
||||
'@esbuild/android-arm64': 0.25.1
|
||||
'@esbuild/android-x64': 0.25.1
|
||||
'@esbuild/darwin-arm64': 0.25.1
|
||||
'@esbuild/darwin-x64': 0.25.1
|
||||
'@esbuild/freebsd-arm64': 0.25.1
|
||||
'@esbuild/freebsd-x64': 0.25.1
|
||||
'@esbuild/linux-arm': 0.25.1
|
||||
'@esbuild/linux-arm64': 0.25.1
|
||||
'@esbuild/linux-ia32': 0.25.1
|
||||
'@esbuild/linux-loong64': 0.25.1
|
||||
'@esbuild/linux-mips64el': 0.25.1
|
||||
'@esbuild/linux-ppc64': 0.25.1
|
||||
'@esbuild/linux-riscv64': 0.25.1
|
||||
'@esbuild/linux-s390x': 0.25.1
|
||||
'@esbuild/linux-x64': 0.25.1
|
||||
'@esbuild/netbsd-arm64': 0.25.1
|
||||
'@esbuild/netbsd-x64': 0.25.1
|
||||
'@esbuild/openbsd-arm64': 0.25.1
|
||||
'@esbuild/openbsd-x64': 0.25.1
|
||||
'@esbuild/sunos-x64': 0.25.1
|
||||
'@esbuild/win32-arm64': 0.25.1
|
||||
'@esbuild/win32-ia32': 0.25.1
|
||||
'@esbuild/win32-x64': 0.25.1
|
||||
|
||||
escalade@3.2.0: {}
|
||||
|
||||
escape-html@1.0.3: {}
|
||||
|
|
@ -5420,12 +5804,14 @@ snapshots:
|
|||
|
||||
flatted@3.3.3: {}
|
||||
|
||||
follow-redirects@1.15.9: {}
|
||||
|
||||
foreground-child@3.3.1:
|
||||
dependencies:
|
||||
cross-spawn: 7.0.6
|
||||
signal-exit: 4.1.0
|
||||
|
||||
fork-ts-checker-webpack-plugin@9.0.2(typescript@5.7.3)(webpack@5.98.0(@swc/core@1.11.5)):
|
||||
fork-ts-checker-webpack-plugin@9.0.2(typescript@5.7.3)(webpack@5.98.0(@swc/core@1.11.5)(esbuild@0.25.1)):
|
||||
dependencies:
|
||||
'@babel/code-frame': 7.26.2
|
||||
chalk: 4.1.2
|
||||
|
|
@ -5440,7 +5826,7 @@ snapshots:
|
|||
semver: 7.7.1
|
||||
tapable: 2.2.1
|
||||
typescript: 5.7.3
|
||||
webpack: 5.98.0(@swc/core@1.11.5)
|
||||
webpack: 5.98.0(@swc/core@1.11.5)(esbuild@0.25.1)
|
||||
|
||||
form-data-encoder@2.1.4: {}
|
||||
|
||||
|
|
@ -6094,6 +6480,8 @@ snapshots:
|
|||
prelude-ls: 1.2.1
|
||||
type-check: 0.4.0
|
||||
|
||||
libphonenumber-js@1.12.6: {}
|
||||
|
||||
lines-and-columns@1.2.4: {}
|
||||
|
||||
loader-runner@4.3.0: {}
|
||||
|
|
@ -6375,6 +6763,16 @@ snapshots:
|
|||
ansi-styles: 5.2.0
|
||||
react-is: 18.3.1
|
||||
|
||||
prisma@6.5.0(typescript@5.8.2):
|
||||
dependencies:
|
||||
'@prisma/config': 6.5.0
|
||||
'@prisma/engines': 6.5.0
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.3
|
||||
typescript: 5.8.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
process-nextick-args@2.0.1: {}
|
||||
|
||||
prompts@2.4.2:
|
||||
|
|
@ -6387,6 +6785,8 @@ snapshots:
|
|||
forwarded: 0.2.0
|
||||
ipaddr.js: 1.9.1
|
||||
|
||||
proxy-from-env@1.1.0: {}
|
||||
|
||||
punycode@2.3.1: {}
|
||||
|
||||
pure-rand@6.1.0: {}
|
||||
|
|
@ -6738,16 +7138,17 @@ snapshots:
|
|||
fast-fifo: 1.3.2
|
||||
streamx: 2.22.0
|
||||
|
||||
terser-webpack-plugin@5.3.12(@swc/core@1.11.5)(webpack@5.98.0(@swc/core@1.11.5)):
|
||||
terser-webpack-plugin@5.3.12(@swc/core@1.11.5)(esbuild@0.25.1)(webpack@5.98.0(@swc/core@1.11.5)(esbuild@0.25.1)):
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.25
|
||||
jest-worker: 27.5.1
|
||||
schema-utils: 4.3.0
|
||||
serialize-javascript: 6.0.2
|
||||
terser: 5.39.0
|
||||
webpack: 5.98.0(@swc/core@1.11.5)
|
||||
webpack: 5.98.0(@swc/core@1.11.5)(esbuild@0.25.1)
|
||||
optionalDependencies:
|
||||
'@swc/core': 1.11.5
|
||||
esbuild: 0.25.1
|
||||
|
||||
terser@5.39.0:
|
||||
dependencies:
|
||||
|
|
@ -6791,7 +7192,7 @@ snapshots:
|
|||
dependencies:
|
||||
typescript: 5.8.2
|
||||
|
||||
ts-jest@29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(jest@29.7.0(@types/node@22.13.8)(ts-node@10.9.2(@swc/core@1.11.5)(@types/node@22.13.8)(typescript@5.8.2)))(typescript@5.8.2):
|
||||
ts-jest@29.2.6(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(esbuild@0.25.1)(jest@29.7.0(@types/node@22.13.8)(ts-node@10.9.2(@swc/core@1.11.5)(@types/node@22.13.8)(typescript@5.8.2)))(typescript@5.8.2):
|
||||
dependencies:
|
||||
bs-logger: 0.2.6
|
||||
ejs: 3.1.10
|
||||
|
|
@ -6809,8 +7210,9 @@ snapshots:
|
|||
'@jest/transform': 29.7.0
|
||||
'@jest/types': 29.6.3
|
||||
babel-jest: 29.7.0(@babel/core@7.26.9)
|
||||
esbuild: 0.25.1
|
||||
|
||||
ts-loader@9.5.2(typescript@5.8.2)(webpack@5.98.0(@swc/core@1.11.5)):
|
||||
ts-loader@9.5.2(typescript@5.8.2)(webpack@5.98.0(@swc/core@1.11.5)(esbuild@0.25.1)):
|
||||
dependencies:
|
||||
chalk: 4.1.2
|
||||
enhanced-resolve: 5.18.1
|
||||
|
|
@ -6818,7 +7220,7 @@ snapshots:
|
|||
semver: 7.7.1
|
||||
source-map: 0.7.4
|
||||
typescript: 5.8.2
|
||||
webpack: 5.98.0(@swc/core@1.11.5)
|
||||
webpack: 5.98.0(@swc/core@1.11.5)(esbuild@0.25.1)
|
||||
|
||||
ts-node@10.9.2(@swc/core@1.11.5)(@types/node@22.13.8)(typescript@5.8.2):
|
||||
dependencies:
|
||||
|
|
@ -6929,6 +7331,8 @@ snapshots:
|
|||
'@types/istanbul-lib-coverage': 2.0.6
|
||||
convert-source-map: 2.0.0
|
||||
|
||||
validator@13.15.0: {}
|
||||
|
||||
vary@1.1.2: {}
|
||||
|
||||
walker@1.0.8:
|
||||
|
|
@ -6948,7 +7352,7 @@ snapshots:
|
|||
|
||||
webpack-sources@3.2.3: {}
|
||||
|
||||
webpack@5.98.0(@swc/core@1.11.5):
|
||||
webpack@5.98.0(@swc/core@1.11.5)(esbuild@0.25.1):
|
||||
dependencies:
|
||||
'@types/eslint-scope': 3.7.7
|
||||
'@types/estree': 1.0.6
|
||||
|
|
@ -6970,7 +7374,7 @@ snapshots:
|
|||
neo-async: 2.6.2
|
||||
schema-utils: 4.3.0
|
||||
tapable: 2.2.1
|
||||
terser-webpack-plugin: 5.3.12(@swc/core@1.11.5)(webpack@5.98.0(@swc/core@1.11.5))
|
||||
terser-webpack-plugin: 5.3.12(@swc/core@1.11.5)(esbuild@0.25.1)(webpack@5.98.0(@swc/core@1.11.5)(esbuild@0.25.1))
|
||||
watchpack: 2.4.2
|
||||
webpack-sources: 3.2.3
|
||||
transitivePeerDependencies:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
// This is your Prisma schema file,
|
||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||
|
||||
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
|
||||
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
import { Controller, Get } from '@nestjs/common';
|
||||
import { AppService } from './app.service';
|
||||
import { MufapiController } from './mufapi/mufapi.controller';
|
||||
|
||||
@Controller()
|
||||
export class AppController {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { AppController } from './app.controller';
|
||||
import { AppService } from './app.service';
|
||||
import { DatabaseModule } from './database/database.module';
|
||||
import { MufapiModule } from './mufapi/mufapi.module';
|
||||
|
||||
@Module({
|
||||
imports: [],
|
||||
imports: [DatabaseModule, MufapiModule],
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
exports: [],
|
||||
})
|
||||
export class AppModule {}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@ import { Injectable } from '@nestjs/common';
|
|||
@Injectable()
|
||||
export class AppService {
|
||||
getHello(): string {
|
||||
return 'Hello World!';
|
||||
return 'Hello New World!';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { DatabaseService } from './database.service';
|
||||
|
||||
@Module({
|
||||
providers: [DatabaseService],
|
||||
exports: [DatabaseService],
|
||||
})
|
||||
export class DatabaseModule {}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { DatabaseService } from './database.service';
|
||||
|
||||
describe('DatabaseService', () => {
|
||||
let service: DatabaseService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [DatabaseService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<DatabaseService>(DatabaseService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class DatabaseService {}
|
||||
|
|
@ -3,8 +3,8 @@ import { AppModule } from './app.module';
|
|||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
await app.listen(process.env.PORT ?? 9090);
|
||||
await app.listen(process.env.PORT ?? 9990);
|
||||
//await app.listen(process.env.PORT ?? 3000);
|
||||
//tr
|
||||
|
||||
}
|
||||
bootstrap();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { MufapiController } from './mufapi.controller';
|
||||
|
||||
describe('MufapiController', () => {
|
||||
let controller: MufapiController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [MufapiController],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<MufapiController>(MufapiController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
import { Controller, Get, Post } from '@nestjs/common';
|
||||
import { MufapiService } from './mufapi.service';
|
||||
|
||||
@Controller('api')
|
||||
export class MufapiController {
|
||||
constructor(private readonly mufapiService: MufapiService) {}
|
||||
|
||||
@Get()
|
||||
async getHello() {
|
||||
let token = this.mufapiService.getAccessToken();
|
||||
return token;
|
||||
}
|
||||
|
||||
@Post('menu')
|
||||
getMenu () {
|
||||
let menu = this.mufapiService.getMenu();
|
||||
return menu;
|
||||
}
|
||||
|
||||
}
|
||||
|
Ghost
commented
Outdated
Review
Код стайл, пробел после равно Код стайл, пробел после равно
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { MufapiService } from './mufapi.service';
|
||||
import { MufapiController } from './mufapi.controller';
|
||||
|
||||
@Module({
|
||||
providers: [MufapiService],
|
||||
controllers: [MufapiController]
|
||||
})
|
||||
export class MufapiModule {}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { MufapiService } from './mufapi.service';
|
||||
|
||||
describe('MufapiService', () => {
|
||||
let service: MufapiService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [MufapiService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<MufapiService>(MufapiService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import axios from 'axios';
|
||||
import { error } from 'console';
|
||||
import { response } from 'express';
|
||||
import { Interface } from 'readline';
|
||||
|
||||
//====================Начнем=================================
|
||||
@Injectable()
|
||||
//Класс для подключения и получения токена, потом расширим, если звезда засветит
|
||||
export class ConnectorsService {
|
||||
user : string; //логин на стороне сервака
|
||||
password : string; //пароль к логину на стороне сервака
|
||||
path : string; // путь, куда стучимся
|
||||
creds : string; //правильная строка - солянка из логина и пароля, чем стучимся
|
||||
options : any; //в основном здесь хидеры, а то без них не хочет работать
|
||||
body: string;
|
||||
|
||||
//Замечательный метод класса для инициализации свойств класса, сейчас в ручную, в дальнейшем планируется автоматом из конфы
|
||||
SetConnData() {
|
||||
this.user = "admin";
|
||||
this.password = "admin";
|
||||
this.path = 'http://192.168.244.1/e-data-front/auth/login';
|
||||
this.creds = '{"login":"' + this.user + '","password":"' + this.password + '"}';
|
||||
this.options = {
|
||||
headers: {'Content-Type' : 'application/json'}
|
||||
};
|
||||
return 0;
|
||||
};
|
||||
|
||||
//Замечетельный метод, пока не придумал назначение, но если есть Get, то должен быть и Set
|
||||
GetConnData() {
|
||||
|
||||
};
|
||||
|
||||
//Пробуем получить данные для меню
|
||||
SetMenuData (token : string){
|
||||
this.path = 'http://192.168.244.1/e-cmdb/api/query';
|
||||
|
Ghost
commented
Review
как и в примере выше, и тут не стоит забывать использовать переменные окружения (на будущее) как и в примере выше, и тут не стоит забывать использовать переменные окружения (на будущее)
|
||||
this.body = '{"id":["/measures/device$18"],"data":{"links":{"flatten":true,"filter":{"cls":"measure"},"fields":["$id","id","cls","name"]}},"postQuery":"links","enableActions":false,"ts":1740060679399}';
|
||||
this.options = {
|
||||
headers: {'Content-Type' : 'application/json', 'access-token' : token}
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
//Класс основных методов для получения, обработки данных и дальнейшей пересылки в Exporter
|
||||
@Injectable()
|
||||
export class MufapiService {
|
||||
|
||||
token: string; //Глобальная переменная класса под токен
|
||||
//Получение токена через шаблонизацию
|
||||
async getAccessToken () {
|
||||
interface Authtorise {
|
||||
access_token: string;
|
||||
};
|
||||
|
||||
let connService : ConnectorsService = new ConnectorsService;
|
||||
connService.SetConnData();
|
||||
|
||||
let auth : Authtorise;
|
||||
this.token = 'Error';
|
||||
|
||||
await axios.post(connService.path, connService.creds, connService.options).then((response)=>{
|
||||
auth = response.data;
|
||||
this.token = auth.access_token;
|
||||
}).catch((error)=>{
|
||||
this.token = error;
|
||||
});
|
||||
|
||||
return this.token;
|
||||
}
|
||||
//Получение данных для формирования меню в МУФ
|
||||
|
Ghost
commented
Outdated
Review
? ?
|
||||
async getMenu () {
|
||||
interface MenuController {
|
||||
id: number,
|
||||
name: string,
|
||||
}
|
||||
|
||||
await this.getAccessToken();
|
||||
|
||||
let connService : ConnectorsService = new ConnectorsService;
|
||||
connService.SetMenuData(this.token);
|
||||
|
||||
//let resp : MenuController;
|
||||
let resp : string = '';
|
||||
console.log(connService.path);
|
||||
console.log(connService.body);
|
||||
await axios.post(connService.path, connService.body, connService.options).then((response)=>{
|
||||
resp = JSON.parse(response.data);
|
||||
//this.token=resp[1].name;
|
||||
//this.token = auth.access_token;
|
||||
console.log(resp);
|
||||
}).catch((error)=>{
|
||||
this.token = error;
|
||||
});
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
.env.example
необходимо добавить в
.gitignoreэтот файл и вести аналогичный (.env.example) файл для объявления всех переменных с недействительными значениямиздесь далее будут креды и подобная конфиденциальная информация, хранить в репозитории это открыто - неправильно
Пример: