@lovrabet/lovrabet-cli 2.3.8 → 2.3.9
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/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet/guides/development-intent-handoff.md +7 -5
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a27_0x43e043=a27_0x1eb6;(function(_0x20d48d,_0x33261a){const _0x5e1598=a27_0x1eb6,_0x88f9bc=_0x20d48d();while(!![]){try{const _0x2874d9=parseInt(_0x5e1598(0x221))/0x1*(-parseInt(_0x5e1598(0x203))/0x2)+-parseInt(_0x5e1598(0x201))/0x3+-parseInt(_0x5e1598(0x202))/0x4*(-parseInt(_0x5e1598(0x1f6))/0x5)+-parseInt(_0x5e1598(0x1cb))/0x6*(-parseInt(_0x5e1598(0x20f))/0x7)+parseInt(_0x5e1598(0x1f7))/0x8*(-parseInt(_0x5e1598(0x1c3))/0x9)+parseInt(_0x5e1598(0x1c7))/0xa*(-parseInt(_0x5e1598(0x1e3))/0xb)+parseInt(_0x5e1598(0x1cc))/0xc*(parseInt(_0x5e1598(0x1c9))/0xd);if(_0x2874d9===_0x33261a)break;else _0x88f9bc['push'](_0x88f9bc['shift']());}catch(_0x4edf2c){_0x88f9bc['push'](_0x88f9bc['shift']());}}}(a27_0x3ca1,0x5449a));import{dataImportExcel}from'./import-excel.js';import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a27_0x43e043(0x1e4),'operation':a27_0x43e043(0x1e4),'risk':a27_0x43e043(0x1fd),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a27_0x43e043(0x1c5)+a27_0x43e043(0x1f5),'helpExtra':[a27_0x43e043(0x227),a27_0x43e043(0x1c4),a27_0x43e043(0x1dc),'\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}',a27_0x43e043(0x1cd),a27_0x43e043(0x1f3),'\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a27_0x43e043(0x1e0),'\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}',a27_0x43e043(0x1c1),'\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','',a27_0x43e043(0x21f),a27_0x43e043(0x1d2),a27_0x43e043(0x21b),'',a27_0x43e043(0x213),a27_0x43e043(0x215),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]',a27_0x43e043(0x204),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a27_0x43e043(0x224),'',a27_0x43e043(0x214),a27_0x43e043(0x1db),a27_0x43e043(0x1ff),a27_0x43e043(0x1ca),'\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.',a27_0x43e043(0x1fe),'\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27',a27_0x43e043(0x20a)]['join']('\x0a')},{'command':a27_0x43e043(0x1d5),'operation':a27_0x43e043(0x1d5),'risk':a27_0x43e043(0x1fd),'paramsRequired':!![],'description':a27_0x43e043(0x1f0),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a27_0x43e043(0x226),'operation':a27_0x43e043(0x226),'risk':a27_0x43e043(0x206),'paramsRequired':!![],'description':a27_0x43e043(0x22a),'confirmationDescription':a27_0x43e043(0x1fa),'paramsHint':a27_0x43e043(0x209)},{'command':a27_0x43e043(0x1c2),'operation':a27_0x43e043(0x1c2),'risk':a27_0x43e043(0x206),'paramsRequired':!![],'description':a27_0x43e043(0x1ee),'helpExtra':[a27_0x43e043(0x1d3),'\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.',a27_0x43e043(0x1f4),a27_0x43e043(0x20c),a27_0x43e043(0x1ef),a27_0x43e043(0x1ea),'\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.',a27_0x43e043(0x210),'\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md',a27_0x43e043(0x211)]['join']('\x0a'),'confirmationDescription':a27_0x43e043(0x212),'paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':'update','operation':a27_0x43e043(0x205),'risk':'write','paramsRequired':!![],'description':a27_0x43e043(0x217),'confirmationDescription':a27_0x43e043(0x1de),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20'+a27_0x43e043(0x1da)},{'command':a27_0x43e043(0x1e8),'operation':a27_0x43e043(0x1e8),'risk':a27_0x43e043(0x1f2),'paramsRequired':!![],'description':a27_0x43e043(0x21d),'confirmationDescription':a27_0x43e043(0x1f8),'paramsHint':a27_0x43e043(0x1fc)},{'command':a27_0x43e043(0x1e1),'operation':'aggregate','risk':a27_0x43e043(0x1fd),'paramsRequired':![],'description':a27_0x43e043(0x21a),'paramsHint':a27_0x43e043(0x1fb)+a27_0x43e043(0x1eb),'helpExtra':[a27_0x43e043(0x220),a27_0x43e043(0x20b),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}',a27_0x43e043(0x20d),a27_0x43e043(0x1dd),'\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}',a27_0x43e043(0x1e7),'',a27_0x43e043(0x1d4),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)',a27_0x43e043(0x1d7),'\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}',a27_0x43e043(0x219),'',a27_0x43e043(0x1d0),a27_0x43e043(0x1ec),a27_0x43e043(0x1d8),a27_0x43e043(0x229),'',a27_0x43e043(0x1c8),a27_0x43e043(0x20e),a27_0x43e043(0x222),a27_0x43e043(0x1e9),'\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','',a27_0x43e043(0x1d6),a27_0x43e043(0x207),a27_0x43e043(0x1e2),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a27_0x43e043(0x1e5),'',a27_0x43e043(0x228)][a27_0x43e043(0x218)]('\x0a')}];function a27_0x3ca1(){const _0xdace6a=['\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','3212027FyDLRL','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20PAGINATION','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','description','Update\x20an\x20existing\x20data\x20record','join','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','POST','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','paramsRequired','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20AGGREGATE\x20TYPES','172001IARVmF','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','map','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','paramsHint','create','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','Create\x20one\x20record\x20in\x20the\x20dataset','params','batch','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','batchCreate','5999481jFHJbu','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','data\x20','20pIAGoh','\x20\x20DATASET\x20BOUNDARY','26NxUwdx','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','6kGacwJ','10689984npJqbb','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','risk','code','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','operation','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20EXCEL\x20ROUTES','\x20\x20PARAMS\x20STRUCTURE','getOne','\x20\x20EXAMPLES','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','str','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','length','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','aggregate','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','2123671PmsrXs','filter','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','dryRun','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','delete','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','build','Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','Get\x20a\x20single\x20record\x20by\x20ID','\x20completed\x20in\x20','high-risk-write','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','454095mkORht','8sUJzlQ','Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','command','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','read','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','confirmationDescription','1252104jzCemf','4JmCwTj','6tGSYeP','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','update','write','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','Preview:\x20data\x20','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'];a27_0x3ca1=function(){return _0xdace6a;};return a27_0x3ca1();}function makeDataCommand(_0x4d578f){const _0xc570f4=a27_0x43e043,_0x5c8bd4=_0xc570f4(0x1c6)+_0x4d578f['command'],_0x7c0c76={'service':'data','command':_0x4d578f[_0xc570f4(0x1f9)],'description':_0x4d578f['description'],'risk':_0x4d578f[_0xc570f4(0x1ce)],..._0x4d578f['confirmationDescription']?{'confirmationDescription':_0x4d578f[_0xc570f4(0x200)]}:{},'helpExtra':_0x4d578f['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x4d578f[_0xc570f4(0x225)]}],'validate':async _0x4338cc=>{const _0xf78801=_0xc570f4;_0x4d578f[_0xf78801(0x21e)]&&requireAnyOf(_0x4338cc,[_0xf78801(0x22b)],_0x5c8bd4),_0x4d578f[_0xf78801(0x1d1)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4338cc[_0xf78801(0x1d9)](_0xf78801(0x22b)))),_0x4d578f[_0xf78801(0x1d1)]===_0xf78801(0x205)&&parseUpdateIdsFromParams(parseJsonParams(_0x4338cc[_0xf78801(0x1d9)](_0xf78801(0x22b)))??{});},async 'execute'(_0x23e98c){const _0x3bb936=_0xc570f4,_0x294a06=_0x23e98c[_0x3bb936(0x1d9)](_0x3bb936(0x1cf)),_0x31bfc1=_0x4d578f[_0x3bb936(0x1d1)]===_0x3bb936(0x1c2)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x23e98c[_0x3bb936(0x1d9)](_0x3bb936(0x22b)))):parseJsonParams(_0x23e98c[_0x3bb936(0x1d9)]('params'))??{},_0xa9cc9b=_0x4d578f[_0x3bb936(0x1d1)]===_0x3bb936(0x205)?parseUpdateIdsFromParams(_0x31bfc1):undefined,_0x37fed7=_0xa9cc9b?normalizeUpdateParamsForRuntime(_0x31bfc1,_0xa9cc9b):_0x31bfc1,_0x44b75a=Date['now'](),_0x4e86a4=await executeData(_0x294a06,_0x4d578f['operation'],_0x37fed7),_0x49c52f=Date['now']()-_0x44b75a,_0x1eab72=_0xa9cc9b&&_0xa9cc9b[_0x3bb936(0x1df)]>0x1?buildBatchUpdateResult(_0xa9cc9b,_0x4e86a4):_0x4e86a4;return{'ok':!![],'data':{'result':_0x1eab72,'elapsed':_0x49c52f},'message':_0x3bb936(0x1c6)+_0x4d578f['command']+_0x3bb936(0x1f1)+_0x49c52f+'ms'};}};return _0x4d578f[_0xc570f4(0x1ce)]!=='read'&&(_0x7c0c76[_0xc570f4(0x1e6)]=async _0x5edf35=>{const _0xe5d305=_0xc570f4,_0x3ef97b=_0x5edf35[_0xe5d305(0x1d9)](_0xe5d305(0x1cf)),_0x2cc941=_0x4d578f['operation']==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x5edf35[_0xe5d305(0x1d9)](_0xe5d305(0x22b)))):parseJsonParams(_0x5edf35[_0xe5d305(0x1d9)]('params'))??{};let _0x1d4344=_0x2cc941;if(_0x4d578f[_0xe5d305(0x1d1)]===_0xe5d305(0x205)){const _0x364ff6=parseUpdateIdsFromParams(_0x2cc941);_0x1d4344=normalizeUpdateParamsForRuntime(_0x2cc941,_0x364ff6);}return dryRun(_0xe5d305(0x21c),'/api/{appCode}/'+_0x3ef97b+'/'+_0x4d578f['operation'])['body'](_0x1d4344)[_0xe5d305(0x216)](_0xe5d305(0x208)+_0x4d578f['command']+'\x20on\x20dataset\x20'+_0x3ef97b)[_0xe5d305(0x1ed)]();}),_0x7c0c76;}export const dataDefinitions=[...specs[a27_0x43e043(0x223)](makeDataCommand),dataImportExcel];function a27_0x1eb6(_0x126cf9,_0x4239b1){_0x126cf9=_0x126cf9-0x1c1;const _0x3ca1a5=a27_0x3ca1();let _0x1eb697=_0x3ca1a5[_0x126cf9];return _0x1eb697;}function buildBatchUpdateResult(_0x3b9b99,_0x493bc3){const _0x38431e=a27_0x43e043;return{'operation':_0x38431e(0x205),'mode':_0x38431e(0x22c),'ids':_0x3b9b99,'total':_0x3b9b99[_0x38431e(0x1df)],'result':_0x493bc3};}
|
|
1
|
+
const a27_0x4f60fb=a27_0x5a65;(function(_0x28c032,_0x26a803){const _0x381cef=a27_0x5a65,_0x53a4d9=_0x28c032();while(!![]){try{const _0x5349f2=parseInt(_0x381cef(0xb1))/0x1*(-parseInt(_0x381cef(0xc4))/0x2)+parseInt(_0x381cef(0x94))/0x3+parseInt(_0x381cef(0x91))/0x4*(parseInt(_0x381cef(0x88))/0x5)+parseInt(_0x381cef(0xa6))/0x6*(parseInt(_0x381cef(0x84))/0x7)+parseInt(_0x381cef(0xa0))/0x8*(-parseInt(_0x381cef(0xb3))/0x9)+-parseInt(_0x381cef(0x85))/0xa+parseInt(_0x381cef(0xa3))/0xb;if(_0x5349f2===_0x26a803)break;else _0x53a4d9['push'](_0x53a4d9['shift']());}catch(_0x224ef5){_0x53a4d9['push'](_0x53a4d9['shift']());}}}(a27_0xa6ce,0xae172));function a27_0xa6ce(){const _0x4ae00c=['\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','str','read','57592laGjir','Writes\x20one\x20new\x20business\x20record\x20to\x20the\x20current\x20app\x20dataset.\x20It\x20is\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','8140121ChsTIk','risk','aggregate','33486zyxNVY','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','\x20\x20\x20\x20Non-Excel\x20batchCreate\x20remains\x20available\x20for\x20METADATA\x20and\x20DB_TABLE.','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','paramsRequired','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20on\x20dataset\x20','1lQAroz','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','225HJSJad','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20EXCEL\x20ROUTES','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20--dry-run\x20previews\x20the\x20request\x20only;\x20it\x20does\x20not\x20validate\x20server\x20constraints\x20or\x20write\x20permissions.','delete','map','\x20\x20\x20\x20select/where/having/groupBy\x20must\x20use\x20real\x20dataset\x20fields','data','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','getOne','high-risk-write','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','update','Update\x20an\x20existing\x20data\x20record','1261902CqRUXx','POST','length','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filters\x20using\x20real\x20dataset\x20fields,\x20e.g.\x20{\x22category_id\x22:{\x22$notNull\x22:true}}','params','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20METADATA:\x20use\x20lovrabet\x20data\x20import-excel\x20with\x20checkpoint\x20recovery.','\x20\x20\x20\x20METADATA\x20datasets\x20do\x20not\x20support\x20aggregate\x20or\x20Custom\x20SQL','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20Built-in\x20Skill\x20guide:\x20references/lovrabet-db-table-excel-import.md','create','filter','\x20\x20\x20\x20aggregate[].alias\x20defines\x20the\x20output\x20field\x20name\x20only','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\x20\x20AGGREGATE\x20TYPES','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20EXAMPLES','paramsHint','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','Preview:\x20data\x20','command','\x20\x20AGGREGATE\x20ALIAS\x20BOUNDARY','data\x20','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','Delete\x20data\x20records\x20(non-interactive\x20mode\x20requires\x20--yes)','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20aggregate\x20supports\x20a\x20single\x20DB_TABLE\x20dataset\x20only','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20DB_TABLE:\x20inspect\x20dataset\x20detail,\x20validate\x20the\x20full\x20file\x20and\x20confirmed\x20unique\x20business\x20keys,','\x20\x20\x20\x20This\x20command\x20sends\x20one\x20prepared\x20batch;\x20it\x20does\x20not\x20read\x20XLSX\x20or\x20split\x20batches.','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','helpExtra','join','\x20\x20\x20\x20JOIN\x20and\x20cross-table\x20aggregation\x20require\x20an\x20existing\x20trusted\x20Custom\x20SQL','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','483lpDVrf','1195060TcZLch','Filter\x20dataset\x20records\x20with\x20query\x20conditions','build','2250845gwhwqR','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','write','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','operation','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','confirmationDescription','4FoMgje','batchCreate','description','204711bZrJOz','\x20\x20\x20\x20choose\x20the\x20capability\x20before\x20execution;\x20never\x20fall\x20back\x20at\x20runtime','dryRun','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','Writes\x20multiple\x20new\x20business\x20records\x20to\x20the\x20current\x20app\x20dataset.\x20They\x20are\x20saved\x20immediately\x20after\x20confirmation.','\x20\x20PAGINATION'];a27_0xa6ce=function(){return _0x4ae00c;};return a27_0xa6ce();}import{dataImportExcel}from'./import-excel.js';import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a27_0x4f60fb(0xcf),'operation':a27_0x4f60fb(0xcf),'risk':a27_0x4f60fb(0x9f),'paramsRequired':![],'description':a27_0x4f60fb(0x86),'paramsHint':a27_0x4f60fb(0x98)+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':['\x20\x20WHERE\x20OPERATORS',a27_0x4f60fb(0x71),'\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}',a27_0x4f60fb(0xc9),a27_0x4f60fb(0xae),'\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}',a27_0x4f60fb(0xad),'','\x20\x20LOGICAL\x20COMBINATORS',a27_0x4f60fb(0x9d),a27_0x4f60fb(0x82),'',a27_0x4f60fb(0xb2),a27_0x4f60fb(0x97),a27_0x4f60fb(0x77),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a27_0x4f60fb(0x79),a27_0x4f60fb(0xaf),'',a27_0x4f60fb(0x9b),a27_0x4f60fb(0x89),a27_0x4f60fb(0xa9),a27_0x4f60fb(0x8a),a27_0x4f60fb(0xb6),a27_0x4f60fb(0x76),a27_0x4f60fb(0xa2),a27_0x4f60fb(0x8c)]['join']('\x0a')},{'command':a27_0x4f60fb(0xbf),'operation':a27_0x4f60fb(0xbf),'risk':a27_0x4f60fb(0x9f),'paramsRequired':!![],'description':a27_0x4f60fb(0xa7),'paramsHint':a27_0x4f60fb(0xab)},{'command':a27_0x4f60fb(0xce),'operation':'create','risk':'write','paramsRequired':!![],'description':'Create\x20one\x20record\x20in\x20the\x20dataset','confirmationDescription':a27_0x4f60fb(0xa1),'paramsHint':a27_0x4f60fb(0x8d)},{'command':a27_0x4f60fb(0x92),'operation':'batchCreate','risk':a27_0x4f60fb(0x8b),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20the\x20dataset\x20in\x20one\x20request','helpExtra':[a27_0x4f60fb(0xb7),a27_0x4f60fb(0xca),a27_0x4f60fb(0x7c),'\x20\x20\x20\x20then\x20convert\x20rows\x20to\x20JSON\x20and\x20split\x20within\x20the\x20target\x20API\x20row/byte\x20and\x20local\x20argument\x20limits.',a27_0x4f60fb(0x7d),a27_0x4f60fb(0xb9),'\x20\x20\x20\x20Record\x20each\x20batch\x20and\x20verify\x20its\x20IDs\x20or\x20unique\x20business\x20keys\x20before\x20continuing.','\x20\x20\x20\x20Stop\x20on\x20unknown\x20outcomes\x20or\x20conflicts;\x20reconcile\x20before\x20retrying,\x20never\x20blindly\x20resend\x20a\x20batch.','\x20\x20\x20\x20No\x20import\x20checkpoint,\x20--resume,\x20automatic\x20upsert,\x20or\x20atomic\x20rollback\x20guarantee.',a27_0x4f60fb(0xcd),a27_0x4f60fb(0xaa)][a27_0x4f60fb(0x80)]('\x0a'),'confirmationDescription':a27_0x4f60fb(0x9a),'paramsHint':a27_0x4f60fb(0xd3)},{'command':a27_0x4f60fb(0xc2),'operation':a27_0x4f60fb(0xc2),'risk':a27_0x4f60fb(0x8b),'paramsRequired':!![],'description':a27_0x4f60fb(0xc3),'confirmationDescription':'Changes\x20an\x20existing\x20business\x20record\x20in\x20the\x20current\x20app\x20dataset.\x20The\x20new\x20values\x20are\x20saved\x20immediately\x20after\x20confirmation.','paramsHint':a27_0x4f60fb(0x99)+a27_0x4f60fb(0xc1)},{'command':'delete','operation':a27_0x4f60fb(0xba),'risk':a27_0x4f60fb(0xc0),'paramsRequired':!![],'description':a27_0x4f60fb(0x78),'confirmationDescription':'Deletes\x20business\x20records\x20from\x20the\x20current\x20app\x20dataset.\x20This\x20may\x20not\x20be\x20recoverable.','paramsHint':a27_0x4f60fb(0xab)},{'command':a27_0x4f60fb(0xa5),'operation':a27_0x4f60fb(0xa5),'risk':a27_0x4f60fb(0x9f),'paramsRequired':![],'description':a27_0x4f60fb(0x83),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a27_0x4f60fb(0x6e),'helpExtra':[a27_0x4f60fb(0x6d),a27_0x4f60fb(0x7b),a27_0x4f60fb(0xbe),a27_0x4f60fb(0x7e),a27_0x4f60fb(0xb5),a27_0x4f60fb(0xcc),a27_0x4f60fb(0xd2),'\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','','\x20\x20PARAMS\x20STRUCTURE',a27_0x4f60fb(0xd1),a27_0x4f60fb(0xb4),a27_0x4f60fb(0xa8),a27_0x4f60fb(0xb8),a27_0x4f60fb(0xc7),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order;\x20may\x20reference\x20aggregate\x20output\x20aliases,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','',a27_0x4f60fb(0x74),a27_0x4f60fb(0xd0),a27_0x4f60fb(0xbc),'\x20\x20\x20\x20orderBy\x20may\x20reference\x20aggregate\x20output\x20aliases','','\x20\x20DATASET\x20BOUNDARY',a27_0x4f60fb(0x7a),a27_0x4f60fb(0xcb),a27_0x4f60fb(0x81),a27_0x4f60fb(0x95),'',a27_0x4f60fb(0x6f),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a27_0x4f60fb(0x9c),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a27_0x4f60fb(0x8f),'','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'][a27_0x4f60fb(0x80)]('\x0a')}];function a27_0x5a65(_0x52b85f,_0xb6e69d){_0x52b85f=_0x52b85f-0x6d;const _0xa6cee9=a27_0xa6ce();let _0x5a6522=_0xa6cee9[_0x52b85f];return _0x5a6522;}function makeDataCommand(_0x51b2ed){const _0x3d9088=a27_0x4f60fb,_0x4ee2f1=_0x3d9088(0x75)+_0x51b2ed[_0x3d9088(0x73)],_0x146cec={'service':_0x3d9088(0xbd),'command':_0x51b2ed['command'],'description':_0x51b2ed[_0x3d9088(0x93)],'risk':_0x51b2ed[_0x3d9088(0xa4)],..._0x51b2ed[_0x3d9088(0x90)]?{'confirmationDescription':_0x51b2ed['confirmationDescription']}:{},'helpExtra':_0x51b2ed[_0x3d9088(0x7f)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x51b2ed[_0x3d9088(0x70)]}],'validate':async _0x256864=>{const _0x54def4=_0x3d9088;_0x51b2ed[_0x54def4(0xac)]&&requireAnyOf(_0x256864,['params'],_0x4ee2f1),_0x51b2ed['operation']==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x256864[_0x54def4(0x9e)](_0x54def4(0xc8)))),_0x51b2ed[_0x54def4(0x8e)]===_0x54def4(0xc2)&&parseUpdateIdsFromParams(parseJsonParams(_0x256864['str']('params'))??{});},async 'execute'(_0x31d841){const _0x35cd18=_0x3d9088,_0x40e443=_0x31d841[_0x35cd18(0x9e)]('code'),_0x27bf61=_0x51b2ed[_0x35cd18(0x8e)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x31d841[_0x35cd18(0x9e)](_0x35cd18(0xc8)))):parseJsonParams(_0x31d841['str'](_0x35cd18(0xc8)))??{},_0x33c923=_0x51b2ed[_0x35cd18(0x8e)]===_0x35cd18(0xc2)?parseUpdateIdsFromParams(_0x27bf61):undefined,_0x26f652=_0x33c923?normalizeUpdateParamsForRuntime(_0x27bf61,_0x33c923):_0x27bf61,_0x406c5c=Date['now'](),_0x16c42a=await executeData(_0x40e443,_0x51b2ed[_0x35cd18(0x8e)],_0x26f652),_0x41cd35=Date['now']()-_0x406c5c,_0x38de12=_0x33c923&&_0x33c923[_0x35cd18(0xc6)]>0x1?buildBatchUpdateResult(_0x33c923,_0x16c42a):_0x16c42a;return{'ok':!![],'data':{'result':_0x38de12,'elapsed':_0x41cd35},'message':'data\x20'+_0x51b2ed['command']+'\x20completed\x20in\x20'+_0x41cd35+'ms'};}};return _0x51b2ed[_0x3d9088(0xa4)]!==_0x3d9088(0x9f)&&(_0x146cec[_0x3d9088(0x96)]=async _0xceb1ca=>{const _0x2d11b6=_0x3d9088,_0x3ea193=_0xceb1ca[_0x2d11b6(0x9e)]('code'),_0x149b29=_0x51b2ed['operation']===_0x2d11b6(0x92)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0xceb1ca[_0x2d11b6(0x9e)](_0x2d11b6(0xc8)))):parseJsonParams(_0xceb1ca[_0x2d11b6(0x9e)](_0x2d11b6(0xc8)))??{};let _0x4186bb=_0x149b29;if(_0x51b2ed[_0x2d11b6(0x8e)]===_0x2d11b6(0xc2)){const _0x2a96cf=parseUpdateIdsFromParams(_0x149b29);_0x4186bb=normalizeUpdateParamsForRuntime(_0x149b29,_0x2a96cf);}return dryRun(_0x2d11b6(0xc5),'/api/{appCode}/'+_0x3ea193+'/'+_0x51b2ed[_0x2d11b6(0x8e)])['body'](_0x4186bb)[_0x2d11b6(0x93)](_0x2d11b6(0x72)+_0x51b2ed[_0x2d11b6(0x73)]+_0x2d11b6(0xb0)+_0x3ea193)[_0x2d11b6(0x87)]();}),_0x146cec;}export const dataDefinitions=[...specs[a27_0x4f60fb(0xbb)](makeDataCommand),dataImportExcel];function buildBatchUpdateResult(_0xbbd14,_0x49918a){const _0x1fc87b=a27_0x4f60fb;return{'operation':_0x1fc87b(0xc2),'mode':'batch','ids':_0xbbd14,'total':_0xbbd14[_0x1fc87b(0xc6)],'result':_0x49918a};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x49a4bb=a28_0x3a14;(function(_0xb43c0b,_0x20660f){const _0x552629=a28_0x3a14,_0x4e94fb=_0xb43c0b();while(!![]){try{const _0x1cd401=parseInt(_0x552629(0x17a))/0x1+parseInt(_0x552629(0x17f))/0x2*(-parseInt(_0x552629(0x169))/0x3)+parseInt(_0x552629(0x157))/0x4*(parseInt(_0x552629(0x185))/0x5)+-parseInt(_0x552629(0x166))/0x6+-parseInt(_0x552629(0x179))/0x7+parseInt(_0x552629(0x16f))/0x8+parseInt(_0x552629(0x180))/0x9;if(_0x1cd401===_0x20660f)break;else _0x4e94fb['push'](_0x4e94fb['shift']());}catch(_0x322e90){_0x4e94fb['push'](_0x4e94fb['shift']());}}}(a28_0x8b29,0x1ee6d));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function isRecord(_0x5b2ce0){const _0x15f903=a28_0x3a14;return _0x5b2ce0!==null&&typeof _0x5b2ce0===_0x15f903(0x171)&&!Array[_0x15f903(0x15e)](_0x5b2ce0);}function normalizeField(_0x351e5a){const _0x13f499=a28_0x3a14;if(_0x351e5a[_0x13f499(0x167)])return null;const _0x2c1ea2=Boolean(_0x351e5a[_0x13f499(0x18c)]!==undefined||_0x351e5a[_0x13f499(0x174)]!==undefined);let _0x41fb9d={};if(!_0x2c1ea2&&typeof _0x351e5a['extend']===_0x13f499(0x173))try{_0x41fb9d=JSON[_0x13f499(0x164)](_0x351e5a[_0x13f499(0x150)]);}catch{}const _0x401880=_0x2c1ea2?_0x351e5a[_0x13f499(0x151)]:_0x351e5a[_0x13f499(0x168)],_0x56643=_0x2c1ea2?_0x351e5a[_0x13f499(0x18c)]:_0x351e5a[_0x13f499(0x151)],_0x348893=_0x2c1ea2?_0x351e5a['doType']:_0x351e5a['type']||_0x351e5a['dataType'],_0x51bb8c=_0x2c1ea2?_0x351e5a[_0x13f499(0x177)]===!![]:_0x41fb9d['pkField']===!![],_0x23aea5=_0x2c1ea2?_0x351e5a['required']===!![]:_0x41fb9d[_0x13f499(0x18a)]===!![],_0x36f193=_0x2c1ea2?_0x351e5a[_0x13f499(0x14c)]??null:_0x41fb9d['options']??null,_0x432a3a={'name':_0x401880,'displayName':_0x56643||_0x401880,'type':_0x348893,'dbType':_0x351e5a[_0x13f499(0x15d)],'pk':_0x51bb8c,'required':_0x23aea5,'description':_0x351e5a[_0x13f499(0x163)]||undefined};return Array[_0x13f499(0x15e)](_0x36f193)&&_0x36f193['length']>0x0&&(_0x432a3a['options']=_0x36f193),_0x432a3a;}function parseJsonMaybe(_0x20ff7){const _0x59f7be=a28_0x3a14;if(typeof _0x20ff7!==_0x59f7be(0x173))return _0x20ff7;try{return JSON[_0x59f7be(0x164)](_0x20ff7);}catch{return _0x20ff7;}}function normalizeOperationEntry(_0x514d6d,_0x3d1acd){const _0x322dc4=a28_0x3a14;if(!_0x3d1acd||typeof _0x3d1acd!==_0x322dc4(0x171))return null;if(!_0x3d1acd[_0x322dc4(0x15a)]||!_0x3d1acd['path'])return null;const _0x16a793={'name':_0x514d6d,'method':_0x3d1acd['method'],'path':_0x3d1acd[_0x322dc4(0x186)]};if(_0x3d1acd['host'])_0x16a793[_0x322dc4(0x152)]=_0x3d1acd[_0x322dc4(0x152)];if(_0x3d1acd[_0x322dc4(0x16e)]!=null)_0x16a793[_0x322dc4(0x16e)]=parseJsonMaybe(_0x3d1acd[_0x322dc4(0x16e)]);if(_0x3d1acd[_0x322dc4(0x178)]!=null)_0x16a793[_0x322dc4(0x178)]=parseJsonMaybe(_0x3d1acd[_0x322dc4(0x178)]);if(_0x3d1acd['beforeScriptId']!=null)_0x16a793['beforeScriptId']=_0x3d1acd[_0x322dc4(0x176)];if(_0x3d1acd['afterScriptId']!=null)_0x16a793['afterScriptId']=_0x3d1acd[_0x322dc4(0x184)];if(Array[_0x322dc4(0x15e)](_0x3d1acd[_0x322dc4(0x17c)]))_0x16a793['requestFields']=_0x3d1acd[_0x322dc4(0x17c)];if(Array[_0x322dc4(0x15e)](_0x3d1acd[_0x322dc4(0x158)]))_0x16a793['responseFields']=_0x3d1acd['responseFields'];return _0x16a793;}function a28_0x8b29(){const _0x48806b=['code','1551DdOmLw','trim','fields','split','push','requestBody','360000UGljGE','str','object','dbName','string','doType','detail','beforeScriptId','pkField','responseBody','930965ikEeNc','50798apKtcA','properties','requestFields','entries','logicField','66GYHaJn','2015073VRKTul','allFieldNames','modelCode','modelId','afterScriptId','278420YwyuMm','path','dbId','length','formatRules','required','type','displayName','dataset','datasetKey','columnCodeListWithDeleted','find','tableName','options','filter','createTimeField','relatedPageInfoList','extend','name','host','map','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','apiError','labelField','12bSqCHR','responseFields','operations','method','updateTimeField','indexes','dbType','isArray','source','validateRules','allFields','doVersion','description','parse','dbtableConfig','1260708PidkEX','deleted'];a28_0x8b29=function(){return _0x48806b;};return a28_0x8b29();}function summarizeDbtable(_0x540d2c){const _0x4cef28=a28_0x3a14,_0x394aa4={},_0x5c4d93=[_0x4cef28(0x187),'dbName','tableName',_0x4cef28(0x18e),_0x4cef28(0x177),'allFields',_0x4cef28(0x17e),_0x4cef28(0x14e),_0x4cef28(0x15b),'creatorIdField','creatorNameField','modifierIdField','modifierNameField',_0x4cef28(0x156),'dblinkInfoDTO'];for(const _0x1062fe of _0x5c4d93){if(_0x540d2c[_0x1062fe]!==undefined)_0x394aa4[_0x1062fe]=_0x540d2c[_0x1062fe];}return typeof _0x394aa4['allFields']===_0x4cef28(0x173)&&_0x394aa4[_0x4cef28(0x161)]['length']>0x0&&(_0x394aa4[_0x4cef28(0x181)]=_0x394aa4[_0x4cef28(0x161)][_0x4cef28(0x16c)](',')[_0x4cef28(0x153)](_0x1ef7d0=>_0x1ef7d0[_0x4cef28(0x16a)]())[_0x4cef28(0x14d)](Boolean)),_0x394aa4;}function normalizeRelatedPages(_0x351b10){const _0x4c4767=a28_0x3a14;if(!Array[_0x4c4767(0x15e)](_0x351b10))return[];return _0x351b10[_0x4c4767(0x14d)](_0x1e6ce1=>_0x1e6ce1&&typeof _0x1e6ce1===_0x4c4767(0x171))[_0x4c4767(0x153)](_0x20fe53=>({'id':_0x20fe53['id'],'type':_0x20fe53[_0x4c4767(0x18b)],'code':_0x20fe53[_0x4c4767(0x168)],'title':_0x20fe53['title'],'deleted':_0x20fe53[_0x4c4767(0x167)]===!![]}));}function a28_0x3a14(_0x2b235b,_0xa8a8a7){_0x2b235b=_0x2b235b-0x14a;const _0x8b29a0=a28_0x8b29();let _0x3a140b=_0x8b29a0[_0x2b235b];return _0x3a140b;}function normalizeFallbackFieldName(_0x5c788e,_0x3f207f){const _0x4d253f=a28_0x3a14,_0x5782cf=_0x5c788e[_0x4d253f(0x16a)]();if(!_0x5782cf)return null;return{'name':_0x5782cf,'displayName':_0x5782cf,'type':undefined,'dbType':undefined,'pk':_0x5782cf===_0x3f207f,'required':![],'description':undefined};}async function loadListFieldFallback(_0x4055fb,_0x5295a0){const _0xbbefed=a28_0x3a14;if(!_0x4055fb||!_0x5295a0)return[];try{const _0x8f813c=await listDatasets(_0x4055fb,{'code':_0x5295a0}),_0x5d3aea=_0x8f813c[_0xbbefed(0x14a)](_0x21f148=>_0x21f148['code']===_0x5295a0)??_0x8f813c[0x0],_0x5de3c2=_0x5d3aea?.[_0xbbefed(0x165)]??{},_0x16fc56=typeof _0x5de3c2[_0xbbefed(0x161)]==='string'?_0x5de3c2['allFields'][_0xbbefed(0x16c)](','):[];return _0x16fc56[_0xbbefed(0x153)](_0x4f7474=>normalizeFallbackFieldName(_0x4f7474,_0x5de3c2[_0xbbefed(0x177)]))[_0xbbefed(0x14d)](_0x1e9e5d=>_0x1e9e5d!==null);}catch{return[];}}export const datasetDetail={'service':a28_0x49a4bb(0x18d),'command':a28_0x49a4bb(0x175),'description':a28_0x49a4bb(0x154),'risk':'read','flags':[CODE_FLAG],async 'execute'(_0x4979f7){const _0x5877df=a28_0x49a4bb,_0x1d67b9=await getDatasetDetail(_0x4979f7[_0x5877df(0x170)](_0x5877df(0x168)));if(!isRecord(_0x1d67b9))throw CliErrors[_0x5877df(0x155)]('Dataset\x20detail\x20must\x20be\x20an\x20object.');const _0x5b20a5=Array[_0x5877df(0x15e)](_0x1d67b9[_0x5877df(0x16b)])?_0x1d67b9[_0x5877df(0x16b)]:Array[_0x5877df(0x15e)](_0x1d67b9[_0x5877df(0x17b)])?_0x1d67b9[_0x5877df(0x17b)]:[];let _0x340ea5=_0x5b20a5[_0x5877df(0x153)](_0x58a310=>normalizeField(_0x58a310))['filter'](_0x103ac8=>_0x103ac8!==null);_0x340ea5[_0x5877df(0x188)]===0x0&&(_0x340ea5=await loadListFieldFallback(_0x4979f7['appCode'],_0x4979f7[_0x5877df(0x170)](_0x5877df(0x168))));const _0x180a84=_0x1d67b9[_0x5877df(0x159)]??{},_0x4cc4cc=[];for(const [_0x2ab88b,_0x4e2ac2]of Object[_0x5877df(0x17d)](_0x180a84)){const _0x21cdc1=normalizeOperationEntry(_0x2ab88b,_0x4e2ac2);if(_0x21cdc1)_0x4cc4cc[_0x5877df(0x16d)](_0x21cdc1);}const _0x562917=isRecord(_0x1d67b9[_0x5877df(0x165)])?_0x1d67b9[_0x5877df(0x165)]:{},_0x3ca657=isRecord(_0x1d67b9[_0x5877df(0x18d)])?_0x1d67b9[_0x5877df(0x18d)]:{},_0x1eb66a=_0x562917[_0x5877df(0x187)]!=null?{'id':_0x562917['dbId'],'name':_0x562917[_0x5877df(0x172)]??null}:undefined;let _0xa3aba4;return typeof _0x1d67b9['extend']===_0x5877df(0x173)&&(_0xa3aba4=parseJsonMaybe(_0x1d67b9[_0x5877df(0x150)])),{'ok':!![],'data':{'id':_0x1d67b9[_0x5877df(0x183)]??_0x1d67b9['id'],'name':_0x1d67b9[_0x5877df(0x151)],'code':_0x1d67b9[_0x5877df(0x182)]||_0x1d67b9[_0x5877df(0x168)],'doVersion':_0x1d67b9[_0x5877df(0x162)],'description':_0x1d67b9[_0x5877df(0x163)]||_0x3ca657['tableComment']||undefined,'source':_0x1d67b9[_0x5877df(0x15f)]||_0x3ca657['sourceType'],'table':_0x562917[_0x5877df(0x14b)]||_0x3ca657[_0x5877df(0x14b)],'datasetKey':_0x562917[_0x5877df(0x18e)],'pk':_0x562917[_0x5877df(0x177)],'db':_0x1eb66a,'dbtable':summarizeDbtable(_0x562917),'fields':_0x340ea5,'operations':_0x4cc4cc,'indexes':Array['isArray'](_0x3ca657[_0x5877df(0x15c)])?_0x3ca657['indexes']:[],'relations':_0x1d67b9['relations']??null,'relatedPages':normalizeRelatedPages(_0x1d67b9[_0x5877df(0x14f)]),...Array['isArray'](_0x1d67b9[_0x5877df(0x18f)])?{'columnCodeListWithDeleted':_0x1d67b9[_0x5877df(0x18f)]}:{},'formatRules':Array[_0x5877df(0x15e)](_0x1d67b9['formatRules'])?_0x1d67b9[_0x5877df(0x189)]:[],'validateRules':Array[_0x5877df(0x15e)](_0x1d67b9[_0x5877df(0x160)])?_0x1d67b9[_0x5877df(0x160)]:[],..._0xa3aba4!==undefined?{'extend':_0xa3aba4}:{},'stats':{'fieldCount':_0x340ea5['length'],'operationCount':_0x4cc4cc[_0x5877df(0x188)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ce10d,_0x3152e1){const _0x13dfe0=a29_0x210f,_0x4d837f=_0x3ce10d();while(!![]){try{const _0x5c12c3=parseInt(_0x13dfe0(0x13f))/0x1*(-parseInt(_0x13dfe0(0x143))/0x2)+parseInt(_0x13dfe0(0x144))/0x3*(parseInt(_0x13dfe0(0x141))/0x4)+-parseInt(_0x13dfe0(0x145))/0x5*(parseInt(_0x13dfe0(0x147))/0x6)+parseInt(_0x13dfe0(0x142))/0x7*(parseInt(_0x13dfe0(0x13c))/0x8)+-parseInt(_0x13dfe0(0x13d))/0x9*(parseInt(_0x13dfe0(0x146))/0xa)+-parseInt(_0x13dfe0(0x140))/0xb+-parseInt(_0x13dfe0(0x13b))/0xc*(-parseInt(_0x13dfe0(0x13e))/0xd);if(_0x5c12c3===_0x3152e1)break;else _0x4d837f['push'](_0x4d837f['shift']());}catch(_0x411701){_0x4d837f['push'](_0x4d837f['shift']());}}}(a29_0x523f,0xed649));function a29_0x523f(){const _0x290075=['86842BBgcNy','4onNJSq','3Mkbbmv','5ADRnOH','12003430rjWFwe','1879614sKjpTa','34572FqEdRE','600EAYSoj','9UblMBA','13429BmjxiM','349788hgGgvm','21328857jdWMwS','4872052aVKVOX'];a29_0x523f=function(){return _0x290075;};return a29_0x523f();}import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';function a29_0x210f(_0x542688,_0x288146){_0x542688=_0x542688-0x13b;const _0x523f25=a29_0x523f();let _0x210fa3=_0x523f25[_0x542688];return _0x210fa3;}import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x3e1d55=a30_0x2ed0;function a30_0x4d70(){const _0x14789c=['list','189740IPwKqo','6253344cwdsSJ','str','length','description','14FafOSw','trim','1929585UitxGa','77976yUTWot','dbtableConfig','datasetKey','allFields','3269120VsJlPJ','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','read','split','string','source','dataset','table-name','pkField','102JvsWgG','List\x20datasets\x20in\x20the\x20app\x20(server-side\x20name/code/table-name\x20filters\x20combine\x20with\x20AND)','code','name','1843324QxzaMy','Filter\x20by\x20physical\x20table\x20name\x20(server-side\x20prefix\x20match;\x20SQL\x20LIKE\x20wildcards\x20%\x20and\x20_\x20apply)','map','1257270xkEOOx','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)'];a30_0x4d70=function(){return _0x14789c;};return a30_0x4d70();}function a30_0x2ed0(_0x590163,_0x27c875){_0x590163=_0x590163-0xaf;const _0x4d70d0=a30_0x4d70();let _0x2ed0ed=_0x4d70d0[_0x590163];return _0x2ed0ed;}(function(_0xea547f,_0x5ab6c5){const _0x21f380=a30_0x2ed0,_0x43a009=_0xea547f();while(!![]){try{const _0x536e00=parseInt(_0x21f380(0xc0))/0x1+parseInt(_0x21f380(0xba))/0x2+parseInt(_0x21f380(0xb6))/0x3*(-parseInt(_0x21f380(0xc8))/0x4)+parseInt(_0x21f380(0xc7))/0x5+-parseInt(_0x21f380(0xbd))/0x6+parseInt(_0x21f380(0xc5))/0x7*(-parseInt(_0x21f380(0xcc))/0x8)+parseInt(_0x21f380(0xc1))/0x9;if(_0x536e00===_0x5ab6c5)break;else _0x43a009['push'](_0x43a009['shift']());}catch(_0x11a5de){_0x43a009['push'](_0x43a009['shift']());}}}(a30_0x4d70,0x7aaf2));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a30_0x3e1d55(0xb3),'command':a30_0x3e1d55(0xbf),'description':a30_0x3e1d55(0xb7),'risk':a30_0x3e1d55(0xaf),'flags':[{'name':a30_0x3e1d55(0xb9),'type':a30_0x3e1d55(0xb1),'description':a30_0x3e1d55(0xbe)},{'name':'table-name','type':a30_0x3e1d55(0xb1),'description':a30_0x3e1d55(0xbb)},{...CODE_FLAG,'required':![],'description':a30_0x3e1d55(0xcd)}],async 'execute'(_0x5d47ca){const _0x175578=a30_0x3e1d55,_0x557fe9=_0x5d47ca[_0x175578(0xc2)](_0x175578(0xb9)),_0x4274a0=_0x5d47ca[_0x175578(0xc2)](_0x175578(0xb8)),_0x4716de=_0x5d47ca[_0x175578(0xc2)](_0x175578(0xb4)),_0x1b35b6=await listDatasets(_0x5d47ca['appCode'],{..._0x557fe9&&{'name':_0x557fe9},..._0x4274a0&&{'code':_0x4274a0},..._0x4716de&&{'tableName':_0x4716de}});return{'ok':!![],'data':{'total':_0x1b35b6[_0x175578(0xc3)],'datasets':_0x1b35b6[_0x175578(0xbc)](_0x20658d=>{const _0x5e04fb=_0x175578,_0x5ed7c5=_0x20658d[_0x5e04fb(0xc9)]??{};return{'id':_0x20658d['id'],'code':_0x20658d[_0x5e04fb(0xb8)],'name':_0x20658d[_0x5e04fb(0xb9)],'source':_0x20658d[_0x5e04fb(0xb2)],'description':_0x20658d[_0x5e04fb(0xc4)],'table':_0x5ed7c5['tableName'],'datasetKey':_0x5ed7c5[_0x5e04fb(0xca)],'pk':_0x5ed7c5[_0x5e04fb(0xb5)],'fields':_0x5ed7c5[_0x5e04fb(0xcb)]?_0x5ed7c5[_0x5e04fb(0xcb)][_0x5e04fb(0xb0)](',')[_0x5e04fb(0xbc)](_0x3a5dea=>_0x3a5dea[_0x5e04fb(0xc6)]()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x4803ec=a31_0x3c6c;(function(_0x2e904f,_0x2e4da7){const _0x5f5b09=a31_0x3c6c,_0x92844=_0x2e904f();while(!![]){try{const _0x59b140=-parseInt(_0x5f5b09(0x163))/0x1+-parseInt(_0x5f5b09(0x161))/0x2*(-parseInt(_0x5f5b09(0x15e))/0x3)+parseInt(_0x5f5b09(0x162))/0x4*(-parseInt(_0x5f5b09(0x165))/0x5)+parseInt(_0x5f5b09(0x164))/0x6+-parseInt(_0x5f5b09(0x167))/0x7+-parseInt(_0x5f5b09(0x168))/0x8+parseInt(_0x5f5b09(0x16a))/0x9;if(_0x59b140===_0x2e4da7)break;else _0x92844['push'](_0x92844['shift']());}catch(_0x244347){_0x92844['push'](_0x92844['shift']());}}}(a31_0xb13d,0x6f04f));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a31_0x4803ec(0x15f);export function formatDatasetSdkMarkdown(_0x1b0291){const _0x46805a=a31_0x4803ec,_0x23835f=typeof _0x1b0291===_0x46805a(0x16b)?_0x1b0291['trim']():'';return _0x23835f||DEFAULT_MARKDOWN;}function a31_0x3c6c(_0x333797,_0x5ec94e){_0x333797=_0x333797-0x15e;const _0xb13dba=a31_0xb13d();let _0x3c6c0e=_0xb13dba[_0x333797];return _0x3c6c0e;}function a31_0xb13d(){const _0x6c2a2f=['2219154SDHEvw','265wzgvNY','dataset','4181121RHqJZA','178016SWifAA','appCode','13663314SyxbTw','string','sdk-doc','6ItkqZx','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0aNo\x20SDK\x20usage\x20documentation\x20is\x20available.','read','268414lgyVJM','47664nWybTs','450581WVXBsC'];a31_0xb13d=function(){return _0x6c2a2f;};return a31_0xb13d();}export const datasetSdkDoc={'service':a31_0x4803ec(0x166),'command':a31_0x4803ec(0x16c),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':a31_0x4803ec(0x160),'flags':[{...CODE_FLAG,'description':'Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.'}],async 'execute'(_0x37223a){const _0x52c180=a31_0x4803ec,_0x14616f=_0x37223a['str']('code'),_0x3deafd=await getDatasetSdkUsageDoc(_0x14616f,_0x37223a['appCode']);return{'ok':!![],'data':{'code':_0x14616f,'appCode':_0x37223a[_0x52c180(0x169)],'markdown':formatDatasetSdkMarkdown(_0x3deafd)}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a32_0x3b35cd=a32_0x77c6;(function(_0x5c75be,_0x5f5298){const _0x3169c0=a32_0x77c6,_0x902b8d=_0x5c75be();while(!![]){try{const _0x134ee3=-parseInt(_0x3169c0(0xc6))/0x1+-parseInt(_0x3169c0(0x96))/0x2*(-parseInt(_0x3169c0(0x97))/0x3)+parseInt(_0x3169c0(0xce))/0x4*(-parseInt(_0x3169c0(0xb6))/0x5)+parseInt(_0x3169c0(0x9c))/0x6*(parseInt(_0x3169c0(0xc8))/0x7)+parseInt(_0x3169c0(0x100))/0x8+-parseInt(_0x3169c0(0xb0))/0x9+parseInt(_0x3169c0(0xbc))/0xa;if(_0x134ee3===_0x5f5298)break;else _0x902b8d['push'](_0x902b8d['shift']());}catch(_0x4e3c90){_0x902b8d['push'](_0x902b8d['shift']());}}}(a32_0x1a20,0x5ef3e));import a32_0xa6f982 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';function a32_0x77c6(_0x154bd6,_0x369e12){_0x154bd6=_0x154bd6-0x84;const _0x1a202a=a32_0x1a20();let _0x77c62e=_0x1a202a[_0x154bd6];return _0x77c62e;}import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x97e0de){const _0x586068=a32_0x77c6,_0x4d5a47=getCliVersion(),_0x1493db=buildConfigFromFlags({});let _0x3652c5,_0x1fc16a;try{_0x3652c5=normalizeLovrabetRegion(_0x1493db['raw'][_0x586068(0xb9)]);}catch(_0x418d9b){_0x1fc16a=_0x418d9b instanceof Error?_0x418d9b:new Error(String(_0x418d9b));}let _0x614b2;if(!_0x1fc16a)try{await initGlobalEnvironment(_0x1493db);}catch(_0x7c27bb){_0x614b2=_0x7c27bb instanceof Error?_0x7c27bb:new Error(String(_0x7c27bb));}console[_0x586068(0xf6)](),console['log'](a32_0xa6f982['bold'](CLI_BIN_NAME+_0x586068(0xb3))),console['log'](a32_0xa6f982[_0x586068(0xa9)]('─'['repeat'](0x32))),console[_0x586068(0xf6)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x4d5a47),console[_0x586068(0xf6)](_0x586068(0xfc)+process[_0x586068(0xb4)]),console[_0x586068(0xf6)](_0x586068(0xd5)+process[_0x586068(0x9b)]+'\x20'+process[_0x586068(0x91)]);const _0x21edc3=inspectBuiltinSkill();console[_0x586068(0xf6)](),console[_0x586068(0xf6)](a32_0xa6f982['bold'](_0x586068(0x84))),console['log'](a32_0xa6f982[_0x586068(0xa9)](_0x586068(0x86)[_0x586068(0xd7)](0x1e))),console[_0x586068(0xf6)]('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x21edc3[_0x586068(0xb5)]===_0x586068(0x93)?a32_0xa6f982[_0x586068(0xef)](_0x586068(0xf2)):a32_0xa6f982[_0x586068(0xf1)]('✗\x20'+_0x21edc3[_0x586068(0xb5)]))),console[_0x586068(0xf6)](_0x586068(0xec)+_0x21edc3['packageVersion']),console[_0x586068(0xf6)](_0x586068(0xd4)+(_0x21edc3[_0x586068(0x90)]||a32_0xa6f982[_0x586068(0xa9)](_0x586068(0xbd)))),console[_0x586068(0xf6)](_0x586068(0xb7)+(_0x21edc3[_0x586068(0xb2)]||a32_0xa6f982[_0x586068(0xa9)](_0x586068(0x92))));_0x21edc3['state']!==_0x586068(0x93)&&console['log'](_0x586068(0xc9)+_0x21edc3[_0x586068(0xda)]);_0x21edc3[_0x586068(0xa1)]&&console[_0x586068(0xf6)](_0x586068(0xfa)+_0x21edc3[_0x586068(0xa1)]);console[_0x586068(0xf6)](),console[_0x586068(0xf6)](a32_0xa6f982['bold'](_0x586068(0xcb))),console[_0x586068(0xf6)](a32_0xa6f982[_0x586068(0xa9)](_0x586068(0x86)[_0x586068(0xd7)](0x1e)));const _0xc5df67=getGlobalConfigPath(),_0x8c73ac=getProjectConfigPath();console[_0x586068(0xf6)](_0x586068(0x89)+(_0xc5df67||a32_0xa6f982[_0x586068(0xa9)](_0x586068(0x92)))),console[_0x586068(0xf6)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x8c73ac||a32_0xa6f982[_0x586068(0xa9)](_0x586068(0x92)))),console[_0x586068(0xf6)](),console[_0x586068(0xf6)](a32_0xa6f982[_0x586068(0x101)](_0x586068(0xa8))),console[_0x586068(0xf6)](a32_0xa6f982['gray'](_0x586068(0x86)[_0x586068(0xd7)](0x1e)));const _0x4b5c5a=(_0x3698d6,_0x11e137)=>{const _0x3b3a87=_0x586068;if(!_0x11e137){console[_0x3b3a87(0xf6)]('\x20\x20'+_0x3698d6['padEnd'](0x11)+'\x20'+a32_0xa6f982['gray'](_0x3b3a87(0x8a)));return;}const _0x4f3d80=inspectCliConfigJsonFile(_0x11e137);if(_0x4f3d80[_0x3b3a87(0xf5)]==='ok')console['log']('\x20\x20'+_0x3698d6[_0x3b3a87(0xf9)](0x11)+'\x20'+a32_0xa6f982[_0x3b3a87(0xef)]('✓\x20Valid\x20JSON'));else{if(_0x4f3d80[_0x3b3a87(0xf5)]==='empty')console['log']('\x20\x20'+_0x3698d6[_0x3b3a87(0xf9)](0x11)+'\x20'+a32_0xa6f982[_0x3b3a87(0xe8)](_0x3b3a87(0x9e)));else _0x4f3d80['status']==='missing'?console['log']('\x20\x20'+_0x3698d6[_0x3b3a87(0xf9)](0x11)+'\x20'+a32_0xa6f982[_0x3b3a87(0xa9)](_0x3b3a87(0xbd))):(console['log']('\x20\x20'+_0x3698d6[_0x3b3a87(0xf9)](0x11)+'\x20'+a32_0xa6f982['red'](_0x3b3a87(0xbb))),console[_0x3b3a87(0xf6)]('\x20\x20'+''[_0x3b3a87(0xf9)](0x11)+'\x20'+a32_0xa6f982[_0x3b3a87(0xf1)](_0x4f3d80['message'])));}};_0x4b5c5a(_0x586068(0xde),_0xc5df67),_0x4b5c5a(_0x586068(0xcc),_0x8c73ac);const _0x5a5281=loadRawConfigLayers(),_0x5c9e8f=[Object[_0x586068(0x102)]['hasOwnProperty']['call'](_0x5a5281['globalConfig'],_0x586068(0xbf))?_0x586068(0xc5):null,Object[_0x586068(0x102)][_0x586068(0xaf)]['call'](_0x5a5281[_0x586068(0xc3)],_0x586068(0xbf))?_0x586068(0xba):null][_0x586068(0xfe)](Boolean);_0x5c9e8f[_0x586068(0xe1)]>0x0&&(console['log']('\x20\x20Legacy\x20inherit:\x20\x20\x20'+a32_0xa6f982[_0x586068(0xe8)](_0x586068(0x94)+_0x5c9e8f[_0x586068(0xe7)](_0x586068(0x87))+_0x586068(0xad))),_0x5c9e8f[_0x586068(0xae)](_0x586068(0xba))&&console['log'](_0x586068(0xa0)+CLI_BIN_NAME+'\x20config\x20delete\x20inherit'),_0x5c9e8f[_0x586068(0xae)](_0x586068(0xc5))&&console[_0x586068(0xf6)](_0x586068(0xe2)+CLI_BIN_NAME+_0x586068(0xf0)));_0x614b2&&(console[_0x586068(0xf6)](),console[_0x586068(0xf6)](a32_0xa6f982[_0x586068(0x101)](_0x586068(0x8f))),console['log'](a32_0xa6f982['gray'](_0x586068(0x86)[_0x586068(0xd7)](0x1e))),console[_0x586068(0xf6)](_0x586068(0xea)+a32_0xa6f982[_0x586068(0xf1)]('✗\x20Invalid')),console[_0x586068(0xf6)](_0x586068(0xfa)+_0x614b2['message']),Object[_0x586068(0x102)][_0x586068(0xaf)]['call'](_0x5a5281['projectConfig'],_0x586068(0xf4))&&console[_0x586068(0xf6)](_0x586068(0x99)+CLI_BIN_NAME+_0x586068(0xcf)),Object[_0x586068(0x102)][_0x586068(0xaf)]['call'](_0x5a5281[_0x586068(0xa5)],'routing')&&console['log'](_0x586068(0x9f)+CLI_BIN_NAME+_0x586068(0x8b)));_0x1fc16a&&(console[_0x586068(0xf6)](),console[_0x586068(0xf6)](a32_0xa6f982['bold'](_0x586068(0xaa))),console[_0x586068(0xf6)](a32_0xa6f982[_0x586068(0xa9)](_0x586068(0x86)[_0x586068(0xd7)](0x1e))),console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0xa6f982[_0x586068(0xf1)](_0x586068(0xdc))),console[_0x586068(0xf6)](_0x586068(0xfa)+_0x1fc16a[_0x586068(0xee)]),Object['prototype'][_0x586068(0xaf)][_0x586068(0xb8)](_0x5a5281[_0x586068(0xc3)],_0x586068(0xb9))&&console[_0x586068(0xf6)](_0x586068(0x99)+CLI_BIN_NAME+'\x20config\x20delete\x20region'),Object[_0x586068(0x102)]['hasOwnProperty']['call'](_0x5a5281[_0x586068(0xa5)],_0x586068(0xb9))&&console['log'](_0x586068(0x9f)+CLI_BIN_NAME+_0x586068(0x8c)));console[_0x586068(0xf6)](),console['log'](a32_0xa6f982[_0x586068(0x101)](_0x586068(0xa4))),console[_0x586068(0xf6)](a32_0xa6f982['gray']('\x20\x20─'[_0x586068(0xd7)](0x1e))),console[_0x586068(0xf6)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1493db[_0x586068(0xd2)]||a32_0xa6f982[_0x586068(0xf1)](_0x586068(0xa6)))),console[_0x586068(0xf6)](_0x586068(0xd8)+(_0x3652c5??a32_0xa6f982['red'](_0x586068(0xac)))),console['log']('\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20'+_0x1493db['locale']),console[_0x586068(0xf6)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x1493db['defaultApp']||a32_0xa6f982['gray'](_0x586068(0xdd)))),console[_0x586068(0xf6)](_0x586068(0xf8)+(_0x1493db[_0x586068(0xa3)]||a32_0xa6f982[_0x586068(0xa9)](_0x586068(0xdd)))),console[_0x586068(0xf6)](_0x586068(0xed)+(_0x1493db[_0x586068(0xff)]||a32_0xa6f982[_0x586068(0xa9)](_0x586068(0xe5)+DEFAULT_CONFIG_VALUES[_0x586068(0xff)]+')'))),console[_0x586068(0xf6)](_0x586068(0xb1)+(_0x1493db[_0x586068(0xe4)]??a32_0xa6f982[_0x586068(0xa9)](_0x586068(0xc7)))),console['log'](_0x586068(0x8d)+_0x1493db[_0x586068(0x98)]),console[_0x586068(0xf6)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1493db[_0x586068(0xd9)]),console['log'](_0x586068(0xc1)+AUTH_MODE[_0x586068(0xab)]),console[_0x586068(0xf6)](_0x586068(0xfd)+(_0x1493db['accessKey']?a32_0xa6f982[_0x586068(0xef)]('(set,\x20length='+_0x1493db[_0x586068(0xcd)][_0x586068(0xe1)]+')'):a32_0xa6f982[_0x586068(0xa9)](_0x586068(0xdd)))),console[_0x586068(0xf6)](),console[_0x586068(0xf6)](a32_0xa6f982[_0x586068(0x101)](_0x586068(0xd0))),console[_0x586068(0xf6)](a32_0xa6f982[_0x586068(0xa9)](_0x586068(0x86)['repeat'](0x1e)));_0x614b2||_0x1fc16a?console[_0x586068(0xf6)](_0x586068(0xea)+a32_0xa6f982['red'](_0x586068(0xdf))):(console[_0x586068(0xf6)](_0x586068(0x9a)+getApiDomain()),console[_0x586068(0xf6)](_0x586068(0xe6)+getUserDomain()),console['log'](_0x586068(0xd1)+getRuntimeDomain()),console['log'](_0x586068(0xc0)+getSkillDomain()),console[_0x586068(0xf6)](_0x586068(0xc2)+(getKbServiceDomain()??'not\x20configured')));console[_0x586068(0xf6)](),console[_0x586068(0xf6)](a32_0xa6f982['bold'](_0x586068(0xf7))),console['log'](a32_0xa6f982[_0x586068(0xa9)](_0x586068(0x86)[_0x586068(0xd7)](0x1e)));const _0x3bc910=inspectServiceRegistry();console[_0x586068(0xf6)](_0x586068(0xc4)+_0x3bc910[_0x586068(0xe0)]),console[_0x586068(0xf6)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x3bc910)),console[_0x586068(0xf6)](_0x586068(0x88)+_0x3bc910['serviceCount']),console[_0x586068(0xf6)](_0x586068(0xbe)+_0x3bc910[_0x586068(0xe3)]);for(const _0x501fce of _0x3bc910['services']){console[_0x586068(0xf6)]('\x20\x20'+(_0x501fce[_0x586068(0xdb)]+':')['padEnd'](0x11)+'\x20'+(_0x501fce['name']||a32_0xa6f982[_0x586068(0xa9)]('(unnamed)'))+'\x20('+_0x501fce[_0x586068(0xe3)]+_0x586068(0xeb)),console['log']('\x20\x20'+''[_0x586068(0xf9)](0x11)+_0x586068(0xca)+_0x501fce['source'][_0x586068(0x85)]);}return console[_0x586068(0xf6)](),console[_0x586068(0xf6)](a32_0xa6f982[_0x586068(0x101)](_0x586068(0x95))),console[_0x586068(0xf6)](a32_0xa6f982[_0x586068(0xa9)](_0x586068(0x86)[_0x586068(0xd7)](0x1e))),console[_0x586068(0xf6)](_0x586068(0x103)+a32_0xa6f982[_0x586068(0xef)](AUTH_MODE[_0x586068(0xab)]+'\x20(accessKey)')),console['log'](_0x586068(0xa2)+a32_0xa6f982['gray'](_0x586068(0x9d))),console[_0x586068(0xf6)](),{'ok':!![]};}function a32_0x1a20(){const _0x33de26=['\x20\x20Skill\x20Version:\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','doctor','repeat','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','verbose','repairCommand','serviceCode','✗\x20Invalid','(none)','Global','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','registryPath','length','\x20\x20Repair\x20global:\x20\x20\x20\x20','commandCount','pageSize','(default:\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','join','yellow','read','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20commands)','\x20\x20Package\x20Version:\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','message','green','\x20config\x20delete\x20inherit\x20--global','red','✓\x20current','missing','routing','status','log','\x20\x20Service\x20Tree','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','padEnd','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','empty','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','filter','format','5094072hrQnNg','bold','prototype','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Built-in\x20Skill','path','\x20\x20─','\x20+\x20','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','\x20config\x20delete\x20routing\x20--global','\x20config\x20init','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','check','\x20\x20Routing\x20Configuration','skillVersion','arch','(not\x20found)','current','ignored\x20in\x20','\x20\x20Auth','2tGMkdK','2175009MiLXuM','riskLevel','\x20\x20Repair\x20project:\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','platform','66yJMkoP','(removed\x20—\x20cookie\x20auth\x20disabled)','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20Repair\x20global:\x20\x20\x20','\x20\x20Repair\x20project:\x20\x20\x20','reason','\x20\x20Session\x20check:\x20\x20\x20','currentApp','\x20\x20Merged\x20Config','globalConfig','(not\x20set)','✓\x20Loaded','\x20\x20Config\x20JSON','gray','\x20\x20Country/Region\x20Configuration','ClientAk','(invalid)','\x20config','includes','hasOwnProperty','6982254kdosxF','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','installedPath','\x20doctor','version','state','195sbYOYt','\x20\x20Installed\x20Path:\x20\x20','call','region','project','✗\x20Invalid\x20JSON','5292840xFMHLY','(missing)','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','inherit','\x20\x20skillDomain:\x20\x20\x20\x20\x20','\x20\x20auth\x20(effective):\x20','\x20\x20kbServiceDomain:\x20','projectConfig','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','global','724225oDWkoT','(default)','151501sVvyHV','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20Imported\x20from:\x20','\x20\x20Config\x20Files','Project','accessKey','24632CHxdCO','\x20config\x20delete\x20routing','\x20\x20API\x20Endpoints','\x20\x20runtimeDomain:\x20\x20\x20','appCode','Diagnose\x20CLI\x20configuration\x20and\x20environment'];a32_0x1a20=function(){return _0x33de26;};return a32_0x1a20();}function formatServiceRegistryStatus(_0x3efd67){const _0x31df63=a32_0x77c6;if(_0x3efd67[_0x31df63(0xf5)]==='ok')return a32_0xa6f982['green'](_0x31df63(0xa7));if(_0x3efd67[_0x31df63(0xf5)]===_0x31df63(0xf3))return a32_0xa6f982[_0x31df63(0xa9)](_0x31df63(0x92));if(_0x3efd67['status']===_0x31df63(0xfb))return a32_0xa6f982[_0x31df63(0xe8)]('⚠\x20Empty');return a32_0xa6f982[_0x31df63(0xf1)](_0x31df63(0xdc)+(_0x3efd67[_0x31df63(0xee)]?':\x20'+_0x3efd67[_0x31df63(0xee)]:''));}export const doctorDefinition={'service':a32_0x3b35cd(0xd6),'command':a32_0x3b35cd(0x8e),'description':a32_0x3b35cd(0xd3),'risk':a32_0x3b35cd(0xe9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a32_0x2c1614=a32_0x2958;(function(_0x577106,_0x35ece1){const _0x462f36=a32_0x2958,_0x4b80e8=_0x577106();while(!![]){try{const _0xdcb8e0=-parseInt(_0x462f36(0xb2))/0x1*(parseInt(_0x462f36(0xeb))/0x2)+-parseInt(_0x462f36(0x81))/0x3*(parseInt(_0x462f36(0x96))/0x4)+parseInt(_0x462f36(0x83))/0x5*(parseInt(_0x462f36(0x7b))/0x6)+-parseInt(_0x462f36(0xb1))/0x7+-parseInt(_0x462f36(0xf2))/0x8*(-parseInt(_0x462f36(0x77))/0x9)+parseInt(_0x462f36(0x7c))/0xa*(parseInt(_0x462f36(0x8f))/0xb)+-parseInt(_0x462f36(0xf5))/0xc*(-parseInt(_0x462f36(0xb7))/0xd);if(_0xdcb8e0===_0x35ece1)break;else _0x4b80e8['push'](_0x4b80e8['shift']());}catch(_0x451778){_0x4b80e8['push'](_0x4b80e8['shift']());}}}(a32_0x2e0d,0xd09bf));import a32_0x2bd256 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getKbServiceDomain,getRuntimeDomain,getSkillDomain,getUserDomain}from'../constant/domain.js';import{normalizeLovrabetRegion}from'../constant/region.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';function a32_0x2958(_0x12eb3c,_0x16ddfb){_0x12eb3c=_0x12eb3c-0x74;const _0x2e0d77=a32_0x2e0d();let _0x2958f3=_0x2e0d77[_0x12eb3c];return _0x2958f3;}function a32_0x2e0d(){const _0x3fde9e=['(default)','\x20doctor','verbose','installedPath','status','\x20config','\x20config\x20delete\x20routing','yellow','\x20config\x20delete\x20routing\x20--global','⚠\x20Empty','\x20config\x20delete\x20region','\x20\x20Package\x20Version:\x20','(not\x20found)','\x20\x20Config\x20JSON','20LzvTtT','raw','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','registryPath','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','project','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','16UdmwrQ','global','arch','474828ZknbwO','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','includes','6524919gnpHET','\x20\x20Repair\x20project:\x20\x20','(default:\x20','doctor','390bZHBcn','1544500LJvbbT','\x20\x20skillDomain:\x20\x20\x20\x20\x20','projectConfig','repeat','defaultApp','1677426gkVeEd','routing','99910kfTqNz','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','log','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','gray','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','(no\x20file)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(unnamed)','source','11nyWOJf','green','\x20\x20Skill\x20Version:\x20\x20\x20','region','call','reason','filter','8mNiuBM','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','serviceCount','\x20\x20Auth','message','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','services','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','\x20\x20─','\x20commands)','read','appCode','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','commandCount','repairCommand','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','state','empty','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment','7440608xHDyZM','69852zpEEFY','red','padEnd','\x20config\x20init','✗\x20Invalid\x20JSON','273cCHQwL','\x20\x20auth\x20(effective):\x20','name','(missing)','skillVersion','globalConfig','\x20\x20Installed\x20Path:\x20\x20','ClientAk','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','\x20\x20Legacy\x20inherit:\x20\x20\x20','prototype','accessKey','\x20\x20Config\x20Files','\x20\x20Built-in\x20Skill','✓\x20current','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','inherit','\x20\x20Routing\x20Configuration','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','packageVersion','(removed\x20—\x20cookie\x20auth\x20disabled)','(none)','hasOwnProperty','\x20Imported\x20from:\x20','current','locale','bold','Project','⚠\x20Empty\x20(treated\x20as\x20{})','check','\x20\x20Repair\x20global:\x20\x20\x20','Global','format','platform','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20Repair\x20global:\x20\x20\x20\x20','missing'];a32_0x2e0d=function(){return _0x3fde9e;};return a32_0x2e0d();}async function execute(_0xa26f01){const _0x36ad91=a32_0x2958,_0x30698b=getCliVersion(),_0x1ea35e=buildConfigFromFlags({});let _0x1f6ae8,_0x2ee147;try{_0x1f6ae8=normalizeLovrabetRegion(_0x1ea35e[_0x36ad91(0xec)][_0x36ad91(0x92)]);}catch(_0xdc7ef9){_0x2ee147=_0xdc7ef9 instanceof Error?_0xdc7ef9:new Error(String(_0xdc7ef9));}let _0x3c9eb9;if(!_0x2ee147)try{await initGlobalEnvironment(_0x1ea35e);}catch(_0x11a64e){_0x3c9eb9=_0x11a64e instanceof Error?_0x11a64e:new Error(String(_0x11a64e));}console[_0x36ad91(0x86)](),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0xd2)](CLI_BIN_NAME+_0x36ad91(0xde))),console['log'](a32_0x2bd256['gray']('─'[_0x36ad91(0x7f)](0x32))),console[_0x36ad91(0x86)](_0x36ad91(0x85)+_0x30698b),console[_0x36ad91(0x86)](_0x36ad91(0xaf)+process['version']),console[_0x36ad91(0x86)](_0x36ad91(0x87)+process[_0x36ad91(0xd9)]+'\x20'+process[_0x36ad91(0xf4)]);const _0x45b38c=inspectBuiltinSkill();console[_0x36ad91(0x86)](),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0xd2)](_0x36ad91(0xc5))),console[_0x36ad91(0x86)](a32_0x2bd256['gray'](_0x36ad91(0xa0)['repeat'](0x1e))),console[_0x36ad91(0x86)](_0x36ad91(0xa9)+(_0x45b38c[_0x36ad91(0xaa)]===_0x36ad91(0xd0)?a32_0x2bd256[_0x36ad91(0x90)](_0x36ad91(0xc6)):a32_0x2bd256[_0x36ad91(0xb3)]('✗\x20'+_0x45b38c[_0x36ad91(0xaa)]))),console['log'](_0x36ad91(0xe8)+_0x45b38c[_0x36ad91(0xcb)]),console['log'](_0x36ad91(0x91)+(_0x45b38c[_0x36ad91(0xbb)]||a32_0x2bd256[_0x36ad91(0x88)](_0x36ad91(0xba)))),console[_0x36ad91(0x86)](_0x36ad91(0xbd)+(_0x45b38c[_0x36ad91(0xe0)]||a32_0x2bd256[_0x36ad91(0x88)](_0x36ad91(0xe9))));_0x45b38c['state']!=='current'&&console['log'](_0x36ad91(0xad)+_0x45b38c[_0x36ad91(0xa7)]);_0x45b38c[_0x36ad91(0x94)]&&console[_0x36ad91(0x86)](_0x36ad91(0xf1)+_0x45b38c[_0x36ad91(0x94)]);console[_0x36ad91(0x86)](),console['log'](a32_0x2bd256['bold'](_0x36ad91(0xc4))),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0x88)]('\x20\x20─'[_0x36ad91(0x7f)](0x1e)));const _0x1e0eee=getGlobalConfigPath(),_0x2749b3=getProjectConfigPath();console[_0x36ad91(0x86)](_0x36ad91(0x8c)+(_0x1e0eee||a32_0x2bd256[_0x36ad91(0x88)](_0x36ad91(0xe9)))),console[_0x36ad91(0x86)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2749b3||a32_0x2bd256[_0x36ad91(0x88)](_0x36ad91(0xe9)))),console[_0x36ad91(0x86)](),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0xd2)](_0x36ad91(0xea))),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0x88)](_0x36ad91(0xa0)[_0x36ad91(0x7f)](0x1e)));const _0x2ebdd4=(_0x4e5437,_0x1f94ec)=>{const _0x520c6b=_0x36ad91;if(!_0x1f94ec){console['log']('\x20\x20'+_0x4e5437[_0x520c6b(0xb4)](0x11)+'\x20'+a32_0x2bd256[_0x520c6b(0x88)](_0x520c6b(0x8b)));return;}const _0xaa70e5=inspectCliConfigJsonFile(_0x1f94ec);if(_0xaa70e5[_0x520c6b(0xe1)]==='ok')console[_0x520c6b(0x86)]('\x20\x20'+_0x4e5437['padEnd'](0x11)+'\x20'+a32_0x2bd256[_0x520c6b(0x90)](_0x520c6b(0x98)));else{if(_0xaa70e5[_0x520c6b(0xe1)]===_0x520c6b(0xab))console[_0x520c6b(0x86)]('\x20\x20'+_0x4e5437['padEnd'](0x11)+'\x20'+a32_0x2bd256[_0x520c6b(0xe4)](_0x520c6b(0xd4)));else _0xaa70e5[_0x520c6b(0xe1)]===_0x520c6b(0xdc)?console[_0x520c6b(0x86)]('\x20\x20'+_0x4e5437[_0x520c6b(0xb4)](0x11)+'\x20'+a32_0x2bd256[_0x520c6b(0x88)](_0x520c6b(0xba))):(console[_0x520c6b(0x86)]('\x20\x20'+_0x4e5437[_0x520c6b(0xb4)](0x11)+'\x20'+a32_0x2bd256[_0x520c6b(0xb3)](_0x520c6b(0xb6))),console['log']('\x20\x20'+''[_0x520c6b(0xb4)](0x11)+'\x20'+a32_0x2bd256['red'](_0xaa70e5[_0x520c6b(0x9b)])));}};_0x2ebdd4(_0x36ad91(0xd7),_0x1e0eee),_0x2ebdd4(_0x36ad91(0xd3),_0x2749b3);const _0x287cc6=loadRawConfigLayers(),_0x153d12=[Object[_0x36ad91(0xc2)]['hasOwnProperty'][_0x36ad91(0x93)](_0x287cc6[_0x36ad91(0xbc)],_0x36ad91(0xc8))?_0x36ad91(0xf3):null,Object[_0x36ad91(0xc2)]['hasOwnProperty'][_0x36ad91(0x93)](_0x287cc6[_0x36ad91(0x7e)],_0x36ad91(0xc8))?_0x36ad91(0xf0):null][_0x36ad91(0x95)](Boolean);_0x153d12[_0x36ad91(0xa5)]>0x0&&(console['log'](_0x36ad91(0xc1)+a32_0x2bd256[_0x36ad91(0xe4)]('ignored\x20in\x20'+_0x153d12['join']('\x20+\x20')+_0x36ad91(0xe2))),_0x153d12[_0x36ad91(0x76)](_0x36ad91(0xf0))&&console[_0x36ad91(0x86)]('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20inherit'),_0x153d12[_0x36ad91(0x76)](_0x36ad91(0xf3))&&console[_0x36ad91(0x86)](_0x36ad91(0xdb)+CLI_BIN_NAME+'\x20config\x20delete\x20inherit\x20--global'));_0x3c9eb9&&(console[_0x36ad91(0x86)](),console['log'](a32_0x2bd256[_0x36ad91(0xd2)](_0x36ad91(0xc9))),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0x88)](_0x36ad91(0xa0)['repeat'](0x1e))),console[_0x36ad91(0x86)](_0x36ad91(0xef)+a32_0x2bd256['red'](_0x36ad91(0x75))),console['log'](_0x36ad91(0xf1)+_0x3c9eb9['message']),Object[_0x36ad91(0xc2)][_0x36ad91(0xce)]['call'](_0x287cc6[_0x36ad91(0x7e)],_0x36ad91(0x82))&&console[_0x36ad91(0x86)]('\x20\x20Repair\x20project:\x20\x20'+CLI_BIN_NAME+_0x36ad91(0xe3)),Object[_0x36ad91(0xc2)][_0x36ad91(0xce)]['call'](_0x287cc6[_0x36ad91(0xbc)],_0x36ad91(0x82))&&console['log'](_0x36ad91(0xd6)+CLI_BIN_NAME+_0x36ad91(0xe5)));_0x2ee147&&(console['log'](),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0xd2)]('\x20\x20Country/Region\x20Configuration')),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0x88)]('\x20\x20─'[_0x36ad91(0x7f)](0x1e))),console[_0x36ad91(0x86)](_0x36ad91(0xef)+a32_0x2bd256['red']('✗\x20Invalid')),console[_0x36ad91(0x86)](_0x36ad91(0xf1)+_0x2ee147[_0x36ad91(0x9b)]),Object[_0x36ad91(0xc2)][_0x36ad91(0xce)]['call'](_0x287cc6[_0x36ad91(0x7e)],_0x36ad91(0x92))&&console['log'](_0x36ad91(0x78)+CLI_BIN_NAME+_0x36ad91(0xe7)),Object[_0x36ad91(0xc2)]['hasOwnProperty'][_0x36ad91(0x93)](_0x287cc6['globalConfig'],_0x36ad91(0x92))&&console[_0x36ad91(0x86)](_0x36ad91(0xd6)+CLI_BIN_NAME+_0x36ad91(0xb5)));console[_0x36ad91(0x86)](),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0xd2)](_0x36ad91(0x9f))),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0x88)](_0x36ad91(0xa0)[_0x36ad91(0x7f)](0x1e))),console[_0x36ad91(0x86)](_0x36ad91(0xa4)+(_0x1ea35e[_0x36ad91(0xa3)]||a32_0x2bd256[_0x36ad91(0xb3)]('(not\x20set)'))),console['log'](_0x36ad91(0xac)+(_0x1f6ae8??a32_0x2bd256[_0x36ad91(0xb3)]('(invalid)'))),console['log']('\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20'+_0x1ea35e[_0x36ad91(0xd1)]),console[_0x36ad91(0x86)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x1ea35e[_0x36ad91(0x80)]||a32_0x2bd256[_0x36ad91(0x88)]('(none)'))),console[_0x36ad91(0x86)](_0x36ad91(0xae)+(_0x1ea35e[_0x36ad91(0xc0)]||a32_0x2bd256['gray'](_0x36ad91(0xcd)))),console[_0x36ad91(0x86)](_0x36ad91(0x9e)+(_0x1ea35e[_0x36ad91(0xd8)]||a32_0x2bd256['gray'](_0x36ad91(0x79)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x36ad91(0x86)](_0x36ad91(0x97)+(_0x1ea35e['pageSize']??a32_0x2bd256[_0x36ad91(0x88)](_0x36ad91(0xdd)))),console[_0x36ad91(0x86)](_0x36ad91(0xed)+_0x1ea35e['riskLevel']),console[_0x36ad91(0x86)](_0x36ad91(0x89)+_0x1ea35e[_0x36ad91(0xdf)]),console[_0x36ad91(0x86)](_0x36ad91(0xb8)+AUTH_MODE[_0x36ad91(0xbe)]),console[_0x36ad91(0x86)](_0x36ad91(0xca)+(_0x1ea35e[_0x36ad91(0xc3)]?a32_0x2bd256[_0x36ad91(0x90)](_0x36ad91(0x8a)+_0x1ea35e[_0x36ad91(0xc3)][_0x36ad91(0xa5)]+')'):a32_0x2bd256['gray'](_0x36ad91(0xcd)))),console[_0x36ad91(0x86)](),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0xd2)]('\x20\x20API\x20Endpoints')),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0x88)](_0x36ad91(0xa0)[_0x36ad91(0x7f)](0x1e)));_0x3c9eb9||_0x2ee147?console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a32_0x2bd256[_0x36ad91(0xb3)]('Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired')):(console['log'](_0x36ad91(0xa8)+getApiDomain()),console['log'](_0x36ad91(0xc7)+getUserDomain()),console[_0x36ad91(0x86)](_0x36ad91(0x84)+getRuntimeDomain()),console[_0x36ad91(0x86)](_0x36ad91(0x7d)+getSkillDomain()),console[_0x36ad91(0x86)]('\x20\x20kbServiceDomain:\x20'+(getKbServiceDomain()??'not\x20configured')));console[_0x36ad91(0x86)](),console['log'](a32_0x2bd256[_0x36ad91(0xd2)]('\x20\x20Service\x20Tree')),console['log'](a32_0x2bd256[_0x36ad91(0x88)](_0x36ad91(0xa0)['repeat'](0x1e)));const _0x1b4c89=inspectServiceRegistry();console['log']('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1b4c89[_0x36ad91(0xee)]),console['log'](_0x36ad91(0xef)+formatServiceRegistryStatus(_0x1b4c89)),console[_0x36ad91(0x86)](_0x36ad91(0x9c)+_0x1b4c89[_0x36ad91(0x99)]),console[_0x36ad91(0x86)](_0x36ad91(0x74)+_0x1b4c89[_0x36ad91(0xa6)]);for(const _0x40375c of _0x1b4c89[_0x36ad91(0x9d)]){console[_0x36ad91(0x86)]('\x20\x20'+(_0x40375c['serviceCode']+':')[_0x36ad91(0xb4)](0x11)+'\x20'+(_0x40375c[_0x36ad91(0xb9)]||a32_0x2bd256['gray'](_0x36ad91(0x8d)))+'\x20('+_0x40375c[_0x36ad91(0xa6)]+_0x36ad91(0xa1)),console['log']('\x20\x20'+''[_0x36ad91(0xb4)](0x11)+_0x36ad91(0xcf)+_0x40375c[_0x36ad91(0x8e)]['path']);}return console[_0x36ad91(0x86)](),console[_0x36ad91(0x86)](a32_0x2bd256[_0x36ad91(0xd2)](_0x36ad91(0x9a))),console[_0x36ad91(0x86)](a32_0x2bd256['gray'](_0x36ad91(0xa0)[_0x36ad91(0x7f)](0x1e))),console[_0x36ad91(0x86)](_0x36ad91(0xbf)+a32_0x2bd256[_0x36ad91(0x90)](AUTH_MODE['ClientAk']+'\x20(accessKey)')),console[_0x36ad91(0x86)](_0x36ad91(0xda)+a32_0x2bd256[_0x36ad91(0x88)](_0x36ad91(0xcc))),console[_0x36ad91(0x86)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x7904bb){const _0x54ba04=a32_0x2958;if(_0x7904bb[_0x54ba04(0xe1)]==='ok')return a32_0x2bd256[_0x54ba04(0x90)]('✓\x20Loaded');if(_0x7904bb['status']==='missing')return a32_0x2bd256[_0x54ba04(0x88)](_0x54ba04(0xe9));if(_0x7904bb[_0x54ba04(0xe1)]===_0x54ba04(0xab))return a32_0x2bd256[_0x54ba04(0xe4)](_0x54ba04(0xe6));return a32_0x2bd256['red'](_0x54ba04(0x75)+(_0x7904bb['message']?':\x20'+_0x7904bb[_0x54ba04(0x9b)]:''));}export const doctorDefinition={'service':a32_0x2c1614(0x7a),'command':a32_0x2c1614(0xd5),'description':a32_0x2c1614(0xb0),'risk':a32_0x2c1614(0xa2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a33_0x3db3f8=a33_0x219c;(function(_0x36ec81,_0xcbc7e3){const _0xd4c31f=a33_0x219c,_0x455c44=_0x36ec81();while(!![]){try{const _0x5bbe98=-parseInt(_0xd4c31f(0x1ae))/0x1*(parseInt(_0xd4c31f(0x1ad))/0x2)+-parseInt(_0xd4c31f(0x1a8))/0x3+parseInt(_0xd4c31f(0x1a5))/0x4+parseInt(_0xd4c31f(0x1c0))/0x5+-parseInt(_0xd4c31f(0x1b4))/0x6+-parseInt(_0xd4c31f(0x1a4))/0x7+parseInt(_0xd4c31f(0x1af))/0x8;if(_0x5bbe98===_0xcbc7e3)break;else _0x455c44['push'](_0x455c44['shift']());}catch(_0x5450dd){_0x455c44['push'](_0x455c44['shift']());}}}(a33_0x40a3,0x8cfc6));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a33_0x3db3f8(0x1ba),'type':a33_0x3db3f8(0x1b9),'required':!![],'description':a33_0x3db3f8(0x1be)},FILEPATH_FLAG={'name':a33_0x3db3f8(0x1ac),'type':'string','required':!![],'description':a33_0x3db3f8(0x1b7)},DOWNLOAD_FLAG={'name':a33_0x3db3f8(0x1bf),'type':a33_0x3db3f8(0x1a6),'description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':'long-term','type':'boolean','description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x2f7cb5){const _0x6f353f=a33_0x3db3f8,_0x61105b=_0x2f7cb5[_0x6f353f(0x1b6)]();if(!_0x61105b)throw CliErrors[_0x6f353f(0x1bb)](_0x6f353f(0x19f));return _0x61105b;}function a33_0x219c(_0x5f04b4,_0x1575c0){_0x5f04b4=_0x5f04b4-0x19e;const _0x40a367=a33_0x40a3();let _0x219c2c=_0x40a367[_0x5f04b4];return _0x219c2c;}const fileUpload={'service':a33_0x3db3f8(0x1ba),'command':a33_0x3db3f8(0x1bd),'description':a33_0x3db3f8(0x1a9),'risk':a33_0x3db3f8(0x1b1),'flags':[FILE_FLAG],async 'dryRun'(_0x4eb4ed){const _0x1ff6d3=a33_0x3db3f8,_0x2df2fc=requireRuntimeUploadFile(_0x4eb4ed[_0x1ff6d3(0x1a7)](_0x1ff6d3(0x1ba)),'File');return dryRun('POST',_0x1ff6d3(0x1a2))['body']({'appCode':_0x4eb4ed[_0x1ff6d3(0x19e)],'multipart':{'file':_0x2df2fc}})[_0x1ff6d3(0x1ab)](_0x1ff6d3(0x1aa)+_0x2df2fc[_0x1ff6d3(0x1c1)]+_0x1ff6d3(0x1c2)+_0x4eb4ed[_0x1ff6d3(0x19e)])[_0x1ff6d3(0x1b0)]();},async 'execute'(_0x355336){const _0xb4727b=a33_0x3db3f8,_0x1711ef=requireRuntimeUploadFile(_0x355336[_0xb4727b(0x1a7)](_0xb4727b(0x1ba)),_0xb4727b(0x1c3)),_0x40c40f=await uploadRuntimeFile(_0x355336['appCode'],_0x1711ef[_0xb4727b(0x1c1)]);return{'ok':!![],'data':_0x40c40f,'message':_0x40c40f[_0xb4727b(0x1b2)]?_0xb4727b(0x1a0)+_0x40c40f['filePath']+_0xb4727b(0x1b3):_0xb4727b(0x1a1)};}},fileQueryUrl={'service':a33_0x3db3f8(0x1ba),'command':a33_0x3db3f8(0x1a3),'description':a33_0x3db3f8(0x1b5),'risk':a33_0x3db3f8(0x1b1),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x114e36){const _0x32e3fe=a33_0x3db3f8,_0x521527=requireFilePath(_0x114e36[_0x32e3fe(0x1a7)](_0x32e3fe(0x1ac))),_0x532e2a=await queryRuntimeFileUrl(_0x521527,{'download':_0x114e36[_0x32e3fe(0x1b8)]('download'),'longTerm':_0x114e36[_0x32e3fe(0x1b8)](_0x32e3fe(0x1bc))});return{'ok':!![],'data':_0x532e2a};}};function a33_0x40a3(){const _0x68a389=['1mmOMSw','10814472PjRGCa','build','read','filePath','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','180528KKrLBp','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','trim','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','bool','string','file','validation','long-term','upload','Path\x20to\x20the\x20local\x20file\x20to\x20upload','download','456265iyTLeO','path','\x20to\x20runtime\x20app\x20','File','appCode','filePath\x20is\x20required.','Uploaded\x20file:\x20','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','/client/uploadFile','query-url','1543479ShEIbP','1277872ndCtwD','boolean','str','890610PjHNjD','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','Preview:\x20upload\x20','description','filepath','1275194meuwWq'];a33_0x40a3=function(){return _0x68a389;};return a33_0x40a3();}export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x45154c=a34_0x25fc;(function(_0x4d34ae,_0x368c4a){const _0x5f2753=a34_0x25fc,_0x96fbd3=_0x4d34ae();while(!![]){try{const _0x2aa806=-parseInt(_0x5f2753(0x116))/0x1+parseInt(_0x5f2753(0x131))/0x2+-parseInt(_0x5f2753(0x12b))/0x3+-parseInt(_0x5f2753(0x12f))/0x4*(parseInt(_0x5f2753(0x138))/0x5)+-parseInt(_0x5f2753(0x11e))/0x6+parseInt(_0x5f2753(0x125))/0x7+parseInt(_0x5f2753(0x11b))/0x8;if(_0x2aa806===_0x368c4a)break;else _0x96fbd3['push'](_0x96fbd3['shift']());}catch(_0x4455bd){_0x96fbd3['push'](_0x96fbd3['shift']());}}}(a34_0x103a,0x5e71e));import{existsSync,readFileSync}from'node:fs';function a34_0x103a(){const _0x5cafba=['Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','boolean','100HLxasB','project','1519258BdXwfN','entries','string','object','validation','defaultApp','riskLevel','103930VIGSoy','\x22.\x20Allowed:\x20','\x20\x20appcode:\x20','appcode','apps','app','Skip\x20confirmation\x20when\x20overwriting','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','file','625337JYsXyT','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','Override\x20imported\x20default\x20env','message','Imported\x20from\x20','6863472baMZwq','\x20\x20config:\x20\x20','yes','67062owKUFt','join','parse','\x20\x20default:\x20','newConfigFileName','cwd','Invalid\x20env\x20\x22','279321MTLXKf',')\x20instead\x20of\x20project','log','env','Override\x20imported\x20default\x20appcode','Source\x20file\x20not\x20found:\x20','343368leKmAT','global'];a34_0x103a=function(){return _0x5cafba;};return a34_0x103a();}import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a34_0x25fc(_0x25403d,_0x3f1178){_0x25403d=_0x25403d-0x116;const _0x103a20=a34_0x103a();let _0x25fce8=_0x103a20[_0x25403d];return _0x25fce8;}import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':a34_0x45154c(0x140),'type':a34_0x45154c(0x133),'description':a34_0x45154c(0x13f),'required':!![]},{'name':a34_0x45154c(0x13b),'type':a34_0x45154c(0x133),'description':a34_0x45154c(0x129)},{'name':a34_0x45154c(0x128),'type':a34_0x45154c(0x133),'description':a34_0x45154c(0x118),'enum':[...RUNTIME_ENV_VALUES]},{'name':a34_0x45154c(0x12c),'type':a34_0x45154c(0x12e),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a34_0x45154c(0x122)]+a34_0x45154c(0x126),'default':![]},{'name':a34_0x45154c(0x11d),'type':a34_0x45154c(0x12e),'description':a34_0x45154c(0x13e),'default':![]}];export async function runAppImport(_0x2c9578){const _0xdcfed8=a34_0x45154c,_0x1ffb29=_0x2c9578[_0xdcfed8(0x12c)]?_0xdcfed8(0x12c):_0xdcfed8(0x130),_0x3bfbb=resolveWriteConfigPath(_0x1ffb29);await runFromImport(_0x2c9578,_0x3bfbb);}async function runFromImport(_0xbed6c2,_0x3b93ec){const _0xedbb5d=a34_0x45154c,_0x7efc17=resolveFilePath(_0xbed6c2[_0xedbb5d(0x140)]);if(!existsSync(_0x7efc17))throw CliErrors[_0xedbb5d(0x135)](_0xedbb5d(0x12a)+_0x7efc17);const _0x259655=readSourceFile(_0x7efc17),_0x1fef6=convertToRuntimeConfig(_0x259655);_0xbed6c2['appcode']&&(_0x1fef6[_0xedbb5d(0x13b)]=String(_0xbed6c2['appcode']));_0xbed6c2[_0xedbb5d(0x128)]&&(_0x1fef6[_0xedbb5d(0x128)]=resolveImportEnv(_0xbed6c2));if(!_0x1fef6[_0xedbb5d(0x13b)])throw CliErrors[_0xedbb5d(0x135)](_0xedbb5d(0x117),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeImportConfig(_0x3b93ec,_0x1fef6,_0xbed6c2),console[_0xedbb5d(0x127)](_0xedbb5d(0x11a)+_0x7efc17),console[_0xedbb5d(0x127)](_0xedbb5d(0x11c)+_0x3b93ec),console['log'](_0xedbb5d(0x13a)+_0x1fef6[_0xedbb5d(0x13b)]);if(_0x1fef6[_0xedbb5d(0x136)])console[_0xedbb5d(0x127)](_0xedbb5d(0x121)+_0x1fef6[_0xedbb5d(0x136)]);}function convertToRuntimeConfig(_0x306db5){const _0x3ce2c5=a34_0x45154c;if(_0x306db5[_0x3ce2c5(0x13c)]&&typeof _0x306db5['apps']===_0x3ce2c5(0x134))throw CliErrors[_0x3ce2c5(0x135)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x3ce2c5(0x12d));const _0x29b939={};for(const _0x1c1c91 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x306db5[_0x1c1c91]!==undefined&&(_0x29b939[_0x1c1c91]=_0x306db5[_0x1c1c91]);}return!_0x29b939[_0x3ce2c5(0x137)]&&(_0x29b939[_0x3ce2c5(0x137)]=DEFAULT_CONFIG_VALUES['riskLevel']),_0x29b939;}async function writeImportConfig(_0x2bb757,_0x5c2e33,_0x2f5a99){const _0x1a0cc6=a34_0x45154c;let _0x4cd2ee={};existsSync(_0x2bb757)&&!_0x2f5a99[_0x1a0cc6(0x11d)]&&(_0x4cd2ee=readConfigFile(_0x2bb757));for(const [_0x4acd1a,_0x421f86]of Object[_0x1a0cc6(0x132)](_0x5c2e33)){_0x421f86!==undefined&&(_0x4cd2ee[_0x4acd1a]=_0x421f86);}if(_0x4cd2ee['app'])delete _0x4cd2ee[_0x1a0cc6(0x13d)];writeConfigFile(_0x2bb757,_0x4cd2ee);}function resolveFilePath(_0x620ab8){const _0x3c3017=a34_0x45154c;return isAbsolute(_0x620ab8)?_0x620ab8:resolve(process[_0x3c3017(0x123)](),_0x620ab8);}function readSourceFile(_0x5c1319){const _0x445406=a34_0x45154c;try{const _0x1dce15=readFileSync(_0x5c1319,{'encoding':'utf8'});return JSON[_0x445406(0x120)](_0x1dce15);}catch(_0x1dc6b9){throw CliErrors[_0x445406(0x135)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x1dc6b9[_0x445406(0x119)]);}}function resolveImportEnv(_0x4c5081){const _0xcf9b4a=a34_0x45154c,_0x2d9a21=_0x4c5081[_0xcf9b4a(0x128)];if(_0x2d9a21===undefined||_0x2d9a21==='')return DEFAULT_CONFIG_VALUES[_0xcf9b4a(0x128)];if(!RUNTIME_ENV_VALUES['includes'](_0x2d9a21))throw CliErrors['validation'](_0xcf9b4a(0x124)+_0x2d9a21+_0xcf9b4a(0x139)+RUNTIME_ENV_VALUES[_0xcf9b4a(0x11f)](',\x20'));return _0x2d9a21;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d30f3,_0x1d3a2f){const _0x234223=a35_0x1f6b,_0x381f86=_0x3d30f3();while(!![]){try{const _0x36a071=-parseInt(_0x234223(0x7d))/0x1*(parseInt(_0x234223(0x86))/0x2)+-parseInt(_0x234223(0x84))/0x3*(-parseInt(_0x234223(0x88))/0x4)+-parseInt(_0x234223(0x8c))/0x5*(-parseInt(_0x234223(0x8b))/0x6)+-parseInt(_0x234223(0x8a))/0x7+parseInt(_0x234223(0x8e))/0x8+parseInt(_0x234223(0x83))/0x9+parseInt(_0x234223(0x82))/0xa;if(_0x36a071===_0x1d3a2f)break;else _0x381f86['push'](_0x381f86['shift']());}catch(_0x5797cc){_0x381f86['push'](_0x381f86['shift']());}}}(a35_0x76c6,0x74c41));import{platform,release,arch}from'node:os';import{getLoginUserInfo}from'../../core/api-client.js';function a35_0x1f6b(_0x238804,_0x3aa264){_0x238804=_0x238804-0x7c;const _0x76c632=a35_0x76c6();let _0x1f6bb0=_0x76c632[_0x238804];return _0x1f6bb0;}function a35_0x76c6(){const _0x4cb2d9=['envName','127976fCvcIH','userName','3996930fpkNcQ','450ikYUDl','33430ZVnFCu','username','1040136McfWZW','production','userId','@lovrabet/lovrabet-cli','848234OprXsN','appCode','name','nickname','mergedCli','1735130gUtjom','2634003ZmJKnN','75uhodsV','nickName','2egsNJd'];a35_0x76c6=function(){return _0x4cb2d9;};return a35_0x76c6();}import{getCliVersion}from'../../utils/version.js';export async function getIssueReportContext(_0x9d59c3,_0x183c82){const _0x156690=a35_0x1f6b,_0x382008=_0x183c82?undefined:await getLoginUserInfo();return{'serviceName':_0x156690(0x7c),'serviceVersion':getCliVersion(),'environment':_0x9d59c3[_0x156690(0x87)]??_0x156690(0x8f),'appCode':_0x9d59c3[_0x156690(0x7e)]||_0x9d59c3[_0x156690(0x81)]?.[_0x156690(0x7e)],'os':platform()+'\x20'+release()+'\x20'+arch(),'terminal':process.env.TERM,'user':_0x382008?{'id':String(_0x382008['id']??_0x382008[_0x156690(0x90)]??''),'username':_0x382008[_0x156690(0x8d)]??_0x382008[_0x156690(0x89)]??_0x382008['loginName'],'nickname':_0x382008[_0x156690(0x80)]??_0x382008[_0x156690(0x85)]??_0x382008[_0x156690(0x7f)]??undefined,'email':_0x382008['email']??undefined,'tenantCode':_0x382008['tenantCode']}:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a36_0x2d71(_0x292368,_0x3c9c6a){_0x292368=_0x292368-0x7c;const _0x3eef5f=a36_0x3eef();let _0x2d7172=_0x3eef5f[_0x292368];return _0x2d7172;}function a36_0x3eef(){const _0x2d42b3=['50nNPsIB','1265776CaylCd','21162snfGuc','710FSMSQv','1106594mvMPpL','5612859GPYBac','16364OGfoGH','325133FOpApT','57ZtkxNO','1311777PNqrfo'];a36_0x3eef=function(){return _0x2d42b3;};return a36_0x3eef();}(function(_0x17be23,_0x1b509c){const _0x172cbf=a36_0x2d71,_0x4a9c31=_0x17be23();while(!![]){try{const _0x459e39=parseInt(_0x172cbf(0x7d))/0x1+parseInt(_0x172cbf(0x84))/0x2+-parseInt(_0x172cbf(0x7e))/0x3*(parseInt(_0x172cbf(0x7c))/0x4)+-parseInt(_0x172cbf(0x83))/0x5*(parseInt(_0x172cbf(0x82))/0x6)+parseInt(_0x172cbf(0x85))/0x7+parseInt(_0x172cbf(0x81))/0x8+-parseInt(_0x172cbf(0x7f))/0x9*(parseInt(_0x172cbf(0x80))/0xa);if(_0x459e39===_0x1b509c)break;else _0x4a9c31['push'](_0x4a9c31['shift']());}catch(_0x702fd2){_0x4a9c31['push'](_0x4a9c31['shift']());}}}(a36_0x3eef,0x81ad9));import{issueReport}from'./report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x278529=a37_0x3384;(function(_0x571128,_0xb9ea4d){const _0x274669=a37_0x3384,_0x183e9e=_0x571128();while(!![]){try{const _0x131576=-parseInt(_0x274669(0xab))/0x1+parseInt(_0x274669(0xc1))/0x2*(parseInt(_0x274669(0xb9))/0x3)+parseInt(_0x274669(0xa8))/0x4*(-parseInt(_0x274669(0xcc))/0x5)+-parseInt(_0x274669(0xd5))/0x6*(-parseInt(_0x274669(0xaa))/0x7)+parseInt(_0x274669(0xb5))/0x8*(-parseInt(_0x274669(0xb2))/0x9)+parseInt(_0x274669(0xbd))/0xa+parseInt(_0x274669(0xbf))/0xb*(parseInt(_0x274669(0xdb))/0xc);if(_0x131576===_0xb9ea4d)break;else _0x183e9e['push'](_0x183e9e['shift']());}catch(_0x4fe416){_0x183e9e['push'](_0x183e9e['shift']());}}}(a37_0x5211,0xbeeaf));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';function a37_0x5211(){const _0x3476c5=['logData','3MruTXK','\x20bytes','file','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','6333140gkSgXq','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','16429765XECHwm','string','509330GJtZqe','redactionKinds','inline','cwd','description','Check\x20your\x20login\x20and\x20network\x20connectivity.','Issue\x20log\x20submitted','filter','descriptionFile:\x20','trim','report','669550lIxNPp','Report\x20a\x20problem\x20log\x20with\x20title\x20and\x20markdown\x20context','length','POST','redactions:\x20','description-file','Cannot\x20read\x20issue\x20description\x20file:\x20','Submit\x20the\x20issue\x20description\x20and\x20diagnostic\x20context\x20as\x20a\x20problem\x20log.','join','6lzJidS','traceName','str','descriptionSource:\x20','descriptionFilePath','truncated','12uzEduK','originalBytes','issue','sanitize','redactionCount','message','Issue\x20description\x20cannot\x20be\x20empty.','utf8','32jFKROL','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','9523955itEinc','640195EObNqB','truncated:\x20original\x20','validation','title','Submit\x20a\x20problem\x20log','spanName','File\x20not\x20found:\x20','2247633qbnzjy','One-line\x20issue\x20summary','keys','40XqSRVt','validate','Issue\x20log\x20submitted\x20(content\x20redacted\x20or\x20truncated)'];a37_0x5211=function(){return _0x3476c5;};return a37_0x5211();}import{reportIssue}from'@lovrabet/cli-framework';import{getIssueReportContext}from'./context.js';const DESCRIPTION_FILE_FLAG=a37_0x278529(0xd1);export const issueReport={'service':a37_0x278529(0xdd),'command':a37_0x278529(0xcb),'description':a37_0x278529(0xcd),'risk':'read','confirmationDescription':a37_0x278529(0xd3),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':'compress','flags':[{'name':'title','type':a37_0x278529(0xc0),'required':!![],'description':a37_0x278529(0xb3)},{'name':a37_0x278529(0xc5),'type':a37_0x278529(0xc0),'description':'Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)'},{'name':DESCRIPTION_FILE_FLAG,'type':a37_0x278529(0xc0),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x5ab55f){const _0x3aafac=a37_0x278529,_0x31c276=_0x5ab55f[_0x3aafac(0xd7)](_0x3aafac(0xae))[_0x3aafac(0xca)](),_0x29db49=_0x5ab55f[_0x3aafac(0xd7)](_0x3aafac(0xc5))[_0x3aafac(0xca)](),_0x32887e=_0x5ab55f['str'](DESCRIPTION_FILE_FLAG)[_0x3aafac(0xca)]();if(!_0x31c276)throw CliErrors['flagMissing'](_0x3aafac(0xae),_0x3aafac(0xbc));const _0x24484a=_0x29db49[_0x3aafac(0xce)]>0x0,_0x1be484=_0x32887e[_0x3aafac(0xce)]>0x0;if(_0x24484a===_0x1be484)throw CliErrors[_0x3aafac(0xad)](_0x3aafac(0xbe),_0x3aafac(0xa9));if(_0x1be484){const _0x23eafb=resolve(process['cwd'](),_0x32887e);if(!existsSync(_0x23eafb))throw CliErrors[_0x3aafac(0xad)](_0x3aafac(0xb1)+_0x23eafb);}},async 'dryRun'(_0x1d9b0c){const _0x319f6b=a37_0x278529,_0x1ce630=await prepareIssueReport(_0x1d9b0c,!![]);return{'method':_0x319f6b(0xcf),'url':'otel://'+_0x1ce630['traceName']+'/'+_0x1ce630[_0x319f6b(0xb0)],'body':{'traceName':_0x1ce630['traceName'],'spanName':_0x1ce630[_0x319f6b(0xb0)],'logData':_0x1ce630[_0x319f6b(0xb8)]},'description':[_0x319f6b(0xaf),_0x319f6b(0xd8)+_0x1ce630['descriptionSource'],_0x1ce630[_0x319f6b(0xd9)]?_0x319f6b(0xc9)+_0x1ce630[_0x319f6b(0xd9)]:null,_0x1ce630[_0x319f6b(0xde)][_0x319f6b(0xda)]?_0x319f6b(0xac)+_0x1ce630[_0x319f6b(0xde)][_0x319f6b(0xdc)]+_0x319f6b(0xba):null,_0x1ce630[_0x319f6b(0xde)][_0x319f6b(0xdf)]>0x0?_0x319f6b(0xd0)+_0x1ce630[_0x319f6b(0xde)]['redactionCount']+'\x20('+_0x1ce630[_0x319f6b(0xde)][_0x319f6b(0xc2)][_0x319f6b(0xd4)](',\x20')+')':null][_0x319f6b(0xc8)](Boolean)['join']('\x0a')};},async 'execute'(_0x591693){const _0x2d2e05=a37_0x278529,_0x5001bc=await prepareIssueReport(_0x591693,![]);return{'ok':!![],'message':_0x5001bc[_0x2d2e05(0xde)][_0x2d2e05(0xdf)]||_0x5001bc[_0x2d2e05(0xde)]['truncated']?_0x2d2e05(0xb7):_0x2d2e05(0xc7),'data':{'traceName':_0x5001bc[_0x2d2e05(0xd6)],'spanName':_0x5001bc[_0x2d2e05(0xb0)],'logDataKeys':Object[_0x2d2e05(0xb4)](_0x5001bc[_0x2d2e05(0xb8)]),'issue':{'title':_0x5001bc[_0x2d2e05(0xae)],'descriptionLength':_0x5001bc[_0x2d2e05(0xc5)][_0x2d2e05(0xce)],'descriptionSource':_0x5001bc['descriptionSource'],..._0x5001bc[_0x2d2e05(0xd9)]?{'descriptionFile':_0x5001bc['descriptionFilePath']}:{},'sanitize':{'originalBytes':_0x5001bc[_0x2d2e05(0xde)]['originalBytes'],'truncated':_0x5001bc['sanitize'][_0x2d2e05(0xda)],'redactions':_0x5001bc[_0x2d2e05(0xde)][_0x2d2e05(0xdf)],'redactionKinds':_0x5001bc['sanitize'][_0x2d2e05(0xc2)]}}}};}};function a37_0x3384(_0x1bc37e,_0x3af770){_0x1bc37e=_0x1bc37e-0xa7;const _0x52116b=a37_0x5211();let _0x338499=_0x52116b[_0x1bc37e];return _0x338499;}async function prepareIssueReport(_0x25e719,_0x55e5b7){const _0x3235b2=a37_0x278529;await issueReport[_0x3235b2(0xb6)](_0x25e719);const _0x1986ad=_0x25e719[_0x3235b2(0xd7)](DESCRIPTION_FILE_FLAG)[_0x3235b2(0xca)](),_0x31205f=_0x1986ad?resolve(process[_0x3235b2(0xc4)](),_0x1986ad):undefined;let _0x4a421f=_0x25e719[_0x3235b2(0xd7)](_0x3235b2(0xc5));if(_0x31205f)try{_0x4a421f=await readFile(_0x31205f,_0x3235b2(0xa7));}catch{throw CliErrors[_0x3235b2(0xad)](_0x3235b2(0xd2)+_0x31205f);}if(!_0x4a421f['trim']())throw CliErrors[_0x3235b2(0xad)](_0x3235b2(0xe1));const _0x6081b3=await getIssueReportContext(_0x25e719,_0x55e5b7);try{const _0x463d13=await reportIssue({'title':_0x25e719[_0x3235b2(0xd7)](_0x3235b2(0xae)),'description':_0x4a421f,'context':_0x6081b3,'dryRun':_0x55e5b7});return{..._0x463d13,'descriptionSource':_0x31205f?_0x3235b2(0xbb):_0x3235b2(0xc3),'descriptionFilePath':_0x31205f};}catch(_0x1ef4af){throw CliErrors['apiError']('Failed\x20to\x20submit\x20issue\x20log:\x20'+(_0x1ef4af instanceof Error?_0x1ef4af[_0x3235b2(0xe0)]:String(_0x1ef4af)),_0x3235b2(0xc6));}}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a38_0x52ee04=a38_0x1d15;function a38_0x1d15(_0x58adc4,_0x395921){_0x58adc4=_0x58adc4-0x112;const _0x1e8322=a38_0x1e83();let _0x1d159e=_0x1e8322[_0x58adc4];return _0x1d159e;}(function(_0x1e465b,_0x3d1859){const _0x5c6edc=a38_0x1d15,_0x128002=_0x1e465b();while(!![]){try{const _0x351d86=-parseInt(_0x5c6edc(0x141))/0x1*(parseInt(_0x5c6edc(0x134))/0x2)+parseInt(_0x5c6edc(0x120))/0x3+parseInt(_0x5c6edc(0x135))/0x4*(-parseInt(_0x5c6edc(0x12f))/0x5)+parseInt(_0x5c6edc(0x13b))/0x6+-parseInt(_0x5c6edc(0x14a))/0x7*(-parseInt(_0x5c6edc(0x13f))/0x8)+-parseInt(_0x5c6edc(0x145))/0x9+parseInt(_0x5c6edc(0x131))/0xa*(parseInt(_0x5c6edc(0x14d))/0xb);if(_0x351d86===_0x3d1859)break;else _0x128002['push'](_0x128002['shift']());}catch(_0x275ebb){_0x128002['push'](_0x128002['shift']());}}}(a38_0x1e83,0xaa90a));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{planPersonalKnowledgeWrite,withKbManagementOrigin}from'../../core/kb-management-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a38_0x1e83(){const _0x1cc8db=['create','Personal\x20knowledge-base\x20entry\x20ID','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','write','title','createTime','update','validation','ragStatus','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','path','Created\x20KB\x20entry\x20','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','method','description','updateTime','flag','content','1023819KSfXpI','File\x20path\x20is\x20required.','scope','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','length','trim','execute','isSafeInteger','map','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','file','dryRun','File\x20not\x20found:\x20','query','version','1030Dsovgm','detail','100FWmOWV','string','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','1270562rndyHB','7632CQnYBm','kb-service-url','verbose','jsonBody','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','topk','7354110AbtTqC','read','parse','Search\x20query\x20is\x20required.','16DlFPOh','userId','1IPDsHo','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','str','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','1583469YwFkBA','ragErrorMessage','Personal\x20knowledge-base\x20entry\x20title','appCode','search','380821QhDlHc','signal','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','249854pZLnot','isFile'];a38_0x1e83=function(){return _0x1cc8db;};return a38_0x1e83();}import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a38_0x52ee04(0x112),'type':a38_0x52ee04(0x132),'required':!![],'description':a38_0x52ee04(0x147)},FILE_FLAG={'name':a38_0x52ee04(0x12a),'type':a38_0x52ee04(0x132),'required':!![],'description':a38_0x52ee04(0x129)},QUERY_FLAG={'name':a38_0x52ee04(0x12d),'type':a38_0x52ee04(0x132),'required':!![],'description':'Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a38_0x52ee04(0x13a),'type':'number','description':a38_0x52ee04(0x14c)};function readKnowledgeFile(_0x7990be){const _0x24cc96=a38_0x52ee04;if(!_0x7990be)throw CliErrors[_0x24cc96(0x115)](_0x24cc96(0x121));if(!existsSync(_0x7990be))throw CliErrors[_0x24cc96(0x115)](_0x24cc96(0x12c)+_0x7990be);if(!statSync(_0x7990be)[_0x24cc96(0x14e)]())throw CliErrors[_0x24cc96(0x115)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x7990be);return readFileSync(_0x7990be,'utf8');}function summarizePersonalItem(_0x598353){const _0x4f8222=a38_0x52ee04;return{'id':_0x598353['id'],'title':_0x598353[_0x4f8222(0x112)],'version':_0x598353[_0x4f8222(0x12e)],'ragStatus':_0x598353[_0x4f8222(0x116)],'ragErrorMessage':_0x598353[_0x4f8222(0x146)],'updateTime':_0x598353[_0x4f8222(0x11d)]};}function detailPersonalItem(_0x501731){const _0x34418d=a38_0x52ee04;return{'id':_0x501731['id'],'appCode':_0x501731['appCode'],'scope':_0x501731[_0x34418d(0x122)],'userId':_0x501731[_0x34418d(0x140)],'title':_0x501731[_0x34418d(0x112)],'content':_0x501731[_0x34418d(0x11f)],'version':_0x501731['version'],'ragStatus':_0x501731[_0x34418d(0x116)],'ragErrorMessage':_0x501731[_0x34418d(0x146)],'createTime':_0x501731[_0x34418d(0x113)],'updateTime':_0x501731[_0x34418d(0x11d)]};}function readTopK(_0x2caf95){const _0x340061=a38_0x52ee04,_0x219b11=_0x2caf95[_0x340061(0x11e)]('topk');if(_0x219b11===undefined||_0x219b11===null||_0x219b11==='')return undefined;const _0x1c4b4e=_0x2caf95['num'](_0x340061(0x13a));if(!Number[_0x340061(0x127)](_0x1c4b4e)||_0x1c4b4e<0x1||_0x1c4b4e>0x32)throw CliErrors[_0x340061(0x115)](_0x340061(0x151));return _0x1c4b4e;}const kbList={'service':'kb','command':'list','description':a38_0x52ee04(0x139),'risk':a38_0x52ee04(0x13c),'flags':[VERBOSE_FLAG],async 'execute'(_0x58369c){const _0x5163f4=a38_0x52ee04,_0x174370=await listPersonalKnowledgeBaseItems(_0x58369c[_0x5163f4(0x148)],_0x58369c[_0x5163f4(0x14b)]);if(_0x58369c['bool'](_0x5163f4(0x137)))return{'ok':!![],'data':{'total':_0x174370[_0x5163f4(0x124)],'items':_0x174370}};return{'ok':!![],'data':{'total':_0x174370[_0x5163f4(0x124)],'items':_0x174370[_0x5163f4(0x128)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a38_0x52ee04(0x130),'description':a38_0x52ee04(0x133),'risk':'read','flags':[{...ID_FLAG,'type':a38_0x52ee04(0x132),'description':a38_0x52ee04(0x150)}],async 'execute'(_0x2727c5){const _0x15b4d5=a38_0x52ee04,_0x3f4185=await getPersonalKnowledgeBaseItem(_0x2727c5[_0x15b4d5(0x143)]('id'),_0x2727c5['appCode'],_0x2727c5[_0x15b4d5(0x14b)]);return{'ok':!![],'data':detailPersonalItem(_0x3f4185)};}},kbCreate={'service':'kb','command':a38_0x52ee04(0x14f),'description':a38_0x52ee04(0x144),'risk':'write','confirmationDescription':'Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x5eeb04){const _0x24742b=a38_0x52ee04,_0x204d0e=_0x5eeb04[_0x24742b(0x143)](_0x24742b(0x112)),_0xfe5ef5=readKnowledgeFile(_0x5eeb04[_0x24742b(0x143)](_0x24742b(0x12a))),_0xf14cb0=await createPersonalKnowledgeBaseItem(_0x5eeb04['appCode'],{'title':_0x204d0e,'content':_0xfe5ef5},_0x5eeb04[_0x24742b(0x14b)]);return{'ok':!![],'data':summarizePersonalItem(_0xf14cb0),'message':_0x24742b(0x119)+_0xf14cb0['id']+'\x20('+_0xf14cb0[_0x24742b(0x112)]+')'};},async 'dryRun'(_0x562ca4){const _0x485281=a38_0x52ee04,_0x1de9b9=_0x562ca4[_0x485281(0x143)](_0x485281(0x112)),_0x5468b8=readKnowledgeFile(_0x562ca4[_0x485281(0x143)](_0x485281(0x12a))),_0xae1787=planPersonalKnowledgeWrite(_0x562ca4[_0x485281(0x148)],{'title':_0x1de9b9,'content':_0x5468b8});return dryRun(_0xae1787[_0x485281(0x11b)],_0xae1787[_0x485281(0x118)])['body'](JSON[_0x485281(0x13d)](_0xae1787['jsonBody']))['description'](_0x485281(0x123)+_0x1de9b9+'\x22')['build']();}},kbUpdate={'service':'kb','command':a38_0x52ee04(0x114),'description':a38_0x52ee04(0x152),'risk':a38_0x52ee04(0x155),'confirmationDescription':a38_0x52ee04(0x153),'flags':[{...ID_FLAG,'type':a38_0x52ee04(0x132),'description':a38_0x52ee04(0x150)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x5a3301){const _0x7e2338=a38_0x52ee04,_0x5b3574=_0x5a3301[_0x7e2338(0x143)]('id'),_0x2c37b4=readKnowledgeFile(_0x5a3301[_0x7e2338(0x143)]('file')),_0x41b1f6=_0x5a3301[_0x7e2338(0x143)](_0x7e2338(0x112))||undefined,_0x1048fa=await updatePersonalKnowledgeBaseItem(_0x5b3574,_0x5a3301[_0x7e2338(0x148)],{'title':_0x41b1f6,'content':_0x2c37b4},_0x5a3301[_0x7e2338(0x14b)]);return{'ok':!![],'data':summarizePersonalItem(_0x1048fa),'message':'Updated\x20KB\x20entry\x20'+_0x1048fa['id']+'\x20('+_0x1048fa[_0x7e2338(0x112)]+')'};},async 'dryRun'(_0x2e31fe){const _0x56520e=a38_0x52ee04,_0x1edeae=_0x2e31fe[_0x56520e(0x143)]('id'),_0x5d9bdb=readKnowledgeFile(_0x2e31fe[_0x56520e(0x143)](_0x56520e(0x12a))),_0x4e0b68=await getPersonalKnowledgeBaseItem(_0x1edeae,_0x2e31fe[_0x56520e(0x148)],_0x2e31fe[_0x56520e(0x14b)]),_0x241fc5=_0x2e31fe[_0x56520e(0x143)](_0x56520e(0x112))||_0x4e0b68[_0x56520e(0x112)],_0x32643c=planPersonalKnowledgeWrite(_0x2e31fe[_0x56520e(0x148)],{'title':_0x241fc5,'content':_0x5d9bdb},_0x1edeae,_0x4e0b68['version']);return dryRun(_0x32643c[_0x56520e(0x11b)],_0x32643c['path'])['body'](JSON[_0x56520e(0x13d)](_0x32643c[_0x56520e(0x138)]))[_0x56520e(0x11c)](_0x56520e(0x142)+_0x1edeae)['build']();}};function readSearchServiceUrl(_0x29875b){const _0x15442c=a38_0x52ee04;if(_0x29875b[_0x15442c(0x11e)]('kb-service-url')!==undefined)return normalizeKbServiceOrigin(_0x29875b['str'](_0x15442c(0x136)));const _0x18a8ef=getKbServiceDomain();if(!_0x18a8ef)throw CliErrors[_0x15442c(0x115)](_0x15442c(0x11a),'Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.');return normalizeKbServiceOrigin(_0x18a8ef);}const kbSearch={'service':'kb','command':a38_0x52ee04(0x149),'description':a38_0x52ee04(0x154),'risk':a38_0x52ee04(0x13c),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':'kb-service-url','type':a38_0x52ee04(0x132),'required':![],'description':a38_0x52ee04(0x117)}],async 'validate'(_0x100c4c){const _0x5651fc=a38_0x52ee04;if(!_0x100c4c[_0x5651fc(0x143)](_0x5651fc(0x12d))[_0x5651fc(0x125)]())throw CliErrors['validation'](_0x5651fc(0x13e));readTopK(_0x100c4c),readSearchServiceUrl(_0x100c4c);},async 'execute'(_0x13e371){const _0x3076dd=a38_0x52ee04,_0x47046b=_0x13e371['str'](_0x3076dd(0x12d))[_0x3076dd(0x125)](),_0xe3aedf=readTopK(_0x13e371),_0x23b689=readSearchServiceUrl(_0x13e371),_0x19ac31={'appCode':_0x13e371[_0x3076dd(0x148)],'accessKey':_0x13e371['accessKey']??'','query':_0x47046b,..._0xe3aedf!==undefined?{'topK':_0xe3aedf}:{},'signal':_0x13e371[_0x3076dd(0x14b)]},_0x279cb4=await searchDirectKnowledge({..._0x19ac31,'serviceUrl':_0x23b689});return{'ok':!![],'data':_0x279cb4};}};function managementCommand(_0x40c31d){const _0x2358b4=a38_0x52ee04;return{..._0x40c31d,'execute':_0x4b1a15=>withKbManagementOrigin(()=>_0x40c31d[_0x2358b4(0x126)](_0x4b1a15)),..._0x40c31d[_0x2358b4(0x12b)]?{'dryRun':_0x5ec7d0=>withKbManagementOrigin(()=>_0x40c31d[_0x2358b4(0x12b)](_0x5ec7d0))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate][a38_0x52ee04(0x128)](managementCommand),kbSearch];
|
|
1
|
+
const a38_0x2e52ea=a38_0x8bd7;(function(_0x1ca8c5,_0x2b4351){const _0x23f967=a38_0x8bd7,_0x7ac39e=_0x1ca8c5();while(!![]){try{const _0x410ad0=parseInt(_0x23f967(0x99))/0x1*(parseInt(_0x23f967(0x93))/0x2)+-parseInt(_0x23f967(0x8f))/0x3*(-parseInt(_0x23f967(0x8e))/0x4)+-parseInt(_0x23f967(0x78))/0x5+-parseInt(_0x23f967(0x9c))/0x6+-parseInt(_0x23f967(0xa9))/0x7+parseInt(_0x23f967(0x87))/0x8*(-parseInt(_0x23f967(0x8c))/0x9)+parseInt(_0x23f967(0x82))/0xa*(parseInt(_0x23f967(0x70))/0xb);if(_0x410ad0===_0x2b4351)break;else _0x7ac39e['push'](_0x7ac39e['shift']());}catch(_0x3dadae){_0x7ac39e['push'](_0x7ac39e['shift']());}}}(a38_0x4b35,0x24c44));import{existsSync,readFileSync,statSync}from'node:fs';function a38_0x8bd7(_0x37a07c,_0x5e82a1){_0x37a07c=_0x37a07c-0x6f;const _0x4b35b5=a38_0x4b35();let _0x8bd75c=_0x4b35b5[_0x37a07c];return _0x8bd75c;}import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{planPersonalKnowledgeWrite,withKbManagementOrigin}from'../../core/kb-management-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a38_0x2e52ea(0xa1),'type':a38_0x2e52ea(0xb4),'required':!![],'description':a38_0x2e52ea(0x98)},FILE_FLAG={'name':'file','type':a38_0x2e52ea(0xb4),'required':!![],'description':a38_0x2e52ea(0xad)},QUERY_FLAG={'name':a38_0x2e52ea(0x8d),'type':a38_0x2e52ea(0xb4),'required':!![],'description':a38_0x2e52ea(0x96)},TOPK_FLAG={'name':a38_0x2e52ea(0x97),'type':'number','description':a38_0x2e52ea(0x7d)};function readKnowledgeFile(_0x1ead94){const _0x38f09e=a38_0x2e52ea;if(!_0x1ead94)throw CliErrors[_0x38f09e(0xa8)](_0x38f09e(0x8a));if(!existsSync(_0x1ead94))throw CliErrors[_0x38f09e(0xa8)](_0x38f09e(0x80)+_0x1ead94);if(!statSync(_0x1ead94)[_0x38f09e(0x7f)]())throw CliErrors[_0x38f09e(0xa8)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x1ead94);return readFileSync(_0x1ead94,_0x38f09e(0x76));}function summarizePersonalItem(_0x38ad4a){const _0x154e71=a38_0x2e52ea;return{'id':_0x38ad4a['id'],'title':_0x38ad4a['title'],'version':_0x38ad4a[_0x154e71(0x73)],'ragStatus':_0x38ad4a['ragStatus'],'ragErrorMessage':_0x38ad4a['ragErrorMessage'],'updateTime':_0x38ad4a[_0x154e71(0xaf)]};}function detailPersonalItem(_0x598bfe){const _0x5a6869=a38_0x2e52ea;return{'id':_0x598bfe['id'],'appCode':_0x598bfe[_0x5a6869(0x9a)],'scope':_0x598bfe[_0x5a6869(0xab)],'userId':_0x598bfe['userId'],'title':_0x598bfe[_0x5a6869(0xa1)],'content':_0x598bfe['content'],'version':_0x598bfe[_0x5a6869(0x73)],'ragStatus':_0x598bfe['ragStatus'],'ragErrorMessage':_0x598bfe['ragErrorMessage'],'createTime':_0x598bfe['createTime'],'updateTime':_0x598bfe['updateTime']};}function readTopK(_0x4a2576){const _0x736097=a38_0x2e52ea,_0x48ee19=_0x4a2576[_0x736097(0x74)](_0x736097(0x97));if(_0x48ee19===undefined||_0x48ee19===null||_0x48ee19==='')return undefined;const _0x7eb744=_0x4a2576['num'](_0x736097(0x97));if(!Number[_0x736097(0xa7)](_0x7eb744)||_0x7eb744<0x1||_0x7eb744>0x32)throw CliErrors[_0x736097(0xa8)](_0x736097(0x7a));return _0x7eb744;}const kbList={'service':'kb','command':a38_0x2e52ea(0x9b),'description':a38_0x2e52ea(0x75),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x494cc2){const _0x4a67ad=a38_0x2e52ea,_0x17dcf9=await listPersonalKnowledgeBaseItems(_0x494cc2[_0x4a67ad(0x9a)],_0x494cc2['signal']);if(_0x494cc2[_0x4a67ad(0x94)](_0x4a67ad(0x83)))return{'ok':!![],'data':{'total':_0x17dcf9[_0x4a67ad(0xb3)],'items':_0x17dcf9}};return{'ok':!![],'data':{'total':_0x17dcf9[_0x4a67ad(0xb3)],'items':_0x17dcf9['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a38_0x2e52ea(0xaa),'description':a38_0x2e52ea(0x84),'risk':a38_0x2e52ea(0x90),'flags':[{...ID_FLAG,'type':a38_0x2e52ea(0xb4),'description':'Personal\x20knowledge-base\x20entry\x20ID'}],async 'execute'(_0x12cb8a){const _0x54ac08=a38_0x2e52ea,_0x7c3a9f=await getPersonalKnowledgeBaseItem(_0x12cb8a['str']('id'),_0x12cb8a['appCode'],_0x12cb8a[_0x54ac08(0x6f)]);return{'ok':!![],'data':detailPersonalItem(_0x7c3a9f)};}},kbCreate={'service':'kb','command':a38_0x2e52ea(0x86),'description':a38_0x2e52ea(0xa2),'risk':a38_0x2e52ea(0xae),'confirmationDescription':a38_0x2e52ea(0x85),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x265305){const _0x502b4e=a38_0x2e52ea,_0x315e4d=_0x265305[_0x502b4e(0x7e)]('title'),_0x3382b5=readKnowledgeFile(_0x265305['str'](_0x502b4e(0x9e))),_0x190702=await createPersonalKnowledgeBaseItem(_0x265305[_0x502b4e(0x9a)],{'title':_0x315e4d,'content':_0x3382b5},_0x265305[_0x502b4e(0x6f)]);return{'ok':!![],'data':summarizePersonalItem(_0x190702),'message':_0x502b4e(0x89)+_0x190702['id']+'\x20('+_0x190702['title']+')'};},async 'dryRun'(_0x227184){const _0x5e68cb=a38_0x2e52ea,_0x239e90=_0x227184['str'](_0x5e68cb(0xa1)),_0x482841=readKnowledgeFile(_0x227184['str'](_0x5e68cb(0x9e))),_0x427458=planPersonalKnowledgeWrite(_0x227184[_0x5e68cb(0x9a)],{'title':_0x239e90,'content':_0x482841});return dryRun(_0x427458[_0x5e68cb(0xa6)],_0x427458[_0x5e68cb(0xac)])['body'](JSON[_0x5e68cb(0x8b)](_0x427458['jsonBody']))[_0x5e68cb(0xa4)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x239e90+'\x22')[_0x5e68cb(0xa3)]();}},kbUpdate={'service':'kb','command':a38_0x2e52ea(0xb0),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a38_0x2e52ea(0xae),'confirmationDescription':a38_0x2e52ea(0x72),'flags':[{...ID_FLAG,'type':a38_0x2e52ea(0xb4),'description':a38_0x2e52ea(0xa5)},{...TITLE_FLAG,'required':![],'description':a38_0x2e52ea(0x92)},FILE_FLAG],async 'execute'(_0x50c321){const _0x3c099c=a38_0x2e52ea,_0x4834c8=_0x50c321['str']('id'),_0x3f80da=readKnowledgeFile(_0x50c321[_0x3c099c(0x7e)](_0x3c099c(0x9e))),_0x4ea78f=_0x50c321[_0x3c099c(0x7e)]('title')||undefined,_0xa4ddc0=await updatePersonalKnowledgeBaseItem(_0x4834c8,_0x50c321['appCode'],{'title':_0x4ea78f,'content':_0x3f80da},_0x50c321['signal']);return{'ok':!![],'data':summarizePersonalItem(_0xa4ddc0),'message':_0x3c099c(0x91)+_0xa4ddc0['id']+'\x20('+_0xa4ddc0[_0x3c099c(0xa1)]+')'};},async 'dryRun'(_0x452aa8){const _0x5460e3=a38_0x2e52ea,_0x49060a=_0x452aa8['str']('id'),_0xa8129=readKnowledgeFile(_0x452aa8[_0x5460e3(0x7e)](_0x5460e3(0x9e))),_0x2ee50d=await getPersonalKnowledgeBaseItem(_0x49060a,_0x452aa8[_0x5460e3(0x9a)],_0x452aa8[_0x5460e3(0x6f)]),_0xd2f924=_0x452aa8['str'](_0x5460e3(0xa1))||_0x2ee50d[_0x5460e3(0xa1)],_0x49f031=planPersonalKnowledgeWrite(_0x452aa8[_0x5460e3(0x9a)],{'title':_0xd2f924,'content':_0xa8129},_0x49060a,_0x2ee50d[_0x5460e3(0x73)]);return dryRun(_0x49f031[_0x5460e3(0xa6)],_0x49f031[_0x5460e3(0xac)])[_0x5460e3(0x7b)](JSON[_0x5460e3(0x8b)](_0x49f031['jsonBody']))[_0x5460e3(0xa4)](_0x5460e3(0x71)+_0x49060a)[_0x5460e3(0xa3)]();}};function readSearchServiceUrl(_0x43f9cd){const _0x509937=a38_0x2e52ea;if(_0x43f9cd[_0x509937(0x74)](_0x509937(0x7c))!==undefined)return normalizeKbServiceOrigin(_0x43f9cd[_0x509937(0x7e)](_0x509937(0x7c)));const _0x3b671f=getKbServiceDomain();if(!_0x3b671f)throw CliErrors[_0x509937(0xa8)](_0x509937(0x95),_0x509937(0x77));return normalizeKbServiceOrigin(_0x3b671f);}const kbSearch={'service':'kb','command':a38_0x2e52ea(0x9d),'description':a38_0x2e52ea(0x88),'risk':a38_0x2e52ea(0x90),'flags':[QUERY_FLAG,TOPK_FLAG,{'name':a38_0x2e52ea(0x7c),'type':a38_0x2e52ea(0xb4),'required':![],'description':a38_0x2e52ea(0x79)}],async 'validate'(_0x3b9577){const _0x7fc8ee=a38_0x2e52ea;if(!_0x3b9577[_0x7fc8ee(0x7e)](_0x7fc8ee(0x8d))['trim']())throw CliErrors[_0x7fc8ee(0xa8)](_0x7fc8ee(0xa0));readTopK(_0x3b9577),readSearchServiceUrl(_0x3b9577);},async 'execute'(_0x3d2cdc){const _0x464f67=a38_0x2e52ea,_0x2387ee=_0x3d2cdc[_0x464f67(0x7e)](_0x464f67(0x8d))[_0x464f67(0x81)](),_0x3a84c3=readTopK(_0x3d2cdc),_0x47b657=readSearchServiceUrl(_0x3d2cdc),_0xc3f37e={'appCode':_0x3d2cdc['appCode'],'accessKey':_0x3d2cdc[_0x464f67(0x9f)]??'','query':_0x2387ee,..._0x3a84c3!==undefined?{'topK':_0x3a84c3}:{},'signal':_0x3d2cdc['signal']},_0x185504=await searchDirectKnowledge({..._0xc3f37e,'serviceUrl':_0x47b657});return{'ok':!![],'data':_0x185504};}};function managementCommand(_0x1e5aee){const _0x7f2c08=a38_0x2e52ea;return{..._0x1e5aee,'execute':_0xde0064=>withKbManagementOrigin(()=>_0x1e5aee[_0x7f2c08(0xb2)](_0xde0064)),..._0x1e5aee[_0x7f2c08(0xb1)]?{'dryRun':_0x3fe538=>withKbManagementOrigin(()=>_0x1e5aee[_0x7f2c08(0xb1)](_0x3fe538))}:{}};}export const kbDefinitions=[...[kbList,kbDetail,kbCreate,kbUpdate]['map'](managementCommand),kbSearch];function a38_0x4b35(){const _0x4af46e=['verbose','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','Saves\x20local\x20file\x20content\x20as\x20a\x20personal\x20knowledge-base\x20entry\x20and\x20starts\x20retrieval\x20sync.','create','8TlrXAU','Search\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','Created\x20KB\x20entry\x20','File\x20path\x20is\x20required.','parse','1902105wsQmBp','query','628244NAVrck','3QzTjoO','read','Updated\x20KB\x20entry\x20','Override\x20the\x20existing\x20entry\x20title','32iBzjoI','bool','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','Search\x20query\x20for\x20visible\x20public,\x20company,\x20and\x20personal\x20knowledge','topk','Personal\x20knowledge-base\x20entry\x20title','14033UFhlGX','appCode','list','1152630SdpiqJ','search','file','accessKey','Search\x20query\x20is\x20required.','title','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','build','description','Personal\x20knowledge-base\x20entry\x20ID','method','isSafeInteger','validation','1873942OGzmTl','detail','scope','path','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','write','updateTime','update','dryRun','execute','length','string','signal','5391463CNfaJj','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','Replaces\x20the\x20personal\x20knowledge-base\x20entry\x20body\x20with\x20local\x20file\x20content\x20and\x20triggers\x20retrieval\x20sync.','version','flag','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','utf8','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20`--kb-service-url\x20<https-origin>`\x20for\x20this\x20request.','249850lMMDGh','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','body','kb-service-url','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','str','isFile','File\x20not\x20found:\x20','trim','10ZoTRZU'];a38_0x4b35=function(){return _0x4af46e;};return a38_0x4b35();}
|