@milaboratories/pl-drivers 1.2.16

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.
Files changed (117) hide show
  1. package/README.md +18 -0
  2. package/dist/clients/download.d.ts +30 -0
  3. package/dist/clients/download.d.ts.map +1 -0
  4. package/dist/clients/helpers.d.ts +14 -0
  5. package/dist/clients/helpers.d.ts.map +1 -0
  6. package/dist/clients/logs.d.ts +26 -0
  7. package/dist/clients/logs.d.ts.map +1 -0
  8. package/dist/clients/ls_api.d.ts +13 -0
  9. package/dist/clients/ls_api.d.ts.map +1 -0
  10. package/dist/clients/progress.d.ts +25 -0
  11. package/dist/clients/progress.d.ts.map +1 -0
  12. package/dist/clients/upload.d.ts +38 -0
  13. package/dist/clients/upload.d.ts.map +1 -0
  14. package/dist/drivers/download_and_logs_blob.d.ts +106 -0
  15. package/dist/drivers/download_and_logs_blob.d.ts.map +1 -0
  16. package/dist/drivers/download_url.d.ts +70 -0
  17. package/dist/drivers/download_url.d.ts.map +1 -0
  18. package/dist/drivers/helpers/files_cache.d.ts +28 -0
  19. package/dist/drivers/helpers/files_cache.d.ts.map +1 -0
  20. package/dist/drivers/helpers/helpers.d.ts +34 -0
  21. package/dist/drivers/helpers/helpers.d.ts.map +1 -0
  22. package/dist/drivers/helpers/ls_list_entry.d.ts +49 -0
  23. package/dist/drivers/helpers/ls_list_entry.d.ts.map +1 -0
  24. package/dist/drivers/helpers/ls_storage_entry.d.ts +25 -0
  25. package/dist/drivers/helpers/ls_storage_entry.d.ts.map +1 -0
  26. package/dist/drivers/helpers/polling_ops.d.ts +8 -0
  27. package/dist/drivers/helpers/polling_ops.d.ts.map +1 -0
  28. package/dist/drivers/helpers/test_helpers.d.ts +2 -0
  29. package/dist/drivers/helpers/test_helpers.d.ts.map +1 -0
  30. package/dist/drivers/logs.d.ts +29 -0
  31. package/dist/drivers/logs.d.ts.map +1 -0
  32. package/dist/drivers/logs_stream.d.ts +50 -0
  33. package/dist/drivers/logs_stream.d.ts.map +1 -0
  34. package/dist/drivers/ls.d.ts +30 -0
  35. package/dist/drivers/ls.d.ts.map +1 -0
  36. package/dist/drivers/upload.d.ts +87 -0
  37. package/dist/drivers/upload.d.ts.map +1 -0
  38. package/dist/helpers/download.d.ts +15 -0
  39. package/dist/helpers/download.d.ts.map +1 -0
  40. package/dist/index.cjs +2 -0
  41. package/dist/index.cjs.map +1 -0
  42. package/dist/index.d.ts +15 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +4627 -0
  45. package/dist/index.js.map +1 -0
  46. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts +36 -0
  47. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts.map +1 -0
  48. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts +103 -0
  49. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts.map +1 -0
  50. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts +42 -0
  51. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts.map +1 -0
  52. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts +165 -0
  53. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +1 -0
  54. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts +44 -0
  55. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts.map +1 -0
  56. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts +171 -0
  57. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts.map +1 -0
  58. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +122 -0
  59. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +1 -0
  60. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts +315 -0
  61. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +1 -0
  62. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts +98 -0
  63. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts.map +1 -0
  64. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts +337 -0
  65. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts.map +1 -0
  66. package/dist/proto/google/api/http.d.ts +451 -0
  67. package/dist/proto/google/api/http.d.ts.map +1 -0
  68. package/dist/proto/google/protobuf/descriptor.d.ts +1646 -0
  69. package/dist/proto/google/protobuf/descriptor.d.ts.map +1 -0
  70. package/dist/proto/google/protobuf/duration.d.ts +106 -0
  71. package/dist/proto/google/protobuf/duration.d.ts.map +1 -0
  72. package/dist/proto/google/protobuf/timestamp.d.ts +151 -0
  73. package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -0
  74. package/package.json +47 -0
  75. package/src/clients/download.test.ts +45 -0
  76. package/src/clients/download.ts +106 -0
  77. package/src/clients/helpers.ts +84 -0
  78. package/src/clients/logs.ts +68 -0
  79. package/src/clients/ls_api.ts +34 -0
  80. package/src/clients/progress.ts +86 -0
  81. package/src/clients/upload.test.ts +30 -0
  82. package/src/clients/upload.ts +199 -0
  83. package/src/drivers/download_and_logs_blob.ts +801 -0
  84. package/src/drivers/download_blob.test.ts +223 -0
  85. package/src/drivers/download_url.test.ts +90 -0
  86. package/src/drivers/download_url.ts +314 -0
  87. package/src/drivers/helpers/files_cache.test.ts +79 -0
  88. package/src/drivers/helpers/files_cache.ts +74 -0
  89. package/src/drivers/helpers/helpers.ts +136 -0
  90. package/src/drivers/helpers/ls_list_entry.test.ts +57 -0
  91. package/src/drivers/helpers/ls_list_entry.ts +152 -0
  92. package/src/drivers/helpers/ls_storage_entry.ts +135 -0
  93. package/src/drivers/helpers/polling_ops.ts +7 -0
  94. package/src/drivers/helpers/test_helpers.ts +5 -0
  95. package/src/drivers/logs.test.ts +337 -0
  96. package/src/drivers/logs.ts +214 -0
  97. package/src/drivers/logs_stream.ts +399 -0
  98. package/src/drivers/ls.test.ts +90 -0
  99. package/src/drivers/ls.ts +147 -0
  100. package/src/drivers/upload.test.ts +454 -0
  101. package/src/drivers/upload.ts +499 -0
  102. package/src/helpers/download.ts +43 -0
  103. package/src/index.ts +15 -0
  104. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.ts +60 -0
  105. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.ts +442 -0
  106. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +63 -0
  107. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +503 -0
  108. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.ts +84 -0
  109. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.ts +697 -0
  110. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +212 -0
  111. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +1036 -0
  112. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.ts +170 -0
  113. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.ts +1201 -0
  114. package/src/proto/google/api/http.ts +838 -0
  115. package/src/proto/google/protobuf/descriptor.ts +5173 -0
  116. package/src/proto/google/protobuf/duration.ts +272 -0
  117. package/src/proto/google/protobuf/timestamp.ts +354 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptor.d.ts","sourceRoot":"","sources":["../../../../src/proto/google/protobuf/descriptor.ts"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,mBAAmB,EAAE,CAAC;CAC7B;AACD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B;;;;;OAKG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;;OAIG;IACH,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B;;OAEG;IACH,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC;;OAEG;IACH,OAAO,EAAE,sBAAsB,EAAE,CAAC;IAClC;;OAEG;IACH,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AACD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;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E,iBAAiB,EAC1B,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,kBAAkB,GAC1B,aAAa;CAiBjB;AACD;;GAEG;AACH,eAAO,MAAM,iBAAiB,wBAA+B,CAAC;AAE9D,cAAM,iCAAkC,SAAQ,WAAW,CAAC,4BAA4B,CAAC;;IAiCvF,MAAM,CACJ,KAAK,CAAC,EAAE,cAAc,CAAC,4BAA4B,CAAC,GACnD,4BAA4B;IAW/B,kBAAkB,CAChB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,EAC1B,MAAM,CAAC,EAAE,4BAA4B,GACpC,4BAA4B;IAwC/B,mBAAmB,CACjB,OAAO,EAAE,4BAA4B,EACrC,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,kBAAkB,GAC1B,aAAa;CA0BjB;AACD;;GAEG;AACH,eAAO,MAAM,4BAA4B,mCACA,CAAC"}
