Socket
Socket
Sign inDemoInstall

@frontmatter/extensibility

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontmatter/extensibility - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

17

dist/scripts/MediaScript.d.ts

@@ -9,2 +9,19 @@ import { MediaArguments } from "../models/ScriptArguments.js";

static getArguments(): MediaArguments | undefined;
/**
* Copies the metadata from the source file to the destination file.
* @param sourcePath - The path of the source file.
* @param destinationPath - The path of the destination file.
*/
static copyMetadata(sourcePath: string, destinationPath: string): void;
/**
* Copies the metadata from the source file to the destination file and deletes the source file.
* @param sourcePath - The path of the source file.
* @param destinationPath - The path of the destination file.
*/
static copyMetadataAndDelete(sourcePath: string, destinationPath: string): void;
/**
* Deletes a media file.
* @param filePath - The path of the file to be deleted.
*/
static delete(filePath: string): void;
}

@@ -31,3 +31,37 @@ import { CustomScript } from "./CustomScript.js";

}
/**
* Copies the metadata from the source file to the destination file.
* @param sourcePath - The path of the source file.
* @param destinationPath - The path of the destination file.
*/
static copyMetadata(sourcePath, destinationPath) {
console.log(JSON.stringify({
fmAction: "copyMediaMetadata",
fmSourcePath: sourcePath,
fmDestinationPath: destinationPath,
}));
}
/**
* Copies the metadata from the source file to the destination file and deletes the source file.
* @param sourcePath - The path of the source file.
* @param destinationPath - The path of the destination file.
*/
static copyMetadataAndDelete(sourcePath, destinationPath) {
console.log(JSON.stringify({
fmAction: "copyMediaMetadataAndDelete",
fmSourcePath: sourcePath,
fmDestinationPath: destinationPath,
}));
}
/**
* Deletes a media file.
* @param filePath - The path of the file to be deleted.
*/
static delete(filePath) {
console.log(JSON.stringify({
fmAction: "deleteMedia",
fmPath: filePath,
}));
}
}
//# sourceMappingURL=MediaScript.js.map

2

package.json
{
"name": "@frontmatter/extensibility",
"version": "0.0.15",
"version": "0.0.16",
"description": "Front Matter CMS extensibility library",

@@ -5,0 +5,0 @@ "type": "module",

@@ -106,2 +106,8 @@ <p align="center">

Additionally, they provide the following methods:
- `MediaScript.copyMetadata(source, destination)`: This method will copy the metadata from the source file to the destination file.
- `MediaScript.copyMetadataAndDelete(source, destination)`; This method will copy the metadata from the source file to the destination file and delete the source file.
- `MediaScript.delete(source)`: This method will delete the source file.
### Placeholder scripts

@@ -108,0 +114,0 @@

@@ -37,2 +37,51 @@ import { MediaArguments } from "../models/ScriptArguments.js";

}
/**
* Copies the metadata from the source file to the destination file.
* @param sourcePath - The path of the source file.
* @param destinationPath - The path of the destination file.
*/
public static copyMetadata(
sourcePath: string,
destinationPath: string
): void {
console.log(
JSON.stringify({
fmAction: "copyMediaMetadata",
fmSourcePath: sourcePath,
fmDestinationPath: destinationPath,
})
);
}
/**
* Copies the metadata from the source file to the destination file and deletes the source file.
* @param sourcePath - The path of the source file.
* @param destinationPath - The path of the destination file.
*/
public static copyMetadataAndDelete(
sourcePath: string,
destinationPath: string
): void {
console.log(
JSON.stringify({
fmAction: "copyMediaMetadataAndDelete",
fmSourcePath: sourcePath,
fmDestinationPath: destinationPath,
})
);
}
/**
* Deletes a media file.
* @param filePath - The path of the file to be deleted.
*/
public static delete(filePath: string): void {
console.log(
JSON.stringify({
fmAction: "deleteMedia",
fmPath: filePath,
})
);
}
}

Sorry, the diff of this file is not supported yet

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