@lovrabet/rabetbase-cli 2.4.6-beta.3 → 2.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/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.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b2bb8,_0x30cd6c){const _0x4c1140=a89_0x3adf,_0x392c5a=_0x2b2bb8();while(!![]){try{const _0x52d24a=-parseInt(_0x4c1140(0x102))/0x1*(-parseInt(_0x4c1140(0x10c))/0x2)+-parseInt(_0x4c1140(0x107))/0x3*(-parseInt(_0x4c1140(0x101))/0x4)+parseInt(_0x4c1140(0x105))/0x5*(-parseInt(_0x4c1140(0x106))/0x6)+-parseInt(_0x4c1140(0x10b))/0x7*(parseInt(_0x4c1140(0x103))/0x8)+-parseInt(_0x4c1140(0x108))/0x9+parseInt(_0x4c1140(0x104))/0xa*(-parseInt(_0x4c1140(0x100))/0xb)+parseInt(_0x4c1140(0x10a))/0xc*(parseInt(_0x4c1140(0x109))/0xd);if(_0x52d24a===_0x30cd6c)break;else _0x392c5a['push'](_0x392c5a['shift']());}catch(_0x35e94b){_0x392c5a['push'](_0x392c5a['shift']());}}}(a89_0x418a,0xf1d43));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';function a89_0x418a(){const _0x461618=['111612oBPIhY','49vnGaeu','539124FQpjxM','847pGCIsW','4qZyKja','3pivgel','963920fOzNuR','252990Mzhdvs','4784845oaexaV','6sFhiHB','1361946TRaBGm','13162914FTLvHO','6903WVNFWL'];a89_0x418a=function(){return _0x461618;};return a89_0x418a();}import{dbUpdate}from'../../commands/db/update.js';function a89_0x3adf(_0x254f8a,_0x566478){_0x254f8a=_0x254f8a-0x100;const _0x418ae8=a89_0x418a();let _0x3adf99=_0x418ae8[_0x254f8a];return _0x3adf99;}import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';import{dbDiffRefreshStart}from'../../commands/db/diff-refresh-start.js';import{dbDiffRefreshStatus}from'../../commands/db/diff-refresh-status.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff,dbDiffRefreshStart,dbDiffRefreshStatus];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x38b160=a90_0x151b;function a90_0x151b(_0x2b4079,_0x463dca){_0x2b4079=_0x2b4079-0x171;const _0x5cdff2=a90_0x5cdf();let _0x151b4a=_0x5cdff2[_0x2b4079];return _0x151b4a;}(function(_0x3fe712,_0x26ecac){const _0x15ddd1=a90_0x151b,_0x4debc6=_0x3fe712();while(!![]){try{const _0x57431d=parseInt(_0x15ddd1(0x183))/0x1*(-parseInt(_0x15ddd1(0x17f))/0x2)+-parseInt(_0x15ddd1(0x180))/0x3*(parseInt(_0x15ddd1(0x178))/0x4)+-parseInt(_0x15ddd1(0x171))/0x5+parseInt(_0x15ddd1(0x172))/0x6*(-parseInt(_0x15ddd1(0x17b))/0x7)+parseInt(_0x15ddd1(0x181))/0x8+-parseInt(_0x15ddd1(0x177))/0x9+parseInt(_0x15ddd1(0x17d))/0xa;if(_0x57431d===_0x26ecac)break;else _0x4debc6['push'](_0x4debc6['shift']());}catch(_0x2f6c02){_0x4debc6['push'](_0x4debc6['shift']());}}}(a90_0x5cdf,0x4eba7));import{listDatasets,listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a90_0x38b160(0x184),'description':a90_0x38b160(0x17c),'risk':a90_0x38b160(0x173),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a90_0x38b160(0x17e),'type':a90_0x38b160(0x185),'description':a90_0x38b160(0x174),'default':0x1},{'name':a90_0x38b160(0x187),'type':'number','description':'Page\x20size','default':0x64}],async 'execute'(_0x599b21){const _0x3c385d=a90_0x38b160,_0x5695a5=_0x599b21[_0x3c385d(0x179)](_0x3c385d(0x17e),0x1)||0x1,_0x3f3c8a=_0x599b21[_0x3c385d(0x179)](_0x3c385d(0x187),0x64)||0x64,[{items:_0x161806,paging:_0x336833},_0x5aaa82]=await Promise[_0x3c385d(0x182)]([listDbLinks(_0x599b21[_0x3c385d(0x186)],{'currentPage':_0x5695a5,'pageSize':_0x3f3c8a}),listDatasets(_0x599b21[_0x3c385d(0x186)],{'source':_0x3c385d(0x175)})]),_0x4a9185=_0x161806['map'](_0x279b97=>({...sanitizeDbLinkForOutput(_0x279b97),'datasetDependency':buildDbDatasetDependency(_0x279b97,_0x5aaa82)[_0x3c385d(0x176)]})),_0x2c7d88=_0x336833?_0x336833:{'currentPage':_0x5695a5,'pageSize':_0x3f3c8a,'rowsOnPage':_0x4a9185['length'],'totalCount':null,'note':'Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only'};return{'ok':!![],'data':{'connections':_0x4a9185,'paging':_0x2c7d88},'message':'Found\x20'+_0x4a9185[_0x3c385d(0x17a)]+'\x20database\x20connection(s)'};}};function a90_0x5cdf(){const _0x2cf3c2=['2895366whecUz','read','Page\x20index\x20(1-based)','DB_TABLE','datasetDependency','996390qaJXIJ','52rqMZAo','num','length','7JfbxqS','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','12443190IfGEXZ','page','3436IRpDRI','20523aXFCRN','4223512iWvgZo','all','233rMvbxU','list','number','appCode','pagesize','1836445UXWIZk'];a90_0x5cdf=function(){return _0x2cf3c2;};return a90_0x5cdf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x120ce4,_0x3963f1){const _0x3b9460=a91_0x1d8d,_0x7e7be5=_0x120ce4();while(!![]){try{const _0x31d53b=parseInt(_0x3b9460(0x162))/0x1+-parseInt(_0x3b9460(0x16c))/0x2*(parseInt(_0x3b9460(0x157))/0x3)+parseInt(_0x3b9460(0x153))/0x4*(-parseInt(_0x3b9460(0x156))/0x5)+parseInt(_0x3b9460(0x152))/0x6+-parseInt(_0x3b9460(0x16b))/0x7+parseInt(_0x3b9460(0x159))/0x8+parseInt(_0x3b9460(0x151))/0x9;if(_0x31d53b===_0x3963f1)break;else _0x7e7be5['push'](_0x7e7be5['shift']());}catch(_0x39b48f){_0x7e7be5['push'](_0x7e7be5['shift']());}}}(a91_0x5e58,0xd609e));import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function shouldRedactKey(_0x24f470){const _0x491dd5=a91_0x1d8d,_0x4bef69=_0x24f470['toLowerCase']();if(_0x4bef69===_0x491dd5(0x160)||_0x4bef69===_0x491dd5(0x150)||_0x4bef69===_0x491dd5(0x15f))return!![];if(_0x4bef69[_0x491dd5(0x155)](_0x491dd5(0x154))||_0x4bef69[_0x491dd5(0x155)](_0x491dd5(0x169))||_0x4bef69[_0x491dd5(0x155)](_0x491dd5(0x15a)))return!![];if(_0x4bef69[_0x491dd5(0x155)](_0x491dd5(0x14f))||_0x4bef69[_0x491dd5(0x155)]('accesskey'))return!![];if(_0x4bef69===_0x491dd5(0x164)||_0x4bef69===_0x491dd5(0x15b)||_0x4bef69===_0x491dd5(0x167))return!![];return![];}export function sanitizeDbLinkForOutput(_0x802111){const _0x129dad=a91_0x1d8d,_0x511704={..._0x802111};delete _0x511704[_0x129dad(0x16e)];for(const _0x5cfb20 of Object['keys'](_0x511704)){if(!shouldRedactKey(_0x5cfb20))continue;const _0xc9af2b=_0x511704[_0x5cfb20];_0xc9af2b!=null&&String(_0xc9af2b)['length']>0x0&&(_0x511704[_0x5cfb20]='[redacted]');}return _0x511704;}export function sanitizeDbLinkList(_0xae7250){return _0xae7250['map'](_0x4df739=>sanitizeDbLinkForOutput(_0x4df739));}export function buildDbDatasetDependency(_0x11e9c7,_0x2180e2){const _0x49a151=a91_0x1d8d,_0x57e3cf=_0x2180e2['filter'](_0x805cd=>Number(_0x805cd['dbtableConfig']?.[_0x49a151(0x165)])===Number(_0x11e9c7['id']))[_0x49a151(0x15d)](_0xfd604f=>({'id':_0xfd604f['id'],'code':_0xfd604f[_0x49a151(0x161)],'name':_0xfd604f[_0x49a151(0x15c)],..._0xfd604f[_0x49a151(0x15e)]?.['tableName']?{'tableName':_0xfd604f['dbtableConfig'][_0x49a151(0x158)]}:{}}));return{'datasetDependency':{'hasDependencies':_0x57e3cf[_0x49a151(0x166)]>0x0,'activeDatasetCount':_0x57e3cf[_0x49a151(0x166)]},'datasets':_0x57e3cf};}function a91_0x1d8d(_0x57fb92,_0x3beb5c){_0x57fb92=_0x57fb92-0x14f;const _0x5e58e9=a91_0x5e58();let _0x1d8d79=_0x5e58e9[_0x57fb92];return _0x1d8d79;}export async function assertDbLinkConnectionPreflight(_0x495d08){const _0xfff624=a91_0x1d8d,_0x28ed4a=await testDbLinkConfigConnect(_0x495d08);if(_0x28ed4a!==!![])throw CliErrors['apiError'](_0xfff624(0x163),_0xfff624(0x16a));}function a91_0x5e58(){const _0xd0813c=['credential','connectionstring','name','map','dbtableConfig','dbpassword','password','code','1150286pBCFun','Database\x20connection\x20preflight\x20failed.','authorization','dbId','length','jdbcurl','trim','token','The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.','5449640AvXLNu','698IeOshC','isFinite','hasAvailableDo','privatekey','passwd','764379bTCvJO','9371076wrlXpr','324496MbJbnt','secret','includes','85CzUNWO','3561Oqtvkm','tableName','5212240eAKJUP'];a91_0x5e58=function(){return _0xd0813c;};return a91_0x5e58();}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x41da9b){const _0x48423d=_0x41da9b['trim']();if(!_0x48423d)return![];return DB_URL_PATTERN['test'](_0x48423d);}export function buildDbPageLinks(_0x1957f7,_0xb6f70d){const _0x42c114=a91_0x1d8d,_0x48d1c8=_0x1957f7?.[_0x42c114(0x168)]();if(!_0x48d1c8)return undefined;const _0x5ca84e=typeof _0xb6f70d==='number'?String(_0xb6f70d):String(_0xb6f70d??'')['trim']();if(!_0x5ca84e)return undefined;const _0x53c647=Number(_0x5ca84e);if(!Number[_0x42c114(0x16d)](_0x53c647)||_0x53c647<=0x0)return undefined;const _0x54a29f=getAppBaseUrl(_0x48d1c8),_0x53880f=encodeURIComponent(String(_0x53c647));return{'databasePage':_0x54a29f+'/data/database','erPage':_0x54a29f+'/data/er?dbId='+_0x53880f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a92_0x5087c8=a92_0x3e49;(function(_0x3f70c9,_0x1c6bd8){const _0x3082b9=a92_0x3e49,_0x18f944=_0x3f70c9();while(!![]){try{const _0x5a102a=parseInt(_0x3082b9(0xd9))/0x1+-parseInt(_0x3082b9(0xdc))/0x2+-parseInt(_0x3082b9(0xde))/0x3+parseInt(_0x3082b9(0xd7))/0x4*(parseInt(_0x3082b9(0xdd))/0x5)+-parseInt(_0x3082b9(0xdb))/0x6+-parseInt(_0x3082b9(0xdf))/0x7+parseInt(_0x3082b9(0xda))/0x8;if(_0x5a102a===_0x1c6bd8)break;else _0x18f944['push'](_0x18f944['shift']());}catch(_0x1358c5){_0x18f944['push'](_0x18f944['shift']());}}}(a92_0x1654,0x4d5fe));import{getDbAllTableList}from'../../core/api-client.js';function a92_0x1654(){const _0x31de09=['num','length','appCode','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','4FXOgDz','read','553015BGJsZB','9884208VCjxrm','2908176fiuNBS','971930LCAJvP','2163515hEeiUM','1115367pRXCDt','3933076sdQyhN'];a92_0x1654=function(){return _0x31de09;};return a92_0x1654();}function a92_0x3e49(_0x316bea,_0xeb58ed){_0x316bea=_0x316bea-0xd6;const _0x165473=a92_0x1654();let _0x3e4973=_0x165473[_0x316bea];return _0x3e4973;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':'tables','description':a92_0x5087c8(0xd6),'risk':a92_0x5087c8(0xd8),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x9786bf){const _0x8423d8=a92_0x5087c8,_0x118632=_0x9786bf[_0x8423d8(0xe0)]('id'),_0x3ee1c2=await getDbAllTableList(_0x9786bf[_0x8423d8(0xe2)],_0x118632);return{'ok':!![],'data':{'dbLinkId':_0x118632,'total':_0x3ee1c2[_0x8423d8(0xe1)],'tables':_0x3ee1c2},'message':_0x3ee1c2[_0x8423d8(0xe1)]+'\x20table(s)\x20on\x20db\x20link\x20'+_0x118632};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a93_0x336c(_0x541cc0,_0x2eb19e){_0x541cc0=_0x541cc0-0x98;const _0x504cf5=a93_0x504c();let _0x336cfb=_0x504cf5[_0x541cc0];return _0x336cfb;}const a93_0x244b11=a93_0x336c;(function(_0x3e5ffe,_0x16c3d6){const _0x58fc8e=a93_0x336c,_0x5b7e04=_0x3e5ffe();while(!![]){try{const _0x4f839b=-parseInt(_0x58fc8e(0xa5))/0x1*(parseInt(_0x58fc8e(0xad))/0x2)+-parseInt(_0x58fc8e(0xb0))/0x3*(parseInt(_0x58fc8e(0xaf))/0x4)+parseInt(_0x58fc8e(0x98))/0x5+-parseInt(_0x58fc8e(0xa4))/0x6*(parseInt(_0x58fc8e(0x9d))/0x7)+parseInt(_0x58fc8e(0xa0))/0x8*(-parseInt(_0x58fc8e(0x9b))/0x9)+parseInt(_0x58fc8e(0xac))/0xa+-parseInt(_0x58fc8e(0x9e))/0xb*(-parseInt(_0x58fc8e(0x9f))/0xc);if(_0x4f839b===_0x16c3d6)break;else _0x5b7e04['push'](_0x5b7e04['shift']());}catch(_0x35a49a){_0x5b7e04['push'](_0x5b7e04['shift']());}}}(a93_0x504c,0x6f31b));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x3efad7){const _0xb0de8c=a93_0x336c;if(_0x3efad7===!![]||_0x3efad7===![])return{'success':_0x3efad7};if(_0x3efad7===null||_0x3efad7===undefined)return{'type':typeof _0x3efad7};if(typeof _0x3efad7!==_0xb0de8c(0xa3))return{'type':typeof _0x3efad7};const _0x5acaac=_0x3efad7,_0xb13fff=['success',_0xb0de8c(0xa9),_0xb0de8c(0x9a),_0xb0de8c(0xae),'msg','data'],_0x8c21f2={};for(const _0x322124 of _0xb13fff){if(_0x322124 in _0x5acaac)_0x8c21f2[_0x322124]=_0x5acaac[_0x322124];}return Object[_0xb0de8c(0xab)](_0x8c21f2)[_0xb0de8c(0x99)]===0x0&&(_0x8c21f2['keys']=Object[_0xb0de8c(0xab)](_0x5acaac)['slice'](0x0,0x14)),_0x8c21f2;}export const dbTest={'service':'db','command':a93_0x244b11(0xaa),'description':a93_0x244b11(0xa2),'risk':a93_0x244b11(0xa1),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x55e10d){const _0x5bcc9f=a93_0x244b11,_0x1efa78=_0x55e10d[_0x5bcc9f(0xa7)]('id'),_0xd1e0d2=await testDbLinkConnect(_0x1efa78),_0x808935=_0xd1e0d2===!![]||typeof _0xd1e0d2==='object'&&_0xd1e0d2!==null&&_0xd1e0d2['success']===!![],_0x8246c0=summarizeTestConnectResult(_0xd1e0d2);return{'ok':!![],'data':{'id':_0x1efa78,'connected':Boolean(_0x808935),'result':_0x8246c0},'message':_0x808935?_0x5bcc9f(0xa8)+_0x1efa78:_0x5bcc9f(0xa6)+_0x1efa78+_0x5bcc9f(0x9c)};}};function a93_0x504c(){const _0x590875=['279nAzPOW','\x20(see\x20data.result)','2919KUXCMJ','27940mtPUwj','5364kwxBBr','73808fDMFeA','read','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','object','2118faYFwv','35620RvOsrr','Connection\x20check\x20finished\x20for\x20db\x20link\x20','num','Connection\x20OK\x20for\x20db\x20link\x20','message','test','keys','6805590YYUacv','48weJhEw','error','80SrkquR','79353iTckWi','2283095ZddZNy','length','code'];a93_0x504c=function(){return _0x590875;};return a93_0x504c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x57b4eb=a94_0x54fa;(function(_0x50725e,_0x5e75d3){const _0x23d70e=a94_0x54fa,_0x15f6e6=_0x50725e();while(!![]){try{const _0x27479d=-parseInt(_0x23d70e(0x96))/0x1*(-parseInt(_0x23d70e(0xa4))/0x2)+parseInt(_0x23d70e(0xad))/0x3*(parseInt(_0x23d70e(0xac))/0x4)+parseInt(_0x23d70e(0xab))/0x5+parseInt(_0x23d70e(0x9c))/0x6+parseInt(_0x23d70e(0x9d))/0x7*(parseInt(_0x23d70e(0xa5))/0x8)+-parseInt(_0x23d70e(0xb6))/0x9+-parseInt(_0x23d70e(0xb5))/0xa;if(_0x27479d===_0x5e75d3)break;else _0x15f6e6['push'](_0x15f6e6['shift']());}catch(_0x520cc7){_0x15f6e6['push'](_0x15f6e6['shift']());}}}(a94_0x2491,0x47dcf));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a94_0x54fa(_0x4f280c,_0x606d0e){_0x4f280c=_0x4f280c-0x94;const _0x249141=a94_0x2491();let _0x54faa3=_0x249141[_0x4f280c];return _0x54faa3;}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_0x57b4eb(0xb9),'[redacted]']);function mergeDbLinkUpdate(_0x10eccd,_0x4de9a2){const _0x1997f8=a94_0x57b4eb,_0x13c6f6={..._0x10eccd},_0x39fcb6=_0x4de9a2[_0x1997f8(0xb2)](_0x1997f8(0xaa));if(_0x39fcb6&&MASKED_PASSWORD_VALUES[_0x1997f8(0xaf)](_0x39fcb6))throw CliErrors[_0x1997f8(0xa3)](_0x1997f8(0x95));if(!_0x39fcb6&&MASKED_PASSWORD_VALUES[_0x1997f8(0xaf)](String(_0x10eccd[_0x1997f8(0xaa)]??'')))throw CliErrors[_0x1997f8(0xa3)](_0x1997f8(0xa2));const _0x25594a=_0x4de9a2['str'](_0x1997f8(0x9e));if(_0x25594a)_0x13c6f6[_0x1997f8(0xb3)]=_0x25594a;const _0x199898=_0x4de9a2[_0x1997f8(0xb2)](_0x1997f8(0xae));if(_0x199898)_0x13c6f6[_0x1997f8(0x94)]=_0x199898[_0x1997f8(0x9b)]();const _0x570752=_0x4de9a2['str'](_0x1997f8(0x99));if(_0x570752)_0x13c6f6[_0x1997f8(0x99)]=_0x570752;if(_0x39fcb6)_0x13c6f6[_0x1997f8(0xaa)]=_0x39fcb6;const _0x53d0fd=_0x4de9a2['str'](_0x1997f8(0xbb));if(_0x53d0fd)_0x13c6f6['dbParam']=_0x53d0fd;const _0x5dcc34=_0x4de9a2[_0x1997f8(0xb2)](_0x1997f8(0x98));if(_0x5dcc34)_0x13c6f6['dbDesc']=_0x5dcc34;return _0x13c6f6;}function a94_0x2491(){const _0x117b3c=['update','bool','string','password','617220oMjOWw','3964wisBme','1011LQcnDY','dburl','has','POST','New\x20host:port','str','dbName','New\x20connection\x20parameter\x20string','6708880avOupF','3561750QSLIVu','write','skip-connection-test','******','New\x20description','dbparam','New\x20username','dbUrl','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','1237VWifpH','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','dbdesc','username','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','trim','633570iTVwnq','1576351paZIPM','dbname','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','/smartapi/dblink/update','num','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','validation','562sSxjjT','16ggJAGR','Updated\x20db\x20link\x20'];a94_0x2491=function(){return _0x117b3c;};return a94_0x2491();}export const dbUpdate={'service':'db','command':a94_0x57b4eb(0xa7),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':a94_0x57b4eb(0xb7),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a94_0x57b4eb(0x9e),'type':a94_0x57b4eb(0xa9),'description':'New\x20database\x20name'},{'name':a94_0x57b4eb(0xae),'type':a94_0x57b4eb(0xa9),'description':a94_0x57b4eb(0xb1)},{'name':a94_0x57b4eb(0x99),'type':a94_0x57b4eb(0xa9),'description':a94_0x57b4eb(0xbc)},{'name':a94_0x57b4eb(0xaa),'type':a94_0x57b4eb(0xa9),'description':a94_0x57b4eb(0x9a)},{'name':a94_0x57b4eb(0xbb),'type':a94_0x57b4eb(0xa9),'description':a94_0x57b4eb(0xb4)},{'name':a94_0x57b4eb(0x98),'type':a94_0x57b4eb(0xa9),'description':a94_0x57b4eb(0xba)},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x8280f7){const _0x29e221=a94_0x57b4eb,_0x4ff983=_0x8280f7['str'](_0x29e221(0xae));if(_0x4ff983&&!validateDbUrl(_0x4ff983[_0x29e221(0x9b)]()))throw CliErrors[_0x29e221(0xa3)](_0x29e221(0x9f)+_0x4ff983+'\x22');},async 'dryRun'(_0x4a45bb){const _0x2646b3=a94_0x57b4eb,_0x8e97bc=_0x4a45bb['num']('id'),_0x14e1d3=await getDbLinkInfo(_0x8e97bc),_0x329849=mergeDbLinkUpdate(_0x14e1d3,_0x4a45bb),_0x51b1ef=sanitizeDbLinkForOutput(_0x329849);return{'method':_0x2646b3(0xb0),'url':_0x2646b3(0xa0),'body':_0x51b1ef,'description':_0x2646b3(0x97),'connectionPreflight':{'enabled':!_0x4a45bb['bool'](_0x2646b3(0xb8)),'executed':![]}};},async 'execute'(_0x373454){const _0x2971ed=a94_0x57b4eb,_0x39825d=_0x373454[_0x2971ed(0xa1)]('id'),_0x255e4c=await getDbLinkInfo(_0x39825d),_0x42432e=mergeDbLinkUpdate(_0x255e4c,_0x373454);!_0x373454[_0x2971ed(0xa8)](_0x2971ed(0xb8))&&await assertDbLinkConnectionPreflight(_0x42432e);const {id:_0x598909,entity:_0xdb82cd}=normalizeEntityWithIdResponse(await updateDbLink(_0x42432e));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0xdb82cd),'message':_0x2971ed(0xa6)+(_0x598909??_0x39825d)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a95_0x28e1(){const _0x19f9ad=['(no\x20file)','\x20←\x20current','4907727tRMnnA','arch','appcode','490586buKvOS','337615JyoLEf','233427XPDPec','installedPath','16qcEsSu','repeat','366244UnDmbG','(set\x20via\x20file,\x20length=','\x20\x20Skill\x20Version:\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','keys','\x20\x20API\x20Endpoints','\x20\x20Installed\x20Path:\x20\x20','✓\x20Valid\x20JSON','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','yellow','unknown','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','Global','length','doctor','explicitAppName','platform','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','appCode','green','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','36eDsALi','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','1652588Knanfo','(missing)','\x20\x20Apps','message','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','defaultApp','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','env','log','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','bold','pageSize','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','✗\x20Expired','riskLevel','\x20\x20Auth','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','skillVersion','\x20doctor','raw','gray','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','(not\x20found)','(default)','apiDir','\x20\x20Package\x20Version:\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','currentApp','format','current','✗\x20Invalid\x20JSON','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','(none)','\x20\x20─','cookie','(not\x20set)','\x20\x20Config\x20Files','\x20\x20explicitAppName:\x20','\x20\x20\x20\x20accessKey:\x20\x20','read','2731456XjMnqm','reason','(set,\x20length=','packageVersion','value','empty','source','verbose','red','check','state','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','accessKey'];a95_0x28e1=function(){return _0x19f9ad;};return a95_0x28e1();}const a95_0x2117eb=a95_0x1294;(function(_0x4d5222,_0x4a657e){const _0x38afff=a95_0x1294,_0x4aa37=_0x4d5222();while(!![]){try{const _0x5a1558=parseInt(_0x38afff(0x101))/0x1+parseInt(_0x38afff(0x107))/0x2+parseInt(_0x38afff(0x103))/0x3+-parseInt(_0x38afff(0x152))/0x4+parseInt(_0x38afff(0x102))/0x5*(-parseInt(_0x38afff(0x121))/0x6)+-parseInt(_0x38afff(0x125))/0x7+parseInt(_0x38afff(0x105))/0x8*(parseInt(_0x38afff(0xfe))/0x9);if(_0x5a1558===_0x4a657e)break;else _0x4aa37['push'](_0x4aa37['shift']());}catch(_0x2e3135){_0x4aa37['push'](_0x4aa37['shift']());}}}(a95_0x28e1,0x7e795));import a95_0x373e90 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a95_0x1294(_0x2eb1b0,_0xff801c){_0x2eb1b0=_0x2eb1b0-0xf5;const _0x28e1d0=a95_0x28e1();let _0x129486=_0x28e1d0[_0x2eb1b0];return _0x129486;}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(_0x5c1ca2){const _0x5c86fc=a95_0x1294,_0x5318e8=GIT_COMMIT!==_0x5c86fc(0x112)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,_0x4ff775=buildConfigFromFlags({}),_0x3edb80=getCookie();console[_0x5c86fc(0x12d)](),console[_0x5c86fc(0x12d)](a95_0x373e90[_0x5c86fc(0x12f)](CLI_BIN_NAME+_0x5c86fc(0x138))),console[_0x5c86fc(0x12d)](a95_0x373e90[_0x5c86fc(0x13a)]('─'[_0x5c86fc(0x106)](0x32))),console[_0x5c86fc(0x12d)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x5318e8),console['log'](_0x5c86fc(0x11b)+process['version']),console[_0x5c86fc(0x12d)](_0x5c86fc(0x136)+process[_0x5c86fc(0x119)]+'\x20'+process[_0x5c86fc(0xff)]);const _0x50dea1=inspectBuiltinSkill();console[_0x5c86fc(0x12d)](),console[_0x5c86fc(0x12d)](a95_0x373e90[_0x5c86fc(0x12f)]('\x20\x20Built-in\x20Skill')),console[_0x5c86fc(0x12d)](a95_0x373e90[_0x5c86fc(0x13a)]('\x20\x20─'[_0x5c86fc(0x106)](0x1e)));const _0x2b6aa1=_0x50dea1['state']===_0x5c86fc(0x147)?a95_0x373e90[_0x5c86fc(0x11e)]('✓\x20'+_0x50dea1['state']):a95_0x373e90[_0x5c86fc(0xf7)]('✗\x20'+_0x50dea1[_0x5c86fc(0xf9)]);console[_0x5c86fc(0x12d)]('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2b6aa1),console[_0x5c86fc(0x12d)](_0x5c86fc(0x140)+_0x50dea1[_0x5c86fc(0x155)]),console[_0x5c86fc(0x12d)](_0x5c86fc(0x109)+(_0x50dea1[_0x5c86fc(0x137)]||a95_0x373e90[_0x5c86fc(0x13a)]('(unknown)'))),console['log'](_0x5c86fc(0x10e)+(_0x50dea1[_0x5c86fc(0x104)]||a95_0x373e90[_0x5c86fc(0x13a)](_0x5c86fc(0x13d))));if(_0x50dea1[_0x5c86fc(0x153)])console[_0x5c86fc(0x12d)](_0x5c86fc(0x12e)+_0x50dea1[_0x5c86fc(0x153)]);_0x50dea1[_0x5c86fc(0xf9)]!=='current'&&console[_0x5c86fc(0x12d)](_0x5c86fc(0xfa)+_0x50dea1['repairCommand']);console[_0x5c86fc(0x12d)](),console['log'](a95_0x373e90[_0x5c86fc(0x12f)](_0x5c86fc(0x14e))),console[_0x5c86fc(0x12d)](a95_0x373e90[_0x5c86fc(0x13a)](_0x5c86fc(0x14b)[_0x5c86fc(0x106)](0x1e)));const _0x1fb178=getGlobalConfigPath(),_0x254077=getProjectConfigPath();console[_0x5c86fc(0x12d)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1fb178||a95_0x373e90[_0x5c86fc(0x13a)]('(not\x20found)'))),console[_0x5c86fc(0x12d)](_0x5c86fc(0x13b)+(_0x254077||a95_0x373e90[_0x5c86fc(0x13a)]('(not\x20found)'))),console[_0x5c86fc(0x12d)](),console[_0x5c86fc(0x12d)](a95_0x373e90[_0x5c86fc(0x12f)]('\x20\x20Config\x20JSON')),console[_0x5c86fc(0x12d)](a95_0x373e90[_0x5c86fc(0x13a)](_0x5c86fc(0x14b)[_0x5c86fc(0x106)](0x1e)));const _0x32d965=(_0x341bea,_0xef8209)=>{const _0x3b6dc2=_0x5c86fc;if(!_0xef8209){console[_0x3b6dc2(0x12d)]('\x20\x20'+_0x341bea['padEnd'](0x11)+'\x20'+a95_0x373e90[_0x3b6dc2(0x13a)](_0x3b6dc2(0xfc)));return;}const _0x16b006=inspectCliConfigJsonFile(_0xef8209);if(_0x16b006[_0x3b6dc2(0x114)]==='ok')console['log']('\x20\x20'+_0x341bea[_0x3b6dc2(0x123)](0x11)+'\x20'+a95_0x373e90[_0x3b6dc2(0x11e)](_0x3b6dc2(0x10f)));else{if(_0x16b006['status']===_0x3b6dc2(0x157))console['log']('\x20\x20'+_0x341bea[_0x3b6dc2(0x123)](0x11)+'\x20'+a95_0x373e90[_0x3b6dc2(0x111)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x16b006['status']==='missing'?console[_0x3b6dc2(0x12d)]('\x20\x20'+_0x341bea[_0x3b6dc2(0x123)](0x11)+'\x20'+a95_0x373e90[_0x3b6dc2(0x13a)](_0x3b6dc2(0x126))):(console[_0x3b6dc2(0x12d)]('\x20\x20'+_0x341bea[_0x3b6dc2(0x123)](0x11)+'\x20'+a95_0x373e90[_0x3b6dc2(0xf7)](_0x3b6dc2(0x148))),console[_0x3b6dc2(0x12d)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a95_0x373e90[_0x3b6dc2(0xf7)](_0x16b006[_0x3b6dc2(0x128)])));}};_0x32d965(_0x5c86fc(0x115),_0x1fb178),_0x32d965('Project',_0x254077),console['log'](),console['log'](a95_0x373e90['bold']('\x20\x20Merged\x20Config')),console[_0x5c86fc(0x12d)](a95_0x373e90['gray'](_0x5c86fc(0x14b)['repeat'](0x1e))),console['log'](_0x5c86fc(0x122)+(_0x4ff775[_0x5c86fc(0x11d)]||a95_0x373e90[_0x5c86fc(0xf7)](_0x5c86fc(0x14d)))),console[_0x5c86fc(0x12d)](_0x5c86fc(0x131)+_0x4ff775['env']),console[_0x5c86fc(0x12d)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4ff775[_0x5c86fc(0x11c)]),console[_0x5c86fc(0x12d)](_0x5c86fc(0x143)+_0x4ff775[_0x5c86fc(0x13f)]),console[_0x5c86fc(0x12d)](_0x5c86fc(0x120)+(_0x4ff775[_0x5c86fc(0x12a)]||a95_0x373e90[_0x5c86fc(0x13a)](_0x5c86fc(0x14a)))),console[_0x5c86fc(0x12d)](_0x5c86fc(0x132)+(_0x4ff775[_0x5c86fc(0x145)]||a95_0x373e90[_0x5c86fc(0x13a)](_0x5c86fc(0x14a)))),console[_0x5c86fc(0x12d)](_0x5c86fc(0x14f)+(_0x4ff775[_0x5c86fc(0x118)]||a95_0x373e90[_0x5c86fc(0x13a)](_0x5c86fc(0x14a)))),console[_0x5c86fc(0x12d)](_0x5c86fc(0x12b)+(_0x4ff775[_0x5c86fc(0x146)]||a95_0x373e90['gray'](_0x5c86fc(0x144)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x5c86fc(0x12d)](_0x5c86fc(0x11f)+(_0x4ff775[_0x5c86fc(0x130)]??a95_0x373e90[_0x5c86fc(0x13a)](_0x5c86fc(0x13e)))),console[_0x5c86fc(0x12d)](_0x5c86fc(0x11a)+_0x4ff775[_0x5c86fc(0x134)]),console[_0x5c86fc(0x12d)](_0x5c86fc(0x141)+_0x4ff775[_0x5c86fc(0xf6)]),console['log']('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4ff775[_0x5c86fc(0x14c)]?a95_0x373e90[_0x5c86fc(0x11e)](_0x5c86fc(0x154)+_0x4ff775[_0x5c86fc(0x14c)][_0x5c86fc(0x116)]+')'):_0x3edb80?a95_0x373e90[_0x5c86fc(0x11e)](_0x5c86fc(0x108)+_0x3edb80['length']+')'):a95_0x373e90['gray']('(none)')));const _0x446fa1=Object[_0x5c86fc(0x10c)](_0x4ff775['apps']);if(_0x446fa1[_0x5c86fc(0x116)]>0x0){console[_0x5c86fc(0x12d)](),console['log'](a95_0x373e90[_0x5c86fc(0x12f)](_0x5c86fc(0x127))),console[_0x5c86fc(0x12d)](a95_0x373e90['gray'](_0x5c86fc(0x14b)[_0x5c86fc(0x106)](0x1e)));for(const _0x1651ea of _0x446fa1){const _0x3b7cb1=_0x4ff775['apps'][_0x1651ea],_0x1e9940=_0x1651ea===_0x4ff775[_0x5c86fc(0x12a)],_0x1b3deb=_0x1651ea===_0x4ff775[_0x5c86fc(0x145)],_0x3fa5f5=_0x1b3deb?a95_0x373e90['green'](_0x5c86fc(0xfd)):'',_0x5de389=_0x1e9940?'\x20(default)':'';console['log']('\x20\x20'+_0x1651ea+_0x5de389+_0x3fa5f5),console[_0x5c86fc(0x12d)](_0x5c86fc(0x13c)+_0x3b7cb1[_0x5c86fc(0x100)]);const _0x205f83=buildAppDoctorFields(_0x3b7cb1,{'env':_0x4ff775[_0x5c86fc(0x12c)],'apiDir':_0x4ff775[_0x5c86fc(0x139)][_0x5c86fc(0x13f)]||DEFAULT_CONFIG_VALUES[_0x5c86fc(0x13f)],'cookie':_0x4ff775['cookie']||_0x3edb80||undefined,'accessKey':_0x4ff775[_0x5c86fc(0xfb)]});console[_0x5c86fc(0x12d)](_0x5c86fc(0x124)+_0x205f83[_0x5c86fc(0x12c)]['value']+'\x20\x20'+a95_0x373e90[_0x5c86fc(0x13a)]('('+_0x205f83['env'][_0x5c86fc(0xf5)]+')')),console[_0x5c86fc(0x12d)](_0x5c86fc(0x10b)+_0x205f83['apiDir'][_0x5c86fc(0x156)]+'\x20\x20'+a95_0x373e90[_0x5c86fc(0x13a)]('('+_0x205f83['apiDir'][_0x5c86fc(0xf5)]+')'));const _0x16de6c=_0x205f83[_0x5c86fc(0x14c)]['value']?a95_0x373e90[_0x5c86fc(0x11e)](_0x5c86fc(0x154)+_0x205f83[_0x5c86fc(0x14c)][_0x5c86fc(0x156)][_0x5c86fc(0x116)]+')'):a95_0x373e90[_0x5c86fc(0x13a)](_0x5c86fc(0x14a));console[_0x5c86fc(0x12d)](_0x5c86fc(0x149)+_0x16de6c+'\x20\x20'+a95_0x373e90[_0x5c86fc(0x13a)]('('+_0x205f83[_0x5c86fc(0x14c)][_0x5c86fc(0xf5)]+')'));const _0x7f898f=_0x205f83[_0x5c86fc(0xfb)][_0x5c86fc(0x156)]?a95_0x373e90[_0x5c86fc(0x11e)](_0x5c86fc(0x154)+_0x205f83[_0x5c86fc(0xfb)][_0x5c86fc(0x156)]['length']+')'):a95_0x373e90[_0x5c86fc(0x13a)](_0x5c86fc(0x14a));console[_0x5c86fc(0x12d)](_0x5c86fc(0x150)+_0x7f898f+'\x20\x20'+a95_0x373e90[_0x5c86fc(0x13a)]('('+_0x205f83['accessKey'][_0x5c86fc(0xf5)]+')'));}}console[_0x5c86fc(0x12d)](),console[_0x5c86fc(0x12d)](a95_0x373e90[_0x5c86fc(0x12f)](_0x5c86fc(0x10d))),console['log'](a95_0x373e90['gray'](_0x5c86fc(0x14b)[_0x5c86fc(0x106)](0x1e))),console[_0x5c86fc(0x12d)](_0x5c86fc(0x10a)+getApiDomain()),console[_0x5c86fc(0x12d)](_0x5c86fc(0x110)+getUserDomain()),console['log'](_0x5c86fc(0x142)+getRuntimeDomain()),console[_0x5c86fc(0x12d)](),console[_0x5c86fc(0x12d)](a95_0x373e90[_0x5c86fc(0x12f)](_0x5c86fc(0x135))),console[_0x5c86fc(0x12d)](a95_0x373e90[_0x5c86fc(0x13a)](_0x5c86fc(0x14b)[_0x5c86fc(0x106)](0x1e)));if(_0x3edb80){const _0x4373b9=await getIsSessionValid();console[_0x5c86fc(0x12d)](_0x5c86fc(0x113)+(_0x4373b9?a95_0x373e90['green']('✓\x20Valid'):a95_0x373e90[_0x5c86fc(0xf7)](_0x5c86fc(0x133))));}else console[_0x5c86fc(0x12d)](_0x5c86fc(0x113)+a95_0x373e90[_0x5c86fc(0xf7)]('✗\x20Not\x20logged\x20in'));return console[_0x5c86fc(0x12d)](),{'ok':!![]};}export const doctorDefinition={'service':a95_0x2117eb(0x117),'command':a95_0x2117eb(0xf8),'description':a95_0x2117eb(0x129),'risk':a95_0x2117eb(0x151),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
function a95_0xfdfa(_0xffa31b,_0x2723e9){_0xffa31b=_0xffa31b-0xd6;const _0x2d9a81=a95_0x2d9a();let _0xfdfadb=_0x2d9a81[_0xffa31b];return _0xfdfadb;}const a95_0x44ffec=a95_0xfdfa;(function(_0x5d6e78,_0x39299f){const _0x12e025=a95_0xfdfa,_0x4eecb6=_0x5d6e78();while(!![]){try{const _0x27f99d=-parseInt(_0x12e025(0xf7))/0x1*(parseInt(_0x12e025(0x111))/0x2)+-parseInt(_0x12e025(0xfc))/0x3+parseInt(_0x12e025(0xe3))/0x4+parseInt(_0x12e025(0x132))/0x5*(parseInt(_0x12e025(0xf4))/0x6)+-parseInt(_0x12e025(0x123))/0x7*(parseInt(_0x12e025(0xf1))/0x8)+-parseInt(_0x12e025(0xda))/0x9*(-parseInt(_0x12e025(0xee))/0xa)+-parseInt(_0x12e025(0xdf))/0xb;if(_0x27f99d===_0x39299f)break;else _0x4eecb6['push'](_0x4eecb6['shift']());}catch(_0x51e1c7){_0x4eecb6['push'](_0x4eecb6['shift']());}}}(a95_0x2d9a,0x30cec));import a95_0x45e9f4 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x2a98b6){const _0x311dcb=a95_0xfdfa,_0x401fa9=GIT_COMMIT!==_0x311dcb(0xf6)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x311dcb(0x11f)](0x0,0xa)+')':VERSION,_0x27d9ee=buildConfigFromFlags({}),_0x45d4ab=getCookie();console[_0x311dcb(0xff)](),console[_0x311dcb(0xff)](a95_0x45e9f4[_0x311dcb(0xf2)](CLI_BIN_NAME+_0x311dcb(0xec))),console['log'](a95_0x45e9f4[_0x311dcb(0x10a)]('─'[_0x311dcb(0x107)](0x32))),console[_0x311dcb(0xff)](_0x311dcb(0xf0)+_0x401fa9),console[_0x311dcb(0xff)](_0x311dcb(0x121)+process['version']),console['log'](_0x311dcb(0xe8)+process[_0x311dcb(0x112)]+'\x20'+process['arch']);const _0x7bd5dd=inspectBuiltinSkill();console['log'](),console[_0x311dcb(0xff)](a95_0x45e9f4['bold']('\x20\x20Built-in\x20Skill')),console['log'](a95_0x45e9f4[_0x311dcb(0x10a)]('\x20\x20─'[_0x311dcb(0x107)](0x1e)));const _0x26c0ed=_0x7bd5dd[_0x311dcb(0x120)]===_0x311dcb(0xea)?a95_0x45e9f4[_0x311dcb(0x103)]('✓\x20'+_0x7bd5dd['state']):a95_0x45e9f4[_0x311dcb(0x100)]('✗\x20'+_0x7bd5dd[_0x311dcb(0x120)]);console[_0x311dcb(0xff)](_0x311dcb(0xeb)+_0x26c0ed),console[_0x311dcb(0xff)](_0x311dcb(0x104)+_0x7bd5dd[_0x311dcb(0x11c)]),console[_0x311dcb(0xff)](_0x311dcb(0x109)+(_0x7bd5dd['skillVersion']||a95_0x45e9f4[_0x311dcb(0x10a)](_0x311dcb(0xf8)))),console[_0x311dcb(0xff)](_0x311dcb(0x128)+(_0x7bd5dd[_0x311dcb(0xfd)]||a95_0x45e9f4['gray'](_0x311dcb(0x110))));if(_0x7bd5dd['reason'])console[_0x311dcb(0xff)](_0x311dcb(0x11e)+_0x7bd5dd[_0x311dcb(0xd6)]);_0x7bd5dd['state']!==_0x311dcb(0xea)&&console[_0x311dcb(0xff)]('\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x7bd5dd[_0x311dcb(0x10d)]);console[_0x311dcb(0xff)](),console[_0x311dcb(0xff)](a95_0x45e9f4['bold'](_0x311dcb(0xf5))),console['log'](a95_0x45e9f4[_0x311dcb(0x10a)]('\x20\x20─'['repeat'](0x1e)));const _0x532630=getGlobalConfigPath(),_0xf09ee9=getProjectConfigPath();console[_0x311dcb(0xff)](_0x311dcb(0xed)+(_0x532630||a95_0x45e9f4[_0x311dcb(0x10a)](_0x311dcb(0x110)))),console[_0x311dcb(0xff)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xf09ee9||a95_0x45e9f4[_0x311dcb(0x10a)](_0x311dcb(0x110)))),console['log'](),console[_0x311dcb(0xff)](a95_0x45e9f4[_0x311dcb(0xf2)](_0x311dcb(0x122))),console[_0x311dcb(0xff)](a95_0x45e9f4['gray'](_0x311dcb(0xdc)[_0x311dcb(0x107)](0x1e)));const _0x2d701e=(_0x1aea26,_0x36267c)=>{const _0x238d9b=_0x311dcb;if(!_0x36267c){console[_0x238d9b(0xff)]('\x20\x20'+_0x1aea26[_0x238d9b(0xdd)](0x11)+'\x20'+a95_0x45e9f4[_0x238d9b(0x10a)]('(no\x20file)'));return;}const _0x52847f=inspectCliConfigJsonFile(_0x36267c);if(_0x52847f[_0x238d9b(0x129)]==='ok')console[_0x238d9b(0xff)]('\x20\x20'+_0x1aea26['padEnd'](0x11)+'\x20'+a95_0x45e9f4['green']('✓\x20Valid\x20JSON'));else{if(_0x52847f['status']==='empty')console[_0x238d9b(0xff)]('\x20\x20'+_0x1aea26[_0x238d9b(0xdd)](0x11)+'\x20'+a95_0x45e9f4[_0x238d9b(0x12b)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x52847f[_0x238d9b(0x129)]==='missing'?console[_0x238d9b(0xff)]('\x20\x20'+_0x1aea26[_0x238d9b(0xdd)](0x11)+'\x20'+a95_0x45e9f4[_0x238d9b(0x10a)](_0x238d9b(0x11a))):(console['log']('\x20\x20'+_0x1aea26[_0x238d9b(0xdd)](0x11)+'\x20'+a95_0x45e9f4['red'](_0x238d9b(0x113))),console['log']('\x20\x20'+''[_0x238d9b(0xdd)](0x11)+'\x20'+a95_0x45e9f4[_0x238d9b(0x100)](_0x52847f[_0x238d9b(0xe4)])));}};_0x2d701e('Global',_0x532630),_0x2d701e('Project',_0xf09ee9),console[_0x311dcb(0xff)](),console[_0x311dcb(0xff)](a95_0x45e9f4[_0x311dcb(0xf2)](_0x311dcb(0x118))),console[_0x311dcb(0xff)](a95_0x45e9f4[_0x311dcb(0x10a)](_0x311dcb(0xdc)['repeat'](0x1e))),console[_0x311dcb(0xff)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x27d9ee[_0x311dcb(0xe0)]||a95_0x45e9f4[_0x311dcb(0x100)](_0x311dcb(0x116)))),console[_0x311dcb(0xff)](_0x311dcb(0xe2)+_0x27d9ee[_0x311dcb(0x12e)]),console[_0x311dcb(0xff)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x27d9ee['locale']),console['log'](_0x311dcb(0x11d)+_0x27d9ee[_0x311dcb(0x115)]),console[_0x311dcb(0xff)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x27d9ee[_0x311dcb(0x119)]||a95_0x45e9f4[_0x311dcb(0x10a)](_0x311dcb(0x108)))),console[_0x311dcb(0xff)](_0x311dcb(0x10c)+(_0x27d9ee[_0x311dcb(0xe7)]||a95_0x45e9f4[_0x311dcb(0x10a)](_0x311dcb(0x108)))),console['log']('\x20\x20explicitAppName:\x20'+(_0x27d9ee[_0x311dcb(0x12c)]||a95_0x45e9f4[_0x311dcb(0x10a)]('(none)'))),console['log'](_0x311dcb(0x101)+(_0x27d9ee[_0x311dcb(0xfa)]||a95_0x45e9f4[_0x311dcb(0x10a)](_0x311dcb(0x125)+DEFAULT_CONFIG_VALUES[_0x311dcb(0xfa)]+')'))),console[_0x311dcb(0xff)](_0x311dcb(0xd8)+(_0x27d9ee['pageSize']??a95_0x45e9f4[_0x311dcb(0x10a)](_0x311dcb(0x10f)))),console['log']('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x27d9ee[_0x311dcb(0xf3)]),console['log'](_0x311dcb(0xfb)+_0x27d9ee['verbose']),console['log'](_0x311dcb(0xf9)+(_0x27d9ee[_0x311dcb(0xfe)]?a95_0x45e9f4[_0x311dcb(0x103)](_0x311dcb(0x10b)+_0x27d9ee[_0x311dcb(0xfe)][_0x311dcb(0x127)]+')'):_0x45d4ab?a95_0x45e9f4[_0x311dcb(0x103)]('(set\x20via\x20file,\x20length='+_0x45d4ab[_0x311dcb(0x127)]+')'):a95_0x45e9f4[_0x311dcb(0x10a)](_0x311dcb(0x108))));const _0x352c0c=Object[_0x311dcb(0x105)](_0x27d9ee[_0x311dcb(0x131)]);if(_0x352c0c[_0x311dcb(0x127)]>0x0){console['log'](),console[_0x311dcb(0xff)](a95_0x45e9f4[_0x311dcb(0xf2)](_0x311dcb(0x11b))),console['log'](a95_0x45e9f4[_0x311dcb(0x10a)]('\x20\x20─'[_0x311dcb(0x107)](0x1e)));for(const _0x240642 of _0x352c0c){const _0x323936=_0x27d9ee[_0x311dcb(0x131)][_0x240642],_0x289ff7=_0x240642===_0x27d9ee[_0x311dcb(0x119)],_0x2aa3d3=_0x240642===_0x27d9ee[_0x311dcb(0xe7)],_0x498774=_0x2aa3d3?a95_0x45e9f4['green']('\x20←\x20current'):'',_0x2296c3=_0x289ff7?_0x311dcb(0x12a):'';console[_0x311dcb(0xff)]('\x20\x20'+_0x240642+_0x2296c3+_0x498774),console[_0x311dcb(0xff)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x323936[_0x311dcb(0xe5)]);const _0x53aebc=buildAppDoctorFields(_0x323936,{'env':_0x27d9ee['env'],'apiDir':_0x27d9ee[_0x311dcb(0x10e)][_0x311dcb(0x115)]||DEFAULT_CONFIG_VALUES[_0x311dcb(0x115)],'cookie':_0x27d9ee[_0x311dcb(0xfe)]||_0x45d4ab||undefined,'accessKey':_0x27d9ee['accessKey']});console[_0x311dcb(0xff)](_0x311dcb(0xef)+_0x53aebc[_0x311dcb(0x12e)][_0x311dcb(0x106)]+'\x20\x20'+a95_0x45e9f4[_0x311dcb(0x10a)]('('+_0x53aebc[_0x311dcb(0x12e)][_0x311dcb(0x114)]+')')),console[_0x311dcb(0xff)](_0x311dcb(0x130)+_0x53aebc[_0x311dcb(0x115)][_0x311dcb(0x106)]+'\x20\x20'+a95_0x45e9f4[_0x311dcb(0x10a)]('('+_0x53aebc['apiDir'][_0x311dcb(0x114)]+')'));const _0x18e9e5=_0x53aebc[_0x311dcb(0xfe)][_0x311dcb(0x106)]?a95_0x45e9f4[_0x311dcb(0x103)](_0x311dcb(0x10b)+_0x53aebc['cookie'][_0x311dcb(0x106)][_0x311dcb(0x127)]+')'):a95_0x45e9f4[_0x311dcb(0x10a)]('(none)');console['log']('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x18e9e5+'\x20\x20'+a95_0x45e9f4[_0x311dcb(0x10a)]('('+_0x53aebc[_0x311dcb(0xfe)]['source']+')'));const _0x380426=_0x53aebc[_0x311dcb(0x124)][_0x311dcb(0x106)]?a95_0x45e9f4[_0x311dcb(0x103)](_0x311dcb(0x10b)+_0x53aebc['accessKey'][_0x311dcb(0x106)][_0x311dcb(0x127)]+')'):a95_0x45e9f4['gray']('(none)');console['log'](_0x311dcb(0x12f)+_0x380426+'\x20\x20'+a95_0x45e9f4[_0x311dcb(0x10a)]('('+_0x53aebc[_0x311dcb(0x124)]['source']+')'));}}console[_0x311dcb(0xff)](),console[_0x311dcb(0xff)](a95_0x45e9f4[_0x311dcb(0xf2)](_0x311dcb(0x126))),console['log'](a95_0x45e9f4[_0x311dcb(0x10a)](_0x311dcb(0xdc)[_0x311dcb(0x107)](0x1e))),console[_0x311dcb(0xff)](_0x311dcb(0xe9)+getApiDomain()),console[_0x311dcb(0xff)](_0x311dcb(0x117)+getUserDomain()),console[_0x311dcb(0xff)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x311dcb(0xff)](),console['log'](a95_0x45e9f4[_0x311dcb(0xf2)](_0x311dcb(0xe1))),console[_0x311dcb(0xff)](a95_0x45e9f4[_0x311dcb(0x10a)](_0x311dcb(0xdc)[_0x311dcb(0x107)](0x1e)));if(_0x45d4ab){const _0x5d859a=await getIsSessionValid();console[_0x311dcb(0xff)](_0x311dcb(0xde)+(_0x5d859a?a95_0x45e9f4[_0x311dcb(0x103)]('✓\x20Valid'):a95_0x45e9f4[_0x311dcb(0x100)](_0x311dcb(0xd7))));}else console['log'](_0x311dcb(0xde)+a95_0x45e9f4[_0x311dcb(0x100)](_0x311dcb(0xe6)));return console[_0x311dcb(0xff)](),{'ok':!![]};}export const doctorDefinition={'service':a95_0x44ffec(0x12d),'command':a95_0x44ffec(0xd9),'description':a95_0x44ffec(0xdb),'risk':a95_0x44ffec(0x102),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};function a95_0x2d9a(){const _0x22c99d=['(unknown)','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','48762bvipEP','installedPath','cookie','log','red','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','read','green','\x20\x20Package\x20Version:\x20','keys','value','repeat','(none)','\x20\x20Skill\x20Version:\x20\x20\x20','gray','(set,\x20length=','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','repairCommand','raw','(default)','(not\x20found)','2Fxbzph','platform','✗\x20Invalid\x20JSON','source','apiDir','(not\x20set)','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','defaultApp','(missing)','\x20\x20Apps','packageVersion','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','slice','state','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','2884NJKjcA','accessKey','(default:\x20','\x20\x20API\x20Endpoints','length','\x20\x20Installed\x20Path:\x20\x20','status','\x20(default)','yellow','explicitAppName','doctor','env','\x20\x20\x20\x20accessKey:\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','apps','2795SJeqEj','reason','✗\x20Expired','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','check','1134ikJrVF','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20─','padEnd','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1100913hhGxYp','appCode','\x20\x20Auth','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1095916QsrxtY','message','appcode','✗\x20Not\x20logged\x20in','currentApp','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','current','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20doctor','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','30540mPRgRa','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','5752hvFrHQ','bold','riskLevel','150UKZFzr','\x20\x20Config\x20Files','unknown','60277dxlWKt'];a95_0x2d9a=function(){return _0x22c99d;};return a95_0x2d9a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x599fc5=a96_0x78f2;(function(_0x20a6f2,_0x57ebaa){const _0x3d1a85=a96_0x78f2,_0x5d92ec=_0x20a6f2();while(!![]){try{const _0x4f6a1a=-parseInt(_0x3d1a85(0x86))/0x1+parseInt(_0x3d1a85(0xa0))/0x2*(-parseInt(_0x3d1a85(0xa5))/0x3)+parseInt(_0x3d1a85(0x85))/0x4*(-parseInt(_0x3d1a85(0x82))/0x5)+parseInt(_0x3d1a85(0x8c))/0x6+parseInt(_0x3d1a85(0xa6))/0x7+parseInt(_0x3d1a85(0x92))/0x8*(-parseInt(_0x3d1a85(0x96))/0x9)+-parseInt(_0x3d1a85(0x8d))/0xa*(-parseInt(_0x3d1a85(0x8a))/0xb);if(_0x4f6a1a===_0x57ebaa)break;else _0x5d92ec['push'](_0x5d92ec['shift']());}catch(_0x10dbf7){_0x5d92ec['push'](_0x5d92ec['shift']());}}}(a96_0x3bd1,0x849d3));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':'file','type':a96_0x599fc5(0x8f),'required':!![],'description':a96_0x599fc5(0x9d)},FILEPATH_FLAG={'name':a96_0x599fc5(0x8b),'type':a96_0x599fc5(0x8f),'required':!![],'description':a96_0x599fc5(0xa4)},DOWNLOAD_FLAG={'name':a96_0x599fc5(0x93),'type':a96_0x599fc5(0xa2),'description':a96_0x599fc5(0x9f)},LONG_TERM_FLAG={'name':'long-term','type':a96_0x599fc5(0xa2),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x40f978){const _0x20a851=a96_0x599fc5,_0x4ab39e=_0x40f978['trim']();if(!_0x4ab39e)throw CliErrors[_0x20a851(0x84)]('filePath\x20is\x20required.');return _0x4ab39e;}const fileUpload={'service':a96_0x599fc5(0x9a),'command':a96_0x599fc5(0x9e),'description':a96_0x599fc5(0x99),'risk':a96_0x599fc5(0x89),'flags':[FILE_FLAG],async 'dryRun'(_0x2d5a70){const _0x42be96=a96_0x599fc5,_0x1bf23a=requireDevelopmentUploadFile(_0x2d5a70[_0x42be96(0x98)](_0x42be96(0x9a)),_0x42be96(0x97));return{'method':_0x42be96(0x91),'url':_0x42be96(0x83),'body':{'appCode':_0x2d5a70[_0x42be96(0x95)],'multipart':{'file':_0x1bf23a}},'description':_0x42be96(0x88)+_0x1bf23a['path']+'\x20to\x20development\x20app\x20'+_0x2d5a70[_0x42be96(0x95)]};},async 'execute'(_0x40a383){const _0x384356=a96_0x599fc5,_0x1d3acb=requireDevelopmentUploadFile(_0x40a383['str'](_0x384356(0x9a)),_0x384356(0x97)),_0x47851b=await uploadDevelopmentFile(_0x40a383[_0x384356(0x95)],_0x1d3acb[_0x384356(0x9c)]);return{'ok':!![],'data':_0x47851b,'message':_0x47851b[_0x384356(0x9b)]?_0x384356(0x90)+_0x47851b[_0x384356(0x9b)]+_0x384356(0x87):_0x384356(0x8e)};}},fileQueryUrl={'service':a96_0x599fc5(0x9a),'command':'query-url','description':a96_0x599fc5(0xa1),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x13ab63){const _0x397113=a96_0x599fc5,_0x407ef7=requireFilePath(_0x13ab63[_0x397113(0x98)](_0x397113(0x8b))),_0x12c091=await queryDevelopmentFileUrl(_0x407ef7,{'download':_0x13ab63[_0x397113(0xa3)](_0x397113(0x93)),'longTerm':_0x13ab63[_0x397113(0xa3)](_0x397113(0x94))});return{'ok':!![],'data':_0x12c091};}};function a96_0x78f2(_0x2815ef,_0x377cb9){_0x2815ef=_0x2815ef-0x82;const _0x3bd136=a96_0x3bd1();let _0x78f2e0=_0x3bd136[_0x2815ef];return _0x78f2e0;}export const fileDefinitions=[fileUpload,fileQueryUrl];function a96_0x3bd1(){const _0x40295a=['Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','3RwkeCL','5623492XohFgb','10xrhOFr','/smartapi/common/uploadFile','validation','354292pGziNo','86333eoDkpj','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Preview:\x20upload\x20','read','2172412hMTMyM','filepath','949158jjhvcY','50zRYWxO','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','string','Uploaded\x20file:\x20','POST','56CapYas','download','long-term','appCode','125910bdWxqr','File','str','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','file','filePath','path','Path\x20to\x20the\x20local\x20file\x20to\x20upload','upload','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','2088826JZoPhh','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','boolean','bool'];a96_0x3bd1=function(){return _0x40295a;};return a96_0x3bd1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x414ed3=a97_0x3984;(function(_0x23c65f,_0x1e934b){const _0x285856=a97_0x3984,_0x47a94f=_0x23c65f();while(!![]){try{const _0x7bccf3=parseInt(_0x285856(0x1e0))/0x1+-parseInt(_0x285856(0x1df))/0x2*(-parseInt(_0x285856(0x1e4))/0x3)+parseInt(_0x285856(0x1e8))/0x4+-parseInt(_0x285856(0x1cb))/0x5*(parseInt(_0x285856(0x1e7))/0x6)+-parseInt(_0x285856(0x1e3))/0x7+-parseInt(_0x285856(0x1e9))/0x8+-parseInt(_0x285856(0x1ca))/0x9*(-parseInt(_0x285856(0x1ea))/0xa);if(_0x7bccf3===_0x1e934b)break;else _0x47a94f['push'](_0x47a94f['shift']());}catch(_0x3a71c3){_0x47a94f['push'](_0x47a94f['shift']());}}}(a97_0x2deb,0xb0a96));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';function a97_0x2deb(){const _0x3810e6=['Write\x20to\x20global\x20config\x20instead\x20of\x20project','6mPtSNq','2098324JikYJo','11206088TGwGAi','730iHplIf','production','flagMissing','\x20config','Target\x20environment','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','message','\x20\x20Env:\x20','project','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','log','nonInteractive','\x0a✓\x20Successfully\x20initialized\x20','appcode','yes','appCode','153297rFCtpP','841365ldctXh','str','string','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','validation','bool','检测到旧配置文件,正在自动升级...\x0a','run','\x20\x20Config:\x20','init','\x20\x20Apps:\x20','\x20\x20Default:\x20','boolean','toLocaleString','global','some','App\x20code\x20to\x20initialize\x20with','valid','join','Usage:\x20','94tqeaLB','1142074sHcjNA','env','map','4425274heNlPK','942fdBnSx','cwd'];a97_0x2deb=function(){return _0x3810e6;};return a97_0x2deb();}import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';function a97_0x3984(_0x4db790,_0x5ed075){_0x4db790=_0x4db790-0x1c5;const _0x2debfb=a97_0x2deb();let _0x398464=_0x2debfb[_0x4db790];return _0x398464;}import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x38bece){return{'appCode':_0x38bece,'appName':_0x38bece};}function writeInitConfig(_0x3d752d,_0x41b1,_0x4f2e01){const _0x56a7d7=a97_0x3984,_0x369d39=resolveWriteConfigPath(_0x3d752d),_0x219ed9=buildCanonicalProjectConfig({},{'appCodes':_0x41b1[_0x56a7d7(0x1e2)](_0x293b1c=>_0x293b1c[_0x56a7d7(0x1c9)]),'env':_0x4f2e01,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x56a7d7(0x1d8)]()}});writeConfigFile(_0x369d39,_0x219ed9);const _0x58a408=_0x3d752d===_0x56a7d7(0x1d9)?_0x56a7d7(0x1d9):_0x56a7d7(0x1f2);console[_0x56a7d7(0x1f4)](_0x56a7d7(0x1c6)+_0x58a408+_0x56a7d7(0x1ed)),console['log'](_0x56a7d7(0x1d5)+_0x41b1['map'](_0x2a72fb=>_0x2a72fb[_0x56a7d7(0x1c9)])[_0x56a7d7(0x1dd)](',\x20')),console[_0x56a7d7(0x1f4)](_0x56a7d7(0x1d6)+_0x219ed9['defaultApp']),console['log'](_0x56a7d7(0x1f1)+_0x219ed9[_0x56a7d7(0x1e1)]),console[_0x56a7d7(0x1f4)](_0x56a7d7(0x1d3)+_0x369d39);}async function runSmartInit(_0x5ee26d){const _0x3d7f8b=a97_0x3984,_0xd8fed3=process[_0x3d7f8b(0x1e5)](),_0x338985=_0x5ee26d[_0x3d7f8b(0x1d0)](_0x3d7f8b(0x1d9))?_0x3d7f8b(0x1d9):'project',_0x2c976e=_0x5ee26d['str']('env')||'production',_0x721e8f=_0x5ee26d[_0x3d7f8b(0x1cc)]('appcode')||undefined;if(_0x338985===_0x3d7f8b(0x1f2)){const _0xd83719=existsSync(resolve(_0xd8fed3,NEW_CONFIG_NAME)),_0x3016d3=LEGACY_CONFIG_NAMES[_0x3d7f8b(0x1da)](_0x44e0df=>existsSync(resolve(_0xd8fed3,_0x44e0df)));if(_0x3016d3&&!_0xd83719)return console[_0x3d7f8b(0x1f4)](_0x3d7f8b(0x1d1)),upgradeApp(_0x5ee26d[_0x3d7f8b(0x1c5)],{'yes':_0x5ee26d[_0x3d7f8b(0x1d0)](_0x3d7f8b(0x1c8))});if(_0xd83719)throw CliErrors[_0x3d7f8b(0x1cf)]('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','Use\x20`'+CLI_BIN_NAME+_0x3d7f8b(0x1f3));}if(_0x721e8f){const _0x10d002=validateAppcode(_0x721e8f);if(!_0x10d002[_0x3d7f8b(0x1dc)])throw CliErrors[_0x3d7f8b(0x1cf)](_0x10d002[_0x3d7f8b(0x1f0)]);writeInitConfig(_0x338985,[syntheticApp(_0x721e8f)],_0x2c976e);return;}if(_0x5ee26d[_0x3d7f8b(0x1c5)])throw CliErrors[_0x3d7f8b(0x1ec)](_0x3d7f8b(0x1c7),_0x3d7f8b(0x1de)+CLI_BIN_NAME+_0x3d7f8b(0x1ef));const _0x1a90a3=getCookie(),_0xfb066d=await selectMultipleApps(_0x1a90a3),_0x5487e3=_0xfb066d==='custom'?[syntheticApp(await promptCustomAppcode())]:_0xfb066d;writeInitConfig(_0x338985,_0x5487e3,_0x2c976e);}const initFlags=[{'name':'global','type':'boolean','description':a97_0x414ed3(0x1e6),'default':![]},{'name':a97_0x414ed3(0x1e1),'type':'string','description':a97_0x414ed3(0x1ee),'default':a97_0x414ed3(0x1eb),'enum':[...RABETBASE_ENV_VALUES]},{'name':'appcode','type':a97_0x414ed3(0x1cd),'description':a97_0x414ed3(0x1db)},{'name':a97_0x414ed3(0x1c8),'type':a97_0x414ed3(0x1d7),'description':'Auto-confirm\x20prompts','default':![]}];export const initDefinitions=[{'service':a97_0x414ed3(0x1d4),'command':a97_0x414ed3(0x1d2),'description':a97_0x414ed3(0x1ce),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x3ade55){return await runSmartInit(_0x3ade55),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a98_0x1cdb(){const _0x546e3c=['703038YuJevV','18916FYVkbh','726786UUfMIy','2iuzLKY','1482140IlopdJ','235ZiSeuu','3408aPGjub','4608736qloTpb','3609Vcyfzx','14KztjCB','195389VzKpaH'];a98_0x1cdb=function(){return _0x546e3c;};return a98_0x1cdb();}(function(_0x2e8d06,_0xebc505){const _0x6a437d=a98_0x4ba1,_0x17dd3a=_0x2e8d06();while(!![]){try{const _0x18ac49=parseInt(_0x6a437d(0x1e0))/0x1*(-parseInt(_0x6a437d(0x1e4))/0x2)+-parseInt(_0x6a437d(0x1e1))/0x3+-parseInt(_0x6a437d(0x1e2))/0x4*(-parseInt(_0x6a437d(0x1e6))/0x5)+parseInt(_0x6a437d(0x1e3))/0x6*(parseInt(_0x6a437d(0x1df))/0x7)+-parseInt(_0x6a437d(0x1dc))/0x8*(parseInt(_0x6a437d(0x1de))/0x9)+-parseInt(_0x6a437d(0x1e5))/0xa+parseInt(_0x6a437d(0x1dd))/0xb;if(_0x18ac49===_0xebc505)break;else _0x17dd3a['push'](_0x17dd3a['shift']());}catch(_0x36368a){_0x17dd3a['push'](_0x17dd3a['shift']());}}}(a98_0x1cdb,0x20e46));function a98_0x4ba1(_0x5f238d,_0x260b4f){_0x5f238d=_0x5f238d-0x1dc;const _0x1cdbd2=a98_0x1cdb();let _0x4ba1f5=_0x1cdbd2[_0x5f238d];return _0x4ba1f5;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x572be0=a99_0x702c;(function(_0x50159e,_0x4ca77d){const _0x24ab40=a99_0x702c,_0x232779=_0x50159e();while(!![]){try{const _0x24ea83=-parseInt(_0x24ab40(0x95))/0x1+-parseInt(_0x24ab40(0xa8))/0x2+parseInt(_0x24ab40(0xaf))/0x3+parseInt(_0x24ab40(0x9e))/0x4*(parseInt(_0x24ab40(0xab))/0x5)+parseInt(_0x24ab40(0xa2))/0x6*(parseInt(_0x24ab40(0x94))/0x7)+parseInt(_0x24ab40(0xa4))/0x8+-parseInt(_0x24ab40(0xac))/0x9*(-parseInt(_0x24ab40(0xa0))/0xa);if(_0x24ea83===_0x4ca77d)break;else _0x232779['push'](_0x232779['shift']());}catch(_0x45e67a){_0x232779['push'](_0x232779['shift']());}}}(a99_0x2243,0xa332d));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV='RABETBASE_DISABLE_ISSUE_NUDGE';const NUDGE_SUPPRESSED_CODES=new Set(['cancelled',a99_0x572be0(0xa5),a99_0x572be0(0x93),a99_0x572be0(0xa1),a99_0x572be0(0xae),a99_0x572be0(0xa3),a99_0x572be0(0xa6),a99_0x572be0(0x96)]),defaultWriter=_0x2f56e1=>{const _0x1cdcd4=a99_0x572be0;process[_0x1cdcd4(0x9c)]['write'](_0x2f56e1);};function a99_0x702c(_0x19c2e3,_0x4a7bd3){_0x19c2e3=_0x19c2e3-0x92;const _0x224364=a99_0x2243();let _0x702c48=_0x224364[_0x19c2e3];return _0x702c48;}export function shouldNudgeForError(_0x2f56e7,_0x5bd924){const _0x2ad4f0=a99_0x572be0;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x5bd924['service']==='issue'&&_0x5bd924[_0x2ad4f0(0xa7)]===_0x2ad4f0(0x97))return![];if(_0x2f56e7 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x2ad4f0(0xb0)](_0x2f56e7[_0x2ad4f0(0x92)]);return!![];}export function printIssueReportNudgeForError(_0x150293,_0x1f837a,_0x305915=defaultWriter){if(!shouldNudgeForError(_0x150293,_0x1f837a))return;const _0x6b33b1=buildSuggestedTitle(_0x150293,_0x1f837a);_0x305915(formatNudge(_0x6b33b1));}function buildSuggestedTitle(_0xb2e174,_0x4e6073){const _0x58e522=a99_0x572be0,_0xa669bd=_0xb2e174 instanceof Error?_0xb2e174['message']:String(_0xb2e174),_0xda76e6=_0xa669bd['replace'](/[\r\n]+/g,'\x20')[_0x58e522(0x9d)](/\s+/g,'\x20')['trim']()[_0x58e522(0x9b)](0x0,0x78)[_0x58e522(0x9d)](/"/g,'\x5c\x22'),_0x1f76bf=CLI_BIN_NAME+'\x20'+_0x4e6073[_0x58e522(0xad)]+'\x20'+_0x4e6073[_0x58e522(0xa7)];return _0xda76e6[_0x58e522(0x98)]>0x0?_0x1f76bf+':\x20'+_0xda76e6:_0x1f76bf;}function formatNudge(_0x5a94a9){const _0x2be94f=a99_0x572be0;return['',_0x2be94f(0x9a)+CLI_BIN_NAME+_0x2be94f(0xaa),'\x20\x20'+CLI_BIN_NAME+_0x2be94f(0x99),'\x20\x20\x20\x20--title\x20\x22'+_0x5a94a9+'\x22\x20\x5c','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+_0x2be94f(0x9f),''][_0x2be94f(0xa9)]('\x0a');}function a99_0x2243(){const _0x4e1c9a=['Hit\x20a\x20','slice','stderr','replace','2501180erxitD','=1\x20to\x20silence\x20this\x20hint.','2627900XRNZGK','not_in_project','120qomXfJ','flag_missing','1145072XXvcZO','auth_required','validation_error','command','2191904JOIHoj','join','\x20bug?\x20Help\x20us\x20fix\x20it:','5rkkvEl','18JvMukm','service','unknown_command','1779111EXdteH','has','code','config_missing','301882DslidQ','985153ZrEjWE','network_error','report','length','\x20issue\x20report\x20\x5c'];a99_0x2243=function(){return _0x4e1c9a;};return a99_0x2243();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x58a9c8=a100_0x348c;(function(_0x376094,_0x5358bf){const _0x145dd4=a100_0x348c,_0x25007a=_0x376094();while(!![]){try{const _0x306199=-parseInt(_0x145dd4(0x21b))/0x1+-parseInt(_0x145dd4(0x205))/0x2+parseInt(_0x145dd4(0x1ec))/0x3*(-parseInt(_0x145dd4(0x1f3))/0x4)+-parseInt(_0x145dd4(0x1e9))/0x5+-parseInt(_0x145dd4(0x1fd))/0x6+parseInt(_0x145dd4(0x1e7))/0x7*(-parseInt(_0x145dd4(0x21c))/0x8)+-parseInt(_0x145dd4(0x1f7))/0x9*(-parseInt(_0x145dd4(0x208))/0xa);if(_0x306199===_0x5358bf)break;else _0x25007a['push'](_0x25007a['shift']());}catch(_0x6698ca){_0x25007a['push'](_0x25007a['shift']());}}}(a100_0x57d3,0x29f52));function a100_0x57d3(){const _0x1e01cb=['file','redacted\x20','apiError','string','257946sFukKZ','8HgvcSD','write','originalBytes','1606073dALguc','redactions:\x20','399330uXENHS','\x20secret(s):\x20','truncated','3oMVwnR','descriptionFile:\x20','length','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','POST','issue.description_redactions','validation','592684cCNbae','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','title','description','164709XxWtCk','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','descriptionFilePath','description-file','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','263130wTQKYi','cwd','issue.description_truncated','descriptionSource','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','sanitize','join','str','370452mFjYjV','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','otel://','610nJXlij','redactionKinds','Issue\x20description\x20file\x20is\x20empty:\x20','trim','utf8','Issue\x20description\x20cannot\x20be\x20empty.','push','Failed\x20to\x20report\x20platform\x20issue:\x20','redactionCount','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','Platform\x20issue\x20reported\x20(','Platform\x20issue\x20reported','File\x20not\x20found:\x20','issue'];a100_0x57d3=function(){return _0x1e01cb;};return a100_0x57d3();}import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a100_0x348c(_0x262b62,_0x39b12b){_0x262b62=_0x262b62-0x1e5;const _0x57d3e6=a100_0x57d3();let _0x348c15=_0x57d3e6[_0x262b62];return _0x348c15;}import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a100_0x58a9c8(0x1fa);export const issueReport={'service':a100_0x58a9c8(0x216),'command':'report','description':a100_0x58a9c8(0x1f8),'risk':a100_0x58a9c8(0x1e5),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':'compress','flags':[{'name':a100_0x58a9c8(0x1f5),'type':a100_0x58a9c8(0x21a),'required':!![],'description':'One-line\x20issue\x20summary'},{'name':a100_0x58a9c8(0x1f6),'type':a100_0x58a9c8(0x21a),'description':a100_0x58a9c8(0x1f4)},{'name':DESCRIPTION_FILE_FLAG,'type':a100_0x58a9c8(0x21a),'description':a100_0x58a9c8(0x211)}],async 'validate'(_0x364540){const _0x2672d2=a100_0x58a9c8,_0x21f05e=_0x364540[_0x2672d2(0x204)](_0x2672d2(0x1f5))[_0x2672d2(0x20b)](),_0x4e9dd9=_0x364540[_0x2672d2(0x204)](_0x2672d2(0x1f6))[_0x2672d2(0x20b)](),_0x12aec7=_0x364540[_0x2672d2(0x204)](DESCRIPTION_FILE_FLAG)[_0x2672d2(0x20b)]();if(!_0x21f05e)throw CliErrors['flagMissing']('title',_0x2672d2(0x212));const _0x38ed74=_0x4e9dd9[_0x2672d2(0x1ee)]>0x0,_0x4a035f=_0x12aec7['length']>0x0;if(_0x38ed74===_0x4a035f)throw CliErrors[_0x2672d2(0x1f2)](_0x2672d2(0x206),'Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x4a035f){const _0x46602=resolve(process['cwd'](),_0x12aec7);if(!existsSync(_0x46602))throw CliErrors['validation'](_0x2672d2(0x215)+_0x46602);}},async 'dryRun'(_0x1eff4d){const _0x1b1bf4=a100_0x58a9c8,_0xbac538=await prepareIssueReport(_0x1eff4d);return{'method':_0x1b1bf4(0x1f0),'url':_0x1b1bf4(0x207)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0xbac538[_0x1b1bf4(0x1f5)],'issue.description':_0xbac538[_0x1b1bf4(0x1f6)],'issue.description_original_bytes':_0xbac538[_0x1b1bf4(0x202)][_0x1b1bf4(0x1e6)],'issue.description_truncated':_0xbac538[_0x1b1bf4(0x202)]['truncated'],'issue.description_redactions':_0xbac538[_0x1b1bf4(0x202)]['redactionCount'],'issue.description_redaction_kinds':_0xbac538[_0x1b1bf4(0x202)][_0x1b1bf4(0x209)][_0x1b1bf4(0x203)](',')}},'description':[_0x1b1bf4(0x1fc),'descriptionSource:\x20'+_0xbac538['descriptionSource'],_0xbac538[_0x1b1bf4(0x1f9)]?_0x1b1bf4(0x1ed)+_0xbac538[_0x1b1bf4(0x1f9)]:null,_0xbac538['sanitize'][_0x1b1bf4(0x1eb)]?'truncated:\x20original\x20'+_0xbac538[_0x1b1bf4(0x202)][_0x1b1bf4(0x1e6)]+'\x20bytes':null,_0xbac538[_0x1b1bf4(0x202)][_0x1b1bf4(0x210)]>0x0?_0x1b1bf4(0x1e8)+_0xbac538[_0x1b1bf4(0x202)][_0x1b1bf4(0x210)]+'\x20('+_0xbac538[_0x1b1bf4(0x202)][_0x1b1bf4(0x209)][_0x1b1bf4(0x203)](',\x20')+')':null]['filter'](Boolean)[_0x1b1bf4(0x203)]('\x0a')};},async 'execute'(_0xc95509){const _0x274218=a100_0x58a9c8,_0x282f25=await prepareIssueReport(_0xc95509);try{await sendPlatformIssueCollectLog({'title':_0x282f25[_0x274218(0x1f5)],'description':_0x282f25[_0x274218(0x1f6)],'sanitize':{'originalBytes':_0x282f25[_0x274218(0x202)]['originalBytes'],'truncated':_0x282f25[_0x274218(0x202)]['truncated'],'redactionCount':_0x282f25[_0x274218(0x202)][_0x274218(0x210)],'redactionKinds':_0x282f25[_0x274218(0x202)][_0x274218(0x209)]}});}catch(_0x47ad9e){throw CliErrors[_0x274218(0x219)](_0x274218(0x20f)+(_0x47ad9e instanceof Error?_0x47ad9e['message']:String(_0x47ad9e)),_0x274218(0x201));}return{'ok':!![],'message':buildResultMessage(_0x282f25['sanitize']),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':['issue.title','issue.description','issue.description_original_bytes',_0x274218(0x1ff),_0x274218(0x1f1),'issue.description_redaction_kinds'],'issue':{'title':_0x282f25[_0x274218(0x1f5)],'descriptionLength':_0x282f25[_0x274218(0x1f6)][_0x274218(0x1ee)],'descriptionSource':_0x282f25[_0x274218(0x200)],..._0x282f25[_0x274218(0x1f9)]?{'descriptionFile':_0x282f25[_0x274218(0x1f9)]}:{},'sanitize':{'originalBytes':_0x282f25[_0x274218(0x202)]['originalBytes'],'truncated':_0x282f25['sanitize'][_0x274218(0x1eb)],'redactions':_0x282f25['sanitize'][_0x274218(0x210)],'redactionKinds':_0x282f25[_0x274218(0x202)][_0x274218(0x209)]}}}};}};function buildResultMessage(_0x2441cd){const _0x4e21d0=a100_0x58a9c8,_0x523230=[];return _0x2441cd[_0x4e21d0(0x1eb)]&&_0x523230[_0x4e21d0(0x20e)]('truncated\x20from\x20'+_0x2441cd['originalBytes']+'\x20bytes'),_0x2441cd[_0x4e21d0(0x210)]>0x0&&_0x523230[_0x4e21d0(0x20e)](_0x4e21d0(0x218)+_0x2441cd[_0x4e21d0(0x210)]+_0x4e21d0(0x1ea)+_0x2441cd['redactionKinds'][_0x4e21d0(0x203)](',\x20')),_0x523230['length']===0x0?_0x4e21d0(0x214):_0x4e21d0(0x213)+_0x523230[_0x4e21d0(0x203)](';\x20')+')';}async function prepareIssueReport(_0x99a5b4){const _0x5aa1c2=a100_0x58a9c8,_0xa6a42f=_0x99a5b4[_0x5aa1c2(0x204)](_0x5aa1c2(0x1f5))[_0x5aa1c2(0x20b)](),_0x301511=_0x99a5b4['str'](_0x5aa1c2(0x1f6)),_0x1b428c=_0x99a5b4['str'](DESCRIPTION_FILE_FLAG)[_0x5aa1c2(0x20b)]();if(!_0x1b428c){const _0xab492d=_0x301511;if(!_0xab492d['trim']())throw CliErrors[_0x5aa1c2(0x1f2)](_0x5aa1c2(0x20d),_0x5aa1c2(0x1ef));const _0x49cd43=sanitizeIssueDescription(_0xab492d);return{'title':_0xa6a42f,'description':_0x49cd43[_0x5aa1c2(0x1f6)],'descriptionSource':'inline','sanitize':_0x49cd43};}const _0x380914=resolve(process[_0x5aa1c2(0x1fe)](),_0x1b428c),_0x36b178=await readFile(_0x380914,_0x5aa1c2(0x20c));if(!_0x36b178['trim']())throw CliErrors[_0x5aa1c2(0x1f2)](_0x5aa1c2(0x20a)+_0x380914,_0x5aa1c2(0x1fb));const _0x3a3ed0=sanitizeIssueDescription(_0x36b178);return{'title':_0xa6a42f,'description':_0x3a3ed0[_0x5aa1c2(0x1f6)],'descriptionSource':_0x5aa1c2(0x217),'descriptionFilePath':_0x380914,'sanitize':_0x3a3ed0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0xc997c6=a101_0x57c7;(function(_0x581f0c,_0x3f0647){const _0x37dc56=a101_0x57c7,_0x3250ef=_0x581f0c();while(!![]){try{const _0x15a6b1=-parseInt(_0x37dc56(0x71))/0x1+parseInt(_0x37dc56(0x72))/0x2+parseInt(_0x37dc56(0x82))/0x3*(-parseInt(_0x37dc56(0x7c))/0x4)+-parseInt(_0x37dc56(0x73))/0x5+-parseInt(_0x37dc56(0x83))/0x6*(-parseInt(_0x37dc56(0x80))/0x7)+parseInt(_0x37dc56(0x74))/0x8*(parseInt(_0x37dc56(0x7b))/0x9)+-parseInt(_0x37dc56(0x6d))/0xa*(parseInt(_0x37dc56(0x6f))/0xb);if(_0x15a6b1===_0x3f0647)break;else _0x3250ef['push'](_0x3250ef['shift']());}catch(_0x1991dc){_0x3250ef['push'](_0x3250ef['shift']());}}}(a101_0x66f9,0x4f38c));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE='\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]',REDACTION_RULES=[{'kind':a101_0xc997c6(0x88),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':'REDACTED:cookie'},{'kind':a101_0xc997c6(0x7d),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a101_0xc997c6(0x75)},{'kind':a101_0xc997c6(0x6c),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a101_0xc997c6(0x7f)},{'kind':a101_0xc997c6(0x6e),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':'REDACTED:password'},{'kind':a101_0xc997c6(0x77),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a101_0xc997c6(0x6b)}];function a101_0x66f9(){const _0x356945=['345668sWDoCv','945164vsFwhC','1374125SjvPiZ','16iwhuUc','REDACTED:authorization','subarray','bearer-jwt','description','push','pattern','2581065ENsJdq','4hbJYlK','authorization','__RB_OSS_ID_','REDACTED:private-key','1287853cReLMH','string','659733CNcWyh','6aTDuCO','byteLength','kind','replace','includes','cookie','length','max','restore','REDACTED:bearer-jwt','private-key','50iMcGNs','access-key','143517HQdWRN','utf8'];a101_0x66f9=function(){return _0x356945;};return a101_0x66f9();}function a101_0x57c7(_0x5f3857,_0x3d6fbb){_0x5f3857=_0x5f3857-0x6a;const _0x66f932=a101_0x66f9();let _0x57c74e=_0x66f932[_0x5f3857];return _0x57c74e;}export function sanitizeIssueDescription(_0x39d521){const _0x553829=a101_0xc997c6,_0x52e777=Buffer[_0x553829(0x84)](_0x39d521,_0x553829(0x70)),_0xcf034a=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x2f2b24=_0x39d521,_0x202ce9=0x0;const _0x3f3253=[];if(!_0xcf034a){const _0xef0eb9=protectOssAccessKeyIds(_0x2f2b24);_0x2f2b24=_0xef0eb9[_0x553829(0x78)];for(const _0x57edd6 of REDACTION_RULES){let _0x32c589=0x0;_0x2f2b24=_0x2f2b24[_0x553829(0x86)](_0x57edd6[_0x553829(0x7a)],(_0x4ec987,_0x31548d)=>{const _0x15268f=_0x553829;_0x32c589+=0x1;const _0x5ea336=typeof _0x31548d===_0x15268f(0x81)?_0x31548d:'';return _0x5ea336+'['+_0x57edd6['label']+']';}),_0x32c589>0x0&&(_0x202ce9+=_0x32c589,!_0x3f3253[_0x553829(0x87)](_0x57edd6[_0x553829(0x85)])&&_0x3f3253['push'](_0x57edd6[_0x553829(0x85)]));}_0x2f2b24=_0xef0eb9[_0x553829(0x6a)](_0x2f2b24);}let _0x424adc=![];if(Buffer[_0x553829(0x84)](_0x2f2b24,'utf8')>ISSUE_DESCRIPTION_MAX_BYTES){_0x424adc=!![];const _0xd4c8b5=Buffer[_0x553829(0x84)](TRUNCATION_NOTICE,_0x553829(0x70)),_0x1acf8a=Math[_0x553829(0x8a)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0xd4c8b5);_0x2f2b24=sliceUtf8Bytes(_0x2f2b24,_0x1acf8a)+TRUNCATION_NOTICE;}return{'description':_0x2f2b24,'originalBytes':_0x52e777,'truncated':_0x424adc,'redactionCount':_0x202ce9,'redactionKinds':_0x3f3253};}function protectOssAccessKeyIds(_0x24b1bf){const _0x1dbe26=a101_0xc997c6,_0x4670d2=[],_0xf0d813=_0x24b1bf[_0x1dbe26(0x86)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x324579,_0x4e1466)=>{const _0x539953=_0x1dbe26,_0x48ed2d=_0x4670d2[_0x539953(0x79)](_0x324579['slice'](_0x4e1466[_0x539953(0x89)]))-0x1;return _0x4e1466+_0x539953(0x7e)+_0x48ed2d+'__';});return{'description':_0xf0d813,'restore':_0x11d946=>_0x11d946[_0x1dbe26(0x86)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x350e7d,_0x4d9eac,_0x6c4ea2)=>{const _0x50fdbe=_0x4670d2[Number(_0x6c4ea2)];return _0x50fdbe===undefined?_0x350e7d:''+_0x4d9eac+_0x50fdbe;})};}function sliceUtf8Bytes(_0x2e39a7,_0x596012){const _0x2fb33b=a101_0xc997c6;if(_0x596012<=0x0)return'';const _0x4b2fa2=Buffer['from'](_0x2e39a7,_0x2fb33b(0x70));if(_0x4b2fa2[_0x2fb33b(0x84)]<=_0x596012)return _0x2e39a7;let _0x4e1a87=_0x596012;while(_0x4e1a87>0x0){const _0x5fab7=_0x4b2fa2[_0x4e1a87];if(_0x5fab7===undefined||(_0x5fab7&0xc0)!==0x80)break;_0x4e1a87-=0x1;}return _0x4b2fa2[_0x2fb33b(0x76)](0x0,_0x4e1a87)['toString'](_0x2fb33b(0x70));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a102_0x57af(_0x3a891e,_0x368e69){_0x3a891e=_0x3a891e-0x1c3;const _0x429e9c=a102_0x429e();let _0x57af4b=_0x429e9c[_0x3a891e];return _0x57af4b;}const a102_0x301c58=a102_0x57af;(function(_0x120f75,_0x4baa99){const _0xa4983f=a102_0x57af,_0x5281f7=_0x120f75();while(!![]){try{const _0x35151e=parseInt(_0xa4983f(0x1db))/0x1+parseInt(_0xa4983f(0x1cd))/0x2*(parseInt(_0xa4983f(0x1eb))/0x3)+-parseInt(_0xa4983f(0x1e8))/0x4+-parseInt(_0xa4983f(0x1c4))/0x5+-parseInt(_0xa4983f(0x1c6))/0x6+parseInt(_0xa4983f(0x1c8))/0x7*(parseInt(_0xa4983f(0x1ce))/0x8)+-parseInt(_0xa4983f(0x1e7))/0x9;if(_0x35151e===_0x4baa99)break;else _0x5281f7['push'](_0x5281f7['shift']());}catch(_0x3ea05f){_0x5281f7['push'](_0x5281f7['shift']());}}}(a102_0x429e,0x41c40));import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH=a102_0x301c58(0x1ea);function readCreateInput(_0x55d039){const _0x25f791=a102_0x301c58,_0x53fcee=_0x55d039[_0x25f791(0x1ef)](_0x25f791(0x1ca))['trim']();if(!_0x53fcee)throw kbError(_0x25f791(0x1c5),'--title\x20is\x20required.');const _0x32dd11=_0x55d039['str']('file')[_0x25f791(0x1e6)]();if(!_0x32dd11)throw kbError(_0x25f791(0x1df),'--file\x20is\x20required.',_0x25f791(0x1e3));return{'title':_0x53fcee,'file':_0x32dd11};}async function prepareCreate(_0x5d13b6){const _0x43d44b=a102_0x301c58,_0x9be8f6=readCreateInput(_0x5d13b6),_0x1c25c4=await readKbFile(_0x9be8f6[_0x43d44b(0x1d5)]),_0x293ee9=await fetchAllCompanyKnowledgeBases(_0x5d13b6,{'title':_0x9be8f6[_0x43d44b(0x1ca)]}),_0x4cd3e2=findExactCompanyKnowledgeBases(_0x293ee9,_0x5d13b6['appCode'],_0x9be8f6[_0x43d44b(0x1ca)]);if(_0x4cd3e2[_0x43d44b(0x1e9)]>0x0)throw kbError(_0x43d44b(0x1d0),_0x43d44b(0x1d3)+_0x5d13b6[_0x43d44b(0x1c9)]+'\x20with\x20title\x20'+_0x9be8f6[_0x43d44b(0x1ca)]+'.',_0x43d44b(0x1e2)+_0x4cd3e2[0x0]['id']+_0x43d44b(0x1d6));return{..._0x9be8f6,'content':_0x1c25c4};}function a102_0x429e(){const _0x3f7466=['trim','4272912SockYq','850752SMojWZ','length','/admin/knowledge-base/create','992607zzAyog','string','content','company','str','stringify','create','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','\x20--format\x20compress','412020gdjyni','kb_title_required','1063266kjFyTI','cookie','670642MxxEUS','appCode','title','verified','\x20for\x20','2qcyVPZ','40wrmXoA','POST','kb_already_exists','Created\x20company\x20knowledge\x20base\x20','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','file','\x20--format\x20compress`\x20before\x20choosing\x20update.','rabetbase\x20kb\x20detail\x20--id\x20','byteSize','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','406548cGFViV','rabetbase\x20kb\x20list\x20--title\x20','Knowledge-base\x20title','kb_create_outcome_unknown','kb_file_required','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','Company\x20knowledge\x20base\x20','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','kb_verification_failed','contentHash'];a102_0x429e=function(){return _0x3f7466;};return a102_0x429e();}function plannedAfter(_0xbdfc32,_0x2164eb){const _0x1e746c=a102_0x301c58;return{'scope':_0x1e746c(0x1ee),'appCode':_0xbdfc32[_0x1e746c(0x1c9)],'title':_0x2164eb[_0x1e746c(0x1ca)],'contentByteSize':_0x2164eb[_0x1e746c(0x1ed)][_0x1e746c(0x1d8)],'contentHash':_0x2164eb['content']['contentHash']};}function verifyCreatedState(_0x4e9cf2,_0x590bb6,_0x283f35){const _0xecd0c8=a102_0x301c58;assertCompanyKnowledgeBase(_0x283f35,_0x4e9cf2[_0xecd0c8(0x1c9)],_0x283f35['id']);const _0x5496d9=inspectKbContent(_0x283f35[_0xecd0c8(0x1ed)]);if(_0x283f35['title']!==_0x590bb6['title']||_0x5496d9[_0xecd0c8(0x1e5)]!==_0x590bb6[_0xecd0c8(0x1ed)][_0xecd0c8(0x1e5)])throw kbError(_0xecd0c8(0x1e4),_0xecd0c8(0x1e1)+_0x283f35['id']+_0xecd0c8(0x1da),_0xecd0c8(0x1d2)+_0x283f35['id']+_0xecd0c8(0x1d4));return projectKb(_0x283f35);}export const kbCreate={'service':'kb','command':a102_0x301c58(0x1f1),'description':a102_0x301c58(0x1d9),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a102_0x301c58(0x1ca),'type':a102_0x301c58(0x1ec),'required':!![],'description':a102_0x301c58(0x1dd)},{'name':a102_0x301c58(0x1d5),'type':'string','required':!![],'description':a102_0x301c58(0x1f2)}],async 'validate'(_0xe46463){readCreateInput(_0xe46463);},async 'dryRun'(_0x3c14ea){const _0x2ac49f=a102_0x301c58,_0x4ac6a8=await prepareCreate(_0x3c14ea);return asDryRunResult({'operation':_0x2ac49f(0x1f1),'selector':{'scope':_0x2ac49f(0x1ee),'appCode':_0x3c14ea[_0x2ac49f(0x1c9)],'title':_0x4ac6a8[_0x2ac49f(0x1ca)]},'before':null,'after':plannedAfter(_0x3c14ea,_0x4ac6a8),'dryRun':!![],'backend':{'method':_0x2ac49f(0x1cf),'path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x2ac49f(0x1dc)+JSON[_0x2ac49f(0x1f0)](_0x4ac6a8['title'])+_0x2ac49f(0x1c3)}},{'method':_0x2ac49f(0x1cf),'url':CREATE_PATH});},async 'execute'(_0x119ab8){const _0x5c30ee=a102_0x301c58,_0x375994=await prepareCreate(_0x119ab8);let _0x299552,_0x11c277=![];try{const _0x3094b4=await createEnterpriseKnowledgeBase(_0x119ab8[_0x5c30ee(0x1c7)],{'appCode':_0x119ab8[_0x5c30ee(0x1c9)],'title':_0x375994[_0x5c30ee(0x1ca)],'content':_0x375994['content'][_0x5c30ee(0x1ed)]});assertCompanyKnowledgeBase(_0x3094b4,_0x119ab8[_0x5c30ee(0x1c9)],_0x3094b4['id']),_0x299552=_0x3094b4['id'];}catch(_0x32ce64){if(!isPlatformTransportFailure(_0x32ce64))throw _0x32ce64;_0x11c277=!![];}if(_0x299552===undefined){const _0x7dd2cb=await verifyKbMutationReadback(_0x5c30ee(0x1f1),!![],()=>fetchAllCompanyKnowledgeBases(_0x119ab8,{'title':_0x375994['title']})),_0x157a89=findExactCompanyKnowledgeBases(_0x7dd2cb,_0x119ab8[_0x5c30ee(0x1c9)],_0x375994['title']);if(_0x157a89[_0x5c30ee(0x1e9)]!==0x1)throw kbError(_0x5c30ee(0x1de),'Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20'+_0x157a89[_0x5c30ee(0x1e9)]+'.',_0x5c30ee(0x1e0));_0x299552=_0x157a89[0x0]['id'];}const _0x35cb92=await verifyKbMutationReadback(_0x5c30ee(0x1f1),_0x11c277,()=>requireKb(_0x119ab8,_0x299552)),_0x2aa1ea=verifyCreatedState(_0x119ab8,_0x375994,_0x35cb92),_0x25ac11=_0x11c277?['Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x5c30ee(0x1f1),'selector':{'id':_0x2aa1ea['id'],'scope':_0x5c30ee(0x1ee),'appCode':_0x2aa1ea['appCode']},'before':null,'after':_0x2aa1ea,'dryRun':![],'backend':{'method':_0x5c30ee(0x1cf),'path':CREATE_PATH},'warnings':_0x25ac11,'verification':{'status':_0x5c30ee(0x1cb),'recoveredAfterUnknownResponse':_0x11c277,'lookupCommand':_0x5c30ee(0x1d7)+_0x2aa1ea['id']+_0x5c30ee(0x1c3)}},'message':_0x5c30ee(0x1d1)+_0x2aa1ea['id']+_0x5c30ee(0x1cc)+_0x2aa1ea[_0x5c30ee(0x1c9)]};}};
|