From 99742e3dc1779141c5c8f2ec573faf33c72dea84 Mon Sep 17 00:00:00 2001 From: Amadou Ada DIENE Date: Thu, 22 Jul 2021 14:06:31 +0200 Subject: [PATCH] fix: shared-lib not found https://github.com/sourcygen/electron-angular-quick-start/issues/4 --- .husky/_/husky.sh | 3 +-- .../.dist/apis/window-api-consts.d.ts | 10 ++++++++++ .../shared-lib/.dist/apis/window-api-consts.js | 10 ++++++++++ .../.dist/apis/window-api-consts.js.map | 1 + .../shared-lib/.dist/apis/window-api.d.ts | 14 ++++++++++++++ workspaces/shared-lib/.dist/apis/window-api.js | 2 ++ .../shared-lib/.dist/apis/window-api.js.map | 1 + workspaces/shared-lib/.dist/index.d.ts | 9 +++++++++ workspaces/shared-lib/.dist/index.js | 4 ++++ workspaces/shared-lib/.dist/index.js.map | 1 + .../.dist/models/config/app-config.d.ts | 18 ++++++++++++++++++ .../.dist/models/config/app-config.js | 2 ++ .../.dist/models/config/app-config.js.map | 1 + workspaces/shared-lib/.gitignore | 2 -- 14 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 workspaces/shared-lib/.dist/apis/window-api-consts.d.ts create mode 100644 workspaces/shared-lib/.dist/apis/window-api-consts.js create mode 100644 workspaces/shared-lib/.dist/apis/window-api-consts.js.map create mode 100644 workspaces/shared-lib/.dist/apis/window-api.d.ts create mode 100644 workspaces/shared-lib/.dist/apis/window-api.js create mode 100644 workspaces/shared-lib/.dist/apis/window-api.js.map create mode 100644 workspaces/shared-lib/.dist/index.d.ts create mode 100644 workspaces/shared-lib/.dist/index.js create mode 100644 workspaces/shared-lib/.dist/index.js.map create mode 100644 workspaces/shared-lib/.dist/models/config/app-config.d.ts create mode 100644 workspaces/shared-lib/.dist/models/config/app-config.js create mode 100644 workspaces/shared-lib/.dist/models/config/app-config.js.map delete mode 100644 workspaces/shared-lib/.gitignore diff --git a/.husky/_/husky.sh b/.husky/_/husky.sh index ca2720e..5f7c17c 100644 --- a/.husky/_/husky.sh +++ b/.husky/_/husky.sh @@ -23,8 +23,7 @@ if [ -z "$husky_skip_init" ]; then if [ $exitCode != 0 ]; then echo "husky - $hook_name hook exited with code $exitCode (error)" - exit $exitCode fi - exit 0 + exit $exitCode fi diff --git a/workspaces/shared-lib/.dist/apis/window-api-consts.d.ts b/workspaces/shared-lib/.dist/apis/window-api-consts.d.ts new file mode 100644 index 0000000..56ad480 --- /dev/null +++ b/workspaces/shared-lib/.dist/apis/window-api-consts.d.ts @@ -0,0 +1,10 @@ +export declare class WindowApiConst { + /** Channel used by the renderer process to send data to the main process */ + static readonly MULTIPLES_INPUT = 'getMultiplesInput'; + /** Channel used by the renderer process to receive data from the main process */ + static readonly MULTIPLES_OUTPUT = 'getMultiplesOutput'; + /** Whitelist of the safe channels to use when sending data to the main process */ + static readonly SENDING_SAFE_CHANNELS: string[]; + /** Whitelist of the safe channels to use when receiving data from the main process */ + static readonly RECEIVING_SAFE_CHANNELS: string[]; +} diff --git a/workspaces/shared-lib/.dist/apis/window-api-consts.js b/workspaces/shared-lib/.dist/apis/window-api-consts.js new file mode 100644 index 0000000..545de5f --- /dev/null +++ b/workspaces/shared-lib/.dist/apis/window-api-consts.js @@ -0,0 +1,10 @@ +export class WindowApiConst {} +/** Channel used by the renderer process to send data to the main process */ +WindowApiConst.MULTIPLES_INPUT = 'getMultiplesInput'; +/** Channel used by the renderer process to receive data from the main process */ +WindowApiConst.MULTIPLES_OUTPUT = 'getMultiplesOutput'; +/** Whitelist of the safe channels to use when sending data to the main process */ +WindowApiConst.SENDING_SAFE_CHANNELS = [WindowApiConst.MULTIPLES_INPUT]; +/** Whitelist of the safe channels to use when receiving data from the main process */ +WindowApiConst.RECEIVING_SAFE_CHANNELS = [WindowApiConst.MULTIPLES_OUTPUT]; +//# sourceMappingURL=window-api-consts.js.map diff --git a/workspaces/shared-lib/.dist/apis/window-api-consts.js.map b/workspaces/shared-lib/.dist/apis/window-api-consts.js.map new file mode 100644 index 0000000..cfd8735 --- /dev/null +++ b/workspaces/shared-lib/.dist/apis/window-api-consts.js.map @@ -0,0 +1 @@ +{"version":3,"file":"window-api-consts.js","sourceRoot":"","sources":["../../apis/window-api-consts.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,cAAc;;AACzB,4EAA4E;AACrD,8BAAe,GAAG,mBAAmB,CAAC;AAE7D,iFAAiF;AAC1D,+BAAgB,GAAG,oBAAoB,CAAC;AAE/D,kFAAkF;AAC3D,oCAAqB,GAAG;IAC7C,cAAc,CAAC,eAAe;CAC/B,CAAC;AAEF,sFAAsF;AAC/D,sCAAuB,GAAG;IAC/C,cAAc,CAAC,gBAAgB;CAChC,CAAC"} \ No newline at end of file diff --git a/workspaces/shared-lib/.dist/apis/window-api.d.ts b/workspaces/shared-lib/.dist/apis/window-api.d.ts new file mode 100644 index 0000000..cc8e8f8 --- /dev/null +++ b/workspaces/shared-lib/.dist/apis/window-api.d.ts @@ -0,0 +1,14 @@ +export interface WindowApi { + /** + * This method is used by the renderer process to receive data from the main process + * @param channel used by the renderer to receive data and by the main to send them + * @param func the callback function to execute when data are available + */ + receive(channel: string, func: (output: Out) => void): void; + /** + * This method is used by the renderer process to send data to the main process + * @param channel used by the renderer to send data and by the main to receive them + * @param data the data sent by the renderer process to the main process + */ + send(channel: string, input: In): void; +} diff --git a/workspaces/shared-lib/.dist/apis/window-api.js b/workspaces/shared-lib/.dist/apis/window-api.js new file mode 100644 index 0000000..72962e9 --- /dev/null +++ b/workspaces/shared-lib/.dist/apis/window-api.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=window-api.js.map diff --git a/workspaces/shared-lib/.dist/apis/window-api.js.map b/workspaces/shared-lib/.dist/apis/window-api.js.map new file mode 100644 index 0000000..23f5906 --- /dev/null +++ b/workspaces/shared-lib/.dist/apis/window-api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"window-api.js","sourceRoot":"","sources":["../../apis/window-api.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/workspaces/shared-lib/.dist/index.d.ts b/workspaces/shared-lib/.dist/index.d.ts new file mode 100644 index 0000000..4abdd86 --- /dev/null +++ b/workspaces/shared-lib/.dist/index.d.ts @@ -0,0 +1,9 @@ +import { WindowApi } from './apis/window-api'; +export * from './apis/window-api'; +export * from './apis/window-api-consts'; +export * from './models/config/app-config'; +declare global { + interface Window { + api: WindowApi; + } +} diff --git a/workspaces/shared-lib/.dist/index.js b/workspaces/shared-lib/.dist/index.js new file mode 100644 index 0000000..ec27c80 --- /dev/null +++ b/workspaces/shared-lib/.dist/index.js @@ -0,0 +1,4 @@ +export * from './apis/window-api'; +export * from './apis/window-api-consts'; +export * from './models/config/app-config'; +//# sourceMappingURL=index.js.map diff --git a/workspaces/shared-lib/.dist/index.js.map b/workspaces/shared-lib/.dist/index.js.map new file mode 100644 index 0000000..bd2f966 --- /dev/null +++ b/workspaces/shared-lib/.dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC"} \ No newline at end of file diff --git a/workspaces/shared-lib/.dist/models/config/app-config.d.ts b/workspaces/shared-lib/.dist/models/config/app-config.d.ts new file mode 100644 index 0000000..6174bb1 --- /dev/null +++ b/workspaces/shared-lib/.dist/models/config/app-config.d.ts @@ -0,0 +1,18 @@ +export interface AppConfig { + /** The configuration identifier */ + configId: string; + /** The main logger output file path */ + mainLogFile: string; + /** The main logger output level */ + mainLogLevel: string; + /** Tells if we should try to load app icon */ + isIconAvailable: boolean; + /** Tells if `nodeIntegration` webPreference is enabled */ + isNodeIntegration: boolean; + /** Tells if `contextIsolation` and `worldSafeExecuteJavaScript` webPreferences are enabled */ + isContextIsolation: boolean; + /** Tells if `isEnableRemoteModule` webPreference is enabled */ + isEnableRemoteModule: boolean; + /** Tells if we should open dev tools */ + isOpenDevTools: boolean; +} diff --git a/workspaces/shared-lib/.dist/models/config/app-config.js b/workspaces/shared-lib/.dist/models/config/app-config.js new file mode 100644 index 0000000..1616085 --- /dev/null +++ b/workspaces/shared-lib/.dist/models/config/app-config.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=app-config.js.map diff --git a/workspaces/shared-lib/.dist/models/config/app-config.js.map b/workspaces/shared-lib/.dist/models/config/app-config.js.map new file mode 100644 index 0000000..7ab283f --- /dev/null +++ b/workspaces/shared-lib/.dist/models/config/app-config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"app-config.js","sourceRoot":"","sources":["../../../models/config/app-config.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/workspaces/shared-lib/.gitignore b/workspaces/shared-lib/.gitignore deleted file mode 100644 index f8929e1..0000000 --- a/workspaces/shared-lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Generated JS files -/.dist \ No newline at end of file