@jskit-ai/workspaces-core 0.1.25 → 0.1.26

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,7 @@
1
1
  export default Object.freeze({
2
2
  packageVersion: 1,
3
3
  packageId: "@jskit-ai/workspaces-core",
4
- version: "0.1.25",
4
+ version: "0.1.26",
5
5
  kind: "runtime",
6
6
  description: "Workspace tenancy runtime plus HTTP routes, role catalog, and workspace config scaffolding.",
7
7
  dependsOn: [
@@ -112,7 +112,7 @@ export default Object.freeze({
112
112
  mutations: {
113
113
  dependencies: {
114
114
  runtime: {
115
- "@jskit-ai/users-core": "0.1.59"
115
+ "@jskit-ai/users-core": "0.1.60"
116
116
  },
117
117
  dev: {}
118
118
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/workspaces-core",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test"
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@fastify/type-provider-typebox": "^6.1.0",
21
- "@jskit-ai/auth-core": "0.1.48",
22
- "@jskit-ai/database-runtime": "0.1.49",
23
- "@jskit-ai/http-runtime": "0.1.48",
24
- "@jskit-ai/kernel": "0.1.49",
25
- "@jskit-ai/users-core": "0.1.59",
21
+ "@jskit-ai/auth-core": "0.1.49",
22
+ "@jskit-ai/database-runtime": "0.1.50",
23
+ "@jskit-ai/http-runtime": "0.1.49",
24
+ "@jskit-ai/kernel": "0.1.50",
25
+ "@jskit-ai/users-core": "0.1.60",
26
26
  "typebox": "^1.0.81"
27
27
  }
28
28
  }
@@ -12,7 +12,7 @@ const REPOSITORY_CONFIG = Object.freeze({
12
12
  context: "internal.repository.workspace-invites"
13
13
  });
14
14
 
15
- function normalizeInviteRecord(payload = {}) {
15
+ function normalizeInviteRecord(payload) {
16
16
  if (!payload) {
17
17
  return null;
18
18
  }
@@ -13,7 +13,7 @@ const REPOSITORY_CONFIG = Object.freeze({
13
13
  context: "internal.repository.workspace-memberships"
14
14
  });
15
15
 
16
- function normalizeMembershipRecord(payload = {}) {
16
+ function normalizeMembershipRecord(payload) {
17
17
  if (!payload) {
18
18
  return null;
19
19
  }
@@ -11,7 +11,7 @@ const REPOSITORY_CONFIG = Object.freeze({
11
11
  context: "internal.repository.workspaces"
12
12
  });
13
13
 
14
- function normalizeWorkspaceRecord(payload = {}) {
14
+ function normalizeWorkspaceRecord(payload) {
15
15
  if (!payload) {
16
16
  return null;
17
17
  }
@@ -142,6 +142,15 @@ test("workspacesRepository.findById normalizes internal workspace fields via the
142
142
  });
143
143
  });
144
144
 
145
+ test("workspacesRepository.findPersonalByOwnerUserId returns null when no personal workspace exists", async () => {
146
+ const { knex } = createWorkspacesKnexStub();
147
+ const repository = createRepository(knex);
148
+
149
+ const workspace = await repository.findPersonalByOwnerUserId("999");
150
+
151
+ assert.equal(workspace, null);
152
+ });
153
+
145
154
  test("workspacesRepository.insert uses runtime normalization and timestamp columns", async () => {
146
155
  const insertedRow = {
147
156
  id: 1,