@lovrabet/rabetbase-cli 2.5.4-beta.4 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.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/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.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/detail.d.ts +2 -0
- package/lib/commands/app/detail.js +1 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.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/batch-design.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/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.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/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +3 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.d.ts +2 -0
- package/lib/commands/menu/shared/path.js +1 -0
- package/lib/commands/menu/shared/service.d.ts +6 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.d.ts +28 -0
- package/lib/commands/menu/shared/subapp-assets.js +1 -0
- package/lib/commands/menu/shared/sync-core.d.ts +2 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +14 -4
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-status.js +1 -0
- package/lib/commands/menu/subapp-assets-update.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-update.js +1 -0
- 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/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/api-architecture-upgrade.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/feishu-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.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.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 +15 -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/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- 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/page/lr-smart-jsx.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.js +1 -1
- 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 +21 -12
- package/skills/rabetbase/guides/backend-function.md +2 -7
- package/skills/rabetbase/guides/bff-creation-workflow.md +24 -23
- package/skills/rabetbase/guides/host-frontend-integration.md +62 -0
- package/skills/rabetbase/guides/independent-deployment.md +45 -0
- package/skills/rabetbase/guides/troubleshooting.md +9 -1
- package/skills/rabetbase/references/rabetbase-app-detail.md +31 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +2 -2
- package/skills/rabetbase/references/rabetbase-data-list-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +5 -1
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -7
- package/skills/rabetbase/references/rabetbase-menu-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-status.md +19 -0
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-update.md +27 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +40 -14
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -3
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +1 -0
- package/skills/rabetbase.manifest.json +8 -3
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a16_0x5517(_0x1bc8df,_0x503d54){_0x1bc8df=_0x1bc8df-0xbf;var _0x782f0d=a16_0x782f();var _0x5517c5=_0x782f0d[_0x1bc8df];return _0x5517c5;}(function(_0x22a5cc,_0x3093eb){var _0x2add60=a16_0x5517,_0x264712=_0x22a5cc();while(!![]){try{var _0x1b67ee=-parseInt(_0x2add60(0xc1))/0x1+-parseInt(_0x2add60(0xc0))/0x2*(parseInt(_0x2add60(0xc6))/0x3)+parseInt(_0x2add60(0xc2))/0x4*(parseInt(_0x2add60(0xc3))/0x5)+parseInt(_0x2add60(0xc5))/0x6+-parseInt(_0x2add60(0xca))/0x7+-parseInt(_0x2add60(0xcb))/0x8+-parseInt(_0x2add60(0xc7))/0x9*(-parseInt(_0x2add60(0xc9))/0xa);if(_0x1b67ee===_0x3093eb)break;else _0x264712['push'](_0x264712['shift']());}catch(_0x17419b){_0x264712['push'](_0x264712['shift']());}}}(a16_0x782f,0x4eca2));import{unlinkSync,existsSync}from'node:fs';function a16_0x782f(){var _0x3f3cc9=['2379881aGTtqb','2122432Bufeou','log','550uNReLd','634586zmTHbQ','948gTJdXY','5995xiGtCw','!\x20Not\x20logged\x20in','2428614VOqMMr','1242ySEELx','1809ZlPEZW','✓\x20Logged\x20out','49130mEtQBT'];a16_0x782f=function(){return _0x3f3cc9;};return a16_0x782f();}import{cookieFile}from'../auth/constant.js';export function logout(){var _0x2468a8=a16_0x5517;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x2468a8(0xbf)](_0x2468a8(0xc8))):console['log'](_0x2468a8(0xc4));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a17_0x4ffa(_0x4cd322,_0x269bab){_0x4cd322=_0x4cd322-0x17d;const _0x2f0838=a17_0x2f08();let _0x4ffafa=_0x2f0838[_0x4cd322];return _0x4ffafa;}const a17_0x332a68=a17_0x4ffa;(function(_0x2c1c69,_0x5399b4){const _0x5efe86=a17_0x4ffa,_0x541396=_0x2c1c69();while(!![]){try{const _0x5297b8=-parseInt(_0x5efe86(0x180))/0x1*(parseInt(_0x5efe86(0x184))/0x2)+-parseInt(_0x5efe86(0x188))/0x3+parseInt(_0x5efe86(0x181))/0x4*(parseInt(_0x5efe86(0x183))/0x5)+parseInt(_0x5efe86(0x182))/0x6+parseInt(_0x5efe86(0x17e))/0x7*(-parseInt(_0x5efe86(0x17f))/0x8)+parseInt(_0x5efe86(0x187))/0x9+-parseInt(_0x5efe86(0x185))/0xa*(parseInt(_0x5efe86(0x186))/0xb);if(_0x5297b8===_0x5399b4)break;else _0x541396['push'](_0x541396['shift']());}catch(_0x5510fa){_0x541396['push'](_0x541396['shift']());}}}(a17_0x2f08,0x9237d));export const dynamicCliFlags={'enableBffSave':{'type':a17_0x332a68(0x17d)}};function a17_0x2f08(){const _0x2f8a87=['3499984lEIBQF','1pnptwg','4ZEEgFO','6732804gwouwE','4024555woWlKB','451856uisdNi','3150gBdMTi','5742DtGapx','3646017LPpdJV','2716179SKlvMC','boolean','7wisAYg'];a17_0x2f08=function(){return _0x2f8a87;};return a17_0x2f08();}
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a18_0x2854b7=a18_0x4c68;(function(_0x1cf0fd,_0x4566a2){const _0x1c482d=a18_0x4c68,_0x3add49=_0x1cf0fd();while(!![]){try{const _0x3b8d76=-parseInt(_0x1c482d(0xa8))/0x1+parseInt(_0x1c482d(0x9f))/0x2+parseInt(_0x1c482d(0xab))/0x3+parseInt(_0x1c482d(0xa1))/0x4+parseInt(_0x1c482d(0xb3))/0x5*(parseInt(_0x1c482d(0xac))/0x6)+-parseInt(_0x1c482d(0xaa))/0x7+parseInt(_0x1c482d(0xbb))/0x8*(-parseInt(_0x1c482d(0xa2))/0x9);if(_0x3b8d76===_0x4566a2)break;else _0x3add49['push'](_0x3add49['shift']());}catch(_0x181753){_0x3add49['push'](_0x3add49['shift']());}}}(a18_0x155f,0x7493b));import a18_0x3bdaa5 from'meow';import{showHelp}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,resolveRemovedCommand}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{formatCliError}from'./framework/output.js';import{resolveErrorOutputFormat,usesStructuredErrorOutput}from'./framework/error-output.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';function a18_0x155f(){const _0x44d3b9=['error','slice','536GyQoEO','hint','unknownCommand','name','\x0aCancelled.\x0a','global','now','unknown','Hint:\x20','catch','unknown_service','flags','write','581294rTqTcc','cancelled','307400jxYCpZ','52443vNYmJN','help','Unexpected\x20error:','stderr','def','command','581976iAJvUz','code','1024093juyxtI','1520916cmLsjo','84dbXPdF','exitCode','./context.js','defaultCommand','message','service','wildcardDef','257755SCYXBi','validation','format','input','ExitPromptError','log'];a18_0x155f=function(){return _0x44d3b9;};return a18_0x155f();}import{VERSION,GIT_COMMIT,BUILD_TIME}from'./generated/build-info.js';import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';import{printIssueReportNudgeForError}from'./commands/issue/nudge.js';import{assertSupportedCommandFlags}from'./framework/supported-flags.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import('./cli-flags.js'))['dynamicCliFlags'];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a18_0x2854b7(0xc2)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a18_0x2854b7(0xba)](0x0,0xa)+')':VERSION,cli=a18_0x3bdaa5(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});function a18_0x4c68(_0x42d8c1,_0x5bd31b){_0x42d8c1=_0x42d8c1-0x9d;const _0x155f23=a18_0x155f();let _0x4c68e2=_0x155f23[_0x42d8c1];return _0x4c68e2;}registerOtelShutdownOnExit(),await run()[a18_0x2854b7(0xc4)](handleErrorAsync);async function run(){const _0x4ec458=a18_0x2854b7;let _0x259f64=cli[_0x4ec458(0xb6)][0x0],_0x17957e=cli[_0x4ec458(0xb6)][0x1];const _0xdb8b44=cli[_0x4ec458(0x9d)];if(!_0x259f64){await reportCliHelpTrace(_0x4ec458(0xc0)),showHelp();return;}const _0xdb989c=resolveRemovedCommand(_0x259f64,_0x17957e);_0xdb989c&&await handleErrorAsync(CliErrors[_0x4ec458(0xb4)](_0xdb989c[_0x4ec458(0xb0)],_0xdb989c[_0x4ec458(0xbc)]));if(!isKnownService(_0x259f64)){await reportCliHelpTrace(_0x4ec458(0xc5),{'service':_0x259f64}),showHelp();return;}const _0x1e1555=getServiceEntry(_0x259f64);if(!_0x17957e){if(_0xdb8b44[_0x4ec458(0xa3)]){printServiceHelp(_0x259f64);return;}if(_0x1e1555[_0x4ec458(0xaf)])_0x17957e=_0x1e1555[_0x4ec458(0xaf)];else{if(_0x1e1555[_0x4ec458(0xb2)]){const {buildConfigFromFlags:_0x1ea523,initGlobalEnvironment:_0x5229e9}=await import(_0x4ec458(0xae)),_0x298f6c=_0x1ea523(_0xdb8b44);await _0x5229e9(_0x298f6c),await dispatchDeclarative(_0x1e1555[_0x4ec458(0xb2)],_0x259f64,'',[],_0xdb8b44,_0x298f6c);return;}else{printServiceHelp(_0x259f64);return;}}}{let _0x4391c4=findDefinition(_0x259f64,_0x17957e),_0x45d906=cli['input'][_0x4ec458(0xba)](0x2);if(!_0x4391c4){if(_0x1e1555[_0x4ec458(0xb2)]){if(_0xdb8b44[_0x4ec458(0xa3)]){console[_0x4ec458(0xb8)](generateCommandHelp(_0x1e1555[_0x4ec458(0xb2)]));return;}_0x4391c4=_0x1e1555[_0x4ec458(0xb2)],_0x45d906=[_0x17957e,...cli[_0x4ec458(0xb6)][_0x4ec458(0xba)](0x2)];}else{printServiceHelp(_0x259f64),await handleErrorAsync(CliErrors[_0x4ec458(0xbd)](_0x259f64+'\x20'+_0x17957e));return;}}assertSupportedCommandFlags(_0x4391c4,_0xdb8b44);if(_0xdb8b44['help']){console[_0x4ec458(0xb8)](generateCommandHelp(_0x4391c4));return;}const {buildConfigFromFlags:_0x161302,initGlobalEnvironment:_0x48381d,isRoutingRecoveryService:_0x2eee4c}=await import(_0x4ec458(0xae)),_0x3879a7=_0x161302(_0xdb8b44);!_0x2eee4c(_0x259f64)&&await _0x48381d(_0x3879a7),await dispatchDeclarative(_0x4391c4,_0x259f64,_0x17957e,_0x45d906,_0xdb8b44,_0x3879a7);}}async function dispatchDeclarative(_0x451ff6,_0x1781f7,_0x31be8b,_0x54da9a,_0x56116a,_0x45869b){const _0xb60548=a18_0x2854b7,_0x2caa8a=Date[_0xb60548(0xc1)]();let _0x3bcfd9;try{await runCommand(_0x451ff6,createPipelineEnv(_0x45869b,_0x56116a,_0x54da9a));}catch(_0x464865){_0x3bcfd9=_0x464865;}await reportCommandTrace({'service':_0x1781f7,'command':_0x31be8b,'flags':_0x56116a,'durationMs':Date[_0xb60548(0xc1)]()-_0x2caa8a,'error':_0x3bcfd9}),_0x3bcfd9&&await handleErrorAsync(_0x3bcfd9,{'service':_0x1781f7,'command':_0x31be8b,'def':_0x451ff6,'flags':_0x56116a,'defaultFormat':_0x45869b[_0xb60548(0xb5)]});}function printServiceHelp(_0x546440){console['log'](generateServiceHelp(_0x546440));}async function handleErrorAsync(_0x8aeb48,_0x3a0352){const _0x20065f=a18_0x2854b7;if(_0x8aeb48 instanceof Error&&_0x8aeb48[_0x20065f(0xbe)]===_0x20065f(0xb7))return process['stderr'][_0x20065f(0x9e)](_0x20065f(0xbf)),await exitWithOtelShutdown(0x0);if(_0x8aeb48 instanceof CliError){if(_0x8aeb48[_0x20065f(0xa9)]===_0x20065f(0xa0))return process[_0x20065f(0xa5)]['write']('\x0a'+_0x8aeb48['message']+'\x0a'),await exitWithOtelShutdown(0x0);let _0x1f253e=![];_0x3a0352&&usesStructuredErrorOutput(_0x3a0352[_0x20065f(0xa6)])&&(_0x1f253e=formatCliError(_0x8aeb48,{'command':CLI_BIN_NAME+'\x20'+_0x3a0352[_0x20065f(0xa6)][_0x20065f(0xb1)]+'\x20'+_0x3a0352['def'][_0x20065f(0xa7)],'risk':_0x3a0352[_0x20065f(0xa6)]['risk'],'format':resolveErrorOutputFormat(_0x3a0352),'jqFilter':typeof _0x3a0352[_0x20065f(0x9d)]?.['jq']==='string'?_0x3a0352[_0x20065f(0x9d)]['jq']:undefined}));if(!_0x1f253e){console[_0x20065f(0xb9)]('Error:\x20'+_0x8aeb48[_0x20065f(0xb0)]);if(_0x8aeb48['hint'])console[_0x20065f(0xb9)](_0x20065f(0xc3)+_0x8aeb48[_0x20065f(0xbc)]);if(_0x3a0352)printIssueReportNudgeForError(_0x8aeb48,_0x3a0352);}return await exitWithOtelShutdown(_0x8aeb48[_0x20065f(0xad)]);}console['error'](_0x20065f(0xa4),_0x8aeb48);if(_0x3a0352)printIssueReportNudgeForError(_0x8aeb48,_0x3a0352);return await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a19_0x48299f=a19_0x32e0;(function(_0x431628,_0xded9b1){const _0x18ea3f=a19_0x32e0,_0x3766b9=_0x431628();while(!![]){try{const _0x10da8d=-parseInt(_0x18ea3f(0x9f))/0x1+-parseInt(_0x18ea3f(0xaf))/0x2+parseInt(_0x18ea3f(0xa3))/0x3+parseInt(_0x18ea3f(0x84))/0x4+parseInt(_0x18ea3f(0x9a))/0x5+-parseInt(_0x18ea3f(0x7c))/0x6*(parseInt(_0x18ea3f(0x7d))/0x7)+-parseInt(_0x18ea3f(0x7a))/0x8*(-parseInt(_0x18ea3f(0x96))/0x9);if(_0x10da8d===_0xded9b1)break;else _0x3766b9['push'](_0x3766b9['shift']());}catch(_0x55eb91){_0x3766b9['push'](_0x3766b9['shift']());}}}(a19_0x33e8,0xda5e3));import a19_0x14b307 from'ora';function a19_0x32e0(_0x36cfaf,_0x15392d){_0x36cfaf=_0x36cfaf-0x7a;const _0x33e8f4=a19_0x33e8();let _0x32e0df=_0x33e8f4[_0x36cfaf];return _0x32e0df;}import{fetchModelList}from'../../core/api-client.js';import{generateDatasetDocs}from'../../api/api-doc.js';function a19_0x33e8(){const _0x273e7d=['\x20doc(s)\x20failed','\x20doc(s)\x20in\x20','1930076VHZdsm','error','stdout','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','fail','datasetcode','.md','success','Doc\x20generation\x20complete:\x20','appCode','api','filter','string','validation','Invalid\x20--params:\x20','generate','--datasetcode\x20cannot\x20be\x20empty.','isArray','11583738dGYyZA','\x1b[90m*\x20Generating\x20docs\x20for:\x20','join','\x0d\x20\x20[','7697820otMPOD','message','):\x20','str','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','1280691jkRAPm','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','length','must\x20be\x20a\x20JSON\x20object','4946013NfMIbY','!\x20No\x20datasets\x20found.','output','\x20failed','read','trim','datasetCode','\x1b[0m','write','\x20of\x20','...','Doc\x20generation:\x20','2141364bfJZzu','\x20dataset(s)\x1b[0m','cookie','some','\x20file(s)','8rSUIJu','succeed','552JCvOqT','130263mvySwY','object','\x20dataset(s)','Output\x20directory\x20(default:\x20./docs)','params'];a19_0x33e8=function(){return _0x273e7d;};return a19_0x33e8();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export const apiGenerate={'service':a19_0x48299f(0x8e),'command':a19_0x48299f(0x93),'description':'Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','risk':a19_0x48299f(0xa7),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a19_0x48299f(0xa5),'type':a19_0x48299f(0x90),'description':a19_0x48299f(0x80)},{'name':a19_0x48299f(0x89),'type':a19_0x48299f(0x90),'description':'Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for'},{'name':'params','type':'string','description':a19_0x48299f(0xa0)}],async 'execute'(_0x3e4f08){const _0x578458=a19_0x48299f,_0x285cee=_0x3e4f08[_0x578458(0x9d)]('output')||'./docs',_0x30f86a=_0x3e4f08['str']('datasetcode'),_0x33c79a=_0x3e4f08[_0x578458(0x9d)](_0x578458(0x81));let _0x222bc1;if(_0x33c79a)try{_0x222bc1=JSON['parse'](_0x33c79a);if(typeof _0x222bc1!==_0x578458(0x7e)||_0x222bc1===null||Array[_0x578458(0x95)](_0x222bc1))throw new Error(_0x578458(0xa2));}catch(_0x5c1b20){throw CliErrors[_0x578458(0x91)](_0x578458(0x92)+(_0x5c1b20 instanceof Error?_0x5c1b20[_0x578458(0x9b)]:String(_0x5c1b20)),_0x578458(0x87));}let _0x166651;if(_0x30f86a){const _0x2ca333=_0x30f86a['split'](',')['map'](_0x220693=>_0x220693[_0x578458(0xa8)]())[_0x578458(0x8f)](_0x4bd832=>_0x4bd832[_0x578458(0xa1)]>0x0);if(_0x2ca333['length']===0x0)throw CliErrors['validation'](_0x578458(0x94));_0x166651=new Set(_0x2ca333),writeCliSideChannelLine(_0x578458(0x97)+_0x2ca333['join'](',\x20')+_0x578458(0xaa));}const _0x4d7860=a19_0x14b307('Fetching\x20dataset\x20list\x20for\x20'+_0x3e4f08[_0x578458(0x8d)]+_0x578458(0xad))['start']();let _0x6ca84f;try{({configArray:_0x6ca84f}=await fetchModelList(_0x3e4f08[_0x578458(0x8d)],_0x3e4f08[_0x578458(0xb1)]),_0x4d7860[_0x578458(0x7b)]('Fetched\x20'+_0x6ca84f['length']+_0x578458(0x7f)));}catch(_0x20a957){_0x4d7860[_0x578458(0x88)]('Failed\x20to\x20fetch\x20datasets');throw _0x20a957;}if(_0x6ca84f['length']===0x0)return writeCliSideChannelLine(_0x578458(0xa4)),{'ok':!![]};let _0x31ea50=_0x6ca84f;if(_0x166651){_0x31ea50=_0x6ca84f[_0x578458(0x8f)](_0xc1b9c1=>_0x166651['has'](_0xc1b9c1[_0x578458(0xa9)]));const _0x2d05e6=[..._0x166651][_0x578458(0x8f)](_0x170f5f=>!_0x6ca84f[_0x578458(0xb2)](_0x15af8a=>_0x15af8a[_0x578458(0xa9)]===_0x170f5f));_0x2d05e6['length']>0x0&&writeCliSideChannelLine(_0x578458(0x9e)+_0x2d05e6[_0x578458(0x98)](',\x20')+_0x578458(0xaa));if(_0x31ea50['length']===0x0)throw CliErrors[_0x578458(0x91)]('None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20'+[..._0x166651][_0x578458(0x98)](',\x20'));writeCliSideChannelLine('\x1b[90m*\x20Filtered\x20'+_0x31ea50['length']+_0x578458(0xac)+_0x6ca84f[_0x578458(0xa1)]+_0x578458(0xb0));}let _0x376737=0x0;const _0xb4fa5b=await generateDatasetDocs(_0x31ea50,_0x3e4f08[_0x578458(0x8d)],_0x3e4f08[_0x578458(0xb1)],_0x285cee,(_0x41ce0a,_0xc6bef7,_0x1f28e6)=>{const _0x22eee2=_0x578458;_0x376737=_0x41ce0a,process[_0x22eee2(0x86)]['write'](_0x22eee2(0x99)+String(_0x41ce0a)['padStart'](String(_0xc6bef7)[_0x22eee2(0xa1)])+'/'+_0xc6bef7+']\x20'+_0x1f28e6+_0x22eee2(0x8a));},_0x222bc1);if(_0x376737>0x0)process[_0x578458(0x86)][_0x578458(0xab)]('\x0a');const _0x2ed2fc=_0xb4fa5b[_0x578458(0x8f)](_0x830f05=>_0x830f05[_0x578458(0x8b)])[_0x578458(0xa1)],_0x2c2fb2=_0xb4fa5b['filter'](_0x1587a9=>!_0x1587a9[_0x578458(0x8b)])[_0x578458(0xa1)];writeCliSideChannelLine(''),writeCliSideChannelLine('✓\x20Generated\x20'+_0x2ed2fc+_0x578458(0x83)+_0x285cee);if(_0x2c2fb2>0x0){writeCliSideChannelLine('!\x20'+_0x2c2fb2+_0x578458(0x82));for(const _0xca5ae3 of _0xb4fa5b[_0x578458(0x8f)](_0x38cbcc=>!_0x38cbcc[_0x578458(0x8b)])){writeCliSideChannelLine('\x20\x20•\x20'+_0xca5ae3['datasetName']+'\x20('+_0xca5ae3[_0x578458(0xa9)]+_0x578458(0x9c)+_0xca5ae3[_0x578458(0x85)]);}}return{'ok':_0x2c2fb2===0x0,'message':_0x2c2fb2>0x0?_0x578458(0xae)+_0x2ed2fc+'\x20succeeded,\x20'+_0x2c2fb2+_0x578458(0xa6):_0x578458(0x8c)+_0x2ed2fc+_0x578458(0xb3)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29d351,_0x36ecfe){const _0x30dca7=a20_0x5e5c,_0x140665=_0x29d351();while(!![]){try{const _0x1c39a0=parseInt(_0x30dca7(0x1e9))/0x1+-parseInt(_0x30dca7(0x1ef))/0x2+parseInt(_0x30dca7(0x1ed))/0x3*(-parseInt(_0x30dca7(0x1eb))/0x4)+-parseInt(_0x30dca7(0x1e7))/0x5+parseInt(_0x30dca7(0x1e8))/0x6*(parseInt(_0x30dca7(0x1ee))/0x7)+parseInt(_0x30dca7(0x1ec))/0x8+parseInt(_0x30dca7(0x1ea))/0x9*(-parseInt(_0x30dca7(0x1e6))/0xa);if(_0x1c39a0===_0x36ecfe)break;else _0x140665['push'](_0x140665['shift']());}catch(_0x3ac770){_0x140665['push'](_0x140665['shift']());}}}(a20_0x9547,0xa2680));import{apiList}from'../../commands/api/list.js';import{apiPull}from'../../commands/api/pull.js';function a20_0x9547(){const _0x378e8f=['2625448zcXhRP','350LlveZL','71465VfqXTL','750fjvNaR','1100557fEWkhR','157635dewrIG','4MYuNmi','7724472AUtEnC','613449kAGVVj','41643CRReCf'];a20_0x9547=function(){return _0x378e8f;};return a20_0x9547();}import{apiGenerate}from'../../commands/api/generate.js';function a20_0x5e5c(_0x55c537,_0x336500){_0x55c537=_0x55c537-0x1e6;const _0x9547a0=a20_0x9547();let _0x5e5cec=_0x9547a0[_0x55c537];return _0x5e5cec;}export const apiDefinitions=[apiList,apiPull,apiGenerate];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a21_0x5282ac=a21_0x32e9;function a21_0x1bec(){const _0x5596e5=['rawFlags','4daAkMG','6IpKanh','read','name','4078277DoATbO','9fgxJcM','boolean','isDefault','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','3469784lhNvds','1654182gcjTSW','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','447714fQXcHZ','list','1749010XiqTBP','cookie','appCode','appcode','map','region','27015bLJUzr','push','2671860HPHVHJ'];a21_0x1bec=function(){return _0x5596e5;};return a21_0x1bec();}function a21_0x32e9(_0x256277,_0x4f52fb){_0x256277=_0x256277-0x1d6;const _0x1bec46=a21_0x1bec();let _0x32e944=_0x1bec46[_0x256277];return _0x32e944;}(function(_0x13e9f7,_0x515dff){const _0x364845=a21_0x32e9,_0x4e1968=_0x13e9f7();while(!![]){try{const _0x18f52e=-parseInt(_0x364845(0x1d9))/0x1*(-parseInt(_0x364845(0x1e6))/0x2)+parseInt(_0x364845(0x1e3))/0x3+-parseInt(_0x364845(0x1e5))/0x4*(parseInt(_0x364845(0x1e1))/0x5)+-parseInt(_0x364845(0x1d7))/0x6+-parseInt(_0x364845(0x1e9))/0x7+-parseInt(_0x364845(0x1d6))/0x8+-parseInt(_0x364845(0x1ea))/0x9*(parseInt(_0x364845(0x1db))/0xa);if(_0x18f52e===_0x515dff)break;else _0x4e1968['push'](_0x4e1968['shift']());}catch(_0xe8eb71){_0x4e1968['push'](_0x4e1968['shift']());}}}(a21_0x1bec,0xb9e53));import{fetchModelList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveTargetApps}from'../../commands/api/shared.js';import{initMultiAppEnvironment}from'../../context.js';export const apiList={'service':'api','command':a21_0x5282ac(0x1da),'description':a21_0x5282ac(0x1ed),'risk':a21_0x5282ac(0x1e7),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':'global','type':a21_0x5282ac(0x1eb),'description':a21_0x5282ac(0x1d8),'default':![]}],async 'execute'(_0x341269){const _0x6d4efe=a21_0x5282ac,_0x21e248=_0x341269['rawFlags'][_0x6d4efe(0x1de)]?String(_0x341269[_0x6d4efe(0x1e4)]['appcode']):undefined,_0x3346e8=resolveTargetApps(_0x341269,_0x21e248);if(_0x3346e8){const _0x44e408=[];for(const _0x163d21 of _0x3346e8){const _0x29bc93=_0x163d21[_0x6d4efe(0x1dc)]||_0x341269[_0x6d4efe(0x1dc)];await initMultiAppEnvironment(_0x163d21);const {configArray:_0xfac0ee}=await fetchModelList(_0x163d21[_0x6d4efe(0x1de)],_0x29bc93);_0x44e408[_0x6d4efe(0x1e2)](..._0xfac0ee[_0x6d4efe(0x1df)](_0x539f4c=>({..._0x539f4c,'_appName':_0x163d21[_0x6d4efe(0x1e8)],'_appCode':_0x163d21[_0x6d4efe(0x1de)],'_region':_0x163d21[_0x6d4efe(0x1e0)],'_isDefault':_0x163d21[_0x6d4efe(0x1ec)]})));}return{'ok':!![],'data':_0x44e408};}const {configArray:_0x17a0a4}=await fetchModelList(_0x341269[_0x6d4efe(0x1dd)],_0x341269[_0x6d4efe(0x1dc)]);return{'ok':!![],'data':_0x17a0a4};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a22_0x19db2f=a22_0x1c4c;(function(_0x3eddf2,_0x187d8d){const _0x12d1fa=a22_0x1c4c,_0xca3cb5=_0x3eddf2();while(!![]){try{const _0xd901b1=parseInt(_0x12d1fa(0x14e))/0x1*(parseInt(_0x12d1fa(0x12e))/0x2)+parseInt(_0x12d1fa(0x11b))/0x3*(parseInt(_0x12d1fa(0x178))/0x4)+parseInt(_0x12d1fa(0x123))/0x5+-parseInt(_0x12d1fa(0x12a))/0x6+-parseInt(_0x12d1fa(0x155))/0x7*(parseInt(_0x12d1fa(0x14a))/0x8)+parseInt(_0x12d1fa(0x141))/0x9*(-parseInt(_0x12d1fa(0x168))/0xa)+-parseInt(_0x12d1fa(0x160))/0xb*(-parseInt(_0x12d1fa(0x163))/0xc);if(_0xd901b1===_0x187d8d)break;else _0xca3cb5['push'](_0xca3cb5['shift']());}catch(_0x27eb68){_0xca3cb5['push'](_0xca3cb5['shift']());}}}(a22_0x3c84,0xb8fa9));import a22_0x31f8c0 from'ora';import{getEnv}from'../../constant/env.js';import{fetchModelList}from'../../core/api-client.js';import{generateApiFile}from'../../api/generate-api-file.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{DEFAULT_API_DIR}from'../../constant/paths.js';import{resolveTargetApps}from'../../commands/api/shared.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getRuntimeDomain,getSdkClientRoutingConfig}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';import{initMultiAppEnvironment}from'../../context.js';import a22_0x505c73 from'node:path';import{existsSync}from'node:fs';import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../../api/model-registry-file.js';import{getMultiAppConfigs}from'../../utils/config.js';import{getRegistryGroup,resolveApiProfileLayouts}from'../../api/api-group.js';const EXISTING_TS_HINT=a22_0x19db2f(0x176);function inspectModelRegistry(_0x3dff63,_0x4e5286){const _0xbb4a6c=a22_0x19db2f,_0x9cfaf9=a22_0x505c73[_0xbb4a6c(0x17d)](_0x3dff63,MODEL_REGISTRY_FILE_NAME),_0x5370c1=existsSync(_0x9cfaf9);if(!_0x5370c1)return{'exists':![],'hasAppCode':![],'isUnboundTemplate':![]};const _0x36c982=readModelRegistry(_0x9cfaf9);if(!_0x36c982)throw new Error(MODEL_REGISTRY_FILE_NAME+_0xbb4a6c(0x165));const _0x8c3af8=new Set(Object['values'](_0x36c982[_0xbb4a6c(0x130)])[_0xbb4a6c(0x120)](_0x4e0e78=>_0x4e0e78[_0xbb4a6c(0x16b)])[_0xbb4a6c(0x12f)](_0x52bc0f=>_0x52bc0f!==_0xbb4a6c(0x13f)));return{'exists':!![],'hasAppCode':!!_0x4e5286&&_0x8c3af8[_0xbb4a6c(0x127)](_0x4e5286),'isUnboundTemplate':_0x8c3af8['size']===0x0};}function toPullData(_0x4846ef){const _0x30c32b=a22_0x19db2f;return{'appCode':_0x4846ef['appCode'],'configName':_0x4846ef[_0x30c32b(0x161)],'isDefaultConfig':_0x4846ef['isDefaultConfig'],'models':_0x4846ef[_0x30c32b(0x151)],'sdkRouting':_0x4846ef['sdkRouting'],'files':_0x4846ef[_0x30c32b(0x17e)],'needsAgentMerge':_0x4846ef[_0x30c32b(0x166)],'needsProjectUpgrade':_0x4846ef[_0x30c32b(0x179)],'apiFilePath':_0x4846ef[_0x30c32b(0x153)],'clientFilePath':_0x4846ef[_0x30c32b(0x159)],'sdkConfigPath':_0x4846ef['sdkConfigPath'],'modelRegistryPath':_0x4846ef[_0x30c32b(0x15a)],'modelRuntimePath':_0x4846ef['modelRuntimePath'],'modelProfile':_0x4846ef[_0x30c32b(0x17a)],'datasetCount':_0x4846ef[_0x30c32b(0x150)],'modelCount':_0x4846ef[_0x30c32b(0x150)]};}function a22_0x3c84(){const _0xd24398=['rawFlags','\x20dataset\x20fact(s)\x20and\x20refreshed\x20','\x20failed','Verify\x20the\x20selected\x20profile\x20and\x20review\x20legacy\x20generated\x20files,\x20then\x20rerun\x20with\x20--force\x20--yes.','hasAppCode','boolean','mergedCli','selectedAppName','Accept\x20an\x20empty\x20model\x20result,\x20or\x20replace\x20a\x20legacy\x20prefixed\x20scaffold;\x20requires\x20--yes','\x20\x20•\x20','Output\x20directory\x20(default:\x20','Pulling\x20API\x20config\x20for\x20',')...','basename','NOT-SET','env','2313369gdtvLY','defaultApp','global','action','\x20does\x20not\x20contain\x20AppCode\x20\x22','read',';\x20preserved\x20the\x20stable\x20TypeScript\x20entrypoints','isUnboundTemplate','merged','56qjEAQp','cookie','output','isDefault','3JPIHpQ','app','modelCount','models','name','apiFilePath','pull','1403717BUtHOq',';\x20created\x20the\x20stable\x20TypeScript\x20entrypoints','none','Pull\x20dataset\x20facts\x20and\x20refresh\x20the\x20generated\x20SDK\x20model\x20registry\x20(','clientFilePath','modelRegistryPath','created','includes','fail','\x20dataset\x20fact(s)\x20and\x20refreshed\x20model\x20profile\x20\x22','validation','11iMPXix','configName','push','11729352MlzMSE','str','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','needsAgentMerge','sdkConfigPath','10XFCljA','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','\x20succeeded,\x20','appCode','default','overwritten','\x20app(s)\x20failed','production','bool','AppCode\x20\x22','exists','Internal\x20error:\x20API\x20layout\x20for\x20app\x20profile\x20\x22','slice','modelRuntimePath','Model\x20facts\x20were\x20refreshed,\x20but\x20the\x20stable\x20source\x20entrypoints\x20are\x20not\x20installed.\x20Run\x20`rabetbase\x20project\x20upgrade\x20--dry-run`,\x20then\x20`rabetbase\x20project\x20upgrade\x20--yes`.','start','4drvFPB','needsProjectUpgrade','modelProfile','currentApp','force','join','files','api','\x20dataset\x20fact(s)\x20and\x20wrote\x20a\x20scaffold\x20with\x20','344445SWqBtj','\x20model(s)','outputDir','find','Select\x20a\x20configured\x20app\x20profile\x20or\x20use\x20a\x20separate\x20apiDir.','map','length','...','768930LHNMTC','message','appcode','Fetched\x20','has','string','yes','1239774mDUOUz','Done:\x20','project','client','919342wYYMuD','filter','profiles'];a22_0x3c84=function(){return _0xd24398;};return a22_0x3c84();}function describePull(_0x240da4){const _0x156749=a22_0x19db2f,_0x222dcf=a22_0x505c73[_0x156749(0x13e)](_0x240da4[_0x156749(0x167)]);if(_0x240da4[_0x156749(0x17a)]){const _0x1439e6=_0x156749(0x126)+_0x240da4[_0x156749(0x150)]+_0x156749(0x15e)+_0x240da4[_0x156749(0x17a)]+'\x22';if(_0x240da4[_0x156749(0x166)])return _0x1439e6+'.\x20'+EXISTING_TS_HINT;if(_0x240da4[_0x156749(0x17e)][_0x156749(0x17f)][_0x156749(0x144)]===_0x156749(0x16d)||_0x240da4[_0x156749(0x17e)][_0x156749(0x12d)][_0x156749(0x144)]===_0x156749(0x16d))return _0x1439e6+';\x20replaced\x20the\x20stable\x20TypeScript\x20entrypoints';if(_0x240da4[_0x156749(0x17e)][_0x156749(0x17f)][_0x156749(0x144)]===_0x156749(0x15b)||_0x240da4[_0x156749(0x17e)]['client'][_0x156749(0x144)]===_0x156749(0x15b))return _0x1439e6+_0x156749(0x156);return _0x1439e6+_0x156749(0x147);}if(_0x240da4[_0x156749(0x166)])return _0x156749(0x126)+_0x240da4[_0x156749(0x150)]+_0x156749(0x132)+_0x222dcf+'.\x20'+EXISTING_TS_HINT;if(_0x240da4[_0x156749(0x17e)][_0x156749(0x17f)][_0x156749(0x144)]===_0x156749(0x16d)||_0x240da4[_0x156749(0x17e)][_0x156749(0x12d)]['action']===_0x156749(0x16d))return _0x156749(0x126)+_0x240da4[_0x156749(0x150)]+'\x20dataset\x20fact(s)\x20and\x20replaced\x20the\x20TypeScript\x20scaffold\x20with\x20'+_0x240da4['modelCount']+'\x20model(s)';return _0x156749(0x126)+_0x240da4['modelCount']+_0x156749(0x180)+_0x240da4[_0x156749(0x150)]+_0x156749(0x11c);}function a22_0x1c4c(_0x1cc814,_0xd034fd){_0x1cc814=_0x1cc814-0x11b;const _0x3c84da=a22_0x3c84();let _0x1c4c7c=_0x3c84da[_0x1cc814];return _0x1c4c7c;}export const apiPull={'service':a22_0x19db2f(0x17f),'command':a22_0x19db2f(0x154),'description':a22_0x19db2f(0x158)+DEFAULT_API_DIR+'/)','risk':a22_0x19db2f(0x146),'requiresAppCode':!![],'hasFormat':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a22_0x19db2f(0x14c),'type':a22_0x19db2f(0x128),'description':a22_0x19db2f(0x13b)+DEFAULT_API_DIR+'/)'},{'name':a22_0x19db2f(0x143),'type':a22_0x19db2f(0x136),'description':a22_0x19db2f(0x169),'default':![]},{'name':'force','type':a22_0x19db2f(0x136),'description':a22_0x19db2f(0x139),'default':![]}],async 'validate'(_0x18bdee){const _0x5b13f1=a22_0x19db2f;if(_0x18bdee[_0x5b13f1(0x170)](_0x5b13f1(0x17c))&&!_0x18bdee[_0x5b13f1(0x170)](_0x5b13f1(0x129)))throw CliErrors[_0x5b13f1(0x15f)]('--force\x20requires\x20--yes\x20because\x20it\x20may\x20remove\x20existing\x20model\x20facts\x20or\x20replace\x20a\x20legacy\x20generated\x20scaffold.',_0x5b13f1(0x134));},async 'execute'(_0x14007c){const _0x4e9a6a=a22_0x19db2f,_0x5a67cf=_0x14007c[_0x4e9a6a(0x131)][_0x4e9a6a(0x125)]?String(_0x14007c[_0x4e9a6a(0x131)][_0x4e9a6a(0x125)]):undefined,_0x5b4820=_0x14007c[_0x4e9a6a(0x164)](_0x4e9a6a(0x14c))||undefined,_0x325d13=_0x14007c[_0x4e9a6a(0x170)]('force'),_0xa954c5=resolveTargetApps(_0x14007c,_0x5a67cf),_0x1b9161=_0x14007c[_0x4e9a6a(0x170)]('global')?_0x4e9a6a(0x149):_0x4e9a6a(0x12c),_0x310ae6=getMultiAppConfigs(_0x1b9161),_0x195fc5=_0x2f16da=>_0x2f16da['apiDir']||_0x5b4820||_0x14007c['apiDir']||DEFAULT_API_DIR,_0x56d45d=_0x310ae6?resolveApiProfileLayouts(_0x310ae6,_0x195fc5):undefined;let _0x40c0f7=_0xa954c5;if(!_0x40c0f7&&_0x310ae6){const _0x2f3c6a=_0x14007c[_0x4e9a6a(0x138)]?_0x310ae6['find'](_0x395a8f=>_0x395a8f[_0x4e9a6a(0x152)]===_0x14007c['selectedAppName']):undefined,_0x1c9dbc=_0x310ae6[_0x4e9a6a(0x12f)](_0x401286=>_0x401286[_0x4e9a6a(0x125)]===_0x14007c[_0x4e9a6a(0x16b)]);if(!_0x2f3c6a&&_0x1c9dbc[_0x4e9a6a(0x121)]>0x1)throw CliErrors[_0x4e9a6a(0x15f)](_0x4e9a6a(0x171)+_0x14007c[_0x4e9a6a(0x16b)]+'\x22\x20belongs\x20to\x20multiple\x20app\x20profiles:\x20'+_0x1c9dbc[_0x4e9a6a(0x120)](_0x2f708e=>_0x2f708e[_0x4e9a6a(0x152)])[_0x4e9a6a(0x17d)](',\x20')+'.','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.');const _0x4216a0=_0x2f3c6a??_0x1c9dbc[0x0];if(_0x4216a0)_0x40c0f7=[_0x4216a0];}if(_0x40c0f7){let _0x5c06c6=0x0,_0xafebf1=0x0;const _0x57caf5=[],_0x5cc357=_0x56d45d??resolveApiProfileLayouts(_0x40c0f7,_0x195fc5);for(const _0x214195 of _0x40c0f7){const _0x7abdf3=_0x214195[_0x4e9a6a(0x14b)]||_0x14007c[_0x4e9a6a(0x14b)],_0x898258=_0x214195[_0x4e9a6a(0x140)]||_0x4e9a6a(0x16f);await initMultiAppEnvironment(_0x214195);const _0x3ed5c0=_0x5cc357['find'](_0x35dde2=>_0x35dde2[_0x4e9a6a(0x14f)][_0x4e9a6a(0x152)]===_0x214195[_0x4e9a6a(0x152)]);if(!_0x3ed5c0)throw new Error(_0x4e9a6a(0x173)+_0x214195[_0x4e9a6a(0x152)]+'\x22\x20was\x20not\x20resolved.');const _0x261f42=getRegistryGroup(_0x5cc357,_0x3ed5c0),_0x57110b=_0x3ed5c0[_0x4e9a6a(0x11d)],_0x32c60b=_0x261f42?'':_0x214195[_0x4e9a6a(0x14d)]?'':_0x214195[_0x4e9a6a(0x152)]||_0x214195[_0x4e9a6a(0x125)],_0x50647e=_0x261f42?.[_0x4e9a6a(0x11e)](_0x48692e=>_0x48692e[_0x4e9a6a(0x14f)][_0x4e9a6a(0x14d)])??_0x261f42?.[0x0];if(_0x261f42)inspectModelRegistry(_0x57110b);const _0x4ec1bb=a22_0x31f8c0('Pulling\x20'+_0x214195[_0x4e9a6a(0x152)]+'\x20('+_0x214195[_0x4e9a6a(0x125)]+_0x4e9a6a(0x13d))[_0x4e9a6a(0x177)]();try{const {configArray:_0x2e18ea}=await fetchModelList(_0x214195[_0x4e9a6a(0x125)],_0x7abdf3),_0x59f939=await generateApiFile(_0x2e18ea,_0x32c60b,_0x214195[_0x4e9a6a(0x125)],_0x214195[_0x4e9a6a(0x14d)],_0x898258,_0x57110b,_0x214195['name'],getSdkClientRoutingConfig(),{'overwriteTypescript':_0x261f42?![]:_0x325d13,'allowEmptyModelReplacement':_0x261f42?_0x325d13:undefined,'scaffoldMode':_0x261f42?_0x4e9a6a(0x157):undefined,..._0x261f42?{'modelProfile':{'name':_0x214195[_0x4e9a6a(0x152)],'defaultName':_0x50647e[_0x4e9a6a(0x14f)]['name'],'runtimeDomain':getRuntimeDomain()}}:{}});_0x4ec1bb['succeed'](_0x214195[_0x4e9a6a(0x152)]+':\x20'+describePull(_0x59f939)),writeCliSideChannelLine(_0x4e9a6a(0x13a)+_0x59f939[_0x4e9a6a(0x167)]),writeCliSideChannelLine(_0x4e9a6a(0x13a)+_0x59f939['apiFilePath']),writeCliSideChannelLine(_0x4e9a6a(0x13a)+_0x59f939[_0x4e9a6a(0x159)]),_0x59f939[_0x4e9a6a(0x15a)]&&writeCliSideChannelLine(_0x4e9a6a(0x13a)+_0x59f939[_0x4e9a6a(0x15a)]),_0x59f939[_0x4e9a6a(0x175)]&&writeCliSideChannelLine(_0x4e9a6a(0x13a)+_0x59f939[_0x4e9a6a(0x175)]),_0x57caf5[_0x4e9a6a(0x162)](toPullData(_0x59f939)),_0x5c06c6++;}catch(_0xcc096e){_0x4ec1bb['fail'](_0x214195[_0x4e9a6a(0x152)]+':\x20'+(_0xcc096e instanceof Error?_0xcc096e[_0x4e9a6a(0x124)]:String(_0xcc096e))),_0xafebf1++;}}writeCliSideChannelLine('');if(_0xafebf1>0x0)writeCliSideChannelLine('!\x20'+_0xafebf1+_0x4e9a6a(0x16e));return{'ok':_0xafebf1===0x0,'message':_0x4e9a6a(0x12b)+_0x5c06c6+_0x4e9a6a(0x16a)+_0xafebf1+_0x4e9a6a(0x133),'data':{'apps':_0x57caf5,'succeeded':_0x5c06c6,'failed':_0xafebf1}};}const _0x66076d=_0x5a67cf&&_0x5a67cf[_0x4e9a6a(0x15c)]('-')?_0x5a67cf['split']('-')[_0x4e9a6a(0x174)](0x1)[_0x4e9a6a(0x17d)]('-'):'',_0x5d4e04=_0x5b4820||_0x14007c['apiDir']||DEFAULT_API_DIR,_0xdc96c4=!_0x5a67cf,_0x369940=inspectModelRegistry(_0x5d4e04,_0x14007c['appCode']),_0x154e78=_0x14007c['selectedAppName']||_0x14007c[_0x4e9a6a(0x137)]?.[_0x4e9a6a(0x17b)]||_0x14007c[_0x4e9a6a(0x137)]?.[_0x4e9a6a(0x142)]||_0x4e9a6a(0x16c);if(_0x369940[_0x4e9a6a(0x172)]&&!_0x369940['hasAppCode']&&!_0x369940[_0x4e9a6a(0x148)])throw CliErrors[_0x4e9a6a(0x15f)](MODEL_REGISTRY_FILE_NAME+_0x4e9a6a(0x145)+_0x14007c[_0x4e9a6a(0x16b)]+'\x22.',_0x4e9a6a(0x11f));const _0x58a90a=a22_0x31f8c0(_0x4e9a6a(0x13c)+_0x14007c['appCode']+_0x4e9a6a(0x122))[_0x4e9a6a(0x177)]();try{const {configArray:_0x2bb6c6}=await fetchModelList(_0x14007c[_0x4e9a6a(0x16b)],_0x14007c[_0x4e9a6a(0x14b)]),_0x5eab7c=await generateApiFile(_0x2bb6c6,_0x66076d,_0x14007c[_0x4e9a6a(0x16b)],_0xdc96c4,getEnv(),_0x5d4e04,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':_0x369940['exists']?![]:_0x325d13,'allowEmptyModelReplacement':_0x369940[_0x4e9a6a(0x172)]?_0x325d13:undefined,'scaffoldMode':_0x369940[_0x4e9a6a(0x172)]?_0x4e9a6a(0x157):undefined,..._0x369940[_0x4e9a6a(0x135)]||_0x369940[_0x4e9a6a(0x148)]||!_0x369940[_0x4e9a6a(0x172)]&&_0x325d13?{'modelProfile':{'name':_0x154e78,'defaultName':_0x14007c[_0x4e9a6a(0x137)]?.[_0x4e9a6a(0x142)]??_0x154e78,'runtimeDomain':getRuntimeDomain()}}:{}});return _0x58a90a['succeed'](describePull(_0x5eab7c)),writeCliSideChannelLine(_0x4e9a6a(0x13a)+_0x5eab7c['sdkConfigPath']),writeCliSideChannelLine(_0x4e9a6a(0x13a)+_0x5eab7c[_0x4e9a6a(0x153)]),writeCliSideChannelLine(_0x4e9a6a(0x13a)+_0x5eab7c[_0x4e9a6a(0x159)]),_0x5eab7c[_0x4e9a6a(0x15a)]&&writeCliSideChannelLine(_0x4e9a6a(0x13a)+_0x5eab7c[_0x4e9a6a(0x15a)]),_0x5eab7c['modelRuntimePath']&&writeCliSideChannelLine(_0x4e9a6a(0x13a)+_0x5eab7c[_0x4e9a6a(0x175)]),{'ok':!![],'message':describePull(_0x5eab7c),'data':toPullData(_0x5eab7c)};}catch(_0x485251){_0x58a90a[_0x4e9a6a(0x15d)]('Failed:\x20'+(_0x485251 instanceof Error?_0x485251['message']:String(_0x485251)));throw _0x485251;}}};
|
|
1
|
+
const a22_0x174aa3=a22_0x32cd;(function(_0x48ec38,_0x32b7f7){const _0x596506=a22_0x32cd,_0x307e86=_0x48ec38();while(!![]){try{const _0x5ea565=-parseInt(_0x596506(0x1d7))/0x1*(-parseInt(_0x596506(0x1a1))/0x2)+parseInt(_0x596506(0x1bd))/0x3+-parseInt(_0x596506(0x1d4))/0x4+parseInt(_0x596506(0x1b1))/0x5+-parseInt(_0x596506(0x1bb))/0x6*(-parseInt(_0x596506(0x19b))/0x7)+parseInt(_0x596506(0x1d3))/0x8+-parseInt(_0x596506(0x1c2))/0x9*(parseInt(_0x596506(0x1b6))/0xa);if(_0x5ea565===_0x32b7f7)break;else _0x307e86['push'](_0x307e86['shift']());}catch(_0x3e9294){_0x307e86['push'](_0x307e86['shift']());}}}(a22_0x5be7,0x6c994));import a22_0x1db293 from'ora';import{getEnv}from'../../constant/env.js';import{fetchModelList}from'../../core/api-client.js';function a22_0x5be7(){const _0xcbbb96=['\x20dataset\x20fact(s)\x20and\x20replaced\x20the\x20TypeScript\x20scaffold\x20with\x20','files','boolean','configName','global','api','merged','includes','pull','modelRuntimePath','\x20dataset\x20fact(s)\x20and\x20wrote\x20a\x20scaffold\x20with\x20','overwritten','Done:\x20','6666400JNcgQT','3282348lujNBF','name','string','1HisACZ','default','yes','outputDir','validation','modelProfile','find','map','\x20succeeded,\x20','Select\x20a\x20configured\x20app\x20profile\x20or\x20use\x20a\x20separate\x20apiDir.','modelRegistryPath','\x22\x20belongs\x20to\x20multiple\x20app\x20profiles:\x20','\x20is\x20not\x20a\x20valid\x20Rabetbase\x20generated\x20file.\x20Move\x20or\x20repair\x20it\x20before\x20pulling\x20models\x20again.','apiFilePath','needsAgentMerge','\x20\x20•\x20','Pull\x20dataset\x20facts\x20and\x20refresh\x20the\x20generated\x20SDK\x20model\x20registry\x20(','modelCount','Verify\x20the\x20selected\x20profile\x20and\x20review\x20legacy\x20generated\x20files,\x20then\x20rerun\x20with\x20--force\x20--yes.','--force\x20requires\x20--yes\x20because\x20it\x20may\x20remove\x20existing\x20model\x20facts\x20or\x20replace\x20a\x20legacy\x20generated\x20scaffold.','app','length','rawFlags','Pulling\x20API\x20config\x20for\x20','mergedCli','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','isUnboundTemplate','Fetched\x20',')...','hasAppCode','\x20failed','values','exists','\x20app(s)\x20failed','clientFilePath','978859uXkCRm','bool','basename','force','apiDir','created','747652msvfHi','output','cookie','push','sdkRouting','selectedAppName','slice','Select\x20the\x20target\x20explicitly\x20with\x20--app\x20<profile>.','none','currentApp','split','\x20dataset\x20fact(s)\x20and\x20refreshed\x20','appCode','filter','client','NOT-SET','448355VotiaW','isDefault','start','fail','succeed','12998240xNEJbi','isDefaultConfig','sdkConfigPath','appcode','project','24hQWFJV','profiles','2127258uZbvFY','\x22\x20was\x20not\x20resolved.','\x20model(s)','message','Pulling\x20','9AwTyQn','action','str','join'];a22_0x5be7=function(){return _0xcbbb96;};return a22_0x5be7();}import{generateApiFile}from'../../api/generate-api-file.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{DEFAULT_API_DIR}from'../../constant/paths.js';import{resolveTargetApps}from'../../commands/api/shared.js';function a22_0x32cd(_0x1514ba,_0x373161){_0x1514ba=_0x1514ba-0x18b;const _0x5be7c0=a22_0x5be7();let _0x32cdc1=_0x5be7c0[_0x1514ba];return _0x32cdc1;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getRuntimeDomain,getSdkClientRoutingConfig}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';import{initMultiAppEnvironment}from'../../context.js';import a22_0x570e47 from'node:path';import{existsSync}from'node:fs';import{MODEL_REGISTRY_FILE_NAME,readModelRegistry}from'../../api/model-registry-file.js';import{getMultiAppConfigs}from'../../utils/config.js';import{getRegistryGroup,resolveApiProfileLayouts}from'../../api/api-group.js';const EXISTING_TS_HINT='Model\x20facts\x20were\x20refreshed,\x20but\x20the\x20stable\x20source\x20entrypoints\x20are\x20not\x20installed.\x20Run\x20`rabetbase\x20project\x20upgrade\x20--dry-run`,\x20then\x20`rabetbase\x20project\x20upgrade\x20--yes`.';function inspectModelRegistry(_0x41f3e9,_0x11ec01){const _0x1cfaa8=a22_0x32cd,_0x305de4=a22_0x570e47[_0x1cfaa8(0x1c5)](_0x41f3e9,MODEL_REGISTRY_FILE_NAME),_0x37daad=existsSync(_0x305de4);if(!_0x37daad)return{'exists':![],'hasAppCode':![],'isUnboundTemplate':![]};const _0x39deca=readModelRegistry(_0x305de4);if(!_0x39deca)throw new Error(MODEL_REGISTRY_FILE_NAME+_0x1cfaa8(0x1e3));const _0x58058d=new Set(Object[_0x1cfaa8(0x197)](_0x39deca[_0x1cfaa8(0x1bc)])['map'](_0x6c9eab=>_0x6c9eab[_0x1cfaa8(0x1ad)])[_0x1cfaa8(0x1ae)](_0x4220fd=>_0x4220fd!==_0x1cfaa8(0x1b0)));return{'exists':!![],'hasAppCode':!!_0x11ec01&&_0x58058d['has'](_0x11ec01),'isUnboundTemplate':_0x58058d['size']===0x0};}function toPullData(_0xb9ffe1){const _0x40d685=a22_0x32cd;return{'appCode':_0xb9ffe1[_0x40d685(0x1ad)],'configName':_0xb9ffe1[_0x40d685(0x1c9)],'isDefaultConfig':_0xb9ffe1[_0x40d685(0x1b7)],'models':_0xb9ffe1['models'],'sdkRouting':_0xb9ffe1[_0x40d685(0x1a5)],'files':_0xb9ffe1[_0x40d685(0x1c7)],'needsAgentMerge':_0xb9ffe1[_0x40d685(0x1e5)],'needsProjectUpgrade':_0xb9ffe1['needsProjectUpgrade'],'apiFilePath':_0xb9ffe1['apiFilePath'],'clientFilePath':_0xb9ffe1[_0x40d685(0x19a)],'sdkConfigPath':_0xb9ffe1[_0x40d685(0x1b8)],'modelRegistryPath':_0xb9ffe1[_0x40d685(0x1e1)],'modelRuntimePath':_0xb9ffe1['modelRuntimePath'],'modelProfile':_0xb9ffe1[_0x40d685(0x1dc)],'datasetCount':_0xb9ffe1[_0x40d685(0x1e8)],'modelCount':_0xb9ffe1[_0x40d685(0x1e8)]};}function describePull(_0xe93fd3){const _0x520735=a22_0x32cd,_0x54eca4=a22_0x570e47[_0x520735(0x19d)](_0xe93fd3[_0x520735(0x1b8)]);if(_0xe93fd3[_0x520735(0x1dc)]){const _0x3e4191=_0x520735(0x193)+_0xe93fd3[_0x520735(0x1e8)]+'\x20dataset\x20fact(s)\x20and\x20refreshed\x20model\x20profile\x20\x22'+_0xe93fd3[_0x520735(0x1dc)]+'\x22';if(_0xe93fd3['needsAgentMerge'])return _0x3e4191+'.\x20'+EXISTING_TS_HINT;if(_0xe93fd3[_0x520735(0x1c7)][_0x520735(0x1cb)][_0x520735(0x1c3)]===_0x520735(0x1d1)||_0xe93fd3[_0x520735(0x1c7)][_0x520735(0x1af)]['action']==='overwritten')return _0x3e4191+';\x20replaced\x20the\x20stable\x20TypeScript\x20entrypoints';if(_0xe93fd3[_0x520735(0x1c7)][_0x520735(0x1cb)][_0x520735(0x1c3)]==='created'||_0xe93fd3[_0x520735(0x1c7)]['client'][_0x520735(0x1c3)]===_0x520735(0x1a0))return _0x3e4191+';\x20created\x20the\x20stable\x20TypeScript\x20entrypoints';return _0x3e4191+';\x20preserved\x20the\x20stable\x20TypeScript\x20entrypoints';}if(_0xe93fd3[_0x520735(0x1e5)])return _0x520735(0x193)+_0xe93fd3['modelCount']+_0x520735(0x1ac)+_0x54eca4+'.\x20'+EXISTING_TS_HINT;if(_0xe93fd3[_0x520735(0x1c7)][_0x520735(0x1cb)][_0x520735(0x1c3)]===_0x520735(0x1d1)||_0xe93fd3['files']['client'][_0x520735(0x1c3)]===_0x520735(0x1d1))return _0x520735(0x193)+_0xe93fd3[_0x520735(0x1e8)]+_0x520735(0x1c6)+_0xe93fd3[_0x520735(0x1e8)]+_0x520735(0x1bf);return _0x520735(0x193)+_0xe93fd3[_0x520735(0x1e8)]+_0x520735(0x1d0)+_0xe93fd3[_0x520735(0x1e8)]+_0x520735(0x1bf);}export const apiPull={'service':a22_0x174aa3(0x1cb),'command':a22_0x174aa3(0x1ce),'description':a22_0x174aa3(0x1e7)+DEFAULT_API_DIR+'/)','risk':'read','requiresAppCode':!![],'hasFormat':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a22_0x174aa3(0x1a2),'type':a22_0x174aa3(0x1d6),'description':'Output\x20directory\x20(default:\x20'+DEFAULT_API_DIR+'/)'},{'name':a22_0x174aa3(0x1ca),'type':a22_0x174aa3(0x1c8),'description':a22_0x174aa3(0x191),'default':![]},{'name':a22_0x174aa3(0x19e),'type':a22_0x174aa3(0x1c8),'description':'Accept\x20an\x20empty\x20model\x20result,\x20or\x20replace\x20a\x20legacy\x20prefixed\x20scaffold;\x20requires\x20--yes','default':![]}],async 'validate'(_0x3d510b){const _0x3f662a=a22_0x174aa3;if(_0x3d510b[_0x3f662a(0x19c)](_0x3f662a(0x19e))&&!_0x3d510b['bool'](_0x3f662a(0x1d9)))throw CliErrors[_0x3f662a(0x1db)](_0x3f662a(0x18b),_0x3f662a(0x1e9));},async 'execute'(_0x4a93ae){const _0x2e44d6=a22_0x174aa3,_0x12e09f=_0x4a93ae[_0x2e44d6(0x18e)]['appcode']?String(_0x4a93ae[_0x2e44d6(0x18e)][_0x2e44d6(0x1b9)]):undefined,_0x107448=_0x4a93ae[_0x2e44d6(0x1c4)](_0x2e44d6(0x1a2))||undefined,_0x41b506=_0x4a93ae['bool']('force'),_0x4f42d7=resolveTargetApps(_0x4a93ae,_0x12e09f),_0x5617c7=_0x4a93ae[_0x2e44d6(0x19c)](_0x2e44d6(0x1ca))?_0x2e44d6(0x1cc):_0x2e44d6(0x1ba),_0x423738=getMultiAppConfigs(_0x5617c7),_0x1b2417=_0x443bce=>_0x443bce[_0x2e44d6(0x19f)]||_0x107448||_0x4a93ae[_0x2e44d6(0x19f)]||DEFAULT_API_DIR,_0x1992a6=_0x423738?resolveApiProfileLayouts(_0x423738,_0x1b2417):undefined;let _0x1c0f12=_0x4f42d7;if(!_0x1c0f12&&_0x423738){const _0xabcc0b=_0x4a93ae[_0x2e44d6(0x1a6)]?_0x423738[_0x2e44d6(0x1dd)](_0x1e4e73=>_0x1e4e73[_0x2e44d6(0x1d5)]===_0x4a93ae[_0x2e44d6(0x1a6)]):undefined,_0x35ffa1=_0x423738['filter'](_0x2cf860=>_0x2cf860[_0x2e44d6(0x1b9)]===_0x4a93ae[_0x2e44d6(0x1ad)]);if(!_0xabcc0b&&_0x35ffa1[_0x2e44d6(0x18d)]>0x1)throw CliErrors[_0x2e44d6(0x1db)]('AppCode\x20\x22'+_0x4a93ae['appCode']+_0x2e44d6(0x1e2)+_0x35ffa1[_0x2e44d6(0x1de)](_0x4d2e04=>_0x4d2e04['name'])[_0x2e44d6(0x1c5)](',\x20')+'.',_0x2e44d6(0x1a8));const _0x42591a=_0xabcc0b??_0x35ffa1[0x0];if(_0x42591a)_0x1c0f12=[_0x42591a];}if(_0x1c0f12){let _0x2cd87b=0x0,_0x20537d=0x0;const _0x1bd46d=[],_0x3fe80f=_0x1992a6??resolveApiProfileLayouts(_0x1c0f12,_0x1b2417);for(const _0x24e5c1 of _0x1c0f12){const _0x3d72ba=_0x24e5c1[_0x2e44d6(0x1a3)]||_0x4a93ae[_0x2e44d6(0x1a3)],_0xbf1bd1=_0x24e5c1['env']||'production';await initMultiAppEnvironment(_0x24e5c1);const _0x227b03=_0x3fe80f[_0x2e44d6(0x1dd)](_0x357c63=>_0x357c63[_0x2e44d6(0x18c)][_0x2e44d6(0x1d5)]===_0x24e5c1['name']);if(!_0x227b03)throw new Error('Internal\x20error:\x20API\x20layout\x20for\x20app\x20profile\x20\x22'+_0x24e5c1[_0x2e44d6(0x1d5)]+_0x2e44d6(0x1be));const _0x3d03e6=getRegistryGroup(_0x3fe80f,_0x227b03),_0x4f2f7c=_0x227b03[_0x2e44d6(0x1da)],_0x32f034=_0x3d03e6?'':_0x24e5c1[_0x2e44d6(0x1b2)]?'':_0x24e5c1['name']||_0x24e5c1[_0x2e44d6(0x1b9)],_0x4e78d6=_0x3d03e6?.[_0x2e44d6(0x1dd)](_0x16e762=>_0x16e762[_0x2e44d6(0x18c)][_0x2e44d6(0x1b2)])??_0x3d03e6?.[0x0];if(_0x3d03e6)inspectModelRegistry(_0x4f2f7c);const _0x1adf8e=a22_0x1db293(_0x2e44d6(0x1c1)+_0x24e5c1[_0x2e44d6(0x1d5)]+'\x20('+_0x24e5c1[_0x2e44d6(0x1b9)]+_0x2e44d6(0x194))[_0x2e44d6(0x1b3)]();try{const {configArray:_0x36f8b6}=await fetchModelList(_0x24e5c1[_0x2e44d6(0x1b9)],_0x3d72ba),_0x5dc89f=await generateApiFile(_0x36f8b6,_0x32f034,_0x24e5c1[_0x2e44d6(0x1b9)],_0x24e5c1['isDefault'],_0xbf1bd1,_0x4f2f7c,_0x24e5c1[_0x2e44d6(0x1d5)],getSdkClientRoutingConfig(),{'overwriteTypescript':_0x3d03e6?![]:_0x41b506,'allowEmptyModelReplacement':_0x3d03e6?_0x41b506:undefined,'scaffoldMode':_0x3d03e6?_0x2e44d6(0x1a9):undefined,..._0x3d03e6?{'modelProfile':{'name':_0x24e5c1[_0x2e44d6(0x1d5)],'defaultName':_0x4e78d6[_0x2e44d6(0x18c)][_0x2e44d6(0x1d5)],'runtimeDomain':getRuntimeDomain()}}:{}});_0x1adf8e[_0x2e44d6(0x1b5)](_0x24e5c1['name']+':\x20'+describePull(_0x5dc89f)),writeCliSideChannelLine('\x20\x20•\x20'+_0x5dc89f['sdkConfigPath']),writeCliSideChannelLine(_0x2e44d6(0x1e6)+_0x5dc89f[_0x2e44d6(0x1e4)]),writeCliSideChannelLine(_0x2e44d6(0x1e6)+_0x5dc89f[_0x2e44d6(0x19a)]),_0x5dc89f[_0x2e44d6(0x1e1)]&&writeCliSideChannelLine(_0x2e44d6(0x1e6)+_0x5dc89f['modelRegistryPath']),_0x5dc89f[_0x2e44d6(0x1cf)]&&writeCliSideChannelLine(_0x2e44d6(0x1e6)+_0x5dc89f[_0x2e44d6(0x1cf)]),_0x1bd46d[_0x2e44d6(0x1a4)](toPullData(_0x5dc89f)),_0x2cd87b++;}catch(_0x859136){_0x1adf8e[_0x2e44d6(0x1b4)](_0x24e5c1[_0x2e44d6(0x1d5)]+':\x20'+(_0x859136 instanceof Error?_0x859136[_0x2e44d6(0x1c0)]:String(_0x859136))),_0x20537d++;}}writeCliSideChannelLine('');if(_0x20537d>0x0)writeCliSideChannelLine('!\x20'+_0x20537d+_0x2e44d6(0x199));return{'ok':_0x20537d===0x0,'message':_0x2e44d6(0x1d2)+_0x2cd87b+_0x2e44d6(0x1df)+_0x20537d+_0x2e44d6(0x196),'data':{'apps':_0x1bd46d,'succeeded':_0x2cd87b,'failed':_0x20537d}};}const _0x2219ca=_0x12e09f&&_0x12e09f[_0x2e44d6(0x1cd)]('-')?_0x12e09f[_0x2e44d6(0x1ab)]('-')[_0x2e44d6(0x1a7)](0x1)[_0x2e44d6(0x1c5)]('-'):'',_0x587568=_0x107448||_0x4a93ae[_0x2e44d6(0x19f)]||DEFAULT_API_DIR,_0x465ca9=!_0x12e09f,_0xa45f3b=inspectModelRegistry(_0x587568,_0x4a93ae['appCode']),_0x1e045c=_0x4a93ae[_0x2e44d6(0x1a6)]||_0x4a93ae[_0x2e44d6(0x190)]?.[_0x2e44d6(0x1aa)]||_0x4a93ae[_0x2e44d6(0x190)]?.['defaultApp']||_0x2e44d6(0x1d8);if(_0xa45f3b[_0x2e44d6(0x198)]&&!_0xa45f3b['hasAppCode']&&!_0xa45f3b['isUnboundTemplate'])throw CliErrors[_0x2e44d6(0x1db)](MODEL_REGISTRY_FILE_NAME+'\x20does\x20not\x20contain\x20AppCode\x20\x22'+_0x4a93ae[_0x2e44d6(0x1ad)]+'\x22.',_0x2e44d6(0x1e0));const _0x14a6d8=a22_0x1db293(_0x2e44d6(0x18f)+_0x4a93ae['appCode']+'...')[_0x2e44d6(0x1b3)]();try{const {configArray:_0x23638b}=await fetchModelList(_0x4a93ae[_0x2e44d6(0x1ad)],_0x4a93ae['cookie']),_0x395b02=await generateApiFile(_0x23638b,_0x2219ca,_0x4a93ae[_0x2e44d6(0x1ad)],_0x465ca9,getEnv(),_0x587568,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':_0xa45f3b['exists']?![]:_0x41b506,'allowEmptyModelReplacement':_0xa45f3b[_0x2e44d6(0x198)]?_0x41b506:undefined,'scaffoldMode':_0xa45f3b[_0x2e44d6(0x198)]?_0x2e44d6(0x1a9):undefined,..._0xa45f3b[_0x2e44d6(0x195)]||_0xa45f3b[_0x2e44d6(0x192)]||!_0xa45f3b[_0x2e44d6(0x198)]&&_0x41b506?{'modelProfile':{'name':_0x1e045c,'defaultName':_0x4a93ae[_0x2e44d6(0x190)]?.['defaultApp']??_0x1e045c,'runtimeDomain':getRuntimeDomain()}}:{}});return _0x14a6d8[_0x2e44d6(0x1b5)](describePull(_0x395b02)),writeCliSideChannelLine(_0x2e44d6(0x1e6)+_0x395b02[_0x2e44d6(0x1b8)]),writeCliSideChannelLine(_0x2e44d6(0x1e6)+_0x395b02[_0x2e44d6(0x1e4)]),writeCliSideChannelLine('\x20\x20•\x20'+_0x395b02[_0x2e44d6(0x19a)]),_0x395b02[_0x2e44d6(0x1e1)]&&writeCliSideChannelLine(_0x2e44d6(0x1e6)+_0x395b02[_0x2e44d6(0x1e1)]),_0x395b02[_0x2e44d6(0x1cf)]&&writeCliSideChannelLine(_0x2e44d6(0x1e6)+_0x395b02[_0x2e44d6(0x1cf)]),{'ok':!![],'message':describePull(_0x395b02),'data':toPullData(_0x395b02)};}catch(_0xe72d25){_0x14a6d8[_0x2e44d6(0x1b4)]('Failed:\x20'+(_0xe72d25 instanceof Error?_0xe72d25[_0x2e44d6(0x1c0)]:String(_0xe72d25)));throw _0xe72d25;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3dd232,_0x342155){const _0x3e92ea=a23_0x32a8,_0x37f099=_0x3dd232();while(!![]){try{const _0x5968d8=parseInt(_0x3e92ea(0x1fa))/0x1+-parseInt(_0x3e92ea(0x1f8))/0x2+-parseInt(_0x3e92ea(0x1e9))/0x3+parseInt(_0x3e92ea(0x1ee))/0x4*(parseInt(_0x3e92ea(0x1f4))/0x5)+-parseInt(_0x3e92ea(0x1f9))/0x6*(parseInt(_0x3e92ea(0x1f6))/0x7)+-parseInt(_0x3e92ea(0x1ec))/0x8*(-parseInt(_0x3e92ea(0x1eb))/0x9)+-parseInt(_0x3e92ea(0x1f3))/0xa;if(_0x5968d8===_0x342155)break;else _0x37f099['push'](_0x37f099['shift']());}catch(_0x250d41){_0x37f099['push'](_0x37f099['shift']());}}}(a23_0x8fdb,0x337b6));import{getMultiAppConfigs}from'../../utils/config.js';function a23_0x32a8(_0x4f8c99,_0x278bcf){_0x4f8c99=_0x4f8c99-0x1e9;const _0x8fdbd8=a23_0x8fdb();let _0x32a8e7=_0x8fdbd8[_0x4f8c99];return _0x32a8e7;}import{CliErrors}from'../../errors.js';function a23_0x8fdb(){const _0x1c142b=['928432TwwboU','selectedAppName','merged','length','App\x20\x22','213940JMILmF','5XhAmmo','validation','950768fBvHya','filter','418108LUGfra','6DetiBm','383657wHKVkF','392217TxGyVS','join','829044AQnjYA','8phOCTr','name'];a23_0x8fdb=function(){return _0x1c142b;};return a23_0x8fdb();}export function resolveTargetApps(_0x3adaa0,_0x3b9323){const _0x40ed02=a23_0x32a8;if(_0x3b9323)return null;const _0x2d1d6a=_0x3adaa0['bool']('global')?_0x40ed02(0x1f0):'project';let _0x1aed1e=getMultiAppConfigs(_0x2d1d6a);if(!_0x1aed1e||_0x1aed1e[_0x40ed02(0x1f1)]===0x0)return null;if(_0x3adaa0[_0x40ed02(0x1ef)]){const _0x4de5be=_0x1aed1e[_0x40ed02(0x1f7)](_0x5744ed=>_0x5744ed[_0x40ed02(0x1ed)]===_0x3adaa0[_0x40ed02(0x1ef)]);if(_0x4de5be[_0x40ed02(0x1f1)]===0x0){const _0x943694=_0x1aed1e['map'](_0x34d695=>_0x34d695[_0x40ed02(0x1ed)])[_0x40ed02(0x1ea)](',\x20');throw CliErrors[_0x40ed02(0x1f5)](_0x40ed02(0x1f2)+_0x3adaa0[_0x40ed02(0x1ef)]+'\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'+_0x943694);}_0x1aed1e=_0x4de5be;}return _0x1aed1e;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a24_0x492a(_0x2fedab,_0x1414ff){_0x2fedab=_0x2fedab-0xaf;const _0x3ec7ae=a24_0x3ec7();let _0x492a79=_0x3ec7ae[_0x2fedab];return _0x492a79;}function a24_0x3ec7(){const _0x485eda=['1000596kLrDWG','cookie','Platform\x20deployment\x20sync\x20flag\x20read;\x20automatic\x20sync,\x20runtime\x20login\x20and\x20sync\x20progress\x20are\x20not\x20assessed.','detail','321400ebmonI','read','16oOVifg','563582kkepyo','appCode','33375856LmZDuA','1434509CIjwxb','app','9508254uNPpCu','Application\x20vipDeploy\x20is\x20unknown:\x20the\x20platform\x20did\x20not\x20return\x20a\x20boolean\x20flag.','9357600TdEtgs'];a24_0x3ec7=function(){return _0x485eda;};return a24_0x3ec7();}const a24_0x31c706=a24_0x492a;(function(_0x16849c,_0x2469b0){const _0x21d4cf=a24_0x492a,_0x411b99=_0x16849c();while(!![]){try{const _0xeff92f=-parseInt(_0x21d4cf(0xaf))/0x1+-parseInt(_0x21d4cf(0xbb))/0x2+-parseInt(_0x21d4cf(0xb4))/0x3*(parseInt(_0x21d4cf(0xba))/0x4)+-parseInt(_0x21d4cf(0xb8))/0x5+-parseInt(_0x21d4cf(0xb1))/0x6+parseInt(_0x21d4cf(0xb3))/0x7+parseInt(_0x21d4cf(0xbd))/0x8;if(_0xeff92f===_0x2469b0)break;else _0x411b99['push'](_0x411b99['shift']());}catch(_0x4274ec){_0x411b99['push'](_0x411b99['shift']());}}}(a24_0x3ec7,0xc5995));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getAppVipDeploy}from'../../core/api-client.js';export const appDetailDefinition={'service':a24_0x31c706(0xb0),'command':a24_0x31c706(0xb7),'description':'Read\x20the\x20platform\x27s\x20vipDeploy\x20flag\x20for\x20independent\x20deployment\x20data\x20sync','risk':a24_0x31c706(0xb9),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x42d169){const _0x4827ea=a24_0x31c706,_0x1ca09a=await getAppVipDeploy(_0x42d169[_0x4827ea(0xbc)],_0x42d169[_0x4827ea(0xb5)]);return{'ok':!![],'data':{'vipDeploy':_0x1ca09a??null},'message':_0x1ca09a===undefined?_0x4827ea(0xb2):_0x4827ea(0xb6)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xb9643,_0x1a8703){const _0x1629e7=a25_0x2cfe,_0x1aeb03=_0xb9643();while(!![]){try{const _0x4ba80a=parseInt(_0x1629e7(0xd3))/0x1+-parseInt(_0x1629e7(0xd4))/0x2+-parseInt(_0x1629e7(0xd8))/0x3*(parseInt(_0x1629e7(0xd1))/0x4)+parseInt(_0x1629e7(0xd0))/0x5+parseInt(_0x1629e7(0xd7))/0x6*(-parseInt(_0x1629e7(0xd6))/0x7)+-parseInt(_0x1629e7(0xd5))/0x8+parseInt(_0x1629e7(0xd2))/0x9;if(_0x4ba80a===_0x1a8703)break;else _0x1aeb03['push'](_0x1aeb03['shift']());}catch(_0xd3a2d3){_0x1aeb03['push'](_0x1aeb03['shift']());}}}(a25_0x32ca,0xd9a85));import{appListDefinition}from'../../commands/app/list.js';import{appMembersListDefinition}from'../../commands/app/members-list.js';function a25_0x32ca(){const _0x41a5fd=['9cQKfMf','4369355DfQxhA','2017636pJSqkF','17528148qzxkHU','1532650Nlbzqo','1898504PgWJWe','6486552auLfhg','14721XmrYif','540FuqEFG'];a25_0x32ca=function(){return _0x41a5fd;};return a25_0x32ca();}import{appDetailDefinition}from'../../commands/app/detail.js';function a25_0x2cfe(_0x5ba8cb,_0x12d503){_0x5ba8cb=_0x5ba8cb-0xd0;const _0x32ca69=a25_0x32ca();let _0x2cfe47=_0x32ca69[_0x5ba8cb];return _0x2cfe47;}export const appDefinitions=[appListDefinition,appDetailDefinition,appMembersListDefinition];
|
package/lib/commands/app/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a26_0x3463(_0x25c7eb,_0x40c9a9){_0x25c7eb=_0x25c7eb-0xcd;const _0x2dabc5=a26_0x2dab();let _0x346356=_0x2dabc5[_0x25c7eb];return _0x346356;}const a26_0x13235a=a26_0x3463;(function(_0x5926a9,_0x3cc3f3){const _0x22b5ec=a26_0x3463,_0x3f8161=_0x5926a9();while(!![]){try{const _0x2afae8=-parseInt(_0x22b5ec(0xd3))/0x1+-parseInt(_0x22b5ec(0xd6))/0x2*(-parseInt(_0x22b5ec(0xe5))/0x3)+parseInt(_0x22b5ec(0xdb))/0x4*(parseInt(_0x22b5ec(0xd5))/0x5)+-parseInt(_0x22b5ec(0xd1))/0x6*(parseInt(_0x22b5ec(0xfa))/0x7)+-parseInt(_0x22b5ec(0xdc))/0x8*(-parseInt(_0x22b5ec(0xea))/0x9)+parseInt(_0x22b5ec(0xf6))/0xa*(-parseInt(_0x22b5ec(0xd9))/0xb)+parseInt(_0x22b5ec(0xe9))/0xc;if(_0x2afae8===_0x3cc3f3)break;else _0x3f8161['push'](_0x3f8161['shift']());}catch(_0x7217b2){_0x3f8161['push'](_0x3f8161['shift']());}}}(a26_0x2dab,0xc6145));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';import{resolveEffectiveRegion}from'../../config/region-config.js';function buildItemsFromLayer(_0x2275fa,_0xa62db6,_0x37de0a){const _0x18c862=a26_0x3463,_0x1ee49d=[],_0x122bb6=_0x2275fa['apps']&&typeof _0x2275fa[_0x18c862(0xe6)]===_0x18c862(0xef)?_0x2275fa[_0x18c862(0xe6)]:{},_0x21b18a=_0x2275fa['defaultApp']||undefined,_0x252e81=_0x21b18a??(Object['keys'](_0x122bb6)['length']===0x1?Object[_0x18c862(0xdf)](_0x122bb6)[0x0]:undefined);for(const [_0x1188d3,_0x56990e]of Object['entries'](_0x122bb6)){if(!_0x56990e||typeof _0x56990e!==_0x18c862(0xef)||!_0x56990e['appcode'])continue;const _0x4f5134=resolveEffectiveRegion({'appRegion':_0x56990e['region'],'projectRegion':_0xa62db6===_0x18c862(0xd2)?_0x2275fa['region']:undefined,'globalRegion':_0xa62db6==='global'?_0x2275fa[_0x18c862(0xdd)]:_0x37de0a,'appName':_0x1188d3});_0x1ee49d[_0x18c862(0xf7)]({'name':_0x1188d3,'appcode':_0x56990e[_0x18c862(0xf2)],'named':!![],'definedIn':_0xa62db6,'isDefault':_0x1188d3===_0x252e81,...buildAppProfileListFields(_0x56990e),'effectiveRegion':_0x4f5134[_0x18c862(0xdd)],'regionSource':_0x4f5134[_0x18c862(0xe2)]});}return _0x1ee49d;}function buildMergedItems(_0x3a8db3,_0x26dc6a){const _0x290697=a26_0x3463,{apps:apps={}}=_0x3a8db3,_0x122f06=_0x3a8db3['defaultApp'],_0x13f27=_0x122f06??(Object[_0x290697(0xdf)](apps)[_0x290697(0xf8)]===0x1?Object['keys'](apps)[0x0]:undefined),_0x2f3811=_0x26dc6a['globalConfig'][_0x290697(0xe6)]&&typeof _0x26dc6a[_0x290697(0xf3)][_0x290697(0xe6)]===_0x290697(0xef)?_0x26dc6a[_0x290697(0xf3)][_0x290697(0xe6)]:{},_0xdb8b3e=_0x26dc6a[_0x290697(0xf4)][_0x290697(0xe6)]&&typeof _0x26dc6a['projectConfig'][_0x290697(0xe6)]===_0x290697(0xef)?_0x26dc6a[_0x290697(0xf4)][_0x290697(0xe6)]:{},_0x42cb60=Object[_0x290697(0xee)](apps),_0x78e9ed=_0x42cb60[_0x290697(0xf5)](([_0x117403,_0x2ea36d])=>{const _0x597178=_0x290697,_0x4a630f=appDefinedIn(_0x117403,_0x2f3811,_0xdb8b3e),_0x4f561d=Object[_0x597178(0xd4)]['hasOwnProperty']['call'](_0xdb8b3e,_0x117403),_0x198002=resolveEffectiveRegion({'appRegion':_0x2ea36d['region'],'projectRegion':_0x4f561d?_0x26dc6a[_0x597178(0xf4)]['region']:undefined,'globalRegion':_0x26dc6a[_0x597178(0xf3)]['region'],'mergedRegion':_0x3a8db3[_0x597178(0xdd)],'appName':_0x117403});return{'name':_0x117403,'appcode':_0x2ea36d['appcode'],'named':!![],'definedIn':_0x4a630f,'isDefault':_0x117403===_0x13f27,...buildAppProfileListFields(_0x2ea36d),'effectiveRegion':_0x198002[_0x597178(0xdd)],'regionSource':_0x198002[_0x597178(0xe2)]};});return _0x78e9ed;}function a26_0x2dab(){const _0x52a10b=['\x20config','25781424ICKecn','99XPTFLO','name','app','isCurrent','entries','object','find','bool','appcode','globalConfig','projectConfig','map','10eXbrwV','push','length','read','7jQxLoh','remote','\x20in\x20','projectPath','list','global','merged','4080306pjHAjN','project','890964cWPAdK','prototype','497845xXgekv','6sCogFz','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','13400959heeQoI','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','4KWimtV','268024SLMxgE','region','boolean','keys','.\x20Use\x20`','optional','source','mergedCli','globalPath','984063YdOMjP','apps','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json'];a26_0x2dab=function(){return _0x52a10b;};return a26_0x2dab();}function validateAppListFlags(_0x46bbb9){const _0x2dcd5d=a26_0x3463;if(!_0x46bbb9[_0x2dcd5d(0xf1)](_0x2dcd5d(0xfb)))return;if(!_0x46bbb9[_0x2dcd5d(0xf1)](_0x2dcd5d(0xcf))&&!_0x46bbb9[_0x2dcd5d(0xf1)](_0x2dcd5d(0xd2)))return;throw CliErrors['validation'](_0x2dcd5d(0xd8),_0x2dcd5d(0xd7));}async function execute(_0x3e710c){const _0x556a75=a26_0x3463;validateAppListFlags(_0x3e710c);if(_0x3e710c[_0x556a75(0xf1)](_0x556a75(0xfb)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x3e710c)};const _0x139b8=_0x3e710c['bool'](_0x556a75(0xcf)),_0x53705a=_0x3e710c[_0x556a75(0xf1)](_0x556a75(0xd2)),_0x2c4447=_0x139b8?_0x556a75(0xcf):_0x53705a?_0x556a75(0xd2):_0x556a75(0xd0),{config:_0x1d798a,layers:_0x5af17b}=readRawConfigWithLayers(),_0x160ea4=resolveDefaultAppSource(_0x5af17b),{defaultApp:_0x29e419}=_0x1d798a;let _0x358edd,_0xbf9291;switch(_0x2c4447){case _0x556a75(0xcf):_0x358edd=buildItemsFromLayer(_0x5af17b['globalConfig'],'global'),_0xbf9291=_0x5af17b[_0x556a75(0xe4)];break;case _0x556a75(0xd2):_0x358edd=buildItemsFromLayer(_0x5af17b[_0x556a75(0xf4)],'project',_0x5af17b['globalConfig']['region']),_0xbf9291=_0x5af17b[_0x556a75(0xcd)];break;default:_0x358edd=buildMergedItems(_0x1d798a,_0x5af17b);break;}enrichAppListItemsWithMergedSelection(_0x358edd,_0x3e710c[_0x556a75(0xe3)]);if(_0x358edd[_0x556a75(0xf8)]===0x0){const _0x4363a2=_0x2c4447===_0x556a75(0xd0)?'':_0x556a75(0xfc)+_0x2c4447+_0x556a75(0xe8);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x4363a2+_0x556a75(0xe0)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'};}const _0x23b1de=_0x358edd[_0x556a75(0xf0)](_0x3c8970=>_0x3c8970[_0x556a75(0xed)]===!![]),_0x4f837b=_0x29e419??_0x23b1de?.[_0x556a75(0xeb)]??null,_0x284da2=_0x2c4447===_0x556a75(0xd0)?{'globalPath':_0x5af17b[_0x556a75(0xe4)]??null,'projectPath':_0x5af17b[_0x556a75(0xcd)]??null,'defaultApp':_0x4f837b,'defaultAppSource':_0x29e419!=null?_0x160ea4:null}:{'scope':_0x2c4447,'configPath':_0xbf9291??null};return{'ok':!![],'data':{'items':_0x358edd,'meta':_0x284da2}};}export const appListDefinition={'service':a26_0x13235a(0xec),'command':a26_0x13235a(0xce),'description':a26_0x13235a(0xda),'risk':a26_0x13235a(0xf9),'auth':a26_0x13235a(0xe1),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a26_0x13235a(0xfb),'type':a26_0x13235a(0xde),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':a26_0x13235a(0xcf),'type':a26_0x13235a(0xde),'description':a26_0x13235a(0xe7),'default':![]},{'name':a26_0x13235a(0xd2),'type':a26_0x13235a(0xde),'description':'Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','default':![]}],async 'validate'(_0x4035b5){validateAppListFlags(_0x4035b5);},'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a27_0x57d99c=a27_0x17c2;(function(_0x290809,_0x2cd85c){const _0x7f8d12=a27_0x17c2,_0x46e932=_0x290809();while(!![]){try{const _0x1247d3=-parseInt(_0x7f8d12(0x178))/0x1*(-parseInt(_0x7f8d12(0x180))/0x2)+-parseInt(_0x7f8d12(0x17f))/0x3+-parseInt(_0x7f8d12(0x177))/0x4+-parseInt(_0x7f8d12(0x17d))/0x5*(-parseInt(_0x7f8d12(0x17b))/0x6)+-parseInt(_0x7f8d12(0x179))/0x7+parseInt(_0x7f8d12(0x182))/0x8*(parseInt(_0x7f8d12(0x184))/0x9)+-parseInt(_0x7f8d12(0x17e))/0xa*(-parseInt(_0x7f8d12(0x17c))/0xb);if(_0x1247d3===_0x2cd85c)break;else _0x46e932['push'](_0x46e932['shift']());}catch(_0x530fec){_0x46e932['push'](_0x46e932['shift']());}}}(a27_0x38b1,0x82955));function a27_0x17c2(_0x386771,_0x1ff68f){_0x386771=_0x386771-0x176;const _0x38b1b9=a27_0x38b1();let _0x17c28a=_0x38b1b9[_0x386771];return _0x17c28a;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';function a27_0x38b1(){const _0x21546c=['appCode','109480AOZWma','305714PZroEG','5050157Zcwvgl','\x20application\x20member(s)','32628UFtjFZ','451ScWRKs','280OHmuww','27190YTNwCi','304392gGOmXE','6hctkoj','length','138680iXkByv','List\x20application\x20members\x20with\x20their\x20role\x20memberships','27MYsmJY','Found\x20','read'];a27_0x38b1=function(){return _0x21546c;};return a27_0x38b1();}export const appMembersListDefinition={'service':'app','command':'members-list','description':a27_0x57d99c(0x183),'risk':a27_0x57d99c(0x186),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5d0fae){const _0x1e30db=a27_0x57d99c,_0x331e9b=projectAppMembers(await listRoleUsers(_0x5d0fae[_0x1e30db(0x176)]));return{'ok':!![],'data':{'appCode':_0x5d0fae[_0x1e30db(0x176)],'items':_0x331e9b,'totalCount':_0x331e9b[_0x1e30db(0x181)]},'message':_0x1e30db(0x185)+_0x331e9b['length']+_0x1e30db(0x17a)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32606f,_0x2cb385){const _0x4d66b6=a28_0x2c5c,_0x5d4097=_0x32606f();while(!![]){try{const _0x111efd=-parseInt(_0x4d66b6(0x1e1))/0x1*(parseInt(_0x4d66b6(0x1e5))/0x2)+parseInt(_0x4d66b6(0x1e2))/0x3+-parseInt(_0x4d66b6(0x1df))/0x4+parseInt(_0x4d66b6(0x1de))/0x5+parseInt(_0x4d66b6(0x1e6))/0x6+-parseInt(_0x4d66b6(0x1e4))/0x7+parseInt(_0x4d66b6(0x1e7))/0x8;if(_0x111efd===_0x2cb385)break;else _0x5d4097['push'](_0x5d4097['shift']());}catch(_0x490bf2){_0x5d4097['push'](_0x5d4097['shift']());}}}(a28_0x262e,0x2310c));import{listRemoteApps}from'../../core/api-client.js';function a28_0x2c5c(_0x355860,_0x28985e){_0x355860=_0x355860-0x1dd;const _0x262e29=a28_0x262e();let _0x2c5c7b=_0x262e29[_0x355860];return _0x2c5c7b;}import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';function a28_0x262e(){const _0x4d26e5=['742595PvtKyg','888212ILsvXB','platform','695QbpNBy','697788TmwGXM','appName','939281jyiYBh','322AhkPaK','590238meabuv','1058168rHYQpM','authRequired','appDesc'];a28_0x262e=function(){return _0x4d26e5;};return a28_0x262e();}import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x4a56cd){const _0x134827=a28_0x2c5c,_0x38834b=_0x4a56cd['cookie']||getCookie();if(!_0x38834b)throw CliErrors[_0x134827(0x1e8)]();return _0x38834b;}export async function listRemoteAppDirectory(_0x2798b7){const _0x382bee=a28_0x2c5c,_0x39ea7f=await withActiveCookie(resolveCookie(_0x2798b7),()=>listRemoteApps());return{'items':_0x39ea7f['map'](_0x50f5a1=>({..._0x50f5a1['id']!=null?{'id':_0x50f5a1['id']}:{},'appCode':_0x50f5a1['appCode'],'appName':_0x50f5a1[_0x382bee(0x1e3)],..._0x50f5a1[_0x382bee(0x1dd)]!=null?{'appDesc':_0x50f5a1[_0x382bee(0x1dd)]}:{}})),'meta':{'source':_0x382bee(0x1e0)}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15fb63,_0x267d6a){const _0x5b3709=a29_0x3801,_0x5e0b4d=_0x15fb63();while(!![]){try{const _0x3676e9=-parseInt(_0x5b3709(0xfb))/0x1+-parseInt(_0x5b3709(0xdf))/0x2*(-parseInt(_0x5b3709(0xfc))/0x3)+-parseInt(_0x5b3709(0xf2))/0x4*(parseInt(_0x5b3709(0x101))/0x5)+parseInt(_0x5b3709(0xe4))/0x6+-parseInt(_0x5b3709(0x103))/0x7*(parseInt(_0x5b3709(0x102))/0x8)+parseInt(_0x5b3709(0xdc))/0x9*(parseInt(_0x5b3709(0xe0))/0xa)+parseInt(_0x5b3709(0xd4))/0xb;if(_0x3676e9===_0x267d6a)break;else _0x5e0b4d['push'](_0x5e0b4d['shift']());}catch(_0x131536){_0x5e0b4d['push'](_0x5e0b4d['shift']());}}}(a29_0x43aa,0xceeb0));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x536cad){const _0x5e8d51=_0x536cad?.['trim']();return _0x5e8d51?_0x5e8d51:null;}export function projectAppMembers(_0x5da7cb){const _0x3e3242=a29_0x3801,_0xf066c1=new Map(),_0x5e13ab=[..._0x5da7cb][_0x3e3242(0xd3)]((_0x428fc4,_0x2051ed)=>_0x428fc4['id']-_0x2051ed['id']),_0x14832c=(_0x5a0707,_0xbe8c6e,_0x4826b3)=>{const _0x4ff421=_0x3e3242;for(const _0x46935d of _0xbe8c6e){const _0x23234f=Number(_0x46935d[_0x4ff421(0xfa)]);if(!Number['isFinite'](_0x23234f)||_0x23234f<=0x0)continue;let _0x45d69a=_0xf066c1['get'](_0x23234f);if(!_0x45d69a)_0x45d69a={'userId':_0x23234f,'username':nullableText(_0x46935d[_0x4ff421(0xe1)]),'displayName':nullableText(_0x46935d[_0x4ff421(0xff)]),'status':_0x4826b3,'roles':[],'roleKeys':new Set()},_0xf066c1[_0x4ff421(0xfe)](_0x23234f,_0x45d69a);else{_0x45d69a['username']??=nullableText(_0x46935d[_0x4ff421(0xe1)]),_0x45d69a[_0x4ff421(0xdd)]??=nullableText(_0x46935d[_0x4ff421(0xff)]);if(_0x4826b3===_0x4ff421(0xd6))_0x45d69a['status']=_0x4ff421(0xd6);}const _0x278e12=_0x5a0707['id']+':'+_0x4826b3;if(_0x45d69a[_0x4ff421(0xeb)][_0x4ff421(0x105)](_0x278e12))continue;_0x45d69a['roleKeys'][_0x4ff421(0xf6)](_0x278e12),_0x45d69a[_0x4ff421(0xf9)][_0x4ff421(0xde)]({'roleId':_0x5a0707['id'],'roleCode':_0x5a0707[_0x4ff421(0xf1)],'roleName':nullableText(_0x5a0707[_0x4ff421(0x104)]),'roleType':nullableText(_0x5a0707['roleType']),'membershipStatus':_0x4826b3});}};for(const _0x251e51 of _0x5e13ab){_0x14832c(_0x251e51,_0x251e51[_0x3e3242(0xe7)]??[],_0x3e3242(0xd6)),_0x14832c(_0x251e51,_0x251e51[_0x3e3242(0xf5)]??[],_0x3e3242(0xec));}return[..._0xf066c1[_0x3e3242(0xfd)]()]['map'](_0x118cf5=>({'userId':_0x118cf5['userId'],'username':_0x118cf5['username'],'displayName':_0x118cf5[_0x3e3242(0xdd)],'status':_0x118cf5['status'],'roles':_0x118cf5[_0x3e3242(0xf9)][_0x3e3242(0xd3)]((_0x2965f6,_0x591e29)=>_0x2965f6[_0x3e3242(0x100)]-_0x591e29[_0x3e3242(0x100)]||(_0x2965f6[_0x3e3242(0xf8)]===_0x591e29['membershipStatus']?0x0:_0x2965f6['membershipStatus']==='ACTIVE'?-0x1:0x1))}))[_0x3e3242(0xd3)]((_0x277217,_0x41a5d3)=>_0x277217[_0x3e3242(0xfa)]-_0x41a5d3[_0x3e3242(0xfa)]);}export function enrichAppListItemsWithMergedSelection(_0x2b025b,_0x523cb9){const _0x1d2795=a29_0x3801;if(!_0x523cb9)return;const _0x2df11a=_0x523cb9[_0x1d2795(0xf3)]&&typeof _0x523cb9['apps']===_0x1d2795(0xda)?_0x523cb9[_0x1d2795(0xf3)]:{},_0x272b88=Object[_0x1d2795(0xd8)](_0x2df11a)[_0x1d2795(0xd7)]>0x0;for(const _0x3e7bf3 of _0x2b025b){_0x3e7bf3[_0x1d2795(0xee)]=![];}const _0x1dd165=_0x523cb9['appCode']!=null?String(_0x523cb9['appCode'])[_0x1d2795(0xe5)]():'';if(_0x272b88){const _0x308d94=_0x523cb9[_0x1d2795(0xe6)]??_0x523cb9['defaultApp'];if(_0x308d94)for(const _0x309a89 of _0x2b025b){_0x309a89[_0x1d2795(0xe9)]===!![]&&_0x309a89[_0x1d2795(0xe3)]===_0x308d94&&(_0x309a89[_0x1d2795(0xee)]=!![]);}for(const _0x5dbc65 of _0x2b025b){if(_0x5dbc65[_0x1d2795(0xe9)]!==![])continue;if(_0x523cb9[_0x1d2795(0xef)])continue;_0x1dd165&&String(_0x5dbc65[_0x1d2795(0xed)]??'')[_0x1d2795(0xe5)]()===_0x1dd165&&(_0x5dbc65[_0x1d2795(0xee)]=!![]);}return;}if(!_0x1dd165)return;for(const _0x518101 of _0x2b025b){String(_0x518101[_0x1d2795(0xed)]??'')['trim']()===_0x1dd165&&(_0x518101[_0x1d2795(0xee)]=!![]);}}export function resolveAppScopeForWrite(_0xa623cf,_0x1a22b2,_0xd6926e){const _0x585313=a29_0x3801;if(_0x1a22b2)return _0x585313(0xea);const _0x539d58=_0xd6926e[_0x585313(0xd5)]['apps']&&typeof _0xd6926e[_0x585313(0xd5)][_0x585313(0xf3)]==='object'?_0xd6926e['projectConfig'][_0x585313(0xf3)]:{},_0x550cdc=_0xd6926e['globalConfig'][_0x585313(0xf3)]&&typeof _0xd6926e['globalConfig'][_0x585313(0xf3)]===_0x585313(0xda)?_0xd6926e['globalConfig']['apps']:{};if(Object['prototype']['hasOwnProperty'][_0x585313(0xdb)](_0x539d58,_0xa623cf))return _0x585313(0xf4);if(Object['prototype'][_0x585313(0xf0)][_0x585313(0xdb)](_0x550cdc,_0xa623cf))return _0x585313(0xea);return _0x585313(0xf4);}export function appDefinedIn(_0x280f08,_0x428d24,_0x381ee5){const _0x284d21=a29_0x3801,_0x3b3315=Object[_0x284d21(0xe8)][_0x284d21(0xf0)][_0x284d21(0xdb)](_0x428d24,_0x280f08),_0x43fc3a=Object[_0x284d21(0xe8)]['hasOwnProperty'][_0x284d21(0xdb)](_0x381ee5,_0x280f08);if(_0x3b3315&&_0x43fc3a)return _0x284d21(0xd9);if(_0x43fc3a)return _0x284d21(0xf4);return'global';}export function resolveDefaultAppSource(_0x51d53d){const _0x12fe79=a29_0x3801,_0x4dd2f4=_0x51d53d['projectConfig']['apps']&&typeof _0x51d53d[_0x12fe79(0xd5)][_0x12fe79(0xf3)]===_0x12fe79(0xda)?_0x51d53d[_0x12fe79(0xd5)]['apps']:{};if(_0x12fe79(0xef)in _0x51d53d[_0x12fe79(0xd5)])return _0x12fe79(0xf4);if(Object['keys'](_0x4dd2f4)['length']>0x0)return _0x12fe79(0xf4);if(Object[_0x12fe79(0xd8)](_0x51d53d[_0x12fe79(0xd5)])['length']===0x0&&_0x51d53d[_0x12fe79(0xf7)][_0x12fe79(0xef)])return _0x12fe79(0xea);return null;}export function getConfigPath(_0x3a1204={}){const _0x58f046=a29_0x3801,_0xc334ed=_0x3a1204[_0x58f046(0xea)]?_0x58f046(0xea):_0x58f046(0xf4);return resolveWriteConfigPath(_0xc334ed);}export function readConfig(_0xa6a900={}){return readConfigFile(getConfigPath(_0xa6a900));}function a29_0x43aa(){const _0x3b89e2=['PENDING','appcode','isCurrent','defaultApp','hasOwnProperty','roleCode','475924KRHDmy','apps','project','applyUserList','add','globalConfig','membershipStatus','roles','userId','1527149Pjetpk','999051gNvHoR','values','set','nickname','roleId','35IiFeTi','4450472zMGiaR','21DnXreQ','roleName','has','sort','28363313dhsZNs','projectConfig','ACTIVE','length','keys','both','object','call','9ngVyNT','displayName','push','10JHQMAv','5660810zxkIEV','username','\x20(global)','name','400980ePrQPq','trim','currentApp','userList','prototype','named','global','roleKeys'];a29_0x43aa=function(){return _0x3b89e2;};return a29_0x43aa();}function a29_0x3801(_0x648d89,_0x423e6c){_0x648d89=_0x648d89-0xd3;const _0x43aa90=a29_0x43aa();let _0x380141=_0x43aa90[_0x648d89];return _0x380141;}export function writeConfig(_0x1a3a2b,_0x2e50fd={}){writeConfigFile(getConfigPath(_0x2e50fd),_0x1a3a2b);}export function scopeLabel(_0x22f109){const _0x32bd08=a29_0x3801;return _0x22f109[_0x32bd08(0xea)]?_0x32bd08(0xe2):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a30_0x54c526=a30_0x159d;(function(_0xd4ae1c,_0x427670){const _0x8aca1=a30_0x159d,_0x4dc61e=_0xd4ae1c();while(!![]){try{const _0x17cb27=-parseInt(_0x8aca1(0x86))/0x1*(parseInt(_0x8aca1(0x80))/0x2)+parseInt(_0x8aca1(0x8d))/0x3+-parseInt(_0x8aca1(0x89))/0x4+-parseInt(_0x8aca1(0x8e))/0x5*(parseInt(_0x8aca1(0x7e))/0x6)+parseInt(_0x8aca1(0x78))/0x7+parseInt(_0x8aca1(0x7f))/0x8*(-parseInt(_0x8aca1(0x87))/0x9)+-parseInt(_0x8aca1(0x79))/0xa*(-parseInt(_0x8aca1(0x77))/0xb);if(_0x17cb27===_0x427670)break;else _0x4dc61e['push'](_0x4dc61e['shift']());}catch(_0x2496f1){_0x4dc61e['push'](_0x4dc61e['shift']());}}}(a30_0xfe96,0xebde3));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a30_0x159d(_0x1618d2,_0x161753){_0x1618d2=_0x1618d2-0x77;const _0xfe96c8=a30_0xfe96();let _0x159d49=_0xfe96c8[_0x1618d2];return _0x159d49;}const DELETE_PATH=a30_0x54c526(0x8b);function a30_0xfe96(){const _0x1586a7=['Deleted\x20app\x20config\x20','apiError','18TXVbQG','352CpGpTk','10JLsWvY','appCode','delete','App\x20config\x20server\x20id\x20missing\x20for\x20key=','get','isFinite','30599pYRaJM','295992qWyRQn','appCode:\x20','5284580lxyUDk','App\x20config\x20key\x20not\x20found:\x20','/smartapi/app-config/delete','validation','332199CUQfZW','2282165JHFXky','36599937vPXriv','12730382ZvJIoY','10DzviKY','Delete\x20one\x20runtime\x20app-config\x20key','number'];a30_0xfe96=function(){return _0x1586a7;};return a30_0xfe96();}export const appConfigDelete={'service':'app-config','command':a30_0x54c526(0x82),'description':a30_0x54c526(0x7a),'risk':'high-risk-write','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x354201){readKeyArg(_0x354201);},async 'dryRun'(_0x56432f){const _0x3ddfc0=a30_0x54c526,_0x173bb7=readKeyArg(_0x56432f),_0x56040b=await mustGetByKey(_0x56432f[_0x3ddfc0(0x81)],_0x173bb7);return asAppConfigDryRunResult(buildMutationData({'operation':'delete','appCode':_0x56432f[_0x3ddfc0(0x81)],'key':_0x173bb7,'before':projectAppConfig(_0x56040b),'after':null,'dryRun':!![]}),{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x24ab8b){const _0x11c46f=a30_0x54c526,_0x2afe74=readKeyArg(_0x24ab8b),_0x24924c=await mustGetByKey(_0x24ab8b['appCode'],_0x2afe74);return await withAppConfigApiBoundary(_0x11c46f(0x82),{'appCode':_0x24ab8b[_0x11c46f(0x81)],'key':_0x2afe74},()=>deleteAppConfig({'appCode':_0x24ab8b['appCode'],'id':requireAppConfigId(_0x24924c,_0x2afe74,_0x24ab8b['appCode'])})),{'ok':!![],'data':buildMutationData({'operation':_0x11c46f(0x82),'appCode':_0x24ab8b[_0x11c46f(0x81)],'key':_0x2afe74,'before':projectAppConfig(_0x24924c),'after':null,'dryRun':![]}),'message':_0x11c46f(0x7c)+_0x2afe74};}};async function mustGetByKey(_0x15aba6,_0x53a67f){const _0x1428cd=a30_0x54c526,_0x2c78a3=await withAppConfigApiBoundary(_0x1428cd(0x84),{'appCode':_0x15aba6,'key':_0x53a67f},()=>getAppConfigByKey(_0x15aba6,_0x53a67f));if(!_0x2c78a3)throw CliErrors[_0x1428cd(0x8c)](_0x1428cd(0x8a)+_0x53a67f,_0x1428cd(0x88)+_0x15aba6);return _0x2c78a3;}function requireAppConfigId(_0x254b21,_0x271359,_0x28a26a){const _0x35fd6f=a30_0x54c526;if(typeof _0x254b21['id']===_0x35fd6f(0x7b)&&Number[_0x35fd6f(0x85)](_0x254b21['id'])&&_0x254b21['id']>0x0)return _0x254b21['id'];throw CliErrors[_0x35fd6f(0x7d)](_0x35fd6f(0x83)+_0x271359+',\x20appCode='+_0x28a26a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x3f6c5b=a31_0x1065;function a31_0x1065(_0x3d81cc,_0x55eedf){_0x3d81cc=_0x3d81cc-0xdb;const _0x25e526=a31_0x25e5();let _0x1065d1=_0x25e526[_0x3d81cc];return _0x1065d1;}(function(_0x4072de,_0xcb5ebc){const _0x2d1970=a31_0x1065,_0x26f20a=_0x4072de();while(!![]){try{const _0x4198be=parseInt(_0x2d1970(0xed))/0x1*(parseInt(_0x2d1970(0xea))/0x2)+-parseInt(_0x2d1970(0xe9))/0x3*(-parseInt(_0x2d1970(0xe4))/0x4)+parseInt(_0x2d1970(0xeb))/0x5+parseInt(_0x2d1970(0xe2))/0x6+-parseInt(_0x2d1970(0xe7))/0x7+parseInt(_0x2d1970(0xe3))/0x8+-parseInt(_0x2d1970(0xef))/0x9*(parseInt(_0x2d1970(0xde))/0xa);if(_0x4198be===_0xcb5ebc)break;else _0x26f20a['push'](_0x26f20a['shift']());}catch(_0x910dbc){_0x26f20a['push'](_0x26f20a['shift']());}}}(a31_0x25e5,0x3e6ac));import{getAppConfigByKey}from'../../core/api-client.js';function a31_0x25e5(){const _0x3590c4=['read','321845txPmdi','appCode','638451MhkpEZ','reveal','app-config','validation','160MIYZlh','bool','\x20with\x20value\x20revealed','\x20with\x20value\x20redacted','1747236JdwAls','3207816DvZopd','92ERClJw','appCode:\x20','get','1519014Royxjj','Loaded\x20app\x20config\x20','39555TiVhGG','2ioMYJz','1452015zBHWql'];a31_0x25e5=function(){return _0x3590c4;};return a31_0x25e5();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a31_0x3f6c5b(0xdc),'command':a31_0x3f6c5b(0xe6),'description':'Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','risk':a31_0x3f6c5b(0xec),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x56e380){readKeyArg(_0x56e380);},async 'execute'(_0x53bda6){const _0x2fa938=a31_0x3f6c5b,_0xe15653=readKeyArg(_0x53bda6),_0x9ef76f=await withAppConfigApiBoundary(_0x2fa938(0xe6),{'appCode':_0x53bda6[_0x2fa938(0xee)],'key':_0xe15653},()=>getAppConfigByKey(_0x53bda6[_0x2fa938(0xee)],_0xe15653));if(!_0x9ef76f)throw CliErrors[_0x2fa938(0xdd)]('App\x20config\x20key\x20not\x20found:\x20'+_0xe15653,_0x2fa938(0xe5)+_0x53bda6['appCode']);const _0x511af5=projectAppConfig(_0x9ef76f,{'reveal':_0x53bda6[_0x2fa938(0xdf)](_0x2fa938(0xdb))});return{'ok':!![],'data':{'config':_0x511af5},'message':_0x53bda6[_0x2fa938(0xdf)](_0x2fa938(0xdb))?'Loaded\x20app\x20config\x20'+_0xe15653+_0x2fa938(0xe0):_0x2fa938(0xe8)+_0xe15653+_0x2fa938(0xe1)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe7fdcb,_0x44914d){const _0x560537=a32_0x4b45,_0x55271b=_0xe7fdcb();while(!![]){try{const _0x125aa3=-parseInt(_0x560537(0x10e))/0x1+-parseInt(_0x560537(0x109))/0x2+parseInt(_0x560537(0x10c))/0x3+-parseInt(_0x560537(0x10d))/0x4*(-parseInt(_0x560537(0x110))/0x5)+-parseInt(_0x560537(0x10a))/0x6+-parseInt(_0x560537(0x108))/0x7*(parseInt(_0x560537(0x10b))/0x8)+parseInt(_0x560537(0x10f))/0x9;if(_0x125aa3===_0x44914d)break;else _0x55271b['push'](_0x55271b['shift']());}catch(_0x11a943){_0x55271b['push'](_0x55271b['shift']());}}}(a32_0x5786,0x885bf));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';function a32_0x5786(){const _0x5be562=['24TJUFlM','1561902bRMoAG','224612ewTLQg','57083NCfvGo','5922108DmAKMG','95iqXjgP','1909810AVxolL','1326166EcqxZQ','890220gaPyxm'];a32_0x5786=function(){return _0x5be562;};return a32_0x5786();}import{appConfigDelete}from'../../commands/app-config/delete.js';function a32_0x4b45(_0x34650d,_0x513247){_0x34650d=_0x34650d-0x108;const _0x5786e1=a32_0x5786();let _0x4b45be=_0x5786e1[_0x34650d];return _0x4b45be;}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a33_0x4afeb2=a33_0x227f;(function(_0xceb39d,_0x571a81){const _0x5d843a=a33_0x227f,_0x4b6434=_0xceb39d();while(!![]){try{const _0x2b72d7=parseInt(_0x5d843a(0x18d))/0x1+-parseInt(_0x5d843a(0x179))/0x2*(-parseInt(_0x5d843a(0x187))/0x3)+-parseInt(_0x5d843a(0x17b))/0x4*(parseInt(_0x5d843a(0x186))/0x5)+-parseInt(_0x5d843a(0x181))/0x6+parseInt(_0x5d843a(0x18c))/0x7+parseInt(_0x5d843a(0x17e))/0x8+-parseInt(_0x5d843a(0x17d))/0x9;if(_0x2b72d7===_0x571a81)break;else _0x4b6434['push'](_0x4b6434['shift']());}catch(_0x54defa){_0x4b6434['push'](_0x4b6434['shift']());}}}(a33_0x17a9,0x81497));function a33_0x17a9(){const _0x30e23e=['key','5PADpYk','582801Agonhu','app-config','Found\x20','list','\x20app\x20config(s)','5693632itvPwG','267325ERoAds','2tTkBbE','map','3241808zuHQqx','Filter\x20by\x20exact\x20config\x20key','1620063kqddUt','5338232KFqOKq','appCode','string','2533374qDUTHa','trim','str','length'];a33_0x17a9=function(){return _0x30e23e;};return a33_0x17a9();}function a33_0x227f(_0xa86a56,_0x4aa5a0){_0xa86a56=_0xa86a56-0x179;const _0x17a97e=a33_0x17a9();let _0x227fc7=_0x17a97e[_0xa86a56];return _0x227fc7;}import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a33_0x4afeb2(0x188),'command':a33_0x4afeb2(0x18a),'description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a33_0x4afeb2(0x185),'type':a33_0x4afeb2(0x180),'description':a33_0x4afeb2(0x17c)},TAGS_FLAG],async 'validate'(_0x208bdf){const _0x367e56=a33_0x4afeb2,_0x2bd0ce=_0x208bdf[_0x367e56(0x183)](_0x367e56(0x185))[_0x367e56(0x182)]();if(_0x2bd0ce)validateKey(_0x2bd0ce);readOptionalTags(_0x208bdf);},async 'execute'(_0x571cf2){const _0x7613fc=a33_0x4afeb2,_0x4ca5a9=_0x571cf2[_0x7613fc(0x183)](_0x7613fc(0x185))[_0x7613fc(0x182)]()||undefined,_0xb0fd4b=readOptionalTags(_0x571cf2),_0x1f667e=await withAppConfigApiBoundary(_0x7613fc(0x18a),{'appCode':_0x571cf2['appCode']},()=>listAppConfigs(_0x571cf2[_0x7613fc(0x17f)],{'key':_0x4ca5a9,'tags':_0xb0fd4b})),_0x11763a=_0x1f667e[_0x7613fc(0x17a)](_0xd4be95=>projectAppConfig(_0xd4be95));return{'ok':!![],'data':{'appCode':_0x571cf2[_0x7613fc(0x17f)],'count':_0x11763a[_0x7613fc(0x184)],'configs':_0x11763a},'message':_0x7613fc(0x189)+_0x11763a[_0x7613fc(0x184)]+_0x7613fc(0x18b)};}};
|