@lark-apaas/db-schema-sync 0.1.22 → 0.1.23-alpha.20261024072007

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
@@ -7,7 +7,7 @@ import {
7
7
  generateSchema,
8
8
  resolveEnvOptions,
9
9
  validateGeneratedSchema
10
- } from "./chunk-HWZKIZ4L.js";
10
+ } from "./chunk-A7OQM4KM.js";
11
11
 
12
12
  // node_modules/dotenv/package.json
13
13
  var require_package = __commonJS({
@@ -478,6 +478,21 @@ var require_dist = __commonJS({
478
478
  );
479
479
  return normalized;
480
480
  }
481
+ function withPpeLaneHeader(headers) {
482
+ const entries = Object.entries(headers);
483
+ const isSet = (value) => value !== void 0 && value !== null;
484
+ const ttEnv = entries.filter(([key, value]) => key.toLowerCase() === "x-tt-env" && isSet(value)).map(([, value]) => String(value).trim()).join(", ");
485
+ const usePpeKeys = entries.filter(([key]) => key.toLowerCase() === "x-use-ppe");
486
+ if (!ttEnv.toLowerCase().startsWith("ppe") || usePpeKeys.some(([, value]) => isSet(value))) {
487
+ return headers;
488
+ }
489
+ const result2 = { ...headers };
490
+ for (const [key] of usePpeKeys) {
491
+ delete result2[key];
492
+ }
493
+ result2["x-use-ppe"] = "1";
494
+ return result2;
495
+ }
481
496
  var HttpError = class _HttpError extends Error {
482
497
  isHttpError = true;
483
498
  response;
@@ -647,7 +662,7 @@ var require_dist = __commonJS({
647
662
  } catch (error) {
648
663
  return Promise.reject(error);
649
664
  }
650
- mergedConfig.headers = normalizeHeaders(mergedConfig.headers);
665
+ mergedConfig.headers = withPpeLaneHeader(normalizeHeaders(mergedConfig.headers));
651
666
  const fullUrl = this.buildUrl(mergedConfig.url, mergedConfig.params);
652
667
  const timeout = mergedConfig.timeout || this.defaultConfig.timeout || 5e3;
653
668
  const controller = new AbortController();
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  normalizeApiResponse,
7
7
  resolveEnvOptions,
8
8
  validateGeneratedSchema
9
- } from "./chunk-HWZKIZ4L.js";
9
+ } from "./chunk-A7OQM4KM.js";
10
10
  export {
11
11
  generateSchema,
12
12
  generateSchemaCode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/db-schema-sync",
3
- "version": "0.1.22",
3
+ "version": "0.1.23-alpha.20261024072007",
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.8",
32
+ "@lark-apaas/http-client": "0.1.9-alpha.20261024072008",
33
33
  "dotenv": "^17.3.1",
34
34
  "tiny-pinyin": "^1.3.2"
35
35
  },