@deveco-test/deveco-cli-knowledgebase 1.3.6-Test.9 → 1.3.10-Test.2
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/engine/index.d.ts +4 -4
- package/dist/engine/index.js +14 -6
- package/docs.zip +2 -2
- package/index.js +7 -7
- package/index.zip +0 -0
- package/package.json +2 -2
package/dist/engine/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { Q as QUERY_MAX_RAW_CHARS } from './constants-Bi5VwlSi.js';
|
|
2
2
|
|
|
3
|
+
declare const CATALOG_NAMES: readonly ["harmonyos-guides", "harmonyos-references", "best-practices", "harmonyos-faqs", "harmonyos-releases", "harmonyos-roadmap"];
|
|
4
|
+
type CatalogName = (typeof CATALOG_NAMES)[number];
|
|
5
|
+
declare const CATALOG_TITLES: Record<CatalogName, string>;
|
|
6
|
+
|
|
3
7
|
declare const apiVersion: 1;
|
|
4
8
|
interface CreateDocsEngineOptions {
|
|
5
9
|
cacheDir: string;
|
|
@@ -34,10 +38,6 @@ interface DocsEngine {
|
|
|
34
38
|
}
|
|
35
39
|
declare function createDocsEngine(options: CreateDocsEngineOptions): Promise<DocsEngine>;
|
|
36
40
|
|
|
37
|
-
declare const CATALOG_NAMES: readonly ["harmonyos-guides", "harmonyos-references", "best-practices", "harmonyos-faqs", "harmonyos-releases", "harmonyos-roadmap"];
|
|
38
|
-
type CatalogName = (typeof CATALOG_NAMES)[number];
|
|
39
|
-
declare const CATALOG_TITLES: Record<CatalogName, string>;
|
|
40
|
-
|
|
41
41
|
type DocStorageAssertMode = 'read' | 'write';
|
|
42
42
|
interface AssertDocStorageOptions {
|
|
43
43
|
/** `read` skips `.tmp`; `write` is full (default). */
|
package/dist/engine/index.js
CHANGED
|
@@ -39,7 +39,7 @@ function resolveCanonicalPath(value) {
|
|
|
39
39
|
let current = resolved;
|
|
40
40
|
for (; ; ) {
|
|
41
41
|
try {
|
|
42
|
-
const real = fs.realpathSync(current);
|
|
42
|
+
const real = fs.realpathSync.native(current);
|
|
43
43
|
return missing.length === 0 ? real : path.join(real, ...missing.reverse());
|
|
44
44
|
} catch (error) {
|
|
45
45
|
if (error.code !== "ENOENT") {
|
|
@@ -108,8 +108,16 @@ var DOC_SECTION_BUDGET_BODY = 200;
|
|
|
108
108
|
var DOC_SNIPPET_MAX_CHARS = 200;
|
|
109
109
|
var DOC_SNIPPET_CONTEXT_CHARS = 40;
|
|
110
110
|
var INSERT_BATCH_SIZE = 500;
|
|
111
|
-
var
|
|
112
|
-
|
|
111
|
+
var CATALOG_NAME_TO_FOLDER = {
|
|
112
|
+
"harmonyos-guides": "guides",
|
|
113
|
+
"harmonyos-references": "harmonyos-references",
|
|
114
|
+
"best-practices": "best-practices",
|
|
115
|
+
"harmonyos-faqs": "faq",
|
|
116
|
+
"harmonyos-releases": "release-notes",
|
|
117
|
+
"harmonyos-roadmap": "changelogs"
|
|
118
|
+
};
|
|
119
|
+
var CATALOG_FOLDER_TO_ID = Object.fromEntries(
|
|
120
|
+
CATALOG_NAMES.map((name, index) => [CATALOG_NAME_TO_FOLDER[name], index])
|
|
113
121
|
);
|
|
114
122
|
var CATALOG_NAME_TO_ID = Object.fromEntries(
|
|
115
123
|
CATALOG_NAMES.map((name, index) => [name, index])
|
|
@@ -376,9 +384,9 @@ function documentIdToZipEntries(documentId) {
|
|
|
376
384
|
throw new Error("Invalid document ID: path traversal is not allowed.");
|
|
377
385
|
}
|
|
378
386
|
return [
|
|
379
|
-
`
|
|
387
|
+
`kb/source/${normalized}.md`,
|
|
380
388
|
`${normalized}.md`,
|
|
381
|
-
`
|
|
389
|
+
`kb/source/${normalized}`,
|
|
382
390
|
normalized
|
|
383
391
|
];
|
|
384
392
|
}
|
|
@@ -1582,7 +1590,7 @@ var TAIL_CATALOG_IDS = new Set(
|
|
|
1582
1590
|
TAIL_SEARCH_CATALOGS.map((name) => CATALOG_NAME_TO_ID[name])
|
|
1583
1591
|
);
|
|
1584
1592
|
var TAIL_CATALOG_DOCUMENT_PREFIXES = TAIL_SEARCH_CATALOGS.map(
|
|
1585
|
-
(name) => `${
|
|
1593
|
+
(name) => `${CATALOG_NAME_TO_FOLDER[name]}/`
|
|
1586
1594
|
);
|
|
1587
1595
|
function isTailSearchCatalogId(catalogId) {
|
|
1588
1596
|
return TAIL_CATALOG_IDS.has(catalogId);
|
package/docs.zip
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/docs.zip
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 54372054 bytes
|
|
4
|
+
sha256: dda8be681fa0e049ec2a999f3aa6766b96f949b996fba653d8009f8e619143c0
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2026 Huawei Device Co., Ltd.
|
|
3
|
-
* SPDX-License-Identifier: MIT
|
|
4
|
-
*
|
|
5
|
-
* Bridge file: re-exports the engine's public API from dist/engine/.
|
|
6
|
-
*/
|
|
7
|
-
export * from './dist/engine/index.js';
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Huawei Device Co., Ltd.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*
|
|
5
|
+
* Bridge file: re-exports the engine's public API from dist/engine/.
|
|
6
|
+
*/
|
|
7
|
+
export * from './dist/engine/index.js';
|
package/index.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deveco-test/deveco-cli-knowledgebase",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.10-Test.2",
|
|
4
4
|
"description": "Bundled Chinese HarmonyOS documentation for DevEco CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node": ">=22"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@sqlite.org/sqlite-wasm": "
|
|
27
|
+
"@sqlite.org/sqlite-wasm": "3.54.1-build1",
|
|
28
28
|
"jieba-wasm": "^2.4.0",
|
|
29
29
|
"yauzl": "^3.2.0",
|
|
30
30
|
"adm-zip": "0.6.1",
|