Skip to content

Commit

Permalink
rename pacakge
Browse files Browse the repository at this point in the history
  • Loading branch information
zgid123 committed Apr 5, 2023
1 parent d0b7b58 commit 3970937
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions examples/fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"dependencies": {
"@fastify/autoload": "^5.7.1",
"@grpc-ts/fastify-client": "workspace:*",
"@grpc-ts/fastify-server": "workspace:^1.0.0",
"@grpc.ts/fastify-client": "workspace:*",
"@grpc.ts/fastify-server": "workspace:*",
"detect-port": "^1.5.1",
"fastify": "^4.15.0",
"vite": "^4.2.1"
Expand Down
4 changes: 2 additions & 2 deletions examples/fastify/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import detect from 'detect-port';
import FastifyGrpcClient, { createMetadata } from '@grpc-ts/fastify-client';
import FastifyGrpcClient, { createMetadata } from '@grpc.ts/fastify-client';
import FastifyGrpcServer, {
dateToGrpcTimestamp,
} from '@grpc-ts/fastify-server';
} from '@grpc.ts/fastify-server';

import { fastify } from 'config/fastify';

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "grpc-ts",
"name": "grpc.ts",
"description": "gRPC for javascript",
"private": true,
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ A wrapper of [@grpc/grpc-js](https://github.com/grpc/grpc-node) for Node.JS.
# Install

```sh
npm install --save @grpc-ts/core
npm install --save @grpc.ts/core

# or

yarn add @grpc-ts/core
yarn add @grpc.ts/core

# or

Expand Down Expand Up @@ -47,7 +47,7 @@ service ExampleService {
## Client Usage

```ts
import { createClient } from '@grpc-ts/core';
import { createClient } from '@grpc.ts/core';

async function main(): Promise<void> {
const client = await createClient({
Expand Down Expand Up @@ -83,7 +83,7 @@ main();
## Server Usage

```ts
import { createServer, dateToGrpcTimestamp } from '@grpc-ts/core';
import { createServer, dateToGrpcTimestamp } from '@grpc.ts/core';

async function main(): Promise<void> {
const serverObj = await createServer({
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@grpc-ts/core",
"name": "@grpc.ts/core",
"version": "1.0.0",
"license": "MIT",
"directories": {
"lib": "lib"
},
"author": "Alpha",
"description": "Core package for @grpc-ts",
"description": "Core package for @grpc.ts",
"homepage": "https://github.com/zgid123/grpc-ts",
"keywords": [
"grpc",
Expand Down
8 changes: 4 additions & 4 deletions packages/fastify/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ Fastify's Plugin for gRPC Client.
# Install

```sh
npm install --save @grpc-ts/fastify-client
npm install --save @grpc.ts/fastify-client

# or

yarn add @grpc-ts/fastify-client
yarn add @grpc.ts/fastify-client

# or

pnpm add @grpc-ts/fastify-client
pnpm add @grpc.ts/fastify-client
```

# Usage
Expand Down Expand Up @@ -47,7 +47,7 @@ In fastify
```ts
import Fastify from 'fastify';
import detect from 'detect-port';
import FastifyGrpcClient, { createMetadata } from '@grpc-ts/fastify-client';
import FastifyGrpcClient, { createMetadata } from '@grpc.ts/fastify-client';

const fastify = Fastify({
logger: process.env.NODE_ENV === 'production' ? false : true,
Expand Down
4 changes: 2 additions & 2 deletions packages/fastify/client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@grpc-ts/fastify-client",
"name": "@grpc.ts/fastify-client",
"version": "1.0.0",
"license": "MIT",
"directories": {
Expand Down Expand Up @@ -38,7 +38,7 @@
"append-dts": "cat src/index.d.ts >> lib/index.d.ts"
},
"dependencies": {
"@grpc-ts/core": "workspace:*",
"@grpc.ts/core": "workspace:*",
"fastify-plugin": "^4.5.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/fastify/client/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import typescript from '@rollup/plugin-typescript';
export default defineConfig({
input: ['src/index.ts'],
plugins: [json(), resolve(), commonjs(), typescript()],
external: ['fastify-plugin', '@grpc-ts/core'],
external: ['fastify-plugin', '@grpc.ts/core'],
output: [
{
file: './lib/index.cjs',
Expand Down
6 changes: 3 additions & 3 deletions packages/fastify/client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
createClient,
type IClientProps,
type IGrpcClientProps as IGrpcClientCoreProps,
} from '@grpc-ts/core';
} from '@grpc.ts/core';

import type { FastifyInstance, FastifyPluginAsync } from 'fastify';

Expand All @@ -16,7 +16,7 @@ export {
createSecureContext,
dateToGrpcTimestamp,
grpcTimestampToDate,
} from '@grpc-ts/core';
} from '@grpc.ts/core';

export interface IGrpcClientProps extends IClientProps {
clientName?: string;
Expand Down Expand Up @@ -69,5 +69,5 @@ const grpcClient: FastifyPluginAsync<IGrpcClientProps> = async (

export default fp(grpcClient, {
fastify: '>=3',
name: '@grpc-ts/fastify-client',
name: '@grpc.ts/fastify-client',
});
2 changes: 1 addition & 1 deletion packages/fastify/client/src/interface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ServiceClient } from '@grpc-ts/core';
import type { ServiceClient } from '@grpc.ts/core';

interface IGetServiceOptionsProps {
clientName?: string;
Expand Down
8 changes: 4 additions & 4 deletions packages/fastify/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ Fastify's Plugin for Server.
# Install

```sh
npm install --save @grpc-ts/fastify-server
npm install --save @grpc.ts/fastify-server

# or

yarn add @grpc-ts/fastify-server
yarn add @grpc.ts/fastify-server

# or

pnpm add @grpc-ts/fastify-server
pnpm add @grpc.ts/fastify-server
```

# Usage
Expand Down Expand Up @@ -49,7 +49,7 @@ import Fastify from 'fastify';
import detect from 'detect-port';
import FastifyGrpcServer, {
dateToGrpcTimestamp,
} from '@grpc-ts/fastify-server';
} from '@grpc.ts/fastify-server';

const fastify = Fastify({
logger: process.env.NODE_ENV === 'production' ? false : true,
Expand Down
4 changes: 2 additions & 2 deletions packages/fastify/server/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@grpc-ts/fastify-server",
"name": "@grpc.ts/fastify-server",
"version": "1.0.0",
"license": "MIT",
"directories": {
Expand Down Expand Up @@ -38,7 +38,7 @@
"append-dts": "cat src/index.d.ts >> lib/index.d.ts"
},
"dependencies": {
"@grpc-ts/core": "workspace:*",
"@grpc.ts/core": "workspace:*",
"fastify-plugin": "^4.5.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/fastify/server/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import typescript from '@rollup/plugin-typescript';
export default defineConfig({
input: 'src/index.ts',
plugins: [json(), resolve(), commonjs(), typescript()],
external: ['fastify-plugin', '@grpc-ts/core'],
external: ['fastify-plugin', '@grpc.ts/core'],
output: [
{
file: './lib/index.cjs',
Expand Down
6 changes: 3 additions & 3 deletions packages/fastify/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
createServer,
type IServerProps,
type IServerObjProps,
} from '@grpc-ts/core';
} from '@grpc.ts/core';

import type { FastifyInstance, FastifyPluginAsync } from 'fastify';

Expand All @@ -16,7 +16,7 @@ export {
createSecureContext,
dateToGrpcTimestamp,
grpcTimestampToDate,
} from '@grpc-ts/core';
} from '@grpc.ts/core';

export interface IGrpcServerProps extends IServerProps {
serverName?: string;
Expand Down Expand Up @@ -62,5 +62,5 @@ const grpcServer: FastifyPluginAsync<IGrpcServerProps> = async (

export default fp(grpcServer, {
fastify: '>=3',
name: '@grpc-ts/fastify-server',
name: '@grpc.ts/fastify-server',
});
2 changes: 1 addition & 1 deletion packages/fastify/server/src/interface.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import type { IServerObjProps } from '@grpc-ts/core';
import type { IServerObjProps } from '@grpc.ts/core';

export type TGetServerFunc = (serverName?: string) => IServerObjProps;
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3970937

Please sign in to comment.