@lovrabet/rabetbase-cli 2.4.7-beta.1 → 2.4.7-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- 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.d.ts +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/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/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.d.ts +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +2 -2
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +1 -1
- package/lib/core/bff/utils.d.ts +2 -2
- 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 +2 -2
- package/sidecar/flags.json +1 -1
- package/skills/rabetbase/SKILL.md +28 -28
- package/skills/rabetbase/guides/backend-function.md +30 -30
- package/skills/rabetbase/guides/best-practices.md +8 -8
- package/skills/rabetbase/guides/bff-creation-workflow.md +16 -16
- package/skills/rabetbase/guides/conflict-detection.md +3 -3
- package/skills/rabetbase/guides/custom-page-workflow.md +8 -8
- package/skills/rabetbase/guides/data-api-guidelines.md +6 -6
- package/skills/rabetbase/guides/legacy-application-blueprint-workflow.md +8 -8
- package/skills/rabetbase/guides/sql-creation-workflow.md +2 -2
- package/skills/rabetbase/guides/troubleshooting.md +6 -6
- package/skills/rabetbase/guides/typescript-sdk.md +10 -10
- package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +1 -1
- package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +10 -10
- package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
- package/skills/rabetbase/references/rabetbase-bff-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-bff-delete.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-detail.md +4 -4
- package/skills/rabetbase/references/rabetbase-bff-list.md +8 -8
- package/skills/rabetbase/references/rabetbase-bff-pull.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +3 -3
- package/skills/rabetbase/references/rabetbase-bff-status.md +1 -1
- package/skills/rabetbase/references/rabetbase-codegen-sql.md +3 -3
- package/skills/rabetbase/references/rabetbase-dataset-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +3 -3
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/rules/lovrabet_rules.mdc.tpl +7 -7
- package/templates/skill/SKILL.md.tpl +12 -12
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f64af,_0x38f9d3){const _0x447f33=a89_0x318e,_0x5e82cd=_0x2f64af();while(!![]){try{const _0x353eb1=parseInt(_0x447f33(0x1af))/0x1+-parseInt(_0x447f33(0x1b4))/0x2*(parseInt(_0x447f33(0x1b5))/0x3)+parseInt(_0x447f33(0x1ae))/0x4+-parseInt(_0x447f33(0x1ac))/0x5*(-parseInt(_0x447f33(0x1ad))/0x6)+-parseInt(_0x447f33(0x1b3))/0x7*(parseInt(_0x447f33(0x1b0))/0x8)+parseInt(_0x447f33(0x1b2))/0x9*(parseInt(_0x447f33(0x1b6))/0xa)+-parseInt(_0x447f33(0x1b1))/0xb;if(_0x353eb1===_0x38f9d3)break;else _0x5e82cd['push'](_0x5e82cd['shift']());}catch(_0x56f97b){_0x5e82cd['push'](_0x5e82cd['shift']());}}}(a89_0xdc3d,0xc53ec));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';function a89_0x318e(_0x4a0837,_0xe1f7c8){_0x4a0837=_0x4a0837-0x1ac;const _0xdc3dfb=a89_0xdc3d();let _0x318e4e=_0xdc3dfb[_0x4a0837];return _0x318e4e;}import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';function a89_0xdc3d(){const _0x2fd3e8=['1138260AhGCBM','8041365SYHSkb','6jFBZUE','5293768eZQjgG','907487KiVIcA','2368lOmEtm','27581246nhOBqN','9JgzrYN','5887xxHFNu','68qMJTDP','34305ZtyAMQ'];a89_0xdc3d=function(){return _0x2fd3e8;};return a89_0xdc3d();}import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';import{dbDiffRefreshStart}from'../../commands/db/diff-refresh-start.js';import{dbDiffRefreshStatus}from'../../commands/db/diff-refresh-status.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff,dbDiffRefreshStart,dbDiffRefreshStatus];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x108ca7=a90_0x5a37;(function(_0x2569e0,_0x16b6db){const _0x3e002a=a90_0x5a37,_0x719aa3=_0x2569e0();while(!![]){try{const _0x4bf5f0=-parseInt(_0x3e002a(0x160))/0x1+-parseInt(_0x3e002a(0x153))/0x2+parseInt(_0x3e002a(0x161))/0x3+parseInt(_0x3e002a(0x155))/0x4*(parseInt(_0x3e002a(0x15c))/0x5)+parseInt(_0x3e002a(0x159))/0x6+parseInt(_0x3e002a(0x14e))/0x7*(parseInt(_0x3e002a(0x15e))/0x8)+parseInt(_0x3e002a(0x165))/0x9*(-parseInt(_0x3e002a(0x157))/0xa);if(_0x4bf5f0===_0x16b6db)break;else _0x719aa3['push'](_0x719aa3['shift']());}catch(_0xda8888){_0x719aa3['push'](_0x719aa3['shift']());}}}(a90_0x1611,0x2a03d));import{listDatasets,listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a90_0x5a37(_0x4427cf,_0x4e48a7){_0x4427cf=_0x4427cf-0x14e;const _0x1611d3=a90_0x1611();let _0x5a377a=_0x1611d3[_0x4427cf];return _0x5a377a;}function a90_0x1611(){const _0x3ba471=['88nrsgtb','read','100914XysQem','382893Dugdjc','Found\x20','length','num','27WaKlBl','209713RLvWHv','list','datasetDependency','Page\x20index\x20(1-based)','\x20database\x20connection(s)','263152NeZEzI','all','76fZvmon','number','928950WxikiF','pagesize','297126QqnckQ','map','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','46465wkkrUZ','page'];a90_0x1611=function(){return _0x3ba471;};return a90_0x1611();}import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a90_0x108ca7(0x14f),'description':a90_0x108ca7(0x15b),'risk':a90_0x108ca7(0x15f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a90_0x108ca7(0x15d),'type':a90_0x108ca7(0x156),'description':a90_0x108ca7(0x151),'default':0x1},{'name':'pagesize','type':'number','description':'Page\x20size','default':0x64}],async 'execute'(_0x561e7d){const _0x1108c2=a90_0x108ca7,_0x14b1a6=_0x561e7d[_0x1108c2(0x164)](_0x1108c2(0x15d),0x1)||0x1,_0x5794fd=_0x561e7d[_0x1108c2(0x164)](_0x1108c2(0x158),0x64)||0x64,[{items:_0x5d0176,paging:_0xa11779},_0x3fa408]=await Promise[_0x1108c2(0x154)]([listDbLinks(_0x561e7d['appCode'],{'currentPage':_0x14b1a6,'pageSize':_0x5794fd}),listDatasets(_0x561e7d['appCode'],{'source':'DB_TABLE'})]),_0x9a7177=_0x5d0176[_0x1108c2(0x15a)](_0x5f4288=>({...sanitizeDbLinkForOutput(_0x5f4288),'datasetDependency':buildDbDatasetDependency(_0x5f4288,_0x3fa408)[_0x1108c2(0x150)]})),_0x5e2bad=_0xa11779?_0xa11779:{'currentPage':_0x14b1a6,'pageSize':_0x5794fd,'rowsOnPage':_0x9a7177[_0x1108c2(0x163)],'totalCount':null,'note':'Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only'};return{'ok':!![],'data':{'connections':_0x9a7177,'paging':_0x5e2bad},'message':_0x1108c2(0x162)+_0x9a7177[_0x1108c2(0x163)]+_0x1108c2(0x152)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e8d19,_0x15523e){const _0x4c24aa=a91_0x2dfc,_0x4de5c7=_0x2e8d19();while(!![]){try{const _0x528e45=-parseInt(_0x4c24aa(0x1e6))/0x1*(parseInt(_0x4c24aa(0x1f4))/0x2)+-parseInt(_0x4c24aa(0x1f3))/0x3+-parseInt(_0x4c24aa(0x1f6))/0x4+-parseInt(_0x4c24aa(0x1ef))/0x5*(-parseInt(_0x4c24aa(0x1ee))/0x6)+parseInt(_0x4c24aa(0x1e2))/0x7+-parseInt(_0x4c24aa(0x1f7))/0x8*(parseInt(_0x4c24aa(0x203))/0x9)+parseInt(_0x4c24aa(0x1e5))/0xa;if(_0x528e45===_0x15523e)break;else _0x4de5c7['push'](_0x4de5c7['shift']());}catch(_0x220461){_0x4de5c7['push'](_0x4de5c7['shift']());}}}(a91_0x32f1,0x9ec2f));function a91_0x2dfc(_0x47a041,_0x32ec29){_0x47a041=_0x47a041-0x1e0;const _0x32f18f=a91_0x32f1();let _0x2dfc65=_0x32f18f[_0x47a041];return _0x2dfc65;}import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function shouldRedactKey(_0x25d177){const _0x3919b8=a91_0x2dfc,_0x2313ce=_0x25d177[_0x3919b8(0x1e7)]();if(_0x2313ce==='password'||_0x2313ce===_0x3919b8(0x1ec)||_0x2313ce===_0x3919b8(0x201))return!![];if(_0x2313ce[_0x3919b8(0x1e3)]('secret')||_0x2313ce[_0x3919b8(0x1e3)](_0x3919b8(0x1e8))||_0x2313ce[_0x3919b8(0x1e3)](_0x3919b8(0x1f0)))return!![];if(_0x2313ce[_0x3919b8(0x1e3)](_0x3919b8(0x1ff))||_0x2313ce['includes'](_0x3919b8(0x1f8)))return!![];if(_0x2313ce===_0x3919b8(0x1e9)||_0x2313ce===_0x3919b8(0x1fe)||_0x2313ce===_0x3919b8(0x200))return!![];return![];}export function sanitizeDbLinkForOutput(_0x3a74f7){const _0x13eaad=a91_0x2dfc,_0x5b7857={..._0x3a74f7};delete _0x5b7857[_0x13eaad(0x1f1)];for(const _0x865cc4 of Object[_0x13eaad(0x202)](_0x5b7857)){if(!shouldRedactKey(_0x865cc4))continue;const _0x261b58=_0x5b7857[_0x865cc4];_0x261b58!=null&&String(_0x261b58)[_0x13eaad(0x1f9)]>0x0&&(_0x5b7857[_0x865cc4]=_0x13eaad(0x1f2));}return _0x5b7857;}export function sanitizeDbLinkList(_0x108d37){const _0x3ce6a7=a91_0x2dfc;return _0x108d37[_0x3ce6a7(0x1e1)](_0x3ddabc=>sanitizeDbLinkForOutput(_0x3ddabc));}export function buildDbDatasetDependency(_0x55c348,_0x9aad16){const _0x53eb21=a91_0x2dfc,_0x2dd85c=_0x9aad16['filter'](_0x46eeec=>Number(_0x46eeec['dbtableConfig']?.[_0x53eb21(0x1fd)])===Number(_0x55c348['id']))[_0x53eb21(0x1e1)](_0x4348ce=>({'id':_0x4348ce['id'],'code':_0x4348ce['code'],'name':_0x4348ce[_0x53eb21(0x1f5)],..._0x4348ce[_0x53eb21(0x1fa)]?.[_0x53eb21(0x1ed)]?{'tableName':_0x4348ce[_0x53eb21(0x1fa)][_0x53eb21(0x1ed)]}:{}}));return{'datasetDependency':{'hasDependencies':_0x2dd85c[_0x53eb21(0x1f9)]>0x0,'activeDatasetCount':_0x2dd85c['length']},'datasets':_0x2dd85c};}export async function assertDbLinkConnectionPreflight(_0x665611){const _0x434c0d=a91_0x2dfc,_0x34ea72=await testDbLinkConfigConnect(_0x665611);if(_0x34ea72!==!![])throw CliErrors['apiError'](_0x434c0d(0x1e4),_0x434c0d(0x1fb));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x5568c7){const _0x1c72c3=a91_0x2dfc,_0x65697c=_0x5568c7[_0x1c72c3(0x204)]();if(!_0x65697c)return![];return DB_URL_PATTERN[_0x1c72c3(0x1fc)](_0x65697c);}export function buildDbPageLinks(_0x3a4caa,_0x4da9fe){const _0x1eb45d=a91_0x2dfc,_0x4690c3=_0x3a4caa?.[_0x1eb45d(0x204)]();if(!_0x4690c3)return undefined;const _0x15b231=typeof _0x4da9fe===_0x1eb45d(0x1eb)?String(_0x4da9fe):String(_0x4da9fe??'')[_0x1eb45d(0x204)]();if(!_0x15b231)return undefined;const _0x4fbdab=Number(_0x15b231);if(!Number['isFinite'](_0x4fbdab)||_0x4fbdab<=0x0)return undefined;const _0xc796af=getAppBaseUrl(_0x4690c3),_0x462b50=encodeURIComponent(String(_0x4fbdab));return{'databasePage':_0xc796af+_0x1eb45d(0x1e0),'erPage':_0xc796af+_0x1eb45d(0x1ea)+_0x462b50};}function a91_0x32f1(){const _0x5bcd3f=['16174000WpboiW','74486OepQby','toLowerCase','token','authorization','/data/er?dbId=','number','passwd','tableName','2202NanvZJ','13010KugIda','credential','hasAvailableDo','[redacted]','1424754vXmxXp','2befOtc','name','4829980KZUWiA','32heUoRG','accesskey','length','dbtableConfig','The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.','test','dbId','connectionstring','privatekey','jdbcurl','dbpassword','keys','1938825FrjBPe','trim','/data/database','map','4875864Ghlvnk','includes','Database\x20connection\x20preflight\x20failed.'];a91_0x32f1=function(){return _0x5bcd3f;};return a91_0x32f1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a92_0xe691(){const _0x419d50=['8pneMJh','tables','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','3JBVgVB','162246ZXmTGH','1DPIQdB','1693953wKlLzP','read','1113584YzWXat','\x20table(s)\x20on\x20db\x20link\x20','221700JlUlPG','length','611osOToB','56814thzylt','1004969tWiGPq','num','10UgWsTx','1337413rlwWTu','185HfArWX'];a92_0xe691=function(){return _0x419d50;};return a92_0xe691();}const a92_0x508313=a92_0x6369;(function(_0x18afb9,_0x45ef33){const _0x39ccd0=a92_0x6369,_0x73ac4c=_0x18afb9();while(!![]){try{const _0x31501d=-parseInt(_0x39ccd0(0x175))/0x1*(-parseInt(_0x39ccd0(0x174))/0x2)+parseInt(_0x39ccd0(0x186))/0x3*(-parseInt(_0x39ccd0(0x178))/0x4)+parseInt(_0x39ccd0(0x182))/0x5*(-parseInt(_0x39ccd0(0x17d))/0x6)+parseInt(_0x39ccd0(0x17e))/0x7*(-parseInt(_0x39ccd0(0x183))/0x8)+-parseInt(_0x39ccd0(0x176))/0x9*(-parseInt(_0x39ccd0(0x180))/0xa)+-parseInt(_0x39ccd0(0x181))/0xb+-parseInt(_0x39ccd0(0x17a))/0xc*(-parseInt(_0x39ccd0(0x17c))/0xd);if(_0x31501d===_0x45ef33)break;else _0x73ac4c['push'](_0x73ac4c['shift']());}catch(_0x4bb16a){_0x73ac4c['push'](_0x73ac4c['shift']());}}}(a92_0xe691,0x3b836));function a92_0x6369(_0x4b2449,_0x4bef8e){_0x4b2449=_0x4b2449-0x174;const _0xe691e9=a92_0xe691();let _0x636995=_0xe691e9[_0x4b2449];return _0x636995;}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_0x508313(0x184),'description':a92_0x508313(0x185),'risk':a92_0x508313(0x177),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x417e42){const _0x307794=a92_0x508313,_0x12cf57=_0x417e42[_0x307794(0x17f)]('id'),_0x401c08=await getDbAllTableList(_0x417e42['appCode'],_0x12cf57);return{'ok':!![],'data':{'dbLinkId':_0x12cf57,'total':_0x401c08[_0x307794(0x17b)],'tables':_0x401c08},'message':_0x401c08[_0x307794(0x17b)]+_0x307794(0x179)+_0x12cf57};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x3e1986=a93_0x2a49;function a93_0x2a49(_0x5c5219,_0x3c63d3){_0x5c5219=_0x5c5219-0x127;const _0x4d9d74=a93_0x4d9d();let _0x2a49fd=_0x4d9d74[_0x5c5219];return _0x2a49fd;}(function(_0x1421ed,_0x345108){const _0x2a3e95=a93_0x2a49,_0x3ca191=_0x1421ed();while(!![]){try{const _0x207ad5=parseInt(_0x2a3e95(0x135))/0x1*(-parseInt(_0x2a3e95(0x13a))/0x2)+-parseInt(_0x2a3e95(0x12f))/0x3*(-parseInt(_0x2a3e95(0x13f))/0x4)+parseInt(_0x2a3e95(0x13e))/0x5*(-parseInt(_0x2a3e95(0x131))/0x6)+parseInt(_0x2a3e95(0x128))/0x7*(parseInt(_0x2a3e95(0x12b))/0x8)+-parseInt(_0x2a3e95(0x130))/0x9*(-parseInt(_0x2a3e95(0x136))/0xa)+parseInt(_0x2a3e95(0x12a))/0xb*(parseInt(_0x2a3e95(0x13d))/0xc)+parseInt(_0x2a3e95(0x137))/0xd*(-parseInt(_0x2a3e95(0x12d))/0xe);if(_0x207ad5===_0x345108)break;else _0x3ca191['push'](_0x3ca191['shift']());}catch(_0x4f4045){_0x3ca191['push'](_0x3ca191['shift']());}}}(a93_0x4d9d,0x1d0b5));import{testDbLinkConnect}from'../../core/api-client.js';function a93_0x4d9d(){const _0x48fbbd=['keys','33GvbWok','517437FGykPj','6pPFnTH','success','slice','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','2WiFsBp','10xEKfMO','13vNTFXB','length','message','135504JjhWKu','error','\x20(see\x20data.result)','710652Qbmwnv','636815vzHtUe','22564lNdvmn','object','14rivbFt','Connection\x20check\x20finished\x20for\x20db\x20link\x20','11daBzbs','822736hbFqVa','test','36638YHgWJM'];a93_0x4d9d=function(){return _0x48fbbd;};return a93_0x4d9d();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x16e972){const _0xc04fae=a93_0x2a49;if(_0x16e972===!![]||_0x16e972===![])return{'success':_0x16e972};if(_0x16e972===null||_0x16e972===undefined)return{'type':typeof _0x16e972};if(typeof _0x16e972!==_0xc04fae(0x127))return{'type':typeof _0x16e972};const _0x13688f=_0x16e972,_0x1a7dc4=[_0xc04fae(0x132),_0xc04fae(0x139),'code',_0xc04fae(0x13b),'msg','data'],_0x592d7e={};for(const _0x499294 of _0x1a7dc4){if(_0x499294 in _0x13688f)_0x592d7e[_0x499294]=_0x13688f[_0x499294];}return Object[_0xc04fae(0x12e)](_0x592d7e)[_0xc04fae(0x138)]===0x0&&(_0x592d7e[_0xc04fae(0x12e)]=Object[_0xc04fae(0x12e)](_0x13688f)[_0xc04fae(0x133)](0x0,0x14)),_0x592d7e;}export const dbTest={'service':'db','command':a93_0x3e1986(0x12c),'description':a93_0x3e1986(0x134),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x32dffa){const _0x24bb00=a93_0x3e1986,_0x3b2b72=_0x32dffa['num']('id'),_0x49d1c8=await testDbLinkConnect(_0x3b2b72),_0x1ceef8=_0x49d1c8===!![]||typeof _0x49d1c8===_0x24bb00(0x127)&&_0x49d1c8!==null&&_0x49d1c8['success']===!![],_0x42ab97=summarizeTestConnectResult(_0x49d1c8);return{'ok':!![],'data':{'id':_0x3b2b72,'connected':Boolean(_0x1ceef8),'result':_0x42ab97},'message':_0x1ceef8?'Connection\x20OK\x20for\x20db\x20link\x20'+_0x3b2b72:_0x24bb00(0x129)+_0x3b2b72+_0x24bb00(0x13c)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0xbdd9fd=a94_0xf810;(function(_0x292791,_0x308c44){const _0x2daee5=a94_0xf810,_0x2ae8a0=_0x292791();while(!![]){try{const _0x20f1da=parseInt(_0x2daee5(0x1d8))/0x1+parseInt(_0x2daee5(0x1f2))/0x2+parseInt(_0x2daee5(0x1e0))/0x3*(parseInt(_0x2daee5(0x1ea))/0x4)+parseInt(_0x2daee5(0x1ec))/0x5*(-parseInt(_0x2daee5(0x1fa))/0x6)+-parseInt(_0x2daee5(0x1ef))/0x7*(-parseInt(_0x2daee5(0x1f6))/0x8)+parseInt(_0x2daee5(0x1f4))/0x9+-parseInt(_0x2daee5(0x1f0))/0xa;if(_0x20f1da===_0x308c44)break;else _0x2ae8a0['push'](_0x2ae8a0['shift']());}catch(_0x16325a){_0x2ae8a0['push'](_0x2ae8a0['shift']());}}}(a94_0x3b73,0x6dd1f));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a94_0x3b73(){const _0x40e86c=['New\x20host:port','New\x20connection\x20parameter\x20string','bool','[redacted]','validation','9LGYJRr','string','password','update','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','skip-connection-test','Updated\x20db\x20link\x20','trim','dburl','username','421396nXJyrQ','dbParam','810sTYWYM','dbdesc','str','70049NdhfHt','18572030BKAzee','New\x20database\x20name','1684098FdCzGu','New\x20description','5608143TMcoWc','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','472nMzoeD','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','POST','/smartapi/dblink/update','27138yXeXnF','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','668116oEbbOH','dbDesc','dbname'];a94_0x3b73=function(){return _0x40e86c;};return a94_0x3b73();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set(['******',a94_0xbdd9fd(0x1de)]);function mergeDbLinkUpdate(_0x4af7c1,_0x2cd76b){const _0x2e966d=a94_0xbdd9fd,_0x1da536={..._0x4af7c1},_0x14b61c=_0x2cd76b[_0x2e966d(0x1ee)]('password');if(_0x14b61c&&MASKED_PASSWORD_VALUES['has'](_0x14b61c))throw CliErrors[_0x2e966d(0x1df)](_0x2e966d(0x1f7));if(!_0x14b61c&&MASKED_PASSWORD_VALUES['has'](String(_0x4af7c1[_0x2e966d(0x1e2)]??'')))throw CliErrors[_0x2e966d(0x1df)]('The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.');const _0x4604c6=_0x2cd76b[_0x2e966d(0x1ee)](_0x2e966d(0x1da));if(_0x4604c6)_0x1da536['dbName']=_0x4604c6;const _0x464c0c=_0x2cd76b['str'](_0x2e966d(0x1e8));if(_0x464c0c)_0x1da536['dbUrl']=_0x464c0c[_0x2e966d(0x1e7)]();const _0x52a174=_0x2cd76b[_0x2e966d(0x1ee)](_0x2e966d(0x1e9));if(_0x52a174)_0x1da536[_0x2e966d(0x1e9)]=_0x52a174;if(_0x14b61c)_0x1da536['password']=_0x14b61c;const _0xd30425=_0x2cd76b[_0x2e966d(0x1ee)]('dbparam');if(_0xd30425)_0x1da536[_0x2e966d(0x1eb)]=_0xd30425;const _0x5674cd=_0x2cd76b[_0x2e966d(0x1ee)](_0x2e966d(0x1ed));if(_0x5674cd)_0x1da536[_0x2e966d(0x1d9)]=_0x5674cd;return _0x1da536;}function a94_0xf810(_0x3b8db4,_0x554742){_0x3b8db4=_0x3b8db4-0x1d8;const _0x3b7324=a94_0x3b73();let _0xf810=_0x3b7324[_0x3b8db4];return _0xf810;}export const dbUpdate={'service':'db','command':a94_0xbdd9fd(0x1e3),'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_0xbdd9fd(0x1e1),'description':a94_0xbdd9fd(0x1f1)},{'name':a94_0xbdd9fd(0x1e8),'type':a94_0xbdd9fd(0x1e1),'description':a94_0xbdd9fd(0x1db)},{'name':a94_0xbdd9fd(0x1e9),'type':'string','description':'New\x20username'},{'name':a94_0xbdd9fd(0x1e2),'type':a94_0xbdd9fd(0x1e1),'description':a94_0xbdd9fd(0x1e4)},{'name':'dbparam','type':a94_0xbdd9fd(0x1e1),'description':a94_0xbdd9fd(0x1dc)},{'name':'dbdesc','type':a94_0xbdd9fd(0x1e1),'description':a94_0xbdd9fd(0x1f3)},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x2aa8db){const _0x2b498c=a94_0xbdd9fd,_0x4397fb=_0x2aa8db[_0x2b498c(0x1ee)](_0x2b498c(0x1e8));if(_0x4397fb&&!validateDbUrl(_0x4397fb[_0x2b498c(0x1e7)]()))throw CliErrors[_0x2b498c(0x1df)](_0x2b498c(0x1fb)+_0x4397fb+'\x22');},async 'dryRun'(_0x4a522d){const _0x4645a2=a94_0xbdd9fd,_0x303114=_0x4a522d['num']('id'),_0x41d128=await getDbLinkInfo(_0x303114),_0x192a8d=mergeDbLinkUpdate(_0x41d128,_0x4a522d),_0x2d7995=sanitizeDbLinkForOutput(_0x192a8d);return{'method':_0x4645a2(0x1f8),'url':_0x4645a2(0x1f9),'body':_0x2d7995,'description':_0x4645a2(0x1f5),'connectionPreflight':{'enabled':!_0x4a522d[_0x4645a2(0x1dd)](_0x4645a2(0x1e5)),'executed':![]}};},async 'execute'(_0x3d50d0){const _0x168e86=a94_0xbdd9fd,_0x1c82b4=_0x3d50d0['num']('id'),_0x13a906=await getDbLinkInfo(_0x1c82b4),_0xbb117c=mergeDbLinkUpdate(_0x13a906,_0x3d50d0);!_0x3d50d0[_0x168e86(0x1dd)](_0x168e86(0x1e5))&&await assertDbLinkConnectionPreflight(_0xbb117c);const {id:_0x5bc3e9,entity:_0x2e7975}=normalizeEntityWithIdResponse(await updateDbLink(_0xbb117c));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x2e7975),'message':_0x168e86(0x1e6)+(_0x5bc3e9??_0x1c82b4)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a95_0x5a1f(_0x381e3c,_0x30734b){_0x381e3c=_0x381e3c-0x1a1;const _0x3e5224=a95_0x3e52();let _0x5a1f1d=_0x3e5224[_0x381e3c];return _0x5a1f1d;}const a95_0x51a993=a95_0x5a1f;(function(_0x5f13f7,_0x2dc659){const _0x179a28=a95_0x5a1f,_0x3e5284=_0x5f13f7();while(!![]){try{const _0x2047a0=-parseInt(_0x179a28(0x1bb))/0x1*(-parseInt(_0x179a28(0x1df))/0x2)+-parseInt(_0x179a28(0x1c8))/0x3+parseInt(_0x179a28(0x1a1))/0x4*(parseInt(_0x179a28(0x203))/0x5)+-parseInt(_0x179a28(0x1e8))/0x6+parseInt(_0x179a28(0x1fe))/0x7+-parseInt(_0x179a28(0x1ab))/0x8+-parseInt(_0x179a28(0x1e2))/0x9;if(_0x2047a0===_0x2dc659)break;else _0x3e5284['push'](_0x3e5284['shift']());}catch(_0x173a34){_0x3e5284['push'](_0x3e5284['shift']());}}}(a95_0x3e52,0xada3e));import a95_0x4b57c8 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a95_0x3e52(){const _0x333ba2=['current','status','✓\x20Valid\x20JSON','⚠\x20Empty\x20(treated\x20as\x20{})','read','(not\x20set)','check','repeat','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','9683681ODHacj','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','(set,\x20length=','\x20\x20Auth','5dnmiZW','5057512gubMpn','\x20\x20Apps','green','✗\x20Expired','(default:\x20','keys','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','defaultApp','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1133952iuFoBI','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','appCode','accessKey','reason','env','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Skill\x20Version:\x20\x20\x20','(set\x20via\x20file,\x20length=','\x20\x20Config\x20Files','(no\x20file)','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','unknown','cookie','\x20\x20Built-in\x20Skill','repairCommand','101eOKDqL','apiDir','source','explicitAppName','✓\x20Valid','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','gray','✗\x20Invalid\x20JSON','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','823452ycpfyx','\x20\x20API\x20Endpoints','red','\x20\x20runtimeDomain:\x20\x20\x20','message','slice','appcode','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20─','(missing)','padEnd','(none)','log','platform','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','version','state','locale','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','doctor','apps','format','8402wIggZr','\x20(default)','arch','15211890ZMnoad','bold','riskLevel','\x20\x20Package\x20Version:\x20','empty','currentApp','1526364dQgYMi','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','pageSize','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20Merged\x20Config','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Project','value','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a95_0x3e52=function(){return _0x333ba2;};return a95_0x3e52();}import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x653ca0){const _0x113a41=a95_0x5a1f,_0x34e877=GIT_COMMIT!==_0x113a41(0x1b7)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x113a41(0x1cd)](0x0,0xa)+')':VERSION,_0x28af5d=buildConfigFromFlags({}),_0x230a84=getCookie();console[_0x113a41(0x1d5)](),console[_0x113a41(0x1d5)](a95_0x4b57c8['bold'](CLI_BIN_NAME+'\x20doctor')),console[_0x113a41(0x1d5)](a95_0x4b57c8[_0x113a41(0x1c5)]('─'['repeat'](0x32))),console[_0x113a41(0x1d5)](_0x113a41(0x1ac)+_0x34e877),console[_0x113a41(0x1d5)](_0x113a41(0x1aa)+process[_0x113a41(0x1d8)]),console[_0x113a41(0x1d5)](_0x113a41(0x1ec)+process[_0x113a41(0x1d6)]+'\x20'+process[_0x113a41(0x1e1)]);const _0x585f8b=inspectBuiltinSkill();console['log'](),console[_0x113a41(0x1d5)](a95_0x4b57c8[_0x113a41(0x1e3)](_0x113a41(0x1b9))),console['log'](a95_0x4b57c8[_0x113a41(0x1c5)](_0x113a41(0x1d1)[_0x113a41(0x1fc)](0x1e)));const _0x58ad4b=_0x585f8b[_0x113a41(0x1d9)]===_0x113a41(0x1f5)?a95_0x4b57c8[_0x113a41(0x1a3)]('✓\x20'+_0x585f8b['state']):a95_0x4b57c8[_0x113a41(0x1ca)]('✗\x20'+_0x585f8b[_0x113a41(0x1d9)]);console[_0x113a41(0x1d5)]('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x58ad4b),console[_0x113a41(0x1d5)](_0x113a41(0x1e5)+_0x585f8b['packageVersion']),console[_0x113a41(0x1d5)](_0x113a41(0x1b2)+(_0x585f8b['skillVersion']||a95_0x4b57c8['gray']('(unknown)'))),console[_0x113a41(0x1d5)]('\x20\x20Installed\x20Path:\x20\x20'+(_0x585f8b['installedPath']||a95_0x4b57c8[_0x113a41(0x1c5)](_0x113a41(0x1f3))));if(_0x585f8b[_0x113a41(0x1af)])console[_0x113a41(0x1d5)](_0x113a41(0x1c3)+_0x585f8b[_0x113a41(0x1af)]);_0x585f8b[_0x113a41(0x1d9)]!==_0x113a41(0x1f5)&&console[_0x113a41(0x1d5)](_0x113a41(0x1f4)+_0x585f8b[_0x113a41(0x1ba)]);console['log'](),console[_0x113a41(0x1d5)](a95_0x4b57c8[_0x113a41(0x1e3)](_0x113a41(0x1b4))),console[_0x113a41(0x1d5)](a95_0x4b57c8[_0x113a41(0x1c5)](_0x113a41(0x1d1)['repeat'](0x1e)));const _0x3996f2=getGlobalConfigPath(),_0x47bf9b=getProjectConfigPath();console[_0x113a41(0x1d5)](_0x113a41(0x1e9)+(_0x3996f2||a95_0x4b57c8[_0x113a41(0x1c5)](_0x113a41(0x1f3)))),console[_0x113a41(0x1d5)](_0x113a41(0x1ff)+(_0x47bf9b||a95_0x4b57c8['gray'](_0x113a41(0x1f3)))),console[_0x113a41(0x1d5)](),console[_0x113a41(0x1d5)](a95_0x4b57c8[_0x113a41(0x1e3)]('\x20\x20Config\x20JSON')),console[_0x113a41(0x1d5)](a95_0x4b57c8[_0x113a41(0x1c5)]('\x20\x20─'[_0x113a41(0x1fc)](0x1e)));const _0x45300e=(_0x248a0e,_0x133bb3)=>{const _0x1334a5=_0x113a41;if(!_0x133bb3){console[_0x1334a5(0x1d5)]('\x20\x20'+_0x248a0e[_0x1334a5(0x1d3)](0x11)+'\x20'+a95_0x4b57c8[_0x1334a5(0x1c5)](_0x1334a5(0x1b5)));return;}const _0x17a56f=inspectCliConfigJsonFile(_0x133bb3);if(_0x17a56f['status']==='ok')console[_0x1334a5(0x1d5)]('\x20\x20'+_0x248a0e[_0x1334a5(0x1d3)](0x11)+'\x20'+a95_0x4b57c8[_0x1334a5(0x1a3)](_0x1334a5(0x1f7)));else{if(_0x17a56f[_0x1334a5(0x1f6)]===_0x1334a5(0x1e6))console[_0x1334a5(0x1d5)]('\x20\x20'+_0x248a0e[_0x1334a5(0x1d3)](0x11)+'\x20'+a95_0x4b57c8['yellow'](_0x1334a5(0x1f8)));else _0x17a56f['status']==='missing'?console[_0x1334a5(0x1d5)]('\x20\x20'+_0x248a0e[_0x1334a5(0x1d3)](0x11)+'\x20'+a95_0x4b57c8[_0x1334a5(0x1c5)](_0x1334a5(0x1d2))):(console[_0x1334a5(0x1d5)]('\x20\x20'+_0x248a0e[_0x1334a5(0x1d3)](0x11)+'\x20'+a95_0x4b57c8['red'](_0x1334a5(0x1c6))),console[_0x1334a5(0x1d5)]('\x20\x20'+''[_0x1334a5(0x1d3)](0x11)+'\x20'+a95_0x4b57c8[_0x1334a5(0x1ca)](_0x17a56f[_0x1334a5(0x1cc)])));}};_0x45300e('Global',_0x3996f2),_0x45300e(_0x113a41(0x1f0),_0x47bf9b),console[_0x113a41(0x1d5)](),console['log'](a95_0x4b57c8['bold'](_0x113a41(0x1ee))),console[_0x113a41(0x1d5)](a95_0x4b57c8[_0x113a41(0x1c5)]('\x20\x20─'[_0x113a41(0x1fc)](0x1e))),console[_0x113a41(0x1d5)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x28af5d[_0x113a41(0x1ad)]||a95_0x4b57c8['red'](_0x113a41(0x1fa)))),console[_0x113a41(0x1d5)](_0x113a41(0x1f2)+_0x28af5d[_0x113a41(0x1b0)]),console[_0x113a41(0x1d5)](_0x113a41(0x1d7)+_0x28af5d[_0x113a41(0x1da)]),console[_0x113a41(0x1d5)](_0x113a41(0x1a7)+_0x28af5d[_0x113a41(0x1bc)]),console['log']('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x28af5d[_0x113a41(0x1a9)]||a95_0x4b57c8[_0x113a41(0x1c5)](_0x113a41(0x1d4)))),console[_0x113a41(0x1d5)](_0x113a41(0x1a8)+(_0x28af5d[_0x113a41(0x1e7)]||a95_0x4b57c8['gray'](_0x113a41(0x1d4)))),console[_0x113a41(0x1d5)]('\x20\x20explicitAppName:\x20'+(_0x28af5d[_0x113a41(0x1be)]||a95_0x4b57c8[_0x113a41(0x1c5)](_0x113a41(0x1d4)))),console[_0x113a41(0x1d5)](_0x113a41(0x1c4)+(_0x28af5d[_0x113a41(0x1de)]||a95_0x4b57c8[_0x113a41(0x1c5)](_0x113a41(0x1a5)+DEFAULT_CONFIG_VALUES[_0x113a41(0x1de)]+')'))),console[_0x113a41(0x1d5)](_0x113a41(0x1cf)+(_0x28af5d[_0x113a41(0x1eb)]??a95_0x4b57c8[_0x113a41(0x1c5)]('(default)'))),console[_0x113a41(0x1d5)](_0x113a41(0x1c0)+_0x28af5d[_0x113a41(0x1e4)]),console['log'](_0x113a41(0x1ef)+_0x28af5d['verbose']),console[_0x113a41(0x1d5)](_0x113a41(0x1fd)+(_0x28af5d[_0x113a41(0x1b8)]?a95_0x4b57c8[_0x113a41(0x1a3)]('(set,\x20length='+_0x28af5d[_0x113a41(0x1b8)][_0x113a41(0x1ea)]+')'):_0x230a84?a95_0x4b57c8['green'](_0x113a41(0x1b3)+_0x230a84[_0x113a41(0x1ea)]+')'):a95_0x4b57c8[_0x113a41(0x1c5)](_0x113a41(0x1d4))));const _0x338818=Object[_0x113a41(0x1a6)](_0x28af5d[_0x113a41(0x1dd)]);if(_0x338818['length']>0x0){console[_0x113a41(0x1d5)](),console[_0x113a41(0x1d5)](a95_0x4b57c8[_0x113a41(0x1e3)](_0x113a41(0x1a2))),console['log'](a95_0x4b57c8[_0x113a41(0x1c5)]('\x20\x20─'[_0x113a41(0x1fc)](0x1e)));for(const _0x234a2d of _0x338818){const _0x56f4dd=_0x28af5d[_0x113a41(0x1dd)][_0x234a2d],_0xb46822=_0x234a2d===_0x28af5d[_0x113a41(0x1a9)],_0x166135=_0x234a2d===_0x28af5d[_0x113a41(0x1e7)],_0x10aa20=_0x166135?a95_0x4b57c8['green'](_0x113a41(0x1c1)):'',_0x406ea9=_0xb46822?_0x113a41(0x1e0):'';console[_0x113a41(0x1d5)]('\x20\x20'+_0x234a2d+_0x406ea9+_0x10aa20),console[_0x113a41(0x1d5)](_0x113a41(0x1d0)+_0x56f4dd[_0x113a41(0x1ce)]);const _0x1c65a9=buildAppDoctorFields(_0x56f4dd,{'env':_0x28af5d[_0x113a41(0x1b0)],'apiDir':_0x28af5d['raw']['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x28af5d[_0x113a41(0x1b8)]||_0x230a84||undefined,'accessKey':_0x28af5d[_0x113a41(0x1ae)]});console['log'](_0x113a41(0x1b1)+_0x1c65a9[_0x113a41(0x1b0)][_0x113a41(0x1f1)]+'\x20\x20'+a95_0x4b57c8['gray']('('+_0x1c65a9[_0x113a41(0x1b0)][_0x113a41(0x1bd)]+')')),console[_0x113a41(0x1d5)](_0x113a41(0x1b6)+_0x1c65a9[_0x113a41(0x1bc)][_0x113a41(0x1f1)]+'\x20\x20'+a95_0x4b57c8['gray']('('+_0x1c65a9[_0x113a41(0x1bc)][_0x113a41(0x1bd)]+')'));const _0x50751c=_0x1c65a9[_0x113a41(0x1b8)][_0x113a41(0x1f1)]?a95_0x4b57c8[_0x113a41(0x1a3)](_0x113a41(0x201)+_0x1c65a9[_0x113a41(0x1b8)][_0x113a41(0x1f1)][_0x113a41(0x1ea)]+')'):a95_0x4b57c8[_0x113a41(0x1c5)](_0x113a41(0x1d4));console[_0x113a41(0x1d5)]('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x50751c+'\x20\x20'+a95_0x4b57c8[_0x113a41(0x1c5)]('('+_0x1c65a9[_0x113a41(0x1b8)][_0x113a41(0x1bd)]+')'));const _0x46839e=_0x1c65a9[_0x113a41(0x1ae)][_0x113a41(0x1f1)]?a95_0x4b57c8['green'](_0x113a41(0x201)+_0x1c65a9[_0x113a41(0x1ae)]['value']['length']+')'):a95_0x4b57c8[_0x113a41(0x1c5)](_0x113a41(0x1d4));console[_0x113a41(0x1d5)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x46839e+'\x20\x20'+a95_0x4b57c8['gray']('('+_0x1c65a9[_0x113a41(0x1ae)][_0x113a41(0x1bd)]+')'));}}console['log'](),console[_0x113a41(0x1d5)](a95_0x4b57c8['bold'](_0x113a41(0x1c9))),console['log'](a95_0x4b57c8[_0x113a41(0x1c5)](_0x113a41(0x1d1)[_0x113a41(0x1fc)](0x1e))),console['log'](_0x113a41(0x1c7)+getApiDomain()),console[_0x113a41(0x1d5)](_0x113a41(0x1c2)+getUserDomain()),console['log'](_0x113a41(0x1cb)+getRuntimeDomain()),console[_0x113a41(0x1d5)](),console[_0x113a41(0x1d5)](a95_0x4b57c8[_0x113a41(0x1e3)](_0x113a41(0x202))),console[_0x113a41(0x1d5)](a95_0x4b57c8['gray'](_0x113a41(0x1d1)[_0x113a41(0x1fc)](0x1e)));if(_0x230a84){const _0x44fed9=await getIsSessionValid();console[_0x113a41(0x1d5)](_0x113a41(0x1db)+(_0x44fed9?a95_0x4b57c8['green'](_0x113a41(0x1bf)):a95_0x4b57c8[_0x113a41(0x1ca)](_0x113a41(0x1a4))));}else console['log'](_0x113a41(0x1db)+a95_0x4b57c8[_0x113a41(0x1ca)](_0x113a41(0x200)));return console[_0x113a41(0x1d5)](),{'ok':!![]};}export const doctorDefinition={'service':a95_0x51a993(0x1dc),'command':a95_0x51a993(0x1fb),'description':a95_0x51a993(0x1ed),'risk':a95_0x51a993(0x1f9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a95_0x12d195=a95_0x4079;(function(_0x5e1470,_0x1cdfcc){const _0x4ef513=a95_0x4079,_0x158c51=_0x5e1470();while(!![]){try{const _0x21e211=parseInt(_0x4ef513(0x165))/0x1+-parseInt(_0x4ef513(0x161))/0x2*(parseInt(_0x4ef513(0x1a3))/0x3)+parseInt(_0x4ef513(0x18f))/0x4*(parseInt(_0x4ef513(0x1a9))/0x5)+parseInt(_0x4ef513(0x174))/0x6+parseInt(_0x4ef513(0x162))/0x7*(parseInt(_0x4ef513(0x14c))/0x8)+parseInt(_0x4ef513(0x14d))/0x9*(-parseInt(_0x4ef513(0x155))/0xa)+-parseInt(_0x4ef513(0x148))/0xb;if(_0x21e211===_0x1cdfcc)break;else _0x158c51['push'](_0x158c51['shift']());}catch(_0x5c9c01){_0x158c51['push'](_0x158c51['shift']());}}}(a95_0xf184,0xeaaf5));import a95_0x44f693 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_0xf184(){const _0x320a3b=['log','pageSize','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','210510LcSrld','apps','\x20\x20Skill\x20Version:\x20\x20\x20','source','appCode','red','7864780hsKXCN','unknown','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','17352VnNrrT','74907bcGIJj','padEnd','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','apiDir','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','210CtxpYg','value','current','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','locale','keys','\x20\x20─','\x20\x20Config\x20JSON','green','14112RbzFIV','301PwJSxi','gray','\x20←\x20current','1430884VYKRjY','riskLevel','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','platform','\x20\x20Built-in\x20Skill','\x20\x20Merged\x20Config','\x20\x20Installed\x20Path:\x20\x20','accessKey','\x20\x20explicitAppName:\x20','\x20doctor','(default)','env','appcode','status','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','390426ricAsL','✗\x20Expired','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','read','cookie','\x20\x20API\x20Endpoints','(not\x20set)','✓\x20Valid','repeat','yellow','currentApp','repairCommand','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','(set,\x20length=','state','\x20\x20Auth','format','\x20\x20runtimeDomain:\x20\x20\x20','verbose','doctor','✗\x20Invalid\x20JSON','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','bold','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(unknown)','(not\x20found)','defaultApp','108yyWSeL','\x20\x20\x20\x20accessKey:\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','version','(none)','empty','\x20\x20Apps','(set\x20via\x20file,\x20length=','✓\x20Valid\x20JSON','length','arch','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','skillVersion','check','installedPath','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Project','(missing)','slice','372VWDvRx','✗\x20Not\x20logged\x20in','\x20\x20Package\x20Version:\x20'];a95_0xf184=function(){return _0x320a3b;};return a95_0xf184();}function a95_0x4079(_0x50c220,_0xf069a){_0x50c220=_0x50c220-0x145;const _0xf18496=a95_0xf184();let _0x4079de=_0xf18496[_0x50c220];return _0x4079de;}import{buildAppDoctorFields}from'../config/schema.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x3ed821){const _0x197b71=a95_0x4079,_0x31f74d=GIT_COMMIT!==_0x197b71(0x149)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x197b71(0x1a2)](0x0,0xa)+')':VERSION,_0x4a4c26=buildConfigFromFlags({}),_0x2cf3ba=getCookie();console[_0x197b71(0x1a6)](),console[_0x197b71(0x1a6)](a95_0x44f693['bold'](CLI_BIN_NAME+_0x197b71(0x16e))),console[_0x197b71(0x1a6)](a95_0x44f693[_0x197b71(0x163)]('─'[_0x197b71(0x17c)](0x32))),console['log']('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x31f74d),console[_0x197b71(0x1a6)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x197b71(0x193)]),console[_0x197b71(0x1a6)](_0x197b71(0x14f)+process[_0x197b71(0x168)]+'\x20'+process[_0x197b71(0x19a)]);const _0x3f62ac=inspectBuiltinSkill();console[_0x197b71(0x1a6)](),console[_0x197b71(0x1a6)](a95_0x44f693[_0x197b71(0x18a)](_0x197b71(0x169))),console[_0x197b71(0x1a6)](a95_0x44f693['gray'](_0x197b71(0x15e)['repeat'](0x1e)));const _0xd287fa=_0x3f62ac['state']===_0x197b71(0x157)?a95_0x44f693['green']('✓\x20'+_0x3f62ac[_0x197b71(0x182)]):a95_0x44f693['red']('✗\x20'+_0x3f62ac[_0x197b71(0x182)]);console['log'](_0x197b71(0x152)+_0xd287fa),console[_0x197b71(0x1a6)](_0x197b71(0x1a5)+_0x3f62ac['packageVersion']),console[_0x197b71(0x1a6)](_0x197b71(0x1ab)+(_0x3f62ac[_0x197b71(0x19c)]||a95_0x44f693['gray'](_0x197b71(0x18c)))),console[_0x197b71(0x1a6)](_0x197b71(0x16b)+(_0x3f62ac[_0x197b71(0x19e)]||a95_0x44f693[_0x197b71(0x163)](_0x197b71(0x18d))));if(_0x3f62ac['reason'])console[_0x197b71(0x1a6)](_0x197b71(0x192)+_0x3f62ac['reason']);_0x3f62ac[_0x197b71(0x182)]!==_0x197b71(0x157)&&console[_0x197b71(0x1a6)](_0x197b71(0x18b)+_0x3f62ac[_0x197b71(0x17f)]);console[_0x197b71(0x1a6)](),console[_0x197b71(0x1a6)](a95_0x44f693[_0x197b71(0x18a)](_0x197b71(0x15b))),console[_0x197b71(0x1a6)](a95_0x44f693[_0x197b71(0x163)](_0x197b71(0x15e)['repeat'](0x1e)));const _0x4000ba=getGlobalConfigPath(),_0x333a91=getProjectConfigPath();console['log'](_0x197b71(0x191)+(_0x4000ba||a95_0x44f693[_0x197b71(0x163)](_0x197b71(0x18d)))),console[_0x197b71(0x1a6)](_0x197b71(0x14a)+(_0x333a91||a95_0x44f693[_0x197b71(0x163)](_0x197b71(0x18d)))),console[_0x197b71(0x1a6)](),console[_0x197b71(0x1a6)](a95_0x44f693[_0x197b71(0x18a)](_0x197b71(0x15f))),console['log'](a95_0x44f693[_0x197b71(0x163)](_0x197b71(0x15e)[_0x197b71(0x17c)](0x1e)));const _0x2653bf=(_0x168281,_0x49c3cc)=>{const _0x28023d=_0x197b71;if(!_0x49c3cc){console['log']('\x20\x20'+_0x168281[_0x28023d(0x14e)](0x11)+'\x20'+a95_0x44f693['gray']('(no\x20file)'));return;}const _0x2b07de=inspectCliConfigJsonFile(_0x49c3cc);if(_0x2b07de[_0x28023d(0x172)]==='ok')console[_0x28023d(0x1a6)]('\x20\x20'+_0x168281[_0x28023d(0x14e)](0x11)+'\x20'+a95_0x44f693['green'](_0x28023d(0x198)));else{if(_0x2b07de[_0x28023d(0x172)]===_0x28023d(0x195))console[_0x28023d(0x1a6)]('\x20\x20'+_0x168281[_0x28023d(0x14e)](0x11)+'\x20'+a95_0x44f693[_0x28023d(0x17d)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x2b07de[_0x28023d(0x172)]===_0x28023d(0x153)?console[_0x28023d(0x1a6)]('\x20\x20'+_0x168281[_0x28023d(0x14e)](0x11)+'\x20'+a95_0x44f693['gray'](_0x28023d(0x1a1))):(console[_0x28023d(0x1a6)]('\x20\x20'+_0x168281[_0x28023d(0x14e)](0x11)+'\x20'+a95_0x44f693['red'](_0x28023d(0x188))),console['log']('\x20\x20'+''['padEnd'](0x11)+'\x20'+a95_0x44f693[_0x28023d(0x147)](_0x2b07de['message'])));}};_0x2653bf('Global',_0x4000ba),_0x2653bf(_0x197b71(0x1a0),_0x333a91),console['log'](),console[_0x197b71(0x1a6)](a95_0x44f693[_0x197b71(0x18a)](_0x197b71(0x16a))),console[_0x197b71(0x1a6)](a95_0x44f693[_0x197b71(0x163)](_0x197b71(0x15e)['repeat'](0x1e))),console['log']('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4a4c26[_0x197b71(0x146)]||a95_0x44f693['red'](_0x197b71(0x17a)))),console['log'](_0x197b71(0x173)+_0x4a4c26[_0x197b71(0x170)]),console[_0x197b71(0x1a6)](_0x197b71(0x176)+_0x4a4c26[_0x197b71(0x15c)]),console[_0x197b71(0x1a6)](_0x197b71(0x19f)+_0x4a4c26['apiDir']),console[_0x197b71(0x1a6)](_0x197b71(0x15a)+(_0x4a4c26[_0x197b71(0x18e)]||a95_0x44f693[_0x197b71(0x163)](_0x197b71(0x194)))),console['log'](_0x197b71(0x167)+(_0x4a4c26[_0x197b71(0x17e)]||a95_0x44f693[_0x197b71(0x163)](_0x197b71(0x194)))),console[_0x197b71(0x1a6)](_0x197b71(0x16d)+(_0x4a4c26['explicitAppName']||a95_0x44f693[_0x197b71(0x163)]('(none)'))),console[_0x197b71(0x1a6)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4a4c26[_0x197b71(0x184)]||a95_0x44f693[_0x197b71(0x163)](_0x197b71(0x150)+DEFAULT_CONFIG_VALUES[_0x197b71(0x184)]+')'))),console[_0x197b71(0x1a6)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4a4c26[_0x197b71(0x1a7)]??a95_0x44f693[_0x197b71(0x163)](_0x197b71(0x16f)))),console['log'](_0x197b71(0x19b)+_0x4a4c26[_0x197b71(0x166)]),console[_0x197b71(0x1a6)](_0x197b71(0x1a8)+_0x4a4c26[_0x197b71(0x186)]),console[_0x197b71(0x1a6)](_0x197b71(0x154)+(_0x4a4c26[_0x197b71(0x178)]?a95_0x44f693[_0x197b71(0x160)](_0x197b71(0x181)+_0x4a4c26[_0x197b71(0x178)][_0x197b71(0x199)]+')'):_0x2cf3ba?a95_0x44f693[_0x197b71(0x160)](_0x197b71(0x197)+_0x2cf3ba[_0x197b71(0x199)]+')'):a95_0x44f693[_0x197b71(0x163)]('(none)')));const _0xea8482=Object[_0x197b71(0x15d)](_0x4a4c26[_0x197b71(0x1aa)]);if(_0xea8482['length']>0x0){console[_0x197b71(0x1a6)](),console['log'](a95_0x44f693[_0x197b71(0x18a)](_0x197b71(0x196))),console[_0x197b71(0x1a6)](a95_0x44f693[_0x197b71(0x163)](_0x197b71(0x15e)['repeat'](0x1e)));for(const _0x19a5ae of _0xea8482){const _0x405bef=_0x4a4c26[_0x197b71(0x1aa)][_0x19a5ae],_0x14c1e6=_0x19a5ae===_0x4a4c26[_0x197b71(0x18e)],_0x3bb766=_0x19a5ae===_0x4a4c26[_0x197b71(0x17e)],_0x312b60=_0x3bb766?a95_0x44f693['green'](_0x197b71(0x164)):'',_0x347201=_0x14c1e6?'\x20(default)':'';console[_0x197b71(0x1a6)]('\x20\x20'+_0x19a5ae+_0x347201+_0x312b60),console[_0x197b71(0x1a6)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x405bef[_0x197b71(0x171)]);const _0xad506e=buildAppDoctorFields(_0x405bef,{'env':_0x4a4c26[_0x197b71(0x170)],'apiDir':_0x4a4c26['raw'][_0x197b71(0x151)]||DEFAULT_CONFIG_VALUES[_0x197b71(0x151)],'cookie':_0x4a4c26['cookie']||_0x2cf3ba||undefined,'accessKey':_0x4a4c26['accessKey']});console[_0x197b71(0x1a6)]('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0xad506e[_0x197b71(0x170)][_0x197b71(0x156)]+'\x20\x20'+a95_0x44f693[_0x197b71(0x163)]('('+_0xad506e[_0x197b71(0x170)][_0x197b71(0x145)]+')')),console['log']('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0xad506e[_0x197b71(0x151)]['value']+'\x20\x20'+a95_0x44f693[_0x197b71(0x163)]('('+_0xad506e[_0x197b71(0x151)][_0x197b71(0x145)]+')'));const _0x6afeac=_0xad506e[_0x197b71(0x178)]['value']?a95_0x44f693[_0x197b71(0x160)](_0x197b71(0x181)+_0xad506e[_0x197b71(0x178)][_0x197b71(0x156)][_0x197b71(0x199)]+')'):a95_0x44f693['gray'](_0x197b71(0x194));console['log'](_0x197b71(0x14b)+_0x6afeac+'\x20\x20'+a95_0x44f693[_0x197b71(0x163)]('('+_0xad506e[_0x197b71(0x178)][_0x197b71(0x145)]+')'));const _0x4e2c57=_0xad506e['accessKey'][_0x197b71(0x156)]?a95_0x44f693[_0x197b71(0x160)](_0x197b71(0x181)+_0xad506e[_0x197b71(0x16c)][_0x197b71(0x156)]['length']+')'):a95_0x44f693[_0x197b71(0x163)]('(none)');console[_0x197b71(0x1a6)](_0x197b71(0x190)+_0x4e2c57+'\x20\x20'+a95_0x44f693[_0x197b71(0x163)]('('+_0xad506e[_0x197b71(0x16c)][_0x197b71(0x145)]+')'));}}console[_0x197b71(0x1a6)](),console[_0x197b71(0x1a6)](a95_0x44f693[_0x197b71(0x18a)](_0x197b71(0x179))),console['log'](a95_0x44f693['gray'](_0x197b71(0x15e)[_0x197b71(0x17c)](0x1e))),console[_0x197b71(0x1a6)](_0x197b71(0x159)+getApiDomain()),console[_0x197b71(0x1a6)](_0x197b71(0x189)+getUserDomain()),console[_0x197b71(0x1a6)](_0x197b71(0x185)+getRuntimeDomain()),console[_0x197b71(0x1a6)](),console['log'](a95_0x44f693[_0x197b71(0x18a)](_0x197b71(0x183))),console[_0x197b71(0x1a6)](a95_0x44f693[_0x197b71(0x163)](_0x197b71(0x15e)[_0x197b71(0x17c)](0x1e)));if(_0x2cf3ba){const _0x432975=await getIsSessionValid();console[_0x197b71(0x1a6)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x432975?a95_0x44f693['green'](_0x197b71(0x17b)):a95_0x44f693[_0x197b71(0x147)](_0x197b71(0x175))));}else console[_0x197b71(0x1a6)](_0x197b71(0x158)+a95_0x44f693['red'](_0x197b71(0x1a4)));return console[_0x197b71(0x1a6)](),{'ok':!![]};}export const doctorDefinition={'service':a95_0x12d195(0x187),'command':a95_0x12d195(0x19d),'description':a95_0x12d195(0x180),'risk':a95_0x12d195(0x177),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a96_0x295b9e=a96_0x4e2c;(function(_0x1b38d8,_0x13d13c){const _0x443549=a96_0x4e2c,_0x1cde15=_0x1b38d8();while(!![]){try{const _0x38f9fa=parseInt(_0x443549(0x1cb))/0x1+-parseInt(_0x443549(0x1c7))/0x2+parseInt(_0x443549(0x1d0))/0x3+-parseInt(_0x443549(0x1ba))/0x4+parseInt(_0x443549(0x1c4))/0x5*(-parseInt(_0x443549(0x1d5))/0x6)+-parseInt(_0x443549(0x1c1))/0x7+parseInt(_0x443549(0x1c6))/0x8;if(_0x38f9fa===_0x13d13c)break;else _0x1cde15['push'](_0x1cde15['shift']());}catch(_0x35d433){_0x1cde15['push'](_0x1cde15['shift']());}}}(a96_0x33bf,0x9e348));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a96_0x4e2c(_0x2a9638,_0x20fdcb){_0x2a9638=_0x2a9638-0x1b9;const _0x33bf6c=a96_0x33bf();let _0x4e2c26=_0x33bf6c[_0x2a9638];return _0x4e2c26;}const FILE_FLAG={'name':a96_0x295b9e(0x1cf),'type':a96_0x295b9e(0x1cc),'required':!![],'description':a96_0x295b9e(0x1b9)},FILEPATH_FLAG={'name':a96_0x295b9e(0x1d2),'type':a96_0x295b9e(0x1cc),'required':!![],'description':a96_0x295b9e(0x1be)},DOWNLOAD_FLAG={'name':a96_0x295b9e(0x1c0),'type':a96_0x295b9e(0x1ce),'description':a96_0x295b9e(0x1ca)},LONG_TERM_FLAG={'name':a96_0x295b9e(0x1c8),'type':'boolean','description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x250e19){const _0x4033a7=a96_0x295b9e,_0x3cfe58=_0x250e19[_0x4033a7(0x1bf)]();if(!_0x3cfe58)throw CliErrors[_0x4033a7(0x1d3)](_0x4033a7(0x1bb));return _0x3cfe58;}const fileUpload={'service':a96_0x295b9e(0x1cf),'command':a96_0x295b9e(0x1c9),'description':a96_0x295b9e(0x1d8),'risk':'read','flags':[FILE_FLAG],async 'dryRun'(_0x47f5b3){const _0x1c2964=a96_0x295b9e,_0x39d0c7=requireDevelopmentUploadFile(_0x47f5b3[_0x1c2964(0x1c3)]('file'),_0x1c2964(0x1c5));return{'method':'POST','url':_0x1c2964(0x1d4),'body':{'appCode':_0x47f5b3[_0x1c2964(0x1cd)],'multipart':{'file':_0x39d0c7}},'description':_0x1c2964(0x1bd)+_0x39d0c7[_0x1c2964(0x1c2)]+'\x20to\x20development\x20app\x20'+_0x47f5b3[_0x1c2964(0x1cd)]};},async 'execute'(_0x53dd45){const _0x7f8f6a=a96_0x295b9e,_0x55da80=requireDevelopmentUploadFile(_0x53dd45[_0x7f8f6a(0x1c3)](_0x7f8f6a(0x1cf)),'File'),_0xb2bcdf=await uploadDevelopmentFile(_0x53dd45[_0x7f8f6a(0x1cd)],_0x55da80[_0x7f8f6a(0x1c2)]);return{'ok':!![],'data':_0xb2bcdf,'message':_0xb2bcdf[_0x7f8f6a(0x1bc)]?_0x7f8f6a(0x1d1)+_0xb2bcdf[_0x7f8f6a(0x1bc)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a96_0x295b9e(0x1cf),'command':'query-url','description':a96_0x295b9e(0x1d7),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0xe0e280){const _0x4094bd=a96_0x295b9e,_0x47d738=requireFilePath(_0xe0e280['str'](_0x4094bd(0x1d2))),_0x195e70=await queryDevelopmentFileUrl(_0x47d738,{'download':_0xe0e280['bool'](_0x4094bd(0x1c0)),'longTerm':_0xe0e280[_0x4094bd(0x1d6)]('long-term')});return{'ok':!![],'data':_0x195e70};}};export const fileDefinitions=[fileUpload,fileQueryUrl];function a96_0x33bf(){const _0x345206=['validation','/smartapi/common/uploadFile','598980NYXPbX','bool','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','Path\x20to\x20the\x20local\x20file\x20to\x20upload','2861424GrPzbO','filePath\x20is\x20required.','filePath','Preview:\x20upload\x20','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','trim','download','6573525BzTuSJ','path','str','35mHHRRk','File','26804800bkGYKm','1740638gkxsZo','long-term','upload','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','68139cVONti','string','appCode','boolean','file','1358487gFzOat','Uploaded\x20file:\x20','filepath'];a96_0x33bf=function(){return _0x345206;};return a96_0x33bf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0xcbbdd8=a97_0x5b7d;(function(_0x187d65,_0x574460){const _0x2d7760=a97_0x5b7d,_0x163b85=_0x187d65();while(!![]){try{const _0x1b8433=-parseInt(_0x2d7760(0x16d))/0x1+parseInt(_0x2d7760(0x187))/0x2*(-parseInt(_0x2d7760(0x173))/0x3)+-parseInt(_0x2d7760(0x185))/0x4+-parseInt(_0x2d7760(0x161))/0x5+-parseInt(_0x2d7760(0x17c))/0x6+parseInt(_0x2d7760(0x170))/0x7*(parseInt(_0x2d7760(0x179))/0x8)+-parseInt(_0x2d7760(0x178))/0x9*(-parseInt(_0x2d7760(0x17a))/0xa);if(_0x1b8433===_0x574460)break;else _0x163b85['push'](_0x163b85['shift']());}catch(_0x3ee77c){_0x163b85['push'](_0x163b85['shift']());}}}(a97_0x24d4,0xd0cc9));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';function a97_0x24d4(){const _0x1e4d42=['appCode','map','log','flagMissing','init','env','Use\x20`','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','751230UHHTjM','validation','App\x20code\x20to\x20initialize\x20with','21qdXpxe','yes','global','18OsVjSr','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','valid','project','write','112707rFVNOm','2036768kRLXVV','2920fTcJfn','Usage:\x20','7021926OGUwET','custom','\x20\x20Apps:\x20','boolean','cwd','\x20config','appcode','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','检测到旧配置文件,正在自动升级...\x0a','4013720ADQRMx','defaultApp','30258TKGMfE','string','nonInteractive','message','\x20\x20Default:\x20','production','bool','2747540XiApeX','str','join','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]'];a97_0x24d4=function(){return _0x1e4d42;};return a97_0x24d4();}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(_0x17a0bd){return{'appCode':_0x17a0bd,'appName':_0x17a0bd};}function a97_0x5b7d(_0x3d972c,_0x48cfa0){_0x3d972c=_0x3d972c-0x160;const _0x24d4ec=a97_0x24d4();let _0x5b7d55=_0x24d4ec[_0x3d972c];return _0x5b7d55;}function writeInitConfig(_0x12e1ae,_0x18d8e0,_0x387436){const _0x20dd1c=a97_0x5b7d,_0x5051f9=resolveWriteConfigPath(_0x12e1ae),_0x3198db=buildCanonicalProjectConfig({},{'appCodes':_0x18d8e0['map'](_0x18e7b5=>_0x18e7b5[_0x20dd1c(0x165)]),'env':_0x387436,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x5051f9,_0x3198db);const _0x45152a=_0x12e1ae===_0x20dd1c(0x172)?_0x20dd1c(0x172):_0x20dd1c(0x176);console[_0x20dd1c(0x167)]('\x0a✓\x20Successfully\x20initialized\x20'+_0x45152a+_0x20dd1c(0x181)),console['log'](_0x20dd1c(0x17e)+_0x18d8e0[_0x20dd1c(0x166)](_0x42fc91=>_0x42fc91['appCode'])[_0x20dd1c(0x163)](',\x20')),console[_0x20dd1c(0x167)](_0x20dd1c(0x18b)+_0x3198db[_0x20dd1c(0x186)]),console[_0x20dd1c(0x167)]('\x20\x20Env:\x20'+_0x3198db[_0x20dd1c(0x16a)]),console[_0x20dd1c(0x167)]('\x20\x20Config:\x20'+_0x5051f9);}async function runSmartInit(_0x3c7842){const _0x5b84a8=a97_0x5b7d,_0x70e3cf=process[_0x5b84a8(0x180)](),_0xce79d0=_0x3c7842[_0x5b84a8(0x160)](_0x5b84a8(0x172))?_0x5b84a8(0x172):_0x5b84a8(0x176),_0x31bd65=_0x3c7842[_0x5b84a8(0x162)](_0x5b84a8(0x16a))||_0x5b84a8(0x18c),_0x1eb59d=_0x3c7842['str']('appcode')||undefined;if(_0xce79d0==='project'){const _0x59ec08=existsSync(resolve(_0x70e3cf,NEW_CONFIG_NAME)),_0x5eb0f1=LEGACY_CONFIG_NAMES['some'](_0x24f41a=>existsSync(resolve(_0x70e3cf,_0x24f41a)));if(_0x5eb0f1&&!_0x59ec08)return console['log'](_0x5b84a8(0x184)),upgradeApp(_0x3c7842[_0x5b84a8(0x189)],{'yes':_0x3c7842[_0x5b84a8(0x160)]('yes')});if(_0x59ec08)throw CliErrors['validation'](_0x5b84a8(0x183),_0x5b84a8(0x16b)+CLI_BIN_NAME+_0x5b84a8(0x16c));}if(_0x1eb59d){const _0x29c7aa=validateAppcode(_0x1eb59d);if(!_0x29c7aa[_0x5b84a8(0x175)])throw CliErrors[_0x5b84a8(0x16e)](_0x29c7aa[_0x5b84a8(0x18a)]);writeInitConfig(_0xce79d0,[syntheticApp(_0x1eb59d)],_0x31bd65);return;}if(_0x3c7842[_0x5b84a8(0x189)])throw CliErrors[_0x5b84a8(0x168)](_0x5b84a8(0x182),_0x5b84a8(0x17b)+CLI_BIN_NAME+_0x5b84a8(0x164));const _0x5d1d0d=getCookie(),_0x11a8ba=await selectMultipleApps(_0x5d1d0d),_0x4f86e6=_0x11a8ba===_0x5b84a8(0x17d)?[syntheticApp(await promptCustomAppcode())]:_0x11a8ba;writeInitConfig(_0xce79d0,_0x4f86e6,_0x31bd65);}const initFlags=[{'name':a97_0xcbbdd8(0x172),'type':a97_0xcbbdd8(0x17f),'description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':'env','type':a97_0xcbbdd8(0x188),'description':'Target\x20environment','default':a97_0xcbbdd8(0x18c),'enum':[...RABETBASE_ENV_VALUES]},{'name':a97_0xcbbdd8(0x182),'type':'string','description':a97_0xcbbdd8(0x16f)},{'name':a97_0xcbbdd8(0x171),'type':a97_0xcbbdd8(0x17f),'description':'Auto-confirm\x20prompts','default':![]}];export const initDefinitions=[{'service':a97_0xcbbdd8(0x169),'command':'run','description':a97_0xcbbdd8(0x174),'risk':a97_0xcbbdd8(0x177),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x3974a7){return await runSmartInit(_0x3974a7),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a98_0x5ac3(_0x4b8851,_0x336c5d){_0x4b8851=_0x4b8851-0xf1;const _0x7250c4=a98_0x7250();let _0x5ac36e=_0x7250c4[_0x4b8851];return _0x5ac36e;}function a98_0x7250(){const _0x2ad88a=['397593qfeGlm','2800209wiVhVK','16047970QtiDoy','1605968vCwgPN','36224tCpxer','4171rmiXjh','834710qBHPYY','846vBWDKt','18FQGTbo','11JMImlX','370GtKchr'];a98_0x7250=function(){return _0x2ad88a;};return a98_0x7250();}(function(_0x4b2153,_0xb095be){const _0xabbe5d=a98_0x5ac3,_0xf66b60=_0x4b2153();while(!![]){try{const _0x1c0486=parseInt(_0xabbe5d(0xf9))/0x1*(parseInt(_0xabbe5d(0xf3))/0x2)+parseInt(_0xabbe5d(0xf5))/0x3+parseInt(_0xabbe5d(0xf7))/0x4+-parseInt(_0xabbe5d(0xfa))/0x5*(parseInt(_0xabbe5d(0xf1))/0x6)+parseInt(_0xabbe5d(0xf4))/0x7+-parseInt(_0xabbe5d(0xf8))/0x8*(-parseInt(_0xabbe5d(0xfb))/0x9)+-parseInt(_0xabbe5d(0xf6))/0xa*(parseInt(_0xabbe5d(0xf2))/0xb);if(_0x1c0486===_0xb095be)break;else _0xf66b60['push'](_0xf66b60['shift']());}catch(_0x3f1fcc){_0xf66b60['push'](_0xf66b60['shift']());}}}(a98_0x7250,0x7600a));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x455659=a99_0x3a9d;(function(_0x363605,_0x1f21f2){const _0x83b227=a99_0x3a9d,_0xb2fbbc=_0x363605();while(!![]){try{const _0xa20306=parseInt(_0x83b227(0x1ab))/0x1*(-parseInt(_0x83b227(0x1ac))/0x2)+parseInt(_0x83b227(0x1ad))/0x3+-parseInt(_0x83b227(0x199))/0x4*(-parseInt(_0x83b227(0x191))/0x5)+parseInt(_0x83b227(0x18d))/0x6+-parseInt(_0x83b227(0x195))/0x7+parseInt(_0x83b227(0x18e))/0x8*(parseInt(_0x83b227(0x1a9))/0x9)+-parseInt(_0x83b227(0x197))/0xa*(parseInt(_0x83b227(0x1a3))/0xb);if(_0xa20306===_0x1f21f2)break;else _0xb2fbbc['push'](_0xb2fbbc['shift']());}catch(_0x133891){_0xb2fbbc['push'](_0xb2fbbc['shift']());}}}(a99_0x4557,0x97b13));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a99_0x455659(0x193);const NUDGE_SUPPRESSED_CODES=new Set(['cancelled',a99_0x455659(0x19a),'config_missing','not_in_project','unknown_command',a99_0x455659(0x1a1),a99_0x455659(0x1a6),a99_0x455659(0x1a0)]),defaultWriter=_0x24a7a1=>{const _0x442045=a99_0x455659;process[_0x442045(0x1a2)][_0x442045(0x18b)](_0x24a7a1);};export function shouldNudgeForError(_0x29667c,_0x14a892){const _0x149951=a99_0x455659;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x14a892[_0x149951(0x1a8)]==='issue'&&_0x14a892['command']===_0x149951(0x190))return![];if(_0x29667c instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x149951(0x18c)](_0x29667c['code']);return!![];}function a99_0x4557(){const _0x27f25=['validation_error','=1\x20to\x20silence\x20this\x20hint.','service','384273LDkaPp','\x20\x20Set\x20','2AOwuvh','1175156DpXYYh','1846110RgywkG','write','has','3324504ejULZm','152vlCjgX','\x22\x20\x5c','report','15uMHBbl','\x20\x20\x20\x20--title\x20\x22','RABETBASE_DISABLE_ISSUE_NUDGE','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','7464373UmMuMM','Hit\x20a\x20','627910kDLmTE','message','1427336rTuSJh','auth_required','slice','join','\x20issue\x20report\x20\x5c','replace','length','network_error','flag_missing','stderr','33EQJrtc','\x20bug?\x20Help\x20us\x20fix\x20it:','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)'];a99_0x4557=function(){return _0x27f25;};return a99_0x4557();}export function printIssueReportNudgeForError(_0x51039d,_0xc20fd0,_0xab9f4f=defaultWriter){if(!shouldNudgeForError(_0x51039d,_0xc20fd0))return;const _0x45d8ea=buildSuggestedTitle(_0x51039d,_0xc20fd0);_0xab9f4f(formatNudge(_0x45d8ea));}function a99_0x3a9d(_0x1d8df6,_0x112223){_0x1d8df6=_0x1d8df6-0x18b;const _0x455713=a99_0x4557();let _0x3a9d36=_0x455713[_0x1d8df6];return _0x3a9d36;}function buildSuggestedTitle(_0x4cb213,_0x14efc8){const _0x2836c9=a99_0x455659,_0x8f153b=_0x4cb213 instanceof Error?_0x4cb213[_0x2836c9(0x198)]:String(_0x4cb213),_0x12ca0c=_0x8f153b[_0x2836c9(0x19e)](/[\r\n]+/g,'\x20')[_0x2836c9(0x19e)](/\s+/g,'\x20')['trim']()[_0x2836c9(0x19b)](0x0,0x78)[_0x2836c9(0x19e)](/"/g,'\x5c\x22'),_0x27fef4=CLI_BIN_NAME+'\x20'+_0x14efc8[_0x2836c9(0x1a8)]+'\x20'+_0x14efc8['command'];return _0x12ca0c[_0x2836c9(0x19f)]>0x0?_0x27fef4+':\x20'+_0x12ca0c:_0x27fef4;}function formatNudge(_0x20ed03){const _0x1795b9=a99_0x455659;return['',_0x1795b9(0x196)+CLI_BIN_NAME+_0x1795b9(0x1a4),'\x20\x20'+CLI_BIN_NAME+_0x1795b9(0x19d),_0x1795b9(0x192)+_0x20ed03+_0x1795b9(0x18f),_0x1795b9(0x194),_0x1795b9(0x1a5),_0x1795b9(0x1aa)+NUDGE_OPT_OUT_ENV+_0x1795b9(0x1a7),''][_0x1795b9(0x19c)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x2bfd17=a100_0x1588;(function(_0x4fb0cc,_0x2ae598){const _0x343b65=a100_0x1588,_0x62606d=_0x4fb0cc();while(!![]){try{const _0xa87d93=-parseInt(_0x343b65(0x177))/0x1*(-parseInt(_0x343b65(0x180))/0x2)+parseInt(_0x343b65(0x18c))/0x3+parseInt(_0x343b65(0x16e))/0x4+parseInt(_0x343b65(0x173))/0x5+-parseInt(_0x343b65(0x194))/0x6+-parseInt(_0x343b65(0x17b))/0x7+-parseInt(_0x343b65(0x16f))/0x8;if(_0xa87d93===_0x2ae598)break;else _0x62606d['push'](_0x62606d['shift']());}catch(_0x222e4e){_0x62606d['push'](_0x62606d['shift']());}}}(a100_0x546f,0xe3dbe));import{existsSync}from'node:fs';function a100_0x1588(_0x434c57,_0x26ce5a){_0x434c57=_0x434c57-0x165;const _0x546f91=a100_0x546f();let _0x158899=_0x546f91[_0x434c57];return _0x158899;}import{readFile}from'node:fs/promises';function a100_0x546f(){const _0x367e92=['Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','file','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','apiError','otel://','issue.description_redaction_kinds','One-line\x20issue\x20summary','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','sanitize','filter','Platform\x20issue\x20reported\x20(','754575KgLRUY','issue.description_redactions','redactionCount','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','compress','File\x20not\x20found:\x20','Platform\x20issue\x20reported','issue.description_original_bytes','7165728JoYQJc','\x20bytes','report','inline','descriptionSource:\x20','descriptionFile:\x20','redactionKinds','description','message','push','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','originalBytes','trim','truncated\x20from\x20','string','join','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','5683676yyGCaC','5380336iVHIjJ','str','write','redactions:\x20','4368600ZZKQFD','validation','descriptionFilePath','Issue\x20description\x20file\x20is\x20empty:\x20','82231eRLAMq','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','truncated','issue.title','6856423kOUQeR','length','issue','utf8','title','30oSmbyY'];a100_0x546f=function(){return _0x367e92;};return a100_0x546f();}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='description-file';export const issueReport={'service':a100_0x2bfd17(0x17d),'command':a100_0x2bfd17(0x196),'description':a100_0x2bfd17(0x188),'risk':a100_0x2bfd17(0x171),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a100_0x2bfd17(0x190),'flags':[{'name':a100_0x2bfd17(0x17f),'type':a100_0x2bfd17(0x16b),'required':!![],'description':a100_0x2bfd17(0x187)},{'name':a100_0x2bfd17(0x19b),'type':'string','description':'Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)'},{'name':DESCRIPTION_FILE_FLAG,'type':a100_0x2bfd17(0x16b),'description':a100_0x2bfd17(0x181)}],async 'validate'(_0x90b6bc){const _0xcb88f7=a100_0x2bfd17,_0x47c57a=_0x90b6bc[_0xcb88f7(0x170)](_0xcb88f7(0x17f))[_0xcb88f7(0x169)](),_0x3f6428=_0x90b6bc['str'](_0xcb88f7(0x19b))[_0xcb88f7(0x169)](),_0x474ced=_0x90b6bc[_0xcb88f7(0x170)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x47c57a)throw CliErrors['flagMissing'](_0xcb88f7(0x17f),'Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0xf68aa8=_0x3f6428[_0xcb88f7(0x17c)]>0x0,_0x6db296=_0x474ced[_0xcb88f7(0x17c)]>0x0;if(_0xf68aa8===_0x6db296)throw CliErrors[_0xcb88f7(0x174)]('Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.',_0xcb88f7(0x178));if(_0x6db296){const _0x31aa53=resolve(process['cwd'](),_0x474ced);if(!existsSync(_0x31aa53))throw CliErrors['validation'](_0xcb88f7(0x191)+_0x31aa53);}},async 'dryRun'(_0x317fbd){const _0x538b7f=a100_0x2bfd17,_0x4a96e9=await prepareIssueReport(_0x317fbd);return{'method':'POST','url':_0x538b7f(0x185)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x4a96e9[_0x538b7f(0x17f)],'issue.description':_0x4a96e9[_0x538b7f(0x19b)],'issue.description_original_bytes':_0x4a96e9['sanitize'][_0x538b7f(0x168)],'issue.description_truncated':_0x4a96e9['sanitize'][_0x538b7f(0x179)],'issue.description_redactions':_0x4a96e9['sanitize'][_0x538b7f(0x18e)],'issue.description_redaction_kinds':_0x4a96e9[_0x538b7f(0x189)][_0x538b7f(0x19a)][_0x538b7f(0x16c)](',')}},'description':[_0x538b7f(0x167),_0x538b7f(0x198)+_0x4a96e9['descriptionSource'],_0x4a96e9[_0x538b7f(0x175)]?_0x538b7f(0x199)+_0x4a96e9['descriptionFilePath']:null,_0x4a96e9['sanitize'][_0x538b7f(0x179)]?'truncated:\x20original\x20'+_0x4a96e9[_0x538b7f(0x189)]['originalBytes']+_0x538b7f(0x195):null,_0x4a96e9[_0x538b7f(0x189)]['redactionCount']>0x0?_0x538b7f(0x172)+_0x4a96e9['sanitize']['redactionCount']+'\x20('+_0x4a96e9[_0x538b7f(0x189)][_0x538b7f(0x19a)][_0x538b7f(0x16c)](',\x20')+')':null][_0x538b7f(0x18a)](Boolean)[_0x538b7f(0x16c)]('\x0a')};},async 'execute'(_0x1f11ef){const _0x567b5b=a100_0x2bfd17,_0x450601=await prepareIssueReport(_0x1f11ef);try{await sendPlatformIssueCollectLog({'title':_0x450601[_0x567b5b(0x17f)],'description':_0x450601[_0x567b5b(0x19b)],'sanitize':{'originalBytes':_0x450601[_0x567b5b(0x189)]['originalBytes'],'truncated':_0x450601[_0x567b5b(0x189)][_0x567b5b(0x179)],'redactionCount':_0x450601[_0x567b5b(0x189)]['redactionCount'],'redactionKinds':_0x450601['sanitize']['redactionKinds']}});}catch(_0x83de29){throw CliErrors[_0x567b5b(0x184)]('Failed\x20to\x20report\x20platform\x20issue:\x20'+(_0x83de29 instanceof Error?_0x83de29[_0x567b5b(0x165)]:String(_0x83de29)),_0x567b5b(0x183));}return{'ok':!![],'message':buildResultMessage(_0x450601[_0x567b5b(0x189)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x567b5b(0x17a),'issue.description',_0x567b5b(0x193),'issue.description_truncated',_0x567b5b(0x18d),_0x567b5b(0x186)],'issue':{'title':_0x450601['title'],'descriptionLength':_0x450601[_0x567b5b(0x19b)][_0x567b5b(0x17c)],'descriptionSource':_0x450601['descriptionSource'],..._0x450601['descriptionFilePath']?{'descriptionFile':_0x450601[_0x567b5b(0x175)]}:{},'sanitize':{'originalBytes':_0x450601['sanitize'][_0x567b5b(0x168)],'truncated':_0x450601[_0x567b5b(0x189)][_0x567b5b(0x179)],'redactions':_0x450601[_0x567b5b(0x189)]['redactionCount'],'redactionKinds':_0x450601['sanitize'][_0x567b5b(0x19a)]}}}};}};function buildResultMessage(_0x3147d6){const _0x4fc90d=a100_0x2bfd17,_0x1b106=[];return _0x3147d6['truncated']&&_0x1b106[_0x4fc90d(0x166)](_0x4fc90d(0x16a)+_0x3147d6[_0x4fc90d(0x168)]+_0x4fc90d(0x195)),_0x3147d6[_0x4fc90d(0x18e)]>0x0&&_0x1b106[_0x4fc90d(0x166)]('redacted\x20'+_0x3147d6[_0x4fc90d(0x18e)]+'\x20secret(s):\x20'+_0x3147d6['redactionKinds']['join'](',\x20')),_0x1b106[_0x4fc90d(0x17c)]===0x0?_0x4fc90d(0x192):_0x4fc90d(0x18b)+_0x1b106[_0x4fc90d(0x16c)](';\x20')+')';}async function prepareIssueReport(_0x2428cf){const _0x2410dc=a100_0x2bfd17,_0x17fbd2=_0x2428cf['str'](_0x2410dc(0x17f))[_0x2410dc(0x169)](),_0x56c03c=_0x2428cf['str'](_0x2410dc(0x19b)),_0x467b29=_0x2428cf['str'](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x467b29){const _0x4e99b2=_0x56c03c;if(!_0x4e99b2[_0x2410dc(0x169)]())throw CliErrors[_0x2410dc(0x174)]('Issue\x20description\x20cannot\x20be\x20empty.',_0x2410dc(0x16d));const _0x206ed4=sanitizeIssueDescription(_0x4e99b2);return{'title':_0x17fbd2,'description':_0x206ed4[_0x2410dc(0x19b)],'descriptionSource':_0x2410dc(0x197),'sanitize':_0x206ed4};}const _0x2ae588=resolve(process['cwd'](),_0x467b29),_0x486c67=await readFile(_0x2ae588,_0x2410dc(0x17e));if(!_0x486c67[_0x2410dc(0x169)]())throw CliErrors[_0x2410dc(0x174)](_0x2410dc(0x176)+_0x2ae588,_0x2410dc(0x18f));const _0x3b95c6=sanitizeIssueDescription(_0x486c67);return{'title':_0x17fbd2,'description':_0x3b95c6[_0x2410dc(0x19b)],'descriptionSource':_0x2410dc(0x182),'descriptionFilePath':_0x2ae588,'sanitize':_0x3b95c6};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x1f7ae9=a101_0x7382;(function(_0xda8f0,_0x5ad2c4){const _0x4598af=a101_0x7382,_0x4510bf=_0xda8f0();while(!![]){try{const _0x5101fe=-parseInt(_0x4598af(0xf4))/0x1*(parseInt(_0x4598af(0xf6))/0x2)+-parseInt(_0x4598af(0xf3))/0x3*(parseInt(_0x4598af(0xfa))/0x4)+-parseInt(_0x4598af(0x104))/0x5+-parseInt(_0x4598af(0x10d))/0x6*(-parseInt(_0x4598af(0x103))/0x7)+parseInt(_0x4598af(0x107))/0x8*(-parseInt(_0x4598af(0xf5))/0x9)+parseInt(_0x4598af(0xf7))/0xa+parseInt(_0x4598af(0x10c))/0xb;if(_0x5101fe===_0x5ad2c4)break;else _0x4510bf['push'](_0x4510bf['shift']());}catch(_0x4c0d18){_0x4510bf['push'](_0x4510bf['shift']());}}}(a101_0x5961,0x6fcb7));function a101_0x5961(){const _0x40bc27=['replace','bearer-jwt','7336527jExFUk','508446jOvXOh','max','REDACTED:bearer-jwt','length','utf8','includes','from','label','subarray','REDACTED:access-key','1520853LBvroe','580228MyqwLp','99mhUeGo','2uXNIeJ','7382440RwGEIJ','push','toString','4VKClsS','byteLength','description','access-key','password','REDACTED:cookie','pattern','REDACTED:private-key','kind','56VGataA','1218230yzcCaj','REDACTED:password','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','214104hbohbM','restore','cookie'];a101_0x5961=function(){return _0x40bc27;};return a101_0x5961();}export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a101_0x1f7ae9(0x106),REDACTION_RULES=[{'kind':a101_0x1f7ae9(0x109),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a101_0x1f7ae9(0xff)},{'kind':'authorization','pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':'private-key','pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a101_0x1f7ae9(0x101)},{'kind':a101_0x1f7ae9(0xfd),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a101_0x1f7ae9(0xf2)},{'kind':a101_0x1f7ae9(0xfe),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a101_0x1f7ae9(0x105)},{'kind':a101_0x1f7ae9(0x10b),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a101_0x1f7ae9(0xeb)}];export function sanitizeIssueDescription(_0x1ad5eb){const _0x4b81b0=a101_0x1f7ae9,_0x182d6b=Buffer[_0x4b81b0(0xfb)](_0x1ad5eb,'utf8'),_0x1ebfef=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x359984=_0x1ad5eb,_0x537130=0x0;const _0x439a3c=[];if(!_0x1ebfef){const _0x16bf3f=protectOssAccessKeyIds(_0x359984);_0x359984=_0x16bf3f[_0x4b81b0(0xfc)];for(const _0x25e7b5 of REDACTION_RULES){let _0x582c81=0x0;_0x359984=_0x359984[_0x4b81b0(0x10a)](_0x25e7b5[_0x4b81b0(0x100)],(_0x520a3f,_0x50535a)=>{const _0x75327d=_0x4b81b0;_0x582c81+=0x1;const _0x24552b=typeof _0x50535a==='string'?_0x50535a:'';return _0x24552b+'['+_0x25e7b5[_0x75327d(0xf0)]+']';}),_0x582c81>0x0&&(_0x537130+=_0x582c81,!_0x439a3c[_0x4b81b0(0xee)](_0x25e7b5[_0x4b81b0(0x102)])&&_0x439a3c[_0x4b81b0(0xf8)](_0x25e7b5[_0x4b81b0(0x102)]));}_0x359984=_0x16bf3f[_0x4b81b0(0x108)](_0x359984);}let _0x1c35d7=![];if(Buffer[_0x4b81b0(0xfb)](_0x359984,'utf8')>ISSUE_DESCRIPTION_MAX_BYTES){_0x1c35d7=!![];const _0x366f82=Buffer['byteLength'](TRUNCATION_NOTICE,'utf8'),_0x35392d=Math[_0x4b81b0(0xea)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x366f82);_0x359984=sliceUtf8Bytes(_0x359984,_0x35392d)+TRUNCATION_NOTICE;}return{'description':_0x359984,'originalBytes':_0x182d6b,'truncated':_0x1c35d7,'redactionCount':_0x537130,'redactionKinds':_0x439a3c};}function a101_0x7382(_0x51b6b5,_0x21a852){_0x51b6b5=_0x51b6b5-0xea;const _0x5961b5=a101_0x5961();let _0x7382d6=_0x5961b5[_0x51b6b5];return _0x7382d6;}function protectOssAccessKeyIds(_0x4f71dc){const _0x4727e3=a101_0x1f7ae9,_0x40787d=[],_0x278678=_0x4f71dc[_0x4727e3(0x10a)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x29923f,_0x1a0c76)=>{const _0x50d0c2=_0x4727e3,_0x44c3d8=_0x40787d[_0x50d0c2(0xf8)](_0x29923f['slice'](_0x1a0c76[_0x50d0c2(0xec)]))-0x1;return _0x1a0c76+'__RB_OSS_ID_'+_0x44c3d8+'__';});return{'description':_0x278678,'restore':_0x41c436=>_0x41c436[_0x4727e3(0x10a)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x4ebd7c,_0x5f2150,_0x4ccf06)=>{const _0x43cfed=_0x40787d[Number(_0x4ccf06)];return _0x43cfed===undefined?_0x4ebd7c:''+_0x5f2150+_0x43cfed;})};}function sliceUtf8Bytes(_0x133649,_0x5ce888){const _0x210df2=a101_0x1f7ae9;if(_0x5ce888<=0x0)return'';const _0x522c3a=Buffer[_0x210df2(0xef)](_0x133649,_0x210df2(0xed));if(_0x522c3a[_0x210df2(0xfb)]<=_0x5ce888)return _0x133649;let _0x1ec9a2=_0x5ce888;while(_0x1ec9a2>0x0){const _0x4fc9ef=_0x522c3a[_0x1ec9a2];if(_0x4fc9ef===undefined||(_0x4fc9ef&0xc0)!==0x80)break;_0x1ec9a2-=0x1;}return _0x522c3a[_0x210df2(0xf1)](0x0,_0x1ec9a2)[_0x210df2(0xf9)](_0x210df2(0xed));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x2eff92=a102_0x2665;(function(_0x45b750,_0x14a5b3){const _0x269146=a102_0x2665,_0x2babd5=_0x45b750();while(!![]){try{const _0x31395c=parseInt(_0x269146(0x94))/0x1+-parseInt(_0x269146(0xa9))/0x2+parseInt(_0x269146(0x93))/0x3+parseInt(_0x269146(0x95))/0x4*(-parseInt(_0x269146(0xb4))/0x5)+-parseInt(_0x269146(0x9c))/0x6*(-parseInt(_0x269146(0xa8))/0x7)+parseInt(_0x269146(0x98))/0x8+-parseInt(_0x269146(0x90))/0x9;if(_0x31395c===_0x14a5b3)break;else _0x2babd5['push'](_0x2babd5['shift']());}catch(_0x1f8166){_0x2babd5['push'](_0x2babd5['shift']());}}}(a102_0x5c69,0x96aba));import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a102_0x5c69(){const _0x5682e2=['rabetbase\x20kb\x20detail\x20--id\x20','string','Company\x20knowledge\x20base\x20','\x20--format\x20compress`\x20before\x20choosing\x20update.','trim','\x20--format\x20compress','4515489UgKUKf','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','Knowledge-base\x20title','1850328qZtpGk','291756GZExsJ','4uMriHf','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','str','6559680QvErYA','--title\x20is\x20required.','content','--file\x20is\x20required.','438EzgDPj','contentHash','byteSize','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','stringify','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','/admin/knowledge-base/create','title','\x20for\x20','Created\x20company\x20knowledge\x20base\x20','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','rabetbase\x20kb\x20list\x20--title\x20','50365wzzBpU','556346ZSnuwb','kb_file_required','appCode','verified','file','kb_title_required','create','company','length','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','4283435VDFrcX','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','\x20with\x20title\x20','POST','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20'];a102_0x5c69=function(){return _0x5682e2;};return a102_0x5c69();}import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';function a102_0x2665(_0xe24097,_0x3e47f1){_0xe24097=_0xe24097-0x8f;const _0x5c697a=a102_0x5c69();let _0x2665c0=_0x5c697a[_0xe24097];return _0x2665c0;}const CREATE_PATH=a102_0x2eff92(0xa2);function readCreateInput(_0x32d1e8){const _0x4fb260=a102_0x2eff92,_0x5f44c5=_0x32d1e8['str'](_0x4fb260(0xa3))[_0x4fb260(0xbd)]();if(!_0x5f44c5)throw kbError(_0x4fb260(0xae),_0x4fb260(0x99));const _0x222213=_0x32d1e8[_0x4fb260(0x97)](_0x4fb260(0xad))['trim']();if(!_0x222213)throw kbError(_0x4fb260(0xaa),_0x4fb260(0x9b),_0x4fb260(0x96));return{'title':_0x5f44c5,'file':_0x222213};}async function prepareCreate(_0x1144a4){const _0x23dce3=a102_0x2eff92,_0xc7bfc7=readCreateInput(_0x1144a4),_0x4be7e3=await readKbFile(_0xc7bfc7[_0x23dce3(0xad)]),_0x3d6575=await fetchAllCompanyKnowledgeBases(_0x1144a4,{'title':_0xc7bfc7[_0x23dce3(0xa3)]}),_0x34016c=findExactCompanyKnowledgeBases(_0x3d6575,_0x1144a4[_0x23dce3(0xab)],_0xc7bfc7['title']);if(_0x34016c[_0x23dce3(0xb1)]>0x0)throw kbError('kb_already_exists',_0x23dce3(0xb8)+_0x1144a4[_0x23dce3(0xab)]+_0x23dce3(0xb6)+_0xc7bfc7[_0x23dce3(0xa3)]+'.',_0x23dce3(0xa1)+_0x34016c[0x0]['id']+_0x23dce3(0xbc));return{..._0xc7bfc7,'content':_0x4be7e3};}function plannedAfter(_0x100eb2,_0x3248e9){const _0x92ca86=a102_0x2eff92;return{'scope':'company','appCode':_0x100eb2['appCode'],'title':_0x3248e9[_0x92ca86(0xa3)],'contentByteSize':_0x3248e9[_0x92ca86(0x9a)][_0x92ca86(0x9e)],'contentHash':_0x3248e9[_0x92ca86(0x9a)][_0x92ca86(0x9d)]};}function verifyCreatedState(_0x8e7b9f,_0x216959,_0x50890c){const _0x199365=a102_0x2eff92;assertCompanyKnowledgeBase(_0x50890c,_0x8e7b9f['appCode'],_0x50890c['id']);const _0x586d16=inspectKbContent(_0x50890c['content']);if(_0x50890c[_0x199365(0xa3)]!==_0x216959[_0x199365(0xa3)]||_0x586d16[_0x199365(0x9d)]!==_0x216959[_0x199365(0x9a)][_0x199365(0x9d)])throw kbError('kb_verification_failed',_0x199365(0xbb)+_0x50890c['id']+_0x199365(0x91),'Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x50890c['id']+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');return projectKb(_0x50890c);}export const kbCreate={'service':'kb','command':a102_0x2eff92(0xaf),'description':a102_0x2eff92(0xa6),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':a102_0x2eff92(0xba),'required':!![],'description':a102_0x2eff92(0x92)},{'name':a102_0x2eff92(0xad),'type':'string','required':!![],'description':a102_0x2eff92(0xb5)}],async 'validate'(_0x3f7f41){readCreateInput(_0x3f7f41);},async 'dryRun'(_0xd5685){const _0x336cff=a102_0x2eff92,_0x6fab85=await prepareCreate(_0xd5685);return asDryRunResult({'operation':'create','selector':{'scope':_0x336cff(0xb0),'appCode':_0xd5685[_0x336cff(0xab)],'title':_0x6fab85['title']},'before':null,'after':plannedAfter(_0xd5685,_0x6fab85),'dryRun':!![],'backend':{'method':_0x336cff(0xb7),'path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x336cff(0xa7)+JSON[_0x336cff(0xa0)](_0x6fab85[_0x336cff(0xa3)])+_0x336cff(0x8f)}},{'method':_0x336cff(0xb7),'url':CREATE_PATH});},async 'execute'(_0xd5f519){const _0xc4b691=a102_0x2eff92,_0x40f37a=await prepareCreate(_0xd5f519);let _0x1e2b21,_0x48c061=![];try{const _0x5dfca0=await createEnterpriseKnowledgeBase(_0xd5f519['cookie'],{'appCode':_0xd5f519['appCode'],'title':_0x40f37a[_0xc4b691(0xa3)],'content':_0x40f37a[_0xc4b691(0x9a)][_0xc4b691(0x9a)]});assertCompanyKnowledgeBase(_0x5dfca0,_0xd5f519[_0xc4b691(0xab)],_0x5dfca0['id']),_0x1e2b21=_0x5dfca0['id'];}catch(_0x549f08){if(!isPlatformTransportFailure(_0x549f08))throw _0x549f08;_0x48c061=!![];}if(_0x1e2b21===undefined){const _0x4274ad=await verifyKbMutationReadback(_0xc4b691(0xaf),!![],()=>fetchAllCompanyKnowledgeBases(_0xd5f519,{'title':_0x40f37a[_0xc4b691(0xa3)]})),_0x1aca44=findExactCompanyKnowledgeBases(_0x4274ad,_0xd5f519[_0xc4b691(0xab)],_0x40f37a[_0xc4b691(0xa3)]);if(_0x1aca44[_0xc4b691(0xb1)]!==0x1)throw kbError('kb_create_outcome_unknown',_0xc4b691(0xb3)+_0x1aca44[_0xc4b691(0xb1)]+'.',_0xc4b691(0xb2));_0x1e2b21=_0x1aca44[0x0]['id'];}const _0x5c171e=await verifyKbMutationReadback('create',_0x48c061,()=>requireKb(_0xd5f519,_0x1e2b21)),_0x437217=verifyCreatedState(_0xd5f519,_0x40f37a,_0x5c171e),_0x14c0d1=_0x48c061?[_0xc4b691(0x9f)]:[];return{'ok':!![],'data':{'operation':_0xc4b691(0xaf),'selector':{'id':_0x437217['id'],'scope':'company','appCode':_0x437217[_0xc4b691(0xab)]},'before':null,'after':_0x437217,'dryRun':![],'backend':{'method':_0xc4b691(0xb7),'path':CREATE_PATH},'warnings':_0x14c0d1,'verification':{'status':_0xc4b691(0xac),'recoveredAfterUnknownResponse':_0x48c061,'lookupCommand':_0xc4b691(0xb9)+_0x437217['id']+_0xc4b691(0x8f)}},'message':_0xc4b691(0xa5)+_0x437217['id']+_0xc4b691(0xa4)+_0x437217[_0xc4b691(0xab)]};}};
|