@lovrabet/rabetbase-cli 2.5.2-beta.1 → 2.5.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.d.ts +1 -0
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.d.ts +2 -0
- package/lib/commands/deployment/sync-all.js +1 -0
- package/lib/commands/deployment/sync-jobs.d.ts +2 -0
- package/lib/commands/deployment/sync-jobs.js +1 -0
- package/lib/commands/deployment/sync-status.d.ts +2 -0
- package/lib/commands/deployment/sync-status.js +1 -0
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.d.ts +2 -0
- package/lib/commands/instant-api-policy/current.js +1 -0
- package/lib/commands/instant-api-policy/index.d.ts +2 -0
- package/lib/commands/instant-api-policy/index.js +1 -0
- package/lib/commands/instant-api-policy/init.d.ts +2 -0
- package/lib/commands/instant-api-policy/init.js +1 -0
- package/lib/commands/instant-api-policy/publish.d.ts +2 -0
- package/lib/commands/instant-api-policy/publish.js +1 -0
- package/lib/commands/instant-api-policy/pull.d.ts +2 -0
- package/lib/commands/instant-api-policy/pull.js +1 -0
- package/lib/commands/instant-api-policy/revision.d.ts +2 -0
- package/lib/commands/instant-api-policy/revision.js +1 -0
- package/lib/commands/instant-api-policy/revisions.d.ts +2 -0
- package/lib/commands/instant-api-policy/revisions.js +1 -0
- package/lib/commands/instant-api-policy/rollback.d.ts +2 -0
- package/lib/commands/instant-api-policy/rollback.js +1 -0
- package/lib/commands/instant-api-policy/shared.d.ts +82 -0
- package/lib/commands/instant-api-policy/shared.js +1 -0
- package/lib/commands/instant-api-policy/validate.d.ts +2 -0
- package/lib/commands/instant-api-policy/validate.js +1 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.d.ts +3 -7
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +114 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/instant-api-policy/config.d.ts +23 -0
- package/lib/core/instant-api-policy/config.js +1 -0
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.d.ts +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +1 -3
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +12 -6
- package/skills/rabetbase/references/rabetbase-app-members-list.md +2 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync.md +41 -5
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +92 -0
- package/skills/rabetbase.manifest.json +4 -3
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a315_0x979258=a315_0x203f;(function(_0x188edb,_0x23055b){const _0x32e642=a315_0x203f,_0x5bf2e2=_0x188edb();while(!![]){try{const _0x3316e0=parseInt(_0x32e642(0x205))/0x1+-parseInt(_0x32e642(0x203))/0x2+-parseInt(_0x32e642(0x1f8))/0x3*(-parseInt(_0x32e642(0x212))/0x4)+parseInt(_0x32e642(0x1fa))/0x5+-parseInt(_0x32e642(0x1f5))/0x6*(-parseInt(_0x32e642(0x1f9))/0x7)+-parseInt(_0x32e642(0x208))/0x8*(-parseInt(_0x32e642(0x209))/0x9)+-parseInt(_0x32e642(0x20e))/0xa;if(_0x3316e0===_0x23055b)break;else _0x5bf2e2['push'](_0x5bf2e2['shift']());}catch(_0x5529e1){_0x5bf2e2['push'](_0x5bf2e2['shift']());}}}(a315_0x1f83,0x7b1ea));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';function a315_0x203f(_0x430900,_0x18d89b){_0x430900=_0x430900-0x1f2;const _0x1f83d9=a315_0x1f83();let _0x203fbd=_0x1f83d9[_0x430900];return _0x203fbd;}import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x1e326c=getTemplateBaseUrl();return _0x1e326c+'/skills/guides.json';}const CACHE_DIR=join(homedir(),a315_0x979258(0x20a),a315_0x979258(0x20b));export async function fetchGuidesFromCDN(){const _0x1d0bc=a315_0x979258,_0x5d1527=getGuidesCdnUrl(),_0x467ecf=await fetch(_0x5d1527,{'headers':{'Accept':_0x1d0bc(0x1f3)}});if(!_0x467ecf['ok'])throw new Error(_0x1d0bc(0x210)+_0x467ecf[_0x1d0bc(0x1f6)]+'\x20'+_0x467ecf[_0x1d0bc(0x211)]);const _0x5a03dc=await _0x467ecf[_0x1d0bc(0x204)]();if(!_0x5a03dc[_0x1d0bc(0x1f7)]||typeof _0x5a03dc[_0x1d0bc(0x1f7)]!==_0x1d0bc(0x1fc))throw new Error(_0x1d0bc(0x1fd));return _0x5a03dc;}function a315_0x1f83(){const _0x4f732b=['map','lastUpdated','.md','join','application/json','skillTemplate','3768ZGhQfr','status','guides','3DgGBxQ','7973RNRqxC','1357410vVHdWv','trimEnd','object','CDN\x20returned\x20invalid\x20data','push','entries','content','replace','.lovrabet/skill/guides','861038dTMyqh','json','248585MXebIG','\x0a\x0a>更新时间:','utf-8','186472sGSuKb','306USKYms','.lovrabet','cache','CDN\x20data\x20is\x20missing\x20skillTemplate','keys','14289030NjhJMD','extendContent','CDN\x20request\x20failed:\x20','statusText','1343420baypjB','length'];a315_0x1f83=function(){return _0x4f732b;};return a315_0x1f83();}export function writeGuidesToProject(_0x589617,_0x481df1,_0x33dd28=a315_0x979258(0x202),_0x50f32e){const _0x4db8e2=a315_0x979258,_0x2edaec=join(_0x481df1,_0x33dd28);mkdirSync(_0x2edaec,{'recursive':!![]});for(const [_0x3e7c67,_0x3af075]of Object[_0x4db8e2(0x1ff)](_0x589617[_0x4db8e2(0x1f7)])){let _0x1887c8=_0x3af075[_0x4db8e2(0x200)];_0x3af075[_0x4db8e2(0x215)]&&(_0x1887c8=appendUpdateTime(_0x1887c8,_0x3af075[_0x4db8e2(0x215)])),writeFileSync(join(_0x2edaec,_0x3e7c67+_0x4db8e2(0x216)),_0x1887c8,_0x4db8e2(0x207));}}export function appendUpdateTime(_0x1ab646,_0x59737a){const _0x1da980=a315_0x979258;return _0x1ab646=_0x1ab646[_0x1da980(0x201)](/\n*>更新时间:.*$/m,''),_0x1ab646['trimEnd']()+(_0x1da980(0x206)+_0x59737a);}export function getSkillTemplate(_0x143dbd){const _0x57bbeb=a315_0x979258;return _0x143dbd[_0x57bbeb(0x1f4)]?.[_0x57bbeb(0x200)]||'';}export function appendExtendContents(_0xedc110,_0x5996b0,_0x3bf127){const _0x46828a=a315_0x979258,_0x5484c5=[];for(const [,_0x224ecd]of Object[_0x46828a(0x1ff)](_0x5996b0[_0x46828a(0x1f7)])){_0x224ecd[_0x46828a(0x20f)]&&_0x5484c5[_0x46828a(0x1fe)](_0x224ecd[_0x46828a(0x20f)][_0x46828a(0x1fb)]());}if(_0x5484c5[_0x46828a(0x213)]===0x0)return _0xedc110;return _0xedc110[_0x46828a(0x1fb)]()+'\x0a\x0a'+_0x5484c5[_0x46828a(0x1f2)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x3ccbe4,_0x1a529a,_0x4a551c){const _0x3c8295=a315_0x979258,_0x47ed44=getSkillTemplate(_0x3ccbe4);if(!_0x47ed44)throw new Error(_0x3c8295(0x20c));const _0x65b2a4=dirname(_0x1a529a);mkdirSync(_0x65b2a4,{'recursive':!![]});let _0x3229ec=_0x47ed44[_0x3c8295(0x201)](/\{\{IDE_NAME\}\}/g,_0x4a551c);_0x3229ec=appendExtendContents(_0x3229ec,_0x3ccbe4),_0x3ccbe4[_0x3c8295(0x1f4)][_0x3c8295(0x215)]&&(_0x3229ec=appendUpdateTime(_0x3229ec,_0x3ccbe4[_0x3c8295(0x1f4)][_0x3c8295(0x215)])),writeFileSync(_0x1a529a,_0x3229ec,'utf-8');}export async function installGuides(_0x125f53){const _0x5ad1a1=a315_0x979258,_0x410816=await fetchGuidesFromCDN();return writeGuidesToProject(_0x410816,_0x125f53),Object[_0x5ad1a1(0x20d)](_0x410816[_0x5ad1a1(0x1f7)])[_0x5ad1a1(0x213)];}export function getGuidesSummary(_0x201e39){const _0x4c3fd3=a315_0x979258;return Object[_0x4c3fd3(0x1ff)](_0x201e39[_0x4c3fd3(0x1f7)])[_0x4c3fd3(0x214)](([_0x572c2e,_0x391eaa])=>({'key':_0x572c2e,'title':_0x391eaa['title'],'path':_0x391eaa['path']}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a316_0x2472(){const _0x5e9b36=['get','ms...','message','json','7ofIUjA','\x20in\x20','text','name','includes','content-type','6040CiPNfC','2493183DbxLSy','950287sfUZQH','url','abort','statusText','43883800zfclho','log','ENOTFOUND','signal','3501iFFfFC','*\x20Request\x20failed;\x20retry\x20','4766898AtqVbd','1147956WYydVp','ECONNRESET','headers','3550775RMHUNC','TypeError','status','2gmvzdA','Request\x20failed'];a316_0x2472=function(){return _0x5e9b36;};return a316_0x2472();}(function(_0x50c6f8,_0x499c2d){const _0x231407=a316_0x25eb,_0x46531d=_0x50c6f8();while(!![]){try{const _0x49ce2f=-parseInt(_0x231407(0x81))/0x1*(parseInt(_0x231407(0x73))/0x2)+-parseInt(_0x231407(0x80))/0x3+-parseInt(_0x231407(0x6d))/0x4+-parseInt(_0x231407(0x70))/0x5+parseInt(_0x231407(0x6c))/0x6*(-parseInt(_0x231407(0x79))/0x7)+-parseInt(_0x231407(0x7f))/0x8*(parseInt(_0x231407(0x6a))/0x9)+parseInt(_0x231407(0x66))/0xa;if(_0x49ce2f===_0x499c2d)break;else _0x46531d['push'](_0x46531d['shift']());}catch(_0x2d619b){_0x46531d['push'](_0x46531d['shift']());}}}(a316_0x2472,0x7f5ee));export async function httpRequest(_0x5d9f37,_0x2a59fb={}){const _0x85b289=a316_0x25eb,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x2a59fb;let _0x28dcc9=null;for(let _0x3d0be5=0x0;_0x3d0be5<=retries;_0x3d0be5++){try{const _0x245480=new AbortController(),_0x23e090=setTimeout(()=>_0x245480[_0x85b289(0x64)](),timeout),_0x30b606=await fetch(_0x5d9f37,{'headers':headers,'signal':_0x245480[_0x85b289(0x69)]});clearTimeout(_0x23e090);let _0x33d068;const _0x430fb8=_0x30b606[_0x85b289(0x6f)][_0x85b289(0x75)](_0x85b289(0x7e));return _0x430fb8?.['includes']('application/json')?_0x33d068=await _0x30b606[_0x85b289(0x78)]():_0x33d068=await _0x30b606[_0x85b289(0x7b)](),{'ok':_0x30b606['ok'],'status':_0x30b606[_0x85b289(0x72)],'statusText':_0x30b606[_0x85b289(0x65)],'data':_0x33d068,'headers':_0x30b606[_0x85b289(0x6f)],'url':_0x30b606[_0x85b289(0x82)],'text':()=>_0x30b606[_0x85b289(0x7b)]()};}catch(_0x37c5a7){_0x28dcc9=_0x37c5a7 instanceof Error?_0x37c5a7:new Error(String(_0x37c5a7));if(_0x3d0be5===retries)break;if(shouldRetry(_0x37c5a7)){console[_0x85b289(0x67)](_0x85b289(0x6b)+(_0x3d0be5+0x1)+_0x85b289(0x7a)+retryDelay+_0x85b289(0x76)),await sleep(retryDelay);continue;}else break;}}throw _0x28dcc9||new Error(_0x85b289(0x74));}function shouldRetry(_0x4c5121){const _0x123b61=a316_0x25eb;if(_0x4c5121 instanceof Error){if(_0x4c5121['name']==='AbortError')return![];if(_0x4c5121[_0x123b61(0x7c)]===_0x123b61(0x71)&&_0x4c5121[_0x123b61(0x77)][_0x123b61(0x7d)]('fetch'))return!![];if(_0x4c5121['message'][_0x123b61(0x7d)](_0x123b61(0x6e)))return!![];if(_0x4c5121['message'][_0x123b61(0x7d)](_0x123b61(0x68)))return![];}return![];}function sleep(_0x30bfb5){return new Promise(_0x1eff7c=>setTimeout(_0x1eff7c,_0x30bfb5));}function a316_0x25eb(_0x2ff589,_0x5de638){_0x2ff589=_0x2ff589-0x64;const _0x2472cf=a316_0x2472();let _0x25ebd9=_0x2472cf[_0x2ff589];return _0x25ebd9;}export function validateUrl(_0x3b73bd){try{return new URL(_0x3b73bd),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xea0af4,_0x26ed8f){const _0xbe440b=a317_0x208f,_0x6aa426=_0xea0af4();while(!![]){try{const _0x204160=parseInt(_0xbe440b(0x90))/0x1+-parseInt(_0xbe440b(0x98))/0x2+-parseInt(_0xbe440b(0x8e))/0x3+-parseInt(_0xbe440b(0x97))/0x4+parseInt(_0xbe440b(0x94))/0x5*(parseInt(_0xbe440b(0x8c))/0x6)+-parseInt(_0xbe440b(0x8f))/0x7+parseInt(_0xbe440b(0x95))/0x8;if(_0x204160===_0x26ed8f)break;else _0x6aa426['push'](_0x6aa426['shift']());}catch(_0x1f5c7e){_0x6aa426['push'](_0x6aa426['shift']());}}}(a317_0x2d39,0x24a5d));function a317_0x2d39(){const _0x13cdae=['212460irHaVp','1317995pRwqkR','179318UMxSjh','stdin','setRawMode','isRaw','15970GRvWDv','3400776BdIzpw','true','857048lJsxUD','281278YtSomH','isTTY','300RtHRCX','stdout'];a317_0x2d39=function(){return _0x13cdae;};return a317_0x2d39();}function a317_0x208f(_0x70906b,_0x36cde8){_0x70906b=_0x70906b-0x8b;const _0x2d3934=a317_0x2d39();let _0x208ff8=_0x2d3934[_0x70906b];return _0x208ff8;}function env(_0x33b549){return process.env[`RABETBASE_${_0x33b549}`]||process.env[`LOVRABET_${_0x33b549}`]||undefined;}export function isNonInteractive(_0x29ca9e){const _0x259e69=a317_0x208f;return!!(_0x29ca9e['nonInteractive']||_0x29ca9e['ci']||env('CI')===_0x259e69(0x96)||process.env.CI===_0x259e69(0x96)||!process[_0x259e69(0x8d)][_0x259e69(0x8b)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x5ed2d7=a317_0x208f;if(!process['stdin']['isTTY'])return![];try{const _0x284d72=process[_0x5ed2d7(0x91)][_0x5ed2d7(0x93)];return process[_0x5ed2d7(0x91)][_0x5ed2d7(0x92)](!![]),process['stdin']['setRawMode'](_0x284d72??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a318_0x2a38a4=a318_0x430c;(function(_0x30fae4,_0x454e91){const _0x2a788b=a318_0x430c,_0x106dd7=_0x30fae4();while(!![]){try{const _0x2c66b9=-parseInt(_0x2a788b(0x128))/0x1*(parseInt(_0x2a788b(0x12e))/0x2)+-parseInt(_0x2a788b(0x11b))/0x3+-parseInt(_0x2a788b(0x11d))/0x4*(parseInt(_0x2a788b(0x116))/0x5)+-parseInt(_0x2a788b(0x13b))/0x6*(-parseInt(_0x2a788b(0x143))/0x7)+parseInt(_0x2a788b(0x126))/0x8*(-parseInt(_0x2a788b(0x12c))/0x9)+parseInt(_0x2a788b(0x115))/0xa*(-parseInt(_0x2a788b(0x136))/0xb)+parseInt(_0x2a788b(0x122))/0xc;if(_0x2c66b9===_0x454e91)break;else _0x106dd7['push'](_0x106dd7['shift']());}catch(_0x1a8dea){_0x106dd7['push'](_0x106dd7['shift']());}}}(a318_0x36e5,0x42c8a));import a318_0x3a89c0 from'winston';import a318_0x23e2c4 from'node:fs';import a318_0x5110b1 from'node:path';function a318_0x430c(_0x5bc2a1,_0x547dd5){_0x5bc2a1=_0x5bc2a1-0x112;const _0x36e5ae=a318_0x36e5();let _0x430c63=_0x36e5ae[_0x5bc2a1];return _0x430c63;}class Logger{[a318_0x2a38a4(0x121)];[a318_0x2a38a4(0x118)];[a318_0x2a38a4(0x12b)]='';constructor(){const _0x59cf50=a318_0x2a38a4;this[_0x59cf50(0x118)]='';}[a318_0x2a38a4(0x141)](_0x2ab84d){this['currentRawCommand']=_0x2ab84d;}[a318_0x2a38a4(0x139)](){const _0x31c80b=a318_0x2a38a4,_0x2c728d=a318_0x5110b1[_0x31c80b(0x138)](this[_0x31c80b(0x118)]);!a318_0x23e2c4[_0x31c80b(0x12d)](_0x2c728d)&&a318_0x23e2c4['mkdirSync'](_0x2c728d,{'recursive':!![]});const _0x3d1747=a318_0x3a89c0[_0x31c80b(0x132)][_0x31c80b(0x11f)](a318_0x3a89c0[_0x31c80b(0x132)][_0x31c80b(0x11e)](),a318_0x3a89c0[_0x31c80b(0x132)][_0x31c80b(0x127)]({'stack':!![]}),a318_0x3a89c0[_0x31c80b(0x132)][_0x31c80b(0x135)](_0x4961bb=>{const _0x31248f=_0x31c80b,_0x3f9d8b={'timestamp':_0x4961bb[_0x31248f(0x11e)]||new Date()[_0x31248f(0x131)](),'level':_0x4961bb[_0x31248f(0x13d)]||_0x31248f(0x11c),'command':_0x4961bb[_0x31248f(0x137)]||'unknown','rawCommand':_0x4961bb[_0x31248f(0x12f)]||this[_0x31248f(0x12b)]||undefined,'message':_0x4961bb[_0x31248f(0x117)]||'','duration':_0x4961bb['duration']||undefined,'details':_0x4961bb[_0x31248f(0x119)]||undefined};return JSON[_0x31248f(0x13a)](_0x3f9d8b);}));this['winstonLogger']=a318_0x3a89c0['createLogger']({'level':'info','format':_0x3d1747,'transports':[new a318_0x3a89c0[(_0x31c80b(0x11a))][(_0x31c80b(0x148))]({'filename':this[_0x31c80b(0x118)],'level':_0x31c80b(0x11c)})],'silent':![]}),a318_0x3a89c0[_0x31c80b(0x124)]({'success':_0x31c80b(0x133),'error':'red','warn':'yellow','info':_0x31c80b(0x120)});}[a318_0x2a38a4(0x134)](_0x316b69){const _0x31a7f1=a318_0x2a38a4;this[_0x31a7f1(0x118)]=a318_0x5110b1[_0x31a7f1(0x146)](_0x316b69,'.lovrabet.log'),this[_0x31a7f1(0x121)]&&this[_0x31a7f1(0x121)][_0x31a7f1(0x149)](),this[_0x31a7f1(0x139)]();}['info'](_0x36029f,_0x11e653,_0xfeed40){const _0x564f2c=a318_0x2a38a4;if(!this[_0x564f2c(0x118)]||!this[_0x564f2c(0x121)])return;this['winstonLogger'][_0x564f2c(0x11c)](_0x11e653,{'command':_0x36029f,'details':_0xfeed40});}[a318_0x2a38a4(0x125)](_0x136777,_0x491dd9,_0x5732f9,_0x21889a){const _0x56b66d=a318_0x2a38a4;if(!this[_0x56b66d(0x118)]||!this[_0x56b66d(0x121)])return;this['winstonLogger']['log']('info',_0x491dd9,{'level':'success','command':_0x136777,'duration':_0x5732f9,'details':_0x21889a});}[a318_0x2a38a4(0x123)](_0x1a9e62,_0x3f3c78,_0x3085e3){const _0x9e62a4=a318_0x2a38a4;if(!this[_0x9e62a4(0x118)]||!this[_0x9e62a4(0x121)])return;this[_0x9e62a4(0x121)][_0x9e62a4(0x123)](_0x3f3c78,{'command':_0x1a9e62,'details':_0x3085e3});}[a318_0x2a38a4(0x140)](_0x53677d,_0x275b8b,_0x4d0b79){const _0x307b65=a318_0x2a38a4;if(!this['logFilePath']||!this[_0x307b65(0x121)])return;this[_0x307b65(0x121)]['warn'](_0x275b8b,{'command':_0x53677d,'details':_0x4d0b79});}async[a318_0x2a38a4(0x129)](_0xfb6163,_0x476337,_0x3e9866){const _0x2ee664=a318_0x2a38a4,_0x135438=Date[_0x2ee664(0x112)]();this[_0x2ee664(0x11c)](_0xfb6163,_0x2ee664(0x113)+_0x476337);try{const _0x2a5921=await _0x3e9866(),_0x3da4b3=Date[_0x2ee664(0x112)]()-_0x135438;return this[_0x2ee664(0x125)](_0xfb6163,_0x2ee664(0x114)+_0x476337,_0x3da4b3),_0x2a5921;}catch(_0x215a34){const _0xf87d3f=Date[_0x2ee664(0x112)]()-_0x135438;this[_0x2ee664(0x123)](_0xfb6163,_0x2ee664(0x130)+_0x476337,{'error':_0x215a34 instanceof Error?_0x215a34[_0x2ee664(0x117)]:String(_0x215a34),'duration':_0xf87d3f});throw _0x215a34;}}[a318_0x2a38a4(0x13f)](){const _0x23ddcd=a318_0x2a38a4;try{if(!a318_0x23e2c4[_0x23ddcd(0x12d)](this[_0x23ddcd(0x118)]))return[];const _0x58dcc4=a318_0x23e2c4[_0x23ddcd(0x145)](this['logFilePath'],_0x23ddcd(0x144));return _0x58dcc4[_0x23ddcd(0x142)]('\x0a')[_0x23ddcd(0x13c)](_0x51b489=>_0x51b489[_0x23ddcd(0x147)]())['map'](_0x8f4b=>JSON[_0x23ddcd(0x13e)](_0x8f4b));}catch(_0xeda05b){return console[_0x23ddcd(0x140)]('Failed\x20to\x20read\x20logs:',_0xeda05b),[];}}[a318_0x2a38a4(0x12a)](){const _0x1ce24b=a318_0x2a38a4;try{a318_0x23e2c4[_0x1ce24b(0x12d)](this[_0x1ce24b(0x118)])&&a318_0x23e2c4['writeFileSync'](this[_0x1ce24b(0x118)],'',_0x1ce24b(0x144));}catch(_0x39af26){console[_0x1ce24b(0x140)]('Failed\x20to\x20clear\x20logs:',_0x39af26);}}[a318_0x2a38a4(0x14a)](){const _0x3006e1=a318_0x2a38a4;return this[_0x3006e1(0x121)];}}export const logger=new Logger();function a318_0x36e5(){const _0xae320c=['dirname','initWinstonLogger','stringify','30cRLsun','filter','level','parse','readLogs','warn','setRawCommand','split','564298bxWsHs','utf8','readFileSync','join','trim','File','clear','getWinstonInstance','now','Starting:\x20','Completed:\x20','30ZhdYHw','502765apmTtp','message','logFilePath','details','transports','1580487ITuiTU','info','12TIsmXx','timestamp','combine','blue','winstonLogger','16220520psTHNa','error','addColors','success','8SMsOWH','errors','275509hgldao','logTask','clearLogs','currentRawCommand','3292452pTvDLF','existsSync','2VdHkqB','rawCommand','Failed:\x20','toISOString','format','green','setLogPath','printf','41833Ohdjsa','command'];a318_0x36e5=function(){return _0xae320c;};return a318_0x36e5();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27950c,_0x35f142){const _0x43514d=a319_0x5a76,_0x3047c6=_0x27950c();while(!![]){try{const _0x43abaa=-parseInt(_0x43514d(0x148))/0x1*(-parseInt(_0x43514d(0x153))/0x2)+-parseInt(_0x43514d(0x14f))/0x3*(parseInt(_0x43514d(0x145))/0x4)+parseInt(_0x43514d(0x146))/0x5*(parseInt(_0x43514d(0x14b))/0x6)+parseInt(_0x43514d(0x14c))/0x7+-parseInt(_0x43514d(0x149))/0x8*(-parseInt(_0x43514d(0x14d))/0x9)+parseInt(_0x43514d(0x151))/0xa+-parseInt(_0x43514d(0x147))/0xb;if(_0x43abaa===_0x35f142)break;else _0x3047c6['push'](_0x3047c6['shift']());}catch(_0x2e9915){_0x3047c6['push'](_0x3047c6['shift']());}}}(a319_0x20de,0x42abd));function a319_0x20de(){const _0x11fa1c=['40swQWGU','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','12osmofQ','2341997YgtsNQ','218133eZPJaA','Invalid\x20JSON\x20for\x20--params:\x20','45mHPsOi','validation','1319410JcodlM','object','112dbWcRy','28312ZoPsMC','326855orvWpS','9116712iZqdzO','8743OphUuP'];a319_0x20de=function(){return _0x11fa1c;};return a319_0x20de();}import{CliErrors}from'../errors.js';function a319_0x5a76(_0x2e8dbf,_0x37fbd9){_0x2e8dbf=_0x2e8dbf-0x145;const _0x20dec4=a319_0x20de();let _0x5a76ef=_0x20dec4[_0x2e8dbf];return _0x5a76ef;}export function parseJsonParams(_0x1f3596){const _0x47f1ae=a319_0x5a76;if(!_0x1f3596)return undefined;let _0x4ac1a2;try{_0x4ac1a2=JSON['parse'](_0x1f3596);}catch{throw CliErrors[_0x47f1ae(0x150)](_0x47f1ae(0x14e)+_0x1f3596);}if(!_0x4ac1a2||typeof _0x4ac1a2!==_0x47f1ae(0x152)||Array['isArray'](_0x4ac1a2))throw CliErrors[_0x47f1ae(0x150)]('--params\x20must\x20be\x20a\x20JSON\x20object',_0x47f1ae(0x14a));return _0x4ac1a2;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a320_0x3655(){const _0x39e7c2=['144qphIpL','9142164OmkdMI','104KUsrZk','1184335yDFlUj','4395upBxmP','6941SMeuIQ','59206oUTEWw','17410tlzHKc','4kFRwKK','386085JKRhaS','6byopOV','3168IqThwF','.cmd','2410031ZlAFJk','platform'];a320_0x3655=function(){return _0x39e7c2;};return a320_0x3655();}function a320_0x1f58(_0x223032,_0x4df0ad){_0x223032=_0x223032-0x8d;const _0x365503=a320_0x3655();let _0x1f5843=_0x365503[_0x223032];return _0x1f5843;}const a320_0x45a62e=a320_0x1f58;(function(_0x139238,_0x443757){const _0xd0415c=a320_0x1f58,_0x15de66=_0x139238();while(!![]){try{const _0x2b1f6c=-parseInt(_0xd0415c(0x9b))/0x1*(-parseInt(_0xd0415c(0x99))/0x2)+parseInt(_0xd0415c(0x97))/0x3*(-parseInt(_0xd0415c(0x8f))/0x4)+-parseInt(_0xd0415c(0x96))/0x5*(-parseInt(_0xd0415c(0x8e))/0x6)+-parseInt(_0xd0415c(0x8d))/0x7*(parseInt(_0xd0415c(0x95))/0x8)+parseInt(_0xd0415c(0x94))/0x9+parseInt(_0xd0415c(0x9a))/0xa*(-parseInt(_0xd0415c(0x98))/0xb)+parseInt(_0xd0415c(0x93))/0xc*(parseInt(_0xd0415c(0x91))/0xd);if(_0x2b1f6c===_0x443757)break;else _0x15de66['push'](_0x15de66['shift']());}catch(_0x163d42){_0x15de66['push'](_0x15de66['shift']());}}}(a320_0x3655,0x9754d));export const isWindows=process[a320_0x45a62e(0x92)]==='win32';export function resolveNpmBin(_0x467be8){const _0x3a077e=a320_0x45a62e;return isWindows?_0x467be8+_0x3a077e(0x90):_0x467be8;}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x52ab7f){return new Promise(_0x362c0f=>setTimeout(_0x362c0f,_0x52ab7f));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a322_0x560fb4=a322_0x4084;(function(_0x22318d,_0x557fe8){const _0x3f6fc4=a322_0x4084,_0xe7edaa=_0x22318d();while(!![]){try{const _0x2e9317=parseInt(_0x3f6fc4(0x15a))/0x1*(-parseInt(_0x3f6fc4(0x15d))/0x2)+-parseInt(_0x3f6fc4(0x181))/0x3*(parseInt(_0x3f6fc4(0x18d))/0x4)+-parseInt(_0x3f6fc4(0x152))/0x5+-parseInt(_0x3f6fc4(0x18e))/0x6*(-parseInt(_0x3f6fc4(0x18b))/0x7)+-parseInt(_0x3f6fc4(0x175))/0x8*(parseInt(_0x3f6fc4(0x18a))/0x9)+-parseInt(_0x3f6fc4(0x17c))/0xa+parseInt(_0x3f6fc4(0x17e))/0xb*(parseInt(_0x3f6fc4(0x167))/0xc);if(_0x2e9317===_0x557fe8)break;else _0xe7edaa['push'](_0xe7edaa['shift']());}catch(_0x99cf87){_0xe7edaa['push'](_0xe7edaa['shift']());}}}(a322_0x3519,0xa36fe));import a322_0x490603 from'node:fs';import a322_0x116d4c from'node:path';import{logger}from'../utils/logger.js';function a322_0x4084(_0x418619,_0x4c8ad2){_0x418619=_0x418619-0x14c;const _0x351918=a322_0x3519();let _0x408439=_0x351918[_0x418619];return _0x408439;}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a322_0x560fb4(0x157)](_0x2e5df4){const _0xb633f3=a322_0x560fb4;return String(_0x2e5df4)[_0xb633f3(0x14f)](0x2,'0');}static['formatLocalTimestamp'](_0x5c6480){const _0x8b2d54=a322_0x560fb4,_0x323ada=_0x5c6480[_0x8b2d54(0x188)](),_0x5659b5=this[_0x8b2d54(0x157)](_0x5c6480[_0x8b2d54(0x184)]()+0x1),_0x480aa7=this['pad'](_0x5c6480['getDate']()),_0x4277ba=this[_0x8b2d54(0x157)](_0x5c6480['getHours']()),_0x37931e=this[_0x8b2d54(0x157)](_0x5c6480[_0x8b2d54(0x160)]()),_0x2c7c91=this[_0x8b2d54(0x157)](_0x5c6480['getSeconds']());return{'createdAt':_0x323ada+'-'+_0x5659b5+'-'+_0x480aa7+'\x20'+_0x4277ba+':'+_0x37931e+':'+_0x2c7c91,'createdDate':_0x323ada+'-'+_0x5659b5+'-'+_0x480aa7,'createdTime':_0x4277ba+':'+_0x37931e+':'+_0x2c7c91};}static[a322_0x560fb4(0x159)](_0x2dd4c8){const _0x151483=a322_0x560fb4,_0x25e14c=_0x2dd4c8[_0x151483(0x17f)]('/')['pop']()||_0x2dd4c8;return _0x25e14c[_0x151483(0x17f)]('-')[_0x151483(0x178)](_0xa81fc0=>_0xa81fc0[_0x151483(0x161)](0x0)[_0x151483(0x168)]()+_0xa81fc0['slice'](0x1)['toLowerCase']())[_0x151483(0x16c)]('');}static['toDisplayTitle'](_0x6c9d5){const _0x1b8174=a322_0x560fb4,_0x270025=_0x6c9d5[_0x1b8174(0x17f)]('/')[_0x1b8174(0x151)]()||_0x6c9d5;return _0x270025[_0x1b8174(0x17f)]('-')[_0x1b8174(0x178)](_0x48f63a=>_0x48f63a[_0x1b8174(0x161)](0x0)[_0x1b8174(0x168)]()+_0x48f63a[_0x1b8174(0x183)](0x1)['toLowerCase']())[_0x1b8174(0x16c)]('\x20');}static[a322_0x560fb4(0x177)](_0x5dae0b,_0x4f947d,_0x359227){const _0x515d8f=a322_0x560fb4,_0x14a28=this[_0x515d8f(0x159)](_0x4f947d),_0x1fac87=this[_0x515d8f(0x17b)](_0x4f947d),{createdAt:_0x56cae5,createdDate:_0x21150f,createdTime:_0x40c7e1}=this['formatLocalTimestamp'](new Date());let _0x491b66=_0x5dae0b[_0x515d8f(0x171)](/\{CliVersion\}/g,CLI_VERSION)[_0x515d8f(0x171)](/\{ComponentName\}/g,_0x14a28)[_0x515d8f(0x171)](/\{DisplayTitle\}/g,_0x1fac87)[_0x515d8f(0x171)](/\{PageName\}/g,_0x4f947d)[_0x515d8f(0x171)](/\{TemplateName\}/g,_0x359227)[_0x515d8f(0x171)](/\{CreatedAt\}/g,_0x56cae5)[_0x515d8f(0x171)](/\{CreatedDate\}/g,_0x21150f)['replace'](/\{CreatedTime\}/g,_0x40c7e1);return _0x491b66;}static['replaceApiContent'](_0x35e714,_0x21b8e3,_0x57847c,_0x339e35,_0x47e92e,_0x41a9d9,_0x4f6077,_0x2185da){const _0x234703=a322_0x560fb4,_0x1dbf5b=new Date(),_0x254e01=_0x1dbf5b[_0x234703(0x189)](),_0x8b0176=_0x57847c['map'](_0x1c9303=>{const _0x5cfe8f=_0x234703,_0x549aaa=['datasetCode:\x20\x22'+_0x1c9303[_0x5cfe8f(0x190)]+'\x22',_0x5cfe8f(0x16d)+_0x1c9303[_0x5cfe8f(0x163)]+'\x22',_0x5cfe8f(0x169)+_0x1c9303[_0x5cfe8f(0x165)]+'\x22'];return _0x1c9303['alias']&&_0x549aaa[_0x5cfe8f(0x166)]('alias:\x20\x22'+_0x1c9303[_0x5cfe8f(0x158)]+'\x22'),_0x5cfe8f(0x15f)+_0x549aaa[_0x5cfe8f(0x16c)](',\x20')+_0x5cfe8f(0x182);})['join'](''),_0x564796=_0x339e35||_0x57847c[0x0]?.[_0x234703(0x158)]||_0x234703(0x172);let _0x3e4c37=_0x35e714[_0x234703(0x171)](/\{AppCode\}/g,_0x21b8e3)['replace'](/\{ModelConfigs\}/g,_0x8b0176)['replace'](/\{ExampleModelName\}/g,_0x564796)['replace'](/\{ApiFileName\}/g,_0x47e92e||_0x234703(0x155))[_0x234703(0x171)](/\{ConfigName\}/g,_0x41a9d9||'default')['replace'](/\{ClientConfigParam\}/g,_0x4f6077||'')[_0x234703(0x171)](/\{VarPrefix\}/g,_0x2185da||_0x234703(0x154))[_0x234703(0x171)](/\{CreatedAt\}/g,_0x254e01);return _0x3e4c37;}static async[a322_0x560fb4(0x16e)](_0x109acb,_0x1af103,_0x369236,_0xdb0c41,_0x92c71=!![]){const _0x1f2a78=a322_0x560fb4,_0x13a1c3=Date[_0x1f2a78(0x174)]();try{_0x92c71&&logger['info'](_0x1f2a78(0x156),_0x1f2a78(0x15c),{'templatePath':_0x109acb,'targetPath':_0x1af103,'pageName':_0x369236,'templateName':_0xdb0c41});await a322_0x490603[_0x1f2a78(0x17a)]['mkdir'](_0x1af103,{'recursive':!![]}),await this[_0x1f2a78(0x179)](_0x109acb,_0x1af103,_0x369236,_0xdb0c41);if(_0x92c71){const _0x2b3006=Date[_0x1f2a78(0x174)]()-_0x13a1c3;logger[_0x1f2a78(0x153)](_0x1f2a78(0x156),_0x1f2a78(0x164),_0x2b3006,{'pageName':_0x369236,'templateName':_0xdb0c41});}}catch(_0x3e1425){if(_0x92c71){const _0xf12279=Date[_0x1f2a78(0x174)]()-_0x13a1c3;logger[_0x1f2a78(0x15b)](_0x1f2a78(0x156),_0x1f2a78(0x18c),{'templatePath':_0x109acb,'targetPath':_0x1af103,'pageName':_0x369236,'templateName':_0xdb0c41,'error':_0x3e1425 instanceof Error?_0x3e1425[_0x1f2a78(0x150)]:String(_0x3e1425),'duration':_0xf12279});}throw _0x3e1425;}}static async[a322_0x560fb4(0x179)](_0x3eba84,_0x51b66b,_0x529cc4,_0x53e6e0){const _0x4ef58a=a322_0x560fb4,_0x128bf5=await a322_0x490603[_0x4ef58a(0x17a)][_0x4ef58a(0x14d)](_0x3eba84,{'withFileTypes':!![]});for(const _0x26d899 of _0x128bf5){const _0x2e0381=a322_0x116d4c[_0x4ef58a(0x16c)](_0x3eba84,_0x26d899[_0x4ef58a(0x165)]);let _0x2fdd02=a322_0x116d4c[_0x4ef58a(0x16c)](_0x51b66b,_0x26d899[_0x4ef58a(0x165)]);_0x26d899['name'][_0x4ef58a(0x17d)](_0x4ef58a(0x180))&&(_0x2fdd02=a322_0x116d4c['join'](_0x51b66b,_0x26d899['name']['replace'](/\.tpl$/,'')));if(_0x26d899[_0x4ef58a(0x186)]())await a322_0x490603[_0x4ef58a(0x17a)][_0x4ef58a(0x14e)](_0x2fdd02,{'recursive':!![]}),await this['processDirectory'](_0x2e0381,_0x2fdd02,_0x529cc4,_0x53e6e0);else _0x26d899[_0x4ef58a(0x170)]()&&await this[_0x4ef58a(0x16b)](_0x2e0381,_0x2fdd02,_0x529cc4,_0x53e6e0);}}static async[a322_0x560fb4(0x16b)](_0x2a0f0d,_0x3bc276,_0x34cfce,_0x3a6623){const _0x4cb6a0=a322_0x560fb4,_0x1432ad=a322_0x116d4c[_0x4cb6a0(0x16f)](_0x2a0f0d)[_0x4cb6a0(0x173)]();_0x2a0f0d[_0x4cb6a0(0x17d)]('.tpl')&&(_0x3bc276=_0x3bc276[_0x4cb6a0(0x171)](/\.tpl$/,''));const _0x20116d=[_0x4cb6a0(0x14c),'.ts',_0x4cb6a0(0x162),_0x4cb6a0(0x16a),_0x4cb6a0(0x18f),_0x4cb6a0(0x187),'.css','.scss',_0x4cb6a0(0x180)];if(_0x20116d[_0x4cb6a0(0x176)](_0x1432ad)||_0x2a0f0d['endsWith']('.tpl')){const _0x46c8c0=await a322_0x490603['promises'][_0x4cb6a0(0x191)](_0x2a0f0d,_0x4cb6a0(0x185)),_0x8b2bd1=this['replaceContent'](_0x46c8c0,_0x34cfce,_0x3a6623);await a322_0x490603[_0x4cb6a0(0x17a)][_0x4cb6a0(0x15e)](_0x3bc276,_0x8b2bd1,_0x4cb6a0(0x185));}else await a322_0x490603[_0x4cb6a0(0x17a)]['copyFile'](_0x2a0f0d,_0x3bc276);}}function a322_0x3519(){const _0x4d797b=['success','LOVRABET','api','template','pad','alias','toComponentName','19328tshCJf','error','Starting\x20template\x20content\x20replacement','82xzZyVT','writeFile','\x0a\x20\x20\x20\x20{\x20','getMinutes','charAt','.jsx','tableName','Template\x20content\x20replacement\x20completed','name','push','7131864anNtQL','toUpperCase','name:\x20\x22','.js','processFile','join','tableName:\x20\x22','processTemplate','extname','isFile','replace','YourModel','toLowerCase','now','8ZDzuwd','includes','replaceContent','map','processDirectory','promises','toDisplayTitle','2027100zPcVtp','endsWith','55XmUCVy','split','.tpl','3024OxXTru','\x20},','slice','getMonth','utf8','isDirectory','.md','getFullYear','toISOString','6750468kLVQDC','217OSVGap','Template\x20content\x20replacement\x20failed','724uEDJoR','45798bRUJla','.json','datasetCode','readFile','.tsx','readdir','mkdir','padStart','message','pop','3055685WteIXV'];a322_0x3519=function(){return _0x4d797b;};return a322_0x3519();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41c129,_0x261b18){const _0x446787=a323_0x3ae5,_0x22c8b9=_0x41c129();while(!![]){try{const _0xa094de=parseInt(_0x446787(0x95))/0x1*(parseInt(_0x446787(0x94))/0x2)+parseInt(_0x446787(0x9b))/0x3*(parseInt(_0x446787(0xa9))/0x4)+parseInt(_0x446787(0xa1))/0x5*(-parseInt(_0x446787(0xb0))/0x6)+-parseInt(_0x446787(0x99))/0x7*(-parseInt(_0x446787(0xb4))/0x8)+parseInt(_0x446787(0xa8))/0x9+-parseInt(_0x446787(0x97))/0xa*(-parseInt(_0x446787(0xa6))/0xb)+-parseInt(_0x446787(0xad))/0xc;if(_0xa094de===_0x261b18)break;else _0x22c8b9['push'](_0x22c8b9['shift']());}catch(_0x2c50d7){_0x22c8b9['push'](_0x22c8b9['shift']());}}}(a323_0x4b86,0xedfaf));import{mkdir,readFile,writeFile}from'node:fs/promises';function a323_0x3ae5(_0x149779,_0x744749){_0x149779=_0x149779-0x94;const _0x4b860d=a323_0x4b86();let _0x3ae514=_0x4b860d[_0x149779];return _0x3ae514;}import{homedir}from'node:os';import{dirname,join}from'node:path';import a323_0x1f164b 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 _0x3f367d=a323_0x3ae5,_0x20691e=process.env.RABETBASE_NO_UPDATE_NOTICE?.[_0x3f367d(0xac)]()[_0x3f367d(0xb1)]();return _0x20691e==='1'||_0x20691e===_0x3f367d(0x9d)||_0x20691e===_0x3f367d(0xa5);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x158ee0=a323_0x3ae5;return join(cacheRoot(),_0x158ee0(0x98),_0x158ee0(0xaf));}function a323_0x4b86(){const _0x26e160=['36757548mJieSg','parse','update-check.json','213594tPblqq','toLowerCase','lastNotifiedAt','checkedAt','273816RYalKt','latest','805762JLDOvv','3ixjyyH','stableVersion','13313430XqcdkL','rabetbase-cli','63DlolBr','now','3InoLiJ','object','true','valid','gte','\x20available,\x20current\x20','190KavgiU','lastNotifiedVersion','\x20update','number','yes','11fKfjUI','https://www.npmjs.com/package/','12284073mAsZmM','4710928ERuUOU',',\x20run:\x20','stringify','trim'];a323_0x4b86=function(){return _0x26e160;};return a323_0x4b86();}async function readUpdateNoticeCache(){const _0x454121=a323_0x3ae5;try{const _0x446dd6=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x59b5cc=JSON[_0x454121(0xae)](_0x446dd6);if(!_0x59b5cc||typeof _0x59b5cc!==_0x454121(0x9c))return{};return _0x59b5cc;}catch{return{};}}async function writeUpdateNoticeCache(_0x43e6dd){const _0x42ff95=a323_0x3ae5;try{const _0x5c791c=getUpdateNoticeCachePath();await mkdir(dirname(_0x5c791c),{'recursive':!![]}),await writeFile(_0x5c791c,JSON[_0x42ff95(0xab)](_0x43e6dd,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x22c12a,_0xf916a0){const _0x11186f=a323_0x3ae5;return typeof _0x22c12a[_0x11186f(0xb3)]==='number'&&_0xf916a0-_0x22c12a['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x312b78,_0x2d7abe,_0x3ca124){const _0xd39d98=a323_0x3ae5;return _0x312b78[_0xd39d98(0xa2)]===_0x2d7abe&&typeof _0x312b78[_0xd39d98(0xb2)]===_0xd39d98(0xa4)&&_0x3ca124-_0x312b78[_0xd39d98(0xb2)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x574bce){const _0x22a8ae=a323_0x3ae5;return _0x22a8ae(0xa7)+NPM_PACKAGE_NAME+'/v/'+_0x574bce;}export async function resolveLatestUpdateNotice(){const _0x4e3336=a323_0x3ae5;if(isUpdateNoticeDisabled())return null;try{const _0x46bce5=Date[_0x4e3336(0x9a)](),_0x403e64=getCliVersion(),_0x4942d3=await readUpdateNoticeCache();let _0x3c47fa=isFreshCheck(_0x4942d3,_0x46bce5)?_0x4942d3[_0x4e3336(0xb5)]?.[_0x4e3336(0xac)]():undefined;if(!_0x3c47fa&&!isFreshCheck(_0x4942d3,_0x46bce5)){const _0x54a78a=await getCliVersionPolicy();_0x3c47fa=_0x54a78a?.[_0x4e3336(0x96)]?.[_0x4e3336(0xac)]()||undefined,await writeUpdateNoticeCache({..._0x4942d3,'checkedAt':_0x46bce5,'latest':_0x3c47fa,'failed':!_0x3c47fa});}if(!_0x3c47fa||!a323_0x1f164b[_0x4e3336(0x9e)](_0x403e64)||!a323_0x1f164b['valid'](_0x3c47fa))return null;if(a323_0x1f164b[_0x4e3336(0x9f)](_0x403e64,_0x3c47fa))return null;if(isRecentlyNotified(_0x4942d3,_0x3c47fa,_0x46bce5))return null;const _0x134274=CLI_BIN_NAME+_0x4e3336(0xa3);return await writeUpdateNoticeCache({..._0x4942d3,'checkedAt':isFreshCheck(_0x4942d3,_0x46bce5)?_0x4942d3['checkedAt']:_0x46bce5,'latest':_0x3c47fa,'failed':![],'lastNotifiedVersion':_0x3c47fa,'lastNotifiedAt':_0x46bce5}),{'command':_0x134274,'current':_0x403e64,'latest':_0x3c47fa,'url':buildNpmVersionUrl(_0x3c47fa),'message':CLI_BIN_NAME+'\x20'+_0x3c47fa+_0x4e3336(0xa0)+_0x403e64+_0x4e3336(0xaa)+_0x134274};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f1f48,_0x852c23){var _0x4f017d=a324_0x39cd,_0x5c79a5=_0x4f1f48();while(!![]){try{var _0x457b74=-parseInt(_0x4f017d(0x1ac))/0x1*(parseInt(_0x4f017d(0x1aa))/0x2)+-parseInt(_0x4f017d(0x1a8))/0x3+-parseInt(_0x4f017d(0x1a7))/0x4*(-parseInt(_0x4f017d(0x1ae))/0x5)+-parseInt(_0x4f017d(0x1ab))/0x6+-parseInt(_0x4f017d(0x1ad))/0x7+-parseInt(_0x4f017d(0x1a9))/0x8+parseInt(_0x4f017d(0x1af))/0x9;if(_0x457b74===_0x852c23)break;else _0x5c79a5['push'](_0x5c79a5['shift']());}catch(_0x117901){_0x5c79a5['push'](_0x5c79a5['shift']());}}}(a324_0x3181,0x4c9a3));import{VERSION}from'../generated/build-info.js';function a324_0x39cd(_0x3a6cbd,_0x5924ec){_0x3a6cbd=_0x3a6cbd-0x1a7;var _0x3181f3=a324_0x3181();var _0x39cdeb=_0x3181f3[_0x3a6cbd];return _0x39cdeb;}export function getCliVersion(){return VERSION;}function a324_0x3181(){var _0xc4dec5=['151805ESToUl','19334619FOzqHv','44nSwOTT','1743927rhCXPX','4612232qsKtLc','4460DduKSB','1450890SDaIBP','223HHNTBf','1900892VaVNVu'];a324_0x3181=function(){return _0xc4dec5;};return a324_0x3181();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x508464,_0x2d2dda){var _0x191e8b=a325_0x1db4,_0x4d9a68=_0x508464();while(!![]){try{var _0x4bf5fc=parseInt(_0x191e8b(0x17d))/0x1*(parseInt(_0x191e8b(0x182))/0x2)+-parseInt(_0x191e8b(0x181))/0x3+parseInt(_0x191e8b(0x17f))/0x4+parseInt(_0x191e8b(0x183))/0x5*(parseInt(_0x191e8b(0x17b))/0x6)+-parseInt(_0x191e8b(0x17a))/0x7*(parseInt(_0x191e8b(0x17e))/0x8)+-parseInt(_0x191e8b(0x180))/0x9+-parseInt(_0x191e8b(0x179))/0xa*(-parseInt(_0x191e8b(0x17c))/0xb);if(_0x4bf5fc===_0x2d2dda)break;else _0x4d9a68['push'](_0x4d9a68['shift']());}catch(_0x110637){_0x4d9a68['push'](_0x4d9a68['shift']());}}}(a325_0x29d8,0x4f2de));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a325_0x1db4(_0x384e7d,_0x1d1ac6){_0x384e7d=_0x384e7d-0x179;var _0x29d83f=a325_0x29d8();var _0x1db4cc=_0x29d83f[_0x384e7d];return _0x1db4cc;}export async function withActiveCookie(_0x2a23f1,_0x293b81){setActiveCookie(_0x2a23f1);try{return await _0x293b81();}finally{clearActiveCookie();}}function a325_0x29d8(){var _0x79431b=['58715uZYzDw','42472roLtkR','1519632jmwnSv','4452696wpCWbv','1445502FSKkUT','8kXLxQy','115OOYdRf','1019680aiMoQC','133VOFNcB','45702zSzKKr','66igkuTN'];a325_0x29d8=function(){return _0x79431b;};return a325_0x29d8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1e6d65,_0x5cf31b){var _0x39a3e4=a326_0x1cf6,_0x54e352=_0x1e6d65();while(!![]){try{var _0x30976e=-parseInt(_0x39a3e4(0x93))/0x1+-parseInt(_0x39a3e4(0x95))/0x2+parseInt(_0x39a3e4(0x8f))/0x3*(parseInt(_0x39a3e4(0x90))/0x4)+parseInt(_0x39a3e4(0x8d))/0x5*(-parseInt(_0x39a3e4(0x94))/0x6)+-parseInt(_0x39a3e4(0x8c))/0x7*(-parseInt(_0x39a3e4(0x92))/0x8)+-parseInt(_0x39a3e4(0x91))/0x9*(parseInt(_0x39a3e4(0x8b))/0xa)+parseInt(_0x39a3e4(0x8e))/0xb;if(_0x30976e===_0x5cf31b)break;else _0x54e352['push'](_0x54e352['shift']());}catch(_0x26d72c){_0x54e352['push'](_0x54e352['shift']());}}}(a326_0x1912,0x204db));export function writeCliSideChannelLine(_0x36c014){process['stderr']['write'](_0x36c014+'\x0a');}function a326_0x1cf6(_0x590acf,_0x54b24d){_0x590acf=_0x590acf-0x8b;var _0x191210=a326_0x1912();var _0x1cf603=_0x191210[_0x590acf];return _0x1cf603;}function a326_0x1912(){var _0x43cde0=['20BHRUyL','7NVWWfr','1006795HfCImF','5446771CLXEzj','145107PHKXRr','4CZnzvY','292374cypTkw','834064HXZNDk','28691BgfKWr','6OSGLOj','440902rAecXX'];a326_0x1912=function(){return _0x43cde0;};return a326_0x1912();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.5.2-beta.
|
|
3
|
+
"version": "2.5.2-beta.3",
|
|
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": [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase
|
|
3
|
-
version: 2.5.2-beta.
|
|
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, database connections, pages, SQL, Backend Functions, 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, project creation, api pull/codegen, dblink, page, SQL, BFF, menu, notification, knowledge base, kb search, Agent Context Rules, RULES.md, DATABASE.md, rule list/get/set, role, file/OCR, or related development workflows."
|
|
3
|
+
version: 2.5.2-beta.3
|
|
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, SQL, Backend Functions, 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, SQL, BFF, 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:
|
|
7
7
|
bins: ["rabetbase"]
|
|
@@ -29,6 +29,7 @@ metadata:
|
|
|
29
29
|
9. **本地 SQL / Backend Function 目录**:新建或长期维护的源文件应落在 CLI 与 `bff status` / `sql pull` 一致的路径,避免写在 `src/`、`queries/` 等随意目录后再迁移。
|
|
30
30
|
- **SQL**:项目根 **`.rabetbase/sql/<appCode>/<dbName|db-<id>>/<sqlCode>_<sqlName>.sql|xml`**;草稿或人工兜底可放 `.draft.sql`。`sql create` / `sql pull` / `sql push` / `sql status` 默认围绕这套目录与 `.rabetbase/sql.lock.json` 工作。
|
|
31
31
|
- **Backend Function**:**`.rabetbase/bff/<appCode>/...`**(由 `bff create` 创建或 `bff pull` 同步;与 `bff status` / `bff push` 扫描范围一致)。详见 [`guides/sql-creation-workflow.md`](guides/sql-creation-workflow.md)、[`guides/bff-creation-workflow.md`](guides/bff-creation-workflow.md)。
|
|
32
|
+
- **Instant API Policy**:**`.rabetbase/instant-api-policy/<appCode>/policy.json`**。`instant-api-policy init/pull/validate/publish` 只读取或写入这一固定文件,不接受任意 `--file`。
|
|
32
33
|
10. **运行态查数显式交接** — `rabetbase` 只负责 Dataset 结构与研发发布。不需要真实行数据时,`lovrabet` CLI 可以不装。一旦要验证真实业务行数据,必须交接给 **`lovrabet data filter/getOne`**;不可用时报告阻断并提示安装 `lovrabet` Skill 与 CLI。不要调用已移除的 `rabetbase data filter/getOne`,也不要由本 Skill 静默安装或修复运行态 CLI。`rabetbase sql exec` 只验证已发布 SQL,不是行数据查询的通用替代。详见 [`guides/data-api-guidelines.md`](guides/data-api-guidelines.md)。
|
|
33
34
|
|
|
34
35
|
## Skill Freshness
|
|
@@ -53,7 +54,7 @@ metadata:
|
|
|
53
54
|
- 需要了解数据集关联关系时用 `rabetbase dataset relations --format compress`(或 `json`);需要审计关系事实错误和人工复核项时用 `rabetbase dataset relation-audit --format compress`
|
|
54
55
|
- 需要从文本需求创建新的 `METADATA` 数据集时,先读 [`dataset generate-start/status`](references/rabetbase-dataset-generate.md),执行 preview 写出 design 文件,审阅后用 `generate-start --apply --design-file` 提交任务,再用 `generate-status` 查询到成功
|
|
55
56
|
- **管理物理库连接 / 测连 / 同步表结构分析**时用 `rabetbase db …`(先 [`db list`](references/rabetbase-db-list.md),trace/plan id 见 [`database-connection-workflow.md`](guides/database-connection-workflow.md))
|
|
56
|
-
-
|
|
57
|
+
- **为独立部署同步研发元数据**时读 [`deployment sync`](references/rabetbase-deployment-sync.md):局部同步使用精确 type/codes;需要同步当前应用全部已支持研发元数据时使用 `deployment sync-all`;提交成功后按 jobId 查询状态,提交结果未知时用 `sync-jobs` 恢复任务事实
|
|
57
58
|
- DBAgent 增量分析默认先执行一次异步差异刷新:调用 `db diff-refresh-start`,保存 traceId,并用 `db diff-refresh-status` 查询同一任务到终态;成功后按原始意图执行 `db diff --all`(差异表)或 `db tables`(全部表)。无论 `tableCount` 大小都执行刷新;只有用户明确表示“不需要分析”“不刷新”或“只看现有结果”时才跳过异步刷新,并说明结果可能不是最新事实
|
|
58
59
|
- 需要查看全部表(含无差异表)或主动重新分析既有表时,用 `db tables`;它固定聚合全表分页。`db diff --all` 只聚合全部差异分页
|
|
59
60
|
- DB 增量分析先对完整 `toAnalyzeTables` 执行 `db analyze-batch-plan`;它生成的是本地批次方案,不是服务端 `planId`,也不会创建任务。再严格按批次顺序启动;每批独立保存 `planId`(即 `analyze-start` 返回值),当前批次到达已知终态前不得启动下一批
|
|
@@ -61,6 +62,7 @@ metadata:
|
|
|
61
62
|
- 输出很大且只需子集时,在 `compress`/`json` 上加 `--jq '.data…'` 缩小结果
|
|
62
63
|
- 需要真实业务行数据时必须交接给 `lovrabet data filter/getOne`;`lovrabet` 不可用时报告阻断并提示安装 Skill 与 CLI,不要静默安装或修复,也不要用 `rabetbase sql exec` 当行数据替代,见 [`guides/data-api-guidelines.md`](guides/data-api-guidelines.md)
|
|
63
64
|
- 需要 `src/api/api.ts` / `client.ts` 时:先 `rabetbase api pull --format compress` 取 `data.models`、`data.files`、`data.needsAgentMerge`,再按 [`sdk-client-generation.md`](guides/sdk-client-generation.md) 更新 TypeScript。`api pull` 默认**不会覆盖已有** `api.ts`/`client.ts`;只有用户明确要求放弃本地定制并完整重建时才使用 `--force --yes`
|
|
65
|
+
- 需要按 Dataset + API 配置 Instant API 的 `allow`、`deny` 或 `route` 时,先读取 [`rabetbase-instant-api-policy.md`](references/rabetbase-instant-api-policy.md),只编辑固定 `policy.json`,随后依次执行 `validate`、`publish --dry-run`,经人工确认后再正式发布
|
|
64
66
|
3. **SQL 工作流严格分步**
|
|
65
67
|
- 推荐路径:查现有(`sql list/detail`) 或新建(`sql create`) → 拉/落本地(`sql pull` / `sql create`) → 编辑同步目录文件 → 可选校验(`sql validate`) → 检查状态(`sql status`) → 先预览(`sql push --dry-run` / `sql delete --dry-run`) → 再 `sql push` / `sql delete` → `sql detail` / `sql exec` 验证
|
|
66
68
|
- 先使用 `sql list/detail` 查找可复用的 Custom SQL;没有满足需求的资源时,按照 [`sql-creation-workflow.md`](guides/sql-creation-workflow.md) 与 [`sql-mybatis.md`](guides/sql-mybatis.md) 创建、校验、发布并验证
|
|
@@ -195,7 +197,7 @@ metadata:
|
|
|
195
197
|
- **不要猜字段名** — 必须从 `dataset detail` 返回值获取真实字段名、类型、枚举值
|
|
196
198
|
- **不要跳过 validate 与 dry-run** — 修改已有 SQL 并准备 `sql push` 前,必须先跑 `sql validate`;创建 SQL 或执行高风险同步前至少确认过 `sql create --dry-run`、`sql push --dry-run` 或 `sql delete --dry-run` 的预览
|
|
197
199
|
- **不要手动拼 API URL** — 所有操作通过 CLI 命令完成,不要直接调 HTTP 接口
|
|
198
|
-
-
|
|
200
|
+
- **不要自动重提部署同步** — 局部同步部分失败时保留逐项结果;应用范围提交结果不确定时先用 `deployment sync-jobs` 恢复任务事实,不得把非零退出误报为全部成功或直接重试
|
|
199
201
|
- **不要向产品用户展开研发实现** — 回答角色权限操作时,不输出工程仓库、Controller、数据库表、接口路径、MR 排查或迁移过程;只说明 CLI 命令、角色边界、风险和可验证结果
|
|
200
202
|
- **不要臆测 sqlCode / id** — 从 `sql list` 或 `bff list` 获取真实标识
|
|
201
203
|
- **不要臆测 dblink id 或分析 trace/plan id** — 从 `db list` / `db detail` / `db analyze-start` 的返回字段获取(见 [database-connection-workflow.md](guides/database-connection-workflow.md))
|
|
@@ -208,6 +210,7 @@ metadata:
|
|
|
208
210
|
- **不要跳过 Dataset rename 最终线上回查** — 连续重命名后必须按 code 重新查询线上名称,不能只相信本地 plan 或 dry-run
|
|
209
211
|
- **不要把 MCP 工具名当 CLI 命令** — 使用 `rabetbase sql list`,不是 `list_sql_queries`
|
|
210
212
|
- **不要擅自加 `--global`** — 见上文「配置作用域原则」;默认写项目、读合并;仅在用户明确要求或文档说明的场景使用 `--global`。
|
|
213
|
+
- **不要为 Instant API Policy 传任意文件路径或写入 app-config** — 策略只使用 `.rabetbase/instant-api-policy/<appCode>/policy.json` 与独立策略接口;发布和回滚前必须校验并预览。
|
|
211
214
|
|
|
212
215
|
## 接口选型优先级
|
|
213
216
|
|
|
@@ -316,6 +319,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
316
319
|
| 修改配置文件 | [`rabetbase config set <key> <value>`](references/rabetbase-config.md) | 默认写项目;无项目配置且未 `--global` 会拒绝;`--global` 写 `~/.rabetbase.json` |
|
|
317
320
|
| 列出配置 | [`rabetbase config list`](references/rabetbase-config.md) | 查看当前生效的配置 |
|
|
318
321
|
| 管理运行态 app-config | [`rabetbase app-config list/get/set/delete`](references/rabetbase-app-config.md) | 运行态 app-config 管理面;默认不输出明文 value;`set` 为 `write`,`delete` 保持 `high-risk-write` |
|
|
322
|
+
| 管理 Instant API 数据集访问策略 | [`rabetbase instant-api-policy init/current/pull/validate/publish/revisions/revision/rollback`](references/rabetbase-instant-api-policy.md) | 固定文件 `.rabetbase/instant-api-policy/<appCode>/policy.json`;`version` 是 JSON 结构版本,`revision` 是发布历史版本;publish/rollback 为 high-risk-write |
|
|
319
323
|
| 管理和检索当前研发应用的企业知识库 | [`rabetbase kb list/detail/search/create/update/delete`](references/rabetbase-kb.md) | 管理仅 company scope;search 固定 Development 且仅 `public/company`;`create/update` 为 `write`,`delete` 保持 `high-risk-write` |
|
|
320
324
|
| 管理当前研发应用的 Agent context 规则 | [`rabetbase rule list/get/set`](references/rabetbase-rule.md) | `RULES.md` 供页面、API 等研发 Agent 使用且排除 DB Agent;`DATABASE.md` 仅供数据库分析时 DB Agent 使用;两者在各自流程全程参与 context;set 为 `write`,先 dry-run |
|
|
321
325
|
| 查询或管理应用级通知配置 | [`rabetbase notification config-list`](references/rabetbase-notification-config-list.md) / [`rabetbase notification config-create`](references/rabetbase-notification-config-mutations.md) / [`rabetbase notification config-update`](references/rabetbase-notification-config-mutations.md) / [`rabetbase notification config-delete`](references/rabetbase-notification-config-mutations.md) | list 获取 Backend Function 所需 `configCode`;写入只接收单一敏感 JSON 源,先 dry-run;update/delete 必须 `--yes` |
|
|
@@ -329,7 +333,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
329
333
|
| 查看/管理开发角色 | [`rabetbase role list/detail/update/delete`](references/rabetbase-role-list.md) | 角色类型为 ADMIN/DEV/OWNER/CUSTOM;仅 CUSTOM 可改/删;当前不提供 create;输出 `scope: dev` |
|
|
330
334
|
| 解析昵称/用户名到 userId | [`rabetbase role user-resolve`](references/rabetbase-role-user-resolve.md) | 基于租户成员目录;重名时列出候选 ID,再把选中的 ID 传给 `role user-add/user-remove --user <id>` |
|
|
331
335
|
| 查询租户人员列表 | [`rabetbase tenant members-list --tenant-code <code>`](references/rabetbase-tenant-members-list.md) | 先校验当前账号所属租户,再返回全量人员;不分页、不输出邮箱/手机号/头像 |
|
|
332
|
-
| 查询应用人员及角色列表 | [`rabetbase app members-list --appcode <code>`](references/rabetbase-app-members-list.md) | 按 userId 去重并聚合 `roles[]
|
|
336
|
+
| 查询应用人员及角色列表 | [`rabetbase app members-list --appcode <code>`](references/rabetbase-app-members-list.md) | 按 userId 去重并聚合 `roles[]`;角色归属输出 `roleCode`,同时保留 ACTIVE/PENDING 状态 |
|
|
333
337
|
| 把开发协作者加入/移出角色 | [`rabetbase role user-add / user-remove`](references/rabetbase-role-user-add.md) | 只改目标开发角色;OWNER 直接拒绝;`high-risk-write`,先 `--dry-run` |
|
|
334
338
|
| 按 ID 删除菜单或目录树 | [`rabetbase menu delete`](references/rabetbase-menu-delete.md) | 精确删除空 folder/非 folder 叶子;非空 folder 显式 `--recursive`,计划按叶子优先批量提交并回读 |
|
|
335
339
|
| 创建空菜单分组 | [`rabetbase menu group-create`](references/rabetbase-menu-group-create.md) | group 持久化为 `type=folder`,保留平台生成的非空 path;先 dry-run 并检查创建位置与排序 |
|
|
@@ -369,6 +373,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
369
373
|
| 恢复已删除页面 | [`rabetbase page restore --id <pageId>`](references/rabetbase-page-restore.md) | 支持 `DATA_LIST|CUSTOM` 自动识别;跨类型同 ID 时显式传 `--page-type` |
|
|
370
374
|
| 数据库连接(dblink)/ 测连 / 结构分析 | [`rabetbase db list`](references/rabetbase-db-list.md) 起 | **`id`**、**trace/plan id** 与“终态 + 复跑 diff”完成口径见 [database-connection-workflow.md](guides/database-connection-workflow.md);各子命令见 `references/rabetbase-db-*.md` |
|
|
371
375
|
| 独立部署局部同步研发元数据 | [`rabetbase deployment sync`](references/rabetbase-deployment-sync.md) | 显式命令为 `write`;日常 BFF/SQL push 自动同步当前 push 的实际变更,服务端负责能力检查与目标处理;Dataset 保持显式确认;失败或结果不确定时不自动重试 |
|
|
376
|
+
| 独立部署应用范围同步 | [`rabetbase deployment sync-all`](references/rabetbase-deployment-sync.md) | `write`;只提交 appCode;保存 jobId 后查询状态,结果未知时用 `sync-jobs` 恢复任务事实,不自动重提 |
|
|
372
377
|
| 生成 / 更新 API 客户端代码 | [`rabetbase api pull`](references/rabetbase-api-pull.md) → [`sdk-client-generation.md`](guides/sdk-client-generation.md) | `api pull` 拉 Dataset 事实并刷新 `sdk-config.ts`;已有 `api.ts`/`client.ts` 按 guide 合并更新 |
|
|
373
378
|
| 查看生成的 API 模型 | [`rabetbase api list`](references/rabetbase-api-list.md) | 列出已生成的数据模型 |
|
|
374
379
|
| 查看现有 SQL | [`rabetbase sql list --name "xxx"`](references/rabetbase-sql-list.md) | 分页,按名称过滤;默认查当前决议到的单个应用 |
|
|
@@ -420,6 +425,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
420
425
|
| File | [`upload` / `query-url`](references/rabetbase-file.md) |
|
|
421
426
|
| Configuration | [`config set/get/list/delete`](references/rabetbase-config.md) |
|
|
422
427
|
| Runtime App Config Management | [`app-config list/get/set/delete`](references/rabetbase-app-config.md) |
|
|
428
|
+
| Instant API Policy | [`instant-api-policy init/current/pull/validate/publish/revisions/revision/rollback`](references/rabetbase-instant-api-policy.md) |
|
|
423
429
|
| Company Knowledge Base | [`kb list/detail/search/create/update/delete`](references/rabetbase-kb.md) |
|
|
424
430
|
| Agent Context Rules | [`rule list/get/set`](references/rabetbase-rule.md) |
|
|
425
431
|
| Menu | [`list`](references/rabetbase-menu-list.md) / [`external-link-create`](references/rabetbase-menu-external-link-create.md) / [`external-link-update`](references/rabetbase-menu-external-link-update.md) / [`rename`](references/rabetbase-menu-rename.md) / [`sync`](references/rabetbase-menu-sync.md) / [`asset-update`](references/rabetbase-menu-asset-update.md) / [`delete`](references/rabetbase-menu-delete.md) / [`group-create`](references/rabetbase-menu-group-create.md) / [`group-update`](references/rabetbase-menu-group-update.md) / [`move`](references/rabetbase-menu-move.md) / [`regroup-start`](references/rabetbase-menu-regroup-start.md) |
|
|
@@ -432,7 +438,7 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
432
438
|
| 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) |
|
|
433
439
|
| 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) |
|
|
434
440
|
| 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) / [`tables`](references/rabetbase-db-tables.md) / [`diff`](references/rabetbase-db-diff.md) / [`diff-refresh-start/status`](references/rabetbase-db-diff-refresh.md) |
|
|
435
|
-
| Deployment | [`sync`](references/rabetbase-deployment-sync.md) |
|
|
441
|
+
| Deployment | [`sync`](references/rabetbase-deployment-sync.md) / [`sync-all` / `sync-status` / `sync-jobs`](references/rabetbase-deployment-sync.md) |
|
|
436
442
|
| api commands | [`pull`](references/rabetbase-api-pull.md) / [`list`](references/rabetbase-api-list.md) |
|
|
437
443
|
| sql commands | [`list`](references/rabetbase-sql-list.md) / [`detail`](references/rabetbase-sql-detail.md) / [`create`](references/rabetbase-sql-create.md) / [`status`](references/rabetbase-sql-status.md) / [`pull`](references/rabetbase-sql-pull.md) / [`push`](references/rabetbase-sql-push.md) / [`delete`](references/rabetbase-sql-delete.md) / [`validate`](references/rabetbase-sql-validate.md) / [`save`(deprecated)](references/rabetbase-sql-save.md) / [`exec`](references/rabetbase-sql-exec.md) |
|
|
438
444
|
| bff commands | [`list`](references/rabetbase-bff-list.md) / [`detail`](references/rabetbase-bff-detail.md) / [`create`](references/rabetbase-bff-create.md) / [`status`](references/rabetbase-bff-status.md) / [`pull`](references/rabetbase-bff-pull.md) / [`push`](references/rabetbase-bff-push.md) / [`delete`](references/rabetbase-bff-delete.md) |
|
|
@@ -29,6 +29,7 @@ rabetbase app members-list --appcode app-example --format compress
|
|
|
29
29
|
"roles": [
|
|
30
30
|
{
|
|
31
31
|
"roleId": 2,
|
|
32
|
+
"roleCode": "developer",
|
|
32
33
|
"roleName": "开发者",
|
|
33
34
|
"roleType": "DEV",
|
|
34
35
|
"membershipStatus": "ACTIVE"
|
|
@@ -42,6 +43,7 @@ rabetbase app members-list --appcode app-example --format compress
|
|
|
42
43
|
```
|
|
43
44
|
|
|
44
45
|
- `membershipStatus` 为 `ACTIVE`(正式成员)或 `PENDING`(待加入成员)。
|
|
46
|
+
- 每条角色归属包含服务端稳定业务标识 `roleCode`。
|
|
45
47
|
- 同一用户只要存在一个 ACTIVE 角色,顶层 `status` 即为 `ACTIVE`;全部角色待加入时为 `PENDING`。
|
|
46
48
|
- 人员按 `userId` 升序;角色按 `roleId` 升序,同角色下 ACTIVE 排在 PENDING 前。
|
|
47
49
|
- `username`、`displayName` 缺失时为 `null`;不会用 userId 伪造。
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
# rabetbase deployment sync
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
将当前应用中的少量研发元数据同步到独立部署系统。命令只同步显式给出的业务编码,支持 `dataset`、`bff`、`sql`。
|
|
4
|
+
|
|
5
|
+
需要同步当前应用中服务端支持的全部研发元数据时,不要猜测或枚举资源类型和编码,改用本文后半部分的 `deployment sync-all`。
|
|
4
6
|
|
|
5
7
|
## 使用前确认
|
|
6
8
|
|
|
7
9
|
- 已完成 rabetbase 认证,并明确目标应用的 `appCode`。
|
|
8
10
|
- 从可信事实中取得业务编码,不猜测 DatasetCode、function name 或 sqlCode。
|
|
9
|
-
-
|
|
11
|
+
- Agent 只提供下方列出的业务参数。
|
|
10
12
|
- 服务端会检查 appCode 白名单;未开启时正常跳过,不属于异常或无权限。
|
|
11
|
-
-
|
|
13
|
+
- 一次命令最多 100 个编码;CLI 串行处理,不并发执行。
|
|
12
14
|
|
|
13
15
|
## 先预览
|
|
14
16
|
|
|
@@ -21,7 +23,7 @@ rabetbase deployment sync \
|
|
|
21
23
|
--format compress
|
|
22
24
|
```
|
|
23
25
|
|
|
24
|
-
检查 `data.selector.bizType` 和 `data.selector.bizCodes`;dry-run
|
|
26
|
+
检查 `data.selector.bizType` 和 `data.selector.bizCodes`;dry-run 不发起同步请求。
|
|
25
27
|
|
|
26
28
|
## 正式执行
|
|
27
29
|
|
|
@@ -41,7 +43,7 @@ rabetbase deployment sync \
|
|
|
41
43
|
|
|
42
44
|
- `--type dataset|bff|sql`:同步资源类型。
|
|
43
45
|
- `--codes`:逗号分隔;命令 trim、过滤空项并按首次出现顺序去重,最多 100 个。
|
|
44
|
-
- Agent 只提供 `--type`、`--codes`
|
|
46
|
+
- Agent 只提供 `--type`、`--codes` 和执行确认。
|
|
45
47
|
|
|
46
48
|
## 结果与失败处理
|
|
47
49
|
|
|
@@ -62,3 +64,37 @@ Dataset 同步会逐项处理 Dataset 元数据,不是跨资源原子事务。
|
|
|
62
64
|
- Dataset 没有统一 push 入口,继续使用显式 `deployment sync --type dataset`;不要在 `dataset generate-status` 等只读命令中触发同步。
|
|
63
65
|
- 主 push 成功但后置同步失败时,不声称回滚主操作;按 `data.deploymentSync.recoveryCommand` 人工处理。
|
|
64
66
|
- `partial_failure`、`failed`、`outcome_unknown` 均不得自动重试。
|
|
67
|
+
|
|
68
|
+
## 应用范围同步
|
|
69
|
+
|
|
70
|
+
用户明确要求同步当前应用全部已支持研发元数据时,先预览:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
rabetbase deployment sync-all \
|
|
74
|
+
--appcode <appCode> \
|
|
75
|
+
--dry-run \
|
|
76
|
+
--format compress
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
经用户确认后,复用预览中的 appCode 提交:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
rabetbase deployment sync-all \
|
|
83
|
+
--appcode <appCode> \
|
|
84
|
+
--confirm \
|
|
85
|
+
--yes \
|
|
86
|
+
--format compress
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
- `outcome=not_needed`:服务端判定当前应用无需同步,属于正常完成,不解释为异常或无权限。
|
|
90
|
+
- `outcome=submitted`:保存 `jobId`,再用 `deployment sync-status` 查询同一任务。
|
|
91
|
+
- 提交结果未知:不得再次执行 `sync-all`;先用 `deployment sync-jobs` 查找近期任务。
|
|
92
|
+
|
|
93
|
+
任务查询:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
rabetbase deployment sync-status --job-id <jobId> --format compress
|
|
97
|
+
rabetbase deployment sync-jobs --appcode <appCode> --format compress
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
只根据 `isTerminal` 判断是否已知终态;若为 `null`,保留服务端状态并交给用户判断。逐项资源类型和 action 都是服务端开放字符串,Agent 不建立枚举闭集,也不因新值自动重提。
|