Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App refresh + Angular 18 upgrade #8

Merged
merged 5 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .browserslistrc

This file was deleted.

17 changes: 0 additions & 17 deletions .gitattributes

This file was deleted.

24 changes: 10 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,46 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# compiled output
# Compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
# Node
/node_modules

# profiling files
chrome-profiler-events*.json
npm-debug.log
yarn-error.log

# IDEs and editors
/.idea
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
# Miscellaneous
/.angular/cache
/.sass-cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
# System files
.DS_Store
Thumbs.db
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"recommendations": [
"ms-azuretools.vscode-azurefunctions"
]
}
}
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"name": "Attach to Node Functions",
"type": "node",
"request": "attach",
"restart": true,
"port": 9229,
"preLaunchTask": "func: host start"
}
Expand Down
21 changes: 0 additions & 21 deletions LICENSE.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# pmark.pt

https://pmark.pt built with Angular 16.x
https://pmark.pt built with Angular 18.x
72 changes: 22 additions & 50 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,61 +6,47 @@
"pmark-pt-app": {
"projectType": "application",
"schematics": {
"@schematics/angular:application": {
"strict": true
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/pmark-pt-app",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"browser": "src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/custom-theme.scss",
"src/styles.css"
],
"inlineStyleLanguage": "scss",
"assets": ["src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
"maximumWarning": "500kB",
"maximumError": "1MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
"maximumWarning": "2kB",
"maximumError": "4kB"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
"sourceMap": true
}
},
"defaultConfiguration": "production"
Expand All @@ -69,43 +55,29 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "pmark-pt-app:build:production"
"buildTarget": "pmark-pt-app:build:production"
},
"development": {
"browserTarget": "pmark-pt-app:build:development"
"buildTarget": "pmark-pt-app:build:development"
}
},
"defaultConfiguration": "development",
"options": {
"browserTarget": "pmark-pt-app:build",
"proxyConfig": "src/proxy.conf.json"
}
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "pmark-pt-app:build"
}
"builder": "@angular-devkit/build-angular:extract-i18n"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"inlineStyleLanguage": "scss",
"assets": ["src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
}
}
}
}
},
"defaultProject": "pmark-pt-app"
}
}
3 changes: 3 additions & 0 deletions api/.funcignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
*.ts
.git*
.vscode
__azurite_db*__.json
__blobstorage__
__queuestorage__
local.settings.json
test
tsconfig.json
2 changes: 1 addition & 1 deletion api/mods/function.json → api/GetModDetails/function.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [ "get" ],
"methods": ["get"],
"route": "mods/{domainName}/{id:int?}"
},
{
Expand Down
52 changes: 52 additions & 0 deletions api/GetModDetails/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// module.exports = async function (context, req) {
// context.log('JavaScript HTTP trigger function processed a request.');

// const name = (req.query.name || (req.body && req.body.name));
// const responseMessage = name
// ? "Hello, " + name + ". This HTTP triggered function executed successfully."
// : "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.";

// context.res = {
// // status: 200, /* Defaults to 200 */
// body: responseMessage
// };
// }

module.exports = function (context, req) {
var https = require("https");

var domainName = context.bindingData.domainName;
var modId = context.bindingData.id;
var options = {
host: "api.nexusmods.com",
path: `/v1/games/${domainName}/mods/${modId}`,
//headers: { apiKey: process.env.NEXUS_API_KEY },
headers: { apiKey: "cUJtMTFqeHRINEw2cWNwVHk0aWJrTUJvL3p1TzZZN0hkdkttYnJoeEgwZz0tLTlXamVpM3ZTcEdXWU4yZ1VGa0g0Snc9PQ==--99485e65241a65fb4b8eceb8bfaa51b9633b3fe7" },
method: "GET",
};

var response = "";
const request = https.request(options, (res) => {
context.log(`statusCode: ${res.statusCode}`);

res.on("data", (d) => {
response += d;
});

res.on("end", (d) => {
context.res = {
status: res.statusCode,
body: JSON.parse(response),
headers: { "Content-Type": "application/json" },
};
context.done();
});
});

request.on("error", (error) => {
context.log.error(error);
context.done();
});

request.end();
};
File renamed without changes.
4 changes: 2 additions & 2 deletions api/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
"version": "[4.*, 5.0.0)"
}
}
}
37 changes: 0 additions & 37 deletions api/mods/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
},
"dependencies": {},
"devDependencies": {}
}
}
Loading
Loading