From 397093720e06b5a384087ffd3722f6ee8dcab38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C6=B0=C6=A1ng=20T=E1=BA=A5n=20Hu=E1=BB=B3nh=20Phong?= Date: Wed, 5 Apr 2023 17:47:15 +0700 Subject: [PATCH] rename pacakge --- examples/fastify/package.json | 4 ++-- examples/fastify/src/main.ts | 4 ++-- package.json | 2 +- packages/core/README.md | 8 ++++---- packages/core/package.json | 4 ++-- packages/fastify/client/README.md | 8 ++++---- packages/fastify/client/package.json | 4 ++-- packages/fastify/client/rollup.config.ts | 2 +- packages/fastify/client/src/index.ts | 6 +++--- packages/fastify/client/src/interface.ts | 2 +- packages/fastify/server/README.md | 8 ++++---- packages/fastify/server/package.json | 4 ++-- packages/fastify/server/rollup.config.ts | 2 +- packages/fastify/server/src/index.ts | 6 +++--- packages/fastify/server/src/interface.ts | 2 +- pnpm-lock.yaml | 16 ++++++++-------- 16 files changed, 41 insertions(+), 41 deletions(-) diff --git a/examples/fastify/package.json b/examples/fastify/package.json index 7748f87..324b364 100644 --- a/examples/fastify/package.json +++ b/examples/fastify/package.json @@ -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" diff --git a/examples/fastify/src/main.ts b/examples/fastify/src/main.ts index 258bd00..c66523c 100644 --- a/examples/fastify/src/main.ts +++ b/examples/fastify/src/main.ts @@ -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'; diff --git a/package.json b/package.json index c294241..be8a1bc 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "grpc-ts", + "name": "grpc.ts", "description": "gRPC for javascript", "private": true, "scripts": { diff --git a/packages/core/README.md b/packages/core/README.md index b66eff3..02ce829 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -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 @@ -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 { const client = await createClient({ @@ -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 { const serverObj = await createServer({ diff --git a/packages/core/package.json b/packages/core/package.json index 29534cb..8202f7b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -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", diff --git a/packages/fastify/client/README.md b/packages/fastify/client/README.md index 5e42954..e8b059b 100644 --- a/packages/fastify/client/README.md +++ b/packages/fastify/client/README.md @@ -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 @@ -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, diff --git a/packages/fastify/client/package.json b/packages/fastify/client/package.json index 08be611..0ebfd2a 100644 --- a/packages/fastify/client/package.json +++ b/packages/fastify/client/package.json @@ -1,5 +1,5 @@ { - "name": "@grpc-ts/fastify-client", + "name": "@grpc.ts/fastify-client", "version": "1.0.0", "license": "MIT", "directories": { @@ -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": { diff --git a/packages/fastify/client/rollup.config.ts b/packages/fastify/client/rollup.config.ts index c50b83f..ded7499 100644 --- a/packages/fastify/client/rollup.config.ts +++ b/packages/fastify/client/rollup.config.ts @@ -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', diff --git a/packages/fastify/client/src/index.ts b/packages/fastify/client/src/index.ts index 6bce47b..36d44ac 100644 --- a/packages/fastify/client/src/index.ts +++ b/packages/fastify/client/src/index.ts @@ -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'; @@ -16,7 +16,7 @@ export { createSecureContext, dateToGrpcTimestamp, grpcTimestampToDate, -} from '@grpc-ts/core'; +} from '@grpc.ts/core'; export interface IGrpcClientProps extends IClientProps { clientName?: string; @@ -69,5 +69,5 @@ const grpcClient: FastifyPluginAsync = async ( export default fp(grpcClient, { fastify: '>=3', - name: '@grpc-ts/fastify-client', + name: '@grpc.ts/fastify-client', }); diff --git a/packages/fastify/client/src/interface.ts b/packages/fastify/client/src/interface.ts index 2e501e4..af0ef9d 100644 --- a/packages/fastify/client/src/interface.ts +++ b/packages/fastify/client/src/interface.ts @@ -1,4 +1,4 @@ -import type { ServiceClient } from '@grpc-ts/core'; +import type { ServiceClient } from '@grpc.ts/core'; interface IGetServiceOptionsProps { clientName?: string; diff --git a/packages/fastify/server/README.md b/packages/fastify/server/README.md index e0b13e9..24fab16 100644 --- a/packages/fastify/server/README.md +++ b/packages/fastify/server/README.md @@ -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 @@ -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, diff --git a/packages/fastify/server/package.json b/packages/fastify/server/package.json index a7f0043..501850b 100644 --- a/packages/fastify/server/package.json +++ b/packages/fastify/server/package.json @@ -1,5 +1,5 @@ { - "name": "@grpc-ts/fastify-server", + "name": "@grpc.ts/fastify-server", "version": "1.0.0", "license": "MIT", "directories": { @@ -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": { diff --git a/packages/fastify/server/rollup.config.ts b/packages/fastify/server/rollup.config.ts index 59044b8..ebb4765 100644 --- a/packages/fastify/server/rollup.config.ts +++ b/packages/fastify/server/rollup.config.ts @@ -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', diff --git a/packages/fastify/server/src/index.ts b/packages/fastify/server/src/index.ts index e2d68c7..7524e74 100644 --- a/packages/fastify/server/src/index.ts +++ b/packages/fastify/server/src/index.ts @@ -3,7 +3,7 @@ import { createServer, type IServerProps, type IServerObjProps, -} from '@grpc-ts/core'; +} from '@grpc.ts/core'; import type { FastifyInstance, FastifyPluginAsync } from 'fastify'; @@ -16,7 +16,7 @@ export { createSecureContext, dateToGrpcTimestamp, grpcTimestampToDate, -} from '@grpc-ts/core'; +} from '@grpc.ts/core'; export interface IGrpcServerProps extends IServerProps { serverName?: string; @@ -62,5 +62,5 @@ const grpcServer: FastifyPluginAsync = async ( export default fp(grpcServer, { fastify: '>=3', - name: '@grpc-ts/fastify-server', + name: '@grpc.ts/fastify-server', }); diff --git a/packages/fastify/server/src/interface.ts b/packages/fastify/server/src/interface.ts index a9476b4..6b498c2 100644 --- a/packages/fastify/server/src/interface.ts +++ b/packages/fastify/server/src/interface.ts @@ -1,3 +1,3 @@ -import type { IServerObjProps } from '@grpc-ts/core'; +import type { IServerObjProps } from '@grpc.ts/core'; export type TGetServerFunc = (serverName?: string) => IServerObjProps; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a7c4d6c..9e584c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -43,8 +43,8 @@ importers: specifiers: '@fastify/autoload': ^5.7.1 '@fastify/vite': ^4.0.0 - '@grpc-ts/fastify-client': workspace:* - '@grpc-ts/fastify-server': workspace:^1.0.0 + '@grpc.ts/fastify-client': workspace:* + '@grpc.ts/fastify-server': workspace:* '@types/detect-port': ^1.3.2 detect-port: ^1.5.1 fastify: ^4.15.0 @@ -53,8 +53,8 @@ importers: vite-node: ^0.29.8 dependencies: '@fastify/autoload': 5.7.1 - '@grpc-ts/fastify-client': link:../../packages/fastify/client - '@grpc-ts/fastify-server': link:../../packages/fastify/server + '@grpc.ts/fastify-client': link:../../packages/fastify/client + '@grpc.ts/fastify-server': link:../../packages/fastify/server detect-port: 1.5.1 fastify: 4.15.0 vite: 4.2.1 @@ -79,13 +79,13 @@ importers: packages/fastify/client: specifiers: - '@grpc-ts/core': workspace:* + '@grpc.ts/core': workspace:* '@types/node': ^18.15.11 fastify: ^4.15.0 fastify-plugin: ^4.5.0 fastify-tsconfig: ^1.0.1 dependencies: - '@grpc-ts/core': link:../../core + '@grpc.ts/core': link:../../core fastify-plugin: 4.5.0 devDependencies: '@types/node': 18.15.11 @@ -94,13 +94,13 @@ importers: packages/fastify/server: specifiers: - '@grpc-ts/core': workspace:* + '@grpc.ts/core': workspace:* '@types/node': ^18.15.11 fastify: ^4.15.0 fastify-plugin: ^4.5.0 fastify-tsconfig: ^1.0.1 dependencies: - '@grpc-ts/core': link:../../core + '@grpc.ts/core': link:../../core fastify-plugin: 4.5.0 devDependencies: '@types/node': 18.15.11