Skip to content

Commit dea71df

Browse files
Merge pull request #15 from The-Sebastian/main
renamed algorithm file names and fixed icon issue for mac
2 parents 4f3ccdd + 0147765 commit dea71df

10 files changed

Lines changed: 14 additions & 11 deletions

File tree

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
"build/icon.*"
1111
],
1212
"win": {
13-
"icon": "src/axonicon_UWT_icon.ico"
13+
"icon": "src/axonDesktopIcon.ico"
14+
},
15+
"mac":{
16+
"icon": "src/axonDesktopIcon.ico"
1417
}
1518
},
1619
"scripts": {

src/app/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import RootComponent from '@/app/root';
33
import Particles from 'particlesjs';
4-
import logo from '../../assets/AxonFinalLogo.png';
4+
import logo from '../../assets/AxonTitleIcon.png';
55

66

77

src/axonDesktopIcon.ico

41.3 KB
Binary file not shown.

src/axonicon_UWT_icon.ico

-49.3 KB
Binary file not shown.

src/utils/buildPathObject.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import tempFindEndpointData from './utilityFunctions/tempFindEndpointData';
2-
import { tempIdentifyFileType } from './utilityFunctions/tempIdentifyFileType';
1+
import FindEndpointData from './utilityFunctions/FindEndpointData';
2+
import { IdentifyFileType } from './utilityFunctions/IdentifyFileType';
33

44
/**
55
* When a server folder is uploaded, it is converted to a 'flat' array-like FileList object.
@@ -28,7 +28,7 @@ export default function (fileList:any) {
2828
// When the file is read sucessfully
2929
.then((fileText) => {
3030
// Identify the type of file
31-
const { fileType, portNumber } = tempIdentifyFileType(fileText);
31+
const { fileType, portNumber } = IdentifyFileType(fileText);
3232

3333
// When the type of file is a server, add the server path to the pathObject
3434
if (fileType === 'Server') {
@@ -41,7 +41,7 @@ export default function (fileList:any) {
4141
// When the file is a server or router file
4242
if (fileType === 'Server' || fileType === 'Router') {
4343
// Extract necessary route and endpoint data from fileText
44-
const { imports, endpoints, routers } = tempFindEndpointData(fileText, fileList[i].webkitRelativePath);
44+
const { imports, endpoints, routers } = FindEndpointData(fileText, fileList[i].webkitRelativePath);
4545
// Add relevant data to the new file object
4646
newFileObject = {
4747
name: fileList[i].name,

src/utils/utilityFunctions/tempFindEndpointData.ts renamed to src/utils/utilityFunctions/FindEndpointData.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import tempResolvePath from './tempResolvePath';
2-
import tempFuncDefinitionParser from './tempFuncDefinitionParser';
1+
import ResolvePath from './ResolvePath';
2+
import FuncDefinitionParser from './FuncDefinitionParser';
33

44
const AbstractSyntaxTree = require('abstract-syntax-tree');
55

@@ -54,7 +54,7 @@ export default function (fileText: string, currentFilePath:string) {
5454
const importPath = statement.declarations[0].init.arguments[0].value;
5555

5656
// Add the imported module to the imports object on the fileObject
57-
fileObject.imports[importName] = tempResolvePath(importPath, currentFilePath);
57+
fileObject.imports[importName] = ResolvePath(importPath, currentFilePath);
5858
}
5959
}
6060
}
@@ -90,7 +90,7 @@ export default function (fileText: string, currentFilePath:string) {
9090
}
9191

9292
// Convert the anonymous function, which is the last argument, into an object of the endpoint data
93-
endpointArray[endpointArray.length - 1] = tempFuncDefinitionParser(endpointArray[endpointArray.length - 1]);
93+
endpointArray[endpointArray.length - 1] = FuncDefinitionParser(endpointArray[endpointArray.length - 1]);
9494

9595
// Add the Endpoint Array to the Endpoints object
9696
if (fileObject.endpoints[route]) {
File renamed without changes.

src/utils/utilityFunctions/tempIdentifyFileType.ts renamed to src/utils/utilityFunctions/IdentifyFileType.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* fileType: will be 'Server', 'Router' or 'Other'
77
* portNumber: will be a string or null
88
*/
9-
export function tempIdentifyFileType(fileText:any) :any {
9+
export function IdentifyFileType(fileText:any) :any {
1010

1111
// Attempt to match a port number in the current file
1212
const dotListenRE = /\.listen\((?<port>.*?)(?=,|\))/i;
File renamed without changes.

0 commit comments

Comments
 (0)