@shipfox/api-server 7.1.0 → 8.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +27 -0
- package/README.md +9 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modules.d.ts +5 -0
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +8 -3
- package/dist/modules.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +18 -18
- package/src/auth-token-interoperability.test.ts +52 -0
- package/src/index.ts +1 -0
- package/src/modules.test.ts +36 -5
- package/src/modules.ts +13 -3
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled: 7 files with swc (
|
|
2
|
+
Successfully compiled: 7 files with swc (371.07ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @shipfox/api-server
|
|
2
2
|
|
|
3
|
+
## 8.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 74243c0: Adds a default-module extension factory with the composed Workspaces inter-module client.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- b15f3a7: Removes Auth implementation dependencies from consumer test boundaries.
|
|
12
|
+
- Updated dependencies [de559bb]
|
|
13
|
+
- Updated dependencies [b15f3a7]
|
|
14
|
+
- Updated dependencies [7f227c6]
|
|
15
|
+
- @shipfox/api-agent-dto@8.0.0
|
|
16
|
+
- @shipfox/api-agent@8.0.0
|
|
17
|
+
- @shipfox/api-definitions@8.0.0
|
|
18
|
+
- @shipfox/api-logs@8.0.0
|
|
19
|
+
- @shipfox/api-workflows@8.0.0
|
|
20
|
+
- @shipfox/annotations@8.0.0
|
|
21
|
+
- @shipfox/api-runners@8.0.0
|
|
22
|
+
- @shipfox/api-integration-core-dto@8.0.0
|
|
23
|
+
- @shipfox/api-projects-dto@8.0.0
|
|
24
|
+
- @shipfox/api-integration-core@8.0.0
|
|
25
|
+
- @shipfox/api-workflows-dto@8.0.0
|
|
26
|
+
- @shipfox/api-projects@8.0.0
|
|
27
|
+
- @shipfox/api-triggers@8.0.0
|
|
28
|
+
- @shipfox/api-secrets@8.0.0
|
|
29
|
+
|
|
3
30
|
## 7.1.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -24,6 +24,15 @@ import {defaultModules, runServer} from '@shipfox/api-server';
|
|
|
24
24
|
await runServer({modules: await defaultModules()});
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
To add a module that creates sessions, use the composed Workspaces client rather
|
|
28
|
+
than creating another inter-module transport:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
const modules = await defaultModules({
|
|
32
|
+
extension: ({workspaces}) => [createCloudModule({workspaces})],
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
27
36
|
Load the instrumentation entry before feature modules:
|
|
28
37
|
|
|
29
38
|
```sh
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type DefaultModulesOptions, type DefaultRunnersModuleFactory, defaultModules, } from './modules.js';
|
|
1
|
+
export { type DefaultModulesExtension, type DefaultModulesOptions, type DefaultRunnersModuleFactory, defaultModules, } from './modules.js';
|
|
2
2
|
export { createLoginMethodsRoute } from './routes/login-methods.js';
|
|
3
3
|
export type { CreateServerOptions, RunServerOptions, ServerHandle } from './server.js';
|
|
4
4
|
export { createServer, runServer } from './server.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAC,mBAAmB,EAAE,gBAAgB,EAAE,YAAY,EAAC,MAAM,aAAa,CAAC;AACrF,OAAO,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAC,mBAAmB,EAAE,gBAAgB,EAAE,YAAY,EAAC,MAAM,aAAa,CAAC;AACrF,OAAO,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n type DefaultModulesOptions,\n type DefaultRunnersModuleFactory,\n defaultModules,\n} from './modules.js';\nexport {createLoginMethodsRoute} from './routes/login-methods.js';\nexport type {CreateServerOptions, RunServerOptions, ServerHandle} from './server.js';\nexport {createServer, runServer} from './server.js';\n"],"names":["defaultModules","createLoginMethodsRoute","createServer","runServer"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n type DefaultModulesExtension,\n type DefaultModulesOptions,\n type DefaultRunnersModuleFactory,\n defaultModules,\n} from './modules.js';\nexport {createLoginMethodsRoute} from './routes/login-methods.js';\nexport type {CreateServerOptions, RunServerOptions, ServerHandle} from './server.js';\nexport {createServer, runServer} from './server.js';\n"],"names":["defaultModules","createLoginMethodsRoute","createServer","runServer"],"mappings":"AAAA,SAIEA,cAAc,QACT,eAAe;AACtB,SAAQC,uBAAuB,QAAO,4BAA4B;AAElE,SAAQC,YAAY,EAAEC,SAAS,QAAO,cAAc"}
|
package/dist/modules.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { type AuthInterModuleClient } from '@shipfox/api-auth-dto/inter-module';
|
|
2
2
|
import { type WebhookDeliverySource } from '@shipfox/api-integration-core';
|
|
3
|
+
import { type WorkspacesInterModuleClient } from '@shipfox/api-workspaces-dto/inter-module';
|
|
3
4
|
import type { ShipfoxModule } from '@shipfox/node-module';
|
|
4
5
|
export interface DefaultModulesOptions {
|
|
5
6
|
webhookDeliverySource?: WebhookDeliverySource | undefined;
|
|
6
7
|
runnersModule?: DefaultRunnersModuleFactory | undefined;
|
|
8
|
+
extension?: DefaultModulesExtension | undefined;
|
|
7
9
|
}
|
|
8
10
|
export type DefaultRunnersModuleFactory = (options: {
|
|
9
11
|
auth: AuthInterModuleClient;
|
|
10
12
|
}) => ShipfoxModule;
|
|
13
|
+
export type DefaultModulesExtension = (options: {
|
|
14
|
+
workspaces: WorkspacesInterModuleClient;
|
|
15
|
+
}) => ShipfoxModule[];
|
|
11
16
|
export declare function defaultModules(options?: DefaultModulesOptions): Promise<ShipfoxModule[]>;
|
|
12
17
|
//# sourceMappingURL=modules.d.ts.map
|
package/dist/modules.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,oCAAoC,CAAC;AAK5C,OAAO,EAA4B,KAAK,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,oCAAoC,CAAC;AAK5C,OAAO,EAA4B,KAAK,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AAapG,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,0CAA0C,CAAC;AAGlD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAOxD,MAAM,WAAW,qBAAqB;IACpC,qBAAqB,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC1D,aAAa,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;IACxD,SAAS,CAAC,EAAE,uBAAuB,GAAG,SAAS,CAAC;CACjD;AAED,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,EAAE;IAAC,IAAI,EAAE,qBAAqB,CAAA;CAAC,KAAK,aAAa,CAAC;AACpG,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE;IAC9C,UAAU,EAAE,2BAA2B,CAAC;CACzC,KAAK,aAAa,EAAE,CAAC;AAEtB,wBAAsB,cAAc,CAClC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,aAAa,EAAE,CAAC,CAgJ1B"}
|
package/dist/modules.js
CHANGED
|
@@ -10,10 +10,10 @@ import { definitionsInterModuleContract } from '@shipfox/api-definitions-dto/int
|
|
|
10
10
|
import { dispatcherModule } from '@shipfox/api-dispatcher';
|
|
11
11
|
import { emailChallengesModule } from '@shipfox/api-email-challenges';
|
|
12
12
|
import { createIntegrationsContext } from '@shipfox/api-integration-core';
|
|
13
|
-
import { integrationsInterModuleContract } from '@shipfox/api-integration-core-dto';
|
|
13
|
+
import { integrationsInterModuleContract } from '@shipfox/api-integration-core-dto/inter-module';
|
|
14
14
|
import { createLogsModule } from '@shipfox/api-logs';
|
|
15
15
|
import { createProjectsModule } from '@shipfox/api-projects';
|
|
16
|
-
import { projectsInterModuleContract } from '@shipfox/api-projects-dto';
|
|
16
|
+
import { projectsInterModuleContract } from '@shipfox/api-projects-dto/inter-module';
|
|
17
17
|
import { createRunnersModule } from '@shipfox/api-runners';
|
|
18
18
|
import { runnersInterModuleContract } from '@shipfox/api-runners-dto/inter-module';
|
|
19
19
|
import { createSecretsModule } from '@shipfox/api-secrets';
|
|
@@ -132,8 +132,12 @@ export async function defaultModules(options = {}) {
|
|
|
132
132
|
});
|
|
133
133
|
const definitionsModule = createDefinitionsModule({
|
|
134
134
|
projects: projectsClient,
|
|
135
|
+
agent: agentClient,
|
|
135
136
|
integrations: integrationsClient
|
|
136
137
|
});
|
|
138
|
+
const extensionModules = options.extension?.({
|
|
139
|
+
workspaces: workspacesClient
|
|
140
|
+
}) ?? [];
|
|
137
141
|
const modules = [
|
|
138
142
|
emailChallengesModule,
|
|
139
143
|
createAuthModule({
|
|
@@ -168,7 +172,8 @@ export async function defaultModules(options = {}) {
|
|
|
168
172
|
createTriggersModule({
|
|
169
173
|
workflows: workflowsClient
|
|
170
174
|
}),
|
|
171
|
-
dispatcherModule
|
|
175
|
+
dispatcherModule,
|
|
176
|
+
...extensionModules
|
|
172
177
|
];
|
|
173
178
|
registerInterModulePresentations({
|
|
174
179
|
transport: interModuleTransport,
|
package/dist/modules.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/modules.ts"],"sourcesContent":["import {annotationsModule} from '@shipfox/annotations';\nimport {annotationsInterModuleContract} from '@shipfox/annotations-dto/inter-module';\nimport {createAgentModule} from '@shipfox/api-agent';\nimport {agentInterModuleContract} from '@shipfox/api-agent-dto/inter-module';\nimport {createAuthModule} from '@shipfox/api-auth';\nimport {config as authConfig} from '@shipfox/api-auth/config';\nimport {\n type AuthInterModuleClient,\n authInterModuleContract,\n} from '@shipfox/api-auth-dto/inter-module';\nimport {createDefinitionsModule} from '@shipfox/api-definitions';\nimport {definitionsInterModuleContract} from '@shipfox/api-definitions-dto/inter-module';\nimport {dispatcherModule} from '@shipfox/api-dispatcher';\nimport {emailChallengesModule} from '@shipfox/api-email-challenges';\nimport {createIntegrationsContext, type WebhookDeliverySource} from '@shipfox/api-integration-core';\nimport {integrationsInterModuleContract} from '@shipfox/api-integration-core-dto';\nimport {createLogsModule} from '@shipfox/api-logs';\nimport {createProjectsModule} from '@shipfox/api-projects';\nimport {projectsInterModuleContract} from '@shipfox/api-projects-dto';\nimport {createRunnersModule} from '@shipfox/api-runners';\nimport {runnersInterModuleContract} from '@shipfox/api-runners-dto/inter-module';\nimport {createSecretsModule} from '@shipfox/api-secrets';\nimport {secretsInterModuleContract} from '@shipfox/api-secrets-dto/inter-module';\nimport {createTriggersModule} from '@shipfox/api-triggers';\nimport {createWorkflowsModule} from '@shipfox/api-workflows';\nimport {workflowsInterModuleContract} from '@shipfox/api-workflows-dto/inter-module';\nimport {workspacesModule} from '@shipfox/api-workspaces';\nimport {workspacesInterModuleContract} from '@shipfox/api-workspaces-dto/inter-module';\nimport {reportError} from '@shipfox/node-error-monitoring';\nimport {durationToSeconds} from '@shipfox/node-jwt';\nimport type {ShipfoxModule} from '@shipfox/node-module';\nimport {\n createInMemoryInterModuleTransport,\n registerInterModulePresentations,\n} from '@shipfox/node-module/inter-module';\nimport {logger} from '@shipfox/node-opentelemetry';\n\nexport interface DefaultModulesOptions {\n webhookDeliverySource?: WebhookDeliverySource | undefined;\n runnersModule?: DefaultRunnersModuleFactory | undefined;\n}\n\nexport type DefaultRunnersModuleFactory = (options: {auth: AuthInterModuleClient}) => ShipfoxModule;\n\nexport async function defaultModules(\n options: DefaultModulesOptions = {},\n): Promise<ShipfoxModule[]> {\n const interModuleTransport = createInMemoryInterModuleTransport({\n reportInternalError: (error, context) => {\n logger().error(\n {err: error, module: context.module, method: context.method, phase: context.phase},\n 'Inter-module call failed unexpectedly',\n );\n reportError(error, {\n boundary: 'inter-module',\n operation: `${context.module}.${context.method}`,\n tags: {module: context.module, method: context.method, phase: context.phase},\n });\n },\n });\n const workflowsClient = interModuleTransport.createClient(workflowsInterModuleContract);\n const authClient = interModuleTransport.createClient(authInterModuleContract);\n const agentClient = interModuleTransport.createClient(agentInterModuleContract);\n const runnersClient = interModuleTransport.createClient(runnersInterModuleContract);\n const projectsClient = interModuleTransport.createClient(projectsInterModuleContract);\n const definitionsClient = interModuleTransport.createClient(definitionsInterModuleContract);\n const annotationsClient = interModuleTransport.createClient(annotationsInterModuleContract);\n const secretsClient = interModuleTransport.createClient(secretsInterModuleContract);\n const workspacesClient = interModuleTransport.createClient(workspacesInterModuleContract);\n const integrationsClient = interModuleTransport.createClient(integrationsInterModuleContract);\n const integrations = await createIntegrationsContext({\n workspaces: workspacesClient,\n secrets: {\n deleteSecrets: async (params) => (await secretsClient.deleteSecrets(params)).deleted,\n linear: {\n getSecret: async (params) =>\n (\n await secretsClient.getSecret({\n ...params,\n namespace: `system/integrations/linear/${params.namespace}`,\n })\n ).value,\n setSecrets: async (params) => {\n const {editedBy, ...secretParams} = params;\n await secretsClient.setSecrets({\n ...secretParams,\n namespace: `system/integrations/linear/${secretParams.namespace}`,\n ...(editedBy === undefined ? {} : {editedBy}),\n });\n },\n deleteSecrets: async (params) =>\n (\n await secretsClient.deleteSecrets({\n ...params,\n namespace: `system/integrations/linear/${params.namespace}`,\n })\n ).deleted,\n },\n jira: {\n getSecret: async (params) =>\n (\n await secretsClient.getSecret({\n ...params,\n namespace: `system/integrations/jira/${params.namespace}`,\n })\n ).value,\n setSecrets: async (params) => {\n const {editedBy, ...secretParams} = params;\n await secretsClient.setSecrets({\n ...secretParams,\n namespace: `system/integrations/jira/${secretParams.namespace}`,\n ...(editedBy === undefined ? {} : {editedBy}),\n });\n },\n deleteSecrets: async (params) =>\n (\n await secretsClient.deleteSecrets({\n ...params,\n namespace: `system/integrations/jira/${params.namespace}`,\n })\n ).deleted,\n },\n slack: {\n getSecret: async (params) =>\n (\n await secretsClient.getSecret({\n ...params,\n namespace: `system/integrations/slack/${params.namespace}`,\n })\n ).value,\n setSecrets: async (params) => {\n const {editedBy, ...secretParams} = params;\n await secretsClient.setSecrets({\n ...secretParams,\n namespace: `system/integrations/slack/${secretParams.namespace}`,\n ...(editedBy === undefined ? {} : {editedBy}),\n });\n },\n deleteSecrets: async (params) =>\n (\n await secretsClient.deleteSecrets({\n ...params,\n namespace: `system/integrations/slack/${params.namespace}`,\n })\n ).deleted,\n },\n },\n agentTools: {workflows: workflowsClient},\n webhookDeliverySource: options.webhookDeliverySource,\n });\n const projectsModule = createProjectsModule({integrations: integrationsClient});\n const definitionsModule = createDefinitionsModule({\n projects: projectsClient,\n integrations: integrationsClient,\n });\n\n const modules = [\n emailChallengesModule,\n createAuthModule({workspaces: workspacesClient}),\n workspacesModule,\n createSecretsModule(projectsClient),\n createAgentModule({secrets: secretsClient}),\n integrations.module,\n projectsModule,\n definitionsModule,\n createWorkflowsModule({\n annotations: annotationsClient,\n agent: agentClient,\n definitions: definitionsClient,\n auth: authClient,\n projects: projectsClient,\n runners: runnersClient,\n secrets: secretsClient,\n integrations: integrationsClient,\n }),\n annotationsModule,\n (options.runnersModule ?? createRunnersModule)({auth: authClient}),\n createLogsModule({\n workflows: workflowsClient,\n jobLeaseTokenTtlSeconds: durationToSeconds(authConfig.AUTH_JOB_LEASE_TOKEN_EXPIRES_IN),\n }),\n createTriggersModule({workflows: workflowsClient}),\n dispatcherModule,\n ];\n registerInterModulePresentations({transport: interModuleTransport, modules});\n interModuleTransport.seal();\n return modules;\n}\n"],"names":["annotationsModule","annotationsInterModuleContract","createAgentModule","agentInterModuleContract","createAuthModule","config","authConfig","authInterModuleContract","createDefinitionsModule","definitionsInterModuleContract","dispatcherModule","emailChallengesModule","createIntegrationsContext","integrationsInterModuleContract","createLogsModule","createProjectsModule","projectsInterModuleContract","createRunnersModule","runnersInterModuleContract","createSecretsModule","secretsInterModuleContract","createTriggersModule","createWorkflowsModule","workflowsInterModuleContract","workspacesModule","workspacesInterModuleContract","reportError","durationToSeconds","createInMemoryInterModuleTransport","registerInterModulePresentations","logger","defaultModules","options","interModuleTransport","reportInternalError","error","context","err","module","method","phase","boundary","operation","tags","workflowsClient","createClient","authClient","agentClient","runnersClient","projectsClient","definitionsClient","annotationsClient","secretsClient","workspacesClient","integrationsClient","integrations","workspaces","secrets","deleteSecrets","params","deleted","linear","getSecret","namespace","value","setSecrets","editedBy","secretParams","undefined","jira","slack","agentTools","workflows","webhookDeliverySource","projectsModule","definitionsModule","projects","modules","annotations","agent","definitions","auth","runners","runnersModule","jobLeaseTokenTtlSeconds","AUTH_JOB_LEASE_TOKEN_EXPIRES_IN","transport","seal"],"mappings":"AAAA,SAAQA,iBAAiB,QAAO,uBAAuB;AACvD,SAAQC,8BAA8B,QAAO,wCAAwC;AACrF,SAAQC,iBAAiB,QAAO,qBAAqB;AACrD,SAAQC,wBAAwB,QAAO,sCAAsC;AAC7E,SAAQC,gBAAgB,QAAO,oBAAoB;AACnD,SAAQC,UAAUC,UAAU,QAAO,2BAA2B;AAC9D,SAEEC,uBAAuB,QAClB,qCAAqC;AAC5C,SAAQC,uBAAuB,QAAO,2BAA2B;AACjE,SAAQC,8BAA8B,QAAO,4CAA4C;AACzF,SAAQC,gBAAgB,QAAO,0BAA0B;AACzD,SAAQC,qBAAqB,QAAO,gCAAgC;AACpE,SAAQC,yBAAyB,QAAmC,gCAAgC;AACpG,SAAQC,+BAA+B,QAAO,oCAAoC;AAClF,SAAQC,gBAAgB,QAAO,oBAAoB;AACnD,SAAQC,oBAAoB,QAAO,wBAAwB;AAC3D,SAAQC,2BAA2B,QAAO,4BAA4B;AACtE,SAAQC,mBAAmB,QAAO,uBAAuB;AACzD,SAAQC,0BAA0B,QAAO,wCAAwC;AACjF,SAAQC,mBAAmB,QAAO,uBAAuB;AACzD,SAAQC,0BAA0B,QAAO,wCAAwC;AACjF,SAAQC,oBAAoB,QAAO,wBAAwB;AAC3D,SAAQC,qBAAqB,QAAO,yBAAyB;AAC7D,SAAQC,4BAA4B,QAAO,0CAA0C;AACrF,SAAQC,gBAAgB,QAAO,0BAA0B;AACzD,SAAQC,6BAA6B,QAAO,2CAA2C;AACvF,SAAQC,WAAW,QAAO,iCAAiC;AAC3D,SAAQC,iBAAiB,QAAO,oBAAoB;AAEpD,SACEC,kCAAkC,EAClCC,g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AAe;QAChDlC;KACD;IACDmB,iCAAiC;QAACyD,WAAWrD;QAAsB4C;IAAO;IAC1E5C,qBAAqBsD,IAAI;IACzB,OAAOV;AACT"}
|
|
1
|
+
{"version":3,"sources":["../src/modules.ts"],"sourcesContent":["import {annotationsModule} from '@shipfox/annotations';\nimport {annotationsInterModuleContract} from '@shipfox/annotations-dto/inter-module';\nimport {createAgentModule} from '@shipfox/api-agent';\nimport {agentInterModuleContract} from '@shipfox/api-agent-dto/inter-module';\nimport {createAuthModule} from '@shipfox/api-auth';\nimport {config as authConfig} from '@shipfox/api-auth/config';\nimport {\n type AuthInterModuleClient,\n authInterModuleContract,\n} from '@shipfox/api-auth-dto/inter-module';\nimport {createDefinitionsModule} from '@shipfox/api-definitions';\nimport {definitionsInterModuleContract} from '@shipfox/api-definitions-dto/inter-module';\nimport {dispatcherModule} from '@shipfox/api-dispatcher';\nimport {emailChallengesModule} from '@shipfox/api-email-challenges';\nimport {createIntegrationsContext, type WebhookDeliverySource} from '@shipfox/api-integration-core';\nimport {integrationsInterModuleContract} from '@shipfox/api-integration-core-dto/inter-module';\nimport {createLogsModule} from '@shipfox/api-logs';\nimport {createProjectsModule} from '@shipfox/api-projects';\nimport {projectsInterModuleContract} from '@shipfox/api-projects-dto/inter-module';\nimport {createRunnersModule} from '@shipfox/api-runners';\nimport {runnersInterModuleContract} from '@shipfox/api-runners-dto/inter-module';\nimport {createSecretsModule} from '@shipfox/api-secrets';\nimport {secretsInterModuleContract} from '@shipfox/api-secrets-dto/inter-module';\nimport {createTriggersModule} from '@shipfox/api-triggers';\nimport {createWorkflowsModule} from '@shipfox/api-workflows';\nimport {workflowsInterModuleContract} from '@shipfox/api-workflows-dto/inter-module';\nimport {workspacesModule} from '@shipfox/api-workspaces';\nimport {\n type WorkspacesInterModuleClient,\n workspacesInterModuleContract,\n} from '@shipfox/api-workspaces-dto/inter-module';\nimport {reportError} from '@shipfox/node-error-monitoring';\nimport {durationToSeconds} from '@shipfox/node-jwt';\nimport type {ShipfoxModule} from '@shipfox/node-module';\nimport {\n createInMemoryInterModuleTransport,\n registerInterModulePresentations,\n} from '@shipfox/node-module/inter-module';\nimport {logger} from '@shipfox/node-opentelemetry';\n\nexport interface DefaultModulesOptions {\n webhookDeliverySource?: WebhookDeliverySource | undefined;\n runnersModule?: DefaultRunnersModuleFactory | undefined;\n extension?: DefaultModulesExtension | undefined;\n}\n\nexport type DefaultRunnersModuleFactory = (options: {auth: AuthInterModuleClient}) => ShipfoxModule;\nexport type DefaultModulesExtension = (options: {\n workspaces: WorkspacesInterModuleClient;\n}) => ShipfoxModule[];\n\nexport async function defaultModules(\n options: DefaultModulesOptions = {},\n): Promise<ShipfoxModule[]> {\n const interModuleTransport = createInMemoryInterModuleTransport({\n reportInternalError: (error, context) => {\n logger().error(\n {err: error, module: context.module, method: context.method, phase: context.phase},\n 'Inter-module call failed unexpectedly',\n );\n reportError(error, {\n boundary: 'inter-module',\n operation: `${context.module}.${context.method}`,\n tags: {module: context.module, method: context.method, phase: context.phase},\n });\n },\n });\n const workflowsClient = interModuleTransport.createClient(workflowsInterModuleContract);\n const authClient = interModuleTransport.createClient(authInterModuleContract);\n const agentClient = interModuleTransport.createClient(agentInterModuleContract);\n const runnersClient = interModuleTransport.createClient(runnersInterModuleContract);\n const projectsClient = interModuleTransport.createClient(projectsInterModuleContract);\n const definitionsClient = interModuleTransport.createClient(definitionsInterModuleContract);\n const annotationsClient = interModuleTransport.createClient(annotationsInterModuleContract);\n const secretsClient = interModuleTransport.createClient(secretsInterModuleContract);\n const workspacesClient = interModuleTransport.createClient(workspacesInterModuleContract);\n const integrationsClient = interModuleTransport.createClient(integrationsInterModuleContract);\n const integrations = await createIntegrationsContext({\n workspaces: workspacesClient,\n secrets: {\n deleteSecrets: async (params) => (await secretsClient.deleteSecrets(params)).deleted,\n linear: {\n getSecret: async (params) =>\n (\n await secretsClient.getSecret({\n ...params,\n namespace: `system/integrations/linear/${params.namespace}`,\n })\n ).value,\n setSecrets: async (params) => {\n const {editedBy, ...secretParams} = params;\n await secretsClient.setSecrets({\n ...secretParams,\n namespace: `system/integrations/linear/${secretParams.namespace}`,\n ...(editedBy === undefined ? {} : {editedBy}),\n });\n },\n deleteSecrets: async (params) =>\n (\n await secretsClient.deleteSecrets({\n ...params,\n namespace: `system/integrations/linear/${params.namespace}`,\n })\n ).deleted,\n },\n jira: {\n getSecret: async (params) =>\n (\n await secretsClient.getSecret({\n ...params,\n namespace: `system/integrations/jira/${params.namespace}`,\n })\n ).value,\n setSecrets: async (params) => {\n const {editedBy, ...secretParams} = params;\n await secretsClient.setSecrets({\n ...secretParams,\n namespace: `system/integrations/jira/${secretParams.namespace}`,\n ...(editedBy === undefined ? {} : {editedBy}),\n });\n },\n deleteSecrets: async (params) =>\n (\n await secretsClient.deleteSecrets({\n ...params,\n namespace: `system/integrations/jira/${params.namespace}`,\n })\n ).deleted,\n },\n slack: {\n getSecret: async (params) =>\n (\n await secretsClient.getSecret({\n ...params,\n namespace: `system/integrations/slack/${params.namespace}`,\n })\n ).value,\n setSecrets: async (params) => {\n const {editedBy, ...secretParams} = params;\n await secretsClient.setSecrets({\n ...secretParams,\n namespace: `system/integrations/slack/${secretParams.namespace}`,\n ...(editedBy === undefined ? {} : {editedBy}),\n });\n },\n deleteSecrets: async (params) =>\n (\n await secretsClient.deleteSecrets({\n ...params,\n namespace: `system/integrations/slack/${params.namespace}`,\n })\n ).deleted,\n },\n },\n agentTools: {workflows: workflowsClient},\n webhookDeliverySource: options.webhookDeliverySource,\n });\n const projectsModule = createProjectsModule({integrations: integrationsClient});\n const definitionsModule = createDefinitionsModule({\n projects: projectsClient,\n agent: agentClient,\n integrations: integrationsClient,\n });\n const extensionModules = options.extension?.({workspaces: workspacesClient}) ?? [];\n\n const modules = [\n emailChallengesModule,\n createAuthModule({workspaces: workspacesClient}),\n workspacesModule,\n createSecretsModule(projectsClient),\n createAgentModule({secrets: secretsClient}),\n integrations.module,\n projectsModule,\n definitionsModule,\n createWorkflowsModule({\n annotations: annotationsClient,\n agent: agentClient,\n definitions: definitionsClient,\n auth: authClient,\n projects: projectsClient,\n runners: runnersClient,\n secrets: secretsClient,\n integrations: integrationsClient,\n }),\n annotationsModule,\n (options.runnersModule ?? createRunnersModule)({auth: authClient}),\n createLogsModule({\n workflows: workflowsClient,\n jobLeaseTokenTtlSeconds: durationToSeconds(authConfig.AUTH_JOB_LEASE_TOKEN_EXPIRES_IN),\n }),\n createTriggersModule({workflows: workflowsClient}),\n dispatcherModule,\n ...extensionModules,\n ];\n registerInterModulePresentations({transport: interModuleTransport, modules});\n interModuleTransport.seal();\n return modules;\n}\n"],"names":["annotationsModule","annotationsInterModuleContract","createAgentModule","agentInterModuleContract","createAuthModule","config","authConfig","authInterModuleContract","createDefinitionsModule","definitionsInterModuleContract","dispatcherModule","emailChallengesModule","createIntegrationsContext","integrationsInterModuleContract","createLogsModule","createProjectsModule","projectsInterModuleContract","createRunnersModule","runnersInterModuleContract","createSecretsModule","secretsInterModuleContract","createTriggersModule","createWorkflowsModule","workflowsInterModuleContract","workspacesModule","workspacesInterModuleContract","reportError","durationToSeconds","createInMemoryInterModuleTransport","registerInterModulePresentations","logger","defaultModules","options","interModuleTransport","reportInternalError","error","context","err","module","method","phase","boundary","operation","tags","workflowsClient","createClient","authClient","agentClient","runnersClient","projectsClient","definitionsClient","annotationsClient","secretsClient","workspacesClient","integrationsClient","integrations","workspaces","secrets","deleteSecrets","params","deleted","linear","getSecret","namespace","value","setSecrets","editedBy","secretParams","undefined","jira","slack","agentTools","workflows","webhookDeliverySource","projectsModule","definitionsModule","projects","agent","extensionModules","extension","modules","annotations","definitions","auth","runners","runnersModule","jobLeaseTokenTtlSeconds","AUTH_JOB_LEASE_TOKEN_EXPIRES_IN","transport","seal"],"mappings":"AAAA,SAAQA,iBAAiB,QAAO,uBAAuB;AACvD,SAAQC,8BAA8B,QAAO,wCAAwC;AACrF,SAAQC,iBAAiB,QAAO,qBAAqB;AACrD,SAAQC,wBAAwB,QAAO,sCAAs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