Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
775 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,22 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["./node_modules/@terwer/eslint-config-custom/typescript/index.cjs"], | ||
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "turbo", "prettier"], | ||
|
||
parser: "@typescript-eslint/parser", | ||
|
||
plugins: ["@typescript-eslint", "prettier"], | ||
|
||
rules: { | ||
// Note: you must disable the base rule as it can report incorrect errors | ||
semi: "off", | ||
quotes: "off", | ||
"no-undef": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/no-this-alias": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"turbo/no-undeclared-env-vars": "off", | ||
"prettier/prettier": "error", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* GNU GENERAL PUBLIC LICENSE | ||
* Version 3, 29 June 2007 | ||
* | ||
* Copyright (C) 2024 Terwer, Inc. <https://terwer.space/> | ||
* Everyone is permitted to copy and distribute verbatim copies | ||
* of this license document, but changing it is not allowed. | ||
*/ | ||
|
||
import { EventEmitter } from "../utils/nodePolyfill" | ||
import { IPicGo } from "../types" | ||
|
||
export class Lifecycle extends EventEmitter { | ||
async start(input: any[]): Promise<IPicGo> { | ||
throw new Error("Lifecycle.start is not implemented") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* GNU GENERAL PUBLIC LICENSE | ||
* Version 3, 29 June 2007 | ||
* | ||
* Copyright (C) 2024 Terwer, Inc. <https://terwer.space/> | ||
* Everyone is permitted to copy and distribute verbatim copies | ||
* of this license document, but changing it is not allowed. | ||
*/ | ||
|
||
import { ILifecyclePlugins, IPlugin } from "../types" | ||
|
||
export class LifecyclePlugins implements ILifecyclePlugins { | ||
static currentPlugin: string | null | ||
private readonly list: Map<string, IPlugin> | ||
private readonly pluginIdMap: Map<string, string[]> | ||
private readonly name: string | ||
|
||
constructor(name: string) { | ||
this.name = name | ||
this.list = new Map() | ||
this.pluginIdMap = new Map() | ||
} | ||
|
||
get(id: string): IPlugin | undefined { | ||
return undefined | ||
} | ||
|
||
getIdList(): string[] { | ||
return [] | ||
} | ||
|
||
getList(): IPlugin[] { | ||
return [] | ||
} | ||
|
||
getName(): string { | ||
return "" | ||
} | ||
|
||
register(id: string, plugin: IPlugin): void { | ||
return | ||
} | ||
|
||
unregister(id: string): void { | ||
return | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* GNU GENERAL PUBLIC LICENSE | ||
* Version 3, 29 June 2007 | ||
* | ||
* Copyright (C) 2024 Terwer, Inc. <https://terwer.space/> | ||
* Everyone is permitted to copy and distribute verbatim copies | ||
* of this license document, but changing it is not allowed. | ||
*/ | ||
|
||
import { IPicGo, IPluginHandler, IPluginHandlerOptions, IPluginHandlerResult, IProcessEnv } from "../types" | ||
|
||
export class PluginHandler implements IPluginHandler { | ||
// Thanks to feflow -> https://github.com/feflow/feflow/blob/master/lib/internal/install/plugin.js | ||
private readonly ctx: IPicGo | ||
constructor(ctx: IPicGo) { | ||
this.ctx = ctx | ||
} | ||
|
||
install( | ||
plugins: string[], | ||
options: IPluginHandlerOptions, | ||
env: IProcessEnv | undefined | ||
): Promise<IPluginHandlerResult<boolean>> { | ||
throw new Error("Method not implemented") | ||
} | ||
|
||
uninstall(plugins: string[]): Promise<IPluginHandlerResult<boolean>> { | ||
throw new Error("Method not implemented") | ||
} | ||
|
||
update( | ||
plugins: string[], | ||
options: IPluginHandlerOptions, | ||
env: IProcessEnv | undefined | ||
): Promise<IPluginHandlerResult<boolean>> { | ||
throw new Error("Method not implemented") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* GNU GENERAL PUBLIC LICENSE | ||
* Version 3, 29 June 2007 | ||
* | ||
* Copyright (C) 2024 Terwer, Inc. <https://terwer.space/> | ||
* Everyone is permitted to copy and distribute verbatim copies | ||
* of this license document, but changing it is not allowed. | ||
*/ | ||
|
||
import { IPicGoPlugin, IPicGoPluginInterface, IPluginLoader } from "../types" | ||
|
||
/** | ||
* Local plugin loader, file system is required | ||
*/ | ||
export class PluginLoader implements IPluginLoader { | ||
getFullList(): string[] { | ||
return [] | ||
} | ||
|
||
getList(): string[] { | ||
return [] | ||
} | ||
|
||
getPlugin(name: string): IPicGoPluginInterface | undefined { | ||
return undefined | ||
} | ||
|
||
hasPlugin(name: string): boolean { | ||
return false | ||
} | ||
|
||
registerPlugin(name: string, plugin: IPicGoPlugin | undefined): void { | ||
return | ||
} | ||
|
||
unregisterPlugin(name: string): void { | ||
return | ||
} | ||
} |
Oops, something went wrong.