@lovrabet/rabetbase-cli 2.4.5-beta.1 → 2.4.5
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/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/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/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/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/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a88_0x3ec9(_0x3f2fd0,_0x4dab23){_0x3f2fd0=_0x3f2fd0-0x133;const _0x3114c2=a88_0x3114();let _0x3ec971=_0x3114c2[_0x3f2fd0];return _0x3ec971;}const a88_0x159345=a88_0x3ec9;(function(_0x668e42,_0xdca121){const _0x45084d=a88_0x3ec9,_0x28d317=_0x668e42();while(!![]){try{const _0x4bd79c=parseInt(_0x45084d(0x16d))/0x1*(-parseInt(_0x45084d(0x137))/0x2)+parseInt(_0x45084d(0x155))/0x3*(parseInt(_0x45084d(0x13e))/0x4)+-parseInt(_0x45084d(0x169))/0x5+parseInt(_0x45084d(0x13a))/0x6*(parseInt(_0x45084d(0x150))/0x7)+parseInt(_0x45084d(0x14b))/0x8*(parseInt(_0x45084d(0x15b))/0x9)+-parseInt(_0x45084d(0x158))/0xa*(parseInt(_0x45084d(0x151))/0xb)+parseInt(_0x45084d(0x15f))/0xc;if(_0x4bd79c===_0xdca121)break;else _0x28d317['push'](_0x28d317['shift']());}catch(_0x52c139){_0x28d317['push'](_0x28d317['shift']());}}}(a88_0x3114,0x54c50));import{getDbLiveTableDiff,getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const ALL_PAGE_SIZE=0x64,DIFF_TYPES=[a88_0x159345(0x133),'MODIFIED_TABLE',a88_0x159345(0x147),a88_0x159345(0x161)];function a88_0x3114(){const _0x186bbf=['set','physicalTableCount','7SHJhjb','1567291waYjYq','num','read','tableList','6dnyQwA','\x20(db\x20link\x20','modifiedColumns','20OKdRMT','diffType','bool','3735JmcnsK','length','page','str','9716328DHTaCj','view','ALREADY_ANALYZED','number','datasetTableCount','changed-only','changed','\x20table\x20row(s),\x20total\x20','values','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','1958535zebHgE','totalCount','MODIFIED_TABLE','\x20row(s).','256259dPHIaq','NEW_TABLE','fieldDiff','all','addedColumns','4lmozxQ','deletedColumns','pagesize','1799346McCRwb','validation','string','boolean','671036MhfXfr','table','Incomplete\x20db\x20diff\x20pagination:\x20collected\x20','summary','Page\x20size','Page\x20index\x20(1-based)','size','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','fromEntries','DELETED_TABLE','map','appCode','tableName','1760rEcxsD','diff','filter'];a88_0x3114=function(){return _0x186bbf;};return a88_0x3114();}export const dbDiff={'service':'db','command':'diff','description':'Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','risk':a88_0x159345(0x153),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'view','type':'string','enum':[a88_0x159345(0x14c),a88_0x159345(0x135)],'default':a88_0x159345(0x14c),'description':'diff\x20reads\x20changed\x20tables\x20from\x20the\x20server-managed\x20result;\x20all\x20reads\x20every\x20table\x20from\x20live\x20pagination'},{'name':'table','type':a88_0x159345(0x13c),'description':a88_0x159345(0x168)},{'name':a88_0x159345(0x15d),'type':'number','description':a88_0x159345(0x143),'default':0x1},{'name':a88_0x159345(0x139),'type':a88_0x159345(0x162),'description':a88_0x159345(0x142),'default':0x14},{'name':'all','type':a88_0x159345(0x13d),'description':a88_0x159345(0x145)},{'name':a88_0x159345(0x164),'type':a88_0x159345(0x13d),'description':'Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables'}],async 'execute'(_0x43953c){const _0x16632f=a88_0x159345,_0x4b4401=_0x43953c[_0x16632f(0x152)]('id'),_0x476ca1=_0x43953c[_0x16632f(0x15e)](_0x16632f(0x160))||_0x16632f(0x14c),_0x1c17b1=_0x43953c[_0x16632f(0x15a)](_0x16632f(0x135)),_0xd42532=_0x43953c[_0x16632f(0x15a)](_0x16632f(0x164)),_0x292410=_0x1c17b1?0x1:_0x43953c[_0x16632f(0x152)](_0x16632f(0x15d),0x1)||0x1,_0x1cab73=_0x1c17b1?ALL_PAGE_SIZE:_0x43953c[_0x16632f(0x152)](_0x16632f(0x139),0x14)||0x14,_0x1857bf=_0x43953c[_0x16632f(0x15e)](_0x16632f(0x13f))||undefined,_0x605011=_0x476ca1===_0x16632f(0x135)?getDbLiveTableDiff:getDbTableDiff,_0x49effb=_0x1c17b1?await getAllDbTableDiff(_0x605011,_0x43953c[_0x16632f(0x149)],_0x4b4401,_0x1857bf):await _0x605011(_0x43953c[_0x16632f(0x149)],_0x4b4401,{'pageIndex':_0x292410,'pageSize':_0x1cab73,'tableName':_0x1857bf}),_0x28b733=_0x49effb['tableList'],_0x1daa6b=_0xd42532?_0x28b733[_0x16632f(0x14d)](_0x592275=>_0x592275['diffType']!==_0x16632f(0x161)):_0x28b733,_0x554ca1=Object[_0x16632f(0x146)](DIFF_TYPES[_0x16632f(0x148)](_0x1ab1bb=>[_0x1ab1bb,_0x28b733[_0x16632f(0x14d)](_0x1c4912=>_0x1c4912['diffType']===_0x1ab1bb)[_0x16632f(0x15c)]])),_0x2b88c2=_0x28b733['filter'](_0x44123f=>_0x44123f[_0x16632f(0x159)]===_0x16632f(0x133)||_0x44123f[_0x16632f(0x159)]===_0x16632f(0x16b))[_0x16632f(0x148)](_0x56643b=>_0x56643b[_0x16632f(0x14a)]),_0xc588ae=_0x28b733[_0x16632f(0x14d)](_0x53d534=>_0x53d534[_0x16632f(0x159)]===_0x16632f(0x147))[_0x16632f(0x148)](_0x386495=>_0x386495[_0x16632f(0x14a)]),_0x1dc8ec=_0x28b733[_0x16632f(0x14d)](_0x83fe89=>_0x83fe89[_0x16632f(0x159)]==='MODIFIED_TABLE')['map'](_0x5e9bee=>({'tableName':_0x5e9bee['tableName'],'addedColumns':_0x5e9bee['fieldDiff']?.[_0x16632f(0x136)]??[],'deletedColumns':_0x5e9bee[_0x16632f(0x134)]?.[_0x16632f(0x138)]??[],'modifiedColumns':_0x5e9bee[_0x16632f(0x134)]?.[_0x16632f(0x157)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x4b4401,'view':_0x476ca1,'page':_0x292410,'pageSize':_0x1cab73,'totalCount':_0x49effb[_0x16632f(0x16a)],...typeof _0x49effb[_0x16632f(0x14f)]==='number'?{'physicalTableCount':_0x49effb[_0x16632f(0x14f)]}:{},...typeof _0x49effb['datasetTableCount']===_0x16632f(0x162)?{'datasetTableCount':_0x49effb['datasetTableCount']}:{},..._0x49effb[_0x16632f(0x141)]?{'summary':_0x49effb[_0x16632f(0x141)]}:{},'summaryByType':_0x554ca1,'toAnalyzeTables':_0x2b88c2,'deletedTables':_0xc588ae,'modifiedFieldDiffs':_0x1dc8ec,'tables':_0x1daa6b,'tableList':_0x1daa6b},'message':_0x1daa6b['length']+'\x20'+(_0x476ca1===_0x16632f(0x14c)?_0x16632f(0x165):'total')+_0x16632f(0x166)+_0x49effb[_0x16632f(0x16a)]+_0x16632f(0x156)+_0x4b4401+')'};}};async function getAllDbTableDiff(_0x3a5acb,_0x23787e,_0x1f0c89,_0x1ea123){const _0x22691e=a88_0x159345,_0x4404da=new Map();let _0x17f57b=0x1,_0xe533f4=null;while(!![]){_0xe533f4=await _0x3a5acb(_0x23787e,_0x1f0c89,{'pageIndex':_0x17f57b,'pageSize':ALL_PAGE_SIZE,'tableName':_0x1ea123});const _0x2e15c2=_0x4404da[_0x22691e(0x144)];for(const _0x45a76b of _0xe533f4[_0x22691e(0x154)]){_0x4404da[_0x22691e(0x14e)](_0x45a76b[_0x22691e(0x14a)],_0x45a76b);}if(_0x4404da[_0x22691e(0x144)]>=_0xe533f4[_0x22691e(0x16a)])break;if(_0xe533f4[_0x22691e(0x154)][_0x22691e(0x15c)]===0x0||_0x4404da[_0x22691e(0x144)]===_0x2e15c2)throw CliErrors[_0x22691e(0x13b)](_0x22691e(0x140)+_0x4404da[_0x22691e(0x144)]+'\x20of\x20'+_0xe533f4[_0x22691e(0x16a)]+_0x22691e(0x16c));_0x17f57b+=0x1;}return{'totalCount':_0xe533f4?.[_0x22691e(0x16a)]??0x0,...typeof _0xe533f4?.[_0x22691e(0x14f)]===_0x22691e(0x162)?{'physicalTableCount':_0xe533f4['physicalTableCount']}:{},...typeof _0xe533f4?.[_0x22691e(0x163)]===_0x22691e(0x162)?{'datasetTableCount':_0xe533f4[_0x22691e(0x163)]}:{},..._0xe533f4?.[_0x22691e(0x141)]?{'summary':_0xe533f4['summary']}:{},'tableList':[..._0x4404da[_0x22691e(0x167)]()]};}
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x21ea84,_0x6976ca){const _0x97983a=a89_0x315d,_0x2c50f0=_0x21ea84();while(!![]){try{const _0x11adfb=parseInt(_0x97983a(0x93))/0x1*(parseInt(_0x97983a(0x99))/0x2)+-parseInt(_0x97983a(0x95))/0x3*(-parseInt(_0x97983a(0x8f))/0x4)+-parseInt(_0x97983a(0x97))/0x5*(parseInt(_0x97983a(0x94))/0x6)+parseInt(_0x97983a(0x92))/0x7*(parseInt(_0x97983a(0x9a))/0x8)+parseInt(_0x97983a(0x91))/0x9+parseInt(_0x97983a(0x9b))/0xa*(parseInt(_0x97983a(0x96))/0xb)+-parseInt(_0x97983a(0x98))/0xc*(parseInt(_0x97983a(0x90))/0xd);if(_0x11adfb===_0x6976ca)break;else _0x2c50f0['push'](_0x2c50f0['shift']());}catch(_0x52927a){_0x2c50f0['push'](_0x2c50f0['shift']());}}}(a89_0x1201,0xf1b13));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';function a89_0x315d(_0x322edb,_0x56d552){_0x322edb=_0x322edb-0x8f;const _0x12019b=a89_0x1201();let _0x315d3f=_0x12019b[_0x322edb];return _0x315d3f;}import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';function a89_0x1201(){const _0xb4ac4c=['24eTohSK','2ZjzgsU','5171776oLRQsW','8306390eAVdUv','5007796FtkGmI','30741412BkLieM','15698934aYovZc','14yyWNBa','1442597nXJngq','150fxyTnw','3SIfDJR','22klYstC','334735uuYDFg'];a89_0x1201=function(){return _0xb4ac4c;};return a89_0x1201();}import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';import{dbDiffRefreshStart}from'../../commands/db/diff-refresh-start.js';import{dbDiffRefreshStatus}from'../../commands/db/diff-refresh-status.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff,dbDiffRefreshStart,dbDiffRefreshStatus];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x5a18b8=a90_0x3671;(function(_0x514368,_0x43cede){const _0x1824fa=a90_0x3671,_0x5d11c7=_0x514368();while(!![]){try{const _0x4f80a7=-parseInt(_0x1824fa(0xc4))/0x1+-parseInt(_0x1824fa(0xb3))/0x2*(-parseInt(_0x1824fa(0xbc))/0x3)+-parseInt(_0x1824fa(0xbd))/0x4+-parseInt(_0x1824fa(0xbb))/0x5*(-parseInt(_0x1824fa(0xb6))/0x6)+-parseInt(_0x1824fa(0xba))/0x7*(parseInt(_0x1824fa(0xb0))/0x8)+parseInt(_0x1824fa(0xae))/0x9*(parseInt(_0x1824fa(0xab))/0xa)+parseInt(_0x1824fa(0xc1))/0xb*(-parseInt(_0x1824fa(0xc3))/0xc);if(_0x4f80a7===_0x43cede)break;else _0x5d11c7['push'](_0x5d11c7['shift']());}catch(_0x2f1743){_0x5d11c7['push'](_0x5d11c7['shift']());}}}(a90_0x5885,0x7a0d3));import{listDatasets,listDbLinks}from'../../core/api-client.js';function a90_0x3671(_0x38a477,_0x885564){_0x38a477=_0x38a477-0xaa;const _0x58850c=a90_0x5885();let _0x36717c=_0x58850c[_0x38a477];return _0x36717c;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a90_0x5a18b8(0xaa),'description':a90_0x5a18b8(0xb7),'risk':a90_0x5a18b8(0xb1),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a90_0x5a18b8(0xb4),'type':a90_0x5a18b8(0xad),'description':a90_0x5a18b8(0xb9),'default':0x1},{'name':a90_0x5a18b8(0xc0),'type':a90_0x5a18b8(0xad),'description':a90_0x5a18b8(0xac),'default':0x64}],async 'execute'(_0x20539b){const _0x51d57b=a90_0x5a18b8,_0x164cb8=_0x20539b[_0x51d57b(0xb5)](_0x51d57b(0xb4),0x1)||0x1,_0x1c2123=_0x20539b[_0x51d57b(0xb5)]('pagesize',0x64)||0x64,[{items:_0x5e9858,paging:_0xdf5678},_0x38ab63]=await Promise[_0x51d57b(0xbe)]([listDbLinks(_0x20539b[_0x51d57b(0xb8)],{'currentPage':_0x164cb8,'pageSize':_0x1c2123}),listDatasets(_0x20539b[_0x51d57b(0xb8)],{'source':'DB_TABLE'})]),_0x1a43bd=_0x5e9858['map'](_0x4510e8=>({...sanitizeDbLinkForOutput(_0x4510e8),'datasetDependency':buildDbDatasetDependency(_0x4510e8,_0x38ab63)[_0x51d57b(0xbf)]})),_0x287502=_0xdf5678?_0xdf5678:{'currentPage':_0x164cb8,'pageSize':_0x1c2123,'rowsOnPage':_0x1a43bd[_0x51d57b(0xaf)],'totalCount':null,'note':_0x51d57b(0xb2)};return{'ok':!![],'data':{'connections':_0x1a43bd,'paging':_0x287502},'message':_0x51d57b(0xc5)+_0x1a43bd['length']+_0x51d57b(0xc2)};}};function a90_0x5885(){const _0x242637=['length','88AhIyMK','read','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','217196CZEQQU','page','num','30fCqMWb','List\x20database\x20connections\x20(dblinks)\x20for\x20the\x20current\x20app\x20with\x20analysis\x20status\x20—\x20for\x20AI\x20to\x20pick\x20ids\x20before\x20db\x20detail\x20/\x20analyze\x20/\x20tables','appCode','Page\x20index\x20(1-based)','142387txyICS','935895eXBTfQ','21ipzAFD','1178556meciqn','all','datasetDependency','pagesize','22cKqfEg','\x20database\x20connection(s)','5388516MOrOFw','397007PFDYjF','Found\x20','list','150KucTso','Page\x20size','number','370395LjTIcP'];a90_0x5885=function(){return _0x242637;};return a90_0x5885();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x343346,_0x1b3c2b){const _0x5ef877=a91_0x5ef2,_0x37fc7b=_0x343346();while(!![]){try{const _0x23bd8f=-parseInt(_0x5ef877(0xab))/0x1*(-parseInt(_0x5ef877(0xbb))/0x2)+parseInt(_0x5ef877(0xa9))/0x3+parseInt(_0x5ef877(0xba))/0x4+-parseInt(_0x5ef877(0x99))/0x5*(-parseInt(_0x5ef877(0xa5))/0x6)+-parseInt(_0x5ef877(0x9c))/0x7+parseInt(_0x5ef877(0x9d))/0x8*(parseInt(_0x5ef877(0xa4))/0x9)+parseInt(_0x5ef877(0xad))/0xa*(parseInt(_0x5ef877(0xa3))/0xb);if(_0x23bd8f===_0x1b3c2b)break;else _0x37fc7b['push'](_0x37fc7b['shift']());}catch(_0x7bd9f3){_0x37fc7b['push'](_0x37fc7b['shift']());}}}(a91_0xb404,0xabdcf));import{testDbLinkConfigConnect}from'../../core/api-client.js';function a91_0xb404(){const _0x3b67aa=['[redacted]','includes','979FukikV','1486935Qorngk','132ZNECVS','tableName','hasAvailableDo','privatekey','1736484EEUElI','map','94014AZkIXg','test','94910qLwtZV','Database\x20connection\x20preflight\x20failed.','jdbcurl','trim','code','token','accesskey','name','dbtableConfig','passwd','number','length','password','83492YbqVQp','2obweGb','24655QvfCQN','/data/database','dbId','7757120FKpKee','8evFDyY','keys','connectionstring','isFinite'];a91_0xb404=function(){return _0x3b67aa;};return a91_0xb404();}import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function shouldRedactKey(_0x5ef169){const _0x504cd7=a91_0x5ef2,_0x161694=_0x5ef169['toLowerCase']();if(_0x161694===_0x504cd7(0xb9)||_0x161694===_0x504cd7(0xb6)||_0x161694==='dbpassword')return!![];if(_0x161694[_0x504cd7(0xa2)]('secret')||_0x161694[_0x504cd7(0xa2)](_0x504cd7(0xb2))||_0x161694[_0x504cd7(0xa2)]('credential'))return!![];if(_0x161694[_0x504cd7(0xa2)](_0x504cd7(0xa8))||_0x161694['includes'](_0x504cd7(0xb3)))return!![];if(_0x161694==='authorization'||_0x161694===_0x504cd7(0x9f)||_0x161694===_0x504cd7(0xaf))return!![];return![];}export function sanitizeDbLinkForOutput(_0x139b4e){const _0x351272=a91_0x5ef2,_0x2cd88b={..._0x139b4e};delete _0x2cd88b[_0x351272(0xa7)];for(const _0x361662 of Object[_0x351272(0x9e)](_0x2cd88b)){if(!shouldRedactKey(_0x361662))continue;const _0x1e2dfd=_0x2cd88b[_0x361662];_0x1e2dfd!=null&&String(_0x1e2dfd)['length']>0x0&&(_0x2cd88b[_0x361662]=_0x351272(0xa1));}return _0x2cd88b;}function a91_0x5ef2(_0x49215a,_0x2eb7e0){_0x49215a=_0x49215a-0x99;const _0xb40423=a91_0xb404();let _0x5ef29a=_0xb40423[_0x49215a];return _0x5ef29a;}export function sanitizeDbLinkList(_0x2bf363){const _0x559fc2=a91_0x5ef2;return _0x2bf363[_0x559fc2(0xaa)](_0x186599=>sanitizeDbLinkForOutput(_0x186599));}export function buildDbDatasetDependency(_0x2628b7,_0x4c1a01){const _0x13d86c=a91_0x5ef2,_0x3b94e8=_0x4c1a01['filter'](_0x246716=>Number(_0x246716[_0x13d86c(0xb5)]?.[_0x13d86c(0x9b)])===Number(_0x2628b7['id']))[_0x13d86c(0xaa)](_0x442e8c=>({'id':_0x442e8c['id'],'code':_0x442e8c[_0x13d86c(0xb1)],'name':_0x442e8c[_0x13d86c(0xb4)],..._0x442e8c[_0x13d86c(0xb5)]?.[_0x13d86c(0xa6)]?{'tableName':_0x442e8c[_0x13d86c(0xb5)][_0x13d86c(0xa6)]}:{}}));return{'datasetDependency':{'hasDependencies':_0x3b94e8['length']>0x0,'activeDatasetCount':_0x3b94e8[_0x13d86c(0xb8)]},'datasets':_0x3b94e8};}export async function assertDbLinkConnectionPreflight(_0x2baad8){const _0x344dc7=a91_0x5ef2,_0x5d1e04=await testDbLinkConfigConnect(_0x2baad8);if(_0x5d1e04!==!![])throw CliErrors['apiError'](_0x344dc7(0xae),'The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.');}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x260346){const _0x381f51=a91_0x5ef2,_0x324d73=_0x260346[_0x381f51(0xb0)]();if(!_0x324d73)return![];return DB_URL_PATTERN[_0x381f51(0xac)](_0x324d73);}export function buildDbPageLinks(_0x24d68b,_0x804bd2){const _0x58389b=a91_0x5ef2,_0x2e2e2f=_0x24d68b?.[_0x58389b(0xb0)]();if(!_0x2e2e2f)return undefined;const _0x460034=typeof _0x804bd2===_0x58389b(0xb7)?String(_0x804bd2):String(_0x804bd2??'')['trim']();if(!_0x460034)return undefined;const _0x1e012a=Number(_0x460034);if(!Number[_0x58389b(0xa0)](_0x1e012a)||_0x1e012a<=0x0)return undefined;const _0x1c0d7d=getAppBaseUrl(_0x2e2e2f),_0x22b3e4=encodeURIComponent(String(_0x1e012a));return{'databasePage':_0x1c0d7d+_0x58389b(0x9a),'erPage':_0x1c0d7d+'/data/er?dbId='+_0x22b3e4};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a92_0x4b1c(){const _0x294329=['read','18595224qoRwpF','1075600FtmNcW','450RIejSb','25206erHiWk','755ygYGPC','appCode','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','8235745ueNaaU','1834bnxZyV','length','3550329gUtgKb','num','tables','1146380lrgNqj','\x20table(s)\x20on\x20db\x20link\x20'];a92_0x4b1c=function(){return _0x294329;};return a92_0x4b1c();}const a92_0x3bfd7d=a92_0x88a0;function a92_0x88a0(_0x4a6ef1,_0x366a90){_0x4a6ef1=_0x4a6ef1-0xb6;const _0x4b1cd1=a92_0x4b1c();let _0x88a028=_0x4b1cd1[_0x4a6ef1];return _0x88a028;}(function(_0x4c238e,_0x3e61d9){const _0x444efd=a92_0x88a0,_0x584460=_0x4c238e();while(!![]){try{const _0x192a1e=-parseInt(_0x444efd(0xb7))/0x1*(parseInt(_0x444efd(0xc1))/0x2)+parseInt(_0x444efd(0xb9))/0x3+-parseInt(_0x444efd(0xbc))/0x4+-parseInt(_0x444efd(0xc3))/0x5*(parseInt(_0x444efd(0xc2))/0x6)+-parseInt(_0x444efd(0xb6))/0x7+-parseInt(_0x444efd(0xc0))/0x8+parseInt(_0x444efd(0xbf))/0x9;if(_0x192a1e===_0x3e61d9)break;else _0x584460['push'](_0x584460['shift']());}catch(_0x3eb8a3){_0x584460['push'](_0x584460['shift']());}}}(a92_0x4b1c,0x93b46));import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a92_0x3bfd7d(0xbb),'description':a92_0x3bfd7d(0xc5),'risk':a92_0x3bfd7d(0xbe),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x100466){const _0x532354=a92_0x3bfd7d,_0x1e86f7=_0x100466[_0x532354(0xba)]('id'),_0x4b085a=await getDbAllTableList(_0x100466[_0x532354(0xc4)],_0x1e86f7);return{'ok':!![],'data':{'dbLinkId':_0x1e86f7,'total':_0x4b085a[_0x532354(0xb8)],'tables':_0x4b085a},'message':_0x4b085a[_0x532354(0xb8)]+_0x532354(0xbd)+_0x1e86f7};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a93_0x1df89e=a93_0x1915;(function(_0x2a18eb,_0x18afcd){const _0x8589dd=a93_0x1915,_0x2384e1=_0x2a18eb();while(!![]){try{const _0x3a3bba=-parseInt(_0x8589dd(0xc8))/0x1*(-parseInt(_0x8589dd(0xce))/0x2)+-parseInt(_0x8589dd(0xd6))/0x3+parseInt(_0x8589dd(0xcb))/0x4+-parseInt(_0x8589dd(0xc6))/0x5+-parseInt(_0x8589dd(0xd2))/0x6*(-parseInt(_0x8589dd(0xdc))/0x7)+-parseInt(_0x8589dd(0xca))/0x8+parseInt(_0x8589dd(0xda))/0x9;if(_0x3a3bba===_0x18afcd)break;else _0x2384e1['push'](_0x2384e1['shift']());}catch(_0x124195){_0x2384e1['push'](_0x2384e1['shift']());}}}(a93_0x2d1f,0xe7588));function a93_0x1915(_0x461901,_0x207bba){_0x461901=_0x461901-0xc6;const _0x2d1f47=a93_0x2d1f();let _0x1915dd=_0x2d1f47[_0x461901];return _0x1915dd;}import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x3caba0){const _0x46abd0=a93_0x1915;if(_0x3caba0===!![]||_0x3caba0===![])return{'success':_0x3caba0};if(_0x3caba0===null||_0x3caba0===undefined)return{'type':typeof _0x3caba0};if(typeof _0x3caba0!==_0x46abd0(0xc7))return{'type':typeof _0x3caba0};const _0x28c6f7=_0x3caba0,_0x5ca0cb=[_0x46abd0(0xd5),_0x46abd0(0xc9),'code','error',_0x46abd0(0xdb),_0x46abd0(0xd0)],_0x589228={};for(const _0x550c4a of _0x5ca0cb){if(_0x550c4a in _0x28c6f7)_0x589228[_0x550c4a]=_0x28c6f7[_0x550c4a];}return Object['keys'](_0x589228)[_0x46abd0(0xd3)]===0x0&&(_0x589228[_0x46abd0(0xcd)]=Object[_0x46abd0(0xcd)](_0x28c6f7)[_0x46abd0(0xd1)](0x0,0x14)),_0x589228;}function a93_0x2d1f(){const _0x52a4bb=['8CFBFBb','num','data','slice','163602adMQDV','length','\x20(see\x20data.result)','success','222990gQVSPA','read','Connection\x20OK\x20for\x20db\x20link\x20','Connection\x20check\x20finished\x20for\x20db\x20link\x20','7654905ivlmKO','msg','203Nenmjr','4166685usPGGN','object','301336tasuOm','message','12651896StzABt','2360456vyKNyX','test','keys'];a93_0x2d1f=function(){return _0x52a4bb;};return a93_0x2d1f();}export const dbTest={'service':'db','command':a93_0x1df89e(0xcc),'description':'Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','risk':a93_0x1df89e(0xd7),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x515993){const _0xaf83a9=a93_0x1df89e,_0x2431b4=_0x515993[_0xaf83a9(0xcf)]('id'),_0xa0a28e=await testDbLinkConnect(_0x2431b4),_0x221b65=_0xa0a28e===!![]||typeof _0xa0a28e===_0xaf83a9(0xc7)&&_0xa0a28e!==null&&_0xa0a28e[_0xaf83a9(0xd5)]===!![],_0x47dff5=summarizeTestConnectResult(_0xa0a28e);return{'ok':!![],'data':{'id':_0x2431b4,'connected':Boolean(_0x221b65),'result':_0x47dff5},'message':_0x221b65?_0xaf83a9(0xd8)+_0x2431b4:_0xaf83a9(0xd9)+_0x2431b4+_0xaf83a9(0xd4)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x2013f1=a94_0x50c5;(function(_0x4c592a,_0x44d7e5){const _0x363624=a94_0x50c5,_0x4730a0=_0x4c592a();while(!![]){try{const _0x13d47=parseInt(_0x363624(0x20d))/0x1*(-parseInt(_0x363624(0x213))/0x2)+-parseInt(_0x363624(0x207))/0x3*(-parseInt(_0x363624(0x1fe))/0x4)+-parseInt(_0x363624(0x206))/0x5*(-parseInt(_0x363624(0x1f3))/0x6)+parseInt(_0x363624(0x209))/0x7+-parseInt(_0x363624(0x1f6))/0x8*(-parseInt(_0x363624(0x212))/0x9)+parseInt(_0x363624(0x204))/0xa*(parseInt(_0x363624(0x1ee))/0xb)+-parseInt(_0x363624(0x1fa))/0xc;if(_0x13d47===_0x44d7e5)break;else _0x4730a0['push'](_0x4730a0['shift']());}catch(_0x4aafa4){_0x4730a0['push'](_0x4730a0['shift']());}}}(a94_0x4df5,0xca4e2));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a94_0x50c5(_0x4be1d6,_0x540fb5){_0x4be1d6=_0x4be1d6-0x1ee;const _0x4df566=a94_0x4df5();let _0x50c5e7=_0x4df566[_0x4be1d6];return _0x50c5e7;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';function a94_0x4df5(){const _0x24fc5a=['10785901PhmszF','string','[redacted]','dbdesc','1BFVzZm','New\x20host:port','dbUrl','dbname','dburl','81SErpFa','1649218HccVAu','New\x20username','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','bool','2288bpengu','username','Updated\x20db\x20link\x20','dbName','str','726bVrqPN','skip-connection-test','password','877984oPMyyq','validation','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','has','44211924LjvVhc','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','New\x20connection\x20parameter\x20string','dbparam','68896ysijhR','New\x20description','trim','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','/smartapi/dblink/update','num','49570MMHjHl','dbDesc','67775eqaupM','24vbPeOT','******'];a94_0x4df5=function(){return _0x24fc5a;};return a94_0x4df5();}import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a94_0x2013f1(0x208),a94_0x2013f1(0x20b)]);function mergeDbLinkUpdate(_0x412293,_0xc9608e){const _0x29a237=a94_0x2013f1,_0x277b8e={..._0x412293},_0x14f1e3=_0xc9608e['str']('password');if(_0x14f1e3&&MASKED_PASSWORD_VALUES[_0x29a237(0x1f9)](_0x14f1e3))throw CliErrors['validation'](_0x29a237(0x215));if(!_0x14f1e3&&MASKED_PASSWORD_VALUES[_0x29a237(0x1f9)](String(_0x412293['password']??'')))throw CliErrors[_0x29a237(0x1f7)](_0x29a237(0x1f8));const _0x1cddb0=_0xc9608e['str'](_0x29a237(0x210));if(_0x1cddb0)_0x277b8e[_0x29a237(0x1f1)]=_0x1cddb0;const _0x9418cc=_0xc9608e['str'](_0x29a237(0x211));if(_0x9418cc)_0x277b8e[_0x29a237(0x20f)]=_0x9418cc[_0x29a237(0x200)]();const _0x1283d4=_0xc9608e[_0x29a237(0x1f2)](_0x29a237(0x1ef));if(_0x1283d4)_0x277b8e['username']=_0x1283d4;if(_0x14f1e3)_0x277b8e['password']=_0x14f1e3;const _0x21c636=_0xc9608e['str'](_0x29a237(0x1fd));if(_0x21c636)_0x277b8e['dbParam']=_0x21c636;const _0x176eb7=_0xc9608e[_0x29a237(0x1f2)](_0x29a237(0x20c));if(_0x176eb7)_0x277b8e[_0x29a237(0x205)]=_0x176eb7;return _0x277b8e;}export const dbUpdate={'service':'db','command':'update','description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a94_0x2013f1(0x20a),'description':'New\x20database\x20name'},{'name':'dburl','type':a94_0x2013f1(0x20a),'description':a94_0x2013f1(0x20e)},{'name':a94_0x2013f1(0x1ef),'type':a94_0x2013f1(0x20a),'description':a94_0x2013f1(0x214)},{'name':a94_0x2013f1(0x1f5),'type':a94_0x2013f1(0x20a),'description':a94_0x2013f1(0x1fb)},{'name':'dbparam','type':a94_0x2013f1(0x20a),'description':a94_0x2013f1(0x1fc)},{'name':a94_0x2013f1(0x20c),'type':a94_0x2013f1(0x20a),'description':a94_0x2013f1(0x1ff)},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x34e88e){const _0x4d3aa3=a94_0x2013f1,_0x5e768b=_0x34e88e[_0x4d3aa3(0x1f2)]('dburl');if(_0x5e768b&&!validateDbUrl(_0x5e768b['trim']()))throw CliErrors['validation']('Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22'+_0x5e768b+'\x22');},async 'dryRun'(_0x2bca65){const _0x7bc538=a94_0x2013f1,_0x18798a=_0x2bca65['num']('id'),_0x21db5a=await getDbLinkInfo(_0x18798a),_0x3cf757=mergeDbLinkUpdate(_0x21db5a,_0x2bca65),_0x47fff2=sanitizeDbLinkForOutput(_0x3cf757);return{'method':'POST','url':_0x7bc538(0x202),'body':_0x47fff2,'description':_0x7bc538(0x201),'connectionPreflight':{'enabled':!_0x2bca65[_0x7bc538(0x216)](_0x7bc538(0x1f4)),'executed':![]}};},async 'execute'(_0x4ee4fd){const _0x472c53=a94_0x2013f1,_0x14f8da=_0x4ee4fd[_0x472c53(0x203)]('id'),_0x54eb6b=await getDbLinkInfo(_0x14f8da),_0x51423e=mergeDbLinkUpdate(_0x54eb6b,_0x4ee4fd);!_0x4ee4fd[_0x472c53(0x216)](_0x472c53(0x1f4))&&await assertDbLinkConnectionPreflight(_0x51423e);const {id:_0x361362,entity:_0x155a59}=normalizeEntityWithIdResponse(await updateDbLink(_0x51423e));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x155a59),'message':_0x472c53(0x1f0)+(_0x361362??_0x14f8da)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a95_0x80492c=a95_0x21b1;(function(_0x55edf2,_0x1a20c8){const _0x33122f=a95_0x21b1,_0x1b48f7=_0x55edf2();while(!![]){try{const _0x4f23db=-parseInt(_0x33122f(0x137))/0x1+parseInt(_0x33122f(0x18f))/0x2*(-parseInt(_0x33122f(0x174))/0x3)+parseInt(_0x33122f(0x148))/0x4*(-parseInt(_0x33122f(0x177))/0x5)+-parseInt(_0x33122f(0x16e))/0x6*(parseInt(_0x33122f(0x18b))/0x7)+parseInt(_0x33122f(0x14c))/0x8*(parseInt(_0x33122f(0x16d))/0x9)+parseInt(_0x33122f(0x138))/0xa*(parseInt(_0x33122f(0x18e))/0xb)+parseInt(_0x33122f(0x155))/0xc*(parseInt(_0x33122f(0x17c))/0xd);if(_0x4f23db===_0x1a20c8)break;else _0x1b48f7['push'](_0x1b48f7['shift']());}catch(_0x82ea6b){_0x1b48f7['push'](_0x1b48f7['shift']());}}}(a95_0x124f,0xd5044));import a95_0x1956d5 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 a95_0x124f(){const _0x7f95b6=['⚠\x20Empty\x20(treated\x20as\x20{})','repeat','gray','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','padEnd','apps','\x20←\x20current','bold','(no\x20file)','9MpcWgu','6EIhtMn','status','(set\x20via\x20file,\x20length=','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','39GoeoBf','red','\x20\x20Built-in\x20Skill','14585UVhQSJ','apiDir','✗\x20Invalid\x20JSON','packageVersion','cookie','10379993qmKyXQ','(not\x20set)','\x20\x20Package\x20Version:\x20','state','format','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','source','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','reason','appCode','doctor','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(unknown)','env','current','11805619GTVFzZ','\x20\x20Apps','\x20\x20Auth','11FqczwX','58342HhIPwD','\x20\x20Config\x20JSON','unknown','\x20(default)','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','(missing)','raw','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20accessKey:\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','missing','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','riskLevel','accessKey','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','1024788YiNUBp','13132390BoDxKL','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','installedPath','\x20doctor','\x20\x20Skill\x20Version:\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','platform','length','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','Global','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','appcode','currentApp','752RCgbYC','✓\x20Valid\x20JSON','(none)','verbose','12810232hUGLFh','\x20\x20Merged\x20Config','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','(not\x20found)','skillVersion','green','yellow','slice','empty','24ovFJVc','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','\x20\x20Installed\x20Path:\x20\x20','log','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Expired','Project','version','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','value'];a95_0x124f=function(){return _0x7f95b6;};return a95_0x124f();}import{buildAppDoctorFields}from'../config/schema.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x4c89d1){const _0x606d31=a95_0x21b1,_0x120d89=GIT_COMMIT!==_0x606d31(0x191)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x606d31(0x153)](0x0,0xa)+')':VERSION,_0xbf1e3d=buildConfigFromFlags({}),_0x720cff=getCookie();console['log'](),console[_0x606d31(0x159)](a95_0x1956d5['bold'](CLI_BIN_NAME+_0x606d31(0x13b))),console[_0x606d31(0x159)](a95_0x1956d5[_0x606d31(0x164)]('─'['repeat'](0x32))),console[_0x606d31(0x159)](_0x606d31(0x160)+_0x120d89),console[_0x606d31(0x159)](_0x606d31(0x166)+process[_0x606d31(0x15e)]),console[_0x606d31(0x159)](_0x606d31(0x165)+process[_0x606d31(0x140)]+'\x20'+process['arch']);const _0x2428cd=inspectBuiltinSkill();console[_0x606d31(0x159)](),console['log'](a95_0x1956d5[_0x606d31(0x16b)](_0x606d31(0x176))),console[_0x606d31(0x159)](a95_0x1956d5[_0x606d31(0x164)]('\x20\x20─'[_0x606d31(0x163)](0x1e)));const _0x13dac4=_0x2428cd[_0x606d31(0x17f)]==='current'?a95_0x1956d5[_0x606d31(0x151)]('✓\x20'+_0x2428cd[_0x606d31(0x17f)]):a95_0x1956d5[_0x606d31(0x175)]('✗\x20'+_0x2428cd['state']);console[_0x606d31(0x159)](_0x606d31(0x142)+_0x13dac4),console['log'](_0x606d31(0x17e)+_0x2428cd[_0x606d31(0x17a)]),console[_0x606d31(0x159)](_0x606d31(0x13c)+(_0x2428cd[_0x606d31(0x150)]||a95_0x1956d5['gray'](_0x606d31(0x188)))),console[_0x606d31(0x159)](_0x606d31(0x158)+(_0x2428cd[_0x606d31(0x13a)]||a95_0x1956d5[_0x606d31(0x164)]('(not\x20found)')));if(_0x2428cd[_0x606d31(0x184)])console[_0x606d31(0x159)](_0x606d31(0x15b)+_0x2428cd[_0x606d31(0x184)]);_0x2428cd[_0x606d31(0x17f)]!==_0x606d31(0x18a)&&console['log'](_0x606d31(0x12d)+_0x2428cd['repairCommand']);console[_0x606d31(0x159)](),console[_0x606d31(0x159)](a95_0x1956d5[_0x606d31(0x16b)](_0x606d31(0x133))),console[_0x606d31(0x159)](a95_0x1956d5['gray'](_0x606d31(0x13f)[_0x606d31(0x163)](0x1e)));const _0x3fbc4b=getGlobalConfigPath(),_0x4eb657=getProjectConfigPath();console[_0x606d31(0x159)](_0x606d31(0x15f)+(_0x3fbc4b||a95_0x1956d5['gray']('(not\x20found)'))),console[_0x606d31(0x159)](_0x606d31(0x171)+(_0x4eb657||a95_0x1956d5[_0x606d31(0x164)](_0x606d31(0x14f)))),console[_0x606d31(0x159)](),console['log'](a95_0x1956d5[_0x606d31(0x16b)](_0x606d31(0x190))),console[_0x606d31(0x159)](a95_0x1956d5[_0x606d31(0x164)]('\x20\x20─'[_0x606d31(0x163)](0x1e)));const _0x13f178=(_0xce474a,_0x66bb07)=>{const _0x1b1d3c=_0x606d31;if(!_0x66bb07){console[_0x1b1d3c(0x159)]('\x20\x20'+_0xce474a['padEnd'](0x11)+'\x20'+a95_0x1956d5['gray'](_0x1b1d3c(0x16c)));return;}const _0x443701=inspectCliConfigJsonFile(_0x66bb07);if(_0x443701['status']==='ok')console[_0x1b1d3c(0x159)]('\x20\x20'+_0xce474a['padEnd'](0x11)+'\x20'+a95_0x1956d5[_0x1b1d3c(0x151)](_0x1b1d3c(0x149)));else{if(_0x443701['status']===_0x1b1d3c(0x154))console[_0x1b1d3c(0x159)]('\x20\x20'+_0xce474a[_0x1b1d3c(0x168)](0x11)+'\x20'+a95_0x1956d5[_0x1b1d3c(0x152)](_0x1b1d3c(0x162)));else _0x443701[_0x1b1d3c(0x16f)]===_0x1b1d3c(0x131)?console['log']('\x20\x20'+_0xce474a[_0x1b1d3c(0x168)](0x11)+'\x20'+a95_0x1956d5[_0x1b1d3c(0x164)](_0x1b1d3c(0x194))):(console[_0x1b1d3c(0x159)]('\x20\x20'+_0xce474a[_0x1b1d3c(0x168)](0x11)+'\x20'+a95_0x1956d5[_0x1b1d3c(0x175)](_0x1b1d3c(0x179))),console[_0x1b1d3c(0x159)]('\x20\x20'+''[_0x1b1d3c(0x168)](0x11)+'\x20'+a95_0x1956d5[_0x1b1d3c(0x175)](_0x443701['message'])));}};_0x13f178(_0x606d31(0x144),_0x3fbc4b),_0x13f178(_0x606d31(0x15d),_0x4eb657),console[_0x606d31(0x159)](),console['log'](a95_0x1956d5[_0x606d31(0x16b)](_0x606d31(0x14d))),console['log'](a95_0x1956d5['gray']('\x20\x20─'[_0x606d31(0x163)](0x1e))),console['log']('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xbf1e3d[_0x606d31(0x185)]||a95_0x1956d5['red'](_0x606d31(0x17d)))),console['log'](_0x606d31(0x173)+_0xbf1e3d[_0x606d31(0x189)]),console[_0x606d31(0x159)](_0x606d31(0x13d)+_0xbf1e3d['locale']),console[_0x606d31(0x159)](_0x606d31(0x139)+_0xbf1e3d['apiDir']),console['log'](_0x606d31(0x132)+(_0xbf1e3d['defaultApp']||a95_0x1956d5[_0x606d31(0x164)]('(none)'))),console['log'](_0x606d31(0x193)+(_0xbf1e3d[_0x606d31(0x147)]||a95_0x1956d5[_0x606d31(0x164)](_0x606d31(0x14a)))),console[_0x606d31(0x159)]('\x20\x20explicitAppName:\x20'+(_0xbf1e3d['explicitAppName']||a95_0x1956d5[_0x606d31(0x164)](_0x606d31(0x14a)))),console['log']('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xbf1e3d[_0x606d31(0x180)]||a95_0x1956d5[_0x606d31(0x164)](_0x606d31(0x157)+DEFAULT_CONFIG_VALUES[_0x606d31(0x180)]+')'))),console[_0x606d31(0x159)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xbf1e3d['pageSize']??a95_0x1956d5[_0x606d31(0x164)]('(default)'))),console[_0x606d31(0x159)](_0x606d31(0x13e)+_0xbf1e3d[_0x606d31(0x134)]),console[_0x606d31(0x159)](_0x606d31(0x183)+_0xbf1e3d[_0x606d31(0x14b)]),console[_0x606d31(0x159)](_0x606d31(0x181)+(_0xbf1e3d[_0x606d31(0x17b)]?a95_0x1956d5[_0x606d31(0x151)](_0x606d31(0x172)+_0xbf1e3d['cookie'][_0x606d31(0x141)]+')'):_0x720cff?a95_0x1956d5[_0x606d31(0x151)](_0x606d31(0x170)+_0x720cff['length']+')'):a95_0x1956d5[_0x606d31(0x164)](_0x606d31(0x14a))));const _0x599339=Object['keys'](_0xbf1e3d[_0x606d31(0x169)]);if(_0x599339[_0x606d31(0x141)]>0x0){console['log'](),console[_0x606d31(0x159)](a95_0x1956d5[_0x606d31(0x16b)](_0x606d31(0x18c))),console['log'](a95_0x1956d5[_0x606d31(0x164)](_0x606d31(0x13f)['repeat'](0x1e)));for(const _0x55aa6b of _0x599339){const _0x4cb0a5=_0xbf1e3d[_0x606d31(0x169)][_0x55aa6b],_0xaa6c6c=_0x55aa6b===_0xbf1e3d['defaultApp'],_0x2f53ce=_0x55aa6b===_0xbf1e3d['currentApp'],_0x1e6b97=_0x2f53ce?a95_0x1956d5['green'](_0x606d31(0x16a)):'',_0xcb6efa=_0xaa6c6c?_0x606d31(0x192):'';console[_0x606d31(0x159)]('\x20\x20'+_0x55aa6b+_0xcb6efa+_0x1e6b97),console['log'](_0x606d31(0x145)+_0x4cb0a5[_0x606d31(0x146)]);const _0x1843f1=buildAppDoctorFields(_0x4cb0a5,{'env':_0xbf1e3d[_0x606d31(0x189)],'apiDir':_0xbf1e3d[_0x606d31(0x195)][_0x606d31(0x178)]||DEFAULT_CONFIG_VALUES[_0x606d31(0x178)],'cookie':_0xbf1e3d[_0x606d31(0x17b)]||_0x720cff||undefined,'accessKey':_0xbf1e3d[_0x606d31(0x135)]});console[_0x606d31(0x159)](_0x606d31(0x156)+_0x1843f1[_0x606d31(0x189)][_0x606d31(0x161)]+'\x20\x20'+a95_0x1956d5['gray']('('+_0x1843f1[_0x606d31(0x189)][_0x606d31(0x182)]+')')),console[_0x606d31(0x159)](_0x606d31(0x14e)+_0x1843f1[_0x606d31(0x178)][_0x606d31(0x161)]+'\x20\x20'+a95_0x1956d5['gray']('('+_0x1843f1['apiDir']['source']+')'));const _0x54b402=_0x1843f1[_0x606d31(0x17b)][_0x606d31(0x161)]?a95_0x1956d5[_0x606d31(0x151)]('(set,\x20length='+_0x1843f1[_0x606d31(0x17b)][_0x606d31(0x161)]['length']+')'):a95_0x1956d5['gray']('(none)');console[_0x606d31(0x159)]('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x54b402+'\x20\x20'+a95_0x1956d5[_0x606d31(0x164)]('('+_0x1843f1[_0x606d31(0x17b)][_0x606d31(0x182)]+')'));const _0x41e709=_0x1843f1[_0x606d31(0x135)][_0x606d31(0x161)]?a95_0x1956d5[_0x606d31(0x151)](_0x606d31(0x172)+_0x1843f1[_0x606d31(0x135)]['value']['length']+')'):a95_0x1956d5[_0x606d31(0x164)]('(none)');console[_0x606d31(0x159)](_0x606d31(0x12e)+_0x41e709+'\x20\x20'+a95_0x1956d5[_0x606d31(0x164)]('('+_0x1843f1[_0x606d31(0x135)][_0x606d31(0x182)]+')'));}}console[_0x606d31(0x159)](),console[_0x606d31(0x159)](a95_0x1956d5[_0x606d31(0x16b)](_0x606d31(0x143))),console['log'](a95_0x1956d5[_0x606d31(0x164)](_0x606d31(0x13f)[_0x606d31(0x163)](0x1e))),console[_0x606d31(0x159)](_0x606d31(0x15a)+getApiDomain()),console[_0x606d31(0x159)](_0x606d31(0x12f)+getUserDomain()),console[_0x606d31(0x159)](_0x606d31(0x130)+getRuntimeDomain()),console['log'](),console[_0x606d31(0x159)](a95_0x1956d5[_0x606d31(0x16b)](_0x606d31(0x18d))),console[_0x606d31(0x159)](a95_0x1956d5['gray'](_0x606d31(0x13f)[_0x606d31(0x163)](0x1e)));if(_0x720cff){const _0x5eb458=await getIsSessionValid();console['log'](_0x606d31(0x187)+(_0x5eb458?a95_0x1956d5[_0x606d31(0x151)]('✓\x20Valid'):a95_0x1956d5['red'](_0x606d31(0x15c))));}else console['log'](_0x606d31(0x187)+a95_0x1956d5['red'](_0x606d31(0x167)));return console[_0x606d31(0x159)](),{'ok':!![]};}function a95_0x21b1(_0x482b71,_0x567531){_0x482b71=_0x482b71-0x12d;const _0x124fbe=a95_0x124f();let _0x21b1e0=_0x124fbe[_0x482b71];return _0x21b1e0;}export const doctorDefinition={'service':a95_0x80492c(0x186),'command':'check','description':a95_0x80492c(0x136),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a95_0x402acd=a95_0x4c5d;(function(_0x92e818,_0x5bb64e){const _0x44ae7a=a95_0x4c5d,_0x3e7539=_0x92e818();while(!![]){try{const _0x37e612=parseInt(_0x44ae7a(0x18f))/0x1*(parseInt(_0x44ae7a(0x18a))/0x2)+parseInt(_0x44ae7a(0x169))/0x3*(-parseInt(_0x44ae7a(0x1b5))/0x4)+parseInt(_0x44ae7a(0x18b))/0x5*(parseInt(_0x44ae7a(0x177))/0x6)+parseInt(_0x44ae7a(0x19a))/0x7+-parseInt(_0x44ae7a(0x198))/0x8+parseInt(_0x44ae7a(0x17f))/0x9*(-parseInt(_0x44ae7a(0x193))/0xa)+-parseInt(_0x44ae7a(0x15f))/0xb*(-parseInt(_0x44ae7a(0x16f))/0xc);if(_0x37e612===_0x5bb64e)break;else _0x3e7539['push'](_0x3e7539['shift']());}catch(_0x3af126){_0x3e7539['push'](_0x3e7539['shift']());}}}(a95_0xc7a2,0xe6c75));import a95_0x1c24fb from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a95_0x4c5d(_0x19ae38,_0x34bfa1){_0x19ae38=_0x19ae38-0x159;const _0xc7a2e6=a95_0xc7a2();let _0x4c5d36=_0xc7a2e6[_0x19ae38];return _0x4c5d36;}import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';function a95_0xc7a2(){const _0x3c53bb=['\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','108sIjAWp','appcode','riskLevel','\x20\x20Built-in\x20Skill','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','installedPath','708MQeols','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','read','cookie','reason','⚠\x20Empty\x20(treated\x20as\x20{})','2724MKKeqN','length','format','green','unknown','\x20\x20Auth','appCode','bold','9AWxMck','apps','state','✗\x20Invalid\x20JSON','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','explicitAppName','(missing)','status','\x20(default)','source','4KeSqZH','11355XNPala','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','defaultApp','current','756681WwBCSm','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','9098070wBTjYR','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','check','repairCommand','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','10837800DNEsWx','pageSize','3328507FHkEvX','\x20\x20Merged\x20Config','skillVersion','accessKey','red','padEnd','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','empty','✗\x20Not\x20logged\x20in','doctor','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','locale','\x20doctor','apiDir','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(unknown)','keys','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Apps','arch','(set,\x20length=','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','slice','repeat','Global','\x20\x20Installed\x20Path:\x20\x20','135892zhynRb','currentApp','Project','\x20\x20─','platform','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20accessKey:\x20\x20','env','packageVersion','raw','✓\x20Valid\x20JSON','263428lTosIE','\x20\x20Config\x20JSON','(default:\x20','gray','verbose','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','value','log'];a95_0xc7a2=function(){return _0x3c53bb;};return a95_0xc7a2();}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(_0x44c68d){const _0x250870=a95_0x4c5d,_0x3b819b=GIT_COMMIT!==_0x250870(0x17b)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x250870(0x1b1)](0x0,0xa)+')':VERSION,_0x531e3f=buildConfigFromFlags({}),_0x4fabee=getCookie();console['log'](),console[_0x250870(0x166)](a95_0x1c24fb['bold'](CLI_BIN_NAME+_0x250870(0x1a7))),console[_0x250870(0x166)](a95_0x1c24fb[_0x250870(0x162)]('─'[_0x250870(0x1b2)](0x32))),console[_0x250870(0x166)](_0x250870(0x18c)+_0x3b819b),console['log'](_0x250870(0x170)+process['version']),console['log'](_0x250870(0x197)+process[_0x250870(0x1b9)]+'\x20'+process[_0x250870(0x1ae)]);const _0x35a8e=inspectBuiltinSkill();console['log'](),console[_0x250870(0x166)](a95_0x1c24fb[_0x250870(0x17e)](_0x250870(0x16c))),console[_0x250870(0x166)](a95_0x1c24fb[_0x250870(0x162)](_0x250870(0x1b8)[_0x250870(0x1b2)](0x1e)));const _0x599c79=_0x35a8e['state']===_0x250870(0x18e)?a95_0x1c24fb[_0x250870(0x17a)]('✓\x20'+_0x35a8e[_0x250870(0x181)]):a95_0x1c24fb[_0x250870(0x19e)]('✗\x20'+_0x35a8e[_0x250870(0x181)]);console[_0x250870(0x166)]('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x599c79),console['log']('\x20\x20Package\x20Version:\x20'+_0x35a8e[_0x250870(0x15c)]),console['log']('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x35a8e[_0x250870(0x19c)]||a95_0x1c24fb[_0x250870(0x162)](_0x250870(0x1aa)))),console['log'](_0x250870(0x1b4)+(_0x35a8e[_0x250870(0x16e)]||a95_0x1c24fb[_0x250870(0x162)]('(not\x20found)')));if(_0x35a8e['reason'])console['log'](_0x250870(0x1ac)+_0x35a8e[_0x250870(0x175)]);_0x35a8e[_0x250870(0x181)]!=='current'&&console[_0x250870(0x166)]('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x35a8e[_0x250870(0x196)]);console[_0x250870(0x166)](),console[_0x250870(0x166)](a95_0x1c24fb[_0x250870(0x17e)](_0x250870(0x184))),console[_0x250870(0x166)](a95_0x1c24fb['gray'](_0x250870(0x1b8)[_0x250870(0x1b2)](0x1e)));const _0x33d184=getGlobalConfigPath(),_0x5b0252=getProjectConfigPath();console[_0x250870(0x166)](_0x250870(0x190)+(_0x33d184||a95_0x1c24fb[_0x250870(0x162)]('(not\x20found)'))),console[_0x250870(0x166)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5b0252||a95_0x1c24fb[_0x250870(0x162)]('(not\x20found)'))),console['log'](),console[_0x250870(0x166)](a95_0x1c24fb[_0x250870(0x17e)](_0x250870(0x160))),console['log'](a95_0x1c24fb['gray'](_0x250870(0x1b8)[_0x250870(0x1b2)](0x1e)));const _0x5acd97=(_0x3aee9b,_0x166fe6)=>{const _0x2f693c=_0x250870;if(!_0x166fe6){console[_0x2f693c(0x166)]('\x20\x20'+_0x3aee9b[_0x2f693c(0x19f)](0x11)+'\x20'+a95_0x1c24fb[_0x2f693c(0x162)](_0x2f693c(0x191)));return;}const _0x8af78c=inspectCliConfigJsonFile(_0x166fe6);if(_0x8af78c[_0x2f693c(0x187)]==='ok')console[_0x2f693c(0x166)]('\x20\x20'+_0x3aee9b[_0x2f693c(0x19f)](0x11)+'\x20'+a95_0x1c24fb['green'](_0x2f693c(0x15e)));else{if(_0x8af78c['status']===_0x2f693c(0x1a2))console[_0x2f693c(0x166)]('\x20\x20'+_0x3aee9b[_0x2f693c(0x19f)](0x11)+'\x20'+a95_0x1c24fb[_0x2f693c(0x172)](_0x2f693c(0x176)));else _0x8af78c[_0x2f693c(0x187)]==='missing'?console['log']('\x20\x20'+_0x3aee9b[_0x2f693c(0x19f)](0x11)+'\x20'+a95_0x1c24fb[_0x2f693c(0x162)](_0x2f693c(0x186))):(console[_0x2f693c(0x166)]('\x20\x20'+_0x3aee9b['padEnd'](0x11)+'\x20'+a95_0x1c24fb[_0x2f693c(0x19e)](_0x2f693c(0x182))),console['log']('\x20\x20'+''[_0x2f693c(0x19f)](0x11)+'\x20'+a95_0x1c24fb[_0x2f693c(0x19e)](_0x8af78c['message'])));}};_0x5acd97(_0x250870(0x1b3),_0x33d184),_0x5acd97(_0x250870(0x1b7),_0x5b0252),console[_0x250870(0x166)](),console[_0x250870(0x166)](a95_0x1c24fb[_0x250870(0x17e)](_0x250870(0x19b))),console[_0x250870(0x166)](a95_0x1c24fb[_0x250870(0x162)](_0x250870(0x1b8)[_0x250870(0x1b2)](0x1e))),console[_0x250870(0x166)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x531e3f[_0x250870(0x17d)]||a95_0x1c24fb['red']('(not\x20set)'))),console[_0x250870(0x166)](_0x250870(0x183)+_0x531e3f[_0x250870(0x15b)]),console['log'](_0x250870(0x171)+_0x531e3f[_0x250870(0x1a6)]),console['log'](_0x250870(0x1a9)+_0x531e3f['apiDir']),console[_0x250870(0x166)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x531e3f[_0x250870(0x18d)]||a95_0x1c24fb[_0x250870(0x162)](_0x250870(0x1a1)))),console['log'](_0x250870(0x159)+(_0x531e3f[_0x250870(0x1b6)]||a95_0x1c24fb['gray'](_0x250870(0x1a1)))),console[_0x250870(0x166)]('\x20\x20explicitAppName:\x20'+(_0x531e3f[_0x250870(0x185)]||a95_0x1c24fb[_0x250870(0x162)](_0x250870(0x1a1)))),console['log'](_0x250870(0x194)+(_0x531e3f[_0x250870(0x179)]||a95_0x1c24fb[_0x250870(0x162)](_0x250870(0x161)+DEFAULT_CONFIG_VALUES[_0x250870(0x179)]+')'))),console[_0x250870(0x166)](_0x250870(0x167)+(_0x531e3f[_0x250870(0x199)]??a95_0x1c24fb[_0x250870(0x162)]('(default)'))),console['log']('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x531e3f[_0x250870(0x16b)]),console['log'](_0x250870(0x16d)+_0x531e3f[_0x250870(0x163)]),console[_0x250870(0x166)](_0x250870(0x164)+(_0x531e3f['cookie']?a95_0x1c24fb[_0x250870(0x17a)]('(set,\x20length='+_0x531e3f[_0x250870(0x174)][_0x250870(0x178)]+')'):_0x4fabee?a95_0x1c24fb[_0x250870(0x17a)]('(set\x20via\x20file,\x20length='+_0x4fabee[_0x250870(0x178)]+')'):a95_0x1c24fb['gray'](_0x250870(0x1a1))));const _0x41123a=Object[_0x250870(0x1ab)](_0x531e3f[_0x250870(0x180)]);if(_0x41123a['length']>0x0){console[_0x250870(0x166)](),console[_0x250870(0x166)](a95_0x1c24fb[_0x250870(0x17e)](_0x250870(0x1ad))),console['log'](a95_0x1c24fb['gray'](_0x250870(0x1b8)[_0x250870(0x1b2)](0x1e)));for(const _0x23b264 of _0x41123a){const _0x4a8ad9=_0x531e3f[_0x250870(0x180)][_0x23b264],_0x4ced56=_0x23b264===_0x531e3f['defaultApp'],_0x5a9168=_0x23b264===_0x531e3f['currentApp'],_0x166ae3=_0x5a9168?a95_0x1c24fb[_0x250870(0x17a)]('\x20←\x20current'):'',_0x5af9a3=_0x4ced56?_0x250870(0x188):'';console['log']('\x20\x20'+_0x23b264+_0x5af9a3+_0x166ae3),console[_0x250870(0x166)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x4a8ad9[_0x250870(0x16a)]);const _0x31100f=buildAppDoctorFields(_0x4a8ad9,{'env':_0x531e3f[_0x250870(0x15b)],'apiDir':_0x531e3f[_0x250870(0x15d)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x250870(0x1a8)],'cookie':_0x531e3f[_0x250870(0x174)]||_0x4fabee||undefined,'accessKey':_0x531e3f[_0x250870(0x19d)]});console[_0x250870(0x166)]('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x31100f[_0x250870(0x15b)]['value']+'\x20\x20'+a95_0x1c24fb['gray']('('+_0x31100f[_0x250870(0x15b)][_0x250870(0x189)]+')')),console['log'](_0x250870(0x168)+_0x31100f[_0x250870(0x1a8)]['value']+'\x20\x20'+a95_0x1c24fb['gray']('('+_0x31100f[_0x250870(0x1a8)][_0x250870(0x189)]+')'));const _0x440e96=_0x31100f[_0x250870(0x174)][_0x250870(0x165)]?a95_0x1c24fb[_0x250870(0x17a)](_0x250870(0x1af)+_0x31100f[_0x250870(0x174)][_0x250870(0x165)][_0x250870(0x178)]+')'):a95_0x1c24fb[_0x250870(0x162)]('(none)');console[_0x250870(0x166)](_0x250870(0x1b0)+_0x440e96+'\x20\x20'+a95_0x1c24fb[_0x250870(0x162)]('('+_0x31100f[_0x250870(0x174)]['source']+')'));const _0x1ad0ed=_0x31100f[_0x250870(0x19d)][_0x250870(0x165)]?a95_0x1c24fb[_0x250870(0x17a)](_0x250870(0x1af)+_0x31100f[_0x250870(0x19d)]['value'][_0x250870(0x178)]+')'):a95_0x1c24fb[_0x250870(0x162)](_0x250870(0x1a1));console[_0x250870(0x166)](_0x250870(0x15a)+_0x1ad0ed+'\x20\x20'+a95_0x1c24fb[_0x250870(0x162)]('('+_0x31100f[_0x250870(0x19d)][_0x250870(0x189)]+')'));}}console[_0x250870(0x166)](),console[_0x250870(0x166)](a95_0x1c24fb['bold']('\x20\x20API\x20Endpoints')),console[_0x250870(0x166)](a95_0x1c24fb['gray'](_0x250870(0x1b8)[_0x250870(0x1b2)](0x1e))),console[_0x250870(0x166)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x250870(0x166)](_0x250870(0x192)+getUserDomain()),console[_0x250870(0x166)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console['log'](),console[_0x250870(0x166)](a95_0x1c24fb[_0x250870(0x17e)](_0x250870(0x17c))),console['log'](a95_0x1c24fb[_0x250870(0x162)](_0x250870(0x1b8)[_0x250870(0x1b2)](0x1e)));if(_0x4fabee){const _0x239ea5=await getIsSessionValid();console[_0x250870(0x166)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x239ea5?a95_0x1c24fb[_0x250870(0x17a)]('✓\x20Valid'):a95_0x1c24fb[_0x250870(0x19e)]('✗\x20Expired')));}else console['log'](_0x250870(0x1a0)+a95_0x1c24fb['red'](_0x250870(0x1a3)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a95_0x402acd(0x1a4),'command':a95_0x402acd(0x195),'description':a95_0x402acd(0x1a5),'risk':a95_0x402acd(0x173),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x286c84=a96_0x3c87;function a96_0x5e4d(){const _0x446778=['appCode','string','16434072WYgAzu','10154872LkAtYq','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','long-term','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','filePath','2942256CzgNKc','Uploaded\x20file:\x20','64026AuSjMk','1424616zqrcqe','Path\x20to\x20the\x20local\x20file\x20to\x20upload','trim','str','boolean','87zslVKF','1317656IfDzgj','5105dchsFj','POST','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','path','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','query-url','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','10206sglvNa','download','File','upload','filepath','Preview:\x20upload\x20','validation','file','read'];a96_0x5e4d=function(){return _0x446778;};return a96_0x5e4d();}(function(_0x55add8,_0x22ce03){const _0x26c065=a96_0x3c87,_0x6109c6=_0x55add8();while(!![]){try{const _0x288520=-parseInt(_0x26c065(0x156))/0x1+parseInt(_0x26c065(0x171))/0x2*(parseInt(_0x26c065(0x177))/0x3)+parseInt(_0x26c065(0x172))/0x4+-parseInt(_0x26c065(0x157))/0x5*(-parseInt(_0x26c065(0x15e))/0x6)+parseInt(_0x26c065(0x16a))/0x7+-parseInt(_0x26c065(0x16f))/0x8+-parseInt(_0x26c065(0x169))/0x9;if(_0x288520===_0x22ce03)break;else _0x6109c6['push'](_0x6109c6['shift']());}catch(_0x3dd65e){_0x6109c6['push'](_0x6109c6['shift']());}}}(a96_0x5e4d,0xea7f6));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':'file','type':a96_0x286c84(0x168),'required':!![],'description':a96_0x286c84(0x173)},FILEPATH_FLAG={'name':a96_0x286c84(0x162),'type':'string','required':!![],'description':a96_0x286c84(0x16b)},DOWNLOAD_FLAG={'name':a96_0x286c84(0x15f),'type':a96_0x286c84(0x176),'description':a96_0x286c84(0x16d)},LONG_TERM_FLAG={'name':'long-term','type':a96_0x286c84(0x176),'description':a96_0x286c84(0x15b)};function a96_0x3c87(_0x599ca7,_0x4da1a9){_0x599ca7=_0x599ca7-0x156;const _0x5e4d04=a96_0x5e4d();let _0x3c87ea=_0x5e4d04[_0x599ca7];return _0x3c87ea;}function requireFilePath(_0x367561){const _0x90b857=a96_0x286c84,_0xda13cc=_0x367561[_0x90b857(0x174)]();if(!_0xda13cc)throw CliErrors[_0x90b857(0x164)]('filePath\x20is\x20required.');return _0xda13cc;}const fileUpload={'service':a96_0x286c84(0x165),'command':a96_0x286c84(0x161),'description':a96_0x286c84(0x15d),'risk':a96_0x286c84(0x166),'flags':[FILE_FLAG],async 'dryRun'(_0x362170){const _0x12fa2b=a96_0x286c84,_0x5a1242=requireDevelopmentUploadFile(_0x362170[_0x12fa2b(0x175)](_0x12fa2b(0x165)),_0x12fa2b(0x160));return{'method':_0x12fa2b(0x158),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x362170[_0x12fa2b(0x167)],'multipart':{'file':_0x5a1242}},'description':_0x12fa2b(0x163)+_0x5a1242[_0x12fa2b(0x15a)]+'\x20to\x20development\x20app\x20'+_0x362170[_0x12fa2b(0x167)]};},async 'execute'(_0x377da8){const _0x37f468=a96_0x286c84,_0x4f1ff7=requireDevelopmentUploadFile(_0x377da8[_0x37f468(0x175)](_0x37f468(0x165)),'File'),_0x3674a5=await uploadDevelopmentFile(_0x377da8[_0x37f468(0x167)],_0x4f1ff7['path']);return{'ok':!![],'data':_0x3674a5,'message':_0x3674a5[_0x37f468(0x16e)]?_0x37f468(0x170)+_0x3674a5[_0x37f468(0x16e)]+_0x37f468(0x159):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a96_0x286c84(0x165),'command':a96_0x286c84(0x15c),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','risk':a96_0x286c84(0x166),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x24efa2){const _0x38c622=a96_0x286c84,_0x2d2129=requireFilePath(_0x24efa2[_0x38c622(0x175)](_0x38c622(0x162))),_0x24a2f4=await queryDevelopmentFileUrl(_0x2d2129,{'download':_0x24efa2['bool'](_0x38c622(0x15f)),'longTerm':_0x24efa2['bool'](_0x38c622(0x16c))});return{'ok':!![],'data':_0x24a2f4};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x3e734d=a97_0xbf60;(function(_0x203835,_0x25d3cf){const _0x22da6e=a97_0xbf60,_0x2ed706=_0x203835();while(!![]){try{const _0x309327=parseInt(_0x22da6e(0x114))/0x1+parseInt(_0x22da6e(0x12e))/0x2*(parseInt(_0x22da6e(0x12b))/0x3)+-parseInt(_0x22da6e(0x112))/0x4*(parseInt(_0x22da6e(0x126))/0x5)+parseInt(_0x22da6e(0x11c))/0x6*(-parseInt(_0x22da6e(0x12c))/0x7)+parseInt(_0x22da6e(0x132))/0x8+parseInt(_0x22da6e(0x108))/0x9*(parseInt(_0x22da6e(0x109))/0xa)+-parseInt(_0x22da6e(0x11d))/0xb;if(_0x309327===_0x25d3cf)break;else _0x2ed706['push'](_0x2ed706['shift']());}catch(_0x3bd0cf){_0x2ed706['push'](_0x2ed706['shift']());}}}(a97_0x2200,0xc8471));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';function a97_0x2200(){const _0x399d22=['project','env','join','App\x20code\x20to\x20initialize\x20with','bool','write','appcode','25685SvxVzw','Write\x20to\x20global\x20config\x20instead\x20of\x20project','Auto-confirm\x20prompts','appCode','validation','12JKMITZ','857766BIwUNq','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','736130uAComY','init','\x20\x20Default:\x20','nonInteractive','1863056AmXSmx','str','检测到旧配置文件,正在自动升级...\x0a','\x20\x20Apps:\x20','\x20config','flagMissing','950013NySdsi','10VhfKdx','log','\x20\x20Env:\x20','cwd','production','yes','custom','\x20\x20Config:\x20','string','436Wxlixm','boolean','1418239lsSWna','message','defaultApp','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','valid','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','toLocaleString','run','24VFqhLF','14943676PTYGAK','global'];a97_0x2200=function(){return _0x399d22;};return a97_0x2200();}import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';function a97_0xbf60(_0x3b930a,_0x2ed083){_0x3b930a=_0x3b930a-0x104;const _0x2200d8=a97_0x2200();let _0xbf60ce=_0x2200d8[_0x3b930a];return _0xbf60ce;}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(_0xa4b67a){return{'appCode':_0xa4b67a,'appName':_0xa4b67a};}function writeInitConfig(_0x5400ab,_0xe320a1,_0x11d60e){const _0x2512e2=a97_0xbf60,_0x1040f3=resolveWriteConfigPath(_0x5400ab),_0x271cca=buildCanonicalProjectConfig({},{'appCodes':_0xe320a1['map'](_0x4f8749=>_0x4f8749[_0x2512e2(0x129)]),'env':_0x11d60e,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x2512e2(0x11a)]()}});writeConfigFile(_0x1040f3,_0x271cca);const _0x34db22=_0x5400ab==='global'?'global':_0x2512e2(0x11f);console['log']('\x0a✓\x20Successfully\x20initialized\x20'+_0x34db22+_0x2512e2(0x106)),console[_0x2512e2(0x10a)](_0x2512e2(0x105)+_0xe320a1['map'](_0x63ff3e=>_0x63ff3e[_0x2512e2(0x129)])[_0x2512e2(0x121)](',\x20')),console[_0x2512e2(0x10a)](_0x2512e2(0x130)+_0x271cca[_0x2512e2(0x116)]),console[_0x2512e2(0x10a)](_0x2512e2(0x10b)+_0x271cca[_0x2512e2(0x120)]),console['log'](_0x2512e2(0x110)+_0x1040f3);}async function runSmartInit(_0x279389){const _0x29672e=a97_0xbf60,_0x193e29=process[_0x29672e(0x10c)](),_0x34fcf7=_0x279389['bool'](_0x29672e(0x11e))?_0x29672e(0x11e):_0x29672e(0x11f),_0x2d8c30=_0x279389[_0x29672e(0x133)](_0x29672e(0x120))||_0x29672e(0x10d),_0x2c3d78=_0x279389['str'](_0x29672e(0x125))||undefined;if(_0x34fcf7===_0x29672e(0x11f)){const _0x162332=existsSync(resolve(_0x193e29,NEW_CONFIG_NAME)),_0x4bfb63=LEGACY_CONFIG_NAMES['some'](_0x4bf89f=>existsSync(resolve(_0x193e29,_0x4bf89f)));if(_0x4bfb63&&!_0x162332)return console[_0x29672e(0x10a)](_0x29672e(0x104)),upgradeApp(_0x279389[_0x29672e(0x131)],{'yes':_0x279389[_0x29672e(0x123)](_0x29672e(0x10e))});if(_0x162332)throw CliErrors['validation'](_0x29672e(0x119),'Use\x20`'+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x2c3d78){const _0x4bbb5e=validateAppcode(_0x2c3d78);if(!_0x4bbb5e[_0x29672e(0x118)])throw CliErrors[_0x29672e(0x12a)](_0x4bbb5e[_0x29672e(0x115)]);writeInitConfig(_0x34fcf7,[syntheticApp(_0x2c3d78)],_0x2d8c30);return;}if(_0x279389['nonInteractive'])throw CliErrors[_0x29672e(0x107)](_0x29672e(0x125),'Usage:\x20'+CLI_BIN_NAME+_0x29672e(0x12d));const _0x19e3e5=getCookie(),_0x1b127f=await selectMultipleApps(_0x19e3e5),_0x531b58=_0x1b127f===_0x29672e(0x10f)?[syntheticApp(await promptCustomAppcode())]:_0x1b127f;writeInitConfig(_0x34fcf7,_0x531b58,_0x2d8c30);}const initFlags=[{'name':a97_0x3e734d(0x11e),'type':a97_0x3e734d(0x113),'description':a97_0x3e734d(0x127),'default':![]},{'name':a97_0x3e734d(0x120),'type':a97_0x3e734d(0x111),'description':'Target\x20environment','default':a97_0x3e734d(0x10d),'enum':[...RABETBASE_ENV_VALUES]},{'name':a97_0x3e734d(0x125),'type':a97_0x3e734d(0x111),'description':a97_0x3e734d(0x122)},{'name':'yes','type':'boolean','description':a97_0x3e734d(0x128),'default':![]}];export const initDefinitions=[{'service':a97_0x3e734d(0x12f),'command':a97_0x3e734d(0x11b),'description':a97_0x3e734d(0x117),'risk':a97_0x3e734d(0x124),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x5943ee){return await runSmartInit(_0x5943ee),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a98_0x1e0e(_0x4f5476,_0x1c9101){_0x4f5476=_0x4f5476-0xe0;const _0x4ca40d=a98_0x4ca4();let _0x1e0e84=_0x4ca40d[_0x4f5476];return _0x1e0e84;}(function(_0x4c8983,_0x576eed){const _0x4577ac=a98_0x1e0e,_0x4429f3=_0x4c8983();while(!![]){try{const _0x5a8eb5=parseInt(_0x4577ac(0xe4))/0x1*(-parseInt(_0x4577ac(0xe3))/0x2)+parseInt(_0x4577ac(0xe5))/0x3+-parseInt(_0x4577ac(0xe0))/0x4+parseInt(_0x4577ac(0xe9))/0x5*(-parseInt(_0x4577ac(0xe6))/0x6)+-parseInt(_0x4577ac(0xe1))/0x7+parseInt(_0x4577ac(0xe8))/0x8+-parseInt(_0x4577ac(0xe7))/0x9*(-parseInt(_0x4577ac(0xe2))/0xa);if(_0x5a8eb5===_0x576eed)break;else _0x4429f3['push'](_0x4429f3['shift']());}catch(_0x581b7f){_0x4429f3['push'](_0x4429f3['shift']());}}}(a98_0x4ca4,0x44ff8));import{issueReport}from'../../commands/issue/report.js';function a98_0x4ca4(){const _0x1a55e6=['8450dpquQs','156664hKYVyL','2653574RNasGP','1932050trwVbN','273814dgKCbW','2TaVnLT','267204SghrLN','318KKNlKg','45mbgIFT','73240ksAFdg'];a98_0x4ca4=function(){return _0x1a55e6;};return a98_0x4ca4();}export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0xe22d3d=a99_0x432a;(function(_0x3eb6cb,_0x2e5006){const _0x1a2a60=a99_0x432a,_0x1294ec=_0x3eb6cb();while(!![]){try{const _0x55af1f=parseInt(_0x1a2a60(0x13b))/0x1+-parseInt(_0x1a2a60(0x154))/0x2*(parseInt(_0x1a2a60(0x13d))/0x3)+parseInt(_0x1a2a60(0x14e))/0x4*(-parseInt(_0x1a2a60(0x146))/0x5)+parseInt(_0x1a2a60(0x14d))/0x6+parseInt(_0x1a2a60(0x150))/0x7+-parseInt(_0x1a2a60(0x14c))/0x8*(-parseInt(_0x1a2a60(0x140))/0x9)+-parseInt(_0x1a2a60(0x138))/0xa*(parseInt(_0x1a2a60(0x13a))/0xb);if(_0x55af1f===_0x2e5006)break;else _0x1294ec['push'](_0x1294ec['shift']());}catch(_0x4afb70){_0x1294ec['push'](_0x1294ec['shift']());}}}(a99_0x5c7d,0xd4969));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a99_0xe22d3d(0x13e);function a99_0x5c7d(){const _0x2650e8=['stderr','Hit\x20a\x20','replace','6788305zDXmoP','flag_missing','command','validation_error','service','config_missing','1154312UugPeE','3227040JjTJYk','4vdNiju','length','10364018caUdWG','\x20\x20Set\x20','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','slice','8rJbhpd','\x20\x20\x20\x20--title\x20\x22','auth_required','=1\x20to\x20silence\x20this\x20hint.','10WMXSAd','\x22\x20\x5c','4368991QPZklC','548343OwYvAu','report','172299BBIAKS','RABETBASE_DISABLE_ISSUE_NUDGE','issue','18tZDHOH','network_error','unknown_command'];a99_0x5c7d=function(){return _0x2650e8;};return a99_0x5c7d();}function a99_0x432a(_0x1447e4,_0x39ce6a){_0x1447e4=_0x1447e4-0x136;const _0x5c7d3d=a99_0x5c7d();let _0x432abe=_0x5c7d3d[_0x1447e4];return _0x432abe;}const NUDGE_SUPPRESSED_CODES=new Set(['cancelled',a99_0xe22d3d(0x136),a99_0xe22d3d(0x14b),'not_in_project',a99_0xe22d3d(0x142),a99_0xe22d3d(0x147),a99_0xe22d3d(0x149),a99_0xe22d3d(0x141)]),defaultWriter=_0x5c42ee=>{const _0x765a5f=a99_0xe22d3d;process[_0x765a5f(0x143)]['write'](_0x5c42ee);};export function shouldNudgeForError(_0x1319a4,_0x45f787){const _0x2f222d=a99_0xe22d3d;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x45f787[_0x2f222d(0x14a)]===_0x2f222d(0x13f)&&_0x45f787['command']===_0x2f222d(0x13c))return![];if(_0x1319a4 instanceof CliError)return!NUDGE_SUPPRESSED_CODES['has'](_0x1319a4['code']);return!![];}export function printIssueReportNudgeForError(_0x5a2187,_0x27896e,_0x57275e=defaultWriter){if(!shouldNudgeForError(_0x5a2187,_0x27896e))return;const _0x444da1=buildSuggestedTitle(_0x5a2187,_0x27896e);_0x57275e(formatNudge(_0x444da1));}function buildSuggestedTitle(_0x589762,_0x57b11e){const _0x2bf619=a99_0xe22d3d,_0x1c896d=_0x589762 instanceof Error?_0x589762['message']:String(_0x589762),_0x5a8e39=_0x1c896d[_0x2bf619(0x145)](/[\r\n]+/g,'\x20')[_0x2bf619(0x145)](/\s+/g,'\x20')['trim']()[_0x2bf619(0x153)](0x0,0x78)[_0x2bf619(0x145)](/"/g,'\x5c\x22'),_0x1be8af=CLI_BIN_NAME+'\x20'+_0x57b11e[_0x2bf619(0x14a)]+'\x20'+_0x57b11e[_0x2bf619(0x148)];return _0x5a8e39[_0x2bf619(0x14f)]>0x0?_0x1be8af+':\x20'+_0x5a8e39:_0x1be8af;}function formatNudge(_0x2da328){const _0x3a5d70=a99_0xe22d3d;return['',_0x3a5d70(0x144)+CLI_BIN_NAME+'\x20bug?\x20Help\x20us\x20fix\x20it:','\x20\x20'+CLI_BIN_NAME+'\x20issue\x20report\x20\x5c',_0x3a5d70(0x155)+_0x2da328+_0x3a5d70(0x139),_0x3a5d70(0x152),'\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)',_0x3a5d70(0x151)+NUDGE_OPT_OUT_ENV+_0x3a5d70(0x137),'']['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x25baf2=a100_0x1537;(function(_0x3f2676,_0x5e5a91){const _0x4c1de3=a100_0x1537,_0x370caf=_0x3f2676();while(!![]){try{const _0x5d279d=-parseInt(_0x4c1de3(0xa7))/0x1+parseInt(_0x4c1de3(0xa1))/0x2+-parseInt(_0x4c1de3(0xa5))/0x3*(parseInt(_0x4c1de3(0x99))/0x4)+parseInt(_0x4c1de3(0xc5))/0x5*(parseInt(_0x4c1de3(0xc8))/0x6)+parseInt(_0x4c1de3(0x91))/0x7+parseInt(_0x4c1de3(0xb1))/0x8+parseInt(_0x4c1de3(0xcc))/0x9*(-parseInt(_0x4c1de3(0x9c))/0xa);if(_0x5d279d===_0x5e5a91)break;else _0x370caf['push'](_0x370caf['shift']());}catch(_0x24ff06){_0x370caf['push'](_0x370caf['shift']());}}}(a100_0x34c0,0x392b8));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';const DESCRIPTION_FILE_FLAG=a100_0x25baf2(0xc6);function a100_0x1537(_0x544d48,_0xc6db9f){_0x544d48=_0x544d48-0x8e;const _0x34c059=a100_0x34c0();let _0x1537a5=_0x34c059[_0x544d48];return _0x1537a5;}export const issueReport={'service':'issue','command':a100_0x25baf2(0xcd),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a100_0x25baf2(0xc4),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a100_0x25baf2(0xb5),'flags':[{'name':'title','type':'string','required':!![],'description':a100_0x25baf2(0xc7)},{'name':a100_0x25baf2(0xbf),'type':a100_0x25baf2(0x8f),'description':a100_0x25baf2(0x96)},{'name':DESCRIPTION_FILE_FLAG,'type':a100_0x25baf2(0x8f),'description':a100_0x25baf2(0xa3)}],async 'validate'(_0x36c1cd){const _0x4f23bc=a100_0x25baf2,_0x3581d8=_0x36c1cd[_0x4f23bc(0xbb)](_0x4f23bc(0x95))['trim'](),_0x2cd9da=_0x36c1cd[_0x4f23bc(0xbb)](_0x4f23bc(0xbf))[_0x4f23bc(0xb3)](),_0x1c4924=_0x36c1cd['str'](DESCRIPTION_FILE_FLAG)[_0x4f23bc(0xb3)]();if(!_0x3581d8)throw CliErrors[_0x4f23bc(0xaf)]('title','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0x45edfe=_0x2cd9da[_0x4f23bc(0x90)]>0x0,_0x263dfb=_0x1c4924['length']>0x0;if(_0x45edfe===_0x263dfb)throw CliErrors['validation'](_0x4f23bc(0xaa),'Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x263dfb){const _0x2aa10d=resolve(process[_0x4f23bc(0xb6)](),_0x1c4924);if(!existsSync(_0x2aa10d))throw CliErrors[_0x4f23bc(0xac)](_0x4f23bc(0xb9)+_0x2aa10d);}},async 'dryRun'(_0x3df36f){const _0x3525d7=a100_0x25baf2,_0x5c1e08=await prepareIssueReport(_0x3df36f);return{'method':_0x3525d7(0xba),'url':'otel://'+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x5c1e08['title'],'issue.description':_0x5c1e08[_0x3525d7(0xbf)],'issue.description_original_bytes':_0x5c1e08[_0x3525d7(0xad)][_0x3525d7(0xc3)],'issue.description_truncated':_0x5c1e08[_0x3525d7(0xad)][_0x3525d7(0x9a)],'issue.description_redactions':_0x5c1e08['sanitize'][_0x3525d7(0xa8)],'issue.description_redaction_kinds':_0x5c1e08[_0x3525d7(0xad)][_0x3525d7(0xbc)][_0x3525d7(0xbd)](',')}},'description':[_0x3525d7(0xcb),'descriptionSource:\x20'+_0x5c1e08[_0x3525d7(0x92)],_0x5c1e08[_0x3525d7(0xa2)]?_0x3525d7(0xb8)+_0x5c1e08[_0x3525d7(0xa2)]:null,_0x5c1e08['sanitize'][_0x3525d7(0x9a)]?_0x3525d7(0x97)+_0x5c1e08['sanitize']['originalBytes']+_0x3525d7(0x94):null,_0x5c1e08[_0x3525d7(0xad)][_0x3525d7(0xa8)]>0x0?'redactions:\x20'+_0x5c1e08['sanitize'][_0x3525d7(0xa8)]+'\x20('+_0x5c1e08[_0x3525d7(0xad)][_0x3525d7(0xbc)][_0x3525d7(0xbd)](',\x20')+')':null][_0x3525d7(0xc2)](Boolean)[_0x3525d7(0xbd)]('\x0a')};},async 'execute'(_0x1d66ea){const _0x4252db=a100_0x25baf2,_0x389442=await prepareIssueReport(_0x1d66ea);try{await sendPlatformIssueCollectLog({'title':_0x389442['title'],'description':_0x389442[_0x4252db(0xbf)],'sanitize':{'originalBytes':_0x389442[_0x4252db(0xad)][_0x4252db(0xc3)],'truncated':_0x389442[_0x4252db(0xad)][_0x4252db(0x9a)],'redactionCount':_0x389442[_0x4252db(0xad)][_0x4252db(0xa8)],'redactionKinds':_0x389442['sanitize'][_0x4252db(0xbc)]}});}catch(_0x399405){throw CliErrors[_0x4252db(0xa6)]('Failed\x20to\x20report\x20platform\x20issue:\x20'+(_0x399405 instanceof Error?_0x399405[_0x4252db(0xb4)]:String(_0x399405)),_0x4252db(0x9b));}return{'ok':!![],'message':buildResultMessage(_0x389442['sanitize']),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x4252db(0xb2),_0x4252db(0x9e),_0x4252db(0xca),_0x4252db(0xbe),_0x4252db(0xae),_0x4252db(0xa9)],'issue':{'title':_0x389442[_0x4252db(0x95)],'descriptionLength':_0x389442[_0x4252db(0xbf)]['length'],'descriptionSource':_0x389442['descriptionSource'],..._0x389442[_0x4252db(0xa2)]?{'descriptionFile':_0x389442[_0x4252db(0xa2)]}:{},'sanitize':{'originalBytes':_0x389442[_0x4252db(0xad)]['originalBytes'],'truncated':_0x389442[_0x4252db(0xad)][_0x4252db(0x9a)],'redactions':_0x389442[_0x4252db(0xad)][_0x4252db(0xa8)],'redactionKinds':_0x389442[_0x4252db(0xad)][_0x4252db(0xbc)]}}}};}};function a100_0x34c0(){const _0x30635d=['push','filter','originalBytes','write','281615LfnPEO','description-file','One-line\x20issue\x20summary','24xHrRkn','Issue\x20description\x20file\x20is\x20empty:\x20','issue.description_original_bytes','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','9xRXncr','report','Platform\x20issue\x20reported\x20(','string','length','3041052ppboqJ','descriptionSource','inline','\x20bytes','title','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','truncated:\x20original\x20','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','24ZtmBiL','truncated','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','1534870UpQmsp','truncated\x20from\x20','issue.description','\x20secret(s):\x20','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','454062AzJJbu','descriptionFilePath','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','utf8','114396BgRGRk','apiError','382719sCChGg','redactionCount','issue.description_redaction_kinds','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','file','validation','sanitize','issue.description_redactions','flagMissing','redacted\x20','899256hfnIdc','issue.title','trim','message','compress','cwd','Issue\x20description\x20cannot\x20be\x20empty.','descriptionFile:\x20','File\x20not\x20found:\x20','POST','str','redactionKinds','join','issue.description_truncated','description','Platform\x20issue\x20reported'];a100_0x34c0=function(){return _0x30635d;};return a100_0x34c0();}function buildResultMessage(_0x2f193b){const _0x29f1f9=a100_0x25baf2,_0x528723=[];return _0x2f193b[_0x29f1f9(0x9a)]&&_0x528723[_0x29f1f9(0xc1)](_0x29f1f9(0x9d)+_0x2f193b[_0x29f1f9(0xc3)]+_0x29f1f9(0x94)),_0x2f193b[_0x29f1f9(0xa8)]>0x0&&_0x528723[_0x29f1f9(0xc1)](_0x29f1f9(0xb0)+_0x2f193b[_0x29f1f9(0xa8)]+_0x29f1f9(0x9f)+_0x2f193b[_0x29f1f9(0xbc)][_0x29f1f9(0xbd)](',\x20')),_0x528723['length']===0x0?_0x29f1f9(0xc0):_0x29f1f9(0x8e)+_0x528723[_0x29f1f9(0xbd)](';\x20')+')';}async function prepareIssueReport(_0x4c41ac){const _0x142d13=a100_0x25baf2,_0x45d65a=_0x4c41ac[_0x142d13(0xbb)](_0x142d13(0x95))[_0x142d13(0xb3)](),_0x2cfdd4=_0x4c41ac['str'](_0x142d13(0xbf)),_0x354a23=_0x4c41ac['str'](DESCRIPTION_FILE_FLAG)[_0x142d13(0xb3)]();if(!_0x354a23){const _0x1f23f2=_0x2cfdd4;if(!_0x1f23f2[_0x142d13(0xb3)]())throw CliErrors[_0x142d13(0xac)](_0x142d13(0xb7),_0x142d13(0xa0));const _0x2a8d6c=sanitizeIssueDescription(_0x1f23f2);return{'title':_0x45d65a,'description':_0x2a8d6c[_0x142d13(0xbf)],'descriptionSource':_0x142d13(0x93),'sanitize':_0x2a8d6c};}const _0x2beef9=resolve(process[_0x142d13(0xb6)](),_0x354a23),_0x2b7fad=await readFile(_0x2beef9,_0x142d13(0xa4));if(!_0x2b7fad[_0x142d13(0xb3)]())throw CliErrors[_0x142d13(0xac)](_0x142d13(0xc9)+_0x2beef9,_0x142d13(0x98));const _0x32678c=sanitizeIssueDescription(_0x2b7fad);return{'title':_0x45d65a,'description':_0x32678c[_0x142d13(0xbf)],'descriptionSource':_0x142d13(0xab),'descriptionFilePath':_0x2beef9,'sanitize':_0x32678c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a101_0x527b(){const _0x59c32e=['5894280nrOptl','from','REDACTED:bearer-jwt','private-key','password','label','295132Zehxll','3557kFnxZT','bearer-jwt','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','5773410Jtbohj','1098727zPHzIT','REDACTED:private-key','toString','subarray','max','includes','length','__RB_OSS_ID_','push','REDACTED:access-key','312822GvEUpi','REDACTED:password','utf8','cookie','restore','kind','REDACTED:authorization','description','18WYaOHx','replace','17553todetc','string','byteLength','REDACTED:cookie','45kMqWhZ'];a101_0x527b=function(){return _0x59c32e;};return a101_0x527b();}const a101_0x270e3d=a101_0x2145;(function(_0x4e3da,_0x58f581){const _0x19921c=a101_0x2145,_0x3c038c=_0x4e3da();while(!![]){try{const _0x508343=-parseInt(_0x19921c(0x13c))/0x1*(-parseInt(_0x19921c(0x152))/0x2)+-parseInt(_0x19921c(0x130))/0x3+-parseInt(_0x19921c(0x13b))/0x4*(-parseInt(_0x19921c(0x134))/0x5)+-parseInt(_0x19921c(0x14a))/0x6+-parseInt(_0x19921c(0x140))/0x7+-parseInt(_0x19921c(0x135))/0x8+parseInt(_0x19921c(0x13f))/0x9;if(_0x508343===_0x58f581)break;else _0x3c038c['push'](_0x3c038c['shift']());}catch(_0x37132e){_0x3c038c['push'](_0x3c038c['shift']());}}}(a101_0x527b,0x5e318));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a101_0x270e3d(0x13e),REDACTION_RULES=[{'kind':a101_0x270e3d(0x14d),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a101_0x270e3d(0x133)},{'kind':'authorization','pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a101_0x270e3d(0x150)},{'kind':a101_0x270e3d(0x138),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a101_0x270e3d(0x141)},{'kind':'access-key','pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a101_0x270e3d(0x149)},{'kind':a101_0x270e3d(0x139),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a101_0x270e3d(0x14b)},{'kind':a101_0x270e3d(0x13d),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a101_0x270e3d(0x137)}];export function sanitizeIssueDescription(_0x48f12b){const _0x4a108f=a101_0x270e3d,_0x30dbda=Buffer[_0x4a108f(0x132)](_0x48f12b,_0x4a108f(0x14c)),_0x952e72=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x24eb80=_0x48f12b,_0x2440fb=0x0;const _0x51d59b=[];if(!_0x952e72){const _0x48e489=protectOssAccessKeyIds(_0x24eb80);_0x24eb80=_0x48e489[_0x4a108f(0x151)];for(const _0x40d9db of REDACTION_RULES){let _0x486e2c=0x0;_0x24eb80=_0x24eb80[_0x4a108f(0x153)](_0x40d9db['pattern'],(_0x5daa52,_0x3b76f7)=>{const _0x287003=_0x4a108f;_0x486e2c+=0x1;const _0x2f279d=typeof _0x3b76f7===_0x287003(0x131)?_0x3b76f7:'';return _0x2f279d+'['+_0x40d9db[_0x287003(0x13a)]+']';}),_0x486e2c>0x0&&(_0x2440fb+=_0x486e2c,!_0x51d59b[_0x4a108f(0x145)](_0x40d9db[_0x4a108f(0x14f)])&&_0x51d59b[_0x4a108f(0x148)](_0x40d9db[_0x4a108f(0x14f)]));}_0x24eb80=_0x48e489[_0x4a108f(0x14e)](_0x24eb80);}let _0x100cc2=![];if(Buffer['byteLength'](_0x24eb80,_0x4a108f(0x14c))>ISSUE_DESCRIPTION_MAX_BYTES){_0x100cc2=!![];const _0x4e9f8d=Buffer[_0x4a108f(0x132)](TRUNCATION_NOTICE,_0x4a108f(0x14c)),_0x3767c7=Math[_0x4a108f(0x144)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x4e9f8d);_0x24eb80=sliceUtf8Bytes(_0x24eb80,_0x3767c7)+TRUNCATION_NOTICE;}return{'description':_0x24eb80,'originalBytes':_0x30dbda,'truncated':_0x100cc2,'redactionCount':_0x2440fb,'redactionKinds':_0x51d59b};}function a101_0x2145(_0x4489c6,_0x398f48){_0x4489c6=_0x4489c6-0x130;const _0x527b3a=a101_0x527b();let _0x2145e7=_0x527b3a[_0x4489c6];return _0x2145e7;}function protectOssAccessKeyIds(_0x2fd5d1){const _0x50fc62=a101_0x270e3d,_0x504cf4=[],_0x2a066b=_0x2fd5d1[_0x50fc62(0x153)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x240c42,_0x5be83f)=>{const _0x8a58b8=_0x50fc62,_0xa60a63=_0x504cf4['push'](_0x240c42['slice'](_0x5be83f[_0x8a58b8(0x146)]))-0x1;return _0x5be83f+_0x8a58b8(0x147)+_0xa60a63+'__';});return{'description':_0x2a066b,'restore':_0x3de861=>_0x3de861[_0x50fc62(0x153)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x1005ce,_0x379b54,_0x2aa191)=>{const _0x2cf5cf=_0x504cf4[Number(_0x2aa191)];return _0x2cf5cf===undefined?_0x1005ce:''+_0x379b54+_0x2cf5cf;})};}function sliceUtf8Bytes(_0x4e998c,_0x5f2701){const _0x4ad1c2=a101_0x270e3d;if(_0x5f2701<=0x0)return'';const _0x1a7943=Buffer[_0x4ad1c2(0x136)](_0x4e998c,_0x4ad1c2(0x14c));if(_0x1a7943[_0x4ad1c2(0x132)]<=_0x5f2701)return _0x4e998c;let _0x5943ed=_0x5f2701;while(_0x5943ed>0x0){const _0x528457=_0x1a7943[_0x5943ed];if(_0x528457===undefined||(_0x528457&0xc0)!==0x80)break;_0x5943ed-=0x1;}return _0x1a7943[_0x4ad1c2(0x143)](0x0,_0x5943ed)[_0x4ad1c2(0x142)](_0x4ad1c2(0x14c));}
|