@squidcloud/local-backend 1.0.67 → 1.0.68
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/dist/common/src/ai-assistant.context.d.ts +13 -13
- package/dist/common/src/ai-assistant.context.js +19 -19
- package/dist/common/src/ai-assistant.schemas.d.ts +243 -243
- package/dist/common/src/ai-assistant.schemas.js +210 -210
- package/dist/common/src/ai-assistant.types.d.ts +85 -90
- package/dist/common/src/ai-assistant.types.js +11 -11
- package/dist/common/src/ai-assistant.types.js.map +1 -1
- package/dist/common/src/api-call.context.d.ts +13 -13
- package/dist/common/src/api-call.context.js +16 -16
- package/dist/common/src/api.types.d.ts +23 -23
- package/dist/common/src/api.types.js +2 -2
- package/dist/common/src/application.schemas.d.ts +1312 -1312
- package/dist/common/src/application.schemas.js +860 -860
- package/dist/common/src/application.types.d.ts +186 -186
- package/dist/common/src/application.types.js +89 -89
- package/dist/common/src/backend-function.schemas.d.ts +3 -3
- package/dist/common/src/backend-function.schemas.js +12 -12
- package/dist/common/src/backend-function.types.d.ts +6 -6
- package/dist/common/src/backend-function.types.js +2 -2
- package/dist/common/src/backend-run.types.d.ts +54 -54
- package/dist/common/src/backend-run.types.js +96 -96
- package/dist/common/src/bundle-api.types.d.ts +63 -63
- package/dist/common/src/bundle-api.types.js +2 -2
- package/dist/common/src/bundle-data.types.d.ts +59 -59
- package/dist/common/src/bundle-data.types.js +2 -2
- package/dist/common/src/communication.types.d.ts +18 -18
- package/dist/common/src/communication.types.js +40 -40
- package/dist/common/src/context.types.d.ts +24 -24
- package/dist/common/src/context.types.js +2 -2
- package/dist/common/src/distributed-lock.context.d.ts +5 -5
- package/dist/common/src/distributed-lock.context.js +10 -10
- package/dist/common/src/document.types.d.ts +32 -32
- package/dist/common/src/document.types.js +50 -50
- package/dist/common/src/graphql.context.d.ts +14 -14
- package/dist/common/src/graphql.context.js +12 -12
- package/dist/common/src/graphql.types.d.ts +11 -11
- package/dist/common/src/graphql.types.js +34 -34
- package/dist/common/src/heartbeat.types.d.ts +4 -4
- package/dist/common/src/heartbeat.types.js +16 -16
- package/dist/common/src/http-status.enum.d.ts +50 -50
- package/dist/common/src/http-status.enum.js +54 -54
- package/dist/common/src/index.d.ts +55 -55
- package/dist/common/src/index.js +71 -71
- package/dist/common/src/integrations/ai_assistant.types.d.ts +26 -24
- package/dist/common/src/integrations/ai_assistant.types.js +2 -2
- package/dist/common/src/integrations/api.types.d.ts +80 -80
- package/dist/common/src/integrations/api.types.js +2 -2
- package/dist/common/src/integrations/auth.types.d.ts +39 -39
- package/dist/common/src/integrations/auth.types.js +2 -2
- package/dist/common/src/integrations/database.types.d.ts +231 -231
- package/dist/common/src/integrations/database.types.js +2 -2
- package/dist/common/src/integrations/index.d.ts +126 -124
- package/dist/common/src/integrations/index.js +113 -111
- package/dist/common/src/integrations/index.js.map +1 -1
- package/dist/common/src/integrations/observability.types.d.ts +23 -23
- package/dist/common/src/integrations/observability.types.js +23 -23
- package/dist/common/src/logger.types.d.ts +21 -21
- package/dist/common/src/logger.types.js +11 -11
- package/dist/common/src/metrics.types.d.ts +73 -73
- package/dist/common/src/metrics.types.js +11 -11
- package/dist/common/src/mutation.context.d.ts +13 -13
- package/dist/common/src/mutation.context.js +26 -26
- package/dist/common/src/mutation.schemas.d.ts +5 -5
- package/dist/common/src/mutation.schemas.js +114 -114
- package/dist/common/src/mutation.types.d.ts +63 -63
- package/dist/common/src/mutation.types.js +142 -142
- package/dist/common/src/named-query.context.d.ts +4 -4
- package/dist/common/src/named-query.context.js +9 -9
- package/dist/common/src/named-query.schemas.d.ts +3 -3
- package/dist/common/src/named-query.schemas.js +13 -13
- package/dist/common/src/named-query.types.d.ts +8 -8
- package/dist/common/src/named-query.types.js +2 -2
- package/dist/common/src/query/base-query-builder.d.ts +37 -37
- package/dist/common/src/query/base-query-builder.js +36 -36
- package/dist/common/src/query/index.d.ts +4 -4
- package/dist/common/src/query/index.js +20 -20
- package/dist/common/src/query/pagination.d.ts +42 -42
- package/dist/common/src/query/pagination.js +164 -164
- package/dist/common/src/query/query-context.d.ts +47 -47
- package/dist/common/src/query/query-context.js +159 -159
- package/dist/common/src/query/serialized-query.types.d.ts +24 -24
- package/dist/common/src/query/serialized-query.types.js +2 -2
- package/dist/common/src/query.types.d.ts +86 -86
- package/dist/common/src/query.types.js +153 -153
- package/dist/common/src/regions.d.ts +21 -21
- package/dist/common/src/regions.js +46 -46
- package/dist/common/src/schema/schema.types.d.ts +30 -30
- package/dist/common/src/schema/schema.types.js +172 -172
- package/dist/common/src/secret.schemas.d.ts +6 -6
- package/dist/common/src/secret.schemas.js +38 -38
- package/dist/common/src/secret.types.d.ts +49 -49
- package/dist/common/src/secret.types.js +5 -5
- package/dist/common/src/security.types.d.ts +3 -3
- package/dist/common/src/security.types.js +2 -2
- package/dist/common/src/socket.schemas.d.ts +3 -3
- package/dist/common/src/socket.schemas.js +58 -58
- package/dist/common/src/socket.types.d.ts +112 -112
- package/dist/common/src/socket.types.js +2 -2
- package/dist/common/src/time-units.d.ts +5 -5
- package/dist/common/src/time-units.js +8 -8
- package/dist/common/src/trigger.types.d.ts +15 -15
- package/dist/common/src/trigger.types.js +2 -2
- package/dist/common/src/types.d.ts +21 -21
- package/dist/common/src/types.js +2 -2
- package/dist/common/src/utils/array.d.ts +8 -8
- package/dist/common/src/utils/array.js +54 -54
- package/dist/common/src/utils/assert.d.ts +8 -8
- package/dist/common/src/utils/assert.js +49 -49
- package/dist/common/src/utils/error.d.ts +4 -4
- package/dist/common/src/utils/error.js +10 -10
- package/dist/common/src/utils/global.utils.d.ts +10 -10
- package/dist/common/src/utils/global.utils.js +46 -46
- package/dist/common/src/utils/http.d.ts +2 -2
- package/dist/common/src/utils/http.js +41 -41
- package/dist/common/src/utils/id.d.ts +2 -2
- package/dist/common/src/utils/id.js +21 -21
- package/dist/common/src/utils/lock.manager.d.ts +9 -9
- package/dist/common/src/utils/lock.manager.js +39 -39
- package/dist/common/src/utils/nullish.d.ts +2 -2
- package/dist/common/src/utils/nullish.js +11 -11
- package/dist/common/src/utils/object.d.ts +5 -5
- package/dist/common/src/utils/object.js +75 -75
- package/dist/common/src/utils/serialization.d.ts +6 -6
- package/dist/common/src/utils/serialization.js +77 -77
- package/dist/common/src/utils/transforms.d.ts +18 -18
- package/dist/common/src/utils/transforms.js +92 -92
- package/dist/common/src/utils/url.d.ts +1 -1
- package/dist/common/src/utils/url.js +15 -15
- package/dist/common/src/utils/validation.d.ts +17 -17
- package/dist/common/src/utils/validation.js +209 -209
- package/dist/common/src/webhook-response.d.ts +6 -6
- package/dist/common/src/webhook-response.js +2 -2
- package/dist/common/src/websocket.impl.d.ts +21 -21
- package/dist/common/src/websocket.impl.js +76 -76
- package/dist/internal-common/src/async-queue.d.ts +4 -4
- package/dist/internal-common/src/async-queue.js +17 -17
- package/dist/internal-common/src/code-executor.types.d.ts +13 -13
- package/dist/internal-common/src/code-executor.types.js +2 -2
- package/dist/internal-common/src/dao.types.d.ts +46 -46
- package/dist/internal-common/src/dao.types.js +2 -2
- package/dist/internal-common/src/environment/environment.types.d.ts +74 -74
- package/dist/internal-common/src/environment/environment.types.js +2 -2
- package/dist/internal-common/src/environment/index.d.ts +6 -6
- package/dist/internal-common/src/environment/index.js +27 -27
- package/dist/internal-common/src/environment/local.environment.d.ts +2 -2
- package/dist/internal-common/src/environment/local.environment.js +62 -62
- package/dist/internal-common/src/filters/custom-exception.filter.d.ts +6 -6
- package/dist/internal-common/src/filters/custom-exception.filter.js +44 -44
- package/dist/internal-common/src/index.d.ts +14 -14
- package/dist/internal-common/src/index.js +32 -32
- package/dist/internal-common/src/interceptors/body.interceptor.d.ts +5 -5
- package/dist/internal-common/src/interceptors/body.interceptor.js +24 -24
- package/dist/internal-common/src/kafka/kafka.manager.d.ts +22 -22
- package/dist/internal-common/src/kafka/kafka.manager.js +129 -129
- package/dist/internal-common/src/kafka/kafka.types.d.ts +17 -17
- package/dist/internal-common/src/kafka/kafka.types.js +2 -2
- package/dist/internal-common/src/kafka-observability-publisher.d.ts +11 -11
- package/dist/internal-common/src/kafka-observability-publisher.js +20 -20
- package/dist/internal-common/src/local-dev.types.d.ts +35 -35
- package/dist/internal-common/src/local-dev.types.js +2 -2
- package/dist/internal-common/src/observability-publisher.d.ts +9 -9
- package/dist/internal-common/src/observability-publisher.js +58 -58
- package/dist/internal-common/src/observability.types.d.ts +17 -17
- package/dist/internal-common/src/observability.types.js +2 -2
- package/dist/internal-common/src/shutdown.manager.d.ts +20 -20
- package/dist/internal-common/src/shutdown.manager.js +75 -75
- package/dist/internal-common/src/utils.d.ts +5 -5
- package/dist/internal-common/src/utils.js +29 -29
- package/dist/local-backend/src/index.d.ts +4 -4
- package/dist/local-backend/src/index.js +20 -20
- package/dist/local-backend/src/local-backend-socket.service.d.ts +19 -19
- package/dist/local-backend/src/local-backend-socket.service.js +110 -110
- package/dist/local-backend/src/local-backend.app.d.ts +2 -2
- package/dist/local-backend/src/local-backend.app.js +19 -19
- package/dist/local-backend/src/local-backend.controller.d.ts +8 -8
- package/dist/local-backend/src/local-backend.controller.js +49 -49
- package/dist/local-backend/src/local-backend.module.d.ts +8 -8
- package/dist/local-backend/src/local-backend.module.js +53 -53
- package/dist/local-backend/src/local-backend.service.d.ts +15 -15
- package/dist/local-backend/src/local-backend.service.js +165 -165
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsyncQueue = void 0;
|
|
4
|
-
class AsyncQueue {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.promise = Promise.resolve();
|
|
7
|
-
}
|
|
8
|
-
enqueue(fn) {
|
|
9
|
-
let resultResolve;
|
|
10
|
-
const result = new Promise((resolve) => {
|
|
11
|
-
resultResolve = resolve;
|
|
12
|
-
});
|
|
13
|
-
this.promise = this.promise.then(() => fn().then(resultResolve));
|
|
14
|
-
return result;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.AsyncQueue = AsyncQueue;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AsyncQueue = void 0;
|
|
4
|
+
class AsyncQueue {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.promise = Promise.resolve();
|
|
7
|
+
}
|
|
8
|
+
enqueue(fn) {
|
|
9
|
+
let resultResolve;
|
|
10
|
+
const result = new Promise((resolve) => {
|
|
11
|
+
resultResolve = resolve;
|
|
12
|
+
});
|
|
13
|
+
this.promise = this.promise.then(() => fn().then(resultResolve));
|
|
14
|
+
return result;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.AsyncQueue = AsyncQueue;
|
|
18
18
|
//# sourceMappingURL=async-queue.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Auth, ExecuteFunctionAnnotationType, RunConfiguration, RunContext, RunSecrets, ServiceFunctionName } from '@squidcloud/common';
|
|
2
|
-
export type SingleExecuteFunctionRequest = {
|
|
3
|
-
functionName: ServiceFunctionName;
|
|
4
|
-
params: Array<any>;
|
|
5
|
-
};
|
|
6
|
-
export interface BatchRunConfigurationRequest {
|
|
7
|
-
configuration: RunConfiguration;
|
|
8
|
-
context: RunContext;
|
|
9
|
-
auth: Auth | undefined;
|
|
10
|
-
requests: Array<SingleExecuteFunctionRequest>;
|
|
11
|
-
secrets?: RunSecrets;
|
|
12
|
-
executeFunctionAnnotationType: ExecuteFunctionAnnotationType;
|
|
13
|
-
}
|
|
1
|
+
import { Auth, ExecuteFunctionAnnotationType, RunConfiguration, RunContext, RunSecrets, ServiceFunctionName } from '@squidcloud/common';
|
|
2
|
+
export type SingleExecuteFunctionRequest = {
|
|
3
|
+
functionName: ServiceFunctionName;
|
|
4
|
+
params: Array<any>;
|
|
5
|
+
};
|
|
6
|
+
export interface BatchRunConfigurationRequest {
|
|
7
|
+
configuration: RunConfiguration;
|
|
8
|
+
context: RunContext;
|
|
9
|
+
auth: Auth | undefined;
|
|
10
|
+
requests: Array<SingleExecuteFunctionRequest>;
|
|
11
|
+
secrets?: RunSecrets;
|
|
12
|
+
executeFunctionAnnotationType: ExecuteFunctionAnnotationType;
|
|
13
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=code-executor.types.js.map
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { AiAssistantContextMetadata, AiAssistantProfileMetadata, AppId, ApplicationBundleData, ClientId, CodeUrl, IntegrationConfig, IntegrationId, IntegrationSchema, MessageToClient, OpenIdProvider, SchedulerId } from '@squidcloud/common';
|
|
2
|
-
export interface ApplicationBo {
|
|
3
|
-
appId: AppId;
|
|
4
|
-
codeUrl?: CodeUrl;
|
|
5
|
-
allowedHosts: string[];
|
|
6
|
-
createdAt: Date;
|
|
7
|
-
updatedAt: Date;
|
|
8
|
-
openIdProvider?: OpenIdProvider;
|
|
9
|
-
integrations: Record<IntegrationId, IntegrationConfig>;
|
|
10
|
-
bundleData?: ApplicationBundleData;
|
|
11
|
-
}
|
|
12
|
-
export interface ScheduledJobBo {
|
|
13
|
-
appId: AppId;
|
|
14
|
-
schedulerId: SchedulerId;
|
|
15
|
-
nextRunTime: number;
|
|
16
|
-
}
|
|
17
|
-
export interface MessageToClientBo {
|
|
18
|
-
message: MessageToClient;
|
|
19
|
-
appId: AppId;
|
|
20
|
-
clientId: ClientId;
|
|
21
|
-
createdAt: Date;
|
|
22
|
-
}
|
|
23
|
-
export interface SchemaBo {
|
|
24
|
-
appId: AppId;
|
|
25
|
-
integrationId: IntegrationId;
|
|
26
|
-
schema: IntegrationSchema;
|
|
27
|
-
createdAt: Date;
|
|
28
|
-
updatedAt: Date;
|
|
29
|
-
}
|
|
30
|
-
export interface AiProfileBo {
|
|
31
|
-
appId: AppId;
|
|
32
|
-
integrationId: IntegrationId;
|
|
33
|
-
id: string;
|
|
34
|
-
profile: AiAssistantProfileMetadata;
|
|
35
|
-
createdAt: Date;
|
|
36
|
-
updatedAt: Date;
|
|
37
|
-
}
|
|
38
|
-
export interface AiContextBo {
|
|
39
|
-
appId: AppId;
|
|
40
|
-
integrationId: IntegrationId;
|
|
41
|
-
profileId: string;
|
|
42
|
-
id: string;
|
|
43
|
-
context: AiAssistantContextMetadata;
|
|
44
|
-
createdAt: Date;
|
|
45
|
-
updatedAt: Date;
|
|
46
|
-
}
|
|
1
|
+
import { AiAssistantContextMetadata, AiAssistantProfileMetadata, AppId, ApplicationBundleData, ClientId, CodeUrl, IntegrationConfig, IntegrationId, IntegrationSchema, MessageToClient, OpenIdProvider, SchedulerId } from '@squidcloud/common';
|
|
2
|
+
export interface ApplicationBo {
|
|
3
|
+
appId: AppId;
|
|
4
|
+
codeUrl?: CodeUrl;
|
|
5
|
+
allowedHosts: string[];
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
updatedAt: Date;
|
|
8
|
+
openIdProvider?: OpenIdProvider;
|
|
9
|
+
integrations: Record<IntegrationId, IntegrationConfig>;
|
|
10
|
+
bundleData?: ApplicationBundleData;
|
|
11
|
+
}
|
|
12
|
+
export interface ScheduledJobBo {
|
|
13
|
+
appId: AppId;
|
|
14
|
+
schedulerId: SchedulerId;
|
|
15
|
+
nextRunTime: number;
|
|
16
|
+
}
|
|
17
|
+
export interface MessageToClientBo {
|
|
18
|
+
message: MessageToClient;
|
|
19
|
+
appId: AppId;
|
|
20
|
+
clientId: ClientId;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
}
|
|
23
|
+
export interface SchemaBo {
|
|
24
|
+
appId: AppId;
|
|
25
|
+
integrationId: IntegrationId;
|
|
26
|
+
schema: IntegrationSchema;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
updatedAt: Date;
|
|
29
|
+
}
|
|
30
|
+
export interface AiProfileBo {
|
|
31
|
+
appId: AppId;
|
|
32
|
+
integrationId: IntegrationId;
|
|
33
|
+
id: string;
|
|
34
|
+
profile: AiAssistantProfileMetadata;
|
|
35
|
+
createdAt: Date;
|
|
36
|
+
updatedAt: Date;
|
|
37
|
+
}
|
|
38
|
+
export interface AiContextBo {
|
|
39
|
+
appId: AppId;
|
|
40
|
+
integrationId: IntegrationId;
|
|
41
|
+
profileId: string;
|
|
42
|
+
id: string;
|
|
43
|
+
context: AiAssistantContextMetadata;
|
|
44
|
+
createdAt: Date;
|
|
45
|
+
updatedAt: Date;
|
|
46
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=dao.types.js.map
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { DatadogRegion, SupportedSquidRegion } from '@squidcloud/common';
|
|
2
|
-
type VaultConfig = {
|
|
3
|
-
endpoint: string;
|
|
4
|
-
token: string;
|
|
5
|
-
} | {
|
|
6
|
-
endpoint: string;
|
|
7
|
-
role_id: string;
|
|
8
|
-
secret_id: string;
|
|
9
|
-
};
|
|
10
|
-
type KafkaConfig = {
|
|
11
|
-
clusterUrls: string[];
|
|
12
|
-
consumerSessionTimeoutMs: number;
|
|
13
|
-
} | {
|
|
14
|
-
clusterUrls: string[];
|
|
15
|
-
consumerSessionTimeoutMs: number;
|
|
16
|
-
username: string;
|
|
17
|
-
password: string;
|
|
18
|
-
};
|
|
19
|
-
export interface EnvironmentVars {
|
|
20
|
-
region: string;
|
|
21
|
-
environment: string;
|
|
22
|
-
redisUrl: string;
|
|
23
|
-
stage: string;
|
|
24
|
-
dbConnectionLimit: number;
|
|
25
|
-
dbSslEnabled: boolean;
|
|
26
|
-
squidRegion: SupportedSquidRegion;
|
|
27
|
-
internalApiKey: string;
|
|
28
|
-
code: {
|
|
29
|
-
bucket: string;
|
|
30
|
-
awsEndpoint?: string;
|
|
31
|
-
};
|
|
32
|
-
kafka: KafkaConfig;
|
|
33
|
-
vault: VaultConfig;
|
|
34
|
-
zookeeper: {
|
|
35
|
-
host: string;
|
|
36
|
-
lockDirectory: string;
|
|
37
|
-
};
|
|
38
|
-
kafkaConnect: {
|
|
39
|
-
endpoint: string;
|
|
40
|
-
};
|
|
41
|
-
sharedMongo: {
|
|
42
|
-
connectionString: string;
|
|
43
|
-
database?: string;
|
|
44
|
-
user?: string;
|
|
45
|
-
};
|
|
46
|
-
datadog: {
|
|
47
|
-
datadogRegion: DatadogRegion;
|
|
48
|
-
agentUrl: string;
|
|
49
|
-
envName: string;
|
|
50
|
-
};
|
|
51
|
-
snowflake: {
|
|
52
|
-
account: string;
|
|
53
|
-
username: string;
|
|
54
|
-
password: string;
|
|
55
|
-
database: string;
|
|
56
|
-
schema: string;
|
|
57
|
-
warehouse: string;
|
|
58
|
-
role: string;
|
|
59
|
-
};
|
|
60
|
-
pinecone: {
|
|
61
|
-
environment: string;
|
|
62
|
-
indexName: string;
|
|
63
|
-
};
|
|
64
|
-
weaviate?: {
|
|
65
|
-
scheme: string;
|
|
66
|
-
host: string;
|
|
67
|
-
apiKey: string | undefined;
|
|
68
|
-
};
|
|
69
|
-
tenant: {
|
|
70
|
-
baseUrl?: string;
|
|
71
|
-
image?: string;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
export {};
|
|
1
|
+
import { DatadogRegion, SupportedSquidRegion } from '@squidcloud/common';
|
|
2
|
+
type VaultConfig = {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
token: string;
|
|
5
|
+
} | {
|
|
6
|
+
endpoint: string;
|
|
7
|
+
role_id: string;
|
|
8
|
+
secret_id: string;
|
|
9
|
+
};
|
|
10
|
+
type KafkaConfig = {
|
|
11
|
+
clusterUrls: string[];
|
|
12
|
+
consumerSessionTimeoutMs: number;
|
|
13
|
+
} | {
|
|
14
|
+
clusterUrls: string[];
|
|
15
|
+
consumerSessionTimeoutMs: number;
|
|
16
|
+
username: string;
|
|
17
|
+
password: string;
|
|
18
|
+
};
|
|
19
|
+
export interface EnvironmentVars {
|
|
20
|
+
region: string;
|
|
21
|
+
environment: string;
|
|
22
|
+
redisUrl: string;
|
|
23
|
+
stage: string;
|
|
24
|
+
dbConnectionLimit: number;
|
|
25
|
+
dbSslEnabled: boolean;
|
|
26
|
+
squidRegion: SupportedSquidRegion;
|
|
27
|
+
internalApiKey: string;
|
|
28
|
+
code: {
|
|
29
|
+
bucket: string;
|
|
30
|
+
awsEndpoint?: string;
|
|
31
|
+
};
|
|
32
|
+
kafka: KafkaConfig;
|
|
33
|
+
vault: VaultConfig;
|
|
34
|
+
zookeeper: {
|
|
35
|
+
host: string;
|
|
36
|
+
lockDirectory: string;
|
|
37
|
+
};
|
|
38
|
+
kafkaConnect: {
|
|
39
|
+
endpoint: string;
|
|
40
|
+
};
|
|
41
|
+
sharedMongo: {
|
|
42
|
+
connectionString: string;
|
|
43
|
+
database?: string;
|
|
44
|
+
user?: string;
|
|
45
|
+
};
|
|
46
|
+
datadog: {
|
|
47
|
+
datadogRegion: DatadogRegion;
|
|
48
|
+
agentUrl: string;
|
|
49
|
+
envName: string;
|
|
50
|
+
};
|
|
51
|
+
snowflake: {
|
|
52
|
+
account: string;
|
|
53
|
+
username: string;
|
|
54
|
+
password: string;
|
|
55
|
+
database: string;
|
|
56
|
+
schema: string;
|
|
57
|
+
warehouse: string;
|
|
58
|
+
role: string;
|
|
59
|
+
};
|
|
60
|
+
pinecone: {
|
|
61
|
+
environment: string;
|
|
62
|
+
indexName: string;
|
|
63
|
+
};
|
|
64
|
+
weaviate?: {
|
|
65
|
+
scheme: string;
|
|
66
|
+
host: string;
|
|
67
|
+
apiKey: string | undefined;
|
|
68
|
+
};
|
|
69
|
+
tenant: {
|
|
70
|
+
baseUrl?: string;
|
|
71
|
+
image?: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=environment.types.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EnvironmentVars } from './environment.types';
|
|
2
|
-
export { EnvironmentVars } from './environment.types';
|
|
3
|
-
export type Stage = 'local' | 'prod' | 'dev';
|
|
4
|
-
export declare const STAGE: Stage;
|
|
5
|
-
export declare function getProcessEnv(key: string): string;
|
|
6
|
-
export declare function getEnv<K extends keyof EnvironmentVars>(key: K): EnvironmentVars[K];
|
|
1
|
+
import { EnvironmentVars } from './environment.types';
|
|
2
|
+
export { EnvironmentVars } from './environment.types';
|
|
3
|
+
export type Stage = 'local' | 'prod' | 'dev';
|
|
4
|
+
export declare const STAGE: Stage;
|
|
5
|
+
export declare function getProcessEnv(key: string): string;
|
|
6
|
+
export declare function getEnv<K extends keyof EnvironmentVars>(key: K): EnvironmentVars[K];
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEnv = exports.getProcessEnv = exports.STAGE = void 0;
|
|
4
|
-
const local_environment_1 = require("./local.environment");
|
|
5
|
-
const common_1 = require("@squidcloud/common");
|
|
6
|
-
exports.STAGE = (process.env['NODE_ENV'] || 'local');
|
|
7
|
-
let activeEnvironment;
|
|
8
|
-
function getProcessEnv(key) {
|
|
9
|
-
return (0, common_1.truthy)(process.env[key], `No ${key} environment variable`);
|
|
10
|
-
}
|
|
11
|
-
exports.getProcessEnv = getProcessEnv;
|
|
12
|
-
function getEnv(key) {
|
|
13
|
-
if (activeEnvironment === undefined) {
|
|
14
|
-
switch (exports.STAGE) {
|
|
15
|
-
case 'local':
|
|
16
|
-
case 'test':
|
|
17
|
-
activeEnvironment = local_environment_1.LocalEnvironment;
|
|
18
|
-
break;
|
|
19
|
-
case 'dev':
|
|
20
|
-
case 'prod':
|
|
21
|
-
activeEnvironment = JSON.parse((0, common_1.truthy)(process.env['SQUID_ENV'], 'No SQUID_ENV environment variable'));
|
|
22
|
-
break;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return (0, common_1.truthy)(activeEnvironment, 'No active environment')[key];
|
|
26
|
-
}
|
|
27
|
-
exports.getEnv = getEnv;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEnv = exports.getProcessEnv = exports.STAGE = void 0;
|
|
4
|
+
const local_environment_1 = require("./local.environment");
|
|
5
|
+
const common_1 = require("@squidcloud/common");
|
|
6
|
+
exports.STAGE = (process.env['NODE_ENV'] || 'local');
|
|
7
|
+
let activeEnvironment;
|
|
8
|
+
function getProcessEnv(key) {
|
|
9
|
+
return (0, common_1.truthy)(process.env[key], `No ${key} environment variable`);
|
|
10
|
+
}
|
|
11
|
+
exports.getProcessEnv = getProcessEnv;
|
|
12
|
+
function getEnv(key) {
|
|
13
|
+
if (activeEnvironment === undefined) {
|
|
14
|
+
switch (exports.STAGE) {
|
|
15
|
+
case 'local':
|
|
16
|
+
case 'test':
|
|
17
|
+
activeEnvironment = local_environment_1.LocalEnvironment;
|
|
18
|
+
break;
|
|
19
|
+
case 'dev':
|
|
20
|
+
case 'prod':
|
|
21
|
+
activeEnvironment = JSON.parse((0, common_1.truthy)(process.env['SQUID_ENV'], 'No SQUID_ENV environment variable'));
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return (0, common_1.truthy)(activeEnvironment, 'No active environment')[key];
|
|
26
|
+
}
|
|
27
|
+
exports.getEnv = getEnv;
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EnvironmentVars } from './environment.types';
|
|
2
|
-
export declare const LocalEnvironment: EnvironmentVars;
|
|
1
|
+
import { EnvironmentVars } from './environment.types';
|
|
2
|
+
export declare const LocalEnvironment: EnvironmentVars;
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LocalEnvironment = void 0;
|
|
4
|
-
exports.LocalEnvironment = {
|
|
5
|
-
region: 'us-east-1',
|
|
6
|
-
environment: 'local',
|
|
7
|
-
redisUrl: 'redis://127.0.0.1:6379',
|
|
8
|
-
dbConnectionLimit: 5,
|
|
9
|
-
stage: 'local',
|
|
10
|
-
dbSslEnabled: false,
|
|
11
|
-
squidRegion: 'local',
|
|
12
|
-
internalApiKey: 'localInternalApiKey',
|
|
13
|
-
tenant: {
|
|
14
|
-
baseUrl: 'http://127.0.0.1:3000',
|
|
15
|
-
},
|
|
16
|
-
code: {
|
|
17
|
-
bucket: 'squid-code-bucket',
|
|
18
|
-
awsEndpoint: 'http://localhost.localstack.cloud:4566',
|
|
19
|
-
},
|
|
20
|
-
kafka: {
|
|
21
|
-
clusterUrls: ['kafka.local.squid.cloud:9092'],
|
|
22
|
-
consumerSessionTimeoutMs: 10000,
|
|
23
|
-
},
|
|
24
|
-
kafkaConnect: {
|
|
25
|
-
endpoint: 'http://127.0.0.1:8083',
|
|
26
|
-
},
|
|
27
|
-
vault: {
|
|
28
|
-
endpoint: 'http://127.0.0.1:8200',
|
|
29
|
-
token: 'root',
|
|
30
|
-
},
|
|
31
|
-
zookeeper: {
|
|
32
|
-
host: 'localhost:2181',
|
|
33
|
-
lockDirectory: '/SquidLocks',
|
|
34
|
-
},
|
|
35
|
-
sharedMongo: {
|
|
36
|
-
connectionString: 'mongodb://mongo:27017',
|
|
37
|
-
user: 'root',
|
|
38
|
-
},
|
|
39
|
-
datadog: {
|
|
40
|
-
datadogRegion: 'us5',
|
|
41
|
-
agentUrl: 'http://localhost:8126',
|
|
42
|
-
envName: 'local',
|
|
43
|
-
},
|
|
44
|
-
snowflake: {
|
|
45
|
-
account: 'rxoeppr-to21352',
|
|
46
|
-
username: 'DEV_SQUID',
|
|
47
|
-
password: '8S3uEkgrdJv8f',
|
|
48
|
-
database: 'DEV_METRICS',
|
|
49
|
-
schema: 'PUBLIC',
|
|
50
|
-
warehouse: 'compute_wh',
|
|
51
|
-
role: 'DEV_METRICS',
|
|
52
|
-
},
|
|
53
|
-
pinecone: {
|
|
54
|
-
environment: 'asia-southeast1-gcp-free',
|
|
55
|
-
indexName: 'free-test-index',
|
|
56
|
-
},
|
|
57
|
-
weaviate: {
|
|
58
|
-
scheme: 'http',
|
|
59
|
-
host: 'localhost:8081',
|
|
60
|
-
apiKey: undefined,
|
|
61
|
-
},
|
|
62
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocalEnvironment = void 0;
|
|
4
|
+
exports.LocalEnvironment = {
|
|
5
|
+
region: 'us-east-1',
|
|
6
|
+
environment: 'local',
|
|
7
|
+
redisUrl: 'redis://127.0.0.1:6379',
|
|
8
|
+
dbConnectionLimit: 5,
|
|
9
|
+
stage: 'local',
|
|
10
|
+
dbSslEnabled: false,
|
|
11
|
+
squidRegion: 'local',
|
|
12
|
+
internalApiKey: 'localInternalApiKey',
|
|
13
|
+
tenant: {
|
|
14
|
+
baseUrl: 'http://127.0.0.1:3000',
|
|
15
|
+
},
|
|
16
|
+
code: {
|
|
17
|
+
bucket: 'squid-code-bucket',
|
|
18
|
+
awsEndpoint: 'http://localhost.localstack.cloud:4566',
|
|
19
|
+
},
|
|
20
|
+
kafka: {
|
|
21
|
+
clusterUrls: ['kafka.local.squid.cloud:9092'],
|
|
22
|
+
consumerSessionTimeoutMs: 10000,
|
|
23
|
+
},
|
|
24
|
+
kafkaConnect: {
|
|
25
|
+
endpoint: 'http://127.0.0.1:8083',
|
|
26
|
+
},
|
|
27
|
+
vault: {
|
|
28
|
+
endpoint: 'http://127.0.0.1:8200',
|
|
29
|
+
token: 'root',
|
|
30
|
+
},
|
|
31
|
+
zookeeper: {
|
|
32
|
+
host: 'localhost:2181',
|
|
33
|
+
lockDirectory: '/SquidLocks',
|
|
34
|
+
},
|
|
35
|
+
sharedMongo: {
|
|
36
|
+
connectionString: 'mongodb://mongo:27017',
|
|
37
|
+
user: 'root',
|
|
38
|
+
},
|
|
39
|
+
datadog: {
|
|
40
|
+
datadogRegion: 'us5',
|
|
41
|
+
agentUrl: 'http://localhost:8126',
|
|
42
|
+
envName: 'local',
|
|
43
|
+
},
|
|
44
|
+
snowflake: {
|
|
45
|
+
account: 'rxoeppr-to21352',
|
|
46
|
+
username: 'DEV_SQUID',
|
|
47
|
+
password: '8S3uEkgrdJv8f',
|
|
48
|
+
database: 'DEV_METRICS',
|
|
49
|
+
schema: 'PUBLIC',
|
|
50
|
+
warehouse: 'compute_wh',
|
|
51
|
+
role: 'DEV_METRICS',
|
|
52
|
+
},
|
|
53
|
+
pinecone: {
|
|
54
|
+
environment: 'asia-southeast1-gcp-free',
|
|
55
|
+
indexName: 'free-test-index',
|
|
56
|
+
},
|
|
57
|
+
weaviate: {
|
|
58
|
+
scheme: 'http',
|
|
59
|
+
host: 'localhost:8081',
|
|
60
|
+
apiKey: undefined,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
63
|
//# sourceMappingURL=local.environment.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ArgumentsHost } from '@nestjs/common';
|
|
2
|
-
import { BaseExceptionFilter } from '@nestjs/core';
|
|
3
|
-
export declare class CustomExceptionFilter extends BaseExceptionFilter {
|
|
4
|
-
private readonly logger;
|
|
5
|
-
catch(err: unknown, host: ArgumentsHost): void;
|
|
6
|
-
}
|
|
1
|
+
import { ArgumentsHost } from '@nestjs/common';
|
|
2
|
+
import { BaseExceptionFilter } from '@nestjs/core';
|
|
3
|
+
export declare class CustomExceptionFilter extends BaseExceptionFilter {
|
|
4
|
+
private readonly logger;
|
|
5
|
+
catch(err: unknown, host: ArgumentsHost): void;
|
|
6
|
+
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.CustomExceptionFilter = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const core_1 = require("@nestjs/core");
|
|
12
|
-
const common_2 = require("@squidcloud/common");
|
|
13
|
-
let CustomExceptionFilter = class CustomExceptionFilter extends core_1.BaseExceptionFilter {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
this.logger = new common_1.Logger('CustomExceptionFilter');
|
|
17
|
-
}
|
|
18
|
-
catch(err, host) {
|
|
19
|
-
const isProd = process.env['NODE_ENV'] === 'prod';
|
|
20
|
-
if (err instanceof common_2.ValidationError) {
|
|
21
|
-
this.logger.error(err);
|
|
22
|
-
return super.catch(new common_1.HttpException({
|
|
23
|
-
message: err.message,
|
|
24
|
-
statusCode: err.statusCode,
|
|
25
|
-
details: err.details,
|
|
26
|
-
stack: isProd ? undefined : err.stack,
|
|
27
|
-
}, err.statusCode), host);
|
|
28
|
-
}
|
|
29
|
-
if (!isProd && err instanceof Error) {
|
|
30
|
-
this.logger.error(`Uncaught exception: ${err.message}`, err.stack);
|
|
31
|
-
return super.catch(new common_1.HttpException({
|
|
32
|
-
message: err.message,
|
|
33
|
-
statusCode: common_1.HttpStatus.INTERNAL_SERVER_ERROR,
|
|
34
|
-
stack: err.stack,
|
|
35
|
-
}, common_1.HttpStatus.INTERNAL_SERVER_ERROR), host);
|
|
36
|
-
}
|
|
37
|
-
return super.catch(err, host);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
CustomExceptionFilter = __decorate([
|
|
41
|
-
(0, common_1.Injectable)(),
|
|
42
|
-
(0, common_1.Catch)()
|
|
43
|
-
], CustomExceptionFilter);
|
|
44
|
-
exports.CustomExceptionFilter = CustomExceptionFilter;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.CustomExceptionFilter = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const core_1 = require("@nestjs/core");
|
|
12
|
+
const common_2 = require("@squidcloud/common");
|
|
13
|
+
let CustomExceptionFilter = class CustomExceptionFilter extends core_1.BaseExceptionFilter {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.logger = new common_1.Logger('CustomExceptionFilter');
|
|
17
|
+
}
|
|
18
|
+
catch(err, host) {
|
|
19
|
+
const isProd = process.env['NODE_ENV'] === 'prod';
|
|
20
|
+
if (err instanceof common_2.ValidationError) {
|
|
21
|
+
this.logger.error(err);
|
|
22
|
+
return super.catch(new common_1.HttpException({
|
|
23
|
+
message: err.message,
|
|
24
|
+
statusCode: err.statusCode,
|
|
25
|
+
details: err.details,
|
|
26
|
+
stack: isProd ? undefined : err.stack,
|
|
27
|
+
}, err.statusCode), host);
|
|
28
|
+
}
|
|
29
|
+
if (!isProd && err instanceof Error) {
|
|
30
|
+
this.logger.error(`Uncaught exception: ${err.message}`, err.stack);
|
|
31
|
+
return super.catch(new common_1.HttpException({
|
|
32
|
+
message: err.message,
|
|
33
|
+
statusCode: common_1.HttpStatus.INTERNAL_SERVER_ERROR,
|
|
34
|
+
stack: err.stack,
|
|
35
|
+
}, common_1.HttpStatus.INTERNAL_SERVER_ERROR), host);
|
|
36
|
+
}
|
|
37
|
+
return super.catch(err, host);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
CustomExceptionFilter = __decorate([
|
|
41
|
+
(0, common_1.Injectable)(),
|
|
42
|
+
(0, common_1.Catch)()
|
|
43
|
+
], CustomExceptionFilter);
|
|
44
|
+
exports.CustomExceptionFilter = CustomExceptionFilter;
|
|
45
45
|
//# sourceMappingURL=custom-exception.filter.js.map
|