@devisfuture/electron-modular 1.1.10 → 1.1.11

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.
Files changed (46) hide show
  1. package/dist/index.js +0 -8
  2. package/package.json +1 -1
  3. package/dist/@core/__tests__/container.test.d.ts +0 -1
  4. package/dist/@core/__tests__/container.test.js +0 -409
  5. package/dist/@core/bootstrap/__tests__/bootstrap.test.d.ts +0 -1
  6. package/dist/@core/bootstrap/__tests__/bootstrap.test.js +0 -131
  7. package/dist/@core/bootstrap/__tests__/initialize-module.test.d.ts +0 -1
  8. package/dist/@core/bootstrap/__tests__/initialize-module.test.js +0 -140
  9. package/dist/@core/bootstrap/__tests__/instantiate-module.test.d.ts +0 -1
  10. package/dist/@core/bootstrap/__tests__/instantiate-module.test.js +0 -174
  11. package/dist/@core/bootstrap/__tests__/register-imports.test.d.ts +0 -1
  12. package/dist/@core/bootstrap/__tests__/register-imports.test.js +0 -112
  13. package/dist/@core/bootstrap/__tests__/register-ipc-handlers.test.d.ts +0 -1
  14. package/dist/@core/bootstrap/__tests__/register-ipc-handlers.test.js +0 -68
  15. package/dist/@core/bootstrap/__tests__/register-providers.test.d.ts +0 -1
  16. package/dist/@core/bootstrap/__tests__/register-providers.test.js +0 -132
  17. package/dist/@core/bootstrap/__tests__/register-windows.test.d.ts +0 -1
  18. package/dist/@core/bootstrap/__tests__/register-windows.test.js +0 -109
  19. package/dist/@core/bootstrap/__tests__/settings.test.d.ts +0 -1
  20. package/dist/@core/bootstrap/__tests__/settings.test.js +0 -141
  21. package/dist/@core/control-window/__tests__/cache.test.d.ts +0 -1
  22. package/dist/@core/control-window/__tests__/cache.test.js +0 -50
  23. package/dist/@core/control-window/__tests__/destroy.test.d.ts +0 -1
  24. package/dist/@core/control-window/__tests__/destroy.test.js +0 -69
  25. package/dist/@core/control-window/__tests__/receive.test.d.ts +0 -1
  26. package/dist/@core/control-window/__tests__/receive.test.js +0 -68
  27. package/dist/@core/decorators/__tests__/inject.test.d.ts +0 -1
  28. package/dist/@core/decorators/__tests__/inject.test.js +0 -174
  29. package/dist/@core/decorators/__tests__/injectable.test.d.ts +0 -1
  30. package/dist/@core/decorators/__tests__/injectable.test.js +0 -73
  31. package/dist/@core/decorators/__tests__/ipc-handler.test.d.ts +0 -1
  32. package/dist/@core/decorators/__tests__/ipc-handler.test.js +0 -72
  33. package/dist/@core/decorators/__tests__/rg-module.test.d.ts +0 -1
  34. package/dist/@core/decorators/__tests__/rg-module.test.js +0 -135
  35. package/dist/@core/decorators/__tests__/window-manager.test.d.ts +0 -1
  36. package/dist/@core/decorators/__tests__/window-manager.test.js +0 -110
  37. package/dist/@core/errors/__tests__/index.test.d.ts +0 -1
  38. package/dist/@core/errors/__tests__/index.test.js +0 -82
  39. package/dist/@core/utils/__tests__/dependency-tokens.test.d.ts +0 -1
  40. package/dist/@core/utils/__tests__/dependency-tokens.test.js +0 -186
  41. package/dist/__mocks__/electron.d.ts +0 -88
  42. package/dist/__mocks__/electron.js +0 -76
  43. package/dist/__tests__/config.test.d.ts +0 -1
  44. package/dist/__tests__/config.test.js +0 -24
  45. package/dist/__tests__/setup.d.ts +0 -1
  46. package/dist/__tests__/setup.js +0 -9
