@microbt/environment 1.2.5 → 1.2.6

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.
@@ -1,7 +1,11 @@
1
1
  // src/gateway/factory.ts
2
2
  import {
3
+ CinmooreCnURLStrategy,
4
+ CinmooreComURLStrategy,
5
+ FronAiURLStrategy,
3
6
  Safio365URLStrategy,
4
7
  SensforgeURLStrategy,
8
+ SuperAcmeGlobalURLStrategy,
5
9
  SuperAcmeURLStrategy
6
10
  } from "./strategies/index";
7
11
  var _URLStrategyFactory = class {
@@ -19,6 +23,10 @@ URLStrategyFactory.strategies = /* @__PURE__ */ new Map();
19
23
  _URLStrategyFactory.strategies.set("superacme.com", new SuperAcmeURLStrategy());
20
24
  _URLStrategyFactory.strategies.set("sensforge.com", new SensforgeURLStrategy());
21
25
  _URLStrategyFactory.strategies.set("safio365.com", new Safio365URLStrategy());
26
+ _URLStrategyFactory.strategies.set("cinmoore.cn", new CinmooreCnURLStrategy());
27
+ _URLStrategyFactory.strategies.set("cinmoore.com", new CinmooreComURLStrategy());
28
+ _URLStrategyFactory.strategies.set("fronai.cn", new FronAiURLStrategy());
29
+ _URLStrategyFactory.strategies.set("superacmeglobal.com", new SuperAcmeGlobalURLStrategy());
22
30
  })();
23
31
  export {
24
32
  URLStrategyFactory
@@ -0,0 +1,4 @@
1
+ export declare class CinmooreCnURLStrategy implements URLStrategy {
2
+ features: DomainFeatures;
3
+ generateURL({ name, env, path }: URLStrategyConfig): string;
4
+ }
@@ -0,0 +1,19 @@
1
+ // src/gateway/strategies/cinmoore.cn.ts
2
+ var CinmooreCnURLStrategy = class {
3
+ constructor() {
4
+ this.features = {
5
+ supportEnv: true,
6
+ supportRegion: false,
7
+ supportAWS: false
8
+ };
9
+ }
10
+ generateURL({ name, env = "prod", path = "" }) {
11
+ if (env === "prod" || !env) {
12
+ return `//${name}.cinmoore.cn${path}`;
13
+ }
14
+ return `//${name}-${env}.cinmoore.cn${path}`;
15
+ }
16
+ };
17
+ export {
18
+ CinmooreCnURLStrategy
19
+ };
@@ -0,0 +1,4 @@
1
+ export declare class CinmooreComURLStrategy implements URLStrategy {
2
+ features: DomainFeatures;
3
+ generateURL({ name, env, path }: URLStrategyConfig): string;
4
+ }
@@ -0,0 +1,19 @@
1
+ // src/gateway/strategies/cinmoore.com.ts
2
+ var CinmooreComURLStrategy = class {
3
+ constructor() {
4
+ this.features = {
5
+ supportEnv: true,
6
+ supportRegion: false,
7
+ supportAWS: false
8
+ };
9
+ }
10
+ generateURL({ name, env = "prod", path = "" }) {
11
+ if (env === "prod" || !env) {
12
+ return `//${name}.cinmoore.com${path}`;
13
+ }
14
+ return `//${name}-${env}.cinmoore.com${path}`;
15
+ }
16
+ };
17
+ export {
18
+ CinmooreComURLStrategy
19
+ };
@@ -0,0 +1,4 @@
1
+ export declare class FronAiURLStrategy implements URLStrategy {
2
+ features: DomainFeatures;
3
+ generateURL({ name, env, path }: URLStrategyConfig): string;
4
+ }
@@ -0,0 +1,19 @@
1
+ // src/gateway/strategies/fronai.cn.ts
2
+ var FronAiURLStrategy = class {
3
+ constructor() {
4
+ this.features = {
5
+ supportEnv: true,
6
+ supportRegion: false,
7
+ supportAWS: false
8
+ };
9
+ }
10
+ generateURL({ name, env = "prod", path = "" }) {
11
+ if (env === "prod" || !env) {
12
+ return `//${name}.fronai.cn${path}`;
13
+ }
14
+ return `//${name}-${env}.fronai.cn${path}`;
15
+ }
16
+ };
17
+ export {
18
+ FronAiURLStrategy
19
+ };
@@ -1,3 +1,7 @@
1
+ export * from './cinmoore.cn';
2
+ export * from './cinmoore.com';
3
+ export * from './fronai.cn';
1
4
  export * from './safio365';
2
5
  export * from './sensforge';
3
6
  export * from './superacme';
7
+ export * from './superacmeglobal';
@@ -1,4 +1,8 @@
1
1
  // src/gateway/strategies/index.ts
2
+ export * from "./cinmoore.cn";
3
+ export * from "./cinmoore.com";
4
+ export * from "./fronai.cn";
2
5
  export * from "./safio365";
3
6
  export * from "./sensforge";
4
7
  export * from "./superacme";
8
+ export * from "./superacmeglobal";
@@ -0,0 +1,4 @@
1
+ export declare class SuperAcmeGlobalURLStrategy implements URLStrategy {
2
+ features: DomainFeatures;
3
+ generateURL({ name, env, path }: URLStrategyConfig): string;
4
+ }
@@ -0,0 +1,19 @@
1
+ // src/gateway/strategies/superacmeglobal.ts
2
+ var SuperAcmeGlobalURLStrategy = class {
3
+ constructor() {
4
+ this.features = {
5
+ supportEnv: true,
6
+ supportRegion: false,
7
+ supportAWS: false
8
+ };
9
+ }
10
+ generateURL({ name, env = "prod", path = "" }) {
11
+ if (env === "prod" || !env) {
12
+ return `//${name}.superacmeglobal.com${path}`;
13
+ }
14
+ return `//${name}-${env}.superacmeglobal.com${path}`;
15
+ }
16
+ };
17
+ export {
18
+ SuperAcmeGlobalURLStrategy
19
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microbt/environment",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "microbt app library for environment",
5
5
  "keywords": [],
6
6
  "license": "MIT",