@lovrabet/rabetbase-cli 2.4.4-beta.1 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/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/get.js +1 -1
- package/lib/commands/config/index.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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.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/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/init/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/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/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/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/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.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/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/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/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/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/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/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/rules-cdn.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 +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x6ac6de=a92_0x1f4e;(function(_0x4ec4df,_0x55bbba){const _0x307261=a92_0x1f4e,_0x578d41=_0x4ec4df();while(!![]){try{const _0x4032bb=-parseInt(_0x307261(0x8f))/0x1*(-parseInt(_0x307261(0x87))/0x2)+-parseInt(_0x307261(0x91))/0x3+parseInt(_0x307261(0x7a))/0x4*(-parseInt(_0x307261(0x7e))/0x5)+-parseInt(_0x307261(0x83))/0x6*(-parseInt(_0x307261(0x90))/0x7)+parseInt(_0x307261(0x80))/0x8+-parseInt(_0x307261(0x8c))/0x9*(-parseInt(_0x307261(0x81))/0xa)+parseInt(_0x307261(0x8b))/0xb;if(_0x4032bb===_0x55bbba)break;else _0x578d41['push'](_0x578d41['shift']());}catch(_0x5ce93d){_0x578d41['push'](_0x578d41['shift']());}}}(a92_0x5ea2,0x3b9a3));function a92_0x1f4e(_0x41bf5c,_0x28af45){_0x41bf5c=_0x41bf5c-0x7a;const _0x5ea263=a92_0x5ea2();let _0x1f4e9b=_0x5ea263[_0x41bf5c];return _0x1f4e9b;}function a92_0x5ea2(){const _0x17434b=['read','158896MYEKGb','21qKliMq','907458ghTRNC','875020SWOvQo','slice','object','success','10TkgMtd','message','2208320laxzyK','527580rBQnMp','keys','279648pHYbAz','data','length','test','2veIjSa','num','Connection\x20OK\x20for\x20db\x20link\x20','msg','3342361qzymGH','18RZlNXN','code'];a92_0x5ea2=function(){return _0x17434b;};return a92_0x5ea2();}import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x2f84a7){const _0x1ff39f=a92_0x1f4e;if(_0x2f84a7===!![]||_0x2f84a7===![])return{'success':_0x2f84a7};if(_0x2f84a7===null||_0x2f84a7===undefined)return{'type':typeof _0x2f84a7};if(typeof _0x2f84a7!==_0x1ff39f(0x7c))return{'type':typeof _0x2f84a7};const _0x48400e=_0x2f84a7,_0x2340db=['success',_0x1ff39f(0x7f),_0x1ff39f(0x8d),'error',_0x1ff39f(0x8a),_0x1ff39f(0x84)],_0xca6513={};for(const _0x2acb5d of _0x2340db){if(_0x2acb5d in _0x48400e)_0xca6513[_0x2acb5d]=_0x48400e[_0x2acb5d];}return Object[_0x1ff39f(0x82)](_0xca6513)[_0x1ff39f(0x85)]===0x0&&(_0xca6513[_0x1ff39f(0x82)]=Object['keys'](_0x48400e)[_0x1ff39f(0x7b)](0x0,0x14)),_0xca6513;}export const dbTest={'service':'db','command':a92_0x6ac6de(0x86),'description':'Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','risk':a92_0x6ac6de(0x8e),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x132d27){const _0x345389=a92_0x6ac6de,_0x568355=_0x132d27[_0x345389(0x88)]('id'),_0x16f81c=await testDbLinkConnect(_0x568355),_0x155185=_0x16f81c===!![]||typeof _0x16f81c===_0x345389(0x7c)&&_0x16f81c!==null&&_0x16f81c[_0x345389(0x7d)]===!![],_0x38e043=summarizeTestConnectResult(_0x16f81c);return{'ok':!![],'data':{'id':_0x568355,'connected':Boolean(_0x155185),'result':_0x38e043},'message':_0x155185?_0x345389(0x89)+_0x568355:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x568355+'\x20(see\x20data.result)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0xcef32e=a93_0x22cd;(function(_0x5aa054,_0x28f4f3){const _0x48b28c=a93_0x22cd,_0x5aea65=_0x5aa054();while(!![]){try{const _0x81a836=-parseInt(_0x48b28c(0x1b3))/0x1+-parseInt(_0x48b28c(0x1b0))/0x2*(parseInt(_0x48b28c(0x1d0))/0x3)+-parseInt(_0x48b28c(0x1bf))/0x4*(parseInt(_0x48b28c(0x1ad))/0x5)+-parseInt(_0x48b28c(0x1c4))/0x6+-parseInt(_0x48b28c(0x1bb))/0x7+-parseInt(_0x48b28c(0x1b9))/0x8+parseInt(_0x48b28c(0x1ba))/0x9*(parseInt(_0x48b28c(0x1ca))/0xa);if(_0x81a836===_0x28f4f3)break;else _0x5aea65['push'](_0x5aea65['shift']());}catch(_0x52fc26){_0x5aea65['push'](_0x5aea65['shift']());}}}(a93_0x2600,0x28abd));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';function a93_0x2600(){const _0x30ffac=['New\x20username','38958jjNSzP','******','validation','trim','[redacted]','New\x20database\x20name','40nxhTfV','dbdesc','dburl','Updated\x20db\x20link\x20','username','dbName','867EvcKoD','New\x20host:port','password','10960lMgTMf','num','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password','668NAkHbv','has','string','50965djgQYN','dbname','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','/smartapi/dblink/update','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','update','38560WisHrR','1048122RCUkAA','415345pioAWs','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','dbparam','write','148nbWduV','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','str','New\x20description'];a93_0x2600=function(){return _0x30ffac;};return a93_0x2600();}import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a93_0xcef32e(0x1c5),a93_0xcef32e(0x1c8)]);function a93_0x22cd(_0x5d2269,_0x24368b){_0x5d2269=_0x5d2269-0x1ad;const _0x2600f4=a93_0x2600();let _0x22cd14=_0x2600f4[_0x5d2269];return _0x22cd14;}function mergeDbLinkUpdate(_0x1ba2c9,_0x511268){const _0x6c4746=a93_0xcef32e,_0x288c01={..._0x1ba2c9},_0x182f1f=_0x511268[_0x6c4746(0x1c1)](_0x6c4746(0x1d2));if(_0x182f1f&&MASKED_PASSWORD_VALUES[_0x6c4746(0x1b1)](_0x182f1f))throw CliErrors[_0x6c4746(0x1c6)](_0x6c4746(0x1b5));if(!_0x182f1f&&MASKED_PASSWORD_VALUES[_0x6c4746(0x1b1)](String(_0x1ba2c9[_0x6c4746(0x1d2)]??'')))throw CliErrors['validation'](_0x6c4746(0x1bc));const _0x18191c=_0x511268[_0x6c4746(0x1c1)](_0x6c4746(0x1b4));if(_0x18191c)_0x288c01[_0x6c4746(0x1cf)]=_0x18191c;const _0x4774a1=_0x511268['str'](_0x6c4746(0x1cc));if(_0x4774a1)_0x288c01['dbUrl']=_0x4774a1[_0x6c4746(0x1c7)]();const _0x1f3ca6=_0x511268[_0x6c4746(0x1c1)](_0x6c4746(0x1ce));if(_0x1f3ca6)_0x288c01[_0x6c4746(0x1ce)]=_0x1f3ca6;if(_0x182f1f)_0x288c01[_0x6c4746(0x1d2)]=_0x182f1f;const _0x5ceed5=_0x511268['str'](_0x6c4746(0x1bd));if(_0x5ceed5)_0x288c01['dbParam']=_0x5ceed5;const _0x4aeabd=_0x511268[_0x6c4746(0x1c1)](_0x6c4746(0x1cb));if(_0x4aeabd)_0x288c01['dbDesc']=_0x4aeabd;return _0x288c01;}export const dbUpdate={'service':'db','command':a93_0xcef32e(0x1b8),'description':a93_0xcef32e(0x1c0),'risk':a93_0xcef32e(0x1be),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a93_0xcef32e(0x1b4),'type':'string','description':a93_0xcef32e(0x1c9)},{'name':a93_0xcef32e(0x1cc),'type':'string','description':a93_0xcef32e(0x1d1)},{'name':a93_0xcef32e(0x1ce),'type':a93_0xcef32e(0x1b2),'description':a93_0xcef32e(0x1c3)},{'name':a93_0xcef32e(0x1d2),'type':'string','description':a93_0xcef32e(0x1af)},{'name':a93_0xcef32e(0x1bd),'type':a93_0xcef32e(0x1b2),'description':'New\x20connection\x20parameter\x20string'},{'name':'dbdesc','type':a93_0xcef32e(0x1b2),'description':a93_0xcef32e(0x1c2)}],async 'validate'(_0x337ae0){const _0xb6b372=a93_0xcef32e,_0x31ecdd=_0x337ae0['str']('dburl');if(_0x31ecdd&&!validateDbUrl(_0x31ecdd['trim']()))throw CliErrors[_0xb6b372(0x1c6)](_0xb6b372(0x1b7)+_0x31ecdd+'\x22');},async 'dryRun'(_0x32848f){const _0x5e1777=a93_0xcef32e,_0x23949f=_0x32848f[_0x5e1777(0x1ae)]('id'),_0x428797=await getDbLinkInfo(_0x23949f),_0x4adcb9=mergeDbLinkUpdate(_0x428797,_0x32848f),_0x6243b7=sanitizeDbLinkForOutput(_0x4adcb9);return{'method':'POST','url':_0x5e1777(0x1b6),'body':_0x6243b7,'description':'Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview'};},async 'execute'(_0x5b75e0){const _0xfd6164=a93_0xcef32e,_0x538d0d=_0x5b75e0[_0xfd6164(0x1ae)]('id'),_0x4f0ba8=await getDbLinkInfo(_0x538d0d),_0x550e51=mergeDbLinkUpdate(_0x4f0ba8,_0x5b75e0),{id:_0x44bc72,entity:_0x57ad0}=normalizeEntityWithIdResponse(await updateDbLink(_0x550e51));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x57ad0),'message':_0xfd6164(0x1cd)+(_0x44bc72??_0x538d0d)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a94_0x17e1a4=a94_0x5333;(function(_0x2bc52b,_0x4a2212){const _0x50b133=a94_0x5333,_0x595870=_0x2bc52b();while(!![]){try{const _0x3c12c2=-parseInt(_0x50b133(0x128))/0x1+parseInt(_0x50b133(0x151))/0x2+-parseInt(_0x50b133(0x15e))/0x3*(-parseInt(_0x50b133(0x144))/0x4)+parseInt(_0x50b133(0x146))/0x5+-parseInt(_0x50b133(0x124))/0x6+-parseInt(_0x50b133(0x12e))/0x7+parseInt(_0x50b133(0x168))/0x8*(parseInt(_0x50b133(0x166))/0x9);if(_0x3c12c2===_0x4a2212)break;else _0x595870['push'](_0x595870['shift']());}catch(_0x4607b3){_0x595870['push'](_0x595870['shift']());}}}(a94_0x4703,0x5d667));import a94_0xc199d7 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{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';function a94_0x5333(_0x3535ea,_0x2c2a42){_0x3535ea=_0x3535ea-0x108;const _0x4703e0=a94_0x4703();let _0x5333cc=_0x4703e0[_0x3535ea];return _0x5333cc;}import{buildAppDoctorFields}from'../config/schema.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';function a94_0x4703(){const _0x54339f=['(not\x20found)','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','gray','keys','length','(unknown)','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(set\x20via\x20file,\x20length=','raw','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','4fgwfLO','value','2493445nTtbTd','source','cookie','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','(no\x20file)','skillVersion','riskLevel','✓\x20Valid','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20set)','1300430FJvKcS','empty','\x20\x20runtimeDomain:\x20\x20\x20','✗\x20Invalid\x20JSON','locale','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','read','apps','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','packageVersion','format','accessKey','296343ybcOTD','appCode','installedPath','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','log','✗\x20Expired','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20←\x20current','3789711NbULIm','state','8ytcTaz','unknown','red','\x20doctor','check','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','repairCommand','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','env','verbose','bold','(default:\x20','\x20\x20Config\x20JSON','\x20(default)','\x20\x20Apps','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Package\x20Version:\x20','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','message','\x20\x20\x20\x20accessKey:\x20\x20','(set,\x20length=','current','(missing)','\x20\x20Auth','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20explicitAppName:\x20','\x20\x20Built-in\x20Skill','currentApp','3216102EnhFHZ','✗\x20Not\x20logged\x20in','status','apiDir','179443ZKEAta','slice','platform','green','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','3995159woWELK','version','appcode','defaultApp','\x20\x20─','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','repeat','\x20\x20Installed\x20Path:\x20\x20','reason','Project'];a94_0x4703=function(){return _0x54339f;};return a94_0x4703();}async function execute(_0x118834){const _0x29f15c=a94_0x5333,_0x25fbc3=GIT_COMMIT!==_0x29f15c(0x169)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x29f15c(0x129)](0x0,0xa)+')':VERSION,_0x3e9e5a=buildConfigFromFlags({}),_0x3c1bfb=getCookie();console['log'](),console['log'](a94_0xc199d7[_0x29f15c(0x10e)](CLI_BIN_NAME+_0x29f15c(0x16b))),console[_0x29f15c(0x162)](a94_0xc199d7[_0x29f15c(0x13c)]('─'['repeat'](0x32))),console[_0x29f15c(0x162)](_0x29f15c(0x13b)+_0x25fbc3),console[_0x29f15c(0x162)](_0x29f15c(0x113)+process[_0x29f15c(0x12f)]),console[_0x29f15c(0x162)](_0x29f15c(0x109)+process[_0x29f15c(0x12a)]+'\x20'+process['arch']);const _0x3ade2a=inspectBuiltinSkill();console[_0x29f15c(0x162)](),console[_0x29f15c(0x162)](a94_0xc199d7['bold'](_0x29f15c(0x122))),console[_0x29f15c(0x162)](a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x132)['repeat'](0x1e)));const _0x3d0acd=_0x3ade2a['state']===_0x29f15c(0x11d)?a94_0xc199d7[_0x29f15c(0x12b)]('✓\x20'+_0x3ade2a[_0x29f15c(0x167)]):a94_0xc199d7[_0x29f15c(0x16a)]('✗\x20'+_0x3ade2a[_0x29f15c(0x167)]);console[_0x29f15c(0x162)](_0x29f15c(0x159)+_0x3d0acd),console[_0x29f15c(0x162)](_0x29f15c(0x116)+_0x3ade2a[_0x29f15c(0x15b)]),console[_0x29f15c(0x162)]('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x3ade2a[_0x29f15c(0x14c)]||a94_0xc199d7['gray'](_0x29f15c(0x13f)))),console['log'](_0x29f15c(0x136)+(_0x3ade2a[_0x29f15c(0x160)]||a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x139))));if(_0x3ade2a['reason'])console['log'](_0x29f15c(0x118)+_0x3ade2a[_0x29f15c(0x137)]);_0x3ade2a[_0x29f15c(0x167)]!==_0x29f15c(0x11d)&&console[_0x29f15c(0x162)]('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3ade2a[_0x29f15c(0x10a)]);console['log'](),console[_0x29f15c(0x162)](a94_0xc199d7[_0x29f15c(0x10e)]('\x20\x20Config\x20Files')),console[_0x29f15c(0x162)](a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x132)[_0x29f15c(0x135)](0x1e)));const _0x360919=getGlobalConfigPath(),_0x2f510f=getProjectConfigPath();console[_0x29f15c(0x162)](_0x29f15c(0x133)+(_0x360919||a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x139)))),console['log'](_0x29f15c(0x143)+(_0x2f510f||a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x139)))),console[_0x29f15c(0x162)](),console[_0x29f15c(0x162)](a94_0xc199d7['bold'](_0x29f15c(0x110))),console[_0x29f15c(0x162)](a94_0xc199d7['gray']('\x20\x20─'[_0x29f15c(0x135)](0x1e)));const _0x16d272=(_0x13553f,_0x1f007c)=>{const _0x15b192=_0x29f15c;if(!_0x1f007c){console[_0x15b192(0x162)]('\x20\x20'+_0x13553f[_0x15b192(0x114)](0x11)+'\x20'+a94_0xc199d7['gray'](_0x15b192(0x14b)));return;}const _0x7bbcc9=inspectCliConfigJsonFile(_0x1f007c);if(_0x7bbcc9[_0x15b192(0x126)]==='ok')console[_0x15b192(0x162)]('\x20\x20'+_0x13553f[_0x15b192(0x114)](0x11)+'\x20'+a94_0xc199d7['green'](_0x15b192(0x14a)));else{if(_0x7bbcc9[_0x15b192(0x126)]===_0x15b192(0x152))console[_0x15b192(0x162)]('\x20\x20'+_0x13553f['padEnd'](0x11)+'\x20'+a94_0xc199d7['yellow'](_0x15b192(0x120)));else _0x7bbcc9['status']==='missing'?console['log']('\x20\x20'+_0x13553f[_0x15b192(0x114)](0x11)+'\x20'+a94_0xc199d7[_0x15b192(0x13c)](_0x15b192(0x11e))):(console['log']('\x20\x20'+_0x13553f['padEnd'](0x11)+'\x20'+a94_0xc199d7['red'](_0x15b192(0x154))),console['log']('\x20\x20'+''[_0x15b192(0x114)](0x11)+'\x20'+a94_0xc199d7[_0x15b192(0x16a)](_0x7bbcc9[_0x15b192(0x11a)])));}};_0x16d272(_0x29f15c(0x134),_0x360919),_0x16d272(_0x29f15c(0x138),_0x2f510f),console['log'](),console[_0x29f15c(0x162)](a94_0xc199d7[_0x29f15c(0x10e)]('\x20\x20Merged\x20Config')),console[_0x29f15c(0x162)](a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x132)['repeat'](0x1e))),console[_0x29f15c(0x162)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3e9e5a[_0x29f15c(0x15f)]||a94_0xc199d7[_0x29f15c(0x16a)](_0x29f15c(0x150)))),console[_0x29f15c(0x162)](_0x29f15c(0x115)+_0x3e9e5a[_0x29f15c(0x10c)]),console[_0x29f15c(0x162)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3e9e5a[_0x29f15c(0x155)]),console[_0x29f15c(0x162)](_0x29f15c(0x10b)+_0x3e9e5a[_0x29f15c(0x127)]),console[_0x29f15c(0x162)](_0x29f15c(0x12c)+(_0x3e9e5a[_0x29f15c(0x131)]||a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x15a)))),console[_0x29f15c(0x162)](_0x29f15c(0x156)+(_0x3e9e5a[_0x29f15c(0x123)]||a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x15a)))),console[_0x29f15c(0x162)](_0x29f15c(0x121)+(_0x3e9e5a['explicitAppName']||a94_0xc199d7['gray']('(none)'))),console['log'](_0x29f15c(0x14f)+(_0x3e9e5a[_0x29f15c(0x15c)]||a94_0xc199d7['gray'](_0x29f15c(0x10f)+DEFAULT_CONFIG_VALUES['format']+')'))),console['log'](_0x29f15c(0x119)+(_0x3e9e5a['pageSize']??a94_0xc199d7[_0x29f15c(0x13c)]('(default)'))),console['log'](_0x29f15c(0x12d)+_0x3e9e5a[_0x29f15c(0x14d)]),console[_0x29f15c(0x162)](_0x29f15c(0x140)+_0x3e9e5a[_0x29f15c(0x10d)]),console['log']('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3e9e5a[_0x29f15c(0x148)]?a94_0xc199d7[_0x29f15c(0x12b)](_0x29f15c(0x11c)+_0x3e9e5a[_0x29f15c(0x148)][_0x29f15c(0x13e)]+')'):_0x3c1bfb?a94_0xc199d7[_0x29f15c(0x12b)](_0x29f15c(0x141)+_0x3c1bfb[_0x29f15c(0x13e)]+')'):a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x15a))));const _0x2c35f7=Object[_0x29f15c(0x13d)](_0x3e9e5a[_0x29f15c(0x158)]);if(_0x2c35f7[_0x29f15c(0x13e)]>0x0){console[_0x29f15c(0x162)](),console[_0x29f15c(0x162)](a94_0xc199d7[_0x29f15c(0x10e)](_0x29f15c(0x112))),console[_0x29f15c(0x162)](a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x132)[_0x29f15c(0x135)](0x1e)));for(const _0x2d959a of _0x2c35f7){const _0x386279=_0x3e9e5a[_0x29f15c(0x158)][_0x2d959a],_0x5a5262=_0x2d959a===_0x3e9e5a[_0x29f15c(0x131)],_0x2f72ed=_0x2d959a===_0x3e9e5a[_0x29f15c(0x123)],_0x47b8d2=_0x2f72ed?a94_0xc199d7[_0x29f15c(0x12b)](_0x29f15c(0x165)):'',_0x4c34b8=_0x5a5262?_0x29f15c(0x111):'';console[_0x29f15c(0x162)]('\x20\x20'+_0x2d959a+_0x4c34b8+_0x47b8d2),console[_0x29f15c(0x162)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x386279[_0x29f15c(0x130)]);const _0xf0a9c4=buildAppDoctorFields(_0x386279,{'env':_0x3e9e5a[_0x29f15c(0x10c)],'apiDir':_0x3e9e5a[_0x29f15c(0x142)][_0x29f15c(0x127)]||DEFAULT_CONFIG_VALUES[_0x29f15c(0x127)],'cookie':_0x3e9e5a['cookie']||_0x3c1bfb||undefined,'accessKey':_0x3e9e5a[_0x29f15c(0x15d)]});console[_0x29f15c(0x162)](_0x29f15c(0x117)+_0xf0a9c4[_0x29f15c(0x10c)][_0x29f15c(0x145)]+'\x20\x20'+a94_0xc199d7[_0x29f15c(0x13c)]('('+_0xf0a9c4['env']['source']+')')),console['log'](_0x29f15c(0x164)+_0xf0a9c4[_0x29f15c(0x127)][_0x29f15c(0x145)]+'\x20\x20'+a94_0xc199d7[_0x29f15c(0x13c)]('('+_0xf0a9c4[_0x29f15c(0x127)][_0x29f15c(0x147)]+')'));const _0x3cc760=_0xf0a9c4[_0x29f15c(0x148)][_0x29f15c(0x145)]?a94_0xc199d7[_0x29f15c(0x12b)]('(set,\x20length='+_0xf0a9c4[_0x29f15c(0x148)][_0x29f15c(0x145)][_0x29f15c(0x13e)]+')'):a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x15a));console[_0x29f15c(0x162)]('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x3cc760+'\x20\x20'+a94_0xc199d7['gray']('('+_0xf0a9c4[_0x29f15c(0x148)]['source']+')'));const _0x3a0a14=_0xf0a9c4[_0x29f15c(0x15d)][_0x29f15c(0x145)]?a94_0xc199d7['green'](_0x29f15c(0x11c)+_0xf0a9c4[_0x29f15c(0x15d)][_0x29f15c(0x145)][_0x29f15c(0x13e)]+')'):a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x15a));console['log'](_0x29f15c(0x11b)+_0x3a0a14+'\x20\x20'+a94_0xc199d7['gray']('('+_0xf0a9c4[_0x29f15c(0x15d)][_0x29f15c(0x147)]+')'));}}console[_0x29f15c(0x162)](),console[_0x29f15c(0x162)](a94_0xc199d7[_0x29f15c(0x10e)]('\x20\x20API\x20Endpoints')),console[_0x29f15c(0x162)](a94_0xc199d7[_0x29f15c(0x13c)]('\x20\x20─'[_0x29f15c(0x135)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x29f15c(0x162)](_0x29f15c(0x149)+getUserDomain()),console['log'](_0x29f15c(0x153)+getRuntimeDomain()),console['log'](),console[_0x29f15c(0x162)](a94_0xc199d7['bold'](_0x29f15c(0x11f))),console[_0x29f15c(0x162)](a94_0xc199d7[_0x29f15c(0x13c)](_0x29f15c(0x132)['repeat'](0x1e)));if(_0x3c1bfb){const _0x1be000=await getIsSessionValid();console[_0x29f15c(0x162)](_0x29f15c(0x161)+(_0x1be000?a94_0xc199d7['green'](_0x29f15c(0x14e)):a94_0xc199d7[_0x29f15c(0x16a)](_0x29f15c(0x163))));}else console[_0x29f15c(0x162)](_0x29f15c(0x161)+a94_0xc199d7[_0x29f15c(0x16a)](_0x29f15c(0x125)));return console[_0x29f15c(0x162)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a94_0x17e1a4(0x108),'description':a94_0x17e1a4(0x13a),'risk':a94_0x17e1a4(0x157),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
function a94_0x5110(_0x4dcbb0,_0xdac4e6){_0x4dcbb0=_0x4dcbb0-0x11b;const _0x341933=a94_0x3419();let _0x5110af=_0x341933[_0x4dcbb0];return _0x5110af;}const a94_0xeead81=a94_0x5110;(function(_0x4a84ea,_0x28f096){const _0x498eb8=a94_0x5110,_0x4de6cb=_0x4a84ea();while(!![]){try{const _0x1abe87=-parseInt(_0x498eb8(0x17d))/0x1*(parseInt(_0x498eb8(0x172))/0x2)+-parseInt(_0x498eb8(0x11e))/0x3*(-parseInt(_0x498eb8(0x176))/0x4)+-parseInt(_0x498eb8(0x151))/0x5*(parseInt(_0x498eb8(0x137))/0x6)+parseInt(_0x498eb8(0x132))/0x7+-parseInt(_0x498eb8(0x148))/0x8*(-parseInt(_0x498eb8(0x143))/0x9)+-parseInt(_0x498eb8(0x125))/0xa+parseInt(_0x498eb8(0x135))/0xb;if(_0x1abe87===_0x28f096)break;else _0x4de6cb['push'](_0x4de6cb['shift']());}catch(_0x5718ad){_0x4de6cb['push'](_0x4de6cb['shift']());}}}(a94_0x3419,0xcc0e3));import a94_0x36c2ca 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{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x55d18c){const _0x5eafcb=a94_0x5110,_0x46df12=GIT_COMMIT!==_0x5eafcb(0x134)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,_0x423eb4=buildConfigFromFlags({}),_0x3f179f=getCookie();console['log'](),console[_0x5eafcb(0x156)](a94_0x36c2ca[_0x5eafcb(0x160)](CLI_BIN_NAME+_0x5eafcb(0x15d))),console[_0x5eafcb(0x156)](a94_0x36c2ca[_0x5eafcb(0x128)]('─'[_0x5eafcb(0x11d)](0x32))),console[_0x5eafcb(0x156)](_0x5eafcb(0x159)+_0x46df12),console[_0x5eafcb(0x156)](_0x5eafcb(0x16c)+process[_0x5eafcb(0x147)]),console['log'](_0x5eafcb(0x158)+process['platform']+'\x20'+process['arch']);const _0x572b14=inspectBuiltinSkill();console[_0x5eafcb(0x156)](),console[_0x5eafcb(0x156)](a94_0x36c2ca['bold'](_0x5eafcb(0x165))),console[_0x5eafcb(0x156)](a94_0x36c2ca[_0x5eafcb(0x128)](_0x5eafcb(0x16a)[_0x5eafcb(0x11d)](0x1e)));const _0x510186=_0x572b14[_0x5eafcb(0x17c)]===_0x5eafcb(0x14d)?a94_0x36c2ca[_0x5eafcb(0x15f)]('✓\x20'+_0x572b14[_0x5eafcb(0x17c)]):a94_0x36c2ca[_0x5eafcb(0x164)]('✗\x20'+_0x572b14['state']);console[_0x5eafcb(0x156)](_0x5eafcb(0x12d)+_0x510186),console['log'](_0x5eafcb(0x162)+_0x572b14['packageVersion']),console[_0x5eafcb(0x156)]('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x572b14[_0x5eafcb(0x124)]||a94_0x36c2ca[_0x5eafcb(0x128)]('(unknown)'))),console[_0x5eafcb(0x156)](_0x5eafcb(0x11b)+(_0x572b14['installedPath']||a94_0x36c2ca['gray'](_0x5eafcb(0x17a))));if(_0x572b14['reason'])console[_0x5eafcb(0x156)](_0x5eafcb(0x17e)+_0x572b14['reason']);_0x572b14[_0x5eafcb(0x17c)]!==_0x5eafcb(0x14d)&&console[_0x5eafcb(0x156)](_0x5eafcb(0x121)+_0x572b14[_0x5eafcb(0x131)]);console[_0x5eafcb(0x156)](),console[_0x5eafcb(0x156)](a94_0x36c2ca['bold'](_0x5eafcb(0x13b))),console[_0x5eafcb(0x156)](a94_0x36c2ca['gray']('\x20\x20─'[_0x5eafcb(0x11d)](0x1e)));const _0x1e0f27=getGlobalConfigPath(),_0x3314ef=getProjectConfigPath();console[_0x5eafcb(0x156)](_0x5eafcb(0x12b)+(_0x1e0f27||a94_0x36c2ca[_0x5eafcb(0x128)]('(not\x20found)'))),console['log'](_0x5eafcb(0x126)+(_0x3314ef||a94_0x36c2ca[_0x5eafcb(0x128)](_0x5eafcb(0x17a)))),console[_0x5eafcb(0x156)](),console['log'](a94_0x36c2ca[_0x5eafcb(0x160)](_0x5eafcb(0x11c))),console[_0x5eafcb(0x156)](a94_0x36c2ca[_0x5eafcb(0x128)]('\x20\x20─'['repeat'](0x1e)));const _0x1184d5=(_0x44c6eb,_0x30fbbf)=>{const _0x40a860=_0x5eafcb;if(!_0x30fbbf){console[_0x40a860(0x156)]('\x20\x20'+_0x44c6eb[_0x40a860(0x142)](0x11)+'\x20'+a94_0x36c2ca[_0x40a860(0x128)]('(no\x20file)'));return;}const _0x196050=inspectCliConfigJsonFile(_0x30fbbf);if(_0x196050[_0x40a860(0x14a)]==='ok')console[_0x40a860(0x156)]('\x20\x20'+_0x44c6eb[_0x40a860(0x142)](0x11)+'\x20'+a94_0x36c2ca['green']('✓\x20Valid\x20JSON'));else{if(_0x196050[_0x40a860(0x14a)]===_0x40a860(0x16b))console['log']('\x20\x20'+_0x44c6eb['padEnd'](0x11)+'\x20'+a94_0x36c2ca[_0x40a860(0x152)](_0x40a860(0x157)));else _0x196050[_0x40a860(0x14a)]==='missing'?console[_0x40a860(0x156)]('\x20\x20'+_0x44c6eb[_0x40a860(0x142)](0x11)+'\x20'+a94_0x36c2ca[_0x40a860(0x128)]('(missing)')):(console['log']('\x20\x20'+_0x44c6eb[_0x40a860(0x142)](0x11)+'\x20'+a94_0x36c2ca[_0x40a860(0x164)](_0x40a860(0x144))),console[_0x40a860(0x156)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a94_0x36c2ca[_0x40a860(0x164)](_0x196050[_0x40a860(0x139)])));}};_0x1184d5(_0x5eafcb(0x146),_0x1e0f27),_0x1184d5(_0x5eafcb(0x178),_0x3314ef),console['log'](),console[_0x5eafcb(0x156)](a94_0x36c2ca[_0x5eafcb(0x160)](_0x5eafcb(0x150))),console[_0x5eafcb(0x156)](a94_0x36c2ca[_0x5eafcb(0x128)](_0x5eafcb(0x16a)[_0x5eafcb(0x11d)](0x1e))),console[_0x5eafcb(0x156)](_0x5eafcb(0x16d)+(_0x423eb4[_0x5eafcb(0x175)]||a94_0x36c2ca[_0x5eafcb(0x164)](_0x5eafcb(0x12e)))),console['log'](_0x5eafcb(0x163)+_0x423eb4[_0x5eafcb(0x16f)]),console[_0x5eafcb(0x156)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x423eb4[_0x5eafcb(0x13f)]),console[_0x5eafcb(0x156)](_0x5eafcb(0x166)+_0x423eb4[_0x5eafcb(0x12f)]),console['log']('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x423eb4[_0x5eafcb(0x154)]||a94_0x36c2ca['gray'](_0x5eafcb(0x13e)))),console[_0x5eafcb(0x156)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x423eb4[_0x5eafcb(0x120)]||a94_0x36c2ca[_0x5eafcb(0x128)](_0x5eafcb(0x13e)))),console[_0x5eafcb(0x156)](_0x5eafcb(0x167)+(_0x423eb4['explicitAppName']||a94_0x36c2ca[_0x5eafcb(0x128)](_0x5eafcb(0x13e)))),console['log'](_0x5eafcb(0x14f)+(_0x423eb4[_0x5eafcb(0x153)]||a94_0x36c2ca[_0x5eafcb(0x128)](_0x5eafcb(0x161)+DEFAULT_CONFIG_VALUES[_0x5eafcb(0x153)]+')'))),console[_0x5eafcb(0x156)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x423eb4[_0x5eafcb(0x133)]??a94_0x36c2ca[_0x5eafcb(0x128)](_0x5eafcb(0x12a)))),console['log'](_0x5eafcb(0x129)+_0x423eb4[_0x5eafcb(0x123)]),console[_0x5eafcb(0x156)](_0x5eafcb(0x179)+_0x423eb4[_0x5eafcb(0x13d)]),console[_0x5eafcb(0x156)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x423eb4[_0x5eafcb(0x138)]?a94_0x36c2ca[_0x5eafcb(0x15f)](_0x5eafcb(0x15a)+_0x423eb4['cookie'][_0x5eafcb(0x14e)]+')'):_0x3f179f?a94_0x36c2ca[_0x5eafcb(0x15f)](_0x5eafcb(0x149)+_0x3f179f[_0x5eafcb(0x14e)]+')'):a94_0x36c2ca['gray'](_0x5eafcb(0x13e))));const _0x3812d3=Object[_0x5eafcb(0x12c)](_0x423eb4['apps']);if(_0x3812d3[_0x5eafcb(0x14e)]>0x0){console['log'](),console[_0x5eafcb(0x156)](a94_0x36c2ca['bold'](_0x5eafcb(0x140))),console['log'](a94_0x36c2ca[_0x5eafcb(0x128)](_0x5eafcb(0x16a)[_0x5eafcb(0x11d)](0x1e)));for(const _0x15c7fb of _0x3812d3){const _0x1899d2=_0x423eb4[_0x5eafcb(0x173)][_0x15c7fb],_0xa8e7f=_0x15c7fb===_0x423eb4['defaultApp'],_0x55b84d=_0x15c7fb===_0x423eb4[_0x5eafcb(0x120)],_0xcc394c=_0x55b84d?a94_0x36c2ca[_0x5eafcb(0x15f)](_0x5eafcb(0x15c)):'',_0x5b27e8=_0xa8e7f?_0x5eafcb(0x141):'';console[_0x5eafcb(0x156)]('\x20\x20'+_0x15c7fb+_0x5b27e8+_0xcc394c),console[_0x5eafcb(0x156)](_0x5eafcb(0x168)+_0x1899d2['appcode']);const _0x3be42c=buildAppDoctorFields(_0x1899d2,{'env':_0x423eb4['env'],'apiDir':_0x423eb4[_0x5eafcb(0x13a)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x5eafcb(0x12f)],'cookie':_0x423eb4[_0x5eafcb(0x138)]||_0x3f179f||undefined,'accessKey':_0x423eb4['accessKey']});console['log'](_0x5eafcb(0x174)+_0x3be42c[_0x5eafcb(0x16f)][_0x5eafcb(0x15e)]+'\x20\x20'+a94_0x36c2ca['gray']('('+_0x3be42c['env'][_0x5eafcb(0x14c)]+')')),console[_0x5eafcb(0x156)](_0x5eafcb(0x130)+_0x3be42c[_0x5eafcb(0x12f)][_0x5eafcb(0x15e)]+'\x20\x20'+a94_0x36c2ca[_0x5eafcb(0x128)]('('+_0x3be42c[_0x5eafcb(0x12f)]['source']+')'));const _0x1d591f=_0x3be42c['cookie']['value']?a94_0x36c2ca[_0x5eafcb(0x15f)](_0x5eafcb(0x15a)+_0x3be42c['cookie'][_0x5eafcb(0x15e)][_0x5eafcb(0x14e)]+')'):a94_0x36c2ca[_0x5eafcb(0x128)](_0x5eafcb(0x13e));console[_0x5eafcb(0x156)](_0x5eafcb(0x122)+_0x1d591f+'\x20\x20'+a94_0x36c2ca[_0x5eafcb(0x128)]('('+_0x3be42c[_0x5eafcb(0x138)][_0x5eafcb(0x14c)]+')'));const _0x30a7e3=_0x3be42c[_0x5eafcb(0x11f)][_0x5eafcb(0x15e)]?a94_0x36c2ca[_0x5eafcb(0x15f)](_0x5eafcb(0x15a)+_0x3be42c[_0x5eafcb(0x11f)][_0x5eafcb(0x15e)]['length']+')'):a94_0x36c2ca['gray'](_0x5eafcb(0x13e));console[_0x5eafcb(0x156)](_0x5eafcb(0x177)+_0x30a7e3+'\x20\x20'+a94_0x36c2ca['gray']('('+_0x3be42c[_0x5eafcb(0x11f)][_0x5eafcb(0x14c)]+')'));}}console[_0x5eafcb(0x156)](),console[_0x5eafcb(0x156)](a94_0x36c2ca[_0x5eafcb(0x160)](_0x5eafcb(0x127))),console[_0x5eafcb(0x156)](a94_0x36c2ca['gray'](_0x5eafcb(0x16a)[_0x5eafcb(0x11d)](0x1e))),console[_0x5eafcb(0x156)](_0x5eafcb(0x155)+getApiDomain()),console[_0x5eafcb(0x156)](_0x5eafcb(0x16e)+getUserDomain()),console[_0x5eafcb(0x156)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x5eafcb(0x156)](),console[_0x5eafcb(0x156)](a94_0x36c2ca[_0x5eafcb(0x160)](_0x5eafcb(0x145))),console[_0x5eafcb(0x156)](a94_0x36c2ca[_0x5eafcb(0x128)](_0x5eafcb(0x16a)[_0x5eafcb(0x11d)](0x1e)));if(_0x3f179f){const _0x524a38=await getIsSessionValid();console[_0x5eafcb(0x156)](_0x5eafcb(0x13c)+(_0x524a38?a94_0x36c2ca[_0x5eafcb(0x15f)](_0x5eafcb(0x169)):a94_0x36c2ca[_0x5eafcb(0x164)](_0x5eafcb(0x17b))));}else console[_0x5eafcb(0x156)](_0x5eafcb(0x13c)+a94_0x36c2ca['red'](_0x5eafcb(0x171)));return console[_0x5eafcb(0x156)](),{'ok':!![]};}function a94_0x3419(){const _0x1adcd4=['raw','\x20\x20Config\x20Files','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','verbose','(none)','locale','\x20\x20Apps','\x20(default)','padEnd','21402KwThLF','✗\x20Invalid\x20JSON','\x20\x20Auth','Global','version','2984JfCiej','(set\x20via\x20file,\x20length=','status','read','source','current','length','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','10IxHPQB','yellow','format','defaultApp','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','log','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(set,\x20length=','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20←\x20current','\x20doctor','value','green','bold','(default:\x20','\x20\x20Package\x20Version:\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','red','\x20\x20Built-in\x20Skill','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20explicitAppName:\x20','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','✓\x20Valid','\x20\x20─','empty','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','env','check','✗\x20Not\x20logged\x20in','3120442EMaFNT','apps','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','appCode','224012RYyKjn','\x20\x20\x20\x20accessKey:\x20\x20','Project','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','✗\x20Expired','state','1DIpbRo','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Installed\x20Path:\x20\x20','\x20\x20Config\x20JSON','repeat','81BOROEp','accessKey','currentApp','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','riskLevel','skillVersion','8042680MMzlsE','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','gray','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','(default)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','keys','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20set)','apiDir','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','repairCommand','37751YYnEUT','pageSize','unknown','17341126SGNCpo','doctor','2341902ZhPtyY','cookie','message'];a94_0x3419=function(){return _0x1adcd4;};return a94_0x3419();}export const doctorDefinition={'service':a94_0xeead81(0x136),'command':a94_0xeead81(0x170),'description':a94_0xeead81(0x15b),'risk':a94_0xeead81(0x14b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a95_0x5dcf8d=a95_0x12aa;(function(_0x1940b6,_0x425f30){const _0x377cf5=a95_0x12aa,_0x50632c=_0x1940b6();while(!![]){try{const _0x436d56=-parseInt(_0x377cf5(0x174))/0x1*(-parseInt(_0x377cf5(0x167))/0x2)+parseInt(_0x377cf5(0x16e))/0x3+parseInt(_0x377cf5(0x164))/0x4*(parseInt(_0x377cf5(0x17a))/0x5)+-parseInt(_0x377cf5(0x161))/0x6+-parseInt(_0x377cf5(0x17b))/0x7*(-parseInt(_0x377cf5(0x177))/0x8)+parseInt(_0x377cf5(0x175))/0x9+-parseInt(_0x377cf5(0x16a))/0xa*(parseInt(_0x377cf5(0x15e))/0xb);if(_0x436d56===_0x425f30)break;else _0x50632c['push'](_0x50632c['shift']());}catch(_0x214df2){_0x50632c['push'](_0x50632c['shift']());}}}(a95_0x549b,0x187f0));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a95_0x5dcf8d(0x170),'type':a95_0x5dcf8d(0x178),'required':!![],'description':a95_0x5dcf8d(0x165)},FILEPATH_FLAG={'name':'filepath','type':a95_0x5dcf8d(0x178),'required':!![],'description':a95_0x5dcf8d(0x16c)},DOWNLOAD_FLAG={'name':a95_0x5dcf8d(0x16f),'type':a95_0x5dcf8d(0x159),'description':a95_0x5dcf8d(0x157)},LONG_TERM_FLAG={'name':a95_0x5dcf8d(0x15b),'type':a95_0x5dcf8d(0x159),'description':a95_0x5dcf8d(0x166)};function requireFilePath(_0x2ea9ee){const _0x4a775c=a95_0x5dcf8d,_0x38bcfc=_0x2ea9ee[_0x4a775c(0x172)]();if(!_0x38bcfc)throw CliErrors[_0x4a775c(0x168)](_0x4a775c(0x17c));return _0x38bcfc;}const fileUpload={'service':a95_0x5dcf8d(0x170),'command':'upload','description':a95_0x5dcf8d(0x176),'risk':a95_0x5dcf8d(0x15d),'flags':[FILE_FLAG],async 'dryRun'(_0x4616aa){const _0x3d9cf9=a95_0x5dcf8d,_0x329768=requireDevelopmentUploadFile(_0x4616aa[_0x3d9cf9(0x179)](_0x3d9cf9(0x170)),_0x3d9cf9(0x171));return{'method':_0x3d9cf9(0x173),'url':_0x3d9cf9(0x163),'body':{'appCode':_0x4616aa[_0x3d9cf9(0x16d)],'multipart':{'file':_0x329768}},'description':_0x3d9cf9(0x15f)+_0x329768[_0x3d9cf9(0x158)]+_0x3d9cf9(0x160)+_0x4616aa['appCode']};},async 'execute'(_0x2c2ea0){const _0x3d9e98=a95_0x5dcf8d,_0x5bb5a7=requireDevelopmentUploadFile(_0x2c2ea0[_0x3d9e98(0x179)](_0x3d9e98(0x170)),_0x3d9e98(0x171)),_0x199795=await uploadDevelopmentFile(_0x2c2ea0[_0x3d9e98(0x16d)],_0x5bb5a7[_0x3d9e98(0x158)]);return{'ok':!![],'data':_0x199795,'message':_0x199795[_0x3d9e98(0x15c)]?_0x3d9e98(0x16b)+_0x199795['filePath']+_0x3d9e98(0x15a):_0x3d9e98(0x169)};}},fileQueryUrl={'service':a95_0x5dcf8d(0x170),'command':'query-url','description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','risk':a95_0x5dcf8d(0x15d),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x42e8cd){const _0x2e764d=a95_0x5dcf8d,_0x448666=requireFilePath(_0x42e8cd[_0x2e764d(0x179)]('filepath')),_0x57a56a=await queryDevelopmentFileUrl(_0x448666,{'download':_0x42e8cd[_0x2e764d(0x162)]('download'),'longTerm':_0x42e8cd['bool'](_0x2e764d(0x15b))});return{'ok':!![],'data':_0x57a56a};}};function a95_0x12aa(_0x12ad8e,_0x2872df){_0x12ad8e=_0x12ad8e-0x157;const _0x549b1f=a95_0x549b();let _0x12aa38=_0x549b1f[_0x12ad8e];return _0x12aa38;}export const fileDefinitions=[fileUpload,fileQueryUrl];function a95_0x549b(){const _0x227ee3=['appCode','167403EHqKZQ','download','file','File','trim','POST','12653XFGnSx','299835rdSpvc','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','200ghdEdn','string','str','211785ofCBmo','43792YmJZIW','filePath\x20is\x20required.','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','path','boolean','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','long-term','filePath','read','209zYTxFJ','Preview:\x20upload\x20','\x20to\x20development\x20app\x20','601788jcvYLq','bool','/smartapi/common/uploadFile','4ikKApO','Path\x20to\x20the\x20local\x20file\x20to\x20upload','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','20WJqorK','validation','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','112510qtOewE','Uploaded\x20file:\x20','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'];a95_0x549b=function(){return _0x227ee3;};return a95_0x549b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a96_0x4695(){const _0x400a09=['init','1463161KTkwvs','\x20\x20Apps:\x20','608666PZVzEr','cwd','appcode','log','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','Use\x20`','boolean','5DkraPz','9IKHngD','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','2292096kmlOOg','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','project','\x20\x20Config:\x20','15VJdxPF','\x20\x20Default:\x20','yes','143342IZJREN','flagMissing','map','\x20config','global','bool','message','1665932HYYoYz','str','nonInteractive','env','write','production','1060818gabtjt','run','valid','join','string','\x20\x20Env:\x20','24iklQfY','5263630MagZir','some','toLocaleString','validation'];a96_0x4695=function(){return _0x400a09;};return a96_0x4695();}const a96_0x3128c7=a96_0x53f8;function a96_0x53f8(_0x225f8e,_0x4d3064){_0x225f8e=_0x225f8e-0x1ec;const _0x469573=a96_0x4695();let _0x53f81f=_0x469573[_0x225f8e];return _0x53f81f;}(function(_0x2ea62b,_0x374505){const _0x23a2a9=a96_0x53f8,_0x13951d=_0x2ea62b();while(!![]){try{const _0x368096=-parseInt(_0x23a2a9(0x200))/0x1+parseInt(_0x23a2a9(0x212))/0x2*(-parseInt(_0x23a2a9(0x20f))/0x3)+-parseInt(_0x23a2a9(0x1ec))/0x4*(-parseInt(_0x23a2a9(0x207))/0x5)+-parseInt(_0x23a2a9(0x20a))/0x6+parseInt(_0x23a2a9(0x1fe))/0x7*(parseInt(_0x23a2a9(0x1f8))/0x8)+parseInt(_0x23a2a9(0x208))/0x9*(parseInt(_0x23a2a9(0x1f9))/0xa)+parseInt(_0x23a2a9(0x1f2))/0xb;if(_0x368096===_0x374505)break;else _0x13951d['push'](_0x13951d['shift']());}catch(_0x71f9fe){_0x13951d['push'](_0x13951d['shift']());}}}(a96_0x4695,0x4d784));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x59b3c0){return{'appCode':_0x59b3c0,'appName':_0x59b3c0};}function writeInitConfig(_0x22c298,_0x507ff2,_0x3b8d0d){const _0x1b0e9e=a96_0x53f8,_0x1adcbb=resolveWriteConfigPath(_0x22c298),_0x93e1f9=buildCanonicalProjectConfig({},{'appCodes':_0x507ff2['map'](_0x3e300a=>_0x3e300a['appCode']),'env':_0x3b8d0d,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x1b0e9e(0x1fb)]()}});writeConfigFile(_0x1adcbb,_0x93e1f9);const _0x288c45=_0x22c298==='global'?_0x1b0e9e(0x216):_0x1b0e9e(0x20d);console[_0x1b0e9e(0x203)]('\x0a✓\x20Successfully\x20initialized\x20'+_0x288c45+_0x1b0e9e(0x215)),console['log'](_0x1b0e9e(0x1ff)+_0x507ff2[_0x1b0e9e(0x214)](_0x15bdb1=>_0x15bdb1['appCode'])[_0x1b0e9e(0x1f5)](',\x20')),console['log'](_0x1b0e9e(0x210)+_0x93e1f9['defaultApp']),console['log'](_0x1b0e9e(0x1f7)+_0x93e1f9[_0x1b0e9e(0x1ef)]),console[_0x1b0e9e(0x203)](_0x1b0e9e(0x20e)+_0x1adcbb);}async function runSmartInit(_0x513b89){const _0x1a63ba=a96_0x53f8,_0x428dfa=process[_0x1a63ba(0x201)](),_0x2a45b5=_0x513b89['bool']('global')?_0x1a63ba(0x216):'project',_0x21a07b=_0x513b89['str']('env')||_0x1a63ba(0x1f1),_0x14a470=_0x513b89[_0x1a63ba(0x1ed)](_0x1a63ba(0x202))||undefined;if(_0x2a45b5===_0x1a63ba(0x20d)){const _0x236145=existsSync(resolve(_0x428dfa,NEW_CONFIG_NAME)),_0x5df12d=LEGACY_CONFIG_NAMES[_0x1a63ba(0x1fa)](_0x417faf=>existsSync(resolve(_0x428dfa,_0x417faf)));if(_0x5df12d&&!_0x236145)return console[_0x1a63ba(0x203)]('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0x513b89[_0x1a63ba(0x1ee)],{'yes':_0x513b89[_0x1a63ba(0x217)](_0x1a63ba(0x211))});if(_0x236145)throw CliErrors[_0x1a63ba(0x1fc)](_0x1a63ba(0x20c),_0x1a63ba(0x205)+CLI_BIN_NAME+_0x1a63ba(0x204));}if(_0x14a470){const _0x2bc059=validateAppcode(_0x14a470);if(!_0x2bc059[_0x1a63ba(0x1f4)])throw CliErrors[_0x1a63ba(0x1fc)](_0x2bc059[_0x1a63ba(0x218)]);writeInitConfig(_0x2a45b5,[syntheticApp(_0x14a470)],_0x21a07b);return;}if(_0x513b89[_0x1a63ba(0x1ee)])throw CliErrors[_0x1a63ba(0x213)]('appcode','Usage:\x20'+CLI_BIN_NAME+_0x1a63ba(0x209));const _0x5670bf=getCookie(),_0x2cc6f1=await selectMultipleApps(_0x5670bf),_0x4da9ac=_0x2cc6f1==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x2cc6f1;writeInitConfig(_0x2a45b5,_0x4da9ac,_0x21a07b);}const initFlags=[{'name':a96_0x3128c7(0x216),'type':a96_0x3128c7(0x206),'description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':'env','type':a96_0x3128c7(0x1f6),'description':'Target\x20environment','default':a96_0x3128c7(0x1f1),'enum':[...RABETBASE_ENV_VALUES]},{'name':a96_0x3128c7(0x202),'type':a96_0x3128c7(0x1f6),'description':'App\x20code\x20to\x20initialize\x20with'},{'name':'yes','type':'boolean','description':'Auto-confirm\x20prompts','default':![]}];export const initDefinitions=[{'service':a96_0x3128c7(0x1fd),'command':a96_0x3128c7(0x1f3),'description':a96_0x3128c7(0x20b),'risk':a96_0x3128c7(0x1f0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x4688b9){return await runSmartInit(_0x4688b9),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a97_0x1da8(){const _0x3a58ca=['64854XpAfJR','21lsAqTg','27864ItdyGB','91DAoJDP','130yuJmbI','6904596ocQfge','2006487tpwRaO','414429THGeNG','1020560REFxZA','763784CxzVSK'];a97_0x1da8=function(){return _0x3a58ca;};return a97_0x1da8();}(function(_0x5951b8,_0x51d38e){const _0x2234b1=a97_0x340d,_0xb72073=_0x5951b8();while(!![]){try{const _0x4cc2b3=parseInt(_0x2234b1(0x117))/0x1*(-parseInt(_0x2234b1(0x120))/0x2)+-parseInt(_0x2234b1(0x11d))/0x3+-parseInt(_0x2234b1(0x11f))/0x4+parseInt(_0x2234b1(0x11e))/0x5+-parseInt(_0x2234b1(0x11b))/0x6+-parseInt(_0x2234b1(0x119))/0x7*(-parseInt(_0x2234b1(0x118))/0x8)+-parseInt(_0x2234b1(0x11c))/0x9*(-parseInt(_0x2234b1(0x11a))/0xa);if(_0x4cc2b3===_0x51d38e)break;else _0xb72073['push'](_0xb72073['shift']());}catch(_0x2d1873){_0xb72073['push'](_0xb72073['shift']());}}}(a97_0x1da8,0xf0ecc));import{issueReport}from'../../commands/issue/report.js';function a97_0x340d(_0x4a62c9,_0x49ee10){_0x4a62c9=_0x4a62c9-0x117;const _0x1da885=a97_0x1da8();let _0x340d64=_0x1da885[_0x4a62c9];return _0x340d64;}export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x2f61c5=a98_0xb24b;(function(_0x5d0efe,_0x463eca){const _0xccba6e=a98_0xb24b,_0x2c823e=_0x5d0efe();while(!![]){try{const _0x48d6d8=parseInt(_0xccba6e(0x1e7))/0x1+parseInt(_0xccba6e(0x1e2))/0x2+-parseInt(_0xccba6e(0x1f0))/0x3+parseInt(_0xccba6e(0x1f9))/0x4*(-parseInt(_0xccba6e(0x1f1))/0x5)+parseInt(_0xccba6e(0x1fc))/0x6+parseInt(_0xccba6e(0x1e8))/0x7+-parseInt(_0xccba6e(0x1ec))/0x8*(parseInt(_0xccba6e(0x1ed))/0x9);if(_0x48d6d8===_0x463eca)break;else _0x2c823e['push'](_0x2c823e['shift']());}catch(_0x444661){_0x2c823e['push'](_0x2c823e['shift']());}}}(a98_0x5977,0x81a1e));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a98_0x2f61c5(0x1eb);function a98_0x5977(){const _0x4c0256=['\x20\x20Set\x20','config_missing','4793622OsGJXG','command','join','\x20bug?\x20Help\x20us\x20fix\x20it:','stderr','service','not_in_project','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','flag_missing','16034nTvsSY','length','\x22\x20\x5c','replace','message','156160fAmzDd','5473055aPGzbY','network_error','validation_error','RABETBASE_DISABLE_ISSUE_NUDGE','98424bEOhSf','27RlYLYi','slice','report','2604066WDGEnb','33595WkepLh','Hit\x20a\x20','issue','\x20issue\x20report\x20\x5c','write','trim','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x20\x20\x20\x20--title\x20\x22','184KVRVGH'];a98_0x5977=function(){return _0x4c0256;};return a98_0x5977();}const NUDGE_SUPPRESSED_CODES=new Set(['cancelled','auth_required',a98_0x2f61c5(0x1fb),a98_0x2f61c5(0x1df),'unknown_command',a98_0x2f61c5(0x1e1),a98_0x2f61c5(0x1ea),a98_0x2f61c5(0x1e9)]),defaultWriter=_0xcffeef=>{const _0x3f2816=a98_0x2f61c5;process[_0x3f2816(0x1dd)][_0x3f2816(0x1f5)](_0xcffeef);};export function shouldNudgeForError(_0x54a1fd,_0x1ae553){const _0x2b04b8=a98_0x2f61c5;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x1ae553[_0x2b04b8(0x1de)]===_0x2b04b8(0x1f3)&&_0x1ae553[_0x2b04b8(0x1da)]===_0x2b04b8(0x1ef))return![];if(_0x54a1fd instanceof CliError)return!NUDGE_SUPPRESSED_CODES['has'](_0x54a1fd['code']);return!![];}function a98_0xb24b(_0x1e789c,_0x14faa4){_0x1e789c=_0x1e789c-0x1da;const _0x5977d0=a98_0x5977();let _0xb24b7e=_0x5977d0[_0x1e789c];return _0xb24b7e;}export function printIssueReportNudgeForError(_0x454021,_0x137966,_0x2d7dfd=defaultWriter){if(!shouldNudgeForError(_0x454021,_0x137966))return;const _0x304e7d=buildSuggestedTitle(_0x454021,_0x137966);_0x2d7dfd(formatNudge(_0x304e7d));}function buildSuggestedTitle(_0x24d3aa,_0x19df2e){const _0x5eb252=a98_0x2f61c5,_0x3c752d=_0x24d3aa instanceof Error?_0x24d3aa[_0x5eb252(0x1e6)]:String(_0x24d3aa),_0x14031e=_0x3c752d[_0x5eb252(0x1e5)](/[\r\n]+/g,'\x20')[_0x5eb252(0x1e5)](/\s+/g,'\x20')[_0x5eb252(0x1f6)]()[_0x5eb252(0x1ee)](0x0,0x78)[_0x5eb252(0x1e5)](/"/g,'\x5c\x22'),_0x28691a=CLI_BIN_NAME+'\x20'+_0x19df2e[_0x5eb252(0x1de)]+'\x20'+_0x19df2e[_0x5eb252(0x1da)];return _0x14031e[_0x5eb252(0x1e3)]>0x0?_0x28691a+':\x20'+_0x14031e:_0x28691a;}function formatNudge(_0x22a899){const _0x3abcc0=a98_0x2f61c5;return['',_0x3abcc0(0x1f2)+CLI_BIN_NAME+_0x3abcc0(0x1dc),'\x20\x20'+CLI_BIN_NAME+_0x3abcc0(0x1f4),_0x3abcc0(0x1f8)+_0x22a899+_0x3abcc0(0x1e4),_0x3abcc0(0x1e0),_0x3abcc0(0x1f7),_0x3abcc0(0x1fa)+NUDGE_OPT_OUT_ENV+'=1\x20to\x20silence\x20this\x20hint.',''][_0x3abcc0(0x1db)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x440105=a99_0x5c31;(function(_0xb37be0,_0x4ae3b2){const _0x228c0b=a99_0x5c31,_0x2c0b6f=_0xb37be0();while(!![]){try{const _0x112a21=parseInt(_0x228c0b(0x135))/0x1+parseInt(_0x228c0b(0x139))/0x2+-parseInt(_0x228c0b(0x138))/0x3*(parseInt(_0x228c0b(0x12d))/0x4)+parseInt(_0x228c0b(0x132))/0x5+-parseInt(_0x228c0b(0x134))/0x6*(parseInt(_0x228c0b(0x141))/0x7)+parseInt(_0x228c0b(0x15e))/0x8*(-parseInt(_0x228c0b(0x148))/0x9)+-parseInt(_0x228c0b(0x130))/0xa*(-parseInt(_0x228c0b(0x11f))/0xb);if(_0x112a21===_0x4ae3b2)break;else _0x2c0b6f['push'](_0x2c0b6f['shift']());}catch(_0x489378){_0x2c0b6f['push'](_0x2c0b6f['shift']());}}}(a99_0x3ce8,0x8aa08));function a99_0x5c31(_0x1f56d1,_0x3cea83){_0x1f56d1=_0x1f56d1-0x11f;const _0x3ce875=a99_0x3ce8();let _0x5c3141=_0x3ce875[_0x1f56d1];return _0x5c3141;}import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';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';function a99_0x3ce8(){const _0x51cf18=['issue.title','validation','228VCGaXi','866824kuwDQE','message','\x20secret(s):\x20','issue.description_original_bytes','cwd','Platform\x20issue\x20reported','report','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','56HIjxgT','filter','otel://','join','redactions:\x20','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','sanitize','207tnVYvq','utf8','truncated:\x20original\x20','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','length','\x20bytes','description-file','string','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','truncated','originalBytes','issue.description_truncated','push','issue','title','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','file','issue.description','trim','descriptionFilePath','str','335208PGvUyp','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','11EBLDjB','descriptionSource:\x20','descriptionSource','POST','redacted\x20','issue.description_redaction_kinds','redactionKinds','description','compress','descriptionFile:\x20','Issue\x20description\x20file\x20is\x20empty:\x20','apiError','Failed\x20to\x20report\x20platform\x20issue:\x20','inline','28144WXJCof','One-line\x20issue\x20summary','redactionCount','18954860EEVBci','issue.description_redactions','1830835MWvhET','File\x20not\x20found:\x20','478098gdDCRO','8674KnhZHO'];a99_0x3ce8=function(){return _0x51cf18;};return a99_0x3ce8();}const DESCRIPTION_FILE_FLAG=a99_0x440105(0x14e);export const issueReport={'service':a99_0x440105(0x155),'command':a99_0x440105(0x13f),'description':a99_0x440105(0x150),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a99_0x440105(0x127),'flags':[{'name':a99_0x440105(0x156),'type':a99_0x440105(0x14f),'required':!![],'description':a99_0x440105(0x12e)},{'name':a99_0x440105(0x126),'type':a99_0x440105(0x14f),'description':a99_0x440105(0x14b)},{'name':DESCRIPTION_FILE_FLAG,'type':a99_0x440105(0x14f),'description':a99_0x440105(0x157)}],async 'validate'(_0x1ccc27){const _0x3f98f9=a99_0x440105,_0x4fb550=_0x1ccc27['str'](_0x3f98f9(0x156))[_0x3f98f9(0x15b)](),_0x5a8d58=_0x1ccc27[_0x3f98f9(0x15d)](_0x3f98f9(0x126))[_0x3f98f9(0x15b)](),_0xd22924=_0x1ccc27['str'](DESCRIPTION_FILE_FLAG)[_0x3f98f9(0x15b)]();if(!_0x4fb550)throw CliErrors['flagMissing'](_0x3f98f9(0x156),'Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0xb54da7=_0x5a8d58[_0x3f98f9(0x14c)]>0x0,_0x53b81a=_0xd22924['length']>0x0;if(_0xb54da7===_0x53b81a)throw CliErrors[_0x3f98f9(0x137)]('Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x53b81a){const _0x13d902=resolve(process[_0x3f98f9(0x13d)](),_0xd22924);if(!existsSync(_0x13d902))throw CliErrors[_0x3f98f9(0x137)](_0x3f98f9(0x133)+_0x13d902);}},async 'dryRun'(_0x5a5d52){const _0x35510c=a99_0x440105,_0x1d735a=await prepareIssueReport(_0x5a5d52);return{'method':_0x35510c(0x122),'url':_0x35510c(0x143)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x1d735a[_0x35510c(0x156)],'issue.description':_0x1d735a[_0x35510c(0x126)],'issue.description_original_bytes':_0x1d735a['sanitize'][_0x35510c(0x152)],'issue.description_truncated':_0x1d735a['sanitize'][_0x35510c(0x151)],'issue.description_redactions':_0x1d735a['sanitize'][_0x35510c(0x12f)],'issue.description_redaction_kinds':_0x1d735a[_0x35510c(0x147)][_0x35510c(0x125)][_0x35510c(0x144)](',')}},'description':[_0x35510c(0x140),_0x35510c(0x120)+_0x1d735a[_0x35510c(0x121)],_0x1d735a[_0x35510c(0x15c)]?_0x35510c(0x128)+_0x1d735a[_0x35510c(0x15c)]:null,_0x1d735a[_0x35510c(0x147)][_0x35510c(0x151)]?_0x35510c(0x14a)+_0x1d735a[_0x35510c(0x147)][_0x35510c(0x152)]+_0x35510c(0x14d):null,_0x1d735a['sanitize']['redactionCount']>0x0?_0x35510c(0x145)+_0x1d735a[_0x35510c(0x147)][_0x35510c(0x12f)]+'\x20('+_0x1d735a['sanitize'][_0x35510c(0x125)][_0x35510c(0x144)](',\x20')+')':null][_0x35510c(0x142)](Boolean)[_0x35510c(0x144)]('\x0a')};},async 'execute'(_0x62dc8b){const _0x347b18=a99_0x440105,_0x8cd888=await prepareIssueReport(_0x62dc8b);try{await sendPlatformIssueCollectLog({'title':_0x8cd888[_0x347b18(0x156)],'description':_0x8cd888[_0x347b18(0x126)],'sanitize':{'originalBytes':_0x8cd888[_0x347b18(0x147)][_0x347b18(0x152)],'truncated':_0x8cd888['sanitize']['truncated'],'redactionCount':_0x8cd888[_0x347b18(0x147)][_0x347b18(0x12f)],'redactionKinds':_0x8cd888[_0x347b18(0x147)][_0x347b18(0x125)]}});}catch(_0x4782a1){throw CliErrors[_0x347b18(0x12a)](_0x347b18(0x12b)+(_0x4782a1 instanceof Error?_0x4782a1[_0x347b18(0x13a)]:String(_0x4782a1)),_0x347b18(0x15f));}return{'ok':!![],'message':buildResultMessage(_0x8cd888[_0x347b18(0x147)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x347b18(0x136),_0x347b18(0x15a),_0x347b18(0x13c),_0x347b18(0x153),_0x347b18(0x131),_0x347b18(0x124)],'issue':{'title':_0x8cd888['title'],'descriptionLength':_0x8cd888[_0x347b18(0x126)][_0x347b18(0x14c)],'descriptionSource':_0x8cd888[_0x347b18(0x121)],..._0x8cd888[_0x347b18(0x15c)]?{'descriptionFile':_0x8cd888[_0x347b18(0x15c)]}:{},'sanitize':{'originalBytes':_0x8cd888[_0x347b18(0x147)][_0x347b18(0x152)],'truncated':_0x8cd888[_0x347b18(0x147)][_0x347b18(0x151)],'redactions':_0x8cd888[_0x347b18(0x147)]['redactionCount'],'redactionKinds':_0x8cd888['sanitize'][_0x347b18(0x125)]}}}};}};function buildResultMessage(_0x2434e8){const _0x195dad=a99_0x440105,_0x4e5b8c=[];return _0x2434e8['truncated']&&_0x4e5b8c[_0x195dad(0x154)]('truncated\x20from\x20'+_0x2434e8[_0x195dad(0x152)]+_0x195dad(0x14d)),_0x2434e8[_0x195dad(0x12f)]>0x0&&_0x4e5b8c[_0x195dad(0x154)](_0x195dad(0x123)+_0x2434e8[_0x195dad(0x12f)]+_0x195dad(0x13b)+_0x2434e8[_0x195dad(0x125)][_0x195dad(0x144)](',\x20')),_0x4e5b8c[_0x195dad(0x14c)]===0x0?_0x195dad(0x13e):'Platform\x20issue\x20reported\x20('+_0x4e5b8c[_0x195dad(0x144)](';\x20')+')';}async function prepareIssueReport(_0x1150ad){const _0x5c4a50=a99_0x440105,_0x341a8c=_0x1150ad[_0x5c4a50(0x15d)](_0x5c4a50(0x156))[_0x5c4a50(0x15b)](),_0x527d81=_0x1150ad[_0x5c4a50(0x15d)](_0x5c4a50(0x126)),_0xb5e333=_0x1150ad[_0x5c4a50(0x15d)](DESCRIPTION_FILE_FLAG)[_0x5c4a50(0x15b)]();if(!_0xb5e333){const _0xd1c00c=_0x527d81;if(!_0xd1c00c[_0x5c4a50(0x15b)]())throw CliErrors[_0x5c4a50(0x137)]('Issue\x20description\x20cannot\x20be\x20empty.',_0x5c4a50(0x158));const _0xaa200f=sanitizeIssueDescription(_0xd1c00c);return{'title':_0x341a8c,'description':_0xaa200f['description'],'descriptionSource':_0x5c4a50(0x12c),'sanitize':_0xaa200f};}const _0x11ba71=resolve(process[_0x5c4a50(0x13d)](),_0xb5e333),_0x1be171=await readFile(_0x11ba71,_0x5c4a50(0x149));if(!_0x1be171[_0x5c4a50(0x15b)]())throw CliErrors[_0x5c4a50(0x137)](_0x5c4a50(0x129)+_0x11ba71,_0x5c4a50(0x146));const _0xe633e0=sanitizeIssueDescription(_0x1be171);return{'title':_0x341a8c,'description':_0xe633e0['description'],'descriptionSource':_0x5c4a50(0x159),'descriptionFilePath':_0x11ba71,'sanitize':_0xe633e0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x901bd4=a100_0x2ffb;(function(_0x3565b5,_0x5318b3){const _0x11a68e=a100_0x2ffb,_0x1176da=_0x3565b5();while(!![]){try{const _0x24b805=parseInt(_0x11a68e(0x1dc))/0x1+-parseInt(_0x11a68e(0x1de))/0x2*(-parseInt(_0x11a68e(0x1e6))/0x3)+parseInt(_0x11a68e(0x1cd))/0x4+-parseInt(_0x11a68e(0x1e5))/0x5+-parseInt(_0x11a68e(0x1e4))/0x6*(parseInt(_0x11a68e(0x1d2))/0x7)+-parseInt(_0x11a68e(0x1d5))/0x8+-parseInt(_0x11a68e(0x1d8))/0x9*(-parseInt(_0x11a68e(0x1d3))/0xa);if(_0x24b805===_0x5318b3)break;else _0x1176da['push'](_0x1176da['shift']());}catch(_0x225f9e){_0x1176da['push'](_0x1176da['shift']());}}}(a100_0x3452,0x3747b));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a100_0x901bd4(0x1d0),REDACTION_RULES=[{'kind':'cookie','pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':'REDACTED:cookie'},{'kind':a100_0x901bd4(0x1e9),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a100_0x901bd4(0x1db)},{'kind':a100_0x901bd4(0x1da),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a100_0x901bd4(0x1e0)},{'kind':'access-key','pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':'REDACTED:password'},{'kind':a100_0x901bd4(0x1e8),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a100_0x901bd4(0x1cf)}];function a100_0x3452(){const _0x5830cf=['replace','subarray','includes','14274UpWnwX','1055920rgmkOP','242628cGsYdL','string','bearer-jwt','authorization','restore','748208XIDhMz','from','REDACTED:bearer-jwt','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','kind','763qQdJCH','45470OGZNkt','max','735216gdJItn','utf8','slice','477CTfFOG','byteLength','private-key','REDACTED:authorization','279905qJITbm','pattern','2FrMSEM','toString','REDACTED:private-key'];a100_0x3452=function(){return _0x5830cf;};return a100_0x3452();}function a100_0x2ffb(_0x46a3eb,_0x53ff0c){_0x46a3eb=_0x46a3eb-0x1cd;const _0x3452ab=a100_0x3452();let _0x2ffbad=_0x3452ab[_0x46a3eb];return _0x2ffbad;}export function sanitizeIssueDescription(_0x4afda4){const _0x2d9e38=a100_0x901bd4,_0xe3c355=Buffer[_0x2d9e38(0x1d9)](_0x4afda4,_0x2d9e38(0x1d6)),_0x28dd78=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x374f93=_0x4afda4,_0x4a4e6b=0x0;const _0x491f69=[];if(!_0x28dd78){const _0x58982c=protectOssAccessKeyIds(_0x374f93);_0x374f93=_0x58982c['description'];for(const _0x59ebc7 of REDACTION_RULES){let _0x285235=0x0;_0x374f93=_0x374f93[_0x2d9e38(0x1e1)](_0x59ebc7[_0x2d9e38(0x1dd)],(_0x16dcd6,_0x591679)=>{const _0x30364e=_0x2d9e38;_0x285235+=0x1;const _0xfdd3b4=typeof _0x591679===_0x30364e(0x1e7)?_0x591679:'';return _0xfdd3b4+'['+_0x59ebc7['label']+']';}),_0x285235>0x0&&(_0x4a4e6b+=_0x285235,!_0x491f69[_0x2d9e38(0x1e3)](_0x59ebc7[_0x2d9e38(0x1d1)])&&_0x491f69['push'](_0x59ebc7[_0x2d9e38(0x1d1)]));}_0x374f93=_0x58982c[_0x2d9e38(0x1ea)](_0x374f93);}let _0x1007e=![];if(Buffer[_0x2d9e38(0x1d9)](_0x374f93,'utf8')>ISSUE_DESCRIPTION_MAX_BYTES){_0x1007e=!![];const _0x3fe853=Buffer['byteLength'](TRUNCATION_NOTICE,_0x2d9e38(0x1d6)),_0x366f63=Math[_0x2d9e38(0x1d4)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x3fe853);_0x374f93=sliceUtf8Bytes(_0x374f93,_0x366f63)+TRUNCATION_NOTICE;}return{'description':_0x374f93,'originalBytes':_0xe3c355,'truncated':_0x1007e,'redactionCount':_0x4a4e6b,'redactionKinds':_0x491f69};}function protectOssAccessKeyIds(_0x3e42e2){const _0x56e3a3=a100_0x901bd4,_0x154334=[],_0x4e3200=_0x3e42e2[_0x56e3a3(0x1e1)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x3d1190,_0x3cc76b)=>{const _0x5641a2=_0x56e3a3,_0x42a02c=_0x154334['push'](_0x3d1190[_0x5641a2(0x1d7)](_0x3cc76b['length']))-0x1;return _0x3cc76b+'__RB_OSS_ID_'+_0x42a02c+'__';});return{'description':_0x4e3200,'restore':_0xd851cd=>_0xd851cd['replace'](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x2abb8d,_0x43f3f2,_0xe4040a)=>{const _0x12a05d=_0x154334[Number(_0xe4040a)];return _0x12a05d===undefined?_0x2abb8d:''+_0x43f3f2+_0x12a05d;})};}function sliceUtf8Bytes(_0x1da5ea,_0x56e919){const _0x55a670=a100_0x901bd4;if(_0x56e919<=0x0)return'';const _0x2aaf79=Buffer[_0x55a670(0x1ce)](_0x1da5ea,_0x55a670(0x1d6));if(_0x2aaf79[_0x55a670(0x1d9)]<=_0x56e919)return _0x1da5ea;let _0x104d9a=_0x56e919;while(_0x104d9a>0x0){const _0x168c1a=_0x2aaf79[_0x104d9a];if(_0x168c1a===undefined||(_0x168c1a&0xc0)!==0x80)break;_0x104d9a-=0x1;}return _0x2aaf79[_0x55a670(0x1e2)](0x0,_0x104d9a)[_0x55a670(0x1df)](_0x55a670(0x1d6));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x3e5431=a101_0x53ce;(function(_0x120a4b,_0x2166e5){const _0x24c024=a101_0x53ce,_0x2369e1=_0x120a4b();while(!![]){try{const _0xcb5935=parseInt(_0x24c024(0x17d))/0x1+-parseInt(_0x24c024(0x178))/0x2*(-parseInt(_0x24c024(0x18a))/0x3)+-parseInt(_0x24c024(0x181))/0x4*(-parseInt(_0x24c024(0x169))/0x5)+-parseInt(_0x24c024(0x16c))/0x6*(parseInt(_0x24c024(0x186))/0x7)+parseInt(_0x24c024(0x173))/0x8+parseInt(_0x24c024(0x170))/0x9+parseInt(_0x24c024(0x17c))/0xa*(-parseInt(_0x24c024(0x172))/0xb);if(_0xcb5935===_0x2166e5)break;else _0x2369e1['push'](_0x2369e1['shift']());}catch(_0x24d04b){_0x2369e1['push'](_0x2369e1['shift']());}}}(a101_0x3f2e,0x8c166));function a101_0x3f2e(){const _0x21f875=['--title\x20is\x20required.','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','3735675OaDRrA','file','1947xvdzxb','328992ABYDkh','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','kb_already_exists','\x20for\x20','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','8298mekCHc','trim','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','company','40690zEHCLj','479294YCwQxX','byteSize','create','write','74796MhvOjN','\x20--format\x20compress`\x20before\x20choosing\x20update.','contentHash','POST','rabetbase\x20kb\x20detail\x20--id\x20','520079pQfwxB','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','\x20--format\x20compress','594gAlHrp','title','string','\x20with\x20title\x20','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','content','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','length','verified','55tpVcuV','appCode','kb_verification_failed','54euKOGx','Knowledge-base\x20title'];a101_0x3f2e=function(){return _0x21f875;};return a101_0x3f2e();}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='/admin/knowledge-base/create';function readCreateInput(_0x2472bc){const _0x35b4cf=a101_0x53ce,_0x2d86f8=_0x2472bc['str']('title')[_0x35b4cf(0x179)]();if(!_0x2d86f8)throw kbError('kb_title_required',_0x35b4cf(0x16e));const _0x1a8547=_0x2472bc['str'](_0x35b4cf(0x171))['trim']();if(!_0x1a8547)throw kbError('kb_file_required','--file\x20is\x20required.',_0x35b4cf(0x188));return{'title':_0x2d86f8,'file':_0x1a8547};}async function prepareCreate(_0x99380){const _0x2a713b=a101_0x53ce,_0x229e4b=readCreateInput(_0x99380),_0x1034ae=await readKbFile(_0x229e4b[_0x2a713b(0x171)]),_0x35ac89=await fetchAllCompanyKnowledgeBases(_0x99380,{'title':_0x229e4b['title']}),_0x1d1a4f=findExactCompanyKnowledgeBases(_0x35ac89,_0x99380['appCode'],_0x229e4b[_0x2a713b(0x18b)]);if(_0x1d1a4f[_0x2a713b(0x167)]>0x0)throw kbError(_0x2a713b(0x175),_0x2a713b(0x16f)+_0x99380[_0x2a713b(0x16a)]+_0x2a713b(0x18d)+_0x229e4b[_0x2a713b(0x18b)]+'.','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x1d1a4f[0x0]['id']+_0x2a713b(0x182));return{..._0x229e4b,'content':_0x1034ae};}function a101_0x53ce(_0x50703c,_0x588d72){_0x50703c=_0x50703c-0x164;const _0x3f2e50=a101_0x3f2e();let _0x53ce58=_0x3f2e50[_0x50703c];return _0x53ce58;}function plannedAfter(_0x1702b2,_0x23c801){const _0x314583=a101_0x53ce;return{'scope':'company','appCode':_0x1702b2[_0x314583(0x16a)],'title':_0x23c801[_0x314583(0x18b)],'contentByteSize':_0x23c801[_0x314583(0x165)][_0x314583(0x17e)],'contentHash':_0x23c801[_0x314583(0x165)][_0x314583(0x183)]};}function verifyCreatedState(_0x44ca80,_0xc67e9a,_0x4c757d){const _0x3d64b9=a101_0x53ce;assertCompanyKnowledgeBase(_0x4c757d,_0x44ca80[_0x3d64b9(0x16a)],_0x4c757d['id']);const _0x578273=inspectKbContent(_0x4c757d[_0x3d64b9(0x165)]);if(_0x4c757d[_0x3d64b9(0x18b)]!==_0xc67e9a[_0x3d64b9(0x18b)]||_0x578273[_0x3d64b9(0x183)]!==_0xc67e9a[_0x3d64b9(0x165)][_0x3d64b9(0x183)])throw kbError(_0x3d64b9(0x16b),'Company\x20knowledge\x20base\x20'+_0x4c757d['id']+_0x3d64b9(0x166),'Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x4c757d['id']+_0x3d64b9(0x164));return projectKb(_0x4c757d);}export const kbCreate={'service':'kb','command':a101_0x3e5431(0x17f),'description':'Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','risk':a101_0x3e5431(0x180),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a101_0x3e5431(0x18b),'type':a101_0x3e5431(0x18c),'required':!![],'description':a101_0x3e5431(0x16d)},{'name':a101_0x3e5431(0x171),'type':a101_0x3e5431(0x18c),'required':!![],'description':a101_0x3e5431(0x17a)}],async 'validate'(_0x4c4080){readCreateInput(_0x4c4080);},async 'dryRun'(_0x3cd192){const _0x400a79=a101_0x3e5431,_0x201b87=await prepareCreate(_0x3cd192);return asDryRunResult({'operation':_0x400a79(0x17f),'selector':{'scope':'company','appCode':_0x3cd192[_0x400a79(0x16a)],'title':_0x201b87[_0x400a79(0x18b)]},'before':null,'after':plannedAfter(_0x3cd192,_0x201b87),'dryRun':!![],'backend':{'method':_0x400a79(0x184),'path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':'rabetbase\x20kb\x20list\x20--title\x20'+JSON['stringify'](_0x201b87['title'])+_0x400a79(0x189)}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x18a4fa){const _0x586906=a101_0x3e5431,_0x227e89=await prepareCreate(_0x18a4fa);let _0x388573,_0xf0299a=![];try{const _0x35f751=await createEnterpriseKnowledgeBase(_0x18a4fa['cookie'],{'appCode':_0x18a4fa[_0x586906(0x16a)],'title':_0x227e89[_0x586906(0x18b)],'content':_0x227e89['content'][_0x586906(0x165)]});assertCompanyKnowledgeBase(_0x35f751,_0x18a4fa[_0x586906(0x16a)],_0x35f751['id']),_0x388573=_0x35f751['id'];}catch(_0x4af5e7){if(!isPlatformTransportFailure(_0x4af5e7))throw _0x4af5e7;_0xf0299a=!![];}if(_0x388573===undefined){const _0x461606=await verifyKbMutationReadback(_0x586906(0x17f),!![],()=>fetchAllCompanyKnowledgeBases(_0x18a4fa,{'title':_0x227e89[_0x586906(0x18b)]})),_0x453408=findExactCompanyKnowledgeBases(_0x461606,_0x18a4fa[_0x586906(0x16a)],_0x227e89[_0x586906(0x18b)]);if(_0x453408[_0x586906(0x167)]!==0x1)throw kbError('kb_create_outcome_unknown',_0x586906(0x174)+_0x453408[_0x586906(0x167)]+'.',_0x586906(0x187));_0x388573=_0x453408[0x0]['id'];}const _0x27b100=await verifyKbMutationReadback(_0x586906(0x17f),_0xf0299a,()=>requireKb(_0x18a4fa,_0x388573)),_0x1d0c3c=verifyCreatedState(_0x18a4fa,_0x227e89,_0x27b100),_0x1f1a31=_0xf0299a?[_0x586906(0x177)]:[];return{'ok':!![],'data':{'operation':_0x586906(0x17f),'selector':{'id':_0x1d0c3c['id'],'scope':_0x586906(0x17b),'appCode':_0x1d0c3c['appCode']},'before':null,'after':_0x1d0c3c,'dryRun':![],'backend':{'method':_0x586906(0x184),'path':CREATE_PATH},'warnings':_0x1f1a31,'verification':{'status':_0x586906(0x168),'recoveredAfterUnknownResponse':_0xf0299a,'lookupCommand':_0x586906(0x185)+_0x1d0c3c['id']+_0x586906(0x189)}},'message':'Created\x20company\x20knowledge\x20base\x20'+_0x1d0c3c['id']+_0x586906(0x176)+_0x1d0c3c[_0x586906(0x16a)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a102_0x26a2(){const _0x391709=['4yZsKof','16250090QsFrjQ','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','9337728mLHmGU','kb_expected_version_invalid','delete','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','kb_delete_outcome_unknown','kb_verification_failed','number','company','1DxqWhq','/admin/knowledge-base/delete','852424YoLsBB','rabetbase\x20kb\x20detail\x20--id\x20','1224805bTrmkj','\x20--format\x20compress','Company\x20knowledge\x20base\x20','expected-version','5072291nTHnQa','no_op','6hwAdhR','isSafeInteger','8017443VGnnBg','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','high-risk-write','POST','already_absent','Soft-deleted\x20company\x20knowledge\x20base\x20','unshift','1773345LxoxFA','verified','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.','appCode','Company\x20knowledge-base\x20id','snapshotHash'];a102_0x26a2=function(){return _0x391709;};return a102_0x26a2();}const a102_0x5bf5d3=a102_0x161a;(function(_0xf868cd,_0x1141c0){const _0xf9fe4b=a102_0x161a,_0x130163=_0xf868cd();while(!![]){try{const _0x552fe4=-parseInt(_0xf9fe4b(0x1f2))/0x1*(-parseInt(_0xf9fe4b(0x1f4))/0x2)+parseInt(_0xf9fe4b(0x1e1))/0x3+parseInt(_0xf9fe4b(0x1e7))/0x4*(parseInt(_0xf9fe4b(0x1f6))/0x5)+-parseInt(_0xf9fe4b(0x1fc))/0x6*(-parseInt(_0xf9fe4b(0x1fa))/0x7)+parseInt(_0xf9fe4b(0x1ea))/0x8+-parseInt(_0xf9fe4b(0x1fe))/0x9+-parseInt(_0xf9fe4b(0x1e8))/0xa;if(_0x552fe4===_0x1141c0)break;else _0x130163['push'](_0x130163['shift']());}catch(_0xa2cc29){_0x130163['push'](_0x130163['shift']());}}}(a102_0x26a2,0x9bd49));function a102_0x161a(_0x4123d0,_0x4cb40c){_0x4123d0=_0x4123d0-0x1db;const _0x26a267=a102_0x26a2();let _0x161acf=_0x26a267[_0x4123d0];return _0x161acf;}import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const DELETE_PATH=a102_0x5bf5d3(0x1f3),RAG_WARNING=a102_0x5bf5d3(0x1ed),NON_ATOMIC_WARNING=a102_0x5bf5d3(0x1e3);function readExpectedVersion(_0x1b62bb){const _0x55b7f5=a102_0x5bf5d3,_0x115d4d=_0x1b62bb['flag']('expected-version');if(_0x115d4d===undefined)return undefined;const _0x2ecf5e=Number(_0x115d4d);if(!Number[_0x55b7f5(0x1fd)](_0x2ecf5e)||_0x2ecf5e<0x0)throw kbError(_0x55b7f5(0x1eb),'--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');return _0x2ecf5e;}function noOpData(_0x40ebf1,_0x10785f,_0x466240){const _0x1a1785=a102_0x5bf5d3;return{'operation':_0x1a1785(0x1fb),'selector':{'id':_0x10785f,'scope':_0x1a1785(0x1f1),'appCode':_0x40ebf1['appCode']},'before':null,'after':null,'dryRun':_0x466240,'deleteCalled':![],'backend':{'method':_0x1a1785(0x1dd),'path':DELETE_PATH},'warnings':[],'verification':{'status':_0x1a1785(0x1de),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':'delete','description':'Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','risk':a102_0x5bf5d3(0x1dc),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a102_0x5bf5d3(0x1f0),'required':!![],'description':a102_0x5bf5d3(0x1e5)},{'name':a102_0x5bf5d3(0x1f9),'type':a102_0x5bf5d3(0x1f0),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x292643){readKbId(_0x292643),readExpectedVersion(_0x292643),requireKbExplicitYes(_0x292643);},async 'dryRun'(_0x5b6a1e){const _0x5d6238=a102_0x5bf5d3,_0x331ae5=readKbId(_0x5b6a1e),_0x3b47ce=readExpectedVersion(_0x5b6a1e),_0x212484=await getKbOrNull(_0x5b6a1e,_0x331ae5);if(!_0x212484)return asDryRunResult(noOpData(_0x5b6a1e,_0x331ae5,!![]),{'method':_0x5d6238(0x1dd),'url':DELETE_PATH});assertExpectedKbVersion(_0x212484,_0x3b47ce);const _0x14c0ef=projectKb(_0x212484),_0x5591f9=[RAG_WARNING];if(_0x3b47ce!==undefined)_0x5591f9[_0x5d6238(0x1e0)](NON_ATOMIC_WARNING);return asDryRunResult({'operation':'delete','selector':{'id':_0x14c0ef['id'],'scope':_0x5d6238(0x1f1),'appCode':_0x14c0ef[_0x5d6238(0x1e4)]},'before':_0x14c0ef,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x5d6238(0x1dd),'path':DELETE_PATH},'warnings':_0x5591f9,'verification':{'expectedVersion':_0x3b47ce??null,'atomicCompareAndSet':![],'snapshotHash':_0x14c0ef[_0x5d6238(0x1e6)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x5d6238(0x1f5)+_0x14c0ef['id']+'\x20--format\x20compress'}},{'method':_0x5d6238(0x1dd),'url':DELETE_PATH});},async 'execute'(_0x18c7da){const _0x33af27=a102_0x5bf5d3;requireKbExplicitYes(_0x18c7da);const _0x36af83=readKbId(_0x18c7da),_0x181f7f=readExpectedVersion(_0x18c7da),_0x25c6fb=await getKbOrNull(_0x18c7da,_0x36af83);if(!_0x25c6fb)return{'ok':!![],'data':noOpData(_0x18c7da,_0x36af83,![]),'message':_0x33af27(0x1f8)+_0x36af83+_0x33af27(0x1ff)};assertExpectedKbVersion(_0x25c6fb,_0x181f7f);const _0x31897a=projectKb(_0x25c6fb);let _0xe62200=![];try{await deleteEnterpriseKnowledgeBase(_0x18c7da['cookie'],_0x36af83);}catch(_0x3b8485){if(!isPlatformTransportFailure(_0x3b8485))throw _0x3b8485;_0xe62200=!![];}const _0x388ab5=await verifyKbMutationReadback(_0x33af27(0x1ec),_0xe62200,()=>getKbOrNull(_0x18c7da,_0x36af83));if(_0x388ab5)throw kbError(_0xe62200?_0x33af27(0x1ee):_0x33af27(0x1ef),_0x33af27(0x1f8)+_0x36af83+'\x20remains\x20readable\x20after\x20delete.',_0x33af27(0x200)+_0x36af83+_0x33af27(0x1e9));const _0x5f3711=[RAG_WARNING];if(_0x181f7f!==undefined)_0x5f3711[_0x33af27(0x1e0)](NON_ATOMIC_WARNING);return _0xe62200&&_0x5f3711[_0x33af27(0x1e0)](_0x33af27(0x1db)),{'ok':!![],'data':{'operation':_0x33af27(0x1ec),'selector':{'id':_0x31897a['id'],'scope':_0x33af27(0x1f1),'appCode':_0x31897a['appCode']},'before':_0x31897a,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x33af27(0x1dd),'path':DELETE_PATH},'warnings':_0x5f3711,'verification':{'status':_0x33af27(0x1e2),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0xe62200,'lookupCommand':_0x33af27(0x1f5)+_0x31897a['id']+_0x33af27(0x1f7)}},'message':_0x33af27(0x1df)+_0x31897a['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a103_0x2930(_0x300f44,_0x36c425){_0x300f44=_0x300f44-0x176;const _0x3854d2=a103_0x3854();let _0x293063=_0x3854d2[_0x300f44];return _0x293063;}const a103_0x12f5af=a103_0x2930;function a103_0x3854(){const _0x27557b=['detail','16lPLeEt','777835BcACof','2028dYkrTg','Company\x20knowledge-base\x20id','16MmAdue','8302SvIlpv','6132170nwdKbX','155667egiuje','606780jmZUqY','246819xHVxBJ','10XZSGOO','Loaded\x20company\x20knowledge\x20base\x20','447759YPHQMS','number'];a103_0x3854=function(){return _0x27557b;};return a103_0x3854();}(function(_0x15e24d,_0x2d8853){const _0x4cec0e=a103_0x2930,_0x32601e=_0x15e24d();while(!![]){try{const _0x58729b=parseInt(_0x4cec0e(0x17c))/0x1+-parseInt(_0x4cec0e(0x17d))/0x2+-parseInt(_0x4cec0e(0x17e))/0x3*(parseInt(_0x4cec0e(0x184))/0x4)+-parseInt(_0x4cec0e(0x176))/0x5+-parseInt(_0x4cec0e(0x177))/0x6*(-parseInt(_0x4cec0e(0x17a))/0x7)+-parseInt(_0x4cec0e(0x179))/0x8*(parseInt(_0x4cec0e(0x181))/0x9)+-parseInt(_0x4cec0e(0x17f))/0xa*(-parseInt(_0x4cec0e(0x17b))/0xb);if(_0x58729b===_0x2d8853)break;else _0x32601e['push'](_0x32601e['shift']());}catch(_0x5b728b){_0x32601e['push'](_0x32601e['shift']());}}}(a103_0x3854,0x37496));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';export const kbDetail={'service':'kb','command':a103_0x12f5af(0x183),'description':'Show\x20one\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a103_0x12f5af(0x182),'required':!![],'description':a103_0x12f5af(0x178)}],async 'validate'(_0x534e9e){readKbId(_0x534e9e);},async 'execute'(_0x3cd7d1){const _0x4a4093=a103_0x12f5af,_0x4a1587=readKbId(_0x3cd7d1),_0xc65e83=await requireKb(_0x3cd7d1,_0x4a1587);return{'ok':!![],'data':{'knowledgeBase':projectKb(_0xc65e83)},'message':_0x4a4093(0x180)+_0x4a1587};}};
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57c557,_0x1e9722){const _0x71263f=a104_0x3ecd,_0xc5cf6e=_0x57c557();while(!![]){try{const _0x22fa45=parseInt(_0x71263f(0xc7))/0x1+parseInt(_0x71263f(0xc2))/0x2+parseInt(_0x71263f(0xc1))/0x3*(parseInt(_0x71263f(0xc3))/0x4)+-parseInt(_0x71263f(0xc4))/0x5*(-parseInt(_0x71263f(0xbf))/0x6)+-parseInt(_0x71263f(0xc6))/0x7+parseInt(_0x71263f(0xc5))/0x8*(parseInt(_0x71263f(0xc0))/0x9)+-parseInt(_0x71263f(0xc8))/0xa*(parseInt(_0x71263f(0xc9))/0xb);if(_0x22fa45===_0x1e9722)break;else _0xc5cf6e['push'](_0xc5cf6e['shift']());}catch(_0x42407d){_0xc5cf6e['push'](_0xc5cf6e['shift']());}}}(a104_0x1a59,0x53860));import{kbList}from'../../commands/kb/list.js';function a104_0x3ecd(_0x18515b,_0x35f9b5){_0x18515b=_0x18515b-0xbf;const _0x1a5924=a104_0x1a59();let _0x3ecd3a=_0x1a5924[_0x18515b];return _0x3ecd3a;}import{kbDetail}from'../../commands/kb/detail.js';import{kbCreate}from'../../commands/kb/create.js';import{kbUpdate}from'../../commands/kb/update.js';import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbDelete];function a104_0x1a59(){const _0x2eb75b=['261yButXO','246561wpVdOS','1349074SjapOk','8vrATQI','154140jTOIlV','36112yZSTAA','1759513QVzpOc','311905qOxORv','10273590XcVMnm','11GSZwBd','66pYXauf'];a104_0x1a59=function(){return _0x2eb75b;};return a104_0x1a59();}
|
package/lib/commands/kb/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a105_0x363b(_0x48014c,_0x524c1a){_0x48014c=_0x48014c-0xbf;const _0x201c85=a105_0x201c();let _0x363b4c=_0x201c85[_0x48014c];return _0x363b4c;}function a105_0x201c(){const _0x2b6fd6=['469242FPXNPu','40ZWiOnI','appCode','14IifmSj','length','3286194aklBIb','88420BdwtGw','list','read','Found\x20','Filter\x20by\x20knowledge-base\x20title','189287jKfRrZ','map','216bqPbpE','3706998iTQytW','11200154oUTTDA','string','4228763XojBKY','72taRNyq','8qnJYQw'];a105_0x201c=function(){return _0x2b6fd6;};return a105_0x201c();}const a105_0x87b404=a105_0x363b;(function(_0x1778b7,_0x428321){const _0x3487a4=a105_0x363b,_0x5b7e87=_0x1778b7();while(!![]){try{const _0x3000c1=parseInt(_0x3487a4(0xc2))/0x1*(-parseInt(_0x3487a4(0xce))/0x2)+parseInt(_0x3487a4(0xc5))/0x3+parseInt(_0x3487a4(0xc4))/0x4*(parseInt(_0x3487a4(0xd1))/0x5)+parseInt(_0x3487a4(0xd0))/0x6+parseInt(_0x3487a4(0xc6))/0x7*(parseInt(_0x3487a4(0xca))/0x8)+-parseInt(_0x3487a4(0xcb))/0x9*(-parseInt(_0x3487a4(0xcc))/0xa)+parseInt(_0x3487a4(0xc8))/0xb*(-parseInt(_0x3487a4(0xc9))/0xc);if(_0x3000c1===_0x428321)break;else _0x5b7e87['push'](_0x5b7e87['shift']());}catch(_0x318a40){_0x5b7e87['push'](_0x5b7e87['shift']());}}}(a105_0x201c,0xdf744));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':a105_0x87b404(0xd2),'description':'List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','risk':a105_0x87b404(0xbf),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':a105_0x87b404(0xc7),'required':![],'description':a105_0x87b404(0xc1)}],async 'execute'(_0x4c9bde){const _0x5740ff=a105_0x87b404,_0x2e850e=_0x4c9bde['str']('title')['trim'](),_0x5905e9=await fetchAllCompanyKnowledgeBases(_0x4c9bde,{..._0x2e850e?{'title':_0x2e850e}:{}}),_0x273735=_0x5905e9[_0x5740ff(0xc3)](projectKb);return{'ok':!![],'data':{'total':_0x273735[_0x5740ff(0xcf)],'knowledgeBases':_0x273735},'message':_0x5740ff(0xc0)+_0x273735[_0x5740ff(0xcf)]+'\x20company\x20knowledge\x20base(s)\x20for\x20'+_0x4c9bde[_0x5740ff(0xcd)]};}};
|