From 8743824046dbde33d338db09bc03893cb23a5fec Mon Sep 17 00:00:00 2001 From: TheSparta <8343238+TheSpartaPT@users.noreply.github.com> Date: Sun, 19 May 2024 16:52:47 +0100 Subject: [PATCH] general cleanup of config files and build script - removed "os" devDependency, as it's an internal module and should've never been set as a devDependency in package.json - general cleanup and restructure of package.json, indent with 4 spaces, moved a few properties around so it's more readable - indent workspace file with 4 spaces - added refringe.spt-id-highlighter to the recommended extensions - removed the "-version" from the zip and folder name the build script was generating - added /tmp to .eslintignore --- TypeScript/10ScopesAndTypes/.eslintignore | 7 +++--- TypeScript/10ScopesAndTypes/build.mjs | 12 ++++------ .../10ScopesAndTypes/mod.code-workspace | 21 ++++++++-------- TypeScript/10ScopesAndTypes/package.json | 18 +++++++------- TypeScript/10ScopesAndTypes/tsconfig.json | 4 ++-- .../11BundleLoadingSample/.eslintignore | 7 +++--- TypeScript/11BundleLoadingSample/build.mjs | 12 ++++------ .../11BundleLoadingSample/mod.code-workspace | 21 ++++++++-------- TypeScript/11BundleLoadingSample/package.json | 23 +++++++++--------- .../11BundleLoadingSample/tsconfig.json | 4 ++-- .../12ClassExtensionOverride/.eslintignore | 7 +++--- TypeScript/12ClassExtensionOverride/build.mjs | 12 ++++------ .../mod.code-workspace | 21 ++++++++-------- .../12ClassExtensionOverride/package.json | 18 +++++++------- .../12ClassExtensionOverride/tsconfig.json | 4 ++-- TypeScript/13AddTrader/.eslintignore | 7 +++--- TypeScript/13AddTrader/build.mjs | 12 ++++------ TypeScript/13AddTrader/mod.code-workspace | 21 ++++++++-------- TypeScript/13AddTrader/package.json | 18 +++++++------- TypeScript/13AddTrader/tsconfig.json | 4 ++-- TypeScript/14AfterDBLoadHook/.eslintignore | 7 +++--- TypeScript/14AfterDBLoadHook/build.mjs | 12 ++++------ .../14AfterDBLoadHook/mod.code-workspace | 21 ++++++++-------- TypeScript/14AfterDBLoadHook/package.json | 18 +++++++------- TypeScript/14AfterDBLoadHook/tsconfig.json | 4 ++-- .../15HttpListenerExample/.eslintignore | 7 +++--- TypeScript/15HttpListenerExample/build.mjs | 12 ++++------ .../15HttpListenerExample/mod.code-workspace | 21 ++++++++-------- TypeScript/15HttpListenerExample/package.json | 18 +++++++------- .../15HttpListenerExample/tsconfig.json | 4 ++-- TypeScript/16ImporterUtil/.eslintignore | 7 +++--- TypeScript/16ImporterUtil/build.mjs | 12 ++++------ TypeScript/16ImporterUtil/mod.code-workspace | 21 ++++++++-------- TypeScript/16ImporterUtil/package.json | 18 +++++++------- TypeScript/16ImporterUtil/tsconfig.json | 4 ++-- .../.eslintignore | 7 +++--- .../17AsyncImporterWithDependency1/build.mjs | 12 ++++------ .../mod.code-workspace | 21 ++++++++-------- .../package.json | 24 +++++++++---------- .../tsconfig.json | 4 ++-- .../.eslintignore | 7 +++--- .../17AsyncImporterWithDependency2/build.mjs | 12 ++++------ .../mod.code-workspace | 21 ++++++++-------- .../package.json | 18 +++++++------- .../tsconfig.json | 4 ++-- TypeScript/18CustomItemService/.eslintignore | 7 +++--- TypeScript/18CustomItemService/build.mjs | 12 ++++------ .../18CustomItemService/mod.code-workspace | 21 ++++++++-------- TypeScript/18CustomItemService/package.json | 18 +++++++------- TypeScript/18CustomItemService/tsconfig.json | 4 ++-- .../19UseExternalLibraries/.eslintignore | 7 +++--- TypeScript/19UseExternalLibraries/build.mjs | 12 ++++------ .../19UseExternalLibraries/mod.code-workspace | 21 ++++++++-------- .../19UseExternalLibraries/package.json | 24 +++++++++---------- .../19UseExternalLibraries/tsconfig.json | 4 ++-- TypeScript/1LogToConsole/.eslintignore | 7 +++--- TypeScript/1LogToConsole/build.mjs | 12 ++++------ TypeScript/1LogToConsole/mod.code-workspace | 21 ++++++++-------- TypeScript/1LogToConsole/package.json | 19 +++++++-------- TypeScript/1LogToConsole/tsconfig.json | 4 ++-- TypeScript/20CustomChatBot/.eslintignore | 7 +++--- TypeScript/20CustomChatBot/build.mjs | 12 ++++------ TypeScript/20CustomChatBot/mod.code-workspace | 21 ++++++++-------- TypeScript/20CustomChatBot/package.json | 18 +++++++------- TypeScript/20CustomChatBot/tsconfig.json | 4 ++-- .../21CustomCommandoCommand/.eslintignore | 7 +++--- TypeScript/21CustomCommandoCommand/build.mjs | 12 ++++------ .../mod.code-workspace | 21 ++++++++-------- .../21CustomCommandoCommand/package.json | 18 +++++++------- .../21CustomCommandoCommand/tsconfig.json | 4 ++-- TypeScript/22CustomAkiCommand/.eslintignore | 7 +++--- TypeScript/22CustomAkiCommand/build.mjs | 12 ++++------ .../22CustomAkiCommand/mod.code-workspace | 21 ++++++++-------- TypeScript/22CustomAkiCommand/package.json | 18 +++++++------- TypeScript/22CustomAkiCommand/tsconfig.json | 4 ++-- .../23CustomAbstractChatBot/.eslintignore | 7 +++--- TypeScript/23CustomAbstractChatBot/build.mjs | 12 ++++------ .../mod.code-workspace | 21 ++++++++-------- .../23CustomAbstractChatBot/package.json | 18 +++++++------- .../23CustomAbstractChatBot/tsconfig.json | 4 ++-- TypeScript/24WebSocket/.eslintignore | 7 +++--- TypeScript/24WebSocket/build.mjs | 12 ++++------ TypeScript/24WebSocket/mod.code-workspace | 21 ++++++++-------- TypeScript/24WebSocket/package.json | 18 +++++++------- TypeScript/24WebSocket/tsconfig.json | 4 ++-- TypeScript/2EditDatabase/.eslintignore | 7 +++--- TypeScript/2EditDatabase/build.mjs | 12 ++++------ TypeScript/2EditDatabase/mod.code-workspace | 21 ++++++++-------- TypeScript/2EditDatabase/package.json | 19 +++++++-------- TypeScript/2EditDatabase/tsconfig.json | 4 ++-- TypeScript/3GetSptConfigFile/.eslintignore | 7 +++--- TypeScript/3GetSptConfigFile/build.mjs | 12 ++++------ .../3GetSptConfigFile/mod.code-workspace | 21 ++++++++-------- TypeScript/3GetSptConfigFile/package.json | 19 +++++++-------- TypeScript/3GetSptConfigFile/tsconfig.json | 4 ++-- .../.eslintignore | 7 +++--- .../build.mjs | 12 ++++------ .../mod.code-workspace | 21 ++++++++-------- .../package.json | 18 +++++++------- .../tsconfig.json | 4 ++-- .../4UseACustomConfigFile/.eslintignore | 7 +++--- TypeScript/4UseACustomConfigFile/build.mjs | 12 ++++------ .../4UseACustomConfigFile/mod.code-workspace | 21 ++++++++-------- TypeScript/4UseACustomConfigFile/package.json | 18 +++++++------- .../4UseACustomConfigFile/tsconfig.json | 4 ++-- TypeScript/5ReplaceMethod/.eslintignore | 7 +++--- TypeScript/5ReplaceMethod/build.mjs | 12 ++++------ TypeScript/5ReplaceMethod/mod.code-workspace | 21 ++++++++-------- TypeScript/5ReplaceMethod/package.json | 18 +++++++------- TypeScript/5ReplaceMethod/tsconfig.json | 4 ++-- .../6ReferenceAnotherClass/.eslintignore | 7 +++--- TypeScript/6ReferenceAnotherClass/build.mjs | 12 ++++------ .../6ReferenceAnotherClass/mod.code-workspace | 21 ++++++++-------- .../6ReferenceAnotherClass/package.json | 18 +++++++------- .../6ReferenceAnotherClass/tsconfig.json | 4 ++-- TypeScript/7OnLoadHook/.eslintignore | 7 +++--- TypeScript/7OnLoadHook/build.mjs | 12 ++++------ TypeScript/7OnLoadHook/mod.code-workspace | 21 ++++++++-------- TypeScript/7OnLoadHook/package.json | 18 +++++++------- TypeScript/7OnLoadHook/tsconfig.json | 4 ++-- TypeScript/8OnUpdateHook/.eslintignore | 7 +++--- TypeScript/8OnUpdateHook/build.mjs | 12 ++++------ TypeScript/8OnUpdateHook/mod.code-workspace | 21 ++++++++-------- TypeScript/8OnUpdateHook/package.json | 18 +++++++------- TypeScript/8OnUpdateHook/tsconfig.json | 4 ++-- TypeScript/9RouterHooks/.eslintignore | 7 +++--- TypeScript/9RouterHooks/build.mjs | 12 ++++------ TypeScript/9RouterHooks/mod.code-workspace | 21 ++++++++-------- TypeScript/9RouterHooks/package.json | 18 +++++++------- TypeScript/9RouterHooks/tsconfig.json | 4 ++-- 130 files changed, 814 insertions(+), 818 deletions(-) diff --git a/TypeScript/10ScopesAndTypes/.eslintignore b/TypeScript/10ScopesAndTypes/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/10ScopesAndTypes/.eslintignore +++ b/TypeScript/10ScopesAndTypes/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/10ScopesAndTypes/build.mjs b/TypeScript/10ScopesAndTypes/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/10ScopesAndTypes/build.mjs +++ b/TypeScript/10ScopesAndTypes/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/10ScopesAndTypes/mod.code-workspace b/TypeScript/10ScopesAndTypes/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/10ScopesAndTypes/mod.code-workspace +++ b/TypeScript/10ScopesAndTypes/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/10ScopesAndTypes/package.json b/TypeScript/10ScopesAndTypes/package.json index ed225c0..0ac1124 100644 --- a/TypeScript/10ScopesAndTypes/package.json +++ b/TypeScript/10ScopesAndTypes/package.json @@ -1,14 +1,12 @@ { "name": "ScopesAndTypes", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/10ScopesAndTypes/tsconfig.json b/TypeScript/10ScopesAndTypes/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/10ScopesAndTypes/tsconfig.json +++ b/TypeScript/10ScopesAndTypes/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/11BundleLoadingSample/.eslintignore b/TypeScript/11BundleLoadingSample/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/11BundleLoadingSample/.eslintignore +++ b/TypeScript/11BundleLoadingSample/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/11BundleLoadingSample/build.mjs b/TypeScript/11BundleLoadingSample/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/11BundleLoadingSample/build.mjs +++ b/TypeScript/11BundleLoadingSample/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/11BundleLoadingSample/mod.code-workspace b/TypeScript/11BundleLoadingSample/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/11BundleLoadingSample/mod.code-workspace +++ b/TypeScript/11BundleLoadingSample/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/11BundleLoadingSample/package.json b/TypeScript/11BundleLoadingSample/package.json index 8397725..0449c5a 100644 --- a/TypeScript/11BundleLoadingSample/package.json +++ b/TypeScript/11BundleLoadingSample/package.json @@ -1,15 +1,12 @@ { - "name": "BundleLoading", - "version": "1.0.0", - "author": "Chomp", - "license": "MIT", - "main": "src/mod.js", - "isBundleMod": true, + "name": "BundleLoading", + "version": "1.0.0", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": true, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -23,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/11BundleLoadingSample/tsconfig.json b/TypeScript/11BundleLoadingSample/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/11BundleLoadingSample/tsconfig.json +++ b/TypeScript/11BundleLoadingSample/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/12ClassExtensionOverride/.eslintignore b/TypeScript/12ClassExtensionOverride/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/12ClassExtensionOverride/.eslintignore +++ b/TypeScript/12ClassExtensionOverride/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/12ClassExtensionOverride/build.mjs b/TypeScript/12ClassExtensionOverride/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/12ClassExtensionOverride/build.mjs +++ b/TypeScript/12ClassExtensionOverride/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/12ClassExtensionOverride/mod.code-workspace b/TypeScript/12ClassExtensionOverride/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/12ClassExtensionOverride/mod.code-workspace +++ b/TypeScript/12ClassExtensionOverride/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/12ClassExtensionOverride/package.json b/TypeScript/12ClassExtensionOverride/package.json index 17aeea6..8328d91 100644 --- a/TypeScript/12ClassExtensionOverride/package.json +++ b/TypeScript/12ClassExtensionOverride/package.json @@ -1,14 +1,12 @@ { "name": "ClassExtensionOverride", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/12ClassExtensionOverride/tsconfig.json b/TypeScript/12ClassExtensionOverride/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/12ClassExtensionOverride/tsconfig.json +++ b/TypeScript/12ClassExtensionOverride/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/13AddTrader/.eslintignore b/TypeScript/13AddTrader/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/13AddTrader/.eslintignore +++ b/TypeScript/13AddTrader/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/13AddTrader/build.mjs b/TypeScript/13AddTrader/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/13AddTrader/build.mjs +++ b/TypeScript/13AddTrader/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/13AddTrader/mod.code-workspace b/TypeScript/13AddTrader/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/13AddTrader/mod.code-workspace +++ b/TypeScript/13AddTrader/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/13AddTrader/package.json b/TypeScript/13AddTrader/package.json index a20e857..02720a1 100644 --- a/TypeScript/13AddTrader/package.json +++ b/TypeScript/13AddTrader/package.json @@ -1,14 +1,12 @@ { "name": "13AddTrader", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Shirito", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Shirito", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/13AddTrader/tsconfig.json b/TypeScript/13AddTrader/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/13AddTrader/tsconfig.json +++ b/TypeScript/13AddTrader/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/14AfterDBLoadHook/.eslintignore b/TypeScript/14AfterDBLoadHook/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/14AfterDBLoadHook/.eslintignore +++ b/TypeScript/14AfterDBLoadHook/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/14AfterDBLoadHook/build.mjs b/TypeScript/14AfterDBLoadHook/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/14AfterDBLoadHook/build.mjs +++ b/TypeScript/14AfterDBLoadHook/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/14AfterDBLoadHook/mod.code-workspace b/TypeScript/14AfterDBLoadHook/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/14AfterDBLoadHook/mod.code-workspace +++ b/TypeScript/14AfterDBLoadHook/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/14AfterDBLoadHook/package.json b/TypeScript/14AfterDBLoadHook/package.json index a823ed7..8152217 100644 --- a/TypeScript/14AfterDBLoadHook/package.json +++ b/TypeScript/14AfterDBLoadHook/package.json @@ -1,14 +1,12 @@ { "name": "AfterDBLoadHook", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/14AfterDBLoadHook/tsconfig.json b/TypeScript/14AfterDBLoadHook/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/14AfterDBLoadHook/tsconfig.json +++ b/TypeScript/14AfterDBLoadHook/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/15HttpListenerExample/.eslintignore b/TypeScript/15HttpListenerExample/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/15HttpListenerExample/.eslintignore +++ b/TypeScript/15HttpListenerExample/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/15HttpListenerExample/build.mjs b/TypeScript/15HttpListenerExample/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/15HttpListenerExample/build.mjs +++ b/TypeScript/15HttpListenerExample/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/15HttpListenerExample/mod.code-workspace b/TypeScript/15HttpListenerExample/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/15HttpListenerExample/mod.code-workspace +++ b/TypeScript/15HttpListenerExample/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/15HttpListenerExample/package.json b/TypeScript/15HttpListenerExample/package.json index 85a6213..00b9272 100644 --- a/TypeScript/15HttpListenerExample/package.json +++ b/TypeScript/15HttpListenerExample/package.json @@ -1,14 +1,12 @@ { "name": "HttpListenerExample", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Alex", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "clodan", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/15HttpListenerExample/tsconfig.json b/TypeScript/15HttpListenerExample/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/15HttpListenerExample/tsconfig.json +++ b/TypeScript/15HttpListenerExample/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/16ImporterUtil/.eslintignore b/TypeScript/16ImporterUtil/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/16ImporterUtil/.eslintignore +++ b/TypeScript/16ImporterUtil/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/16ImporterUtil/build.mjs b/TypeScript/16ImporterUtil/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/16ImporterUtil/build.mjs +++ b/TypeScript/16ImporterUtil/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/16ImporterUtil/mod.code-workspace b/TypeScript/16ImporterUtil/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/16ImporterUtil/mod.code-workspace +++ b/TypeScript/16ImporterUtil/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/16ImporterUtil/package.json b/TypeScript/16ImporterUtil/package.json index b0fc684..97dbd0e 100644 --- a/TypeScript/16ImporterUtil/package.json +++ b/TypeScript/16ImporterUtil/package.json @@ -1,14 +1,12 @@ { "name": "ImporterUtil", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/16ImporterUtil/tsconfig.json b/TypeScript/16ImporterUtil/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/16ImporterUtil/tsconfig.json +++ b/TypeScript/16ImporterUtil/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/17AsyncImporterWithDependency1/.eslintignore b/TypeScript/17AsyncImporterWithDependency1/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/.eslintignore +++ b/TypeScript/17AsyncImporterWithDependency1/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/17AsyncImporterWithDependency1/build.mjs b/TypeScript/17AsyncImporterWithDependency1/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/build.mjs +++ b/TypeScript/17AsyncImporterWithDependency1/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/17AsyncImporterWithDependency1/mod.code-workspace b/TypeScript/17AsyncImporterWithDependency1/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/mod.code-workspace +++ b/TypeScript/17AsyncImporterWithDependency1/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/17AsyncImporterWithDependency1/package.json b/TypeScript/17AsyncImporterWithDependency1/package.json index 03f8ab4..99e2af1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/package.json +++ b/TypeScript/17AsyncImporterWithDependency1/package.json @@ -1,22 +1,20 @@ { "name": "AsyncWithDependency1", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], - "modDependencies": { - "17AsyncImporterWithDependency2": "~1" - }, + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", "buildinfo": "node ./build.mjs --verbose" }, + "modDependencies": { + "17AsyncImporterWithDependency2": "~1" + }, "devDependencies": { "@types/node": "20.11", "@typescript-eslint/eslint-plugin": "7.2", @@ -25,9 +23,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/17AsyncImporterWithDependency1/tsconfig.json b/TypeScript/17AsyncImporterWithDependency1/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/tsconfig.json +++ b/TypeScript/17AsyncImporterWithDependency1/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/17AsyncImporterWithDependency2/.eslintignore b/TypeScript/17AsyncImporterWithDependency2/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/.eslintignore +++ b/TypeScript/17AsyncImporterWithDependency2/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/17AsyncImporterWithDependency2/build.mjs b/TypeScript/17AsyncImporterWithDependency2/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/build.mjs +++ b/TypeScript/17AsyncImporterWithDependency2/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/17AsyncImporterWithDependency2/mod.code-workspace b/TypeScript/17AsyncImporterWithDependency2/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/mod.code-workspace +++ b/TypeScript/17AsyncImporterWithDependency2/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/17AsyncImporterWithDependency2/package.json b/TypeScript/17AsyncImporterWithDependency2/package.json index 9864f79..6614a4d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/package.json +++ b/TypeScript/17AsyncImporterWithDependency2/package.json @@ -1,14 +1,12 @@ { "name": "AsyncWithDependency2", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/17AsyncImporterWithDependency2/tsconfig.json b/TypeScript/17AsyncImporterWithDependency2/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/tsconfig.json +++ b/TypeScript/17AsyncImporterWithDependency2/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/18CustomItemService/.eslintignore b/TypeScript/18CustomItemService/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/18CustomItemService/.eslintignore +++ b/TypeScript/18CustomItemService/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/18CustomItemService/build.mjs b/TypeScript/18CustomItemService/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/18CustomItemService/build.mjs +++ b/TypeScript/18CustomItemService/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/18CustomItemService/mod.code-workspace b/TypeScript/18CustomItemService/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/18CustomItemService/mod.code-workspace +++ b/TypeScript/18CustomItemService/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/18CustomItemService/package.json b/TypeScript/18CustomItemService/package.json index b825dee..f9854d3 100644 --- a/TypeScript/18CustomItemService/package.json +++ b/TypeScript/18CustomItemService/package.json @@ -1,14 +1,12 @@ { "name": "CustomItemService", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Choccy", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Choccy", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/18CustomItemService/tsconfig.json b/TypeScript/18CustomItemService/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/18CustomItemService/tsconfig.json +++ b/TypeScript/18CustomItemService/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/19UseExternalLibraries/.eslintignore b/TypeScript/19UseExternalLibraries/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/19UseExternalLibraries/.eslintignore +++ b/TypeScript/19UseExternalLibraries/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/19UseExternalLibraries/build.mjs b/TypeScript/19UseExternalLibraries/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/19UseExternalLibraries/build.mjs +++ b/TypeScript/19UseExternalLibraries/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/19UseExternalLibraries/mod.code-workspace b/TypeScript/19UseExternalLibraries/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/19UseExternalLibraries/mod.code-workspace +++ b/TypeScript/19UseExternalLibraries/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/19UseExternalLibraries/package.json b/TypeScript/19UseExternalLibraries/package.json index 4361630..4b54b64 100644 --- a/TypeScript/19UseExternalLibraries/package.json +++ b/TypeScript/19UseExternalLibraries/package.json @@ -1,22 +1,20 @@ { "name": "UseExternalLibraries", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "TheSparta", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", "buildinfo": "node ./build.mjs --verbose" }, - "dependencies": { - "ora-classic": "5.4.2" - }, + "dependencies": { + "ora-classic": "5.4.2" + }, "devDependencies": { "@types/node": "20.11", "@typescript-eslint/eslint-plugin": "7.2", @@ -25,9 +23,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "TheSparta", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/19UseExternalLibraries/tsconfig.json b/TypeScript/19UseExternalLibraries/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/19UseExternalLibraries/tsconfig.json +++ b/TypeScript/19UseExternalLibraries/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/1LogToConsole/.eslintignore b/TypeScript/1LogToConsole/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/1LogToConsole/.eslintignore +++ b/TypeScript/1LogToConsole/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/1LogToConsole/build.mjs b/TypeScript/1LogToConsole/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/1LogToConsole/build.mjs +++ b/TypeScript/1LogToConsole/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/1LogToConsole/mod.code-workspace b/TypeScript/1LogToConsole/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/1LogToConsole/mod.code-workspace +++ b/TypeScript/1LogToConsole/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/1LogToConsole/package.json b/TypeScript/1LogToConsole/package.json index d9875ce..642d0d4 100644 --- a/TypeScript/1LogToConsole/package.json +++ b/TypeScript/1LogToConsole/package.json @@ -1,15 +1,12 @@ { "name": "LogToConsole", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], - "isBundleMod": false, + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -23,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/1LogToConsole/tsconfig.json b/TypeScript/1LogToConsole/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/1LogToConsole/tsconfig.json +++ b/TypeScript/1LogToConsole/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/20CustomChatBot/.eslintignore b/TypeScript/20CustomChatBot/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/20CustomChatBot/.eslintignore +++ b/TypeScript/20CustomChatBot/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/20CustomChatBot/build.mjs b/TypeScript/20CustomChatBot/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/20CustomChatBot/build.mjs +++ b/TypeScript/20CustomChatBot/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/20CustomChatBot/mod.code-workspace b/TypeScript/20CustomChatBot/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/20CustomChatBot/mod.code-workspace +++ b/TypeScript/20CustomChatBot/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/20CustomChatBot/package.json b/TypeScript/20CustomChatBot/package.json index bef5985..04cb178 100644 --- a/TypeScript/20CustomChatBot/package.json +++ b/TypeScript/20CustomChatBot/package.json @@ -1,14 +1,12 @@ { "name": "CustomChatBot", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "clodan", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "clodan", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/20CustomChatBot/tsconfig.json b/TypeScript/20CustomChatBot/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/20CustomChatBot/tsconfig.json +++ b/TypeScript/20CustomChatBot/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/21CustomCommandoCommand/.eslintignore b/TypeScript/21CustomCommandoCommand/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/21CustomCommandoCommand/.eslintignore +++ b/TypeScript/21CustomCommandoCommand/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/21CustomCommandoCommand/build.mjs b/TypeScript/21CustomCommandoCommand/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/21CustomCommandoCommand/build.mjs +++ b/TypeScript/21CustomCommandoCommand/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/21CustomCommandoCommand/mod.code-workspace b/TypeScript/21CustomCommandoCommand/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/21CustomCommandoCommand/mod.code-workspace +++ b/TypeScript/21CustomCommandoCommand/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/21CustomCommandoCommand/package.json b/TypeScript/21CustomCommandoCommand/package.json index 9bf0724..57abc32 100644 --- a/TypeScript/21CustomCommandoCommand/package.json +++ b/TypeScript/21CustomCommandoCommand/package.json @@ -1,14 +1,12 @@ { "name": "CustomCommandoCommand", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "clodan", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "clodan", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/21CustomCommandoCommand/tsconfig.json b/TypeScript/21CustomCommandoCommand/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/21CustomCommandoCommand/tsconfig.json +++ b/TypeScript/21CustomCommandoCommand/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/22CustomAkiCommand/.eslintignore b/TypeScript/22CustomAkiCommand/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/22CustomAkiCommand/.eslintignore +++ b/TypeScript/22CustomAkiCommand/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/22CustomAkiCommand/build.mjs b/TypeScript/22CustomAkiCommand/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/22CustomAkiCommand/build.mjs +++ b/TypeScript/22CustomAkiCommand/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/22CustomAkiCommand/mod.code-workspace b/TypeScript/22CustomAkiCommand/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/22CustomAkiCommand/mod.code-workspace +++ b/TypeScript/22CustomAkiCommand/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/22CustomAkiCommand/package.json b/TypeScript/22CustomAkiCommand/package.json index 85668d5..58dee14 100644 --- a/TypeScript/22CustomAkiCommand/package.json +++ b/TypeScript/22CustomAkiCommand/package.json @@ -1,14 +1,12 @@ { "name": "CustomAkiCommand", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "clodan", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "clodan", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/22CustomAkiCommand/tsconfig.json b/TypeScript/22CustomAkiCommand/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/22CustomAkiCommand/tsconfig.json +++ b/TypeScript/22CustomAkiCommand/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/23CustomAbstractChatBot/.eslintignore b/TypeScript/23CustomAbstractChatBot/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/23CustomAbstractChatBot/.eslintignore +++ b/TypeScript/23CustomAbstractChatBot/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/23CustomAbstractChatBot/build.mjs b/TypeScript/23CustomAbstractChatBot/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/23CustomAbstractChatBot/build.mjs +++ b/TypeScript/23CustomAbstractChatBot/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/23CustomAbstractChatBot/mod.code-workspace b/TypeScript/23CustomAbstractChatBot/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/23CustomAbstractChatBot/mod.code-workspace +++ b/TypeScript/23CustomAbstractChatBot/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/23CustomAbstractChatBot/package.json b/TypeScript/23CustomAbstractChatBot/package.json index e9c3aa0..140bb8e 100644 --- a/TypeScript/23CustomAbstractChatBot/package.json +++ b/TypeScript/23CustomAbstractChatBot/package.json @@ -1,14 +1,12 @@ { "name": "CustomAbstractChatBot", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "clodan", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "clodan", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/23CustomAbstractChatBot/tsconfig.json b/TypeScript/23CustomAbstractChatBot/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/23CustomAbstractChatBot/tsconfig.json +++ b/TypeScript/23CustomAbstractChatBot/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/24WebSocket/.eslintignore b/TypeScript/24WebSocket/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/24WebSocket/.eslintignore +++ b/TypeScript/24WebSocket/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/24WebSocket/build.mjs b/TypeScript/24WebSocket/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/24WebSocket/build.mjs +++ b/TypeScript/24WebSocket/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/24WebSocket/mod.code-workspace b/TypeScript/24WebSocket/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/24WebSocket/mod.code-workspace +++ b/TypeScript/24WebSocket/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/24WebSocket/package.json b/TypeScript/24WebSocket/package.json index 260b207..ffb76e9 100644 --- a/TypeScript/24WebSocket/package.json +++ b/TypeScript/24WebSocket/package.json @@ -1,14 +1,12 @@ { "name": "WebSocket", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "clodan", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "clodan", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/24WebSocket/tsconfig.json b/TypeScript/24WebSocket/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/24WebSocket/tsconfig.json +++ b/TypeScript/24WebSocket/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/2EditDatabase/.eslintignore b/TypeScript/2EditDatabase/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/2EditDatabase/.eslintignore +++ b/TypeScript/2EditDatabase/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/2EditDatabase/build.mjs b/TypeScript/2EditDatabase/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/2EditDatabase/build.mjs +++ b/TypeScript/2EditDatabase/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/2EditDatabase/mod.code-workspace b/TypeScript/2EditDatabase/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/2EditDatabase/mod.code-workspace +++ b/TypeScript/2EditDatabase/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/2EditDatabase/package.json b/TypeScript/2EditDatabase/package.json index 6a12f55..c044a70 100644 --- a/TypeScript/2EditDatabase/package.json +++ b/TypeScript/2EditDatabase/package.json @@ -1,15 +1,12 @@ { "name": "EditDatabase", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], - "isBundleMod": false, + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -23,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/2EditDatabase/tsconfig.json b/TypeScript/2EditDatabase/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/2EditDatabase/tsconfig.json +++ b/TypeScript/2EditDatabase/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/3GetSptConfigFile/.eslintignore b/TypeScript/3GetSptConfigFile/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/3GetSptConfigFile/.eslintignore +++ b/TypeScript/3GetSptConfigFile/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/3GetSptConfigFile/build.mjs b/TypeScript/3GetSptConfigFile/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/3GetSptConfigFile/build.mjs +++ b/TypeScript/3GetSptConfigFile/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/3GetSptConfigFile/mod.code-workspace b/TypeScript/3GetSptConfigFile/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/3GetSptConfigFile/mod.code-workspace +++ b/TypeScript/3GetSptConfigFile/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/3GetSptConfigFile/package.json b/TypeScript/3GetSptConfigFile/package.json index b3e4122..fdc26ad 100644 --- a/TypeScript/3GetSptConfigFile/package.json +++ b/TypeScript/3GetSptConfigFile/package.json @@ -1,15 +1,12 @@ { "name": "GetSptConfigFile", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], - "isBundleMod": false, + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -23,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/3GetSptConfigFile/tsconfig.json b/TypeScript/3GetSptConfigFile/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/3GetSptConfigFile/tsconfig.json +++ b/TypeScript/3GetSptConfigFile/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/.eslintignore b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/.eslintignore +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/build.mjs b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/build.mjs +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/mod.code-workspace b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/mod.code-workspace +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/package.json b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/package.json index c209e6f..b28fa8d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/package.json +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/package.json @@ -1,14 +1,12 @@ { "name": "UseACustomJson5OrJsonCConfigFile", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/tsconfig.json b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/tsconfig.json +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/4UseACustomConfigFile/.eslintignore b/TypeScript/4UseACustomConfigFile/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/4UseACustomConfigFile/.eslintignore +++ b/TypeScript/4UseACustomConfigFile/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/4UseACustomConfigFile/build.mjs b/TypeScript/4UseACustomConfigFile/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/4UseACustomConfigFile/build.mjs +++ b/TypeScript/4UseACustomConfigFile/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/4UseACustomConfigFile/mod.code-workspace b/TypeScript/4UseACustomConfigFile/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/4UseACustomConfigFile/mod.code-workspace +++ b/TypeScript/4UseACustomConfigFile/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/4UseACustomConfigFile/package.json b/TypeScript/4UseACustomConfigFile/package.json index b6cbb57..f089d0f 100644 --- a/TypeScript/4UseACustomConfigFile/package.json +++ b/TypeScript/4UseACustomConfigFile/package.json @@ -1,14 +1,12 @@ { "name": "UseACustomConfigFile", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/4UseACustomConfigFile/tsconfig.json b/TypeScript/4UseACustomConfigFile/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/4UseACustomConfigFile/tsconfig.json +++ b/TypeScript/4UseACustomConfigFile/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/5ReplaceMethod/.eslintignore b/TypeScript/5ReplaceMethod/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/5ReplaceMethod/.eslintignore +++ b/TypeScript/5ReplaceMethod/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/5ReplaceMethod/build.mjs b/TypeScript/5ReplaceMethod/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/5ReplaceMethod/build.mjs +++ b/TypeScript/5ReplaceMethod/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/5ReplaceMethod/mod.code-workspace b/TypeScript/5ReplaceMethod/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/5ReplaceMethod/mod.code-workspace +++ b/TypeScript/5ReplaceMethod/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/5ReplaceMethod/package.json b/TypeScript/5ReplaceMethod/package.json index b63c39e..5876e57 100644 --- a/TypeScript/5ReplaceMethod/package.json +++ b/TypeScript/5ReplaceMethod/package.json @@ -1,14 +1,12 @@ { "name": "ReplaceMethod", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/5ReplaceMethod/tsconfig.json b/TypeScript/5ReplaceMethod/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/5ReplaceMethod/tsconfig.json +++ b/TypeScript/5ReplaceMethod/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/6ReferenceAnotherClass/.eslintignore b/TypeScript/6ReferenceAnotherClass/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/6ReferenceAnotherClass/.eslintignore +++ b/TypeScript/6ReferenceAnotherClass/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/6ReferenceAnotherClass/build.mjs b/TypeScript/6ReferenceAnotherClass/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/6ReferenceAnotherClass/build.mjs +++ b/TypeScript/6ReferenceAnotherClass/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/6ReferenceAnotherClass/mod.code-workspace b/TypeScript/6ReferenceAnotherClass/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/6ReferenceAnotherClass/mod.code-workspace +++ b/TypeScript/6ReferenceAnotherClass/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/6ReferenceAnotherClass/package.json b/TypeScript/6ReferenceAnotherClass/package.json index 4978de3..a73456f 100644 --- a/TypeScript/6ReferenceAnotherClass/package.json +++ b/TypeScript/6ReferenceAnotherClass/package.json @@ -1,14 +1,12 @@ { "name": "ReferenceAnotherClass", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/6ReferenceAnotherClass/tsconfig.json b/TypeScript/6ReferenceAnotherClass/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/6ReferenceAnotherClass/tsconfig.json +++ b/TypeScript/6ReferenceAnotherClass/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/7OnLoadHook/.eslintignore b/TypeScript/7OnLoadHook/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/7OnLoadHook/.eslintignore +++ b/TypeScript/7OnLoadHook/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/7OnLoadHook/build.mjs b/TypeScript/7OnLoadHook/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/7OnLoadHook/build.mjs +++ b/TypeScript/7OnLoadHook/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/7OnLoadHook/mod.code-workspace b/TypeScript/7OnLoadHook/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/7OnLoadHook/mod.code-workspace +++ b/TypeScript/7OnLoadHook/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/7OnLoadHook/package.json b/TypeScript/7OnLoadHook/package.json index 42e7067..25ac3eb 100644 --- a/TypeScript/7OnLoadHook/package.json +++ b/TypeScript/7OnLoadHook/package.json @@ -1,14 +1,12 @@ { "name": "OnLoadHook", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/7OnLoadHook/tsconfig.json b/TypeScript/7OnLoadHook/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/7OnLoadHook/tsconfig.json +++ b/TypeScript/7OnLoadHook/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/8OnUpdateHook/.eslintignore b/TypeScript/8OnUpdateHook/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/8OnUpdateHook/.eslintignore +++ b/TypeScript/8OnUpdateHook/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/8OnUpdateHook/build.mjs b/TypeScript/8OnUpdateHook/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/8OnUpdateHook/build.mjs +++ b/TypeScript/8OnUpdateHook/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/8OnUpdateHook/mod.code-workspace b/TypeScript/8OnUpdateHook/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/8OnUpdateHook/mod.code-workspace +++ b/TypeScript/8OnUpdateHook/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/8OnUpdateHook/package.json b/TypeScript/8OnUpdateHook/package.json index e0a3fbe..10957b7 100644 --- a/TypeScript/8OnUpdateHook/package.json +++ b/TypeScript/8OnUpdateHook/package.json @@ -1,14 +1,12 @@ { "name": "OnUpdateHook", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/8OnUpdateHook/tsconfig.json b/TypeScript/8OnUpdateHook/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/8OnUpdateHook/tsconfig.json +++ b/TypeScript/8OnUpdateHook/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], } diff --git a/TypeScript/9RouterHooks/.eslintignore b/TypeScript/9RouterHooks/.eslintignore index 1bb5519..f7dd9e1 100644 --- a/TypeScript/9RouterHooks/.eslintignore +++ b/TypeScript/9RouterHooks/.eslintignore @@ -1,7 +1,8 @@ # Exclude these folders from linting -node_modules -dist/ -types/ +**/node_modules +/tmp +/dist +/types # Exclude these filetypes from linting *.json diff --git a/TypeScript/9RouterHooks/build.mjs b/TypeScript/9RouterHooks/build.mjs index d00117c..d5a679f 100644 --- a/TypeScript/9RouterHooks/build.mjs +++ b/TypeScript/9RouterHooks/build.mjs @@ -29,11 +29,10 @@ * @version v1.0.0 */ +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import fs from "fs-extra"; -import os from "os"; -import path from "path"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; import ignore from "ignore"; import archiver from "archiver"; import winston from "winston"; @@ -165,7 +164,7 @@ async function main() { * @returns {string} The absolute path of the current working directory. */ function getCurrentDirectory() { - return dirname(fileURLToPath(import.meta.url)); + return path.dirname(fileURLToPath(import.meta.url)); } /** @@ -225,10 +224,9 @@ function createProjectName(packageJson) { // Remove any non-alphanumeric characters from the author and name. const author = packageJson.author.replace(/\W/g, ""); const name = packageJson.name.replace(/\W/g, ""); - const version = packageJson.version; // Ensure the name is lowercase, as per the package.json specification. - return `${author}-${name}-${version}`.toLowerCase(); + return `${author}-${name}`.toLowerCase(); } /** diff --git a/TypeScript/9RouterHooks/mod.code-workspace b/TypeScript/9RouterHooks/mod.code-workspace index 4f69f8b..090d8e7 100644 --- a/TypeScript/9RouterHooks/mod.code-workspace +++ b/TypeScript/9RouterHooks/mod.code-workspace @@ -1,12 +1,13 @@ { - "folders": [ - { - "path": "." - } - ], - "extensions": { - "recommendations": [ - "dbaeumer.vscode-eslint" - ] - } + "folders": [ + { + "path": "." + } + ], + "extensions": { + "recommendations": [ + "dbaeumer.vscode-eslint", + "refringe.spt-id-highlighter" + ] + } } diff --git a/TypeScript/9RouterHooks/package.json b/TypeScript/9RouterHooks/package.json index e2a4f99..bf2f3c7 100644 --- a/TypeScript/9RouterHooks/package.json +++ b/TypeScript/9RouterHooks/package.json @@ -1,14 +1,12 @@ { "name": "RouterHooks", "version": "1.0.0", - "main": "src/mod.js", - "license": "MIT", - "author": "Chomp", "akiVersion": "~3.9", - "loadBefore": [], - "loadAfter": [], - "incompatibilities": [], - "contributors": [], + "loadBefore": [], + "loadAfter": [], + "incompatibilities": [], + "isBundleMod": false, + "main": "src/mod.js", "scripts": { "setup": "npm i", "build": "node ./build.mjs", @@ -22,9 +20,11 @@ "eslint": "8.57", "fs-extra": "11.2", "ignore": "^5.2", - "os": "^0.1", "tsyringe": "4.8.0", "typescript": "5.4", "winston": "3.12" - } + }, + "author": "Chomp", + "contributors": [], + "license": "MIT" } diff --git a/TypeScript/9RouterHooks/tsconfig.json b/TypeScript/9RouterHooks/tsconfig.json index ccb4b5d..c5ca53f 100644 --- a/TypeScript/9RouterHooks/tsconfig.json +++ b/TypeScript/9RouterHooks/tsconfig.json @@ -11,8 +11,8 @@ "resolveJsonModule": true, "outDir": "tmp", "paths": { - "@spt-aki/*": [ "./types/*" ], + "@spt-aki/*": ["./types/*"], }, }, - "exclude": [ "node_modules", "dist", "tmp" ], + "exclude": ["node_modules", "dist", "tmp"], }