@smartcrab/tenant-context 0.2.0 → 0.2.1-next-20261009080213

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartcrab/tenant-context",
3
- "version": "0.2.0",
3
+ "version": "0.2.1-next-20261009080213",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -12,7 +12,6 @@ import {
12
12
  parseDatabaseKey,
13
13
  platformDatabaseKeySchema,
14
14
  } from "./database-keys.js";
15
- import type { DatabaseKey } from "./database-keys.js";
16
15
 
17
16
  describe("database key schemas", () => {
18
17
  test("accepts control keys within the provisioned range 00-31", () => {
@@ -153,39 +152,6 @@ describe("bindingNameToKey", () => {
153
152
  });
154
153
 
155
154
  describe("key/binding round trips", () => {
156
- test("key -> binding -> key is the identity for representative keys", () => {
157
- const keys: DatabaseKey[] = [
158
- controlDatabaseKeySchema.parse("control_00"),
159
- controlDatabaseKeySchema.parse("control_09"),
160
- controlDatabaseKeySchema.parse("control_31"),
161
- authDatabaseKeySchema.parse("auth_000"),
162
- authDatabaseKeySchema.parse("auth_042"),
163
- authDatabaseKeySchema.parse("auth_127"),
164
- platformDatabaseKeySchema.parse("platform"),
165
- ];
166
- for (const key of keys) {
167
- expect(bindingNameToKey(keyToBindingName(key))).toBe(key);
168
- }
169
- });
170
-
171
- test("binding -> key -> binding is the identity for representative bindings", () => {
172
- for (const name of [
173
- "CONTROL_DB_00",
174
- "CONTROL_DB_03",
175
- "CONTROL_DB_31",
176
- "AUTH_DB_000",
177
- "AUTH_DB_007",
178
- "AUTH_DB_127",
179
- "PLATFORM_DB",
180
- ]) {
181
- const key = bindingNameToKey(name);
182
- expect(key).not.toBeNull();
183
- if (key !== null) {
184
- expect(keyToBindingName(key)).toBe(name);
185
- }
186
- }
187
- });
188
-
189
155
  test("exhaustive round trip over the whole provisioned shard space", () => {
190
156
  for (let i = 0; i <= 31; i += 1) {
191
157
  const suffix = i.toString().padStart(2, "0");
@@ -36,12 +36,6 @@ describe("buildDefaultInteractionDomain", () => {
36
36
  expect(host).toBe(`env-${"d".repeat(32)}.login.${ROOT}`);
37
37
  expect(host).not.toContain("_");
38
38
  });
39
-
40
- test("round-trips through parseEnvironmentIdFromLoginHost", () => {
41
- expect(parseEnvironmentIdFromLoginHost(buildDefaultInteractionDomain(ENV_ID, ROOT), ROOT)).toBe(
42
- ENV_ID,
43
- );
44
- });
45
39
  });
46
40
 
47
41
  describe("loginHostLabel / environmentIdFromLoginHostLabel", () => {