@progressive-development/pd-provider-firebase-functions 0.4.0 → 0.4.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/auth-trash.d.ts.map +1 -1
- package/dist/auth-trash.js +31 -11
- package/dist/auth.d.ts.map +1 -1
- package/dist/counter.d.ts.map +1 -1
- package/dist/counter.js +5 -1
- package/dist/import-templates.d.ts.map +1 -1
- package/dist/import-templates.js +6 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/response.d.ts.map +1 -1
- package/dist/response.js +4 -1
- package/dist/script-helpers.d.ts.map +1 -1
- package/dist/script-helpers.js +8 -4
- package/package.json +1 -1
package/dist/auth-trash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-trash.d.ts","sourceRoot":"","sources":["../src/auth-trash.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"auth-trash.d.ts","sourceRoot":"","sources":["../src/auth-trash.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,SAAS,CAAC;AAQjB,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,aAAa,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAEtC,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAoCD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,GAAG,OAAO,EACnD,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CA0CvB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,IAAI,CAAC,CAuCf;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,IAAI,CAAC,CAmCf"}
|
package/dist/auth-trash.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getAuth } from 'firebase-admin/auth';
|
|
2
|
-
import { moveToTrash, getTrashItem,
|
|
2
|
+
import { moveToTrash, getTrashItem, permanentDelete, restoreFromTrash } from './trash.js';
|
|
3
3
|
import { NotFoundError } from './errors.js';
|
|
4
4
|
import { logger } from './logger.js';
|
|
5
5
|
|
|
@@ -11,20 +11,28 @@ function getAuthUidFromTrashItem(trashItem, options) {
|
|
|
11
11
|
const data = trashItem.data;
|
|
12
12
|
const uid = data[source];
|
|
13
13
|
if (typeof uid !== "string" || !uid) {
|
|
14
|
-
throw new Error(
|
|
14
|
+
throw new Error(
|
|
15
|
+
`Auth UID field '${source}' not found or empty in trash item data`
|
|
16
|
+
);
|
|
15
17
|
}
|
|
16
18
|
return uid;
|
|
17
19
|
}
|
|
18
20
|
async function moveToTrashWithAuth(collection, documentId, deletedBy, objectType, options) {
|
|
19
21
|
const authUid = options?.authUidSource === "documentId" || !options?.authUidSource ? documentId : documentId;
|
|
20
|
-
logger.info("Disabling Auth user before trash", {
|
|
22
|
+
logger.info("Disabling Auth user before trash", {
|
|
23
|
+
authUid,
|
|
24
|
+
collection,
|
|
25
|
+
documentId
|
|
26
|
+
});
|
|
21
27
|
try {
|
|
22
28
|
await getAuth().updateUser(authUid, { disabled: true });
|
|
23
29
|
logger.info("Auth user disabled", { authUid });
|
|
24
30
|
} catch (error) {
|
|
25
31
|
const authError = error;
|
|
26
32
|
if (authError.code === "auth/user-not-found") {
|
|
27
|
-
logger.info("Auth user not found, continuing with trash operation", {
|
|
33
|
+
logger.info("Auth user not found, continuing with trash operation", {
|
|
34
|
+
authUid
|
|
35
|
+
});
|
|
28
36
|
} else {
|
|
29
37
|
throw error;
|
|
30
38
|
}
|
|
@@ -56,14 +64,20 @@ async function restoreFromTrashWithAuth(trashItemId, options) {
|
|
|
56
64
|
await restoreFromTrash(trashItemId, options?.databaseId);
|
|
57
65
|
try {
|
|
58
66
|
await getAuth().updateUser(authUid, { disabled: false });
|
|
59
|
-
logger.info("Document restored and Auth user re-enabled", {
|
|
67
|
+
logger.info("Document restored and Auth user re-enabled", {
|
|
68
|
+
trashItemId,
|
|
69
|
+
authUid
|
|
70
|
+
});
|
|
60
71
|
} catch (error) {
|
|
61
72
|
const authError = error;
|
|
62
73
|
if (authError.code === "auth/user-not-found") {
|
|
63
|
-
logger.warn(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
logger.warn(
|
|
75
|
+
"Document restored but Auth user not found - manual Auth user creation required",
|
|
76
|
+
{
|
|
77
|
+
trashItemId,
|
|
78
|
+
authUid
|
|
79
|
+
}
|
|
80
|
+
);
|
|
67
81
|
} else {
|
|
68
82
|
throw error;
|
|
69
83
|
}
|
|
@@ -82,11 +96,17 @@ async function permanentDeleteWithAuth(trashItemId, options) {
|
|
|
82
96
|
await permanentDelete(trashItemId, options?.databaseId);
|
|
83
97
|
try {
|
|
84
98
|
await getAuth().deleteUser(authUid);
|
|
85
|
-
logger.info("Trash item and Auth user permanently deleted", {
|
|
99
|
+
logger.info("Trash item and Auth user permanently deleted", {
|
|
100
|
+
trashItemId,
|
|
101
|
+
authUid
|
|
102
|
+
});
|
|
86
103
|
} catch (error) {
|
|
87
104
|
const authError = error;
|
|
88
105
|
if (authError.code === "auth/user-not-found") {
|
|
89
|
-
logger.info("Auth user not found, trash item deleted", {
|
|
106
|
+
logger.info("Auth user not found, trash item deleted", {
|
|
107
|
+
trashItemId,
|
|
108
|
+
authUid
|
|
109
|
+
});
|
|
90
110
|
} else {
|
|
91
111
|
throw error;
|
|
92
112
|
}
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,WAAW,CASjE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,eAAe,EACxB,YAAY,EAAE,MAAM,EAAE,GACrB,WAAW,CAUb;AAED;;GAEG;AACH,wBAAgB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,WAAW,CASjE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,eAAe,EACxB,YAAY,EAAE,MAAM,EAAE,GACrB,WAAW,CAUb;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,WAAW,EACjB,eAAe,EAAE,MAAM,GACtB,IAAI,CAMN"}
|
package/dist/counter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"counter.d.ts","sourceRoot":"","sources":["../src/counter.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAsB,cAAc,CAClC,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"counter.d.ts","sourceRoot":"","sources":["../src/counter.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAsB,cAAc,CAClC,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAejB"}
|
package/dist/counter.js
CHANGED
|
@@ -8,7 +8,11 @@ async function getNextCounter(counterName, databaseId) {
|
|
|
8
8
|
const doc = await transaction.get(counterRef);
|
|
9
9
|
const current = doc.exists ? doc.data()?.value ?? 0 : 0;
|
|
10
10
|
const next = current + 1;
|
|
11
|
-
transaction.set(
|
|
11
|
+
transaction.set(
|
|
12
|
+
counterRef,
|
|
13
|
+
{ value: next, updatedAt: /* @__PURE__ */ new Date() },
|
|
14
|
+
{ merge: true }
|
|
15
|
+
);
|
|
12
16
|
return next;
|
|
13
17
|
});
|
|
14
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-templates.d.ts","sourceRoot":"","sources":["../src/import-templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,MAAM,WAAW,qBAAqB;IACpC,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"import-templates.d.ts","sourceRoot":"","sources":["../src/import-templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,MAAM,WAAW,qBAAqB;IACpC,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAiDD;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,IAAI,CAAC,CA2Ff"}
|
package/dist/import-templates.js
CHANGED
|
@@ -3,7 +3,9 @@ import { scriptLog, createScriptContext } from './script-helpers.js';
|
|
|
3
3
|
|
|
4
4
|
function findTemplates(templatesDir) {
|
|
5
5
|
const files = readdirSync(templatesDir);
|
|
6
|
-
const jsonFiles = files.filter(
|
|
6
|
+
const jsonFiles = files.filter(
|
|
7
|
+
(f) => f.endsWith(".json") && f !== "serviceAccountKey.json"
|
|
8
|
+
);
|
|
7
9
|
return jsonFiles.map((f) => f.replace(".json", ""));
|
|
8
10
|
}
|
|
9
11
|
function loadTemplate(templatesDir, name) {
|
|
@@ -22,7 +24,9 @@ function loadTemplate(templatesDir, name) {
|
|
|
22
24
|
scriptLog(`Text template not found: ${textPath}`, "error");
|
|
23
25
|
return null;
|
|
24
26
|
}
|
|
25
|
-
const metadata = JSON.parse(
|
|
27
|
+
const metadata = JSON.parse(
|
|
28
|
+
readFileSync(jsonPath, "utf-8")
|
|
29
|
+
);
|
|
26
30
|
const html = readFileSync(htmlPath, "utf-8");
|
|
27
31
|
const text = readFileSync(textPath, "utf-8");
|
|
28
32
|
return { ...metadata, html, text };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export type { ApiResponse, AuthContext } from './types';
|
|
2
2
|
export { StatusCode } from './types';
|
|
3
|
-
export { AppError, ValidationError, UnauthorizedError, ForbiddenError, NotFoundError, ConflictError, EmailAlreadyUsedError, SC_EMAIL_ALREADY_USED } from './errors';
|
|
3
|
+
export { AppError, ValidationError, UnauthorizedError, ForbiddenError, NotFoundError, ConflictError, EmailAlreadyUsedError, SC_EMAIL_ALREADY_USED, } from './errors';
|
|
4
4
|
export { requireAuth, requireClaims, requireOwnership } from './auth';
|
|
5
5
|
export { success, created, handleError } from './response';
|
|
6
6
|
export { getDb } from './firestore';
|
|
7
7
|
export { getNextCounter } from './counter';
|
|
8
8
|
export type { TrashItem } from './trash';
|
|
9
|
-
export { moveToTrash, restoreFromTrash, permanentDelete, listTrash, getTrashItem } from './trash';
|
|
9
|
+
export { moveToTrash, restoreFromTrash, permanentDelete, listTrash, getTrashItem, } from './trash';
|
|
10
10
|
export type { AuthTrashOptions } from './auth-trash';
|
|
11
|
-
export { moveToTrashWithAuth, restoreFromTrashWithAuth, permanentDeleteWithAuth } from './auth-trash';
|
|
11
|
+
export { moveToTrashWithAuth, restoreFromTrashWithAuth, permanentDeleteWithAuth, } from './auth-trash';
|
|
12
12
|
export { logger } from './logger';
|
|
13
|
-
export type { LogType, ScriptContextConfig, ScriptContext } from './script-helpers';
|
|
14
|
-
export { scriptLog, initFirebaseAdmin, createScriptContext } from './script-helpers';
|
|
13
|
+
export type { LogType, ScriptContextConfig, ScriptContext, } from './script-helpers';
|
|
14
|
+
export { scriptLog, initFirebaseAdmin, createScriptContext, } from './script-helpers';
|
|
15
15
|
export type { ImportTemplatesConfig } from './import-templates';
|
|
16
16
|
export { runImportTemplates } from './import-templates';
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,OAAO,EACL,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAGtE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG3D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,YAAY,GACb,MAAM,SAAS,CAAC;AAGjB,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,YAAY,EACV,OAAO,EACP,mBAAmB,EACnB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/response.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAc,MAAM,SAAS,CAAC;AAIlD,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAElD;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAElD;AAED,wBAAgB,WAAW,
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAc,MAAM,SAAS,CAAC;AAIlD,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAElD;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAElD;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,OAAO,GACb,WAAW,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAsB9C"}
|
package/dist/response.js
CHANGED
|
@@ -13,7 +13,10 @@ function handleError(error) {
|
|
|
13
13
|
if (error.statusCode >= 500) {
|
|
14
14
|
logger.error("App error", error);
|
|
15
15
|
} else {
|
|
16
|
-
logger.warn("Request error", {
|
|
16
|
+
logger.warn("Request error", {
|
|
17
|
+
code: error.code,
|
|
18
|
+
message: error.message
|
|
19
|
+
});
|
|
17
20
|
}
|
|
18
21
|
return {
|
|
19
22
|
statusCode: error.statusCode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script-helpers.d.ts","sourceRoot":"","sources":["../src/script-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"script-helpers.d.ts","sourceRoot":"","sources":["../src/script-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAQ1D,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAS5D;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,OAAgB,GAAG,IAAI,CAEvE;AAMD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAWlE;AAMD,MAAM,WAAW,mBAAmB;IAClC,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,4CAA4C;IAC5C,EAAE,EAAE,SAAS,CAAC;IACd,qCAAqC;IACrC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,mBAAmB,GAC1B,aAAa,CA+Bf"}
|
package/dist/script-helpers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getApps, initializeApp, cert } from 'firebase-admin/app';
|
|
2
|
-
import {
|
|
2
|
+
import { existsSync, readFileSync } from 'fs';
|
|
3
3
|
import { getDb } from './firestore.js';
|
|
4
4
|
|
|
5
5
|
const LOG_PREFIX = {
|
|
@@ -13,7 +13,9 @@ function scriptLog(message, type = "info") {
|
|
|
13
13
|
}
|
|
14
14
|
function initFirebaseAdmin(serviceAccountPath) {
|
|
15
15
|
if (getApps().length > 0) return;
|
|
16
|
-
const serviceAccount = JSON.parse(
|
|
16
|
+
const serviceAccount = JSON.parse(
|
|
17
|
+
readFileSync(serviceAccountPath, "utf-8")
|
|
18
|
+
);
|
|
17
19
|
initializeApp({
|
|
18
20
|
credential: cert(serviceAccount),
|
|
19
21
|
databaseURL: `https://${serviceAccount.projectId}.firebaseio.com`
|
|
@@ -31,8 +33,10 @@ ${title}
|
|
|
31
33
|
Expected: ${serviceAccountPath}`);
|
|
32
34
|
console.log(`
|
|
33
35
|
Download from Firebase Console:`);
|
|
34
|
-
console.log(
|
|
35
|
-
`
|
|
36
|
+
console.log(
|
|
37
|
+
` Project Settings > Service Accounts > Generate new private key
|
|
38
|
+
`
|
|
39
|
+
);
|
|
36
40
|
process.exit(1);
|
|
37
41
|
}
|
|
38
42
|
initFirebaseAdmin(serviceAccountPath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progressive-development/pd-provider-firebase-functions",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Firebase Functions v2 utilities for pd-spa-helper backend",
|
|
5
5
|
"author": "PD Progressive Development",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|