@lovrabet/rabetbase-cli 2.5.2-beta.1 → 2.5.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.d.ts +1 -0
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.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/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.d.ts +2 -0
- package/lib/commands/deployment/sync-all.js +1 -0
- package/lib/commands/deployment/sync-jobs.d.ts +2 -0
- package/lib/commands/deployment/sync-jobs.js +1 -0
- package/lib/commands/deployment/sync-status.d.ts +2 -0
- package/lib/commands/deployment/sync-status.js +1 -0
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.d.ts +2 -0
- package/lib/commands/instant-api-policy/current.js +1 -0
- package/lib/commands/instant-api-policy/index.d.ts +2 -0
- package/lib/commands/instant-api-policy/index.js +1 -0
- package/lib/commands/instant-api-policy/init.d.ts +2 -0
- package/lib/commands/instant-api-policy/init.js +1 -0
- package/lib/commands/instant-api-policy/publish.d.ts +2 -0
- package/lib/commands/instant-api-policy/publish.js +1 -0
- package/lib/commands/instant-api-policy/pull.d.ts +2 -0
- package/lib/commands/instant-api-policy/pull.js +1 -0
- package/lib/commands/instant-api-policy/revision.d.ts +2 -0
- package/lib/commands/instant-api-policy/revision.js +1 -0
- package/lib/commands/instant-api-policy/revisions.d.ts +2 -0
- package/lib/commands/instant-api-policy/revisions.js +1 -0
- package/lib/commands/instant-api-policy/rollback.d.ts +2 -0
- package/lib/commands/instant-api-policy/rollback.js +1 -0
- package/lib/commands/instant-api-policy/shared.d.ts +82 -0
- package/lib/commands/instant-api-policy/shared.js +1 -0
- package/lib/commands/instant-api-policy/validate.d.ts +2 -0
- package/lib/commands/instant-api-policy/validate.js +1 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.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/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.d.ts +3 -7
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +114 -0
- 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/instant-api-policy/config.d.ts +23 -0
- package/lib/core/instant-api-policy/config.js +1 -0
- package/lib/core/kb-search-client.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/supported-flags.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/generated/official-routing.d.ts +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +1 -3
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +12 -6
- package/skills/rabetbase/references/rabetbase-app-members-list.md +2 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync.md +41 -5
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +92 -0
- package/skills/rabetbase.manifest.json +4 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a101_0x692a77=a101_0x346c;function a101_0x346c(_0x32bdfd,_0x34bab3){_0x32bdfd=_0x32bdfd-0x7d;const _0x100311=a101_0x1003();let _0x346c10=_0x100311[_0x32bdfd];return _0x346c10;}(function(_0x57685e,_0x5d7cee){const _0x576c2e=a101_0x346c,_0x24488c=_0x57685e();while(!![]){try{const _0x7612de=-parseInt(_0x576c2e(0x7d))/0x1*(parseInt(_0x576c2e(0x7f))/0x2)+parseInt(_0x576c2e(0x88))/0x3+parseInt(_0x576c2e(0x9c))/0x4+parseInt(_0x576c2e(0x98))/0x5+parseInt(_0x576c2e(0x7e))/0x6*(-parseInt(_0x576c2e(0x83))/0x7)+parseInt(_0x576c2e(0x8c))/0x8+-parseInt(_0x576c2e(0x92))/0x9*(-parseInt(_0x576c2e(0x81))/0xa);if(_0x7612de===_0x5d7cee)break;else _0x24488c['push'](_0x24488c['shift']());}catch(_0x21b3f9){_0x24488c['push'](_0x24488c['shift']());}}}(a101_0x1003,0x5c9f3));import{getDeploymentMetadataSyncStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a101_0x692a77(0x9d),a101_0x692a77(0x91),a101_0x692a77(0x8f)]),ACTIVE_STATUSES=new Set(['PENDING',a101_0x692a77(0x87)]);export const deploymentSyncStatus={'service':a101_0x692a77(0x89),'command':'sync-status','description':a101_0x692a77(0x8a),'risk':'read','requiresAppCode':!![],'strictFlags':!![],'structuredErrors':!![],'flags':[{'name':a101_0x692a77(0x8e),'type':'number','required':!![],'description':'Deployment\x20synchronization\x20job\x20ID'}],async 'validate'(_0x42058b){const _0x5889c2=a101_0x692a77;readJobId(_0x42058b[_0x5889c2(0x9b)]('job-id'));},async 'execute'(_0x4bf1a3){const _0x2da519=a101_0x692a77,_0x461365=readJobId(_0x4bf1a3[_0x2da519(0x9b)](_0x2da519(0x8e))),_0x577c0a=await getDeploymentMetadataSyncStatus({'jobId':_0x461365,'appCode':_0x4bf1a3[_0x2da519(0x84)]}),_0x48a586=TERMINAL_STATUSES[_0x2da519(0x99)](_0x577c0a['status'])?!![]:ACTIVE_STATUSES['has'](_0x577c0a['status'])?![]:null,_0x2c3506=countBy(_0x577c0a[_0x2da519(0x80)][_0x2da519(0x94)](_0x2aef12=>_0x2aef12['bizType'])),_0xd5a232=countBy(_0x577c0a['results'][_0x2da519(0x94)](_0x5de9d3=>_0x5de9d3[_0x2da519(0x96)])),_0x1ba991=_0x48a586===null?[_0x2da519(0x97)+_0x577c0a['status']+_0x2da519(0x93)]:[];return{'ok':!![],'data':{'job':_0x577c0a,'isTerminal':_0x48a586,'summary':{'total':_0x577c0a[_0x2da519(0x80)][_0x2da519(0x95)],'failed':_0x577c0a[_0x2da519(0x80)][_0x2da519(0x8d)](_0x3a3df6=>_0x3a3df6[_0x2da519(0x96)]===_0x2da519(0x8f))[_0x2da519(0x95)],'byBizType':_0x2c3506,'byAction':_0xd5a232},'warnings':_0x1ba991},'message':_0x2da519(0x82)+_0x461365+_0x2da519(0x8b)+_0x577c0a[_0x2da519(0x9a)]+'.'};}};function a101_0x1003(){const _0x173f5d=['results','562040kvPOPF','Deployment\x20synchronization\x20job\x20','7zwHmOK','appCode','--job-id\x20must\x20be\x20a\x20positive\x20integer.','reduce','RUNNING','1101645ojsBmr','deployment','Get\x20application\x20deployment\x20synchronization\x20job\x20status','\x20is\x20','1408widbXH','filter','job-id','FAILED','isSafeInteger','PARTIAL_SUCCESS','90AgjovP',';\x20terminal\x20state\x20is\x20unknown\x20to\x20this\x20CLI\x20version.','map','length','action','Preserved\x20server-defined\x20status\x20','3114350VBJGMN','has','status','num','454816CCJesP','SUCCESS','2143HzbkHQ','3463758prqKlN','662tZdEki'];a101_0x1003=function(){return _0x173f5d;};return a101_0x1003();}function readJobId(_0x74a07){const _0x5d07d8=a101_0x692a77;if(!Number[_0x5d07d8(0x90)](_0x74a07)||_0x74a07<=0x0)throw CliErrors['validation'](_0x5d07d8(0x85));return _0x74a07;}function countBy(_0x40da64){const _0x309dcb=a101_0x692a77;return _0x40da64[_0x309dcb(0x86)]((_0x110883,_0x54dc80)=>{return _0x110883[_0x54dc80]=(_0x110883[_0x54dc80]??0x0)+0x1,_0x110883;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x40d63c=a102_0xb089;(function(_0x28f377,_0x91cd4d){const _0x57e226=a102_0xb089,_0x53294b=_0x28f377();while(!![]){try{const _0x488575=-parseInt(_0x57e226(0x129))/0x1+-parseInt(_0x57e226(0x12c))/0x2*(-parseInt(_0x57e226(0x13a))/0x3)+-parseInt(_0x57e226(0x133))/0x4+-parseInt(_0x57e226(0x128))/0x5*(-parseInt(_0x57e226(0x139))/0x6)+parseInt(_0x57e226(0x137))/0x7*(-parseInt(_0x57e226(0x11d))/0x8)+parseInt(_0x57e226(0x13d))/0x9+parseInt(_0x57e226(0x148))/0xa;if(_0x488575===_0x91cd4d)break;else _0x53294b['push'](_0x53294b['shift']());}catch(_0xe4befa){_0x53294b['push'](_0x53294b['shift']());}}}(a102_0x5060,0xa5a4a));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{isPlatformTransportFailure,syncDeploymentMetadata}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';function a102_0x5060(){const _0x2d4ca1=['bff','selector','defineProperty','759514XKvmXI','data','714498rLIYec','3oasyjZ','validation','items','5785596ifpVqi','type','string','join','sql','Metadata\x20type\x20to\x20synchronize','trim','Synchronize\x20selected\x20development\x20metadata\x20into\x20the\x20server-managed\x20deployment\x20target.','sync','appCode','reduce','12214050xoXZxr','succeeded','action','unknown','--codes\x20supports\x20at\x20most\x20100\x20unique\x20codes.','Deployment\x20sync\x20response\x20was\x20unavailable;\x20the\x20target\x20outcome\x20is\x20unknown.','\x20deployment\x20metadata\x20item(s).','POST','bool','Confirm\x20the\x20metadata\x20codes\x20and\x20start\x20synchronization','confirm','--confirm\x20is\x20required\x20to\x20synchronize\x20deployment\x20metadata.','filter','UPDATED','FAILED','--codes\x20must\x20contain\x20at\x20least\x20one\x20non-blank\x20code.','Review\x20data.items\x20with\x20--format\x20json\x20or\x20--format\x20compress\x20before\x20deciding\x20whether\x20to\x20retry\x20failed\x20codes.','codes','bizCodes','dataset','str','Deployment\x20sync\x20completed\x20with\x20','CREATED','Synchronized\x20','map','64DlBPzB','/smartapi/data-sync/sync','length','partial_failure','deployment_sync_outcome_unknown','\x20item(s).','input','boolean','target_read_api_unavailable','write','Dataset\x20sync\x20may\x20commit\x20target\x20connection\x20metadata\x20before\x20item\x20synchronization;\x20that\x20change\x20is\x20not\x20rolled\x20back\x20when\x20later\x20items\x20fail.','55uUxPbC','1225122bsgpKS','Synchronize\x20selected\x20development\x20metadata\x20to\x20the\x20server-managed\x20deployment\x20target','Comma-separated\x20Dataset,\x20Backend\x20Function,\x20or\x20SQL\x20codes\x20(maximum\x20100)','36282jhhxqV','Would\x20synchronize\x20','Inspect\x20the\x20target\x20database\x20before\x20retrying.\x20Do\x20not\x20resubmit\x20automatically.','not_submitted','Run\x20with\x20--dry-run\x20first,\x20verify\x20the\x20target\x20and\x20codes,\x20then\x20add\x20--confirm.','bizType','deployment','1682764TzBDay'];a102_0x5060=function(){return _0x2d4ca1;};return a102_0x5060();}const SYNC_PATH=a102_0x40d63c(0x11e),SYNC_TYPES=[a102_0x40d63c(0x117),a102_0x40d63c(0x134),a102_0x40d63c(0x141)],TYPE_FLAG={'name':a102_0x40d63c(0x13e),'type':a102_0x40d63c(0x13f),'required':!![],'enum':[...SYNC_TYPES],'description':a102_0x40d63c(0x142)},CODES_FLAG={'name':a102_0x40d63c(0x115),'type':a102_0x40d63c(0x13f),'required':!![],'description':a102_0x40d63c(0x12b)},CONFIRM_FLAG={'name':a102_0x40d63c(0x152),'type':a102_0x40d63c(0x124),'description':a102_0x40d63c(0x151)};export const deploymentSync={'service':a102_0x40d63c(0x132),'command':a102_0x40d63c(0x145),'description':a102_0x40d63c(0x12a),'risk':a102_0x40d63c(0x126),'strictFlags':!![],'structuredErrors':!![],'confirmationDescription':a102_0x40d63c(0x144),'flags':[TYPE_FLAG,CODES_FLAG,CONFIRM_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x228db7){buildSyncPlan(_0x228db7);},async 'dryRun'(_0x21b7fd){const _0x15dcfa=a102_0x40d63c,_0x1eaece=buildSyncPlan(_0x21b7fd);return asDryRunResult(buildOutput(_0x1eaece,[],!![],_0x15dcfa(0x12f)),{'method':_0x15dcfa(0x14f),'url':SYNC_PATH,'description':_0x15dcfa(0x12d)+_0x1eaece[_0x15dcfa(0x123)][_0x15dcfa(0x116)]['length']+'\x20'+_0x1eaece[_0x15dcfa(0x123)][_0x15dcfa(0x131)]+_0x15dcfa(0x122)});},async 'execute'(_0x285d4f){const _0x209961=a102_0x40d63c,_0x29e092=buildSyncPlan(_0x285d4f);if(!_0x285d4f[_0x209961(0x150)](_0x209961(0x152)))throw CliErrors[_0x209961(0x13b)](_0x209961(0x153),_0x209961(0x130));let _0xdb43b2;try{_0xdb43b2=(await syncDeploymentMetadata(_0x29e092[_0x209961(0x123)]))[_0x209961(0x13c)];}catch(_0x225fe4){if(!isPlatformTransportFailure(_0x225fe4))throw _0x225fe4;const _0x29c00a=new CliError(_0x209961(0x121),0x2,_0x209961(0x14d),_0x209961(0x12e));attachErrorData(_0x29c00a,buildOutput(_0x29e092,[],![],_0x209961(0x14b)));throw _0x29c00a;}const _0x35d5a9=_0xdb43b2[_0x209961(0x154)](_0x199bd8=>_0x199bd8[_0x209961(0x14a)]===_0x209961(0x112)),_0x2ab6bc=_0x35d5a9[_0x209961(0x11f)]>0x0?'partial_failure':_0x209961(0x149),_0x93d073=buildOutput(_0x29e092,_0xdb43b2,![],_0x2ab6bc);if(_0x35d5a9[_0x209961(0x11f)]>0x0){const _0x3b24de=new CliError('deployment_sync_partial_failure',0x1,_0x209961(0x119)+_0x35d5a9[_0x209961(0x11f)]+'/'+_0xdb43b2[_0x209961(0x11f)]+'\x20failed\x20item(s).',_0x209961(0x114));attachErrorData(_0x3b24de,_0x93d073);throw _0x3b24de;}return{'ok':!![],'data':_0x93d073,'message':_0x209961(0x11b)+_0xdb43b2[_0x209961(0x11f)]+_0x209961(0x14e)};}};function buildSyncPlan(_0x28362c){const _0xda5ce6=a102_0x40d63c,_0x59d294=_0x28362c[_0xda5ce6(0x118)](_0xda5ce6(0x13e))[_0xda5ce6(0x143)]();if(!SYNC_TYPES['includes'](_0x59d294))throw CliErrors[_0xda5ce6(0x13b)]('--type\x20must\x20be\x20one\x20of:\x20'+SYNC_TYPES[_0xda5ce6(0x140)](',\x20')+'.');const _0x498d97=normalizeCodes(_0x28362c[_0xda5ce6(0x118)](_0xda5ce6(0x115)));if(_0x498d97['length']===0x0)throw CliErrors[_0xda5ce6(0x13b)](_0xda5ce6(0x113));if(_0x498d97[_0xda5ce6(0x11f)]>0x64)throw CliErrors['validation'](_0xda5ce6(0x14c));const _0x1cee4b={'appCode':_0x28362c[_0xda5ce6(0x146)],'bizType':_0x59d294,'bizCodes':_0x498d97},_0x4c6a6e=['Target\x20state\x20is\x20not\x20read\x20back\x20because\x20no\x20target\x20metadata\x20read\x20API\x20is\x20available.','Do\x20not\x20retry\x20automatically\x20when\x20the\x20request\x20outcome\x20is\x20unknown.'];return _0x59d294===_0xda5ce6(0x117)&&_0x4c6a6e['unshift'](_0xda5ce6(0x127)),{'input':_0x1cee4b,'selector':{'appCode':_0x28362c[_0xda5ce6(0x146)],'bizType':_0x59d294,'bizCodes':_0x498d97},'warnings':_0x4c6a6e};}function normalizeCodes(_0x1ff4ff){const _0x1b329f=a102_0x40d63c;return[...new Set(_0x1ff4ff['split'](',')[_0x1b329f(0x11c)](_0x26c610=>_0x26c610[_0x1b329f(0x143)]())[_0x1b329f(0x154)](Boolean))];}function buildOutput(_0x9bd658,_0x1b92ca,_0x1dcf59,_0x56b3a8){const _0xff3f78=a102_0x40d63c,_0x580d9e=_0x56b3a8===_0xff3f78(0x149)||_0x56b3a8===_0xff3f78(0x120),_0x34aba5=_0x1b92ca[_0xff3f78(0x147)]((_0x232f2b,_0x4a60e2)=>{const _0x2b800a=_0xff3f78;return _0x232f2b[_0x4a60e2[_0x2b800a(0x14a)]]=(_0x232f2b[_0x4a60e2['action']]??0x0)+0x1,_0x232f2b;},{});return{'operation':'deployment_metadata_sync','selector':_0x9bd658[_0xff3f78(0x135)],'before':null,'after':null,'dryRun':_0x1dcf59,'backend':{'submitted':_0x56b3a8!==_0xff3f78(0x12f),'method':_0xff3f78(0x14f),'path':SYNC_PATH,'outcome':_0x56b3a8},'summary':{'requested':_0x9bd658[_0xff3f78(0x123)][_0xff3f78(0x116)][_0xff3f78(0x11f)],'total':_0x580d9e?_0x1b92ca[_0xff3f78(0x11f)]:_0x9bd658[_0xff3f78(0x123)][_0xff3f78(0x116)][_0xff3f78(0x11f)],'created':_0x1b92ca[_0xff3f78(0x154)](_0x304fb8=>_0x304fb8[_0xff3f78(0x14a)]===_0xff3f78(0x11a))[_0xff3f78(0x11f)],'updated':_0x1b92ca[_0xff3f78(0x154)](_0x222519=>_0x222519[_0xff3f78(0x14a)]===_0xff3f78(0x155))[_0xff3f78(0x11f)],'failed':_0x1b92ca[_0xff3f78(0x154)](_0x3054b2=>_0x3054b2['action']==='FAILED')['length'],'byAction':_0x34aba5},'items':_0x1b92ca,'verification':{'performed':![],'reason':_0xff3f78(0x125)},'warnings':_0x9bd658['warnings']};}function a102_0xb089(_0x53ea65,_0x3e6353){_0x53ea65=_0x53ea65-0x112;const _0x506039=a102_0x5060();let _0xb0896b=_0x506039[_0x53ea65];return _0xb0896b;}function attachErrorData(_0x1a57c8,_0x4dfe53){const _0x320200=a102_0x40d63c;Object[_0x320200(0x136)](_0x1a57c8,_0x320200(0x138),{'value':_0x4dfe53,'enumerable':!![]});}
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a100_0x4a95(_0x146628,_0x398d7c){_0x146628=_0x146628-0x161;const _0x5176ab=a100_0x5176();let _0x4a9535=_0x5176ab[_0x146628];return _0x4a9535;}const a100_0x45b1e7=a100_0x4a95;(function(_0x2ffcec,_0x55a6da){const _0x2dd39a=a100_0x4a95,_0x53f58b=_0x2ffcec();while(!![]){try{const _0x4a64fd=parseInt(_0x2dd39a(0x190))/0x1*(parseInt(_0x2dd39a(0x178))/0x2)+parseInt(_0x2dd39a(0x161))/0x3+-parseInt(_0x2dd39a(0x171))/0x4+-parseInt(_0x2dd39a(0x177))/0x5*(parseInt(_0x2dd39a(0x1b8))/0x6)+-parseInt(_0x2dd39a(0x1bc))/0x7+-parseInt(_0x2dd39a(0x18c))/0x8+-parseInt(_0x2dd39a(0x175))/0x9*(-parseInt(_0x2dd39a(0x1c7))/0xa);if(_0x4a64fd===_0x55a6da)break;else _0x53f58b['push'](_0x53f58b['shift']());}catch(_0x49bbde){_0x53f58b['push'](_0x53f58b['shift']());}}}(a100_0x5176,0x95e59));import a100_0x30c168 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';function a100_0x5176(){const _0x3fc430=['prototype','label','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','597228CZEkcs','\x20\x20Apps','current','hasOwnProperty','slice','Project','\x20\x20Skill\x20Version:\x20\x20\x20','reason','state','doctor','\x20\x20Routing\x20Configuration','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','inherit','(missing)','check','1013844fGHryq','toLowerCase','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','version','68427LEAuOb','projectConfig','25LRFwTf','502598ujweMs','\x20\x20Built-in\x20Skill','repeat','call','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','cookie','\x20\x20Legacy\x20inherit:\x20\x20\x20','(unknown)','Not\x20checked\x20until\x20routing\x20configuration\x20is\x20repaired','stringify','null','globalConfig','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','unknown','\x20\x20Config\x20Files','(none)','missing','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','\x20←\x20current','1634256SQDWdu','format','length','✗\x20Invalid\x20','1uxobpE','raw','skillVersion','\x20\x20API\x20Endpoints','accessKey','gray','(set\x20via\x20file,\x20length=','\x20doctor','\x20\x20Package\x20Version:\x20','routing','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','region','✗\x20Expired','pageSize','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(default)','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','\x20config','\x20config\x20delete\x20region','(default)','Global','filter','\x20\x20explicitAppName:\x20','bold','\x20\x20Installed\x20Path:\x20\x20','red','✗\x20Invalid\x20JSON','present','\x20\x20Merged\x20Config','✓\x20Valid','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','keys','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20─','\x20config\x20delete\x20inherit\x20--global','env','explicitAppName','global','641814BYInOh','Repair\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','794577yMLBbC','\x20\x20\x20\x20accessKey:\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','value','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','apps','\x20\x20Country/Region\x20Configuration','message','1670wJrSOZ','\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','apiDir','appCode','(set,\x20length=','currentApp','green','repairCommand','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','empty','appcode','join','log','padEnd','\x20+\x20','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','source','includes','\x20config\x20delete\x20routing','yellow','locale','platform','\x20\x20appDomain:\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20Auth','defaultApp','\x20config\x20delete\x20inherit'];a100_0x5176=function(){return _0x3fc430;};return a100_0x5176();}import{getActiveRegion,getApiDomain,getAppDomain,getKbDomain,getSkillDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,initGlobalEnvironment,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';import{isInvalidLovrabetRegion}from'../constant/region.js';function describeRegionValue(_0x3d3fa7){const _0x478ba5=a100_0x4a95;return typeof _0x3d3fa7==='string'?JSON[_0x478ba5(0x181)](_0x3d3fa7):'<'+(_0x3d3fa7===null?_0x478ba5(0x182):typeof _0x3d3fa7)+'>';}async function execute(_0x3501f6){const _0x35cea5=a100_0x4a95,_0x34ddf5=GIT_COMMIT!==_0x35cea5(0x185)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x35cea5(0x165)](0x0,0xa)+')':VERSION,_0x86c39b=buildConfigFromFlags({}),_0x190aef=getCookie();let _0xe0839c;try{await initGlobalEnvironment(_0x86c39b);}catch(_0x231a41){_0xe0839c=_0x231a41 instanceof Error?_0x231a41:new Error(String(_0x231a41));}console[_0x35cea5(0x1d5)](),console['log'](a100_0x30c168['bold'](CLI_BIN_NAME+_0x35cea5(0x197))),console['log'](a100_0x30c168[_0x35cea5(0x195)]('─'[_0x35cea5(0x17a)](0x32))),console[_0x35cea5(0x1d5)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x34ddf5),console[_0x35cea5(0x1d5)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x35cea5(0x174)]),console[_0x35cea5(0x1d5)](_0x35cea5(0x1ba)+process[_0x35cea5(0x1de)]+'\x20'+process['arch']);const _0x472349=inspectBuiltinSkill();console['log'](),console[_0x35cea5(0x1d5)](a100_0x30c168['bold'](_0x35cea5(0x179))),console[_0x35cea5(0x1d5)](a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x1b3)[_0x35cea5(0x17a)](0x1e)));const _0x25a844=_0x472349['state']==='current'?a100_0x30c168[_0x35cea5(0x1cf)]('✓\x20'+_0x472349['state']):a100_0x30c168[_0x35cea5(0x1a9)]('✗\x20'+_0x472349[_0x35cea5(0x169)]);console[_0x35cea5(0x1d5)](_0x35cea5(0x1e6)+_0x25a844),console['log'](_0x35cea5(0x198)+_0x472349['packageVersion']),console[_0x35cea5(0x1d5)](_0x35cea5(0x167)+(_0x472349[_0x35cea5(0x192)]||a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x17f)))),console[_0x35cea5(0x1d5)](_0x35cea5(0x1a8)+(_0x472349['installedPath']||a100_0x30c168['gray'](_0x35cea5(0x1e0))));if(_0x472349[_0x35cea5(0x168)])console[_0x35cea5(0x1d5)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x472349['reason']);_0x472349[_0x35cea5(0x169)]!==_0x35cea5(0x163)&&console['log'](_0x35cea5(0x19e)+_0x472349[_0x35cea5(0x1d0)]);console[_0x35cea5(0x1d5)](),console[_0x35cea5(0x1d5)](a100_0x30c168[_0x35cea5(0x1a7)](_0x35cea5(0x186))),console[_0x35cea5(0x1d5)](a100_0x30c168[_0x35cea5(0x195)]('\x20\x20─'[_0x35cea5(0x17a)](0x1e)));const _0x1f09da=getGlobalConfigPath(),_0x1ea49d=getProjectConfigPath();console[_0x35cea5(0x1d5)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1f09da||a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x1e0)))),console[_0x35cea5(0x1d5)](_0x35cea5(0x16d)+(_0x1ea49d||a100_0x30c168[_0x35cea5(0x195)]('(not\x20found)'))),console[_0x35cea5(0x1d5)](),console[_0x35cea5(0x1d5)](a100_0x30c168[_0x35cea5(0x1a7)](_0x35cea5(0x1bb))),console[_0x35cea5(0x1d5)](a100_0x30c168[_0x35cea5(0x195)]('\x20\x20─'[_0x35cea5(0x17a)](0x1e)));const _0x1481f6=(_0x363df0,_0x3f9d47)=>{const _0x49a98d=_0x35cea5;if(!_0x3f9d47){console[_0x49a98d(0x1d5)]('\x20\x20'+_0x363df0[_0x49a98d(0x1d6)](0x11)+'\x20'+a100_0x30c168['gray']('(no\x20file)'));return;}const _0x4ad5b3=inspectCliConfigJsonFile(_0x3f9d47);if(_0x4ad5b3[_0x49a98d(0x18a)]==='ok')console['log']('\x20\x20'+_0x363df0[_0x49a98d(0x1d6)](0x11)+'\x20'+a100_0x30c168[_0x49a98d(0x1cf)]('✓\x20Valid\x20JSON'));else{if(_0x4ad5b3[_0x49a98d(0x18a)]===_0x49a98d(0x1d2))console[_0x49a98d(0x1d5)]('\x20\x20'+_0x363df0[_0x49a98d(0x1d6)](0x11)+'\x20'+a100_0x30c168['yellow'](_0x49a98d(0x1c9)));else _0x4ad5b3['status']===_0x49a98d(0x188)?console['log']('\x20\x20'+_0x363df0['padEnd'](0x11)+'\x20'+a100_0x30c168[_0x49a98d(0x195)](_0x49a98d(0x16f))):(console[_0x49a98d(0x1d5)]('\x20\x20'+_0x363df0[_0x49a98d(0x1d6)](0x11)+'\x20'+a100_0x30c168['red'](_0x49a98d(0x1aa))),console[_0x49a98d(0x1d5)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a100_0x30c168['red'](_0x4ad5b3[_0x49a98d(0x1c6)])));}};_0x1481f6(_0x35cea5(0x1a4),_0x1f09da),_0x1481f6('Project',_0x1ea49d);const _0x24fc39=loadRawConfigLayers(),_0x3f4a3c=[{'label':_0x35cea5(0x166),'value':_0x24fc39['projectConfig']['region'],'present':Object[_0x35cea5(0x1e4)][_0x35cea5(0x164)][_0x35cea5(0x17b)](_0x24fc39[_0x35cea5(0x176)],_0x35cea5(0x19b)),'repairCommand':CLI_BIN_NAME+_0x35cea5(0x1a2)},{'label':_0x35cea5(0x1a4),'value':_0x24fc39['globalConfig'][_0x35cea5(0x19b)],'present':Object['prototype'][_0x35cea5(0x164)]['call'](_0x24fc39[_0x35cea5(0x183)],'region'),'repairCommand':CLI_BIN_NAME+'\x20config\x20delete\x20region\x20--global'}][_0x35cea5(0x1a5)](_0x168d4e=>_0x168d4e[_0x35cea5(0x1ab)]&&isInvalidLovrabetRegion(_0x168d4e['value']));if(_0x3f4a3c['length']>0x0){console[_0x35cea5(0x1d5)](),console[_0x35cea5(0x1d5)](a100_0x30c168[_0x35cea5(0x1a7)](_0x35cea5(0x1c5))),console[_0x35cea5(0x1d5)](a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x1b3)[_0x35cea5(0x17a)](0x1e)));for(const _0x4fdeac of _0x3f4a3c){console[_0x35cea5(0x1d5)]('\x20\x20'+_0x4fdeac[_0x35cea5(0x1e5)][_0x35cea5(0x1d6)](0x11)+'\x20'+a100_0x30c168[_0x35cea5(0x1a9)](_0x35cea5(0x18f)+describeRegionValue(_0x4fdeac[_0x35cea5(0x1c0)]))),console[_0x35cea5(0x1d5)]('\x20\x20'+(_0x35cea5(0x1b9)+_0x4fdeac[_0x35cea5(0x1e5)][_0x35cea5(0x172)]()+':')['padEnd'](0x10)+'\x20'+_0x4fdeac[_0x35cea5(0x1d0)]);}}const _0x4cacaa=[Object[_0x35cea5(0x1e4)]['hasOwnProperty'][_0x35cea5(0x17b)](_0x24fc39[_0x35cea5(0x183)],'inherit')?'global':null,Object[_0x35cea5(0x1e4)]['hasOwnProperty'][_0x35cea5(0x17b)](_0x24fc39['projectConfig'],_0x35cea5(0x16e))?'project':null][_0x35cea5(0x1a5)](Boolean);_0x4cacaa[_0x35cea5(0x18e)]>0x0&&(console[_0x35cea5(0x1d5)](_0x35cea5(0x17e)+a100_0x30c168['yellow']('ignored\x20in\x20'+_0x4cacaa[_0x35cea5(0x1d4)](_0x35cea5(0x1d7))+_0x35cea5(0x1a1))),_0x4cacaa[_0x35cea5(0x1da)]('project')&&console['log']('\x20\x20Repair\x20project:\x20\x20\x20'+CLI_BIN_NAME+_0x35cea5(0x1e3)),_0x4cacaa[_0x35cea5(0x1da)](_0x35cea5(0x1b7))&&console[_0x35cea5(0x1d5)]('\x20\x20Repair\x20global:\x20\x20\x20\x20'+CLI_BIN_NAME+_0x35cea5(0x1b4)));const _0x4d33e2=isInvalidLovrabetRegion(_0x86c39b[_0x35cea5(0x191)]?.[_0x35cea5(0x19b)]);_0xe0839c&&!_0x4d33e2&&(console['log'](),console['log'](a100_0x30c168[_0x35cea5(0x1a7)](_0x35cea5(0x16b))),console[_0x35cea5(0x1d5)](a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x1b3)[_0x35cea5(0x17a)](0x1e))),console[_0x35cea5(0x1d5)](_0x35cea5(0x184)+a100_0x30c168[_0x35cea5(0x1a9)]('✗\x20Invalid')),console[_0x35cea5(0x1d5)]('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xe0839c[_0x35cea5(0x1c6)]),Object[_0x35cea5(0x1e4)][_0x35cea5(0x164)][_0x35cea5(0x17b)](_0x24fc39[_0x35cea5(0x176)],'routing')&&console['log']('\x20\x20Repair\x20project:\x20\x20'+CLI_BIN_NAME+_0x35cea5(0x1db)),Object[_0x35cea5(0x1e4)]['hasOwnProperty'][_0x35cea5(0x17b)](_0x24fc39[_0x35cea5(0x183)],_0x35cea5(0x199))&&console[_0x35cea5(0x1d5)]('\x20\x20Repair\x20global:\x20\x20\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20routing\x20--global'));console[_0x35cea5(0x1d5)](),console[_0x35cea5(0x1d5)](a100_0x30c168['bold'](_0x35cea5(0x1ac))),console[_0x35cea5(0x1d5)](a100_0x30c168['gray']('\x20\x20─'[_0x35cea5(0x17a)](0x1e))),console[_0x35cea5(0x1d5)](_0x35cea5(0x189)+(_0x86c39b[_0x35cea5(0x1cc)]||a100_0x30c168[_0x35cea5(0x1a9)]('(not\x20set)'))),console[_0x35cea5(0x1d5)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x86c39b[_0x35cea5(0x1b5)]),console['log'](_0x35cea5(0x1a0)+_0x86c39b[_0x35cea5(0x1dd)]),console[_0x35cea5(0x1d5)]('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x86c39b[_0x35cea5(0x1cb)]),console[_0x35cea5(0x1d5)](_0x35cea5(0x1ca)+(_0x86c39b[_0x35cea5(0x1e2)]||a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x187)))),console[_0x35cea5(0x1d5)](_0x35cea5(0x1b0)+(_0x86c39b[_0x35cea5(0x1ce)]||a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x187)))),console['log'](_0x35cea5(0x1a6)+(_0x86c39b[_0x35cea5(0x1b6)]||a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x187)))),console[_0x35cea5(0x1d5)](_0x35cea5(0x1be)+(_0x86c39b[_0x35cea5(0x18d)]||a100_0x30c168[_0x35cea5(0x195)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x35cea5(0x18d)]+')'))),console[_0x35cea5(0x1d5)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x86c39b[_0x35cea5(0x19d)]??a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x1a3)))),console[_0x35cea5(0x1d5)](_0x35cea5(0x16c)+_0x86c39b['riskLevel']),console['log']('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x86c39b['verbose']),console[_0x35cea5(0x1d5)](_0x35cea5(0x1c1)+(_0x86c39b[_0x35cea5(0x17d)]?a100_0x30c168['green'](_0x35cea5(0x1cd)+_0x86c39b[_0x35cea5(0x17d)][_0x35cea5(0x18e)]+')'):_0x190aef?a100_0x30c168['green'](_0x35cea5(0x196)+_0x190aef[_0x35cea5(0x18e)]+')'):a100_0x30c168['gray'](_0x35cea5(0x187))));const _0x1b490d=Object[_0x35cea5(0x1b1)](_0x86c39b[_0x35cea5(0x1c4)]);if(_0x1b490d[_0x35cea5(0x18e)]>0x0){console[_0x35cea5(0x1d5)](),console['log'](a100_0x30c168[_0x35cea5(0x1a7)](_0x35cea5(0x162))),console[_0x35cea5(0x1d5)](a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x1b3)[_0x35cea5(0x17a)](0x1e)));for(const _0x3ef5ef of _0x1b490d){const _0x3b2c95=_0x86c39b['apps'][_0x3ef5ef],_0x3810b7=_0x3ef5ef===_0x86c39b[_0x35cea5(0x1e2)],_0x1e28db=_0x3ef5ef===_0x86c39b[_0x35cea5(0x1ce)],_0x577209=_0x1e28db?a100_0x30c168[_0x35cea5(0x1cf)](_0x35cea5(0x18b)):'',_0x2ae4fe=_0x3810b7?_0x35cea5(0x19f):'';console[_0x35cea5(0x1d5)]('\x20\x20'+_0x3ef5ef+_0x2ae4fe+_0x577209),console[_0x35cea5(0x1d5)](_0x35cea5(0x1d8)+_0x3b2c95[_0x35cea5(0x1d3)]);const _0x30e019=buildAppDoctorFields(_0x3b2c95,{'env':_0x86c39b[_0x35cea5(0x1b5)],'apiDir':_0x86c39b[_0x35cea5(0x191)][_0x35cea5(0x1cb)]||DEFAULT_CONFIG_VALUES[_0x35cea5(0x1cb)],'cookie':_0x86c39b['cookie']||_0x190aef||undefined,'accessKey':_0x86c39b[_0x35cea5(0x194)]});console[_0x35cea5(0x1d5)](_0x35cea5(0x19a)+_0x30e019['env']['value']+'\x20\x20'+a100_0x30c168[_0x35cea5(0x195)]('('+_0x30e019[_0x35cea5(0x1b5)]['source']+')')),console[_0x35cea5(0x1d5)](_0x35cea5(0x1b2)+_0x30e019[_0x35cea5(0x1cb)][_0x35cea5(0x1c0)]+'\x20\x20'+a100_0x30c168['gray']('('+_0x30e019['apiDir']['source']+')'));const _0x4c8125=_0x30e019[_0x35cea5(0x17d)][_0x35cea5(0x1c0)]?a100_0x30c168[_0x35cea5(0x1cf)](_0x35cea5(0x1cd)+_0x30e019[_0x35cea5(0x17d)][_0x35cea5(0x1c0)][_0x35cea5(0x18e)]+')'):a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x187));console[_0x35cea5(0x1d5)](_0x35cea5(0x173)+_0x4c8125+'\x20\x20'+a100_0x30c168[_0x35cea5(0x195)]('('+_0x30e019[_0x35cea5(0x17d)][_0x35cea5(0x1d9)]+')'));const _0x48d9aa=_0x30e019['accessKey'][_0x35cea5(0x1c0)]?a100_0x30c168[_0x35cea5(0x1cf)]('(set,\x20length='+_0x30e019[_0x35cea5(0x194)][_0x35cea5(0x1c0)]['length']+')'):a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x187));console['log'](_0x35cea5(0x1bd)+_0x48d9aa+'\x20\x20'+a100_0x30c168[_0x35cea5(0x195)]('('+_0x30e019[_0x35cea5(0x194)][_0x35cea5(0x1d9)]+')'));}}console[_0x35cea5(0x1d5)](),console[_0x35cea5(0x1d5)](a100_0x30c168['bold'](_0x35cea5(0x193))),console[_0x35cea5(0x1d5)](a100_0x30c168['gray'](_0x35cea5(0x1b3)[_0x35cea5(0x17a)](0x1e)));_0xe0839c?console[_0x35cea5(0x1d5)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a100_0x30c168[_0x35cea5(0x1a9)](_0x35cea5(0x1ae))):(console[_0x35cea5(0x1d5)](_0x35cea5(0x17c)+getActiveRegion()),console[_0x35cea5(0x1d5)](_0x35cea5(0x1d1)+getApiDomain()),console['log'](_0x35cea5(0x1c2)+getUserDomain()),console[_0x35cea5(0x1d5)](_0x35cea5(0x1bf)+getRuntimeDomain()),console[_0x35cea5(0x1d5)]('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console['log'](_0x35cea5(0x1c8)+getKbDomain()),console[_0x35cea5(0x1d5)](_0x35cea5(0x1df)+getAppDomain()));console[_0x35cea5(0x1d5)](),console[_0x35cea5(0x1d5)](a100_0x30c168['bold'](_0x35cea5(0x1e1))),console[_0x35cea5(0x1d5)](a100_0x30c168[_0x35cea5(0x195)](_0x35cea5(0x1b3)['repeat'](0x1e)));if(_0xe0839c)console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a100_0x30c168[_0x35cea5(0x1dc)](_0x35cea5(0x180)));else{if(_0x190aef){const _0x593c9e=await getIsSessionValid();console[_0x35cea5(0x1d5)](_0x35cea5(0x184)+(_0x593c9e?a100_0x30c168[_0x35cea5(0x1cf)](_0x35cea5(0x1ad)):a100_0x30c168[_0x35cea5(0x1a9)](_0x35cea5(0x19c))));}else console['log'](_0x35cea5(0x184)+a100_0x30c168[_0x35cea5(0x1a9)](_0x35cea5(0x1c3)));}return console[_0x35cea5(0x1d5)](),{'ok':!![]};}export const doctorDefinition={'service':a100_0x45b1e7(0x16a),'command':a100_0x45b1e7(0x170),'description':a100_0x45b1e7(0x1af),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a103_0x4dc4c9=a103_0x4d0f;(function(_0x3b30e5,_0xdbfeb2){const _0x24f1db=a103_0x4d0f,_0x4cb38a=_0x3b30e5();while(!![]){try{const _0x1f5396=parseInt(_0x24f1db(0x123))/0x1*(parseInt(_0x24f1db(0x114))/0x2)+-parseInt(_0x24f1db(0x139))/0x3*(-parseInt(_0x24f1db(0x152))/0x4)+parseInt(_0x24f1db(0x130))/0x5*(parseInt(_0x24f1db(0x162))/0x6)+-parseInt(_0x24f1db(0xe8))/0x7*(-parseInt(_0x24f1db(0x105))/0x8)+parseInt(_0x24f1db(0x15c))/0x9+parseInt(_0x24f1db(0x117))/0xa*(-parseInt(_0x24f1db(0x133))/0xb)+parseInt(_0x24f1db(0x128))/0xc*(-parseInt(_0x24f1db(0x15e))/0xd);if(_0x1f5396===_0xdbfeb2)break;else _0x4cb38a['push'](_0x4cb38a['shift']());}catch(_0x4e41ea){_0x4cb38a['push'](_0x4cb38a['shift']());}}}(a103_0x5d44,0xb5c8f));import a103_0x5dda35 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getActiveRegion,getApiDomain,getAppDomain,getKbDomain,getSkillDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,initGlobalEnvironment,inspectCliConfigJsonFile,loadRawConfigLayers}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';function a103_0x4d0f(_0x8b5f0a,_0x142b47){_0x8b5f0a=_0x8b5f0a-0xdd;const _0x5d444a=a103_0x5d44();let _0x4d0f89=_0x5d444a[_0x8b5f0a];return _0x4d0f89;}import{inspectBuiltinSkill}from'../skills/builtin-skill.js';import{isInvalidLovrabetRegion}from'../constant/region.js';function describeRegionValue(_0x3f5894){const _0x14d99a=a103_0x4d0f;return typeof _0x3f5894===_0x14d99a(0x15d)?JSON[_0x14d99a(0x14a)](_0x3f5894):'<'+(_0x3f5894===null?'null':typeof _0x3f5894)+'>';}async function execute(_0x2d3aa5){const _0x38d1b0=a103_0x4d0f,_0x488986=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x38d1b0(0xf5)](0x0,0xa)+')':VERSION,_0x5a752a=buildConfigFromFlags({}),_0x4f406a=getCookie();let _0x272a6f;try{await initGlobalEnvironment(_0x5a752a);}catch(_0x169e50){_0x272a6f=_0x169e50 instanceof Error?_0x169e50:new Error(String(_0x169e50));}console['log'](),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0xfd)](CLI_BIN_NAME+'\x20doctor')),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0x158)]('─'['repeat'](0x32))),console['log'](_0x38d1b0(0x12b)+_0x488986),console[_0x38d1b0(0x156)](_0x38d1b0(0x134)+process[_0x38d1b0(0x100)]),console['log'](_0x38d1b0(0xf2)+process[_0x38d1b0(0x154)]+'\x20'+process['arch']);const _0xbd4e6d=inspectBuiltinSkill();console[_0x38d1b0(0x156)](),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0xfd)]('\x20\x20Built-in\x20Skill')),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0x158)](_0x38d1b0(0x161)[_0x38d1b0(0x107)](0x1e)));const _0x583c97=_0xbd4e6d[_0x38d1b0(0x146)]===_0x38d1b0(0xe6)?a103_0x5dda35[_0x38d1b0(0x13e)]('✓\x20'+_0xbd4e6d[_0x38d1b0(0x146)]):a103_0x5dda35['red']('✗\x20'+_0xbd4e6d[_0x38d1b0(0x146)]);console[_0x38d1b0(0x156)]('\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x583c97),console[_0x38d1b0(0x156)](_0x38d1b0(0x12a)+_0xbd4e6d['packageVersion']),console['log'](_0x38d1b0(0xf6)+(_0xbd4e6d[_0x38d1b0(0xec)]||a103_0x5dda35[_0x38d1b0(0x158)]('(unknown)'))),console['log'](_0x38d1b0(0x160)+(_0xbd4e6d[_0x38d1b0(0x13c)]||a103_0x5dda35[_0x38d1b0(0x158)]('(not\x20found)')));if(_0xbd4e6d['reason'])console['log']('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xbd4e6d[_0x38d1b0(0x132)]);_0xbd4e6d[_0x38d1b0(0x146)]!=='current'&&console[_0x38d1b0(0x156)](_0x38d1b0(0x11a)+_0xbd4e6d[_0x38d1b0(0x127)]);console['log'](),console['log'](a103_0x5dda35[_0x38d1b0(0xfd)](_0x38d1b0(0x147))),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0x158)](_0x38d1b0(0x161)[_0x38d1b0(0x107)](0x1e)));const _0x7fa1ab=getGlobalConfigPath(),_0x318581=getProjectConfigPath();console[_0x38d1b0(0x156)](_0x38d1b0(0xea)+(_0x7fa1ab||a103_0x5dda35[_0x38d1b0(0x158)]('(not\x20found)'))),console[_0x38d1b0(0x156)](_0x38d1b0(0xde)+(_0x318581||a103_0x5dda35['gray'](_0x38d1b0(0x13d)))),console[_0x38d1b0(0x156)](),console['log'](a103_0x5dda35[_0x38d1b0(0xfd)](_0x38d1b0(0x108))),console['log'](a103_0x5dda35['gray'](_0x38d1b0(0x161)[_0x38d1b0(0x107)](0x1e)));const _0x1c5778=(_0x5c4bba,_0x540457)=>{const _0x4eec1d=_0x38d1b0;if(!_0x540457){console[_0x4eec1d(0x156)]('\x20\x20'+_0x5c4bba['padEnd'](0x11)+'\x20'+a103_0x5dda35[_0x4eec1d(0x158)](_0x4eec1d(0xe4)));return;}const _0x5d29ab=inspectCliConfigJsonFile(_0x540457);if(_0x5d29ab[_0x4eec1d(0x15b)]==='ok')console[_0x4eec1d(0x156)]('\x20\x20'+_0x5c4bba[_0x4eec1d(0x131)](0x11)+'\x20'+a103_0x5dda35['green'](_0x4eec1d(0xef)));else{if(_0x5d29ab[_0x4eec1d(0x15b)]===_0x4eec1d(0x155))console[_0x4eec1d(0x156)]('\x20\x20'+_0x5c4bba['padEnd'](0x11)+'\x20'+a103_0x5dda35[_0x4eec1d(0x109)](_0x4eec1d(0x144)));else _0x5d29ab[_0x4eec1d(0x15b)]===_0x4eec1d(0xeb)?console[_0x4eec1d(0x156)]('\x20\x20'+_0x5c4bba[_0x4eec1d(0x131)](0x11)+'\x20'+a103_0x5dda35[_0x4eec1d(0x158)](_0x4eec1d(0x13a))):(console[_0x4eec1d(0x156)]('\x20\x20'+_0x5c4bba[_0x4eec1d(0x131)](0x11)+'\x20'+a103_0x5dda35[_0x4eec1d(0x102)](_0x4eec1d(0xf4))),console[_0x4eec1d(0x156)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a103_0x5dda35[_0x4eec1d(0x102)](_0x5d29ab['message'])));}};_0x1c5778(_0x38d1b0(0x149),_0x7fa1ab),_0x1c5778('Project',_0x318581);const _0x4b042c=loadRawConfigLayers(),_0x219318=[{'label':_0x38d1b0(0x104),'value':_0x4b042c[_0x38d1b0(0x103)]['region'],'present':Object[_0x38d1b0(0x112)][_0x38d1b0(0x138)][_0x38d1b0(0x11c)](_0x4b042c[_0x38d1b0(0x103)],_0x38d1b0(0xe7)),'repairCommand':CLI_BIN_NAME+_0x38d1b0(0xe5)},{'label':_0x38d1b0(0x149),'value':_0x4b042c[_0x38d1b0(0xe9)][_0x38d1b0(0xe7)],'present':Object[_0x38d1b0(0x112)][_0x38d1b0(0x138)]['call'](_0x4b042c[_0x38d1b0(0xe9)],'region'),'repairCommand':CLI_BIN_NAME+_0x38d1b0(0x13f)}][_0x38d1b0(0x115)](_0x18255d=>_0x18255d[_0x38d1b0(0x101)]&&isInvalidLovrabetRegion(_0x18255d[_0x38d1b0(0x118)]));if(_0x219318['length']>0x0){console[_0x38d1b0(0x156)](),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0xfd)]('\x20\x20Country/Region\x20Configuration')),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0x158)](_0x38d1b0(0x161)[_0x38d1b0(0x107)](0x1e)));for(const _0x140799 of _0x219318){console[_0x38d1b0(0x156)]('\x20\x20'+_0x140799[_0x38d1b0(0x125)]['padEnd'](0x11)+'\x20'+a103_0x5dda35['red'](_0x38d1b0(0xf7)+describeRegionValue(_0x140799['value']))),console[_0x38d1b0(0x156)]('\x20\x20'+('Repair\x20'+_0x140799['label'][_0x38d1b0(0x14e)]()+':')[_0x38d1b0(0x131)](0x10)+'\x20'+_0x140799[_0x38d1b0(0x127)]);}}const _0x40ef1f=[Object[_0x38d1b0(0x112)][_0x38d1b0(0x138)][_0x38d1b0(0x11c)](_0x4b042c['globalConfig'],_0x38d1b0(0x163))?'global':null,Object[_0x38d1b0(0x112)]['hasOwnProperty'][_0x38d1b0(0x11c)](_0x4b042c[_0x38d1b0(0x103)],'inherit')?'project':null][_0x38d1b0(0x115)](Boolean);_0x40ef1f['length']>0x0&&(console['log'](_0x38d1b0(0x116)+a103_0x5dda35[_0x38d1b0(0x109)](_0x38d1b0(0x14b)+_0x40ef1f[_0x38d1b0(0x10c)](_0x38d1b0(0x12d))+'\x20config')),_0x40ef1f[_0x38d1b0(0x10f)]('project')&&console[_0x38d1b0(0x156)](_0x38d1b0(0x110)+CLI_BIN_NAME+_0x38d1b0(0x113)),_0x40ef1f[_0x38d1b0(0x10f)](_0x38d1b0(0xf1))&&console[_0x38d1b0(0x156)]('\x20\x20Repair\x20global:\x20\x20\x20\x20'+CLI_BIN_NAME+_0x38d1b0(0x10d)));const _0x1a0aae=isInvalidLovrabetRegion(_0x5a752a[_0x38d1b0(0xe1)]?.['region']);_0x272a6f&&!_0x1a0aae&&(console[_0x38d1b0(0x156)](),console[_0x38d1b0(0x156)](a103_0x5dda35['bold'](_0x38d1b0(0x111))),console[_0x38d1b0(0x156)](a103_0x5dda35['gray']('\x20\x20─'[_0x38d1b0(0x107)](0x1e))),console[_0x38d1b0(0x156)](_0x38d1b0(0x11d)+a103_0x5dda35[_0x38d1b0(0x102)]('✗\x20Invalid')),console[_0x38d1b0(0x156)](_0x38d1b0(0x137)+_0x272a6f[_0x38d1b0(0x148)]),Object[_0x38d1b0(0x112)]['hasOwnProperty'][_0x38d1b0(0x11c)](_0x4b042c[_0x38d1b0(0x103)],'routing')&&console[_0x38d1b0(0x156)](_0x38d1b0(0xdf)+CLI_BIN_NAME+_0x38d1b0(0x14c)),Object[_0x38d1b0(0x112)]['hasOwnProperty'][_0x38d1b0(0x11c)](_0x4b042c[_0x38d1b0(0xe9)],_0x38d1b0(0x120))&&console[_0x38d1b0(0x156)](_0x38d1b0(0x15f)+CLI_BIN_NAME+'\x20config\x20delete\x20routing\x20--global'));console['log'](),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0xfd)](_0x38d1b0(0xff))),console[_0x38d1b0(0x156)](a103_0x5dda35['gray'](_0x38d1b0(0x161)[_0x38d1b0(0x107)](0x1e))),console['log'](_0x38d1b0(0x12c)+(_0x5a752a[_0x38d1b0(0x159)]||a103_0x5dda35[_0x38d1b0(0x102)](_0x38d1b0(0x106)))),console['log'](_0x38d1b0(0x153)+_0x5a752a['env']),console['log'](_0x38d1b0(0x14f)+_0x5a752a[_0x38d1b0(0xf0)]),console['log']('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5a752a[_0x38d1b0(0x10a)]),console[_0x38d1b0(0x156)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x5a752a[_0x38d1b0(0x12f)]||a103_0x5dda35[_0x38d1b0(0x158)]('(none)'))),console['log'](_0x38d1b0(0x10e)+(_0x5a752a[_0x38d1b0(0xf8)]||a103_0x5dda35['gray']('(none)'))),console[_0x38d1b0(0x156)](_0x38d1b0(0x11f)+(_0x5a752a['explicitAppName']||a103_0x5dda35[_0x38d1b0(0x158)](_0x38d1b0(0x142)))),console[_0x38d1b0(0x156)](_0x38d1b0(0xe3)+(_0x5a752a['format']||a103_0x5dda35[_0x38d1b0(0x158)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x38d1b0(0x150)]+')'))),console[_0x38d1b0(0x156)](_0x38d1b0(0x143)+(_0x5a752a[_0x38d1b0(0xf3)]??a103_0x5dda35['gray'](_0x38d1b0(0x119)))),console[_0x38d1b0(0x156)](_0x38d1b0(0xee)+_0x5a752a['riskLevel']),console['log']('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5a752a[_0x38d1b0(0xf9)]),console[_0x38d1b0(0x156)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5a752a[_0x38d1b0(0x15a)]?a103_0x5dda35[_0x38d1b0(0x13e)](_0x38d1b0(0x126)+_0x5a752a[_0x38d1b0(0x15a)][_0x38d1b0(0xe2)]+')'):_0x4f406a?a103_0x5dda35['green'](_0x38d1b0(0x129)+_0x4f406a[_0x38d1b0(0xe2)]+')'):a103_0x5dda35['gray'](_0x38d1b0(0x142))));const _0x4e759f=Object['keys'](_0x5a752a['apps']);if(_0x4e759f[_0x38d1b0(0xe2)]>0x0){console[_0x38d1b0(0x156)](),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0xfd)](_0x38d1b0(0x121))),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0x158)](_0x38d1b0(0x161)[_0x38d1b0(0x107)](0x1e)));for(const _0x2fa08c of _0x4e759f){const _0x292baf=_0x5a752a[_0x38d1b0(0x12e)][_0x2fa08c],_0x2c8fe8=_0x2fa08c===_0x5a752a['defaultApp'],_0x375e1c=_0x2fa08c===_0x5a752a[_0x38d1b0(0xf8)],_0x9312f0=_0x375e1c?a103_0x5dda35[_0x38d1b0(0x13e)](_0x38d1b0(0xfe)):'',_0x2aa85c=_0x2c8fe8?_0x38d1b0(0x11e):'';console[_0x38d1b0(0x156)]('\x20\x20'+_0x2fa08c+_0x2aa85c+_0x9312f0),console[_0x38d1b0(0x156)](_0x38d1b0(0xdd)+_0x292baf[_0x38d1b0(0x14d)]);const _0x54f52c=buildAppDoctorFields(_0x292baf,{'env':_0x5a752a[_0x38d1b0(0x124)],'apiDir':_0x5a752a[_0x38d1b0(0xe1)][_0x38d1b0(0x10a)]||DEFAULT_CONFIG_VALUES[_0x38d1b0(0x10a)],'cookie':_0x5a752a[_0x38d1b0(0x15a)]||_0x4f406a||undefined,'accessKey':_0x5a752a[_0x38d1b0(0xfa)]});console['log'](_0x38d1b0(0x141)+_0x54f52c[_0x38d1b0(0x124)][_0x38d1b0(0x118)]+'\x20\x20'+a103_0x5dda35[_0x38d1b0(0x158)]('('+_0x54f52c[_0x38d1b0(0x124)][_0x38d1b0(0xfc)]+')')),console[_0x38d1b0(0x156)](_0x38d1b0(0x145)+_0x54f52c[_0x38d1b0(0x10a)][_0x38d1b0(0x118)]+'\x20\x20'+a103_0x5dda35[_0x38d1b0(0x158)]('('+_0x54f52c['apiDir'][_0x38d1b0(0xfc)]+')'));const _0x53a10d=_0x54f52c['cookie'][_0x38d1b0(0x118)]?a103_0x5dda35[_0x38d1b0(0x13e)](_0x38d1b0(0x126)+_0x54f52c[_0x38d1b0(0x15a)][_0x38d1b0(0x118)][_0x38d1b0(0xe2)]+')'):a103_0x5dda35[_0x38d1b0(0x158)](_0x38d1b0(0x142));console[_0x38d1b0(0x156)](_0x38d1b0(0x135)+_0x53a10d+'\x20\x20'+a103_0x5dda35['gray']('('+_0x54f52c[_0x38d1b0(0x15a)][_0x38d1b0(0xfc)]+')'));const _0x37951e=_0x54f52c[_0x38d1b0(0xfa)][_0x38d1b0(0x118)]?a103_0x5dda35[_0x38d1b0(0x13e)]('(set,\x20length='+_0x54f52c[_0x38d1b0(0xfa)]['value'][_0x38d1b0(0xe2)]+')'):a103_0x5dda35[_0x38d1b0(0x158)](_0x38d1b0(0x142));console[_0x38d1b0(0x156)](_0x38d1b0(0xed)+_0x37951e+'\x20\x20'+a103_0x5dda35[_0x38d1b0(0x158)]('('+_0x54f52c[_0x38d1b0(0xfa)][_0x38d1b0(0xfc)]+')'));}}console[_0x38d1b0(0x156)](),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0xfd)](_0x38d1b0(0x11b))),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0x158)](_0x38d1b0(0x161)[_0x38d1b0(0x107)](0x1e)));_0x272a6f?console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a103_0x5dda35[_0x38d1b0(0x102)](_0x38d1b0(0x140))):(console[_0x38d1b0(0x156)](_0x38d1b0(0x13b)+getActiveRegion()),console[_0x38d1b0(0x156)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log']('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x38d1b0(0x156)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x38d1b0(0x156)]('\x20\x20skillDomain:\x20\x20\x20\x20\x20'+getSkillDomain()),console[_0x38d1b0(0x156)](_0x38d1b0(0xe0)+getKbDomain()),console['log'](_0x38d1b0(0xfb)+getAppDomain()));console[_0x38d1b0(0x156)](),console['log'](a103_0x5dda35[_0x38d1b0(0xfd)](_0x38d1b0(0x136))),console[_0x38d1b0(0x156)](a103_0x5dda35[_0x38d1b0(0x158)]('\x20\x20─'['repeat'](0x1e)));if(_0x272a6f)console['log'](_0x38d1b0(0x11d)+a103_0x5dda35[_0x38d1b0(0x109)](_0x38d1b0(0x10b)));else{if(_0x4f406a){const _0x29927b=await getIsSessionValid();console[_0x38d1b0(0x156)](_0x38d1b0(0x11d)+(_0x29927b?a103_0x5dda35[_0x38d1b0(0x13e)]('✓\x20Valid'):a103_0x5dda35[_0x38d1b0(0x102)]('✗\x20Expired')));}else console['log'](_0x38d1b0(0x11d)+a103_0x5dda35[_0x38d1b0(0x102)]('✗\x20Not\x20logged\x20in'));}return console[_0x38d1b0(0x156)](),{'ok':!![]};}function a103_0x5d44(){const _0x1c4b26=['\x20\x20Auth','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','hasOwnProperty','66123iBzIeH','(missing)','\x20\x20region:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','installedPath','(not\x20found)','green','\x20config\x20delete\x20region\x20--global','Unavailable\x20until\x20routing\x20configuration\x20is\x20repaired','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','(none)','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','state','\x20\x20Config\x20Files','message','Global','stringify','ignored\x20in\x20','\x20config\x20delete\x20routing','appcode','toLowerCase','\x20\x20app\x20locale:\x20\x20\x20\x20\x20\x20','format','read','112JhoqLc','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','platform','empty','log','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','gray','appCode','cookie','status','8919180nABYEC','string','137098hrZhlc','\x20\x20Repair\x20global:\x20\x20\x20','\x20\x20Installed\x20Path:\x20\x20','\x20\x20─','1424928azHxIx','inherit','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Repair\x20project:\x20\x20','\x20\x20kbDomain:\x20\x20\x20\x20\x20\x20\x20\x20','raw','length','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','\x20config\x20delete\x20region','current','region','49XRfOhm','globalConfig','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','skillVersion','\x20\x20\x20\x20accessKey:\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','locale','global','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','pageSize','✗\x20Invalid\x20JSON','slice','\x20\x20Skill\x20Version:\x20\x20\x20','✗\x20Invalid\x20','currentApp','verbose','accessKey','\x20\x20appDomain:\x20\x20\x20\x20\x20\x20\x20','source','bold','\x20←\x20current','\x20\x20Merged\x20Config','version','present','red','projectConfig','Project','1338592duYHSa','(not\x20set)','repeat','\x20\x20Config\x20JSON','yellow','apiDir','Not\x20checked\x20until\x20routing\x20configuration\x20is\x20repaired','join','\x20config\x20delete\x20inherit\x20--global','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','includes','\x20\x20Repair\x20project:\x20\x20\x20','\x20\x20Routing\x20Configuration','prototype','\x20config\x20delete\x20inherit','122nTFCPD','filter','\x20\x20Legacy\x20inherit:\x20\x20\x20','354880DYtVBr','value','(default)','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','call','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(default)','\x20\x20explicitAppName:\x20','routing','\x20\x20Apps','doctor','16777OyVXkU','env','label','(set,\x20length=','repairCommand','3660yGAJrq','(set\x20via\x20file,\x20length=','\x20\x20Package\x20Version:\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20+\x20','apps','defaultApp','25Pxvgnd','padEnd','reason','319rJDTel','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'];a103_0x5d44=function(){return _0x1c4b26;};return a103_0x5d44();}export const doctorDefinition={'service':a103_0x4dc4c9(0x122),'command':'check','description':a103_0x4dc4c9(0x157),'risk':a103_0x4dc4c9(0x151),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a104_0x160065=a104_0x1d3f;(function(_0x350e7c,_0x33f8ca){const _0x5e585f=a104_0x1d3f,_0xc98d0c=_0x350e7c();while(!![]){try{const _0x3551c0=-parseInt(_0x5e585f(0x18c))/0x1*(parseInt(_0x5e585f(0x192))/0x2)+parseInt(_0x5e585f(0x18e))/0x3*(-parseInt(_0x5e585f(0x186))/0x4)+parseInt(_0x5e585f(0x18a))/0x5+parseInt(_0x5e585f(0x17a))/0x6+parseInt(_0x5e585f(0x175))/0x7*(parseInt(_0x5e585f(0x190))/0x8)+-parseInt(_0x5e585f(0x196))/0x9+parseInt(_0x5e585f(0x194))/0xa;if(_0x3551c0===_0x33f8ca)break;else _0xc98d0c['push'](_0xc98d0c['shift']());}catch(_0xc81094){_0xc98d0c['push'](_0xc98d0c['shift']());}}}(a104_0x530a,0xaf178));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':a104_0x160065(0x18d),'type':a104_0x160065(0x184),'required':!![],'description':a104_0x160065(0x177)},FILEPATH_FLAG={'name':'filepath','type':a104_0x160065(0x184),'required':!![],'description':a104_0x160065(0x180)},DOWNLOAD_FLAG={'name':a104_0x160065(0x173),'type':a104_0x160065(0x179),'description':a104_0x160065(0x187)},LONG_TERM_FLAG={'name':a104_0x160065(0x183),'type':a104_0x160065(0x179),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function a104_0x530a(){const _0x35729b=['POST','Path\x20to\x20the\x20local\x20file\x20to\x20upload','/smartapi/common/uploadFile','boolean','3484482eRKIHS','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','Preview:\x20upload\x20','filepath','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','bool','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','\x20to\x20development\x20app\x20','upload','long-term','string','filePath','32ORSZsv','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','Uploaded\x20file:\x20','read','4693140vXWqLj','File','428qObGvk','file','151131OYcFYH','validation','168848qgoGdM','path','4122SLVKhl','str','2752980ywLTvl','appCode','2120391KHsiNu','trim','download','query-url','147GLZjlq'];a104_0x530a=function(){return _0x35729b;};return a104_0x530a();}function requireFilePath(_0x2565c9){const _0x246f2e=a104_0x160065,_0x21eca0=_0x2565c9[_0x246f2e(0x197)]();if(!_0x21eca0)throw CliErrors[_0x246f2e(0x18f)]('filePath\x20is\x20required.');return _0x21eca0;}const fileUpload={'service':a104_0x160065(0x18d),'command':a104_0x160065(0x182),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a104_0x160065(0x189),'flags':[FILE_FLAG],async 'dryRun'(_0x257e74){const _0x4bd4d5=a104_0x160065,_0x14d1cf=requireDevelopmentUploadFile(_0x257e74[_0x4bd4d5(0x193)](_0x4bd4d5(0x18d)),_0x4bd4d5(0x18b));return{'method':_0x4bd4d5(0x176),'url':_0x4bd4d5(0x178),'body':{'appCode':_0x257e74[_0x4bd4d5(0x195)],'multipart':{'file':_0x14d1cf}},'description':_0x4bd4d5(0x17c)+_0x14d1cf[_0x4bd4d5(0x191)]+_0x4bd4d5(0x181)+_0x257e74[_0x4bd4d5(0x195)]};},async 'execute'(_0x3c1893){const _0x3f27ed=a104_0x160065,_0x3b9cb7=requireDevelopmentUploadFile(_0x3c1893['str'](_0x3f27ed(0x18d)),'File'),_0x41ea2e=await uploadDevelopmentFile(_0x3c1893[_0x3f27ed(0x195)],_0x3b9cb7[_0x3f27ed(0x191)]);return{'ok':!![],'data':_0x41ea2e,'message':_0x41ea2e[_0x3f27ed(0x185)]?_0x3f27ed(0x188)+_0x41ea2e[_0x3f27ed(0x185)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':_0x3f27ed(0x17e)};}},fileQueryUrl={'service':a104_0x160065(0x18d),'command':a104_0x160065(0x174),'description':a104_0x160065(0x17b),'risk':a104_0x160065(0x189),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x4b58c9){const _0xdcd63f=a104_0x160065,_0x54b470=requireFilePath(_0x4b58c9[_0xdcd63f(0x193)](_0xdcd63f(0x17d))),_0x3c0c89=await queryDevelopmentFileUrl(_0x54b470,{'download':_0x4b58c9[_0xdcd63f(0x17f)](_0xdcd63f(0x173)),'longTerm':_0x4b58c9[_0xdcd63f(0x17f)](_0xdcd63f(0x183))});return{'ok':!![],'data':_0x3c0c89};}};function a104_0x1d3f(_0x32a042,_0x2c9ea1){_0x32a042=_0x32a042-0x173;const _0x530afe=a104_0x530a();let _0x1d3f3a=_0x530afe[_0x32a042];return _0x1d3f3a;}export const fileDefinitions=[fileUpload,fileQueryUrl];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a105_0x3760(){const _0x5154a4=['6403168dfTbxA','33765fStWHA','1979244cOkrBh','Current\x20Instant\x20API\x20policy\x20revision\x20','Get\x20the\x20current\x20effective\x20Instant\x20API\x20policy','2054468VDQIZI','policyRelativePath','5637478lTBTVa','6TQxbCS','appCode','instant-api-policy','current','6649908TQrDtv','5516UIfkjO','560JCOFZg'];a105_0x3760=function(){return _0x5154a4;};return a105_0x3760();}const a105_0x57a41e=a105_0x1afb;(function(_0x2f8a13,_0x5f1d6c){const _0x4704da=a105_0x1afb,_0x535970=_0x2f8a13();while(!![]){try{const _0x1efcd3=-parseInt(_0x4704da(0x190))/0x1*(parseInt(_0x4704da(0x191))/0x2)+-parseInt(_0x4704da(0x19a))/0x3*(-parseInt(_0x4704da(0x197))/0x4)+-parseInt(_0x4704da(0x193))/0x5+parseInt(_0x4704da(0x18f))/0x6+-parseInt(_0x4704da(0x199))/0x7+parseInt(_0x4704da(0x192))/0x8+parseInt(_0x4704da(0x194))/0x9;if(_0x1efcd3===_0x5f1d6c)break;else _0x535970['push'](_0x535970['shift']());}catch(_0x178590){_0x535970['push'](_0x535970['shift']());}}}(a105_0x3760,0xc322d));import{getCurrentInstantApiPolicy}from'../../core/api-client.js';function a105_0x1afb(_0x2a2697,_0x314097){_0x2a2697=_0x2a2697-0x18c;const _0x37606d=a105_0x3760();let _0x1afb05=_0x37606d[_0x2a2697];return _0x1afb05;}import{loadInstantApiPolicyLocalConfig}from'../../core/instant-api-policy/config.js';import{projectCurrentPolicy}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyCurrent={'service':a105_0x57a41e(0x18d),'command':a105_0x57a41e(0x18e),'description':a105_0x57a41e(0x196),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x29089c){const _0x4609aa=a105_0x57a41e,_0x423cec=loadInstantApiPolicyLocalConfig(_0x29089c[_0x4609aa(0x18c)]),_0x568b0d=await getCurrentInstantApiPolicy(_0x29089c[_0x4609aa(0x18c)]);return{'ok':!![],'data':{'appCode':_0x29089c[_0x4609aa(0x18c)],'configured':_0x568b0d!==null,'filePath':_0x423cec['policyFilePath'],'relativePath':_0x423cec[_0x4609aa(0x198)],'policy':projectCurrentPolicy(_0x568b0d)},'message':_0x568b0d?_0x4609aa(0x195)+_0x568b0d['revision']:'Instant\x20API\x20policy\x20is\x20not\x20configured\x20for\x20'+_0x29089c['appCode']};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x4cb4f1,_0x408c62){const _0x28ba64=a106_0x4e21,_0x4dc1fd=_0x4cb4f1();while(!![]){try{const _0x35970d=-parseInt(_0x28ba64(0x184))/0x1+-parseInt(_0x28ba64(0x188))/0x2*(parseInt(_0x28ba64(0x180))/0x3)+-parseInt(_0x28ba64(0x17f))/0x4*(-parseInt(_0x28ba64(0x181))/0x5)+-parseInt(_0x28ba64(0x17e))/0x6+-parseInt(_0x28ba64(0x183))/0x7*(parseInt(_0x28ba64(0x186))/0x8)+parseInt(_0x28ba64(0x187))/0x9*(parseInt(_0x28ba64(0x182))/0xa)+parseInt(_0x28ba64(0x185))/0xb;if(_0x35970d===_0x408c62)break;else _0x4dc1fd['push'](_0x4dc1fd['shift']());}catch(_0x8248ce){_0x4dc1fd['push'](_0x4dc1fd['shift']());}}}(a106_0x4a68,0xb3d5d));function a106_0x4e21(_0x3eb504,_0x19f369){_0x3eb504=_0x3eb504-0x17e;const _0x4a6838=a106_0x4a68();let _0x4e21ea=_0x4a6838[_0x3eb504];return _0x4e21ea;}import{instantApiPolicyInit}from'../../commands/instant-api-policy/init.js';import{instantApiPolicyCurrent}from'../../commands/instant-api-policy/current.js';import{instantApiPolicyPull}from'../../commands/instant-api-policy/pull.js';import{instantApiPolicyValidate}from'../../commands/instant-api-policy/validate.js';import{instantApiPolicyPublish}from'../../commands/instant-api-policy/publish.js';import{instantApiPolicyRevisions}from'../../commands/instant-api-policy/revisions.js';import{instantApiPolicyRevision}from'../../commands/instant-api-policy/revision.js';function a106_0x4a68(){const _0x1ba6bf=['6734035eSOiGZ','16HjNBUY','63MXlwJw','747434KqGeuc','4741038LUJmTB','1321744XjiWiQ','3gpJyiz','20llfblc','1790290UQaFfI','1624210GIkyFA','822577XrxIiE'];a106_0x4a68=function(){return _0x1ba6bf;};return a106_0x4a68();}import{instantApiPolicyRollback}from'../../commands/instant-api-policy/rollback.js';export const instantApiPolicyDefinitions=[instantApiPolicyInit,instantApiPolicyCurrent,instantApiPolicyPull,instantApiPolicyValidate,instantApiPolicyPublish,instantApiPolicyRevisions,instantApiPolicyRevision,instantApiPolicyRollback];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a107_0x4cf710=a107_0x1404;(function(_0xf9ac5c,_0x1ff4ba){const _0x303e73=a107_0x1404,_0x183aea=_0xf9ac5c();while(!![]){try{const _0x5a304b=parseInt(_0x303e73(0x14d))/0x1+parseInt(_0x303e73(0x13a))/0x2+-parseInt(_0x303e73(0x13f))/0x3+-parseInt(_0x303e73(0x145))/0x4+parseInt(_0x303e73(0x139))/0x5+parseInt(_0x303e73(0x144))/0x6*(-parseInt(_0x303e73(0x141))/0x7)+parseInt(_0x303e73(0x13d))/0x8*(parseInt(_0x303e73(0x14f))/0x9);if(_0x5a304b===_0x1ff4ba)break;else _0x183aea['push'](_0x183aea['shift']());}catch(_0xb1daa0){_0x183aea['push'](_0x183aea['shift']());}}}(a107_0x1fca,0x5837a));function a107_0x1404(_0x278652,_0x22e9a4){_0x278652=_0x278652-0x137;const _0x1fca95=a107_0x1fca();let _0x14047c=_0x1fca95[_0x278652];return _0x14047c;}function a107_0x1fca(){const _0x21f9b2=['appCode','Replaced','policyRelativePath','instant-api-policy','init','write','allow','365657PHFZqy','Create\x20the\x20fixed\x20local\x20Instant\x20API\x20policy\x20file','1011897obDmvn','str','Kept','bool','1886575HjCBBY','36862BRDxem','\x20Instant\x20API\x20policy\x20file\x20for\x20','string','8NpnfnV','Default\x20action\x20when\x20no\x20dataset/API\x20rule\x20matches','624039UoBSwv','action','7gRzLhk','Created','default-action','20676czSWCA','1204156GZpxpL'];a107_0x1fca=function(){return _0x21f9b2;};return a107_0x1fca();}import{createDefaultInstantApiPolicyConfig,loadInstantApiPolicyLocalConfig,writeInstantApiPolicyConfigFile}from'../../core/instant-api-policy/config.js';import{FORCE_FLAG,requireForceConfirmation}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyInit={'service':a107_0x4cf710(0x149),'command':a107_0x4cf710(0x14a),'description':a107_0x4cf710(0x14e),'risk':a107_0x4cf710(0x14b),'requiresAuth':![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'default-action','type':a107_0x4cf710(0x13c),'enum':[a107_0x4cf710(0x14c),'deny'],'default':a107_0x4cf710(0x14c),'description':a107_0x4cf710(0x13e)},FORCE_FLAG],async 'validate'(_0x521f52){requireForceConfirmation(_0x521f52);},async 'execute'(_0x37b8f1){const _0x505f37=a107_0x4cf710;requireForceConfirmation(_0x37b8f1);const _0x6707bf=_0x37b8f1[_0x505f37(0x150)](_0x505f37(0x143))==='deny'?'deny':_0x505f37(0x14c),_0x3cb227=loadInstantApiPolicyLocalConfig(_0x37b8f1[_0x505f37(0x146)]),_0x395233=createDefaultInstantApiPolicyConfig(_0x37b8f1[_0x505f37(0x146)],_0x6707bf),_0x32ed72=await writeInstantApiPolicyConfigFile(_0x3cb227,_0x395233,{'force':_0x37b8f1[_0x505f37(0x138)]('force')}),_0x1c5ffd={'created':_0x505f37(0x142),'overwritten':_0x505f37(0x147),'unchanged':_0x505f37(0x137)}[_0x32ed72[_0x505f37(0x140)]];return{'ok':!![],'data':{'operation':_0x505f37(0x14a),'selector':{'appCode':_0x37b8f1['appCode']},'filePath':_0x3cb227['policyFilePath'],'relativePath':_0x3cb227[_0x505f37(0x148)],'action':_0x32ed72['action'],'config':_0x395233},'message':_0x1c5ffd+_0x505f37(0x13b)+_0x37b8f1[_0x505f37(0x146)]};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a108_0x3a905c=a108_0x30c4;function a108_0x30c4(_0x405df4,_0xfdeb87){_0x405df4=_0x405df4-0x122;const _0x517f99=a108_0x517f();let _0x30c447=_0x517f99[_0x405df4];return _0x30c447;}(function(_0x27e121,_0x4b1a1b){const _0x275c2e=a108_0x30c4,_0x58441e=_0x27e121();while(!![]){try{const _0x50a7c3=-parseInt(_0x275c2e(0x140))/0x1+-parseInt(_0x275c2e(0x145))/0x2+-parseInt(_0x275c2e(0x143))/0x3*(-parseInt(_0x275c2e(0x144))/0x4)+parseInt(_0x275c2e(0x13e))/0x5+-parseInt(_0x275c2e(0x14a))/0x6+-parseInt(_0x275c2e(0x132))/0x7*(parseInt(_0x275c2e(0x146))/0x8)+parseInt(_0x275c2e(0x13d))/0x9;if(_0x50a7c3===_0x4b1a1b)break;else _0x58441e['push'](_0x58441e['shift']());}catch(_0x1db496){_0x58441e['push'](_0x58441e['shift']());}}}(a108_0x517f,0xc8ec4));import{getCurrentInstantApiPolicy,isPlatformTransportFailure,publishInstantApiPolicy,validateInstantApiPolicy}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedRevision,CHANGE_SUMMARY_FLAG,EXPECTED_REVISION_FLAG,expectedRevisionWarnings,INSTANT_API_POLICY_BASE_PATH,mutationLookupCommand,projectCurrentPolicy,readChangeSummary,readExpectedRevision,readFixedPolicy,RUNTIME_CACHE_WARNING}from'../../commands/instant-api-policy/shared.js';function a108_0x517f(){const _0x52b2c5=['appCode','Current\x20policy\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20publish.','84246rsCMpF','48PTMoTu','1318798uHDVgb','1384YPjBPG','config','`;\x20do\x20not\x20resubmit\x20automatically.','all','6446934RnqcRe','normalizedConfig','instant_api_policy_publish_outcome_unknown','Publish\x20the\x20fixed\x20local\x20policy\x20as\x20a\x20new\x20active\x20revision','instant_api_policy_publish_verification_failed','push','POST','configHash','/publish','revision','publish','Publish\x20an\x20application-wide\x20Instant\x20API\x20allow,\x20deny,\x20or\x20Backend\x20Function\x20routing\x20policy.','local','Published\x20Instant\x20API\x20policy\x20revision\x20','changeSummary','policyRelativePath','before','17451XXOwvj','cause','validation','policyFilePath','Publish\x20response\x20was\x20unavailable;\x20current-policy\x20readback\x20proved\x20the\x20new\x20revision\x20without\x20resubmitting.','instant_api_policy_publish_verification_unavailable','expectedRevision','verified','planned','defineProperty','Inspect\x20with\x20`','12310524xpZtNE','6968065Rktpms','high-risk-write','110276XXQeOq'];a108_0x517f=function(){return _0x52b2c5;};return a108_0x517f();}import{instantApiPolicyError}from'../../core/instant-api-policy/config.js';async function preparePublish(_0x1cb092){const _0x2b7e64=a108_0x30c4,{local:_0x429247,config:_0x25dde2}=await readFixedPolicy(_0x1cb092),_0x5cb9ec=readChangeSummary(_0x1cb092),_0x134ed0=readExpectedRevision(_0x1cb092),[_0x2a2919,_0x2d39e2]=await Promise[_0x2b7e64(0x149)]([getCurrentInstantApiPolicy(_0x1cb092[_0x2b7e64(0x141)]),validateInstantApiPolicy({'appCode':_0x1cb092['appCode'],'config':_0x25dde2})]);return assertExpectedRevision(_0x2a2919,_0x134ed0),{'local':_0x429247,'config':_0x25dde2,'changeSummary':_0x5cb9ec,'expectedRevision':_0x134ed0,'before':_0x2a2919,'validation':_0x2d39e2};}export const instantApiPolicyPublish={'service':'instant-api-policy','command':'publish','description':a108_0x3a905c(0x124),'risk':a108_0x3a905c(0x13f),'requiresAppCode':!![],'structuredErrors':!![],'confirmationDescription':a108_0x3a905c(0x12c),'flags':[CHANGE_SUMMARY_FLAG,EXPECTED_REVISION_FLAG],async 'validate'(_0x32969b){readChangeSummary(_0x32969b),readExpectedRevision(_0x32969b);},async 'dryRun'(_0x5a7a01){const _0x5a2354=a108_0x3a905c,_0x3ef815=await preparePublish(_0x5a7a01);return asDryRunResult({'operation':_0x5a2354(0x12b),'selector':{'appCode':_0x5a7a01[_0x5a2354(0x141)]},'before':projectCurrentPolicy(_0x3ef815['before']),'after':{'revision':_0x3ef815[_0x5a2354(0x131)]?_0x3ef815[_0x5a2354(0x131)][_0x5a2354(0x12a)]+0x1:0x1,'configHash':_0x3ef815[_0x5a2354(0x134)][_0x5a2354(0x128)],'config':_0x3ef815[_0x5a2354(0x134)][_0x5a2354(0x122)]},'filePath':_0x3ef815[_0x5a2354(0x12d)]['policyFilePath'],'relativePath':_0x3ef815[_0x5a2354(0x12d)][_0x5a2354(0x130)],'dryRun':!![],'backend':{'method':_0x5a2354(0x127),'path':INSTANT_API_POLICY_BASE_PATH+'/publish'},'warnings':expectedRevisionWarnings(_0x3ef815[_0x5a2354(0x138)]),'verification':{'status':_0x5a2354(0x13a),'expectedRevision':_0x3ef815[_0x5a2354(0x138)]??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},{'method':_0x5a2354(0x127),'url':INSTANT_API_POLICY_BASE_PATH+'/publish'});},async 'execute'(_0x2190ca){const _0x46aba2=a108_0x3a905c,_0x14365a=await preparePublish(_0x2190ca);let _0x45e129=![];try{await publishInstantApiPolicy({'appCode':_0x2190ca[_0x46aba2(0x141)],'config':_0x14365a[_0x46aba2(0x147)],..._0x14365a[_0x46aba2(0x12f)]?{'changeSummary':_0x14365a[_0x46aba2(0x12f)]}:{}});}catch(_0x53e22f){if(!isPlatformTransportFailure(_0x53e22f))throw _0x53e22f;_0x45e129=!![];}let _0x2eec48;try{_0x2eec48=await getCurrentInstantApiPolicy(_0x2190ca['appCode']);}catch(_0x3c01f6){const _0x3cf3bd=instantApiPolicyError(_0x45e129?_0x46aba2(0x123):_0x46aba2(0x137),'The\x20publish\x20request\x20was\x20sent,\x20but\x20the\x20current\x20policy\x20could\x20not\x20be\x20verified.',_0x46aba2(0x13c)+mutationLookupCommand()+_0x46aba2(0x148));Object[_0x46aba2(0x13b)](_0x3cf3bd,_0x46aba2(0x133),{'value':_0x3c01f6,'enumerable':![]});throw _0x3cf3bd;}const _0x45ae8b=_0x2eec48&&(_0x14365a['before']===null||_0x2eec48['revision']>_0x14365a[_0x46aba2(0x131)]['revision']),_0x5cc053=_0x2eec48?.['configHash']===_0x14365a[_0x46aba2(0x134)][_0x46aba2(0x128)];if(!_0x2eec48||!_0x45ae8b||!_0x5cc053)throw instantApiPolicyError(_0x45e129?_0x46aba2(0x123):_0x46aba2(0x125),_0x46aba2(0x142),_0x46aba2(0x13c)+mutationLookupCommand()+_0x46aba2(0x148));const _0x3dd3e3=[...expectedRevisionWarnings(_0x14365a[_0x46aba2(0x138)]),RUNTIME_CACHE_WARNING];return _0x45e129&&_0x3dd3e3[_0x46aba2(0x126)](_0x46aba2(0x136)),{'ok':!![],'data':{'operation':_0x46aba2(0x12b),'selector':{'appCode':_0x2190ca[_0x46aba2(0x141)]},'before':projectCurrentPolicy(_0x14365a['before']),'after':projectCurrentPolicy(_0x2eec48),'filePath':_0x14365a['local'][_0x46aba2(0x135)],'relativePath':_0x14365a[_0x46aba2(0x12d)][_0x46aba2(0x130)],'dryRun':![],'backend':{'method':_0x46aba2(0x127),'path':INSTANT_API_POLICY_BASE_PATH+_0x46aba2(0x129)},'warnings':_0x3dd3e3,'verification':{'status':_0x46aba2(0x139),'recoveredAfterUnknownResponse':_0x45e129,'expectedRevision':_0x14365a[_0x46aba2(0x138)]??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},'message':_0x46aba2(0x12e)+_0x2eec48[_0x46aba2(0x12a)]};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a109_0x570211=a109_0xa1d2;(function(_0x49b2fe,_0x41f24a){const _0xdacaa=a109_0xa1d2,_0x4c5e88=_0x49b2fe();while(!![]){try{const _0x53a281=parseInt(_0xdacaa(0x142))/0x1+parseInt(_0xdacaa(0x130))/0x2*(-parseInt(_0xdacaa(0x131))/0x3)+parseInt(_0xdacaa(0x13e))/0x4+parseInt(_0xdacaa(0x13f))/0x5*(parseInt(_0xdacaa(0x135))/0x6)+-parseInt(_0xdacaa(0x13b))/0x7+parseInt(_0xdacaa(0x139))/0x8*(-parseInt(_0xdacaa(0x133))/0x9)+parseInt(_0xdacaa(0x136))/0xa;if(_0x53a281===_0x41f24a)break;else _0x4c5e88['push'](_0x4c5e88['shift']());}catch(_0x465db8){_0x4c5e88['push'](_0x4c5e88['shift']());}}}(a109_0xfa61,0x1dfc0));function a109_0xa1d2(_0x122847,_0x2e8065){_0x122847=_0x122847-0x130;const _0xfa6138=a109_0xfa61();let _0xa1d220=_0xfa6138[_0x122847];return _0xa1d220;}function a109_0xfa61(){const _0x3054c6=['5897330zEnSSJ','pull','Pull\x20the\x20current\x20effective\x20policy\x20into\x20the\x20fixed\x20local\x20file','16VQdUGX','configHash','1485071wwwtxI','action','policyFilePath','29944GWacLe','175iovVrt','Kept','revision','76878pVnYWo','config','instant_api_policy_not_configured','appCode','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20to\x20create\x20a\x20local\x20policy\x20draft.','write','force','4mJlMOE','365991UPvGyJ','bool','1027863FRwWGb','policyRelativePath','22848uJdcjm'];a109_0xfa61=function(){return _0x3054c6;};return a109_0xfa61();}import{getCurrentInstantApiPolicy}from'../../core/api-client.js';import{instantApiPolicyError,loadInstantApiPolicyLocalConfig,writeInstantApiPolicyConfigFile}from'../../core/instant-api-policy/config.js';import{FORCE_FLAG,requireForceConfirmation}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyPull={'service':'instant-api-policy','command':'pull','description':a109_0x570211(0x138),'risk':a109_0x570211(0x147),'requiresAppCode':!![],'structuredErrors':!![],'flags':[FORCE_FLAG],async 'validate'(_0x25d16e){requireForceConfirmation(_0x25d16e);},async 'execute'(_0xb2438){const _0xdea714=a109_0x570211;requireForceConfirmation(_0xb2438);const _0x32c6a7=await getCurrentInstantApiPolicy(_0xb2438['appCode']);if(!_0x32c6a7)throw instantApiPolicyError(_0xdea714(0x144),'Instant\x20API\x20policy\x20is\x20not\x20configured\x20for\x20'+_0xb2438['appCode']+'.',_0xdea714(0x146));const _0x2e8efe=loadInstantApiPolicyLocalConfig(_0xb2438[_0xdea714(0x145)]),_0x2b682f=await writeInstantApiPolicyConfigFile(_0x2e8efe,_0x32c6a7[_0xdea714(0x143)],{'force':_0xb2438[_0xdea714(0x132)](_0xdea714(0x148))});return{'ok':!![],'data':{'operation':_0xdea714(0x137),'selector':{'appCode':_0xb2438[_0xdea714(0x145)],'revision':_0x32c6a7[_0xdea714(0x141)]},'filePath':_0x2e8efe[_0xdea714(0x13d)],'relativePath':_0x2e8efe[_0xdea714(0x134)],'action':_0x2b682f[_0xdea714(0x13c)],'configHash':_0x32c6a7[_0xdea714(0x13a)]},'message':(_0x2b682f[_0xdea714(0x13c)]==='unchanged'?_0xdea714(0x140):'Pulled')+'\x20Instant\x20API\x20policy\x20revision\x20'+_0x32c6a7['revision']};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a110_0x39ff(){const _0x32b02a=['2CREwIB','531965pLGwws','176uJTjyK','640423GKljFd','10rxjpti','6978006SiqFfa','837944ytbLGS','revision','instant-api-policy','Loaded\x20Instant\x20API\x20policy\x20revision\x20','991410TxkoXW','read','Get\x20one\x20immutable\x20Instant\x20API\x20policy\x20revision','3909gvlTWs','10109745oEkEiy'];a110_0x39ff=function(){return _0x32b02a;};return a110_0x39ff();}const a110_0x2ceca6=a110_0x41e4;function a110_0x41e4(_0xf4a589,_0x41dbd6){_0xf4a589=_0xf4a589-0x1c0;const _0x39ffeb=a110_0x39ff();let _0x41e4e6=_0x39ffeb[_0xf4a589];return _0x41e4e6;}(function(_0xf8462f,_0x15b92f){const _0x3558ad=a110_0x41e4,_0x660af2=_0xf8462f();while(!![]){try{const _0x8281a7=-parseInt(_0x3558ad(0x1c9))/0x1*(-parseInt(_0x3558ad(0x1c6))/0x2)+parseInt(_0x3558ad(0x1c4))/0x3*(parseInt(_0x3558ad(0x1c8))/0x4)+parseInt(_0x3558ad(0x1c7))/0x5+-parseInt(_0x3558ad(0x1c1))/0x6+-parseInt(_0x3558ad(0x1cb))/0x7+-parseInt(_0x3558ad(0x1cc))/0x8+parseInt(_0x3558ad(0x1c5))/0x9*(parseInt(_0x3558ad(0x1ca))/0xa);if(_0x8281a7===_0x15b92f)break;else _0x660af2['push'](_0x660af2['shift']());}catch(_0x8dc24d){_0x660af2['push'](_0x660af2['shift']());}}}(a110_0x39ff,0xa1489));import{getInstantApiPolicyRevision}from'../../core/api-client.js';import{projectRevisionDetail,readRevision,REVISION_FLAG}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyRevision={'service':a110_0x2ceca6(0x1ce),'command':a110_0x2ceca6(0x1cd),'description':a110_0x2ceca6(0x1c3),'risk':a110_0x2ceca6(0x1c2),'requiresAppCode':!![],'structuredErrors':!![],'flags':[REVISION_FLAG],async 'validate'(_0xcbc24a){readRevision(_0xcbc24a);},async 'execute'(_0x5cac09){const _0x68bab8=a110_0x2ceca6,_0x4b816a=readRevision(_0x5cac09),_0x23d390=await getInstantApiPolicyRevision(_0x5cac09['appCode'],_0x4b816a);return{'ok':!![],'data':{'revision':projectRevisionDetail(_0x23d390)},'message':_0x68bab8(0x1c0)+_0x4b816a};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a111_0x49acb8=a111_0x1563;(function(_0xa3b3c6,_0x4cb5fc){const _0x18d7b9=a111_0x1563,_0x4787f2=_0xa3b3c6();while(!![]){try{const _0x5c7111=parseInt(_0x18d7b9(0x17d))/0x1*(-parseInt(_0x18d7b9(0x185))/0x2)+-parseInt(_0x18d7b9(0x17f))/0x3+-parseInt(_0x18d7b9(0x181))/0x4*(-parseInt(_0x18d7b9(0x184))/0x5)+parseInt(_0x18d7b9(0x180))/0x6*(-parseInt(_0x18d7b9(0x179))/0x7)+-parseInt(_0x18d7b9(0x182))/0x8*(-parseInt(_0x18d7b9(0x17b))/0x9)+-parseInt(_0x18d7b9(0x186))/0xa*(parseInt(_0x18d7b9(0x17a))/0xb)+parseInt(_0x18d7b9(0x178))/0xc;if(_0x5c7111===_0x4cb5fc)break;else _0x4787f2['push'](_0x4787f2['shift']());}catch(_0x5b2751){_0x4787f2['push'](_0x4787f2['shift']());}}}(a111_0x1a23,0xe10de));function a111_0x1563(_0x5112bc,_0x450d0a){_0x5112bc=_0x5112bc-0x175;const _0x1a2344=a111_0x1a23();let _0x15630b=_0x1a2344[_0x5112bc];return _0x15630b;}function a111_0x1a23(){const _0x4415b9=['36KUeAxm','12232yHZiqc','105408xiHDjs','List\x20immutable\x20Instant\x20API\x20policy\x20revisions','890HNlIEg','906fZsdkV','10QOmlWB','revisions','Found\x20','length','20094420GGUrCA','1251082TZJhQw','10970003RgakYO','1152VZoLnK','appCode','1282uFaYGJ','read','999570IlTiFg'];a111_0x1a23=function(){return _0x4415b9;};return a111_0x1a23();}import{listInstantApiPolicyRevisions}from'../../core/api-client.js';import{projectRevisionSummary}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyRevisions={'service':'instant-api-policy','command':a111_0x49acb8(0x175),'description':a111_0x49acb8(0x183),'risk':a111_0x49acb8(0x17e),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x42b522){const _0x4f86c3=a111_0x49acb8,_0xa96f0c=await listInstantApiPolicyRevisions(_0x42b522[_0x4f86c3(0x17c)]);return{'ok':!![],'data':{'appCode':_0x42b522[_0x4f86c3(0x17c)],'total':_0xa96f0c[_0x4f86c3(0x177)],'revisions':_0xa96f0c['map'](projectRevisionSummary)},'message':_0x4f86c3(0x176)+_0xa96f0c[_0x4f86c3(0x177)]+'\x20Instant\x20API\x20policy\x20revision(s)'};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a112_0x2c8442=a112_0x5dd9;function a112_0x5dd9(_0x5b6763,_0x508e5d){_0x5b6763=_0x5b6763-0xf4;const _0x51eb0c=a112_0x51eb();let _0x5dd9b3=_0x51eb0c[_0x5b6763];return _0x5dd9b3;}(function(_0x1510f3,_0x2823ff){const _0x2866d2=a112_0x5dd9,_0x8f5c=_0x1510f3();while(!![]){try{const _0x1e89ec=-parseInt(_0x2866d2(0xfd))/0x1*(parseInt(_0x2866d2(0xf6))/0x2)+parseInt(_0x2866d2(0x104))/0x3+parseInt(_0x2866d2(0xfe))/0x4+parseInt(_0x2866d2(0x118))/0x5*(parseInt(_0x2866d2(0x114))/0x6)+parseInt(_0x2866d2(0x116))/0x7*(-parseInt(_0x2866d2(0xfa))/0x8)+-parseInt(_0x2866d2(0xf5))/0x9*(-parseInt(_0x2866d2(0x11a))/0xa)+parseInt(_0x2866d2(0x115))/0xb*(parseInt(_0x2866d2(0x10e))/0xc);if(_0x1e89ec===_0x2823ff)break;else _0x8f5c['push'](_0x8f5c['shift']());}catch(_0x4d0b1c){_0x8f5c['push'](_0x8f5c['shift']());}}}(a112_0x51eb,0xd0efa));import{getCurrentInstantApiPolicy,getInstantApiPolicyRevision,isPlatformTransportFailure,rollbackInstantApiPolicy}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a112_0x51eb(){const _0x3f9e24=['/rollback','rollback','all','planned','configHash','instant_api_policy_rollback_verification_failed','cause','changeSummary','appCode','108wqhzgJ','Rolled\x20Instant\x20API\x20policy\x20revision\x20','expectedRevision','Inspect\x20with\x20`','target','Restore\x20an\x20application-wide\x20Instant\x20API\x20policy\x20from\x20immutable\x20history\x20as\x20a\x20new\x20revision.','6tSTONE','930259JPzSZZ','51114NojOUH','Current\x20policy\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20rollback.','361770WMulam','`;\x20do\x20not\x20resubmit\x20automatically.','10HAKTks','Restore\x20a\x20historical\x20policy\x20as\x20a\x20new\x20active\x20revision','before','2301309HXvDhO','66SePfRI','\x20forward\x20to\x20revision\x20','revision','The\x20rollback\x20request\x20was\x20sent,\x20but\x20the\x20current\x20policy\x20could\x20not\x20be\x20verified.','1112xUeaRd','POST','verified','27205RBKWQw','6564620PubWCK','instant_api_policy_rollback_verification_unavailable','defineProperty','instant_api_policy_rollback_outcome_unknown','instant_api_policy_not_configured','high-risk-write','114642YRRNcI'];a112_0x51eb=function(){return _0x3f9e24;};return a112_0x51eb();}import{instantApiPolicyError}from'../../core/instant-api-policy/config.js';import{assertExpectedRevision,CHANGE_SUMMARY_FLAG,EXPECTED_REVISION_FLAG,expectedRevisionWarnings,INSTANT_API_POLICY_BASE_PATH,mutationLookupCommand,projectCurrentPolicy,projectRevisionDetail,readChangeSummary,readExpectedRevision,readRevision,REVISION_FLAG,RUNTIME_CACHE_WARNING}from'../../commands/instant-api-policy/shared.js';async function prepareRollback(_0x5e90ca){const _0x5c73d9=a112_0x5dd9,_0x57a498=readRevision(_0x5e90ca),_0x55d0fc=readChangeSummary(_0x5e90ca),_0x2b6836=readExpectedRevision(_0x5e90ca),[_0x1b936c,_0x39cd45]=await Promise[_0x5c73d9(0x107)]([getCurrentInstantApiPolicy(_0x5e90ca[_0x5c73d9(0x10d)]),getInstantApiPolicyRevision(_0x5e90ca['appCode'],_0x57a498)]);if(!_0x1b936c)throw instantApiPolicyError(_0x5c73d9(0x102),'Instant\x20API\x20policy\x20is\x20not\x20configured\x20for\x20'+_0x5e90ca['appCode']+'.');return assertExpectedRevision(_0x1b936c,_0x2b6836),{'revision':_0x57a498,'changeSummary':_0x55d0fc,'expectedRevision':_0x2b6836,'before':_0x1b936c,'target':_0x39cd45};}export const instantApiPolicyRollback={'service':'instant-api-policy','command':a112_0x2c8442(0x106),'description':a112_0x2c8442(0x11b),'risk':a112_0x2c8442(0x103),'requiresAppCode':!![],'structuredErrors':!![],'confirmationDescription':a112_0x2c8442(0x113),'flags':[REVISION_FLAG,CHANGE_SUMMARY_FLAG,EXPECTED_REVISION_FLAG],async 'validate'(_0x45fca6){readRevision(_0x45fca6),readChangeSummary(_0x45fca6),readExpectedRevision(_0x45fca6);},async 'dryRun'(_0x136a76){const _0x183dfe=a112_0x2c8442,_0x275229=await prepareRollback(_0x136a76);return asDryRunResult({'operation':_0x183dfe(0x106),'selector':{'appCode':_0x136a76[_0x183dfe(0x10d)],'sourceRevision':_0x275229[_0x183dfe(0xf8)]},'before':projectCurrentPolicy(_0x275229[_0x183dfe(0xf4)]),'after':{'revision':_0x275229[_0x183dfe(0xf4)][_0x183dfe(0xf8)]+0x1,'sourceRevision':projectRevisionDetail(_0x275229[_0x183dfe(0x112)])},'dryRun':!![],'backend':{'method':_0x183dfe(0xfb),'path':INSTANT_API_POLICY_BASE_PATH+_0x183dfe(0x105)},'warnings':expectedRevisionWarnings(_0x275229[_0x183dfe(0x110)]),'verification':{'status':_0x183dfe(0x108),'expectedRevision':_0x275229[_0x183dfe(0x110)]??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},{'method':_0x183dfe(0xfb),'url':INSTANT_API_POLICY_BASE_PATH+_0x183dfe(0x105)});},async 'execute'(_0x50cb8e){const _0x44cece=a112_0x2c8442,_0x28f81e=await prepareRollback(_0x50cb8e);let _0x34e20b=![];try{await rollbackInstantApiPolicy({'appCode':_0x50cb8e['appCode'],'revision':_0x28f81e[_0x44cece(0xf8)],..._0x28f81e[_0x44cece(0x10c)]?{'changeSummary':_0x28f81e[_0x44cece(0x10c)]}:{}});}catch(_0x12b3a5){if(!isPlatformTransportFailure(_0x12b3a5))throw _0x12b3a5;_0x34e20b=!![];}let _0x4f08bc;try{_0x4f08bc=await getCurrentInstantApiPolicy(_0x50cb8e[_0x44cece(0x10d)]);}catch(_0x14cc84){const _0x5ccea9=instantApiPolicyError(_0x34e20b?_0x44cece(0x101):_0x44cece(0xff),_0x44cece(0xf9),_0x44cece(0x111)+mutationLookupCommand()+_0x44cece(0x119));Object[_0x44cece(0x100)](_0x5ccea9,_0x44cece(0x10b),{'value':_0x14cc84,'enumerable':![]});throw _0x5ccea9;}const _0x100249=_0x4f08bc&&_0x4f08bc[_0x44cece(0xf8)]>_0x28f81e['before'][_0x44cece(0xf8)],_0x4f37d2=_0x4f08bc?.[_0x44cece(0x109)]===_0x28f81e[_0x44cece(0x112)][_0x44cece(0x109)];if(!_0x4f08bc||!_0x100249||!_0x4f37d2)throw instantApiPolicyError(_0x34e20b?_0x44cece(0x101):_0x44cece(0x10a),_0x44cece(0x117),_0x44cece(0x111)+mutationLookupCommand()+_0x44cece(0x119));const _0x44f1c8=[...expectedRevisionWarnings(_0x28f81e[_0x44cece(0x110)]),RUNTIME_CACHE_WARNING];return _0x34e20b&&_0x44f1c8['push']('Rollback\x20response\x20was\x20unavailable;\x20current-policy\x20readback\x20proved\x20the\x20new\x20revision\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':'rollback','selector':{'appCode':_0x50cb8e[_0x44cece(0x10d)],'sourceRevision':_0x28f81e[_0x44cece(0xf8)]},'before':projectCurrentPolicy(_0x28f81e[_0x44cece(0xf4)]),'after':projectCurrentPolicy(_0x4f08bc),'dryRun':![],'backend':{'method':_0x44cece(0xfb),'path':INSTANT_API_POLICY_BASE_PATH+_0x44cece(0x105)},'warnings':_0x44f1c8,'verification':{'status':_0x44cece(0xfc),'recoveredAfterUnknownResponse':_0x34e20b,'expectedRevision':_0x28f81e[_0x44cece(0x110)]??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},'message':_0x44cece(0x10f)+_0x28f81e[_0x44cece(0xf8)]+_0x44cece(0xf7)+_0x4f08bc[_0x44cece(0xf8)]};}};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { InstantApiPolicy, InstantApiPolicyConfig, InstantApiPolicyRevision } from "../../core/api-client.js";
|
|
2
|
+
import { loadInstantApiPolicyLocalConfig } from "../../core/instant-api-policy/config.js";
|
|
3
|
+
import type { RuntimeContext } from "../../framework/types.js";
|
|
4
|
+
export declare const INSTANT_API_POLICY_BASE_PATH = "/smartapi/instant-api-policy";
|
|
5
|
+
export declare const RUNTIME_CACHE_WARNING = "Runtime instances may take up to 30 seconds to observe the new active policy.";
|
|
6
|
+
export declare const NON_ATOMIC_EXPECTED_REVISION_WARNING = "--expected-revision is a non-atomic read-before-write assertion; the server mutation contract has no revision predicate.";
|
|
7
|
+
export declare const FORCE_FLAG: {
|
|
8
|
+
name: string;
|
|
9
|
+
type: "boolean";
|
|
10
|
+
default: boolean;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const CHANGE_SUMMARY_FLAG: {
|
|
14
|
+
name: string;
|
|
15
|
+
type: "string";
|
|
16
|
+
required: boolean;
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const REVISION_FLAG: {
|
|
20
|
+
name: string;
|
|
21
|
+
type: "number";
|
|
22
|
+
required: boolean;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const EXPECTED_REVISION_FLAG: {
|
|
26
|
+
name: string;
|
|
27
|
+
type: "number";
|
|
28
|
+
required: boolean;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
export declare function requireForceConfirmation(ctx: RuntimeContext): void;
|
|
32
|
+
export declare function readChangeSummary(ctx: RuntimeContext): string | undefined;
|
|
33
|
+
export declare function readRevision(ctx: RuntimeContext): number;
|
|
34
|
+
export declare function readExpectedRevision(ctx: RuntimeContext): number | undefined;
|
|
35
|
+
export declare function assertExpectedRevision(current: InstantApiPolicy | null, expectedRevision: number | undefined): void;
|
|
36
|
+
export declare function readFixedPolicy(ctx: RuntimeContext): Promise<{
|
|
37
|
+
local: ReturnType<typeof loadInstantApiPolicyLocalConfig>;
|
|
38
|
+
config: InstantApiPolicyConfig;
|
|
39
|
+
}>;
|
|
40
|
+
export declare function projectCurrentPolicy(policy: InstantApiPolicy | null): {
|
|
41
|
+
id: number;
|
|
42
|
+
appCode: string;
|
|
43
|
+
revision: number;
|
|
44
|
+
configHash: string;
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
config: InstantApiPolicyConfig;
|
|
47
|
+
createUserId: string | null;
|
|
48
|
+
updateUserId: string | null;
|
|
49
|
+
gmtCreate: string | null;
|
|
50
|
+
gmtModified: string | null;
|
|
51
|
+
} | null;
|
|
52
|
+
export declare function projectRevisionSummary(revision: InstantApiPolicyRevision): {
|
|
53
|
+
id: number;
|
|
54
|
+
policyId: number;
|
|
55
|
+
appCode: string;
|
|
56
|
+
revision: number;
|
|
57
|
+
configHash: string;
|
|
58
|
+
changeType: string;
|
|
59
|
+
changeSummary: string | null;
|
|
60
|
+
operatorId: string | null;
|
|
61
|
+
gmtCreate: string | null;
|
|
62
|
+
version: string;
|
|
63
|
+
defaultAction: string;
|
|
64
|
+
ruleCount: number;
|
|
65
|
+
};
|
|
66
|
+
export declare function projectRevisionDetail(revision: InstantApiPolicyRevision): {
|
|
67
|
+
config: InstantApiPolicyConfig;
|
|
68
|
+
id: number;
|
|
69
|
+
policyId: number;
|
|
70
|
+
appCode: string;
|
|
71
|
+
revision: number;
|
|
72
|
+
configHash: string;
|
|
73
|
+
changeType: string;
|
|
74
|
+
changeSummary: string | null;
|
|
75
|
+
operatorId: string | null;
|
|
76
|
+
gmtCreate: string | null;
|
|
77
|
+
version: string;
|
|
78
|
+
defaultAction: string;
|
|
79
|
+
ruleCount: number;
|
|
80
|
+
};
|
|
81
|
+
export declare function expectedRevisionWarnings(expectedRevision: number | undefined): string[];
|
|
82
|
+
export declare function mutationLookupCommand(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a113_0x5db168=a113_0x5ea3;(function(_0x326af6,_0x448fda){const _0x3a1957=a113_0x5ea3,_0x5c5b03=_0x326af6();while(!![]){try{const _0x1d3f2d=parseInt(_0x3a1957(0xdb))/0x1+-parseInt(_0x3a1957(0xad))/0x2*(-parseInt(_0x3a1957(0xc8))/0x3)+parseInt(_0x3a1957(0xca))/0x4*(-parseInt(_0x3a1957(0xc9))/0x5)+-parseInt(_0x3a1957(0xd5))/0x6+parseInt(_0x3a1957(0xb5))/0x7*(-parseInt(_0x3a1957(0xab))/0x8)+parseInt(_0x3a1957(0xaa))/0x9+-parseInt(_0x3a1957(0xc7))/0xa*(-parseInt(_0x3a1957(0xb1))/0xb);if(_0x1d3f2d===_0x448fda)break;else _0x5c5b03['push'](_0x5c5b03['shift']());}catch(_0x4a7362){_0x5c5b03['push'](_0x5c5b03['shift']());}}}(a113_0x2515,0x84c8d));import{instantApiPolicyError,loadInstantApiPolicyLocalConfig,readInstantApiPolicyConfigFile}from'../../core/instant-api-policy/config.js';export const INSTANT_API_POLICY_BASE_PATH=a113_0x5db168(0xa6);export const RUNTIME_CACHE_WARNING='Runtime\x20instances\x20may\x20take\x20up\x20to\x2030\x20seconds\x20to\x20observe\x20the\x20new\x20active\x20policy.';export const NON_ATOMIC_EXPECTED_REVISION_WARNING=a113_0x5db168(0xd2);export const FORCE_FLAG={'name':'force','type':a113_0x5db168(0xbe),'default':![],'description':a113_0x5db168(0xc4)};export const CHANGE_SUMMARY_FLAG={'name':a113_0x5db168(0xb6),'type':a113_0x5db168(0xc5),'required':![],'description':a113_0x5db168(0xd0)};function a113_0x2515(){const _0x4ae056=['7240806bLsrTE','4117472uKyKRw','The\x20current\x20Instant\x20API\x20policy\x20revision\x20changed\x20before\x20mutation.','4CVvZCr','changeSummary','updateUserId','Positive\x20published\x20policy\x20revision','58916wlRWdf','instant_api_policy_change_summary_invalid','instant_api_policy_revision_mismatch','yes','14iIMCUH','change-summary','instantApi',';\x20current\x20revision\x20is\x20','Expected\x20revision\x20','enabled','configHash','version','trim','boolean','policyId','--change-summary\x20cannot\x20exceed\x202000\x20characters.','gmtCreate','Review\x20the\x20existing\x20file,\x20then\x20rerun\x20with\x20--force\x20--yes.','--expected-revision\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','Replace\x20an\x20existing\x20fixed\x20policy\x20file;\x20requires\x20--yes','string','instant_api_policy_force_confirmation_required','1400SuZNlp','1524282BLRZnD','325290jvxGzZ','20fUBtda','expected-revision','rules','--revision\x20must\x20be\x20a\x20positive\x20safe\x20integer.','config','NaN','Audit\x20summary\x20for\x20this\x20policy\x20revision\x20(maximum\x202000\x20characters)','isSafeInteger','--expected-revision\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20mutation\x20contract\x20has\x20no\x20revision\x20predicate.','num','operatorId','6377028rmPOBa','rabetbase\x20instant-api-policy\x20current\x20--format\x20compress','length','appCode','number','force','390819ZHzlsN','/smartapi/instant-api-policy','bool','revision','defaults'];a113_0x2515=function(){return _0x4ae056;};return a113_0x2515();}export const REVISION_FLAG={'name':a113_0x5db168(0xa8),'type':a113_0x5db168(0xd9),'required':!![],'description':a113_0x5db168(0xb0)};export const EXPECTED_REVISION_FLAG={'name':a113_0x5db168(0xcb),'type':a113_0x5db168(0xd9),'required':![],'description':'Non-atomic\x20assertion\x20for\x20the\x20current\x20revision;\x20use\x200\x20when\x20unconfigured'};export function requireForceConfirmation(_0x355d69){const _0x274b44=a113_0x5db168;if(!_0x355d69[_0x274b44(0xa7)](_0x274b44(0xda))||_0x355d69[_0x274b44(0xa7)](_0x274b44(0xb4)))return;throw instantApiPolicyError(_0x274b44(0xc6),'--force\x20requires\x20--yes\x20because\x20it\x20replaces\x20the\x20fixed\x20local\x20policy\x20file.',_0x274b44(0xc2));}function a113_0x5ea3(_0x5acef0,_0x5a50a8){_0x5acef0=_0x5acef0-0xa6;const _0x25155b=a113_0x2515();let _0x5ea3cf=_0x25155b[_0x5acef0];return _0x5ea3cf;}export function readChangeSummary(_0x2e9b99){const _0xebfbee=a113_0x5db168,_0x25457a=_0x2e9b99['str'](_0xebfbee(0xb6))[_0xebfbee(0xbd)]();if(!_0x25457a)return undefined;if(_0x25457a[_0xebfbee(0xd7)]>0x7d0)throw instantApiPolicyError(_0xebfbee(0xb2),_0xebfbee(0xc0));return _0x25457a;}export function readRevision(_0x19e20b){const _0x4f7ce5=a113_0x5db168,_0x42330d=_0x19e20b['num'](_0x4f7ce5(0xa8),Number[_0x4f7ce5(0xcf)]);if(!Number[_0x4f7ce5(0xd1)](_0x42330d)||_0x42330d<=0x0)throw instantApiPolicyError('instant_api_policy_revision_invalid',_0x4f7ce5(0xcd));return _0x42330d;}export function readExpectedRevision(_0x5c659b){const _0x12a4b9=a113_0x5db168;if(_0x5c659b['flag'](_0x12a4b9(0xcb))===undefined)return undefined;const _0x48ffb2=_0x5c659b[_0x12a4b9(0xd3)]('expected-revision',Number['NaN']);if(!Number[_0x12a4b9(0xd1)](_0x48ffb2)||_0x48ffb2<0x0)throw instantApiPolicyError('instant_api_policy_expected_revision_invalid',_0x12a4b9(0xc3));return _0x48ffb2;}export function assertExpectedRevision(_0x1a21aa,_0x5e73bb){const _0x450611=a113_0x5db168;if(_0x5e73bb===undefined)return;const _0x3bb666=_0x1a21aa?.[_0x450611(0xa8)]??0x0;if(_0x3bb666!==_0x5e73bb)throw instantApiPolicyError(_0x450611(0xb3),_0x450611(0xac),_0x450611(0xb9)+_0x5e73bb+_0x450611(0xb8)+_0x3bb666+'.\x20Run\x20current\x20and\x20review\x20before\x20retrying.');}export async function readFixedPolicy(_0x2b67c0){const _0x2afb94=a113_0x5db168,_0x26706f=loadInstantApiPolicyLocalConfig(_0x2b67c0[_0x2afb94(0xd8)]),_0x186016=await readInstantApiPolicyConfigFile(_0x26706f);return{'local':_0x26706f,'config':_0x186016};}export function projectCurrentPolicy(_0x11816b){const _0x2e074a=a113_0x5db168;if(!_0x11816b)return null;return{'id':_0x11816b['id'],'appCode':_0x11816b['appCode'],'revision':_0x11816b['revision'],'configHash':_0x11816b[_0x2e074a(0xbb)],'enabled':_0x11816b[_0x2e074a(0xba)],'config':_0x11816b['config'],'createUserId':_0x11816b['createUserId']??null,'updateUserId':_0x11816b[_0x2e074a(0xaf)]??null,'gmtCreate':_0x11816b[_0x2e074a(0xc1)]??null,'gmtModified':_0x11816b['gmtModified']??null};}export function projectRevisionSummary(_0x31f1c4){const _0x434ca8=a113_0x5db168;return{'id':_0x31f1c4['id'],'policyId':_0x31f1c4[_0x434ca8(0xbf)],'appCode':_0x31f1c4[_0x434ca8(0xd8)],'revision':_0x31f1c4['revision'],'configHash':_0x31f1c4[_0x434ca8(0xbb)],'changeType':_0x31f1c4['changeType'],'changeSummary':_0x31f1c4[_0x434ca8(0xae)]??null,'operatorId':_0x31f1c4[_0x434ca8(0xd4)]??null,'gmtCreate':_0x31f1c4['gmtCreate']??null,'version':_0x31f1c4[_0x434ca8(0xce)][_0x434ca8(0xbc)],'defaultAction':_0x31f1c4[_0x434ca8(0xce)][_0x434ca8(0xa9)][_0x434ca8(0xb7)],'ruleCount':_0x31f1c4[_0x434ca8(0xce)][_0x434ca8(0xcc)]?.[_0x434ca8(0xd7)]??0x0};}export function projectRevisionDetail(_0x28b222){const _0x3fb405=a113_0x5db168;return{...projectRevisionSummary(_0x28b222),'config':_0x28b222[_0x3fb405(0xce)]};}export function expectedRevisionWarnings(_0x4cb8b0){return _0x4cb8b0===undefined?[]:[NON_ATOMIC_EXPECTED_REVISION_WARNING];}export function mutationLookupCommand(){const _0x58d045=a113_0x5db168;return _0x58d045(0xd6);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a114_0x165391=a114_0x3483;function a114_0x3483(_0x22eb3c,_0x11bcd6){_0x22eb3c=_0x22eb3c-0x166;const _0x4051a0=a114_0x4051();let _0x34834b=_0x4051a0[_0x22eb3c];return _0x34834b;}function a114_0x4051(){const _0x116892=['664614GGSoJx','policyRelativePath','appCode','validate','12eoGkUF','59541YHKKUR','8678152jjuump','76dnBaqk','166xODJlH','valid','16543450sShbzk','8563dFFPvw','170GTMCOz','normalizedConfig','Validated\x20Instant\x20API\x20policy\x20for\x20','instant-api-policy','configHash','2610972atZNca','1948490FawBYx'];a114_0x4051=function(){return _0x116892;};return a114_0x4051();}(function(_0x24bc29,_0x574c78){const _0x2d280d=a114_0x3483,_0x52bbc5=_0x24bc29();while(!![]){try{const _0x377e1a=parseInt(_0x2d280d(0x16c))/0x1*(parseInt(_0x2d280d(0x169))/0x2)+-parseInt(_0x2d280d(0x166))/0x3*(-parseInt(_0x2d280d(0x168))/0x4)+-parseInt(_0x2d280d(0x173))/0x5*(-parseInt(_0x2d280d(0x178))/0x6)+-parseInt(_0x2d280d(0x172))/0x7+-parseInt(_0x2d280d(0x167))/0x8+-parseInt(_0x2d280d(0x174))/0x9*(parseInt(_0x2d280d(0x16d))/0xa)+parseInt(_0x2d280d(0x16b))/0xb;if(_0x377e1a===_0x574c78)break;else _0x52bbc5['push'](_0x52bbc5['shift']());}catch(_0x398d8a){_0x52bbc5['push'](_0x52bbc5['shift']());}}}(a114_0x4051,0xa0a65));import{validateInstantApiPolicy}from'../../core/api-client.js';import{INSTANT_API_POLICY_BASE_PATH,readFixedPolicy}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyValidate={'service':a114_0x165391(0x170),'command':a114_0x165391(0x177),'description':'Validate\x20the\x20fixed\x20local\x20policy\x20without\x20publishing','risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x356947){const _0x107699=a114_0x165391,{local:_0xe4cb7e,config:_0x10823b}=await readFixedPolicy(_0x356947),_0xb4ac04=await validateInstantApiPolicy({'appCode':_0x356947[_0x107699(0x176)],'config':_0x10823b});return{'ok':!![],'data':{'operation':'validate','selector':{'appCode':_0x356947['appCode']},'filePath':_0xe4cb7e['policyFilePath'],'relativePath':_0xe4cb7e[_0x107699(0x175)],'valid':_0xb4ac04[_0x107699(0x16a)],'configHash':_0xb4ac04[_0x107699(0x171)],'normalizedConfig':_0xb4ac04[_0x107699(0x16e)],'backend':{'method':'POST','path':INSTANT_API_POLICY_BASE_PATH+'/validate'}},'message':_0x107699(0x16f)+_0x356947[_0x107699(0x176)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x58a63b,_0x1684cb){const _0x449346=a115_0x44f7,_0x24cd95=_0x58a63b();while(!![]){try{const _0x3b92ae=parseInt(_0x449346(0x1a7))/0x1*(-parseInt(_0x449346(0x1a8))/0x2)+-parseInt(_0x449346(0x1ad))/0x3+parseInt(_0x449346(0x1a3))/0x4+-parseInt(_0x449346(0x1a9))/0x5*(parseInt(_0x449346(0x1a4))/0x6)+parseInt(_0x449346(0x1ac))/0x7*(-parseInt(_0x449346(0x1ab))/0x8)+parseInt(_0x449346(0x1aa))/0x9+parseInt(_0x449346(0x1a5))/0xa*(parseInt(_0x449346(0x1a6))/0xb);if(_0x3b92ae===_0x1684cb)break;else _0x24cd95['push'](_0x24cd95['shift']());}catch(_0x51db1c){_0x24cd95['push'](_0x24cd95['shift']());}}}(a115_0x4b2f,0x2fb68));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a115_0x44f7(_0x19f535,_0x56b35c){_0x19f535=_0x19f535-0x1a3;const _0x4b2fff=a115_0x4b2f();let _0x44f708=_0x4b2fff[_0x19f535];return _0x44f708;}function a115_0x4b2f(){const _0x79cd72=['10CGHjdq','3955193FXNTVt','367729JmJNHp','2jQnYyp','25rDPrOP','2022489MVCyZt','64pGCSqM','37471Vkclse','137112SNkWEU','965340DiGcSm','208716tSlFhu'];a115_0x4b2f=function(){return _0x79cd72;};return a115_0x4b2f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a116_0x5b6a41=a116_0x3445;(function(_0x552626,_0x4846e5){const _0x15cd01=a116_0x3445,_0x379005=_0x552626();while(!![]){try{const _0x2944fa=-parseInt(_0x15cd01(0x16f))/0x1*(-parseInt(_0x15cd01(0x17a))/0x2)+parseInt(_0x15cd01(0x17b))/0x3*(-parseInt(_0x15cd01(0x176))/0x4)+-parseInt(_0x15cd01(0x165))/0x5*(-parseInt(_0x15cd01(0x17c))/0x6)+-parseInt(_0x15cd01(0x162))/0x7+-parseInt(_0x15cd01(0x17e))/0x8+parseInt(_0x15cd01(0x188))/0x9*(-parseInt(_0x15cd01(0x179))/0xa)+parseInt(_0x15cd01(0x177))/0xb*(parseInt(_0x15cd01(0x183))/0xc);if(_0x2944fa===_0x4846e5)break;else _0x379005['push'](_0x379005['shift']());}catch(_0x58e1b1){_0x379005['push'](_0x379005['shift']());}}}(a116_0x2b7b,0x2dcd5));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a116_0x5b6a41(0x173);function a116_0x3445(_0xa66e10,_0x143af7){_0xa66e10=_0xa66e10-0x162;const _0x2b7b2f=a116_0x2b7b();let _0x34459e=_0x2b7b2f[_0xa66e10];return _0x34459e;}const NUDGE_SUPPRESSED_CODES=new Set([a116_0x5b6a41(0x163),'auth_required',a116_0x5b6a41(0x184),'not_in_project',a116_0x5b6a41(0x167),a116_0x5b6a41(0x164),a116_0x5b6a41(0x169),a116_0x5b6a41(0x174)]),defaultWriter=_0x48c8be=>{const _0x4393a2=a116_0x5b6a41;process[_0x4393a2(0x189)][_0x4393a2(0x16b)](_0x48c8be);};export function shouldNudgeForError(_0x277e13,_0x2076f9){const _0x3b4b63=a116_0x5b6a41;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x2076f9[_0x3b4b63(0x16e)]===_0x3b4b63(0x170)&&_0x2076f9[_0x3b4b63(0x182)]===_0x3b4b63(0x16a))return![];if(_0x277e13 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x3b4b63(0x168)](_0x277e13[_0x3b4b63(0x180)]);return!![];}function a116_0x2b7b(){const _0x330582=['910NKPDPn','2gjWwAI','3PBNgtf','6KLMhUI','\x20\x20Set\x20','1438296sENGPj','Hit\x20a\x20','code','\x20bug?\x20Help\x20us\x20fix\x20it:','command','761844TgppGc','config_missing','\x22\x20\x5c','=1\x20to\x20silence\x20this\x20hint.','\x20\x20\x20\x20--title\x20\x22','4383FvPPgK','stderr','2374827sQljsD','cancelled','flag_missing','1079745kbdBSp','replace','unknown_command','has','validation_error','report','write','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','slice','service','75243GPZTGM','issue','\x20issue\x20report\x20\x5c','message','RABETBASE_DISABLE_ISSUE_NUDGE','network_error','trim','192472BRmuAp','88fAoHBM','join'];a116_0x2b7b=function(){return _0x330582;};return a116_0x2b7b();}export function printIssueReportNudgeForError(_0x4c6868,_0x153c66,_0x32fe1b=defaultWriter){if(!shouldNudgeForError(_0x4c6868,_0x153c66))return;const _0xd60a84=buildSuggestedTitle(_0x4c6868,_0x153c66);_0x32fe1b(formatNudge(_0xd60a84));}function buildSuggestedTitle(_0x5b0cd9,_0x1296f9){const _0x7da28a=a116_0x5b6a41,_0x587b59=_0x5b0cd9 instanceof Error?_0x5b0cd9[_0x7da28a(0x172)]:String(_0x5b0cd9),_0x428d38=_0x587b59[_0x7da28a(0x166)](/[\r\n]+/g,'\x20')[_0x7da28a(0x166)](/\s+/g,'\x20')[_0x7da28a(0x175)]()[_0x7da28a(0x16d)](0x0,0x78)[_0x7da28a(0x166)](/"/g,'\x5c\x22'),_0x336c05=CLI_BIN_NAME+'\x20'+_0x1296f9[_0x7da28a(0x16e)]+'\x20'+_0x1296f9[_0x7da28a(0x182)];return _0x428d38['length']>0x0?_0x336c05+':\x20'+_0x428d38:_0x336c05;}function formatNudge(_0x376c47){const _0xbc52b5=a116_0x5b6a41;return['',_0xbc52b5(0x17f)+CLI_BIN_NAME+_0xbc52b5(0x181),'\x20\x20'+CLI_BIN_NAME+_0xbc52b5(0x171),_0xbc52b5(0x187)+_0x376c47+_0xbc52b5(0x185),'\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22',_0xbc52b5(0x16c),_0xbc52b5(0x17d)+NUDGE_OPT_OUT_ENV+_0xbc52b5(0x186),''][_0xbc52b5(0x178)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a117_0x295a(){const _0x18a283=['redactionKinds','POST','issue.title','apiError','4842306frFtJd','170qqWiTf','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','descriptionFilePath','Platform\x20issue\x20reported','description-file','report','descriptionSource:\x20','utf8','5211072VXslHJ','truncated','redacted\x20','cwd','filter','flagMissing','message','Issue\x20description\x20file\x20is\x20empty:\x20','388MiaAXC','validation','descriptionFile:\x20','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','2VnGSmc','str','issue.description_redactions','originalBytes','description','issue','join','808069FePfmT','\x20bytes','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','638226qnNSBr','compress','push','descriptionSource','sanitize','Failed\x20to\x20report\x20platform\x20issue:\x20','redactions:\x20','issue.description_redaction_kinds','string','23925VTpcQx','issue.description_original_bytes','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','length','\x20secret(s):\x20','truncated:\x20original\x20','write','issue.description_truncated','redactionCount','640115yBkUnd','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','title','inline','file','Platform\x20issue\x20reported\x20(','truncated\x20from\x20','1333134HvQbyx','trim'];a117_0x295a=function(){return _0x18a283;};return a117_0x295a();}const a117_0x5201fb=a117_0x47b4;(function(_0x2ffd79,_0x24e640){const _0x196e24=a117_0x47b4,_0x4ee93a=_0x2ffd79();while(!![]){try{const _0x18c039=-parseInt(_0x196e24(0xf3))/0x1+-parseInt(_0x196e24(0xec))/0x2*(parseInt(_0x196e24(0x10f))/0x3)+parseInt(_0x196e24(0xe8))/0x4*(parseInt(_0x196e24(0xff))/0x5)+parseInt(_0x196e24(0xd7))/0x6+-parseInt(_0x196e24(0x108))/0x7+-parseInt(_0x196e24(0xe0))/0x8+parseInt(_0x196e24(0xf6))/0x9*(parseInt(_0x196e24(0xd8))/0xa);if(_0x18c039===_0x24e640)break;else _0x4ee93a['push'](_0x4ee93a['shift']());}catch(_0x49efd3){_0x4ee93a['push'](_0x4ee93a['shift']());}}}(a117_0x295a,0x758b2));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a117_0x5201fb(0xdc);export const issueReport={'service':a117_0x5201fb(0xf1),'command':a117_0x5201fb(0xdd),'description':a117_0x5201fb(0xeb),'risk':a117_0x5201fb(0x105),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a117_0x5201fb(0xf7),'flags':[{'name':a117_0x5201fb(0x10a),'type':a117_0x5201fb(0xfe),'required':!![],'description':'One-line\x20issue\x20summary'},{'name':a117_0x5201fb(0xf0),'type':a117_0x5201fb(0xfe),'description':a117_0x5201fb(0x101)},{'name':DESCRIPTION_FILE_FLAG,'type':a117_0x5201fb(0xfe),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x124e97){const _0x15ff0a=a117_0x5201fb,_0x297ae6=_0x124e97[_0x15ff0a(0xed)](_0x15ff0a(0x10a))[_0x15ff0a(0x110)](),_0x14337e=_0x124e97['str']('description')[_0x15ff0a(0x110)](),_0x4da726=_0x124e97[_0x15ff0a(0xed)](DESCRIPTION_FILE_FLAG)[_0x15ff0a(0x110)]();if(!_0x297ae6)throw CliErrors[_0x15ff0a(0xe5)](_0x15ff0a(0x10a),'Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0x1e03f9=_0x14337e[_0x15ff0a(0x102)]>0x0,_0x4d9408=_0x4da726[_0x15ff0a(0x102)]>0x0;if(_0x1e03f9===_0x4d9408)throw CliErrors[_0x15ff0a(0xe9)]('Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.',_0x15ff0a(0xf5));if(_0x4d9408){const _0xecb66c=resolve(process[_0x15ff0a(0xe3)](),_0x4da726);if(!existsSync(_0xecb66c))throw CliErrors[_0x15ff0a(0xe9)]('File\x20not\x20found:\x20'+_0xecb66c);}},async 'dryRun'(_0xec91c5){const _0x3faff1=a117_0x5201fb,_0x283f90=await prepareIssueReport(_0xec91c5);return{'method':_0x3faff1(0xd4),'url':'otel://'+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x283f90[_0x3faff1(0x10a)],'issue.description':_0x283f90[_0x3faff1(0xf0)],'issue.description_original_bytes':_0x283f90[_0x3faff1(0xfa)][_0x3faff1(0xef)],'issue.description_truncated':_0x283f90['sanitize'][_0x3faff1(0xe1)],'issue.description_redactions':_0x283f90['sanitize'][_0x3faff1(0x107)],'issue.description_redaction_kinds':_0x283f90[_0x3faff1(0xfa)][_0x3faff1(0xd3)][_0x3faff1(0xf2)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter',_0x3faff1(0xde)+_0x283f90[_0x3faff1(0xf9)],_0x283f90[_0x3faff1(0xda)]?_0x3faff1(0xea)+_0x283f90[_0x3faff1(0xda)]:null,_0x283f90[_0x3faff1(0xfa)][_0x3faff1(0xe1)]?_0x3faff1(0x104)+_0x283f90[_0x3faff1(0xfa)][_0x3faff1(0xef)]+_0x3faff1(0xf4):null,_0x283f90[_0x3faff1(0xfa)][_0x3faff1(0x107)]>0x0?_0x3faff1(0xfc)+_0x283f90[_0x3faff1(0xfa)]['redactionCount']+'\x20('+_0x283f90[_0x3faff1(0xfa)][_0x3faff1(0xd3)][_0x3faff1(0xf2)](',\x20')+')':null][_0x3faff1(0xe4)](Boolean)[_0x3faff1(0xf2)]('\x0a')};},async 'execute'(_0x356a56){const _0x354805=a117_0x5201fb,_0xd53652=await prepareIssueReport(_0x356a56);try{await sendPlatformIssueCollectLog({'title':_0xd53652[_0x354805(0x10a)],'description':_0xd53652[_0x354805(0xf0)],'sanitize':{'originalBytes':_0xd53652[_0x354805(0xfa)][_0x354805(0xef)],'truncated':_0xd53652[_0x354805(0xfa)][_0x354805(0xe1)],'redactionCount':_0xd53652[_0x354805(0xfa)][_0x354805(0x107)],'redactionKinds':_0xd53652[_0x354805(0xfa)][_0x354805(0xd3)]}});}catch(_0xd3e6ff){throw CliErrors[_0x354805(0xd6)](_0x354805(0xfb)+(_0xd3e6ff instanceof Error?_0xd3e6ff[_0x354805(0xe6)]:String(_0xd3e6ff)),'Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.');}return{'ok':!![],'message':buildResultMessage(_0xd53652[_0x354805(0xfa)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x354805(0xd5),'issue.description',_0x354805(0x100),_0x354805(0x106),_0x354805(0xee),_0x354805(0xfd)],'issue':{'title':_0xd53652[_0x354805(0x10a)],'descriptionLength':_0xd53652['description']['length'],'descriptionSource':_0xd53652[_0x354805(0xf9)],..._0xd53652[_0x354805(0xda)]?{'descriptionFile':_0xd53652[_0x354805(0xda)]}:{},'sanitize':{'originalBytes':_0xd53652[_0x354805(0xfa)]['originalBytes'],'truncated':_0xd53652[_0x354805(0xfa)]['truncated'],'redactions':_0xd53652[_0x354805(0xfa)][_0x354805(0x107)],'redactionKinds':_0xd53652[_0x354805(0xfa)][_0x354805(0xd3)]}}}};}};function buildResultMessage(_0x4892d8){const _0x4197d8=a117_0x5201fb,_0x3dd6f3=[];return _0x4892d8[_0x4197d8(0xe1)]&&_0x3dd6f3[_0x4197d8(0xf8)](_0x4197d8(0x10e)+_0x4892d8[_0x4197d8(0xef)]+_0x4197d8(0xf4)),_0x4892d8[_0x4197d8(0x107)]>0x0&&_0x3dd6f3['push'](_0x4197d8(0xe2)+_0x4892d8['redactionCount']+_0x4197d8(0x103)+_0x4892d8[_0x4197d8(0xd3)][_0x4197d8(0xf2)](',\x20')),_0x3dd6f3[_0x4197d8(0x102)]===0x0?_0x4197d8(0xdb):_0x4197d8(0x10d)+_0x3dd6f3[_0x4197d8(0xf2)](';\x20')+')';}function a117_0x47b4(_0x47c16a,_0x2248e5){_0x47c16a=_0x47c16a-0xd3;const _0x295a5d=a117_0x295a();let _0x47b479=_0x295a5d[_0x47c16a];return _0x47b479;}async function prepareIssueReport(_0x25c7b4){const _0x327869=a117_0x5201fb,_0x5f3575=_0x25c7b4['str'](_0x327869(0x10a))[_0x327869(0x110)](),_0x170690=_0x25c7b4['str'](_0x327869(0xf0)),_0x11d213=_0x25c7b4[_0x327869(0xed)](DESCRIPTION_FILE_FLAG)[_0x327869(0x110)]();if(!_0x11d213){const _0x264cf4=_0x170690;if(!_0x264cf4['trim']())throw CliErrors[_0x327869(0xe9)]('Issue\x20description\x20cannot\x20be\x20empty.',_0x327869(0x109));const _0x4fd421=sanitizeIssueDescription(_0x264cf4);return{'title':_0x5f3575,'description':_0x4fd421[_0x327869(0xf0)],'descriptionSource':_0x327869(0x10b),'sanitize':_0x4fd421};}const _0x38f667=resolve(process[_0x327869(0xe3)](),_0x11d213),_0x8ca13d=await readFile(_0x38f667,_0x327869(0xdf));if(!_0x8ca13d['trim']())throw CliErrors[_0x327869(0xe9)](_0x327869(0xe7)+_0x38f667,_0x327869(0xd9));const _0x4d83d4=sanitizeIssueDescription(_0x8ca13d);return{'title':_0x5f3575,'description':_0x4d83d4['description'],'descriptionSource':_0x327869(0x10c),'descriptionFilePath':_0x38f667,'sanitize':_0x4d83d4};}
|