Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@levimc-lse/scaffold",
"version": "0.2.1",
"version": "0.2.2",
"description": "A utility for assisting in the development of Legacy Script Engine plugins.",
"bugs": "https://github.com/leoweyr/LegacyScriptEngine_Scaffold/issues",
"bin": {
Expand Down
6 changes: 3 additions & 3 deletions src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ program
try {
const project: TypeScriptProject = TypeScriptProject.getInstance();
const packager: Packager = new Packager(project);
const levilaminaServer: LevilaminaServer = new LevilaminaServer(path);
const leviLaminaServer: LevilaminaServer = new LevilaminaServer(path);
const pluginPackage: PluginPackage = packager.getPluginPackage();

try {
levilaminaServer.removePlugin(project.getName());
leviLaminaServer.removePlugin(project.getName());
} catch (error) {
// Do nothing if the plugin does not exist.
}

const successMessage: string = await levilaminaServer.importPlugin(pluginPackage);
const successMessage: string = await leviLaminaServer.importPlugin(pluginPackage);

logger.success(successMessage);
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/deployment/LevilaminaServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class LevilaminaServer {
}

public removePlugin(pluginName: string): void {
const pluginPath: string = Path.join(this.pluginDirectory, pluginName);
const pluginPath: string = Path.join(this.pluginDirectory, pluginName.replace("/", "-").replace("@",""));

if (File.existsSync(pluginPath)) {
LevilaminaServer.deleteDirectory(pluginPath);
Expand Down
2 changes: 1 addition & 1 deletion src/packager/Manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class Manifest {

public generate(): string {
const nodeJsConfiguration: NodeJsConfiguration = this.project.getNodeJsConfiguration();
const name: string = nodeJsConfiguration.getName();
const name: string = nodeJsConfiguration.getName().replace("/", "-").replace("@", "");
const version: string = nodeJsConfiguration.getVersion();
const absoluteEntry: string = Path.join(this.project.getPath(), nodeJsConfiguration.getMainEntry());
const relativeEntry: string = absoluteEntry.split(`${this.project.getBuiltPath()}\\`).join("");
Expand Down
2 changes: 1 addition & 1 deletion src/packager/Packager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class Packager {
public constructor(project: Project) {
this.project = project;

const packagePath: string = Path.join(this.project.getPath(), `${this.project.getName()}.zip`);
const packagePath: string = Path.join(this.project.getPath(), `${this.project.getName().replace("/", "-").replace("@", "")}.zip`);
this.pluginPackage = new PluginPackage(this.project.getName(), packagePath);
}

Expand Down
2 changes: 1 addition & 1 deletion src/packager/PluginPackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class PluginPackage {
}

const pluginPackage: Unzipper.CentralDirectory = await Unzipper.Open.file(this.filePath);
const extractedPath: string = Path.join(destinationPath, this.name);
const extractedPath: string = Path.join(destinationPath, this.name.replace("/", "-").replace("@", ""));
await pluginPackage.extract({path: extractedPath});
}
}