@shipfox/api-server 3.0.0 → 5.0.0

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
@@ -2,7 +2,7 @@
2
2
  "name": "@shipfox/api-server",
3
3
  "license": "MIT",
4
4
  "private": false,
5
- "version": "3.0.0",
5
+ "version": "5.0.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -12,61 +12,45 @@
12
12
  "main": "dist/index.js",
13
13
  "types": "dist/index.d.ts",
14
14
  "imports": {
15
- "#*": {
16
- "workspace-source": "./src/*",
17
- "development": "./src/*",
18
- "default": "./dist/*"
19
- }
15
+ "#*": "./dist/*"
20
16
  },
21
17
  "exports": {
22
18
  ".": {
23
- "development": {
24
- "types": "./src/index.ts",
25
- "default": "./src/index.ts"
26
- },
27
- "default": {
28
- "types": "./dist/index.d.ts",
29
- "default": "./dist/index.js"
30
- }
19
+ "types": "./dist/index.d.ts",
20
+ "default": "./dist/index.js"
31
21
  },
32
22
  "./instrumentation": {
33
- "development": {
34
- "types": "./src/instrumentation.ts",
35
- "default": "./src/instrumentation.ts"
36
- },
37
- "default": {
38
- "types": "./dist/instrumentation.d.ts",
39
- "default": "./dist/instrumentation.js"
40
- }
23
+ "types": "./dist/instrumentation.d.ts",
24
+ "default": "./dist/instrumentation.js"
41
25
  }
42
26
  },
43
27
  "dependencies": {
44
- "@shipfox/annotations": "3.0.0",
45
- "@shipfox/api-agent": "3.0.0",
46
- "@shipfox/api-auth": "3.0.0",
47
- "@shipfox/api-definitions": "3.0.0",
48
- "@shipfox/api-dispatcher": "3.0.0",
49
- "@shipfox/api-integration-core": "3.0.0",
50
- "@shipfox/api-logs": "3.0.0",
51
- "@shipfox/api-projects": "3.0.0",
52
- "@shipfox/api-runners": "3.0.0",
53
- "@shipfox/api-secrets": "3.0.0",
54
- "@shipfox/api-triggers": "3.0.0",
55
- "@shipfox/api-workflows": "3.0.0",
56
- "@shipfox/api-workspaces": "3.0.0",
57
- "@shipfox/config": "1.2.1",
58
- "@shipfox/node-error-monitoring": "0.1.2",
59
- "@shipfox/node-fastify": "0.2.2",
60
- "@shipfox/node-module": "0.3.0",
61
- "@shipfox/node-opentelemetry": "0.5.1",
62
- "@shipfox/node-postgres": "0.4.1"
28
+ "@shipfox/annotations": "5.0.0",
29
+ "@shipfox/api-agent": "5.0.0",
30
+ "@shipfox/api-auth": "5.0.0",
31
+ "@shipfox/api-definitions": "5.0.0",
32
+ "@shipfox/api-dispatcher": "5.0.0",
33
+ "@shipfox/api-integration-core": "5.0.0",
34
+ "@shipfox/api-logs": "5.0.0",
35
+ "@shipfox/api-projects": "5.0.0",
36
+ "@shipfox/api-runners": "5.0.0",
37
+ "@shipfox/api-secrets": "5.0.0",
38
+ "@shipfox/api-triggers": "5.0.0",
39
+ "@shipfox/api-workflows": "5.0.0",
40
+ "@shipfox/api-workspaces": "5.0.0",
41
+ "@shipfox/config": "1.2.2",
42
+ "@shipfox/node-error-monitoring": "0.1.3",
43
+ "@shipfox/node-fastify": "0.2.3",
44
+ "@shipfox/node-module": "0.3.2",
45
+ "@shipfox/node-opentelemetry": "0.5.2",
46
+ "@shipfox/node-postgres": "0.4.2"
63
47
  },
64
48
  "devDependencies": {
65
- "@shipfox/biome": "1.8.1",
66
- "@shipfox/swc": "1.2.5",
49
+ "@shipfox/biome": "1.8.2",
50
+ "@shipfox/swc": "1.2.6",
67
51
  "@shipfox/ts-config": "1.3.8",
68
- "@shipfox/typescript": "1.1.6",
69
- "@shipfox/vitest": "1.2.2"
52
+ "@shipfox/typescript": "1.1.7",
53
+ "@shipfox/vitest": "1.2.3"
70
54
  },
71
55
  "scripts": {
72
56
  "build": "shipfox-swc",
@@ -96,7 +96,7 @@ describe('defaultModules', () => {
96
96
  ]);
97
97
  });
98
98
 
