@jayfong/x-server 1.13.0 → 1.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.13.1](https://github.com/jfWorks/x-server/compare/v1.13.0...v1.13.1) (2022-04-26)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * appname -> appid ([88d14d1](https://github.com/jfWorks/x-server/commit/88d14d18078c7bc19ddf2c973e53cc0353a533de))
11
+
5
12
  ## [1.13.0](https://github.com/jfWorks/x-server/compare/v1.12.0...v1.13.0) (2022-04-26)
6
13
 
7
14
 
@@ -12,7 +12,7 @@ var _x = require("../x");
12
12
  async function defineTask(options) {
13
13
  const queue = new _bull.default(options.name, {
14
14
  redis: _x.x.redis.options,
15
- prefix: `${_x.x.appName}_task`
15
+ prefix: `${_x.x.appId}_task`
16
16
  });
17
17
  queue.process(async job => {
18
18
  return options.handle(job.data);
@@ -16,7 +16,7 @@ class CacheService {
16
16
  this.options = options;
17
17
  this.serviceName = 'cache';
18
18
  this.prefix = void 0;
19
- this.prefix = `${_x.x.appName}:`;
19
+ this.prefix = `${_x.x.appId}:`;
20
20
  }
21
21
 
22
22
  toRedisKey(key) {
package/lib/_cjs/x.js CHANGED
@@ -6,7 +6,7 @@ exports.x = void 0;
6
6
  var _dispose = require("./services/dispose");
7
7
 
8
8
  const x = {
9
- appName: process.env.APP_NAME,
9
+ appId: process.env.APP_ID,
10
10
  register: (...services) => {
11
11
  for (const service of services) {
12
12
  // @ts-ignore
@@ -3,7 +3,7 @@ import { x } from "../x";
3
3
  export async function defineTask(options) {
4
4
  const queue = new Queue(options.name, {
5
5
  redis: x.redis.options,
6
- prefix: `${x.appName}_task`
6
+ prefix: `${x.appId}_task`
7
7
  });
8
8
  queue.process(async job => {
9
9
  return options.handle(job.data);
@@ -6,7 +6,7 @@ export class CacheService {
6
6
  this.options = options;
7
7
  this.serviceName = 'cache';
8
8
  this.prefix = void 0;
9
- this.prefix = `${x.appName}:`;
9
+ this.prefix = `${x.appId}:`;
10
10
  }
11
11
 
12
12
  toRedisKey(key) {
package/lib/x.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { BaseService } from './services/base';
2
2
  import './services/dispose';
3
3
  export interface X {
4
- readonly appName: string;
4
+ readonly appId: string;
5
5
  readonly register: (...services: BaseService[]) => void;
6
6
  }
7
7
  export declare const x: X;
package/lib/x.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { DisposeService } from "./services/dispose";
2
2
  export const x = {
3
- appName: process.env.APP_NAME,
3
+ appId: process.env.APP_ID,
4
4
  register: (...services) => {
5
5
  for (const service of services) {
6
6
  // @ts-ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",