Skip to content

Commit c593bf0

Browse files
committed
rename Native\Laravel namespace to Native\Desktop
1 parent e84ffe2 commit c593bf0

File tree

165 files changed

+404
-404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+404
-404
lines changed

composer.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@
5757
},
5858
"autoload": {
5959
"psr-4": {
60-
"Native\\Laravel\\": "src/Laravel",
60+
"Native\\Desktop\\": "src/Desktop",
6161
"Native\\Electron\\": "src/Electron"
6262
}
6363
},
6464
"autoload-dev": {
6565
"psr-4": {
66-
"Native\\Laravel\\Tests\\": "tests/"
66+
"Native\\Desktop\\Tests\\": "tests/"
6767
}
6868
},
6969
"scripts": {
@@ -88,26 +88,26 @@
8888
"extra": {
8989
"laravel": {
9090
"providers": [
91-
"Native\\Laravel\\NativeServiceProvider",
91+
"Native\\Desktop\\NativeServiceProvider",
9292
"Native\\Electron\\ElectronServiceProvider"
9393
],
9494
"aliases": {
95-
"ChildProcess": "Native\\Laravel\\Facades\\ChildProcess",
96-
"Clipboard": "Native\\Laravel\\Facades\\Clipboard",
97-
"ContextMenu": "Native\\Laravel\\Facades\\ContextMenu",
98-
"Dock": "Native\\Laravel\\Facades\\Dock",
99-
"GlobalShortcut": "Native\\Laravel\\Facades\\GlobalShortcut",
100-
"Menu": "Native\\Laravel\\Facades\\Menu",
101-
"MenuBar": "Native\\Laravel\\Facades\\MenuBar",
102-
"Notification": "Native\\Laravel\\Facades\\Notification",
103-
"PowerMonitor": "Native\\Laravel\\Facades\\PowerMonitor",
104-
"Process": "Native\\Laravel\\Facades\\Process",
105-
"QueueWorker": "Native\\Laravel\\Facades\\QueueWorker",
106-
"Screen": "Native\\Laravel\\Facades\\Screen",
107-
"Settings": "Native\\Laravel\\Facades\\Settings",
108-
"Shell": "Native\\Laravel\\Facades\\Shell",
109-
"System": "Native\\Laravel\\Facades\\System",
110-
"Window": "Native\\Laravel\\Facades\\Window",
95+
"ChildProcess": "Native\\Desktop\\Facades\\ChildProcess",
96+
"Clipboard": "Native\\Desktop\\Facades\\Clipboard",
97+
"ContextMenu": "Native\\Desktop\\Facades\\ContextMenu",
98+
"Dock": "Native\\Desktop\\Facades\\Dock",
99+
"GlobalShortcut": "Native\\Desktop\\Facades\\GlobalShortcut",
100+
"Menu": "Native\\Desktop\\Facades\\Menu",
101+
"MenuBar": "Native\\Desktop\\Facades\\MenuBar",
102+
"Notification": "Native\\Desktop\\Facades\\Notification",
103+
"PowerMonitor": "Native\\Desktop\\Facades\\PowerMonitor",
104+
"Process": "Native\\Desktop\\Facades\\Process",
105+
"QueueWorker": "Native\\Desktop\\Facades\\QueueWorker",
106+
"Screen": "Native\\Desktop\\Facades\\Screen",
107+
"Settings": "Native\\Desktop\\Facades\\Settings",
108+
"Shell": "Native\\Desktop\\Facades\\Shell",
109+
"System": "Native\\Desktop\\Facades\\System",
110+
"Window": "Native\\Desktop\\Facades\\Window",
111111
"Updater": "Native\\Electron\\Facades\\Updater"
112112
}
113113
}

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ parameters:
1414

1515
ignoreErrors:
1616
- '#Class App\\Providers\\NativeAppServiceProvider not found#'
17-
- '#Class Native\\Laravel\\ChildProcess has an uninitialized readonly property#'
17+
- '#Class Native\\Desktop\\ChildProcess has an uninitialized readonly property#'
1818

1919

2020
excludePaths:

resources/electron/electron-plugin/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ class NativePHP {
4747
private addEventListeners(app: Electron.CrossProcessExports.App) {
4848
app.on("open-url", (event, url) => {
4949
notifyLaravel("events", {
50-
event: "\\Native\\Laravel\\Events\\App\\OpenedFromURL",
50+
event: "\\Native\\Desktop\\Events\\App\\OpenedFromURL",
5151
payload: [url],
5252
});
5353
});
5454

5555
app.on("open-file", (event, path) => {
5656
notifyLaravel("events", {
57-
event: "\\Native\\Laravel\\Events\\App\\OpenFile",
57+
event: "\\Native\\Desktop\\Events\\App\\OpenFile",
5858
payload: [path],
5959
});
6060
});
@@ -200,7 +200,7 @@ class NativePHP {
200200

201201
// the commandLine is array of strings in which last element is deep link url
202202
notifyLaravel("events", {
203-
event: "\\Native\\Laravel\\Events\\App\\OpenedFromURL",
203+
event: "\\Native\\Desktop\\Events\\App\\OpenedFromURL",
204204
payload: {
205205
url: commandLine[commandLine.length - 1],
206206
},

resources/electron/electron-plugin/src/server/api/autoUpdater.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ router.post("/quit-and-install", (req, res) => {
2727

2828
autoUpdater.addListener("checking-for-update", () => {
2929
notifyLaravel("events", {
30-
event: `\\Native\\Laravel\\Events\\AutoUpdater\\CheckingForUpdate`,
30+
event: `\\Native\\Desktop\\Events\\AutoUpdater\\CheckingForUpdate`,
3131
});
3232
});
3333

3434
autoUpdater.addListener("update-available", (event: UpdateInfo) => {
3535
notifyLaravel("events", {
36-
event: `\\Native\\Laravel\\Events\\AutoUpdater\\UpdateAvailable`,
36+
event: `\\Native\\Desktop\\Events\\AutoUpdater\\UpdateAvailable`,
3737
payload: {
3838
version: event.version,
3939
files: event.files,
@@ -48,7 +48,7 @@ autoUpdater.addListener("update-available", (event: UpdateInfo) => {
4848

4949
autoUpdater.addListener("update-not-available", (event: UpdateInfo) => {
5050
notifyLaravel("events", {
51-
event: `\\Native\\Laravel\\Events\\AutoUpdater\\UpdateNotAvailable`,
51+
event: `\\Native\\Desktop\\Events\\AutoUpdater\\UpdateNotAvailable`,
5252
payload: {
5353
version: event.version,
5454
files: event.files,
@@ -63,7 +63,7 @@ autoUpdater.addListener("update-not-available", (event: UpdateInfo) => {
6363

6464
autoUpdater.addListener("error", (error: Error) => {
6565
notifyLaravel("events", {
66-
event: `\\Native\\Laravel\\Events\\AutoUpdater\\Error`,
66+
event: `\\Native\\Desktop\\Events\\AutoUpdater\\Error`,
6767
payload: {
6868
name: error.name,
6969
message: error.message,
@@ -74,7 +74,7 @@ autoUpdater.addListener("error", (error: Error) => {
7474

7575
autoUpdater.addListener("download-progress", (progressInfo: ProgressInfo) => {
7676
notifyLaravel("events", {
77-
event: `\\Native\\Laravel\\Events\\AutoUpdater\\DownloadProgress`,
77+
event: `\\Native\\Desktop\\Events\\AutoUpdater\\DownloadProgress`,
7878
payload: {
7979
total: progressInfo.total,
8080
delta: progressInfo.delta,
@@ -87,7 +87,7 @@ autoUpdater.addListener("download-progress", (progressInfo: ProgressInfo) => {
8787

8888
autoUpdater.addListener("update-downloaded", (event: UpdateDownloadedEvent) => {
8989
notifyLaravel("events", {
90-
event: `\\Native\\Laravel\\Events\\AutoUpdater\\UpdateDownloaded`,
90+
event: `\\Native\\Desktop\\Events\\AutoUpdater\\UpdateDownloaded`,
9191
payload: {
9292
downloadedFile: event.downloadedFile,
9393
version: event.version,
@@ -103,7 +103,7 @@ autoUpdater.addListener("update-downloaded", (event: UpdateDownloadedEvent) => {
103103

104104
autoUpdater.addListener("update-cancelled", (event: UpdateInfo) => {
105105
notifyLaravel("events", {
106-
event: `\\Native\\Laravel\\Events\\AutoUpdater\\UpdateCancelled`,
106+
event: `\\Native\\Desktop\\Events\\AutoUpdater\\UpdateCancelled`,
107107
payload: {
108108
version: event.version,
109109
files: event.files,

resources/electron/electron-plugin/src/server/api/childProcess.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function startProcess(settings) {
4646
}
4747

4848
notifyLaravel('events', {
49-
event: 'Native\\Laravel\\Events\\ChildProcess\\StartupError',
49+
event: 'Native\\Desktop\\Events\\ChildProcess\\StartupError',
5050
payload: {
5151
alias,
5252
error: 'Startup timeout exceeded',
@@ -57,7 +57,7 @@ function startProcess(settings) {
5757

5858
proc.stdout.on('data', (data) => {
5959
notifyLaravel('events', {
60-
event: 'Native\\Laravel\\Events\\ChildProcess\\MessageReceived',
60+
event: 'Native\\Desktop\\Events\\ChildProcess\\MessageReceived',
6161
payload: {
6262
alias,
6363
data: data.toString(),
@@ -69,7 +69,7 @@ function startProcess(settings) {
6969
console.error('Process [' + alias + '] ERROR:', data.toString().trim());
7070

7171
notifyLaravel('events', {
72-
event: 'Native\\Laravel\\Events\\ChildProcess\\ErrorReceived',
72+
event: 'Native\\Desktop\\Events\\ChildProcess\\ErrorReceived',
7373
payload: {
7474
alias,
7575
data: data.toString(),
@@ -85,7 +85,7 @@ function startProcess(settings) {
8585
// console.error(`Process [${alias}] error: ${error.message}`);
8686
//
8787
// notifyLaravel('events', {
88-
// event: 'Native\\Laravel\\Events\\ChildProcess\\StartupError',
88+
// event: 'Native\\Desktop\\Events\\ChildProcess\\StartupError',
8989
// payload: {
9090
// alias,
9191
// error: error.toString(),
@@ -104,7 +104,7 @@ function startProcess(settings) {
104104
};
105105

106106
notifyLaravel('events', {
107-
event: 'Native\\Laravel\\Events\\ChildProcess\\ProcessSpawned',
107+
event: 'Native\\Desktop\\Events\\ChildProcess\\ProcessSpawned',
108108
payload: [alias, proc.pid]
109109
});
110110
});
@@ -114,7 +114,7 @@ function startProcess(settings) {
114114
console.log(`Process [${alias}] exited with code [${code}].`);
115115

116116
notifyLaravel('events', {
117-
event: 'Native\\Laravel\\Events\\ChildProcess\\ProcessExited',
117+
event: 'Native\\Desktop\\Events\\ChildProcess\\ProcessExited',
118118
payload: {
119119
alias,
120120
code,
@@ -140,7 +140,7 @@ function startProcess(settings) {
140140
console.error(`Failed to create process [${alias}]: ${error.message}`);
141141

142142
notifyLaravel('events', {
143-
event: 'Native\\Laravel\\Events\\ChildProcess\\StartupError',
143+
event: 'Native\\Desktop\\Events\\ChildProcess\\StartupError',
144144
payload: {
145145
alias,
146146
error: error.toString(),

resources/electron/electron-plugin/src/server/api/helper/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import state from '../../state.js';
44

55
function triggerMenuItemEvent(menuItem, combo) {
66
notifyLaravel('events', {
7-
event: menuItem.event || '\\Native\\Laravel\\Events\\Menu\\MenuItemClicked',
7+
event: menuItem.event || '\\Native\\Desktop\\Events\\Menu\\MenuItemClicked',
88
payload: {
99
item: {
1010
id: menuItem.id,

resources/electron/electron-plugin/src/server/api/menuBar.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ router.post("/create", (req, res) => {
151151

152152
state.activeMenuBar.on("hide", () => {
153153
notifyLaravel("events", {
154-
event: "\\Native\\Laravel\\Events\\MenuBar\\MenuBarHidden"
154+
event: "\\Native\\Desktop\\Events\\MenuBar\\MenuBarHidden"
155155
});
156156
});
157157

158158
state.activeMenuBar.on("show", () => {
159159
notifyLaravel("events", {
160-
event: "\\Native\\Laravel\\Events\\MenuBar\\MenuBarShown"
160+
event: "\\Native\\Desktop\\Events\\MenuBar\\MenuBarShown"
161161
});
162162
});
163163

@@ -172,13 +172,13 @@ function eventsForTray(tray, onlyShowContextMenu, contextMenu, shouldSendCreated
172172

173173
if (shouldSendCreatedEvent) {
174174
notifyLaravel("events", {
175-
event: "\\Native\\Laravel\\Events\\MenuBar\\MenuBarCreated"
175+
event: "\\Native\\Desktop\\Events\\MenuBar\\MenuBarCreated"
176176
});
177177
}
178178

179179
tray.on("drop-files", (event, files) => {
180180
notifyLaravel("events", {
181-
event: "\\Native\\Laravel\\Events\\MenuBar\\MenuBarDroppedFiles",
181+
event: "\\Native\\Desktop\\Events\\MenuBar\\MenuBarDroppedFiles",
182182
payload: [
183183
files
184184
]
@@ -187,7 +187,7 @@ function eventsForTray(tray, onlyShowContextMenu, contextMenu, shouldSendCreated
187187

188188
tray.on('click', (combo, bounds, position) => {
189189
notifyLaravel('events', {
190-
event: "\\Native\\Laravel\\Events\\MenuBar\\MenuBarClicked",
190+
event: "\\Native\\Desktop\\Events\\MenuBar\\MenuBarClicked",
191191
payload: {
192192
combo,
193193
bounds,
@@ -198,7 +198,7 @@ function eventsForTray(tray, onlyShowContextMenu, contextMenu, shouldSendCreated
198198

199199
tray.on("right-click", (combo, bounds) => {
200200
notifyLaravel("events", {
201-
event: "\\Native\\Laravel\\Events\\MenuBar\\MenuBarRightClicked",
201+
event: "\\Native\\Desktop\\Events\\MenuBar\\MenuBarRightClicked",
202202
payload: {
203203
combo,
204204
bounds,
@@ -213,7 +213,7 @@ function eventsForTray(tray, onlyShowContextMenu, contextMenu, shouldSendCreated
213213

214214
tray.on('double-click', (combo, bounds) => {
215215
notifyLaravel('events', {
216-
event: "\\Native\\Laravel\\Events\\MenuBar\\MenuBarDoubleClicked",
216+
event: "\\Native\\Desktop\\Events\\MenuBar\\MenuBarDoubleClicked",
217217
payload: {
218218
combo,
219219
bounds,

resources/electron/electron-plugin/src/server/api/notification.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ router.post('/', (req, res) => {
2222
reference,
2323
} = req.body;
2424

25-
const eventName = customEvent ?? '\\Native\\Laravel\\Events\\Notifications\\NotificationClicked';
25+
const eventName = customEvent ?? '\\Native\\Desktop\\Events\\Notifications\\NotificationClicked';
2626

2727
const notificationReference = reference ?? (Date.now() + '.' + Math.random().toString(36).slice(2, 9));
2828

@@ -44,7 +44,7 @@ router.post('/', (req, res) => {
4444

4545
notification.on("click", (event) => {
4646
notifyLaravel('events', {
47-
event: eventName || '\\Native\\Laravel\\Events\\Notifications\\NotificationClicked',
47+
event: eventName || '\\Native\\Desktop\\Events\\Notifications\\NotificationClicked',
4848
payload: {
4949
reference: notificationReference,
5050
event: JSON.stringify(event),
@@ -54,7 +54,7 @@ router.post('/', (req, res) => {
5454

5555
notification.on("action", (event, index) => {
5656
notifyLaravel('events', {
57-
event: '\\Native\\Laravel\\Events\\Notifications\\NotificationActionClicked',
57+
event: '\\Native\\Desktop\\Events\\Notifications\\NotificationActionClicked',
5858
payload: {
5959
reference: notificationReference,
6060
index,
@@ -65,7 +65,7 @@ router.post('/', (req, res) => {
6565

6666
notification.on("reply", (event, reply) => {
6767
notifyLaravel('events', {
68-
event: '\\Native\\Laravel\\Events\\Notifications\\NotificationReply',
68+
event: '\\Native\\Desktop\\Events\\Notifications\\NotificationReply',
6969
payload: {
7070
reference: notificationReference,
7171
reply,
@@ -76,7 +76,7 @@ router.post('/', (req, res) => {
7676

7777
notification.on("close", (event) => {
7878
notifyLaravel('events', {
79-
event: '\\Native\\Laravel\\Events\\Notifications\\NotificationClosed',
79+
event: '\\Native\\Desktop\\Events\\Notifications\\NotificationClosed',
8080
payload: {
8181
reference: notificationReference,
8282
event: JSON.stringify(event),

0 commit comments

Comments
 (0)