@lovrabet/rabetbase-cli 2.5.1-beta.4 → 2.5.1-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +0 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +2 -0
- 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.d.ts +2 -0
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +1 -0
- 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.d.ts +2 -0
- package/lib/commands/project/domain-routing-sync.js +1 -0
- 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.d.ts +2 -0
- package/lib/commands/rule/get.js +1 -0
- package/lib/commands/rule/index.d.ts +2 -0
- package/lib/commands/rule/index.js +1 -0
- package/lib/commands/rule/list.d.ts +2 -0
- package/lib/commands/rule/list.js +1 -0
- package/lib/commands/rule/set.d.ts +2 -0
- package/lib/commands/rule/set.js +1 -0
- package/lib/commands/rule/shared.d.ts +43 -0
- package/lib/commands/rule/shared.js +1 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/deployment-sync.js +1 -1
- package/lib/config/domain-config.d.ts +37 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.d.ts +27 -0
- package/lib/config/project-domain-routing.js +1 -0
- package/lib/config/schema.d.ts +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.d.ts +10 -4
- 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.d.ts +4 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +43 -49
- 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.d.ts +2 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +21 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.d.ts +83 -0
- package/lib/generated/official-routing.js +1 -0
- package/lib/generated/routing-contract.d.ts +9 -0
- package/lib/generated/routing-contract.js +1 -0
- 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/types/index.d.ts +0 -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 +2 -1
- package/skills/rabetbase/SKILL.md +15 -12
- package/skills/rabetbase/guides/sdk-client-generation.md +10 -8
- package/skills/rabetbase/references/rabetbase-api-pull.md +16 -11
- package/skills/rabetbase/references/rabetbase-config.md +3 -3
- package/skills/rabetbase/references/rabetbase-database-template.md +36 -0
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -0
- package/skills/rabetbase/references/rabetbase-init.md +32 -8
- package/skills/rabetbase/references/rabetbase-project-create.md +33 -8
- package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +28 -0
- package/skills/rabetbase/references/rabetbase-rule.md +64 -0
- package/skills/rabetbase.manifest.json +6 -3
- package/lib/config/project-routing.d.ts +0 -30
- package/lib/config/project-routing.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4b929a,_0x37621d){const _0x4919c7=a230_0x20eb,_0x4526cf=_0x4b929a();while(!![]){try{const _0x178aba=-parseInt(_0x4919c7(0x134))/0x1*(-parseInt(_0x4919c7(0x132))/0x2)+parseInt(_0x4919c7(0x130))/0x3*(-parseInt(_0x4919c7(0x13b))/0x4)+-parseInt(_0x4919c7(0x133))/0x5+-parseInt(_0x4919c7(0x135))/0x6*(-parseInt(_0x4919c7(0x131))/0x7)+-parseInt(_0x4919c7(0x137))/0x8*(-parseInt(_0x4919c7(0x136))/0x9)+parseInt(_0x4919c7(0x12f))/0xa+-parseInt(_0x4919c7(0x139))/0xb;if(_0x178aba===_0x37621d)break;else _0x4526cf['push'](_0x4526cf['shift']());}catch(_0x47d9b8){_0x4526cf['push'](_0x4526cf['shift']());}}}(a230_0x4637,0x190a4));import{OFFICIAL_ROUTING_PROFILES as a230_0x2fcfa5,ROUTING_CATALOG_DIGEST}from'../generated/official-routing.js';export const OFFICIAL_ROUTING_PROFILES=a230_0x2fcfa5;export{ROUTING_CATALOG_DIGEST};export function getOfficialRoutingProfile(_0x16c189){return OFFICIAL_ROUTING_PROFILES[_0x16c189];}function a230_0x20eb(_0x4c9ed0,_0x58cb41){_0x4c9ed0=_0x4c9ed0-0x12e;const _0x4637d0=a230_0x4637();let _0x20eb4a=_0x4637d0[_0x4c9ed0];return _0x20eb4a;}function a230_0x4637(){const _0x388732=['39ETxEQk','91sdTHyE','2VOvcnk','264500CJIzRk','85783GDrwXh','92898PjPDcc','906786gBayvR','8GcHZxn','Official\x20routing\x20for\x20region\x20\x22','1556786LOEZFb','libraries','46652FOBIZB','lovrabet','cdn','\x22\x20is\x20not\x20ready:\x20Lovrabet\x20CDN\x20Domain\x20is\x20not\x20configured.','607930jGdxcY'];a230_0x4637=function(){return _0x388732;};return a230_0x4637();}export function getOfficialRoutingCdn(_0x33440b){const _0x4c5680=a230_0x20eb,_0x276647=getOfficialRoutingProfile(_0x33440b)[_0x4c5680(0x13d)];if(!_0x276647[_0x4c5680(0x13c)])throw new Error(_0x4c5680(0x138)+_0x33440b+_0x4c5680(0x12e));return{'libraries':_0x276647[_0x4c5680(0x13a)],'lovrabet':_0x276647[_0x4c5680(0x13c)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2258c2,_0x475bb2){const _0x3f4a74=a231_0x7722,_0x6b0b45=_0x2258c2();while(!![]){try{const _0x45858a=-parseInt(_0x3f4a74(0x188))/0x1+-parseInt(_0x3f4a74(0x185))/0x2+parseInt(_0x3f4a74(0x177))/0x3*(-parseInt(_0x3f4a74(0x17e))/0x4)+-parseInt(_0x3f4a74(0x17d))/0x5*(-parseInt(_0x3f4a74(0x18e))/0x6)+-parseInt(_0x3f4a74(0x190))/0x7+parseInt(_0x3f4a74(0x191))/0x8+-parseInt(_0x3f4a74(0x173))/0x9*(-parseInt(_0x3f4a74(0x180))/0xa);if(_0x45858a===_0x475bb2)break;else _0x6b0b45['push'](_0x6b0b45['shift']());}catch(_0x365a35){_0x6b0b45['push'](_0x6b0b45['shift']());}}}(a231_0x106a,0xa6bcb));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';function a231_0x7722(_0x39ca4a,_0x5bf243){_0x39ca4a=_0x39ca4a-0x16e;const _0x106acf=a231_0x106a();let _0x77223d=_0x106acf[_0x39ca4a];return _0x77223d;}import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';function stringConfigValue(_0x4ea176){const _0x77ab07=a231_0x7722;return typeof _0x4ea176===_0x77ab07(0x170)&&_0x4ea176[_0x77ab07(0x184)]()?_0x4ea176[_0x77ab07(0x184)]():undefined;}function a231_0x106a(){const _0xd484f2=['207laUpVt','env','accessKey','format','74061nfFdEU','projectPath','apps','locale','length','FORMAT','4185705PISjVF','84uPMTsI','projectConfig','408530WuTJLn','daily','app','VERBOSE','trim','1560462qxinxW','PAGE_SIZE','riskLevel','184967uocXzf','object','entries','appcode','write','defaultApp','6KTDHMG','keys','1819454uqksjX','5197936ltCTIn','read','ENV','find','APP','globalConfig','high-risk-write','production','pageSize','string','cookie','apiDir'];a231_0x106a=function(){return _0xd484f2;};return a231_0x106a();}function appProfiles(_0x1e9af7){const _0x48c6e6=a231_0x7722;return _0x1e9af7[_0x48c6e6(0x179)]&&typeof _0x1e9af7[_0x48c6e6(0x179)]===_0x48c6e6(0x189)?_0x1e9af7[_0x48c6e6(0x179)]:{};}function resolveDefaultAppName(_0x3c4451){const _0x359f3=a231_0x7722,_0x24ef82=stringConfigValue(_0x3c4451[_0x359f3(0x18d)]);if(_0x24ef82)return _0x24ef82;const _0x998d12=Object[_0x359f3(0x18f)](appProfiles(_0x3c4451));return _0x998d12[_0x359f3(0x17b)]===0x1?_0x998d12[0x0]:undefined;}function resolveTopLevelAppCode(_0x2479ae){const _0x35e0f2=a231_0x7722;return stringConfigValue(_0x2479ae[_0x35e0f2(0x18b)])||stringConfigValue(_0x2479ae[_0x35e0f2(0x182)]);}function normalizeRiskCeiling(_0x35a1cd){const _0x3fa287=a231_0x7722;if(_0x35a1cd===undefined||_0x35a1cd===null)return undefined;if(_0x35a1cd===_0x3fa287(0x192)||_0x35a1cd===_0x3fa287(0x18c)||_0x35a1cd===_0x3fa287(0x197))return _0x35a1cd;return _0x3fa287(0x192);}function resolveRiskCeiling(..._0x5ae63e){let _0x43371f;for(const _0x5deb60 of _0x5ae63e){const _0x2acaf6=normalizeRiskCeiling(_0x5deb60);_0x2acaf6&&(!_0x43371f||riskLevelOrder(_0x2acaf6)<riskLevelOrder(_0x43371f))&&(_0x43371f=_0x2acaf6);}return _0x43371f??DEFAULT_CONFIG_VALUES['riskLevel'];}export function resolveAppConfig({raw:_0x4fa858,flags:_0x54c5cf,layers:_0x3c2d5f,readEnv:_0x541a00}){const _0x4b613e=a231_0x7722,_0x2ee4c9=_0x3c2d5f?.[_0x4b613e(0x17f)]??{},_0x27dbcd=_0x3c2d5f?.[_0x4b613e(0x196)]??{},_0x30bbb5=!!_0x3c2d5f?.[_0x4b613e(0x178)]||Object[_0x4b613e(0x18f)](_0x2ee4c9)['length']>0x0,_0xc776d2=!_0x30bbb5,_0x45a783=_0x30bbb5?resolveDefaultAppName(_0x2ee4c9):undefined,_0x57e62e=_0xc776d2?resolveDefaultAppName(_0x27dbcd):undefined,_0x36d979=stringConfigValue(_0x54c5cf[_0x4b613e(0x182)]),_0x125b66=_0x541a00(_0x4b613e(0x195)),_0x2351f5={};if(_0x4fa858[_0x4b613e(0x179)]&&typeof _0x4fa858[_0x4b613e(0x179)]==='object')for(const [_0x1ec471,_0x335e87]of Object[_0x4b613e(0x18a)](_0x4fa858[_0x4b613e(0x179)])){_0x335e87&&typeof _0x335e87===_0x4b613e(0x189)&&_0x335e87[_0x4b613e(0x18b)]&&(_0x2351f5[_0x1ec471]=_0x335e87);}const _0x2fef09=_0x45a783||_0x57e62e||resolveDefaultAppName(_0x4fa858),_0x53dac9=Object[_0x4b613e(0x18f)](_0x2351f5)[_0x4b613e(0x17b)]>0x0,_0x2a63d1=_0x36d979||_0x45a783||_0x125b66||_0x57e62e||_0x2fef09||undefined,_0xebf62=stringConfigValue(_0x54c5cf[_0x4b613e(0x18b)]),_0x575887=_0xebf62?Object[_0x4b613e(0x18a)](_0x2351f5)[_0x4b613e(0x194)](([,_0x44f798])=>_0x44f798?.[_0x4b613e(0x18b)]===_0xebf62):undefined,_0xd7a55c=_0x575887?.[0x0],_0x46e55b=_0x575887?.[0x1],_0x29b406=_0xebf62?_0xd7a55c:_0x2a63d1;let _0x399942=_0x29b406&&_0x2351f5[_0x29b406]?_0x2351f5[_0x29b406]:undefined;_0xebf62&&_0x46e55b&&(_0x399942=_0x46e55b);const _0x27c379=_0xebf62?_0x46e55b??_0x399942:_0x399942,_0x36ae7a=!_0x36d979&&!_0x45a783&&_0x125b66&&_0x29b406===_0x125b66,_0xfac6a8=_0x36d979||(_0x36ae7a?_0x125b66:undefined)||(_0xebf62?_0xd7a55c:undefined),_0x183622=_0x27c379?.[_0x4b613e(0x18b)],_0x234690=_0x30bbb5?resolveTopLevelAppCode(_0x2ee4c9):undefined,_0x849bd4=_0xc776d2?resolveTopLevelAppCode(_0x27dbcd):undefined,_0x24f7e4=_0x36d979||_0x45a783?_0x183622:undefined,_0x2f7d7b=!_0x36d979&&!_0x45a783?_0x183622:undefined,_0x2991db=_0xebf62||_0x24f7e4||_0x234690||_0x2f7d7b||_0x849bd4||undefined,_0x5350bd=_0x30bbb5?stringConfigValue(_0x2ee4c9['env']):undefined,_0x5ec8a7=_0xc776d2?stringConfigValue(_0x27dbcd[_0x4b613e(0x174)]):undefined,_0x5b9f47=_0x54c5cf['env']||_0x27c379?.[_0x4b613e(0x174)]||_0x5350bd||_0x541a00(_0x4b613e(0x193))||_0x5ec8a7||_0x4fa858[_0x4b613e(0x174)]||DEFAULT_CONFIG_VALUES['env'],_0x3d78bf=_0x27c379?.[_0x4b613e(0x17a)]||_0x4fa858['locale']||DEFAULT_CONFIG_VALUES[_0x4b613e(0x17a)],_0x8c1797=_0x541a00('COOKIE')||_0x27c379?.[_0x4b613e(0x171)]||_0x4fa858['cookie']||undefined,_0x5fd7a8=_0x541a00('ACCESS_KEY')||_0x27c379?.[_0x4b613e(0x175)]||_0x4fa858[_0x4b613e(0x175)]||undefined,_0x30d631=_0x54c5cf['format']||_0x541a00(_0x4b613e(0x17c))||_0x27c379?.[_0x4b613e(0x176)]||_0x4fa858[_0x4b613e(0x176)],_0x5b4eca=normalizeLegacyOutputFormat(_0x30d631),_0x191b5a=_0x541a00(_0x4b613e(0x186))||_0x27c379?.[_0x4b613e(0x16f)]||_0x4fa858['pageSize'],_0x3cc0df=_0x191b5a?Number(_0x191b5a)||undefined:undefined,_0x4e9dd4=_0x3c2d5f?[_0x3c2d5f['globalConfig'][_0x4b613e(0x187)],_0x3c2d5f[_0x4b613e(0x17f)][_0x4b613e(0x187)]]:[_0x4fa858[_0x4b613e(0x187)]],_0x12bab5=resolveRiskCeiling(..._0x4e9dd4,_0x27c379?.['riskLevel']),_0x5523b2=resolveRiskCeiling(_0x12bab5,_0x541a00('RISK_LEVEL')),_0x24875f=_0x541a00(_0x4b613e(0x183)),_0x4f00ce=_0x24875f==='1'||_0x24875f==='true',_0x4e726c=_0x27c379?.[_0x4b613e(0x172)]||_0x4fa858[_0x4b613e(0x172)]||DEFAULT_CONFIG_VALUES[_0x4b613e(0x172)],_0x36b929=isDaily(normalizeEnv(String(_0x5b9f47)))?_0x4b613e(0x181):_0x4b613e(0x16e);return{'appCode':typeof _0x2991db===_0x4b613e(0x170)&&_0x2991db[_0x4b613e(0x184)]()?_0x2991db[_0x4b613e(0x184)]():undefined,'env':_0x36b929,'locale':_0x3d78bf,'cookie':_0x8c1797,'accessKey':_0x5fd7a8,'format':_0x5b4eca,'pageSize':_0x3cc0df,'riskLevel':_0x5523b2,'verbose':_0x4f00ce,'apiDir':_0x4e726c,'apps':_0x2351f5,'defaultApp':_0x2fef09,'currentApp':_0x53dac9?_0x29b406:undefined,'explicitAppName':_0xfac6a8};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a232_0x36a5(_0x3bfe5b,_0xe7c5b8){_0x3bfe5b=_0x3bfe5b-0x1f4;const _0x4a0410=a232_0x4a04();let _0x36a517=_0x4a0410[_0x3bfe5b];return _0x36a517;}(function(_0xc5b9e0,_0x49ed37){const _0x4f0cdd=a232_0x36a5,_0x4b3f3f=_0xc5b9e0();while(!![]){try{const _0x3c5085=parseInt(_0x4f0cdd(0x1f7))/0x1*(parseInt(_0x4f0cdd(0x1fa))/0x2)+parseInt(_0x4f0cdd(0x1fc))/0x3+-parseInt(_0x4f0cdd(0x200))/0x4+-parseInt(_0x4f0cdd(0x1f5))/0x5*(parseInt(_0x4f0cdd(0x1ff))/0x6)+-parseInt(_0x4f0cdd(0x1f6))/0x7+-parseInt(_0x4f0cdd(0x1fe))/0x8+-parseInt(_0x4f0cdd(0x1f9))/0x9*(-parseInt(_0x4f0cdd(0x1fd))/0xa);if(_0x3c5085===_0x49ed37)break;else _0x4b3f3f['push'](_0x4b3f3f['shift']());}catch(_0x5bde06){_0x4b3f3f['push'](_0x4b3f3f['shift']());}}}(a232_0x4a04,0x493f8));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';function a232_0x4a04(){const _0x5f2c17=['585312dTSolp','3693400zWEIxZ','554696kNpbnA','35484ivJUAX','2028076eRgoxv','authRequired','415pkiuxX','2854670fbOxCb','2rteVQQ','cookie','36xAggtp','102588mYyqGr','../auth/get-cookie.js'];a232_0x4a04=function(){return _0x5f2c17;};return a232_0x4a04();}export async function buildAuth(_0x35f32d){const _0x493ac1=a232_0x36a5,{getCookie:_0x4955a1}=await import(_0x493ac1(0x1fb)),_0x2801d9=_0x35f32d[_0x493ac1(0x1f8)]||_0x4955a1(),_0x24f52d=_0x2801d9?await getIsSessionValid():![];return{'cookie':_0x2801d9,'isLoggedIn':_0x24f52d,async 'getOrLogin'(){const _0x2f4aff=_0x493ac1;if(_0x2801d9&&_0x24f52d)return _0x2801d9;throw CliErrors[_0x2f4aff(0x1f4)]();}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a233_0x4ae55b=a233_0x45eb;(function(_0x27297c,_0x1d2ec2){const _0x48a9ad=a233_0x45eb,_0x26e508=_0x27297c();while(!![]){try{const _0x31f857=-parseInt(_0x48a9ad(0x1b3))/0x1+parseInt(_0x48a9ad(0x1c8))/0x2+-parseInt(_0x48a9ad(0x1c4))/0x3+-parseInt(_0x48a9ad(0x1cb))/0x4*(-parseInt(_0x48a9ad(0x19f))/0x5)+parseInt(_0x48a9ad(0x19b))/0x6+parseInt(_0x48a9ad(0x1b6))/0x7+-parseInt(_0x48a9ad(0x1c3))/0x8;if(_0x31f857===_0x1d2ec2)break;else _0x26e508['push'](_0x26e508['shift']());}catch(_0x383953){_0x26e508['push'](_0x26e508['shift']());}}}(a233_0x3c79,0x71c85));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';function a233_0x3c79(){const _0x3e6281=['4741134PNVoXD','env','inherit','appDomain','35IzMQLL','kbDomain','utf8','status','.rabetbase.json','apps','warn','.tmp','missing','locale','projectPath','message','keys','empty','format','runtimeDomain','skillDomain','localDomain','defaultApp','parse','585148SzxYKf','config','stringify','4902135jVPJyD','region','cwd','app','apiDomain','userDomain','length','apiDir','accessKey','appcode','set','trim','cookie','5832408MQjZXE','2789334UHceOc','get','error','\x0a\x20\x20','1191896aIyjBY','object','riskLevel','356336DBTbRW','migrated','pageSize'];a233_0x3c79=function(){return _0x3e6281;};return a233_0x3c79();}import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME=a233_0x4ae55b(0x1a3);export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map();export function resolveConfigPath(_0x178a7a){for(const _0x1db268 of CONFIG_NAMES){const _0xec9489=resolve(_0x178a7a,_0x1db268);if(existsSync(_0xec9489))return _0xec9489;}return undefined;}export function findProjectRootDirectory(_0x477109=process[a233_0x4ae55b(0x1b8)]()){let _0xf99559=resolve(_0x477109);const {root:_0x2a724d}=parse(_0xf99559),_0x53f6f3=homedir();while(!![]){if(resolveConfigPath(_0xf99559)){if(_0xf99559===_0x53f6f3)break;return _0xf99559;}if(_0xf99559===_0x2a724d||_0xf99559===_0x53f6f3)break;const _0x2341e1=dirname(_0xf99559);if(_0x2341e1===_0xf99559)break;_0xf99559=_0x2341e1;}return resolve(_0x477109);}export function getProjectConfigPath(){const _0x4b33f8=a233_0x4ae55b;return resolveConfigPath(process[_0x4b33f8(0x1b8)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x2cf0c6){const _0x3defec=a233_0x4ae55b;if(!existsSync(_0x2cf0c6))return{'status':'missing'};try{const _0x91129c=readFileSync(_0x2cf0c6,{'encoding':_0x3defec(0x1a1)});if(!_0x91129c?.[_0x3defec(0x1c1)]())return{'status':_0x3defec(0x1ac)};const _0x2c2f70=JSON[_0x3defec(0x1b2)](_0x91129c);return{'status':'ok','data':_0x2c2f70};}catch(_0x58ff89){return{'status':_0x3defec(0x1c6),'message':_0x58ff89 instanceof Error?_0x58ff89[_0x3defec(0x1aa)]:String(_0x58ff89)};}}function a233_0x45eb(_0x383d84,_0x4bf0cc){_0x383d84=_0x383d84-0x199;const _0x3c7920=a233_0x3c79();let _0x45eb58=_0x3c7920[_0x383d84];return _0x45eb58;}function parseCliConfigJsonFile(_0x4323c3,_0x2e3274,_0x33acbe){const _0x42e7b6=a233_0x4ae55b,_0x31b9d3=inspectCliConfigJsonFile(_0x4323c3);if(_0x31b9d3[_0x42e7b6(0x1a2)]===_0x42e7b6(0x1a7)||_0x31b9d3[_0x42e7b6(0x1a2)]===_0x42e7b6(0x1ac))return{};if(_0x31b9d3[_0x42e7b6(0x1a2)]==='ok')return _0x31b9d3['data'];return _0x2e3274==='warn'&&_0x33acbe&&console[_0x42e7b6(0x1c6)](CLI_BIN_NAME+':\x20'+_0x33acbe+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x4323c3+_0x42e7b6(0x1c7)+_0x31b9d3[_0x42e7b6(0x1aa)]),{};}function normalizeLegacyConfigShape(_0x403f0c){const _0x3dc64c=a233_0x4ae55b;if(!_0x403f0c||typeof _0x403f0c!==_0x3dc64c(0x1c9))return{'config':{},'migrated':![]};const _0x2fb43d={..._0x403f0c},_0x264138=_0x2fb43d[_0x3dc64c(0x1a4)]&&typeof _0x2fb43d['apps']===_0x3dc64c(0x1c9)?{..._0x2fb43d[_0x3dc64c(0x1a4)]}:{},_0x27ccbb=Object[_0x3dc64c(0x1ab)](_0x264138)[_0x3dc64c(0x1bc)],_0xb9f7b6=_0x2fb43d[_0x3dc64c(0x1bf)]||_0x2fb43d[_0x3dc64c(0x1b9)];let _0x12926f=![];if(_0xb9f7b6&&_0x27ccbb===0x0){const _0x579e55=typeof _0x2fb43d[_0x3dc64c(0x1b1)]==='string'&&_0x2fb43d['defaultApp']['trim']()?_0x2fb43d['defaultApp']:String(_0xb9f7b6)[_0x3dc64c(0x1c1)]();_0x264138[_0x579e55]={'appcode':String(_0xb9f7b6)[_0x3dc64c(0x1c1)](),..._0x2fb43d[_0x3dc64c(0x19c)]!=null?{'env':_0x2fb43d[_0x3dc64c(0x19c)]}:{},..._0x2fb43d[_0x3dc64c(0x1bd)]!=null?{'apiDir':_0x2fb43d[_0x3dc64c(0x1bd)]}:{},..._0x2fb43d[_0x3dc64c(0x1c2)]!=null?{'cookie':_0x2fb43d[_0x3dc64c(0x1c2)]}:{},..._0x2fb43d[_0x3dc64c(0x1be)]!=null?{'accessKey':_0x2fb43d[_0x3dc64c(0x1be)]}:{},..._0x2fb43d[_0x3dc64c(0x1ad)]!=null?{'format':_0x2fb43d[_0x3dc64c(0x1ad)]}:{},..._0x2fb43d[_0x3dc64c(0x19a)]!=null?{'pageSize':_0x2fb43d[_0x3dc64c(0x19a)]}:{},..._0x2fb43d['riskLevel']!=null?{'riskLevel':_0x2fb43d[_0x3dc64c(0x1ca)]}:{},..._0x2fb43d[_0x3dc64c(0x1a8)]!=null?{'locale':_0x2fb43d[_0x3dc64c(0x1a8)]}:{}},_0x2fb43d[_0x3dc64c(0x1a4)]=_0x264138,delete _0x2fb43d[_0x3dc64c(0x1b1)],_0x12926f=!![];}return(_0x3dc64c(0x1bf)in _0x2fb43d||_0x3dc64c(0x1b9)in _0x2fb43d)&&(delete _0x2fb43d[_0x3dc64c(0x1bf)],delete _0x2fb43d[_0x3dc64c(0x1b9)],_0x12926f=!![]),{'config':_0x2fb43d,'migrated':_0x12926f};}function writeNormalizedConfigIfNeeded(_0x167016,_0x1b9a3b){const _0x2b8ebd=a233_0x4ae55b,_0x3bbb91=JSON[_0x2b8ebd(0x1b5)](_0x1b9a3b,null,0x2)+'\x0a';if(normalizedWriteCache[_0x2b8ebd(0x1c5)](_0x167016)===_0x3bbb91)return;writeConfigFile(_0x167016,_0x1b9a3b),normalizedWriteCache[_0x2b8ebd(0x1c0)](_0x167016,_0x3bbb91);}function parseAndNormalizeConfig(_0xad1f98,_0x308768,_0x20282c){const _0x191ab4=a233_0x4ae55b,_0x3263fb=parseCliConfigJsonFile(_0xad1f98,_0x308768,_0x20282c),_0x473aa6=normalizeLegacyConfigShape(_0x3263fb);if(_0x473aa6[_0x191ab4(0x199)])try{writeNormalizedConfigIfNeeded(_0xad1f98,_0x473aa6[_0x191ab4(0x1b4)]);}catch{}return _0x473aa6['config'];}export function loadRawConfigLayers(_0x5b40c9){const _0x5ed0fd=a233_0x4ae55b;let _0xda06cd={},_0x3b83bf={};const _0x48035a=resolveConfigPath(homedir());_0x48035a&&(_0xda06cd=parseAndNormalizeConfig(_0x48035a,'warn','Global'));const _0x4983b7=_0x5b40c9??findProjectRootDirectory(),_0x7105d1=resolveConfigPath(_0x4983b7);return _0x7105d1&&(_0x3b83bf=parseAndNormalizeConfig(_0x7105d1,_0x5ed0fd(0x1a5),'Project')),{'globalPath':_0x48035a,'projectPath':_0x7105d1,'globalConfig':_0xda06cd,'projectConfig':_0x3b83bf};}const INHERIT_WHITELIST=['cookie',a233_0x4ae55b(0x1be),a233_0x4ae55b(0x1a8),a233_0x4ae55b(0x1ad),'riskLevel','pageSize',a233_0x4ae55b(0x1b7),'routing',a233_0x4ae55b(0x1bb),a233_0x4ae55b(0x1ba),a233_0x4ae55b(0x1ae),a233_0x4ae55b(0x1af),a233_0x4ae55b(0x1a0),a233_0x4ae55b(0x19e),a233_0x4ae55b(0x1b0),'certificateDomain'];export function mergeRawConfigLayers(_0x2f4be3){const _0x6e2e9f=a233_0x4ae55b,{globalConfig:_0x2aaef0,projectConfig:_0x4a6927}=_0x2f4be3,_0x15ba6b=!!_0x2f4be3[_0x6e2e9f(0x1a9)]||Object['keys'](_0x4a6927)['length']>0x0;if(!_0x15ba6b)return mergeGlobalOnly(_0x2aaef0);return mergeProjectFirst(_0x2aaef0,_0x4a6927);}function mergeGlobalOnly(_0x27b27d){const _0x586b71=a233_0x4ae55b,_0x2e93db={..._0x27b27d};delete _0x2e93db[_0x586b71(0x19d)];const _0x247a14=_0x27b27d[_0x586b71(0x1a4)]&&typeof _0x27b27d[_0x586b71(0x1a4)]===_0x586b71(0x1c9)?_0x27b27d[_0x586b71(0x1a4)]:{};if(Object[_0x586b71(0x1ab)](_0x247a14)[_0x586b71(0x1bc)]>0x0)_0x2e93db[_0x586b71(0x1a4)]=_0x247a14;if(_0x27b27d[_0x586b71(0x1b1)])_0x2e93db['defaultApp']=_0x27b27d[_0x586b71(0x1b1)];return _0x2e93db;}function mergeProjectFirst(_0x2e4b8b,_0x3580a8){const _0x187a46=a233_0x4ae55b,_0x342592={..._0x3580a8};delete _0x342592[_0x187a46(0x19d)];for(const _0x4ff577 of INHERIT_WHITELIST){!(_0x4ff577 in _0x342592)&&_0x4ff577 in _0x2e4b8b&&(_0x342592[_0x4ff577]=_0x2e4b8b[_0x4ff577]);}const _0x4507d7=_0x3580a8[_0x187a46(0x1a4)]&&typeof _0x3580a8[_0x187a46(0x1a4)]===_0x187a46(0x1c9)?_0x3580a8[_0x187a46(0x1a4)]:{};return Object[_0x187a46(0x1ab)](_0x4507d7)['length']>0x0?_0x342592['apps']=_0x4507d7:delete _0x342592[_0x187a46(0x1a4)],_0x187a46(0x1b1)in _0x3580a8?_0x342592[_0x187a46(0x1b1)]=_0x3580a8[_0x187a46(0x1b1)]:delete _0x342592[_0x187a46(0x1b1)],_0x342592;}export function readRawConfigWithLayers(_0x17c75f){const _0x35852c=loadRawConfigLayers(_0x17c75f);return{'config':mergeRawConfigLayers(_0x35852c),'layers':_0x35852c};}export function readRawConfig(_0x54fe27){return mergeRawConfigLayers(loadRawConfigLayers(_0x54fe27));}export function readConfigFile(_0x16e069){return parseAndNormalizeConfig(_0x16e069,'silent');}export function writeConfigFile(_0x4fa770,_0x173dd4){const _0x52be7d=a233_0x4ae55b,_0x5559c3=dirname(_0x4fa770);!existsSync(_0x5559c3)&&mkdirSync(_0x5559c3,{'recursive':!![]});const _0x386dd6=_0x4fa770+_0x52be7d(0x1a6);try{writeFileSync(_0x386dd6,JSON[_0x52be7d(0x1b5)](_0x173dd4,null,0x2)+'\x0a',{'encoding':_0x52be7d(0x1a1),'mode':0x180}),renameSync(_0x386dd6,_0x4fa770);}catch(_0x336733){try{unlinkSync(_0x386dd6);}catch{}throw _0x336733;}}export function resolveWriteConfigPath(_0x1010e8){const _0x1368aa=a233_0x4ae55b,_0x13eb5d=_0x1010e8==='project'?process[_0x1368aa(0x1b8)]():homedir(),_0x6722d=resolveConfigPath(_0x13eb5d);return _0x6722d??resolve(_0x13eb5d,NEW_CONFIG_NAME);}
|
package/lib/context.d.ts
CHANGED
|
@@ -70,6 +70,8 @@ export interface CLIContext {
|
|
|
70
70
|
/** 是否为非交互模式 */
|
|
71
71
|
nonInteractive: boolean;
|
|
72
72
|
}
|
|
73
|
+
/** Config and doctor remain usable when connection routing cannot initialize. */
|
|
74
|
+
export declare function isRoutingRecoveryService(service: string): boolean;
|
|
73
75
|
/**
|
|
74
76
|
* 创建 CLI 共享上下文
|
|
75
77
|
*
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a228_0xcc4a36=a228_0x35b7;function a228_0x35b7(_0x50461c,_0x1a4a54){_0x50461c=_0x50461c-0xa7;const _0x617256=a228_0x6172();let _0x35b7e5=_0x617256[_0x50461c];return _0x35b7e5;}(function(_0x54ade5,_0x48be86){const _0x525df2=a228_0x35b7,_0x7dd170=_0x54ade5();while(!![]){try{const _0x81419e=parseInt(_0x525df2(0xaf))/0x1+-parseInt(_0x525df2(0xbe))/0x2+parseInt(_0x525df2(0xcb))/0x3+-parseInt(_0x525df2(0xc2))/0x4+parseInt(_0x525df2(0xbc))/0x5+parseInt(_0x525df2(0xce))/0x6*(-parseInt(_0x525df2(0xc3))/0x7)+parseInt(_0x525df2(0xae))/0x8;if(_0x81419e===_0x48be86)break;else _0x7dd170['push'](_0x7dd170['shift']());}catch(_0x4edf73){_0x7dd170['push'](_0x7dd170['shift']());}}}(a228_0x6172,0x96eea));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x17beaa){return process.env[`RABETBASE_${_0x17beaa}`]||process.env[`LOVRABET_${_0x17beaa}`]||undefined;}function optionalString(_0x677333){const _0x428a12=a228_0x35b7;return typeof _0x677333===_0x428a12(0xb1)&&_0x677333['trim']()?_0x677333['trim']():undefined;}export async function createContext(_0x274054){const _0x29792e=a228_0x35b7,{config:_0x2fa44c,layers:_0x1aa8d8}=readRawConfigWithLayers(),_0x1e3253=buildConfig(_0x2fa44c,_0x274054,_0x1aa8d8);await initGlobalEnvironment(_0x1e3253);const {getUserDomain:_0x17e9f9,getApiDomain:_0x223e31}=await import(_0x29792e(0xaa)),_0x254013={'apiDomain':_0x223e31(),'userDomain':_0x17e9f9()},_0x39e151=await buildAuth(_0x1e3253);logger[_0x29792e(0xd1)](process[_0x29792e(0xcf)]());const _0xebad60=(CLI_BIN_NAME+'\x20'+process[_0x29792e(0xc9)][_0x29792e(0xd0)](0x2)[_0x29792e(0xc0)]('\x20'))[_0x29792e(0xab)]();logger[_0x29792e(0xbb)](_0xebad60);const {isNonInteractive:_0x379ec6}=await import(_0x29792e(0xd9)),_0x59921f=_0x379ec6(_0x274054);return{'config':_0x1e3253,'auth':_0x39e151,'logger':logger,'env':_0x254013,'nonInteractive':_0x59921f};}export function buildConfigFromFlags(_0x2111af){const {config:_0x4dec42,layers:_0x119932}=readRawConfigWithLayers();return buildConfig(_0x4dec42,_0x2111af,_0x119932);}export async function initGlobalEnvironment(_0x1e55cb){const _0x458be2=a228_0x35b7,{initEnv:_0x4440f3}=await import(_0x458be2(0xa9));_0x4440f3(_0x1e55cb['env']);const {initDomains:_0x33632a}=await import(_0x458be2(0xaa));_0x33632a({'region':normalizeLovrabetRegion(_0x1e55cb['raw']?.['region']),'apiDomain':optionalString(_0x1e55cb['raw']?.[_0x458be2(0xda)]),'userDomain':optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xa7)]),'runtimeDomain':optionalString(_0x1e55cb['raw']?.[_0x458be2(0xc8)]),'skillDomain':optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xca)])||optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xb0)])||optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xb8)])||optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xc1)]),'kbDomain':optionalString(_0x1e55cb['raw']?.[_0x458be2(0xd5)])||optionalString(_0x1e55cb[_0x458be2(0xb7)]?.['agentDomain'])||optionalString(_0x1e55cb['raw']?.[_0x458be2(0xc1)]),'appDomain':optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xb6)]),'localDomain':optionalString(_0x1e55cb[_0x458be2(0xb7)]?.[_0x458be2(0xdc)]),'certificateDomain':optionalString(_0x1e55cb[_0x458be2(0xb7)]?.['certificateDomain'])});}export function getConfigAppCode(_0x24bf78){const _0x163f3d=a228_0x35b7,_0xafc5c7=readRawConfig(_0x24bf78);if(_0xafc5c7[_0x163f3d(0xbf)]&&typeof _0xafc5c7[_0x163f3d(0xbf)]===_0x163f3d(0xac)){const _0x32d08d=_0xafc5c7['defaultApp'];if(_0x32d08d)return _0xafc5c7[_0x163f3d(0xbf)][_0x32d08d]?.[_0x163f3d(0xd3)]?String(_0xafc5c7[_0x163f3d(0xbf)][_0x32d08d][_0x163f3d(0xd3)])[_0x163f3d(0xab)]():undefined;const _0x1fab99=Object[_0x163f3d(0xd4)](_0xafc5c7[_0x163f3d(0xbf)]);if(_0x1fab99[_0x163f3d(0xc4)]===0x1&&_0x1fab99[0x0]?.[_0x163f3d(0xd3)])return String(_0x1fab99[0x0]['appcode'])['trim']();}const _0x4c6ab7=_0xafc5c7[_0x163f3d(0xd3)]||_0xafc5c7[_0x163f3d(0xc6)];if(typeof _0x4c6ab7!==_0x163f3d(0xb1)||_0x4c6ab7['trim']()==='')return undefined;return _0x4c6ab7[_0x163f3d(0xab)]();}export function getMultiAppConfigs(_0x55c919=a228_0xcc4a36(0xd7),_0x59df8c){const _0x194611=a228_0xcc4a36,_0x5bee9e=loadRawConfigLayers(_0x59df8c);let _0x2b9c39,_0x466263;if(_0x55c919===_0x194611(0xd6)){const _0xc48f0a=_0x5bee9e[_0x194611(0xcd)][_0x194611(0xbf)]&&typeof _0x5bee9e['globalConfig'][_0x194611(0xbf)]==='object'?_0x5bee9e[_0x194611(0xcd)][_0x194611(0xbf)]:{},_0x2ace35=_0x5bee9e['projectConfig']['apps']&&typeof _0x5bee9e[_0x194611(0xc5)][_0x194611(0xbf)]===_0x194611(0xac)?_0x5bee9e[_0x194611(0xc5)][_0x194611(0xbf)]:{};_0x2b9c39={..._0xc48f0a,..._0x2ace35};const _0xd411e6=readRawConfig(_0x59df8c);_0x466263=_0xd411e6[_0x194611(0xb3)];}else _0x2b9c39=_0x5bee9e['projectConfig'][_0x194611(0xbf)],_0x466263=_0x5bee9e[_0x194611(0xc5)][_0x194611(0xb3)];!_0x466263&&_0x2b9c39&&typeof _0x2b9c39===_0x194611(0xac)&&Object[_0x194611(0xb4)](_0x2b9c39)[_0x194611(0xc4)]===0x1&&(_0x466263=Object[_0x194611(0xb4)](_0x2b9c39)[0x0]);if(!_0x2b9c39||typeof _0x2b9c39!==_0x194611(0xac)||Object['keys'](_0x2b9c39)[_0x194611(0xc4)]===0x0)return null;return Object[_0x194611(0xad)](_0x2b9c39)[_0x194611(0xc7)](([_0x116171,_0x4d52e6])=>({'name':_0x116171,'appcode':_0x4d52e6?.['appcode']||'','isDefault':_0x116171===_0x466263,'env':_0x4d52e6?.[_0x194611(0xd2)],'apiDir':_0x4d52e6?.[_0x194611(0xbd)],'cookie':_0x4d52e6?.[_0x194611(0xdb)]||undefined}))[_0x194611(0xa8)](_0x540534=>_0x540534['appcode']);}export function getTemplateBaseUrl(_0x350e5e){const _0x1cc30c=a228_0xcc4a36,_0x1cfb09=readRawConfig(_0x350e5e);if(_0x1cfb09[_0x1cc30c(0xba)]&&typeof _0x1cfb09[_0x1cc30c(0xba)]===_0x1cc30c(0xb1))return _0x1cfb09[_0x1cc30c(0xba)][_0x1cc30c(0xb2)](/\/$/,'');return _0x1cc30c(0xb9);}function a228_0x6172(){const _0x4dae06=['filter','./constant/env.js','./constant/domain.js','trim','object','entries','14076416SCiJTz','393117wHJqUc','skillHubDomain','string','replace','defaultApp','keys','-api.ts','appDomain','raw','agentDomain','https://g.lovrabet.com/dist/lovrabet-skill','template_base_url','setRawCommand','3836590LSnHfl','apiDir','1330160hkqkSB','apps','join','platformDomain','4732256TgxluG','133oXjrEr','length','projectConfig','app','map','runtimeDomain','argv','skillDomain','7182xLUaii','find','globalConfig','144006iONnBQ','cwd','slice','setLogPath','env','appcode','values','kbDomain','merged','project','api.ts','./utils/is-non-interactive.js','apiDomain','cookie','localDomain','userDomain'];a228_0x6172=function(){return _0x4dae06;};return a228_0x6172();}function buildConfig(_0x10957f,_0x14a4f3,_0x174025){return{...resolveAppConfig({'raw':_0x10957f,'flags':_0x14a4f3,'layers':_0x174025,'readEnv':env}),'raw':_0x10957f};}export function resolveApiFilePath(_0x3f626f,_0x1945c8){const _0x4a2c23=a228_0xcc4a36,_0x388999=resolve(process['cwd'](),_0x3f626f),_0x30fd46=resolve(_0x388999,_0x4a2c23(0xd8));if(!_0x1945c8)return _0x30fd46;const _0x4d3484=readRawConfig(),_0xd62fe4=_0x4d3484['apps']&&typeof _0x4d3484[_0x4a2c23(0xbf)]==='object'?_0x4d3484[_0x4a2c23(0xbf)]:{},_0x10e2cf=Object[_0x4a2c23(0xad)](_0xd62fe4)[_0x4a2c23(0xcc)](([,_0xee922a])=>_0xee922a?.[_0x4a2c23(0xd3)]===_0x1945c8);if(!_0x10e2cf)return _0x30fd46;const [_0x4f9b29,_0x52a315]=_0x10e2cf,_0xcfa9d5=typeof _0x4d3484['defaultApp']==='string'?_0x4d3484['defaultApp']:undefined;if(_0x52a315?.[_0x4a2c23(0xbd)])return _0x30fd46;if(_0xcfa9d5&&_0x4f9b29!==_0xcfa9d5)return resolve(_0x388999,_0x4f9b29+_0x4a2c23(0xb5));return _0x30fd46;}
|
|
1
|
+
const a234_0x59aa73=a234_0x6e2d;(function(_0x43815a,_0x2beeb0){const _0x24e855=a234_0x6e2d,_0x4eff84=_0x43815a();while(!![]){try{const _0x5f1354=parseInt(_0x24e855(0x171))/0x1+-parseInt(_0x24e855(0x160))/0x2*(parseInt(_0x24e855(0x15f))/0x3)+-parseInt(_0x24e855(0x168))/0x4+parseInt(_0x24e855(0x167))/0x5+parseInt(_0x24e855(0x175))/0x6+parseInt(_0x24e855(0x16c))/0x7+parseInt(_0x24e855(0x18d))/0x8*(-parseInt(_0x24e855(0x19d))/0x9);if(_0x5f1354===_0x2beeb0)break;else _0x4eff84['push'](_0x4eff84['shift']());}catch(_0x5d9a74){_0x4eff84['push'](_0x4eff84['shift']());}}}(a234_0x15e5,0x40908));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{DEFAULT_LOVRABET_REGION,isInvalidLovrabetRegion,normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingManifest}from'./config/domain-config.js';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x347360){return process.env[`RABETBASE_${_0x347360}`]||process.env[`LOVRABET_${_0x347360}`]||undefined;}function optionalString(_0x523d51){const _0x322fe6=a234_0x6e2d;return typeof _0x523d51==='string'&&_0x523d51[_0x322fe6(0x16a)]()?_0x523d51['trim']():undefined;}function describeConfiguredRegion(_0x44609c){const _0x29b357=a234_0x6e2d;return typeof _0x44609c===_0x29b357(0x17d)?JSON[_0x29b357(0x18e)](_0x44609c):_0x29b357(0x17c)+(_0x44609c===null?_0x29b357(0x198):typeof _0x44609c);}function resolveConfiguredRegion(_0x3ee441){const _0x3c25c7=a234_0x6e2d;if(isInvalidLovrabetRegion(_0x3ee441))throw CliErrors['validation'](_0x3c25c7(0x185)+describeConfiguredRegion(_0x3ee441)+_0x3c25c7(0x174),_0x3c25c7(0x17e)+CLI_BIN_NAME+_0x3c25c7(0x18c));return normalizeLovrabetRegion(_0x3ee441)??DEFAULT_LOVRABET_REGION;}export function isRoutingRecoveryService(_0x1c4923){const _0x5eb69a=a234_0x6e2d;return _0x1c4923===_0x5eb69a(0x181)||_0x1c4923===_0x5eb69a(0x173);}export async function createContext(_0x2135c8){const _0x2e094b=a234_0x6e2d,{config:_0x4fcee3,layers:_0x40f47c}=readRawConfigWithLayers(),_0x360b57=buildConfig(_0x4fcee3,_0x2135c8,_0x40f47c);await initGlobalEnvironment(_0x360b57);const {getUserDomain:_0x2183a3,getApiDomain:_0xa0e1cb}=await import('./constant/domain.js'),_0x27b2eb={'apiDomain':_0xa0e1cb(),'userDomain':_0x2183a3()},_0x1b6ad4=await buildAuth(_0x360b57);logger[_0x2e094b(0x186)](process[_0x2e094b(0x170)]());const _0x25f2b2=(CLI_BIN_NAME+'\x20'+process[_0x2e094b(0x18b)][_0x2e094b(0x197)](0x2)['join']('\x20'))['trim']();logger[_0x2e094b(0x195)](_0x25f2b2);const {isNonInteractive:_0x5b9c7d}=await import(_0x2e094b(0x164)),_0x58bdd7=_0x5b9c7d(_0x2135c8);return{'config':_0x360b57,'auth':_0x1b6ad4,'logger':logger,'env':_0x27b2eb,'nonInteractive':_0x58bdd7};}export function buildConfigFromFlags(_0x128ce4){const {config:_0x13585d,layers:_0x4745b3}=readRawConfigWithLayers();return buildConfig(_0x13585d,_0x128ce4,_0x4745b3);}export async function initGlobalEnvironment(_0xe78ca3){const _0x5bf958=a234_0x6e2d,_0x1d8177=resolveConfiguredRegion(_0xe78ca3[_0x5bf958(0x172)]?.[_0x5bf958(0x191)]),_0x18796c=resolveEnterpriseRoutingManifest(_0xe78ca3['raw']?.[_0x5bf958(0x176)]),_0x73f379={'region':_0x1d8177,'apiDomain':_0x18796c?_0x18796c[_0x5bf958(0x17a)][_0x5bf958(0x179)]:optionalString(_0xe78ca3[_0x5bf958(0x172)]?.[_0x5bf958(0x179)]),'userDomain':_0x18796c?_0x18796c[_0x5bf958(0x17a)][_0x5bf958(0x18a)]:optionalString(_0xe78ca3['raw']?.['userDomain']),'runtimeDomain':_0x18796c?_0x18796c[_0x5bf958(0x17a)][_0x5bf958(0x199)]:optionalString(_0xe78ca3['raw']?.[_0x5bf958(0x199)]),'skillDomain':_0x18796c?_0x18796c[_0x5bf958(0x17a)][_0x5bf958(0x19e)]:optionalString(_0xe78ca3[_0x5bf958(0x172)]?.[_0x5bf958(0x19e)])||optionalString(_0xe78ca3[_0x5bf958(0x172)]?.[_0x5bf958(0x183)])||optionalString(_0xe78ca3['raw']?.[_0x5bf958(0x19b)])||optionalString(_0xe78ca3[_0x5bf958(0x172)]?.[_0x5bf958(0x180)]),'kbDomain':_0x18796c?_0x18796c[_0x5bf958(0x17a)]['kbDomain']:optionalString(_0xe78ca3[_0x5bf958(0x172)]?.[_0x5bf958(0x169)])||optionalString(_0xe78ca3[_0x5bf958(0x172)]?.[_0x5bf958(0x19b)])||optionalString(_0xe78ca3['raw']?.['platformDomain']),'appDomain':_0x18796c?_0x18796c[_0x5bf958(0x17a)][_0x5bf958(0x189)]:optionalString(_0xe78ca3[_0x5bf958(0x172)]?.['appDomain']),'localDomain':_0x18796c?_0x18796c[_0x5bf958(0x17a)][_0x5bf958(0x18f)]:optionalString(_0xe78ca3[_0x5bf958(0x172)]?.[_0x5bf958(0x18f)]),'certificateDomain':_0x18796c?_0x18796c[_0x5bf958(0x17a)][_0x5bf958(0x182)]:optionalString(_0xe78ca3[_0x5bf958(0x172)]?.['certificateDomain']),'cdn':_0x18796c?.[_0x5bf958(0x19f)]},{initEnv:_0x4d8600}=await import(_0x5bf958(0x1a0)),{initDomains:_0x376407}=await import(_0x5bf958(0x17b));_0x4d8600(_0xe78ca3[_0x5bf958(0x17f)]),_0x376407(_0x73f379);}export function getConfigAppCode(_0x97a956){const _0x4c5a05=a234_0x6e2d,_0x3b8f6c=readRawConfig(_0x97a956);if(_0x3b8f6c[_0x4c5a05(0x190)]&&typeof _0x3b8f6c[_0x4c5a05(0x190)]===_0x4c5a05(0x184)){const _0x3ffcc1=_0x3b8f6c[_0x4c5a05(0x15e)];if(_0x3ffcc1)return _0x3b8f6c[_0x4c5a05(0x190)][_0x3ffcc1]?.[_0x4c5a05(0x194)]?String(_0x3b8f6c[_0x4c5a05(0x190)][_0x3ffcc1][_0x4c5a05(0x194)])[_0x4c5a05(0x16a)]():undefined;const _0x57b069=Object[_0x4c5a05(0x16e)](_0x3b8f6c[_0x4c5a05(0x190)]);if(_0x57b069['length']===0x1&&_0x57b069[0x0]?.[_0x4c5a05(0x194)])return String(_0x57b069[0x0][_0x4c5a05(0x194)])['trim']();}const _0x123ae0=_0x3b8f6c[_0x4c5a05(0x194)]||_0x3b8f6c['app'];if(typeof _0x123ae0!==_0x4c5a05(0x17d)||_0x123ae0[_0x4c5a05(0x16a)]()==='')return undefined;return _0x123ae0['trim']();}export function getMultiAppConfigs(_0x417a17=a234_0x59aa73(0x193),_0x33d235){const _0x33439b=a234_0x59aa73,_0x128780=loadRawConfigLayers(_0x33d235);let _0x1e6e0b,_0xa37fa6;if(_0x417a17===_0x33439b(0x16f)){const _0x436d2f=_0x128780[_0x33439b(0x19c)]['apps']&&typeof _0x128780[_0x33439b(0x19c)]['apps']==='object'?_0x128780[_0x33439b(0x19c)][_0x33439b(0x190)]:{},_0x2764f5=_0x128780[_0x33439b(0x19a)][_0x33439b(0x190)]&&typeof _0x128780[_0x33439b(0x19a)]['apps']===_0x33439b(0x184)?_0x128780[_0x33439b(0x19a)]['apps']:{};_0x1e6e0b={..._0x436d2f,..._0x2764f5};const _0x16cc3b=readRawConfig(_0x33d235);_0xa37fa6=_0x16cc3b[_0x33439b(0x15e)];}else _0x1e6e0b=_0x128780[_0x33439b(0x19a)][_0x33439b(0x190)],_0xa37fa6=_0x128780[_0x33439b(0x19a)][_0x33439b(0x15e)];!_0xa37fa6&&_0x1e6e0b&&typeof _0x1e6e0b===_0x33439b(0x184)&&Object['keys'](_0x1e6e0b)[_0x33439b(0x196)]===0x1&&(_0xa37fa6=Object['keys'](_0x1e6e0b)[0x0]);if(!_0x1e6e0b||typeof _0x1e6e0b!=='object'||Object[_0x33439b(0x166)](_0x1e6e0b)[_0x33439b(0x196)]===0x0)return null;return Object[_0x33439b(0x192)](_0x1e6e0b)[_0x33439b(0x163)](([_0x143f51,_0x1cf657])=>({'name':_0x143f51,'appcode':_0x1cf657?.[_0x33439b(0x194)]||'','isDefault':_0x143f51===_0xa37fa6,'env':_0x1cf657?.['env'],'apiDir':_0x1cf657?.['apiDir'],'cookie':_0x1cf657?.[_0x33439b(0x162)]||undefined}))[_0x33439b(0x165)](_0x402016=>_0x402016[_0x33439b(0x194)]);}function a234_0x15e5(){const _0x2eca98=['Invalid\x20country/region\x20','setLogPath','api.ts','https://g.lovrabet.com/dist/lovrabet-skill','appDomain','userDomain','argv','\x20doctor`\x20to\x20locate\x20and\x20repair\x20the\x20invalid\x20configuration\x20before\x20retrying.','744WXQGHZ','stringify','localDomain','apps','region','entries','project','appcode','setRawCommand','length','slice','null','runtimeDomain','projectConfig','agentDomain','globalConfig','43479KbpBwv','skillDomain','cdn','./constant/env.js','defaultApp','3423NzCPAF','22rLSuJq','find','cookie','map','./utils/is-non-interactive.js','filter','keys','1202635QiewbV','1826416jpUrWr','kbDomain','trim','replace','1747151RZPbPf','apiDir','values','merged','cwd','390988lKhOdc','raw','doctor','\x20in\x20Rabetbase\x20configuration.','1810716DGqeFW','routing','-api.ts','template_base_url','apiDomain','domains','./constant/domain.js','a\x20value\x20of\x20type\x20','string','Run\x20`','env','platformDomain','config','certificateDomain','skillHubDomain','object'];a234_0x15e5=function(){return _0x2eca98;};return a234_0x15e5();}export function getTemplateBaseUrl(_0x1fa3cb){const _0x4b33e3=a234_0x59aa73,_0x2d750d=readRawConfig(_0x1fa3cb);if(_0x2d750d[_0x4b33e3(0x178)]&&typeof _0x2d750d['template_base_url']===_0x4b33e3(0x17d))return _0x2d750d[_0x4b33e3(0x178)][_0x4b33e3(0x16b)](/\/$/,'');return _0x4b33e3(0x188);}function a234_0x6e2d(_0x1a1b55,_0x362ba2){_0x1a1b55=_0x1a1b55-0x15e;const _0x15e514=a234_0x15e5();let _0x6e2d6b=_0x15e514[_0x1a1b55];return _0x6e2d6b;}function buildConfig(_0x3d4853,_0x43f506,_0x23cf6d){return{...resolveAppConfig({'raw':_0x3d4853,'flags':_0x43f506,'layers':_0x23cf6d,'readEnv':env}),'raw':_0x3d4853};}export function resolveApiFilePath(_0x2e4c13,_0x5346fb){const _0x30246e=a234_0x59aa73,_0x572248=resolve(process[_0x30246e(0x170)](),_0x2e4c13),_0x5be6a9=resolve(_0x572248,_0x30246e(0x187));if(!_0x5346fb)return _0x5be6a9;const _0xbb5dd3=readRawConfig(),_0x1b00f1=_0xbb5dd3[_0x30246e(0x190)]&&typeof _0xbb5dd3[_0x30246e(0x190)]===_0x30246e(0x184)?_0xbb5dd3[_0x30246e(0x190)]:{},_0x4bff58=Object[_0x30246e(0x192)](_0x1b00f1)[_0x30246e(0x161)](([,_0xc3088b])=>_0xc3088b?.[_0x30246e(0x194)]===_0x5346fb);if(!_0x4bff58)return _0x5be6a9;const [_0x148ee9,_0x239145]=_0x4bff58,_0x21cc19=typeof _0xbb5dd3['defaultApp']===_0x30246e(0x17d)?_0xbb5dd3[_0x30246e(0x15e)]:undefined;if(_0x239145?.[_0x30246e(0x16d)])return _0x5be6a9;if(_0x21cc19&&_0x148ee9!==_0x21cc19)return resolve(_0x572248,_0x148ee9+_0x30246e(0x177));return _0x5be6a9;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52af68,_0x7fae5f){const _0x375557=a235_0x2a00,_0x328ad8=_0x52af68();while(!![]){try{const _0x294c66=-parseInt(_0x375557(0x132))/0x1+parseInt(_0x375557(0x138))/0x2+-parseInt(_0x375557(0x13b))/0x3*(-parseInt(_0x375557(0x134))/0x4)+parseInt(_0x375557(0x13a))/0x5+parseInt(_0x375557(0x130))/0x6*(parseInt(_0x375557(0x136))/0x7)+-parseInt(_0x375557(0x13c))/0x8+parseInt(_0x375557(0x133))/0x9*(-parseInt(_0x375557(0x135))/0xa);if(_0x294c66===_0x7fae5f)break;else _0x328ad8['push'](_0x328ad8['shift']());}catch(_0x5c0c59){_0x328ad8['push'](_0x328ad8['shift']());}}}(a235_0x552d,0x720e3));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a235_0x2a00(_0x16f07d,_0x569135){_0x16f07d=_0x16f07d-0x12f;const _0x552dc6=a235_0x552d();let _0x2a00fc=_0x552dc6[_0x16f07d];return _0x2a00fc;}const cache=new Map();function a235_0x552d(){const _0x427971=['28664UbAcqG','18080HtftTJ','1176371zmzAwM','alias','871162abcTdB','cwd','4524740NexgdY','210ulGzoS','6699760YdHUvw','utf-8','datasetCode','has','set','12mpMjCO','push','76286BDYnXd','3969zmHciK'];a235_0x552d=function(){return _0x427971;};return a235_0x552d();}function parseApiFile(_0x2199a4){const _0x33ac17=a235_0x2a00,_0x5cc753=[],_0x5222c6=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x5dc4e5;while((_0x5dc4e5=_0x5222c6['exec'](_0x2199a4))!==null){_0x5cc753[_0x33ac17(0x131)]({'datasetCode':_0x5dc4e5[0x1],'tableName':_0x5dc4e5[0x2],'name':_0x5dc4e5[0x3],'alias':_0x5dc4e5[0x4]});}return _0x5cc753;}export function loadAliasMap(_0x2a215e,_0x158aab,_0x1d3485){const _0x390760=a235_0x2a00,_0x5f7355=_0x1d3485??resolve(process[_0x390760(0x139)](),_0x2a215e,'api.ts');if(cache[_0x390760(0x13f)](_0x5f7355))return cache['get'](_0x5f7355);if(!existsSync(_0x5f7355))return cache['set'](_0x5f7355,[]),[];try{const _0x8c5c31=readFileSync(_0x5f7355,_0x390760(0x13d)),_0x4cf810=parseApiFile(_0x8c5c31);return cache['set'](_0x5f7355,_0x4cf810),_0x4cf810;}catch{return cache[_0x390760(0x12f)](_0x5f7355,[]),[];}}export function resolveAlias(_0x1ea866,_0x2ac8f3,_0x42e0ee,_0x18cd49){const _0xdfc5f6=a235_0x2a00;if(!_0x2ac8f3)return undefined;const _0x8a303c=loadAliasMap(_0x1ea866,_0x42e0ee,_0x18cd49),_0x312846=_0x8a303c['find'](_0x464000=>_0x464000[_0xdfc5f6(0x137)]===_0x2ac8f3);return _0x312846?.[_0xdfc5f6(0x13e)];}export function listAliases(_0x409914,_0x5b82b2,_0x56b482){return loadAliasMap(_0x409914,_0x5b82b2,_0x56b482);}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -88,12 +88,33 @@ export interface KnowledgeBaseRecord {
|
|
|
88
88
|
createTime?: string | number | null;
|
|
89
89
|
updateTime?: string | number | null;
|
|
90
90
|
}
|
|
91
|
+
export type AppRuleType = "rules" | "database";
|
|
92
|
+
export type AppRuleTitle = "RULES" | "DATABASE";
|
|
93
|
+
export interface AppRuleRecord {
|
|
94
|
+
id: number;
|
|
95
|
+
scope: "rules";
|
|
96
|
+
appCode: string;
|
|
97
|
+
title: AppRuleTitle;
|
|
98
|
+
version: number;
|
|
99
|
+
content: string;
|
|
100
|
+
createTime?: string | number | null;
|
|
101
|
+
updateTime?: string | number | null;
|
|
102
|
+
}
|
|
91
103
|
export interface KnowledgeBaseListFilters {
|
|
92
104
|
currentPage?: number;
|
|
93
105
|
pageSize?: number;
|
|
94
106
|
appCode?: string;
|
|
95
107
|
title?: string;
|
|
96
108
|
}
|
|
109
|
+
export declare function getAppRule(cookie: string, input: {
|
|
110
|
+
appCode: string;
|
|
111
|
+
type: AppRuleType;
|
|
112
|
+
}): Promise<AppRuleRecord | null>;
|
|
113
|
+
export declare function saveAppRule(cookie: string, input: {
|
|
114
|
+
appCode: string;
|
|
115
|
+
type: AppRuleType;
|
|
116
|
+
content: string;
|
|
117
|
+
}): Promise<AppRuleRecord>;
|
|
97
118
|
export declare function listEnterpriseKnowledgeBases(cookie: string, filters?: KnowledgeBaseListFilters): Promise<{
|
|
98
119
|
items: KnowledgeBaseRecord[];
|
|
99
120
|
paging?: Paging;
|