@lovrabet/rabetbase-cli 2.5.2-beta.3 → 2.5.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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.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.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/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/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.d.ts +0 -8
- 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/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.d.ts +4 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.d.ts +5 -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 +0 -26
- 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.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.d.ts +43 -0
- 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.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
- package/skills/rabetbase/SKILL.md +5 -5
- package/skills/rabetbase/guides/custom-page-workflow.md +35 -17
- package/skills/rabetbase/guides/page-development-workflow.md +1 -1
- package/skills/rabetbase/knowledge/components.md +292 -0
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +74 -4
- package/skills/rabetbase/knowledge/custom-page/page-templates.md +68 -0
- package/skills/rabetbase/references/rabetbase-page-create.md +21 -9
- package/skills/rabetbase/references/rabetbase-page-custom-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-custom-update.md +13 -9
- package/skills/rabetbase/references/rabetbase-project-create.md +5 -2
- package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +2 -2
- package/skills/rabetbase/references/rabetbase-run.md +1 -0
- package/skills/rabetbase.manifest.json +5 -4
- package/templates/README.md +10 -4
- package/templates/custom-pages/blank.json +5 -0
- package/templates/custom-pages/dashboard.json +5 -0
- package/templates/custom-pages/onepage.json +5 -0
- package/templates/generate-api/api.ts.tpl +1 -1
- package/lib/commands/page/custom/template.d.ts +0 -8
- package/lib/commands/page/custom/template.js +0 -1
- package/skills/rabetbase/knowledge/custom-page/components.md +0 -225
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a69e9,_0x36479e){const _0x1d0b62=a310_0x4f36,_0xda212e=_0x4a69e9();while(!![]){try{const _0x32abe9=-parseInt(_0x1d0b62(0x1c8))/0x1*(parseInt(_0x1d0b62(0x1d1))/0x2)+-parseInt(_0x1d0b62(0x1cb))/0x3*(parseInt(_0x1d0b62(0x1ca))/0x4)+-parseInt(_0x1d0b62(0x1ce))/0x5+parseInt(_0x1d0b62(0x1d3))/0x6*(-parseInt(_0x1d0b62(0x1bd))/0x7)+parseInt(_0x1d0b62(0x1c3))/0x8*(-parseInt(_0x1d0b62(0x1bc))/0x9)+parseInt(_0x1d0b62(0x1bb))/0xa+parseInt(_0x1d0b62(0x1be))/0xb*(parseInt(_0x1d0b62(0x1cd))/0xc);if(_0x32abe9===_0x36479e)break;else _0xda212e['push'](_0xda212e['shift']());}catch(_0xc3f0ed){_0xda212e['push'](_0xda212e['shift']());}}}(a310_0x1096,0x9da5b));import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;function pickString(_0x5d0fe7){const _0x417584=a310_0x4f36;return typeof _0x5d0fe7===_0x417584(0x1c7)&&_0x5d0fe7['trim']()['length']>0x0?_0x5d0fe7[_0x417584(0x1c9)]():null;}function a310_0x1096(){const _0x295dad=['31836krurlr','2146190oCbPlr','application/json','latestVersion','464586GYAlUT','minimumVersion','989622wKSKdp','now','7484710tYhqam','63zbKGHk','49ruFXGz','11110vACxvA','recommendedVersion','json','object','stableVersion','46056FYJumV','upgradeMessage','cli','signal','string','2axKVpX','trim','2774384MgMLim','3evqrML','abort'];a310_0x1096=function(){return _0x295dad;};return a310_0x1096();}function normalizeCliVersionPolicy(_0x4e23ef){const _0x3cbc6d=a310_0x4f36;if(!_0x4e23ef||typeof _0x4e23ef!==_0x3cbc6d(0x1c1))return null;const _0x5e38c0=_0x4e23ef,_0x16b94f=_0x5e38c0[_0x3cbc6d(0x1c5)]&&typeof _0x5e38c0[_0x3cbc6d(0x1c5)]===_0x3cbc6d(0x1c1)?_0x5e38c0[_0x3cbc6d(0x1c5)]:_0x5e38c0,_0x3e57ab=pickString(_0x16b94f[_0x3cbc6d(0x1c2)])||pickString(_0x16b94f[_0x3cbc6d(0x1d0)])||pickString(_0x16b94f[_0x3cbc6d(0x1bf)]),_0x229e97=pickString(_0x16b94f[_0x3cbc6d(0x1d2)])||pickString(_0x16b94f['minVersion']);if(!_0x3e57ab&&!_0x229e97)return null;return{'stableVersion':_0x3e57ab,'minimumVersion':_0x229e97,'upgradeMessage':pickString(_0x16b94f[_0x3cbc6d(0x1c4)])||undefined,'minimumVersionMessage':pickString(_0x16b94f['minimumVersionMessage'])||undefined};}export async function fetchRabetbaseCdnConfig(){const _0xeebcfc=a310_0x4f36,_0xbf868=new AbortController(),_0x520642=setTimeout(()=>_0xbf868[_0xeebcfc(0x1cc)](),FETCH_TIMEOUT_MS);try{const _0x508441=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0xeebcfc(0x1cf)},'signal':_0xbf868[_0xeebcfc(0x1c6)]});if(!_0x508441['ok'])return null;const _0x121a61=await _0x508441[_0xeebcfc(0x1c0)]();return _0x121a61&&typeof _0x121a61===_0xeebcfc(0x1c1)?_0x121a61:null;}catch{return null;}finally{clearTimeout(_0x520642);}}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}function a310_0x4f36(_0x5e7d58,_0x5e5910){_0x5e7d58=_0x5e7d58-0x1bb;const _0x1096b3=a310_0x1096();let _0x4f3653=_0x1096b3[_0x5e7d58];return _0x4f3653;}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x115957=a310_0x4f36,_0x1a5bf9=Date[_0x115957(0x1d4)]();if(hasCachedConfig){const _0x2a1612=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x1a5bf9-cacheTime<_0x2a1612)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x1a5bf9,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3308b7,_0x7f82d0){const _0x6cacdc=a311_0x3492,_0x12daca=_0x3308b7();while(!![]){try{const _0x35db53=parseInt(_0x6cacdc(0x1db))/0x1+-parseInt(_0x6cacdc(0x1e3))/0x2*(parseInt(_0x6cacdc(0x1e5))/0x3)+parseInt(_0x6cacdc(0x1dc))/0x4*(-parseInt(_0x6cacdc(0x1e4))/0x5)+parseInt(_0x6cacdc(0x1df))/0x6*(parseInt(_0x6cacdc(0x1e6))/0x7)+parseInt(_0x6cacdc(0x1e1))/0x8+-parseInt(_0x6cacdc(0x1e2))/0x9*(-parseInt(_0x6cacdc(0x1da))/0xa)+-parseInt(_0x6cacdc(0x1e0))/0xb;if(_0x35db53===_0x7f82d0)break;else _0x12daca['push'](_0x12daca['shift']());}catch(_0x4bdfdb){_0x12daca['push'](_0x12daca['shift']());}}}(a311_0x516d,0x1a761));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a311_0x3c5f47,getMultiAppConfigs as a311_0x544986,getTemplateBaseUrl as a311_0x475c31}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a311_0x516d(){const _0x215e26=['1065208FRzWUE','36rnzQtc','3142OqMXQB','3415eFvjHT','39FCKVQQ','84mqkJLr','45740NVZOLA','11328ZJsxvA','260vbHaqr','string','env','57528OvstsR','1150908QdDVJL'];a311_0x516d=function(){return _0x215e26;};return a311_0x516d();}export{isInProject}from'../context.js';export function readConfig(_0x39cc32){const _0x1c179b=a311_0x3492,_0x27f817=readRawConfig(_0x39cc32);return _0x27f817[_0x1c179b(0x1de)]&&typeof _0x27f817[_0x1c179b(0x1de)]===_0x1c179b(0x1dd)&&initEnv(_0x27f817[_0x1c179b(0x1de)]),_0x27f817;}export function getConfigAppCode(){return a311_0x3c5f47();}export function getMultiAppConfigs(_0x4a16cd='project'){return a311_0x544986(_0x4a16cd);}function a311_0x3492(_0x2951d1,_0x26f895){_0x2951d1=_0x2951d1-0x1da;const _0x516d3b=a311_0x516d();let _0x3492ee=_0x516d3b[_0x2951d1];return _0x3492ee;}export function getTemplateBaseUrl(){return a311_0x475c31();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a312_0x4e2e(_0x16e790,_0x56b89c){_0x16e790=_0x16e790-0x150;const _0x8ecbcf=a312_0x8ecb();let _0x4e2e6c=_0x8ecbcf[_0x16e790];return _0x4e2e6c;}function a312_0x8ecb(){const _0x567f6f=['3ZLfRhP','38330nCcDOy','12YLSKXw','isFinite','object','2153895WMAXAc','trim','1559564rhRwYZ','728371MPxoMD','212751RxNzQK','452392EFgYcY','477UxESfW','138070SwbcVn','string'];a312_0x8ecb=function(){return _0x567f6f;};return a312_0x8ecb();}(function(_0x44cfa1,_0x367221){const _0x1f5f96=a312_0x4e2e,_0x118a4f=_0x44cfa1();while(!![]){try{const _0x4aa766=-parseInt(_0x1f5f96(0x15a))/0x1+-parseInt(_0x1f5f96(0x152))/0x2*(parseInt(_0x1f5f96(0x151))/0x3)+-parseInt(_0x1f5f96(0x158))/0x4+parseInt(_0x1f5f96(0x156))/0x5+-parseInt(_0x1f5f96(0x153))/0x6*(parseInt(_0x1f5f96(0x159))/0x7)+-parseInt(_0x1f5f96(0x15b))/0x8+-parseInt(_0x1f5f96(0x15c))/0x9*(-parseInt(_0x1f5f96(0x15d))/0xa);if(_0x4aa766===_0x367221)break;else _0x118a4f['push'](_0x118a4f['shift']());}catch(_0x3f03f9){_0x118a4f['push'](_0x118a4f['shift']());}}}(a312_0x8ecb,0x43678));function toFiniteNumber(_0x4d1485){const _0x6599c2=a312_0x4e2e;if(typeof _0x4d1485==='number'&&Number[_0x6599c2(0x154)](_0x4d1485))return _0x4d1485;if(typeof _0x4d1485===_0x6599c2(0x150)){const _0x2e4d1d=_0x4d1485[_0x6599c2(0x157)]();if(!_0x2e4d1d)return undefined;const _0x5c9ca0=Number(_0x2e4d1d);if(Number['isFinite'](_0x5c9ca0))return _0x5c9ca0;}return undefined;}export function normalizeEntityWithIdResponse(_0x33763a){const _0x51d052=a312_0x4e2e,_0xa7ff05=toFiniteNumber(_0x33763a);if(_0xa7ff05!==undefined)return{'id':_0xa7ff05,'entity':{'id':_0xa7ff05}};if(!_0x33763a||typeof _0x33763a!==_0x51d052(0x155))return{'id':undefined,'entity':{}};const _0x2a2a03={..._0x33763a},_0x2cb281=toFiniteNumber(_0x2a2a03['id']);return _0x2cb281!==undefined&&(_0x2a2a03['id']=_0x2cb281),{'id':_0x2cb281,'entity':_0x2a2a03};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xd8da1,_0xf35b3a){const _0x9b0fb2=a313_0x3f06,_0x776d01=_0xd8da1();while(!![]){try{const _0x584a35=parseInt(_0x9b0fb2(0xe7))/0x1+-parseInt(_0x9b0fb2(0xe0))/0x2+-parseInt(_0x9b0fb2(0xde))/0x3*(parseInt(_0x9b0fb2(0xe5))/0x4)+-parseInt(_0x9b0fb2(0xe4))/0x5*(parseInt(_0x9b0fb2(0xe3))/0x6)+-parseInt(_0x9b0fb2(0xe2))/0x7+-parseInt(_0x9b0fb2(0xe1))/0x8+-parseInt(_0x9b0fb2(0xdf))/0x9*(-parseInt(_0x9b0fb2(0xe6))/0xa);if(_0x584a35===_0xf35b3a)break;else _0x776d01['push'](_0x776d01['shift']());}catch(_0x537907){_0x776d01['push'](_0x776d01['shift']());}}}(a313_0x2e24,0xd9f50));function a313_0x3f06(_0x2f9627,_0x575192){_0x2f9627=_0x2f9627-0xde;const _0x2e24bb=a313_0x2e24();let _0x3f0637=_0x2e24bb[_0x2f9627];return _0x3f0637;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a313_0x2e24(){const _0x3c61c5=['1703162oIgWks','230331LaInUz','27443655msvIUn','1240550EBbwXP','8763744VLDPQQ','5248887hevhWy','6jqmpnM','3131755xfeLcN','40VdRFqA','10XixFvs'];a313_0x2e24=function(){return _0x3c61c5;};return a313_0x2e24();}import{join}from'node:path';export async function copyDir(_0x2c160a,_0x320a05){const _0x5c7710=statSync(_0x2c160a);if(_0x5c7710['isDirectory']()){!existsSync(_0x320a05)&&mkdirSync(_0x320a05,{'recursive':!![]});const _0x8d5457=readdirSync(_0x2c160a);for(const _0x3929e9 of _0x8d5457){await copyDir(join(_0x2c160a,_0x3929e9),join(_0x320a05,_0x3929e9));}}else copyFileSync(_0x2c160a,_0x320a05);}export function ensureDir(_0x12789f){!existsSync(_0x12789f)&&mkdirSync(_0x12789f,{'recursive':!![]});}export function pathExists(_0x196bb2){return existsSync(_0x196bb2);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a314_0x2750e4=a314_0x45d7;(function(_0x4c90d6,_0x5cae9d){const _0x3373c3=a314_0x45d7,_0x32e826=_0x4c90d6();while(!![]){try{const _0x441ec8=parseInt(_0x3373c3(0x185))/0x1*(-parseInt(_0x3373c3(0x19d))/0x2)+parseInt(_0x3373c3(0x184))/0x3+-parseInt(_0x3373c3(0x196))/0x4*(-parseInt(_0x3373c3(0x188))/0x5)+-parseInt(_0x3373c3(0x18b))/0x6+-parseInt(_0x3373c3(0x197))/0x7*(-parseInt(_0x3373c3(0x1a0))/0x8)+-parseInt(_0x3373c3(0x19a))/0x9+-parseInt(_0x3373c3(0x187))/0xa;if(_0x441ec8===_0x5cae9d)break;else _0x32e826['push'](_0x32e826['shift']());}catch(_0x1784dd){_0x32e826['push'](_0x32e826['shift']());}}}(a314_0x356f,0x46c7c));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x4e0c1e=a314_0x45d7,_0x89baf=getTemplateBaseUrl();return _0x89baf+_0x4e0c1e(0x192);}const CACHE_DIR=join(homedir(),'.lovrabet',a314_0x2750e4(0x18f));export async function fetchGuidesFromCDN(){const _0x303605=a314_0x2750e4,_0x2f8e19=getGuidesCdnUrl(),_0x408471=await fetch(_0x2f8e19,{'headers':{'Accept':'application/json'}});if(!_0x408471['ok'])throw new Error('CDN\x20request\x20failed:\x20'+_0x408471['status']+'\x20'+_0x408471['statusText']);const _0xd2d855=await _0x408471['json']();if(!_0xd2d855[_0x303605(0x199)]||typeof _0xd2d855['guides']!==_0x303605(0x18e))throw new Error(_0x303605(0x195));return _0xd2d855;}export function writeGuidesToProject(_0x5aa612,_0x2dda37,_0x2f35a6='.lovrabet/skill/guides',_0x45cd8e){const _0xfc64e2=a314_0x2750e4,_0x2d8afc=join(_0x2dda37,_0x2f35a6);mkdirSync(_0x2d8afc,{'recursive':!![]});for(const [_0x23796a,_0xf7255a]of Object[_0xfc64e2(0x18a)](_0x5aa612[_0xfc64e2(0x199)])){let _0x4abd21=_0xf7255a[_0xfc64e2(0x18d)];_0xf7255a[_0xfc64e2(0x19f)]&&(_0x4abd21=appendUpdateTime(_0x4abd21,_0xf7255a[_0xfc64e2(0x19f)])),writeFileSync(join(_0x2d8afc,_0x23796a+_0xfc64e2(0x19c)),_0x4abd21,_0xfc64e2(0x19e));}}export function appendUpdateTime(_0x48ca82,_0x2624c1){const _0x335c79=a314_0x2750e4;return _0x48ca82=_0x48ca82[_0x335c79(0x1a1)](/\n*>更新时间:.*$/m,''),_0x48ca82['trimEnd']()+(_0x335c79(0x189)+_0x2624c1);}function a314_0x45d7(_0x4f5249,_0x45d1ff){_0x4f5249=_0x4f5249-0x184;const _0x356f6d=a314_0x356f();let _0x45d775=_0x356f6d[_0x4f5249];return _0x45d775;}export function getSkillTemplate(_0x5f1f1a){const _0x2fcda1=a314_0x2750e4;return _0x5f1f1a[_0x2fcda1(0x18c)]?.[_0x2fcda1(0x18d)]||'';}export function appendExtendContents(_0x3717d7,_0xc5a49e,_0x144d76){const _0x56bda1=a314_0x2750e4,_0x31cccc=[];for(const [,_0x40ec7c]of Object['entries'](_0xc5a49e[_0x56bda1(0x199)])){_0x40ec7c['extendContent']&&_0x31cccc['push'](_0x40ec7c[_0x56bda1(0x198)][_0x56bda1(0x194)]());}if(_0x31cccc[_0x56bda1(0x190)]===0x0)return _0x3717d7;return _0x3717d7[_0x56bda1(0x194)]()+'\x0a\x0a'+_0x31cccc[_0x56bda1(0x19b)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x13e0b5,_0x533f75,_0x39833f){const _0x3daa65=a314_0x2750e4,_0x2e2ecf=getSkillTemplate(_0x13e0b5);if(!_0x2e2ecf)throw new Error(_0x3daa65(0x186));const _0x3208a0=dirname(_0x533f75);mkdirSync(_0x3208a0,{'recursive':!![]});let _0x44d003=_0x2e2ecf[_0x3daa65(0x1a1)](/\{\{IDE_NAME\}\}/g,_0x39833f);_0x44d003=appendExtendContents(_0x44d003,_0x13e0b5),_0x13e0b5[_0x3daa65(0x18c)]['lastUpdated']&&(_0x44d003=appendUpdateTime(_0x44d003,_0x13e0b5[_0x3daa65(0x18c)]['lastUpdated'])),writeFileSync(_0x533f75,_0x44d003,_0x3daa65(0x19e));}export async function installGuides(_0x1ff9eb){const _0x126ef1=a314_0x2750e4,_0x1eebf9=await fetchGuidesFromCDN();return writeGuidesToProject(_0x1eebf9,_0x1ff9eb),Object[_0x126ef1(0x193)](_0x1eebf9[_0x126ef1(0x199)])[_0x126ef1(0x190)];}function a314_0x356f(){const _0x53f237=['path','/skills/guides.json','keys','trimEnd','CDN\x20returned\x20invalid\x20data','536WBEdfW','49RwHtjE','extendContent','guides','1149417QsdWAB','join','.md','81218CcYMUt','utf-8','lastUpdated','345024QDcwBV','replace','map','1517262JDGKNf','6UlSYkq','CDN\x20data\x20is\x20missing\x20skillTemplate','2254970YAYUKj','8035vHRMCe','\x0a\x0a>更新时间:','entries','817248qUALTN','skillTemplate','content','object','cache','length'];a314_0x356f=function(){return _0x53f237;};return a314_0x356f();}export function getGuidesSummary(_0x544539){const _0x5b05a1=a314_0x2750e4;return Object[_0x5b05a1(0x18a)](_0x544539[_0x5b05a1(0x199)])[_0x5b05a1(0x1a2)](([_0x4bf629,_0x25c343])=>({'key':_0x4bf629,'title':_0x25c343['title'],'path':_0x25c343[_0x5b05a1(0x191)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x48a88e,_0x54bae8){const _0x3c4fab=a315_0x3e87,_0x14c584=_0x48a88e();while(!![]){try{const _0x2a9789=parseInt(_0x3c4fab(0x128))/0x1+parseInt(_0x3c4fab(0x139))/0x2+parseInt(_0x3c4fab(0x136))/0x3+parseInt(_0x3c4fab(0x129))/0x4+-parseInt(_0x3c4fab(0x138))/0x5+parseInt(_0x3c4fab(0x133))/0x6*(parseInt(_0x3c4fab(0x12b))/0x7)+-parseInt(_0x3c4fab(0x131))/0x8;if(_0x2a9789===_0x54bae8)break;else _0x14c584['push'](_0x14c584['shift']());}catch(_0x24f4bf){_0x14c584['push'](_0x14c584['shift']());}}}(a315_0x5a8b,0xddfcd));function a315_0x5a8b(){const _0x32c18a=['TypeError','name','headers','24071272QmXRaF','content-type','6xLVYKP','status','application/json','2227299GqJjql','text','7139505oQQFJH','978942OYvCxE','abort','AbortError','*\x20Request\x20failed;\x20retry\x20','statusText','includes','get','json','1231430hQxyUQ','5690460AopHzx','ENOTFOUND','10220854jZSOCt','ECONNRESET','message'];a315_0x5a8b=function(){return _0x32c18a;};return a315_0x5a8b();}export async function httpRequest(_0x453f47,_0x20907c={}){const _0xe35f04=a315_0x3e87,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x20907c;let _0xa52bc8=null;for(let _0xffbeb6=0x0;_0xffbeb6<=retries;_0xffbeb6++){try{const _0x2f0ecc=new AbortController(),_0x20be2d=setTimeout(()=>_0x2f0ecc[_0xe35f04(0x13a)](),timeout),_0x321140=await fetch(_0x453f47,{'headers':headers,'signal':_0x2f0ecc['signal']});clearTimeout(_0x20be2d);let _0x2c079b;const _0x6ed809=_0x321140['headers'][_0xe35f04(0x126)](_0xe35f04(0x132));return _0x6ed809?.[_0xe35f04(0x125)](_0xe35f04(0x135))?_0x2c079b=await _0x321140[_0xe35f04(0x127)]():_0x2c079b=await _0x321140[_0xe35f04(0x137)](),{'ok':_0x321140['ok'],'status':_0x321140[_0xe35f04(0x134)],'statusText':_0x321140[_0xe35f04(0x13d)],'data':_0x2c079b,'headers':_0x321140[_0xe35f04(0x130)],'url':_0x321140['url'],'text':()=>_0x321140['text']()};}catch(_0x54ec65){_0xa52bc8=_0x54ec65 instanceof Error?_0x54ec65:new Error(String(_0x54ec65));if(_0xffbeb6===retries)break;if(shouldRetry(_0x54ec65)){console['log'](_0xe35f04(0x13c)+(_0xffbeb6+0x1)+'\x20in\x20'+retryDelay+'ms...'),await sleep(retryDelay);continue;}else break;}}throw _0xa52bc8||new Error('Request\x20failed');}function shouldRetry(_0x2d073e){const _0xbcf3bf=a315_0x3e87;if(_0x2d073e instanceof Error){if(_0x2d073e['name']===_0xbcf3bf(0x13b))return![];if(_0x2d073e[_0xbcf3bf(0x12f)]===_0xbcf3bf(0x12e)&&_0x2d073e[_0xbcf3bf(0x12d)][_0xbcf3bf(0x125)]('fetch'))return!![];if(_0x2d073e[_0xbcf3bf(0x12d)]['includes'](_0xbcf3bf(0x12c)))return!![];if(_0x2d073e[_0xbcf3bf(0x12d)][_0xbcf3bf(0x125)](_0xbcf3bf(0x12a)))return![];}return![];}function a315_0x3e87(_0xda124,_0x3dd5b8){_0xda124=_0xda124-0x125;const _0x5a8b12=a315_0x5a8b();let _0x3e87c7=_0x5a8b12[_0xda124];return _0x3e87c7;}function sleep(_0xb7a6da){return new Promise(_0x21f5c7=>setTimeout(_0x21f5c7,_0xb7a6da));}export function validateUrl(_0x29f375){try{return new URL(_0x29f375),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13adab,_0x407171){const _0x439e9b=a316_0x4696,_0x1f0f65=_0x13adab();while(!![]){try{const _0x14bd8a=parseInt(_0x439e9b(0x1f9))/0x1*(-parseInt(_0x439e9b(0x1f7))/0x2)+-parseInt(_0x439e9b(0x1f3))/0x3+parseInt(_0x439e9b(0x1f1))/0x4+parseInt(_0x439e9b(0x1fb))/0x5+parseInt(_0x439e9b(0x1f4))/0x6+parseInt(_0x439e9b(0x1f0))/0x7+-parseInt(_0x439e9b(0x1f6))/0x8;if(_0x14bd8a===_0x407171)break;else _0x1f0f65['push'](_0x1f0f65['shift']());}catch(_0x22230a){_0x1f0f65['push'](_0x1f0f65['shift']());}}}(a316_0x42a8,0x1a570));function a316_0x4696(_0x9a8c3f,_0x54db2f){_0x9a8c3f=_0x9a8c3f-0x1ef;const _0x42a8ff=a316_0x42a8();let _0x46968d=_0x42a8ff[_0x9a8c3f];return _0x46968d;}function env(_0x1a347b){return process.env[`RABETBASE_${_0x1a347b}`]||process.env[`LOVRABET_${_0x1a347b}`]||undefined;}export function isNonInteractive(_0x469665){const _0x4c2121=a316_0x4696;return!!(_0x469665[_0x4c2121(0x1f2)]||_0x469665['ci']||env('CI')==='true'||process.env.CI===_0x4c2121(0x1fa)||!process[_0x4c2121(0x1ef)][_0x4c2121(0x1fd)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1e1c33=a316_0x4696;if(!process[_0x1e1c33(0x1f5)][_0x1e1c33(0x1fd)])return![];try{const _0x522fa4=process[_0x1e1c33(0x1f5)][_0x1e1c33(0x1f8)];return process[_0x1e1c33(0x1f5)][_0x1e1c33(0x1fc)](!![]),process[_0x1e1c33(0x1f5)][_0x1e1c33(0x1fc)](_0x522fa4??![]),!![];}catch{return![];}}function a316_0x42a8(){const _0x19cdef=['isTTY','stdout','785519khYilV','468588XRNcbt','nonInteractive','177018CPsJrb','294282CFuzsl','stdin','744536XbCqeQ','2804vgVYCn','isRaw','114HCJTxB','true','706890ZnBIuc','setRawMode'];a316_0x42a8=function(){return _0x19cdef;};return a316_0x42a8();}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a317_0x5af645=a317_0x2db4;function a317_0x2db4(_0x373f64,_0x33e70f){_0x373f64=_0x373f64-0xaf;const _0x5ef6e1=a317_0x5ef6();let _0x2db41a=_0x5ef6e1[_0x373f64];return _0x2db41a;}(function(_0x2eb8e0,_0x2cdf1a){const _0x1a9d3f=a317_0x2db4,_0x3e2a16=_0x2eb8e0();while(!![]){try{const _0x31157c=-parseInt(_0x1a9d3f(0xd6))/0x1*(parseInt(_0x1a9d3f(0xb5))/0x2)+parseInt(_0x1a9d3f(0xce))/0x3+-parseInt(_0x1a9d3f(0xd4))/0x4+-parseInt(_0x1a9d3f(0xb4))/0x5*(-parseInt(_0x1a9d3f(0xc6))/0x6)+parseInt(_0x1a9d3f(0xeb))/0x7+parseInt(_0x1a9d3f(0xd0))/0x8+-parseInt(_0x1a9d3f(0xe5))/0x9;if(_0x31157c===_0x2cdf1a)break;else _0x3e2a16['push'](_0x3e2a16['shift']());}catch(_0x4d98fd){_0x3e2a16['push'](_0x3e2a16['shift']());}}}(a317_0x5ef6,0xf245b));import a317_0x506102 from'winston';import a317_0x1fa2ad from'node:fs';import a317_0x4b5fa6 from'node:path';function a317_0x5ef6(){const _0x29ea68=['21306096FfZQgz','winstonLogger','command','Failed:\x20','existsSync','dirname','5322457jSLCNI','logFilePath','format','readFileSync','timestamp','Completed:\x20','775985YUdjkA','38HnoWQQ','errors','stringify','map','yellow','join','initWinstonLogger','readLogs','parse','now','success','trim','currentRawCommand','mkdirSync','details','red','error','48yaVSoa','clear','message','log','combine','writeFileSync','toISOString','split','5377620ZxXFqv','transports','10483320qwdPtE','Starting:\x20','getWinstonInstance','warn','353032mJFHPP','info','87207cywLnz','blue','green','File','utf8','logTask','setRawCommand','.lovrabet.log','setLogPath','rawCommand','level','unknown','duration','printf','addColors'];a317_0x5ef6=function(){return _0x29ea68;};return a317_0x5ef6();}class Logger{['winstonLogger'];[a317_0x5af645(0xaf)];[a317_0x5af645(0xc1)]='';constructor(){this['logFilePath']='';}[a317_0x5af645(0xdc)](_0x35d6ce){const _0x1ff736=a317_0x5af645;this[_0x1ff736(0xc1)]=_0x35d6ce;}[a317_0x5af645(0xbb)](){const _0x2e014c=a317_0x5af645,_0x4487dc=a317_0x4b5fa6[_0x2e014c(0xea)](this['logFilePath']);!a317_0x1fa2ad['existsSync'](_0x4487dc)&&a317_0x1fa2ad[_0x2e014c(0xc2)](_0x4487dc,{'recursive':!![]});const _0x5cfb62=a317_0x506102[_0x2e014c(0xb0)][_0x2e014c(0xca)](a317_0x506102[_0x2e014c(0xb0)]['timestamp'](),a317_0x506102['format'][_0x2e014c(0xb6)]({'stack':!![]}),a317_0x506102['format'][_0x2e014c(0xe3)](_0x2b0c1d=>{const _0x17ef4a=_0x2e014c,_0x10f747={'timestamp':_0x2b0c1d[_0x17ef4a(0xb2)]||new Date()[_0x17ef4a(0xcc)](),'level':_0x2b0c1d[_0x17ef4a(0xe0)]||_0x17ef4a(0xd5),'command':_0x2b0c1d[_0x17ef4a(0xe7)]||_0x17ef4a(0xe1),'rawCommand':_0x2b0c1d[_0x17ef4a(0xdf)]||this[_0x17ef4a(0xc1)]||undefined,'message':_0x2b0c1d[_0x17ef4a(0xc8)]||'','duration':_0x2b0c1d[_0x17ef4a(0xe2)]||undefined,'details':_0x2b0c1d[_0x17ef4a(0xc3)]||undefined};return JSON[_0x17ef4a(0xb7)](_0x10f747);}));this[_0x2e014c(0xe6)]=a317_0x506102['createLogger']({'level':'info','format':_0x5cfb62,'transports':[new a317_0x506102[(_0x2e014c(0xcf))][(_0x2e014c(0xd9))]({'filename':this['logFilePath'],'level':'info'})],'silent':![]}),a317_0x506102[_0x2e014c(0xe4)]({'success':_0x2e014c(0xd8),'error':_0x2e014c(0xc4),'warn':_0x2e014c(0xb9),'info':_0x2e014c(0xd7)});}[a317_0x5af645(0xde)](_0x17ab7d){const _0x31dedd=a317_0x5af645;this[_0x31dedd(0xaf)]=a317_0x4b5fa6[_0x31dedd(0xba)](_0x17ab7d,_0x31dedd(0xdd)),this[_0x31dedd(0xe6)]&&this[_0x31dedd(0xe6)][_0x31dedd(0xc7)](),this['initWinstonLogger']();}['info'](_0x1506ba,_0x22af82,_0x53e5e5){const _0x141a91=a317_0x5af645;if(!this['logFilePath']||!this[_0x141a91(0xe6)])return;this[_0x141a91(0xe6)][_0x141a91(0xd5)](_0x22af82,{'command':_0x1506ba,'details':_0x53e5e5});}[a317_0x5af645(0xbf)](_0x3704dc,_0x19bb1b,_0x3d35ec,_0x32de03){const _0x203ff7=a317_0x5af645;if(!this[_0x203ff7(0xaf)]||!this['winstonLogger'])return;this[_0x203ff7(0xe6)][_0x203ff7(0xc9)](_0x203ff7(0xd5),_0x19bb1b,{'level':_0x203ff7(0xbf),'command':_0x3704dc,'duration':_0x3d35ec,'details':_0x32de03});}[a317_0x5af645(0xc5)](_0x57e0c3,_0x5b3bc3,_0x5bb641){const _0x22d04d=a317_0x5af645;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x22d04d(0xe6)][_0x22d04d(0xc5)](_0x5b3bc3,{'command':_0x57e0c3,'details':_0x5bb641});}['warn'](_0x33523e,_0x301764,_0x3d56ee){const _0xc4186f=a317_0x5af645;if(!this[_0xc4186f(0xaf)]||!this[_0xc4186f(0xe6)])return;this[_0xc4186f(0xe6)][_0xc4186f(0xd3)](_0x301764,{'command':_0x33523e,'details':_0x3d56ee});}async[a317_0x5af645(0xdb)](_0x1b5c0f,_0xcd90ca,_0x718db5){const _0xa0cd51=a317_0x5af645,_0x4dbc2f=Date[_0xa0cd51(0xbe)]();this[_0xa0cd51(0xd5)](_0x1b5c0f,_0xa0cd51(0xd1)+_0xcd90ca);try{const _0x4d176d=await _0x718db5(),_0x5295a4=Date[_0xa0cd51(0xbe)]()-_0x4dbc2f;return this['success'](_0x1b5c0f,_0xa0cd51(0xb3)+_0xcd90ca,_0x5295a4),_0x4d176d;}catch(_0x478546){const _0x597558=Date[_0xa0cd51(0xbe)]()-_0x4dbc2f;this[_0xa0cd51(0xc5)](_0x1b5c0f,_0xa0cd51(0xe8)+_0xcd90ca,{'error':_0x478546 instanceof Error?_0x478546[_0xa0cd51(0xc8)]:String(_0x478546),'duration':_0x597558});throw _0x478546;}}[a317_0x5af645(0xbc)](){const _0x173996=a317_0x5af645;try{if(!a317_0x1fa2ad[_0x173996(0xe9)](this['logFilePath']))return[];const _0x88faa0=a317_0x1fa2ad[_0x173996(0xb1)](this[_0x173996(0xaf)],_0x173996(0xda));return _0x88faa0[_0x173996(0xcd)]('\x0a')['filter'](_0x1a3121=>_0x1a3121[_0x173996(0xc0)]())[_0x173996(0xb8)](_0xd5a21c=>JSON[_0x173996(0xbd)](_0xd5a21c));}catch(_0x18c5e3){return console[_0x173996(0xd3)]('Failed\x20to\x20read\x20logs:',_0x18c5e3),[];}}['clearLogs'](){const _0x28a75b=a317_0x5af645;try{a317_0x1fa2ad['existsSync'](this[_0x28a75b(0xaf)])&&a317_0x1fa2ad[_0x28a75b(0xcb)](this[_0x28a75b(0xaf)],'',_0x28a75b(0xda));}catch(_0x1e455a){console['warn']('Failed\x20to\x20clear\x20logs:',_0x1e455a);}}[a317_0x5af645(0xd2)](){const _0x3ce408=a317_0x5af645;return this[_0x3ce408(0xe6)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a318_0x90a7(_0x53376b,_0x82b1d4){_0x53376b=_0x53376b-0x1ba;const _0x1cb665=a318_0x1cb6();let _0x90a7ac=_0x1cb665[_0x53376b];return _0x90a7ac;}(function(_0x504158,_0x1f327d){const _0xf9561a=a318_0x90a7,_0x4067d3=_0x504158();while(!![]){try{const _0x25dd6c=parseInt(_0xf9561a(0x1c8))/0x1+-parseInt(_0xf9561a(0x1bf))/0x2*(-parseInt(_0xf9561a(0x1c5))/0x3)+-parseInt(_0xf9561a(0x1c4))/0x4*(-parseInt(_0xf9561a(0x1bc))/0x5)+-parseInt(_0xf9561a(0x1c7))/0x6+parseInt(_0xf9561a(0x1c6))/0x7*(-parseInt(_0xf9561a(0x1bd))/0x8)+parseInt(_0xf9561a(0x1be))/0x9+-parseInt(_0xf9561a(0x1c3))/0xa;if(_0x25dd6c===_0x1f327d)break;else _0x4067d3['push'](_0x4067d3['shift']());}catch(_0xed0f97){_0x4067d3['push'](_0x4067d3['shift']());}}}(a318_0x1cb6,0x2e92c));import{CliErrors}from'../errors.js';function a318_0x1cb6(){const _0x25cdf1=['104EAoMhj','161163HJEwSH','173734DZxnjx','object','Invalid\x20JSON\x20for\x20--params:\x20','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','876060uvuVHZ','1027084iDvbjk','9DPiBKs','171899CUVQZt','495162okSHTI','144859oDLbuH','validation','parse','isArray','5JgIOff'];a318_0x1cb6=function(){return _0x25cdf1;};return a318_0x1cb6();}export function parseJsonParams(_0x3208df){const _0x29106c=a318_0x90a7;if(!_0x3208df)return undefined;let _0x46dc56;try{_0x46dc56=JSON[_0x29106c(0x1ba)](_0x3208df);}catch{throw CliErrors[_0x29106c(0x1c9)](_0x29106c(0x1c1)+_0x3208df);}if(!_0x46dc56||typeof _0x46dc56!==_0x29106c(0x1c0)||Array[_0x29106c(0x1bb)](_0x46dc56))throw CliErrors[_0x29106c(0x1c9)]('--params\x20must\x20be\x20a\x20JSON\x20object',_0x29106c(0x1c2));return _0x46dc56;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a319_0x1861(_0x45c2c7,_0x3e3608){_0x45c2c7=_0x45c2c7-0x121;const _0x35f362=a319_0x35f3();let _0x18614f=_0x35f362[_0x45c2c7];return _0x18614f;}const a319_0x234ae5=a319_0x1861;(function(_0x110d5b,_0x51f6be){const _0x1d8498=a319_0x1861,_0x4d3573=_0x110d5b();while(!![]){try{const _0x59de37=-parseInt(_0x1d8498(0x129))/0x1*(parseInt(_0x1d8498(0x127))/0x2)+parseInt(_0x1d8498(0x128))/0x3*(parseInt(_0x1d8498(0x121))/0x4)+-parseInt(_0x1d8498(0x12c))/0x5*(-parseInt(_0x1d8498(0x12b))/0x6)+parseInt(_0x1d8498(0x12a))/0x7+parseInt(_0x1d8498(0x123))/0x8*(parseInt(_0x1d8498(0x12d))/0x9)+-parseInt(_0x1d8498(0x124))/0xa+parseInt(_0x1d8498(0x125))/0xb*(parseInt(_0x1d8498(0x122))/0xc);if(_0x59de37===_0x51f6be)break;else _0x4d3573['push'](_0x4d3573['shift']());}catch(_0x488688){_0x4d3573['push'](_0x4d3573['shift']());}}}(a319_0x35f3,0xe5598));function a319_0x35f3(){const _0x36179f=['2123TdzLcs','platform','526hYeVvw','6ncnLkQ','3129MbtfqZ','1102626ozBjEm','304038CIXryw','5mGHqhV','9EMVFHU','1435944jhFnnh','16908fQzxSF','13217592VvVxzh','10879560oZQgzP'];a319_0x35f3=function(){return _0x36179f;};return a319_0x35f3();}export const isWindows=process[a319_0x234ae5(0x126)]==='win32';export function resolveNpmBin(_0x3d5188){return isWindows?_0x3d5188+'.cmd':_0x3d5188;}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x520144){return new Promise(_0x172108=>setTimeout(_0x172108,_0x520144));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a321_0x596c0f=a321_0x38d2;(function(_0x487a89,_0x118bba){const _0x140626=a321_0x38d2,_0x22f7c8=_0x487a89();while(!![]){try{const _0x5b00cf=-parseInt(_0x140626(0x1a0))/0x1*(parseInt(_0x140626(0x18c))/0x2)+-parseInt(_0x140626(0x196))/0x3*(-parseInt(_0x140626(0x1a3))/0x4)+-parseInt(_0x140626(0x198))/0x5*(parseInt(_0x140626(0x185))/0x6)+-parseInt(_0x140626(0x177))/0x7+-parseInt(_0x140626(0x17e))/0x8+parseInt(_0x140626(0x19d))/0x9+parseInt(_0x140626(0x1a4))/0xa;if(_0x5b00cf===_0x118bba)break;else _0x22f7c8['push'](_0x22f7c8['shift']());}catch(_0x171174){_0x22f7c8['push'](_0x22f7c8['shift']());}}}(a321_0x46b5,0xb88ee));import a321_0x512d7b from'node:fs';function a321_0x46b5(){const _0x32f8d1=['includes','name','replace','getDate','.md','readFile','replaceApiContent','3dhXkqY','isFile','10040ZOcUQl','getHours','.ts','copyFile','message','6051870WTVMli','pad','utf8','1007UCpdZe','padStart','tableName:\x20\x22','5167028QepbSu','17111760HtDpVQ','getFullYear','slice','Template\x20content\x20replacement\x20failed','toUpperCase','.scss','extname','getMonth','toComponentName','endsWith','pop','.css','.tpl','alias:\x20\x22','YourModel','\x0a\x20\x20\x20\x20{\x20','template','toDisplayTitle','Starting\x20template\x20content\x20replacement','map','name:\x20\x22','join','datasetCode:\x20\x22','getMinutes','toISOString','mkdir','4381944nCBAop','replaceContent','promises','.js','.tsx','push','formatLocalTimestamp','6007640PTXOYx','default','alias','toLowerCase','success','now','info','258AFWKto','datasetCode','tableName','processDirectory','processFile','getSeconds','isDirectory','2892cIIsem','error','split'];a321_0x46b5=function(){return _0x32f8d1;};return a321_0x46b5();}import a321_0x30d407 from'node:path';import{logger}from'../utils/logger.js';function a321_0x38d2(_0x1d1af5,_0x21fa8d){_0x1d1af5=_0x1d1af5-0x16c;const _0x46b5be=a321_0x46b5();let _0x38d2b4=_0x46b5be[_0x1d1af5];return _0x38d2b4;}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static['pad'](_0x47af24){const _0x4fd84a=a321_0x38d2;return String(_0x47af24)[_0x4fd84a(0x1a1)](0x2,'0');}static['formatLocalTimestamp'](_0x1e03f3){const _0x2d14e2=a321_0x38d2,_0x33135b=_0x1e03f3[_0x2d14e2(0x1a5)](),_0x1f3165=this['pad'](_0x1e03f3[_0x2d14e2(0x1ab)]()+0x1),_0x457438=this[_0x2d14e2(0x19e)](_0x1e03f3[_0x2d14e2(0x192)]()),_0x4b0d84=this['pad'](_0x1e03f3[_0x2d14e2(0x199)]()),_0x4792ca=this[_0x2d14e2(0x19e)](_0x1e03f3[_0x2d14e2(0x174)]()),_0x5a6186=this[_0x2d14e2(0x19e)](_0x1e03f3[_0x2d14e2(0x18a)]());return{'createdAt':_0x33135b+'-'+_0x1f3165+'-'+_0x457438+'\x20'+_0x4b0d84+':'+_0x4792ca+':'+_0x5a6186,'createdDate':_0x33135b+'-'+_0x1f3165+'-'+_0x457438,'createdTime':_0x4b0d84+':'+_0x4792ca+':'+_0x5a6186};}static['toComponentName'](_0x5f1264){const _0x1109ac=a321_0x38d2,_0x40ed05=_0x5f1264[_0x1109ac(0x18e)]('/')[_0x1109ac(0x1ae)]()||_0x5f1264;return _0x40ed05[_0x1109ac(0x18e)]('-')[_0x1109ac(0x170)](_0x431443=>_0x431443['charAt'](0x0)[_0x1109ac(0x1a8)]()+_0x431443['slice'](0x1)[_0x1109ac(0x181)]())[_0x1109ac(0x172)]('');}static[a321_0x596c0f(0x16e)](_0x34b9f7){const _0x34ce6f=a321_0x596c0f,_0x89621d=_0x34b9f7[_0x34ce6f(0x18e)]('/')[_0x34ce6f(0x1ae)]()||_0x34b9f7;return _0x89621d[_0x34ce6f(0x18e)]('-')[_0x34ce6f(0x170)](_0x542a45=>_0x542a45['charAt'](0x0)[_0x34ce6f(0x1a8)]()+_0x542a45[_0x34ce6f(0x1a6)](0x1)[_0x34ce6f(0x181)]())['join']('\x20');}static[a321_0x596c0f(0x178)](_0x11a42f,_0x12b3bc,_0x1d53f8){const _0x534842=a321_0x596c0f,_0x47d534=this[_0x534842(0x1ac)](_0x12b3bc),_0x51fc95=this[_0x534842(0x16e)](_0x12b3bc),{createdAt:_0x395fe4,createdDate:_0x5e2e41,createdTime:_0x374136}=this[_0x534842(0x17d)](new Date());let _0x1d4648=_0x11a42f[_0x534842(0x191)](/\{CliVersion\}/g,CLI_VERSION)[_0x534842(0x191)](/\{ComponentName\}/g,_0x47d534)[_0x534842(0x191)](/\{DisplayTitle\}/g,_0x51fc95)[_0x534842(0x191)](/\{PageName\}/g,_0x12b3bc)[_0x534842(0x191)](/\{TemplateName\}/g,_0x1d53f8)[_0x534842(0x191)](/\{CreatedAt\}/g,_0x395fe4)[_0x534842(0x191)](/\{CreatedDate\}/g,_0x5e2e41)[_0x534842(0x191)](/\{CreatedTime\}/g,_0x374136);return _0x1d4648;}static[a321_0x596c0f(0x195)](_0x2ceb8d,_0x5ee60f,_0xfb9abe,_0x5d01c8,_0x414470,_0x1bad75,_0x3dc617,_0x4640f9){const _0x18064b=a321_0x596c0f,_0x317ffc=new Date(),_0x2e3e3d=_0x317ffc[_0x18064b(0x175)](),_0x1210d1=_0xfb9abe[_0x18064b(0x170)](_0xff2f88=>{const _0xa9d322=_0x18064b,_0x53f2ff=[_0xa9d322(0x173)+_0xff2f88[_0xa9d322(0x186)]+'\x22',_0xa9d322(0x1a2)+_0xff2f88[_0xa9d322(0x187)]+'\x22',_0xa9d322(0x171)+_0xff2f88[_0xa9d322(0x190)]+'\x22'];return _0xff2f88[_0xa9d322(0x180)]&&_0x53f2ff[_0xa9d322(0x17c)](_0xa9d322(0x1b1)+_0xff2f88['alias']+'\x22'),_0xa9d322(0x16c)+_0x53f2ff[_0xa9d322(0x172)](',\x20')+'\x20},';})[_0x18064b(0x172)](''),_0x238a56=_0x5d01c8||_0xfb9abe[0x0]?.['alias']||_0x18064b(0x1b2);let _0x607b79=_0x2ceb8d['replace'](/\{AppCode\}/g,_0x5ee60f)[_0x18064b(0x191)](/\{ModelConfigs\}/g,_0x1210d1)[_0x18064b(0x191)](/\{ExampleModelName\}/g,_0x238a56)[_0x18064b(0x191)](/\{ApiFileName\}/g,_0x414470||'api')[_0x18064b(0x191)](/\{ConfigName\}/g,_0x1bad75||_0x18064b(0x17f))[_0x18064b(0x191)](/\{ClientConfigParam\}/g,_0x3dc617||'')[_0x18064b(0x191)](/\{VarPrefix\}/g,_0x4640f9||'LOVRABET')['replace'](/\{CreatedAt\}/g,_0x2e3e3d);return _0x607b79;}static async['processTemplate'](_0x576822,_0x5ae9eb,_0x5a8022,_0x516beb,_0x159499=!![]){const _0x25042d=a321_0x596c0f,_0x1cce03=Date[_0x25042d(0x183)]();try{_0x159499&&logger[_0x25042d(0x184)](_0x25042d(0x16d),_0x25042d(0x16f),{'templatePath':_0x576822,'targetPath':_0x5ae9eb,'pageName':_0x5a8022,'templateName':_0x516beb});await a321_0x512d7b[_0x25042d(0x179)][_0x25042d(0x176)](_0x5ae9eb,{'recursive':!![]}),await this['processDirectory'](_0x576822,_0x5ae9eb,_0x5a8022,_0x516beb);if(_0x159499){const _0x372da6=Date[_0x25042d(0x183)]()-_0x1cce03;logger[_0x25042d(0x182)](_0x25042d(0x16d),'Template\x20content\x20replacement\x20completed',_0x372da6,{'pageName':_0x5a8022,'templateName':_0x516beb});}}catch(_0x3155f0){if(_0x159499){const _0x45d8e5=Date[_0x25042d(0x183)]()-_0x1cce03;logger[_0x25042d(0x18d)](_0x25042d(0x16d),_0x25042d(0x1a7),{'templatePath':_0x576822,'targetPath':_0x5ae9eb,'pageName':_0x5a8022,'templateName':_0x516beb,'error':_0x3155f0 instanceof Error?_0x3155f0[_0x25042d(0x19c)]:String(_0x3155f0),'duration':_0x45d8e5});}throw _0x3155f0;}}static async['processDirectory'](_0x3bab39,_0x871fea,_0x21b010,_0xaf1248){const _0x3007d3=a321_0x596c0f,_0x57b5a8=await a321_0x512d7b[_0x3007d3(0x179)]['readdir'](_0x3bab39,{'withFileTypes':!![]});for(const _0x48530f of _0x57b5a8){const _0x3dc429=a321_0x30d407['join'](_0x3bab39,_0x48530f[_0x3007d3(0x190)]);let _0x4ce179=a321_0x30d407[_0x3007d3(0x172)](_0x871fea,_0x48530f[_0x3007d3(0x190)]);_0x48530f[_0x3007d3(0x190)][_0x3007d3(0x1ad)](_0x3007d3(0x1b0))&&(_0x4ce179=a321_0x30d407['join'](_0x871fea,_0x48530f[_0x3007d3(0x190)][_0x3007d3(0x191)](/\.tpl$/,'')));if(_0x48530f[_0x3007d3(0x18b)]())await a321_0x512d7b[_0x3007d3(0x179)]['mkdir'](_0x4ce179,{'recursive':!![]}),await this[_0x3007d3(0x188)](_0x3dc429,_0x4ce179,_0x21b010,_0xaf1248);else _0x48530f[_0x3007d3(0x197)]()&&await this[_0x3007d3(0x189)](_0x3dc429,_0x4ce179,_0x21b010,_0xaf1248);}}static async[a321_0x596c0f(0x189)](_0x42384b,_0x5d46f5,_0x40e5f4,_0x58f755){const _0x20e7c3=a321_0x596c0f,_0xd02dcb=a321_0x30d407[_0x20e7c3(0x1aa)](_0x42384b)['toLowerCase']();_0x42384b[_0x20e7c3(0x1ad)]('.tpl')&&(_0x5d46f5=_0x5d46f5[_0x20e7c3(0x191)](/\.tpl$/,''));const _0x3f7701=[_0x20e7c3(0x17b),_0x20e7c3(0x19a),'.jsx',_0x20e7c3(0x17a),'.json',_0x20e7c3(0x193),_0x20e7c3(0x1af),_0x20e7c3(0x1a9),_0x20e7c3(0x1b0)];if(_0x3f7701[_0x20e7c3(0x18f)](_0xd02dcb)||_0x42384b[_0x20e7c3(0x1ad)](_0x20e7c3(0x1b0))){const _0x24159c=await a321_0x512d7b[_0x20e7c3(0x179)][_0x20e7c3(0x194)](_0x42384b,'utf8'),_0x12223e=this[_0x20e7c3(0x178)](_0x24159c,_0x40e5f4,_0x58f755);await a321_0x512d7b[_0x20e7c3(0x179)]['writeFile'](_0x5d46f5,_0x12223e,_0x20e7c3(0x19f));}else await a321_0x512d7b[_0x20e7c3(0x179)][_0x20e7c3(0x19b)](_0x42384b,_0x5d46f5);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b139f,_0x1783ab){const _0x30f7a4=a322_0x1774,_0x591570=_0x4b139f();while(!![]){try{const _0xdf70be=-parseInt(_0x30f7a4(0x170))/0x1+parseInt(_0x30f7a4(0x179))/0x2*(-parseInt(_0x30f7a4(0x175))/0x3)+-parseInt(_0x30f7a4(0x177))/0x4*(-parseInt(_0x30f7a4(0x180))/0x5)+parseInt(_0x30f7a4(0x172))/0x6+-parseInt(_0x30f7a4(0x16e))/0x7*(-parseInt(_0x30f7a4(0x167))/0x8)+parseInt(_0x30f7a4(0x178))/0x9+parseInt(_0x30f7a4(0x17e))/0xa*(-parseInt(_0x30f7a4(0x164))/0xb);if(_0xdf70be===_0x1783ab)break;else _0x591570['push'](_0x591570['shift']());}catch(_0xa4dce3){_0x591570['push'](_0x591570['shift']());}}}(a322_0x26ba,0x2a8b1));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a322_0x59bc4e from'semver';function a322_0x1774(_0x12286e,_0x1cc5d1){_0x12286e=_0x12286e-0x161;const _0x26ba6c=a322_0x26ba();let _0x17740e=_0x26ba6c[_0x12286e];return _0x17740e;}import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a322_0x26ba(){const _0x2aad62=['10484grCqhU','982206sqKnpg','40LgvZqq','lastNotifiedAt','object','stringify','gte','20bwTbLo','latest','140gmmldC','yes','https://www.npmjs.com/package/','rabetbase-cli','valid','1034099CbruEz',',\x20run:\x20','toLowerCase','5016FnlkUi','number','lastNotifiedVersion','trim','update-check.json','utf8','\x20update','3633MttCfe','true','125552HgIuIm','now','1459512KnhIvR','.cache','parse','39504JwWZlH','checkedAt'];a322_0x26ba=function(){return _0x2aad62;};return a322_0x26ba();}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 _0x4f0a4d=a322_0x1774,_0x24f445=process.env.RABETBASE_NO_UPDATE_NOTICE?.['trim']()[_0x4f0a4d(0x166)]();return _0x24f445==='1'||_0x24f445===_0x4f0a4d(0x16f)||_0x24f445===_0x4f0a4d(0x181);}function cacheRoot(){const _0x26e338=a322_0x1774;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x26e338(0x173));}export function getUpdateNoticeCachePath(){const _0x67618f=a322_0x1774;return join(cacheRoot(),_0x67618f(0x162),_0x67618f(0x16b));}async function readUpdateNoticeCache(){const _0x132c08=a322_0x1774;try{const _0xeaddc2=await readFile(getUpdateNoticeCachePath(),_0x132c08(0x16c)),_0x5e1ec5=JSON[_0x132c08(0x174)](_0xeaddc2);if(!_0x5e1ec5||typeof _0x5e1ec5!==_0x132c08(0x17b))return{};return _0x5e1ec5;}catch{return{};}}async function writeUpdateNoticeCache(_0x29b828){const _0x2df3bf=a322_0x1774;try{const _0xe8ed0a=getUpdateNoticeCachePath();await mkdir(dirname(_0xe8ed0a),{'recursive':!![]}),await writeFile(_0xe8ed0a,JSON[_0x2df3bf(0x17c)](_0x29b828,null,0x2)+'\x0a',_0x2df3bf(0x16c));}catch{}}function isFreshCheck(_0x568580,_0x309a14){const _0x1b72c7=a322_0x1774;return typeof _0x568580[_0x1b72c7(0x176)]===_0x1b72c7(0x168)&&_0x309a14-_0x568580[_0x1b72c7(0x176)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x4e4a7a,_0x3d1b68,_0x54f8cf){const _0xeb8525=a322_0x1774;return _0x4e4a7a[_0xeb8525(0x169)]===_0x3d1b68&&typeof _0x4e4a7a[_0xeb8525(0x17a)]===_0xeb8525(0x168)&&_0x54f8cf-_0x4e4a7a[_0xeb8525(0x17a)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x31e363){const _0x1676d9=a322_0x1774;return _0x1676d9(0x161)+NPM_PACKAGE_NAME+'/v/'+_0x31e363;}export async function resolveLatestUpdateNotice(){const _0x438880=a322_0x1774;if(isUpdateNoticeDisabled())return null;try{const _0x154bce=Date[_0x438880(0x171)](),_0x3fcd78=getCliVersion(),_0x2be4ee=await readUpdateNoticeCache();let _0x3c9b8a=isFreshCheck(_0x2be4ee,_0x154bce)?_0x2be4ee[_0x438880(0x17f)]?.[_0x438880(0x16a)]():undefined;if(!_0x3c9b8a&&!isFreshCheck(_0x2be4ee,_0x154bce)){const _0x505f70=await getCliVersionPolicy();_0x3c9b8a=_0x505f70?.['stableVersion']?.[_0x438880(0x16a)]()||undefined,await writeUpdateNoticeCache({..._0x2be4ee,'checkedAt':_0x154bce,'latest':_0x3c9b8a,'failed':!_0x3c9b8a});}if(!_0x3c9b8a||!a322_0x59bc4e[_0x438880(0x163)](_0x3fcd78)||!a322_0x59bc4e['valid'](_0x3c9b8a))return null;if(a322_0x59bc4e[_0x438880(0x17d)](_0x3fcd78,_0x3c9b8a))return null;if(isRecentlyNotified(_0x2be4ee,_0x3c9b8a,_0x154bce))return null;const _0x172cb4=CLI_BIN_NAME+_0x438880(0x16d);return await writeUpdateNoticeCache({..._0x2be4ee,'checkedAt':isFreshCheck(_0x2be4ee,_0x154bce)?_0x2be4ee[_0x438880(0x176)]:_0x154bce,'latest':_0x3c9b8a,'failed':![],'lastNotifiedVersion':_0x3c9b8a,'lastNotifiedAt':_0x154bce}),{'command':_0x172cb4,'current':_0x3fcd78,'latest':_0x3c9b8a,'url':buildNpmVersionUrl(_0x3c9b8a),'message':CLI_BIN_NAME+'\x20'+_0x3c9b8a+'\x20available,\x20current\x20'+_0x3fcd78+_0x438880(0x165)+_0x172cb4};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x302517,_0x25114a){var _0x3d27a3=a323_0x375b,_0x2f731c=_0x302517();while(!![]){try{var _0x22577c=parseInt(_0x3d27a3(0x188))/0x1*(parseInt(_0x3d27a3(0x18b))/0x2)+-parseInt(_0x3d27a3(0x192))/0x3+parseInt(_0x3d27a3(0x190))/0x4+parseInt(_0x3d27a3(0x18c))/0x5*(parseInt(_0x3d27a3(0x18d))/0x6)+-parseInt(_0x3d27a3(0x18f))/0x7*(parseInt(_0x3d27a3(0x191))/0x8)+-parseInt(_0x3d27a3(0x189))/0x9*(-parseInt(_0x3d27a3(0x18a))/0xa)+parseInt(_0x3d27a3(0x18e))/0xb;if(_0x22577c===_0x25114a)break;else _0x2f731c['push'](_0x2f731c['shift']());}catch(_0x3ad065){_0x2f731c['push'](_0x2f731c['shift']());}}}(a323_0x4ec0,0x80358));function a323_0x4ec0(){var _0x5468d8=['1841HxDpYn','2443444vTkCLv','25016VAWpEe','618567afzbzz','7TXNeki','2315583Wmbumb','10jKFyWU','67406coHpqu','40DNCEdO','152076mtjJgK','2715867bpsElS'];a323_0x4ec0=function(){return _0x5468d8;};return a323_0x4ec0();}import{VERSION}from'../generated/build-info.js';function a323_0x375b(_0x3ccf5e,_0x16c171){_0x3ccf5e=_0x3ccf5e-0x188;var _0x4ec031=a323_0x4ec0();var _0x375bb4=_0x4ec031[_0x3ccf5e];return _0x375bb4;}export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e5adc,_0x5d8e46){var _0x50a60d=a324_0x230e,_0x5bd948=_0x5e5adc();while(!![]){try{var _0x1720a2=-parseInt(_0x50a60d(0x1b6))/0x1*(-parseInt(_0x50a60d(0x1b7))/0x2)+parseInt(_0x50a60d(0x1b4))/0x3*(parseInt(_0x50a60d(0x1b1))/0x4)+parseInt(_0x50a60d(0x1b0))/0x5+-parseInt(_0x50a60d(0x1b2))/0x6+-parseInt(_0x50a60d(0x1b3))/0x7+-parseInt(_0x50a60d(0x1af))/0x8+-parseInt(_0x50a60d(0x1b5))/0x9;if(_0x1720a2===_0x5d8e46)break;else _0x5bd948['push'](_0x5bd948['shift']());}catch(_0x2ba4f6){_0x5bd948['push'](_0x5bd948['shift']());}}}(a324_0x15f1,0xa7406));function a324_0x230e(_0x7412e0,_0x1bfc52){_0x7412e0=_0x7412e0-0x1af;var _0x15f11d=a324_0x15f1();var _0x230ed4=_0x15f11d[_0x7412e0];return _0x230ed4;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a324_0x15f1(){var _0x144f88=['7144792pzLwoD','4266045uTsHao','1753676KKjASw','1747764LlLaNz','1489068OXidRm','3kyXewu','2620647fYdqhg','540867bSNcXZ','4SIeViF'];a324_0x15f1=function(){return _0x144f88;};return a324_0x15f1();}export async function withActiveCookie(_0x131887,_0x2065aa){setActiveCookie(_0x131887);try{return await _0x2065aa();}finally{clearActiveCookie();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a325_0x2919(_0x128299,_0x334d44){_0x128299=_0x128299-0xe2;var _0xd965e=a325_0xd965();var _0x29192a=_0xd965e[_0x128299];return _0x29192a;}function a325_0xd965(){var _0x5f1ab1=['19374jlHxVO','1349000bJZSjf','5370fvzExw','97706vINqWr','537468NCQLfT','3573qHVXEZ','2aFqtda','205084FRUMhz','stderr','14BFbbcX','182008tUYgRM'];a325_0xd965=function(){return _0x5f1ab1;};return a325_0xd965();}(function(_0x51c7cd,_0x5ac9a0){var _0x4e9702=a325_0x2919,_0x31b0b4=_0x51c7cd();while(!![]){try{var _0x45b34d=-parseInt(_0x4e9702(0xe8))/0x1*(parseInt(_0x4e9702(0xe5))/0x2)+parseInt(_0x4e9702(0xe2))/0x3+-parseInt(_0x4e9702(0xe9))/0x4+parseInt(_0x4e9702(0xe3))/0x5+-parseInt(_0x4e9702(0xe6))/0x6*(parseInt(_0x4e9702(0xeb))/0x7)+-parseInt(_0x4e9702(0xec))/0x8+parseInt(_0x4e9702(0xe7))/0x9*(parseInt(_0x4e9702(0xe4))/0xa);if(_0x45b34d===_0x5ac9a0)break;else _0x31b0b4['push'](_0x31b0b4['shift']());}catch(_0x37aabe){_0x31b0b4['push'](_0x31b0b4['shift']());}}}(a325_0xd965,0x21d43));export function writeCliSideChannelLine(_0x38fe56){var _0x6c0291=a325_0x2919;process[_0x6c0291(0xea)]['write'](_0x38fe56+'\x0a');}
|
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.4",
|
|
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": [
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"skills/rabetbase",
|
|
84
84
|
"skills/rabetbase.manifest.json",
|
|
85
85
|
"scripts/postinstall.mjs",
|
|
86
|
+
"templates/custom-pages",
|
|
86
87
|
"templates/generate-api",
|
|
87
88
|
"sidecar",
|
|
88
89
|
"README.md",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rabetbase
|
|
3
|
-
version: 2.5.2-beta.
|
|
3
|
+
version: 2.5.2-beta.4
|
|
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, 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:
|
|
@@ -89,7 +89,7 @@ metadata:
|
|
|
89
89
|
7. **自定义页面工作流**
|
|
90
90
|
- 自定义页面与数据列表页是两类独立页面能力,不混用两类页面的命令
|
|
91
91
|
- 创建、修改或发布前,必须先阅读 [`custom-page-workflow.md`](guides/custom-page-workflow.md),再按其中的编排读取对应原子命令 reference
|
|
92
|
-
- 编写 JSX、CSS 或词包前,必须阅读 [`generation-standards.md`](knowledge/custom-page/generation-standards.md);选择 UI 组件时阅读 [`components.md`](knowledge/
|
|
92
|
+
- 编写 JSX、CSS 或词包前,必须阅读 [`generation-standards.md`](knowledge/custom-page/generation-standards.md);选择 UI 组件时阅读 [`components.md`](knowledge/components.md)
|
|
93
93
|
8. **Legacy modernization / Application Blueprint 工作流**
|
|
94
94
|
- 当用户要把无人交接老项目、外包接手项目或遗留系统翻新到 Lovrabet 体系时,先阅读 [`guides/legacy-application-blueprint-workflow.md`](guides/legacy-application-blueprint-workflow.md)
|
|
95
95
|
- 主产物是 `.rabetbase/blueprint/<appCode>/application-blueprint.md`,不是直接生成或推送 SQL/Backend Function
|
|
@@ -161,7 +161,7 @@ metadata:
|
|
|
161
161
|
- **写操作默认当前项目**(包括 `config init`、`workspace add`、`config set`、`project create` 等),除非用户**显式**传 `--global`。
|
|
162
162
|
- **不要**在用户未要求时给命令加 `--global`** — 默认行为已是「项目优先」;只有用户明确要改全局配置或不在项目内且意图写全局时才使用。
|
|
163
163
|
- **`config set`**:在**没有**项目配置文件(当前目录未解析到 `.rabetbase.json`)且**未**传 `--global` 时,CLI **拒绝执行**并提示使用 `--global` 或先 `rabetbase workspace init --appcode <code>`,**不会**静默写入全局。
|
|
164
|
-
- **`project create`** 生成的新项目 `.rabetbase.json` **只继承**少量全局偏好(如 `cookie` / `locale` / `format` / `riskLevel` 等),**不会**把全局 `apps` / `defaultApp` 带入新项目文件;同时生成浏览器安全的 `src/api/sdk-config.ts` 与 `rabetbase.domain-routing.json`。每个官方节点直接声明自己的第三方库 CDN 与 Lovrabet 自有资源 Domain;项目文件始终包含解析后的完整地址,企业独立部署从共用清单读取显式 CDN
|
|
164
|
+
- **`project create`** 生成的新项目 `.rabetbase.json` **只继承**少量全局偏好(如 `cookie` / `locale` / `format` / `riskLevel` 等),**不会**把全局 `apps` / `defaultApp` 带入新项目文件;同时生成浏览器安全的 `src/api/sdk-config.ts` 与 `rabetbase.domain-routing.json`。每个官方节点直接声明自己的第三方库 CDN 与 Lovrabet 自有资源 Domain;项目文件始终包含解析后的完整地址,企业独立部署从共用清单读取显式 CDN。两个生成文件都不下发认证配置;`rabetbase run start|dev|build|preview` 会在执行脚本前刷新公开 Domain 快照,也可用 `project domain-routing-sync` 立即显式刷新;`api pull` 只刷新 SDK/API 文件。
|
|
165
165
|
- **`api pull` / `api list`**:默认仅针对**项目** `apps`;需要合并全局已登记应用时加 `--global`(见各命令 reference)。
|
|
166
166
|
- **`app list`**:默认展示**合并**后的全量;`--global` 仅全局、`--project` 仅项目(见 [`rabetbase app list`](references/rabetbase-app-list.md))。
|
|
167
167
|
|
|
@@ -358,10 +358,10 @@ const result = await client.bff.execute<DashboardData>({
|
|
|
358
358
|
| 审计数据集关联关系 | [`rabetbase dataset relation-audit`](references/rabetbase-dataset-relation-audit.md) | 只读审计关系事实结构错误、风险和人工复核项 |
|
|
359
359
|
| 管理单条数据集关联关系 | [`rabetbase dataset relation-create/update/delete`](references/rabetbase-dataset-relation-mutations.md) | 单条关系写入;写入前用 `relations` 确认 `datasetCode + field` 关系事实,DB_TABLE 写入所需表名来自显式参数或物理表事实 |
|
|
360
360
|
| 首次生成数据列表页 | [`rabetbase page generate-start --datasetcode <code>`](references/rabetbase-page-generate-start.md) | 提交或复用服务端异步任务 |
|
|
361
|
-
| 创建自定义页面 | [`rabetbase page create --page-pattern BLANK --name "客户看板"`](references/rabetbase-page-create.md) |
|
|
361
|
+
| 创建自定义页面 | [`rabetbase page create --page-pattern BLANK --name "客户看板"`](references/rabetbase-page-create.md) | 综合操作页面优先使用 `ONEPAGE`,业务数据可视化使用 `DASHBOARD`,基础页面使用 `BLANK`;模板详情见 [`page-templates.md`](knowledge/custom-page/page-templates.md),也可通过 `--page-dir` 创建完整页面;先 dry-run |
|
|
362
362
|
| 查询自定义页面 | [`rabetbase page custom-list`](references/rabetbase-page-custom-list.md) | 返回页面 ID、页面名称、`pageUrl`(查看最新保存内容)和 `editPageUrl`(打开编辑器) |
|
|
363
363
|
| 查看自定义页面详情 | [`rabetbase page custom-detail --id <pageId>`](references/rabetbase-page-custom-detail.md) | 查询页面详情,`codeContent` 包含可修改后整体提交的完整页面文件 |
|
|
364
|
-
| 更新自定义页面 | [`rabetbase page custom-update --id <pageId> --page-
|
|
364
|
+
| 更新自定义页面 | [`rabetbase page custom-update --id <pageId> --page-dir <dir>`](references/rabetbase-page-custom-update.md) | 以最新完整页面内容为基线更新,可参考 `BLANK`、`ONEPAGE` 或 `DASHBOARD` 的页面和交互模式;先 dry-run |
|
|
365
365
|
| 发布自定义页面 | [`rabetbase page custom-publish --id <pageId>`](references/rabetbase-page-custom-publish.md) | `write`;发布当前保存内容,先 dry-run 并审阅预览 |
|
|
366
366
|
| 查询数据列表页生成任务状态 | [`rabetbase page generate-status --datasetcode <code> --operation-id <id>`](references/rabetbase-page-generate-status.md) | 查询 job 状态,支持 `operationId` / `clientOperationId` |
|
|
367
367
|
| 查询数据列表页生成任务状态 | [`rabetbase page generate-status --datasetcode <code> --task-id <id>`](references/rabetbase-page-generate-status.md) | 查询 job 状态;taskId 首选,operationId/clientOperationId 兼容。成功后仍读取数据列表页事实,未知状态不得自动重提 |
|
|
@@ -20,10 +20,24 @@
|
|
|
20
20
|
### 新建页面
|
|
21
21
|
|
|
22
22
|
1. 先阅读 [`rabetbase-page-create.md`](../references/rabetbase-page-create.md)
|
|
23
|
-
2.
|
|
24
|
-
3.
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
2. 阅读 [`page-templates.md`](../knowledge/custom-page/page-templates.md),先判断内置模板能否作为页面的主要结构和交互起点;适合时选择 `BLANK`、`ONEPAGE` 或 `DASHBOARD`,不适合时按完整页面内容创建。模板也可在创建或更新页面时作为布局、主题和交互实现参考
|
|
24
|
+
3. 根据模板判断和本地内容情况选择创建方式:
|
|
25
|
+
|
|
26
|
+
| 内容来源 | 处理方式 |
|
|
27
|
+
|---|---|
|
|
28
|
+
| 使用内置模板 | 直接传 `--page-pattern <BLANK|ONEPAGE|DASHBOARD>`,由 CLI 读取对应模板 |
|
|
29
|
+
| 不使用内置模板,且没有本地已有内容 | 在当前工作目录创建临时专用页面目录,生成完整 JSX、样式、词包和组件文件,再将该目录传给 `--page-dir <dir>` |
|
|
30
|
+
| 本地已有完整页面目录 | 直接将该目录传给 `--page-dir <dir>`,无需创建临时目录或重新生成内容 |
|
|
31
|
+
|
|
32
|
+
模板只能作为局部实现参考,或创建后需要替换其中大部分文件时,按不使用内置模板处理,直接准备完整页面目录并使用 `--page-dir`。
|
|
33
|
+
|
|
34
|
+
`--page-pattern` 与 `--page-dir` 必须且只能选择一个;两者同时提供、均未提供,或 `--page-dir` 指向空目录时,本地校验失败。CLI 会递归读取 `--page-dir` 指向的目录并转换为页面请求内容,Agent 不得自行拼接或转码 `page-content` JSON
|
|
35
|
+
4. 先使用与正式创建相同的 `--page-pattern` 或 `--page-dir` 参数执行 `page create --dry-run`,确认页面名称、父菜单和最终页面文件
|
|
36
|
+
5. 经用户确认后执行正式创建命令
|
|
37
|
+
6. 仅当步骤 2 为从零生成内容而创建了临时目录时,流程成功、失败、中断或用户取消后都删除该目录;删除范围仅限本次创建的临时目录,不得删除用户已有页面目录
|
|
38
|
+
7. 创建成功时记录 `data.after.pageId`。新页面默认尚未发布
|
|
39
|
+
8. 执行 `page custom-detail --id <pageId>`,以 `data.codeContent` 中的完整页面文件为修改基线
|
|
40
|
+
9. 需要定制初始文件时,再按“更新页面”流程保存完整页面文件
|
|
27
41
|
|
|
28
42
|
创建页面会同时创建菜单入口。不得额外调用菜单创建命令重复创建入口。
|
|
29
43
|
|
|
@@ -37,15 +51,18 @@
|
|
|
37
51
|
### 更新页面
|
|
38
52
|
|
|
39
53
|
1. 阅读 [`rabetbase-page-custom-update.md`](../references/rabetbase-page-custom-update.md)
|
|
40
|
-
2.
|
|
41
|
-
3.
|
|
42
|
-
4.
|
|
43
|
-
5.
|
|
44
|
-
6.
|
|
54
|
+
2. 以 `page custom-detail` 返回的最新完整页面内容为修改基线
|
|
55
|
+
3. 需要调整页面模式或交互时,可参考 `BLANK`、`ONEPAGE` 或 `DASHBOARD` 的布局、主题和交互实现,按实际需求选择性合并;模板仅作为实现参考,不直接覆盖已有页面
|
|
56
|
+
4. 将新增、修改和保留的所有文件整理到一个专用本地目录
|
|
57
|
+
5. 先执行 `page custom-update --page-dir <dir> --dry-run` 审阅完整页面文件
|
|
58
|
+
6. 经用户确认后执行更新
|
|
59
|
+
7. 正式更新命令结束后,无论成功、失败或中断,都删除步骤 4 创建的临时页面目录,删除范围仅限该目录
|
|
60
|
+
8. 再执行 `page custom-detail --id <pageId>`,确认 `codeContent` 已包含预期文件和内容
|
|
61
|
+
9. 已发布页面更新后,最新保存内容需要再次发布,用户访问的已发布页面才能看到本次修改
|
|
45
62
|
|
|
46
|
-
`page custom-update`
|
|
63
|
+
`page custom-update` 会完整保存页面文件:传入目录中未包含的文件会被删除。不得只保留本次修改的单个文件,也不得为删除文件再调用不存在的独立删除命令。
|
|
47
64
|
|
|
48
|
-
当前 CLI
|
|
65
|
+
当前 CLI 没有逐文件新增、编辑或删除命令。将本地文件操作整理到完整目录后再调用 `custom-update`;每次更新都会创建一个新的保存版本,`custom-detail` 默认读取最新页面内容。
|
|
49
66
|
|
|
50
67
|
### 发布页面
|
|
51
68
|
|
|
@@ -62,7 +79,8 @@
|
|
|
62
79
|
自定义页面的 React JSX 实现有“未发布”和“已发布”两种状态。未发布的修改可通过 `pageUrl` 或编辑器查看,已发布页面只展示最近一次发布的内容。
|
|
63
80
|
|
|
64
81
|
```text
|
|
65
|
-
page create --page-pattern BLANK
|
|
82
|
+
page create --page-pattern <BLANK|ONEPAGE|DASHBOARD>
|
|
83
|
+
或 page create --page-dir <dir>
|
|
66
84
|
→ 未发布
|
|
67
85
|
→ 生成或更新完整页面文件
|
|
68
86
|
→ 未发布
|
|
@@ -139,7 +157,7 @@ page create --page-pattern BLANK
|
|
|
139
157
|
|
|
140
158
|
编写页面内容前,先阅读 [`generation-standards.md`](../knowledge/custom-page/generation-standards.md)。
|
|
141
159
|
|
|
142
|
-
- 选择、组合或新增 UI 组件时,按需阅读 [`components.md`](../knowledge/
|
|
160
|
+
- 选择、组合或新增 UI 组件时,按需阅读 [`components.md`](../knowledge/components.md)
|
|
143
161
|
- 调用页面上下文、国际化、路由或数据客户端时,按需阅读 `generation-standards.md` 中的“页面上下文内置能力”
|
|
144
162
|
- 未登记的组件、方法、参数和返回结构不得猜测,先补充确认后的规范再复用
|
|
145
163
|
|
|
@@ -157,14 +175,14 @@ src/components/*.jsx
|
|
|
157
175
|
代码遵循以下约束:
|
|
158
176
|
|
|
159
177
|
- 仅导入 [`generation-standards.md`](../knowledge/custom-page/generation-standards.md)“依赖白名单”中的包及其子路径
|
|
160
|
-
- 使用页面上下文时,从 `@/context/app-context` 导入 `useSdkClient`、`useI18n`、`useNavigate`、`useLocation`
|
|
178
|
+
- 使用页面上下文时,从 `@/context/app-context` 导入 `useSdkClient`、`useI18n`、`useNavigate`、`useLocation`、`useAppTheme`
|
|
161
179
|
- 数据读取或写入前,先确认数据集及 SDK 用法;接口或字段无法从现有事实确认时,不得猜测请求协议
|
|
162
180
|
- 所有用户可见文案通过 `$i18n.t("key")` 获取,并在 `src/locales/index.js` 提供有效翻译
|
|
163
181
|
- 路由跳转使用 `navigate`,读取地址信息使用 `location`;关联页面优先使用 `navigate("/pagecode", { onePage: true })`
|
|
164
182
|
- CSS 使用 Ant Design CSS 变量,不写死颜色或其他样式常量
|
|
165
183
|
- 不新增白名单外依赖,不使用 `window.location`
|
|
166
184
|
|
|
167
|
-
|
|
185
|
+
内置模板的本地文件、内容边界、mock 数据替换方式以及 `ONEPAGE`、`DASHBOARD` 交互设计统一见 [`page-templates.md`](../knowledge/custom-page/page-templates.md)。页面通过 `client` 访问真实业务数据的方式仍按 [`generation-standards.md`](../knowledge/custom-page/generation-standards.md) 执行。
|
|
168
186
|
|
|
169
187
|
## 页面内容自检
|
|
170
188
|
|
|
@@ -183,7 +201,7 @@ src/components/*.jsx
|
|
|
183
201
|
## 最小验证闭环
|
|
184
202
|
|
|
185
203
|
```text
|
|
186
|
-
|
|
204
|
+
新建:选择 --page-pattern <BLANK|ONEPAGE|DASHBOARD> 或 --page-dir <dir> → 使用相同来源参数执行 create --dry-run → create → custom-detail → [按需] custom-update --dry-run → custom-update → custom-detail → [尚未发布(status 非 FORMAL)且经确认] custom-publish --dry-run → custom-publish
|
|
187
205
|
|
|
188
206
|
修改:custom-list(按需)→ custom-detail → custom-update --dry-run → custom-update → custom-detail → [尚未发布(status 非 FORMAL)且经确认] custom-publish --dry-run → custom-publish
|
|
189
207
|
```
|
|
@@ -198,5 +216,5 @@ CLI 当前不提供本地预览或独立删除命令。
|
|
|
198
216
|
- [`rabetbase-page-custom-update.md`](../references/rabetbase-page-custom-update.md)
|
|
199
217
|
- [`rabetbase-page-custom-publish.md`](../references/rabetbase-page-custom-publish.md)
|
|
200
218
|
- [`generation-standards.md`](../knowledge/custom-page/generation-standards.md)
|
|
201
|
-
- [`components.md`](../knowledge/
|
|
219
|
+
- [`components.md`](../knowledge/components.md)
|
|
202
220
|
- [`rabetbase-codegen-sdk.md`](../references/rabetbase-codegen-sdk.md)
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
- 标准管理后台
|
|
40
40
|
- 单数据集或轻度关联数据集
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
综合操作页面、工作台、时间轴和复杂协作视图不走数据列表页工作流,应使用自定义页面。内置模板的选型、内容边界和交互模式见 [`page-templates.md`](../knowledge/custom-page/page-templates.md);已有完整页面文件时使用 `--page-dir <dir>`。`rabetbase project` 用于独立子应用工程,不作为自定义页面类型或复杂页面的兜底入口。
|
|
43
43
|
|
|
44
44
|
### 2. 校验数据集与关联页
|
|
45
45
|
|