Skip to content

Commit

Permalink
Change npm namespace to @envyjs (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonrobot authored Sep 20, 2023
1 parent 6f5a479 commit 658fbeb
Show file tree
Hide file tree
Showing 40 changed files with 74 additions and 74 deletions.
10 changes: 5 additions & 5 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [
"@envy/example-apollo",
"@envy/example-apollo-client",
"@envy/example-express",
"@envy/example-express-client",
"@envy/example-next"
"@envyjs/example-apollo",
"@envyjs/example-apollo-client",
"@envyjs/example-express",
"@envyjs/example-express-client",
"@envyjs/example-next"
]
}
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

```sh
# npm
$ npm i --save-dev @envy/webui
$ npm i --save-dev @envyjs/webui
# or yarn
$ yarn add --dev @envy/webui
$ yarn add --dev @envyjs/webui
```

### 2. Install a telemetry package for your application
Expand All @@ -39,57 +39,57 @@ $ yarn add --dev @envy/webui
Run the browser in a seperate terminal session

```
npx @envy/webui
npx @envyjs/webui
```

or optionally, add it to your NPM scripts using a tool like [concurrently](https://www.npmjs.com/package/concurrently)

```json
"scripts": {
"start": "<your application start command>",
"start:withenvy": "concurrently \"npx @envy/webui\" \"npm start\""
"start:withenvy": "concurrently \"npx @envyjs/webui\" \"npm start\""
},
```

## Available Telemetry Packages

### Node.js Application

Install the `@envy/node` sender package in your node application:
Install the `@envyjs/node` sender package in your node application:

```sh
# npm
$ npm i --save-dev @envy/node
$ npm i --save-dev @envyjs/node
# or yarn
$ yarn add --dev @envy/node
$ yarn add --dev @envyjs/node
```

Import and invoke the `enableTracing` function to the root of your app before any other code.

```ts
import { enableTracing } from '@envy/node';
import { enableTracing } from '@envyjs/node';
enableTracing({ serviceName: 'your-node-app-name' });

// ... your app code
```

### Web Client Application

Install the `@envy/web` sender package in your website:
Install the `@envyjs/web` sender package in your website:

```sh
# npm
$ npm i --save-dev @envy/web
$ npm i --save-dev @envyjs/web
# or yarn
$ yarn add --dev @envy/web
$ yarn add --dev @envyjs/web
```

Import the `enableTracing` function to the root of your app, and invoke it before mounting your application.

For example, in a simple React application:

```ts
import { enableTracing } from '@envy/web';
import { enableTracing } from '@envyjs/web';
import { createRoot } from 'react-dom/client';

import { App } from './App';
Expand Down
4 changes: 2 additions & 2 deletions examples/apollo-client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@envy/example-apollo-client",
"name": "@envyjs/example-apollo-client",
"version": "1.0.0",
"description": "Example website connected to apollo server application using Envy",
"license": "MIT",
Expand All @@ -8,7 +8,7 @@
"start": "parcel ./src/index.html --port 4001 --no-cache"
},
"dependencies": {
"@envy/web": "*",
"@envyjs/web": "*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"urql": "^4.0.5"
Expand Down
2 changes: 1 addition & 1 deletion examples/apollo-client/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { enableTracing } from '@envy/web';
import { enableTracing } from '@envyjs/web';
import { createRoot } from 'react-dom/client';

import { App } from './App';
Expand Down
6 changes: 3 additions & 3 deletions examples/apollo/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@envy/example-apollo",
"name": "@envyjs/example-apollo",
"version": "1.0.0",
"description": "Example Apollo server application using Envy",
"license": "MIT",
Expand All @@ -9,8 +9,8 @@
},
"dependencies": {
"@apollo/server": "^4.9.3",
"@envy/webui": "*",
"@envy/node": "*",
"@envyjs/webui": "*",
"@envyjs/node": "*",
"@sanity/client": "^4.0.1",
"apollo-utilities": "^1.3.4",
"graphql": "^16.8.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/apollo/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// eslint-disable-next-line import/order
import { enableTracing } from '@envy/node';
import { enableTracing } from '@envyjs/node';
enableTracing({ serviceName: 'examples/apollo' });

import { ApolloServer } from '@apollo/server';
Expand Down
2 changes: 1 addition & 1 deletion examples/express-client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@envy/example-express-client",
"name": "@envyjs/example-express-client",
"version": "1.0.0",
"private": true,
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion examples/express/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// eslint-disable-next-line import/order
import { enableTracing } from '@envy/node';
import { enableTracing } from '@envyjs/node';
enableTracing({ debug: true, serviceName: 'examples/express' });
import express from 'express';
import fetch from 'node-fetch';
Expand Down
4 changes: 2 additions & 2 deletions examples/express/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@envy/example-express",
"name": "@envyjs/example-express",
"version": "1.0.0",
"private": true,
"scripts": {
Expand All @@ -8,7 +8,7 @@
"license": "MIT",
"dependencies": {
"express": "^4.18.2",
"@envy/node": "*"
"@envyjs/node": "*"
},
"devDependencies": {
"@types/express": "^4.17.17",
Expand Down
2 changes: 1 addition & 1 deletion examples/next/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@envy/example-next",
"name": "@envyjs/example-next",
"private": true,
"version": "1.0.0",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @envy/apollo
# @envyjs/apollo

## 0.1.1

Expand All @@ -7,4 +7,4 @@
- ba5e2b9: Add changesets release management
- Updated dependencies [111807a]
- Updated dependencies [ba5e2b9]
- @envy/node@0.2.0
- @envyjs/node@0.2.0
4 changes: 2 additions & 2 deletions packages/apollo/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@envy/apollo",
"name": "@envyjs/apollo",
"version": "0.1.1",
"description": "Node.js Network & Telemetry Viewer",
"main": "dist/index.js",
Expand All @@ -10,6 +10,6 @@
"build": "tsc"
},
"dependencies": {
"@envy/node": "0.2.0"
"@envyjs/node": "0.2.0"
}
}
4 changes: 2 additions & 2 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @envy/client
# @envyjs/client

## 0.1.1

Expand All @@ -7,4 +7,4 @@
- ba5e2b9: Add changesets release management
- Updated dependencies [111807a]
- Updated dependencies [ba5e2b9]
- @envy/core@0.2.0
- @envyjs/core@0.2.0
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@envy/client",
"name": "@envyjs/client",
"version": "0.1.1",
"description": "Node.js Network & Telemetry Viewer",
"main": "dist/index.js",
Expand All @@ -10,6 +10,6 @@
"build": "tsc"
},
"dependencies": {
"@envy/core": "0.2.0"
"@envyjs/core": "0.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @envy/core
# @envyjs/core

## 0.2.0

Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@envy/core",
"name": "@envyjs/core",
"version": "0.2.0",
"description": "Node.js Network & Telemetry Viewer",
"main": "dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/nextjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @envy/nextjs
# @envyjs/nextjs

## 0.1.1

Expand All @@ -7,4 +7,4 @@
- ba5e2b9: Add changesets release management
- Updated dependencies [111807a]
- Updated dependencies [ba5e2b9]
- @envy/node@0.2.0
- @envyjs/node@0.2.0
4 changes: 2 additions & 2 deletions packages/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@envy/nextjs",
"name": "@envyjs/nextjs",
"version": "0.1.1",
"description": "Node.js Network & Telemetry Viewer",
"main": "dist/index.js",
Expand All @@ -10,6 +10,6 @@
"build": "tsc"
},
"dependencies": {
"@envy/node": "0.2.0"
"@envyjs/node": "0.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/nextjs/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TracingOptions, enableTracing as nodeTracing } from '@envy/node';
import { TracingOptions, enableTracing as nodeTracing } from '@envyjs/node';

import { Routes } from './route';

Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/src/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Plugin } from '@envy/core';
import { Plugin } from '@envyjs/core';

export const Routes: Plugin = () => {
// intentionally blank
Expand Down
4 changes: 2 additions & 2 deletions packages/node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @envy/node
# @envyjs/node

## 0.2.0

Expand All @@ -11,4 +11,4 @@
- ba5e2b9: Add changesets release management
- Updated dependencies [111807a]
- Updated dependencies [ba5e2b9]
- @envy/core@0.2.0
- @envyjs/core@0.2.0
2 changes: 1 addition & 1 deletion packages/node/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @envy/node
# @envyjs/node

Node.js Integration Package

Expand Down
4 changes: 2 additions & 2 deletions packages/node/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@envy/node",
"name": "@envyjs/node",
"version": "0.2.0",
"description": "Node.js Network & Telemetry Viewer",
"main": "dist/index.js",
Expand All @@ -11,7 +11,7 @@
"test:live": "ts-node ./src/test.ts"
},
"dependencies": {
"@envy/core": "0.2.0",
"@envyjs/core": "0.2.0",
"chalk": "^4.1.2",
"shimmer": "^1.2.1",
"ws": "8.14.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DEFAULT_WEB_SOCKET_PORT, Options } from '@envy/core';
import { DEFAULT_WEB_SOCKET_PORT, Options } from '@envyjs/core';
import WebSocket from 'ws';

import log from './log';
Expand Down
4 changes: 2 additions & 2 deletions packages/node/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import http from 'http';
import https from 'https';
import { types as utilTypes } from 'util';

import { Event, HttpRequest } from '@envy/core';
import { Event, HttpRequest } from '@envyjs/core';
import { wrap } from 'shimmer';

// eslint thinks zlib is node20:builtin, but this is a node module
Expand All @@ -11,7 +11,7 @@ import { createBrotliDecompress, unzip } from 'zlib';

import { generateId } from './id';
import log from './log';
import { Plugin } from '@envy/core';
import { Plugin } from '@envyjs/core';

// ESM handling of wrapping
const _wrap: typeof wrap = (moduleExports, name, wrapper) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/id.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { webcrypto } from 'node:crypto';

import { nanoid } from '@envy/core';
import { nanoid } from '@envyjs/core';

export const generateId = nanoid(webcrypto as any);
2 changes: 1 addition & 1 deletion packages/node/src/tracing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Exporter, Meta, Middleware, Options, Plugin, Sanity } from '@envy/core';
import { Exporter, Meta, Middleware, Options, Plugin, Sanity } from '@envyjs/core';

import { WebSocketClient } from './client';
import { Http } from './http';
Expand Down
4 changes: 2 additions & 2 deletions packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@envy/web",
"name": "@envyjs/web",
"version": "0.1.0",
"description": "Node.js Network & Telemetry Viewer",
"main": "dist/index.js",
Expand All @@ -10,6 +10,6 @@
"build": "tsc"
},
"dependencies": {
"@envy/core": "0.2.0"
"@envyjs/core": "0.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/web/src/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DEFAULT_WEB_SOCKET_PORT, Event, Options } from '@envy/core';
import { DEFAULT_WEB_SOCKET_PORT, Event, Options } from '@envyjs/core';

import log from './log';

Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/http.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Event, HttpRequest, Plugin } from '@envy/core';
import { Event, HttpRequest, Plugin } from '@envyjs/core';

import { generateId } from './id';

Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/id.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { nanoid } from '@envy/core';
import { nanoid } from '@envyjs/core';

export const generateId = nanoid(crypto);
Loading

0 comments on commit 658fbeb

Please sign in to comment.