@@ -0,0 +1,106 @@
1
+ import { BinaryWriteOptions, IBinaryWriter, BinaryReadOptions, IBinaryReader, PartialMessage, JsonValue, JsonReadOptions, JsonWriteOptions, MessageType } from '@protobuf-ts/runtime';
2
+ /**
3
+ * A Duration represents a signed, fixed-length span of time represented
4
+ * as a count of seconds and fractions of seconds at nanosecond
5
+ * resolution. It is independent of any calendar and concepts like "day"
6
+ * or "month". It is related to Timestamp in that the difference between
7
+ * two Timestamp values is a Duration and it can be added or subtracted
8
+ * from a Timestamp. Range is approximately +-10,000 years.
9
+ *
10
+ * # Examples
11
+ *
12
+ * Example 1: Compute Duration from two Timestamps in pseudo code.
13
+ *
14
+ * Timestamp start = ...;
15
+ * Timestamp end = ...;
16
+ * Duration duration = ...;
17
+ *
18
+ * duration.seconds = end.seconds - start.seconds;
19
+ * duration.nanos = end.nanos - start.nanos;
20
+ *
21
+ * if (duration.seconds < 0 && duration.nanos > 0) {
22
+ * duration.seconds += 1;
23
+ * duration.nanos -= 1000000000;
24
+ * } else if (duration.seconds > 0 && duration.nanos < 0) {
25
+ * duration.seconds -= 1;
26
+ * duration.nanos += 1000000000;
27
+ * }
28
+ *
29
+ * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
30
+ *
31
+ * Timestamp start = ...;
32
+ * Duration duration = ...;
33
+ * Timestamp end = ...;
34
+ *
35
+ * end.seconds = start.seconds + duration.seconds;
36
+ * end.nanos = start.nanos + duration.nanos;
37
+ *
38
+ * if (end.nanos < 0) {
39
+ * end.seconds -= 1;
40
+ * end.nanos += 1000000000;
41
+ * } else if (end.nanos >= 1000000000) {
42
+ * end.seconds += 1;
43
+ * end.nanos -= 1000000000;
44
+ * }
45
+ *
46
+ * Example 3: Compute Duration from datetime.timedelta in Python.
47
+ *
48
+ * td = datetime.timedelta(days=3, minutes=10)
49
+ * duration = Duration()
50
+ * duration.FromTimedelta(td)
51
+ *
52
+ * # JSON Mapping
53
+ *
54
+ * In JSON format, the Duration type is encoded as a string rather than an
55
+ * object, where the string ends in the suffix "s" (indicating seconds) and
56
+ * is preceded by the number of seconds, with nanoseconds expressed as
57
+ * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
58
+ * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
59
+ * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
60
+ * microsecond should be expressed in JSON format as "3.000001s".
61
+ *
62
+ *
63
+ *
64
+ * @generated from protobuf message google.protobuf.Duration
65
+ */
66
+ export interface Duration {
67
+ /**
68
+ * Signed seconds of the span of time. Must be from -315,576,000,000
69
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
70
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
71
+ *
72
+ * @generated from protobuf field: int64 seconds = 1;
73
+ */
74
+ seconds: bigint;
75
+ /**
76
+ * Signed fractions of a second at nanosecond resolution of the span
77
+ * of time. Durations less than one second are represented with a 0
78
+ * `seconds` field and a positive or negative `nanos` field. For durations
79
+ * of one second or more, a non-zero value for the `nanos` field must be
80
+ * of the same sign as the `seconds` field. Must be from -999,999,999
81
+ * to +999,999,999 inclusive.
82
+ *
83
+ * @generated from protobuf field: int32 nanos = 2;
84
+ */
85
+ nanos: number;
86
+ }
87
+ declare class Duration$Type extends MessageType<Duration> {
88
+ constructor();
89
+ /**
90
+ * Encode `Duration` to JSON string like "3.000001s".
91
+ */
92
+ internalJsonWrite(message: Duration, options: JsonWriteOptions): JsonValue;
93
+ /**
94
+ * Decode `Duration` from JSON string like "3.000001s"
95
+ */
96
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Duration): Duration;
97
+ create(value?: PartialMessage<Duration>): Duration;
98
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Duration): Duration;
99
+ internalBinaryWrite(message: Duration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
100
+ }
101
+ /**
102
+ * @generated MessageType for protobuf message google.protobuf.Duration
103
+ */
104
+ export declare const Duration: Duration$Type;
105
+ export {};
106
+ //# sourceMappingURL=duration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../../../../src/proto/google/protobuf/duration.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;;OASG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,cAAM,aAAc,SAAQ,WAAW,CAAC,QAAQ,CAAC;;IAa/C;;OAEG;IACH,iBAAiB,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,GAAG,SAAS;IAiB1E;;OAEG;IACH,gBAAgB,CACd,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,eAAe,EACxB,MAAM,CAAC,EAAE,QAAQ,GAChB,QAAQ;IA6BX,MAAM,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,QAAQ;IAQlD,kBAAkB,CAChB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,EAC1B,MAAM,CAAC,EAAE,QAAQ,GAChB,QAAQ;IA+BX,mBAAmB,CACjB,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,kBAAkB,GAC1B,aAAa;CAgBjB;AACD;;GAEG;AACH,eAAO,MAAM,QAAQ,eAAsB,CAAC"}
@@ -0,0 +1,151 @@
1
+ import { BinaryWriteOptions, IBinaryWriter, BinaryReadOptions, IBinaryReader, PartialMessage, JsonValue, JsonReadOptions, JsonWriteOptions, MessageType } from '@protobuf-ts/runtime';
2
+ /**
3
+ * A Timestamp represents a point in time independent of any time zone or local
4
+ * calendar, encoded as a count of seconds and fractions of seconds at
5
+ * nanosecond resolution. The count is relative to an epoch at UTC midnight on
6
+ * January 1, 1970, in the proleptic Gregorian calendar which extends the
7
+ * Gregorian calendar backwards to year one.
8
+ *
9
+ * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
10
+ * second table is needed for interpretation, using a [24-hour linear
11
+ * smear](https://developers.google.com/time/smear).
12
+ *
13
+ * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
14
+ * restricting to that range, we ensure that we can convert to and from [RFC
15
+ * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
16
+ *
17
+ * # Examples
18
+ *
19
+ * Example 1: Compute Timestamp from POSIX `time()`.
20
+ *
21
+ * Timestamp timestamp;
22
+ * timestamp.set_seconds(time(NULL));
23
+ * timestamp.set_nanos(0);
24
+ *
25
+ * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
26
+ *
27
+ * struct timeval tv;
28
+ * gettimeofday(&tv, NULL);
29
+ *
30
+ * Timestamp timestamp;
31
+ * timestamp.set_seconds(tv.tv_sec);
32
+ * timestamp.set_nanos(tv.tv_usec * 1000);
33
+ *
34
+ * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
35
+ *
36
+ * FILETIME ft;
37
+ * GetSystemTimeAsFileTime(&ft);
38
+ * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
39
+ *
40
+ * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
41
+ * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
42
+ * Timestamp timestamp;
43
+ * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
44
+ * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
45
+ *
46
+ * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
47
+ *
48
+ * long millis = System.currentTimeMillis();
49
+ *
50
+ * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
51
+ * .setNanos((int) ((millis % 1000) * 1000000)).build();
52
+ *
53
+ *
54
+ * Example 5: Compute Timestamp from Java `Instant.now()`.
55
+ *
56
+ * Instant now = Instant.now();
57
+ *
58
+ * Timestamp timestamp =
59
+ * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
60
+ * .setNanos(now.getNano()).build();
61
+ *
62
+ *
63
+ * Example 6: Compute Timestamp from current time in Python.
64
+ *
65
+ * timestamp = Timestamp()
66
+ * timestamp.GetCurrentTime()
67
+ *
68
+ * # JSON Mapping
69
+ *
70
+ * In JSON format, the Timestamp type is encoded as a string in the
71
+ * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
72
+ * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
73
+ * where {year} is always expressed using four digits while {month}, {day},
74
+ * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
75
+ * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
76
+ * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
77
+ * is required. A proto3 JSON serializer should always use UTC (as indicated by
78
+ * "Z") when printing the Timestamp type and a proto3 JSON parser should be
79
+ * able to accept both UTC and other timezones (as indicated by an offset).
80
+ *
81
+ * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
82
+ * 01:30 UTC on January 15, 2017.
83
+ *
84
+ * In JavaScript, one can convert a Date object to this format using the
85
+ * standard
86
+ * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
87
+ * method. In Python, a standard `datetime.datetime` object can be converted
88
+ * to this format using
89
+ * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
90
+ * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
91
+ * the Joda Time's [`ISODateTimeFormat.dateTime()`](
92
+ * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
93
+ * ) to obtain a formatter capable of generating timestamps in this format.
94
+ *
95
+ *
96
+ *
97
+ * @generated from protobuf message google.protobuf.Timestamp
98
+ */
99
+ export interface Timestamp {
100
+ /**
101
+ * Represents seconds of UTC time since Unix epoch
102
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
103
+ * 9999-12-31T23:59:59Z inclusive.
104
+ *
105
+ * @generated from protobuf field: int64 seconds = 1;
106
+ */
107
+ seconds: bigint;
108
+ /**
109
+ * Non-negative fractions of a second at nanosecond resolution. Negative
110
+ * second values with fractions must still have non-negative nanos values
111
+ * that count forward in time. Must be from 0 to 999,999,999
112
+ * inclusive.
113
+ *
114
+ * @generated from protobuf field: int32 nanos = 2;
115
+ */
116
+ nanos: number;
117
+ }
118
+ declare class Timestamp$Type extends MessageType<Timestamp> {
119
+ constructor();
120
+ /**
121
+ * Creates a new `Timestamp` for the current time.
122
+ */
123
+ now(): Timestamp;
124
+ /**
125
+ * Converts a `Timestamp` to a JavaScript Date.
126
+ */
127
+ toDate(message: Timestamp): Date;
128
+ /**
129
+ * Converts a JavaScript Date to a `Timestamp`.
130
+ */
131
+ fromDate(date: Date): Timestamp;
132
+ /**
133
+ * In JSON format, the `Timestamp` type is encoded as a string
134
+ * in the RFC 3339 format.
135
+ */
136
+ internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue;
137
+ /**
138
+ * In JSON format, the `Timestamp` type is encoded as a string
139
+ * in the RFC 3339 format.
140
+ */
141
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp;
142
+ create(value?: PartialMessage<Timestamp>): Timestamp;
143
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp;
144
+ internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
145
+ }
146
+ /**
147
+ * @generated MessageType for protobuf message google.protobuf.Timestamp
148
+ */
149
+ export declare const Timestamp: Timestamp$Type;
150
+ export {};
151
+ //# sourceMappingURL=timestamp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timestamp.d.ts","sourceRoot":"","sources":["../../../../src/proto/google/protobuf/timestamp.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,kBAAkB,EA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D,kBAAkB,CAChB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,EAC1B,MAAM,CAAC,EAAE,SAAS,GACjB,SAAS;IA+BZ,mBAAmB,CACjB,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,kBAAkB,GAC1B,aAAa;CAgBjB;AACD;;GAEG;AACH,eAAO,MAAM,SAAS,gBAAuB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@milaboratories/pl-drivers",
3
+ "version": "1.2.16",
4
+ "description": "Drivers and a low-level clients for log streaming, downloading and uploading files from and to pl",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "import": "./dist/index.js",
10
+ "require": "./dist/index.cjs"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist/**/*",
15
+ "src/**/*"
16
+ ],
17
+ "dependencies": {
18
+ "@grpc/grpc-js": "^1.11.3",
19
+ "@protobuf-ts/grpc-transport": "^2.9.4",
20
+ "@protobuf-ts/runtime": "^2.9.4",
21
+ "@protobuf-ts/runtime-rpc": "^2.9.4",
22
+ "@protobuf-ts/plugin": "^2.9.4",
23
+ "denque": "^2.1.0",
24
+ "tar-fs": "^3.0.6",
25
+ "undici": "^6.19.8",
26
+ "zod": "^3.23.8",
27
+ "@milaboratories/ts-helpers": "^1.0.23",
28
+ "@milaboratories/pl-client": "^2.4.11",
29
+ "@milaboratories/computable": "^2.1.3",
30
+ "@milaboratories/pl-tree": "^1.3.7",
31
+ "@milaboratories/pl-model-common": "^1.3.10"
32
+ },
33
+ "devDependencies": {
34
+ "typescript": "~5.6.2",
35
+ "vite": "^5.4.7",
36
+ "@types/jest": "^29.5.13",
37
+ "@types/tar-fs": "^2.0.4",
38
+ "jest": "^29.7.0",
39
+ "ts-jest": "^29.2.5",
40
+ "@milaboratories/platforma-build-configs": "1.0.1"
41
+ },
42
+ "scripts": {
43
+ "type-check": "tsc --noEmit --composite false",
44
+ "build": "vite build",
45
+ "test": "true || jest --runInBand"
46
+ }
47
+ }
@@ -0,0 +1,45 @@
1
+ import { PlClient, TestHelpers } from '@milaboratories/pl-client';
2
+ import * as fs from 'node:fs/promises';
3
+ import * as os from 'node:os';
4
+ import * as path from 'node:path';
5
+ import { ConsoleLoggerAdapter } from '@milaboratories/ts-helpers';
6
+ import { GrpcTransport } from '@protobuf-ts/grpc-transport';
7
+ import { Dispatcher } from 'undici';
8
+ import { text } from 'node:stream/consumers';
9
+ import { ClientDownload } from '../clients/download';
10
+
11
+ test('client download from a local file', async () => {
12
+ await TestHelpers.withTempRoot(async (client) => {
13
+ const storageRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'test'));
14
+ const fName = 'answer_to_the_ultimate_question.txt';
15
+
16
+ const data = Buffer.from(new TextEncoder().encode('42'));
17
+
18
+ const fPath = path.join(storageRoot, fName);
19
+ await fs.writeFile(fPath, data);
20
+
21
+ const clientDownload = client.getDriver({
22
+ name: 'ClientDownload',
23
+ init: (
24
+ pl: PlClient,
25
+ grpcTransport: GrpcTransport,
26
+ httpDispatcher: Dispatcher
27
+ ) =>
28
+ new ClientDownload(
29
+ grpcTransport,
30
+ httpDispatcher,
31
+ new ConsoleLoggerAdapter(),
32
+ { tmp: storageRoot }
33
+ )
34
+ });
35
+
36
+ const localFile = await clientDownload.readLocalFile(
37
+ `storage://tmp/${fName}`
38
+ );
39
+
40
+ expect(localFile.size).toBe(2);
41
+ expect(await text(localFile.content)).toBe('42');
42
+
43
+ await fs.rm(fPath);
44
+ });
45
+ });
@@ -0,0 +1,106 @@
1
+ import { Readable } from 'node:stream';
2
+ import * as fs from 'node:fs';
3
+ import * as fsp from 'node:fs/promises';
4
+ import * as path from 'node:path';
5
+ import { DownloadClient } from '../proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client';
6
+ import { GrpcTransport } from '@protobuf-ts/grpc-transport';
7
+ import type { RpcOptions } from '@protobuf-ts/runtime-rpc';
8
+ import { MiLogger } from '@milaboratories/ts-helpers';
9
+ import { addRTypeToMetadata } from '@milaboratories/pl-client';
10
+ import { Dispatcher } from 'undici';
11
+ import {
12
+ DownloadAPI_GetDownloadURL_HTTPHeader,
13
+ DownloadAPI_GetDownloadURL_Response
14
+ } from '../proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol';
15
+ import { ResourceInfo } from '@milaboratories/pl-tree';
16
+ import { DownloadHelper, DownloadResponse } from '../helpers/download';
17
+
18
+ const storageProtocol = 'storage://';
19
+ const localPathRegex = /storage:\/\/(?<storageId>.*?)\/(?<localPath>.*)/;
20
+
21
+ export class UnknownStorageError extends Error {}
22
+ export class WrongLocalFileUrl extends Error {}
23
+
24
+ /** Gets URLs for downloading from pl-core, parses them and reads or downloads
25
+ * files locally and from the web. */
26
+ export class ClientDownload {
27
+ public readonly grpcClient: DownloadClient;
28
+ private readonly downloadHelper: DownloadHelper;
29
+
30
+ constructor(
31
+ public readonly grpcTransport: GrpcTransport,
32
+ public readonly httpClient: Dispatcher,
33
+ public readonly logger: MiLogger,
34
+ private readonly localStorageIdsToRoot: Record<string, string>
35
+ ) {
36
+ this.grpcClient = new DownloadClient(this.grpcTransport);
37
+ this.downloadHelper = new DownloadHelper(httpClient);
38
+ }
39
+
40
+ close() {}
41
+
42
+ async getUrl(
43
+ { id, type }: ResourceInfo,
44
+ options?: RpcOptions,
45
+ signal?: AbortSignal
46
+ ): Promise<DownloadAPI_GetDownloadURL_Response> {
47
+ const withAbort = options ?? {};
48
+ withAbort.abort = signal;
49
+
50
+ return await this.grpcClient.getDownloadURL(
51
+ { resourceId: id },
52
+ addRTypeToMetadata(type, withAbort)
53
+ ).response;
54
+ }
55
+
56
+ async downloadBlob(
57
+ info: ResourceInfo,
58
+ options?: RpcOptions,
59
+ signal?: AbortSignal
60
+ ): Promise<DownloadResponse> {
61
+ const { downloadUrl, headers } = await this.getUrl(info, options, signal);
62
+
63
+ this.logger.info(`download from url ${downloadUrl}`);
64
+
65
+ return this.isLocal(downloadUrl)
66
+ ? await this.readLocalFile(downloadUrl)
67
+ : await this.downloadHelper.downloadRemoteFile(
68
+ downloadUrl,
69
+ headersFromProto(headers),
70
+ signal
71
+ );
72
+ }
73
+
74
+ private isLocal = (url: string) => url.startsWith(storageProtocol);
75
+
76
+ async readLocalFile(url: string): Promise<DownloadResponse> {
77
+ const parsed = url.match(localPathRegex);
78
+ if (parsed === null || parsed.length != 3) {
79
+ throw new WrongLocalFileUrl(
80
+ `url for local filepath ${url} does not match regex ${localPathRegex}, parsed: ${parsed}`
81
+ );
82
+ }
83
+
84
+ const [_, storageId, localPath] = parsed;
85
+
86
+ if (this.localStorageIdsToRoot[storageId] == undefined)
87
+ throw new UnknownStorageError(`Unknown storage location: ${storageId}`);
88
+
89
+ const storageRoot = this.localStorageIdsToRoot[storageId];
90
+
91
+ const fullPath = path.join(storageRoot, localPath);
92
+ const stat = await fsp.stat(fullPath);
93
+ const size = stat.size;
94
+
95
+ return {
96
+ content: Readable.toWeb(fs.createReadStream(fullPath)),
97
+ size
98
+ };
99
+ }
100
+ }
101
+
102
+ export function headersFromProto(
103
+ headers: DownloadAPI_GetDownloadURL_HTTPHeader[]
104
+ ): Record<string, string> {
105
+ return Object.fromEntries(headers.map(({ name, value }) => [name, value]));
106
+ }
@@ -0,0 +1,84 @@
1
+ import { PlClient } from '@milaboratories/pl-client';
2
+ import { MiLogger } from '@milaboratories/ts-helpers';
3
+ import { GrpcTransport } from '@protobuf-ts/grpc-transport';
4
+ import { Dispatcher } from 'undici';
5
+ import { ClientDownload } from './download';
6
+ import { ClientLogs } from './logs';
7
+ import { ClientProgress } from './progress';
8
+ import { ClientUpload } from './upload';
9
+ import { ClientLs } from './ls_api';
10
+
11
+ export const PL_STORAGE_TO_PATH = process.env.PL_STORAGE_TO_PATH
12
+ ? Object.fromEntries(
13
+ process.env.PL_STORAGE_TO_PATH.split(';').map((kv) => kv.split(':'))
14
+ )
15
+ : {};
16
+
17
+ export function createDownloadClient(
18
+ logger: MiLogger,
19
+ client: PlClient,
20
+ localStorageIdsToRoot?: Record<string, string>
21
+ ) {
22
+ if (localStorageIdsToRoot === undefined)
23
+ localStorageIdsToRoot = PL_STORAGE_TO_PATH;
24
+ const clientDownload = client.getDriver({
25
+ name: 'DownloadBlob',
26
+ init: (
27
+ _: PlClient,
28
+ grpcTransport: GrpcTransport,
29
+ httpDispatcher: Dispatcher
30
+ ) =>
31
+ new ClientDownload(
32
+ grpcTransport,
33
+ httpDispatcher,
34
+ logger,
35
+ localStorageIdsToRoot!
36
+ )
37
+ });
38
+
39
+ return clientDownload;
40
+ }
41
+
42
+ export function createLogsClient(client: PlClient, logger: MiLogger) {
43
+ return client.getDriver({
44
+ name: 'StreamLogs',
45
+ init: (
46
+ _: PlClient,
47
+ grpcTransport: GrpcTransport,
48
+ httpDispatcher: Dispatcher
49
+ ) => new ClientLogs(grpcTransport, httpDispatcher, logger)
50
+ });
51
+ }
52
+
53
+ export function createUploadProgressClient(client: PlClient, logger: MiLogger) {
54
+ return client.getDriver({
55
+ name: 'UploadProgress',
56
+ init: (
57
+ _: PlClient,
58
+ grpcTransport: GrpcTransport,
59
+ httpDispatcher: Dispatcher
60
+ ) => new ClientProgress(grpcTransport, httpDispatcher, client, logger)
61
+ });
62
+ }
63
+
64
+ export function createUploadBlobClient(client: PlClient, logger: MiLogger) {
65
+ return client.getDriver({
66
+ name: 'UploadBlob',
67
+ init: (
68
+ _: PlClient,
69
+ grpcTransport: GrpcTransport,
70
+ httpDispatcher: Dispatcher
71
+ ) => new ClientUpload(grpcTransport, httpDispatcher, client, logger)
72
+ });
73
+ }
74
+
75
+ export function createLsFilesClient(client: PlClient, logger: MiLogger) {
76
+ return client.getDriver({
77
+ name: 'LsFiles',
78
+ init: (
79
+ _client: PlClient,
80
+ grpcTransport: GrpcTransport,
81
+ _httpDispatcher: Dispatcher
82
+ ) => new ClientLs(grpcTransport, logger)
83
+ });
84
+ }
@@ -0,0 +1,68 @@
1
+ import { StreamingClient } from '../proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client';
2
+ import { GrpcTransport } from '@protobuf-ts/grpc-transport';
3
+ import type { RpcOptions } from '@protobuf-ts/runtime-rpc';
4
+ import { MiLogger, notEmpty } from '@milaboratories/ts-helpers';
5
+ import { Dispatcher } from 'undici';
6
+ import { addRTypeToMetadata } from '@milaboratories/pl-client';
7
+ import { StreamingAPI_Response } from '../proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol';
8
+ import { ResourceInfo } from '@milaboratories/pl-tree';
9
+
10
+ export class ClientLogs {
11
+ public readonly grpcClient: StreamingClient;
12
+
13
+ constructor(
14
+ public readonly grpcTransport: GrpcTransport,
15
+ public readonly httpClient: Dispatcher,
16
+ public readonly logger: MiLogger
17
+ ) {
18
+ this.grpcClient = new StreamingClient(this.grpcTransport);
19
+ }
20
+
21
+ close() {}
22
+
23
+ /** Reads text back and returns the text,
24
+ * the new offset
25
+ * and the total size of the (currently existing) file. */
26
+ public async lastLines(
27
+ { id: rId, type: rType }: ResourceInfo,
28
+ lineCount: number,
29
+ offsetBytes: bigint = 0n, // if 0n, then start from the end.
30
+ searchStr?: string,
31
+ options?: RpcOptions
32
+ ): Promise<StreamingAPI_Response> {
33
+ return (
34
+ await this.grpcClient.lastLines(
35
+ {
36
+ resourceId: rId,
37
+ lineCount: lineCount,
38
+ offset: offsetBytes,
39
+ search: searchStr
40
+ },
41
+ addRTypeToMetadata(rType, options)
42
+ )
43
+ ).response;
44
+ }
45
+
46
+ /** Reads the file forward and returns the text,
47
+ * the new offset
48
+ * and the total size of the (currently existing) file. */
49
+ public async readText(
50
+ { id: rId, type: rType }: ResourceInfo,
51
+ lineCount: number,
52
+ offsetBytes: bigint = 0n, // if 0n, then start from the beginning.
53
+ searchStr?: string,
54
+ options?: RpcOptions
55
+ ): Promise<StreamingAPI_Response> {
56
+ return (
57
+ await this.grpcClient.readText(
58
+ {
59
+ resourceId: notEmpty(rId),
60
+ readLimit: BigInt(lineCount),
61
+ offset: offsetBytes,
62
+ search: searchStr
63
+ },
64
+ addRTypeToMetadata(rType, options)
65
+ )
66
+ ).response;
67
+ }
68
+ }