@nocobase/plugin-notifications 1.2.13-alpha → 1.3.0-alpha.20240710084543
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 +2 -2
- package/dist/client/index.d.ts +0 -13
- package/dist/client/index.js +0 -10
- package/dist/externalVersion.js +0 -15
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -48
- package/dist/node_modules/nodemailer/.gitattributes +0 -6
- package/dist/node_modules/nodemailer/.ncurc.js +0 -7
- package/dist/node_modules/nodemailer/.prettierrc.js +0 -8
- package/dist/node_modules/nodemailer/LICENSE +0 -16
- package/dist/node_modules/nodemailer/SECURITY.txt +0 -22
- package/dist/node_modules/nodemailer/lib/addressparser/index.js +0 -313
- package/dist/node_modules/nodemailer/lib/base64/index.js +0 -142
- package/dist/node_modules/nodemailer/lib/dkim/index.js +0 -251
- package/dist/node_modules/nodemailer/lib/dkim/message-parser.js +0 -155
- package/dist/node_modules/nodemailer/lib/dkim/relaxed-body.js +0 -154
- package/dist/node_modules/nodemailer/lib/dkim/sign.js +0 -117
- package/dist/node_modules/nodemailer/lib/fetch/cookies.js +0 -281
- package/dist/node_modules/nodemailer/lib/fetch/index.js +0 -274
- package/dist/node_modules/nodemailer/lib/json-transport/index.js +0 -82
- package/dist/node_modules/nodemailer/lib/mail-composer/index.js +0 -565
- package/dist/node_modules/nodemailer/lib/mailer/index.js +0 -427
- package/dist/node_modules/nodemailer/lib/mailer/mail-message.js +0 -315
- package/dist/node_modules/nodemailer/lib/mime-funcs/index.js +0 -625
- package/dist/node_modules/nodemailer/lib/mime-funcs/mime-types.js +0 -2102
- package/dist/node_modules/nodemailer/lib/mime-node/index.js +0 -1305
- package/dist/node_modules/nodemailer/lib/mime-node/last-newline.js +0 -33
- package/dist/node_modules/nodemailer/lib/mime-node/le-unix.js +0 -43
- package/dist/node_modules/nodemailer/lib/mime-node/le-windows.js +0 -52
- package/dist/node_modules/nodemailer/lib/nodemailer.js +0 -1
- package/dist/node_modules/nodemailer/lib/qp/index.js +0 -219
- package/dist/node_modules/nodemailer/lib/sendmail-transport/index.js +0 -210
- package/dist/node_modules/nodemailer/lib/ses-transport/index.js +0 -349
- package/dist/node_modules/nodemailer/lib/shared/index.js +0 -638
- package/dist/node_modules/nodemailer/lib/smtp-connection/data-stream.js +0 -108
- package/dist/node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js +0 -143
- package/dist/node_modules/nodemailer/lib/smtp-connection/index.js +0 -1812
- package/dist/node_modules/nodemailer/lib/smtp-pool/index.js +0 -648
- package/dist/node_modules/nodemailer/lib/smtp-pool/pool-resource.js +0 -253
- package/dist/node_modules/nodemailer/lib/smtp-transport/index.js +0 -416
- package/dist/node_modules/nodemailer/lib/stream-transport/index.js +0 -135
- package/dist/node_modules/nodemailer/lib/well-known/index.js +0 -47
- package/dist/node_modules/nodemailer/lib/well-known/services.json +0 -338
- package/dist/node_modules/nodemailer/lib/xoauth2/index.js +0 -376
- package/dist/node_modules/nodemailer/package.json +0 -1
- package/dist/server/collections/notification_logs.d.ts +0 -11
- package/dist/server/collections/notification_logs.js +0 -54
- package/dist/server/collections/notification_services.d.ts +0 -11
- package/dist/server/collections/notification_services.js +0 -54
- package/dist/server/collections/notifications.d.ts +0 -11
- package/dist/server/collections/notifications.js +0 -71
- package/dist/server/index.d.ts +0 -9
- package/dist/server/index.js +0 -42
- package/dist/server/models/Notification.d.ts +0 -17
- package/dist/server/models/Notification.js +0 -121
- package/dist/server/models/NotificationLog.d.ts +0 -11
- package/dist/server/models/NotificationLog.js +0 -38
- package/dist/server/models/NotificationService.d.ts +0 -17
- package/dist/server/models/NotificationService.js +0 -65
- package/dist/server/models/index.d.ts +0 -11
- package/dist/server/models/index.js +0 -34
- package/dist/server/server.d.ts +0 -12
- package/dist/server/server.js +0 -50
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __export = (target, all) => {
|
|
17
|
-
for (var name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
-
var Notification_exports = {};
|
|
38
|
-
__export(Notification_exports, {
|
|
39
|
-
Notification: () => Notification
|
|
40
|
-
});
|
|
41
|
-
module.exports = __toCommonJS(Notification_exports);
|
|
42
|
-
var import_database = require("@nocobase/database");
|
|
43
|
-
var import_lodash = __toESM(require("lodash"));
|
|
44
|
-
class Notification extends import_database.Model {
|
|
45
|
-
get db() {
|
|
46
|
-
return this.constructor["database"];
|
|
47
|
-
}
|
|
48
|
-
async getReceiversByOptions() {
|
|
49
|
-
const { data, fromTable, filter, dataField } = this.receiver_options;
|
|
50
|
-
let receivers = [];
|
|
51
|
-
if (data) {
|
|
52
|
-
receivers = Array.isArray(data) ? data : [data];
|
|
53
|
-
} else if (fromTable) {
|
|
54
|
-
const collection = this.db.getCollection(fromTable);
|
|
55
|
-
const rows = await collection.repository.find({
|
|
56
|
-
filter
|
|
57
|
-
});
|
|
58
|
-
receivers = rows.map((row) => row[dataField]);
|
|
59
|
-
}
|
|
60
|
-
return receivers;
|
|
61
|
-
}
|
|
62
|
-
async send(options = {}) {
|
|
63
|
-
const { transaction } = options;
|
|
64
|
-
if (!this.service) {
|
|
65
|
-
this.service = await this.getService();
|
|
66
|
-
}
|
|
67
|
-
const receivers = await this.getReceiversByOptions();
|
|
68
|
-
let { to } = options;
|
|
69
|
-
if (to) {
|
|
70
|
-
to = Array.isArray(to) ? to : [to];
|
|
71
|
-
receivers.push(...to);
|
|
72
|
-
}
|
|
73
|
-
console.log(receivers);
|
|
74
|
-
for (const receiver of receivers) {
|
|
75
|
-
try {
|
|
76
|
-
const response = await this.service.send({
|
|
77
|
-
to: receiver,
|
|
78
|
-
subject: this.getSubject(),
|
|
79
|
-
html: this.getBody(options)
|
|
80
|
-
});
|
|
81
|
-
await this.createLog(
|
|
82
|
-
{
|
|
83
|
-
receiver,
|
|
84
|
-
state: "success",
|
|
85
|
-
response
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
transaction
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
await new Promise((resolve) => {
|
|
92
|
-
setTimeout(resolve, 100);
|
|
93
|
-
});
|
|
94
|
-
} catch (error) {
|
|
95
|
-
console.error(error);
|
|
96
|
-
await this.createLog(
|
|
97
|
-
{
|
|
98
|
-
receiver,
|
|
99
|
-
state: "fail",
|
|
100
|
-
response: {}
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
transaction
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
getSubject() {
|
|
110
|
-
return this.subject;
|
|
111
|
-
}
|
|
112
|
-
getBody(data) {
|
|
113
|
-
const compiled = import_lodash.default.template(this.body);
|
|
114
|
-
const body = compiled(data);
|
|
115
|
-
return body;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
119
|
-
0 && (module.exports = {
|
|
120
|
-
Notification
|
|
121
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { Model } from '@nocobase/database';
|
|
10
|
-
export declare class NotificationLog extends Model {
|
|
11
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var NotificationLog_exports = {};
|
|
28
|
-
__export(NotificationLog_exports, {
|
|
29
|
-
NotificationLog: () => NotificationLog
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(NotificationLog_exports);
|
|
32
|
-
var import_database = require("@nocobase/database");
|
|
33
|
-
class NotificationLog extends import_database.Model {
|
|
34
|
-
}
|
|
35
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
-
0 && (module.exports = {
|
|
37
|
-
NotificationLog
|
|
38
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { Model } from '@nocobase/database';
|
|
10
|
-
import nodemailer from 'nodemailer';
|
|
11
|
-
export declare class NotificationService extends Model {
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
static createTransport: typeof nodemailer.createTransport;
|
|
14
|
-
private _transporter;
|
|
15
|
-
get transporter(): any;
|
|
16
|
-
send(options: any): Promise<any>;
|
|
17
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __export = (target, all) => {
|
|
17
|
-
for (var name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
-
var NotificationService_exports = {};
|
|
38
|
-
__export(NotificationService_exports, {
|
|
39
|
-
NotificationService: () => NotificationService
|
|
40
|
-
});
|
|
41
|
-
module.exports = __toCommonJS(NotificationService_exports);
|
|
42
|
-
var import_database = require("@nocobase/database");
|
|
43
|
-
var import_nodemailer = __toESM(require("nodemailer"));
|
|
44
|
-
class NotificationService extends import_database.Model {
|
|
45
|
-
static createTransport = import_nodemailer.default.createTransport;
|
|
46
|
-
_transporter = null;
|
|
47
|
-
get transporter() {
|
|
48
|
-
if (this._transporter) {
|
|
49
|
-
return this._transporter;
|
|
50
|
-
}
|
|
51
|
-
return this._transporter = NotificationService.createTransport(this.options);
|
|
52
|
-
}
|
|
53
|
-
async send(options) {
|
|
54
|
-
const { from } = this.options;
|
|
55
|
-
const mailOptions = {
|
|
56
|
-
from,
|
|
57
|
-
...options
|
|
58
|
-
};
|
|
59
|
-
return this.transporter.sendMail(mailOptions);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
-
0 && (module.exports = {
|
|
64
|
-
NotificationService
|
|
65
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
export * from './Notification';
|
|
10
|
-
export * from './NotificationLog';
|
|
11
|
-
export * from './NotificationService';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __copyProps = (to, from, except, desc) => {
|
|
15
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
-
for (let key of __getOwnPropNames(from))
|
|
17
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
23
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
-
var models_exports = {};
|
|
25
|
-
module.exports = __toCommonJS(models_exports);
|
|
26
|
-
__reExport(models_exports, require("./Notification"), module.exports);
|
|
27
|
-
__reExport(models_exports, require("./NotificationLog"), module.exports);
|
|
28
|
-
__reExport(models_exports, require("./NotificationService"), module.exports);
|
|
29
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
-
0 && (module.exports = {
|
|
31
|
-
...require("./Notification"),
|
|
32
|
-
...require("./NotificationLog"),
|
|
33
|
-
...require("./NotificationService")
|
|
34
|
-
});
|
package/dist/server/server.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { Plugin } from '@nocobase/server';
|
|
10
|
-
export default class PluginNotificationsServer extends Plugin {
|
|
11
|
-
load(): Promise<void>;
|
|
12
|
-
}
|
package/dist/server/server.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __export = (target, all) => {
|
|
17
|
-
for (var name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
-
for (let key of __getOwnPropNames(from))
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
-
var server_exports = {};
|
|
38
|
-
__export(server_exports, {
|
|
39
|
-
default: () => PluginNotificationsServer
|
|
40
|
-
});
|
|
41
|
-
module.exports = __toCommonJS(server_exports);
|
|
42
|
-
var import_server = require("@nocobase/server");
|
|
43
|
-
var import_path = __toESM(require("path"));
|
|
44
|
-
class PluginNotificationsServer extends import_server.Plugin {
|
|
45
|
-
async load() {
|
|
46
|
-
await this.app.db.import({
|
|
47
|
-
directory: import_path.default.resolve(__dirname, "collections")
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}
|