@proteinjs/server-api 1.5.4 → 2.0.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
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.0.0](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.5.4...@proteinjs/server-api@2.0.0) (2025-08-13)
7
+
8
+
9
+ * feat!: Moved `FeatureFlag` into `@proteinjs/feature-flag-*` packages. ([d778c19](https://github.com/brentbahry/server/commit/d778c1917e978572ed64e20a7d757970ba80ca1b))
10
+
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ * Removed legacy `FeatureFlag` API.
15
+
16
+
17
+
18
+
19
+
6
20
  # [1.5.0](https://github.com/brentbahry/server/compare/@proteinjs/server-api@1.4.3...@proteinjs/server-api@1.5.0) (2024-08-26)
7
21
 
8
22
 
package/dist/index.d.ts CHANGED
@@ -8,7 +8,6 @@ export * from './src/session/SessionDataCache';
8
8
  export * from './src/cacheKeys';
9
9
  export * from './src/EnvInfo';
10
10
  export * from './src/EnvRepo';
11
- export * from './src/FeatureFlag';
12
11
  export * from './src/ServerRenderedScript';
13
12
  export * from './src/StartupTask';
14
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACjF,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACjF,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -27,7 +27,6 @@ __exportStar(require("./src/session/SessionDataCache"), exports);
27
27
  __exportStar(require("./src/cacheKeys"), exports);
28
28
  __exportStar(require("./src/EnvInfo"), exports);
29
29
  __exportStar(require("./src/EnvRepo"), exports);
30
- __exportStar(require("./src/FeatureFlag"), exports);
31
30
  __exportStar(require("./src/ServerRenderedScript"), exports);
32
31
  __exportStar(require("./src/StartupTask"), exports);
33
32
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,8CAA4B;AAC5B,wDAAsC;AACtC,8CAA4E;AAAnE,gGAAA,MAAM,OAAA;AACf,+DAA6C;AAC7C,iDAAiF;AAAxE,kGAAA,OAAO,OAAA;AAChB,iEAA+C;AAC/C,kDAAgC;AAChC,gDAA8B;AAC9B,gDAA8B;AAC9B,oDAAkC;AAClC,6DAA2C;AAC3C,oDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,8CAA4B;AAC5B,wDAAsC;AACtC,8CAA4E;AAAnE,gGAAA,MAAM,OAAA;AACf,+DAA6C;AAC7C,iDAAiF;AAAxE,kGAAA,OAAO,OAAA;AAChB,iEAA+C;AAC/C,kDAAgC;AAChC,gDAA8B;AAC9B,gDAA8B;AAC9B,6DAA2C;AAC3C,oDAAkC"}
package/index.ts CHANGED
@@ -8,6 +8,5 @@ export * from './src/session/SessionDataCache';
8
8
  export * from './src/cacheKeys';
9
9
  export * from './src/EnvInfo';
10
10
  export * from './src/EnvRepo';
11
- export * from './src/FeatureFlag';
12
11
  export * from './src/ServerRenderedScript';
13
12
  export * from './src/StartupTask';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proteinjs/server-api",
3
- "version": "1.5.4",
3
+ "version": "2.0.1",
4
4
  "description": "Server apis only (server implementation in @proteinjs/server)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,7 +24,7 @@
24
24
  "@proteinjs/reflection": "1.1.10"
25
25
  },
26
26
  "devDependencies": {
27
- "@proteinjs/reflection-build": "1.2.0",
27
+ "@proteinjs/reflection-build": "1.2.1",
28
28
  "@types/body-parser": "1.19.0",
29
29
  "@types/compression": "1.7.0",
30
30
  "@types/cookie-parser": "1.4.2",
@@ -1,8 +0,0 @@
1
- export declare abstract class FeatureFlag {
2
- protected featureName: string;
3
- protected isEnabled: boolean;
4
- constructor(featureName: string, isEnabled: boolean);
5
- getFeatureFlag(): Promise<boolean>;
6
- setFeatureFlag(isEnabled: boolean): Promise<void>;
7
- }
8
- //# sourceMappingURL=FeatureFlag.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FeatureFlag.d.ts","sourceRoot":"","sources":["../../src/FeatureFlag.ts"],"names":[],"mappings":"AAAA,8BAAsB,WAAW;IAC/B,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC;gBAEjB,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO;IAK7C,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAIlC,cAAc,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAIxD"}
@@ -1,63 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.FeatureFlag = void 0;
40
- var FeatureFlag = /** @class */ (function () {
41
- function FeatureFlag(featureName, isEnabled) {
42
- this.featureName = featureName;
43
- this.isEnabled = isEnabled;
44
- }
45
- FeatureFlag.prototype.getFeatureFlag = function () {
46
- return __awaiter(this, void 0, void 0, function () {
47
- return __generator(this, function (_a) {
48
- return [2 /*return*/, Promise.resolve(this.isEnabled)];
49
- });
50
- });
51
- };
52
- FeatureFlag.prototype.setFeatureFlag = function (isEnabled) {
53
- return __awaiter(this, void 0, void 0, function () {
54
- return __generator(this, function (_a) {
55
- this.isEnabled = isEnabled;
56
- return [2 /*return*/, Promise.resolve()];
57
- });
58
- });
59
- };
60
- return FeatureFlag;
61
- }());
62
- exports.FeatureFlag = FeatureFlag;
63
- //# sourceMappingURL=FeatureFlag.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FeatureFlag.js","sourceRoot":"","sources":["../../src/FeatureFlag.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;IAIE,qBAAY,WAAmB,EAAE,SAAkB;QACjD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAEK,oCAAc,GAApB;;;gBACE,sBAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAC;;;KACxC;IAEK,oCAAc,GAApB,UAAqB,SAAkB;;;gBACrC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;gBAC3B,sBAAO,OAAO,CAAC,OAAO,EAAE,EAAC;;;KAC1B;IACH,kBAAC;AAAD,CAAC,AAjBD,IAiBC;AAjBqB,kCAAW"}
@@ -1,18 +0,0 @@
1
- export abstract class FeatureFlag {
2
- protected featureName: string;
3
- protected isEnabled: boolean;
4
-
5
- constructor(featureName: string, isEnabled: boolean) {
6
- this.featureName = featureName;
7
- this.isEnabled = isEnabled;
8
- }
9
-
10
- async getFeatureFlag(): Promise<boolean> {
11
- return Promise.resolve(this.isEnabled);
12
- }
13
-
14
- async setFeatureFlag(isEnabled: boolean): Promise<void> {
15
- this.isEnabled = isEnabled;
16
- return Promise.resolve();
17
- }
18
- }