@lovrabet/rabetbase-cli 2.5.12-beta.1 → 2.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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.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/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/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.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/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.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/page-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/context.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/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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.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/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.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-analysis.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/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.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/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.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/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 +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a343_0x2f76db=a343_0x2bcb;(function(_0x42f648,_0x533c49){const _0xf1a10a=a343_0x2bcb,_0x2eb91f=_0x42f648();while(!![]){try{const _0x70c2b0=-parseInt(_0xf1a10a(0x208))/0x1+-parseInt(_0xf1a10a(0x236))/0x2*(parseInt(_0xf1a10a(0x23e))/0x3)+-parseInt(_0xf1a10a(0x1ef))/0x4*(-parseInt(_0xf1a10a(0x241))/0x5)+parseInt(_0xf1a10a(0x21a))/0x6+-parseInt(_0xf1a10a(0x205))/0x7+-parseInt(_0xf1a10a(0x22d))/0x8+parseInt(_0xf1a10a(0x234))/0x9;if(_0x70c2b0===_0x533c49)break;else _0x2eb91f['push'](_0x2eb91f['shift']());}catch(_0x2ba02a){_0x2eb91f['push'](_0x2eb91f['shift']());}}}(a343_0x3efc,0xe1734));import{randomUUID}from'node:crypto';function a343_0x3efc(){const _0x270859=['submission_unknown','relations','Dataset\x20design\x20','normalizedHash','Checkpoint\x20creation\x20could\x20not\x20be\x20reconciled.','inputHash','Submission\x20outcome\x20is\x20unknown;\x20query\x20the\x20original\x20operation.','createdDatasets','errorMsg','dataset_created','dataset-design-operation','144uKmtMB','some','toDatasetKey','Server\x20returned\x20an\x20invalid\x20design\x20hash.','operationId','file','PENDING','code','status','Invalid\x20client-operation-id.','Checkpoint\x20not\x20found.','appCode','operation','FAILED','relationType','expectedLocalKeys','test','map','client-operation-id','reused','compress','name','4615429pTtNxt','dataset','POST','1632093tbXpHq','clientOperationId','.checkpoint.json','operation_failed','write','string','isArray','entries','dataset-design-','operation-id','set','flagMissing','design-status','Saved\x20dataset\x20code','localKey','sync-status','normalizedManifest','has','123432rozcNY','--format','sync','result','search','options','fromDatasetKey','toDatasetCode','find','state','toString','MANY_TO_ONE','Agent-authored\x20JSON\x20dataset\x20manifest','createdRelations','manifest','/smartapi/dataset/design/','Checkpoint\x20belongs\x20to\x20another\x20authenticated\x20principal.','Checkpoint\x20target\x20or\x20design\x20changed.\x20Reconcile\x20the\x20original\x20operation;\x20use\x20a\x20new\x20design\x20file\x20for\x20an\x20intentional\x20new\x20operation.','API\x20domain\x20must\x20not\x20contain\x20credentials,\x20query\x20or\x20fragment.','2396128xhQCpX','Server\x20response\x20does\x20not\x20contain\x20a\x20valid\x20operation\x20state.','get','size','SUCCESS','add','output','32884587rdYAZv','expectedRelations','34CPYzpc','submitting','str','query_original_operation','Durable\x20operation\x20checkpoint\x20path','stringify','checkpoint','\x20response\x20received','112281DiDpzA','Provide\x20exactly\x20one\x20operation-id,\x20client-operation-id\x20or\x20checkpoint.','unresolvedRelations','66145AzmvrA','unknown','unknown_reconcile_failed','Deterministic\x20dataset\x20design\x20','Dataset\x20detail\x20does\x20not\x20contain\x20matching\x20DOV2\x20metadata.','startsWith','hash','GET','operation_pending','Save\x20the\x20server-normalized\x20design\x20JSON','values','sync-retry','--appcode','fields','design-','filter','apiDomain','identityKey','Inspect\x20the\x20deterministic\x20request\x20without\x20submission\x20or\x20checkpoint\x20writes.','username','PROCESSING','metrics','Server\x20rejected\x20the\x20design;\x20run\x20design-validate\x20and\x20repair\x20the\x20reported\x20fields.','validate','fieldCount','includes','Stable\x20recovery\x20ID\x20for\x20one\x20design\x20operation','taskId','fromDatasetCode','datasets','length','Server\x20operation\x20ID','start','lookup','client'];a343_0x3efc=function(){return _0x270859;};return a343_0x3efc();}import{resolve}from'node:path';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getApiDomain}from'../../constant/domain.js';import{getDatasetDesignContext,validateDatasetDesign,startDatasetDesign,getDatasetDesignStatus,getDatasetDesignSyncStatus,retryDatasetDesignSync,getDatasetDetail,getPlatformHttpStatus,isPlatformTransportFailure}from'../../core/api-client.js';import{inputHash,isObject,readManifest,requireValue,validateManifest}from'./contract.js';function a343_0x2bcb(_0x28a3ef,_0x10e0b0){_0x28a3ef=_0x28a3ef-0x1d9;const _0x3efc1e=a343_0x3efc();let _0x2bcbe8=_0x3efc1e[_0x28a3ef];return _0x2bcbe8;}import{readCheckpoint,saveCheckpoint}from'./checkpoint.js';const flag=(_0x1d1b2c,_0x263ed1)=>({'name':_0x1d1b2c,'type':a343_0x2f76db(0x20d),'description':_0x263ed1}),flags={'file':flag(a343_0x2f76db(0x1f4),a343_0x2f76db(0x226)),'output':flag(a343_0x2f76db(0x233),a343_0x2f76db(0x24a)),'checkpoint':flag(a343_0x2f76db(0x23c),a343_0x2f76db(0x23a)),'client':flag(a343_0x2f76db(0x201),a343_0x2f76db(0x1db)),'operation':flag('operation-id',a343_0x2f76db(0x1e0)),'code':flag(a343_0x2f76db(0x1f6),a343_0x2f76db(0x215))};function domain(_0x5bfd1d){const _0x2caa63=a343_0x2f76db,_0x88b8ed=new URL(_0x5bfd1d[_0x2caa63(0x251)]||getApiDomain());return requireValue(!_0x88b8ed[_0x2caa63(0x254)]&&!_0x88b8ed['password']&&!_0x88b8ed[_0x2caa63(0x21e)]&&!_0x88b8ed[_0x2caa63(0x247)],_0x2caa63(0x22c)),_0x88b8ed[_0x2caa63(0x224)]()['replace'](/\/+$/,'');}function required(_0x47aa9c,_0x29517f){const _0x767d29=a343_0x2f76db,_0x390dc3=_0x47aa9c[_0x767d29(0x238)](_0x29517f);if(!_0x390dc3)throw CliErrors[_0x767d29(0x213)](_0x29517f);return _0x390dc3;}function bind(_0x46136f,_0x2e44ed,_0x69a397){const _0x16bfe4=a343_0x2f76db;requireValue(_0x46136f[_0x16bfe4(0x1fa)]===_0x2e44ed[_0x16bfe4(0x1fa)]&&_0x46136f[_0x16bfe4(0x251)]===domain(_0x2e44ed)&&(_0x69a397===undefined||_0x46136f[_0x16bfe4(0x1e9)]===_0x69a397),_0x16bfe4(0x22b));}function query(_0x3adeda,_0x32a27d){const _0x2e367b=a343_0x2f76db;return{'command':_0x2e367b(0x214),'argv':['rabetbase',_0x2e367b(0x206),_0x2e367b(0x214),_0x2e367b(0x24d),_0x3adeda[_0x2e367b(0x1fa)],'--checkpoint',_0x32a27d,_0x2e367b(0x21b),'compress']};}function unknown(_0x37828a,_0x191b76){const _0x230466=a343_0x2f76db;return{'status':_0x230466(0x1e4),'clientOperationId':_0x37828a[_0x230466(0x209)],'operationId':_0x37828a[_0x230466(0x1f3)]??null,'checkpoint':_0x191b76,'query':query(_0x37828a,_0x191b76),'nextAction':_0x230466(0x239)};}function matchesField(_0x57c86c,_0x1b1cc6){const _0x411f1f=a343_0x2f76db;return Object[_0x411f1f(0x20f)](_0x1b1cc6)['every'](([_0x433dfd,_0x372072])=>{const _0x3af1ab=_0x411f1f;if(_0x372072==null)return!![];const _0x40caea=_0x57c86c[_0x433dfd];if(_0x433dfd===_0x3af1ab(0x21f)){if(!Array[_0x3af1ab(0x20e)](_0x40caea)||!Array[_0x3af1ab(0x20e)](_0x372072)||_0x40caea[_0x3af1ab(0x1f0)](_0x2e05e0=>!isObject(_0x2e05e0)))return![];const _0x3c003a=_0x422ede=>_0x422ede[_0x3af1ab(0x200)](({label:_0x49938b,value:_0x3cd156})=>({'label':_0x49938b,'value':_0x3cd156}));return inputHash(_0x3c003a(_0x40caea))===inputHash(_0x3c003a(_0x372072));}return _0x40caea!==undefined&&inputHash(_0x40caea)===inputHash(_0x372072);});}function reconcile(_0x112159,_0x425524){const _0x313a90=a343_0x2f76db;if(!isObject(_0x112159)||!Array['isArray'](_0x112159[_0x313a90(0x1eb)])||!Array['isArray'](_0x112159[_0x313a90(0x227)]))return;const _0x56e84e=_0x112159['createdDatasets'],_0x1ad518=_0x425524?.['datasets']['map'](_0x3df228=>_0x3df228['localKey'])??_0x112159[_0x313a90(0x1fe)];if(!Array['isArray'](_0x1ad518)||_0x1ad518[_0x313a90(0x1df)]!==_0x56e84e[_0x313a90(0x1df)]||new Set(_0x1ad518)['size']!==_0x1ad518[_0x313a90(0x1df)])return;const _0x373d4c=new Map();for(const _0x11bee5 of _0x56e84e){if(!isObject(_0x11bee5)||typeof _0x11bee5['localKey']!==_0x313a90(0x20d)||typeof _0x11bee5[_0x313a90(0x1f6)]!==_0x313a90(0x20d)||!_0x11bee5['code']||_0x373d4c[_0x313a90(0x219)](_0x11bee5[_0x313a90(0x216)]))return;_0x373d4c[_0x313a90(0x212)](_0x11bee5[_0x313a90(0x216)],_0x11bee5[_0x313a90(0x1f6)]);if(_0x425524){const _0x4df6e9=_0x425524[_0x313a90(0x1de)][_0x313a90(0x222)](_0x3f8d4f=>_0x3f8d4f['localKey']===_0x11bee5[_0x313a90(0x216)]);if(!_0x4df6e9||!Array[_0x313a90(0x20e)](_0x11bee5['fields']))return;if(_0x11bee5[_0x313a90(0x24e)][_0x313a90(0x1f0)](_0x252b0f=>!isObject(_0x252b0f)))return;const _0x1e6204=new Map(_0x11bee5[_0x313a90(0x24e)][_0x313a90(0x200)](_0x201da4=>[_0x201da4[_0x313a90(0x204)],_0x201da4]));if(_0x1e6204[_0x313a90(0x230)]!==_0x11bee5[_0x313a90(0x24e)][_0x313a90(0x1df)]||_0x11bee5[_0x313a90(0x1d9)]!==_0x11bee5['fields'][_0x313a90(0x1df)])return;if(_0x4df6e9['fields']['some'](_0x48a86e=>!_0x1e6204[_0x313a90(0x219)](_0x48a86e[_0x313a90(0x204)])||!matchesField(_0x1e6204[_0x313a90(0x22f)](_0x48a86e['name']),_0x48a86e)))return;const _0x2f0206=new Set(_0x4df6e9['fields']['map'](_0x246c21=>_0x246c21[_0x313a90(0x204)]));_0x2f0206[_0x313a90(0x232)]('id');if(_0x11bee5[_0x313a90(0x24e)][_0x313a90(0x1f0)](_0x1fb4bd=>!_0x2f0206[_0x313a90(0x219)](_0x1fb4bd[_0x313a90(0x204)])))return;}}if(new Set(_0x373d4c[_0x313a90(0x24b)]())[_0x313a90(0x230)]!==_0x373d4c[_0x313a90(0x230)]||_0x1ad518[_0x313a90(0x1f0)](_0x1a8832=>!_0x373d4c[_0x313a90(0x219)](_0x1a8832)))return;const _0x2c9890=_0x425524?.[_0x313a90(0x1e5)]??_0x112159[_0x313a90(0x235)];if(!Array[_0x313a90(0x20e)](_0x2c9890)||_0x2c9890['length']!==_0x112159[_0x313a90(0x227)][_0x313a90(0x1df)])return;const _0x28c062=_0x278cd6=>JSON[_0x313a90(0x23b)]([_0x278cd6[_0x313a90(0x220)],_0x278cd6['fromField'],_0x278cd6['toDatasetCode']||_0x373d4c['get'](_0x278cd6[_0x313a90(0x1f1)]),_0x278cd6['toField'],_0x278cd6[_0x313a90(0x1fd)]||_0x313a90(0x1e2),_0x278cd6['cardinality']||_0x313a90(0x225)]),_0x915958=new Set(_0x2c9890[_0x313a90(0x200)](_0x28c062)),_0x237379=new Set(_0x112159['createdRelations'][_0x313a90(0x200)](_0x28c062));if(_0x237379['size']!==_0x2c9890[_0x313a90(0x1df)]||_0x915958['size']!==_0x2c9890[_0x313a90(0x1df)]||[..._0x915958][_0x313a90(0x1f0)](_0x99a832=>!_0x237379[_0x313a90(0x219)](_0x99a832)))return;for(const _0x5dfd4d of _0x112159[_0x313a90(0x227)]){if(_0x5dfd4d[_0x313a90(0x1dd)]!==_0x373d4c[_0x313a90(0x22f)](_0x5dfd4d['fromDatasetKey'])||_0x5dfd4d[_0x313a90(0x1f1)]&&_0x5dfd4d[_0x313a90(0x221)]!==_0x373d4c[_0x313a90(0x22f)](_0x5dfd4d[_0x313a90(0x1f1)]))return;}return{'createdDatasets':_0x56e84e,'createdRelations':_0x112159[_0x313a90(0x227)],'unresolvedRelations':_0x112159[_0x313a90(0x240)]??[]};}export function statusData(_0x548632,_0x4dc547){const _0x4dac9a=a343_0x2f76db;requireValue(isObject(_0x548632)&&typeof _0x548632[_0x4dac9a(0x1f7)]===_0x4dac9a(0x20d),_0x4dac9a(0x22e));const _0x12e935={'jobStatus':_0x548632[_0x4dac9a(0x1f7)],'operationId':_0x548632['operationId']??_0x548632[_0x4dac9a(0x1dc)]??null,'taskId':_0x548632[_0x4dac9a(0x1dc)]??_0x548632[_0x4dac9a(0x1f3)]??null,'clientOperationId':_0x548632[_0x4dac9a(0x209)]??null,'progressRate':_0x548632['progressRate']??null,'currentStep':_0x548632['currentStep']??null,'failedStage':_0x548632['failedStage']??null,'sync':_0x548632[_0x4dac9a(0x21c)]??null,'errorMsg':_0x548632[_0x4dac9a(0x1ec)]??null,'metrics':_0x548632[_0x4dac9a(0x256)]??null},_0xe293ba=!_0x4dc547&&_0x548632[_0x4dac9a(0x1f7)]==='SUCCESS'&&isObject(_0x548632['result']?.['dataset'])?_0x548632['result']['dataset']:undefined;if(_0xe293ba&&typeof _0xe293ba[_0x4dac9a(0x1f6)]===_0x4dac9a(0x20d)&&_0xe293ba['code']&&_0xe293ba['id']!=null)return{..._0x12e935,'status':_0x4dac9a(0x1ed),'createdDataset':_0xe293ba};const _0x37a22a=_0x548632['status']===_0x4dac9a(0x231)?reconcile(_0x548632[_0x4dac9a(0x21d)],_0x4dc547):undefined;return{..._0x12e935,'status':_0x548632[_0x4dac9a(0x1f7)]==='SUCCESS'?_0x37a22a?'datasets_created':_0x4dac9a(0x243):_0x548632[_0x4dac9a(0x1f7)]===_0x4dac9a(0x1fc)?_0x4dac9a(0x20b):[_0x4dac9a(0x1f5),_0x4dac9a(0x255)][_0x4dac9a(0x1da)](_0x548632[_0x4dac9a(0x1f7)])?'operation_pending':_0x4dac9a(0x243),..._0x37a22a};}async function readStatus(_0x51c108,_0x404296){const _0x28bf66=a343_0x2f76db,_0x236aa1=statusData(_0x51c108,_0x404296);if(_0x51c108[_0x28bf66(0x1f7)]!=='SUCCESS'||!reconcile(_0x51c108[_0x28bf66(0x21d)]))return _0x236aa1;const _0x1db40b=[];for(const _0x2c9f87 of _0x51c108['result'][_0x28bf66(0x1eb)]){const _0x5edd6a=await getDatasetDetail(_0x2c9f87[_0x28bf66(0x1f6)]);requireValue(isObject(_0x5edd6a)&&(_0x5edd6a['modelCode']||_0x5edd6a[_0x28bf66(0x1f6)])===_0x2c9f87[_0x28bf66(0x1f6)]&&Array[_0x28bf66(0x20e)](_0x5edd6a[_0x28bf66(0x24e)]),_0x28bf66(0x245));const _0x19517d=_0x5edd6a[_0x28bf66(0x24e)][_0x28bf66(0x250)](_0x333815=>_0x333815['deleted']!==!![]);_0x1db40b['push']({..._0x2c9f87,'fields':_0x19517d,'fieldCount':_0x19517d[_0x28bf66(0x1df)]});}return statusData({..._0x51c108,'result':{..._0x51c108[_0x28bf66(0x21d)],'createdDatasets':_0x1db40b}},_0x404296);}async function recover(_0x343d0b,_0x5011f7,_0x5c50a4){const _0x40d267=a343_0x2f76db;bind(_0x343d0b,_0x5c50a4);const _0x314123=await getDatasetDesignContext(_0x5c50a4['appCode']);requireValue(_0x314123?.[_0x40d267(0x252)]===_0x343d0b[_0x40d267(0x252)],_0x40d267(0x22a));let _0x3cdf38;try{_0x3cdf38=await getDatasetDesignStatus(_0x5c50a4[_0x40d267(0x1fa)],{'clientOperationId':_0x343d0b[_0x40d267(0x209)]});}catch(_0x3f1dab){const _0x17baa2=getPlatformHttpStatus(_0x3f1dab);if(isPlatformTransportFailure(_0x3f1dab)||_0x17baa2===0x194)return unknown(_0x343d0b,_0x5011f7);throw _0x3f1dab;}const _0x1c31d8=await readStatus(_0x3cdf38,_0x343d0b[_0x40d267(0x228)]);return _0x343d0b[_0x40d267(0x223)]=_0x1c31d8[_0x40d267(0x1f7)],_0x343d0b[_0x40d267(0x1f3)]=_0x3cdf38[_0x40d267(0x1f3)]||_0x343d0b[_0x40d267(0x1f3)],await saveCheckpoint(_0x5011f7,_0x343d0b),{..._0x1c31d8,'checkpoint':_0x5011f7,'query':query(_0x343d0b,_0x5011f7)};}async function start(_0x5054d9){const _0x389093=a343_0x2f76db,_0x2ccff3=resolve(required(_0x5054d9,'file')),_0x45b03c=await readManifest(_0x2ccff3),_0x3a7c88=inputHash(_0x45b03c),_0x5e2da9=resolve(_0x5054d9[_0x389093(0x238)](_0x389093(0x23c))||_0x2ccff3+_0x389093(0x20a)),_0x2291f8=await readCheckpoint(_0x5e2da9);if(_0x2291f8)return bind(_0x2291f8,_0x5054d9,_0x3a7c88),requireValue(!_0x5054d9['str'](_0x389093(0x201))||_0x5054d9['str'](_0x389093(0x201))===_0x2291f8[_0x389093(0x209)],'client-operation-id\x20differs\x20from\x20the\x20checkpoint\x20operation.'),recover(_0x2291f8,_0x5e2da9,_0x5054d9);const _0x2bf447=await getDatasetDesignContext(_0x5054d9[_0x389093(0x1fa)]);requireValue(typeof _0x2bf447?.['identityKey']===_0x389093(0x20d)&&_0x2bf447[_0x389093(0x252)],'Server\x20context\x20lacks\x20an\x20authenticated\x20identity.');const _0x45af31=await validateDatasetDesign(_0x5054d9[_0x389093(0x1fa)],_0x45b03c);requireValue(_0x45af31?.['valid']===!![],_0x389093(0x257));const _0x3e1989=validateManifest(_0x45af31[_0x389093(0x218)]);requireValue(typeof _0x45af31[_0x389093(0x1e7)]===_0x389093(0x20d)&&/^[a-f0-9]{64}$/[_0x389093(0x1ff)](_0x45af31['normalizedHash']),_0x389093(0x1f2));const _0x1beae9=_0x5054d9[_0x389093(0x238)](_0x389093(0x201))||_0x389093(0x210)+randomUUID();requireValue(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/[_0x389093(0x1ff)](_0x1beae9),_0x389093(0x1f8));const _0x1038b9={'kind':_0x389093(0x1ee),'schemaVersion':0x1,'appCode':_0x5054d9[_0x389093(0x1fa)],'apiDomain':domain(_0x5054d9),'identityKey':_0x2bf447[_0x389093(0x252)],'inputHash':_0x3a7c88,'clientOperationId':_0x1beae9,'manifest':_0x3e1989,'expectedHash':_0x45af31['normalizedHash'],'state':'prepared'};if(!await saveCheckpoint(_0x5e2da9,_0x1038b9,!![])){const _0x150853=await readCheckpoint(_0x5e2da9);return requireValue(_0x150853,_0x389093(0x1e8)),bind(_0x150853,_0x5054d9,_0x3a7c88),recover(_0x150853,_0x5e2da9,_0x5054d9);}_0x1038b9['state']=_0x389093(0x237),await saveCheckpoint(_0x5e2da9,_0x1038b9);let _0x6eb5ad;try{_0x6eb5ad=await startDatasetDesign(_0x5054d9[_0x389093(0x1fa)],_0x3e1989,_0x1038b9['expectedHash'],_0x1beae9);}catch(_0x3c5832){const _0x569232=isPlatformTransportFailure(_0x3c5832);_0x1038b9[_0x389093(0x223)]=_0x569232?_0x389093(0x242):'rejected',await saveCheckpoint(_0x5e2da9,_0x1038b9);if(!_0x569232)throw _0x3c5832;return unknown(_0x1038b9,_0x5e2da9);}if(!isObject(_0x6eb5ad)||!(_0x6eb5ad['operationId']||_0x6eb5ad['taskId'])||typeof _0x6eb5ad[_0x389093(0x1f7)]!==_0x389093(0x20d))return _0x1038b9[_0x389093(0x223)]=_0x389093(0x242),await saveCheckpoint(_0x5e2da9,_0x1038b9),unknown(_0x1038b9,_0x5e2da9);_0x1038b9[_0x389093(0x1f3)]=_0x6eb5ad[_0x389093(0x1f3)]||_0x6eb5ad[_0x389093(0x1dc)],_0x1038b9['state']=_0x6eb5ad[_0x389093(0x1f7)],await saveCheckpoint(_0x5e2da9,_0x1038b9);if(_0x6eb5ad[_0x389093(0x1f7)]===_0x389093(0x231))return{...await recover(_0x1038b9,_0x5e2da9,_0x5054d9),'clientOperationId':_0x1beae9,'reused':_0x6eb5ad[_0x389093(0x202)]??![]};return{...await readStatus(_0x6eb5ad,_0x3e1989),'clientOperationId':_0x1beae9,'checkpoint':_0x5e2da9,'reused':_0x6eb5ad[_0x389093(0x202)]??![],'query':query(_0x1038b9,_0x5e2da9)};}export function designCommand(_0xffe064){const _0x20cd20=a343_0x2f76db,_0x5e565e=_0x20cd20(0x24f)+_0xffe064,_0x4c6603=_0xffe064===_0x20cd20(0x258)?[flags[_0x20cd20(0x1f4)],flags[_0x20cd20(0x233)]]:_0xffe064===_0x20cd20(0x1e1)?[flags[_0x20cd20(0x1f4)],flags[_0x20cd20(0x23c)],flags[_0x20cd20(0x1e3)]]:_0xffe064===_0x20cd20(0x1f7)?[flags[_0x20cd20(0x1fb)],flags[_0x20cd20(0x1e3)],flags[_0x20cd20(0x23c)]]:_0xffe064[_0x20cd20(0x246)](_0x20cd20(0x21c))?[flags[_0x20cd20(0x1f6)]]:[];return{'service':_0x20cd20(0x206),'command':_0x5e565e,'description':_0x20cd20(0x244)+_0xffe064,'risk':_0xffe064==='start'||_0xffe064===_0x20cd20(0x24c)?_0x20cd20(0x20c):'read','defaultOutputFormat':_0x20cd20(0x203),'strictFlags':!![],'structuredErrors':!![],'flags':[..._0x4c6603,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5afa29){const _0x50d0a6=_0x20cd20;if([_0x50d0a6(0x258),_0x50d0a6(0x1e1)][_0x50d0a6(0x1da)](_0xffe064))required(_0x5afa29,_0x50d0a6(0x1f4));if(_0xffe064[_0x50d0a6(0x246)]('sync'))required(_0x5afa29,_0x50d0a6(0x1f6));if(_0xffe064===_0x50d0a6(0x1f7))requireValue([_0x5afa29[_0x50d0a6(0x238)](_0x50d0a6(0x211)),_0x5afa29['str']('client-operation-id'),_0x5afa29[_0x50d0a6(0x238)](_0x50d0a6(0x23c))][_0x50d0a6(0x250)](Boolean)[_0x50d0a6(0x1df)]===0x1,_0x50d0a6(0x23f));},async 'dryRun'(_0x57b110){const _0x4b0d5f=_0x20cd20,_0x9b10af=[_0x4b0d5f(0x258),_0x4b0d5f(0x1e1)][_0x4b0d5f(0x1da)](_0xffe064)?await readManifest(resolve(required(_0x57b110,_0x4b0d5f(0x1f4)))):undefined;return{'method':[_0x4b0d5f(0x258),_0x4b0d5f(0x1e1),'sync-retry'][_0x4b0d5f(0x1da)](_0xffe064)?_0x4b0d5f(0x207):_0x4b0d5f(0x248),'url':_0x4b0d5f(0x229)+_0xffe064,'body':_0x9b10af?{'appCode':_0x57b110[_0x4b0d5f(0x1fa)],'manifest':_0x9b10af}:undefined,'description':_0x4b0d5f(0x253)};},async 'execute'(_0x5e2f11){const _0x5df363=_0x20cd20;let _0x5927d6;if(_0xffe064==='context')_0x5927d6=await getDatasetDesignContext(_0x5e2f11[_0x5df363(0x1fa)]);else{if(_0xffe064===_0x5df363(0x258)){_0x5927d6=await validateDatasetDesign(_0x5e2f11[_0x5df363(0x1fa)],await readManifest(resolve(required(_0x5e2f11,'file'))));if(_0x5e2f11['str']('output')&&_0x5927d6?.['valid']===!![]){const {writeFile:_0x37c8a6,mkdir:_0x295208}=await import('node:fs/promises'),{dirname:_0x45c0f0}=await import('node:path'),_0x441397=resolve(_0x5e2f11[_0x5df363(0x238)](_0x5df363(0x233)));await _0x295208(_0x45c0f0(_0x441397),{'recursive':!![]}),await _0x37c8a6(_0x441397,JSON[_0x5df363(0x23b)](_0x5927d6,null,0x2)+'\x0a',{'mode':0x180});}}else{if(_0xffe064==='start')_0x5927d6=await start(_0x5e2f11);else{if(_0xffe064==='status'){const _0x5a375d=_0x5e2f11[_0x5df363(0x238)](_0x5df363(0x23c));if(_0x5a375d){const _0x400920=await readCheckpoint(resolve(_0x5a375d));requireValue(_0x400920,_0x5df363(0x1f9)),_0x5927d6=await recover(_0x400920,resolve(_0x5a375d),_0x5e2f11);}else _0x5927d6=statusData(await getDatasetDesignStatus(_0x5e2f11[_0x5df363(0x1fa)],{'operationId':_0x5e2f11[_0x5df363(0x238)](_0x5df363(0x211))||undefined,'clientOperationId':_0x5e2f11[_0x5df363(0x238)](_0x5df363(0x201))||undefined}));}else{if(_0xffe064===_0x5df363(0x217))_0x5927d6=await getDatasetDesignSyncStatus(_0x5e2f11[_0x5df363(0x1fa)],required(_0x5e2f11,_0x5df363(0x1f6)));else _0x5927d6=await retryDatasetDesignSync(_0x5e2f11[_0x5df363(0x1fa)],required(_0x5e2f11,_0x5df363(0x1f6)));}}}}return{'ok':!![],'message':_0x5927d6['status']===_0x5df363(0x1e4)?_0x5df363(0x1ea):_0x5927d6[_0x5df363(0x1f7)]===_0x5df363(0x249)?'Operation\x20submitted;\x20continue\x20querying\x20its\x20status.':_0x5df363(0x1e6)+_0xffe064+_0x5df363(0x23d),'data':{'operation':'dataset.'+_0x5e565e,'appCode':_0x5e2f11[_0x5df363(0x1fa)],..._0x5927d6}};}};}
|
|
1
|
+
const a343_0x1c406f=a343_0x477d;(function(_0x1a24fd,_0x2291c7){const _0x6a82b9=a343_0x477d,_0x3cf198=_0x1a24fd();while(!![]){try{const _0x36a5b4=parseInt(_0x6a82b9(0x1bf))/0x1+-parseInt(_0x6a82b9(0x22e))/0x2+-parseInt(_0x6a82b9(0x1f3))/0x3*(-parseInt(_0x6a82b9(0x1df))/0x4)+parseInt(_0x6a82b9(0x1d6))/0x5+parseInt(_0x6a82b9(0x207))/0x6+parseInt(_0x6a82b9(0x1d3))/0x7+parseInt(_0x6a82b9(0x1d9))/0x8*(-parseInt(_0x6a82b9(0x1e1))/0x9);if(_0x36a5b4===_0x2291c7)break;else _0x3cf198['push'](_0x3cf198['shift']());}catch(_0x202bca){_0x3cf198['push'](_0x3cf198['shift']());}}}(a343_0x1abb,0x43b28));import{randomUUID}from'node:crypto';import{resolve}from'node:path';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getApiDomain}from'../../constant/domain.js';import{getDatasetDesignContext,validateDatasetDesign,startDatasetDesign,getDatasetDesignStatus,getDatasetDesignSyncStatus,retryDatasetDesignSync,getDatasetDetail,getPlatformHttpStatus,isPlatformTransportFailure}from'../../core/api-client.js';import{inputHash,isObject,readManifest,requireValue,validateManifest}from'./contract.js';import{readCheckpoint,saveCheckpoint}from'./checkpoint.js';const flag=(_0x1f7912,_0x2434ee)=>({'name':_0x1f7912,'type':a343_0x1c406f(0x21d),'description':_0x2434ee}),flags={'file':flag(a343_0x1c406f(0x227),a343_0x1c406f(0x210)),'output':flag(a343_0x1c406f(0x1e8),'Save\x20the\x20server-normalized\x20design\x20JSON'),'checkpoint':flag(a343_0x1c406f(0x228),'Durable\x20operation\x20checkpoint\x20path'),'client':flag(a343_0x1c406f(0x1c0),a343_0x1c406f(0x1b3)),'operation':flag('operation-id',a343_0x1c406f(0x204)),'code':flag('code',a343_0x1c406f(0x1f8))};function domain(_0x598638){const _0x35cbf9=a343_0x1c406f,_0xbc6b2c=new URL(_0x598638[_0x35cbf9(0x1fe)]||getApiDomain());return requireValue(!_0xbc6b2c[_0x35cbf9(0x1ef)]&&!_0xbc6b2c[_0x35cbf9(0x21b)]&&!_0xbc6b2c['search']&&!_0xbc6b2c[_0x35cbf9(0x209)],'API\x20domain\x20must\x20not\x20contain\x20credentials,\x20query\x20or\x20fragment.'),_0xbc6b2c[_0x35cbf9(0x1b9)]()[_0x35cbf9(0x1b6)](/\/+$/,'');}function required(_0x2d61bb,_0x2a29ef){const _0x5a26c9=a343_0x1c406f,_0x1b906a=_0x2d61bb[_0x5a26c9(0x203)](_0x2a29ef);if(!_0x1b906a)throw CliErrors[_0x5a26c9(0x221)](_0x2a29ef);return _0x1b906a;}function bind(_0x3c03db,_0x375b7d,_0x173beb){const _0xdc4f85=a343_0x1c406f;requireValue(_0x3c03db['appCode']===_0x375b7d[_0xdc4f85(0x230)]&&_0x3c03db['apiDomain']===domain(_0x375b7d)&&(_0x173beb===undefined||_0x3c03db[_0xdc4f85(0x212)]===_0x173beb),_0xdc4f85(0x215));}function query(_0x107fbd,_0x1ed88a){const _0x4dc803=a343_0x1c406f;return{'command':_0x4dc803(0x217),'argv':[_0x4dc803(0x206),_0x4dc803(0x22d),_0x4dc803(0x217),_0x4dc803(0x1fb),_0x107fbd[_0x4dc803(0x230)],_0x4dc803(0x1d0),_0x1ed88a,'--format',_0x4dc803(0x1d1)]};}function a343_0x477d(_0x2bfe09,_0x86ad7){_0x2bfe09=_0x2bfe09-0x1b1;const _0x1abb1a=a343_0x1abb();let _0x477d49=_0x1abb1a[_0x2bfe09];return _0x477d49;}function unknown(_0x461878,_0xd8e434){const _0x338d06=a343_0x1c406f;return{'status':_0x338d06(0x219),'clientOperationId':_0x461878[_0x338d06(0x1f9)],'operationId':_0x461878[_0x338d06(0x202)]??null,'checkpoint':_0xd8e434,'query':query(_0x461878,_0xd8e434),'nextAction':_0x338d06(0x1b7)};}function matchesField(_0x4020ad,_0xd49016){const _0x27e2d8=a343_0x1c406f;return Object[_0x27e2d8(0x205)](_0xd49016)[_0x27e2d8(0x21c)](([_0x4099b1,_0x30d181])=>{const _0x4c66ce=_0x27e2d8;if(_0x30d181==null)return!![];const _0x1bdec3=_0x4020ad[_0x4099b1];if(_0x4099b1===_0x4c66ce(0x1bb)){if(!Array['isArray'](_0x1bdec3)||!Array[_0x4c66ce(0x1bc)](_0x30d181)||_0x1bdec3['some'](_0x17a99b=>!isObject(_0x17a99b)))return![];const _0x4efb0c=_0x3bd499=>_0x3bd499[_0x4c66ce(0x20f)](({label:_0x1fb630,value:_0x4bc7cf})=>({'label':_0x1fb630,'value':_0x4bc7cf}));return inputHash(_0x4efb0c(_0x1bdec3))===inputHash(_0x4efb0c(_0x30d181));}return _0x1bdec3!==undefined&&inputHash(_0x1bdec3)===inputHash(_0x30d181);});}function reconcile(_0x774b0e,_0x27a599){const _0x33a973=a343_0x1c406f;if(!isObject(_0x774b0e)||!Array[_0x33a973(0x1bc)](_0x774b0e['createdDatasets'])||!Array[_0x33a973(0x1bc)](_0x774b0e[_0x33a973(0x1d5)]))return;const _0x35ef62=_0x774b0e[_0x33a973(0x220)],_0x1c88cf=_0x27a599?.['datasets'][_0x33a973(0x20f)](_0x210258=>_0x210258['localKey'])??_0x774b0e['expectedLocalKeys'];if(!Array[_0x33a973(0x1bc)](_0x1c88cf)||_0x1c88cf[_0x33a973(0x208)]!==_0x35ef62[_0x33a973(0x208)]||new Set(_0x1c88cf)[_0x33a973(0x1cd)]!==_0x1c88cf[_0x33a973(0x208)])return;const _0xdf8a80=new Map();for(const _0x43fc3b of _0x35ef62){if(!isObject(_0x43fc3b)||typeof _0x43fc3b[_0x33a973(0x21e)]!=='string'||typeof _0x43fc3b[_0x33a973(0x229)]!=='string'||!_0x43fc3b[_0x33a973(0x229)]||_0xdf8a80[_0x33a973(0x1b8)](_0x43fc3b[_0x33a973(0x21e)]))return;_0xdf8a80[_0x33a973(0x1ce)](_0x43fc3b[_0x33a973(0x21e)],_0x43fc3b['code']);if(_0x27a599){const _0x2783e6=_0x27a599[_0x33a973(0x226)][_0x33a973(0x1e4)](_0x1f1fce=>_0x1f1fce[_0x33a973(0x21e)]===_0x43fc3b['localKey']);if(!_0x2783e6||!Array[_0x33a973(0x1bc)](_0x43fc3b['fields']))return;if(_0x43fc3b['fields'][_0x33a973(0x200)](_0x2b7e8c=>!isObject(_0x2b7e8c)))return;const _0x3c0bb8=new Map(_0x43fc3b['fields'][_0x33a973(0x20f)](_0x53331e=>[_0x53331e[_0x33a973(0x1d4)],_0x53331e]));if(_0x3c0bb8['size']!==_0x43fc3b['fields'][_0x33a973(0x208)]||_0x43fc3b[_0x33a973(0x1f7)]!==_0x43fc3b[_0x33a973(0x1cb)]['length'])return;if(_0x2783e6[_0x33a973(0x1cb)]['some'](_0x28877d=>!_0x3c0bb8[_0x33a973(0x1b8)](_0x28877d['name'])||!matchesField(_0x3c0bb8['get'](_0x28877d[_0x33a973(0x1d4)]),_0x28877d)))return;const _0x21c45c=new Set(_0x2783e6['fields'][_0x33a973(0x20f)](_0x4caeb9=>_0x4caeb9['name']));_0x21c45c[_0x33a973(0x20a)]('id');if(_0x43fc3b['fields'][_0x33a973(0x200)](_0x1d0861=>!_0x21c45c[_0x33a973(0x1b8)](_0x1d0861[_0x33a973(0x1d4)])))return;}}if(new Set(_0xdf8a80[_0x33a973(0x1c3)]())['size']!==_0xdf8a80[_0x33a973(0x1cd)]||_0x1c88cf[_0x33a973(0x200)](_0x2db6ac=>!_0xdf8a80[_0x33a973(0x1b8)](_0x2db6ac)))return;const _0x39bd18=_0x27a599?.['relations']??_0x774b0e[_0x33a973(0x1db)];if(!Array[_0x33a973(0x1bc)](_0x39bd18)||_0x39bd18['length']!==_0x774b0e[_0x33a973(0x1d5)]['length'])return;const _0x2337ac=_0x55dd19=>JSON[_0x33a973(0x223)]([_0x55dd19[_0x33a973(0x21a)],_0x55dd19[_0x33a973(0x214)],_0x55dd19[_0x33a973(0x1b4)]||_0xdf8a80[_0x33a973(0x20b)](_0x55dd19['toDatasetKey']),_0x55dd19[_0x33a973(0x1dc)],_0x55dd19[_0x33a973(0x21f)]||_0x33a973(0x1ee),_0x55dd19['cardinality']||_0x33a973(0x1e0)]),_0x1172b3=new Set(_0x39bd18[_0x33a973(0x20f)](_0x2337ac)),_0x1a761e=new Set(_0x774b0e[_0x33a973(0x1d5)][_0x33a973(0x20f)](_0x2337ac));if(_0x1a761e[_0x33a973(0x1cd)]!==_0x39bd18[_0x33a973(0x208)]||_0x1172b3['size']!==_0x39bd18[_0x33a973(0x208)]||[..._0x1172b3]['some'](_0x4f040d=>!_0x1a761e['has'](_0x4f040d)))return;for(const _0x464fb1 of _0x774b0e[_0x33a973(0x1d5)]){if(_0x464fb1[_0x33a973(0x1de)]!==_0xdf8a80[_0x33a973(0x20b)](_0x464fb1[_0x33a973(0x21a)])||_0x464fb1['toDatasetKey']&&_0x464fb1[_0x33a973(0x1b4)]!==_0xdf8a80[_0x33a973(0x20b)](_0x464fb1[_0x33a973(0x1c6)]))return;}return{'createdDatasets':_0x35ef62,'createdRelations':_0x774b0e['createdRelations'],'unresolvedRelations':_0x774b0e['unresolvedRelations']??[]};}function a343_0x1abb(){const _0x2dc329=['datasets','file','checkpoint','code','startsWith','valid','Invalid\x20client-operation-id.','dataset','497284ePXBqg','Server\x20response\x20does\x20not\x20contain\x20a\x20valid\x20operation\x20state.','appCode','read','filter','Stable\x20recovery\x20ID\x20for\x20one\x20design\x20operation','toDatasetCode','currentStep','replace','query_original_operation','has','toString','Checkpoint\x20not\x20found.','options','isArray','node:fs/promises','normalizedHash','414569vEdgTB','client-operation-id','sync-retry','metrics','values','operation-id','Checkpoint\x20belongs\x20to\x20another\x20authenticated\x20principal.','toDatasetKey','Checkpoint\x20creation\x20could\x20not\x20be\x20reconciled.','identityKey','includes','sync-status','fields','normalizedManifest','size','set','write','--checkpoint','compress','PENDING','1308853Fzvtit','name','createdRelations','2560890ORUREQ','Provide\x20exactly\x20one\x20operation-id,\x20client-operation-id\x20or\x20checkpoint.','prepared','9436288TxBkOC','PROCESSING','expectedRelations','toField','Server\x20returned\x20an\x20invalid\x20design\x20hash.','fromDatasetCode','152GHeADx','MANY_TO_ONE','9vxUYQT','deleted','modelCode','find','datasets_created','expectedHash','taskId','output','\x20response\x20received','Inspect\x20the\x20deterministic\x20request\x20without\x20submission\x20or\x20checkpoint\x20writes.','failedStage','Server\x20rejected\x20the\x20design;\x20run\x20design-validate\x20and\x20repair\x20the\x20reported\x20fields.','start','lookup','username','operation_pending','GET','Server\x20context\x20lacks\x20an\x20authenticated\x20identity.','36786ERwKlg','POST','validate','dataset_created','fieldCount','Saved\x20dataset\x20code','clientOperationId','reused','--appcode','unknown_reconcile_failed','sync','apiDomain','state','some','client','operationId','str','Server\x20operation\x20ID','entries','rabetbase','754704GaLdfC','length','hash','add','get','Deterministic\x20dataset\x20design\x20','dataset.','/smartapi/dataset/design/','map','Agent-authored\x20JSON\x20dataset\x20manifest','push','inputHash','result','fromField','Checkpoint\x20target\x20or\x20design\x20changed.\x20Reconcile\x20the\x20original\x20operation;\x20use\x20a\x20new\x20design\x20file\x20for\x20an\x20intentional\x20new\x20operation.','status','design-status','manifest','submission_unknown','fromDatasetKey','password','every','string','localKey','relationType','createdDatasets','flagMissing','SUCCESS','stringify','submitting','rejected'];a343_0x1abb=function(){return _0x2dc329;};return a343_0x1abb();}export function statusData(_0x490ceb,_0x5ea79a){const _0xf7ab6d=a343_0x1c406f;requireValue(isObject(_0x490ceb)&&typeof _0x490ceb[_0xf7ab6d(0x216)]===_0xf7ab6d(0x21d),_0xf7ab6d(0x22f));const _0x193409={'jobStatus':_0x490ceb['status'],'operationId':_0x490ceb[_0xf7ab6d(0x202)]??_0x490ceb['taskId']??null,'taskId':_0x490ceb[_0xf7ab6d(0x1e7)]??_0x490ceb[_0xf7ab6d(0x202)]??null,'clientOperationId':_0x490ceb[_0xf7ab6d(0x1f9)]??null,'progressRate':_0x490ceb['progressRate']??null,'currentStep':_0x490ceb[_0xf7ab6d(0x1b5)]??null,'failedStage':_0x490ceb[_0xf7ab6d(0x1eb)]??null,'sync':_0x490ceb[_0xf7ab6d(0x1fd)]??null,'errorMsg':_0x490ceb['errorMsg']??null,'metrics':_0x490ceb[_0xf7ab6d(0x1c2)]??null},_0x40137c=!_0x5ea79a&&_0x490ceb[_0xf7ab6d(0x216)]==='SUCCESS'&&isObject(_0x490ceb['result']?.[_0xf7ab6d(0x22d)])?_0x490ceb[_0xf7ab6d(0x213)]['dataset']:undefined;if(_0x40137c&&typeof _0x40137c[_0xf7ab6d(0x229)]===_0xf7ab6d(0x21d)&&_0x40137c[_0xf7ab6d(0x229)]&&_0x40137c['id']!=null)return{..._0x193409,'status':_0xf7ab6d(0x1f6),'createdDataset':_0x40137c};const _0x67edfc=_0x490ceb[_0xf7ab6d(0x216)]===_0xf7ab6d(0x222)?reconcile(_0x490ceb[_0xf7ab6d(0x213)],_0x5ea79a):undefined;return{..._0x193409,'status':_0x490ceb[_0xf7ab6d(0x216)]===_0xf7ab6d(0x222)?_0x67edfc?_0xf7ab6d(0x1e5):_0xf7ab6d(0x1fc):_0x490ceb['status']==='FAILED'?'operation_failed':[_0xf7ab6d(0x1d2),_0xf7ab6d(0x1da)][_0xf7ab6d(0x1c9)](_0x490ceb[_0xf7ab6d(0x216)])?_0xf7ab6d(0x1f0):_0xf7ab6d(0x1fc),..._0x67edfc};}async function readStatus(_0x594ec2,_0x523c9c){const _0x6d9403=a343_0x1c406f,_0x5b19ca=statusData(_0x594ec2,_0x523c9c);if(_0x594ec2[_0x6d9403(0x216)]!==_0x6d9403(0x222)||!reconcile(_0x594ec2[_0x6d9403(0x213)]))return _0x5b19ca;const _0xa3c8f7=[];for(const _0x2bdd05 of _0x594ec2[_0x6d9403(0x213)][_0x6d9403(0x220)]){const _0x14119a=await getDatasetDetail(_0x2bdd05['code']);requireValue(isObject(_0x14119a)&&(_0x14119a[_0x6d9403(0x1e3)]||_0x14119a[_0x6d9403(0x229)])===_0x2bdd05['code']&&Array['isArray'](_0x14119a[_0x6d9403(0x1cb)]),'Dataset\x20detail\x20does\x20not\x20contain\x20matching\x20DOV2\x20metadata.');const _0x5ea76a=_0x14119a[_0x6d9403(0x1cb)]['filter'](_0x4a91bc=>_0x4a91bc[_0x6d9403(0x1e2)]!==!![]);_0xa3c8f7[_0x6d9403(0x211)]({..._0x2bdd05,'fields':_0x5ea76a,'fieldCount':_0x5ea76a[_0x6d9403(0x208)]});}return statusData({..._0x594ec2,'result':{..._0x594ec2[_0x6d9403(0x213)],'createdDatasets':_0xa3c8f7}},_0x523c9c);}async function recover(_0x36aff2,_0x151b35,_0x5e53b3){const _0x253989=a343_0x1c406f;bind(_0x36aff2,_0x5e53b3);const _0x58dc9a=await getDatasetDesignContext(_0x5e53b3['appCode']);requireValue(_0x58dc9a?.['identityKey']===_0x36aff2[_0x253989(0x1c8)],_0x253989(0x1c5));let _0x1251cd;try{_0x1251cd=await getDatasetDesignStatus(_0x5e53b3[_0x253989(0x230)],{'clientOperationId':_0x36aff2['clientOperationId']});}catch(_0xd35922){const _0x19ed80=getPlatformHttpStatus(_0xd35922);if(isPlatformTransportFailure(_0xd35922)||_0x19ed80===0x194)return unknown(_0x36aff2,_0x151b35);throw _0xd35922;}const _0x2c0bb5=await readStatus(_0x1251cd,_0x36aff2[_0x253989(0x218)]);return _0x36aff2[_0x253989(0x1ff)]=_0x2c0bb5['status'],_0x36aff2[_0x253989(0x202)]=_0x1251cd['operationId']||_0x36aff2[_0x253989(0x202)],await saveCheckpoint(_0x151b35,_0x36aff2),{..._0x2c0bb5,'checkpoint':_0x151b35,'query':query(_0x36aff2,_0x151b35)};}async function start(_0x502f8e){const _0x16035c=a343_0x1c406f,_0x425b4e=resolve(required(_0x502f8e,_0x16035c(0x227))),_0x566b3d=await readManifest(_0x425b4e),_0x59cbc5=inputHash(_0x566b3d),_0x51043c=resolve(_0x502f8e[_0x16035c(0x203)](_0x16035c(0x228))||_0x425b4e+'.checkpoint.json'),_0x573d08=await readCheckpoint(_0x51043c);if(_0x573d08)return bind(_0x573d08,_0x502f8e,_0x59cbc5),requireValue(!_0x502f8e[_0x16035c(0x203)](_0x16035c(0x1c0))||_0x502f8e[_0x16035c(0x203)](_0x16035c(0x1c0))===_0x573d08[_0x16035c(0x1f9)],'client-operation-id\x20differs\x20from\x20the\x20checkpoint\x20operation.'),recover(_0x573d08,_0x51043c,_0x502f8e);const _0x5d6afb=await getDatasetDesignContext(_0x502f8e[_0x16035c(0x230)]);requireValue(typeof _0x5d6afb?.['identityKey']===_0x16035c(0x21d)&&_0x5d6afb[_0x16035c(0x1c8)],_0x16035c(0x1f2));const _0x571581=await validateDatasetDesign(_0x502f8e['appCode'],_0x566b3d);requireValue(_0x571581?.[_0x16035c(0x22b)]===!![],_0x16035c(0x1ec));const _0x452e30=validateManifest(_0x571581[_0x16035c(0x1cc)]);requireValue(typeof _0x571581[_0x16035c(0x1be)]===_0x16035c(0x21d)&&/^[a-f0-9]{64}$/['test'](_0x571581[_0x16035c(0x1be)]),_0x16035c(0x1dd));const _0x135590=_0x502f8e[_0x16035c(0x203)](_0x16035c(0x1c0))||'dataset-design-'+randomUUID();requireValue(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/['test'](_0x135590),_0x16035c(0x22c));const _0x39b448={'kind':'dataset-design-operation','schemaVersion':0x1,'appCode':_0x502f8e[_0x16035c(0x230)],'apiDomain':domain(_0x502f8e),'identityKey':_0x5d6afb[_0x16035c(0x1c8)],'inputHash':_0x59cbc5,'clientOperationId':_0x135590,'manifest':_0x452e30,'expectedHash':_0x571581['normalizedHash'],'state':_0x16035c(0x1d8)};if(!await saveCheckpoint(_0x51043c,_0x39b448,!![])){const _0x42cdf2=await readCheckpoint(_0x51043c);return requireValue(_0x42cdf2,_0x16035c(0x1c7)),bind(_0x42cdf2,_0x502f8e,_0x59cbc5),recover(_0x42cdf2,_0x51043c,_0x502f8e);}_0x39b448['state']=_0x16035c(0x224),await saveCheckpoint(_0x51043c,_0x39b448);let _0x27512e;try{_0x27512e=await startDatasetDesign(_0x502f8e[_0x16035c(0x230)],_0x452e30,_0x39b448[_0x16035c(0x1e6)],_0x135590);}catch(_0x4e18db){const _0x1954ca=isPlatformTransportFailure(_0x4e18db);_0x39b448[_0x16035c(0x1ff)]=_0x1954ca?'unknown':_0x16035c(0x225),await saveCheckpoint(_0x51043c,_0x39b448);if(!_0x1954ca)throw _0x4e18db;return unknown(_0x39b448,_0x51043c);}if(!isObject(_0x27512e)||!(_0x27512e[_0x16035c(0x202)]||_0x27512e[_0x16035c(0x1e7)])||typeof _0x27512e[_0x16035c(0x216)]!==_0x16035c(0x21d))return _0x39b448[_0x16035c(0x1ff)]='unknown',await saveCheckpoint(_0x51043c,_0x39b448),unknown(_0x39b448,_0x51043c);_0x39b448['operationId']=_0x27512e[_0x16035c(0x202)]||_0x27512e[_0x16035c(0x1e7)],_0x39b448[_0x16035c(0x1ff)]=_0x27512e['status'],await saveCheckpoint(_0x51043c,_0x39b448);if(_0x27512e['status']===_0x16035c(0x222))return{...await recover(_0x39b448,_0x51043c,_0x502f8e),'clientOperationId':_0x135590,'reused':_0x27512e[_0x16035c(0x1fa)]??![]};return{...await readStatus(_0x27512e,_0x452e30),'clientOperationId':_0x135590,'checkpoint':_0x51043c,'reused':_0x27512e[_0x16035c(0x1fa)]??![],'query':query(_0x39b448,_0x51043c)};}export function designCommand(_0x3331bd){const _0x343676=a343_0x1c406f,_0xa40289='design-'+_0x3331bd,_0x2a129b=_0x3331bd==='validate'?[flags[_0x343676(0x227)],flags[_0x343676(0x1e8)]]:_0x3331bd==='start'?[flags[_0x343676(0x227)],flags[_0x343676(0x228)],flags['client']]:_0x3331bd==='status'?[flags['operation'],flags[_0x343676(0x201)],flags[_0x343676(0x228)]]:_0x3331bd[_0x343676(0x22a)](_0x343676(0x1fd))?[flags[_0x343676(0x229)]]:[];return{'service':_0x343676(0x22d),'command':_0xa40289,'description':_0x343676(0x20c)+_0x3331bd,'risk':_0x3331bd===_0x343676(0x1ed)||_0x3331bd===_0x343676(0x1c1)?_0x343676(0x1cf):_0x343676(0x1b1),'defaultOutputFormat':_0x343676(0x1d1),'strictFlags':!![],'structuredErrors':!![],'flags':[..._0x2a129b,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x59e8dc){const _0x15d936=_0x343676;if([_0x15d936(0x1f5),_0x15d936(0x1ed)]['includes'](_0x3331bd))required(_0x59e8dc,_0x15d936(0x227));if(_0x3331bd[_0x15d936(0x22a)]('sync'))required(_0x59e8dc,_0x15d936(0x229));if(_0x3331bd==='status')requireValue([_0x59e8dc[_0x15d936(0x203)](_0x15d936(0x1c4)),_0x59e8dc[_0x15d936(0x203)](_0x15d936(0x1c0)),_0x59e8dc[_0x15d936(0x203)]('checkpoint')][_0x15d936(0x1b2)](Boolean)[_0x15d936(0x208)]===0x1,_0x15d936(0x1d7));},async 'dryRun'(_0x533938){const _0x3de8f0=_0x343676,_0x5d9f59=['validate',_0x3de8f0(0x1ed)]['includes'](_0x3331bd)?await readManifest(resolve(required(_0x533938,_0x3de8f0(0x227)))):undefined;return{'method':[_0x3de8f0(0x1f5),_0x3de8f0(0x1ed),_0x3de8f0(0x1c1)][_0x3de8f0(0x1c9)](_0x3331bd)?_0x3de8f0(0x1f4):_0x3de8f0(0x1f1),'url':_0x3de8f0(0x20e)+_0x3331bd,'body':_0x5d9f59?{'appCode':_0x533938[_0x3de8f0(0x230)],'manifest':_0x5d9f59}:undefined,'description':_0x3de8f0(0x1ea)};},async 'execute'(_0x325c94){const _0xb6bc09=_0x343676;let _0x3bfcbc;if(_0x3331bd==='context')_0x3bfcbc=await getDatasetDesignContext(_0x325c94[_0xb6bc09(0x230)]);else{if(_0x3331bd==='validate'){_0x3bfcbc=await validateDatasetDesign(_0x325c94[_0xb6bc09(0x230)],await readManifest(resolve(required(_0x325c94,_0xb6bc09(0x227)))));if(_0x325c94['str'](_0xb6bc09(0x1e8))&&_0x3bfcbc?.[_0xb6bc09(0x22b)]===!![]){const {writeFile:_0x5b641b,mkdir:_0x4e3f42}=await import(_0xb6bc09(0x1bd)),{dirname:_0x154851}=await import('node:path'),_0x569f4a=resolve(_0x325c94[_0xb6bc09(0x203)]('output'));await _0x4e3f42(_0x154851(_0x569f4a),{'recursive':!![]}),await _0x5b641b(_0x569f4a,JSON[_0xb6bc09(0x223)](_0x3bfcbc,null,0x2)+'\x0a',{'mode':0x180});}}else{if(_0x3331bd===_0xb6bc09(0x1ed))_0x3bfcbc=await start(_0x325c94);else{if(_0x3331bd===_0xb6bc09(0x216)){const _0xa11741=_0x325c94[_0xb6bc09(0x203)](_0xb6bc09(0x228));if(_0xa11741){const _0x5f3bc7=await readCheckpoint(resolve(_0xa11741));requireValue(_0x5f3bc7,_0xb6bc09(0x1ba)),_0x3bfcbc=await recover(_0x5f3bc7,resolve(_0xa11741),_0x325c94);}else _0x3bfcbc=statusData(await getDatasetDesignStatus(_0x325c94['appCode'],{'operationId':_0x325c94[_0xb6bc09(0x203)](_0xb6bc09(0x1c4))||undefined,'clientOperationId':_0x325c94[_0xb6bc09(0x203)]('client-operation-id')||undefined}));}else{if(_0x3331bd===_0xb6bc09(0x1ca))_0x3bfcbc=await getDatasetDesignSyncStatus(_0x325c94[_0xb6bc09(0x230)],required(_0x325c94,_0xb6bc09(0x229)));else _0x3bfcbc=await retryDatasetDesignSync(_0x325c94[_0xb6bc09(0x230)],required(_0x325c94,_0xb6bc09(0x229)));}}}}return{'ok':!![],'message':_0x3bfcbc[_0xb6bc09(0x216)]===_0xb6bc09(0x219)?'Submission\x20outcome\x20is\x20unknown;\x20query\x20the\x20original\x20operation.':_0x3bfcbc['status']==='operation_pending'?'Operation\x20submitted;\x20continue\x20querying\x20its\x20status.':'Dataset\x20design\x20'+_0x3331bd+_0xb6bc09(0x1e9),'data':{'operation':_0xb6bc09(0x20d)+_0xa40289,'appCode':_0x325c94[_0xb6bc09(0x230)],..._0x3bfcbc}};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a344_0x53bb6c=a344_0xf216;(function(_0x461ba1,_0x42fd1d){const _0x444503=a344_0xf216,_0x31a0d5=_0x461ba1();while(!![]){try{const _0x4a6a3c=parseInt(_0x444503(0x14e))/0x1+-parseInt(_0x444503(0xfb))/0x2+-parseInt(_0x444503(0x140))/0x3+parseInt(_0x444503(0x153))/0x4*(parseInt(_0x444503(0x143))/0x5)+parseInt(_0x444503(0x173))/0x6+parseInt(_0x444503(0x16d))/0x7+-parseInt(_0x444503(0x152))/0x8*(parseInt(_0x444503(0x151))/0x9);if(_0x4a6a3c===_0x42fd1d)break;else _0x31a0d5['push'](_0x31a0d5['shift']());}catch(_0x4db1a0){_0x31a0d5['push'](_0x31a0d5['shift']());}}}(a344_0x1202,0x2ee0b));import{createHash}from'node:crypto';import{readFile,lstat}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const isObject=_0x250e37=>_0x250e37!==null&&typeof _0x250e37===a344_0x53bb6c(0x15c)&&!Array[a344_0x53bb6c(0x120)](_0x250e37);const types=new Set([a344_0x53bb6c(0x149),'NUMBER','DATETIME',a344_0x53bb6c(0xf4),a344_0x53bb6c(0x126),a344_0x53bb6c(0x125),'DATE_RANGE',a344_0x53bb6c(0x11c),a344_0x53bb6c(0x130),a344_0x53bb6c(0x14c)]),dbTypes=new Set([a344_0x53bb6c(0x145),a344_0x53bb6c(0x131),a344_0x53bb6c(0x149),a344_0x53bb6c(0x163),a344_0x53bb6c(0x159),a344_0x53bb6c(0x132),a344_0x53bb6c(0x135),a344_0x53bb6c(0x107),a344_0x53bb6c(0xf2),a344_0x53bb6c(0x10c),a344_0x53bb6c(0x134),a344_0x53bb6c(0x11e),a344_0x53bb6c(0x12a),'DATE',a344_0x53bb6c(0x10a),a344_0x53bb6c(0x165),'BOOLEAN',a344_0x53bb6c(0x14f)]),identifier=/^[a-z][a-z0-9_]*$/;export function requireValue(_0x4b48ae,_0x5c6479){const _0x57a0ac=a344_0x53bb6c;if(!_0x4b48ae)throw CliErrors[_0x57a0ac(0x103)](_0x5c6479);}function keys(_0x555949,_0x1e01b9,_0x229d9e){const _0x143c07=a344_0x53bb6c;for(const _0x13cac5 of Object[_0x143c07(0xfd)](_0x555949))requireValue(_0x1e01b9[_0x143c07(0x15a)](_0x13cac5),_0x229d9e+'.'+_0x13cac5+_0x143c07(0x161));}function text(_0x376007,_0x3803f7){const _0x3e5ff7=a344_0x53bb6c;requireValue(typeof _0x376007==='string'&&_0x376007[_0x3e5ff7(0x11d)]()[_0x3e5ff7(0x119)]>0x0,_0x3803f7+'\x20must\x20be\x20a\x20non-empty\x20string.');}function a344_0x1202(){const _0x19a535=['name','localKey','toDatasetKey','.dataset','dbTypeLen','pkField','supportedAggregation','cardinality','.confidence\x20is\x20invalid.','length','tableName','value','USER','trim','DECIMAL','toDatasetCode','isArray','tableComment','.dataset.','datasets','.name\x20is\x20invalid\x20or\x20duplicated.','MULTI_SELECT','SELECT','options','entries','string','NUMERIC','visible','test','label','reason','normalizedManifest','ADDRESS','CHAR','SMALLINT','.toDatasetCode','DOUBLE','INT','sha256','autoIncrement','chartRole','datasets[','doType','relations','labelField','dataset','.reason','disabled','771333biccIG','\x20requires\x20options\x20or\x20an\x20explicit\x20relation.','Design\x20file\x20contains\x20invalid\x20JSON.','27065PMvNGC','\x20must\x20be\x20an\x20object.','VARCHAR','kind','lookup','number','TEXT','\x20must\x20be\x20a\x20boolean.','.options\x20is\x20invalid\x20or\x20duplicated.','UPLOAD','sort','136163lIecYn','JSON','size','33975pvOxRb','176zZMwhM','8hJqLkb','schemaVersion','\x20requires\x20exactly\x20one\x20target.','fromField','doVersion','some','TINYINT','includes','Manifest\x20must\x20be\x20an\x20object.','object','isSymbolicLink','.fields\x20is\x20empty\x20or\x20exceeds\x20the\x20batch\x20limit.','isSafeInteger','.supportedAggregation\x20must\x20contain\x20strings.','\x20is\x20not\x20supported.','\x20target\x20field\x20does\x20not\x20exist.','LONGTEXT','utf8','TIMESTAMP','fromDatasetKey','description','map','.options\x20must\x20be\x20an\x20array.','set','digest','dataset-design','2045008GCKNwo','.toField','datasets\x20must\x20contain\x201..20\x20items.','unresolvedRelations.reason','required','.dataset\x20is\x20required.','796086EZOTMM','.doType\x20is\x20unsupported.','.relationType\x20must\x20be\x20lookup.','isTimeDimension','displayName','relationType','semanticName','defaultAggregation','.fields[','dbType','BIGINT','fields','BOOLEAN','Design\x20file\x20must\x20be\x20a\x20regular\x20JSON\x20file\x20no\x20larger\x20than\x202\x20MB.','stringify','datasetName','parse','toFieldLabel','displayFormat','79284JzIshq','hex','keys','has','Unsupported\x20dataset\x20manifest\x20version.','.options\x20contains\x20an\x20invalid\x20item.','toField','boolean','validation','get','unresolvedRelations','update','INTEGER','add','confidence','DATETIME','readonly','FLOAT','.localKey\x20is\x20invalid\x20or\x20duplicated.','relations[','.displayName'];a344_0x1202=function(){return _0x19a535;};return a344_0x1202();}export function validateManifest(_0x1206b6){const _0x5b691a=a344_0x53bb6c;requireValue(isObject(_0x1206b6),_0x5b691a(0x15b)),keys(_0x1206b6,[_0x5b691a(0x146),_0x5b691a(0x154),_0x5b691a(0x157),_0x5b691a(0x123),_0x5b691a(0x13b),'unresolvedRelations'],'manifest'),requireValue(_0x1206b6[_0x5b691a(0x146)]===_0x5b691a(0x16c)&&_0x1206b6['schemaVersion']===0x1&&_0x1206b6[_0x5b691a(0x157)]==='v2',_0x5b691a(0xff)),requireValue(Array[_0x5b691a(0x120)](_0x1206b6[_0x5b691a(0x123)])&&_0x1206b6['datasets']['length']>=0x1&&_0x1206b6[_0x5b691a(0x123)][_0x5b691a(0x119)]<=0x14,_0x5b691a(0x16f));const _0x58af9b=new Map();for(const [_0x466aa2,_0x493bb2]of _0x1206b6[_0x5b691a(0x123)][_0x5b691a(0x128)]()){const _0x5a3d24=_0x5b691a(0x139)+_0x466aa2+']';requireValue(isObject(_0x493bb2),_0x5a3d24+_0x5b691a(0x144)),keys(_0x493bb2,[_0x5b691a(0x111),_0x5b691a(0x13d),_0x5b691a(0xf3)],_0x5a3d24),requireValue(typeof _0x493bb2[_0x5b691a(0x111)]===_0x5b691a(0x129)&&/^[a-z][a-z0-9_]{0,63}$/['test'](_0x493bb2[_0x5b691a(0x111)])&&!_0x58af9b['has'](_0x493bb2[_0x5b691a(0x111)]),_0x5a3d24+_0x5b691a(0x10d)),requireValue(isObject(_0x493bb2[_0x5b691a(0x13d)]),_0x5a3d24+_0x5b691a(0x172)),keys(_0x493bb2['dataset'],[_0x5b691a(0xf7),_0x5b691a(0x11a),_0x5b691a(0x121),'businessGroup',_0x5b691a(0x13c)],_0x5a3d24+_0x5b691a(0x113)),text(_0x493bb2[_0x5b691a(0x13d)]['datasetName'],_0x5a3d24+'.dataset.datasetName');for(const [_0x5d011b,_0x4bb9ff]of Object[_0x5b691a(0x128)](_0x493bb2['dataset']))requireValue(_0x4bb9ff==null||typeof _0x4bb9ff==='string',_0x5a3d24+_0x5b691a(0x122)+_0x5d011b+'\x20must\x20be\x20a\x20string.');requireValue(Array[_0x5b691a(0x120)](_0x493bb2[_0x5b691a(0xf3)])&&_0x493bb2['fields'][_0x5b691a(0x119)]>0x0&&(_0x1206b6[_0x5b691a(0x123)][_0x5b691a(0x119)]===0x1||_0x493bb2[_0x5b691a(0xf3)][_0x5b691a(0x119)]<=0xc8),_0x5a3d24+_0x5b691a(0x15e));const _0x514842=new Set();_0x58af9b[_0x5b691a(0x16a)](_0x493bb2[_0x5b691a(0x111)],_0x514842);for(const [_0x163bc0,_0x8a0bf1]of _0x493bb2[_0x5b691a(0xf3)][_0x5b691a(0x128)]()){const _0x586f69=_0x5a3d24+_0x5b691a(0xf0)+_0x163bc0+']';requireValue(isObject(_0x8a0bf1),_0x586f69+_0x5b691a(0x144)),keys(_0x8a0bf1,[_0x5b691a(0x110),_0x5b691a(0xec),_0x5b691a(0x13a),_0x5b691a(0xf1),_0x5b691a(0x114),_0x5b691a(0x167),_0x5b691a(0x171),_0x5b691a(0x12b),_0x5b691a(0x13f),_0x5b691a(0x10b),_0x5b691a(0x115),'autoIncrement',_0x5b691a(0x127),'semanticName','chartRole',_0x5b691a(0xef),_0x5b691a(0x116),_0x5b691a(0x176),_0x5b691a(0xfa)],_0x586f69),requireValue(typeof _0x8a0bf1[_0x5b691a(0x110)]==='string'&&identifier[_0x5b691a(0x12c)](_0x8a0bf1[_0x5b691a(0x110)])&&!_0x514842[_0x5b691a(0xfe)](_0x8a0bf1[_0x5b691a(0x110)]),_0x586f69+_0x5b691a(0x124)),_0x514842[_0x5b691a(0x108)](_0x8a0bf1['name']),text(_0x8a0bf1[_0x5b691a(0xec)],_0x586f69+_0x5b691a(0x10f)),requireValue(types['has'](_0x8a0bf1['doType']),_0x586f69+_0x5b691a(0x174)),requireValue(dbTypes[_0x5b691a(0xfe)](_0x8a0bf1[_0x5b691a(0xf1)]),_0x586f69+'.dbType\x20is\x20required\x20and\x20must\x20be\x20a\x20supported\x20storage\x20type.');for(const _0x1d4fea of[_0x5b691a(0xf1),_0x5b691a(0x167),_0x5b691a(0xee),_0x5b691a(0x138),_0x5b691a(0xef),'displayFormat']){requireValue(_0x8a0bf1[_0x1d4fea]==null||typeof _0x8a0bf1[_0x1d4fea]==='string',_0x586f69+'.'+_0x1d4fea+'\x20must\x20be\x20a\x20string.');}for(const _0x24712b of['required',_0x5b691a(0x12b),_0x5b691a(0x13f),_0x5b691a(0x10b),_0x5b691a(0x115),_0x5b691a(0x137),'isTimeDimension']){requireValue(_0x8a0bf1[_0x24712b]==null||typeof _0x8a0bf1[_0x24712b]===_0x5b691a(0x102),_0x586f69+'.'+_0x24712b+_0x5b691a(0x14a));}requireValue(_0x8a0bf1[_0x5b691a(0x114)]==null||Number[_0x5b691a(0x15f)](_0x8a0bf1['dbTypeLen'])&&_0x8a0bf1[_0x5b691a(0x114)]>0x0&&_0x8a0bf1[_0x5b691a(0x114)]<=0xffff,_0x586f69+'.dbTypeLen\x20must\x20be\x20an\x20integer\x20in\x201..65535.'),requireValue(_0x8a0bf1[_0x5b691a(0x116)]==null||Array[_0x5b691a(0x120)](_0x8a0bf1['supportedAggregation'])&&_0x8a0bf1[_0x5b691a(0x116)]['every'](_0x1e44fc=>typeof _0x1e44fc==='string'),_0x586f69+_0x5b691a(0x160));if(_0x8a0bf1[_0x5b691a(0x127)]!=null){requireValue(Array[_0x5b691a(0x120)](_0x8a0bf1[_0x5b691a(0x127)]),_0x586f69+_0x5b691a(0x169));const _0x48458a=new Set(),_0x113b0f=new Set();for(const _0x584e29 of _0x8a0bf1[_0x5b691a(0x127)]){requireValue(isObject(_0x584e29),_0x586f69+_0x5b691a(0x100)),keys(_0x584e29,[_0x5b691a(0x12d),_0x5b691a(0x11b)],_0x586f69+'.options'),text(_0x584e29[_0x5b691a(0x12d)],_0x586f69+'.options.label'),requireValue(typeof _0x584e29[_0x5b691a(0x11b)]===_0x5b691a(0x129)&&identifier[_0x5b691a(0x12c)](_0x584e29[_0x5b691a(0x11b)])&&!_0x113b0f[_0x5b691a(0xfe)](_0x584e29[_0x5b691a(0x11b)])&&!_0x48458a[_0x5b691a(0xfe)](_0x584e29[_0x5b691a(0x12d)]),_0x586f69+_0x5b691a(0x14b)),_0x48458a[_0x5b691a(0x108)](_0x584e29[_0x5b691a(0x12d)]),_0x113b0f[_0x5b691a(0x108)](_0x584e29[_0x5b691a(0x11b)]);}}if([_0x5b691a(0x126),_0x5b691a(0x125)][_0x5b691a(0x15a)](_0x8a0bf1[_0x5b691a(0x13a)])){const _0x17729f=Array[_0x5b691a(0x120)](_0x1206b6['relations'])&&_0x1206b6[_0x5b691a(0x13b)][_0x5b691a(0x158)](_0x4e4492=>_0x4e4492?.['fromDatasetKey']===_0x493bb2[_0x5b691a(0x111)]&&_0x4e4492?.[_0x5b691a(0x156)]===_0x8a0bf1['name']);requireValue(_0x17729f||Array[_0x5b691a(0x120)](_0x8a0bf1['options'])&&_0x8a0bf1[_0x5b691a(0x127)][_0x5b691a(0x119)]>0x0,_0x586f69+_0x5b691a(0x141));}}_0x514842['add']('id');}for(const _0x23f1fa of[_0x5b691a(0x13b),_0x5b691a(0x105)])requireValue(_0x1206b6[_0x23f1fa]==null||Array[_0x5b691a(0x120)](_0x1206b6[_0x23f1fa])&&_0x1206b6[_0x23f1fa][_0x5b691a(0x119)]<=0xc8,_0x23f1fa+'\x20must\x20contain\x20at\x20most\x20200\x20items.');const _0x13920a=new Set();for(const [_0x382ef1,_0x2874dd]of(_0x1206b6['relations']??[])[_0x5b691a(0x128)]()){const _0x344ec7=_0x5b691a(0x10e)+_0x382ef1+']';requireValue(isObject(_0x2874dd),_0x344ec7+_0x5b691a(0x144)),keys(_0x2874dd,['fromDatasetKey',_0x5b691a(0x156),_0x5b691a(0x112),_0x5b691a(0x11f),'toField',_0x5b691a(0xf9),'relationType','cardinality',_0x5b691a(0x12e),_0x5b691a(0x109)],_0x344ec7),requireValue(_0x58af9b['get'](_0x2874dd['fromDatasetKey'])?.[_0x5b691a(0xfe)](_0x2874dd[_0x5b691a(0x156)]),_0x344ec7+'\x20source\x20does\x20not\x20exist.'),requireValue(Boolean(_0x2874dd[_0x5b691a(0x112)])!==Boolean(_0x2874dd['toDatasetCode']),_0x344ec7+_0x5b691a(0x155));if(_0x2874dd['toDatasetKey'])requireValue(_0x58af9b[_0x5b691a(0x104)](_0x2874dd[_0x5b691a(0x112)])?.[_0x5b691a(0xfe)](_0x2874dd[_0x5b691a(0x101)]),_0x344ec7+_0x5b691a(0x162));else text(_0x2874dd[_0x5b691a(0x11f)],_0x344ec7+_0x5b691a(0x133)),text(_0x2874dd[_0x5b691a(0x101)],_0x344ec7+_0x5b691a(0x16e));requireValue(_0x2874dd[_0x5b691a(0xed)]==null||_0x2874dd[_0x5b691a(0xed)]===_0x5b691a(0x147),_0x344ec7+_0x5b691a(0x175)),requireValue(_0x2874dd['cardinality']==null||['MANY_TO_ONE','ONE_TO_ONE'][_0x5b691a(0x15a)](_0x2874dd[_0x5b691a(0x117)]),_0x344ec7+'.cardinality\x20is\x20unsupported.'),text(_0x2874dd[_0x5b691a(0x12e)],_0x344ec7+_0x5b691a(0x13e)),requireValue(_0x2874dd[_0x5b691a(0x109)]==null||typeof _0x2874dd['confidence']===_0x5b691a(0x148)&&Number['isFinite'](_0x2874dd[_0x5b691a(0x109)])&&_0x2874dd[_0x5b691a(0x109)]>=0x0&&_0x2874dd['confidence']<=0x1,_0x344ec7+_0x5b691a(0x118));const _0x6346b=_0x2874dd[_0x5b691a(0x166)]+':'+_0x2874dd[_0x5b691a(0x156)];requireValue(!_0x13920a[_0x5b691a(0xfe)](_0x6346b),_0x344ec7+'\x20duplicates\x20a\x20source\x20field.'),_0x13920a[_0x5b691a(0x108)](_0x6346b);}for(const _0x25b486 of _0x1206b6['unresolvedRelations']??[]){requireValue(isObject(_0x25b486),'Invalid\x20unresolved\x20relation.'),text(_0x25b486[_0x5b691a(0x12e)],_0x5b691a(0x170));}return _0x1206b6;}export async function readManifest(_0x1607a1){const _0xdd4aee=a344_0x53bb6c,_0x22d25d=await lstat(_0x1607a1);requireValue(_0x22d25d['isFile']()&&!_0x22d25d[_0xdd4aee(0x15d)]()&&_0x22d25d[_0xdd4aee(0x150)]<=0x1e8480,_0xdd4aee(0xf5));let _0x2ecda1;try{_0x2ecda1=JSON[_0xdd4aee(0xf8)](await readFile(_0x1607a1,_0xdd4aee(0x164)));}catch{throw CliErrors[_0xdd4aee(0x103)](_0xdd4aee(0x142));}return validateManifest(isObject(_0x2ecda1)&&isObject(_0x2ecda1[_0xdd4aee(0x12f)])?_0x2ecda1['normalizedManifest']:_0x2ecda1);}function a344_0xf216(_0x1f5325,_0x4265c6){_0x1f5325=_0x1f5325-0xec;const _0x120274=a344_0x1202();let _0xf21679=_0x120274[_0x1f5325];return _0xf21679;}export function inputHash(_0x256098){const _0x22e32a=a344_0x53bb6c,_0x390f3d=_0x30effb=>Array[_0x22e32a(0x120)](_0x30effb)?_0x30effb[_0x22e32a(0x168)](_0x390f3d):isObject(_0x30effb)?Object['fromEntries'](Object[_0x22e32a(0xfd)](_0x30effb)[_0x22e32a(0x14d)]()[_0x22e32a(0x168)](_0x25a445=>[_0x25a445,_0x390f3d(_0x30effb[_0x25a445])])):_0x30effb;return createHash(_0x22e32a(0x136))[_0x22e32a(0x106)](JSON[_0x22e32a(0xf6)](_0x390f3d(_0x256098)))[_0x22e32a(0x16b)](_0x22e32a(0xfc));}
|
|
1
|
+
const a344_0x3dc737=a344_0x5ae6;(function(_0x48618a,_0x47e409){const _0x1ed7e1=a344_0x5ae6,_0x347675=_0x48618a();while(!![]){try{const _0x49ca41=parseInt(_0x1ed7e1(0x11f))/0x1+-parseInt(_0x1ed7e1(0x146))/0x2+parseInt(_0x1ed7e1(0x108))/0x3*(parseInt(_0x1ed7e1(0x151))/0x4)+-parseInt(_0x1ed7e1(0xf4))/0x5+parseInt(_0x1ed7e1(0x12d))/0x6+-parseInt(_0x1ed7e1(0x170))/0x7+-parseInt(_0x1ed7e1(0x121))/0x8*(parseInt(_0x1ed7e1(0x103))/0x9);if(_0x49ca41===_0x47e409)break;else _0x347675['push'](_0x347675['shift']());}catch(_0x51ec30){_0x347675['push'](_0x347675['shift']());}}}(a344_0x5406,0x92026));import{createHash}from'node:crypto';import{readFile,lstat}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const isObject=_0x772127=>_0x772127!==null&&typeof _0x772127===a344_0x3dc737(0x147)&&!Array[a344_0x3dc737(0x15d)](_0x772127);const types=new Set([a344_0x3dc737(0x122),a344_0x3dc737(0x102),a344_0x3dc737(0x123),a344_0x3dc737(0x162),'SELECT',a344_0x3dc737(0x167),a344_0x3dc737(0x107),a344_0x3dc737(0x126),a344_0x3dc737(0x15f),'UPLOAD']),dbTypes=new Set([a344_0x3dc737(0x13c),a344_0x3dc737(0x105),a344_0x3dc737(0x122),a344_0x3dc737(0xfb),'TINYINT',a344_0x3dc737(0x14e),a344_0x3dc737(0x15b),a344_0x3dc737(0xfd),a344_0x3dc737(0x11c),'FLOAT','DOUBLE',a344_0x3dc737(0x13b),a344_0x3dc737(0x12b),a344_0x3dc737(0x129),a344_0x3dc737(0x123),a344_0x3dc737(0x100),a344_0x3dc737(0x162),a344_0x3dc737(0x16e)]),identifier=/^[a-z][a-z0-9_]*$/;export function requireValue(_0x159b06,_0x3324d2){if(!_0x159b06)throw CliErrors['validation'](_0x3324d2);}function keys(_0x38e15d,_0x15a204,_0x312baa){const _0x526249=a344_0x3dc737;for(const _0x2f3df1 of Object['keys'](_0x38e15d))requireValue(_0x15a204[_0x526249(0x136)](_0x2f3df1),_0x312baa+'.'+_0x2f3df1+'\x20is\x20not\x20supported.');}function a344_0x5406(){const _0x50162f=['keys','unresolvedRelations','.options\x20must\x20be\x20an\x20array.','boolean','name','test','414684xQqdbh','object','value','validation','.dataset','datasets[','dataset-design','dbType','SMALLINT','every','add','4274876OWbWxA','\x20requires\x20options\x20or\x20an\x20explicit\x20relation.','fromField','manifest','parse','toDatasetKey','toDatasetCode','supportedAggregation','length','has','INT','localKey','isArray','set','ADDRESS','dataset','options','BOOLEAN','relations[','Unsupported\x20dataset\x20manifest\x20version.','\x20must\x20be\x20an\x20object.','utf8','MULTI_SELECT','\x20duplicates\x20a\x20source\x20field.','reason','.name\x20is\x20invalid\x20or\x20duplicated.','.dbType\x20is\x20required\x20and\x20must\x20be\x20a\x20supported\x20storage\x20type.','visible','autoIncrement','JSON','relationType','1133076cgspoq','get','.fields\x20is\x20empty\x20or\x20exceeds\x20the\x20batch\x20limit.','entries','.reason','fromDatasetKey','number','required','sha256','isTimeDimension','MANY_TO_ONE','708170EHEGZI','update','relations','displayFormat','Design\x20file\x20must\x20be\x20a\x20regular\x20JSON\x20file\x20no\x20larger\x20than\x202\x20MB.','schemaVersion','isSymbolicLink','LONGTEXT','unresolvedRelations.reason','INTEGER','.fields[','cardinality','TIMESTAMP','label','NUMBER','81WLwOik','pkField','CHAR','isFinite','DATE_RANGE','3fPDMJP','stringify','dbTypeLen','fromEntries','.options','size','lookup','.toField','datasets\x20must\x20contain\x201..20\x20items.','toFieldLabel','description','\x20must\x20be\x20a\x20non-empty\x20string.','tableComment','disabled','Invalid\x20unresolved\x20relation.','\x20must\x20be\x20a\x20string.','.dataset\x20is\x20required.','trim','doType','.cardinality\x20is\x20unsupported.','BIGINT','\x20must\x20be\x20a\x20boolean.','chartRole','702282JVzzaB','.dataset.','619448UaCiqy','TEXT','DATETIME','normalizedManifest','fields','USER','digest','datasetName','DATE','.confidence\x20is\x20invalid.','NUMERIC','confidence','208656aznGPf','string','doVersion','tableName','Manifest\x20must\x20be\x20an\x20object.','.options\x20is\x20invalid\x20or\x20duplicated.','sort','labelField','datasets','includes','toField','.displayName','defaultAggregation','map','DECIMAL','VARCHAR','.options\x20contains\x20an\x20invalid\x20item.','\x20target\x20field\x20does\x20not\x20exist.','\x20requires\x20exactly\x20one\x20target.'];a344_0x5406=function(){return _0x50162f;};return a344_0x5406();}function text(_0x1e99ae,_0x53e646){const _0x42da63=a344_0x3dc737;requireValue(typeof _0x1e99ae===_0x42da63(0x12e)&&_0x1e99ae[_0x42da63(0x119)]()[_0x42da63(0x159)]>0x0,_0x53e646+_0x42da63(0x113));}function a344_0x5ae6(_0x36ca15,_0x1ce9d7){_0x36ca15=_0x36ca15-0xed;const _0x54065f=a344_0x5406();let _0x5ae6ec=_0x54065f[_0x36ca15];return _0x5ae6ec;}export function validateManifest(_0x2d5634){const _0x4ee1b6=a344_0x3dc737;requireValue(isObject(_0x2d5634),_0x4ee1b6(0x131)),keys(_0x2d5634,['kind',_0x4ee1b6(0xf9),_0x4ee1b6(0x12f),_0x4ee1b6(0x135),'relations','unresolvedRelations'],_0x4ee1b6(0x154)),requireValue(_0x2d5634['kind']===_0x4ee1b6(0x14c)&&_0x2d5634[_0x4ee1b6(0xf9)]===0x1&&_0x2d5634[_0x4ee1b6(0x12f)]==='v2',_0x4ee1b6(0x164)),requireValue(Array[_0x4ee1b6(0x15d)](_0x2d5634[_0x4ee1b6(0x135)])&&_0x2d5634['datasets']['length']>=0x1&&_0x2d5634[_0x4ee1b6(0x135)][_0x4ee1b6(0x159)]<=0x14,_0x4ee1b6(0x110));const _0x43d164=new Map();for(const [_0x507672,_0x2a1606]of _0x2d5634[_0x4ee1b6(0x135)]['entries']()){const _0x3149f0=_0x4ee1b6(0x14b)+_0x507672+']';requireValue(isObject(_0x2a1606),_0x3149f0+_0x4ee1b6(0x165)),keys(_0x2a1606,['localKey',_0x4ee1b6(0x160),_0x4ee1b6(0x125)],_0x3149f0),requireValue(typeof _0x2a1606['localKey']==='string'&&/^[a-z][a-z0-9_]{0,63}$/[_0x4ee1b6(0x145)](_0x2a1606[_0x4ee1b6(0x15c)])&&!_0x43d164['has'](_0x2a1606['localKey']),_0x3149f0+'.localKey\x20is\x20invalid\x20or\x20duplicated.'),requireValue(isObject(_0x2a1606[_0x4ee1b6(0x160)]),_0x3149f0+_0x4ee1b6(0x118)),keys(_0x2a1606[_0x4ee1b6(0x160)],[_0x4ee1b6(0x128),_0x4ee1b6(0x130),_0x4ee1b6(0x114),'businessGroup',_0x4ee1b6(0x134)],_0x3149f0+_0x4ee1b6(0x14a)),text(_0x2a1606[_0x4ee1b6(0x160)][_0x4ee1b6(0x128)],_0x3149f0+'.dataset.datasetName');for(const [_0x4fdb19,_0x1600e7]of Object[_0x4ee1b6(0x173)](_0x2a1606[_0x4ee1b6(0x160)]))requireValue(_0x1600e7==null||typeof _0x1600e7===_0x4ee1b6(0x12e),_0x3149f0+_0x4ee1b6(0x120)+_0x4fdb19+_0x4ee1b6(0x117));requireValue(Array[_0x4ee1b6(0x15d)](_0x2a1606[_0x4ee1b6(0x125)])&&_0x2a1606[_0x4ee1b6(0x125)][_0x4ee1b6(0x159)]>0x0&&(_0x2d5634[_0x4ee1b6(0x135)][_0x4ee1b6(0x159)]===0x1||_0x2a1606[_0x4ee1b6(0x125)]['length']<=0xc8),_0x3149f0+_0x4ee1b6(0x172));const _0x36aa49=new Set();_0x43d164[_0x4ee1b6(0x15e)](_0x2a1606[_0x4ee1b6(0x15c)],_0x36aa49);for(const [_0x310881,_0x39f489]of _0x2a1606['fields']['entries']()){const _0x489e80=_0x3149f0+_0x4ee1b6(0xfe)+_0x310881+']';requireValue(isObject(_0x39f489),_0x489e80+_0x4ee1b6(0x165)),keys(_0x39f489,[_0x4ee1b6(0x144),'displayName',_0x4ee1b6(0x11a),_0x4ee1b6(0x14d),_0x4ee1b6(0x10a),'description','required',_0x4ee1b6(0x16c),_0x4ee1b6(0x115),'readonly',_0x4ee1b6(0x104),_0x4ee1b6(0x16d),'options','semanticName',_0x4ee1b6(0x11e),_0x4ee1b6(0x139),_0x4ee1b6(0x158),_0x4ee1b6(0xf2),_0x4ee1b6(0xf7)],_0x489e80),requireValue(typeof _0x39f489[_0x4ee1b6(0x144)]==='string'&&identifier[_0x4ee1b6(0x145)](_0x39f489['name'])&&!_0x36aa49['has'](_0x39f489[_0x4ee1b6(0x144)]),_0x489e80+_0x4ee1b6(0x16a)),_0x36aa49['add'](_0x39f489['name']),text(_0x39f489['displayName'],_0x489e80+_0x4ee1b6(0x138)),requireValue(types['has'](_0x39f489[_0x4ee1b6(0x11a)]),_0x489e80+'.doType\x20is\x20unsupported.'),requireValue(dbTypes[_0x4ee1b6(0x15a)](_0x39f489[_0x4ee1b6(0x14d)]),_0x489e80+_0x4ee1b6(0x16b));for(const _0x237d97 of[_0x4ee1b6(0x14d),_0x4ee1b6(0x112),'semanticName',_0x4ee1b6(0x11e),'defaultAggregation',_0x4ee1b6(0xf7)]){requireValue(_0x39f489[_0x237d97]==null||typeof _0x39f489[_0x237d97]===_0x4ee1b6(0x12e),_0x489e80+'.'+_0x237d97+'\x20must\x20be\x20a\x20string.');}for(const _0x49bb72 of[_0x4ee1b6(0xf0),_0x4ee1b6(0x16c),_0x4ee1b6(0x115),'readonly',_0x4ee1b6(0x104),_0x4ee1b6(0x16d),_0x4ee1b6(0xf2)]){requireValue(_0x39f489[_0x49bb72]==null||typeof _0x39f489[_0x49bb72]===_0x4ee1b6(0x143),_0x489e80+'.'+_0x49bb72+_0x4ee1b6(0x11d));}requireValue(_0x39f489[_0x4ee1b6(0x10a)]==null||Number['isSafeInteger'](_0x39f489[_0x4ee1b6(0x10a)])&&_0x39f489[_0x4ee1b6(0x10a)]>0x0&&_0x39f489[_0x4ee1b6(0x10a)]<=0xffff,_0x489e80+'.dbTypeLen\x20must\x20be\x20an\x20integer\x20in\x201..65535.'),requireValue(_0x39f489[_0x4ee1b6(0x158)]==null||Array[_0x4ee1b6(0x15d)](_0x39f489['supportedAggregation'])&&_0x39f489[_0x4ee1b6(0x158)][_0x4ee1b6(0x14f)](_0x438754=>typeof _0x438754===_0x4ee1b6(0x12e)),_0x489e80+'.supportedAggregation\x20must\x20contain\x20strings.');if(_0x39f489['options']!=null){requireValue(Array[_0x4ee1b6(0x15d)](_0x39f489['options']),_0x489e80+_0x4ee1b6(0x142));const _0x1dc910=new Set(),_0x2936d6=new Set();for(const _0x3a6e99 of _0x39f489[_0x4ee1b6(0x161)]){requireValue(isObject(_0x3a6e99),_0x489e80+_0x4ee1b6(0x13d)),keys(_0x3a6e99,['label',_0x4ee1b6(0x148)],_0x489e80+_0x4ee1b6(0x10c)),text(_0x3a6e99[_0x4ee1b6(0x101)],_0x489e80+'.options.label'),requireValue(typeof _0x3a6e99[_0x4ee1b6(0x148)]===_0x4ee1b6(0x12e)&&identifier[_0x4ee1b6(0x145)](_0x3a6e99[_0x4ee1b6(0x148)])&&!_0x2936d6[_0x4ee1b6(0x15a)](_0x3a6e99['value'])&&!_0x1dc910[_0x4ee1b6(0x15a)](_0x3a6e99['label']),_0x489e80+_0x4ee1b6(0x132)),_0x1dc910['add'](_0x3a6e99['label']),_0x2936d6[_0x4ee1b6(0x150)](_0x3a6e99['value']);}}if(['SELECT','MULTI_SELECT'][_0x4ee1b6(0x136)](_0x39f489[_0x4ee1b6(0x11a)])){const _0x493ba8=Array[_0x4ee1b6(0x15d)](_0x2d5634['relations'])&&_0x2d5634['relations']['some'](_0x40cd3e=>_0x40cd3e?.[_0x4ee1b6(0xee)]===_0x2a1606[_0x4ee1b6(0x15c)]&&_0x40cd3e?.[_0x4ee1b6(0x153)]===_0x39f489['name']);requireValue(_0x493ba8||Array[_0x4ee1b6(0x15d)](_0x39f489['options'])&&_0x39f489['options'][_0x4ee1b6(0x159)]>0x0,_0x489e80+_0x4ee1b6(0x152));}}_0x36aa49[_0x4ee1b6(0x150)]('id');}for(const _0xbd7b5f of[_0x4ee1b6(0xf6),_0x4ee1b6(0x141)])requireValue(_0x2d5634[_0xbd7b5f]==null||Array[_0x4ee1b6(0x15d)](_0x2d5634[_0xbd7b5f])&&_0x2d5634[_0xbd7b5f][_0x4ee1b6(0x159)]<=0xc8,_0xbd7b5f+'\x20must\x20contain\x20at\x20most\x20200\x20items.');const _0x167967=new Set();for(const [_0x4a2e6d,_0x380eb9]of(_0x2d5634[_0x4ee1b6(0xf6)]??[])[_0x4ee1b6(0x173)]()){const _0x1f5f60=_0x4ee1b6(0x163)+_0x4a2e6d+']';requireValue(isObject(_0x380eb9),_0x1f5f60+_0x4ee1b6(0x165)),keys(_0x380eb9,[_0x4ee1b6(0xee),'fromField',_0x4ee1b6(0x156),_0x4ee1b6(0x157),_0x4ee1b6(0x137),_0x4ee1b6(0x111),_0x4ee1b6(0x16f),'cardinality',_0x4ee1b6(0x169),'confidence'],_0x1f5f60),requireValue(_0x43d164['get'](_0x380eb9[_0x4ee1b6(0xee)])?.[_0x4ee1b6(0x15a)](_0x380eb9['fromField']),_0x1f5f60+'\x20source\x20does\x20not\x20exist.'),requireValue(Boolean(_0x380eb9[_0x4ee1b6(0x156)])!==Boolean(_0x380eb9['toDatasetCode']),_0x1f5f60+_0x4ee1b6(0x13f));if(_0x380eb9[_0x4ee1b6(0x156)])requireValue(_0x43d164[_0x4ee1b6(0x171)](_0x380eb9[_0x4ee1b6(0x156)])?.[_0x4ee1b6(0x15a)](_0x380eb9[_0x4ee1b6(0x137)]),_0x1f5f60+_0x4ee1b6(0x13e));else text(_0x380eb9[_0x4ee1b6(0x157)],_0x1f5f60+'.toDatasetCode'),text(_0x380eb9['toField'],_0x1f5f60+_0x4ee1b6(0x10f));requireValue(_0x380eb9[_0x4ee1b6(0x16f)]==null||_0x380eb9[_0x4ee1b6(0x16f)]===_0x4ee1b6(0x10e),_0x1f5f60+'.relationType\x20must\x20be\x20lookup.'),requireValue(_0x380eb9['cardinality']==null||[_0x4ee1b6(0xf3),'ONE_TO_ONE'][_0x4ee1b6(0x136)](_0x380eb9[_0x4ee1b6(0xff)]),_0x1f5f60+_0x4ee1b6(0x11b)),text(_0x380eb9[_0x4ee1b6(0x169)],_0x1f5f60+_0x4ee1b6(0xed)),requireValue(_0x380eb9[_0x4ee1b6(0x12c)]==null||typeof _0x380eb9[_0x4ee1b6(0x12c)]===_0x4ee1b6(0xef)&&Number[_0x4ee1b6(0x106)](_0x380eb9[_0x4ee1b6(0x12c)])&&_0x380eb9[_0x4ee1b6(0x12c)]>=0x0&&_0x380eb9['confidence']<=0x1,_0x1f5f60+_0x4ee1b6(0x12a));const _0x106e22=_0x380eb9[_0x4ee1b6(0xee)]+':'+_0x380eb9['fromField'];requireValue(!_0x167967[_0x4ee1b6(0x15a)](_0x106e22),_0x1f5f60+_0x4ee1b6(0x168)),_0x167967[_0x4ee1b6(0x150)](_0x106e22);}for(const _0x19ec99 of _0x2d5634[_0x4ee1b6(0x141)]??[]){requireValue(isObject(_0x19ec99),_0x4ee1b6(0x116)),text(_0x19ec99['reason'],_0x4ee1b6(0xfc));}return _0x2d5634;}export async function readManifest(_0x3e2fab){const _0x737d7d=a344_0x3dc737,_0x4afe4c=await lstat(_0x3e2fab);requireValue(_0x4afe4c['isFile']()&&!_0x4afe4c[_0x737d7d(0xfa)]()&&_0x4afe4c[_0x737d7d(0x10d)]<=0x1e8480,_0x737d7d(0xf8));let _0x1419e4;try{_0x1419e4=JSON[_0x737d7d(0x155)](await readFile(_0x3e2fab,_0x737d7d(0x166)));}catch{throw CliErrors[_0x737d7d(0x149)]('Design\x20file\x20contains\x20invalid\x20JSON.');}return validateManifest(isObject(_0x1419e4)&&isObject(_0x1419e4[_0x737d7d(0x124)])?_0x1419e4[_0x737d7d(0x124)]:_0x1419e4);}export function inputHash(_0x45d81d){const _0x11274e=a344_0x3dc737,_0x2c70d1=_0x42e861=>Array[_0x11274e(0x15d)](_0x42e861)?_0x42e861[_0x11274e(0x13a)](_0x2c70d1):isObject(_0x42e861)?Object[_0x11274e(0x10b)](Object[_0x11274e(0x140)](_0x42e861)[_0x11274e(0x133)]()[_0x11274e(0x13a)](_0x557881=>[_0x557881,_0x2c70d1(_0x42e861[_0x557881])])):_0x42e861;return createHash(_0x11274e(0xf1))[_0x11274e(0xf5)](JSON[_0x11274e(0x109)](_0x2c70d1(_0x45d81d)))[_0x11274e(0x127)]('hex');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a345_0x109dc9=a345_0x3a2e;(function(_0x124ee5,_0x3b47af){const _0xf10171=a345_0x3a2e,_0x4ddd83=_0x124ee5();while(!![]){try{const _0x5c98a7=-parseInt(_0xf10171(0xb8))/0x1+-parseInt(_0xf10171(0xbe))/0x2+parseInt(_0xf10171(0x89))/0x3*(parseInt(_0xf10171(0x84))/0x4)+-parseInt(_0xf10171(0xb7))/0x5*(parseInt(_0xf10171(0x7c))/0x6)+-parseInt(_0xf10171(0xab))/0x7*(parseInt(_0xf10171(0x90))/0x8)+-parseInt(_0xf10171(0x9a))/0x9+-parseInt(_0xf10171(0xb5))/0xa*(-parseInt(_0xf10171(0x9d))/0xb);if(_0x5c98a7===_0x3b47af)break;else _0x4ddd83['push'](_0x4ddd83['shift']());}catch(_0x36e161){_0x4ddd83['push'](_0x4ddd83['shift']());}}}(a345_0x3cc7,0x9a65f));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';function a345_0x3a2e(_0x18dc3b,_0x2ca94b){_0x18dc3b=_0x18dc3b-0x7a;const _0x3cc772=a345_0x3cc7();let _0x3a2eba=_0x3cc772[_0x18dc3b];return _0x3a2eba;}import{debuglog}from'node:util';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a345_0x109dc9(0xac),SKILL_NAME=a345_0x109dc9(0x87),debug=debuglog(a345_0x109dc9(0x9f));function frontmatterValue(_0x2dbeef,_0x230530){const _0x449bf6=a345_0x109dc9;return _0x2dbeef[_0x449bf6(0x99)](new RegExp('^'+_0x230530+_0x449bf6(0x7f),'m'))?.[0x1]?.['trim']()??'';}function listFiles(_0x4b8410,_0x58b043=_0x4b8410){const _0x36a16e=a345_0x109dc9;return readdirSync(_0x58b043,{'withFileTypes':!![]})[_0x36a16e(0x9c)](_0x3d4b9a=>{const _0x1d9527=_0x36a16e,_0x311050=join(_0x58b043,_0x3d4b9a[_0x1d9527(0x91)]),_0x3bf04e=lstatSync(_0x311050);if(_0x3bf04e[_0x1d9527(0x94)]())throw new Error(_0x1d9527(0x8d)+_0x311050);if(_0x3bf04e['isDirectory']())return listFiles(_0x4b8410,_0x311050);if(!_0x3bf04e[_0x1d9527(0xb2)]())throw new Error(_0x1d9527(0xb6)+_0x311050);return[relative(_0x4b8410,_0x311050)[_0x1d9527(0x86)](sep)[_0x1d9527(0xaa)]('/')];})['sort']((_0x2125c0,_0x1e0f7)=>_0x2125c0<_0x1e0f7?-0x1:_0x2125c0>_0x1e0f7?0x1:0x0);}function digestFiles(_0x2ab06e,_0x2387f2){const _0x459274=a345_0x109dc9,_0x8eb351=createHash(_0x459274(0xa5));for(const _0x54f274 of _0x2387f2){if(_0x54f274['startsWith']('/')||_0x54f274[_0x459274(0x86)]('/')[_0x459274(0xa9)]('..')||_0x54f274['includes']('\x5c'))throw new Error(_0x459274(0xaf)+_0x54f274);_0x8eb351[_0x459274(0xbf)](_0x54f274),_0x8eb351[_0x459274(0xbf)]('\x00'),_0x8eb351['update'](readFileSync(join(_0x2ab06e,..._0x54f274[_0x459274(0x86)]('/')))),_0x8eb351[_0x459274(0xbf)]('\x00');}return _0x8eb351[_0x459274(0x80)]('hex');}function sameFiles(_0x14649f,_0x231521){const _0x4c851e=a345_0x109dc9;return _0x14649f[_0x4c851e(0x7a)]===_0x231521['length']&&_0x14649f[_0x4c851e(0xad)]((_0x3d6333,_0x777571)=>_0x3d6333===_0x231521[_0x777571]);}function a345_0x3cc7(){const _0x3bb587=['home','current','packageRoot','644732vxOxoC','root','split','rabetbase','\x20verified;\x20','3uOogUb','stdio','version','utf8','Symbolic\x20link\x20is\x20not\x20allowed:\x20','CLI\x20Built-in\x20Skill\x20','rabetbase.manifest.json','4421024PTzGse','name','unknown','output','isSymbolicLink','parse','message','reason','present','match','8016084GxtQME','status','flatMap','11TgKywE','partialFailure','rabetbase-skills','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','absent','version_mismatch','packageVersion','skillVersion','sha256','schemaVersion','SOURCE_INVALID','installedPath','includes','join','7yFygaT','rabetbase\x20cli-skill\x20install','every','INSTALL_FAILED','Unsafe\x20manifest\x20path:\x20','pipe','path','isFile','state','missing','23961890MSlDJY','Unsupported\x20Skill\x20entry:\x20','1442865jeDOoM','180337RaAsJI','count','unverifiable','SKILL.md','Installed\x20Skill\x20state\x20is\x20','package.json','25486tCFcBI','update','VERIFY_FAILED','length','skills','6pzvwJz','manifest','skills@latest\x20exited\x20',':\x5cs*(.+)$','digest'];a345_0x3cc7=function(){return _0x3bb587;};return a345_0x3cc7();}function readSource(_0x545cf7){const _0x4e65f4=a345_0x109dc9,_0xcd0271=JSON[_0x4e65f4(0x95)](readFileSync(join(_0x545cf7,_0x4e65f4(0xbd)),'utf8')),_0x45390e=JSON[_0x4e65f4(0x95)](readFileSync(join(_0x545cf7,_0x4e65f4(0x7b),_0x4e65f4(0x8f)),_0x4e65f4(0x8c))),_0x5d0a4b=join(_0x545cf7,'skills',SKILL_NAME),_0x30904f=frontmatterValue(readFileSync(join(_0x5d0a4b,_0x4e65f4(0xbb)),_0x4e65f4(0x8c)),_0x4e65f4(0x8b)),_0x1afebd=listFiles(_0x5d0a4b);if(_0x45390e[_0x4e65f4(0xa6)]!==0x1||_0x45390e['name']!==SKILL_NAME||!_0xcd0271[_0x4e65f4(0x8b)]||_0x45390e[_0x4e65f4(0xa3)]!==_0xcd0271['version']||_0x45390e[_0x4e65f4(0xa4)]!==_0xcd0271[_0x4e65f4(0x8b)]||_0x30904f!==_0xcd0271[_0x4e65f4(0x8b)]||!sameFiles(_0x1afebd,_0x45390e['files'])||digestFiles(_0x5d0a4b,_0x1afebd)!==_0x45390e[_0x4e65f4(0x80)])throw new Error(_0x4e65f4(0xa0));return{'packageVersion':_0xcd0271['version'],'skillVersion':_0x30904f,'root':_0x5d0a4b,'manifest':_0x45390e};}function installedSkillPath(_0x554f00){const _0x223544=a345_0x109dc9,_0x763acf=resolveInstalledSkill(SKILL_NAME,{'home':_0x554f00});if(_0x763acf[_0x223544(0xb3)]==='present')return{'state':_0x223544(0x98),'path':dirname(_0x763acf[_0x223544(0xb1)])};if(_0x763acf['state']===_0x223544(0xa1))return{'state':_0x223544(0xb4)};return{'state':'unverifiable','reason':_0x763acf[_0x223544(0x97)]};}export function inspectInstalledBuiltinSkillVersion(_0x50793c,_0x141f07={}){const _0x5cede2=a345_0x109dc9,_0x5d269e=installedSkillPath(_0x141f07[_0x5cede2(0x81)]??homedir());if(_0x5d269e['state']===_0x5cede2(0xb4))return{'state':_0x5cede2(0xb4),'expectedVersion':_0x50793c,'repairCommand':REPAIR_COMMAND};if(_0x5d269e[_0x5cede2(0xb3)]===_0x5cede2(0xba))return{'state':_0x5cede2(0xba),'expectedVersion':_0x50793c,'reason':_0x5d269e[_0x5cede2(0x97)],'repairCommand':REPAIR_COMMAND};try{const _0x26126c=frontmatterValue(readFileSync(join(_0x5d269e['path'],_0x5cede2(0xbb)),'utf8'),_0x5cede2(0x8b));return{'state':_0x26126c===_0x50793c?_0x5cede2(0x82):_0x5cede2(0xa2),'expectedVersion':_0x50793c,'skillVersion':_0x26126c,'installedPath':_0x5d269e['path'],'repairCommand':REPAIR_COMMAND};}catch(_0x3ef27e){return{'state':_0x5cede2(0xba),'expectedVersion':_0x50793c,'installedPath':_0x5d269e[_0x5cede2(0xb1)],'reason':_0x3ef27e instanceof Error?_0x3ef27e['message']:String(_0x3ef27e),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x46edf5={}){const _0x590dd3=a345_0x109dc9,_0x1c9c30=_0x46edf5[_0x590dd3(0x83)]??DEFAULT_PACKAGE_ROOT;let _0x4b190f;try{_0x4b190f=readSource(_0x1c9c30);}catch(_0x235186){return{'state':_0x590dd3(0xba),'packageVersion':_0x590dd3(0x92),'reason':_0x235186 instanceof Error?_0x235186[_0x590dd3(0x96)]:String(_0x235186),'repairCommand':REPAIR_COMMAND};}const _0x3d912f=installedSkillPath(_0x46edf5[_0x590dd3(0x81)]??homedir());if(_0x3d912f['state']==='missing')return{'state':_0x590dd3(0xb4),'packageVersion':_0x4b190f[_0x590dd3(0xa3)],'repairCommand':REPAIR_COMMAND};if(_0x3d912f[_0x590dd3(0xb3)]===_0x590dd3(0xba))return{'state':_0x590dd3(0xba),'packageVersion':_0x4b190f[_0x590dd3(0xa3)],'reason':_0x3d912f[_0x590dd3(0x97)],'repairCommand':REPAIR_COMMAND};try{const _0x21edd3=frontmatterValue(readFileSync(join(_0x3d912f[_0x590dd3(0xb1)],'SKILL.md'),_0x590dd3(0x8c)),_0x590dd3(0x8b));if(_0x21edd3!==_0x4b190f[_0x590dd3(0xa4)])return{'state':'version_mismatch','packageVersion':_0x4b190f[_0x590dd3(0xa3)],'skillVersion':_0x21edd3,'installedPath':_0x3d912f[_0x590dd3(0xb1)],'repairCommand':REPAIR_COMMAND};const _0x257a39=listFiles(_0x3d912f['path']),_0x3a6e03=digestFiles(_0x3d912f[_0x590dd3(0xb1)],_0x257a39);return{'state':sameFiles(_0x257a39,_0x4b190f[_0x590dd3(0x7d)]['files'])&&_0x3a6e03===_0x4b190f[_0x590dd3(0x7d)][_0x590dd3(0x80)]?_0x590dd3(0x82):'content_mismatch','packageVersion':_0x4b190f[_0x590dd3(0xa3)],'skillVersion':_0x21edd3,'installedPath':_0x3d912f['path'],'digest':_0x3a6e03,'repairCommand':REPAIR_COMMAND};}catch(_0x57d474){return{'state':_0x590dd3(0xba),'packageVersion':_0x4b190f['packageVersion'],'installedPath':_0x3d912f[_0x590dd3(0xb1)],'reason':_0x57d474 instanceof Error?_0x57d474[_0x590dd3(0x96)]:String(_0x57d474),'repairCommand':REPAIR_COMMAND};}}function failure(_0x540baa,_0x28b3f9,_0x5f7e05,_0x58f641){const _0x102d3f=a345_0x109dc9;return{'ok':![],'code':_0x540baa,'packageVersion':_0x28b3f9[_0x102d3f(0xa3)],'skillVersion':_0x28b3f9['skillVersion'],'installedPath':_0x58f641,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x5f7e05 instanceof Error?_0x5f7e05[_0x102d3f(0x96)]:String(_0x5f7e05)};}export function installBuiltinSkill(_0x1044b3={}){const _0x225d88=a345_0x109dc9,_0x5b13d8=_0x1044b3[_0x225d88(0x83)]??DEFAULT_PACKAGE_ROOT,_0x2a080f=_0x1044b3[_0x225d88(0x81)]??homedir();let _0x429090;try{_0x429090=readSource(_0x5b13d8);}catch(_0xe6ac80){return failure(_0x225d88(0xa7),{'packageVersion':_0x225d88(0x92),'skillVersion':_0x225d88(0x92)},_0xe6ac80);}const _0x4cc93e=inspectBuiltinSkill({'packageRoot':_0x5b13d8,'home':_0x2a080f}),_0x3b5be2=runNpxSkillsAddGlobal(_0x5b13d8,_0x429090[_0x225d88(0x85)],{'stdio':_0x1044b3[_0x225d88(0x8a)]??_0x225d88(0xb0),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x2a080f}});if(_0x3b5be2['skipped'])return{'ok':!![],'packageVersion':_0x429090[_0x225d88(0xa3)],'skillVersion':_0x429090[_0x225d88(0xa4)],'installedPath':_0x4cc93e['installedPath'],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x3b5be2['ok'])return failure(_0x225d88(0xae),_0x429090,_0x3b5be2['error']??_0x225d88(0x7e)+_0x3b5be2[_0x225d88(0x9b)]);const _0x6636c=inspectBuiltinSkill({'packageRoot':_0x5b13d8,'home':_0x2a080f});if(_0x6636c[_0x225d88(0xb3)]!==_0x225d88(0x82)){const _0x4424c5=_0x6636c[_0x225d88(0x97)]??_0x225d88(0xbc)+_0x6636c[_0x225d88(0xb3)];return failure(_0x225d88(0xc0),_0x429090,_0x3b5be2[_0x225d88(0x9e)]?_0x4424c5+'\x0a'+_0x3b5be2['partialFailure']['output']:_0x4424c5,_0x6636c['installedPath']);}return _0x3b5be2[_0x225d88(0x9e)]&&(debug('Installer\x20reported\x20partial\x20target\x20failures:\x0a%s',_0x3b5be2[_0x225d88(0x9e)][_0x225d88(0x93)]),console['log'](_0x225d88(0x8e)+_0x429090[_0x225d88(0xa4)]+_0x225d88(0x88)+_0x3b5be2[_0x225d88(0x9e)][_0x225d88(0xb9)]+'\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.')),{'ok':!![],'packageVersion':_0x429090[_0x225d88(0xa3)],'skillVersion':_0x429090[_0x225d88(0xa4)],'installedPath':_0x6636c[_0x225d88(0xa8)],'changed':_0x4cc93e['state']!=='current','repairCommand':REPAIR_COMMAND};}
|
|
1
|
+
const a345_0x287d34=a345_0x48b4;(function(_0x3b8b14,_0x441f75){const _0x5627b4=a345_0x48b4,_0x256a3b=_0x3b8b14();while(!![]){try{const _0x54515a=parseInt(_0x5627b4(0xe7))/0x1*(-parseInt(_0x5627b4(0x121))/0x2)+-parseInt(_0x5627b4(0xf5))/0x3+parseInt(_0x5627b4(0x127))/0x4*(-parseInt(_0x5627b4(0x103))/0x5)+-parseInt(_0x5627b4(0xfb))/0x6+parseInt(_0x5627b4(0x112))/0x7*(parseInt(_0x5627b4(0x11f))/0x8)+-parseInt(_0x5627b4(0xe9))/0x9*(parseInt(_0x5627b4(0x102))/0xa)+-parseInt(_0x5627b4(0x111))/0xb*(-parseInt(_0x5627b4(0xe8))/0xc);if(_0x54515a===_0x441f75)break;else _0x256a3b['push'](_0x256a3b['shift']());}catch(_0x24b24a){_0x256a3b['push'](_0x256a3b['shift']());}}}(a345_0x1d1d,0x303b7));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{debuglog}from'node:util';function a345_0x1d1d(){const _0x340ed6=['64LrVnwG','CLI\x20Built-in\x20Skill\x20','skills','update','171122yCpvbq','12gbNTJq','9fLjuvZ','path','digest','partialFailure','reason','content_mismatch','SOURCE_INVALID','join','match','SKILL.md','packageRoot','length','374484dbJsBZ','unknown','every','sha256','manifest','includes','2180124tgfxfD','pipe','Installed\x20Skill\x20state\x20is\x20','version','error','rabetbase.manifest.json','state','1489970DCZFBT','69935zCrToC','Unsafe\x20manifest\x20path:\x20','skillVersion','packageVersion','count','absent','isSymbolicLink','split','name','message','version_mismatch','\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.','home','isFile','15284302vzBWWq','13174YZfhkE','flatMap',':\x5cs*(.+)$','trim','parse','skills@latest\x20exited\x20','hex','output','installedPath','status','present','unverifiable','missing','48LJVLfw','startsWith','4iRghGq','files','rabetbase','current','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','utf8'];a345_0x1d1d=function(){return _0x340ed6;};return a345_0x1d1d();}import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND='rabetbase\x20cli-skill\x20install',SKILL_NAME=a345_0x287d34(0x123),debug=debuglog('rabetbase-skills');function frontmatterValue(_0xa16de,_0x1fca46){const _0x4abbb5=a345_0x287d34;return _0xa16de[_0x4abbb5(0xf1)](new RegExp('^'+_0x1fca46+_0x4abbb5(0x114),'m'))?.[0x1]?.[_0x4abbb5(0x115)]()??'';}function listFiles(_0x5274ef,_0x38d750=_0x5274ef){const _0xcc8565=a345_0x287d34;return readdirSync(_0x38d750,{'withFileTypes':!![]})[_0xcc8565(0x113)](_0x1ef582=>{const _0x36b096=_0xcc8565,_0x24d6eb=join(_0x38d750,_0x1ef582[_0x36b096(0x10b)]),_0x3365b7=lstatSync(_0x24d6eb);if(_0x3365b7[_0x36b096(0x109)]())throw new Error('Symbolic\x20link\x20is\x20not\x20allowed:\x20'+_0x24d6eb);if(_0x3365b7['isDirectory']())return listFiles(_0x5274ef,_0x24d6eb);if(!_0x3365b7[_0x36b096(0x110)]())throw new Error('Unsupported\x20Skill\x20entry:\x20'+_0x24d6eb);return[relative(_0x5274ef,_0x24d6eb)[_0x36b096(0x10a)](sep)[_0x36b096(0xf0)]('/')];})['sort']((_0x52c3aa,_0x17888b)=>_0x52c3aa<_0x17888b?-0x1:_0x52c3aa>_0x17888b?0x1:0x0);}function digestFiles(_0x392905,_0x2b6ddc){const _0xaf7472=a345_0x287d34,_0x3ecd48=createHash(_0xaf7472(0xf8));for(const _0x224ccd of _0x2b6ddc){if(_0x224ccd[_0xaf7472(0x120)]('/')||_0x224ccd[_0xaf7472(0x10a)]('/')[_0xaf7472(0xfa)]('..')||_0x224ccd[_0xaf7472(0xfa)]('\x5c'))throw new Error(_0xaf7472(0x104)+_0x224ccd);_0x3ecd48['update'](_0x224ccd),_0x3ecd48[_0xaf7472(0xe6)]('\x00'),_0x3ecd48[_0xaf7472(0xe6)](readFileSync(join(_0x392905,..._0x224ccd[_0xaf7472(0x10a)]('/')))),_0x3ecd48['update']('\x00');}return _0x3ecd48['digest'](_0xaf7472(0x118));}function sameFiles(_0x184e8b,_0x3f203a){const _0x10f5c2=a345_0x287d34;return _0x184e8b[_0x10f5c2(0xf4)]===_0x3f203a['length']&&_0x184e8b[_0x10f5c2(0xf7)]((_0x88d548,_0x5ceb74)=>_0x88d548===_0x3f203a[_0x5ceb74]);}function readSource(_0x5840f1){const _0x4f7ec0=a345_0x287d34,_0x472962=JSON[_0x4f7ec0(0x116)](readFileSync(join(_0x5840f1,'package.json'),_0x4f7ec0(0x126))),_0x740a58=JSON[_0x4f7ec0(0x116)](readFileSync(join(_0x5840f1,_0x4f7ec0(0xe5),_0x4f7ec0(0x100)),_0x4f7ec0(0x126))),_0x1ca269=join(_0x5840f1,'skills',SKILL_NAME),_0x55e550=frontmatterValue(readFileSync(join(_0x1ca269,_0x4f7ec0(0xf2)),_0x4f7ec0(0x126)),_0x4f7ec0(0xfe)),_0x5c01e7=listFiles(_0x1ca269);if(_0x740a58['schemaVersion']!==0x1||_0x740a58[_0x4f7ec0(0x10b)]!==SKILL_NAME||!_0x472962[_0x4f7ec0(0xfe)]||_0x740a58[_0x4f7ec0(0x106)]!==_0x472962[_0x4f7ec0(0xfe)]||_0x740a58[_0x4f7ec0(0x105)]!==_0x472962['version']||_0x55e550!==_0x472962[_0x4f7ec0(0xfe)]||!sameFiles(_0x5c01e7,_0x740a58[_0x4f7ec0(0x122)])||digestFiles(_0x1ca269,_0x5c01e7)!==_0x740a58[_0x4f7ec0(0xeb)])throw new Error(_0x4f7ec0(0x125));return{'packageVersion':_0x472962[_0x4f7ec0(0xfe)],'skillVersion':_0x55e550,'root':_0x1ca269,'manifest':_0x740a58};}function installedSkillPath(_0xcb47f6){const _0x38ac43=a345_0x287d34,_0xd14aca=resolveInstalledSkill(SKILL_NAME,{'home':_0xcb47f6});if(_0xd14aca[_0x38ac43(0x101)]===_0x38ac43(0x11c))return{'state':_0x38ac43(0x11c),'path':dirname(_0xd14aca[_0x38ac43(0xea)])};if(_0xd14aca['state']===_0x38ac43(0x108))return{'state':_0x38ac43(0x11e)};return{'state':_0x38ac43(0x11d),'reason':_0xd14aca[_0x38ac43(0xed)]};}export function inspectInstalledBuiltinSkillVersion(_0x55e554,_0x1a1b25={}){const _0x507437=a345_0x287d34,_0x2e788f=installedSkillPath(_0x1a1b25[_0x507437(0x10f)]??homedir());if(_0x2e788f['state']===_0x507437(0x11e))return{'state':'missing','expectedVersion':_0x55e554,'repairCommand':REPAIR_COMMAND};if(_0x2e788f[_0x507437(0x101)]==='unverifiable')return{'state':_0x507437(0x11d),'expectedVersion':_0x55e554,'reason':_0x2e788f['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x5031fe=frontmatterValue(readFileSync(join(_0x2e788f[_0x507437(0xea)],_0x507437(0xf2)),'utf8'),_0x507437(0xfe));return{'state':_0x5031fe===_0x55e554?_0x507437(0x124):_0x507437(0x10d),'expectedVersion':_0x55e554,'skillVersion':_0x5031fe,'installedPath':_0x2e788f[_0x507437(0xea)],'repairCommand':REPAIR_COMMAND};}catch(_0x1378da){return{'state':_0x507437(0x11d),'expectedVersion':_0x55e554,'installedPath':_0x2e788f['path'],'reason':_0x1378da instanceof Error?_0x1378da[_0x507437(0x10c)]:String(_0x1378da),'repairCommand':REPAIR_COMMAND};}}function a345_0x48b4(_0x4e1092,_0x849256){_0x4e1092=_0x4e1092-0xe4;const _0x1d1d42=a345_0x1d1d();let _0x48b4a5=_0x1d1d42[_0x4e1092];return _0x48b4a5;}export function inspectBuiltinSkill(_0x47e651={}){const _0x50a4ab=a345_0x287d34,_0x429167=_0x47e651[_0x50a4ab(0xf3)]??DEFAULT_PACKAGE_ROOT;let _0x2271b7;try{_0x2271b7=readSource(_0x429167);}catch(_0x3743c4){return{'state':_0x50a4ab(0x11d),'packageVersion':_0x50a4ab(0xf6),'reason':_0x3743c4 instanceof Error?_0x3743c4['message']:String(_0x3743c4),'repairCommand':REPAIR_COMMAND};}const _0x3b83f8=installedSkillPath(_0x47e651[_0x50a4ab(0x10f)]??homedir());if(_0x3b83f8[_0x50a4ab(0x101)]===_0x50a4ab(0x11e))return{'state':_0x50a4ab(0x11e),'packageVersion':_0x2271b7[_0x50a4ab(0x106)],'repairCommand':REPAIR_COMMAND};if(_0x3b83f8['state']===_0x50a4ab(0x11d))return{'state':'unverifiable','packageVersion':_0x2271b7[_0x50a4ab(0x106)],'reason':_0x3b83f8[_0x50a4ab(0xed)],'repairCommand':REPAIR_COMMAND};try{const _0x16e136=frontmatterValue(readFileSync(join(_0x3b83f8[_0x50a4ab(0xea)],_0x50a4ab(0xf2)),_0x50a4ab(0x126)),_0x50a4ab(0xfe));if(_0x16e136!==_0x2271b7[_0x50a4ab(0x105)])return{'state':_0x50a4ab(0x10d),'packageVersion':_0x2271b7[_0x50a4ab(0x106)],'skillVersion':_0x16e136,'installedPath':_0x3b83f8[_0x50a4ab(0xea)],'repairCommand':REPAIR_COMMAND};const _0x554f51=listFiles(_0x3b83f8[_0x50a4ab(0xea)]),_0x502431=digestFiles(_0x3b83f8[_0x50a4ab(0xea)],_0x554f51);return{'state':sameFiles(_0x554f51,_0x2271b7[_0x50a4ab(0xf9)]['files'])&&_0x502431===_0x2271b7[_0x50a4ab(0xf9)][_0x50a4ab(0xeb)]?_0x50a4ab(0x124):_0x50a4ab(0xee),'packageVersion':_0x2271b7[_0x50a4ab(0x106)],'skillVersion':_0x16e136,'installedPath':_0x3b83f8[_0x50a4ab(0xea)],'digest':_0x502431,'repairCommand':REPAIR_COMMAND};}catch(_0x46c455){return{'state':'unverifiable','packageVersion':_0x2271b7['packageVersion'],'installedPath':_0x3b83f8['path'],'reason':_0x46c455 instanceof Error?_0x46c455['message']:String(_0x46c455),'repairCommand':REPAIR_COMMAND};}}function failure(_0x3d50fd,_0x5c1f8b,_0x2f4c41,_0x305af8){const _0x255029=a345_0x287d34;return{'ok':![],'code':_0x3d50fd,'packageVersion':_0x5c1f8b['packageVersion'],'skillVersion':_0x5c1f8b[_0x255029(0x105)],'installedPath':_0x305af8,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x2f4c41 instanceof Error?_0x2f4c41['message']:String(_0x2f4c41)};}export function installBuiltinSkill(_0x37e366={}){const _0x3205c1=a345_0x287d34,_0x4e0ad5=_0x37e366[_0x3205c1(0xf3)]??DEFAULT_PACKAGE_ROOT,_0x5c9dd7=_0x37e366[_0x3205c1(0x10f)]??homedir();let _0x531ecb;try{_0x531ecb=readSource(_0x4e0ad5);}catch(_0x20ad7f){return failure(_0x3205c1(0xef),{'packageVersion':_0x3205c1(0xf6),'skillVersion':_0x3205c1(0xf6)},_0x20ad7f);}const _0x4ab65a=inspectBuiltinSkill({'packageRoot':_0x4e0ad5,'home':_0x5c9dd7}),_0x3e3c28=runNpxSkillsAddGlobal(_0x4e0ad5,_0x531ecb['root'],{'stdio':_0x37e366['stdio']??_0x3205c1(0xfc),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x5c9dd7}});if(_0x3e3c28['skipped'])return{'ok':!![],'packageVersion':_0x531ecb[_0x3205c1(0x106)],'skillVersion':_0x531ecb['skillVersion'],'installedPath':_0x4ab65a['installedPath'],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x3e3c28['ok'])return failure('INSTALL_FAILED',_0x531ecb,_0x3e3c28[_0x3205c1(0xff)]??_0x3205c1(0x117)+_0x3e3c28[_0x3205c1(0x11b)]);const _0x56eeda=inspectBuiltinSkill({'packageRoot':_0x4e0ad5,'home':_0x5c9dd7});if(_0x56eeda[_0x3205c1(0x101)]!==_0x3205c1(0x124)){const _0x595854=_0x56eeda[_0x3205c1(0xed)]??_0x3205c1(0xfd)+_0x56eeda[_0x3205c1(0x101)];return failure('VERIFY_FAILED',_0x531ecb,_0x3e3c28[_0x3205c1(0xec)]?_0x595854+'\x0a'+_0x3e3c28[_0x3205c1(0xec)][_0x3205c1(0x119)]:_0x595854,_0x56eeda['installedPath']);}return _0x3e3c28[_0x3205c1(0xec)]&&(debug('Installer\x20reported\x20partial\x20target\x20failures:\x0a%s',_0x3e3c28[_0x3205c1(0xec)][_0x3205c1(0x119)]),console['log'](_0x3205c1(0xe4)+_0x531ecb[_0x3205c1(0x105)]+'\x20verified;\x20'+_0x3e3c28[_0x3205c1(0xec)][_0x3205c1(0x107)]+_0x3205c1(0x10e))),{'ok':!![],'packageVersion':_0x531ecb['packageVersion'],'skillVersion':_0x531ecb[_0x3205c1(0x105)],'installedPath':_0x56eeda[_0x3205c1(0x11a)],'changed':_0x4ab65a[_0x3205c1(0x101)]!==_0x3205c1(0x124),'repairCommand':REPAIR_COMMAND};}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c2309,_0x2d3408){const _0x547103=a346_0x3bcd,_0x2dc18f=_0x1c2309();while(!![]){try{const _0x5d9b86=parseInt(_0x547103(0x161))/0x1*(parseInt(_0x547103(0x15a))/0x2)+parseInt(_0x547103(0x144))/0x3+-parseInt(_0x547103(0x166))/0x4*(-parseInt(_0x547103(0x145))/0x5)+parseInt(_0x547103(0x152))/0x6*(parseInt(_0x547103(0x14f))/0x7)+parseInt(_0x547103(0x14a))/0x8*(-parseInt(_0x547103(0x15c))/0x9)+parseInt(_0x547103(0x15e))/0xa*(-parseInt(_0x547103(0x154))/0xb)+-parseInt(_0x547103(0x160))/0xc;if(_0x5d9b86===_0x2d3408)break;else _0x2dc18f['push'](_0x2dc18f['shift']());}catch(_0x180e04){_0x2dc18f['push'](_0x2dc18f['shift']());}}}(a346_0x7e2b,0xa0080));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';function a346_0x3bcd(_0x3b43f8,_0x401467){_0x3b43f8=_0x3b43f8-0x144;const _0x7e2b91=a346_0x7e2b();let _0x3bcdaf=_0x7e2b91[_0x3b43f8];return _0x3bcdaf;}export function camelCaseFlagsToKebab(_0x526af1){const _0x487678=a346_0x3bcd,_0x1bbe71=[];for(const [_0x1ae559,_0x59f319]of Object[_0x487678(0x153)](_0x526af1)){if(_0x59f319===!![]){const _0x75f3e8=_0x1ae559[_0x487678(0x14d)](/([A-Z])/g,_0x487678(0x157))[_0x487678(0x158)]();_0x1bbe71[_0x487678(0x14b)](_0x75f3e8);}}return _0x1bbe71;}function a346_0x7e2b(){const _0x36b916=['argv','16244yvHFTJ','enable-bff-save','2190879dEPWKB','1255SDGVDx','Unsupported\x20command:\x20','help','from','exit','5700056CIlhHO','push','cwd','replace','(empty)','3896592rSaJjn','error','log','12uWQosl','entries','4961hAfNgP','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','-$1','toLowerCase','--help','134DjwNfl','slice','9UJCKsK','setLogPath','15250DozXUT','Error:\x20Unsupported\x20command:\x20','22021524qHaxyU','15343PlRugu','dangerously-bff-save','skill','Public\x20Open\x20Skill\x20source:\x20'];a346_0x7e2b=function(){return _0x36b916;};return a346_0x7e2b();}export function parseDynamicFlags(){const _0x892b6c=a346_0x3bcd,_0x5f25be=[];for(let _0x448f82=0x3;_0x448f82<process[_0x892b6c(0x165)]['length'];_0x448f82++){const _0x414fa0=process[_0x892b6c(0x165)][_0x448f82];if(_0x414fa0&&_0x414fa0['startsWith']('--')){const _0x3d503c=_0x414fa0[_0x892b6c(0x15b)](0x2);_0x3d503c&&!_0x3d503c['includes']('=')&&_0x5f25be[_0x892b6c(0x14b)](_0x3d503c);}}return _0x5f25be;}export function getAllProvidedFlags(_0x51d5ab){const _0x491eb9=a346_0x3bcd,_0x52e46c=camelCaseFlagsToKebab(_0x51d5ab),_0x22f1bc=parseDynamicFlags(),_0x1946d4=new Set([..._0x52e46c,..._0x22f1bc]);return Array[_0x491eb9(0x148)](_0x1946d4);}export function normalizeLegacyBffSaveFlags(_0xa46b7b){const _0x2665a4=a346_0x3bcd,_0x1151fc=new Set(_0xa46b7b);return _0x1151fc['has'](_0x2665a4(0x162))&&_0x1151fc['add'](_0x2665a4(0x167)),Array[_0x2665a4(0x148)](_0x1151fc);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x48d062,_0x499e24,_0x1173af){const _0x1aaa5d=a346_0x3bcd;logger[_0x1aaa5d(0x15d)](process[_0x1aaa5d(0x14c)]());if(_0x1173af?.[_0x1aaa5d(0x147)]||_0x48d062===_0x1aaa5d(0x159)){showHelp();return;}console[_0x1aaa5d(0x150)](_0x1aaa5d(0x15f)+(_0x48d062||_0x1aaa5d(0x14e))),console['log']('\x0aAvailable\x20commands:'),console[_0x1aaa5d(0x151)]('\x20\x20'+CLI_BIN_NAME+_0x1aaa5d(0x155)),console[_0x1aaa5d(0x151)](''),console[_0x1aaa5d(0x151)](_0x1aaa5d(0x164)+SKILLS_INSTALL_COMMAND_LINE),logger['error'](_0x1aaa5d(0x163),_0x1aaa5d(0x146)+_0x48d062),process[_0x1aaa5d(0x149)](0x1);}function showHelp(){const _0x5a77c7=a346_0x3bcd;console[_0x5a77c7(0x151)](_0x5a77c7(0x156)+CLI_BIN_NAME+'\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20'+SKILLS_INSTALL_COMMAND_LINE+'\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a347_0x1484f4=a347_0x2562;(function(_0x5121c3,_0x17a22d){const _0x52d19d=a347_0x2562,_0x269733=_0x5121c3();while(!![]){try{const _0x383d79=parseInt(_0x52d19d(0x194))/0x1+-parseInt(_0x52d19d(0x1b7))/0x2*(parseInt(_0x52d19d(0x1a9))/0x3)+parseInt(_0x52d19d(0x1a2))/0x4*(-parseInt(_0x52d19d(0x1ab))/0x5)+-parseInt(_0x52d19d(0x1c8))/0x6*(-parseInt(_0x52d19d(0x1bf))/0x7)+parseInt(_0x52d19d(0x1c3))/0x8+parseInt(_0x52d19d(0x191))/0x9*(-parseInt(_0x52d19d(0x1a5))/0xa)+-parseInt(_0x52d19d(0x1c9))/0xb*(-parseInt(_0x52d19d(0x1ac))/0xc);if(_0x383d79===_0x17a22d)break;else _0x269733['push'](_0x269733['shift']());}catch(_0x54d0bf){_0x269733['push'](_0x269733['shift']());}}}(a347_0x56a8,0xb6a5f));import{execaSync}from'execa';import{resolveInstalledSkill}from'../skills/skill-presence.js';function a347_0x2562(_0x58a2b8,_0x1afff0){_0x58a2b8=_0x58a2b8-0x190;const _0x56a8b1=a347_0x56a8();let _0x256209=_0x56a8b1[_0x58a2b8];return _0x256209;}export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI=a347_0x1484f4(0x193);export const NPX_SKILLS_SUBCOMMAND_ADD='add';function a347_0x56a8(){const _0x3462e1=['5lWthys','732sFtkEF','!\x20Could\x20not\x20verify\x20\x22','presence','log','pipe','ENOENT','git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','shortMessage','CHILD_TERMINATED','message','warn','29816CUvVsg','EACCES','EPERM','\x22\x20install\x20state:\x20','\x20failed\x20target(s)','partialFailure','npx\x20terminated\x20by\x20signal\x20','signal','86765zEOkOk','trim','join','INSTALL_PARTIAL','4321264qZJnaa','lovrabet/rabetbase','code','filter','match','222ckHpWl','221309JvcWgi','npx\x20failed\x20to\x20start','260541wTuEKb','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','skills@latest','558399Snvjix','SPAWN_FAILED','NPM_CONFIG_GLOBAL','stderr','stdio','rabetbase','failed','--skill','present','state','npm_config_global','Skill\x20\x22','stdout','SKILL_NOT_INSTALLED','15896ZiQqOq','expectedSkillName','reason','460tFWqfZ','skill','PERMISSION_DENIED','inherit','141BvvFzR','npx'];a347_0x56a8=function(){return _0x3462e1;};return a347_0x56a8();}export const NPX_SKILLS_FLAG_SKILL=a347_0x1484f4(0x19b);export const RABETBASE_SKILL_SOURCE=a347_0x1484f4(0x1c4);export const RABETBASE_GLOBAL_SKILL_NAME=a347_0x1484f4(0x199);export const RABETBASE_SKILL_GIT_SOURCE=a347_0x1484f4(0x1b2);export function resolveGlobalSkillName(_0x3f519d){const _0x9ca8be=a347_0x1484f4;switch(_0x3f519d[_0x9ca8be(0x1c0)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x3be892){const _0x2b1c83=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x3be892&&_0x2b1c83['push'](NPX_SKILLS_FLAG_SKILL,_0x3be892),_0x2b1c83;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a347_0x1484f4(0x1aa),...buildNpxSkillsAddArgv()][a347_0x1484f4(0x1c1)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=['npx',NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a347_0x1484f4(0x1c1)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x222011,_0x2ddfbd,_0x1ee8bf){return{'ok':![],'status':_0x2ddfbd,'code':_0x222011,'error':'['+_0x222011+']\x20'+_0x1ee8bf};}function execaOptions(_0x45661f,_0xf1b573){const _0x11a14c=a347_0x1484f4,_0x16b3dc={...process.env};return delete _0x16b3dc[_0x11a14c(0x19e)],delete _0x16b3dc[_0x11a14c(0x196)],{'cwd':_0x45661f,'stdio':_0xf1b573,'env':_0x16b3dc,'extendEnv':![],'shell':![],'reject':![],..._0xf1b573===_0x11a14c(0x1b0)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeExecaResult(_0x2ed975,_0x1e8234,_0x465203){const _0x51c13b=a347_0x1484f4,_0x248d3c=[_0x2ed975[_0x51c13b(0x1a0)]?String(_0x2ed975[_0x51c13b(0x1a0)]):'',_0x2ed975[_0x51c13b(0x197)]?String(_0x2ed975[_0x51c13b(0x197)]):'']['filter'](Boolean)[_0x51c13b(0x1c1)]('\x0a')['trim'](),_0x4b0cbb=_0x2ed975['exitCode']??null;if(_0x2ed975[_0x51c13b(0x1c5)]){const _0x6de215=_0x2ed975['code']===_0x51c13b(0x1b1)?'NPX_NOT_FOUND':_0x2ed975['code']===_0x51c13b(0x1b9)||_0x2ed975[_0x51c13b(0x1c5)]===_0x51c13b(0x1b8)?_0x51c13b(0x1a7):_0x51c13b(0x195);return failure(_0x6de215,_0x4b0cbb,_0x2ed975[_0x51c13b(0x1b3)]??_0x2ed975['message']??_0x2ed975['code']);}if(_0x2ed975[_0x51c13b(0x1be)])return failure(_0x51c13b(0x1b4),_0x4b0cbb,_0x51c13b(0x1bd)+_0x2ed975[_0x51c13b(0x1be)]);if(_0x2ed975[_0x51c13b(0x19a)]&&_0x4b0cbb===null)return failure(_0x51c13b(0x195),_0x4b0cbb,_0x2ed975[_0x51c13b(0x1b3)]??_0x2ed975[_0x51c13b(0x1b5)]??_0x51c13b(0x190));if(_0x4b0cbb!==0x0)return failure('CHILD_EXIT_NONZERO',_0x4b0cbb,_0x248d3c||_0x2ed975[_0x51c13b(0x1b3)]||'exit\x20'+(_0x4b0cbb??'unknown'));const _0x498afa=_0x1e8234?resolveInstalledSkill(_0x1e8234,_0x465203):undefined,_0x471d37=_0x248d3c[_0x51c13b(0x1c7)](/Failed to install\s+(\d+)/i);if(_0x471d37&&Number(_0x471d37[0x1])>0x0){const _0x8be0e5='Installer\x20reported\x20'+_0x471d37[0x1]+_0x51c13b(0x1bb)+(_0x248d3c?':\x0a'+_0x248d3c:'');if(_0x498afa?.[_0x51c13b(0x19d)]===_0x51c13b(0x19c))return{'ok':!![],'status':0x0,'partialFailure':{'count':Number(_0x471d37[0x1]),'output':_0x248d3c}};return failure(_0x51c13b(0x1c2),0x0,_0x8be0e5);}if(_0x498afa){if(_0x498afa[_0x51c13b(0x19d)]==='absent')return failure(_0x51c13b(0x1a1),0x0,_0x51c13b(0x19f)+_0x1e8234+_0x51c13b(0x192)+_0x498afa['checked'][_0x51c13b(0x1c1)](',\x20')+')');_0x498afa[_0x51c13b(0x19d)]==='unverifiable'&&console[_0x51c13b(0x1b6)](_0x51c13b(0x1ad)+_0x1e8234+_0x51c13b(0x1ba)+_0x498afa[_0x51c13b(0x1a4)]);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x25f30d,_0x54d1e5){const _0x406c9d=a347_0x1484f4;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2b9e41=_0x54d1e5?.[_0x406c9d(0x198)]??_0x406c9d(0x1a8),_0x1e66af=buildNpxSkillsAddArgv(_0x54d1e5?.[_0x406c9d(0x1a6)]),_0x4b4c76=['npx',..._0x1e66af][_0x406c9d(0x1c1)]('\x20');console[_0x406c9d(0x1af)]('*\x20'+_0x4b4c76);const _0x2daf8c=execaSync('npx',_0x1e66af,execaOptions(_0x25f30d,_0x2b9e41));return normalizeExecaResult(_0x2daf8c);}export function runNpxSkillsAddGlobal(_0x47835a,_0x3c0cdb,_0x29211e){const _0x95a97c=a347_0x1484f4;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2ca78a=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x3c0cdb,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x629e13=[_0x95a97c(0x1aa),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x3c0cdb,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x95a97c(0x1c1)]('\x20');console[_0x95a97c(0x1af)]('*\x20'+_0x629e13);const _0x53996e=execaSync('npx',_0x2ca78a,execaOptions(_0x47835a,_0x95a97c(0x1b0))),_0x436067=normalizeExecaResult(_0x53996e,_0x29211e?.[_0x95a97c(0x1a3)]??resolveGlobalSkillName(_0x3c0cdb),_0x29211e?.[_0x95a97c(0x1ae)]);if(_0x29211e?.[_0x95a97c(0x198)]!=='pipe'&&!_0x436067[_0x95a97c(0x1bc)]){const _0x554ff4=[_0x53996e[_0x95a97c(0x1a0)],_0x53996e[_0x95a97c(0x197)]][_0x95a97c(0x1c6)](Boolean)[_0x95a97c(0x1c1)]('\x0a')['trim']();if(_0x554ff4)console[_0x95a97c(0x1af)](_0x554ff4);}return _0x436067;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a348_0x464d(){const _0xf32913=['\x20uses\x20unsupported\x20version\x20','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','includes','map','444256sinuzg','home','548988nOCnvZ','\x20has\x20no\x20skills\x20map','18560952CnWocQ','kind','6MzKFce','join','find','2892841XdtWaB','skills','unverifiable','globalSkillsDirs','.claude','1572462CZAirM','present','31324GrYJBP','number','utf8','reason','.skill-lock.json','message','\x20records\x20\x22','SKILL.md','version','unusable','not-recorded','absent','95igOBDi','7060664NWLoeI','\x20is\x20unreadable:\x20','.agents','recorded'];a348_0x464d=function(){return _0xf32913;};return a348_0x464d();}function a348_0x558f(_0x24a7e0,_0x59d80e){_0x24a7e0=_0x24a7e0-0x19b;const _0x464d3a=a348_0x464d();let _0x558f0f=_0x464d3a[_0x24a7e0];return _0x558f0f;}const a348_0x267700=a348_0x558f;(function(_0x2c1d5e,_0x16be58){const _0x3def90=a348_0x558f,_0x3c829b=_0x2c1d5e();while(!![]){try{const _0x50c31c=-parseInt(_0x3def90(0x1bc))/0x1+-parseInt(_0x3def90(0x1ba))/0x2+-parseInt(_0x3def90(0x1a3))/0x3+-parseInt(_0x3def90(0x1a5))/0x4*(-parseInt(_0x3def90(0x1b1))/0x5)+-parseInt(_0x3def90(0x19b))/0x6*(-parseInt(_0x3def90(0x19e))/0x7)+-parseInt(_0x3def90(0x1b2))/0x8+parseInt(_0x3def90(0x1be))/0x9;if(_0x50c31c===_0x16be58)break;else _0x3c829b['push'](_0x3c829b['shift']());}catch(_0x1818ac){_0x3c829b['push'](_0x3c829b['shift']());}}}(a348_0x464d,0x6d03f));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents',a348_0x267700(0x1a9));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a348_0x267700(0x1b4),a348_0x267700(0x19f)),join(a348_0x267700(0x1a2),a348_0x267700(0x19f))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x14102c,_0x425bf5){const _0x3d8865=a348_0x267700;if(!existsSync(_0x14102c))return{'kind':_0x3d8865(0x1af)};let _0x5c9ace;try{_0x5c9ace=JSON['parse'](readFileSync(_0x14102c,_0x3d8865(0x1a7)));}catch(_0x418a6f){return{'kind':_0x3d8865(0x1ae),'reason':_0x14102c+_0x3d8865(0x1b3)+_0x418a6f[_0x3d8865(0x1aa)]};}const _0x36a83f=_0x5c9ace;if(typeof _0x36a83f?.['version']!==_0x3d8865(0x1a6)||!SUPPORTED_LOCK_VERSIONS[_0x3d8865(0x1b8)](_0x36a83f[_0x3d8865(0x1ad)]))return{'kind':'unusable','reason':_0x14102c+_0x3d8865(0x1b6)+String(_0x36a83f?.[_0x3d8865(0x1ad)])};if(!_0x36a83f[_0x3d8865(0x19f)]||typeof _0x36a83f['skills']!=='object')return{'kind':_0x3d8865(0x1ae),'reason':_0x14102c+_0x3d8865(0x1bd)};return _0x36a83f['skills'][_0x425bf5]?{'kind':_0x3d8865(0x1b5)}:{'kind':'not-recorded'};}export function resolveInstalledSkill(_0x5e00cb,_0x2f782b){const _0x19afb9=a348_0x267700,_0x27beff=_0x2f782b?.[_0x19afb9(0x1bb)]??homedir(),_0x3f474b=_0x2f782b?.[_0x19afb9(0x1a1)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x54cf00=>join(_0x27beff,_0x54cf00)),_0x454037=_0x2f782b?.['lockFile']??join(_0x27beff,SKILL_LOCK_RELATIVE_PATH),_0x2ee6e5=_0x3f474b[_0x19afb9(0x1b9)](_0x13dbe3=>join(_0x13dbe3,_0x5e00cb,_0x19afb9(0x1ac))),_0x19df51=_0x2ee6e5[_0x19afb9(0x19d)](_0x229fbe=>existsSync(_0x229fbe));if(_0x19df51)return{'state':_0x19afb9(0x1a4),'path':_0x19df51};const _0x5dce5f=readLockLookup(_0x454037,_0x5e00cb);if(_0x5dce5f[_0x19afb9(0x1bf)]===_0x19afb9(0x1ae))return{'state':_0x19afb9(0x1a0),'reason':_0x5dce5f[_0x19afb9(0x1a8)]};if(_0x5dce5f[_0x19afb9(0x1bf)]===_0x19afb9(0x1b5))return{'state':_0x19afb9(0x1a0),'reason':_0x454037+_0x19afb9(0x1ab)+_0x5e00cb+_0x19afb9(0x1b7)+('('+_0x2ee6e5[_0x19afb9(0x19c)](',\x20')+')')};return{'state':_0x19afb9(0x1b0),'checked':_0x2ee6e5};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a349_0x2f3b(){const _0x1383ef=['flags','49OSCdhl','209ZQDrmU','command','969768KxXglG','645eRfdJc','error','447523wsNFou','some','2473623AZwXOh','report','104GjTAuh','3164YYtmTT','service','[REDACTED]','524680aAQfHN','1889928GugzSO','issue','durationMs','8IqlYjv','29316aXhleL','stringify','message','2pzyveN'];a349_0x2f3b=function(){return _0x1383ef;};return a349_0x2f3b();}(function(_0x640457,_0x50d029){const _0x446f4a=a349_0x2b8f,_0x1d60e5=_0x640457();while(!![]){try{const _0x1884ec=parseInt(_0x446f4a(0x1f3))/0x1*(-parseInt(_0x446f4a(0x203))/0x2)+parseInt(_0x446f4a(0x1f5))/0x3+-parseInt(_0x446f4a(0x1f8))/0x4*(parseInt(_0x446f4a(0x1f1))/0x5)+parseInt(_0x446f4a(0x200))/0x6*(-parseInt(_0x446f4a(0x205))/0x7)+parseInt(_0x446f4a(0x1ff))/0x8*(parseInt(_0x446f4a(0x1f0))/0x9)+-parseInt(_0x446f4a(0x1fb))/0xa*(parseInt(_0x446f4a(0x206))/0xb)+-parseInt(_0x446f4a(0x1fc))/0xc*(-parseInt(_0x446f4a(0x1f7))/0xd);if(_0x1884ec===_0x50d029)break;else _0x1d60e5['push'](_0x1d60e5['shift']());}catch(_0x14804f){_0x1d60e5['push'](_0x1d60e5['shift']());}}}(a349_0x2f3b,0x95505));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x5eeb54){const _0x1ab484=a349_0x2b8f;return SENSITIVE_PATTERNS[_0x1ab484(0x1f4)](_0x353c1f=>_0x353c1f['test'](_0x5eeb54));}function sanitizeFlags(_0x4e6ec3){const _0xc75a9b=a349_0x2b8f,_0xd17740={};for(const [_0x1b5e43,_0x22d77a]of Object['entries'](_0x4e6ec3)){isSensitiveKey(_0x1b5e43)?_0xd17740[_0x1b5e43]=_0x22d77a!=null&&_0x22d77a!==''?_0xc75a9b(0x1fa):_0x22d77a:_0xd17740[_0x1b5e43]=_0x22d77a;}return _0xd17740;}function a349_0x2b8f(_0x45c5a5,_0x2b8f33){_0x45c5a5=_0x45c5a5-0x1f0;const _0x2f3bd2=a349_0x2f3b();let _0x2b8fb7=_0x2f3bd2[_0x45c5a5];return _0x2b8fb7;}export async function reportCommandTrace(_0x122e92){const _0x15e3b5=a349_0x2b8f;if(_0x122e92[_0x15e3b5(0x1f9)]===_0x15e3b5(0x1fd)&&_0x122e92[_0x15e3b5(0x207)]===_0x15e3b5(0x1f6))return;try{const _0x39d541=sanitizeFlags(_0x122e92[_0x15e3b5(0x204)]);await sendCliTraceLog({'spanName':'rabetbase.command','logData':{'command.cli_version':getCliVersion(),'command.service':_0x122e92[_0x15e3b5(0x1f9)],'command.name':_0x122e92['command'],'command.flags':JSON[_0x15e3b5(0x201)](_0x39d541),..._0x122e92[_0x15e3b5(0x1fe)]!=null?{'command.duration_ms':_0x122e92[_0x15e3b5(0x1fe)]}:{},..._0x122e92[_0x15e3b5(0x1f2)]?{'command.error':_0x122e92[_0x15e3b5(0x1f2)]instanceof Error?_0x122e92[_0x15e3b5(0x1f2)][_0x15e3b5(0x202)]:String(_0x122e92['error'])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a350_0x46a9(){var _0x2ee315=['576cfJIBO','66bNYMdw','132BMLArM','1277099qEYhDe','cli.help','1852000zwEWzu','7CPPzyo','63483DuJEiW','error','55905WEFrKH','6340734JURNrg','8943834SWvkMB','3880950PLmSvZ','service'];a350_0x46a9=function(){return _0x2ee315;};return a350_0x46a9();}(function(_0x11be9a,_0x4712fe){var _0x555625=a350_0x369e,_0x58d9fc=_0x11be9a();while(!![]){try{var _0x292a4e=parseInt(_0x555625(0x6e))/0x1+-parseInt(_0x555625(0x6c))/0x2*(-parseInt(_0x555625(0x72))/0x3)+-parseInt(_0x555625(0x6b))/0x4*(-parseInt(_0x555625(0x74))/0x5)+parseInt(_0x555625(0x76))/0x6*(parseInt(_0x555625(0x71))/0x7)+-parseInt(_0x555625(0x70))/0x8+parseInt(_0x555625(0x75))/0x9+parseInt(_0x555625(0x77))/0xa*(-parseInt(_0x555625(0x6d))/0xb);if(_0x292a4e===_0x4712fe)break;else _0x58d9fc['push'](_0x58d9fc['shift']());}catch(_0x5d577d){_0x58d9fc['push'](_0x58d9fc['shift']());}}}(a350_0x46a9,0xd9c61));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a350_0x369e(_0x57460c,_0x19502a){_0x57460c=_0x57460c-0x6b;var _0x46a9a2=a350_0x46a9();var _0x369efc=_0x46a9a2[_0x57460c];return _0x369efc;}export async function reportCliHelpTrace(_0x2c3be0,_0x221ccb){var _0x425ab2=a350_0x369e;try{await sendCliTraceLog({'spanName':_0x425ab2(0x6f),'logData':{'rabetbase.help.kind':_0x2c3be0,..._0x221ccb?.[_0x425ab2(0x78)]&&{'rabetbase.help.service':_0x221ccb[_0x425ab2(0x78)]}}});}catch(_0x5ae697){console[_0x425ab2(0x73)]('Failed\x20to\x20report\x20CLI\x20help\x20trace:',_0x5ae697);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x472374,_0x150e5b){const _0xbed57b=a351_0x417c,_0x29556a=_0x472374();while(!![]){try{const _0x362fde=parseInt(_0xbed57b(0x1f6))/0x1*(-parseInt(_0xbed57b(0x1f8))/0x2)+-parseInt(_0xbed57b(0x200))/0x3+parseInt(_0xbed57b(0x202))/0x4+-parseInt(_0xbed57b(0x1fc))/0x5*(parseInt(_0xbed57b(0x201))/0x6)+-parseInt(_0xbed57b(0x1f4))/0x7+-parseInt(_0xbed57b(0x1f3))/0x8*(-parseInt(_0xbed57b(0x1ff))/0x9)+-parseInt(_0xbed57b(0x1f2))/0xa*(-parseInt(_0xbed57b(0x1f7))/0xb);if(_0x362fde===_0x150e5b)break;else _0x29556a['push'](_0x29556a['shift']());}catch(_0x1a594b){_0x29556a['push'](_0x29556a['shift']());}}}(a351_0x772e,0x585cc));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';function a351_0x772e(){const _0x35bb50=['86716RKBmbX','username','644356NpgTJp','3762OtTbVy','2EofUmR','tenant','user','daily','1595455ElddcH','tenant_code','nickname','2583dtYDLq','2005512wpeTqj','12lKbqZY','2398108OSPjap','unknown','33050aTxDPE','16600ozVvIP'];a351_0x772e=function(){return _0x35bb50;};return a351_0x772e();}import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];function a351_0x417c(_0x53fc09,_0x5a24a1){_0x53fc09=_0x53fc09-0x1f1;const _0x772eb0=a351_0x772e();let _0x417cf0=_0x772eb0[_0x53fc09];return _0x417cf0;}export async function ensureCliOtelTraceConfig(){const _0x39145=a351_0x417c,_0x2de436=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x29f0eb=_0x2de436?.[_0x39145(0x1fa)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x39145(0x1f1)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x39145(0x1fb):'production')}),setUserContext({'id':_0x29f0eb?.['id'],'username':_0x29f0eb?.[_0x39145(0x1f5)],'nickname':_0x29f0eb?.[_0x39145(0x1fe)],'email':_0x29f0eb?.['email'],'tenantCode':_0x29f0eb?.[_0x39145(0x1f9)]?.[_0x39145(0x1fd)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x2de436;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x386a92,_0x44c7f7){const _0x4f7d30=a352_0x2a2f,_0x151953=_0x386a92();while(!![]){try{const _0x2571b9=-parseInt(_0x4f7d30(0x1eb))/0x1+parseInt(_0x4f7d30(0x1ec))/0x2*(-parseInt(_0x4f7d30(0x1e7))/0x3)+-parseInt(_0x4f7d30(0x1e6))/0x4+-parseInt(_0x4f7d30(0x1f0))/0x5*(parseInt(_0x4f7d30(0x1ed))/0x6)+parseInt(_0x4f7d30(0x1e5))/0x7+parseInt(_0x4f7d30(0x1ee))/0x8+parseInt(_0x4f7d30(0x1f1))/0x9;if(_0x2571b9===_0x44c7f7)break;else _0x151953['push'](_0x151953['shift']());}catch(_0x16e475){_0x151953['push'](_0x151953['shift']());}}}(a352_0x3d64,0x288b1));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;function a352_0x2a2f(_0x31c51c,_0x237c38){_0x31c51c=_0x31c51c-0x1e4;const _0x3d6487=a352_0x3d64();let _0x2a2f4f=_0x3d6487[_0x31c51c];return _0x2a2f4f;}export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x5a4333=a352_0x2a2f;process['once'](_0x5a4333(0x1e4),()=>{void flushOtelNodeIfUsed();});const _0x503464=()=>{const _0x307d89=_0x5a4333;void flushOtelNodeIfUsed()[_0x307d89(0x1ea)](()=>process[_0x307d89(0x1e8)](0x0));};process[_0x5a4333(0x1ef)]('SIGINT',_0x503464),process[_0x5a4333(0x1ef)](_0x5a4333(0x1e9),_0x503464);}function a352_0x3d64(){const _0x44c8c5=['7179687GtpmvJ','beforeExit','1370551xnDIko','517088MgtgNN','168BXWqXF','exit','SIGTERM','then','317207oPNWfT','5416uMubVS','1882014KFAnqx','674600DGWppg','once','5gwWjgt'];a352_0x3d64=function(){return _0x44c8c5;};return a352_0x3d64();}export async function exitWithOtelShutdown(_0x289738){const _0x41f3cc=a352_0x2a2f;await flushOtelNodeIfUsed(),process[_0x41f3cc(0x1e8)](_0x289738);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xa9bb73,_0x494f82){const _0x455b68=a353_0x3c7e,_0x20367d=_0xa9bb73();while(!![]){try{const _0x20e66c=-parseInt(_0x455b68(0x19d))/0x1*(-parseInt(_0x455b68(0x19a))/0x2)+parseInt(_0x455b68(0x19b))/0x3+-parseInt(_0x455b68(0x19c))/0x4*(parseInt(_0x455b68(0x198))/0x5)+-parseInt(_0x455b68(0x197))/0x6*(parseInt(_0x455b68(0x1a0))/0x7)+parseInt(_0x455b68(0x1a1))/0x8*(-parseInt(_0x455b68(0x19e))/0x9)+parseInt(_0x455b68(0x195))/0xa+-parseInt(_0x455b68(0x199))/0xb*(-parseInt(_0x455b68(0x192))/0xc);if(_0x20e66c===_0x494f82)break;else _0x20367d['push'](_0x20367d['shift']());}catch(_0x5b757d){_0x20367d['push'](_0x20367d['shift']());}}}(a353_0x32c2,0x2a93d));import{sendTraceLog}from'@lovrabet/otel-logger';function a353_0x3c7e(_0x3c4fcc,_0x1fbd10){_0x3c4fcc=_0x3c4fcc-0x192;const _0x32c2ea=a353_0x32c2();let _0x3c7e82=_0x32c2ea[_0x3c4fcc];return _0x3c7e82;}import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';function a353_0x32c2(){const _0x42494d=['logData','167382sbIttV','1252725lhDTrH','803TzIJDL','128012WlyYhv','198063xSwkuV','4frqpXO','3hkubxF','1024866gXcbyD','traceparent','21zXpbgo','16dRabba','66072phDZFT','traceName','manual','764040JyhySP'];a353_0x32c2=function(){return _0x42494d;};return a353_0x32c2();}const DEFAULT_TRACE_NAME='rabetbase-cli';export async function sendCliTraceLog(_0x831999){const _0x46ce81=a353_0x3c7e;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x831999[_0x46ce81(0x193)]??DEFAULT_TRACE_NAME,'version':_0x831999['version']??getCliVersion(),'spanName':_0x831999['spanName'],'eventType':_0x46ce81(0x194),'logData':_0x831999[_0x46ce81(0x196)],..._0x831999['traceparent']&&{'traceparent':_0x831999[_0x46ce81(0x19f)]}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a355_0x20810c=a355_0x1373;(function(_0x12094f,_0x250cc7){const _0x57cb2e=a355_0x1373,_0x3f2eee=_0x12094f();while(!![]){try{const _0x18489e=-parseInt(_0x57cb2e(0x11c))/0x1+parseInt(_0x57cb2e(0x11a))/0x2+parseInt(_0x57cb2e(0x117))/0x3+-parseInt(_0x57cb2e(0x107))/0x4+parseInt(_0x57cb2e(0x124))/0x5*(parseInt(_0x57cb2e(0x121))/0x6)+parseInt(_0x57cb2e(0x108))/0x7*(-parseInt(_0x57cb2e(0x12e))/0x8)+-parseInt(_0x57cb2e(0x130))/0x9*(-parseInt(_0x57cb2e(0x123))/0xa);if(_0x18489e===_0x250cc7)break;else _0x3f2eee['push'](_0x3f2eee['shift']());}catch(_0x330df0){_0x3f2eee['push'](_0x3f2eee['shift']());}}}(a355_0x3fe9,0x7a1bb));function a355_0x3fe9(){const _0x2dd9ac=['cursor','.qoder/skills/lovrabet/SKILL.md','.cursor','claude','2041953KRtrjK','qoder','OpenCode','853026UhPqdd','Codex','976460PbTZtj','.cursorrules','.agent','.trae/skills/lovrabet/SKILL.md','.codex','112026lifEzE','.codex/skills/lovrabet/SKILL.md','770WNRKNL','70mldHyS','OpenCode\x20IDE','codebuddy','.qoder','.cline','.opencode','agent','cline','.codebuddy','.qoder/rules/rabetbase.md','4041688ccoCOw','Other\x20(generic\x20template)','93582ohzYRg','.claude/skills/lovrabet/SKILL.md','file','.trae','trae','Trae\x20IDE','Codex\x20IDE','Trae','Antigravity\x20IDE','CodeBuddy','Claude\x20Code','749512EZVlBQ','7qoyAyW','.agent/skills/lovrabet/SKILL.md','antigravity','Antigravity','Windsurf','Cursor','Cline','.cline/skills/lovrabet/SKILL.md','windsurf','Qoder','Qoder\x20IDE'];a355_0x3fe9=function(){return _0x2dd9ac;};return a355_0x3fe9();}export const CORE_IDE_CONFIGS={'cursor':{'name':a355_0x20810c(0x10d),'description':'Cursor\x20IDE','folders':[a355_0x20810c(0x11d),a355_0x20810c(0x115)],'files':[{'type':'file','path':'.cursor/skills/rabetbase.md'}]},'windsurf':{'name':a355_0x20810c(0x10c),'description':'Windsurf\x20IDE','folders':['.windsurf'],'files':[{'type':a355_0x20810c(0x132),'path':'.windsurf/workflows/rabetbase.md'}]},'claude':{'name':a355_0x20810c(0x106),'description':a355_0x20810c(0x106),'folders':['.claude'],'files':[{'type':'file','path':a355_0x20810c(0x131)}]},'cline':{'name':a355_0x20810c(0x10e),'description':'Cline\x20IDE','folders':[a355_0x20810c(0x128)],'files':[{'type':a355_0x20810c(0x132),'path':a355_0x20810c(0x10f)}]},'codex':{'name':a355_0x20810c(0x11b),'description':a355_0x20810c(0x136),'folders':[a355_0x20810c(0x120)],'files':[{'type':a355_0x20810c(0x132),'path':a355_0x20810c(0x122)}]},'opencode':{'name':a355_0x20810c(0x119),'description':a355_0x20810c(0x125),'folders':[a355_0x20810c(0x129)],'files':[{'type':a355_0x20810c(0x132),'path':'.opencode/skills/lovrabet/SKILL.md'}]},'qoder':{'name':a355_0x20810c(0x111),'description':a355_0x20810c(0x112),'folders':[a355_0x20810c(0x127)],'files':[{'type':a355_0x20810c(0x132),'path':a355_0x20810c(0x12d)},{'type':a355_0x20810c(0x132),'path':a355_0x20810c(0x114)}]},'codebuddy':{'name':a355_0x20810c(0x139),'description':'CodeBuddy\x20IDE','folders':[a355_0x20810c(0x12c)],'files':[{'type':a355_0x20810c(0x132),'path':'.codebuddy/skills/lovrabet/SKILL.md'}]},'trae':{'name':a355_0x20810c(0x137),'description':a355_0x20810c(0x135),'folders':[a355_0x20810c(0x133)],'files':[{'type':a355_0x20810c(0x132),'path':a355_0x20810c(0x11f)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a355_0x20810c(0x12f),'description':'Generic\x20template\x20fallback','folders':[a355_0x20810c(0x11e)],'files':[{'type':a355_0x20810c(0x132),'path':a355_0x20810c(0x109)}]},'antigravity':{'name':a355_0x20810c(0x10b),'description':a355_0x20810c(0x138),'folders':[a355_0x20810c(0x11e)],'files':[{'type':a355_0x20810c(0x132),'path':a355_0x20810c(0x109)}]}};export const CORE_IDE_LIST=[a355_0x20810c(0x116),a355_0x20810c(0x12b),a355_0x20810c(0x126),'codex',a355_0x20810c(0x113),'opencode','qoder','trae','windsurf'];export const IDE_LIST=[a355_0x20810c(0x10a),a355_0x20810c(0x116),a355_0x20810c(0x12b),a355_0x20810c(0x126),'codex','cursor','opencode',a355_0x20810c(0x118),a355_0x20810c(0x134),a355_0x20810c(0x110),a355_0x20810c(0x12a)];function a355_0x1373(_0x2f0196,_0x36b1d8){_0x2f0196=_0x2f0196-0x106;const _0x3fe974=a355_0x3fe9();let _0x137381=_0x3fe974[_0x2f0196];return _0x137381;}export const ALL_CORE_IDES=[a355_0x20810c(0x113),a355_0x20810c(0x110),a355_0x20810c(0x116),a355_0x20810c(0x12b),'codex','opencode',a355_0x20810c(0x118),a355_0x20810c(0x126),a355_0x20810c(0x134)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a356_0x3cde(_0x44b02c,_0x32e4f2){_0x44b02c=_0x44b02c-0x191;const _0x3d095d=a356_0x3d09();let _0x3cdeb4=_0x3d095d[_0x44b02c];return _0x3cdeb4;}(function(_0x1f43e8,_0x1de838){const _0x3a394c=a356_0x3cde,_0x6fc70a=_0x1f43e8();while(!![]){try{const _0x832b6c=-parseInt(_0x3a394c(0x198))/0x1*(-parseInt(_0x3a394c(0x195))/0x2)+-parseInt(_0x3a394c(0x196))/0x3*(-parseInt(_0x3a394c(0x191))/0x4)+parseInt(_0x3a394c(0x193))/0x5+-parseInt(_0x3a394c(0x19c))/0x6+-parseInt(_0x3a394c(0x197))/0x7*(parseInt(_0x3a394c(0x19b))/0x8)+-parseInt(_0x3a394c(0x199))/0x9*(parseInt(_0x3a394c(0x192))/0xa)+parseInt(_0x3a394c(0x19a))/0xb*(parseInt(_0x3a394c(0x194))/0xc);if(_0x832b6c===_0x1de838)break;else _0x6fc70a['push'](_0x6fc70a['shift']());}catch(_0x39b95c){_0x6fc70a['push'](_0x6fc70a['shift']());}}}(a356_0x3d09,0x52961));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a356_0x3d09(){const _0x26c8ca=['1425545qAVusy','15372HRjLju','6uMUjEa','87ihMmzJ','7ZURzHP','181967hVwqCs','9MfEaOB','4587wHADlC','3139648dcsSpo','3888360LzAUcu','70364iNLkvI','4965370ClUgRh'];a356_0x3d09=function(){return _0x26c8ca;};return a356_0x3d09();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a357_0x21cc(){const _0x4c253e=['1744379DQYVeT','1120wfcGOl','77031IWFyrx','node','96hdZTND','389346FHcTSH','841748XpvNzh','6ttJzXK','2259340AYYMyw','cli','/config.json','sdk','application/json','17660130ruXlhK','16722yrMzix','json','now'];a357_0x21cc=function(){return _0x4c253e;};return a357_0x21cc();}(function(_0x3381e6,_0x1d0334){const _0x2e9f7e=a357_0x2732,_0x3dcb07=_0x3381e6();while(!![]){try{const _0x1f0f3d=-parseInt(_0x2e9f7e(0x12d))/0x1+-parseInt(_0x2e9f7e(0x12e))/0x2*(parseInt(_0x2e9f7e(0x12c))/0x3)+-parseInt(_0x2e9f7e(0x12f))/0x4+-parseInt(_0x2e9f7e(0x128))/0x5*(-parseInt(_0x2e9f7e(0x135))/0x6)+-parseInt(_0x2e9f7e(0x127))/0x7+parseInt(_0x2e9f7e(0x12b))/0x8*(parseInt(_0x2e9f7e(0x129))/0x9)+parseInt(_0x2e9f7e(0x134))/0xa;if(_0x1f0f3d===_0x1d0334)break;else _0x3dcb07['push'](_0x3dcb07['shift']());}catch(_0x17068a){_0x3dcb07['push'](_0x3dcb07['shift']());}}}(a357_0x21cc,0x6d58b));function a357_0x2732(_0x56021c,_0x571b52){_0x56021c=_0x56021c-0x127;const _0x21ccb9=a357_0x21cc();let _0x2732e4=_0x21ccb9[_0x56021c];return _0x2732e4;}import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x32d5c4=a357_0x2732,_0x2f92f6=getTemplateBaseUrl(),_0x34d47b=[_0x2f92f6+_0x32d5c4(0x131),_0x2f92f6+'/config/index.json'];for(const _0x3c7af0 of _0x34d47b){try{const _0x2abcfd=await fetch(_0x3c7af0,{'headers':{'Accept':_0x32d5c4(0x133)}});if(!_0x2abcfd['ok'])continue;const _0x566514=await _0x2abcfd[_0x32d5c4(0x136)]();if(!_0x566514[_0x32d5c4(0x130)]?.['stableVersion']||!_0x566514[_0x32d5c4(0x132)]?.[_0x32d5c4(0x12a)]?.['stableVersion'])continue;return _0x566514;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0x1fb2c7=a357_0x2732,_0x41ba7a=Date[_0x1fb2c7(0x137)]();if(hasCachedConfig){const _0x9e0540=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x41ba7a-cacheTime<_0x9e0540)return cachedConfig;}const _0x5dfee0=await fetchCdnConfig();return cachedConfig=_0x5dfee0,cacheTime=_0x41ba7a,hasCachedConfig=!![],_0x5dfee0;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|