qlogicae_aklot 1.4.6 → 1.4.8

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.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "qlogicae_aklot",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "author": "Vaughn Cedric L. Araneta",
5
- "main": "./library/index.js",
5
+ "main": "./qlogicae/aklot1/index.js",
6
6
  "module": "index.ts",
7
7
  "devDependencies": {
8
8
  "@eslint/js": "^10.0.1",
@@ -10,6 +10,7 @@
10
10
  "@vitest/coverage-v8": "4.1.8",
11
11
  "esbuild": "^0.28.1",
12
12
  "eslint": "^10.4.1",
13
+ "javascript-obfuscator": "^5.4.3",
13
14
  "prettier": "^3.8.4",
14
15
  "rimraf": "^6.1.3",
15
16
  "tsup": "^8.5.1",
@@ -19,26 +20,27 @@
19
20
  },
20
21
  "description": "QLogicae Aklot",
21
22
  "bin": {
22
- "qlogicae_aklot": "./library/cli.js"
23
+ "qlogicae_aklot": "./qlogicae/aklot1/cli.js"
23
24
  },
24
25
  "files": [
25
- "library",
26
+ "qlogicae",
26
27
  "documents"
27
28
  ],
28
29
  "license": "MIT",
29
30
  "private": false,
30
31
  "scripts": {
31
- "clean": "bunx rimraf library",
32
+ "clean": "bunx rimraf qlogicae",
32
33
  "format": "bunx prettier --config './configurations/.prettierrc' --write .",
33
34
  "format:check": "bunx prettier --config './configurations/.prettierrc' --check .",
34
35
  "lint": "bunx eslint --config './configurations/eslint.config.js' .",
35
36
  "transpile": "bunx tsc --project './configurations/tsconfig.json'",
36
37
  "bundle": "bun './configurations/esbuild.js'",
38
+ "obfuscate": "bun './configurations/obfuscate.js'",
37
39
  "build": "bun run clean && bun run format && bun run lint && bun run transpile && bun run bundle",
38
40
  "test": "bun run test:unit",
39
41
  "test:unit": "bunx vitest run --watch=false --config './configurations/vitest.unit.config.ts' --reporter=verbose --coverage",
40
42
  "test:bench": "bunx vitest bench --watch=false --config './configurations/vitest.bench.config.ts' --coverage",
41
- "deploy:check": "npm pack --dry-run",
43
+ "deploy:check": "bun run build && npm pack --dry-run",
42
44
  "workflow:develop": "bun run build",
43
45
  "workflow:test": "bun run build && bun run test",
44
46
  "workflow:test:unit": "bun run build && bun run test:unit",
@@ -50,7 +52,7 @@
50
52
  "workflow:deploy:post": "(git push && bun publish) || (git push && npm login && bun publish) || (npm login && bun publish)"
51
53
  },
52
54
  "type": "module",
