@lovrabet/rabetbase-cli 2.5.6-beta.1 → 2.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- 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.d.ts +1 -0
- package/lib/commands/dataset/design-context.js +1 -0
- package/lib/commands/dataset/design-start.d.ts +1 -0
- package/lib/commands/dataset/design-start.js +1 -0
- package/lib/commands/dataset/design-status.d.ts +1 -0
- package/lib/commands/dataset/design-status.js +1 -0
- package/lib/commands/dataset/design-sync-retry.d.ts +1 -0
- package/lib/commands/dataset/design-sync-retry.js +1 -0
- package/lib/commands/dataset/design-sync-status.d.ts +1 -0
- package/lib/commands/dataset/design-sync-status.js +1 -0
- package/lib/commands/dataset/design-validate.d.ts +1 -0
- package/lib/commands/dataset/design-validate.js +1 -0
- 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/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.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.d.ts +11 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-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/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.d.ts +17 -0
- package/lib/services/dataset-design/checkpoint.js +1 -0
- package/lib/services/dataset-design/commands.d.ts +6 -0
- package/lib/services/dataset-design/commands.js +1 -0
- package/lib/services/dataset-design/contract.d.ts +7 -0
- package/lib/services/dataset-design/contract.js +1 -0
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
- package/skills/rabetbase/SKILL.md +4 -4
- package/skills/rabetbase/references/rabetbase-dataset-design.md +25 -0
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +2 -255
- package/skills/rabetbase-dataset-generation/SKILL.md +45 -0
- package/skills/rabetbase-dataset-generation/references/workflow.md +60 -0
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +4 -3
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a362_0x48d772=a362_0x3904;function a362_0x2578(){const _0x10448b=['514113RpAVcR','utf-8','content','map','object','entries','24DvClIX','lastUpdated','status','\x0a\x0a>更新时间:','.lovrabet','statusText','join','/skills/guides.json','390395ghHeuO','.lovrabet/skill/guides','1049169ldNiNn','CDN\x20request\x20failed:\x20','2303420LtFdfH','length','.md','trimEnd','application/json','4Pmqncz','guides','3222rUmYck','2872wGIfut','527eqDYrb','1530361aYrBRm','extendContent','CDN\x20returned\x20invalid\x20data','push','skillTemplate','2976MGrBmf','json'];a362_0x2578=function(){return _0x10448b;};return a362_0x2578();}(function(_0x5dd810,_0x294fae){const _0x2b691e=a362_0x3904,_0x12cc83=_0x5dd810();while(!![]){try{const _0x465dbf=-parseInt(_0x2b691e(0x14b))/0x1*(parseInt(_0x2b691e(0x14a))/0x2)+parseInt(_0x2b691e(0x153))/0x3+parseInt(_0x2b691e(0x147))/0x4*(-parseInt(_0x2b691e(0x13e))/0x5)+-parseInt(_0x2b691e(0x159))/0x6*(-parseInt(_0x2b691e(0x14c))/0x7)+-parseInt(_0x2b691e(0x151))/0x8*(-parseInt(_0x2b691e(0x149))/0x9)+parseInt(_0x2b691e(0x142))/0xa+-parseInt(_0x2b691e(0x140))/0xb;if(_0x465dbf===_0x294fae)break;else _0x12cc83['push'](_0x12cc83['shift']());}catch(_0x5542f0){_0x12cc83['push'](_0x12cc83['shift']());}}}(a362_0x2578,0x74faf));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function a362_0x3904(_0x32ea33,_0x171343){_0x32ea33=_0x32ea33-0x13c;const _0x2578d8=a362_0x2578();let _0x3904f2=_0x2578d8[_0x32ea33];return _0x3904f2;}function getGuidesCdnUrl(){const _0x53e78a=a362_0x3904,_0xa97514=getTemplateBaseUrl();return _0xa97514+_0x53e78a(0x13d);}const CACHE_DIR=join(homedir(),a362_0x48d772(0x15d),'cache');export async function fetchGuidesFromCDN(){const _0x3b5e9f=a362_0x48d772,_0x43cf11=getGuidesCdnUrl(),_0x5d433b=await fetch(_0x43cf11,{'headers':{'Accept':_0x3b5e9f(0x146)}});if(!_0x5d433b['ok'])throw new Error(_0x3b5e9f(0x141)+_0x5d433b[_0x3b5e9f(0x15b)]+'\x20'+_0x5d433b[_0x3b5e9f(0x15e)]);const _0x3a6458=await _0x5d433b[_0x3b5e9f(0x152)]();if(!_0x3a6458[_0x3b5e9f(0x148)]||typeof _0x3a6458[_0x3b5e9f(0x148)]!==_0x3b5e9f(0x157))throw new Error(_0x3b5e9f(0x14e));return _0x3a6458;}export function writeGuidesToProject(_0x163841,_0x22ea2e,_0x3e5a78=a362_0x48d772(0x13f),_0x49a7db){const _0x335bc0=a362_0x48d772,_0x1cdd58=join(_0x22ea2e,_0x3e5a78);mkdirSync(_0x1cdd58,{'recursive':!![]});for(const [_0xc8ed63,_0x35a261]of Object[_0x335bc0(0x158)](_0x163841[_0x335bc0(0x148)])){let _0x43d31b=_0x35a261[_0x335bc0(0x155)];_0x35a261[_0x335bc0(0x15a)]&&(_0x43d31b=appendUpdateTime(_0x43d31b,_0x35a261[_0x335bc0(0x15a)])),writeFileSync(join(_0x1cdd58,_0xc8ed63+_0x335bc0(0x144)),_0x43d31b,_0x335bc0(0x154));}}export function appendUpdateTime(_0x390617,_0x52eca3){const _0xff5b80=a362_0x48d772;return _0x390617=_0x390617['replace'](/\n*>更新时间:.*$/m,''),_0x390617[_0xff5b80(0x145)]()+(_0xff5b80(0x15c)+_0x52eca3);}export function getSkillTemplate(_0x563dec){const _0x44c4e0=a362_0x48d772;return _0x563dec['skillTemplate']?.[_0x44c4e0(0x155)]||'';}export function appendExtendContents(_0x3ec575,_0x40d1de,_0x3d9d81){const _0x3f8f2d=a362_0x48d772,_0x61e69f=[];for(const [,_0x43479e]of Object[_0x3f8f2d(0x158)](_0x40d1de[_0x3f8f2d(0x148)])){_0x43479e[_0x3f8f2d(0x14d)]&&_0x61e69f[_0x3f8f2d(0x14f)](_0x43479e[_0x3f8f2d(0x14d)]['trimEnd']());}if(_0x61e69f[_0x3f8f2d(0x143)]===0x0)return _0x3ec575;return _0x3ec575[_0x3f8f2d(0x145)]()+'\x0a\x0a'+_0x61e69f[_0x3f8f2d(0x13c)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x38e813,_0x546860,_0x3c2a2e){const _0x18b59f=a362_0x48d772,_0xb8e6b6=getSkillTemplate(_0x38e813);if(!_0xb8e6b6)throw new Error('CDN\x20data\x20is\x20missing\x20skillTemplate');const _0x4dd3a7=dirname(_0x546860);mkdirSync(_0x4dd3a7,{'recursive':!![]});let _0x4a6533=_0xb8e6b6['replace'](/\{\{IDE_NAME\}\}/g,_0x3c2a2e);_0x4a6533=appendExtendContents(_0x4a6533,_0x38e813),_0x38e813['skillTemplate'][_0x18b59f(0x15a)]&&(_0x4a6533=appendUpdateTime(_0x4a6533,_0x38e813[_0x18b59f(0x150)][_0x18b59f(0x15a)])),writeFileSync(_0x546860,_0x4a6533,_0x18b59f(0x154));}export async function installGuides(_0x47ea03){const _0x119b8b=a362_0x48d772,_0x2cb221=await fetchGuidesFromCDN();return writeGuidesToProject(_0x2cb221,_0x47ea03),Object['keys'](_0x2cb221['guides'])[_0x119b8b(0x143)];}export function getGuidesSummary(_0x386fcc){const _0x48fe18=a362_0x48d772;return Object['entries'](_0x386fcc['guides'])[_0x48fe18(0x156)](([_0x49ed48,_0x2b6d17])=>({'key':_0x49ed48,'title':_0x2b6d17['title'],'path':_0x2b6d17['path']}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45deb8,_0x5aa8a3){const _0x32ac06=a363_0x2558,_0x16631d=_0x45deb8();while(!![]){try{const _0x4ede49=parseInt(_0x32ac06(0x155))/0x1*(-parseInt(_0x32ac06(0x15a))/0x2)+-parseInt(_0x32ac06(0x15d))/0x3*(-parseInt(_0x32ac06(0x158))/0x4)+-parseInt(_0x32ac06(0x16c))/0x5*(parseInt(_0x32ac06(0x150))/0x6)+parseInt(_0x32ac06(0x152))/0x7+-parseInt(_0x32ac06(0x15e))/0x8*(parseInt(_0x32ac06(0x153))/0x9)+-parseInt(_0x32ac06(0x159))/0xa*(-parseInt(_0x32ac06(0x169))/0xb)+parseInt(_0x32ac06(0x16a))/0xc*(-parseInt(_0x32ac06(0x15b))/0xd);if(_0x4ede49===_0x5aa8a3)break;else _0x16631d['push'](_0x16631d['shift']());}catch(_0x52785f){_0x16631d['push'](_0x16631d['shift']());}}}(a363_0x1f11,0xaa66d));function a363_0x2558(_0x4566ac,_0x35542b){_0x4566ac=_0x4566ac-0x14f;const _0x1f1155=a363_0x1f11();let _0x2558c1=_0x1f1155[_0x4566ac];return _0x2558c1;}function a363_0x1f11(){const _0x5ea109=['application/json','13345vCsSnT','includes','\x20in\x20','4CGFriA','6311030qPJSKP','16aOAAbU','13VDatBK','TypeError','3231279ECUHkZ','6712azxaow','abort','message','ms...','headers','ENOTFOUND','log','fetch','ECONNRESET','signal','text','22WrTwzW','11574036HTgADH','url','15IRqmwr','content-type','1200018YFCfdh','status','1983212JOJSnK','2718Bgwbgr'];a363_0x1f11=function(){return _0x5ea109;};return a363_0x1f11();}export async function httpRequest(_0x417b81,_0x314145={}){const _0x4be1c1=a363_0x2558,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x314145;let _0xa5b8a=null;for(let _0x57f4f5=0x0;_0x57f4f5<=retries;_0x57f4f5++){try{const _0x110c7a=new AbortController(),_0x5d76ad=setTimeout(()=>_0x110c7a[_0x4be1c1(0x15f)](),timeout),_0x320181=await fetch(_0x417b81,{'headers':headers,'signal':_0x110c7a[_0x4be1c1(0x167)]});clearTimeout(_0x5d76ad);let _0x4eb452;const _0x51669a=_0x320181[_0x4be1c1(0x162)]['get'](_0x4be1c1(0x14f));return _0x51669a?.[_0x4be1c1(0x156)](_0x4be1c1(0x154))?_0x4eb452=await _0x320181['json']():_0x4eb452=await _0x320181[_0x4be1c1(0x168)](),{'ok':_0x320181['ok'],'status':_0x320181[_0x4be1c1(0x151)],'statusText':_0x320181['statusText'],'data':_0x4eb452,'headers':_0x320181[_0x4be1c1(0x162)],'url':_0x320181[_0x4be1c1(0x16b)],'text':()=>_0x320181[_0x4be1c1(0x168)]()};}catch(_0x548b64){_0xa5b8a=_0x548b64 instanceof Error?_0x548b64:new Error(String(_0x548b64));if(_0x57f4f5===retries)break;if(shouldRetry(_0x548b64)){console[_0x4be1c1(0x164)]('*\x20Request\x20failed;\x20retry\x20'+(_0x57f4f5+0x1)+_0x4be1c1(0x157)+retryDelay+_0x4be1c1(0x161)),await sleep(retryDelay);continue;}else break;}}throw _0xa5b8a||new Error('Request\x20failed');}function shouldRetry(_0x508ca0){const _0x27c9ab=a363_0x2558;if(_0x508ca0 instanceof Error){if(_0x508ca0['name']==='AbortError')return![];if(_0x508ca0['name']===_0x27c9ab(0x15c)&&_0x508ca0[_0x27c9ab(0x160)][_0x27c9ab(0x156)](_0x27c9ab(0x165)))return!![];if(_0x508ca0['message'][_0x27c9ab(0x156)](_0x27c9ab(0x166)))return!![];if(_0x508ca0[_0x27c9ab(0x160)][_0x27c9ab(0x156)](_0x27c9ab(0x163)))return![];}return![];}function sleep(_0x876a20){return new Promise(_0x3302d4=>setTimeout(_0x3302d4,_0x876a20));}export function validateUrl(_0x3b3dd1){try{return new URL(_0x3b3dd1),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a364_0x5522(){const _0xdc464f=['4038dVoywN','868nXRZby','isRaw','stdin','1216266QXoPFo','nonInteractive','true','2294950XkRZzD','110650wFjfHB','40gQRzfa','2787906DBGZoQ','4736440YuHbar','331541IoWhxx','9hpjwBB','setRawMode','isTTY'];a364_0x5522=function(){return _0xdc464f;};return a364_0x5522();}(function(_0x26229d,_0x1719ab){const _0xc58524=a364_0x3913,_0x379e4e=_0x26229d();while(!![]){try{const _0x3f4542=parseInt(_0xc58524(0x14d))/0x1+parseInt(_0xc58524(0x149))/0x2+parseInt(_0xc58524(0x145))/0x3*(parseInt(_0xc58524(0x146))/0x4)+-parseInt(_0xc58524(0x14c))/0x5+parseInt(_0xc58524(0x14f))/0x6+-parseInt(_0xc58524(0x151))/0x7*(parseInt(_0xc58524(0x14e))/0x8)+parseInt(_0xc58524(0x152))/0x9*(-parseInt(_0xc58524(0x150))/0xa);if(_0x3f4542===_0x1719ab)break;else _0x379e4e['push'](_0x379e4e['shift']());}catch(_0x1cf412){_0x379e4e['push'](_0x379e4e['shift']());}}}(a364_0x5522,0x4ab93));function env(_0x2fc52b){return process.env[`RABETBASE_${_0x2fc52b}`]||process.env[`LOVRABET_${_0x2fc52b}`]||undefined;}function a364_0x3913(_0x2b55f0,_0x575c69){_0x2b55f0=_0x2b55f0-0x143;const _0x5522a4=a364_0x5522();let _0x3913b3=_0x5522a4[_0x2b55f0];return _0x3913b3;}export function isNonInteractive(_0xfef444){const _0x4000dc=a364_0x3913;return!!(_0xfef444[_0x4000dc(0x14a)]||_0xfef444['ci']||env('CI')===_0x4000dc(0x14b)||process.env.CI===_0x4000dc(0x14b)||!process['stdout'][_0x4000dc(0x144)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x29c172=a364_0x3913;if(!process[_0x29c172(0x148)][_0x29c172(0x144)])return![];try{const _0x178f20=process[_0x29c172(0x148)][_0x29c172(0x147)];return process[_0x29c172(0x148)][_0x29c172(0x143)](!![]),process['stdin'][_0x29c172(0x143)](_0x178f20??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a365_0x29c884=a365_0x375b;(function(_0x504b90,_0x42534b){const _0x22e141=a365_0x375b,_0x434e3e=_0x504b90();while(!![]){try{const _0x58999f=-parseInt(_0x22e141(0xe1))/0x1*(parseInt(_0x22e141(0xe0))/0x2)+parseInt(_0x22e141(0xda))/0x3+parseInt(_0x22e141(0xec))/0x4*(-parseInt(_0x22e141(0xde))/0x5)+-parseInt(_0x22e141(0xf7))/0x6*(parseInt(_0x22e141(0xd8))/0x7)+parseInt(_0x22e141(0xea))/0x8+parseInt(_0x22e141(0xbf))/0x9*(-parseInt(_0x22e141(0xf1))/0xa)+parseInt(_0x22e141(0xe4))/0xb;if(_0x58999f===_0x42534b)break;else _0x434e3e['push'](_0x434e3e['shift']());}catch(_0x3d250b){_0x434e3e['push'](_0x434e3e['shift']());}}}(a365_0xca99,0x96b82));import a365_0x82fa0d from'winston';import a365_0x333cc6 from'node:fs';function a365_0x375b(_0x4d4e43,_0x4a3884){_0x4d4e43=_0x4d4e43-0xbf;const _0xca99e4=a365_0xca99();let _0x375bf7=_0xca99e4[_0x4d4e43];return _0x375bf7;}import a365_0x56505c from'node:path';class Logger{[a365_0x29c884(0xe7)];[a365_0x29c884(0xf6)];[a365_0x29c884(0xeb)]='';constructor(){const _0x2b97bb=a365_0x29c884;this[_0x2b97bb(0xf6)]='';}['setRawCommand'](_0x28b24c){const _0x34ce73=a365_0x29c884;this[_0x34ce73(0xeb)]=_0x28b24c;}[a365_0x29c884(0xd3)](){const _0x259531=a365_0x29c884,_0xa9ea84=a365_0x56505c[_0x259531(0xc3)](this[_0x259531(0xf6)]);!a365_0x333cc6[_0x259531(0xef)](_0xa9ea84)&&a365_0x333cc6[_0x259531(0xce)](_0xa9ea84,{'recursive':!![]});const _0x26abf4=a365_0x82fa0d[_0x259531(0xc8)][_0x259531(0xe8)](a365_0x82fa0d['format'][_0x259531(0xed)](),a365_0x82fa0d[_0x259531(0xc8)][_0x259531(0xc5)]({'stack':!![]}),a365_0x82fa0d[_0x259531(0xc8)]['printf'](_0x5f4b76=>{const _0x31dcc6=_0x259531,_0x37ff2a={'timestamp':_0x5f4b76['timestamp']||new Date()[_0x31dcc6(0xdd)](),'level':_0x5f4b76[_0x31dcc6(0xcf)]||_0x31dcc6(0xdf),'command':_0x5f4b76[_0x31dcc6(0xd2)]||_0x31dcc6(0xf2),'rawCommand':_0x5f4b76[_0x31dcc6(0xd9)]||this[_0x31dcc6(0xeb)]||undefined,'message':_0x5f4b76['message']||'','duration':_0x5f4b76[_0x31dcc6(0xe3)]||undefined,'details':_0x5f4b76[_0x31dcc6(0xd6)]||undefined};return JSON[_0x31dcc6(0xf5)](_0x37ff2a);}));this['winstonLogger']=a365_0x82fa0d[_0x259531(0xcd)]({'level':_0x259531(0xdf),'format':_0x26abf4,'transports':[new a365_0x82fa0d['transports'][(_0x259531(0xe9))]({'filename':this[_0x259531(0xf6)],'level':_0x259531(0xdf)})],'silent':![]}),a365_0x82fa0d[_0x259531(0xf0)]({'success':_0x259531(0xd1),'error':_0x259531(0xc4),'warn':_0x259531(0xc9),'info':_0x259531(0xee)});}['setLogPath'](_0x36040a){const _0x5cff1f=a365_0x29c884;this[_0x5cff1f(0xf6)]=a365_0x56505c[_0x5cff1f(0xdc)](_0x36040a,'.lovrabet.log'),this['winstonLogger']&&this['winstonLogger']['clear'](),this[_0x5cff1f(0xd3)]();}[a365_0x29c884(0xdf)](_0x619285,_0x3b1548,_0x5caf05){const _0x1f34f3=a365_0x29c884;if(!this['logFilePath']||!this['winstonLogger'])return;this['winstonLogger'][_0x1f34f3(0xdf)](_0x3b1548,{'command':_0x619285,'details':_0x5caf05});}[a365_0x29c884(0xcb)](_0x2cbf6a,_0x3db9d3,_0x78150d,_0x8dd6d5){const _0x7061d6=a365_0x29c884;if(!this[_0x7061d6(0xf6)]||!this[_0x7061d6(0xe7)])return;this[_0x7061d6(0xe7)][_0x7061d6(0xdb)](_0x7061d6(0xdf),_0x3db9d3,{'level':_0x7061d6(0xcb),'command':_0x2cbf6a,'duration':_0x78150d,'details':_0x8dd6d5});}[a365_0x29c884(0xca)](_0x41c6c7,_0x17f649,_0x426f63){const _0xdb52c0=a365_0x29c884;if(!this[_0xdb52c0(0xf6)]||!this['winstonLogger'])return;this['winstonLogger'][_0xdb52c0(0xca)](_0x17f649,{'command':_0x41c6c7,'details':_0x426f63});}[a365_0x29c884(0xc7)](_0x408839,_0x517acf,_0x15ffa2){const _0x25e27e=a365_0x29c884;if(!this['logFilePath']||!this[_0x25e27e(0xe7)])return;this[_0x25e27e(0xe7)][_0x25e27e(0xc7)](_0x517acf,{'command':_0x408839,'details':_0x15ffa2});}async[a365_0x29c884(0xc1)](_0x13a250,_0x48022f,_0x23b3b2){const _0x89562d=a365_0x29c884,_0x93ce03=Date['now']();this[_0x89562d(0xdf)](_0x13a250,_0x89562d(0xd7)+_0x48022f);try{const _0xbe391e=await _0x23b3b2(),_0x119e69=Date[_0x89562d(0xe2)]()-_0x93ce03;return this[_0x89562d(0xcb)](_0x13a250,_0x89562d(0xd5)+_0x48022f,_0x119e69),_0xbe391e;}catch(_0x5222ad){const _0x4e279c=Date[_0x89562d(0xe2)]()-_0x93ce03;this['error'](_0x13a250,_0x89562d(0xd0)+_0x48022f,{'error':_0x5222ad instanceof Error?_0x5222ad[_0x89562d(0xe5)]:String(_0x5222ad),'duration':_0x4e279c});throw _0x5222ad;}}['readLogs'](){const _0x26b996=a365_0x29c884;try{if(!a365_0x333cc6[_0x26b996(0xef)](this['logFilePath']))return[];const _0x54ba84=a365_0x333cc6[_0x26b996(0xcc)](this[_0x26b996(0xf6)],_0x26b996(0xd4));return _0x54ba84[_0x26b996(0xf3)]('\x0a')[_0x26b996(0xc2)](_0x51b1a0=>_0x51b1a0[_0x26b996(0xc6)]())['map'](_0x576d1d=>JSON['parse'](_0x576d1d));}catch(_0x1a3e62){return console[_0x26b996(0xc7)](_0x26b996(0xc0),_0x1a3e62),[];}}[a365_0x29c884(0xf8)](){const _0x213655=a365_0x29c884;try{a365_0x333cc6[_0x213655(0xef)](this[_0x213655(0xf6)])&&a365_0x333cc6[_0x213655(0xf4)](this['logFilePath'],'',_0x213655(0xd4));}catch(_0x385bad){console['warn'](_0x213655(0xe6),_0x385bad);}}['getWinstonInstance'](){const _0x89108e=a365_0x29c884;return this[_0x89108e(0xe7)];}}function a365_0xca99(){const _0x105d26=['toISOString','10GYVhqA','info','46GbZvlj','35671AvlMkg','now','duration','28572841GwZAxz','message','Failed\x20to\x20clear\x20logs:','winstonLogger','combine','File','4777048ZSzCYy','currentRawCommand','2160276mgAivw','timestamp','blue','existsSync','addColors','190THkONl','unknown','split','writeFileSync','stringify','logFilePath','372wFQvdp','clearLogs','164682fxmlGc','Failed\x20to\x20read\x20logs:','logTask','filter','dirname','red','errors','trim','warn','format','yellow','error','success','readFileSync','createLogger','mkdirSync','level','Failed:\x20','green','command','initWinstonLogger','utf8','Completed:\x20','details','Starting:\x20','129773kkoZVB','rawCommand','2461005LSwLHM','log','join'];a365_0xca99=function(){return _0x105d26;};return a365_0xca99();}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2de252,_0x3f1bb4){const _0x48ccaa=a366_0x58af,_0x3174f4=_0x2de252();while(!![]){try{const _0x3d896e=parseInt(_0x48ccaa(0xe3))/0x1*(-parseInt(_0x48ccaa(0xf3))/0x2)+parseInt(_0x48ccaa(0xeb))/0x3*(parseInt(_0x48ccaa(0xe2))/0x4)+parseInt(_0x48ccaa(0xe8))/0x5*(parseInt(_0x48ccaa(0xe1))/0x6)+-parseInt(_0x48ccaa(0xe7))/0x7*(-parseInt(_0x48ccaa(0xf1))/0x8)+parseInt(_0x48ccaa(0xef))/0x9+-parseInt(_0x48ccaa(0xe5))/0xa+parseInt(_0x48ccaa(0xe9))/0xb*(-parseInt(_0x48ccaa(0xed))/0xc);if(_0x3d896e===_0x3f1bb4)break;else _0x3174f4['push'](_0x3174f4['shift']());}catch(_0x5a9b24){_0x3174f4['push'](_0x3174f4['shift']());}}}(a366_0x28dd,0xc3823));function a366_0x28dd(){const _0x1fa53d=['5764797MDkvBd','object','2168072JUiSYn','Invalid\x20JSON\x20for\x20--params:\x20','1791914qrpqhH','5170398wlitls','404xgNlZG','1ZpNTwL','--params\x20must\x20be\x20a\x20JSON\x20object','11745980jrEYNe','parse','21lBYEJJ','5DtJGTV','176LzYYwd','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','18519zhIHog','validation','50556ORVrnf','isArray'];a366_0x28dd=function(){return _0x1fa53d;};return a366_0x28dd();}import{CliErrors}from'../errors.js';function a366_0x58af(_0xc7b605,_0x4c3e6b){_0xc7b605=_0xc7b605-0xe1;const _0x28dd69=a366_0x28dd();let _0x58af90=_0x28dd69[_0xc7b605];return _0x58af90;}export function parseJsonParams(_0x16d920){const _0xe5d723=a366_0x58af;if(!_0x16d920)return undefined;let _0x1d1565;try{_0x1d1565=JSON[_0xe5d723(0xe6)](_0x16d920);}catch{throw CliErrors[_0xe5d723(0xec)](_0xe5d723(0xf2)+_0x16d920);}if(!_0x1d1565||typeof _0x1d1565!==_0xe5d723(0xf0)||Array[_0xe5d723(0xee)](_0x1d1565))throw CliErrors[_0xe5d723(0xec)](_0xe5d723(0xe4),_0xe5d723(0xea));return _0x1d1565;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a367_0x5af68e=a367_0x2ce6;function a367_0x2ce6(_0x7d3258,_0x290d93){_0x7d3258=_0x7d3258-0xc5;const _0x796f89=a367_0x796f();let _0x2ce67c=_0x796f89[_0x7d3258];return _0x2ce67c;}(function(_0x93bb86,_0x4e3eb5){const _0x20b86a=a367_0x2ce6,_0x3069c5=_0x93bb86();while(!![]){try{const _0x4069b9=-parseInt(_0x20b86a(0xd1))/0x1*(parseInt(_0x20b86a(0xd2))/0x2)+-parseInt(_0x20b86a(0xcc))/0x3*(-parseInt(_0x20b86a(0xcf))/0x4)+-parseInt(_0x20b86a(0xd0))/0x5+parseInt(_0x20b86a(0xc6))/0x6*(-parseInt(_0x20b86a(0xcd))/0x7)+parseInt(_0x20b86a(0xc9))/0x8*(-parseInt(_0x20b86a(0xcb))/0x9)+-parseInt(_0x20b86a(0xca))/0xa+-parseInt(_0x20b86a(0xc5))/0xb*(-parseInt(_0x20b86a(0xce))/0xc);if(_0x4069b9===_0x4e3eb5)break;else _0x3069c5['push'](_0x3069c5['shift']());}catch(_0x12922d){_0x3069c5['push'](_0x3069c5['shift']());}}}(a367_0x796f,0xe2602));export const isWindows=process[a367_0x5af68e(0xc8)]===a367_0x5af68e(0xc7);export function resolveNpmBin(_0x1fe471){const _0x4ed63c=a367_0x5af68e;return isWindows?_0x1fe471+_0x4ed63c(0xd3):_0x1fe471;}function a367_0x796f(){const _0xefc060=['18417tBmAQI','8569722ibveQk','756EDiFyD','648pKZOwM','5995520lDNazn','4703hGEoRa','696GUCrTi','.cmd','884213ZbxinG','6PmvlGV','win32','platform','4657112ZRvjOW','4892800KTeUKB','9tYtqzu'];a367_0x796f=function(){return _0xefc060;};return a367_0x796f();}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x47cd06){return new Promise(_0x421ce3=>setTimeout(_0x421ce3,_0x47cd06));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a369_0x58d35f=a369_0x26ab;(function(_0x1e6e8d,_0x4b4940){const _0x46c3c9=a369_0x26ab,_0x2f9e4c=_0x1e6e8d();while(!![]){try{const _0x57b617=parseInt(_0x46c3c9(0x118))/0x1+-parseInt(_0x46c3c9(0x119))/0x2+-parseInt(_0x46c3c9(0x111))/0x3+parseInt(_0x46c3c9(0x101))/0x4+-parseInt(_0x46c3c9(0xda))/0x5+parseInt(_0x46c3c9(0xe7))/0x6*(parseInt(_0x46c3c9(0xe5))/0x7)+parseInt(_0x46c3c9(0x103))/0x8;if(_0x57b617===_0x4b4940)break;else _0x2f9e4c['push'](_0x2f9e4c['shift']());}catch(_0x18ed05){_0x2f9e4c['push'](_0x2f9e4c['shift']());}}}(a369_0x5c3b,0xb757e));function a369_0x26ab(_0x3677b7,_0x513612){_0x3677b7=_0x3677b7-0xd9;const _0x5c3b10=a369_0x5c3b();let _0x26ab85=_0x5c3b10[_0x3677b7];return _0x26ab85;}import a369_0x175f06 from'node:fs';import a369_0x30e280 from'node:path';import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';function a369_0x5c3b(){const _0x1c12b8=['toComponentName','info','formatLocalTimestamp','datasetCode','success','pop','.json','tableName:\x20\x22','.css','toUpperCase','mkdir','.tsx','map','3516132THsOmx','name','replace','processFile','name:\x20\x22','replaceApiContent','isFile','593629yLlvaE','2038698zmjzTn','slice','toDisplayTitle','.scss','4246010HaHStO','Starting\x20template\x20content\x20replacement','Template\x20content\x20replacement\x20completed','getDate','pad','processDirectory','split','api','alias','join','replaceContent','3029243qfGiCU','Template\x20content\x20replacement\x20failed','6dMcmqA','utf8','tableName','toLowerCase','extname','default','promises','push','writeFile','getHours','copyFile','endsWith','charAt','toISOString','.jsx','sdk-config','processTemplate','\x0a\x20\x20\x20\x20{\x20','getFullYear','YourModel','.js','template','alias:\x20\x22','.tpl','.ts','padStart','5523512hzyXge','now','11074504oeLJFm'];a369_0x5c3b=function(){return _0x1c12b8;};return a369_0x5c3b();}const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a369_0x58d35f(0xde)](_0x224dae){const _0x5e8275=a369_0x58d35f;return String(_0x224dae)[_0x5e8275(0x100)](0x2,'0');}static[a369_0x58d35f(0x106)](_0xafd999){const _0x586c0f=a369_0x58d35f,_0x9585ad=_0xafd999[_0x586c0f(0xf9)](),_0x3d6865=this['pad'](_0xafd999['getMonth']()+0x1),_0x54a0e6=this[_0x586c0f(0xde)](_0xafd999[_0x586c0f(0xdd)]()),_0x114bf5=this[_0x586c0f(0xde)](_0xafd999[_0x586c0f(0xf0)]()),_0x59c772=this['pad'](_0xafd999['getMinutes']()),_0x35da83=this['pad'](_0xafd999['getSeconds']());return{'createdAt':_0x9585ad+'-'+_0x3d6865+'-'+_0x54a0e6+'\x20'+_0x114bf5+':'+_0x59c772+':'+_0x35da83,'createdDate':_0x9585ad+'-'+_0x3d6865+'-'+_0x54a0e6,'createdTime':_0x114bf5+':'+_0x59c772+':'+_0x35da83};}static[a369_0x58d35f(0x104)](_0x19eab9){const _0x4ca56f=a369_0x58d35f,_0x2abdf7=_0x19eab9['split']('/')[_0x4ca56f(0x109)]()||_0x19eab9;return _0x2abdf7[_0x4ca56f(0xe0)]('-')['map'](_0x3b69b6=>_0x3b69b6[_0x4ca56f(0xf3)](0x0)[_0x4ca56f(0x10d)]()+_0x3b69b6['slice'](0x1)[_0x4ca56f(0xea)]())['join']('');}static[a369_0x58d35f(0x11b)](_0xa95641){const _0xd1f0ee=a369_0x58d35f,_0x611b11=_0xa95641[_0xd1f0ee(0xe0)]('/')['pop']()||_0xa95641;return _0x611b11[_0xd1f0ee(0xe0)]('-')[_0xd1f0ee(0x110)](_0x106ea5=>_0x106ea5[_0xd1f0ee(0xf3)](0x0)['toUpperCase']()+_0x106ea5[_0xd1f0ee(0x11a)](0x1)[_0xd1f0ee(0xea)]())[_0xd1f0ee(0xe3)]('\x20');}static[a369_0x58d35f(0xe4)](_0xd04211,_0x1641ad,_0x24dd66){const _0x1d29f3=a369_0x58d35f,_0xe56806=this[_0x1d29f3(0x104)](_0x1641ad),_0x3a5204=this[_0x1d29f3(0x11b)](_0x1641ad),{createdAt:_0x271b1f,createdDate:_0x49d68d,createdTime:_0x36f612}=this['formatLocalTimestamp'](new Date());let _0x1f6200=_0xd04211[_0x1d29f3(0x113)](/\{CliVersion\}/g,CLI_VERSION)[_0x1d29f3(0x113)](/\{ComponentName\}/g,_0xe56806)[_0x1d29f3(0x113)](/\{DisplayTitle\}/g,_0x3a5204)['replace'](/\{PageName\}/g,_0x1641ad)[_0x1d29f3(0x113)](/\{TemplateName\}/g,_0x24dd66)['replace'](/\{CreatedAt\}/g,_0x271b1f)[_0x1d29f3(0x113)](/\{CreatedDate\}/g,_0x49d68d)[_0x1d29f3(0x113)](/\{CreatedTime\}/g,_0x36f612);return _0x1f6200;}static[a369_0x58d35f(0x116)](_0x253a26,_0x48ff9f,_0x4127d8,_0x387e64,_0x15c41c,_0x44f747,_0x13a250,_0xade5f6,_0x455209){const _0x40f749=a369_0x58d35f,_0x1ad475=new Date(),_0x34a06f=_0x1ad475[_0x40f749(0xf4)](),_0x1c786f=_0x4127d8[_0x40f749(0x110)](_0x5e3bab=>{const _0x4f3ac9=_0x40f749,_0x3f3c5c=['datasetCode:\x20\x22'+_0x5e3bab[_0x4f3ac9(0x107)]+'\x22',_0x4f3ac9(0x10b)+_0x5e3bab[_0x4f3ac9(0xe9)]+'\x22',_0x4f3ac9(0x115)+_0x5e3bab[_0x4f3ac9(0x112)]+'\x22'];return _0x5e3bab[_0x4f3ac9(0xe2)]&&_0x3f3c5c[_0x4f3ac9(0xee)](_0x4f3ac9(0xfd)+_0x5e3bab['alias']+'\x22'),_0x4f3ac9(0xf8)+_0x3f3c5c['join'](',\x20')+'\x20},';})[_0x40f749(0xe3)](''),_0x32e1e3=_0x387e64||_0x4127d8[0x0]?.[_0x40f749(0xe2)]||_0x40f749(0xfa);let _0x26d999=_0x253a26[_0x40f749(0x113)](/\{AppCode\}/g,_0x48ff9f)['replace'](/\{ModelConfigs\}/g,_0x1c786f)[_0x40f749(0x113)](/\{ExampleModelName\}/g,_0x32e1e3)[_0x40f749(0x113)](/\{ApiFileName\}/g,_0x15c41c||_0x40f749(0xe1))[_0x40f749(0x113)](/\{ConfigName\}/g,_0x44f747||_0x40f749(0xec))[_0x40f749(0x113)](/\{ClientConfigParam\}/g,_0x13a250||'')[_0x40f749(0x113)](/\{SdkConfigFileName\}/g,_0x455209||_0x40f749(0xf6))['replace'](/\{VarPrefix\}/g,_0xade5f6||'LOVRABET')[_0x40f749(0x113)](/\{CreatedAt\}/g,_0x34a06f);return _0x26d999;}static async[a369_0x58d35f(0xf7)](_0x545d57,_0x7f26fc,_0x1b1779,_0x28e000,_0x2d4466=!![]){const _0x492556=a369_0x58d35f,_0x597db0=Date[_0x492556(0x102)]();try{_0x2d4466&&logger[_0x492556(0x105)](_0x492556(0xfc),_0x492556(0xdb),{'templatePath':_0x545d57,'targetPath':_0x7f26fc,'pageName':_0x1b1779,'templateName':_0x28e000});await a369_0x175f06[_0x492556(0xed)]['mkdir'](_0x7f26fc,{'recursive':!![]}),await this[_0x492556(0xdf)](_0x545d57,_0x7f26fc,_0x1b1779,_0x28e000);if(_0x2d4466){const _0x2aebc0=Date[_0x492556(0x102)]()-_0x597db0;logger[_0x492556(0x108)]('template',_0x492556(0xdc),_0x2aebc0,{'pageName':_0x1b1779,'templateName':_0x28e000});}}catch(_0x2aa0e4){if(_0x2d4466){const _0x161403=Date[_0x492556(0x102)]()-_0x597db0;logger['error'](_0x492556(0xfc),_0x492556(0xe6),{'templatePath':_0x545d57,'targetPath':_0x7f26fc,'pageName':_0x1b1779,'templateName':_0x28e000,'error':_0x2aa0e4 instanceof Error?_0x2aa0e4['message']:String(_0x2aa0e4),'duration':_0x161403});}throw _0x2aa0e4;}}static async['processDirectory'](_0x3aa694,_0x4e3f3f,_0x32467e,_0x1fb384){const _0x59bfbf=a369_0x58d35f,_0x176811=await a369_0x175f06[_0x59bfbf(0xed)]['readdir'](_0x3aa694,{'withFileTypes':!![]});for(const _0x1cca8b of _0x176811){const _0xdb43b9=a369_0x30e280[_0x59bfbf(0xe3)](_0x3aa694,_0x1cca8b[_0x59bfbf(0x112)]);let _0x176201=a369_0x30e280['join'](_0x4e3f3f,_0x1cca8b[_0x59bfbf(0x112)]);_0x1cca8b['name']['endsWith'](_0x59bfbf(0xfe))&&(_0x176201=a369_0x30e280['join'](_0x4e3f3f,_0x1cca8b[_0x59bfbf(0x112)][_0x59bfbf(0x113)](/\.tpl$/,'')));if(_0x1cca8b['isDirectory']())await a369_0x175f06[_0x59bfbf(0xed)][_0x59bfbf(0x10e)](_0x176201,{'recursive':!![]}),await this['processDirectory'](_0xdb43b9,_0x176201,_0x32467e,_0x1fb384);else _0x1cca8b[_0x59bfbf(0x117)]()&&await this['processFile'](_0xdb43b9,_0x176201,_0x32467e,_0x1fb384);}}static async[a369_0x58d35f(0x114)](_0x1e07fd,_0x3f0fc1,_0x55f022,_0x8d978e){const _0x2e8ff0=a369_0x58d35f,_0xcc6abd=a369_0x30e280[_0x2e8ff0(0xeb)](_0x1e07fd)[_0x2e8ff0(0xea)]();_0x1e07fd[_0x2e8ff0(0xf2)](_0x2e8ff0(0xfe))&&(_0x3f0fc1=_0x3f0fc1[_0x2e8ff0(0x113)](/\.tpl$/,''));const _0x25dddf=[_0x2e8ff0(0x10f),_0x2e8ff0(0xff),_0x2e8ff0(0xf5),_0x2e8ff0(0xfb),_0x2e8ff0(0x10a),'.md',_0x2e8ff0(0x10c),_0x2e8ff0(0xd9),_0x2e8ff0(0xfe)];if(_0x25dddf['includes'](_0xcc6abd)||_0x1e07fd[_0x2e8ff0(0xf2)](_0x2e8ff0(0xfe))){const _0x1148d7=await a369_0x175f06['promises']['readFile'](_0x1e07fd,_0x2e8ff0(0xe8)),_0x3f6ab6=this[_0x2e8ff0(0xe4)](_0x1148d7,_0x55f022,_0x8d978e);await a369_0x175f06[_0x2e8ff0(0xed)][_0x2e8ff0(0xef)](_0x3f0fc1,_0x3f6ab6,_0x2e8ff0(0xe8));}else await a369_0x175f06['promises'][_0x2e8ff0(0xf1)](_0x1e07fd,_0x3f0fc1);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x334f62,_0x4e3a88){const _0xb8f1f3=a370_0x3c50,_0x257aa2=_0x334f62();while(!![]){try{const _0x48baa9=parseInt(_0xb8f1f3(0x1fe))/0x1*(-parseInt(_0xb8f1f3(0x1f5))/0x2)+parseInt(_0xb8f1f3(0x1fb))/0x3*(parseInt(_0xb8f1f3(0x1ea))/0x4)+-parseInt(_0xb8f1f3(0x1fc))/0x5*(-parseInt(_0xb8f1f3(0x1e7))/0x6)+-parseInt(_0xb8f1f3(0x1f1))/0x7*(-parseInt(_0xb8f1f3(0x1df))/0x8)+parseInt(_0xb8f1f3(0x1e3))/0x9+parseInt(_0xb8f1f3(0x1ec))/0xa+-parseInt(_0xb8f1f3(0x1f0))/0xb*(parseInt(_0xb8f1f3(0x1eb))/0xc);if(_0x48baa9===_0x4e3a88)break;else _0x257aa2['push'](_0x257aa2['shift']());}catch(_0x2a7e72){_0x257aa2['push'](_0x257aa2['shift']());}}}(a370_0x1a73,0x428f0));import{mkdir,readFile,writeFile}from'node:fs/promises';function a370_0x3c50(_0x46a200,_0xd92050){_0x46a200=_0x46a200-0x1df;const _0x1a73f0=a370_0x1a73();let _0x3c50a4=_0x1a73f0[_0x46a200];return _0x3c50a4;}import{homedir}from'node:os';import{dirname,join}from'node:path';import a370_0x234d29 from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x18cf5b=a370_0x3c50,_0xbe10d5=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x18cf5b(0x1fa)]()[_0x18cf5b(0x1e0)]();return _0xbe10d5==='1'||_0xbe10d5==='true'||_0xbe10d5===_0x18cf5b(0x1e2);}function cacheRoot(){const _0x52cc92=a370_0x3c50;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x52cc92(0x1e8));}export function getUpdateNoticeCachePath(){const _0x4c3b85=a370_0x3c50;return join(cacheRoot(),_0x4c3b85(0x1e6),'update-check.json');}async function readUpdateNoticeCache(){const _0x408c0b=a370_0x3c50;try{const _0x4328e0=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x3cc19d=JSON[_0x408c0b(0x1f9)](_0x4328e0);if(!_0x3cc19d||typeof _0x3cc19d!=='object')return{};return _0x3cc19d;}catch{return{};}}async function writeUpdateNoticeCache(_0x99592b){const _0x131bdc=a370_0x3c50;try{const _0x284921=getUpdateNoticeCachePath();await mkdir(dirname(_0x284921),{'recursive':!![]}),await writeFile(_0x284921,JSON['stringify'](_0x99592b,null,0x2)+'\x0a',_0x131bdc(0x1e9));}catch{}}function isFreshCheck(_0x13cfd0,_0x100024){const _0x512be7=a370_0x3c50;return typeof _0x13cfd0[_0x512be7(0x1f8)]==='number'&&_0x100024-_0x13cfd0[_0x512be7(0x1f8)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x22f16a,_0x39c12e,_0x2590fa){const _0x577745=a370_0x3c50;return _0x22f16a[_0x577745(0x1f3)]===_0x39c12e&&typeof _0x22f16a[_0x577745(0x1ef)]===_0x577745(0x1f6)&&_0x2590fa-_0x22f16a[_0x577745(0x1ef)]<UPDATE_NOTICE_TTL_MS;}function a370_0x1a73(){const _0x1ccf28=['.cache','utf8','13252qrdIhA','723276wpPvjE','5097050AXCKMS','gte','\x20update','lastNotifiedAt','99akFmtf','19019uOPRwU','valid','lastNotifiedVersion','\x20available,\x20current\x20','86UJUxMm','number','now','checkedAt','parse','trim','39yEwAue','60460wQLZvz','latest','11841DKswar',',\x20run:\x20','144MSWdHl','toLowerCase','stableVersion','yes','2149956YOuXWm','https://www.npmjs.com/package/','/v/','rabetbase-cli','240SzvlHr'];a370_0x1a73=function(){return _0x1ccf28;};return a370_0x1a73();}export function buildNpmVersionUrl(_0x42e15e){const _0x51546c=a370_0x3c50;return _0x51546c(0x1e4)+NPM_PACKAGE_NAME+_0x51546c(0x1e5)+_0x42e15e;}export async function resolveLatestUpdateNotice(){const _0xe0ca47=a370_0x3c50;if(isUpdateNoticeDisabled())return null;try{const _0x36bf6c=Date[_0xe0ca47(0x1f7)](),_0x323a7f=getCliVersion(),_0x29f114=await readUpdateNoticeCache();let _0xc1d787=isFreshCheck(_0x29f114,_0x36bf6c)?_0x29f114[_0xe0ca47(0x1fd)]?.[_0xe0ca47(0x1fa)]():undefined;if(!_0xc1d787&&!isFreshCheck(_0x29f114,_0x36bf6c)){const _0x422410=await getCliVersionPolicy();_0xc1d787=_0x422410?.[_0xe0ca47(0x1e1)]?.[_0xe0ca47(0x1fa)]()||undefined,await writeUpdateNoticeCache({..._0x29f114,'checkedAt':_0x36bf6c,'latest':_0xc1d787,'failed':!_0xc1d787});}if(!_0xc1d787||!a370_0x234d29[_0xe0ca47(0x1f2)](_0x323a7f)||!a370_0x234d29[_0xe0ca47(0x1f2)](_0xc1d787))return null;if(a370_0x234d29[_0xe0ca47(0x1ed)](_0x323a7f,_0xc1d787))return null;if(isRecentlyNotified(_0x29f114,_0xc1d787,_0x36bf6c))return null;const _0x288b37=CLI_BIN_NAME+_0xe0ca47(0x1ee);return await writeUpdateNoticeCache({..._0x29f114,'checkedAt':isFreshCheck(_0x29f114,_0x36bf6c)?_0x29f114[_0xe0ca47(0x1f8)]:_0x36bf6c,'latest':_0xc1d787,'failed':![],'lastNotifiedVersion':_0xc1d787,'lastNotifiedAt':_0x36bf6c}),{'command':_0x288b37,'current':_0x323a7f,'latest':_0xc1d787,'url':buildNpmVersionUrl(_0xc1d787),'message':CLI_BIN_NAME+'\x20'+_0xc1d787+_0xe0ca47(0x1f4)+_0x323a7f+_0xe0ca47(0x1ff)+_0x288b37};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a371_0x6338(_0x20120e,_0x40b6e8){_0x20120e=_0x20120e-0x15a;var _0x10eee4=a371_0x10ee();var _0x6338d0=_0x10eee4[_0x20120e];return _0x6338d0;}(function(_0x534f4e,_0x1308f8){var _0x4c7a35=a371_0x6338,_0x5699dd=_0x534f4e();while(!![]){try{var _0xa1d066=-parseInt(_0x4c7a35(0x15d))/0x1+-parseInt(_0x4c7a35(0x160))/0x2*(parseInt(_0x4c7a35(0x163))/0x3)+-parseInt(_0x4c7a35(0x15a))/0x4*(-parseInt(_0x4c7a35(0x162))/0x5)+-parseInt(_0x4c7a35(0x15f))/0x6+parseInt(_0x4c7a35(0x15c))/0x7*(parseInt(_0x4c7a35(0x161))/0x8)+-parseInt(_0x4c7a35(0x15e))/0x9+parseInt(_0x4c7a35(0x15b))/0xa;if(_0xa1d066===_0x1308f8)break;else _0x5699dd['push'](_0x5699dd['shift']());}catch(_0x4b00ae){_0x5699dd['push'](_0x5699dd['shift']());}}}(a371_0x10ee,0x54490));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a371_0x10ee(){var _0x2e4a4a=['441835RekdDE','12ktqVKX','8vXxDlP','11602430dvTYsi','1152347FwEwgr','422311HyXxYv','269595nejHek','3221904FWlapz','83558EyMnDB','8lmPCVT'];a371_0x10ee=function(){return _0x2e4a4a;};return a371_0x10ee();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a372_0x39cf(_0x29cb77,_0xd817b6){_0x29cb77=_0x29cb77-0x1a2;var _0x29aa73=a372_0x29aa();var _0x39cfca=_0x29aa73[_0x29cb77];return _0x39cfca;}function a372_0x29aa(){var _0x31a4dc=['18800LTgrXB','1158426AEquNB','1001AIbTUE','13198wJRley','16cGxvkY','126448Qlqiuf','1220784LaeZEk','1587880VutwQd','30THwKQi','84xTLEOu','293568FYyPTU'];a372_0x29aa=function(){return _0x31a4dc;};return a372_0x29aa();}(function(_0x2c5068,_0x163453){var _0x2a6fe3=a372_0x39cf,_0x7cf07a=_0x2c5068();while(!![]){try{var _0x36b00d=-parseInt(_0x2a6fe3(0x1a6))/0x1+parseInt(_0x2a6fe3(0x1aa))/0x2*(-parseInt(_0x2a6fe3(0x1a5))/0x3)+-parseInt(_0x2a6fe3(0x1ac))/0x4*(-parseInt(_0x2a6fe3(0x1a4))/0x5)+-parseInt(_0x2a6fe3(0x1a2))/0x6+parseInt(_0x2a6fe3(0x1a3))/0x7+-parseInt(_0x2a6fe3(0x1ab))/0x8*(-parseInt(_0x2a6fe3(0x1a8))/0x9)+parseInt(_0x2a6fe3(0x1a7))/0xa*(parseInt(_0x2a6fe3(0x1a9))/0xb);if(_0x36b00d===_0x163453)break;else _0x7cf07a['push'](_0x7cf07a['shift']());}catch(_0x642781){_0x7cf07a['push'](_0x7cf07a['shift']());}}}(a372_0x29aa,0x27d90));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x5dc2bb,_0x155a3f){setActiveCookie(_0x5dc2bb);try{return await _0x155a3f();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a373_0x2608(_0xcf9c85,_0x28a479){_0xcf9c85=_0xcf9c85-0x6a;var _0x23d3b3=a373_0x23d3();var _0x2608c4=_0x23d3b3[_0xcf9c85];return _0x2608c4;}(function(_0xb23315,_0x2cc01a){var _0x67fe22=a373_0x2608,_0x3746a5=_0xb23315();while(!![]){try{var _0x378e75=-parseInt(_0x67fe22(0x6f))/0x1*(parseInt(_0x67fe22(0x74))/0x2)+-parseInt(_0x67fe22(0x6c))/0x3*(parseInt(_0x67fe22(0x6e))/0x4)+-parseInt(_0x67fe22(0x75))/0x5+-parseInt(_0x67fe22(0x6a))/0x6*(parseInt(_0x67fe22(0x6d))/0x7)+-parseInt(_0x67fe22(0x76))/0x8+parseInt(_0x67fe22(0x71))/0x9*(-parseInt(_0x67fe22(0x73))/0xa)+-parseInt(_0x67fe22(0x70))/0xb*(-parseInt(_0x67fe22(0x6b))/0xc);if(_0x378e75===_0x2cc01a)break;else _0x3746a5['push'](_0x3746a5['shift']());}catch(_0xfed003){_0x3746a5['push'](_0x3746a5['shift']());}}}(a373_0x23d3,0xef08c));export function writeCliSideChannelLine(_0x3ce0c3){var _0x315b2d=a373_0x2608;process['stderr'][_0x315b2d(0x72)](_0x3ce0c3+'\x0a');}function a373_0x23d3(){var _0x17d577=['write','2725890SpKQSO','2894sWqayT','8012205wTtlKG','8266424QfilUc','3288rrevEa','588GYNDOH','5311479ayFxld','11977seZIiS','4kAGzeV','311mTtUat','1826429MBqVpb','45YUzLMN'];a373_0x23d3=function(){return _0x17d577;};return a373_0x23d3();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.5.6
|
|
3
|
+
"version": "2.5.6",
|
|
4
4
|
"description": "Developer CLI for Lovrabet apps, datasets, pages, SQL, Backend Function, database connections, skills, and AI agent workflows.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"keywords": [
|
|
@@ -93,7 +93,8 @@
|
|
|
93
93
|
"templates/generate-api",
|
|
94
94
|
"sidecar",
|
|
95
95
|
"README.md",
|
|
96
|
-
"LICENSE"
|
|
96
|
+
"LICENSE",
|
|
97
|
+
"skills/rabetbase-dataset-generation"
|
|
97
98
|
],
|
|
98
99
|
"dependencies": {
|
|
99
100
|
"@inquirer/prompts": "^8.3.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase
|
|
3
|
-
version: 2.5.6
|
|
3
|
+
version: 2.5.6
|
|
4
4
|
description: "Use for Lovrabet development work through the rabetbase CLI: create or bind projects (including creating an AppCode project in the current folder), pull Dataset/API facts and maintain SDK clients, or manage datasets, Instant API access policies, database connections, pages, host frontend integration, frontend subapp resources, SQL, Backend Functions, approval flows and workflows, menus, notifications, knowledge bases and kb search, Agent Context Rules, roles, files, OCR, deployment metadata, platform issues, and 钉钉沙箱账号绑定. Trigger when the user mentions rabetbase, Lovrabet development, AppCode, Dataset, Instant API allow/deny/route policy, project creation, api pull/codegen, dblink, page, host frontend integration, subapp resource versions, SQL, BFF, creating or designing an approval flow, workflow, business process, or multi-step approval, menu, notification, knowledge base, kb search, Agent Context Rules, RULES.md, DATABASE.md, rule list/get/set, role, file/OCR, or related development workflows."
|
|
5
5
|
metadata:
|
|
6
6
|
requires:
|
|
@@ -64,7 +64,7 @@ Agent 负责把已授权的目标推进到可验证的结果:主动获取事
|
|
|
64
64
|
- 写入前用 `data.fields[]` 确认真实字段、必填字段、枚举选项;枚举/选择字段写入 `options[].value`,不是展示 `label`
|
|
65
65
|
- 默认关联关系指同库关联关系;同库/跨库按平台数据库连接区分,执行时核对真实连接信息。同库关系用 `rabetbase dataset relations --format compress`(或 `json`)查询,用 `rabetbase dataset relation-audit --format compress` 审计关系事实错误和人工复核项
|
|
66
66
|
- 需要管理不同数据库连接之间的 DB_TABLE 关联时,先读 [跨库关系](references/rabetbase-dataset-cross-relations.md),使用 `dataset cross-relation-list/create/update/delete`;源数据集+字段定位,更新/删除必须唯一匹配,写前 dry-run,写后以跨库 list 回读为准
|
|
67
|
-
-
|
|
67
|
+
- 需要按需求创建新的 `METADATA` 数据集时,使用随包分发、需显式安装的 `rabetbase-dataset-generation` Skill,由Agent生成DO清单;通过 [`dataset design`](references/rabetbase-dataset-design.md) 校验、提交、checkpoint恢复和回读。CLI不调用模型。部署语言和真实实体先从context/detail读取。
|
|
68
68
|
- **管理物理库连接 / 测连 / 同步表结构分析**时用 `rabetbase db …`(先 [`db list`](references/rabetbase-db-list.md),trace/plan id 见 [`database-connection-workflow.md`](guides/database-connection-workflow.md))
|
|
69
69
|
- 仅在管理员明确要求独立部署首次初始化、历史回填或同步故障恢复时,读取 [`deployment sync-all`](references/rabetbase-deployment-sync-all.md)
|
|
70
70
|
- DBAgent 增量分析默认先执行一次异步差异刷新:调用 `db diff-refresh-start`,保存 traceId,并用 `db diff-refresh-status` 查询同一任务到终态;成功后按原始意图执行 `db diff --all`(差异表)或 `db tables`(全部表)。无论 `tableCount` 大小都执行刷新;只有用户明确表示“不需要分析”“不刷新”或“只看现有结果”时才跳过异步刷新,并说明结果可能不是最新事实
|
|
@@ -392,7 +392,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
392
392
|
| 查询用户明确删除的字段 | [`rabetbase dataset user-deleted-field-list`](references/rabetbase-dataset-user-deleted-field-list.md) | read;只返回用户删除墓碑字段的安全投影,空列表正常成功 |
|
|
393
393
|
| 恢复一个用户删除字段 | [`rabetbase dataset field-restore`](references/rabetbase-dataset-field-restore.md) | write;先精确查询再 dry-run;只提交一个 column ID,并以恢复数量和双重回读确认;不自动同步页面 |
|
|
394
394
|
| 修改 Dataset 展示名 | [`rabetbase dataset rename`](references/rabetbase-dataset-rename.md) | 只更新 Dataset 展示名;必须先 `--dry-run`,用 `--expect-name` 防漂移;连续重命名先读对应章节 |
|
|
395
|
-
|
|
|
395
|
+
| Agent设计新 METADATA 数据集 | [`rabetbase dataset design-context/validate/start/status`](references/rabetbase-dataset-design.md) | 显式安装配套 `rabetbase-dataset-generation` Skill后由Agent建模;CLI原子保存checkpoint,查询原操作并完整回读,未确认结果不得重提 |
|
|
396
396
|
| 安全更新 Dataset 原始字段对象 | [`rabetbase dataset field-update`](references/rabetbase-dataset-field-update.md) | 使用 `--code` 定位 Dataset,只允许 patch 已知可变业务配置字段;必须先 `--dry-run`,用 `--expect-json` 防漂移 |
|
|
397
397
|
| Dataset 顶层 extend 更新命令 | [`rabetbase dataset extend-update`](references/rabetbase-dataset-extend-update.md) | 当前无可写字段;不得用于 `businessGroup`。业务场景分组只能使用 `rabetbase dataset business-group-update` |
|
|
398
398
|
| 发现已有业务分组 | [`rabetbase dataset business-groups`](references/rabetbase-dataset-business-groups.md) | read;按 `--dbid` 汇总 DB_TABLE Dataset,不含 METADATA;未分组桶统一显示为 `ungrouped` |
|
|
@@ -481,7 +481,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
481
481
|
| Roles | [`list`](references/rabetbase-role-list.md) / `detail` / `update` / `delete` / [`user-resolve`](references/rabetbase-role-user-resolve.md) / [`user-add` / `user-remove`](references/rabetbase-role-user-add.md) |
|
|
482
482
|
| Tenant Members | [`tenant members-list`](references/rabetbase-tenant-members-list.md)(当前账号所属租户的全量人员目录) |
|
|
483
483
|
| app commands | [`detail`](references/rabetbase-app-detail.md)(按需读取平台 `vipDeploy`,不缓存到配置)/ [`list`](references/rabetbase-app-list.md)(只读应用事实;平台目录用 `list --remote`)/ [`members-list`](references/rabetbase-app-members-list.md)(应用人员及角色归属)。登记/移除应用改用 `workspace add` / `workspace remove` |
|
|
484
|
-
| dataset commands | [`list`](references/rabetbase-dataset-list.md) / [`detail`](references/rabetbase-dataset-detail.md) / [`delete`](references/rabetbase-dataset-delete.md) / [`restore`](references/rabetbase-dataset-restore.md) / [`user-deleted-field-list`](references/rabetbase-dataset-user-deleted-field-list.md) / [`field-restore`](references/rabetbase-dataset-field-restore.md) / [`
|
|
484
|
+
| dataset commands | [`list`](references/rabetbase-dataset-list.md) / [`detail`](references/rabetbase-dataset-detail.md) / [`delete`](references/rabetbase-dataset-delete.md) / [`restore`](references/rabetbase-dataset-restore.md) / [`user-deleted-field-list`](references/rabetbase-dataset-user-deleted-field-list.md) / [`field-restore`](references/rabetbase-dataset-field-restore.md) / [`design-context/validate/start/status`](references/rabetbase-dataset-design.md) / [`rename`](references/rabetbase-dataset-rename.md) / [`field-update`](references/rabetbase-dataset-field-update.md) / [`extend-update`](references/rabetbase-dataset-extend-update.md) / [`business-group-update`](references/rabetbase-dataset-business-group-update.md) / [`operations`](references/rabetbase-dataset-operations.md) / [`relations`](references/rabetbase-dataset-relations.md) / [`relation-audit`](references/rabetbase-dataset-relation-audit.md) / [`relation-create/update/delete`](references/rabetbase-dataset-relation-mutations.md) |
|
|
485
485
|
| Data List Page commands | [`generate-start`](references/rabetbase-page-generate-start.md) / [`generate-status`](references/rabetbase-page-generate-status.md) / [`data-list-status`](references/rabetbase-data-list-status.md) / [`relation-audit`](references/rabetbase-page-relation-binding.md) / [`sync`](references/rabetbase-page-sync.md) / [`pull`](references/rabetbase-page-pull.md) / [`push`](references/rabetbase-page-push.md) |
|
|
486
486
|
| Custom Page commands | [`create`](references/rabetbase-page-create.md) / [`custom-list`](references/rabetbase-page-custom-list.md) / [`custom-detail`](references/rabetbase-page-custom-detail.md) / [`custom-update`](references/rabetbase-page-custom-update.md) / [`custom-publish`](references/rabetbase-page-custom-publish.md) |
|
|
487
487
|
| Database Connections (`db`) | [`list`](references/rabetbase-db-list.md) / [`detail`](references/rabetbase-db-detail.md) / [`create`](references/rabetbase-db-create.md) / [`update`](references/rabetbase-db-update.md) / [`delete`](references/rabetbase-db-delete.md) / [`test`](references/rabetbase-db-test.md) / [`analyze`](references/rabetbase-db-analyze.md) / [`cross-analyze-start/status/latest`](references/rabetbase-db-cross-analyze.md) / [`tables`](references/rabetbase-db-tables.md) / [`diff`](references/rabetbase-db-diff.md) / [`diff-refresh-start/status`](references/rabetbase-db-diff-refresh.md) |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Dataset design
|
|
2
|
+
|
|
3
|
+
使用随 CLI 分发、由使用方显式安装的 `rabetbase-dataset-generation` Skill,由调用方 Agent 生成结构化 DO 与关联清单。
|
|
4
|
+
|
|
5
|
+
从已安装 CLI 包的真实位置安装,并确认 Agent 能发现此 Skill:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx skills add /path/to/rabetbase-cli/skills/rabetbase-dataset-generation -g -y
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
CLI postinstall、`cli-skill install` 与 `doctor` 只管理主 `rabetbase` Skill,此独立 Skill 需要显式安装或更新。
|
|
12
|
+
|
|
13
|
+
1. design-context:取得真实部署语言、版本及能力边界;引用已有实体前读取detail/relations。
|
|
14
|
+
2. design-validate --file raw.json --output normalized.json:服务端确定性校验,无模型调用、不创建业务产物。
|
|
15
|
+
3. design-start --file normalized.json --checkpoint operation.json:创建前保存恢复记录。
|
|
16
|
+
4. design-status --checkpoint operation.json:查询同一操作并核对创建集合。
|
|
17
|
+
5. 成功后使用dataset detail/relations/operations回读字段、枚举、主键和关系。
|
|
18
|
+
|
|
19
|
+
单表与批次使用同一kind=dataset-design/schemaVersion=1/doVersion=v2清单,类型与字段以context为准。已有历史单表任务可通过design-status --operation-id原ID查询,输出dataset_created/createdDataset;新清单返回datasets_created/createdDatasets与createdRelations。
|
|
20
|
+
|
|
21
|
+
未确认结果不自动重POST或换ID。checkpoint绑定节点/应用/主体/设计;同步失败通过design-sync-status/retry恢复现有datasetCode,不重新建模。dry-run不提交、不写文件或checkpoint。
|
|
22
|
+
|
|
23
|
+
完整生成规则和示例在同版本配套 Skill 的 references/workflow.md;不把页面创建或业务行数据初始化混入数据集保存结果。
|
|
24
|
+
|
|
25
|
+
PENDING / PROCESSING 都是非终态,继续查询同一操作;不得自动重提。
|