Skip to content
Permalink
Browse files
fixed: rename each module name, npm module can not start with @apache
  • Loading branch information
hufeng committed Jul 21, 2021
1 parent b2d3191 commit ce186170129c660cd46d926dfb1c416e33293672
Showing 38 changed files with 64 additions and 67 deletions.
@@ -16,8 +16,8 @@
*/

import Koa from 'koa'
import { Dubbo } from '@apache/dubbo-consumer'
import { Nacos } from '@apache/dubbo-registry'
import { Dubbo } from 'apache-dubbo-consumer'
import { Nacos } from 'apache-dubbo-registry'
import services from './service'

const dubbo = new Dubbo<typeof services>({
@@ -16,8 +16,8 @@
*/

import Koa from 'koa'
import { Dubbo } from '@apache/dubbo-consumer'
import { Zk } from '@apache/dubbo-registry'
import { Dubbo } from 'apache-dubbo-consumer'
import { Zk } from 'apache-dubbo-registry'
import services from './service'

const dubbo = new Dubbo<typeof services>({
@@ -15,7 +15,7 @@
* limitations under the License.
*/

import { Dubbo, TDubboCallResult, java } from '@apache/dubbo-consumer'
import { Dubbo, TDubboCallResult, java } from 'apache-dubbo-consumer'

export interface IHelloService {
hello(name: string): Promise<TDubboCallResult<string>>
@@ -15,8 +15,8 @@
* limitations under the License.
*/

import { DubboService } from '@apache/dubbo-service'
import { Nacos } from '@apache/dubbo-registry'
import { DubboService } from 'apache-dubbo-service'
import { Nacos } from 'apache-dubbo-registry'
import services from './service'

// start
@@ -15,8 +15,8 @@
* limitations under the License.
*/

import { DubboService } from '@apache/dubbo-service'
import { Zk } from '@apache/dubbo-registry'
import { DubboService } from 'apache-dubbo-service'
import { Zk } from 'apache-dubbo-registry'
import services from './service'

// start
@@ -15,8 +15,8 @@
* limitations under the License.
*/

import { Dubbo, dubboSetting } from '@apache/dubbo-consumer'
import { Zk } from '@apache/dubbo-registry'
import { Dubbo, dubboSetting } from 'apache-dubbo-consumer'
import { Zk } from 'apache-dubbo-registry'
import * as services from './service'

/**
@@ -15,7 +15,7 @@
* limitations under the License.
*/

import { Dubbo, java, TDubboCallResult } from '@apache/dubbo-consumer'
import { Dubbo, java, TDubboCallResult } from 'apache-dubbo-consumer'

//=====================types===========================
export interface IUserResponse {
@@ -1,5 +1,5 @@
{
"name": "@apache/dubbo-consumer",
"name": "apache-dubbo-consumer",
"version": "4.0.0",
"main": "./lib/index.js",
"types": "./lib/typings/index.d.ts",
@@ -24,8 +24,8 @@
"ip": "1.1.5",
"js-to-java": "2.4.0",
"koa-compose": "4.0.0",
"@apache/dubbo-common": "0.0.1",
"@apache/dubbo-serialization": "0.0.1",
"@apache/dubbo-registry": "0.0.1"
"apache-dubbo-common": "^0.0.1",
"apache-dubbo-serialization": "^0.0.2",
"apache-dubbo-registry": "^0.0.2"
}
}
@@ -18,7 +18,7 @@
import debug from 'debug'
import cfg from './config'
import { id } from './request-id'
import { util } from '@apache/dubbo-common'
import { util } from 'apache-dubbo-common'
import { DubboInvokeTimeout } from './err'
import { IContextRequestParam, IDubboResult, IHessianType } from './types'

@@ -16,7 +16,7 @@
*/

import debug from 'debug'
import { util } from '@apache/dubbo-common'
import { util } from 'apache-dubbo-common'
import DubboTcpTransport from './dubbo-tcp-transport'
import select from './select'
import {
@@ -16,7 +16,7 @@
*/

import debug from 'debug'
import { go } from '@apache/dubbo-common'
import { go } from 'apache-dubbo-common'
import Context from './context'
import { STATUS } from './dubbo-status'
import DubboTcpTransport from './dubbo-tcp-transport'
@@ -15,7 +15,7 @@
* limitations under the License.
*/

import { util } from '@apache/dubbo-common'
import { util } from 'apache-dubbo-common'
import {
IDubboSetting,
TDubboInterface,
@@ -17,13 +17,13 @@

import net from 'net'
import debug from 'debug'
import { util, Retry } from '@apache/dubbo-common'
import { util, Retry } from 'apache-dubbo-common'
import {
DecodeBuffer,
decodeDubboResponse,
DubboRequestEncoder,
HeartBeat
} from '@apache/dubbo-serialization'
} from 'apache-dubbo-serialization'
import Context from './context'
import { STATUS } from './dubbo-status'
import { IDubboObservable, IDubboTransportSubscriber } from './types'
@@ -20,7 +20,7 @@ import compose from 'koa-compose'
import Queue from './queue'
import config from './config'
import Context from './context'
import { go, util } from '@apache/dubbo-common'
import { go, util } from 'apache-dubbo-common'
import Scheduler from './scheduler'
import qs from 'querystring'
import ip from 'ip'
@@ -24,7 +24,7 @@ import {
TQueueObserver,
TRequestId
} from './types'
import { util } from '@apache/dubbo-common'
import { util } from 'apache-dubbo-common'

const { noop } = util
const log = debug('dubbo:queue')
@@ -76,7 +76,7 @@ export default class Queue implements IDubboObservable<TQueueObserver> {
log(`add queue,requestId#${requestId}, interface: ${dubboInterface}`)
this.queue.set(requestId, ctx)

// set max timout
// set max timeout
ctx.setMaxTimeout(() => {
// delete this context
this.queue.delete(ctx.requestId)
@@ -18,12 +18,12 @@
import debug from 'debug'
import DubboCluster from './dubbo-cluster'
import Queue from './queue'
import { IRegistry } from '@apache/dubbo-registry'
import { IRegistry } from 'apache-dubbo-registry'
import Context from './context'
import DubboUrl from './dubbo-url'
import { DubboScheduleError } from './err'
import DubboTcpTransport from './dubbo-tcp-transport'
import { DEFAULT_DUBBO_PROTOCOL_VERSION } from '@apache/dubbo-serialization'
import { DEFAULT_DUBBO_PROTOCOL_VERSION } from 'apache-dubbo-serialization'
import {
Host,
HostName,
@@ -15,7 +15,7 @@
* limitations under the License.
*/

import { IRegistry } from '@apache/dubbo-registry'
import { IRegistry } from 'apache-dubbo-registry'
import DubboTcpTransport from './dubbo-tcp-transport'
import { DubboSetting } from './dubbo-setting'

@@ -1,5 +1,5 @@
{
"name": "@apache/dubbo-monitor",
"name": "apache-dubbo-monitor",
"version": "0.0.1",
"main": "./lib/index.js",
"types": "./lib/typings/index.d.ts",
@@ -1,6 +1,6 @@
{
"name": "@apache/dubbo-registry",
"version": "0.0.1",
"name": "apache-dubbo-registry",
"version": "0.0.2",
"main": "./lib/index.js",
"types": "./lib/typings/index.d.ts",
"license": "Apache Licence 2.0",
@@ -19,7 +19,7 @@
},
"dependencies": {
"ip": "1.1.5",
"@apache/dubbo-common": "0.0.1",
"apache-dubbo-common": "0.0.1",
"nacos": "2.1.1",
"zookeeper": "^4.10.0"
}
@@ -20,7 +20,7 @@ import BaseRegistry from './registry-base'
import { IRegistry } from './registry'
import { INaocsClientProps, TDubboInterface, TDubboUrl } from './types'
import qs from 'querystring'
import { util } from '@apache/dubbo-common'
import { util } from 'apache-dubbo-common'

// log
const dlog = debug('dubbo:nacos~')
@@ -29,8 +29,7 @@ const NacosNamingClient = require('nacos').NacosNamingClient
// nacos debug
export class NacosRegistry
extends BaseRegistry
implements IRegistry<typeof NacosNamingClient>
{
implements IRegistry<typeof NacosNamingClient> {
// nacos props
private nacosProps: INaocsClientProps
private client: typeof NacosNamingClient
@@ -1,6 +1,6 @@
{
"name": "@apache/dubbo-serialization",
"version": "0.0.1",
"name": "apache-dubbo-serialization",
"version": "0.0.2",
"main": "./lib/index.js",
"types": "./lib/typings/index.d.ts",
"license": "Apache Licence 2.0",
@@ -18,6 +18,6 @@
"url": "https://github.com/apache/dubbo-js"
},
"dependencies": {
"@apache/dubbo-common": "0.0.1"
"apache-dubbo-common": "0.0.1"
}
}
@@ -16,7 +16,7 @@
*/

import debug from 'debug'
import { byte, util } from '@apache/dubbo-common'
import { byte, util } from 'apache-dubbo-common'
import { IObservable, TDecodeBuffSubscriber } from './types'
import {
DUBBO_HEADER_LENGTH,
@@ -17,7 +17,7 @@

import debug from 'debug'
import Hessian from 'hessian.js'
import { byte } from '@apache/dubbo-common'
import { byte } from 'apache-dubbo-common'
import { DubboDecodeError, DubboServiceError } from './err'
import { IDubboResponse } from './types'
import {
@@ -30,9 +30,8 @@ import {
} from './constants'
import Request from './request'

const reqLog = debug('dubbo:decodeDubboRequest');
const reqLog = debug('dubbo:decodeDubboRequest')
export function decodeDubboRequest(buff: Buffer): Request {

const flag = buff[2]
// get requestId
const requestId = byte.fromBytes8(buff.slice(4, 12))
@@ -82,7 +81,6 @@ export function decodeDubboRequest(buff: Buffer): Request {
const resLog = debug('dubbo:decodeDubboResponse')
//com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.encodeResponse/decode
export function decodeDubboResponse<T>(bytes: Buffer): IDubboResponse<T> {

let res = null
let err = null
let attachments = {}
@@ -17,7 +17,7 @@

import debug from 'debug'
import Hessian from 'hessian.js'
import { byte, util } from '@apache/dubbo-common'
import { byte, util } from 'apache-dubbo-common'
import { DubboEncodeError } from './err'
import {
DUBBO_MAGIC_HEADER,
@@ -18,7 +18,7 @@
import debug from 'debug'
import { Socket } from 'net'
import Hessian from 'hessian.js'
import { util } from '@apache/dubbo-common'
import { util } from 'apache-dubbo-common'
import {
DUBBO_FLAG_REQUEST,
DUBBO_FLAG_TWOWAY,
@@ -1,5 +1,5 @@
{
"name": "@apache/dubbo-service",
"name": "apache-dubbo-service",
"version": "0.0.1",
"main": "./lib/index.js",
"types": "./lib/typings/index.d.ts",
@@ -19,8 +19,8 @@
},
"dependencies": {
"ip": "^1.1.5",
"@apache/dubbo-serialization": "0.0.1",
"@apache/dubbo-common": "0.0.1",
"apache-dubbo-serialization": "^0.0.2",
"apache-dubbo-common": "^0.0.1",
"get-port": "^5.1.1"
}
}
@@ -15,7 +15,7 @@
* limitations under the License.
*/

import { Request, DUBBO_RESPONSE_STATUS } from '@apache/dubbo-serialization'
import { Request, DUBBO_RESPONSE_STATUS } from 'apache-dubbo-serialization'

export default class Context<T = any> {
private readonly req: Request
@@ -20,15 +20,15 @@ import ip from 'ip'
import debug from 'debug'
import qs from 'querystring'
import compose, { Middleware } from 'koa-compose'
import { Retry, util } from '@apache/dubbo-common'
import { Retry, util } from 'apache-dubbo-common'
import {
DecodeBuffer,
decodeDubboRequest,
DUBBO_RESPONSE_STATUS,
DubboResponseEncoder,
HeartBeat,
Request
} from '@apache/dubbo-serialization'
} from 'apache-dubbo-serialization'
import Context from './context'
import { randomPort } from './port'
import { DubboSetting } from './dubbo-setting'
@@ -15,7 +15,7 @@
* limitations under the License.
*/

import { util } from '@apache/dubbo-common'
import { util } from 'apache-dubbo-common'
import {
IDubboServiceSetting,
TDubboServiceInterface,
@@ -1,6 +1,6 @@
{
"private": true,
"name": "@apache/dubbo-tedst",
"name": "apache-dubbo-test",
"version": "0.0.1",
"main": "./lib/index.js",
"types": "./lib/typings/index.d.ts",
@@ -19,7 +19,7 @@
"url": "https://github.com/apache/dubbo-js"
},
"dependencies": {
"@apache/dubbo-consumer": "*",
"@apache/dubbo-service": "*"
"apache-dubbo-consumer": "*",
"apache-dubbo-service": "*"
}
}
@@ -15,9 +15,9 @@
* limitations under the License.
*/

import { Zk } from '@apache/dubbo-registry'
import { DubboDirectlyInvoker, java } from '@apache/dubbo-consumer'
import { DubboService } from '@apache/dubbo-service'
import { Zk } from 'apache-dubbo-registry'
import { DubboDirectlyInvoker, java } from 'apache-dubbo-consumer'
import { DubboService } from 'apache-dubbo-service'
import consumer from '../providers/org/apache/dubbo/demo/consumer'
import provider from '../providers/org/apache/dubbo/demo/provider'
import { UserRequest } from '../providers/org/apache/dubbo/demo/UserRequest'

0 comments on commit ce18617

Please sign in to comment.