clarifai-web-grpc 1.0.4 → 1.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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- ## [1.0.4](https://github.com/Clarifai/clarifai-web-grpc/compare/v1.0.3...v1.0.4) (2022-01-10)
1
+ ## [1.0.5](https://github.com/Clarifai/clarifai-web-grpc/compare/v1.0.4...v1.0.5) (2022-01-20)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * package exports cjs AND esm. add linting to CI ([2084657](https://github.com/Clarifai/clarifai-web-grpc/commit/2084657bde8fdbd702cb3b6cbe5e43c26658981c))
6
+ * correct default host. re-export struct for convenience ([c71e83f](https://github.com/Clarifai/clarifai-web-grpc/commit/c71e83f0f41e4c57274676bf9e90eea6f56ff850))
package/dist/cjs/index.js CHANGED
@@ -4,7 +4,7 @@ exports.BaseResponse = exports.ClientReadableStream = exports.V2Client = exports
4
4
  const serviceServiceClientPb_1 = require("./proto/clarifai/api/serviceServiceClientPb");
5
5
  Object.defineProperty(exports, "V2Client", { enumerable: true, get: function () { return serviceServiceClientPb_1.V2Client; } });
6
6
  class ClarifaiStub {
7
- static grpc(hostname = 'api.clarifai.com') {
7
+ static grpc(hostname = 'api-grpc-web.clarifai.com') {
8
8
  return new serviceServiceClientPb_1.V2Client(hostname);
9
9
  }
10
10
  }
@@ -1 +1,2 @@
1
1
  export * from './proto/clarifai/api/resources_pb';
2
+ export { Struct } from 'google-protobuf/google/protobuf/struct_pb';
@@ -10,4 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.Struct = void 0;
13
14
  __exportStar(require("./proto/clarifai/api/resources_pb"), exports);
15
+ var struct_pb_1 = require("google-protobuf/google/protobuf/struct_pb");
16
+ Object.defineProperty(exports, "Struct", { enumerable: true, get: function () { return struct_pb_1.Struct; } });
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { V2Client } from './proto/clarifai/api/serviceServiceClientPb';
2
2
  export class ClarifaiStub {
3
- static grpc(hostname = 'api.clarifai.com') {
3
+ static grpc(hostname = 'api-grpc-web.clarifai.com') {
4
4
  return new V2Client(hostname);
5
5
  }
6
6
  }
@@ -1 +1,2 @@
1
1
  export * from './proto/clarifai/api/resources_pb';
2
+ export { Struct } from 'google-protobuf/google/protobuf/struct_pb';
@@ -1 +1,2 @@
1
1
  export * from './proto/clarifai/api/resources_pb';
2
+ export { Struct } from 'google-protobuf/google/protobuf/struct_pb';
package/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { V2Client } from './proto/clarifai/api/serviceServiceClientPb'
2
2
 
3
3
  export class ClarifaiStub {
4
- static grpc (hostname = 'api.clarifai.com') {
4
+ static grpc (hostname = 'api-grpc-web.clarifai.com') {
5
5
  return new V2Client(hostname)
6
6
  }
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarifai-web-grpc",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "The official Clarifai gRPC-web client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/resources.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './proto/clarifai/api/resources_pb'
2
+ export { Struct } from 'google-protobuf/google/protobuf/struct_pb'
@@ -7,7 +7,7 @@ import { expect } from 'chai'
7
7
  describe('Client Stub (src)', () => {
8
8
  it('works', () => {
9
9
  const client = StubSRC.grpc()
10
- expect(client.hostname_).to.equal('api.clarifai.com')
10
+ expect(client.hostname_).to.equal('api-grpc-web.clarifai.com')
11
11
  })
12
12
 
13
13
  it('allows custom hostname', () => {
@@ -19,7 +19,7 @@ describe('Client Stub (src)', () => {
19
19
  describe('Client Stub (cjs)', () => {
20
20
  it('works', () => {
21
21
  const client = StubCJS.grpc()
22
- expect(client.hostname_).to.equal('api.clarifai.com')
22
+ expect(client.hostname_).to.equal('api-grpc-web.clarifai.com')
23
23
  })
24
24
 
25
25
  it('allows custom hostname', () => {
@@ -31,7 +31,7 @@ describe('Client Stub (cjs)', () => {
31
31
  describe('Client Stub (esm)', () => {
32
32
  it('works', () => {
33
33
  const client = StubESM.grpc()
34
- expect(client.hostname_).to.equal('api.clarifai.com')
34
+ expect(client.hostname_).to.equal('api-grpc-web.clarifai.com')
35
35
  })
36
36
 
37
37
  it('allows custom hostname', () => {
File without changes