Browse Source

fix for deploy

rajah 5 tháng trước cách đây
mục cha
commit
e80afb1259

+ 3 - 1
angular.json

@@ -15,6 +15,7 @@
           "builder": "@angular/build:application",
           "options": {
             "outputPath": "dist/demovote-frontend",
+            "baseHref": "./",
             "index": "src/index.html",
             "browser": "src/main.ts",
             "polyfills": [
@@ -57,7 +58,8 @@
             "development": {
               "optimization": false,
               "extractLicenses": false,
-              "sourceMap": true
+              "sourceMap": true,
+              "fileReplacements": [ { "replace": "src/app/env.ts", "with": "src/app/env.dev.ts" }]
             }
           },
           "defaultConfiguration": "production"

+ 2 - 9
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "demovote-frontend",
-  "version": "0.0.0",
+  "version": "0.1.0",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "demovote-frontend",
-      "version": "0.0.0",
+      "version": "0.1.0",
       "dependencies": {
         "@angular/animations": "^20.0.4",
         "@angular/common": "^20.0.4",
@@ -27,7 +27,6 @@
         "ngx-bootstrap": "^19.0.2",
         "popper.js": "^1.16.1",
         "rxjs": "~7.8.0",
-        "spark-md5": "^3.0.2",
         "spark-md5-es": "^3.0.2",
         "tslib": "^2.3.0",
         "vite": "^6.3.4",
@@ -8476,12 +8475,6 @@
         "node": ">=0.10.0"
       }
     },
-    "node_modules/spark-md5": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.2.tgz",
-      "integrity": "sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==",
-      "license": "(WTFPL OR MIT)"
-    },
     "node_modules/spark-md5-es": {
       "version": "3.0.2",
       "resolved": "https://registry.npmjs.org/spark-md5-es/-/spark-md5-es-3.0.2.tgz",

+ 0 - 1
package.json

@@ -29,7 +29,6 @@
     "ngx-bootstrap": "^19.0.2",
     "popper.js": "^1.16.1",
     "rxjs": "~7.8.0",
-    "spark-md5": "^3.0.2",
     "spark-md5-es": "^3.0.2",
     "tslib": "^2.3.0",
     "vite": "^6.3.4",

+ 1 - 0
src/app/composants/production-create/production-create.component.d.ts

@@ -0,0 +1 @@
+declare module 'spark-md5-es';

+ 1 - 1
src/app/composants/production-create/production-create.component.ts

@@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild, ElementRef, Renderer2 } from '@angular/co
 import { Router } from '@angular/router';
 import { FormsModule, NgForm } from '@angular/forms';
 import { HttpErrorResponse } from '@angular/common/http'
-import * as SparkMD5 from 'spark-md5';
+import * as SparkMD5 from 'spark-md5-es';
 
 import { MenuComponent } from '../menu/menu.component';
 import { Production, ProductionEnum, ProductionTypeList } from '../../interfaces/production';

+ 1 - 0
src/app/composants/production-upload/production-upload.component.d.ts

@@ -0,0 +1 @@
+declare module 'spark-md5-es';

+ 1 - 1
src/app/composants/production-upload/production-upload.component.ts

@@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild, ElementRef, Renderer2 } from '@angular/co
 import { ActivatedRoute, Router } from '@angular/router';
 import { FormsModule, NgForm } from '@angular/forms';
 import { HttpClient, HttpErrorResponse } from '@angular/common/http'
-import * as SparkMD5 from 'spark-md5';
+import * as SparkMD5 from 'spark-md5-es';
 
 import { Environnement } from '../../env';
 import { MenuComponent } from '../menu/menu.component';

+ 5 - 0
src/app/env.dev.ts

@@ -0,0 +1,5 @@
+
+export const Environnement =
+{
+	apiUrl: 'https://localhost:8443/demovote-api/v1/'
+};

+ 1 - 1
src/app/env.ts

@@ -1,5 +1,5 @@
 
 export const Environnement =
 {
-	apiUrl: 'https://localhost:8443/demovote-api/v1/'
+	apiUrl: 'https://www.triplea.fr/demovote-api/v1/'
 };