nestjs-firebase-admin 0.6.0 → 0.6.1
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 -0
- package/dist/index.js +1 -0
- package/dist/modules/admin/admin.module.js +19 -18
- package/package.json +23 -29
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './modules/admin/admin.module';
|
|
2
2
|
export * from './modules/admin/services/admin.service';
|
|
3
|
+
export * from './modules/admin/services/auth.service';
|
|
3
4
|
export * from './modules/admin/services/database.service';
|
|
4
5
|
export * from './modules/admin/services/messaging.service';
|
|
5
6
|
export * from './modules/admin/services/firestore.service';
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./modules/admin/admin.module"), exports);
|
|
18
18
|
__exportStar(require("./modules/admin/services/admin.service"), exports);
|
|
19
|
+
__exportStar(require("./modules/admin/services/auth.service"), exports);
|
|
19
20
|
__exportStar(require("./modules/admin/services/database.service"), exports);
|
|
20
21
|
__exportStar(require("./modules/admin/services/messaging.service"), exports);
|
|
21
22
|
__exportStar(require("./modules/admin/services/firestore.service"), exports);
|
|
@@ -69,15 +69,10 @@ let AdminModule = AdminModule_1 = class AdminModule {
|
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
static registerAsync(options) {
|
|
72
|
-
if (!options.useFactory) {
|
|
73
|
-
throw new Error('useFactory
|
|
72
|
+
if (!options.useFactory && !options.useExisting && !options.useClass) {
|
|
73
|
+
throw new Error('One of useFactory, useExisting, or useClass must be provided in AdminModuleAsyncOptions');
|
|
74
74
|
}
|
|
75
75
|
const providers = [
|
|
76
|
-
{
|
|
77
|
-
provide: admin_constants_1.ADMIN_MODULE_OPTIONS,
|
|
78
|
-
useFactory: options.useFactory,
|
|
79
|
-
inject: options.inject || [],
|
|
80
|
-
},
|
|
81
76
|
admin_service_1.AdminService,
|
|
82
77
|
database_service_1.DatabaseService,
|
|
83
78
|
messaging_service_1.MessagingService,
|
|
@@ -89,6 +84,11 @@ let AdminModule = AdminModule_1 = class AdminModule {
|
|
|
89
84
|
},
|
|
90
85
|
];
|
|
91
86
|
if (options.useFactory) {
|
|
87
|
+
providers.push({
|
|
88
|
+
provide: admin_constants_1.ADMIN_MODULE_OPTIONS,
|
|
89
|
+
useFactory: options.useFactory,
|
|
90
|
+
inject: options.inject || [],
|
|
91
|
+
});
|
|
92
92
|
const factory = options.useFactory;
|
|
93
93
|
providers.push({
|
|
94
94
|
provide: admin_constants_1.FIREBASE_ADMIN_INSTANCE_TOKEN,
|
|
@@ -105,12 +105,14 @@ let AdminModule = AdminModule_1 = class AdminModule {
|
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
107
|
else if (options.useExisting) {
|
|
108
|
+
providers.push({
|
|
109
|
+
provide: admin_constants_1.ADMIN_MODULE_OPTIONS,
|
|
110
|
+
useFactory: (optionsFactory) => __awaiter(this, void 0, void 0, function* () { return optionsFactory.createAdminOptions(); }),
|
|
111
|
+
inject: [options.useExisting],
|
|
112
|
+
});
|
|
108
113
|
providers.push({
|
|
109
114
|
provide: admin_constants_1.FIREBASE_ADMIN_INSTANCE_TOKEN,
|
|
110
|
-
useFactory: (optionsFactory) => __awaiter(this, void 0, void 0, function* () {
|
|
111
|
-
const config = yield optionsFactory.createAdminOptions();
|
|
112
|
-
return config;
|
|
113
|
-
}),
|
|
115
|
+
useFactory: (optionsFactory) => __awaiter(this, void 0, void 0, function* () { return optionsFactory.createAdminOptions(); }),
|
|
114
116
|
inject: [options.useExisting],
|
|
115
117
|
});
|
|
116
118
|
providers.push({
|
|
@@ -127,12 +129,14 @@ let AdminModule = AdminModule_1 = class AdminModule {
|
|
|
127
129
|
provide: options.useClass,
|
|
128
130
|
useClass: options.useClass,
|
|
129
131
|
});
|
|
132
|
+
providers.push({
|
|
133
|
+
provide: admin_constants_1.ADMIN_MODULE_OPTIONS,
|
|
134
|
+
useFactory: (optionsFactory) => __awaiter(this, void 0, void 0, function* () { return optionsFactory.createAdminOptions(); }),
|
|
135
|
+
inject: [options.useClass],
|
|
136
|
+
});
|
|
130
137
|
providers.push({
|
|
131
138
|
provide: admin_constants_1.FIREBASE_ADMIN_INSTANCE_TOKEN,
|
|
132
|
-
useFactory: (optionsFactory) => __awaiter(this, void 0, void 0, function* () {
|
|
133
|
-
const config = yield optionsFactory.createAdminOptions();
|
|
134
|
-
return config;
|
|
135
|
-
}),
|
|
139
|
+
useFactory: (optionsFactory) => __awaiter(this, void 0, void 0, function* () { return optionsFactory.createAdminOptions(); }),
|
|
136
140
|
inject: [options.useClass],
|
|
137
141
|
});
|
|
138
142
|
providers.push({
|
|
@@ -144,9 +148,6 @@ let AdminModule = AdminModule_1 = class AdminModule {
|
|
|
144
148
|
inject: [options.useClass],
|
|
145
149
|
});
|
|
146
150
|
}
|
|
147
|
-
else {
|
|
148
|
-
throw new Error('One of useFactory, useExisting, or useClass must be provided in AdminModuleAsyncOptions');
|
|
149
|
-
}
|
|
150
151
|
return {
|
|
151
152
|
module: AdminModule_1,
|
|
152
153
|
imports: options.imports || [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nestjs-firebase-admin",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Firebase Admin SDK for Nestjs",
|
|
5
5
|
"author": "hebertcisco <hebertcisco@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,8 +33,6 @@
|
|
|
33
33
|
"prepublish:next": "npm run build",
|
|
34
34
|
"publish:next": "npm publish --access public --tag next",
|
|
35
35
|
"test:e2e": "npx jest --config ./tests/jest-e2e.json --runInBand",
|
|
36
|
-
"prerelease": "npm run build",
|
|
37
|
-
"release": "release-it",
|
|
38
36
|
"prepare": "npm run build",
|
|
39
37
|
"test": "npx jest",
|
|
40
38
|
"test:watch": "npx jest --watch",
|
|
@@ -45,21 +43,17 @@
|
|
|
45
43
|
"version": "npm run format && git add -A lib",
|
|
46
44
|
"postversion": "git push && git push --tags"
|
|
47
45
|
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.2.1 || ^10.2.1 || ^11.0.0",
|
|
50
|
-
"@nestjs/core": "^11.1.18",
|
|
51
|
-
"@nestjs/platform-express": "^11.1.18",
|
|
52
|
-
"firebase-admin": "^13.0.0",
|
|
53
|
-
"nest-shared": "^5.0.6"
|
|
54
|
-
},
|
|
55
46
|
"engines": {
|
|
56
47
|
"node": ">=20",
|
|
57
48
|
"npm": ">=10"
|
|
58
49
|
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.2.1 || ^10.2.1 || ^11.0.0",
|
|
52
|
+
"@nestjs/core": "^7.0.0 || ^8.0.0 || ^9.2.1 || ^10.2.1 || ^11.0.0",
|
|
53
|
+
"firebase-admin": "^13.7.0"
|
|
54
|
+
},
|
|
59
55
|
"devDependencies": {
|
|
60
|
-
"@
|
|
61
|
-
"@commitlint/config-angular": "18.6.1",
|
|
62
|
-
"@nestjs/testing": "^11.1.18",
|
|
56
|
+
"@nestjs/testing": "^7.0.0 || ^8.0.0 || ^9.2.1 || ^10.2.1 || ^11.0.0",
|
|
63
57
|
"@types/jest": "29.5.14",
|
|
64
58
|
"@types/node": "20.17.9",
|
|
65
59
|
"@types/supertest": "^2.0.16",
|
|
@@ -70,12 +64,9 @@
|
|
|
70
64
|
"eslint-plugin-import": "2.31.0",
|
|
71
65
|
"eslint-plugin-jest": "^28.8.0",
|
|
72
66
|
"eslint-plugin-prettier": "^5.2.1",
|
|
73
|
-
"husky": "8.0.3",
|
|
74
67
|
"jest": "29.7.0",
|
|
75
|
-
"lint-staged": "^15.5.2",
|
|
76
68
|
"prettier": "^3.4.2",
|
|
77
|
-
"reflect-metadata": "0.2.2",
|
|
78
|
-
"release-it": "^19.0.2",
|
|
69
|
+
"reflect-metadata": "^0.2.2",
|
|
79
70
|
"rimraf": "5.0.10",
|
|
80
71
|
"rxjs": "7.8.1",
|
|
81
72
|
"supertest": "^7.1.0",
|
|
@@ -87,17 +78,6 @@
|
|
|
87
78
|
"reflect-metadata": "^0.2.2",
|
|
88
79
|
"rxjs": "^6.0.0 || ^7.0.0"
|
|
89
80
|
},
|
|
90
|
-
"lint-staged": {
|
|
91
|
-
"*.ts": [
|
|
92
|
-
"prettier --write"
|
|
93
|
-
]
|
|
94
|
-
},
|
|
95
|
-
"husky": {
|
|
96
|
-
"hooks": {
|
|
97
|
-
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS",
|
|
98
|
-
"pre-commit": "lint-staged"
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
81
|
"repository": {
|
|
102
82
|
"type": "git",
|
|
103
83
|
"url": "https://github.com/hebertcisco/nestjs-firebase-admin"
|
|
@@ -114,9 +94,23 @@
|
|
|
114
94
|
"^.+\\.(t|j)s$": "ts-jest"
|
|
115
95
|
},
|
|
116
96
|
"collectCoverageFrom": [
|
|
117
|
-
"**/*.(t|j)s"
|
|
97
|
+
"**/*.(t|j)s",
|
|
98
|
+
"!**/*.spec.ts",
|
|
99
|
+
"!**/tests/**",
|
|
100
|
+
"!**/mocks/**",
|
|
101
|
+
"!**/interfaces/index.ts",
|
|
102
|
+
"!**/types/index.ts",
|
|
103
|
+
"!index.ts"
|
|
118
104
|
],
|
|
119
105
|
"coverageDirectory": "../coverage",
|
|
106
|
+
"coverageThreshold": {
|
|
107
|
+
"global": {
|
|
108
|
+
"statements": 85,
|
|
109
|
+
"branches": 65,
|
|
110
|
+
"functions": 92,
|
|
111
|
+
"lines": 95
|
|
112
|
+
}
|
|
113
|
+
},
|
|
120
114
|
"testEnvironment": "node"
|
|
121
115
|
}
|
|
122
116
|
}
|