@logto/cli 1.24.1 → 1.25.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.
@@ -1,11 +1,11 @@
1
- import type { AllConnector, BaseConnector, ConnectorMetadata, GetConnectorConfig, GetCloudServiceClient } from '@logto/connector-kit';
1
+ import type { AllConnector, BaseConnector, ConnectorMetadata, GetConnectorConfig, GetCloudServiceClient, GetI18nEmailTemplate, EmailConnector } from '@logto/connector-kit';
2
2
  import { ConnectorType } from '@logto/connector-kit';
3
3
  import type { BaseRoutes, Router } from '@withtyped/server';
4
4
  import type { ConnectorFactory } from './types.js';
5
5
  export declare function validateConnectorModule(connector: Partial<BaseConnector<ConnectorType>>): asserts connector is BaseConnector<ConnectorType>;
6
6
  export declare const readUrl: (url: string, baseUrl: string, type: "text" | "image") => Promise<string>;
7
7
  export declare const parseMetadata: (metadata: AllConnector["metadata"], packagePath: string) => Promise<AllConnector["metadata"]>;
8
- export declare const buildRawConnector: <T extends Router<any, any, BaseRoutes, string>, U extends AllConnector = AllConnector>(connectorFactory: ConnectorFactory<T, U>, getConnectorConfig?: GetConnectorConfig, getCloudServiceClient?: GetCloudServiceClient<T>) => Promise<{
8
+ export declare const buildRawConnector: <T extends Router<any, any, BaseRoutes, string>, U extends AllConnector = AllConnector>(connectorFactory: ConnectorFactory<T, U>, getConnectorConfig?: GetConnectorConfig, getCloudServiceClient?: GetCloudServiceClient<T>, getI18nEmailTemplate?: U extends EmailConnector ? GetI18nEmailTemplate : undefined) => Promise<{
9
9
  rawConnector: U;
10
10
  rawMetadata: ConnectorMetadata;
11
11
  }>;
@@ -51,11 +51,12 @@ export const parseMetadata = async (metadata, packagePath) => {
51
51
  configTemplate: metadata.configTemplate && (await readUrl(metadata.configTemplate, packagePath, 'text')),
52
52
  };
53
53
  };
54
- export const buildRawConnector = async (connectorFactory, getConnectorConfig, getCloudServiceClient) => {
54
+ export const buildRawConnector = async (connectorFactory, getConnectorConfig, getCloudServiceClient, getI18nEmailTemplate) => {
55
55
  const { createConnector, path: packagePath } = connectorFactory;
56
56
  const rawConnector = await createConnector({
57
57
  getConfig: getConnectorConfig ?? notImplemented,
58
58
  getCloudServiceClient,
59
+ getI18nEmailTemplate,
59
60
  });
60
61
  validateConnectorModule(rawConnector);
61
62
  const rawMetadata = await parseMetadata(rawConnector.metadata, packagePath);
@@ -1,6 +1,6 @@
1
1
  export const packageJson = {
2
2
  "name": "@logto/cli",
3
- "version": "1.24.1",
3
+ "version": "1.25.0",
4
4
  "description": "Logto CLI.",
5
5
  "author": "Silverhand Inc. <contact@silverhand.io>",
6
6
  "homepage": "https://github.com/logto-io/logto#readme",
@@ -42,9 +42,9 @@ export const packageJson = {
42
42
  "url": "https://github.com/logto-io/logto/issues"
43
43
  },
44
44
  "dependencies": {
45
- "@logto/connector-kit": "workspace:^4.1.1",
45
+ "@logto/connector-kit": "workspace:^4.2.0",
46
46
  "@logto/core-kit": "workspace:^2.5.4",
47
- "@logto/schemas": "workspace:1.24.1",
47
+ "@logto/schemas": "workspace:1.25.0",
48
48
  "@logto/shared": "workspace:^3.1.4",
49
49
  "@silverhand/essentials": "^2.9.1",
50
50
  "@silverhand/slonik": "31.0.0-beta.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cli",
3
- "version": "1.24.1",
3
+ "version": "1.25.0",
4
4
  "description": "Logto CLI.",
5
5
  "author": "Silverhand Inc. <contact@silverhand.io>",
6
6
  "homepage": "https://github.com/logto-io/logto#readme",
@@ -28,9 +28,9 @@
28
28
  "url": "https://github.com/logto-io/logto/issues"
29
29
  },
30
30
  "dependencies": {
31
- "@logto/connector-kit": "^4.1.1",
31
+ "@logto/connector-kit": "^4.2.0",
32
32
  "@logto/core-kit": "^2.5.4",
33
- "@logto/schemas": "1.24.1",
33
+ "@logto/schemas": "1.25.0",
34
34
  "@logto/shared": "^3.1.4",
35
35
  "@silverhand/essentials": "^2.9.1",
36
36
  "@silverhand/slonik": "31.0.0-beta.2",