@roadmanjs/firebase-admin 0.0.4 → 0.0.5
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/_utils/file.utils.d.ts +6 -0
- package/dist/_utils/file.utils.js +13 -0
- package/dist/_utils/file.utils.js.map +1 -0
- package/dist/_utils/uuid.d.ts +1 -0
- package/dist/_utils/uuid.js +9 -0
- package/dist/_utils/uuid.js.map +1 -0
- package/dist/client/gql/index.d.ts +2 -0
- package/dist/client/gql/index.js +15 -0
- package/dist/client/gql/index.js.map +1 -0
- package/dist/client/gql/media.fragment.d.ts +12 -0
- package/dist/client/gql/media.fragment.js +21 -0
- package/dist/client/gql/media.fragment.js.map +1 -0
- package/dist/client/gql/media.mutation.d.ts +1 -0
- package/dist/client/gql/media.mutation.js +17 -0
- package/dist/client/gql/media.mutation.js.map +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +14 -0
- package/dist/client/index.js.map +1 -0
- package/dist/firebase/index.d.ts +1 -0
- package/dist/firebase/index.js +2 -1
- package/dist/firebase/index.js.map +1 -1
- package/dist/media/file.input.d.ts +6 -0
- package/dist/media/file.input.js +26 -0
- package/dist/media/file.input.js.map +1 -0
- package/dist/media/media.methods.d.ts +1 -0
- package/dist/media/media.methods.js +37 -0
- package/dist/media/media.methods.js.map +1 -0
- package/dist/media/media.model.d.ts +18 -0
- package/dist/media/media.model.js +47 -0
- package/dist/media/media.model.js.map +1 -0
- package/dist/media/media.resolver.d.ts +6 -0
- package/dist/media/media.resolver.js +97 -0
- package/dist/media/media.resolver.js.map +1 -0
- package/dist/roadman.d.ts +2 -0
- package/dist/roadman.js +6 -2
- package/dist/roadman.js.map +1 -1
- package/dist/script.d.ts +1 -0
- package/dist/script.js +29 -0
- package/dist/script.js.map +1 -0
- package/package.json +7 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFileExtension = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Get file extension
|
|
6
|
+
* @param mimetype
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
const getFileExtension = (mimetype) => {
|
|
10
|
+
return (mimetype || 'image/png').split('/')[1];
|
|
11
|
+
};
|
|
12
|
+
exports.getFileExtension = getFileExtension;
|
|
13
|
+
//# sourceMappingURL=file.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.utils.js","sourceRoot":"","sources":["../../src/_utils/file.utils.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACI,MAAM,gBAAgB,GAAG,CAAC,QAAgB,EAAE,EAAE;IACjD,OAAO,CAAC,QAAQ,IAAI,WAAW,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACnD,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generateUUID: () => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateUUID = void 0;
|
|
4
|
+
const uuid_1 = require("uuid");
|
|
5
|
+
const generateUUID = () => {
|
|
6
|
+
return (0, uuid_1.v4)();
|
|
7
|
+
};
|
|
8
|
+
exports.generateUUID = generateUUID;
|
|
9
|
+
//# sourceMappingURL=uuid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../src/_utils/uuid.ts"],"names":[],"mappings":";;;AAAA,+BAAkC;AAE3B,MAAM,YAAY,GAAG,GAAW,EAAE;IACrC,OAAO,IAAA,SAAM,GAAE,CAAC;AACpB,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./media.fragment"), exports);
|
|
14
|
+
__exportStar(require("./media.mutation"), exports);
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/gql/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAiC;AACjC,mDAAiC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface MediaDataType {
|
|
2
|
+
id?: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
owner?: string;
|
|
5
|
+
filename?: string;
|
|
6
|
+
mimetype?: string;
|
|
7
|
+
encoding?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
createdAt?: Date;
|
|
10
|
+
updatedAt?: Date;
|
|
11
|
+
}
|
|
12
|
+
export declare const MediaDataTypeFragment: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MediaDataTypeFragment = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
exports.MediaDataTypeFragment = (0, graphql_tag_1.default) `
|
|
9
|
+
fragment MediaDataTypeFragment on MediaDataType {
|
|
10
|
+
id
|
|
11
|
+
name
|
|
12
|
+
owner
|
|
13
|
+
filename
|
|
14
|
+
mimetype
|
|
15
|
+
encoding
|
|
16
|
+
url
|
|
17
|
+
createdAt
|
|
18
|
+
updatedAt
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
//# sourceMappingURL=media.fragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.fragment.js","sourceRoot":"","sources":["../../../src/client/gql/media.fragment.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA8B;AAcjB,QAAA,qBAAqB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;CAYvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UPLOAD_FILES_MUTATION: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UPLOAD_FILES_MUTATION = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
const media_fragment_1 = require("./media.fragment");
|
|
9
|
+
exports.UPLOAD_FILES_MUTATION = (0, graphql_tag_1.default) `
|
|
10
|
+
mutation UploadFiles($owner: String, $files: [Upload!]!) {
|
|
11
|
+
data: upload(owner: $owner, files: $files) {
|
|
12
|
+
...MediaDataTypeFragment
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
${media_fragment_1.MediaDataTypeFragment}
|
|
16
|
+
`;
|
|
17
|
+
//# sourceMappingURL=media.mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.mutation.js","sourceRoot":"","sources":["../../../src/client/gql/media.mutation.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA8B;AAC9B,qDAAuD;AAE1C,QAAA,qBAAqB,GAAG,IAAA,qBAAG,EAAA;;;;;;MAMlC,sCAAqB;CAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './gql';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./gql"), exports);
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAsB"}
|
package/dist/firebase/index.d.ts
CHANGED
package/dist/firebase/index.js
CHANGED
|
@@ -34,8 +34,9 @@ const configureFirebase = () => {
|
|
|
34
34
|
}
|
|
35
35
|
const { project_id } = config_1.default;
|
|
36
36
|
const auth = admin.auth;
|
|
37
|
+
const storage = admin.storage;
|
|
37
38
|
const projectId = project_id;
|
|
38
|
-
return { auth, projectId };
|
|
39
|
+
return { auth, storage, projectId };
|
|
39
40
|
};
|
|
40
41
|
exports.configureFirebase = configureFirebase;
|
|
41
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/firebase/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AAExC,uDAA+B;AAExB,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAClC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE;QACpB,KAAK,CAAC,aAAa,CAAC;YAChB,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,gBAAa,CAAC;YAChD,WAAW,EAAE,WAAW,gBAAM,CAAC,UAAU,iBAAiB;SAC7D,CAAC,CAAC;KACN;IACD,MAAM,EAAC,UAAU,EAAC,GAAG,gBAAM,CAAC;IAC5B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACxB,MAAM,SAAS,GAAG,UAAU,CAAC;IAC7B,OAAO,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/firebase/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AAExC,uDAA+B;AAExB,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAClC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE;QACpB,KAAK,CAAC,aAAa,CAAC;YAChB,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,gBAAa,CAAC;YAChD,WAAW,EAAE,WAAW,gBAAM,CAAC,UAAU,iBAAiB;SAC7D,CAAC,CAAC;KACN;IACD,MAAM,EAAC,UAAU,EAAC,GAAG,gBAAM,CAAC;IAC5B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACxB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC9B,MAAM,SAAS,GAAG,UAAU,CAAC;IAC7B,OAAO,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAC,CAAC;AACtC,CAAC,CAAC;AAZW,QAAA,iBAAiB,qBAY5B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.FileInput = void 0;
|
|
10
|
+
const couchset_1 = require("couchset");
|
|
11
|
+
let FileInput = class FileInput {
|
|
12
|
+
};
|
|
13
|
+
__decorate([
|
|
14
|
+
(0, couchset_1.Field)()
|
|
15
|
+
], FileInput.prototype, "filename", void 0);
|
|
16
|
+
__decorate([
|
|
17
|
+
(0, couchset_1.Field)()
|
|
18
|
+
], FileInput.prototype, "mimetype", void 0);
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, couchset_1.Field)()
|
|
21
|
+
], FileInput.prototype, "encoding", void 0);
|
|
22
|
+
FileInput = __decorate([
|
|
23
|
+
(0, couchset_1.InputType)()
|
|
24
|
+
], FileInput);
|
|
25
|
+
exports.FileInput = FileInput;
|
|
26
|
+
//# sourceMappingURL=file.input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.input.js","sourceRoot":"","sources":["../../src/media/file.input.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAA0C;AAK1C,IAAa,SAAS,GAAtB,MAAa,SAAS;CAMrB,CAAA;AALY;IAAR,IAAA,gBAAK,GAAE;2CAAkB;AAEjB;IAAR,IAAA,gBAAK,GAAE;2CAAkB;AAEjB;IAAR,IAAA,gBAAK,GAAE;2CAAkB;AALjB,SAAS;IADrB,IAAA,oBAAS,GAAE;GACC,SAAS,CAMrB;AANY,8BAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function uploadFileToBucket(filePath: string, fileDest: string, contentType?: string): Promise<string>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uploadFileToBucket = void 0;
|
|
4
|
+
const firebase_1 = require("../firebase");
|
|
5
|
+
const logs_1 = require("@roadmanjs/logs");
|
|
6
|
+
async function uploadFileToBucket(filePath, fileDest, contentType = 'image/png') {
|
|
7
|
+
const { projectId, storage: adminStorage } = (0, firebase_1.configureFirebase)();
|
|
8
|
+
const storage = adminStorage();
|
|
9
|
+
const bucketName = `${projectId}.appspot.com`;
|
|
10
|
+
// const DefaultPlaceholder = `https://storage.googleapis.com/${bucketName}/placeholder.png`;
|
|
11
|
+
// Uploads a local file to the bucket
|
|
12
|
+
try {
|
|
13
|
+
const bucket = storage.bucket(bucketName);
|
|
14
|
+
await bucket.upload(filePath, {
|
|
15
|
+
public: true,
|
|
16
|
+
destination: fileDest,
|
|
17
|
+
// By setting the option `destination`, you can change the name of the
|
|
18
|
+
// object you are uploading to a bucket.
|
|
19
|
+
metadata: {
|
|
20
|
+
contentType,
|
|
21
|
+
// Enable long-lived HTTP caching headers
|
|
22
|
+
// Use only if the contents of the file will never change
|
|
23
|
+
cacheControl: 'no-cache',
|
|
24
|
+
// cacheControl: 'public, max-age=31536000',
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
const publicUrl = `https://storage.googleapis.com/${bucketName}/${fileDest}`;
|
|
28
|
+
(0, logs_1.log)(`Public url -> ${publicUrl}`);
|
|
29
|
+
return publicUrl;
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
(0, logs_1.log)('error uploading file', JSON.stringify(error));
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.uploadFileToBucket = uploadFileToBucket;
|
|
37
|
+
//# sourceMappingURL=media.methods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.methods.js","sourceRoot":"","sources":["../../src/media/media.methods.ts"],"names":[],"mappings":";;;AAAA,0CAA8C;AAC9C,0CAAoC;AAE7B,KAAK,UAAU,kBAAkB,CACpC,QAAgB,EAChB,QAAgB,EAChB,WAAW,GAAG,WAAW;IAEzB,MAAM,EAAC,SAAS,EAAE,OAAO,EAAE,YAAY,EAAC,GAAG,IAAA,4BAAiB,GAAE,CAAC;IAC/D,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;IAE/B,MAAM,UAAU,GAAG,GAAG,SAAS,cAAc,CAAC;IAE9C,6FAA6F;IAE7F,qCAAqC;IACrC,IAAI;QACA,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC1C,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;YAC1B,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,QAAQ;YACrB,sEAAsE;YACtE,wCAAwC;YACxC,QAAQ,EAAE;gBACN,WAAW;gBACX,yCAAyC;gBACzC,yDAAyD;gBACzD,YAAY,EAAE,UAAU;gBACxB,4CAA4C;aAC/C;SACJ,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,kCAAkC,UAAU,IAAI,QAAQ,EAAE,CAAC;QAC7E,IAAA,UAAG,EAAC,iBAAiB,SAAS,EAAE,CAAC,CAAC;QAClC,OAAO,SAAS,CAAC;KACpB;IAAC,OAAO,KAAK,EAAE;QACZ,IAAA,UAAG,EAAC,sBAAsB,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QACnD,MAAM,KAAK,CAAC;KACf;AACL,CAAC;AApCD,gDAoCC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Model } from 'couchset';
|
|
2
|
+
/**
|
|
3
|
+
* GraphQL Types start
|
|
4
|
+
*/
|
|
5
|
+
export declare class MediaDataType {
|
|
6
|
+
id?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
filename?: string;
|
|
9
|
+
mimetype?: string;
|
|
10
|
+
encoding?: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
owner?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* GraphQL Types end
|
|
16
|
+
*/
|
|
17
|
+
export declare const MediaDataModel: Model;
|
|
18
|
+
export default MediaDataType;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.MediaDataModel = exports.MediaDataType = void 0;
|
|
10
|
+
const couchset_1 = require("couchset");
|
|
11
|
+
const modelName = 'Media';
|
|
12
|
+
/**
|
|
13
|
+
* GraphQL Types start
|
|
14
|
+
*/
|
|
15
|
+
let MediaDataType = class MediaDataType {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, couchset_1.Field)(() => String, { nullable: true })
|
|
19
|
+
], MediaDataType.prototype, "id", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, couchset_1.Field)(() => String, { nullable: true })
|
|
22
|
+
], MediaDataType.prototype, "name", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, couchset_1.Field)(() => String, { nullable: true })
|
|
25
|
+
], MediaDataType.prototype, "filename", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, couchset_1.Field)(() => String, { nullable: true })
|
|
28
|
+
], MediaDataType.prototype, "mimetype", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, couchset_1.Field)(() => String, { nullable: true })
|
|
31
|
+
], MediaDataType.prototype, "encoding", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, couchset_1.Field)(() => String, { nullable: true })
|
|
34
|
+
], MediaDataType.prototype, "url", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, couchset_1.Field)(() => String, { nullable: true })
|
|
37
|
+
], MediaDataType.prototype, "owner", void 0);
|
|
38
|
+
MediaDataType = __decorate([
|
|
39
|
+
(0, couchset_1.ObjectType)()
|
|
40
|
+
], MediaDataType);
|
|
41
|
+
exports.MediaDataType = MediaDataType;
|
|
42
|
+
/**
|
|
43
|
+
* GraphQL Types end
|
|
44
|
+
*/
|
|
45
|
+
exports.MediaDataModel = new couchset_1.Model(modelName);
|
|
46
|
+
exports.default = MediaDataType;
|
|
47
|
+
//# sourceMappingURL=media.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.model.js","sourceRoot":"","sources":["../../src/media/media.model.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAkD;AAElD,MAAM,SAAS,GAAG,OAAO,CAAC;AAC1B;;GAEG;AAEH,IAAa,aAAa,GAA1B,MAAa,aAAa;CAqBzB,CAAA;AAnBG;IADC,IAAA,gBAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;yCAC1B;AAGZ;IADC,IAAA,gBAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;2CACxB;AAGd;IADC,IAAA,gBAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;+CACpB;AAGlB;IADC,IAAA,gBAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;+CACpB;AAGlB;IADC,IAAA,gBAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;+CACpB;AAGlB;IADC,IAAA,gBAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;0CACzB;AAGb;IADC,IAAA,gBAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;4CACvB;AApBN,aAAa;IADzB,IAAA,qBAAU,GAAE;GACA,aAAa,CAqBzB;AArBY,sCAAa;AAuB1B;;GAEG;AAEU,QAAA,cAAc,GAAU,IAAI,gBAAK,CAAC,SAAS,CAAC,CAAC;AAE1D,kBAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
9
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
10
|
+
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.MediaResolver = void 0;
|
|
27
|
+
const client_graphql_1 = require("@stoqey/client-graphql");
|
|
28
|
+
const graphql_upload_1 = require("graphql-upload");
|
|
29
|
+
const util_1 = require("util");
|
|
30
|
+
const stream_1 = require("stream");
|
|
31
|
+
const type_graphql_1 = require("type-graphql");
|
|
32
|
+
const media_model_1 = require("./media.model");
|
|
33
|
+
const uuid_1 = require("../_utils/uuid");
|
|
34
|
+
const file_utils_1 = require("../_utils/file.utils");
|
|
35
|
+
const media_methods_1 = require("./media.methods");
|
|
36
|
+
const logs_1 = require("@roadmanjs/logs");
|
|
37
|
+
const fs_1 = __importDefault(require("fs"));
|
|
38
|
+
const finishes = (0, util_1.promisify)(stream_1.finished);
|
|
39
|
+
let MediaResolver = class MediaResolver {
|
|
40
|
+
async upload(files, owner) {
|
|
41
|
+
const [error, allFiles] = await (0, client_graphql_1.awaitTo)(Promise.all(files.map(async (file) => {
|
|
42
|
+
const _a = await file, { encoding, filename, mimetype } = _a, others = __rest(_a, ["encoding", "filename", "mimetype"]);
|
|
43
|
+
const newFileNameID = (0, uuid_1.generateUUID)();
|
|
44
|
+
const fileExt = (0, file_utils_1.getFileExtension)(mimetype);
|
|
45
|
+
const fullfilename = `${newFileNameID}.${fileExt}`;
|
|
46
|
+
const createReadStream = others.createReadStream;
|
|
47
|
+
(0, logs_1.log)('preview ---------------------------->', {
|
|
48
|
+
filename,
|
|
49
|
+
mimetype,
|
|
50
|
+
encoding,
|
|
51
|
+
fileExt,
|
|
52
|
+
});
|
|
53
|
+
// Save file to local
|
|
54
|
+
const localFile = `/tmp/${fullfilename}`;
|
|
55
|
+
const stream = createReadStream();
|
|
56
|
+
const out = fs_1.default.createWriteStream(localFile);
|
|
57
|
+
stream.pipe(out);
|
|
58
|
+
await finishes(out);
|
|
59
|
+
// Save file to cloud
|
|
60
|
+
const savedToCloudUrl = await (0, media_methods_1.uploadFileToBucket)(localFile, fullfilename, mimetype);
|
|
61
|
+
if (!savedToCloudUrl) {
|
|
62
|
+
throw new Error('Not saved to cloud, please try again');
|
|
63
|
+
}
|
|
64
|
+
// Save file to db
|
|
65
|
+
const newMediaData = {
|
|
66
|
+
id: newFileNameID,
|
|
67
|
+
name: filename,
|
|
68
|
+
filename,
|
|
69
|
+
mimetype,
|
|
70
|
+
encoding,
|
|
71
|
+
owner,
|
|
72
|
+
url: savedToCloudUrl,
|
|
73
|
+
};
|
|
74
|
+
await media_model_1.MediaDataModel.create(newMediaData);
|
|
75
|
+
// Return file
|
|
76
|
+
return newMediaData;
|
|
77
|
+
})));
|
|
78
|
+
if (allFiles) {
|
|
79
|
+
return allFiles;
|
|
80
|
+
}
|
|
81
|
+
if (error) {
|
|
82
|
+
console.error(error);
|
|
83
|
+
}
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, type_graphql_1.Mutation)(() => [media_model_1.MediaDataType]),
|
|
89
|
+
__param(0, (0, type_graphql_1.Arg)('files', () => [graphql_upload_1.GraphQLUpload])),
|
|
90
|
+
__param(1, (0, type_graphql_1.Arg)('owner', { nullable: true }))
|
|
91
|
+
], MediaResolver.prototype, "upload", null);
|
|
92
|
+
MediaResolver = __decorate([
|
|
93
|
+
(0, type_graphql_1.Resolver)(media_model_1.MediaDataType)
|
|
94
|
+
], MediaResolver);
|
|
95
|
+
exports.MediaResolver = MediaResolver;
|
|
96
|
+
exports.default = MediaResolver;
|
|
97
|
+
//# sourceMappingURL=media.resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.resolver.js","sourceRoot":"","sources":["../../src/media/media.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA+C;AAC/C,mDAA6C;AAC7C,+BAA+B;AAC/B,mCAAgC;AAChC,+CAAqD;AAErD,+CAA4D;AAC5D,yCAA4C;AAC5C,qDAAsD;AACtD,mDAAmD;AACnD,0CAAoC;AACpC,4CAAoB;AAEpB,MAAM,QAAQ,GAAG,IAAA,gBAAS,EAAC,iBAAQ,CAAC,CAAC;AAErC,IAAa,aAAa,GAA1B,MAAa,aAAa;IAEtB,KAAK,CAAC,MAAM,CAER,KAAkB,EACc,KAAa;QAE7C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,MAAM,IAAA,wBAAO,EACnC,OAAO,CAAC,GAAG,CACP,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACrB,MAAM,KAAiD,MAAM,IAAI,EAA3D,EAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,OAA8B,EAAzB,MAAM,cAAxC,oCAAyC,CAAkB,CAAC;YAElE,MAAM,aAAa,GAAG,IAAA,mBAAY,GAAE,CAAC;YACrC,MAAM,OAAO,GAAG,IAAA,6BAAgB,EAAC,QAAQ,CAAC,CAAC;YAE3C,MAAM,YAAY,GAAG,GAAG,aAAa,IAAI,OAAO,EAAE,CAAC;YAEnD,MAAM,gBAAgB,GAAQ,MAAM,CAAC,gBAAgB,CAAC;YAEtD,IAAA,UAAG,EAAC,uCAAuC,EAAE;gBACzC,QAAQ;gBACR,QAAQ;gBACR,QAAQ;gBACR,OAAO;aACV,CAAC,CAAC;YAEH,qBAAqB;YACrB,MAAM,SAAS,GAAG,QAAQ,YAAY,EAAE,CAAC;YACzC,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAC;YAClC,MAAM,GAAG,GAAG,YAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;YAC5C,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACjB,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC;YAEpB,qBAAqB;YACrB,MAAM,eAAe,GAAG,MAAM,IAAA,kCAAkB,EAC5C,SAAS,EACT,YAAY,EACZ,QAAQ,CACX,CAAC;YACF,IAAI,CAAC,eAAe,EAAE;gBAClB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;aAC3D;YAED,kBAAkB;YAClB,MAAM,YAAY,GAAkB;gBAChC,EAAE,EAAE,aAAa;gBACjB,IAAI,EAAE,QAAQ;gBACd,QAAQ;gBACR,QAAQ;gBACR,QAAQ;gBACR,KAAK;gBACL,GAAG,EAAE,eAAe;aACvB,CAAC;YAEF,MAAM,4BAAc,CAAC,MAAM,CAAgB,YAAY,CAAC,CAAC;YAEzD,cAAc;YACd,OAAO,YAAY,CAAC;QACxB,CAAC,CAAC,CACL,CACJ,CAAC;QAEF,IAAI,QAAQ,EAAE;YACV,OAAO,QAAQ,CAAC;SACnB;QAED,IAAI,KAAK,EAAE;YACP,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACxB;QAED,OAAO,EAAE,CAAC;IACd,CAAC;CACJ,CAAA;AAtEG;IADC,IAAA,uBAAQ,EAAC,GAAG,EAAE,CAAC,CAAC,2BAAa,CAAC,CAAC;IAE3B,WAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,8BAAa,CAAC,CAAC,CAAA;IAEnC,WAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAA;2CAkElC;AAvEQ,aAAa;IADzB,IAAA,uBAAQ,EAAC,2BAAa,CAAC;GACX,aAAa,CAwEzB;AAxEY,sCAAa;AA0E1B,kBAAe,aAAa,CAAC"}
|
package/dist/roadman.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { RoadMan } from '@roadmanjs/core';
|
|
2
|
+
import MediaResolver from './media/media.resolver';
|
|
2
3
|
/**
|
|
3
4
|
* A firebase roadman
|
|
4
5
|
* @param RoadmanBuild
|
|
5
6
|
*/
|
|
6
7
|
export declare const firebaseRoadman: RoadMan;
|
|
8
|
+
export declare const getMediaFileUploadResolvers: () => (typeof MediaResolver)[];
|
package/dist/roadman.js
CHANGED
|
@@ -3,17 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.firebaseRoadman = void 0;
|
|
6
|
+
exports.getMediaFileUploadResolvers = exports.firebaseRoadman = void 0;
|
|
7
|
+
const media_resolver_1 = __importDefault(require("./media/media.resolver"));
|
|
7
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
9
|
const firebase_1 = require("./firebase");
|
|
10
|
+
const logs_1 = require("@roadmanjs/logs");
|
|
9
11
|
/**
|
|
10
12
|
* A firebase roadman
|
|
11
13
|
* @param RoadmanBuild
|
|
12
14
|
*/
|
|
13
15
|
const firebaseRoadman = async (args) => {
|
|
14
16
|
const { projectId } = (0, firebase_1.configureFirebase)();
|
|
15
|
-
|
|
17
|
+
(0, logs_1.log)('ROADMAN: Firebase', chalk_1.default.greenBright('**************************************ProjectID********************', projectId));
|
|
16
18
|
return args;
|
|
17
19
|
};
|
|
18
20
|
exports.firebaseRoadman = firebaseRoadman;
|
|
21
|
+
const getMediaFileUploadResolvers = () => [media_resolver_1.default];
|
|
22
|
+
exports.getMediaFileUploadResolvers = getMediaFileUploadResolvers;
|
|
19
23
|
//# sourceMappingURL=roadman.js.map
|
package/dist/roadman.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roadman.js","sourceRoot":"","sources":["../src/roadman.ts"],"names":[],"mappings":";;;;;;AAEA,kDAA0B;AAC1B,yCAA6C;
|
|
1
|
+
{"version":3,"file":"roadman.js","sourceRoot":"","sources":["../src/roadman.ts"],"names":[],"mappings":";;;;;;AAEA,4EAAmD;AACnD,kDAA0B;AAC1B,yCAA6C;AAC7C,0CAAoC;AAEpC;;;GAGG;AACI,MAAM,eAAe,GAAY,KAAK,EAAE,IAAkB,EAAyB,EAAE;IACxF,MAAM,EAAC,SAAS,EAAC,GAAG,IAAA,4BAAiB,GAAE,CAAC;IAExC,IAAA,UAAG,EACC,mBAAmB,EACnB,eAAK,CAAC,WAAW,CACb,qEAAqE,EACrE,SAAS,CACZ,CACJ,CAAC;IAEF,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAZW,QAAA,eAAe,mBAY1B;AAEK,MAAM,2BAA2B,GAAG,GAAG,EAAE,CAAC,CAAC,wBAAa,CAAC,CAAC;AAApD,QAAA,2BAA2B,+BAAyB"}
|
package/dist/script.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/script.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("@roadmanjs/utils");
|
|
4
|
+
// Automatically run this
|
|
5
|
+
(async () => {
|
|
6
|
+
const args = [
|
|
7
|
+
{ cmd: 'rm', dir: 'dist-client' },
|
|
8
|
+
{ cmd: 'mkdir', dir: 'dist-client' },
|
|
9
|
+
{ cmd: 'cp', dir: 'dist/client/gql', newDir: 'dist-client' },
|
|
10
|
+
{ cmd: 'cp', dir: 'register', newDir: 'dist-client/register' },
|
|
11
|
+
{ cmd: 'cp', dir: 'docs', newDir: 'dist-client/docs' },
|
|
12
|
+
{ cmd: 'cp', dir: 'README.md', newDir: 'dist-client/README.md' },
|
|
13
|
+
// {cmd: 'cp', dir: 'LICENSE', newDir: 'dist-client/LICENSE'},
|
|
14
|
+
{ cmd: 'cp', dir: 'dist/client/index.js', newDir: 'dist-client/index.js' },
|
|
15
|
+
{ cmd: 'cp', dir: 'dist/client/index.d.ts', newDir: 'dist-client/index.d.ts' },
|
|
16
|
+
{ cmd: 'cp', dir: 'dist/client/index.js.map', newDir: 'dist-client/index.js.map' },
|
|
17
|
+
];
|
|
18
|
+
(0, utils_1.buildDirs)(args);
|
|
19
|
+
await (0, utils_1.createClientPackageJson)({
|
|
20
|
+
name: '@roadmanjs/firebase-client',
|
|
21
|
+
description: 'GraphQL client gql for @roadmanjs/firebase-admin',
|
|
22
|
+
extraProps: {
|
|
23
|
+
main: 'index.js',
|
|
24
|
+
types: 'index.d.ts',
|
|
25
|
+
files: ['index.d.ts', 'docs/', '/gql', 'register/', 'LICENSE'],
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
})();
|
|
29
|
+
//# sourceMappingURL=script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"script.js","sourceRoot":"","sources":["../src/script.ts"],"names":[],"mappings":";;AAAA,4CAA4E;AAE5E,yBAAyB;AACzB,CAAC,KAAK,IAAI,EAAE;IACR,MAAM,IAAI,GAAa;QACnB,EAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,aAAa,EAAC;QAC/B,EAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,aAAa,EAAC;QAClC,EAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,EAAE,aAAa,EAAC;QAC1D,EAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,sBAAsB,EAAC;QAC5D,EAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAC;QACpD,EAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,uBAAuB,EAAC;QAC9D,8DAA8D;QAC9D,EAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,sBAAsB,EAAE,MAAM,EAAE,sBAAsB,EAAC;QACxE,EAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,wBAAwB,EAAC;QAC5E,EAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,0BAA0B,EAAE,MAAM,EAAE,0BAA0B,EAAC;KACnF,CAAC;IAEF,IAAA,iBAAS,EAAC,IAAI,CAAC,CAAC;IAEhB,MAAM,IAAA,+BAAuB,EAAC;QAC1B,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,kDAAkD;QAE/D,UAAU,EAAE;YACR,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC;SACjE;KACJ,CAAC,CAAC;AACP,CAAC,CAAC,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roadmanjs/firebase-admin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "A roadman for firebase-admin",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"private": false,
|
|
20
20
|
"scripts": {
|
|
21
21
|
"lint": "tslint \"src/**/*.ts\" --project tsconfig.json",
|
|
22
|
-
"build": "
|
|
22
|
+
"build": "rm -rf dist && ./node_modules/.bin/tsc --skipLibCheck && npm run client",
|
|
23
|
+
"client": "node dist/script.js",
|
|
23
24
|
"test": "mocha src/*test.ts --exit",
|
|
24
|
-
"prepublishOnly": "npm run build",
|
|
25
25
|
"eslint": "eslint ./src --fix --ext=ts"
|
|
26
26
|
},
|
|
27
27
|
"lint-staged": {
|
|
@@ -69,10 +69,14 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@roadmanjs/core": "^0.0.3",
|
|
72
|
+
"@roadmanjs/couchset": "^0.0.6",
|
|
73
|
+
"@roadmanjs/logs": "^0.0.1",
|
|
74
|
+
"@roadmanjs/utils": "^0.0.4",
|
|
72
75
|
"chalk": "^4.1.0",
|
|
73
76
|
"debug": "^4.3.1",
|
|
74
77
|
"dotenv": "^8.2.0",
|
|
75
78
|
"firebase-admin": "^10.0.0",
|
|
79
|
+
"graphql-upload": "^13.0.0",
|
|
76
80
|
"lodash": "^4.17.20"
|
|
77
81
|
}
|
|
78
82
|
}
|