53
- "types": "./library/index.d.ts",
55
+ "types": "./qlogicae/aklot1/index.d.ts",
54
56
  "dependencies": {
55
57
  "pino": "^10.3.1"
56
58
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../sources/aklot1/cli.ts"],"names":[],"mappings":""}
@@ -1,4 +1,3 @@
1
1
  #!/usr/bin/env bun
2
- import { greet } from "./utilities";
3
- greet("Bin");
2
+ console.log("Helo");
4
3
  //# sourceMappingURL=cli.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../sources/aklot1/cli.ts"],
4
+ "sourcesContent": ["#!/usr/bin/env bun\r\n\r\nconsole.log('Helo');\r\n"],
5
+ "mappings": ";AAEA,QAAQ,IAAI,MAAM;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from './singletonManager';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../sources/aklot1/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./singletonManager";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../sources/aklot1/index.ts"],
4
+ "sourcesContent": ["export * from './singletonManager';\r\n"],
5
+ "mappings": "AAAA,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,17 @@
1
+ export type SingletonManagerConstructor<Type> = new () => Type;
2
+ export type SingletonManagerConstructorKey = abstract new (...args: never[]) => unknown;
3
+ export declare class SingletonManager {
4
+ static configurations: object;
5
+ private static readonly singletons;
6
+ private static readonly singletonArrays;
7
+ private static readonly thisSingleton;
8
+ constructor();
9
+ static construct(): boolean;
10
+ static destruct(): boolean;
11
+ static setup(newConfigurations: object): boolean;
12
+ static reset(): boolean;
13
+ static getSingleton<Type>(constructorFunction: SingletonManagerConstructor<Type>): Type;
14
+ static getSingletonFromPool<Type>(constructorFunction: SingletonManagerConstructor<Type>, instanceCount: number, index: number): Type;
15
+ static getThisSingleton(): SingletonManager;
16
+ }
17
+ //# sourceMappingURL=singletonManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"singletonManager.d.ts","sourceRoot":"","sources":["../../sources/aklot1/singletonManager.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,2BAA2B,CAAC,IAAI,IAAI,UAAU,IAAI,CAAC;AAE/D,MAAM,MAAM,8BAA8B,GAAG,QAAQ,MACpD,GAAG,IAAI,EAAE,KAAK,EAAE,KACZ,OAAO,CAAC;AAEb,qBAAa,gBAAgB;IAC5B,OAAc,cAAc,EAAE,MAAM,CAAM;IAE1C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAG9B;IAEJ,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAGnC;IAEJ,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAA0B;;WAIjD,SAAS,IAAI,OAAO;WAIpB,QAAQ,IAAI,OAAO;WAOnB,KAAK,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO;WAMzC,KAAK,IAAI,OAAO;WAOhB,YAAY,CAAC,IAAI,EAC9B,mBAAmB,EAAE,2BAA2B,CAAC,IAAI,CAAC,GACpD,IAAI;WAmBO,oBAAoB,CAAC,IAAI,EACtC,mBAAmB,EAAE,2BAA2B,CAAC,IAAI,CAAC,EACtD,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,GACX,IAAI;WA8BO,gBAAgB,IAAI,gBAAgB;CAGlD"}
@@ -0,0 +1,68 @@
1
+ class SingletonManager {
2
+ static configurations = {};
3
+ static singletons = /* @__PURE__ */ new Map();
4
+ static singletonArrays = /* @__PURE__ */ new Map();
5
+ static thisSingleton = new SingletonManager();
6
+ constructor() {
7
+ }
8
+ static construct() {
9
+ return true;
10
+ }
11
+ static destruct() {
12
+ this.singletons.clear();
13
+ this.singletonArrays.clear();
14
+ return true;
15
+ }
16
+ static setup(newConfigurations) {
17
+ this.configurations = newConfigurations;
18
+ return true;
19
+ }
20
+ static reset() {
21
+ this.singletons.clear();
22
+ this.singletonArrays.clear();
23
+ return true;
24
+ }
25
+ static getSingleton(constructorFunction) {
26
+ try {
27
+ let instance = this.singletons.get(constructorFunction);
28
+ if (instance === void 0) {
29
+ instance = new constructorFunction();
30
+ this.singletons.set(constructorFunction, instance);
31
+ }
32
+ return instance;
33
+ } catch {
34
+ throw new Error(
35
+ "Exception found at 'QLogicae.Aklot1.SingletonManager.getSingleton()'"
36
+ );
37
+ }
38
+ }
39
+ static getSingletonFromPool(constructorFunction, instanceCount, index) {
40
+ try {
41
+ if (instanceCount <= 0) {
42
+ throw new Error(
43
+ "Exception found at 'QLogicae.Aklot1.SingletonManager.getSingletonFromPool()'"
44
+ );
45
+ }
46
+ let instances = this.singletonArrays.get(constructorFunction);
47
+ if (instances === void 0) {
48
+ instances = [];
49
+ for (let i = 0; i < instanceCount; ++i) {
50
+ instances.push(new constructorFunction());
51
+ }
52
+ this.singletonArrays.set(constructorFunction, instances);
53
+ }
54
+ return instances[Math.abs(index) % instanceCount];
55
+ } catch {
56
+ throw new Error(
57
+ "Exception found at 'QLogicae.Aklot1.SingletonManager.getSingletonFromPool()'"
58
+ );
59
+ }
60
+ }
61
+ static getThisSingleton() {
62
+ return this.thisSingleton;
63
+ }
64
+ }
65
+ export {
66
+ SingletonManager
67
+ };
68
+ //# sourceMappingURL=singletonManager.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../sources/aklot1/singletonManager.ts"],
4
+ "sourcesContent": ["export type SingletonManagerConstructor<Type> = new () => Type;\r\n\r\nexport type SingletonManagerConstructorKey = abstract new (\r\n\t...args: never[]\r\n) => unknown;\r\n\r\nexport class SingletonManager {\r\n\tpublic static configurations: object = {};\r\n\r\n\tprivate static readonly singletons = new Map<\r\n\t\tSingletonManagerConstructorKey,\r\n\t\tunknown\r\n\t>();\r\n\r\n\tprivate static readonly singletonArrays = new Map<\r\n\t\tSingletonManagerConstructorKey,\r\n\t\tunknown[]\r\n\t>();\r\n\r\n\tprivate static readonly thisSingleton = new SingletonManager();\r\n\r\n\tpublic constructor() {}\r\n\r\n\tpublic static construct(): boolean {\r\n\t\treturn true;\r\n\t}\r\n\r\n\tpublic static destruct(): boolean {\r\n\t\tthis.singletons.clear();\r\n\t\tthis.singletonArrays.clear();\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\tpublic static setup(newConfigurations: object): boolean {\r\n\t\tthis.configurations = newConfigurations;\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\tpublic static reset(): boolean {\r\n\t\tthis.singletons.clear();\r\n\t\tthis.singletonArrays.clear();\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\tpublic static getSingleton<Type>(\r\n\t\tconstructorFunction: SingletonManagerConstructor<Type>\r\n\t): Type {\r\n\t\ttry {\r\n\t\t\tlet instance = this.singletons.get(constructorFunction) as\r\n\t\t\t\t| Type\r\n\t\t\t\t| undefined;\r\n\r\n\t\t\tif (instance === undefined) {\r\n\t\t\t\tinstance = new constructorFunction();\r\n\t\t\t\tthis.singletons.set(constructorFunction, instance);\r\n\t\t\t}\r\n\r\n\t\t\treturn instance;\r\n\t\t} catch {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t\"Exception found at 'QLogicae.Aklot1.SingletonManager.getSingleton()'\"\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic static getSingletonFromPool<Type>(\r\n\t\tconstructorFunction: SingletonManagerConstructor<Type>,\r\n\t\tinstanceCount: number,\r\n\t\tindex: number\r\n\t): Type {\r\n\t\ttry {\r\n\t\t\tif (instanceCount <= 0) {\r\n\t\t\t\tthrow new Error(\r\n\t\t\t\t\t\"Exception found at 'QLogicae.Aklot1.SingletonManager.getSingletonFromPool()'\"\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tlet instances = this.singletonArrays.get(constructorFunction) as\r\n\t\t\t\t| Type[]\r\n\t\t\t\t| undefined;\r\n\r\n\t\t\tif (instances === undefined) {\r\n\t\t\t\tinstances = [];\r\n\r\n\t\t\t\tfor (let i = 0; i < instanceCount; ++i) {\r\n\t\t\t\t\tinstances.push(new constructorFunction());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.singletonArrays.set(constructorFunction, instances);\r\n\t\t\t}\r\n\r\n\t\t\treturn instances[Math.abs(index) % instanceCount]!;\r\n\t\t} catch {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t\"Exception found at 'QLogicae.Aklot1.SingletonManager.getSingletonFromPool()'\"\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\tpublic static getThisSingleton(): SingletonManager {\r\n\t\treturn this.thisSingleton;\r\n\t}\r\n}\r\n"],
5
+ "mappings": "AAMO,MAAM,iBAAiB;AAAA,EAC7B,OAAc,iBAAyB,CAAC;AAAA,EAExC,OAAwB,aAAa,oBAAI,IAGvC;AAAA,EAEF,OAAwB,kBAAkB,oBAAI,IAG5C;AAAA,EAEF,OAAwB,gBAAgB,IAAI,iBAAiB;AAAA,EAEtD,cAAc;AAAA,EAAC;AAAA,EAEtB,OAAc,YAAqB;AAClC,WAAO;AAAA,EACR;AAAA,EAEA,OAAc,WAAoB;AACjC,SAAK,WAAW,MAAM;AACtB,SAAK,gBAAgB,MAAM;AAE3B,WAAO;AAAA,EACR;AAAA,EAEA,OAAc,MAAM,mBAAoC;AACvD,SAAK,iBAAiB;AAEtB,WAAO;AAAA,EACR;AAAA,EAEA,OAAc,QAAiB;AAC9B,SAAK,WAAW,MAAM;AACtB,SAAK,gBAAgB,MAAM;AAE3B,WAAO;AAAA,EACR;AAAA,EAEA,OAAc,aACb,qBACO;AACP,QAAI;AACH,UAAI,WAAW,KAAK,WAAW,IAAI,mBAAmB;AAItD,UAAI,aAAa,QAAW;AAC3B,mBAAW,IAAI,oBAAoB;AACnC,aAAK,WAAW,IAAI,qBAAqB,QAAQ;AAAA,MAClD;AAEA,aAAO;AAAA,IACR,QAAQ;AACP,YAAM,IAAI;AAAA,QACT;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EAEA,OAAc,qBACb,qBACA,eACA,OACO;AACP,QAAI;AACH,UAAI,iBAAiB,GAAG;AACvB,cAAM,IAAI;AAAA,UACT;AAAA,QACD;AAAA,MACD;AAEA,UAAI,YAAY,KAAK,gBAAgB,IAAI,mBAAmB;AAI5D,UAAI,cAAc,QAAW;AAC5B,oBAAY,CAAC;AAEb,iBAAS,IAAI,GAAG,IAAI,eAAe,EAAE,GAAG;AACvC,oBAAU,KAAK,IAAI,oBAAoB,CAAC;AAAA,QACzC;AAEA,aAAK,gBAAgB,IAAI,qBAAqB,SAAS;AAAA,MACxD;AAEA,aAAO,UAAU,KAAK,IAAI,KAAK,IAAI,aAAa;AAAA,IACjD,QAAQ;AACP,YAAM,IAAI;AAAA,QACT;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EAEA,OAAc,mBAAqC;AAClD,WAAO,KAAK;AAAA,EACb;AACD;",
6
+ "names": []
7
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../sources/cli.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../sources/cli.ts"],
4
- "sourcesContent": ["#!/usr/bin/env bun\r\n\r\nimport { greet } from './utilities';\r\n\r\ngreet('Bin');\r\n"],
5
- "mappings": ";AAEA,SAAS,aAAa;AAEtB,MAAM,KAAK;",
6
- "names": []
7
- }
@@ -1,2 +0,0 @@
1
- export * from './utilities';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../sources/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
package/library/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from "./utilities";
2
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../sources/index.ts"],
4
- "sourcesContent": ["export * from './utilities';\r\n"],
5
- "mappings": "AAAA,cAAc;",
6
- "names": []
7
- }
@@ -1,2 +0,0 @@
1
- export declare function greet(name: string): boolean;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../sources/utilities/index.ts"],"names":[],"mappings":"AAIA,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAI3C"}
@@ -1,10 +0,0 @@
1
- import pino from "pino";
2
- const logger = pino();
3
- function greet(name) {
4
- logger.info(`Hello ${name}!`);
5
- return true;
6
- }
7
- export {
8
- greet
9
- };
10
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../sources/utilities/index.ts"],
4
- "sourcesContent": ["import pino from 'pino';\r\n\r\nconst logger = pino();\r\n\r\nexport function greet(name: string): boolean {\r\n\tlogger.info(`Hello ${name}!`);\r\n\r\n\treturn true;\r\n}\r\n"],
5
- "mappings": "AAAA,OAAO,UAAU;AAEjB,MAAM,SAAS,KAAK;AAEb,SAAS,MAAM,MAAuB;AAC5C,SAAO,KAAK,SAAS,IAAI,GAAG;AAE5B,SAAO;AACR;",
6
- "names": []
7
- }
File without changes