Skip to content

Commit

Permalink
chore(deps): update dependency gts to v1 (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and JustinBeckwith committed May 3, 2019
1 parent 97fdb00 commit 7fd4049
Show file tree
Hide file tree
Showing 21 changed files with 759 additions and 551 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"eslint-plugin-node": "^9.0.0",
"eslint-plugin-prettier": "^3.0.0",
"google-proto-files": "^0.20.0",
"gts": "^0.9.0",
"gts": "^1.0.0",
"intelli-espower-loader": "^1.0.1",
"jsdoc": "^3.5.5",
"jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git",
Expand Down
26 changes: 15 additions & 11 deletions src/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ import {google} from '../proto/logging';

const eventId = new EventId();

export type Timestamp = google.protobuf.ITimestamp|Date;
export type LogSeverity = google.logging.type.LogSeverity|string;
export type LogEntry = Merge<google.logging.v2.ILogEntry, {
timestamp?: Timestamp | null,
severity?: LogSeverity | null,
}>;
export type Timestamp = google.protobuf.ITimestamp | Date;
export type LogSeverity = google.logging.type.LogSeverity | string;
export type LogEntry = Merge<
google.logging.v2.ILogEntry,
{
timestamp?: Timestamp | null;
severity?: LogSeverity | null;
}
>;
// tslint:disable-next-line no-any
export type Data = any;

Expand Down Expand Up @@ -113,10 +116,11 @@ class Entry {
* @property {number} insertId
*/
this.metadata = extend(
{
timestamp: new Date(),
},
metadata);
{
timestamp: new Date(),
},
metadata
);
// JavaScript date has a very coarse granularity (millisecond), which makes
// it quite likely that multiple log entries would have the same timestamp.
// The Logging API doesn't guarantee to preserve insertion order for entries
Expand All @@ -142,7 +146,7 @@ class Entry {
* object with a string value, `[Circular]`.
*/
toJSON(options: ToJsonOptions = {}) {
const entry = extend(true, {}, this.metadata) as {} as EntryJson;
const entry = (extend(true, {}, this.metadata) as {}) as EntryJson;
if (is.object(this.data)) {
// tslint:disable-next-line no-any
entry.jsonPayload = (Service as any).objToStruct_(this.data, {
Expand Down
2 changes: 1 addition & 1 deletion src/http-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface StackdriverHttpRequest {
remoteIp?: string;
serverIp?: string;
referer?: string;
latency?: {seconds: number; nanos: number;};
latency?: {seconds: number; nanos: number};
cacheLookup?: boolean;
cacheHit?: boolean;
cacheValidatedWithOriginServer?: boolean;
Expand Down

0 comments on commit 7fd4049

Please sign in to comment.