@mostfeatured/dbi 0.1.34 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NamespaceEnums } from "../../../../generated/namespaceData";
|
|
2
2
|
import { DBI } from "../../../DBI";
|
|
3
3
|
import { DBIBaseInteraction, IDBIBaseExecuteCtx, TDBIReferencedData } from "../../Interaction";
|
|
4
|
-
export type TDBIHTMLComponentsV2Omitted<TNamespace extends NamespaceEnums> = Omit<DBIHTMLComponentsV2<TNamespace>, "type" | "dbi" | "toJSON">;
|
|
4
|
+
export type TDBIHTMLComponentsV2Omitted<TNamespace extends NamespaceEnums> = Omit<DBIHTMLComponentsV2<TNamespace>, "type" | "dbi" | "toJSON" | "description">;
|
|
5
5
|
export type TDBIHTMLComponentsV2ToJSONArgs = {
|
|
6
6
|
data?: Record<string, any>;
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/Components/HTMLComponentsV2/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAgB,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAI7G,MAAM,MAAM,2BAA2B,CAAC,UAAU,SAAS,cAAc,IAAI,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/Components/HTMLComponentsV2/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;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AAE,kBAAkB;SACzB,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,YAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;QAC3E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;IACtC,CAAC;IAEQ,MAAM,CAAC,MAAsC,EAAE;QACtD,OAAO,IAAA,8BAAqB,EAC1B,IAAI,CAAC,GAAU,EACf,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,IAAI,EACT,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CACnB,CAAA;IACH,CAAC;IAEQ,SAAS,CAAE,GAA+C,IAAI,CAAC;IAAA,CAAC;IAEzE,QAAQ,GAAW,EAAE,CAAC;CACvB;AA1BD,kDA0BC","sourcesContent":["import { NamespaceEnums } from \"../../../../generated/namespaceData\";\r\nimport { DBI } from \"../../../DBI\";\r\nimport { DBIBaseInteraction, DBIRateLimit, IDBIBaseExecuteCtx, TDBIReferencedData } from \"../../Interaction\";\r\nimport { parseHTMLComponentsV2 } from \"./parser\";\r\nimport fs from \"fs\";\r\n\r\nexport type TDBIHTMLComponentsV2Omitted<TNamespace extends NamespaceEnums> = Omit<DBIHTMLComponentsV2<TNamespace>, \"type\" | \"dbi\" | \"toJSON\">;\r\n\r\nexport type TDBIHTMLComponentsV2ToJSONArgs = {\r\n data?: Record<string, any>;\r\n}\r\n\r\nexport interface IDBIHTMLComponentsV2ExecuteCtx<TNamespace extends NamespaceEnums> extends IDBIBaseExecuteCtx<TNamespace> {\r\n data: TDBIReferencedData[];\r\n}\r\n\r\nexport class DBIHTMLComponentsV2<TNamespace extends NamespaceEnums> extends DBIBaseInteraction<TNamespace> {\r\n template?: string;\r\n file?: string;\r\n\r\n constructor(dbi: DBI<TNamespace>, args: TDBIHTMLComponentsV2Omitted<TNamespace>) {\r\n super(dbi, {\r\n ...(args as any),\r\n type: \"HTMLComponentsV2\",\r\n });\r\n this.template = args.template || fs.readFileSync(args.file || \"\", \"utf-8\");\r\n this.name = args.name;\r\n this.handlers = args.handlers || [];\r\n }\r\n\r\n override toJSON(arg: TDBIHTMLComponentsV2ToJSONArgs = {}): any {\r\n return parseHTMLComponentsV2(\r\n this.dbi as any,\r\n this.template,\r\n this.name,\r\n { data: arg.data }\r\n )\r\n }\r\n\r\n override onExecute?(ctx: IDBIHTMLComponentsV2ExecuteCtx<TNamespace>) { };\r\n\r\n handlers?: any[] = [];\r\n}"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/Components/HTMLComponentsV2/index.ts"],"names":[],"mappings":";;;;AAEA,mDAA6G;AAC7G,qCAAiD;AACjD,oDAAoB;AAYpB,MAAa,mBAAuD,SAAQ,gCAA8B;IACxG,QAAQ,CAAU;IAClB,IAAI,CAAU;IAEd,YAAY,GAAoB,EAAE,IAA6C;QAC7E,KAAK,CAAC,GAAG,EAAE;YACT,GAAI,IAAY;YAChB,IAAI,EAAE,kBAAkB;SACzB,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,YAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;QAC3E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;IACtC,CAAC;IAEQ,MAAM,CAAC,MAAsC,EAAE;QACtD,OAAO,IAAA,8BAAqB,EAC1B,IAAI,CAAC,GAAU,EACf,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,IAAI,EACT,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CACnB,CAAA;IACH,CAAC;IAEQ,SAAS,CAAE,GAA+C,IAAI,CAAC;IAAA,CAAC;IAEzE,QAAQ,GAAW,EAAE,CAAC;CACvB;AA1BD,kDA0BC","sourcesContent":["import { NamespaceEnums } from \"../../../../generated/namespaceData\";\r\nimport { DBI } from \"../../../DBI\";\r\nimport { DBIBaseInteraction, DBIRateLimit, IDBIBaseExecuteCtx, TDBIReferencedData } from \"../../Interaction\";\r\nimport { parseHTMLComponentsV2 } from \"./parser\";\r\nimport fs from \"fs\";\r\n\r\nexport type TDBIHTMLComponentsV2Omitted<TNamespace extends NamespaceEnums> = Omit<DBIHTMLComponentsV2<TNamespace>, \"type\" | \"dbi\" | \"toJSON\" | \"description\">;\r\n\r\nexport type TDBIHTMLComponentsV2ToJSONArgs = {\r\n data?: Record<string, any>;\r\n}\r\n\r\nexport interface IDBIHTMLComponentsV2ExecuteCtx<TNamespace extends NamespaceEnums> extends IDBIBaseExecuteCtx<TNamespace> {\r\n data: TDBIReferencedData[];\r\n}\r\n\r\nexport class DBIHTMLComponentsV2<TNamespace extends NamespaceEnums> extends DBIBaseInteraction<TNamespace> {\r\n template?: string;\r\n file?: string;\r\n\r\n constructor(dbi: DBI<TNamespace>, args: TDBIHTMLComponentsV2Omitted<TNamespace>) {\r\n super(dbi, {\r\n ...(args as any),\r\n type: \"HTMLComponentsV2\",\r\n });\r\n this.template = args.template || fs.readFileSync(args.file || \"\", \"utf-8\");\r\n this.name = args.name;\r\n this.handlers = args.handlers || [];\r\n }\r\n\r\n override toJSON(arg: TDBIHTMLComponentsV2ToJSONArgs = {}): any {\r\n return parseHTMLComponentsV2(\r\n this.dbi as any,\r\n this.template,\r\n this.name,\r\n { data: arg.data }\r\n )\r\n }\r\n\r\n override onExecute?(ctx: IDBIHTMLComponentsV2ExecuteCtx<TNamespace>) { };\r\n\r\n handlers?: any[] = [];\r\n}"]}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { DBIBaseInteraction, DBIRateLimit, IDBIBaseExecuteCtx, TDBIReferencedDat
|
|
|
4
4
|
import { parseHTMLComponentsV2 } from "./parser";
|
|
5
5
|
import fs from "fs";
|
|
6
6
|
|
|
7
|
-
export type TDBIHTMLComponentsV2Omitted<TNamespace extends NamespaceEnums> = Omit<DBIHTMLComponentsV2<TNamespace>, "type" | "dbi" | "toJSON">;
|
|
7
|
+
export type TDBIHTMLComponentsV2Omitted<TNamespace extends NamespaceEnums> = Omit<DBIHTMLComponentsV2<TNamespace>, "type" | "dbi" | "toJSON" | "description">;
|
|
8
8
|
|
|
9
9
|
export type TDBIHTMLComponentsV2ToJSONArgs = {
|
|
10
10
|
data?: Record<string, any>;
|