@lark-apaas/db-schema-sync 0.1.6-alpha.2 → 0.1.6-alpha.4

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/bin.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  __toESM,
7
7
  generateSchema,
8
8
  resolveEnvOptions
9
- } from "./chunk-TQCGDNFC.js";
9
+ } from "./chunk-5ZXUJ7KP.js";
10
10
 
11
11
  // node_modules/dotenv/package.json
12
12
  var require_package = __commonJS({
@@ -268,11 +268,6 @@ var require_dist = __commonJS({
268
268
  const accessKeyEnv = options.accessKeyEnv || DEFAULT_ACCESS_KEY_ENV;
269
269
  const secretKeyEnv = options.secretKeyEnv || DEFAULT_SECRET_KEY_ENV;
270
270
  const accessKey = options.accessKey ?? (process.env[accessKeyEnv] || "");
271
- if (!accessKey) {
272
- throw new Error(
273
- `\u5E73\u53F0\u9274\u6743\u9700\u8981 access key,\u8BF7\u8BBE\u7F6E\u73AF\u5883\u53D8\u91CF ${accessKeyEnv} \u6216\u4F20 options.accessKey`
274
- );
275
- }
276
271
  const secretKey = options.secretKey ?? (process.env[secretKeyEnv] || "");
277
272
  const expireTimeMs = options.expireTimeMs ?? DEFAULT_JWT_EXPIRE_TIME_MS;
278
273
  const tokenManager = new JWTTokenManager({
@@ -284,13 +279,8 @@ var require_dist = __commonJS({
284
279
  const tokenEnv = options.tokenEnv || DEFAULT_TOKEN_ENV;
285
280
  const platformToken = options.token ?? (process.env[tokenEnv] || "");
286
281
  const staticTokenSource = platformToken ? new StaticTokenSource(platformToken) : null;
287
- if (!staticTokenSource && !secretKey) {
288
- throw new Error(
289
- `\u5E73\u53F0\u9274\u6743\u9700\u8981 token \u6216 secret key,\u8BF7\u8BBE\u7F6E\u73AF\u5883\u53D8\u91CF ${tokenEnv}(\u63A8\u8350) \u6216 ${secretKeyEnv}`
290
- );
291
- }
292
282
  const primaryTokenSource = staticTokenSource ?? tokenManager;
293
- const fallbackTokenSource = staticTokenSource && secretKey ? tokenManager : null;
283
+ const fallbackTokenSource = staticTokenSource ? tokenManager : null;
294
284
  const clientTokenEnv = options.clientTokenEnv || DEFAULT_CLIENT_TOKEN_ENV;
295
285
  interceptors.request.use((config) => {
296
286
  ensureNoAccessKeyOverride("request.platformAuth.customClaims", config.platformAuth?.customClaims);
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  generateSchemaFromData,
6
6
  normalizeApiResponse,
7
7
  resolveEnvOptions
8
- } from "./chunk-TQCGDNFC.js";
8
+ } from "./chunk-5ZXUJ7KP.js";
9
9
  export {
10
10
  generateSchema,
11
11
  generateSchemaCode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/db-schema-sync",
3
- "version": "0.1.6-alpha.2",
3
+ "version": "0.1.6-alpha.4",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "node": ">=18.0.0"
30
30
  },
31
31
  "dependencies": {
32
- "@lark-apaas/http-client": "0.1.7-alpha.8",
32
+ "@lark-apaas/http-client": "0.1.7-alpha.9",
33
33
  "dotenv": "^17.3.1",
34
34
  "tiny-pinyin": "^1.3.2"
35
35
  },