mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
refactor: leverage pnpmfile for dependency installation
This commit is contained in:
parent
79f3c44b62
commit
3ad272f345
70 changed files with 1581 additions and 705 deletions
51
.pnpmfile.cjs
Normal file
51
.pnpmfile.cjs
Normal file
|
@ -0,0 +1,51 @@
|
|||
// See https://pnpm.io/pnpmfile
|
||||
const fs = require('node:fs/promises');
|
||||
|
||||
// Types are inspected and edited from https://github.com/pnpm/pnpm/blob/ef6c22e129dc3d76998cee33647b70a66d1f36bf/hooks/pnpmfile/src/requireHooks.ts
|
||||
/**
|
||||
* @typedef {Object} HookContext
|
||||
* @property {(message: string) => void} log
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} Hooks
|
||||
* @property {((pkg: unknown, context: HookContext) => unknown)=} readPackage
|
||||
*/
|
||||
|
||||
const isObject = (value) => value !== null && typeof value === 'object';
|
||||
|
||||
/** @type Hooks */
|
||||
const hooks = { readPackage: async (pkg) => {
|
||||
// Skip if not a connector package
|
||||
if (!(
|
||||
isObject(pkg) &&
|
||||
'name' in pkg &&
|
||||
String(pkg.name) !== '@logto/connector-kit' &&
|
||||
String(pkg.name).startsWith('@logto/connector-')
|
||||
)) {
|
||||
return pkg;
|
||||
}
|
||||
|
||||
// Apply connector's `package.json` to the template
|
||||
const result = JSON.parse(await fs.readFile('packages/connectors/templates/package.json', 'utf8'));
|
||||
for (const [key, value] of Object.entries(pkg)) {
|
||||
if (key === '$schema') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Shallow merge
|
||||
if (Array.isArray(result[key])) {
|
||||
result[key] = [...result[key], ...value];
|
||||
} else if (typeof value === 'object' && value !== null) {
|
||||
result[key] = { ...result[key], ...value };
|
||||
} else {
|
||||
result[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
} };
|
||||
|
||||
module.exports = {
|
||||
hooks,
|
||||
};
|
|
@ -5,9 +5,7 @@
|
|||
"type": "module",
|
||||
"scripts": {
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"connectors:sync": "cd packages/connectors && node templates/sync-to-current.js",
|
||||
"connectors:update": "cd packages/connectors && node templates/sync-from-current.js",
|
||||
"pnpm:devPreinstall": "pnpm connectors:sync",
|
||||
"pnpm:devPreinstall": "cd packages/connectors && node templates/sync-preset.js",
|
||||
"prepare": "if test \"$NODE_ENV\" != \"production\" && test \"$CI\" != \"true\" ; then husky install ; fi",
|
||||
"prepack": "pnpm -r prepack",
|
||||
"dev": "pnpm -r prepack && pnpm start:dev",
|
||||
|
|
1
packages/connectors/.gitignore
vendored
1
packages/connectors/.gitignore
vendored
|
@ -1,5 +1,4 @@
|
|||
# generated files
|
||||
/*/package.json
|
||||
/*/types
|
||||
/*/tsconfig.*
|
||||
/*/jest.config.*
|
||||
|
|
21
packages/connectors/README.md
Normal file
21
packages/connectors/README.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Logto connectors directory
|
||||
|
||||
## Template syncing
|
||||
|
||||
Since all connectors have a same pattern for `package.json`, here we leverage several techniques to avoid annoying copy-pastes:
|
||||
|
||||
### When `pnpm i`
|
||||
|
||||
- The `"pnpm:devPreinstall"` script in the project root executes `templates/sync-preset.js` that:
|
||||
- Check every connectors's `package.json` to see if there's any unexpected keys
|
||||
- Sync `templates/package.json` by REPLACING every template key (except dependency keys) in the current `package.json` with the value from the template `package.json`
|
||||
- Copies all config files to every connector directory
|
||||
- The hook in `.pnpmfile.cjs` of the project root merges dependency fields for every connector
|
||||
- Also we can update arbitrary fields in this hook, we still need to keep non-dependency fields in the connector's `package.json` since the hook only takes affect during `pnpm i`.
|
||||
|
||||
> **Caution**
|
||||
> Workspace dependencies should be defined in connector's package.json (not template) in order to let PNPM correctly resolves the workspace dependency tree;
|
||||
|
||||
### Add a new custom field
|
||||
|
||||
Head to `templates/sync-preset.js` and update `allowedCustomKeys`.
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-alipay-native",
|
||||
"version": "1.0.0",
|
||||
"description": "Alipay Native implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"dayjs": "^1.10.5",
|
||||
"iconv-lite": "^0.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@shopify/jest-koa-mocks": "^5.0.0"
|
||||
}
|
||||
}
|
47
packages/connectors/connector-alipay-native/package.json
Normal file
47
packages/connectors/connector-alipay-native/package.json
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "@logto/connector-alipay-native",
|
||||
"version": "1.0.0",
|
||||
"description": "Alipay Native implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^",
|
||||
"dayjs": "^1.10.5",
|
||||
"iconv-lite": "^0.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@shopify/jest-koa-mocks": "^5.0.0"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-alipay-web",
|
||||
"version": "1.0.0",
|
||||
"description": "Alipay implementation.",
|
||||
"dependencies": {
|
||||
"@logto/core-kit": "1.0.0-beta.29",
|
||||
"dayjs": "^1.10.5",
|
||||
"iconv-lite": "^0.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@shopify/jest-koa-mocks": "^5.0.0"
|
||||
}
|
||||
}
|
47
packages/connectors/connector-alipay-web/package.json
Normal file
47
packages/connectors/connector-alipay-web/package.json
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "@logto/connector-alipay-web",
|
||||
"version": "1.0.0",
|
||||
"description": "Alipay implementation.",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^",
|
||||
"@logto/core-kit": "workspace:^",
|
||||
"dayjs": "^1.10.5",
|
||||
"iconv-lite": "^0.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@shopify/jest-koa-mocks": "^5.0.0"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,17 +1,14 @@
|
|||
import { fallback } from '@logto/core-kit';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { alipaySigningAlgorithms, charsetEnum, fallbackCharset } from './constant.js';
|
||||
|
||||
const charsetGuard = z.enum(charsetEnum);
|
||||
|
||||
type Charset = z.infer<typeof charsetGuard>;
|
||||
|
||||
export const alipayConfigGuard = z.object({
|
||||
appId: z.string(),
|
||||
privateKey: z.string(),
|
||||
signType: z.enum(alipaySigningAlgorithms),
|
||||
charset: charsetGuard.or(fallback<Charset>(fallbackCharset)),
|
||||
charset: charsetGuard.default(fallbackCharset),
|
||||
});
|
||||
|
||||
export type AlipayConfig = z.infer<typeof alipayConfigGuard>;
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-aliyun-dm",
|
||||
"version": "1.0.0",
|
||||
"description": "Aliyun DM connector implementation."
|
||||
}
|
41
packages/connectors/connector-aliyun-dm/package.json
Normal file
41
packages/connectors/connector-aliyun-dm/package.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "@logto/connector-aliyun-dm",
|
||||
"version": "1.0.0",
|
||||
"description": "Aliyun DM connector implementation.",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-aliyun-sms",
|
||||
"version": "1.0.0",
|
||||
"description": "Aliyun SMS connector implementation."
|
||||
}
|
41
packages/connectors/connector-aliyun-sms/package.json
Normal file
41
packages/connectors/connector-aliyun-sms/package.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "@logto/connector-aliyun-sms",
|
||||
"version": "1.0.0",
|
||||
"description": "Aliyun SMS connector implementation.",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-apple",
|
||||
"version": "1.0.0",
|
||||
"description": "Apple web connector implementation.",
|
||||
"dependencies": {
|
||||
"@logto/core-kit": "1.0.0-beta.30",
|
||||
"jose": "^4.3.8"
|
||||
}
|
||||
}
|
43
packages/connectors/connector-apple/package.json
Normal file
43
packages/connectors/connector-apple/package.json
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"name": "@logto/connector-apple",
|
||||
"version": "1.0.0",
|
||||
"description": "Apple web connector implementation.",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^",
|
||||
"@logto/core-kit": "workspace:^",
|
||||
"jose": "^4.3.8"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"name": "@logto/connector-aws-ses",
|
||||
"version": "1.0.0",
|
||||
"description": "Logto Connector for Amazon SES",
|
||||
"author": "Jeff <admin@breadth.app>",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-sesv2": "^3.224.0",
|
||||
"@aws-sdk/types": "^3.226.0"
|
||||
}
|
||||
}
|
44
packages/connectors/connector-aws-ses/package.json
Normal file
44
packages/connectors/connector-aws-ses/package.json
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"name": "@logto/connector-aws-ses",
|
||||
"version": "1.0.0",
|
||||
"description": "Logto Connector for Amazon SES",
|
||||
"author": "Jeff <admin@breadth.app>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^",
|
||||
"@aws-sdk/client-sesv2": "^3.224.0",
|
||||
"@aws-sdk/types": "^3.226.0"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-azuread",
|
||||
"version": "1.0.0",
|
||||
"description": "Microsoft Azure AD connector implementation.",
|
||||
"author": "Mobilist Inc. <info@mobilist.com.tr>",
|
||||
"dependencies": {
|
||||
"@azure/msal-node": "^1.12.0"
|
||||
}
|
||||
}
|
43
packages/connectors/connector-azuread/package.json
Normal file
43
packages/connectors/connector-azuread/package.json
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"name": "@logto/connector-azuread",
|
||||
"version": "1.0.0",
|
||||
"description": "Microsoft Azure AD connector implementation.",
|
||||
"author": "Mobilist Inc. <info@mobilist.com.tr>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^",
|
||||
"@azure/msal-node": "^1.12.0"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-discord",
|
||||
"version": "1.0.0",
|
||||
"description": "Discord connector implementation.",
|
||||
"author": "ZR3SYSTEMS. <https://github.com/FlurryNight>"
|
||||
}
|
42
packages/connectors/connector-discord/package.json
Normal file
42
packages/connectors/connector-discord/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-discord",
|
||||
"version": "1.0.0",
|
||||
"description": "Discord connector implementation.",
|
||||
"author": "ZR3SYSTEMS. <https://github.com/FlurryNight>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-facebook",
|
||||
"version": "1.0.0",
|
||||
"description": "Facebook web connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>"
|
||||
}
|
42
packages/connectors/connector-facebook/package.json
Normal file
42
packages/connectors/connector-facebook/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-facebook",
|
||||
"version": "1.0.0",
|
||||
"description": "Facebook web connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-feishu-web",
|
||||
"version": "1.0.0",
|
||||
"description": "Feishu web connector.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>"
|
||||
}
|
42
packages/connectors/connector-feishu-web/package.json
Normal file
42
packages/connectors/connector-feishu-web/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-feishu-web",
|
||||
"version": "1.0.0",
|
||||
"description": "Feishu web connector.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-github",
|
||||
"version": "1.0.0",
|
||||
"description": "Github web connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"query-string": "^7.0.1"
|
||||
}
|
||||
}
|
43
packages/connectors/connector-github/package.json
Normal file
43
packages/connectors/connector-github/package.json
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"name": "@logto/connector-github",
|
||||
"version": "1.0.0",
|
||||
"description": "Github web connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^",
|
||||
"query-string": "^7.0.1"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-google",
|
||||
"version": "1.0.0",
|
||||
"description": "Google web connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>"
|
||||
}
|
42
packages/connectors/connector-google/package.json
Normal file
42
packages/connectors/connector-google/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-google",
|
||||
"version": "1.0.0",
|
||||
"description": "Google web connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-kakao",
|
||||
"version": "1.0.0",
|
||||
"description": "Kakao connector implementation.",
|
||||
"author": "Kyungyoon Kim. <ruddbs5302@gmail.com>"
|
||||
}
|
42
packages/connectors/connector-kakao/package.json
Normal file
42
packages/connectors/connector-kakao/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-kakao",
|
||||
"version": "1.0.0",
|
||||
"description": "Kakao connector implementation.",
|
||||
"author": "Kyungyoon Kim. <ruddbs5302@gmail.com>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-logto-email",
|
||||
"version": "1.0.0",
|
||||
"description": "Logto email connector.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {}
|
||||
}
|
42
packages/connectors/connector-logto-email/package.json
Normal file
42
packages/connectors/connector-logto-email/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-logto-email",
|
||||
"version": "1.0.0",
|
||||
"description": "Logto email connector.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-logto-sms",
|
||||
"version": "1.0.0",
|
||||
"description": "Logto SMS connector.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {}
|
||||
}
|
42
packages/connectors/connector-logto-sms/package.json
Normal file
42
packages/connectors/connector-logto-sms/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-logto-sms",
|
||||
"version": "1.0.0",
|
||||
"description": "Logto SMS connector.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-logto-social-demo",
|
||||
"version": "1.0.0",
|
||||
"description": "OAuth standard connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {}
|
||||
}
|
42
packages/connectors/connector-logto-social-demo/package.json
Normal file
42
packages/connectors/connector-logto-social-demo/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-logto-social-demo",
|
||||
"version": "1.0.0",
|
||||
"description": "OAuth standard connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-mock-standard-email",
|
||||
"version": "1.0.0",
|
||||
"description": "Mock Standard Email Service connector implementation for integration tests only.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"scripts": {
|
||||
"test": "echo No test available; exit 0;"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-mock-standard-email",
|
||||
"version": "1.0.0",
|
||||
"description": "Mock Standard Email Service connector implementation for integration tests only.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-mock-email",
|
||||
"version": "1.0.0",
|
||||
"description": "Mock Email Service connector implementation for integration tests only.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"scripts": {
|
||||
"test": "echo No test available; exit 0;"
|
||||
}
|
||||
}
|
42
packages/connectors/connector-mock-email/package.json
Normal file
42
packages/connectors/connector-mock-email/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-mock-email",
|
||||
"version": "1.0.0",
|
||||
"description": "Mock Email Service connector implementation for integration tests only.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-mock-sms",
|
||||
"version": "1.0.0",
|
||||
"description": "Mock SMS connector implementation for integration tests only.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"scripts": {
|
||||
"test": "echo No test available; exit 0;"
|
||||
}
|
||||
}
|
42
packages/connectors/connector-mock-sms/package.json
Normal file
42
packages/connectors/connector-mock-sms/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-mock-sms",
|
||||
"version": "1.0.0",
|
||||
"description": "Mock SMS connector implementation for integration tests only.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-mock-social",
|
||||
"version": "1.0.0",
|
||||
"description": "Social mock connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"scripts": {
|
||||
"test": "echo No test available; exit 0;"
|
||||
}
|
||||
}
|
42
packages/connectors/connector-mock-social/package.json
Normal file
42
packages/connectors/connector-mock-social/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-mock-social",
|
||||
"version": "1.0.0",
|
||||
"description": "Social mock connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-naver",
|
||||
"version": "1.0.0",
|
||||
"description": "Naver connector implementation.",
|
||||
"author": "Kyungyoon Kim. <ruddbs5302@gmail.com>"
|
||||
}
|
42
packages/connectors/connector-naver/package.json
Normal file
42
packages/connectors/connector-naver/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-naver",
|
||||
"version": "1.0.0",
|
||||
"description": "Naver connector implementation.",
|
||||
"author": "Kyungyoon Kim. <ruddbs5302@gmail.com>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-oauth",
|
||||
"version": "1.0.0",
|
||||
"description": "OAuth standard connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"query-string": "^7.0.1"
|
||||
}
|
||||
}
|
43
packages/connectors/connector-oauth2/package.json
Normal file
43
packages/connectors/connector-oauth2/package.json
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"name": "@logto/connector-oauth",
|
||||
"version": "1.0.0",
|
||||
"description": "OAuth standard connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^",
|
||||
"query-string": "^7.0.1"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-oidc",
|
||||
"version": "1.0.0",
|
||||
"description": "OIDC standard connector implementation.",
|
||||
"dependencies": {
|
||||
"@logto/core-kit": "1.0.0-beta.30",
|
||||
"jose": "^4.3.8",
|
||||
"nanoid": "^4.0.0"
|
||||
}
|
||||
}
|
44
packages/connectors/connector-oidc/package.json
Normal file
44
packages/connectors/connector-oidc/package.json
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"name": "@logto/connector-oidc",
|
||||
"version": "1.0.0",
|
||||
"description": "OIDC standard connector implementation.",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^",
|
||||
"@logto/core-kit": "workspace:^",
|
||||
"jose": "^4.3.8",
|
||||
"nanoid": "^4.0.0"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-saml",
|
||||
"version": "1.0.0",
|
||||
"description": "SAML standard connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"fast-xml-parser": "^4.0.13",
|
||||
"samlify": "2.7.7"
|
||||
}
|
||||
}
|
44
packages/connectors/connector-saml/package.json
Normal file
44
packages/connectors/connector-saml/package.json
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"name": "@logto/connector-saml",
|
||||
"version": "1.0.0",
|
||||
"description": "SAML standard connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^",
|
||||
"fast-xml-parser": "^4.0.13",
|
||||
"samlify": "2.7.7"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-sendgrid-email",
|
||||
"version": "1.0.0",
|
||||
"description": "SendGrid Email Service connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>"
|
||||
}
|
42
packages/connectors/connector-sendgrid-email/package.json
Normal file
42
packages/connectors/connector-sendgrid-email/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-sendgrid-email",
|
||||
"version": "1.0.0",
|
||||
"description": "SendGrid Email Service connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-smtp",
|
||||
"version": "1.0.0",
|
||||
"description": "SMTP connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"nodemailer": "^6.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/nodemailer": "^6.4.7"
|
||||
}
|
||||
}
|
46
packages/connectors/connector-smtp/package.json
Normal file
46
packages/connectors/connector-smtp/package.json
Normal file
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"name": "@logto/connector-smtp",
|
||||
"version": "1.0.0",
|
||||
"description": "SMTP connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^",
|
||||
"nodemailer": "^6.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/nodemailer": "^6.4.7"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-tencent-sms",
|
||||
"version": "1.0.0",
|
||||
"description": "Tencent SMS connector implementation.",
|
||||
"author": "StringKe"
|
||||
}
|
42
packages/connectors/connector-tencent-sms/package.json
Normal file
42
packages/connectors/connector-tencent-sms/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-tencent-sms",
|
||||
"version": "1.0.0",
|
||||
"description": "Tencent SMS connector implementation.",
|
||||
"author": "StringKe",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-twilio-sms",
|
||||
"version": "1.0.0",
|
||||
"description": "Twilio SMS connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>"
|
||||
}
|
42
packages/connectors/connector-twilio-sms/package.json
Normal file
42
packages/connectors/connector-twilio-sms/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-twilio-sms",
|
||||
"version": "1.0.0",
|
||||
"description": "Twilio SMS connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-wechat-native",
|
||||
"version": "1.0.0",
|
||||
"description": "WeChat native connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>"
|
||||
}
|
42
packages/connectors/connector-wechat-native/package.json
Normal file
42
packages/connectors/connector-wechat-native/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-wechat-native",
|
||||
"version": "1.0.0",
|
||||
"description": "WeChat native connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package",
|
||||
"name": "@logto/connector-wechat-web",
|
||||
"version": "1.0.0",
|
||||
"description": "Wechat Web connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>"
|
||||
}
|
42
packages/connectors/connector-wechat-web/package.json
Normal file
42
packages/connectors/connector-wechat-web/package.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"name": "@logto/connector-wechat-web",
|
||||
"version": "1.0.0",
|
||||
"description": "Wechat Web connector implementation.",
|
||||
"author": "Silverhand Inc. <contact@silverhand.io>",
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/index.js",
|
||||
"exports": "./lib/index.js",
|
||||
"license": "MPL-2.0",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"lib",
|
||||
"docs",
|
||||
"logo.svg",
|
||||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
|
||||
"lint": "eslint --ext .ts src",
|
||||
"lint:report": "pnpm lint --format json --output-file report.json",
|
||||
"test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test": "pnpm build:test && pnpm test:only",
|
||||
"test:ci": "pnpm test:only --silent --coverage",
|
||||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
|
@ -11,8 +11,6 @@
|
|||
"logo-dark.svg"
|
||||
],
|
||||
"scripts": {
|
||||
"package:sync": "cd ../../../ && pnpm package:sync",
|
||||
"package:update": "cd ../../../ && pnpm package:update",
|
||||
"precommit": "lint-staged",
|
||||
"build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
|
||||
"build": "rm -rf lib/ && tsc -p tsconfig.build.json --noEmit && rollup -c",
|
||||
|
@ -25,7 +23,6 @@
|
|||
"prepublishOnly": "pnpm build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@logto/connector-kit": "workspace:^",
|
||||
"@silverhand/essentials": "^2.5.0",
|
||||
"got": "^12.5.3",
|
||||
"snakecase-keys": "^5.4.4",
|
||||
|
@ -40,7 +37,7 @@
|
|||
"@silverhand/eslint-config": "3.0.0",
|
||||
"@silverhand/ts-config": "3.0.0",
|
||||
"@types/jest": "^29.4.0",
|
||||
"@types/node": "^16.11.18",
|
||||
"@types/node": "^18.11.18",
|
||||
"@types/supertest": "^2.0.11",
|
||||
"eslint": "^8.34.0",
|
||||
"jest": "^29.5.0",
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
// Sync limited info of all `package.json` to `package.extend.json`.
|
||||
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
|
||||
// Assuming execution context `packages/connectors`
|
||||
const sync = async () => {
|
||||
const packagesDirectory = './';
|
||||
const packages = await fs.readdir(packagesDirectory);
|
||||
|
||||
await Promise.all(
|
||||
packages
|
||||
.filter((packageName) => packageName.startsWith('connector-'))
|
||||
.map(async (packageJson) => {
|
||||
const current = JSON.parse(
|
||||
await fs.readFile(path.join(packagesDirectory, packageJson, 'package.json'), 'utf8')
|
||||
);
|
||||
const extendPath = path.join(packagesDirectory, packageJson, 'package.extend.json');
|
||||
const extended = JSON.parse(await fs.readFile(extendPath, 'utf8'));
|
||||
|
||||
// eslint-disable-next-line @silverhand/fp/no-mutation
|
||||
extended.version = current.version;
|
||||
|
||||
await fs.writeFile(extendPath, JSON.stringify(extended, undefined, 2) + '\n');
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
await sync();
|
58
packages/connectors/templates/sync-preset.js
Normal file
58
packages/connectors/templates/sync-preset.js
Normal file
|
@ -0,0 +1,58 @@
|
|||
// Merge all `package.extend.json` to the template and write to `package.json`.
|
||||
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
|
||||
const isDependencyKey = (key) => key.toLowerCase().endsWith('dependencies');
|
||||
const allowedCustomKeys = Object.freeze(['name', 'version', 'description', 'author']);
|
||||
|
||||
// Assuming execution context `packages/connectors`
|
||||
const templateJson = Object.fromEntries(
|
||||
Object.entries(JSON.parse(await fs.readFile('templates/package.json'))).filter(
|
||||
// Filter out dependency fields since they'll be handled by the hook in `.pnpmfile.cjs`
|
||||
([key]) => !isDependencyKey(key)
|
||||
)
|
||||
);
|
||||
const templateKeys = Object.keys(templateJson);
|
||||
|
||||
const sync = async () => {
|
||||
const packagesDirectory = './';
|
||||
const packages = await fs.readdir(packagesDirectory);
|
||||
|
||||
await Promise.all(
|
||||
packages
|
||||
.filter((packageName) => packageName.startsWith('connector-'))
|
||||
.map(async (packageName) => {
|
||||
const packageJsonPath = path.join(packagesDirectory, packageName, 'package.json');
|
||||
|
||||
// Sync package.json
|
||||
const current = JSON.parse(await fs.readFile(packageJsonPath, 'utf8'));
|
||||
|
||||
const invalidKeys = Object.keys(current).filter(
|
||||
(key) =>
|
||||
!isDependencyKey(key) && !allowedCustomKeys.includes(key) && !templateKeys.includes(key)
|
||||
);
|
||||
if (invalidKeys.length > 0) {
|
||||
throw new Error(
|
||||
`Invalid key${invalidKeys.length === 1 ? '' : 's'} ${invalidKeys
|
||||
.map((key) => `"${key}"`)
|
||||
.join(', ')} found in ${packageName}.` +
|
||||
'\n' +
|
||||
`Allowed custom keys are: ${allowedCustomKeys.map((key) => `"${key}"`).join(', ')}.`
|
||||
);
|
||||
}
|
||||
|
||||
await fs.writeFile(
|
||||
packageJsonPath,
|
||||
JSON.stringify({ ...current, ...templateJson }, undefined, 2) + '\n'
|
||||
);
|
||||
|
||||
// Copy preset
|
||||
await fs.cp('templates/preset', path.join(packagesDirectory, packageName), {
|
||||
recursive: true,
|
||||
});
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
await sync();
|
|
@ -1,104 +0,0 @@
|
|||
// Merge all `package.extend.json` to the template and write to `package.json`.
|
||||
|
||||
import { existsSync } from 'node:fs';
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
|
||||
import templateJson from './package.json' assert { type: "json" };
|
||||
|
||||
const dependencyFields = [
|
||||
'dependencies',
|
||||
'devDependencies',
|
||||
'peerDependencies',
|
||||
'optionalDependencies',
|
||||
];
|
||||
|
||||
const dependencyChanged = (json1, json2) => {
|
||||
return !dependencyFields.every((field) => {
|
||||
if (typeof json1[field] !== typeof json2[field]) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof json1[field] !== 'object' || json1[field] === null) {
|
||||
return json1[field] === json2[field];
|
||||
}
|
||||
|
||||
const composed1 = Object.entries(json1[field])
|
||||
.slice()
|
||||
.sort(([a], [b]) => a.localeCompare(b))
|
||||
.join(',');
|
||||
const composed2 = Object.entries(json2[field])
|
||||
.slice()
|
||||
.sort(([a], [b]) => a.localeCompare(b))
|
||||
.join(',');
|
||||
|
||||
return composed1 === composed2;
|
||||
});
|
||||
};
|
||||
|
||||
// Assuming execution context `packages/connectors`
|
||||
const sync = async () => {
|
||||
const packagesDirectory = './';
|
||||
const packages = await fs.readdir(packagesDirectory);
|
||||
// eslint-disable-next-line @silverhand/fp/no-let
|
||||
let shouldError = false;
|
||||
|
||||
// Disable `no-mutation` for easier json updates
|
||||
/* eslint-disable @silverhand/fp/no-mutation */
|
||||
await Promise.all(
|
||||
packages
|
||||
.filter((packageName) => packageName.startsWith('connector-'))
|
||||
.map(async (packageName) => {
|
||||
// Copy preset
|
||||
await fs.cp('templates/preset', path.join(packagesDirectory, packageName), {
|
||||
recursive: true,
|
||||
});
|
||||
|
||||
// Sync package.json
|
||||
const extended = JSON.parse(
|
||||
await fs.readFile(
|
||||
path.join(packagesDirectory, packageName, 'package.extend.json'),
|
||||
'utf8'
|
||||
)
|
||||
);
|
||||
const result = { ...templateJson };
|
||||
|
||||
for (const [key, value] of Object.entries(extended)) {
|
||||
if (key === '$schema') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Array.isArray(result[key])) {
|
||||
result[key] = [...result[key], ...value];
|
||||
} else if (typeof value === 'object' && value !== null) {
|
||||
result[key] = { ...result[key], ...value };
|
||||
} else {
|
||||
result[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
const target = path.join(packagesDirectory, packageName, 'package.json');
|
||||
|
||||
if (!existsSync(target)) {
|
||||
console.warn(
|
||||
`Creating ${target}. If this is a new package, run \`pnpm i\` again to update the lockfile.`
|
||||
);
|
||||
} else if (dependencyChanged(JSON.parse(await fs.readFile(target, 'utf8')), result)) {
|
||||
console.warn(`Updating dependencies of ${target}`);
|
||||
shouldError = true;
|
||||
}
|
||||
|
||||
await fs.writeFile(target, JSON.stringify(result, undefined, 2) + '\n');
|
||||
})
|
||||
);
|
||||
/* eslint-enable @silverhand/fp/no-mutation */
|
||||
|
||||
if (!process.argv.includes('--silent') && shouldError) {
|
||||
console.log(
|
||||
'**CONNECTOR SYNC SCRIPT**\n\nThe dependencies in `package.json` changed, run `pnpm i` again to update the lockfile.'
|
||||
);
|
||||
throw new Error('Need to run `pnpm i` again');
|
||||
}
|
||||
};
|
||||
|
||||
await sync();
|
460
pnpm-lock.yaml
460
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue