@gapi/sendgrid 1.8.168 → 1.8.170
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 +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/send-grid.helpers.js +5 -5
- package/dist/send-grid.helpers.js.map +1 -1
- package/dist/send-grid.module.js +3 -3
- package/dist/send-grid.module.js.map +1 -1
- package/dist/send-grid.service.js +6 -6
- package/dist/send-grid.service.js.map +1 -1
- package/dist/tokens.d.ts +3 -3
- package/eslint.config.mjs +38 -0
- package/package.json +13 -12
- package/src/index.ts +1 -1
- package/.eslintrc.js +0 -27
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
8
12
|
}));
|
|
9
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./send-grid.helpers"), exports);
|
|
13
18
|
__exportStar(require("./send-grid.module"), exports);
|
|
14
19
|
__exportStar(require("./send-grid.service"), exports);
|
|
15
|
-
__exportStar(require("./send-grid.helpers"), exports);
|
|
16
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,qDAAmC;AACnC,sDAAoC"}
|
|
@@ -62,11 +62,11 @@ let SendGridHelperService = class SendGridHelperService {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
SendGridHelperService =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
__param(
|
|
65
|
+
exports.SendGridHelperService = SendGridHelperService;
|
|
66
|
+
exports.SendGridHelperService = SendGridHelperService = __decorate([
|
|
67
|
+
(0, core_1.Service)(),
|
|
68
|
+
__param(0, (0, core_1.Inject)(tokens_1.Templates)),
|
|
69
|
+
__param(1, (0, core_1.Inject)(tokens_1.Mailer)),
|
|
69
70
|
__metadata("design:paramtypes", [Array, Object])
|
|
70
71
|
], SendGridHelperService);
|
|
71
|
-
exports.SendGridHelperService = SendGridHelperService;
|
|
72
72
|
//# sourceMappingURL=send-grid.helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-grid.helpers.js","sourceRoot":"","sources":["../src/send-grid.helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA6C;AAG7C,qCAA6D;
|
|
1
|
+
{"version":3,"file":"send-grid.helpers.js","sourceRoot":"","sources":["../src/send-grid.helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA6C;AAG7C,qCAA6D;AAGtD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YAC6B,SAAoB,EACvB,MAAc;QADX,cAA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Z,IAAI,EACJ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAC9B,CACF,CAAA;cAAA,CACF,CAAC;QACJ,CAAC,CAAA,CAAC;IACJ,CAAC;IAEK,GAAG,CACP,OAAe,EACf,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,EAAU,EACV,OAA2B;;YAE3B,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,iBAC3B,OAAO;gBACP,IAAI;gBACJ,IAAI;gBACJ,IAAI;gBACJ,EAAE,IACC,OAAO,EACV,CAAC;QACL,CAAC;KAAA;CACF,CAAA;AA1EY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,cAAO,GAAE;IAGL,WAAA,IAAA,aAAM,EAAC,kBAAS,CAAC,CAAA;IACjB,WAAA,IAAA,aAAM,EAAC,eAAM,CAAC,CAAA;;GAHN,qBAAqB,CA0EjC"}
|
package/dist/send-grid.module.js
CHANGED
|
@@ -40,8 +40,8 @@ let SendgridModule = SendgridModule_1 = class SendgridModule {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
SendgridModule = SendgridModule_1 = __decorate([
|
|
44
|
-
core_1.Module()
|
|
45
|
-
], SendgridModule);
|
|
46
43
|
exports.SendgridModule = SendgridModule;
|
|
44
|
+
exports.SendgridModule = SendgridModule = SendgridModule_1 = __decorate([
|
|
45
|
+
(0, core_1.Module)()
|
|
46
|
+
], SendgridModule);
|
|
47
47
|
//# sourceMappingURL=send-grid.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-grid.module.js","sourceRoot":"","sources":["../src/send-grid.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qCAAyD;AACzD,yCAAyC;AAEzC,qCAA2E;
|
|
1
|
+
{"version":3,"file":"send-grid.module.js","sourceRoot":"","sources":["../src/send-grid.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qCAAyD;AACzD,yCAAyC;AAEzC,qCAA2E;AAGpE,IAAM,cAAc,sBAApB,MAAM,cAAc;IAClB,MAAM,CAAC,OAAO,CACnB,UAII;QACF,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,EAAE;QACb,YAAY,EAAE,EAAE;KACjB;QAED,OAAO;YACL,MAAM,EAAE,gBAAc;YACtB,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,eAAM;oBACf,UAAU,EAAE,GAAG,EAAE;wBACf,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC;wBAC3C,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;wBACjC,OAAO,MAAM,CAAC;oBAChB,CAAC;iBACF;gBACD;oBACE,OAAO,EAAE,kBAAS;oBAClB,QAAQ,EAAE,OAAO,CAAC,SAAS;iBAC5B;gBACD;oBACE,OAAO,EAAE,qBAAY;oBACrB,QAAQ,EAAE,OAAO,CAAC,YAAY;iBAC/B;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAlCY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,aAAM,GAAE;GACI,cAAc,CAkC1B"}
|
|
@@ -44,8 +44,8 @@ let SendGridService = class SendGridService {
|
|
|
44
44
|
return { status: 'ok' };
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
sendTemplateString(
|
|
48
|
-
return __awaiter(this,
|
|
47
|
+
sendTemplateString(_a) {
|
|
48
|
+
return __awaiter(this, arguments, void 0, function* ({ from, html, subject, text, to, options, }) {
|
|
49
49
|
return yield this.sendGridHelper.raw(subject, text, html, from, this.addDefaultEmail(to), options);
|
|
50
50
|
});
|
|
51
51
|
}
|
|
@@ -53,10 +53,10 @@ let SendGridService = class SendGridService {
|
|
|
53
53
|
return to + '; ' + this.defaultEmail;
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
SendGridService =
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
exports.SendGridService = SendGridService;
|
|
57
|
+
exports.SendGridService = SendGridService = __decorate([
|
|
58
|
+
(0, core_1.Service)(),
|
|
59
|
+
__param(1, (0, core_1.Inject)(tokens_1.DefaultEmail)),
|
|
59
60
|
__metadata("design:paramtypes", [send_grid_helpers_1.SendGridHelperService, String])
|
|
60
61
|
], SendGridService);
|
|
61
|
-
exports.SendGridService = SendGridService;
|
|
62
62
|
//# sourceMappingURL=send-grid.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-grid.service.js","sourceRoot":"","sources":["../src/send-grid.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA6C;AAG7C,2DAA4D;AAC5D,qCAAwC;
|
|
1
|
+
{"version":3,"file":"send-grid.service.js","sourceRoot":"","sources":["../src/send-grid.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAA6C;AAG7C,2DAA4D;AAC5D,qCAAwC;AAGjC,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,YACU,cAAqC,EACf,YAAoB;QAD1C,mBAAc,GAAd,cAAc,CAAuB;QACf,iBAAY,GAAZ,YAAY,CAAQ;IACjD,CAAC;IAEE,SAAS,CACb,EAAU,EACV,IAAO,EACP,OAA2B;;YAE3B,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACvD,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAC5B,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAe,KAAI,IAAI,CAAC,YAAY,EAC9C,EAAE,EACF,QAAQ,EACR,OAAgB,CACjB,CAAC;YACF,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC1B,CAAC;KAAA;IAED,mBAAmB,CACjB,EAAU,EACV,IAAO,EACP,OAA2B;QAE3B,OAAO,CAAO,MAAS,EAAE,EAAE;YACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACvD,MAAM,IAAI,CAAC,cAAc,CAAC,cAAc,CACtC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAe,KAAI,IAAI,CAAC,YAAY,EAC9C,EAAE,EACF,OAAgB,CACjB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YACpB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC1B,CAAC,CAAA,CAAC;IACJ,CAAC;IACK,kBAAkB;6DAAC,EACvB,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,EAAE,EACF,OAAO,GAQR;YACC,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAClC,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,EACxB,OAAgB,CACjB,CAAC;QACJ,CAAC;KAAA;IAED,eAAe,CAAC,EAAU;QACxB,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC;IACvC,CAAC;CACF,CAAA;AAhEY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,cAAO,GAAE;IAIL,WAAA,IAAA,aAAM,EAAC,qBAAY,CAAC,CAAA;qCADG,yCAAqB;GAFpC,eAAe,CAgE3B"}
|
package/dist/tokens.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import { MailService } from '@sendgrid/mail';
|
|
|
4
4
|
export declare const Mailer: InjectionToken<unknown>;
|
|
5
5
|
export declare const Templates: InjectionToken<TemplatesModel[]>;
|
|
6
6
|
export declare const DefaultEmail: InjectionToken<string>;
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
7
|
+
export type Mailer = typeof MailService;
|
|
8
|
+
export type Templates = TemplatesModel[];
|
|
9
|
+
export type Without<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
10
10
|
export declare class TemplatesModel implements Without<MailData, 'html'> {
|
|
11
11
|
type?: string;
|
|
12
12
|
subject: string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
2
|
+
import tsParser from '@typescript-eslint/parser';
|
|
3
|
+
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
4
|
+
import prettierPlugin from 'eslint-plugin-prettier';
|
|
5
|
+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
6
|
+
import prettierConfig from 'eslint-config-prettier';
|
|
7
|
+
|
|
8
|
+
export default defineConfig([
|
|
9
|
+
globalIgnores(["dist/*"]),
|
|
10
|
+
{
|
|
11
|
+
files: ['./src/**/*.ts', './src/**/*.tsx'],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
parser: tsParser,
|
|
14
|
+
ecmaVersion: 2018,
|
|
15
|
+
sourceType: 'module',
|
|
16
|
+
},
|
|
17
|
+
plugins: {
|
|
18
|
+
'@typescript-eslint': tsPlugin,
|
|
19
|
+
prettier: prettierPlugin,
|
|
20
|
+
'simple-import-sort': simpleImportSort, // ✅ MUST MATCH RULE PREFIX
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
23
|
+
...tsPlugin.configs.recommended.rules,
|
|
24
|
+
...prettierConfig.rules,
|
|
25
|
+
|
|
26
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
27
|
+
'@typescript-eslint/camelcase': 'off',
|
|
28
|
+
'@typescript-eslint/interface-name-prefix': 'off',
|
|
29
|
+
|
|
30
|
+
'simple-import-sort/imports': 'error',
|
|
31
|
+
'simple-import-sort/exports': 'error',
|
|
32
|
+
'sort-imports': 'off',
|
|
33
|
+
'import/order': 'off',
|
|
34
|
+
|
|
35
|
+
'prettier/prettier': 'error',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gapi/sendgrid",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.170",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/Stradivario/gapi.git"
|
|
@@ -29,21 +29,22 @@
|
|
|
29
29
|
"url": "https://github.com/Stradivario/gapi/issues"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
+
"@gapi/core": "^1.8.169",
|
|
32
33
|
"@sendgrid/mail": "6.5.2"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
|
-
"@types/node": "^
|
|
36
|
+
"@types/node": "^25.0.3",
|
|
36
37
|
"@types/jest": "^25.2.1",
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
38
|
-
"@typescript-eslint/parser": "^
|
|
39
|
-
"eslint": "^
|
|
40
|
-
"prettier": "^
|
|
41
|
-
"typescript": "^
|
|
42
|
-
"eslint-config-prettier": "^
|
|
43
|
-
"eslint-plugin-prettier": "^
|
|
44
|
-
"eslint-plugin-simple-import-sort": "^
|
|
45
|
-
"jest": "^
|
|
46
|
-
"ts-jest": "^
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
39
|
+
"@typescript-eslint/parser": "^8.50.1",
|
|
40
|
+
"eslint": "^9.39.2",
|
|
41
|
+
"prettier": "^3.7.4",
|
|
42
|
+
"typescript": "^5.9.3",
|
|
43
|
+
"eslint-config-prettier": "^10.1.8",
|
|
44
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
45
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
46
|
+
"jest": "^30.2.0",
|
|
47
|
+
"ts-jest": "^29.4.6"
|
|
47
48
|
},
|
|
48
49
|
"main": "./dist/index.js",
|
|
49
50
|
"types": "./dist/index.d.ts",
|
package/src/index.ts
CHANGED
package/.eslintrc.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
// Specifies the ESLint parser
|
|
3
|
-
parser: "@typescript-eslint/parser",
|
|
4
|
-
extends: [
|
|
5
|
-
// Uses the recommended rules from the @typescript-eslint/eslint-plugin
|
|
6
|
-
"plugin:@typescript-eslint/recommended",
|
|
7
|
-
// Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
|
|
8
|
-
"prettier/@typescript-eslint",
|
|
9
|
-
// Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
|
|
10
|
-
"plugin:prettier/recommended"
|
|
11
|
-
],
|
|
12
|
-
parserOptions: {
|
|
13
|
-
// Allows for the parsing of modern ECMAScript features
|
|
14
|
-
ecmaVersion: 2018,
|
|
15
|
-
// Allows for the use of imports
|
|
16
|
-
sourceType: "module"
|
|
17
|
-
},
|
|
18
|
-
rules: {
|
|
19
|
-
"@typescript-eslint/explicit-function-return-type": 0,
|
|
20
|
-
"simple-import-sort/sort": "error",
|
|
21
|
-
"sort-imports": "off",
|
|
22
|
-
"import/order": "off",
|
|
23
|
-
"@typescript-eslint/camelcase": 0,
|
|
24
|
-
"@typescript-eslint/interface-name-prefix": 0
|
|
25
|
-
},
|
|
26
|
-
plugins: ["simple-import-sort"]
|
|
27
|
-
};
|