@lovrabet/rabetbase-cli 2.5.0-beta.4 → 2.5.0-beta.6
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/README.md +28 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.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/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.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/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.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/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.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/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.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/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.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/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/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11c2ae,_0x27478b){const _0x4dbbd6=a88_0x57a0,_0x1be63d=_0x11c2ae();while(!![]){try{const _0x2cf82f=parseInt(_0x4dbbd6(0xf1))/0x1+parseInt(_0x4dbbd6(0xf5))/0x2+parseInt(_0x4dbbd6(0xf3))/0x3+-parseInt(_0x4dbbd6(0xf4))/0x4*(parseInt(_0x4dbbd6(0xf6))/0x5)+parseInt(_0x4dbbd6(0xf2))/0x6*(-parseInt(_0x4dbbd6(0xef))/0x7)+-parseInt(_0x4dbbd6(0xf9))/0x8*(parseInt(_0x4dbbd6(0xf0))/0x9)+parseInt(_0x4dbbd6(0xf7))/0xa*(-parseInt(_0x4dbbd6(0xf8))/0xb);if(_0x2cf82f===_0x27478b)break;else _0x1be63d['push'](_0x1be63d['shift']());}catch(_0x35b48){_0x1be63d['push'](_0x1be63d['shift']());}}}(a88_0x45d1,0xa724e));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';function a88_0x57a0(_0x160a8c,_0x3a4212){_0x160a8c=_0x160a8c-0xef;const _0x45d1cc=a88_0x45d1();let _0x57a0ee=_0x45d1cc[_0x160a8c];return _0x57a0ee;}import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';import{dbDiffRefreshStart}from'../../commands/db/diff-refresh-start.js';import{dbDiffRefreshStatus}from'../../commands/db/diff-refresh-status.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff,dbDiffRefreshStart,dbDiffRefreshStatus];function a88_0x45d1(){const _0x34d9e1=['12440chpaom','21zMMmFW','4041trVpem','315086BSnQna','1170588ftGsGx','3206448rDNFEj','692260YOuETa','1953430XFPqqX','5WzFaCc','10UlymZV','2413851DKyIgp'];a88_0x45d1=function(){return _0x34d9e1;};return a88_0x45d1();}
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a89_0x6c9f(_0x485fa5,_0x4b1d9f){_0x485fa5=_0x485fa5-0x196;const _0x2497e3=a89_0x2497();let _0x6c9f22=_0x2497e3[_0x485fa5];return _0x6c9f22;}const a89_0x848e2a=a89_0x6c9f;(function(_0x523b10,_0x2d24f9){const _0x57dca2=a89_0x6c9f,_0x10cf86=_0x523b10();while(!![]){try{const _0x1384c4=-parseInt(_0x57dca2(0x19e))/0x1+-parseInt(_0x57dca2(0x1a3))/0x2+parseInt(_0x57dca2(0x19c))/0x3*(-parseInt(_0x57dca2(0x1a9))/0x4)+-parseInt(_0x57dca2(0x1ad))/0x5*(parseInt(_0x57dca2(0x1a8))/0x6)+parseInt(_0x57dca2(0x1a4))/0x7*(parseInt(_0x57dca2(0x19f))/0x8)+parseInt(_0x57dca2(0x198))/0x9+parseInt(_0x57dca2(0x1ab))/0xa*(parseInt(_0x57dca2(0x19a))/0xb);if(_0x1384c4===_0x2d24f9)break;else _0x10cf86['push'](_0x10cf86['shift']());}catch(_0x2723d2){_0x10cf86['push'](_0x10cf86['shift']());}}}(a89_0x2497,0x19d5f));import{listDatasets,listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':'list','description':a89_0x848e2a(0x19d),'risk':a89_0x848e2a(0x1a5),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a89_0x848e2a(0x1ac),'type':a89_0x848e2a(0x197),'description':a89_0x848e2a(0x1aa),'default':0x1},{'name':a89_0x848e2a(0x199),'type':a89_0x848e2a(0x197),'description':a89_0x848e2a(0x1a7),'default':0x64}],async 'execute'(_0x2d93c7){const _0x197b3e=a89_0x848e2a,_0x2ce408=_0x2d93c7[_0x197b3e(0x196)](_0x197b3e(0x1ac),0x1)||0x1,_0x125403=_0x2d93c7[_0x197b3e(0x196)](_0x197b3e(0x199),0x64)||0x64,[{items:_0x333999,paging:_0x4b543e},_0x79b4c7]=await Promise[_0x197b3e(0x1a0)]([listDbLinks(_0x2d93c7[_0x197b3e(0x1a6)],{'currentPage':_0x2ce408,'pageSize':_0x125403}),listDatasets(_0x2d93c7[_0x197b3e(0x1a6)],{'source':_0x197b3e(0x19b)})]),_0x33475f=_0x333999[_0x197b3e(0x1a2)](_0x3b79f5=>({...sanitizeDbLinkForOutput(_0x3b79f5),'datasetDependency':buildDbDatasetDependency(_0x3b79f5,_0x79b4c7)['datasetDependency']})),_0x10efcf=_0x4b543e?_0x4b543e:{'currentPage':_0x2ce408,'pageSize':_0x125403,'rowsOnPage':_0x33475f[_0x197b3e(0x1a1)],'totalCount':null,'note':'Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only'};return{'ok':!![],'data':{'connections':_0x33475f,'paging':_0x10efcf},'message':'Found\x20'+_0x33475f[_0x197b3e(0x1a1)]+'\x20database\x20connection(s)'};}};function a89_0x2497(){const _0x118456=['List\x20database\x20connections\x20(dblinks)\x20for\x20the\x20current\x20app\x20with\x20analysis\x20status\x20—\x20for\x20AI\x20to\x20pick\x20ids\x20before\x20db\x20detail\x20/\x20analyze\x20/\x20tables','15923ypyPRg','424NkUnco','all','length','map','166738Mrkazp','14462sRWWAa','read','appCode','Page\x20size','6GfFDxW','116KgKKcK','Page\x20index\x20(1-based)','21250rNArWT','page','933145GxldqC','num','number','1165842FDjXem','pagesize','1826bxSXih','DB_TABLE','20694GXPgup'];a89_0x2497=function(){return _0x118456;};return a89_0x2497();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2751ac,_0x4debfd){const _0x3c3d16=a90_0x3f2b,_0x5e4a8c=_0x2751ac();while(!![]){try{const _0x1a61ac=parseInt(_0x3c3d16(0x202))/0x1*(-parseInt(_0x3c3d16(0x1f9))/0x2)+parseInt(_0x3c3d16(0x1eb))/0x3+-parseInt(_0x3c3d16(0x1f7))/0x4*(parseInt(_0x3c3d16(0x1fb))/0x5)+-parseInt(_0x3c3d16(0x1f1))/0x6+parseInt(_0x3c3d16(0x1ea))/0x7*(parseInt(_0x3c3d16(0x1f3))/0x8)+parseInt(_0x3c3d16(0x1f5))/0x9+parseInt(_0x3c3d16(0x1e4))/0xa;if(_0x1a61ac===_0x4debfd)break;else _0x5e4a8c['push'](_0x5e4a8c['shift']());}catch(_0x19a3b6){_0x5e4a8c['push'](_0x5e4a8c['shift']());}}}(a90_0x26e9,0x25730));import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function a90_0x26e9(){const _0x194ff5=['includes','1463436ablBPn','secret','232rkXhwp','toLowerCase','333162kcUqkK','hasAvailableDo','12pEVSan','The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.','2MhDOcR','privatekey','181625QiYShr','passwd','filter','dbtableConfig','connectionstring','number','test','39217gsefQy','authorization','accesskey','dbpassword','dbId','password','credential','code','3735740RQlsNZ','keys','tableName','length','jdbcurl','isFinite','6391LMoqew','325263zspeUR','map','trim','apiError','[redacted]'];a90_0x26e9=function(){return _0x194ff5;};return a90_0x26e9();}function shouldRedactKey(_0x541fca){const _0x280b5d=a90_0x3f2b,_0x587529=_0x541fca[_0x280b5d(0x1f4)]();if(_0x587529===_0x280b5d(0x1e1)||_0x587529===_0x280b5d(0x1fc)||_0x587529===_0x280b5d(0x1df))return!![];if(_0x587529['includes'](_0x280b5d(0x1f2))||_0x587529[_0x280b5d(0x1f0)]('token')||_0x587529[_0x280b5d(0x1f0)](_0x280b5d(0x1e2)))return!![];if(_0x587529['includes'](_0x280b5d(0x1fa))||_0x587529['includes'](_0x280b5d(0x1de)))return!![];if(_0x587529===_0x280b5d(0x203)||_0x587529===_0x280b5d(0x1ff)||_0x587529===_0x280b5d(0x1e8))return!![];return![];}export function sanitizeDbLinkForOutput(_0x367651){const _0x1606ae=a90_0x3f2b,_0x5a286e={..._0x367651};delete _0x5a286e[_0x1606ae(0x1f6)];for(const _0x461c4e of Object[_0x1606ae(0x1e5)](_0x5a286e)){if(!shouldRedactKey(_0x461c4e))continue;const _0x2c0e64=_0x5a286e[_0x461c4e];_0x2c0e64!=null&&String(_0x2c0e64)[_0x1606ae(0x1e7)]>0x0&&(_0x5a286e[_0x461c4e]=_0x1606ae(0x1ef));}return _0x5a286e;}export function sanitizeDbLinkList(_0x1c0a2f){return _0x1c0a2f['map'](_0x3cc803=>sanitizeDbLinkForOutput(_0x3cc803));}export function buildDbDatasetDependency(_0x3cdccd,_0x489a3e){const _0xd4f5e5=a90_0x3f2b,_0x39961e=_0x489a3e[_0xd4f5e5(0x1fd)](_0x5d0cb2=>Number(_0x5d0cb2[_0xd4f5e5(0x1fe)]?.[_0xd4f5e5(0x1e0)])===Number(_0x3cdccd['id']))[_0xd4f5e5(0x1ec)](_0x570959=>({'id':_0x570959['id'],'code':_0x570959[_0xd4f5e5(0x1e3)],'name':_0x570959['name'],..._0x570959[_0xd4f5e5(0x1fe)]?.[_0xd4f5e5(0x1e6)]?{'tableName':_0x570959[_0xd4f5e5(0x1fe)][_0xd4f5e5(0x1e6)]}:{}}));return{'datasetDependency':{'hasDependencies':_0x39961e['length']>0x0,'activeDatasetCount':_0x39961e[_0xd4f5e5(0x1e7)]},'datasets':_0x39961e};}export async function assertDbLinkConnectionPreflight(_0x130fb8){const _0x423c64=a90_0x3f2b,_0x5e2954=await testDbLinkConfigConnect(_0x130fb8);if(_0x5e2954!==!![])throw CliErrors[_0x423c64(0x1ee)]('Database\x20connection\x20preflight\x20failed.',_0x423c64(0x1f8));}function a90_0x3f2b(_0x1b33b2,_0x194788){_0x1b33b2=_0x1b33b2-0x1de;const _0x26e9ab=a90_0x26e9();let _0x3f2bae=_0x26e9ab[_0x1b33b2];return _0x3f2bae;}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x1bf38e){const _0x569f85=a90_0x3f2b,_0x408418=_0x1bf38e[_0x569f85(0x1ed)]();if(!_0x408418)return![];return DB_URL_PATTERN[_0x569f85(0x201)](_0x408418);}export function buildDbPageLinks(_0x27a96a,_0xf8751e){const _0x8bb57e=a90_0x3f2b,_0x41ff5b=_0x27a96a?.[_0x8bb57e(0x1ed)]();if(!_0x41ff5b)return undefined;const _0x14f267=typeof _0xf8751e===_0x8bb57e(0x200)?String(_0xf8751e):String(_0xf8751e??'')[_0x8bb57e(0x1ed)]();if(!_0x14f267)return undefined;const _0x34876b=Number(_0x14f267);if(!Number[_0x8bb57e(0x1e9)](_0x34876b)||_0x34876b<=0x0)return undefined;const _0x57329e=getAppBaseUrl(_0x41ff5b),_0x33d1e0=encodeURIComponent(String(_0x34876b));return{'databasePage':_0x57329e+'/data/database','erPage':_0x57329e+'/data/er?dbId='+_0x33d1e0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x41e657=a91_0x2212;function a91_0x2212(_0x6ef634,_0x6f87c){_0x6ef634=_0x6ef634-0x153;const _0xc9fb0d=a91_0xc9fb();let _0x2212d8=_0xc9fb0d[_0x6ef634];return _0x2212d8;}(function(_0x5736e9,_0x346998){const _0x5d761e=a91_0x2212,_0x1a090d=_0x5736e9();while(!![]){try{const _0x8566f8=parseInt(_0x5d761e(0x160))/0x1*(-parseInt(_0x5d761e(0x157))/0x2)+-parseInt(_0x5d761e(0x15f))/0x3*(parseInt(_0x5d761e(0x16c))/0x4)+-parseInt(_0x5d761e(0x15a))/0x5+-parseInt(_0x5d761e(0x169))/0x6*(-parseInt(_0x5d761e(0x16e))/0x7)+-parseInt(_0x5d761e(0x156))/0x8*(parseInt(_0x5d761e(0x164))/0x9)+parseInt(_0x5d761e(0x16f))/0xa*(-parseInt(_0x5d761e(0x166))/0xb)+parseInt(_0x5d761e(0x168))/0xc;if(_0x8566f8===_0x346998)break;else _0x1a090d['push'](_0x1a090d['shift']());}catch(_0x33a639){_0x1a090d['push'](_0x1a090d['shift']());}}}(a91_0xc9fb,0xbc6ea));import{CliErrors}from'../../errors.js';export const DB_TABLE_PAGE_SIZE=0x64;export const DB_TABLE_DIFF_TYPES=['NEW_TABLE',a91_0x41e657(0x15b),a91_0x41e657(0x15c),a91_0x41e657(0x161)];export function summarizeDbTableDiff(_0x24986c){const _0x1d9675=a91_0x41e657;return Object[_0x1d9675(0x159)](DB_TABLE_DIFF_TYPES[_0x1d9675(0x16b)](_0x2c75b4=>[_0x2c75b4,_0x24986c[_0x1d9675(0x162)](_0x1eec38=>_0x1eec38[_0x1d9675(0x163)]===_0x2c75b4)[_0x1d9675(0x153)]]));}function a91_0xc9fb(){const _0x345b59=['DELETED_TABLE','totalCount','values','27VuAREE','129sQcrnv','ALREADY_ANALYZED','filter','diffType','82611emCoPt','datasetTableCount','13697387TBRpKO','\x20row(s).','55090248ijkgRo','546yRfhrq','tableList','map','55124AufdYI','summary','1036coDRfF','10KQVSeP','length','Incomplete\x20db\x20table\x20pagination:\x20collected\x20','size','432rlLQrC','22896DLarsC','number','fromEntries','2454000TaYIEm','MODIFIED_TABLE'];a91_0xc9fb=function(){return _0x345b59;};return a91_0xc9fb();}export async function getAllDbTableDiff(_0x50edab,_0x4245bd,_0x8a1930,_0x1abb84){const _0x20671d=a91_0x41e657,_0x3d61ed=new Map();let _0x14ec52=0x1,_0x344a74=null;while(!![]){_0x344a74=await _0x50edab(_0x4245bd,_0x8a1930,{'pageIndex':_0x14ec52,'pageSize':DB_TABLE_PAGE_SIZE,'tableName':_0x1abb84});const _0x3cb261=_0x3d61ed['size'];for(const _0x42d542 of _0x344a74[_0x20671d(0x16a)]){_0x3d61ed['set'](_0x42d542['tableName'],_0x42d542);}if(_0x3d61ed[_0x20671d(0x155)]>=_0x344a74[_0x20671d(0x15d)])break;if(_0x344a74[_0x20671d(0x16a)][_0x20671d(0x153)]===0x0||_0x3d61ed[_0x20671d(0x155)]===_0x3cb261)throw CliErrors['validation'](_0x20671d(0x154)+_0x3d61ed[_0x20671d(0x155)]+'\x20of\x20'+_0x344a74[_0x20671d(0x15d)]+_0x20671d(0x167));_0x14ec52+=0x1;}return{'totalCount':_0x344a74?.[_0x20671d(0x15d)]??0x0,...typeof _0x344a74?.['physicalTableCount']==='number'?{'physicalTableCount':_0x344a74['physicalTableCount']}:{},...typeof _0x344a74?.['datasetTableCount']===_0x20671d(0x158)?{'datasetTableCount':_0x344a74[_0x20671d(0x165)]}:{},..._0x344a74?.['summary']?{'summary':_0x344a74[_0x20671d(0x16d)]}:{},'tableList':[..._0x3d61ed[_0x20671d(0x15e)]()]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a92_0x47bf(_0x4c878f,_0x278371){_0x4c878f=_0x4c878f-0x18c;const _0x5e9164=a92_0x5e91();let _0x47bf7c=_0x5e9164[_0x4c878f];return _0x47bf7c;}const a92_0x33ea87=a92_0x47bf;(function(_0x15a652,_0x1fd4d5){const _0x2dca4c=a92_0x47bf,_0x1105f3=_0x15a652();while(!![]){try{const _0xc7b4f0=-parseInt(_0x2dca4c(0x1a3))/0x1+parseInt(_0x2dca4c(0x19b))/0x2+parseInt(_0x2dca4c(0x18c))/0x3+parseInt(_0x2dca4c(0x195))/0x4*(parseInt(_0x2dca4c(0x19f))/0x5)+parseInt(_0x2dca4c(0x1a1))/0x6+-parseInt(_0x2dca4c(0x190))/0x7*(parseInt(_0x2dca4c(0x18f))/0x8)+-parseInt(_0x2dca4c(0x1a2))/0x9*(parseInt(_0x2dca4c(0x194))/0xa);if(_0xc7b4f0===_0x1fd4d5)break;else _0x1105f3['push'](_0x1105f3['shift']());}catch(_0x27c9d5){_0x1105f3['push'](_0x1105f3['shift']());}}}(a92_0x5e91,0x3f5fd));function a92_0x5e91(){const _0x21d83f=['physicalTableCount','768696oxFgpk','28fuNrMm','str','\x20table\x20comparison\x20row(s),\x20total\x20','datasetTableCount','164870clRmUP','2932zJXVSu','table','appCode','num','List\x20all\x20database\x20table\x20comparison\x20rows\x20and\x20analysis\x20states','totalCount','121558nyCuVC','string','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','tableList','2555XWGrbe','number','3071226LwqOlI','153cXgTWW','452063oFLwBq','\x20(db\x20link\x20','read','1287174LaSvTB','length'];a92_0x5e91=function(){return _0x21d83f;};return a92_0x5e91();}import{getDbTableComparisonPage}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{getAllDbTableDiff,summarizeDbTableDiff}from'../../commands/db/table-diff-shared.js';export const dbTables={'service':'db','command':'tables','description':a92_0x33ea87(0x199),'risk':a92_0x33ea87(0x1a5),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a92_0x33ea87(0x196),'type':a92_0x33ea87(0x19c),'description':a92_0x33ea87(0x19d)}],async 'execute'(_0x20aa4a){const _0x136a7a=a92_0x33ea87,_0x33c6a1=_0x20aa4a[_0x136a7a(0x198)]('id'),_0x18064d=_0x20aa4a[_0x136a7a(0x191)]('table')||undefined,_0x1e9e12=await getAllDbTableDiff(getDbTableComparisonPage,_0x20aa4a[_0x136a7a(0x197)],_0x33c6a1,_0x18064d),_0x2d252c=_0x1e9e12[_0x136a7a(0x19e)];return{'ok':!![],'data':{'dbLinkId':_0x33c6a1,'totalCount':_0x1e9e12['totalCount'],...typeof _0x1e9e12['physicalTableCount']===_0x136a7a(0x1a0)?{'physicalTableCount':_0x1e9e12[_0x136a7a(0x18e)]}:{},...typeof _0x1e9e12[_0x136a7a(0x193)]===_0x136a7a(0x1a0)?{'datasetTableCount':_0x1e9e12['datasetTableCount']}:{},..._0x1e9e12['summary']?{'summary':_0x1e9e12['summary']}:{},'summaryByType':summarizeDbTableDiff(_0x2d252c),'tables':_0x2d252c},'message':_0x2d252c[_0x136a7a(0x18d)]+_0x136a7a(0x192)+_0x1e9e12[_0x136a7a(0x19a)]+_0x136a7a(0x1a4)+_0x33c6a1+')'};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x537c0b=a93_0x4cad;(function(_0x2fb896,_0x4ab5cc){const _0x3eae7d=a93_0x4cad,_0x430fb8=_0x2fb896();while(!![]){try{const _0x3a5645=-parseInt(_0x3eae7d(0x15e))/0x1+-parseInt(_0x3eae7d(0x16e))/0x2*(parseInt(_0x3eae7d(0x16b))/0x3)+-parseInt(_0x3eae7d(0x162))/0x4*(parseInt(_0x3eae7d(0x170))/0x5)+-parseInt(_0x3eae7d(0x16d))/0x6+-parseInt(_0x3eae7d(0x171))/0x7+-parseInt(_0x3eae7d(0x167))/0x8+parseInt(_0x3eae7d(0x168))/0x9;if(_0x3a5645===_0x4ab5cc)break;else _0x430fb8['push'](_0x430fb8['shift']());}catch(_0x19a432){_0x430fb8['push'](_0x430fb8['shift']());}}}(a93_0x4c59,0x97fbd));function a93_0x4cad(_0x55c504,_0x57473d){_0x55c504=_0x55c504-0x15d;const _0x4c5950=a93_0x4c59();let _0x4cad1b=_0x4c5950[_0x55c504];return _0x4cad1b;}import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a93_0x4c59(){const _0x12b86f=['keys','code','9623808kcoWEX','46538055LETTHp','length','success','34395wkSOGF','msg','5919522bHLqVM','198rkwcgZ','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','15XfezHz','2033626bCRWRq','data','read','508349abxzrT','Connection\x20OK\x20for\x20db\x20link\x20','message','num','566540aqWziB','slice','object'];a93_0x4c59=function(){return _0x12b86f;};return a93_0x4c59();}function summarizeTestConnectResult(_0x4625c4){const _0x250fb7=a93_0x4cad;if(_0x4625c4===!![]||_0x4625c4===![])return{'success':_0x4625c4};if(_0x4625c4===null||_0x4625c4===undefined)return{'type':typeof _0x4625c4};if(typeof _0x4625c4!==_0x250fb7(0x164))return{'type':typeof _0x4625c4};const _0xe68e74=_0x4625c4,_0x11d294=[_0x250fb7(0x16a),_0x250fb7(0x160),_0x250fb7(0x166),'error',_0x250fb7(0x16c),_0x250fb7(0x172)],_0x43f898={};for(const _0x265157 of _0x11d294){if(_0x265157 in _0xe68e74)_0x43f898[_0x265157]=_0xe68e74[_0x265157];}return Object[_0x250fb7(0x165)](_0x43f898)[_0x250fb7(0x169)]===0x0&&(_0x43f898[_0x250fb7(0x165)]=Object[_0x250fb7(0x165)](_0xe68e74)[_0x250fb7(0x163)](0x0,0x14)),_0x43f898;}export const dbTest={'service':'db','command':'test','description':a93_0x537c0b(0x16f),'risk':a93_0x537c0b(0x15d),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x25324d){const _0x1ccd4a=a93_0x537c0b,_0x107426=_0x25324d[_0x1ccd4a(0x161)]('id'),_0x1873e8=await testDbLinkConnect(_0x107426),_0x4f0a41=_0x1873e8===!![]||typeof _0x1873e8===_0x1ccd4a(0x164)&&_0x1873e8!==null&&_0x1873e8[_0x1ccd4a(0x16a)]===!![],_0x29f78d=summarizeTestConnectResult(_0x1873e8);return{'ok':!![],'data':{'id':_0x107426,'connected':Boolean(_0x4f0a41),'result':_0x29f78d},'message':_0x4f0a41?_0x1ccd4a(0x15f)+_0x107426:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x107426+'\x20(see\x20data.result)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a94_0x1c1a(){const _0x3f7363=['51492XWKELJ','New\x20username','password','bool','has','New\x20host:port','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','182303WVkJeN','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','/smartapi/dblink/update','POST','dbParam','write','validation','username','string','392287fjbZLV','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','New\x20connection\x20parameter\x20string','num','New\x20description','9bmsdRC','trim','update','472068MykggZ','skip-connection-test','Updated\x20db\x20link\x20','dbUrl','dbparam','2584784tkkmKm','New\x20database\x20name','[redacted]','16aMfygU','313260nVFvHq','6RBDHYn','dbDesc','str','5049200yPlOdy','dbName','dbdesc','dburl','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','dbname'];a94_0x1c1a=function(){return _0x3f7363;};return a94_0x1c1a();}const a94_0x70746e=a94_0x13a1;(function(_0x40703e,_0x519cfe){const _0x2d3e8f=a94_0x13a1,_0x4b74bf=_0x40703e();while(!![]){try{const _0x55ab24=parseInt(_0x2d3e8f(0x1fb))/0x1+parseInt(_0x2d3e8f(0x1e0))/0x2+parseInt(_0x2d3e8f(0x1f3))/0x3*(parseInt(_0x2d3e8f(0x1e8))/0x4)+-parseInt(_0x2d3e8f(0x1e9))/0x5+-parseInt(_0x2d3e8f(0x1ea))/0x6*(parseInt(_0x2d3e8f(0x1d8))/0x7)+parseInt(_0x2d3e8f(0x1e5))/0x8*(parseInt(_0x2d3e8f(0x1dd))/0x9)+-parseInt(_0x2d3e8f(0x1ed))/0xa;if(_0x55ab24===_0x519cfe)break;else _0x4b74bf['push'](_0x4b74bf['shift']());}catch(_0x3e2c19){_0x4b74bf['push'](_0x4b74bf['shift']());}}}(a94_0x1c1a,0x2d86e));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set(['******',a94_0x70746e(0x1e7)]);function a94_0x13a1(_0x5e89d3,_0x458d8e){_0x5e89d3=_0x5e89d3-0x1d2;const _0x1c1af3=a94_0x1c1a();let _0x13a1a1=_0x1c1af3[_0x5e89d3];return _0x13a1a1;}function mergeDbLinkUpdate(_0x1a8d04,_0x3395ce){const _0x1c5bca=a94_0x70746e,_0x256e6a={..._0x1a8d04},_0x27dfb3=_0x3395ce[_0x1c5bca(0x1ec)](_0x1c5bca(0x1f5));if(_0x27dfb3&&MASKED_PASSWORD_VALUES[_0x1c5bca(0x1f7)](_0x27dfb3))throw CliErrors[_0x1c5bca(0x1d5)](_0x1c5bca(0x1fa));if(!_0x27dfb3&&MASKED_PASSWORD_VALUES['has'](String(_0x1a8d04['password']??'')))throw CliErrors[_0x1c5bca(0x1d5)](_0x1c5bca(0x1f9));const _0x378cab=_0x3395ce[_0x1c5bca(0x1ec)](_0x1c5bca(0x1f2));if(_0x378cab)_0x256e6a[_0x1c5bca(0x1ee)]=_0x378cab;const _0x5b41bc=_0x3395ce[_0x1c5bca(0x1ec)]('dburl');if(_0x5b41bc)_0x256e6a[_0x1c5bca(0x1e3)]=_0x5b41bc[_0x1c5bca(0x1de)]();const _0x2dba78=_0x3395ce[_0x1c5bca(0x1ec)](_0x1c5bca(0x1d6));if(_0x2dba78)_0x256e6a[_0x1c5bca(0x1d6)]=_0x2dba78;if(_0x27dfb3)_0x256e6a[_0x1c5bca(0x1f5)]=_0x27dfb3;const _0xcb3e82=_0x3395ce['str']('dbparam');if(_0xcb3e82)_0x256e6a[_0x1c5bca(0x1d3)]=_0xcb3e82;const _0x1ee61b=_0x3395ce[_0x1c5bca(0x1ec)](_0x1c5bca(0x1ef));if(_0x1ee61b)_0x256e6a[_0x1c5bca(0x1eb)]=_0x1ee61b;return _0x256e6a;}export const dbUpdate={'service':'db','command':a94_0x70746e(0x1df),'description':a94_0x70746e(0x1fc),'risk':a94_0x70746e(0x1d4),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a94_0x70746e(0x1d7),'description':a94_0x70746e(0x1e6)},{'name':a94_0x70746e(0x1f0),'type':a94_0x70746e(0x1d7),'description':a94_0x70746e(0x1f8)},{'name':a94_0x70746e(0x1d6),'type':'string','description':a94_0x70746e(0x1f4)},{'name':a94_0x70746e(0x1f5),'type':a94_0x70746e(0x1d7),'description':'Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked'},{'name':a94_0x70746e(0x1e4),'type':a94_0x70746e(0x1d7),'description':a94_0x70746e(0x1da)},{'name':a94_0x70746e(0x1ef),'type':a94_0x70746e(0x1d7),'description':a94_0x70746e(0x1dc)},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x3955e8){const _0x40c184=a94_0x70746e,_0x21cf3c=_0x3955e8[_0x40c184(0x1ec)](_0x40c184(0x1f0));if(_0x21cf3c&&!validateDbUrl(_0x21cf3c[_0x40c184(0x1de)]()))throw CliErrors['validation'](_0x40c184(0x1d9)+_0x21cf3c+'\x22');},async 'dryRun'(_0x52d4bd){const _0x2eaf55=a94_0x70746e,_0x312627=_0x52d4bd[_0x2eaf55(0x1db)]('id'),_0x3d5174=await getDbLinkInfo(_0x312627),_0x203afd=mergeDbLinkUpdate(_0x3d5174,_0x52d4bd),_0x1194de=sanitizeDbLinkForOutput(_0x203afd);return{'method':_0x2eaf55(0x1d2),'url':_0x2eaf55(0x1fd),'body':_0x1194de,'description':_0x2eaf55(0x1f1),'connectionPreflight':{'enabled':!_0x52d4bd[_0x2eaf55(0x1f6)](_0x2eaf55(0x1e1)),'executed':![]}};},async 'execute'(_0x506bc4){const _0x4c80a6=a94_0x70746e,_0x3845e8=_0x506bc4[_0x4c80a6(0x1db)]('id'),_0x4edee5=await getDbLinkInfo(_0x3845e8),_0x56f344=mergeDbLinkUpdate(_0x4edee5,_0x506bc4);!_0x506bc4['bool'](_0x4c80a6(0x1e1))&&await assertDbLinkConnectionPreflight(_0x56f344);const {id:_0x1ffe4a,entity:_0x40d221}=normalizeEntityWithIdResponse(await updateDbLink(_0x56f344));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x40d221),'message':_0x4c80a6(0x1e2)+(_0x1ffe4a??_0x3845e8)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a95_0x293e28=a95_0x38fe;(function(_0x5eefd0,_0xfeadf3){const _0x410fa7=a95_0x38fe,_0x239f4d=_0x5eefd0();while(!![]){try{const _0x3a489d=-parseInt(_0x410fa7(0x23b))/0x1*(parseInt(_0x410fa7(0x21a))/0x2)+parseInt(_0x410fa7(0x22b))/0x3*(parseInt(_0x410fa7(0x227))/0x4)+-parseInt(_0x410fa7(0x234))/0x5+-parseInt(_0x410fa7(0x23e))/0x6+parseInt(_0x410fa7(0x222))/0x7*(parseInt(_0x410fa7(0x249))/0x8)+parseInt(_0x410fa7(0x228))/0x9*(parseInt(_0x410fa7(0x202))/0xa)+parseInt(_0x410fa7(0x242))/0xb*(-parseInt(_0x410fa7(0x240))/0xc);if(_0x3a489d===_0xfeadf3)break;else _0x239f4d['push'](_0x239f4d['shift']());}catch(_0x41e150){_0x239f4d['push'](_0x239f4d['shift']());}}}(a95_0x1ef8,0xed2f2));import a95_0x238c12 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getActiveRegion,getApiDomain,getAppDomain,getKbDomain,getSkillDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';function a95_0x38fe(_0x2eb8c6,_0x2c19b9){_0x2eb8c6=_0x2eb8c6-0x1ec;const _0x1ef874=a95_0x1ef8();let _0x38fe54=_0x1ef874[_0x2eb8c6];return _0x38fe54;}function a95_0x1ef8(){const _0x1cab95=['inherit','\x20\x20Installed\x20Path:\x20\x20','\x20\x20Merged\x20Config','\x20+\x20','36XZSzAb','red','\x20\x20Config\x20JSON','8024730isUVhF','current','2796tLwKFn','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','6787Igbfya','platform','\x20\x20Built-in\x20Skill','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','ignored\x20in\x20','\x20\x20Skill\x20Version:\x20\x20\x20','4248CEFlOL','Project','call','\x20\x20Legacy\x20inherit:\x20\x20\x20','\x20\x20─','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','(default)','state','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid\x20JSON','bold','(default:\x20','repeat','format','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','value','padEnd','prototype','missing','cookie','skillVersion','source','Global','(none)','\x20\x20Apps','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','locale','currentApp','slice','repairCommand','apiDir','(set,\x20length=','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20config','riskLevel','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','yellow','✗\x20Not\x20logged\x20in','30AHjDaP','includes','length','join','raw','hasOwnProperty','accessKey','(set\x20via\x20file,\x20length=','env','gray','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','packageVersion','projectConfig','globalConfig','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','apps','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','log','\x20config\x20delete\x20inherit','\x20\x20skillDomain:\x20\x20\x20\x20\x20','\x20config\x20delete\x20inherit\x20--global','defaultApp','41948pgDyek','\x20(default)','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(unknown)','check','(not\x20found)','message','arch','17402wMlhTA','explicitAppName','reason','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','40lTddPt','2143980kUDzyF','version','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','541473UqSvua','status','(not\x20set)','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20\x20\x20accessKey:\x20\x20','project','verbose','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','global','3159250SPYSuD','filter','\x20\x20Package\x20Version:\x20'];a95_0x1ef8=function(){return _0x1cab95;};return a95_0x1ef8();}import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x4851a5){const _0x9011de=a95_0x38fe,_0x2f1c0c=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x9011de(0x1f6)](0x0,0xa)+')':VERSION,_0x30232c=buildConfigFromFlags({}),_0xcc6788=getCookie();console['log'](),console[_0x9011de(0x215)](a95_0x238c12[_0x9011de(0x257)](CLI_BIN_NAME+'\x20doctor')),console[_0x9011de(0x215)](a95_0x238c12[_0x9011de(0x20b)]('─'['repeat'](0x32))),console[_0x9011de(0x215)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x2f1c0c),console[_0x9011de(0x215)](_0x9011de(0x24e)+process[_0x9011de(0x229)]),console[_0x9011de(0x215)](_0x9011de(0x20c)+process[_0x9011de(0x243)]+'\x20'+process[_0x9011de(0x221)]);const _0x30eeda=inspectBuiltinSkill();console[_0x9011de(0x215)](),console['log'](a95_0x238c12[_0x9011de(0x257)](_0x9011de(0x244))),console[_0x9011de(0x215)](a95_0x238c12['gray'](_0x9011de(0x24d)[_0x9011de(0x259)](0x1e)));const _0x3b93cd=_0x30eeda[_0x9011de(0x253)]===_0x9011de(0x23f)?a95_0x238c12[_0x9011de(0x226)]('✓\x20'+_0x30eeda['state']):a95_0x238c12[_0x9011de(0x23c)]('✗\x20'+_0x30eeda[_0x9011de(0x253)]);console['log'](_0x9011de(0x212)+_0x3b93cd),console['log'](_0x9011de(0x236)+_0x30eeda[_0x9011de(0x20e)]),console['log'](_0x9011de(0x248)+(_0x30eeda[_0x9011de(0x1ee)]||a95_0x238c12['gray'](_0x9011de(0x21d)))),console[_0x9011de(0x215)](_0x9011de(0x238)+(_0x30eeda['installedPath']||a95_0x238c12[_0x9011de(0x20b)](_0x9011de(0x21f))));if(_0x30eeda[_0x9011de(0x224)])console[_0x9011de(0x215)](_0x9011de(0x211)+_0x30eeda[_0x9011de(0x224)]);_0x30eeda['state']!==_0x9011de(0x23f)&&console[_0x9011de(0x215)](_0x9011de(0x1fa)+_0x30eeda[_0x9011de(0x1f7)]);console[_0x9011de(0x215)](),console['log'](a95_0x238c12[_0x9011de(0x257)](_0x9011de(0x246))),console[_0x9011de(0x215)](a95_0x238c12[_0x9011de(0x20b)](_0x9011de(0x24d)[_0x9011de(0x259)](0x1e)));const _0x56d96f=getGlobalConfigPath(),_0x5c7e16=getProjectConfigPath();console[_0x9011de(0x215)](_0x9011de(0x225)+(_0x56d96f||a95_0x238c12[_0x9011de(0x20b)](_0x9011de(0x21f)))),console[_0x9011de(0x215)](_0x9011de(0x241)+(_0x5c7e16||a95_0x238c12[_0x9011de(0x20b)](_0x9011de(0x21f)))),console[_0x9011de(0x215)](),console[_0x9011de(0x215)](a95_0x238c12[_0x9011de(0x257)](_0x9011de(0x23d))),console[_0x9011de(0x215)](a95_0x238c12[_0x9011de(0x20b)](_0x9011de(0x24d)['repeat'](0x1e)));const _0x2a12bd=(_0x468032,_0x19a132)=>{const _0x4479c1=_0x9011de;if(!_0x19a132){console[_0x4479c1(0x215)]('\x20\x20'+_0x468032['padEnd'](0x11)+'\x20'+a95_0x238c12[_0x4479c1(0x20b)]('(no\x20file)'));return;}const _0x47337f=inspectCliConfigJsonFile(_0x19a132);if(_0x47337f[_0x4479c1(0x22c)]==='ok')console[_0x4479c1(0x215)]('\x20\x20'+_0x468032['padEnd'](0x11)+'\x20'+a95_0x238c12[_0x4479c1(0x226)]('✓\x20Valid\x20JSON'));else{if(_0x47337f[_0x4479c1(0x22c)]==='empty')console[_0x4479c1(0x215)]('\x20\x20'+_0x468032['padEnd'](0x11)+'\x20'+a95_0x238c12['yellow']('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x47337f[_0x4479c1(0x22c)]===_0x4479c1(0x1ec)?console[_0x4479c1(0x215)]('\x20\x20'+_0x468032[_0x4479c1(0x25d)](0x11)+'\x20'+a95_0x238c12[_0x4479c1(0x20b)]('(missing)')):(console['log']('\x20\x20'+_0x468032[_0x4479c1(0x25d)](0x11)+'\x20'+a95_0x238c12['red'](_0x4479c1(0x256))),console['log']('\x20\x20'+''[_0x4479c1(0x25d)](0x11)+'\x20'+a95_0x238c12[_0x4479c1(0x23c)](_0x47337f[_0x4479c1(0x220)])));}};_0x2a12bd(_0x9011de(0x1f0),_0x56d96f),_0x2a12bd(_0x9011de(0x24a),_0x5c7e16);const _0x24da7b=loadRawConfigLayers(),_0x22d678=[Object[_0x9011de(0x25e)][_0x9011de(0x207)][_0x9011de(0x24b)](_0x24da7b[_0x9011de(0x210)],_0x9011de(0x237))?_0x9011de(0x233):null,Object[_0x9011de(0x25e)][_0x9011de(0x207)][_0x9011de(0x24b)](_0x24da7b[_0x9011de(0x20f)],'inherit')?_0x9011de(0x230):null][_0x9011de(0x235)](Boolean);_0x22d678[_0x9011de(0x204)]>0x0&&(console[_0x9011de(0x215)](_0x9011de(0x24c)+a95_0x238c12[_0x9011de(0x200)](_0x9011de(0x247)+_0x22d678[_0x9011de(0x205)](_0x9011de(0x23a))+_0x9011de(0x1fc))),_0x22d678[_0x9011de(0x203)]('project')&&console[_0x9011de(0x215)]('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+_0x9011de(0x216)),_0x22d678[_0x9011de(0x203)](_0x9011de(0x233))&&console[_0x9011de(0x215)](_0x9011de(0x22e)+CLI_BIN_NAME+_0x9011de(0x218)));console[_0x9011de(0x215)](),console['log'](a95_0x238c12[_0x9011de(0x257)](_0x9011de(0x239))),console['log'](a95_0x238c12[_0x9011de(0x20b)](_0x9011de(0x24d)['repeat'](0x1e))),console[_0x9011de(0x215)](_0x9011de(0x255)+(_0x30232c['appCode']||a95_0x238c12[_0x9011de(0x23c)](_0x9011de(0x22d)))),console['log'](_0x9011de(0x20d)+_0x30232c[_0x9011de(0x20a)]),console[_0x9011de(0x215)]('\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20'+_0x30232c[_0x9011de(0x1f4)]),console[_0x9011de(0x215)](_0x9011de(0x25b)+_0x30232c[_0x9011de(0x1f8)]),console['log'](_0x9011de(0x245)+(_0x30232c[_0x9011de(0x219)]||a95_0x238c12[_0x9011de(0x20b)](_0x9011de(0x1f1)))),console[_0x9011de(0x215)](_0x9011de(0x22a)+(_0x30232c['currentApp']||a95_0x238c12[_0x9011de(0x20b)](_0x9011de(0x1f1)))),console['log']('\x20\x20explicitAppName:\x20'+(_0x30232c[_0x9011de(0x223)]||a95_0x238c12[_0x9011de(0x20b)](_0x9011de(0x1f1)))),console[_0x9011de(0x215)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x30232c[_0x9011de(0x25a)]||a95_0x238c12['gray'](_0x9011de(0x258)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x9011de(0x215)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x30232c['pageSize']??a95_0x238c12['gray'](_0x9011de(0x252)))),console['log'](_0x9011de(0x1ff)+_0x30232c[_0x9011de(0x1fd)]),console[_0x9011de(0x215)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x30232c[_0x9011de(0x231)]),console[_0x9011de(0x215)](_0x9011de(0x232)+(_0x30232c[_0x9011de(0x1ed)]?a95_0x238c12[_0x9011de(0x226)](_0x9011de(0x1f9)+_0x30232c[_0x9011de(0x1ed)][_0x9011de(0x204)]+')'):_0xcc6788?a95_0x238c12[_0x9011de(0x226)](_0x9011de(0x209)+_0xcc6788[_0x9011de(0x204)]+')'):a95_0x238c12[_0x9011de(0x20b)]('(none)')));const _0x192e6d=Object['keys'](_0x30232c[_0x9011de(0x213)]);if(_0x192e6d['length']>0x0){console[_0x9011de(0x215)](),console['log'](a95_0x238c12['bold'](_0x9011de(0x1f2))),console[_0x9011de(0x215)](a95_0x238c12['gray']('\x20\x20─'['repeat'](0x1e)));for(const _0x3ce5a9 of _0x192e6d){const _0x12c148=_0x30232c[_0x9011de(0x213)][_0x3ce5a9],_0x2fe92b=_0x3ce5a9===_0x30232c[_0x9011de(0x219)],_0x2b68ba=_0x3ce5a9===_0x30232c[_0x9011de(0x1f5)],_0x56e75e=_0x2b68ba?a95_0x238c12[_0x9011de(0x226)]('\x20←\x20current'):'',_0x11884e=_0x2fe92b?_0x9011de(0x21b):'';console['log']('\x20\x20'+_0x3ce5a9+_0x11884e+_0x56e75e),console[_0x9011de(0x215)](_0x9011de(0x1f3)+_0x12c148['appcode']);const _0x533dff=buildAppDoctorFields(_0x12c148,{'env':_0x30232c[_0x9011de(0x20a)],'apiDir':_0x30232c[_0x9011de(0x206)][_0x9011de(0x1f8)]||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x30232c[_0x9011de(0x1ed)]||_0xcc6788||undefined,'accessKey':_0x30232c[_0x9011de(0x208)]});console[_0x9011de(0x215)](_0x9011de(0x250)+_0x533dff[_0x9011de(0x20a)]['value']+'\x20\x20'+a95_0x238c12[_0x9011de(0x20b)]('('+_0x533dff[_0x9011de(0x20a)][_0x9011de(0x1ef)]+')')),console['log'](_0x9011de(0x1fe)+_0x533dff['apiDir']['value']+'\x20\x20'+a95_0x238c12[_0x9011de(0x20b)]('('+_0x533dff['apiDir'][_0x9011de(0x1ef)]+')'));const _0x32bccf=_0x533dff['cookie']['value']?a95_0x238c12['green'](_0x9011de(0x1f9)+_0x533dff[_0x9011de(0x1ed)]['value'][_0x9011de(0x204)]+')'):a95_0x238c12[_0x9011de(0x20b)]('(none)');console[_0x9011de(0x215)](_0x9011de(0x214)+_0x32bccf+'\x20\x20'+a95_0x238c12[_0x9011de(0x20b)]('('+_0x533dff[_0x9011de(0x1ed)][_0x9011de(0x1ef)]+')'));const _0x423d7e=_0x533dff[_0x9011de(0x208)]['value']?a95_0x238c12[_0x9011de(0x226)](_0x9011de(0x1f9)+_0x533dff[_0x9011de(0x208)][_0x9011de(0x25c)][_0x9011de(0x204)]+')'):a95_0x238c12[_0x9011de(0x20b)](_0x9011de(0x1f1));console['log'](_0x9011de(0x22f)+_0x423d7e+'\x20\x20'+a95_0x238c12[_0x9011de(0x20b)]('('+_0x533dff['accessKey'][_0x9011de(0x1ef)]+')'));}}console[_0x9011de(0x215)](),console['log'](a95_0x238c12['bold'](_0x9011de(0x251))),console[_0x9011de(0x215)](a95_0x238c12['gray']('\x20\x20─'[_0x9011de(0x259)](0x1e))),console['log'](_0x9011de(0x21c)+getActiveRegion()),console[_0x9011de(0x215)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x9011de(0x215)](_0x9011de(0x1fb)+getUserDomain()),console[_0x9011de(0x215)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x9011de(0x215)](_0x9011de(0x217)+getSkillDomain()),console[_0x9011de(0x215)]('\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20'+getKbDomain()),console[_0x9011de(0x215)]('\x20\x20appDomain:\x20\x20\x20\x20\x20\x20\x20'+getAppDomain()),console['log'](),console[_0x9011de(0x215)](a95_0x238c12[_0x9011de(0x257)]('\x20\x20Auth')),console['log'](a95_0x238c12[_0x9011de(0x20b)](_0x9011de(0x24d)['repeat'](0x1e)));if(_0xcc6788){const _0x447955=await getIsSessionValid();console[_0x9011de(0x215)](_0x9011de(0x24f)+(_0x447955?a95_0x238c12[_0x9011de(0x226)]('✓\x20Valid'):a95_0x238c12[_0x9011de(0x23c)]('✗\x20Expired')));}else console[_0x9011de(0x215)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a95_0x238c12[_0x9011de(0x23c)](_0x9011de(0x201)));return console[_0x9011de(0x215)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a95_0x293e28(0x21e),'description':a95_0x293e28(0x254),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a95_0xf89154=a95_0x3ff0;(function(_0x29edd6,_0x16e3c2){const _0x57a160=a95_0x3ff0,_0x17db45=_0x29edd6();while(!![]){try{const _0x3f47ce=-parseInt(_0x57a160(0x208))/0x1+-parseInt(_0x57a160(0x20b))/0x2+-parseInt(_0x57a160(0x21c))/0x3*(-parseInt(_0x57a160(0x1f6))/0x4)+parseInt(_0x57a160(0x216))/0x5*(parseInt(_0x57a160(0x1db))/0x6)+-parseInt(_0x57a160(0x1c1))/0x7+-parseInt(_0x57a160(0x1ee))/0x8*(parseInt(_0x57a160(0x204))/0x9)+-parseInt(_0x57a160(0x1d3))/0xa*(-parseInt(_0x57a160(0x1bb))/0xb);if(_0x3f47ce===_0x16e3c2)break;else _0x17db45['push'](_0x17db45['shift']());}catch(_0x35349e){_0x17db45['push'](_0x17db45['shift']());}}}(a95_0x19c5,0x7f6bd));import a95_0x47faa4 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a95_0x19c5(){const _0x13e81b=['\x20\x20runtimeDomain:\x20\x20\x20','pageSize','log','arch','gray','378388aIsqvT','\x20\x20Built-in\x20Skill','apps','(no\x20file)','prototype','skillVersion','\x20\x20Legacy\x20inherit:\x20\x20\x20','apiDir','projectConfig','appCode','\x20\x20Repair\x20global:\x20\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','5779197WlEPZh','Project','\x20\x20─','⚠\x20Empty\x20(treated\x20as\x20{})','1035855stkIWs','installedPath','Global','1270462MCKVut','padEnd','✗\x20Not\x20logged\x20in','cookie','(default:\x20','bold','empty','yellow','join','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20skillDomain:\x20\x20\x20\x20\x20','3021575wUmAIe','message','value','✓\x20Valid\x20JSON','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','12WhSHtK','version','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','red','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','check','state','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','explicitAppName','green','\x20config\x20delete\x20inherit\x20--global','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','11YdoaeF','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','source','✓\x20Valid','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20','1093540inlumX','accessKey','read','project','(unknown)','platform','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','doctor','raw','\x20\x20Installed\x20Path:\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','repeat','hasOwnProperty','\x20\x20appDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Skill\x20Version:\x20\x20\x20','missing','\x20\x20Auth','20086530yGxvDS','currentApp','call','\x20config','current','ignored\x20in\x20','slice','length','6lFbWje','reason','env','\x20doctor','(not\x20found)','locale','(not\x20set)','\x20\x20Apps','includes','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','format','globalConfig','✗\x20Invalid\x20JSON','(none)','inherit','\x20\x20Package\x20Version:\x20','global','✗\x20Expired','8yVRjOu','packageVersion','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'];a95_0x19c5=function(){return _0x13e81b;};return a95_0x19c5();}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getActiveRegion,getApiDomain,getAppDomain,getKbDomain,getSkillDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';function a95_0x3ff0(_0xe51d36,_0x1f7e8e){_0xe51d36=_0xe51d36-0x1b0;const _0x19c59a=a95_0x19c5();let _0x3ff0ce=_0x19c59a[_0xe51d36];return _0x3ff0ce;}import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x31915e){const _0x4e1699=a95_0x3ff0,_0x580809=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4e1699(0x1d9)](0x0,0xa)+')':VERSION,_0x416adc=buildConfigFromFlags({}),_0x526601=getCookie();console['log'](),console[_0x4e1699(0x1f3)](a95_0x47faa4['bold'](CLI_BIN_NAME+_0x4e1699(0x1de))),console[_0x4e1699(0x1f3)](a95_0x47faa4[_0x4e1699(0x1f5)]('─'[_0x4e1699(0x1cd)](0x32))),console[_0x4e1699(0x1f3)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x580809),console[_0x4e1699(0x1f3)](_0x4e1699(0x1bf)+process[_0x4e1699(0x21d)]),console[_0x4e1699(0x1f3)](_0x4e1699(0x1cb)+process[_0x4e1699(0x1c6)]+'\x20'+process[_0x4e1699(0x1f4)]);const _0x6baadf=inspectBuiltinSkill();console[_0x4e1699(0x1f3)](),console[_0x4e1699(0x1f3)](a95_0x47faa4['bold'](_0x4e1699(0x1f7))),console[_0x4e1699(0x1f3)](a95_0x47faa4[_0x4e1699(0x1f5)](_0x4e1699(0x206)[_0x4e1699(0x1cd)](0x1e)));const _0x450791=_0x6baadf[_0x4e1699(0x1b3)]===_0x4e1699(0x1d7)?a95_0x47faa4['green']('✓\x20'+_0x6baadf['state']):a95_0x47faa4['red']('✗\x20'+_0x6baadf['state']);console[_0x4e1699(0x1f3)](_0x4e1699(0x1b9)+_0x450791),console['log'](_0x4e1699(0x1eb)+_0x6baadf[_0x4e1699(0x1ef)]),console['log'](_0x4e1699(0x1d0)+(_0x6baadf[_0x4e1699(0x1fb)]||a95_0x47faa4[_0x4e1699(0x1f5)](_0x4e1699(0x1c5)))),console[_0x4e1699(0x1f3)](_0x4e1699(0x1ca)+(_0x6baadf[_0x4e1699(0x209)]||a95_0x47faa4[_0x4e1699(0x1f5)](_0x4e1699(0x1df))));if(_0x6baadf[_0x4e1699(0x1dc)])console[_0x4e1699(0x1f3)](_0x4e1699(0x201)+_0x6baadf[_0x4e1699(0x1dc)]);_0x6baadf[_0x4e1699(0x1b3)]!==_0x4e1699(0x1d7)&&console[_0x4e1699(0x1f3)]('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x6baadf['repairCommand']);console[_0x4e1699(0x1f3)](),console[_0x4e1699(0x1f3)](a95_0x47faa4[_0x4e1699(0x210)]('\x20\x20Config\x20Files')),console['log'](a95_0x47faa4[_0x4e1699(0x1f5)]('\x20\x20─'[_0x4e1699(0x1cd)](0x1e)));const _0x2a2f9f=getGlobalConfigPath(),_0x729999=getProjectConfigPath();console['log']('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2a2f9f||a95_0x47faa4[_0x4e1699(0x1f5)](_0x4e1699(0x1df)))),console[_0x4e1699(0x1f3)](_0x4e1699(0x21a)+(_0x729999||a95_0x47faa4[_0x4e1699(0x1f5)](_0x4e1699(0x1df)))),console[_0x4e1699(0x1f3)](),console['log'](a95_0x47faa4[_0x4e1699(0x210)](_0x4e1699(0x1e5))),console[_0x4e1699(0x1f3)](a95_0x47faa4[_0x4e1699(0x1f5)](_0x4e1699(0x206)[_0x4e1699(0x1cd)](0x1e)));const _0x4d0bf3=(_0x145126,_0x39ca69)=>{const _0x29a21c=_0x4e1699;if(!_0x39ca69){console[_0x29a21c(0x1f3)]('\x20\x20'+_0x145126['padEnd'](0x11)+'\x20'+a95_0x47faa4[_0x29a21c(0x1f5)](_0x29a21c(0x1f9)));return;}const _0xa180df=inspectCliConfigJsonFile(_0x39ca69);if(_0xa180df[_0x29a21c(0x202)]==='ok')console[_0x29a21c(0x1f3)]('\x20\x20'+_0x145126[_0x29a21c(0x20c)](0x11)+'\x20'+a95_0x47faa4[_0x29a21c(0x1b7)](_0x29a21c(0x219)));else{if(_0xa180df[_0x29a21c(0x202)]===_0x29a21c(0x211))console[_0x29a21c(0x1f3)]('\x20\x20'+_0x145126['padEnd'](0x11)+'\x20'+a95_0x47faa4[_0x29a21c(0x212)](_0x29a21c(0x207)));else _0xa180df[_0x29a21c(0x202)]===_0x29a21c(0x1d1)?console['log']('\x20\x20'+_0x145126['padEnd'](0x11)+'\x20'+a95_0x47faa4[_0x29a21c(0x1f5)]('(missing)')):(console[_0x29a21c(0x1f3)]('\x20\x20'+_0x145126[_0x29a21c(0x20c)](0x11)+'\x20'+a95_0x47faa4[_0x29a21c(0x1b0)](_0x29a21c(0x1e8))),console[_0x29a21c(0x1f3)]('\x20\x20'+''[_0x29a21c(0x20c)](0x11)+'\x20'+a95_0x47faa4[_0x29a21c(0x1b0)](_0xa180df[_0x29a21c(0x217)])));}};_0x4d0bf3(_0x4e1699(0x20a),_0x2a2f9f),_0x4d0bf3(_0x4e1699(0x205),_0x729999);const _0x21cfcd=loadRawConfigLayers(),_0x44fefe=[Object[_0x4e1699(0x1fa)][_0x4e1699(0x1ce)][_0x4e1699(0x1d5)](_0x21cfcd[_0x4e1699(0x1e7)],_0x4e1699(0x1ea))?_0x4e1699(0x1ec):null,Object['prototype']['hasOwnProperty']['call'](_0x21cfcd[_0x4e1699(0x1fe)],_0x4e1699(0x1ea))?_0x4e1699(0x1c4):null]['filter'](Boolean);_0x44fefe['length']>0x0&&(console[_0x4e1699(0x1f3)](_0x4e1699(0x1fc)+a95_0x47faa4[_0x4e1699(0x212)](_0x4e1699(0x1d8)+_0x44fefe[_0x4e1699(0x213)]('\x20+\x20')+_0x4e1699(0x1d6))),_0x44fefe[_0x4e1699(0x1e3)]('project')&&console[_0x4e1699(0x1f3)]('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20inherit'),_0x44fefe[_0x4e1699(0x1e3)]('global')&&console['log'](_0x4e1699(0x200)+CLI_BIN_NAME+_0x4e1699(0x1b8)));console[_0x4e1699(0x1f3)](),console[_0x4e1699(0x1f3)](a95_0x47faa4[_0x4e1699(0x210)]('\x20\x20Merged\x20Config')),console[_0x4e1699(0x1f3)](a95_0x47faa4['gray'](_0x4e1699(0x206)['repeat'](0x1e))),console[_0x4e1699(0x1f3)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x416adc[_0x4e1699(0x1ff)]||a95_0x47faa4['red'](_0x4e1699(0x1e1)))),console[_0x4e1699(0x1f3)](_0x4e1699(0x203)+_0x416adc['env']),console[_0x4e1699(0x1f3)](_0x4e1699(0x1b5)+_0x416adc[_0x4e1699(0x1e0)]),console['log']('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x416adc['apiDir']),console[_0x4e1699(0x1f3)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x416adc[_0x4e1699(0x21b)]||a95_0x47faa4['gray'](_0x4e1699(0x1e9)))),console[_0x4e1699(0x1f3)](_0x4e1699(0x1f0)+(_0x416adc['currentApp']||a95_0x47faa4['gray'](_0x4e1699(0x1e9)))),console[_0x4e1699(0x1f3)]('\x20\x20explicitAppName:\x20'+(_0x416adc[_0x4e1699(0x1b6)]||a95_0x47faa4[_0x4e1699(0x1f5)]('(none)'))),console[_0x4e1699(0x1f3)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x416adc[_0x4e1699(0x1e6)]||a95_0x47faa4[_0x4e1699(0x1f5)](_0x4e1699(0x20f)+DEFAULT_CONFIG_VALUES[_0x4e1699(0x1e6)]+')'))),console[_0x4e1699(0x1f3)](_0x4e1699(0x1cc)+(_0x416adc[_0x4e1699(0x1f2)]??a95_0x47faa4[_0x4e1699(0x1f5)]('(default)'))),console['log'](_0x4e1699(0x21e)+_0x416adc['riskLevel']),console[_0x4e1699(0x1f3)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x416adc['verbose']),console['log'](_0x4e1699(0x1bc)+(_0x416adc[_0x4e1699(0x20e)]?a95_0x47faa4[_0x4e1699(0x1b7)]('(set,\x20length='+_0x416adc[_0x4e1699(0x20e)][_0x4e1699(0x1da)]+')'):_0x526601?a95_0x47faa4['green']('(set\x20via\x20file,\x20length='+_0x526601[_0x4e1699(0x1da)]+')'):a95_0x47faa4[_0x4e1699(0x1f5)]('(none)')));const _0x23f6f7=Object['keys'](_0x416adc['apps']);if(_0x23f6f7[_0x4e1699(0x1da)]>0x0){console['log'](),console['log'](a95_0x47faa4[_0x4e1699(0x210)](_0x4e1699(0x1e2))),console[_0x4e1699(0x1f3)](a95_0x47faa4[_0x4e1699(0x1f5)]('\x20\x20─'[_0x4e1699(0x1cd)](0x1e)));for(const _0x27badd of _0x23f6f7){const _0x3a30f6=_0x416adc[_0x4e1699(0x1f8)][_0x27badd],_0x54dba6=_0x27badd===_0x416adc['defaultApp'],_0x514003=_0x27badd===_0x416adc[_0x4e1699(0x1d4)],_0x7cd0f7=_0x514003?a95_0x47faa4[_0x4e1699(0x1b7)](_0x4e1699(0x21f)):'',_0x1c4173=_0x54dba6?'\x20(default)':'';console[_0x4e1699(0x1f3)]('\x20\x20'+_0x27badd+_0x1c4173+_0x7cd0f7),console[_0x4e1699(0x1f3)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x3a30f6['appcode']);const _0x1a74ca=buildAppDoctorFields(_0x3a30f6,{'env':_0x416adc[_0x4e1699(0x1dd)],'apiDir':_0x416adc[_0x4e1699(0x1c9)][_0x4e1699(0x1fd)]||DEFAULT_CONFIG_VALUES[_0x4e1699(0x1fd)],'cookie':_0x416adc[_0x4e1699(0x20e)]||_0x526601||undefined,'accessKey':_0x416adc[_0x4e1699(0x1c2)]});console[_0x4e1699(0x1f3)](_0x4e1699(0x1b4)+_0x1a74ca['env'][_0x4e1699(0x218)]+'\x20\x20'+a95_0x47faa4[_0x4e1699(0x1f5)]('('+_0x1a74ca[_0x4e1699(0x1dd)][_0x4e1699(0x1bd)]+')')),console[_0x4e1699(0x1f3)]('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x1a74ca['apiDir'][_0x4e1699(0x218)]+'\x20\x20'+a95_0x47faa4[_0x4e1699(0x1f5)]('('+_0x1a74ca[_0x4e1699(0x1fd)][_0x4e1699(0x1bd)]+')'));const _0x502db8=_0x1a74ca[_0x4e1699(0x20e)]['value']?a95_0x47faa4['green'](_0x4e1699(0x1ba)+_0x1a74ca[_0x4e1699(0x20e)][_0x4e1699(0x218)][_0x4e1699(0x1da)]+')'):a95_0x47faa4[_0x4e1699(0x1f5)](_0x4e1699(0x1e9));console[_0x4e1699(0x1f3)]('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x502db8+'\x20\x20'+a95_0x47faa4['gray']('('+_0x1a74ca['cookie'][_0x4e1699(0x1bd)]+')'));const _0x1dffb5=_0x1a74ca[_0x4e1699(0x1c2)][_0x4e1699(0x218)]?a95_0x47faa4[_0x4e1699(0x1b7)](_0x4e1699(0x1ba)+_0x1a74ca[_0x4e1699(0x1c2)][_0x4e1699(0x218)]['length']+')'):a95_0x47faa4['gray']('(none)');console[_0x4e1699(0x1f3)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x1dffb5+'\x20\x20'+a95_0x47faa4[_0x4e1699(0x1f5)]('('+_0x1a74ca['accessKey'][_0x4e1699(0x1bd)]+')'));}}console[_0x4e1699(0x1f3)](),console['log'](a95_0x47faa4[_0x4e1699(0x210)]('\x20\x20API\x20Endpoints')),console[_0x4e1699(0x1f3)](a95_0x47faa4[_0x4e1699(0x1f5)]('\x20\x20─'[_0x4e1699(0x1cd)](0x1e))),console[_0x4e1699(0x1f3)](_0x4e1699(0x1b1)+getActiveRegion()),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x4e1699(0x1f3)](_0x4e1699(0x1c7)+getUserDomain()),console[_0x4e1699(0x1f3)](_0x4e1699(0x1f1)+getRuntimeDomain()),console[_0x4e1699(0x1f3)](_0x4e1699(0x215)+getSkillDomain()),console[_0x4e1699(0x1f3)](_0x4e1699(0x1c0)+getKbDomain()),console[_0x4e1699(0x1f3)](_0x4e1699(0x1cf)+getAppDomain()),console['log'](),console['log'](a95_0x47faa4[_0x4e1699(0x210)](_0x4e1699(0x1d2))),console[_0x4e1699(0x1f3)](a95_0x47faa4['gray'](_0x4e1699(0x206)[_0x4e1699(0x1cd)](0x1e)));if(_0x526601){const _0x5080a9=await getIsSessionValid();console[_0x4e1699(0x1f3)](_0x4e1699(0x1e4)+(_0x5080a9?a95_0x47faa4[_0x4e1699(0x1b7)](_0x4e1699(0x1be)):a95_0x47faa4[_0x4e1699(0x1b0)](_0x4e1699(0x1ed))));}else console['log'](_0x4e1699(0x1e4)+a95_0x47faa4[_0x4e1699(0x1b0)](_0x4e1699(0x20d)));return console[_0x4e1699(0x1f3)](),{'ok':!![]};}export const doctorDefinition={'service':a95_0xf89154(0x1c8),'command':a95_0xf89154(0x1b2),'description':a95_0xf89154(0x214),'risk':a95_0xf89154(0x1c3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x278dfb=a96_0x5852;(function(_0xc8929b,_0x574573){const _0x307471=a96_0x5852,_0x242910=_0xc8929b();while(!![]){try{const _0x165c7f=parseInt(_0x307471(0x19e))/0x1+parseInt(_0x307471(0x1a7))/0x2+parseInt(_0x307471(0x1a8))/0x3*(-parseInt(_0x307471(0x19b))/0x4)+parseInt(_0x307471(0x191))/0x5+parseInt(_0x307471(0x194))/0x6+-parseInt(_0x307471(0x1a1))/0x7+-parseInt(_0x307471(0x18b))/0x8;if(_0x165c7f===_0x574573)break;else _0x242910['push'](_0x242910['shift']());}catch(_0x30a05f){_0x242910['push'](_0x242910['shift']());}}}(a96_0x2b50,0xb642d));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a96_0x5852(_0x141a71,_0x57dad9){_0x141a71=_0x141a71-0x187;const _0x2b50c2=a96_0x2b50();let _0x58523f=_0x2b50c2[_0x141a71];return _0x58523f;}const FILE_FLAG={'name':a96_0x278dfb(0x1a3),'type':a96_0x278dfb(0x188),'required':!![],'description':a96_0x278dfb(0x1a5)},FILEPATH_FLAG={'name':a96_0x278dfb(0x187),'type':a96_0x278dfb(0x188),'required':!![],'description':a96_0x278dfb(0x1a4)},DOWNLOAD_FLAG={'name':a96_0x278dfb(0x190),'type':a96_0x278dfb(0x192),'description':a96_0x278dfb(0x196)},LONG_TERM_FLAG={'name':'long-term','type':a96_0x278dfb(0x192),'description':a96_0x278dfb(0x18e)};function requireFilePath(_0x5b4a5e){const _0x55f88b=a96_0x278dfb,_0x55dade=_0x5b4a5e[_0x55f88b(0x193)]();if(!_0x55dade)throw CliErrors[_0x55f88b(0x18d)]('filePath\x20is\x20required.');return _0x55dade;}const fileUpload={'service':a96_0x278dfb(0x1a3),'command':'upload','description':a96_0x278dfb(0x198),'risk':a96_0x278dfb(0x19c),'flags':[FILE_FLAG],async 'dryRun'(_0x526d85){const _0x4e57cb=a96_0x278dfb,_0x4f880f=requireDevelopmentUploadFile(_0x526d85[_0x4e57cb(0x199)](_0x4e57cb(0x1a3)),_0x4e57cb(0x1a6));return{'method':'POST','url':'/smartapi/common/uploadFile','body':{'appCode':_0x526d85[_0x4e57cb(0x18f)],'multipart':{'file':_0x4f880f}},'description':'Preview:\x20upload\x20'+_0x4f880f[_0x4e57cb(0x18a)]+_0x4e57cb(0x19a)+_0x526d85[_0x4e57cb(0x18f)]};},async 'execute'(_0x1fff2e){const _0x4e2feb=a96_0x278dfb,_0x5e3c7d=requireDevelopmentUploadFile(_0x1fff2e[_0x4e2feb(0x199)](_0x4e2feb(0x1a3)),_0x4e2feb(0x1a6)),_0x3a52b7=await uploadDevelopmentFile(_0x1fff2e[_0x4e2feb(0x18f)],_0x5e3c7d['path']);return{'ok':!![],'data':_0x3a52b7,'message':_0x3a52b7[_0x4e2feb(0x195)]?_0x4e2feb(0x19d)+_0x3a52b7['filePath']+_0x4e2feb(0x1a2):_0x4e2feb(0x197)};}},fileQueryUrl={'service':a96_0x278dfb(0x1a3),'command':a96_0x278dfb(0x18c),'description':a96_0x278dfb(0x189),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x39654a){const _0x38ae71=a96_0x278dfb,_0x13b75f=requireFilePath(_0x39654a[_0x38ae71(0x199)](_0x38ae71(0x187))),_0x2e10c2=await queryDevelopmentFileUrl(_0x13b75f,{'download':_0x39654a[_0x38ae71(0x1a0)](_0x38ae71(0x190)),'longTerm':_0x39654a[_0x38ae71(0x1a0)](_0x38ae71(0x19f))});return{'ok':!![],'data':_0x2e10c2};}};export const fileDefinitions=[fileUpload,fileQueryUrl];function a96_0x2b50(){const _0x288a9e=['file','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','Path\x20to\x20the\x20local\x20file\x20to\x20upload','File','247960YwrOqz','3676071botcNP','filepath','string','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','path','2941080GXRfVq','query-url','validation','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','appCode','download','7020025onsJUV','boolean','trim','5813844miCgSn','filePath','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','str','\x20to\x20development\x20app\x20','4RhZgyR','read','Uploaded\x20file:\x20','904931pivTDh','long-term','bool','7436499JRQmUo','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'];a96_0x2b50=function(){return _0x288a9e;};return a96_0x2b50();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a97_0x459a(){const _0x269bd6=['486944DJPnWz','1151080KPlZpm','4jIoCjh','1061700GgCxix','12Vvoasr','445747PSRSXd','4954311gegHyc','509131xisKFD','879852ytsdTp'];a97_0x459a=function(){return _0x269bd6;};return a97_0x459a();}(function(_0x457201,_0x2c0213){const _0x50976a=a97_0x1cc8,_0x4d3f5f=_0x457201();while(!![]){try{const _0x588acd=-parseInt(_0x50976a(0x184))/0x1+parseInt(_0x50976a(0x187))/0x2+-parseInt(_0x50976a(0x18b))/0x3*(-parseInt(_0x50976a(0x18a))/0x4)+parseInt(_0x50976a(0x189))/0x5+parseInt(_0x50976a(0x18c))/0x6*(parseInt(_0x50976a(0x186))/0x7)+parseInt(_0x50976a(0x188))/0x8+-parseInt(_0x50976a(0x185))/0x9;if(_0x588acd===_0x2c0213)break;else _0x4d3f5f['push'](_0x4d3f5f['shift']());}catch(_0x30fc0f){_0x4d3f5f['push'](_0x4d3f5f['shift']());}}}(a97_0x459a,0x392a6));function a97_0x1cc8(_0x109e38,_0x3b2c78){_0x109e38=_0x109e38-0x184;const _0x459afc=a97_0x459a();let _0x1cc81d=_0x459afc[_0x109e38];return _0x1cc81d;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x82a276=a98_0x43b0;(function(_0x66974d,_0x302afc){const _0x1ca7ff=a98_0x43b0,_0x484fdc=_0x66974d();while(!![]){try{const _0x2afede=parseInt(_0x1ca7ff(0x175))/0x1+-parseInt(_0x1ca7ff(0x17b))/0x2+parseInt(_0x1ca7ff(0x162))/0x3*(-parseInt(_0x1ca7ff(0x181))/0x4)+-parseInt(_0x1ca7ff(0x17d))/0x5*(parseInt(_0x1ca7ff(0x174))/0x6)+parseInt(_0x1ca7ff(0x167))/0x7*(-parseInt(_0x1ca7ff(0x17c))/0x8)+-parseInt(_0x1ca7ff(0x176))/0x9*(-parseInt(_0x1ca7ff(0x17e))/0xa)+parseInt(_0x1ca7ff(0x182))/0xb*(parseInt(_0x1ca7ff(0x170))/0xc);if(_0x2afede===_0x302afc)break;else _0x484fdc['push'](_0x484fdc['shift']());}catch(_0x884ae8){_0x484fdc['push'](_0x484fdc['shift']());}}}(a98_0x18d8,0x4e27d));function a98_0x43b0(_0x174095,_0x14fbca){_0x174095=_0x174095-0x162;const _0x18d810=a98_0x18d8();let _0x43b0f8=_0x18d810[_0x174095];return _0x43b0f8;}import{CliError}from'../../errors.js';function a98_0x18d8(){const _0x22b1a9=['\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','285ntBeCD','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','\x20\x20\x20\x20--title\x20\x22','auth_required','\x22\x20\x5c','455wLPkky','service','validation_error','Hit\x20a\x20','report','slice','cancelled','length','command','12aPXROt','\x20\x20Set\x20','has','message','50718LOqmpr','241417qGtypU','356949QSuBWc','unknown_command','replace','issue','\x20bug?\x20Help\x20us\x20fix\x20it:','663858SCuMTS','27296xtEXsf','95RqmDdZ','130TwAXZX','code','stderr','14156pWIEox','6749996GOVxEK','=1\x20to\x20silence\x20this\x20hint.','write','\x20issue\x20report\x20\x5c'];a98_0x18d8=function(){return _0x22b1a9;};return a98_0x18d8();}import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV='RABETBASE_DISABLE_ISSUE_NUDGE';const NUDGE_SUPPRESSED_CODES=new Set([a98_0x82a276(0x16d),a98_0x82a276(0x165),'config_missing','not_in_project',a98_0x82a276(0x177),'flag_missing',a98_0x82a276(0x169),'network_error']),defaultWriter=_0xd0748d=>{const _0x3a63c5=a98_0x82a276;process[_0x3a63c5(0x180)][_0x3a63c5(0x184)](_0xd0748d);};export function shouldNudgeForError(_0x40dcac,_0xc76958){const _0x1746e3=a98_0x82a276;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0xc76958[_0x1746e3(0x168)]===_0x1746e3(0x179)&&_0xc76958[_0x1746e3(0x16f)]===_0x1746e3(0x16b))return![];if(_0x40dcac instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x1746e3(0x172)](_0x40dcac[_0x1746e3(0x17f)]);return!![];}export function printIssueReportNudgeForError(_0x40c012,_0x11c94d,_0x227d75=defaultWriter){if(!shouldNudgeForError(_0x40c012,_0x11c94d))return;const _0xd20e90=buildSuggestedTitle(_0x40c012,_0x11c94d);_0x227d75(formatNudge(_0xd20e90));}function buildSuggestedTitle(_0x2d3422,_0x53913f){const _0x1f936c=a98_0x82a276,_0x359d84=_0x2d3422 instanceof Error?_0x2d3422[_0x1f936c(0x173)]:String(_0x2d3422),_0x542685=_0x359d84['replace'](/[\r\n]+/g,'\x20')[_0x1f936c(0x178)](/\s+/g,'\x20')['trim']()[_0x1f936c(0x16c)](0x0,0x78)[_0x1f936c(0x178)](/"/g,'\x5c\x22'),_0x4ac5ef=CLI_BIN_NAME+'\x20'+_0x53913f['service']+'\x20'+_0x53913f[_0x1f936c(0x16f)];return _0x542685[_0x1f936c(0x16e)]>0x0?_0x4ac5ef+':\x20'+_0x542685:_0x4ac5ef;}function formatNudge(_0x134158){const _0x210eab=a98_0x82a276;return['',_0x210eab(0x16a)+CLI_BIN_NAME+_0x210eab(0x17a),'\x20\x20'+CLI_BIN_NAME+_0x210eab(0x185),_0x210eab(0x164)+_0x134158+_0x210eab(0x166),_0x210eab(0x163),_0x210eab(0x186),_0x210eab(0x171)+NUDGE_OPT_OUT_ENV+_0x210eab(0x183),'']['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x584490=a99_0x564e;(function(_0x3ec05f,_0x3d1623){const _0x15392d=a99_0x564e,_0x52d4f0=_0x3ec05f();while(!![]){try{const _0x3a62ce=-parseInt(_0x15392d(0x13b))/0x1+parseInt(_0x15392d(0x153))/0x2*(parseInt(_0x15392d(0x149))/0x3)+parseInt(_0x15392d(0x15c))/0x4+-parseInt(_0x15392d(0x139))/0x5+parseInt(_0x15392d(0x165))/0x6*(parseInt(_0x15392d(0x164))/0x7)+parseInt(_0x15392d(0x162))/0x8+-parseInt(_0x15392d(0x161))/0x9*(-parseInt(_0x15392d(0x168))/0xa);if(_0x3a62ce===_0x3d1623)break;else _0x52d4f0['push'](_0x52d4f0['shift']());}catch(_0x395344){_0x52d4f0['push'](_0x52d4f0['shift']());}}}(a99_0x3514,0x92d07));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';function a99_0x564e(_0x17e52b,_0x45fe8a){_0x17e52b=_0x17e52b-0x12f;const _0x3514f6=a99_0x3514();let _0x564e97=_0x3514f6[_0x17e52b];return _0x564e97;}function a99_0x3514(){const _0x6361e5=['descriptionSource:\x20','\x20bytes','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','validation','push','redactions:\x20','truncated\x20from\x20','14ltJKGR','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','truncated','One-line\x20issue\x20summary','redactionCount','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','File\x20not\x20found:\x20','sanitize','644316iOXlUT','issue.description_truncated','Issue\x20description\x20file\x20is\x20empty:\x20','truncated:\x20original\x20','write','955782NxKDZk','297104aHVqGb','otel://','973oyiTzu','13446hYiNbA','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','str','70YZDnyS','trim','descriptionFilePath','description-file','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','Issue\x20description\x20cannot\x20be\x20empty.','join','filter','cwd','message','descriptionFile:\x20','flagMissing','description','originalBytes','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','3654675ORTqcy','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','13377PuAXXX','apiError','issue.title','redactionKinds','string','POST','inline','compress','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','title','Failed\x20to\x20report\x20platform\x20issue:\x20','Platform\x20issue\x20reported','descriptionSource','issue.description_redaction_kinds','39669szuSwK','length','report'];a99_0x3514=function(){return _0x6361e5;};return a99_0x3514();}import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a99_0x584490(0x16b);export const issueReport={'service':'issue','command':a99_0x584490(0x14b),'description':a99_0x584490(0x138),'risk':a99_0x584490(0x160),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a99_0x584490(0x142),'flags':[{'name':'title','type':'string','required':!![],'description':a99_0x584490(0x157)},{'name':a99_0x584490(0x136),'type':'string','description':a99_0x584490(0x159)},{'name':DESCRIPTION_FILE_FLAG,'type':a99_0x584490(0x13f),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x5e114a){const _0x36a71b=a99_0x584490,_0x753dae=_0x5e114a[_0x36a71b(0x167)](_0x36a71b(0x144))[_0x36a71b(0x169)](),_0x3b53e2=_0x5e114a[_0x36a71b(0x167)](_0x36a71b(0x136))['trim'](),_0xb54d00=_0x5e114a[_0x36a71b(0x167)](DESCRIPTION_FILE_FLAG)[_0x36a71b(0x169)]();if(!_0x753dae)throw CliErrors[_0x36a71b(0x135)](_0x36a71b(0x144),_0x36a71b(0x166));const _0x168a4a=_0x3b53e2[_0x36a71b(0x14a)]>0x0,_0x28e00f=_0xb54d00[_0x36a71b(0x14a)]>0x0;if(_0x168a4a===_0x28e00f)throw CliErrors['validation'](_0x36a71b(0x13a),_0x36a71b(0x154));if(_0x28e00f){const _0x1ab75f=resolve(process['cwd'](),_0xb54d00);if(!existsSync(_0x1ab75f))throw CliErrors[_0x36a71b(0x14f)](_0x36a71b(0x15a)+_0x1ab75f);}},async 'dryRun'(_0x4f0c9f){const _0x317c64=a99_0x584490,_0x490da9=await prepareIssueReport(_0x4f0c9f);return{'method':_0x317c64(0x140),'url':_0x317c64(0x163)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x490da9[_0x317c64(0x144)],'issue.description':_0x490da9[_0x317c64(0x136)],'issue.description_original_bytes':_0x490da9[_0x317c64(0x15b)][_0x317c64(0x137)],'issue.description_truncated':_0x490da9[_0x317c64(0x15b)][_0x317c64(0x156)],'issue.description_redactions':_0x490da9[_0x317c64(0x15b)][_0x317c64(0x158)],'issue.description_redaction_kinds':_0x490da9[_0x317c64(0x15b)][_0x317c64(0x13e)][_0x317c64(0x130)](',')}},'description':[_0x317c64(0x143),_0x317c64(0x14c)+_0x490da9[_0x317c64(0x147)],_0x490da9[_0x317c64(0x16a)]?_0x317c64(0x134)+_0x490da9[_0x317c64(0x16a)]:null,_0x490da9['sanitize']['truncated']?_0x317c64(0x15f)+_0x490da9[_0x317c64(0x15b)][_0x317c64(0x137)]+_0x317c64(0x14d):null,_0x490da9[_0x317c64(0x15b)]['redactionCount']>0x0?_0x317c64(0x151)+_0x490da9[_0x317c64(0x15b)][_0x317c64(0x158)]+'\x20('+_0x490da9[_0x317c64(0x15b)][_0x317c64(0x13e)][_0x317c64(0x130)](',\x20')+')':null][_0x317c64(0x131)](Boolean)['join']('\x0a')};},async 'execute'(_0x37353f){const _0xffd840=a99_0x584490,_0x3b806f=await prepareIssueReport(_0x37353f);try{await sendPlatformIssueCollectLog({'title':_0x3b806f[_0xffd840(0x144)],'description':_0x3b806f[_0xffd840(0x136)],'sanitize':{'originalBytes':_0x3b806f[_0xffd840(0x15b)][_0xffd840(0x137)],'truncated':_0x3b806f['sanitize'][_0xffd840(0x156)],'redactionCount':_0x3b806f['sanitize'][_0xffd840(0x158)],'redactionKinds':_0x3b806f[_0xffd840(0x15b)][_0xffd840(0x13e)]}});}catch(_0x258efd){throw CliErrors[_0xffd840(0x13c)](_0xffd840(0x145)+(_0x258efd instanceof Error?_0x258efd[_0xffd840(0x133)]:String(_0x258efd)),_0xffd840(0x16c));}return{'ok':!![],'message':buildResultMessage(_0x3b806f['sanitize']),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0xffd840(0x13d),'issue.description','issue.description_original_bytes',_0xffd840(0x15d),'issue.description_redactions',_0xffd840(0x148)],'issue':{'title':_0x3b806f[_0xffd840(0x144)],'descriptionLength':_0x3b806f[_0xffd840(0x136)]['length'],'descriptionSource':_0x3b806f[_0xffd840(0x147)],..._0x3b806f[_0xffd840(0x16a)]?{'descriptionFile':_0x3b806f[_0xffd840(0x16a)]}:{},'sanitize':{'originalBytes':_0x3b806f[_0xffd840(0x15b)][_0xffd840(0x137)],'truncated':_0x3b806f[_0xffd840(0x15b)]['truncated'],'redactions':_0x3b806f['sanitize'][_0xffd840(0x158)],'redactionKinds':_0x3b806f[_0xffd840(0x15b)][_0xffd840(0x13e)]}}}};}};function buildResultMessage(_0x128cea){const _0x194ca6=a99_0x584490,_0xcf664c=[];return _0x128cea[_0x194ca6(0x156)]&&_0xcf664c['push'](_0x194ca6(0x152)+_0x128cea[_0x194ca6(0x137)]+_0x194ca6(0x14d)),_0x128cea[_0x194ca6(0x158)]>0x0&&_0xcf664c[_0x194ca6(0x150)]('redacted\x20'+_0x128cea[_0x194ca6(0x158)]+'\x20secret(s):\x20'+_0x128cea[_0x194ca6(0x13e)][_0x194ca6(0x130)](',\x20')),_0xcf664c[_0x194ca6(0x14a)]===0x0?_0x194ca6(0x146):'Platform\x20issue\x20reported\x20('+_0xcf664c['join'](';\x20')+')';}async function prepareIssueReport(_0x23e970){const _0x3e468b=a99_0x584490,_0x2c7629=_0x23e970[_0x3e468b(0x167)]('title')[_0x3e468b(0x169)](),_0x421666=_0x23e970[_0x3e468b(0x167)](_0x3e468b(0x136)),_0x3abf9a=_0x23e970['str'](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x3abf9a){const _0x3e6239=_0x421666;if(!_0x3e6239[_0x3e468b(0x169)]())throw CliErrors['validation'](_0x3e468b(0x12f),_0x3e468b(0x14e));const _0x468371=sanitizeIssueDescription(_0x3e6239);return{'title':_0x2c7629,'description':_0x468371[_0x3e468b(0x136)],'descriptionSource':_0x3e468b(0x141),'sanitize':_0x468371};}const _0x3babc4=resolve(process[_0x3e468b(0x132)](),_0x3abf9a),_0x4c11a4=await readFile(_0x3babc4,'utf8');if(!_0x4c11a4[_0x3e468b(0x169)]())throw CliErrors[_0x3e468b(0x14f)](_0x3e468b(0x15e)+_0x3babc4,_0x3e468b(0x155));const _0x204c75=sanitizeIssueDescription(_0x4c11a4);return{'title':_0x2c7629,'description':_0x204c75[_0x3e468b(0x136)],'descriptionSource':'file','descriptionFilePath':_0x3babc4,'sanitize':_0x204c75};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x2f0efe=a100_0xcc12;(function(_0x50ee45,_0x18c375){const _0xb82f24=a100_0xcc12,_0x3901b3=_0x50ee45();while(!![]){try{const _0x1b16f4=-parseInt(_0xb82f24(0xc3))/0x1*(-parseInt(_0xb82f24(0xb5))/0x2)+-parseInt(_0xb82f24(0xca))/0x3*(-parseInt(_0xb82f24(0xc5))/0x4)+-parseInt(_0xb82f24(0xad))/0x5+-parseInt(_0xb82f24(0xb0))/0x6*(-parseInt(_0xb82f24(0xa9))/0x7)+-parseInt(_0xb82f24(0xab))/0x8+-parseInt(_0xb82f24(0xc8))/0x9*(parseInt(_0xb82f24(0xc7))/0xa)+-parseInt(_0xb82f24(0xb6))/0xb*(-parseInt(_0xb82f24(0xc0))/0xc);if(_0x1b16f4===_0x18c375)break;else _0x3901b3['push'](_0x3901b3['shift']());}catch(_0x4c9484){_0x3901b3['push'](_0x3901b3['shift']());}}}(a100_0x385f,0x4ed9e));function a100_0x385f(){const _0xc58a64=['4361OUPZnz','REDACTED:private-key','5060616OBxViX','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','483085ehkbCo','__RB_OSS_ID_','REDACTED:cookie','1644UeUYie','description','string','toString','byteLength','34NYjtxm','4914723uGNTsy','REDACTED:access-key','password','pattern','private-key','label','includes','authorization','kind','utf8','24CxyuoR','access-key','replace','2617xFsCPO','restore','389524MBxGcL','REDACTED:authorization','10eXqicm','2262339yWXhUK','push','6FVNyPB','subarray'];a100_0x385f=function(){return _0xc58a64;};return a100_0x385f();}export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a100_0x2f0efe(0xac),REDACTION_RULES=[{'kind':'cookie','pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a100_0x2f0efe(0xaf)},{'kind':a100_0x2f0efe(0xbd),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a100_0x2f0efe(0xc6)},{'kind':a100_0x2f0efe(0xba),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a100_0x2f0efe(0xaa)},{'kind':a100_0x2f0efe(0xc1),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a100_0x2f0efe(0xb7)},{'kind':a100_0x2f0efe(0xb8),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':'REDACTED:password'},{'kind':'bearer-jwt','pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':'REDACTED:bearer-jwt'}];function a100_0xcc12(_0x3eedb0,_0x4d5a2c){_0x3eedb0=_0x3eedb0-0xa8;const _0x385ff7=a100_0x385f();let _0xcc12c2=_0x385ff7[_0x3eedb0];return _0xcc12c2;}export function sanitizeIssueDescription(_0x1795a9){const _0x2190cb=a100_0x2f0efe,_0x162b31=Buffer[_0x2190cb(0xb4)](_0x1795a9,_0x2190cb(0xbf)),_0x2da481=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0xf678c0=_0x1795a9,_0xbed3bd=0x0;const _0x307e60=[];if(!_0x2da481){const _0x2e081a=protectOssAccessKeyIds(_0xf678c0);_0xf678c0=_0x2e081a[_0x2190cb(0xb1)];for(const _0x7e43df of REDACTION_RULES){let _0x32167a=0x0;_0xf678c0=_0xf678c0[_0x2190cb(0xc2)](_0x7e43df[_0x2190cb(0xb9)],(_0x27fb20,_0x407460)=>{const _0x4e7a86=_0x2190cb;_0x32167a+=0x1;const _0x54d051=typeof _0x407460===_0x4e7a86(0xb2)?_0x407460:'';return _0x54d051+'['+_0x7e43df[_0x4e7a86(0xbb)]+']';}),_0x32167a>0x0&&(_0xbed3bd+=_0x32167a,!_0x307e60[_0x2190cb(0xbc)](_0x7e43df[_0x2190cb(0xbe)])&&_0x307e60[_0x2190cb(0xc9)](_0x7e43df[_0x2190cb(0xbe)]));}_0xf678c0=_0x2e081a[_0x2190cb(0xc4)](_0xf678c0);}let _0x205385=![];if(Buffer[_0x2190cb(0xb4)](_0xf678c0,'utf8')>ISSUE_DESCRIPTION_MAX_BYTES){_0x205385=!![];const _0x5052de=Buffer[_0x2190cb(0xb4)](TRUNCATION_NOTICE,_0x2190cb(0xbf)),_0x52f936=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x5052de);_0xf678c0=sliceUtf8Bytes(_0xf678c0,_0x52f936)+TRUNCATION_NOTICE;}return{'description':_0xf678c0,'originalBytes':_0x162b31,'truncated':_0x205385,'redactionCount':_0xbed3bd,'redactionKinds':_0x307e60};}function protectOssAccessKeyIds(_0x2f9959){const _0x175aca=a100_0x2f0efe,_0x446d6b=[],_0x3bdf2f=_0x2f9959[_0x175aca(0xc2)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x62f7fd,_0x163489)=>{const _0x3e0b77=_0x175aca,_0x30dad7=_0x446d6b['push'](_0x62f7fd['slice'](_0x163489['length']))-0x1;return _0x163489+_0x3e0b77(0xae)+_0x30dad7+'__';});return{'description':_0x3bdf2f,'restore':_0x288941=>_0x288941[_0x175aca(0xc2)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x3e2e50,_0x296efb,_0x5ee0df)=>{const _0x4ec290=_0x446d6b[Number(_0x5ee0df)];return _0x4ec290===undefined?_0x3e2e50:''+_0x296efb+_0x4ec290;})};}function sliceUtf8Bytes(_0x5bf4ef,_0x24675b){const _0x2fe8fb=a100_0x2f0efe;if(_0x24675b<=0x0)return'';const _0xacd2c4=Buffer['from'](_0x5bf4ef,_0x2fe8fb(0xbf));if(_0xacd2c4[_0x2fe8fb(0xb4)]<=_0x24675b)return _0x5bf4ef;let _0x1a4f5b=_0x24675b;while(_0x1a4f5b>0x0){const _0x15ac53=_0xacd2c4[_0x1a4f5b];if(_0x15ac53===undefined||(_0x15ac53&0xc0)!==0x80)break;_0x1a4f5b-=0x1;}return _0xacd2c4[_0x2fe8fb(0xa8)](0x0,_0x1a4f5b)[_0x2fe8fb(0xb3)](_0x2fe8fb(0xbf));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a101_0x3d5b(){const _0x52b8fa=['kb_create_outcome_unknown','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','\x20--format\x20compress','41268VmgMJI','verified','221580OTjWnb','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','write','744195IWQWFA','\x20--format\x20compress`\x20before\x20choosing\x20update.','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','stringify','appCode','content','--title\x20is\x20required.','220XZrMIP','company','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','title','14726URMZab','453640ZLwxsh','create','byteSize','Knowledge-base\x20title','27Cuwqho','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','file','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','kb_file_required','/admin/knowledge-base/create','string','kb_verification_failed','rabetbase\x20kb\x20list\x20--title\x20','Created\x20company\x20knowledge\x20base\x20','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','Company\x20knowledge\x20base\x20','cookie','651alRZKy','110nseHff','length','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','5GlZtxG','kb_title_required','str','\x20with\x20title\x20','533004dlgDdV','\x20for\x20','6131792QvSzWZ','contentHash'];a101_0x3d5b=function(){return _0x52b8fa;};return a101_0x3d5b();}const a101_0x9fb6a9=a101_0x2387;(function(_0x59a810,_0x91dabb){const _0x3aa3f4=a101_0x2387,_0x248cb0=_0x59a810();while(!![]){try{const _0x13125c=parseInt(_0x3aa3f4(0x17b))/0x1*(-parseInt(_0x3aa3f4(0x176))/0x2)+parseInt(_0x3aa3f4(0x19c))/0x3+parseInt(_0x3aa3f4(0x177))/0x4*(parseInt(_0x3aa3f4(0x18c))/0x5)+-parseInt(_0x3aa3f4(0x197))/0x6*(parseInt(_0x3aa3f4(0x188))/0x7)+parseInt(_0x3aa3f4(0x192))/0x8+parseInt(_0x3aa3f4(0x199))/0x9*(parseInt(_0x3aa3f4(0x1a3))/0xa)+parseInt(_0x3aa3f4(0x189))/0xb*(-parseInt(_0x3aa3f4(0x190))/0xc);if(_0x13125c===_0x91dabb)break;else _0x248cb0['push'](_0x248cb0['shift']());}catch(_0x35d693){_0x248cb0['push'](_0x248cb0['shift']());}}}(a101_0x3d5b,0x5e794));function a101_0x2387(_0x3d85fa,_0x16ada1){_0x3d85fa=_0x3d85fa-0x174;const _0x3d5b2a=a101_0x3d5b();let _0x23879e=_0x3d5b2a[_0x3d85fa];return _0x23879e;}import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH=a101_0x9fb6a9(0x180);function readCreateInput(_0x56eb9e){const _0x55f984=a101_0x9fb6a9,_0x801905=_0x56eb9e[_0x55f984(0x18e)](_0x55f984(0x175))['trim']();if(!_0x801905)throw kbError(_0x55f984(0x18d),_0x55f984(0x1a2));const _0x43b00e=_0x56eb9e['str'](_0x55f984(0x17d))['trim']();if(!_0x43b00e)throw kbError(_0x55f984(0x17f),'--file\x20is\x20required.','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.');return{'title':_0x801905,'file':_0x43b00e};}async function prepareCreate(_0x36bf4c){const _0x19cb96=a101_0x9fb6a9,_0x31c3c8=readCreateInput(_0x36bf4c),_0x5dc25b=await readKbFile(_0x31c3c8[_0x19cb96(0x17d)]),_0x34f99a=await fetchAllCompanyKnowledgeBases(_0x36bf4c,{'title':_0x31c3c8[_0x19cb96(0x175)]}),_0xf9945a=findExactCompanyKnowledgeBases(_0x34f99a,_0x36bf4c[_0x19cb96(0x1a0)],_0x31c3c8['title']);if(_0xf9945a[_0x19cb96(0x18a)]>0x0)throw kbError('kb_already_exists',_0x19cb96(0x19e)+_0x36bf4c['appCode']+_0x19cb96(0x18f)+_0x31c3c8[_0x19cb96(0x175)]+'.',_0x19cb96(0x19a)+_0xf9945a[0x0]['id']+_0x19cb96(0x19d));return{..._0x31c3c8,'content':_0x5dc25b};}function plannedAfter(_0x4d72fa,_0x20119c){const _0x1b769b=a101_0x9fb6a9;return{'scope':_0x1b769b(0x1a4),'appCode':_0x4d72fa['appCode'],'title':_0x20119c[_0x1b769b(0x175)],'contentByteSize':_0x20119c[_0x1b769b(0x1a1)][_0x1b769b(0x179)],'contentHash':_0x20119c[_0x1b769b(0x1a1)][_0x1b769b(0x193)]};}function verifyCreatedState(_0x1e53e5,_0xc6f858,_0x2e8cbf){const _0x43cfb5=a101_0x9fb6a9;assertCompanyKnowledgeBase(_0x2e8cbf,_0x1e53e5[_0x43cfb5(0x1a0)],_0x2e8cbf['id']);const _0x441817=inspectKbContent(_0x2e8cbf[_0x43cfb5(0x1a1)]);if(_0x2e8cbf[_0x43cfb5(0x175)]!==_0xc6f858[_0x43cfb5(0x175)]||_0x441817[_0x43cfb5(0x193)]!==_0xc6f858[_0x43cfb5(0x1a1)][_0x43cfb5(0x193)])throw kbError(_0x43cfb5(0x182),_0x43cfb5(0x186)+_0x2e8cbf['id']+_0x43cfb5(0x174),_0x43cfb5(0x185)+_0x2e8cbf['id']+_0x43cfb5(0x17c));return projectKb(_0x2e8cbf);}export const kbCreate={'service':'kb','command':a101_0x9fb6a9(0x178),'description':'Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','risk':a101_0x9fb6a9(0x19b),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a101_0x9fb6a9(0x175),'type':a101_0x9fb6a9(0x181),'required':!![],'description':a101_0x9fb6a9(0x17a)},{'name':a101_0x9fb6a9(0x17d),'type':a101_0x9fb6a9(0x181),'required':!![],'description':a101_0x9fb6a9(0x195)}],async 'validate'(_0x45acb6){readCreateInput(_0x45acb6);},async 'dryRun'(_0x12b97e){const _0x5c60c0=a101_0x9fb6a9,_0x58d592=await prepareCreate(_0x12b97e);return asDryRunResult({'operation':_0x5c60c0(0x178),'selector':{'scope':_0x5c60c0(0x1a4),'appCode':_0x12b97e[_0x5c60c0(0x1a0)],'title':_0x58d592[_0x5c60c0(0x175)]},'before':null,'after':plannedAfter(_0x12b97e,_0x58d592),'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x5c60c0(0x183)+JSON[_0x5c60c0(0x19f)](_0x58d592[_0x5c60c0(0x175)])+'\x20--format\x20compress'}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x546239){const _0xab9d0=a101_0x9fb6a9,_0x2a73f4=await prepareCreate(_0x546239);let _0x1e7f14,_0x4bb3c2=![];try{const _0x133df2=await createEnterpriseKnowledgeBase(_0x546239[_0xab9d0(0x187)],{'appCode':_0x546239['appCode'],'title':_0x2a73f4['title'],'content':_0x2a73f4[_0xab9d0(0x1a1)][_0xab9d0(0x1a1)]});assertCompanyKnowledgeBase(_0x133df2,_0x546239[_0xab9d0(0x1a0)],_0x133df2['id']),_0x1e7f14=_0x133df2['id'];}catch(_0x12c0fd){if(!isPlatformTransportFailure(_0x12c0fd))throw _0x12c0fd;_0x4bb3c2=!![];}if(_0x1e7f14===undefined){const _0x5393dc=await verifyKbMutationReadback(_0xab9d0(0x178),!![],()=>fetchAllCompanyKnowledgeBases(_0x546239,{'title':_0x2a73f4[_0xab9d0(0x175)]})),_0x4d92f2=findExactCompanyKnowledgeBases(_0x5393dc,_0x546239[_0xab9d0(0x1a0)],_0x2a73f4[_0xab9d0(0x175)]);if(_0x4d92f2['length']!==0x1)throw kbError(_0xab9d0(0x194),'Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20'+_0x4d92f2[_0xab9d0(0x18a)]+'.',_0xab9d0(0x18b));_0x1e7f14=_0x4d92f2[0x0]['id'];}const _0x2227c0=await verifyKbMutationReadback('create',_0x4bb3c2,()=>requireKb(_0x546239,_0x1e7f14)),_0x25e20d=verifyCreatedState(_0x546239,_0x2a73f4,_0x2227c0),_0x10d03a=_0x4bb3c2?[_0xab9d0(0x17e)]:[];return{'ok':!![],'data':{'operation':_0xab9d0(0x178),'selector':{'id':_0x25e20d['id'],'scope':'company','appCode':_0x25e20d[_0xab9d0(0x1a0)]},'before':null,'after':_0x25e20d,'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':_0x10d03a,'verification':{'status':_0xab9d0(0x198),'recoveredAfterUnknownResponse':_0x4bb3c2,'lookupCommand':'rabetbase\x20kb\x20detail\x20--id\x20'+_0x25e20d['id']+_0xab9d0(0x196)}},'message':_0xab9d0(0x184)+_0x25e20d['id']+_0xab9d0(0x191)+_0x25e20d[_0xab9d0(0x1a0)]};}};
|