-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: Completely reverts several versions of the package that were broken/attempting to provide a lean package. This is hopefully a known good state that fixes those issues.
- Loading branch information
1 parent
597fe90
commit 7030339
Showing
15 changed files
with
771 additions
and
926 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
color: true | ||
extension: | ||
- ts | ||
require: ts-node/register | ||
spec: tests/**/*.test.ts |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { V2Client } from './proto/clarifai/api/serviceServiceClientPb' | ||
|
||
export class ClarifaiStub { | ||
static grpc (hostname = 'api.clarifai.com') { | ||
return new V2Client(hostname) | ||
} | ||
} | ||
|
||
export { V2Client } | ||
export { Error, Metadata, ClientReadableStream } from 'grpc-web' | ||
export { BaseResponse } from './proto/clarifai/api/status/status_pb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './proto/clarifai/api/resources_pb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './proto/clarifai/api/service_pb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { ClarifaiStub as StubSRC } from '../index' | ||
import { ClarifaiStub as StubCJS } from '../dist/cjs/index' | ||
import { ClarifaiStub as StubESM } from '../dist/esm/index' | ||
import { describe, it } from 'mocha' | ||
import { expect } from 'chai' | ||
|
||
describe('Client Stub (src)', () => { | ||
it('works', () => { | ||
const client = StubSRC.grpc() | ||
expect(client.hostname_).to.equal('api.clarifai.com') | ||
}) | ||
|
||
it('allows custom hostname', () => { | ||
const client = StubSRC.grpc('api-dev.clarifai.com') | ||
expect(client.hostname_).to.equal('api-dev.clarifai.com') | ||
}) | ||
}) | ||
|
||
describe('Client Stub (cjs)', () => { | ||
it('works', () => { | ||
const client = StubCJS.grpc() | ||
expect(client.hostname_).to.equal('api.clarifai.com') | ||
}) | ||
|
||
it('allows custom hostname', () => { | ||
const client = StubCJS.grpc('api-dev.clarifai.com') | ||
expect(client.hostname_).to.equal('api-dev.clarifai.com') | ||
}) | ||
}) | ||
|
||
describe('Client Stub (esm)', () => { | ||
it('works', () => { | ||
const client = StubESM.grpc() | ||
expect(client.hostname_).to.equal('api.clarifai.com') | ||
}) | ||
|
||
it('allows custom hostname', () => { | ||
const client = StubESM.grpc('api-dev.clarifai.com') | ||
expect(client.hostname_).to.equal('api-dev.clarifai.com') | ||
}) | ||
}) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"module": "CommonJS", | ||
"outDir": "./dist/cjs" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.