@pi-r/gcp 0.5.2 → 0.5.3
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/LICENSE +1 -1
- package/README.md +1 -1
- package/download/index.js +1 -6
- package/package.json +6 -6
- package/types/index.d.ts +36 -0
- package/upload/index.js +1 -6
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright 2023
|
|
1
|
+
Copyright 2023 Haruhi Suzumiya
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
package/README.md
CHANGED
package/download/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
const path = require("path");
|
|
4
3
|
const fs = require("fs");
|
|
5
4
|
const https = require("https");
|
|
@@ -78,9 +77,5 @@ function download(credential, service = 'gcp') {
|
|
|
78
77
|
}
|
|
79
78
|
};
|
|
80
79
|
}
|
|
81
|
-
exports.default = download;
|
|
82
80
|
|
|
83
|
-
|
|
84
|
-
module.exports = exports.default;
|
|
85
|
-
module.exports.default = exports.default;
|
|
86
|
-
}
|
|
81
|
+
module.exports = download;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/gcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "Google (GCP) cloud functions for E-mc.",
|
|
5
5
|
"main": "client/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/cloud": "^0.7.
|
|
24
|
-
"@e-mc/module": "^0.7.
|
|
25
|
-
"@e-mc/types": "^0.7.
|
|
26
|
-
"@google-cloud/firestore": "^7.
|
|
27
|
-
"@google-cloud/storage": "^7.
|
|
23
|
+
"@e-mc/cloud": "^0.7.3",
|
|
24
|
+
"@e-mc/module": "^0.7.3",
|
|
25
|
+
"@e-mc/types": "^0.7.3",
|
|
26
|
+
"@google-cloud/firestore": "^7.6.0",
|
|
27
|
+
"@google-cloud/storage": "^7.9.0"
|
|
28
28
|
}
|
|
29
29
|
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { CloudDatabase, CloudStorage } from '@e-mc/types/lib/cloud';
|
|
2
|
+
|
|
3
|
+
import type { StorageOptions } from '@google-cloud/storage';
|
|
4
|
+
import type { PathType } from '@google-cloud/datastore';
|
|
5
|
+
import type { entity } from '@google-cloud/datastore/build/src/entity';
|
|
6
|
+
import type { FirebaseOptions as IFirebaseOptions } from '@firebase/app';
|
|
7
|
+
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
import type { GoogleAuthOptions } from 'google-auth-library';
|
|
10
|
+
|
|
11
|
+
export type GCPStorage = CloudStorage<GCPStorageCredential, "gcp | gcloud">;
|
|
12
|
+
|
|
13
|
+
export interface GCPStorageCredential extends StorageOptions, IFirebaseOptions {}
|
|
14
|
+
|
|
15
|
+
export interface GCPDatabaseQuery<T = PlainObject> extends Omit<CloudDatabase<unknown, T, unknown, unknown[] | StandardMap, GCPDatabaseCredential>, "id"> {
|
|
16
|
+
source: "cloud";
|
|
17
|
+
service: "gcp" | "gcloud";
|
|
18
|
+
product?: "firestore" | "firebase" | "bigquery" | "bigtable" | "datastore" | "spanner";
|
|
19
|
+
database?: string;
|
|
20
|
+
id?: ArrayOf<string>;
|
|
21
|
+
updateType?: 0 | 1 | 2 | 3;
|
|
22
|
+
columns?: string[];
|
|
23
|
+
keys?: ArrayOf<DatastoreKey>;
|
|
24
|
+
kind?: ArrayOf<string>;
|
|
25
|
+
orderBy?: unknown[][];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type GCPDatabaseCredential = GoogleAuthOptions;
|
|
29
|
+
|
|
30
|
+
export interface FirebaseOptions extends IFirebaseOptions {
|
|
31
|
+
product?: "firebase";
|
|
32
|
+
admin?: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type DatastoreKey = string | PathType[] | entity.KeyOptions;
|
|
36
|
+
export type BucketAcl = "authenticatedRead" | "private" | "projectPrivate" | "publicRead" | "publicReadWrite" | "bucketAccessUniform" | "bucketAccessACL";
|
package/upload/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
const path = require("path");
|
|
4
3
|
const fs = require("fs");
|
|
5
4
|
const util_1 = require("@e-mc/cloud/util");
|
|
@@ -235,9 +234,5 @@ function upload(credential, service = 'gcp') {
|
|
|
235
234
|
}
|
|
236
235
|
};
|
|
237
236
|
}
|
|
238
|
-
exports.default = upload;
|
|
239
237
|
|
|
240
|
-
|
|
241
|
-
module.exports = exports.default;
|
|
242
|
-
module.exports.default = exports.default;
|
|
243
|
-
}
|
|
238
|
+
module.exports = upload;
|