99
- it('uses the leased-step loader and namespaced Linear secrets', async () => {
99
+ it('uses the leased-step loader and namespaced provider secrets', async () => {
100
100
  await defaultModules();
101
101
 
102
102
  expect(mocks.createIntegrationsContext).toHaveBeenCalledWith({
@@ -107,6 +107,16 @@ describe('defaultModules', () => {
107
107
  getSecret: expect.any(Function),
108
108
  setSecrets: expect.any(Function),
109
109
  },
110
+ jira: {
111
+ deleteSecrets: expect.any(Function),
112
+ getSecret: expect.any(Function),
113
+ setSecrets: expect.any(Function),
114
+ },
115
+ slack: {
116
+ deleteSecrets: expect.any(Function),
117
+ getSecret: expect.any(Function),
118
+ setSecrets: expect.any(Function),
119
+ },
110
120
  },
111
121
  agentTools: {loadLeasedAgentStep: mocks.loadRunningLeasedStep},
112
122
  });
@@ -118,11 +128,27 @@ describe('defaultModules', () => {
118
128
  getSecret: (params: {namespace: string}) => unknown;
119
129
  setSecrets: (params: {namespace: string}) => unknown;
120
130
  };
131
+ jira: {
132
+ deleteSecrets: (params: {namespace: string}) => unknown;
133
+ getSecret: (params: {namespace: string}) => unknown;
134
+ setSecrets: (params: {namespace: string}) => unknown;
135
+ };
136
+ slack: {
137
+ deleteSecrets: (params: {namespace: string}) => unknown;
138
+ getSecret: (params: {namespace: string}) => unknown;
139
+ setSecrets: (params: {namespace: string}) => unknown;
140
+ };
121
141
  };
122
142
  };
123
143
  integrationsOptions.secrets.linear.getSecret({namespace: 'workspace'});
124
144
  integrationsOptions.secrets.linear.setSecrets({namespace: 'workspace'});
125
145
  integrationsOptions.secrets.linear.deleteSecrets({namespace: 'workspace'});
146
+ integrationsOptions.secrets.jira.getSecret({namespace: 'workspace'});
147
+ integrationsOptions.secrets.jira.setSecrets({namespace: 'workspace'});
148
+ integrationsOptions.secrets.jira.deleteSecrets({namespace: 'workspace'});
149
+ integrationsOptions.secrets.slack.getSecret({namespace: 'workspace'});
150
+ integrationsOptions.secrets.slack.setSecrets({namespace: 'workspace'});
151
+ integrationsOptions.secrets.slack.deleteSecrets({namespace: 'workspace'});
126
152
 
127
153
  expect(mocks.getSecret).toHaveBeenCalledWith({
128
154
  namespace: 'system/integrations/linear/workspace',
@@ -133,5 +159,23 @@ describe('defaultModules', () => {
133
159
  expect(mocks.deleteSecrets).toHaveBeenCalledWith({
134
160
  namespace: 'system/integrations/linear/workspace',
135
161
  });
162
+ expect(mocks.getSecret).toHaveBeenCalledWith({
163
+ namespace: 'system/integrations/jira/workspace',
164
+ });
165
+ expect(mocks.setSecrets).toHaveBeenCalledWith({
166
+ namespace: 'system/integrations/jira/workspace',
167
+ });
168
+ expect(mocks.deleteSecrets).toHaveBeenCalledWith({
169
+ namespace: 'system/integrations/jira/workspace',
170
+ });
171
+ expect(mocks.getSecret).toHaveBeenCalledWith({
172
+ namespace: 'system/integrations/slack/workspace',
173
+ });
174
+ expect(mocks.setSecrets).toHaveBeenCalledWith({
175
+ namespace: 'system/integrations/slack/workspace',
176
+ });
177
+ expect(mocks.deleteSecrets).toHaveBeenCalledWith({
178
+ namespace: 'system/integrations/slack/workspace',
179
+ });
136
180
  });
137
181
  });
package/src/modules.ts CHANGED
@@ -45,6 +45,31 @@ export async function defaultModules(): Promise<ShipfoxModule[]> {
45
45
  namespace: `system/integrations/linear/${params.namespace}`,
46
46
  }),
47
47
  },
48
+ jira: {
49
+ getSecret: (params) =>
50
+ getSecret({...params, namespace: `system/integrations/jira/${params.namespace}`}),
51
+ setSecrets: (params) =>
52
+ setSecrets({...params, namespace: `system/integrations/jira/${params.namespace}`}),
53
+ deleteSecrets: (params) =>
54
+ deleteSecrets({...params, namespace: `system/integrations/jira/${params.namespace}`}),
55
+ },
56
+ slack: {
57
+ getSecret: (params) =>
58
+ getSecret({
59
+ ...params,
60
+ namespace: `system/integrations/slack/${params.namespace}`,
61
+ }),
62
+ setSecrets: (params) =>
63
+ setSecrets({
64
+ ...params,
65
+ namespace: `system/integrations/slack/${params.namespace}`,
66
+ }),
67
+ deleteSecrets: (params) =>
68
+ deleteSecrets({
69
+ ...params,
70
+ namespace: `system/integrations/slack/${params.namespace}`,
71
+ }),
72
+ },
48
73
  },
49
74
  agentTools: {loadLeasedAgentStep: loadRunningLeasedStep},
50
75
  });