New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More →
Socket
Sign inDemoInstall
Socket

glamaholic-to-collections

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glamaholic-to-collections - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

11

index.js

@@ -9,3 +9,3 @@ #!/usr/bin/env node

.usage(
"Usage: $0 --collectionsConfig <collectionsConfig> --glamaholicConfig <glamaholicConfig>",
"Usage: $0 --collectionsConfig <collectionsConfig> --glamaholicConfig <glamaholicConfig> --outputFile <outputFile>",
)

@@ -26,2 +26,9 @@ .option("collectionsConfig", {

})
.option("outputFile", {
alias: "o",
describe: "Path to where you want to save the new collections.json file",
type: "string",
demandOption: false,
default: `${process.env.APPDATA}/XIVLauncher/pluginConfigs/Collections.json`,
})
.help().argv;

@@ -36,2 +43,2 @@

writeCollectionsConfig(collectionsConfig, glamaholicConfig);
writeCollectionsConfig(collectionsConfig, glamaholicConfig, argv.outputFile);

21

lib.js

@@ -92,14 +92,19 @@ import * as fs from "node:fs";

export const writeCollectionsConfig = (collectionsConfig, glamaholicConfig) => {
export const writeCollectionsConfig = (
collectionsConfig,
glamaholicConfig,
outputFile,
) => {
const newCollectionsConfig = mergePlates(collectionsConfig, glamaholicConfig);
fs.writeFileSync(
"collections.json",
JSON.stringify(newCollectionsConfig, null, 2),
);
// If file already exists, create a backup with timestamp
if (fs.existsSync(outputFile)) {
const timestamp = new Date().toISOString().replace(/:/g, "");
fs.copyFileSync(outputFile, `${outputFile}.${timestamp}.bak`);
}
fs.writeFileSync(outputFile, JSON.stringify(newCollectionsConfig, null, 2));
// Log a success message with the full path to the collections.json file
console.log(
`collections.json has been written to ${process.cwd()}/collections.json`,
);
console.log(`collections.json has been written to ${outputFile}`);
};
{
"name": "glamaholic-to-collections",
"version": "1.0.3",
"version": "1.1.0",
"description": "Convert Glamaholic data to Collections",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,22 +7,16 @@ # Glamaholic-To-Collections

## Installation
1. Make sure nodejs is installed on your computer: https://nodejs.org/en/download/package-manager
2. Open a terminal (Win+R, type `cmd`, hit enter)
3. In the window, enter the following command
```bash
npm install glamaholic-to-collections
npm install -g glamaholic-to-collections
```
## Usage
To get an overview:
```bash
glamaholic-importer help
```
1. Open a terminal (see above)
2. Enter `glamaholic-importer`
To convert your glamaholic plates into collections:
```bash
glamaholic-importer
```
This will automatically take the Glamaholic and Collections configs from the default installation location of XIVLauncher (`%APPDATA%/XIVLauncher/pluginConfigs`), create a backup of your Collections.json and replace it with a new version that has your Glamaholic plates added to it in a folder called `Imported from Glamaholic`
You can pass custom paths to the glamaholic and collections config files like this:
```bash
glamaholic-importer --cc path/to/collections.json --gc path/to/glamaholic.json
```
The new configuration will be saved in your current directory as `collections.json`
### Nonstandard installation locations
Run `glamaholic-importer help` to see a list of commands you can pass to it to change the import and export file paths.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc