@nemo-cli/mail 0.0.1-beta.4
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/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +397 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as nodemailer_lib_smtp_transport0 from "nodemailer/lib/smtp-transport";
|
|
2
|
+
|
|
3
|
+
//#region src/services/send.d.ts
|
|
4
|
+
declare const sendReleaseMail: ({
|
|
5
|
+
id,
|
|
6
|
+
content
|
|
7
|
+
}: {
|
|
8
|
+
id: number;
|
|
9
|
+
content: {
|
|
10
|
+
webui: string;
|
|
11
|
+
};
|
|
12
|
+
}) => Promise<(Error | null)[] | [error: undefined, data: nodemailer_lib_smtp_transport0.SentMessageInfo]>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { sendReleaseMail };
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/services/send.ts"],"sourcesContent":[],"mappings":";;;cAqBa;;;;;;IAAA,KAAA,EAAA,MAAA;EAAyB,CAAA;CAAA,EAAA,GAA2D,OAA3D,CAAA,CAA2D,KAA3D,GAAA,IAAA,CAAA,EAAA,GAAA,CAAA,KAAA,EAAA,SAAA,EAAA,IAAA,EAA2D,8BAAA,CAAA,eAA3D,CAAA,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { Body, Button, Column, Container, Head, Heading, Hr, Html, Img, Link, Preview, Row, Section, Tailwind, Text, pixelBasedPreset, render } from "@react-email/components";
|
|
3
|
+
import nodemailer from "nodemailer";
|
|
4
|
+
import { safeAwait } from "@nemo-cli/shared";
|
|
5
|
+
import "react";
|
|
6
|
+
|
|
7
|
+
//#region rolldown:runtime
|
|
8
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
9
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region ../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-runtime.production.js
|
|
13
|
+
/**
|
|
14
|
+
* @license React
|
|
15
|
+
* react-jsx-runtime.production.js
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
var require_react_jsx_runtime_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
23
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
24
|
+
function jsxProd(type, config, maybeKey) {
|
|
25
|
+
var key = null;
|
|
26
|
+
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
27
|
+
void 0 !== config.key && (key = "" + config.key);
|
|
28
|
+
if ("key" in config) {
|
|
29
|
+
maybeKey = {};
|
|
30
|
+
for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
|
|
31
|
+
} else maybeKey = config;
|
|
32
|
+
config = maybeKey.ref;
|
|
33
|
+
return {
|
|
34
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
35
|
+
type,
|
|
36
|
+
key,
|
|
37
|
+
ref: void 0 !== config ? config : null,
|
|
38
|
+
props: maybeKey
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
exports.jsx = jsxProd;
|
|
42
|
+
exports.jsxs = jsxProd;
|
|
43
|
+
}));
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region ../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-runtime.development.js
|
|
47
|
+
/**
|
|
48
|
+
* @license React
|
|
49
|
+
* react-jsx-runtime.development.js
|
|
50
|
+
*
|
|
51
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the MIT license found in the
|
|
54
|
+
* LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/
|
|
56
|
+
var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
57
|
+
"production" !== process.env.NODE_ENV && (function() {
|
|
58
|
+
function getComponentNameFromType(type) {
|
|
59
|
+
if (null == type) return null;
|
|
60
|
+
if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
61
|
+
if ("string" === typeof type) return type;
|
|
62
|
+
switch (type) {
|
|
63
|
+
case REACT_FRAGMENT_TYPE: return "Fragment";
|
|
64
|
+
case REACT_PROFILER_TYPE: return "Profiler";
|
|
65
|
+
case REACT_STRICT_MODE_TYPE: return "StrictMode";
|
|
66
|
+
case REACT_SUSPENSE_TYPE: return "Suspense";
|
|
67
|
+
case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
|
|
68
|
+
case REACT_ACTIVITY_TYPE: return "Activity";
|
|
69
|
+
}
|
|
70
|
+
if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
|
|
71
|
+
case REACT_PORTAL_TYPE: return "Portal";
|
|
72
|
+
case REACT_CONTEXT_TYPE: return type.displayName || "Context";
|
|
73
|
+
case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer";
|
|
74
|
+
case REACT_FORWARD_REF_TYPE:
|
|
75
|
+
var innerType = type.render;
|
|
76
|
+
type = type.displayName;
|
|
77
|
+
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
78
|
+
return type;
|
|
79
|
+
case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
80
|
+
case REACT_LAZY_TYPE:
|
|
81
|
+
innerType = type._payload;
|
|
82
|
+
type = type._init;
|
|
83
|
+
try {
|
|
84
|
+
return getComponentNameFromType(type(innerType));
|
|
85
|
+
} catch (x) {}
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
function testStringCoercion(value) {
|
|
90
|
+
return "" + value;
|
|
91
|
+
}
|
|
92
|
+
function checkKeyStringCoercion(value) {
|
|
93
|
+
try {
|
|
94
|
+
testStringCoercion(value);
|
|
95
|
+
var JSCompiler_inline_result = !1;
|
|
96
|
+
} catch (e) {
|
|
97
|
+
JSCompiler_inline_result = !0;
|
|
98
|
+
}
|
|
99
|
+
if (JSCompiler_inline_result) {
|
|
100
|
+
JSCompiler_inline_result = console;
|
|
101
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
102
|
+
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
103
|
+
JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
|
|
104
|
+
return testStringCoercion(value);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function getTaskName(type) {
|
|
108
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
109
|
+
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
|
|
110
|
+
try {
|
|
111
|
+
var name = getComponentNameFromType(type);
|
|
112
|
+
return name ? "<" + name + ">" : "<...>";
|
|
113
|
+
} catch (x) {
|
|
114
|
+
return "<...>";
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function getOwner() {
|
|
118
|
+
var dispatcher = ReactSharedInternals.A;
|
|
119
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
120
|
+
}
|
|
121
|
+
function UnknownOwner() {
|
|
122
|
+
return Error("react-stack-top-frame");
|
|
123
|
+
}
|
|
124
|
+
function hasValidKey(config) {
|
|
125
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
126
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
127
|
+
if (getter && getter.isReactWarning) return !1;
|
|
128
|
+
}
|
|
129
|
+
return void 0 !== config.key;
|
|
130
|
+
}
|
|
131
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
132
|
+
function warnAboutAccessingKey() {
|
|
133
|
+
specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
|
|
134
|
+
}
|
|
135
|
+
warnAboutAccessingKey.isReactWarning = !0;
|
|
136
|
+
Object.defineProperty(props, "key", {
|
|
137
|
+
get: warnAboutAccessingKey,
|
|
138
|
+
configurable: !0
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
142
|
+
var componentName = getComponentNameFromType(this.type);
|
|
143
|
+
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
|
|
144
|
+
componentName = this.props.ref;
|
|
145
|
+
return void 0 !== componentName ? componentName : null;
|
|
146
|
+
}
|
|
147
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
148
|
+
var refProp = props.ref;
|
|
149
|
+
type = {
|
|
150
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
151
|
+
type,
|
|
152
|
+
key,
|
|
153
|
+
props,
|
|
154
|
+
_owner: owner
|
|
155
|
+
};
|
|
156
|
+
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
157
|
+
enumerable: !1,
|
|
158
|
+
get: elementRefGetterWithDeprecationWarning
|
|
159
|
+
}) : Object.defineProperty(type, "ref", {
|
|
160
|
+
enumerable: !1,
|
|
161
|
+
value: null
|
|
162
|
+
});
|
|
163
|
+
type._store = {};
|
|
164
|
+
Object.defineProperty(type._store, "validated", {
|
|
165
|
+
configurable: !1,
|
|
166
|
+
enumerable: !1,
|
|
167
|
+
writable: !0,
|
|
168
|
+
value: 0
|
|
169
|
+
});
|
|
170
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
171
|
+
configurable: !1,
|
|
172
|
+
enumerable: !1,
|
|
173
|
+
writable: !0,
|
|
174
|
+
value: null
|
|
175
|
+
});
|
|
176
|
+
Object.defineProperty(type, "_debugStack", {
|
|
177
|
+
configurable: !1,
|
|
178
|
+
enumerable: !1,
|
|
179
|
+
writable: !0,
|
|
180
|
+
value: debugStack
|
|
181
|
+
});
|
|
182
|
+
Object.defineProperty(type, "_debugTask", {
|
|
183
|
+
configurable: !1,
|
|
184
|
+
enumerable: !1,
|
|
185
|
+
writable: !0,
|
|
186
|
+
value: debugTask
|
|
187
|
+
});
|
|
188
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
189
|
+
return type;
|
|
190
|
+
}
|
|
191
|
+
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
|
|
192
|
+
var children = config.children;
|
|
193
|
+
if (void 0 !== children) if (isStaticChildren) if (isArrayImpl(children)) {
|
|
194
|
+
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++) validateChildKeys(children[isStaticChildren]);
|
|
195
|
+
Object.freeze && Object.freeze(children);
|
|
196
|
+
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
197
|
+
else validateChildKeys(children);
|
|
198
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
199
|
+
children = getComponentNameFromType(type);
|
|
200
|
+
var keys = Object.keys(config).filter(function(k) {
|
|
201
|
+
return "key" !== k;
|
|
202
|
+
});
|
|
203
|
+
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
204
|
+
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = !0);
|
|
205
|
+
}
|
|
206
|
+
children = null;
|
|
207
|
+
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
|
208
|
+
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
|
|
209
|
+
if ("key" in config) {
|
|
210
|
+
maybeKey = {};
|
|
211
|
+
for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
|
|
212
|
+
} else maybeKey = config;
|
|
213
|
+
children && defineKeyPropWarningGetter(maybeKey, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
|
|
214
|
+
return ReactElement(type, children, maybeKey, getOwner(), debugStack, debugTask);
|
|
215
|
+
}
|
|
216
|
+
function validateChildKeys(node) {
|
|
217
|
+
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
218
|
+
}
|
|
219
|
+
function isValidElement(object) {
|
|
220
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
221
|
+
}
|
|
222
|
+
var React = __require("react"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
223
|
+
return null;
|
|
224
|
+
};
|
|
225
|
+
React = { react_stack_bottom_frame: function(callStackForError) {
|
|
226
|
+
return callStackForError();
|
|
227
|
+
} };
|
|
228
|
+
var specialPropKeyWarningShown;
|
|
229
|
+
var didWarnAboutElementRef = {};
|
|
230
|
+
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
|
|
231
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
232
|
+
var didWarnAboutKeySpread = {};
|
|
233
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
234
|
+
exports.jsx = function(type, config, maybeKey) {
|
|
235
|
+
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
236
|
+
return jsxDEVImpl(type, config, maybeKey, !1, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
|
237
|
+
};
|
|
238
|
+
exports.jsxs = function(type, config, maybeKey) {
|
|
239
|
+
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
240
|
+
return jsxDEVImpl(type, config, maybeKey, !0, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
|
241
|
+
};
|
|
242
|
+
})();
|
|
243
|
+
}));
|
|
244
|
+
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region ../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-runtime.js
|
|
247
|
+
var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
248
|
+
if (process.env.NODE_ENV === "production") module.exports = require_react_jsx_runtime_production();
|
|
249
|
+
else module.exports = require_react_jsx_runtime_development();
|
|
250
|
+
}));
|
|
251
|
+
|
|
252
|
+
//#endregion
|
|
253
|
+
//#region emails/release.tsx
|
|
254
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
255
|
+
const ReleaseEmail = ({ docLink, title, id }) => {
|
|
256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Html, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Head, {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tailwind, {
|
|
257
|
+
config: { presets: [pixelBasedPreset] },
|
|
258
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Body, {
|
|
259
|
+
className: "mx-auto my-auto bg-white px-2 font-sans",
|
|
260
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Preview, { children: "上线邮件" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Container, {
|
|
261
|
+
className: "mx-auto my-10 max-w-lg rounded border border-[#eaeaea] border-solid p-5",
|
|
262
|
+
children: [
|
|
263
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Heading, {
|
|
264
|
+
className: "mx-0 my-5 p-0 text-center font-normal text-[24px] text-black",
|
|
265
|
+
children: title
|
|
266
|
+
}),
|
|
267
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
|
|
268
|
+
className: "text-[14px] text-black leading-[24px]",
|
|
269
|
+
children: "Hello Team,"
|
|
270
|
+
}),
|
|
271
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
|
|
272
|
+
className: "text-[14px] text-black leading-[24px]",
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("b", { children: "发布上线" }),
|
|
275
|
+
" (",
|
|
276
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
277
|
+
className: "text-blue-600 no-underline",
|
|
278
|
+
href: `mailto:zimeng.gao@antalpha.com`,
|
|
279
|
+
children: "zimeng.gao@antalpha.com"
|
|
280
|
+
}),
|
|
281
|
+
") ",
|
|
282
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("b", { children: ["PRIME-", id] }),
|
|
283
|
+
" requirements application for ",
|
|
284
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("b", { children: "pre-release/official" }),
|
|
285
|
+
" environment."
|
|
286
|
+
]
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Section, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Row, { children: [
|
|
289
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Column, {
|
|
290
|
+
align: "right",
|
|
291
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Img, {
|
|
292
|
+
alt: `zimeng.gao's profile picture`,
|
|
293
|
+
className: "rounded-full",
|
|
294
|
+
height: "64",
|
|
295
|
+
src: "https://github.com/user-attachments/assets/7bc8f7c1-1877-4ddd-89f9-4f8d9bc32ed5",
|
|
296
|
+
width: "64"
|
|
297
|
+
})
|
|
298
|
+
}),
|
|
299
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Column, {
|
|
300
|
+
align: "center",
|
|
301
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Img, {
|
|
302
|
+
alt: "Arrow indicating invitation",
|
|
303
|
+
height: "9",
|
|
304
|
+
src: "https://github.com/user-attachments/assets/7bc8f7c1-1877-4ddd-89f9-4f8d9bc32ed5",
|
|
305
|
+
width: "12"
|
|
306
|
+
})
|
|
307
|
+
}),
|
|
308
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Column, {
|
|
309
|
+
align: "left",
|
|
310
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Img, {
|
|
311
|
+
alt: "Nemo team logo",
|
|
312
|
+
className: "rounded-full",
|
|
313
|
+
height: "64",
|
|
314
|
+
src: "https://github.com/user-attachments/assets/7bc8f7c1-1877-4ddd-89f9-4f8d9bc32ed5",
|
|
315
|
+
width: "64"
|
|
316
|
+
})
|
|
317
|
+
})
|
|
318
|
+
] }) }),
|
|
319
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Section, {
|
|
320
|
+
className: "mt-[32px] mb-[32px] text-center",
|
|
321
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
322
|
+
className: "rounded bg-[#000000] px-5 py-3 text-center font-semibold text-[12px] text-white no-underline",
|
|
323
|
+
href: docLink,
|
|
324
|
+
children: "上线工单"
|
|
325
|
+
})
|
|
326
|
+
}),
|
|
327
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Hr, { className: "mx-0 my-[26px] w-full border border-[#eaeaea] border-solid" }),
|
|
328
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
|
|
329
|
+
className: "text-[#666666] text-[12px] leading-[24px]",
|
|
330
|
+
children: "如何无法打开上线工单,请点击以下链接:"
|
|
331
|
+
}),
|
|
332
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
333
|
+
href: docLink,
|
|
334
|
+
children: docLink
|
|
335
|
+
}),
|
|
336
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
|
|
337
|
+
className: "text-[#666666] text-[12px] leading-[24px]",
|
|
338
|
+
children: [
|
|
339
|
+
"This invitation was intended for ",
|
|
340
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
341
|
+
className: "text-black",
|
|
342
|
+
children: "zimeng.gao@antalpha.com"
|
|
343
|
+
}),
|
|
344
|
+
". This invite was sent from ",
|
|
345
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
346
|
+
className: "text-black",
|
|
347
|
+
children: "xx.xx.xx.xx"
|
|
348
|
+
}),
|
|
349
|
+
" located in",
|
|
350
|
+
" ",
|
|
351
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
352
|
+
className: "text-black",
|
|
353
|
+
children: "Beijing, China"
|
|
354
|
+
}),
|
|
355
|
+
". If you were not expecting this invitation, you can ignore this email. If you are concerned about your account's safety, please reply to this email to get in touch with us."
|
|
356
|
+
]
|
|
357
|
+
})
|
|
358
|
+
]
|
|
359
|
+
})]
|
|
360
|
+
})
|
|
361
|
+
})] });
|
|
362
|
+
};
|
|
363
|
+
var release_default = ReleaseEmail;
|
|
364
|
+
|
|
365
|
+
//#endregion
|
|
366
|
+
//#region src/services/send.ts
|
|
367
|
+
const TO = ["gaozimeng0425@gmail.com"];
|
|
368
|
+
const CC = ["gzm1211@126.com"];
|
|
369
|
+
const transporter = nodemailer.createTransport({
|
|
370
|
+
host: "smtp.gmail.com",
|
|
371
|
+
port: 465,
|
|
372
|
+
secure: true,
|
|
373
|
+
auth: {
|
|
374
|
+
user: "zimeng.gao@antalpha.com",
|
|
375
|
+
pass: "hrnw pqtl yuuk tkpd"
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
const sendReleaseMail = async ({ id, content }) => {
|
|
379
|
+
if (!content.webui) return [/* @__PURE__ */ new Error("没有上线工单"), null];
|
|
380
|
+
const subject = `PRIME-${id} [上线/预发] 申请`;
|
|
381
|
+
const options = {
|
|
382
|
+
from: "zimeng.gao@antalpha.com",
|
|
383
|
+
to: TO,
|
|
384
|
+
subject,
|
|
385
|
+
cc: CC,
|
|
386
|
+
html: await render(await release_default({
|
|
387
|
+
id,
|
|
388
|
+
title: subject,
|
|
389
|
+
docLink: content.webui
|
|
390
|
+
}))
|
|
391
|
+
};
|
|
392
|
+
return await safeAwait(transporter.sendMail(options));
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
//#endregion
|
|
396
|
+
export { sendReleaseMail };
|
|
397
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/.pnpm/react@19.2.3/node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-runtime.js","../emails/release.tsx","../src/services/send.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","// biome-ignore lint/correctness/noUnusedImports: need for react-email\nimport React from 'react'\nimport {\n Body,\n Button,\n Column,\n Container,\n Head,\n Heading,\n Hr,\n Html,\n Img,\n Link,\n Preview,\n pixelBasedPreset,\n Row,\n Section,\n Tailwind,\n Text,\n} from '@react-email/components'\n\ntype ReleaseEmailProps = {\n docLink: string\n id: number\n title: string\n}\nexport const ReleaseEmail = ({ docLink, title, id }: ReleaseEmailProps) => {\n return (\n <Html>\n <Head />\n <Tailwind\n config={{\n presets: [pixelBasedPreset],\n }}\n >\n <Body className=\"mx-auto my-auto bg-white px-2 font-sans\">\n <Preview>上线邮件</Preview>\n <Container className=\"mx-auto my-10 max-w-lg rounded border border-[#eaeaea] border-solid p-5\">\n <Heading className=\"mx-0 my-5 p-0 text-center font-normal text-[24px] text-black\">{title}</Heading>\n <Text className=\"text-[14px] text-black leading-[24px]\">Hello Team,</Text>\n <Text className=\"text-[14px] text-black leading-[24px]\">\n <b>发布上线</b> (\n <Link className=\"text-blue-600 no-underline\" href={`mailto:${'zimeng.gao@antalpha.com'}`}>\n {'zimeng.gao@antalpha.com'}\n </Link>\n ) <b>PRIME-{id}</b> requirements application for <b>pre-release/official</b> environment.\n </Text>\n <Section>\n <Row>\n <Column align=\"right\">\n <Img\n alt={`zimeng.gao's profile picture`}\n className=\"rounded-full\"\n height=\"64\"\n src=\"https://github.com/user-attachments/assets/7bc8f7c1-1877-4ddd-89f9-4f8d9bc32ed5\"\n width=\"64\"\n />\n </Column>\n <Column align=\"center\">\n <Img\n alt=\"Arrow indicating invitation\"\n height=\"9\"\n src=\"https://github.com/user-attachments/assets/7bc8f7c1-1877-4ddd-89f9-4f8d9bc32ed5\"\n width=\"12\"\n />\n </Column>\n <Column align=\"left\">\n <Img\n alt={'Nemo team logo'}\n className=\"rounded-full\"\n height=\"64\"\n src=\"https://github.com/user-attachments/assets/7bc8f7c1-1877-4ddd-89f9-4f8d9bc32ed5\"\n width=\"64\"\n />\n </Column>\n </Row>\n </Section>\n <Section className=\"mt-[32px] mb-[32px] text-center\">\n <Button\n className=\"rounded bg-[#000000] px-5 py-3 text-center font-semibold text-[12px] text-white no-underline\"\n href={docLink}\n >\n 上线工单\n </Button>\n </Section>\n <Hr className=\"mx-0 my-[26px] w-full border border-[#eaeaea] border-solid\" />\n\n <Text className=\"text-[#666666] text-[12px] leading-[24px]\">如何无法打开上线工单,请点击以下链接:</Text>\n <Link href={docLink}>{docLink}</Link>\n\n <Text className=\"text-[#666666] text-[12px] leading-[24px]\">\n This invitation was intended for <span className=\"text-black\">zimeng.gao@antalpha.com</span>. This invite\n was sent from <span className=\"text-black\">xx.xx.xx.xx</span> located in{' '}\n <span className=\"text-black\">Beijing, China</span>. If you were not expecting this invitation, you can\n ignore this email. If you are concerned about your account's safety, please reply to this email to get in\n touch with us.\n </Text>\n </Container>\n </Body>\n </Tailwind>\n </Html>\n )\n}\n\nexport default ReleaseEmail\n","import { render } from '@react-email/components'\nimport nodemailer from 'nodemailer'\nimport type Mail from 'nodemailer/lib/mailer'\n\nimport { safeAwait } from '@nemo-cli/shared'\nimport ReleaseEmail from '../../emails/release'\n\nconst TO = ['gaozimeng0425@gmail.com']\nconst CC = ['gzm1211@126.com']\n\nconst transporter = nodemailer.createTransport({\n host: 'smtp.gmail.com',\n port: 465,\n secure: true,\n auth: {\n user: process.env.GOOGLE_AUTH_USER,\n /** https://myaccount.google.com/apppasswords */\n pass: process.env.GOOGLE_AUTH_PASS,\n },\n})\n\nexport const sendReleaseMail = async ({ id, content }: { id: number; content: { webui: string } }) => {\n if (!content.webui) return [new Error('没有上线工单'), null]\n const subject = `PRIME-${id} [上线/预发] 申请`\n\n const template = await ReleaseEmail({\n id,\n title: subject,\n docLink: content.webui,\n })\n\n const emailHtml = await render(template)\n\n const options: Mail.Options = {\n from: process.env.GOOGLE_AUTH_USER,\n to: TO,\n subject,\n cc: CC,\n html: emailHtml,\n }\n\n const result = await safeAwait(transporter.sendMail(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C,MAAG,WAAU,+DAA+D;KAE7E,4CAAC;MAAK,WAAU;gBAA4C;OAA0B;KACtF,4CAAC;MAAK,MAAM;gBAAU;OAAe;KAErC,6CAAC;MAAK,WAAU;;OAA4C;OACzB,4CAAC;QAAK,WAAU;kBAAa;SAA8B;;OAC9E,4CAAC;QAAK,WAAU;kBAAa;SAAkB;;OAAY;OACzE,4CAAC;QAAK,WAAU;kBAAa;SAAqB;;;OAG7C;;KACG;IACP;GACE,IACN;;AAIX,sBAAe;;;;ACjGf,MAAM,KAAK,CAAC,0BAAyB;AACrC,MAAM,KAAK,CAAC,kBAAiB;AAE7B,MAAM,cAAc,WAAW,gBAAgB;CAC7C,MAAM;CACN,MAAM;CACN,QAAQ;CACR,MAAM;EACJ,MAAM;EAEN,MAAM;EACP;CACF,CAAA;AAED,MAAa,kBAAkB,OAAO,EAAE,IAAI,cAA0D;AACpG,KAAI,CAAC,QAAQ,MAAO,QAAO,iBAAC,IAAI,MAAM,SAAS,EAAE,KAAI;CACrD,MAAM,UAAU,SAAS,GAAG;CAU5B,MAAM,UAAwB;EAC5B,MAAM;EACN,IAAI;EACJ;EACA,IAAI;EACJ,MAPgB,MAAM,OANP,MAAM,gBAAa;GAClC;GACA,OAAO;GACP,SAAS,QAAQ;GAClB,CAAA,CAEsC;EAQvC;AAGA,QADe,MAAM,UAAU,YAAY,SAAS,QAAQ,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nemo-cli/mail",
|
|
3
|
+
"version": "0.0.1-beta.4",
|
|
4
|
+
"description": "Mail CLI",
|
|
5
|
+
"author": "gaozimeng <gaozimeng0425@gmail.com>",
|
|
6
|
+
"homepage": "",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"directories": {
|
|
16
|
+
"lib": "dist",
|
|
17
|
+
"test": "__tests__"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"dev:email": "email dev",
|
|
27
|
+
"dev": "rolldown --watch -c ./rolldown.config.ts",
|
|
28
|
+
"_build": "rolldown -c ./rolldown.config.ts",
|
|
29
|
+
"build-dts": "rolldown -c ./rolldown.config.ts",
|
|
30
|
+
"test": "vitest",
|
|
31
|
+
"coverage": "vitest run --coverage",
|
|
32
|
+
"check": "tsc --incremental --noEmit",
|
|
33
|
+
"prepublish": "npm run build",
|
|
34
|
+
"prepack": "rolldown"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@nemo-cli/shared": "workspace:*",
|
|
38
|
+
"@nemo-cli/ui": "workspace:*",
|
|
39
|
+
"@react-email/components": "^1.0.4",
|
|
40
|
+
"nodemailer": "^7.0.12",
|
|
41
|
+
"react": "catalog:",
|
|
42
|
+
"react-dom": "catalog:"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@react-email/preview-server": "5.2.5",
|
|
46
|
+
"@types/nodemailer": "^7.0.5",
|
|
47
|
+
"@types/react": "catalog:",
|
|
48
|
+
"@types/react-dom": "catalog:",
|
|
49
|
+
"react-email": "^5.2.5"
|
|
50
|
+
}
|
|
51
|
+
}
|