@@ -1,88 +0,0 @@
1
- export declare const mockApp: {
2
- getPath: import("vitest").Mock<(name: string) => string>;
3
- getVersion: import("vitest").Mock<() => string>;
4
- getName: import("vitest").Mock<() => string>;
5
- quit: import("vitest").Mock<(...args: any[]) => any>;
6
- exit: import("vitest").Mock<(...args: any[]) => any>;
7
- on: import("vitest").Mock<(...args: any[]) => any>;
8
- once: import("vitest").Mock<(...args: any[]) => any>;
9
- removeListener: import("vitest").Mock<(...args: any[]) => any>;
10
- whenReady: import("vitest").Mock<() => Promise<void>>;
11
- isReady: import("vitest").Mock<() => boolean>;
12
- getAppPath: import("vitest").Mock<() => string>;
13
- };
14
- export declare const mockBrowserWindow: import("vitest").Mock<(...args: any[]) => any>;
15
- export declare const mockIpcMain: {
16
- on: import("vitest").Mock<(...args: any[]) => any>;
17
- once: import("vitest").Mock<(...args: any[]) => any>;
18
- handle: import("vitest").Mock<(...args: any[]) => any>;
19
- removeHandler: import("vitest").Mock<(...args: any[]) => any>;
20
- removeListener: import("vitest").Mock<(...args: any[]) => any>;
21
- removeAllListeners: import("vitest").Mock<(...args: any[]) => any>;
22
- };
23
- export declare const mockDialog: {
24
- showOpenDialog: import("vitest").Mock<() => Promise<{
25
- canceled: boolean;
26
- filePaths: string[];
27
- }>>;
28
- showSaveDialog: import("vitest").Mock<() => Promise<{
29
- canceled: boolean;
30
- filePath: string;
31
- }>>;
32
- showMessageBox: import("vitest").Mock<() => Promise<{
33
- response: number;
34
- }>>;
35
- showErrorBox: import("vitest").Mock<(...args: any[]) => any>;
36
- };
37
- export declare const mockSession: {
38
- defaultSession: {
39
- webRequest: {
40
- onHeadersReceived: import("vitest").Mock<(...args: any[]) => any>;
41
- };
42
- };
43
- };
44
- export declare const mockElectron: {
45
- app: {
46
- getPath: import("vitest").Mock<(name: string) => string>;
47
- getVersion: import("vitest").Mock<() => string>;
48
- getName: import("vitest").Mock<() => string>;
49
- quit: import("vitest").Mock<(...args: any[]) => any>;
50
- exit: import("vitest").Mock<(...args: any[]) => any>;
51
- on: import("vitest").Mock<(...args: any[]) => any>;
52
- once: import("vitest").Mock<(...args: any[]) => any>;
53
- removeListener: import("vitest").Mock<(...args: any[]) => any>;
54
- whenReady: import("vitest").Mock<() => Promise<void>>;
55
- isReady: import("vitest").Mock<() => boolean>;
56
- getAppPath: import("vitest").Mock<() => string>;
57
- };
58
- BrowserWindow: import("vitest").Mock<(...args: any[]) => any>;
59
- ipcMain: {
60
- on: import("vitest").Mock<(...args: any[]) => any>;
61
- once: import("vitest").Mock<(...args: any[]) => any>;
62
- handle: import("vitest").Mock<(...args: any[]) => any>;
63
- removeHandler: import("vitest").Mock<(...args: any[]) => any>;
64
- removeListener: import("vitest").Mock<(...args: any[]) => any>;
65
- removeAllListeners: import("vitest").Mock<(...args: any[]) => any>;
66
- };
67
- dialog: {
68
- showOpenDialog: import("vitest").Mock<() => Promise<{
69
- canceled: boolean;
70
- filePaths: string[];
71
- }>>;
72
- showSaveDialog: import("vitest").Mock<() => Promise<{
73
- canceled: boolean;
74
- filePath: string;
75
- }>>;
76
- showMessageBox: import("vitest").Mock<() => Promise<{
77
- response: number;
78
- }>>;
79
- showErrorBox: import("vitest").Mock<(...args: any[]) => any>;
80
- };
81
- session: {
82
- defaultSession: {
83
- webRequest: {
84
- onHeadersReceived: import("vitest").Mock<(...args: any[]) => any>;
85
- };
86
- };
87
- };
88
- };
@@ -1,76 +0,0 @@
1
- import { vi } from "vitest";
2
- export const mockApp = {
3
- getPath: vi.fn((name) => `/mock/path/${name}`),
4
- getVersion: vi.fn(() => "1.0.0"),
5
- getName: vi.fn(() => "MockApp"),
6
- quit: vi.fn(),
7
- exit: vi.fn(),
8
- on: vi.fn(),
9
- once: vi.fn(),
10
- removeListener: vi.fn(),
11
- whenReady: vi.fn(() => Promise.resolve()),
12
- isReady: vi.fn(() => true),
13
- getAppPath: vi.fn(() => "/mock/app"),
14
- };
15
- export const mockBrowserWindow = vi.fn().mockImplementation(() => ({
16
- loadURL: vi.fn(() => Promise.resolve()),
17
- loadFile: vi.fn(() => Promise.resolve()),
18
- on: vi.fn(),
19
- once: vi.fn(),
20
- webContents: {
21
- send: vi.fn(),
22
- on: vi.fn(),
23
- executeJavaScript: vi.fn(() => Promise.resolve()),
24
- openDevTools: vi.fn(),
25
- closeDevTools: vi.fn(),
26
- },
27
- show: vi.fn(),
28
- hide: vi.fn(),
29
- close: vi.fn(),
30
- destroy: vi.fn(),
31
- isDestroyed: vi.fn(() => false),
32
- isFocused: vi.fn(() => true),
33
- focus: vi.fn(),
34
- id: 1,
35
- }));
36
- // Add static methods to mockBrowserWindow
37
- Object.assign(mockBrowserWindow, {
38
- getAllWindows: vi.fn(() => []),
39
- });
40
- export const mockIpcMain = {
41
- on: vi.fn(),
42
- once: vi.fn(),
43
- handle: vi.fn(),
44
- removeHandler: vi.fn(),
45
- removeListener: vi.fn(),
46
- removeAllListeners: vi.fn(),
47
- };
48
- export const mockDialog = {
49
- showOpenDialog: vi.fn(() => Promise.resolve({
50
- canceled: false,
51
- filePaths: ["/mock/file.txt"],
52
- })),
53
- showSaveDialog: vi.fn(() => Promise.resolve({
54
- canceled: false,
55
- filePath: "/mock/save.txt",
56
- })),
57
- showMessageBox: vi.fn(() => Promise.resolve({
58
- response: 0,
59
- })),
60
- showErrorBox: vi.fn(),
61
- };
62
- export const mockSession = {
63
- defaultSession: {
64
- webRequest: {
65
- onHeadersReceived: vi.fn(),
66
- },
67
- },
68
- };
69
- export const mockElectron = {
70
- app: mockApp,
71
- BrowserWindow: mockBrowserWindow,
72
- ipcMain: mockIpcMain,
73
- dialog: mockDialog,
74
- session: mockSession,
75
- };
76
- vi.mock("electron", () => mockElectron);
@@ -1 +0,0 @@
1
- export {};
@@ -1,24 +0,0 @@
1
- import { describe, it, expect } from "vitest";
2
- import { folders } from "../config.js";
3
- describe("config", () => {
4
- describe("folders", () => {
5
- it("should export distRenderer folder name", () => {
6
- expect(folders.distRenderer).toBe("dist-renderer");
7
- });
8
- it("should export distMain folder name", () => {
9
- expect(folders.distMain).toBe("dist-main");
10
- });
11
- it("should have both folder properties", () => {
12
- expect(folders).toHaveProperty("distRenderer");
13
- expect(folders).toHaveProperty("distMain");
14
- });
15
- it("should contain string values", () => {
16
- expect(typeof folders.distRenderer).toBe("string");
17
- expect(typeof folders.distMain).toBe("string");
18
- });
19
- it("should not be empty strings", () => {
20
- expect(folders.distRenderer.length).toBeGreaterThan(0);
21
- expect(folders.distMain.length).toBeGreaterThan(0);
22
- });
23
- });
24
- });
@@ -1 +0,0 @@
1
- import "reflect-metadata/lite";
@@ -1,9 +0,0 @@
1
- import { beforeEach, vi } from "vitest";
2
- import "reflect-metadata/lite";
3
- vi.mock("electron", async () => {
4
- const { mockElectron } = await import("../__mocks__/electron.js");
5
- return mockElectron;
6
- });
7
- beforeEach(() => {
8
- vi.clearAllMocks();
9
- });