@lovrabet/rabetbase-cli 2.4.5-beta.1 → 2.4.6-beta.1
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 +3 -2
- 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/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/get.js +1 -1
- package/lib/commands/config/index.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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/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-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/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/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/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/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/{standard-page-status.d.ts → create.d.ts} +1 -1
- package/lib/commands/page/create.js +1 -0
- package/lib/commands/page/{react → custom}/detail.d.ts +1 -1
- package/lib/commands/page/custom/detail.js +1 -0
- package/lib/commands/page/{react → custom}/list.d.ts +1 -1
- package/lib/commands/page/custom/list.js +1 -0
- package/lib/commands/page/{react → custom}/publish.d.ts +1 -1
- package/lib/commands/page/custom/publish.js +1 -0
- package/lib/commands/page/{react → custom}/shared.d.ts +15 -15
- package/lib/commands/page/custom/shared.js +1 -0
- package/lib/commands/page/{react → custom}/syntax.d.ts +2 -2
- package/lib/commands/page/custom/syntax.js +1 -0
- package/lib/commands/page/custom/template.js +1 -0
- package/lib/commands/page/{react → custom}/update.d.ts +1 -1
- package/lib/commands/page/custom/update.js +1 -0
- package/lib/commands/page/data-list-status.d.ts +2 -0
- package/lib/commands/page/data-list-status.js +1 -0
- 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.d.ts +18 -18
- 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/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/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/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/risk.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 +43 -43
- 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.d.ts +3 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/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/rules-cdn.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 +34 -34
- package/skills/rabetbase/guides/backend-function.md +63 -18
- package/skills/rabetbase/guides/bff-creation-workflow.md +2 -0
- package/skills/rabetbase/guides/{react-custom-page-workflow.md → custom-page-workflow.md} +45 -45
- package/skills/rabetbase/guides/page-development-workflow.md +22 -22
- package/skills/rabetbase/knowledge/{react-page → custom-page}/components.md +2 -2
- package/skills/rabetbase/knowledge/{react-page → custom-page}/generation-standards.md +6 -6
- package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +6 -6
- package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-create.md +2 -0
- package/skills/rabetbase/references/{rabetbase-standard-page-status.md → rabetbase-data-list-status.md} +6 -6
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +1 -1
- package/skills/rabetbase/references/rabetbase-dataset-relation-mutations.md +1 -1
- package/skills/rabetbase/references/rabetbase-dataset-relations.md +1 -1
- package/skills/rabetbase/references/rabetbase-dataset-restore.md +1 -1
- package/skills/rabetbase/references/rabetbase-menu-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-create.md +31 -0
- package/skills/rabetbase/references/{rabetbase-page-react-detail.md → rabetbase-page-custom-detail.md} +5 -5
- package/skills/rabetbase/references/{rabetbase-page-react-list.md → rabetbase-page-custom-list.md} +4 -4
- package/skills/rabetbase/references/{rabetbase-page-react-publish.md → rabetbase-page-custom-publish.md} +6 -6
- package/skills/rabetbase/references/{rabetbase-page-react-update.md → rabetbase-page-custom-update.md} +6 -6
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -4
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +4 -4
- package/skills/rabetbase/references/rabetbase-page-pull.md +2 -2
- package/skills/rabetbase/references/rabetbase-page-relation-binding.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-restore.md +7 -7
- package/skills/rabetbase/references/rabetbase-page-sync.md +3 -3
- package/skills/rabetbase.manifest.json +12 -12
- package/lib/commands/page/react/create.d.ts +0 -2
- package/lib/commands/page/react/create.js +0 -1
- package/lib/commands/page/react/detail.js +0 -1
- package/lib/commands/page/react/list.js +0 -1
- package/lib/commands/page/react/publish.js +0 -1
- package/lib/commands/page/react/shared.js +0 -1
- package/lib/commands/page/react/syntax.js +0 -1
- package/lib/commands/page/react/template.js +0 -1
- package/lib/commands/page/react/update.js +0 -1
- package/lib/commands/page/standard-page-status.js +0 -1
- package/skills/rabetbase/references/rabetbase-page-react-create.md +0 -29
- /package/lib/commands/page/{react → custom}/template.d.ts +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
# page
|
|
1
|
+
# page custom-publish
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
发布自定义页面的当前保存内容。
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
rabetbase page
|
|
7
|
-
rabetbase page
|
|
6
|
+
rabetbase page custom-publish --id <pageId> --dry-run --format compress
|
|
7
|
+
rabetbase page custom-publish --id <pageId> --remark "发布说明"
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
## 参数
|
|
11
11
|
|
|
12
12
|
| 参数 | 必填 | 说明 |
|
|
13
13
|
|---|---|---|
|
|
14
|
-
| `--id <pageId>` | 是 |
|
|
14
|
+
| `--id <pageId>` | 是 | 自定义页面 ID |
|
|
15
15
|
| `--remark <text>` | 否 | 发布备注 |
|
|
16
16
|
|
|
17
17
|
## 执行步骤
|
|
18
18
|
|
|
19
|
-
1. 先使用 `page
|
|
19
|
+
1. 先使用 `page custom-detail` 检查 `status` 和页面版本
|
|
20
20
|
2. `status` 为 `FORMAL` 时表示当前内容已经发布,跳过发布,继续查看已发布页面或后续流程
|
|
21
21
|
3. `status` 不是 `FORMAL` 时,使用 `--dry-run` 确认目标页面和发布备注
|
|
22
22
|
4. 审阅预览后,使用相同参数移除 `--dry-run` 执行发布
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
# page
|
|
1
|
+
# page custom-update
|
|
2
2
|
|
|
3
|
-
以完整页面文件 JSON 更新
|
|
3
|
+
以完整页面文件 JSON 更新 自定义页面,并创建新的保存版本。未包含的文件会被删除。
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
rabetbase page
|
|
7
|
-
rabetbase page
|
|
6
|
+
rabetbase page custom-update --id <pageId> --page-content '<json>' --dry-run --format compress
|
|
7
|
+
rabetbase page custom-update --id <pageId> --page-content '<json>' --appcode <appCode>
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
## 参数
|
|
11
11
|
|
|
12
12
|
| 参数 | 必填 | 说明 |
|
|
13
13
|
|---|---|---|
|
|
14
|
-
| `--id <pageId>` | 是 |
|
|
14
|
+
| `--id <pageId>` | 是 | 自定义页面 ID |
|
|
15
15
|
| `--page-content <json>` | 是 | 完整页面文件 JSON;对象的键为相对路径,值为文件内容 |
|
|
16
16
|
| `--appcode <code>` | 否 | 目标应用 code,省略时根据 `pageId` 查询 |
|
|
17
17
|
|
|
18
18
|
## 执行步骤
|
|
19
19
|
|
|
20
|
-
1. 先使用 `page
|
|
20
|
+
1. 先使用 `page custom-detail` 读取 `data.codeContent` 中的完整页面文件。
|
|
21
21
|
2. 在本地完成所有文件新增、修改或删除后,使用 `--dry-run` 确认完整页面文件。
|
|
22
22
|
3. 确认后使用相同参数执行更新。
|
|
23
23
|
4. 从结构化输出的 `data.after.version` 确认已保存新版本。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# page generate-start
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
异步提交或复用数据列表页(Data List Page)生成任务。
|
|
4
4
|
|
|
5
5
|
## 命令
|
|
6
6
|
|
|
@@ -17,10 +17,11 @@ rabetbase page generate-start --alias order --apply --format json
|
|
|
17
17
|
|
|
18
18
|
## 行为说明
|
|
19
19
|
|
|
20
|
-
-
|
|
20
|
+
- 这是数据列表页生成的 **async-first 提交入口**。
|
|
21
21
|
- **默认仅返回 dry-run 预览,不会调用 `generate-standard-pages/start`**;需要真正提交任务必须显式加 `--apply`。`--dry-run` 与不传 `--apply` 行为等价。
|
|
22
|
-
- CLI
|
|
22
|
+
- CLI 会先执行 `page data-list-status` 做前置判定;底层仍调用既有服务端 `standard-page-status` 接口。
|
|
23
23
|
- 若允许生成且传入 `--apply`,CLI 会自动生成 `clientOperationId`,并调用 Java 侧 `generate-standard-pages/start`。
|
|
24
|
+
- 提交结果固定返回 `pageType=DATA_LIST` 与 `pagePattern=CRUD_PAGE_SET`;命令不接受 `--page-type` 或 `--page-pattern`。
|
|
24
25
|
- 返回结果里的 `operationId` 是服务端 job 主标识;`clientOperationId` 是调用方恢复 / 幂等锚点。
|
|
25
26
|
- `query.command` 默认给出 `operationId` 查询;调用方若只保留了 `clientOperationId`,也可以用它恢复到同一条任务查询。
|
|
26
27
|
- Agent / 自动化编排优先直接复用返回值里的 `query.command`,不要自己重新拼接恢复查询命令。
|
|
@@ -29,4 +30,4 @@ rabetbase page generate-start --alias order --apply --format json
|
|
|
29
30
|
## 参考
|
|
30
31
|
|
|
31
32
|
- [rabetbase-page-generate-status.md](rabetbase-page-generate-status.md)
|
|
32
|
-
- [rabetbase-
|
|
33
|
+
- [rabetbase-data-list-status.md](rabetbase-data-list-status.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# page generate-status
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
查询数据列表页(Data List Page)生成任务状态。
|
|
4
4
|
|
|
5
5
|
## 命令
|
|
6
6
|
|
|
@@ -20,13 +20,13 @@ rabetbase page generate-status --datasetcode 097b7361b76c42bcb12b923fa5a08861 --
|
|
|
20
20
|
## 行为说明
|
|
21
21
|
|
|
22
22
|
- 命令查询的是**任务状态**,不是页面事实。
|
|
23
|
-
- 当任务进入成功终态时,CLI 会补查 `
|
|
23
|
+
- 当任务进入成功终态时,CLI 会补查 `page data-list-status`,把页面事实一并附在结果里,方便你直接判断是否形成完整数据列表页组。
|
|
24
24
|
- 若任务仍在 `PENDING/PROCESSING/RUNNING`,结果会保持机器可读的 `status / nextAction / query`。
|
|
25
25
|
- 提交生成后保存 `taskId`、`operationId` 与 `clientOperationId`;超时、未知状态或网络失败时复用原标识查询,不重新执行 `generate-start --apply`,不得自动重提。
|
|
26
|
-
- 成功终态时,页面组锚点位于 `data.
|
|
26
|
+
- 成功终态时,页面组锚点位于 `data.dataListPageStatus.pageSets[].versionTag`。存在多个完整组、残留页或冲突时交给用户确认,不猜测 `versionTag`。
|
|
27
27
|
- 确认页面组后,使用 `page pull --datasetcode <code> --version-tag <tag>` 精确拉取。
|
|
28
28
|
|
|
29
29
|
## 参考
|
|
30
30
|
|
|
31
31
|
- [rabetbase-page-generate-start.md](rabetbase-page-generate-start.md)
|
|
32
|
-
- [rabetbase-
|
|
32
|
+
- [rabetbase-data-list-status.md](rabetbase-data-list-status.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# page pull
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
拉取数据列表页(Data List Page,DOV2 `smart_page`)的 formal schema 到本地 **`.rabetbase/page/<appCode>/`**,进入 `pull -> IDE 编辑 -> push` 工作流。
|
|
4
4
|
|
|
5
5
|
## 命令
|
|
6
6
|
|
|
@@ -34,7 +34,7 @@ rabetbase page pull --datasetcode 097b7361b76c42bcb12b923fa5a08861 --dry-run --f
|
|
|
34
34
|
- 单页模式:按 `pageId` 拉取单个页面并更新 lock
|
|
35
35
|
- 批量模式:按数据集筛选关联页面;若存在多个 `versionTag` 组且未指定 `--version-tag`,命令会 fail-fast
|
|
36
36
|
- 本地文件存在未推送修改且未传 `--force` 时,会跳过或报冲突
|
|
37
|
-
- 页面生成链路中的 `versionTag` 来自 `page generate-status` 的 `data.
|
|
37
|
+
- 页面生成链路中的 `versionTag` 来自 `page generate-status` 的 `data.dataListPageStatus.pageSets[]`;存在多个候选组时先由用户确认,不按顺序或时间猜测
|
|
38
38
|
|
|
39
39
|
## 提示
|
|
40
40
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# page restore
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
恢复当前应用下一条已删除的数据列表页(Data List Page)或自定义页面(Custom Page)。
|
|
4
4
|
|
|
5
5
|
## 命令
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
rabetbase page restore --id 1023895 --dry-run --format json
|
|
9
9
|
rabetbase page restore --id 1023895 --format json
|
|
10
|
-
rabetbase page restore --id 1450 --page-type
|
|
10
|
+
rabetbase page restore --id 1450 --page-type CUSTOM --format json
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## 参数
|
|
@@ -15,17 +15,17 @@ rabetbase page restore --id 1450 --page-type JSX --format json
|
|
|
15
15
|
| Flag | 类型 | 必填 | 默认 | 说明 |
|
|
16
16
|
|------|------|------|------|------|
|
|
17
17
|
| `--id <pageId>` | number | 是 | — | 已删除页面 ID,必须为正整数 |
|
|
18
|
-
| `--page-type <type>` | string | 否 | — | `
|
|
18
|
+
| `--page-type <type>` | string | 否 | — | `DATA_LIST` 或 `CUSTOM`;用于缩小查询范围或消除跨类型同 ID 歧义 |
|
|
19
19
|
| `--dry-run` | boolean | 否 | `false` | 定位页面并预览恢复请求,不执行恢复 |
|
|
20
20
|
| `--format <fmt>` | string | 否 | `compress` | 输出格式 |
|
|
21
21
|
|
|
22
22
|
## 行为说明
|
|
23
23
|
|
|
24
|
-
- 未传 `--page-type` 时,CLI
|
|
25
|
-
- 同一个数字 ID 在两类页面中同时存在时,CLI 不猜测目标;需显式传 `--page-type
|
|
26
|
-
-
|
|
24
|
+
- 未传 `--page-type` 时,CLI 查询当前应用下数据列表页与自定义页面两类已删除页面,并按 `--id` 唯一定位。
|
|
25
|
+
- 同一个数字 ID 在两类页面中同时存在时,CLI 不猜测目标;需显式传 `--page-type DATA_LIST` 或 `--page-type CUSTOM`。
|
|
26
|
+
- 数据列表页恢复请求只携带页面 ID;自定义页面恢复请求同时携带当前 `appCode` 和页面 ID。
|
|
27
27
|
- 自动识别时任一类型查询失败都会终止恢复,避免在无法排除同 ID 歧义时写错目标。
|
|
28
|
-
-
|
|
28
|
+
- 自定义页面恢复返回未更新记录时,按状态已变化或页面已恢复处理,不报告成功。
|
|
29
29
|
|
|
30
30
|
## 输出
|
|
31
31
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# page sync
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
将数据集字段变更同步到已存在的数据列表页(Data List Page,DOV2 `smart_page`)。
|
|
4
4
|
|
|
5
5
|
## 命令
|
|
6
6
|
|
|
@@ -21,8 +21,8 @@ rabetbase page sync --datasetcode 097b7361b76c42bcb12b923fa5a08861 --dry-run --f
|
|
|
21
21
|
|
|
22
22
|
## 行为说明
|
|
23
23
|
|
|
24
|
-
-
|
|
25
|
-
- CLI
|
|
24
|
+
- 该命令面向**已有数据列表页**的增量同步场景。
|
|
25
|
+
- CLI 会先检查数据集下是否存在未删除的关联数据列表页。
|
|
26
26
|
- 若当前没有可同步页面,命令会 fail-fast,并提示改走 `rabetbase page generate-start --datasetcode <code>` 这条异步生成路径;具体轮询与回查流程见 [page-development-workflow.md](../guides/page-development-workflow.md)。
|
|
27
27
|
|
|
28
28
|
## 提示
|
|
@@ -2,25 +2,27 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "rabetbase",
|
|
4
4
|
"packageName": "@lovrabet/rabetbase-cli",
|
|
5
|
-
"packageVersion": "2.4.
|
|
6
|
-
"skillVersion": "2.4.
|
|
5
|
+
"packageVersion": "2.4.6-beta.1",
|
|
6
|
+
"skillVersion": "2.4.6-beta.1",
|
|
7
7
|
"files": [
|
|
8
8
|
"SKILL.md",
|
|
9
9
|
"guides/backend-function.md",
|
|
10
10
|
"guides/best-practices.md",
|
|
11
11
|
"guides/bff-creation-workflow.md",
|
|
12
12
|
"guides/conflict-detection.md",
|
|
13
|
+
"guides/custom-page-workflow.md",
|
|
13
14
|
"guides/data-api-guidelines.md",
|
|
14
15
|
"guides/database-connection-workflow.md",
|
|
15
16
|
"guides/frontend-development.md",
|
|
16
17
|
"guides/legacy-application-blueprint-workflow.md",
|
|
17
18
|
"guides/menu-anomaly-manual-cleanup.md",
|
|
18
19
|
"guides/page-development-workflow.md",
|
|
19
|
-
"guides/react-custom-page-workflow.md",
|
|
20
20
|
"guides/sql-creation-workflow.md",
|
|
21
21
|
"guides/sql-mybatis.md",
|
|
22
22
|
"guides/troubleshooting.md",
|
|
23
23
|
"guides/typescript-sdk.md",
|
|
24
|
+
"knowledge/custom-page/components.md",
|
|
25
|
+
"knowledge/custom-page/generation-standards.md",
|
|
24
26
|
"knowledge/page-schema/LrSmartCreate.md",
|
|
25
27
|
"knowledge/page-schema/LrSmartDetail.md",
|
|
26
28
|
"knowledge/page-schema/LrSmartFilter.md",
|
|
@@ -31,8 +33,6 @@
|
|
|
31
33
|
"knowledge/page-schema/external-resources-usage.md",
|
|
32
34
|
"knowledge/page-schema/field-components.md",
|
|
33
35
|
"knowledge/page-schema/syntax-reference.md",
|
|
34
|
-
"knowledge/react-page/components.md",
|
|
35
|
-
"knowledge/react-page/generation-standards.md",
|
|
36
36
|
"references/rabetbase-api-list.md",
|
|
37
37
|
"references/rabetbase-api-pull.md",
|
|
38
38
|
"references/rabetbase-app-config.md",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"references/rabetbase-codegen-sdk.md",
|
|
53
53
|
"references/rabetbase-codegen-sql.md",
|
|
54
54
|
"references/rabetbase-config.md",
|
|
55
|
+
"references/rabetbase-data-list-status.md",
|
|
55
56
|
"references/rabetbase-dataset-business-group-update.md",
|
|
56
57
|
"references/rabetbase-dataset-business-groups.md",
|
|
57
58
|
"references/rabetbase-dataset-delete.md",
|
|
@@ -95,15 +96,15 @@
|
|
|
95
96
|
"references/rabetbase-notification-config-list.md",
|
|
96
97
|
"references/rabetbase-notification-config-mutations.md",
|
|
97
98
|
"references/rabetbase-ocr.md",
|
|
99
|
+
"references/rabetbase-page-create.md",
|
|
100
|
+
"references/rabetbase-page-custom-detail.md",
|
|
101
|
+
"references/rabetbase-page-custom-list.md",
|
|
102
|
+
"references/rabetbase-page-custom-publish.md",
|
|
103
|
+
"references/rabetbase-page-custom-update.md",
|
|
98
104
|
"references/rabetbase-page-generate-start.md",
|
|
99
105
|
"references/rabetbase-page-generate-status.md",
|
|
100
106
|
"references/rabetbase-page-pull.md",
|
|
101
107
|
"references/rabetbase-page-push.md",
|
|
102
|
-
"references/rabetbase-page-react-create.md",
|
|
103
|
-
"references/rabetbase-page-react-detail.md",
|
|
104
|
-
"references/rabetbase-page-react-list.md",
|
|
105
|
-
"references/rabetbase-page-react-publish.md",
|
|
106
|
-
"references/rabetbase-page-react-update.md",
|
|
107
108
|
"references/rabetbase-page-relation-binding.md",
|
|
108
109
|
"references/rabetbase-page-restore.md",
|
|
109
110
|
"references/rabetbase-page-sync.md",
|
|
@@ -123,12 +124,11 @@
|
|
|
123
124
|
"references/rabetbase-sql-push.md",
|
|
124
125
|
"references/rabetbase-sql-status.md",
|
|
125
126
|
"references/rabetbase-sql-validate.md",
|
|
126
|
-
"references/rabetbase-standard-page-status.md",
|
|
127
127
|
"references/rabetbase-task-status.md",
|
|
128
128
|
"references/rabetbase-tenant-members-list.md",
|
|
129
129
|
"references/rabetbase-update.md",
|
|
130
130
|
"references/rabetbase-user-account.md",
|
|
131
131
|
"references/rabetbase-workspace.md"
|
|
132
132
|
],
|
|
133
|
-
"digest": "
|
|
133
|
+
"digest": "dd90c1b3e021f31891219ea2530315b4df94ef9053a4cb1f5c427517c10c67d3"
|
|
134
134
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a147_0x570791=a147_0x44b8;(function(_0x485f6f,_0x107972){const _0x264dab=a147_0x44b8,_0x173627=_0x485f6f();while(!![]){try{const _0x162dea=parseInt(_0x264dab(0x1e8))/0x1+parseInt(_0x264dab(0x201))/0x2*(-parseInt(_0x264dab(0x1ee))/0x3)+parseInt(_0x264dab(0x211))/0x4+parseInt(_0x264dab(0x1f2))/0x5*(-parseInt(_0x264dab(0x20c))/0x6)+-parseInt(_0x264dab(0x205))/0x7*(parseInt(_0x264dab(0x20d))/0x8)+parseInt(_0x264dab(0x203))/0x9*(parseInt(_0x264dab(0x1f3))/0xa)+parseInt(_0x264dab(0x1ef))/0xb*(-parseInt(_0x264dab(0x1de))/0xc);if(_0x162dea===_0x107972)break;else _0x173627['push'](_0x173627['shift']());}catch(_0x3d4bdc){_0x173627['push'](_0x173627['shift']());}}}(a147_0x1164,0x1e54a));import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{buildInitialFiles}from'../../../commands/page/react/template.js';import{createReactPage,getI18nInfo}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildReactPageDevelopmentUrl,buildReactPageEditUrl,parseReactPageContent,validateReactPageContent}from'./shared.js';const DEFAULT_REACT_PAGE_LANGUAGES=[a147_0x570791(0x1e5),a147_0x570791(0x1e3)];export const pageReactCreate={'service':a147_0x570791(0x1e6),'command':a147_0x570791(0x1e4),'description':a147_0x570791(0x20b),'risk':a147_0x570791(0x1f1),'defaultOutputFormat':a147_0x570791(0x204),'structuredErrors':!![],'flags':[{'name':'name','type':a147_0x570791(0x20a),'description':a147_0x570791(0x1fb)},{'name':a147_0x570791(0x20e),'type':a147_0x570791(0x1e0),'description':'Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry'},{'name':a147_0x570791(0x200),'type':'string','description':a147_0x570791(0x1ff)},APPCODE_FLAG],async 'validate'(_0x4f3c4a){const _0x229eec=a147_0x570791;await validateReactPageContent(readInput(_0x4f3c4a)[_0x229eec(0x1e2)]);},async 'dryRun'(_0x5a1cd7){const _0x3897d7=a147_0x570791,{input:_0xa931e7}=await prepare(_0x5a1cd7);return{'method':_0x3897d7(0x1f7),'url':_0x3897d7(0x1da),'body':{'appCode':_0xa931e7[_0x3897d7(0x209)],'pageName':_0xa931e7[_0x3897d7(0x1ea)],..._0xa931e7['parentMenuId']!=null?{'parentMenuId':_0xa931e7[_0x3897d7(0x1eb)]}:{},'createMenu':_0xa931e7['createMenu'],'codeContent':_0xa931e7[_0x3897d7(0x1e2)]},'description':_0x3897d7(0x1dd)+JSON['stringify'](_0xa931e7[_0x3897d7(0x1ea)])+_0x3897d7(0x1df)};},async 'execute'(_0x21632b){const _0x3a8bd4=a147_0x570791,_0x3e877e=await prepare(_0x21632b),_0x54b965=await createReactPage(_0x3e877e[_0x3a8bd4(0x1dc)]);if(!Number[_0x3a8bd4(0x1fe)](_0x54b965['pageId'])||_0x54b965['pageId']<=0x0)throw CliErrors['apiError'](_0x3a8bd4(0x206));return{'ok':!![],'data':buildMutationData(_0x3e877e,_0x54b965),'message':_0x3a8bd4(0x1fa)+_0x54b965[_0x3a8bd4(0x1ed)]+'.'};}};async function prepare(_0x14fc87){const _0x4de33c=a147_0x570791;if(_0x14fc87['str'](_0x4de33c(0x200))[_0x4de33c(0x1fd)]())return{'input':readInput(_0x14fc87),'warnings':[]};let _0xa0fed7=DEFAULT_REACT_PAGE_LANGUAGES,_0x3e77b0=[];try{const _0xc4ffd9=await getI18nInfo(_0x14fc87[_0x4de33c(0x209)]);_0xc4ffd9[_0x4de33c(0x1fc)]&&_0xc4ffd9[_0x4de33c(0x1f8)]?.[_0x4de33c(0x202)]&&(_0xa0fed7=_0xc4ffd9['langs']);}catch{_0x3e77b0=[_0x4de33c(0x1ec)];}return{'input':readInput(_0x14fc87,_0xa0fed7),'warnings':_0x3e77b0};}function readInput(_0x50695b,_0x26903e=DEFAULT_REACT_PAGE_LANGUAGES){const _0x1f725a=a147_0x570791,_0xe14010=_0x50695b['str'](_0x1f725a(0x1f4))['trim']()||_0x1f725a(0x208)+Date['now']();if(_0xe14010[_0x1f725a(0x202)]>0x64)throw CliErrors['validation'](_0x1f725a(0x1db));const _0x5f414c=_0x50695b[_0x1f725a(0x1e7)](_0x1f725a(0x20e),NaN),_0x4b6f05=!Number[_0x1f725a(0x1f5)](_0x5f414c);if(_0x4b6f05&&(!Number[_0x1f725a(0x1fe)](_0x5f414c)||_0x5f414c<=0x0))throw CliErrors['validation'](_0x1f725a(0x1f0));const _0x27d75a=_0x50695b[_0x1f725a(0x1f9)]('page-content');return{'appCode':_0x50695b[_0x1f725a(0x209)],'pageName':_0xe14010,..._0x4b6f05?{'parentMenuId':_0x5f414c}:{},'createMenu':!![],'files':_0x27d75a[_0x1f725a(0x1fd)]()?parseReactPageContent(_0x27d75a):buildInitialFiles(_0xe14010,_0x26903e)};}function buildMutationData(_0x187174,_0x4e0551){const _0xdec1ad=a147_0x570791,{input:_0x2f6e52}=_0x187174,_0x87a700=_0x4e0551&&buildReactPageDevelopmentUrl(_0x2f6e52[_0xdec1ad(0x209)],_0x4e0551[_0xdec1ad(0x1f6)]),_0x1982be=_0x4e0551&&buildReactPageEditUrl(_0x2f6e52[_0xdec1ad(0x209)],_0x4e0551[_0xdec1ad(0x1ed)]);return{'operation':_0xdec1ad(0x20f),'selector':{'appCode':_0x2f6e52[_0xdec1ad(0x209)],'pageName':_0x2f6e52[_0xdec1ad(0x1ea)]},'before':null,'after':{'pageId':_0x4e0551?.[_0xdec1ad(0x1ed)]??null,'pageName':_0x4e0551?.['pageName']??_0x2f6e52[_0xdec1ad(0x1ea)],'appCode':_0x4e0551?.[_0xdec1ad(0x209)]??_0x2f6e52[_0xdec1ad(0x209)],'version':_0x4e0551?.['version']??null,'menuId':_0x4e0551?.[_0xdec1ad(0x210)]??null,'menuPath':_0x4e0551?.[_0xdec1ad(0x1f6)]??null,'files':_0x4e0551?.[_0xdec1ad(0x1e2)]??Object[_0xdec1ad(0x1e1)](_0x2f6e52['files'])},'dryRun':_0x4e0551===undefined,'request':_0x2f6e52,..._0x87a700?{'pageUrl':_0x87a700}:{},..._0x1982be?{'editPageUrl':_0x1982be}:{},'warnings':[..._0x187174[_0xdec1ad(0x207)],..._0x4e0551&&!_0x87a700?[_0xdec1ad(0x1e9)]:[]]};}function a147_0x44b8(_0xcdcac8,_0x3e3f9e){_0xcdcac8=_0xcdcac8-0x1da;const _0x116497=a147_0x1164();let _0x44b84d=_0x116497[_0xcdcac8];return _0x44b84d;}function a147_0x1164(){const _0x41cd53=['Application\x20language\x20settings\x20could\x20not\x20be\x20read;\x20default\x20Chinese\x20and\x20English\x20language\x20files\x20were\x20generated.','pageId','3EwBILz','11OtvfkV','--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.','write','30fGxtTK','405260oxVSzi','name','isNaN','menuPath','POST','langs','str','Created\x20React\x20custom\x20page\x20','Optional\x20React\x20custom\x20page\x20name\x20(1-100\x20characters)','enableI18n','trim','isInteger','Optional\x20complete\x20page\x20files\x20as\x20JSON','page-content','202322DHmIDJ','length','36ZqmMNi','compress','346899qKONVD','React\x20custom\x20page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','warnings','自定义页面_','appCode','string','Create\x20a\x20React\x20custom\x20page\x20with\x20starter\x20files','22626zeWARY','24oXZnaD','parent-menu-id','page.react-create','menuId','800928SnbPpU','/smartapi/webcode/page/create','pageName\x20cannot\x20exceed\x20100\x20characters.','input','Would\x20create\x20React\x20custom\x20page\x20','2272236iLcGSF','\x20and\x20its\x20menu\x20entry.','number','keys','files','en-US','react-create','zh-CN','page','num','223709fsAdvL','React\x20custom\x20page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','pageName','parentMenuId'];a147_0x1164=function(){return _0x41cd53;};return a147_0x1164();}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a148_0x540215=a148_0x2d7b;function a148_0x2d7b(_0x3946de,_0x21c8f5){_0x3946de=_0x3946de-0xa2;const _0xf05ad4=a148_0xf05a();let _0x2d7b4e=_0xf05ad4[_0x3946de];return _0x2d7b4e;}(function(_0x280401,_0x5b082b){const _0x24a441=a148_0x2d7b,_0x5987fd=_0x280401();while(!![]){try{const _0x530cf1=-parseInt(_0x24a441(0xa3))/0x1+parseInt(_0x24a441(0xac))/0x2+parseInt(_0x24a441(0xba))/0x3*(parseInt(_0x24a441(0xb0))/0x4)+parseInt(_0x24a441(0xae))/0x5*(-parseInt(_0x24a441(0xa8))/0x6)+parseInt(_0x24a441(0xa2))/0x7+parseInt(_0x24a441(0xb9))/0x8*(-parseInt(_0x24a441(0xad))/0x9)+parseInt(_0x24a441(0xb5))/0xa*(parseInt(_0x24a441(0xb6))/0xb);if(_0x530cf1===_0x5b082b)break;else _0x5987fd['push'](_0x5987fd['shift']());}catch(_0x221e94){_0x5987fd['push'](_0x5987fd['shift']());}}}(a148_0xf05a,0x249f0));import{getReactPageSource}from'../../../core/api-client.js';import{buildReactPageEditUrl,buildReactPageRuntimeUrl,readReactPageId,REACT_PAGE_APPCODE_FLAG_OPTIONAL,resolveReactPageDevelopmentUrl}from'./shared.js';export const pageReactDetail={'service':a148_0x540215(0xbc),'command':a148_0x540215(0xa5),'description':a148_0x540215(0xa6),'risk':a148_0x540215(0xb2),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a148_0x540215(0xb1),'required':!![],'description':'React\x20custom\x20page\x20ID'},REACT_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5addb9){readReactPageId(_0x5addb9);},async 'execute'(_0x510e74){const _0x287d2a=a148_0x540215,_0x53fd0e=readReactPageId(_0x510e74),_0x2743e7=await getReactPageSource(_0x53fd0e),{bundle:_0xa9cd3e,createTime:_0x6340f7,updateTime:_0x4b8fa3,..._0x5b703a}=_0x2743e7,_0x42715d=_0x2743e7['id']??_0x53fd0e,_0x4e09aa=_0x2743e7[_0x287d2a(0xa9)]?.[_0x287d2a(0xbe)]()||_0x510e74[_0x287d2a(0xab)]('appcode')[_0x287d2a(0xbe)](),_0x58cdbf=buildReactPageRuntimeUrl(_0x4e09aa,_0x2743e7[_0x287d2a(0xbb)]),_0x284d43=buildReactPageEditUrl(_0x4e09aa,_0x42715d),_0x4a0fba=await resolveReactPageDevelopmentUrl(_0x4e09aa,_0x42715d,_0x510e74['cookie']);return{'ok':!![],'data':{..._0x5b703a,..._0x58cdbf?{'runtimePageUrl':_0x58cdbf}:{},..._0x4a0fba?{'pageUrl':_0x4a0fba}:{},..._0x284d43?{'editPageUrl':_0x284d43}:{},..._0x6340f7==null?{}:{'createTime':formatTime(_0x6340f7)},..._0x4b8fa3==null?{}:{'updateTime':formatTime(_0x4b8fa3)}},'message':'Retrieved\x20React\x20custom\x20page\x20'+_0x53fd0e+'.'};}};function formatTime(_0x41548e){const _0x324e7e=a148_0x540215,_0x4d8f28=new Date(_0x41548e);if(Number[_0x324e7e(0xa4)](_0x4d8f28[_0x324e7e(0xb3)]()))return String(_0x41548e);const _0x5aa6a1=[_0x4d8f28['getFullYear'](),String(_0x4d8f28[_0x324e7e(0xaa)]()+0x1)[_0x324e7e(0xb8)](0x2,'0'),String(_0x4d8f28[_0x324e7e(0xbd)]())[_0x324e7e(0xb8)](0x2,'0')][_0x324e7e(0xa7)]('-'),_0x440ea0=[String(_0x4d8f28[_0x324e7e(0xb7)]())[_0x324e7e(0xb8)](0x2,'0'),String(_0x4d8f28[_0x324e7e(0xaf)]())['padStart'](0x2,'0'),String(_0x4d8f28[_0x324e7e(0xb4)]())[_0x324e7e(0xb8)](0x2,'0')][_0x324e7e(0xa7)](':');return _0x5aa6a1+'\x20'+_0x440ea0;}function a148_0xf05a(){const _0xf916f7=['trim','1426103WAOZTu','211271gAKrVv','isNaN','react-detail','Show\x20a\x20React\x20custom\x20page\x20and\x20all\x20of\x20its\x20files','join','1024194hNoGXs','appCode','getMonth','str','245210nXKoFn','461907nWKjRq','5FJXGKU','getMinutes','8sqQcsm','number','read','getTime','getSeconds','30KDuMHQ','595243AZbvQg','getHours','padStart','8pBgSZD','141930kFQbDI','pageCode','page','getDate'];a148_0xf05a=function(){return _0xf916f7;};return a148_0xf05a();}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a149_0x5ab3e5=a149_0x4ff5;(function(_0x3ed79c,_0x7a772c){const _0xabf7f8=a149_0x4ff5,_0x279056=_0x3ed79c();while(!![]){try{const _0x578d20=parseInt(_0xabf7f8(0x1a2))/0x1+-parseInt(_0xabf7f8(0x1a4))/0x2+parseInt(_0xabf7f8(0x19b))/0x3*(parseInt(_0xabf7f8(0x1ae))/0x4)+-parseInt(_0xabf7f8(0x1a3))/0x5+parseInt(_0xabf7f8(0x199))/0x6*(parseInt(_0xabf7f8(0x1ab))/0x7)+-parseInt(_0xabf7f8(0x1a5))/0x8*(parseInt(_0xabf7f8(0x19e))/0x9)+parseInt(_0xabf7f8(0x1aa))/0xa*(-parseInt(_0xabf7f8(0x1a7))/0xb);if(_0x578d20===_0x7a772c)break;else _0x279056['push'](_0x279056['shift']());}catch(_0x565340){_0x279056['push'](_0x279056['shift']());}}}(a149_0x2e5f,0x9c8db));function a149_0x4ff5(_0x434522,_0x404f5e){_0x434522=_0x434522-0x199;const _0x2e5ff1=a149_0x2e5f();let _0x4ff514=_0x2e5ff1[_0x434522];return _0x4ff514;}import{APPCODE_FLAG}from'../../../commands/common/flags.js';function a149_0x2e5f(){const _0x4bb364=['appCode','read','1093466QqTnah','171865GrKVsc','715894dCGKAn','56FavnJu','pageId','22lmpsGA','path','menus','8567050JXfNTK','273oFFYeR','page','length','4XNrkNP','List\x20React\x20custom\x20pages\x20in\x20the\x20current\x20app','194844wJemjK','\x20React\x20custom\x20page(s).','3225279jSOpeD','type','cookie','884664bxaKgF','Found\x20'];a149_0x2e5f=function(){return _0x4bb364;};return a149_0x2e5f();}import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildReactPageDevelopmentUrl,buildReactPageEditUrl}from'./shared.js';export const pageReactList={'service':a149_0x5ab3e5(0x1ac),'command':'react-list','description':a149_0x5ab3e5(0x1af),'risk':a149_0x5ab3e5(0x1a1),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[APPCODE_FLAG],async 'execute'(_0x41eef9){const _0x47553e=a149_0x5ab3e5,_0x50fcd2=(await fetchMenuSnapshot(_0x41eef9[_0x47553e(0x1a0)],_0x41eef9[_0x47553e(0x19d)]))[_0x47553e(0x1a9)]['flatMap'](_0x525d0f=>{const _0x19cbdb=_0x47553e;if(_0x525d0f[_0x19cbdb(0x19c)]!=='react'||_0x525d0f[_0x19cbdb(0x1a6)]==null)return[];const _0x289b80=buildReactPageDevelopmentUrl(_0x41eef9[_0x19cbdb(0x1a0)],_0x525d0f[_0x19cbdb(0x1a8)]),_0x5ea8dd=buildReactPageEditUrl(_0x41eef9[_0x19cbdb(0x1a0)],_0x525d0f[_0x19cbdb(0x1a6)]);return[{'pageId':_0x525d0f[_0x19cbdb(0x1a6)],'label':_0x525d0f['label'],..._0x289b80?{'pageUrl':_0x289b80}:{},..._0x5ea8dd?{'editPageUrl':_0x5ea8dd}:{}}];});return{'ok':!![],'data':{'pages':_0x50fcd2},'message':_0x50fcd2[_0x47553e(0x1ad)]===0x0?'No\x20React\x20custom\x20pages\x20found.':_0x47553e(0x19f)+_0x50fcd2['length']+_0x47553e(0x19a)};}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a150_0x29ca(){const _0x4afdd9=['/smartapi/webcode/file/publish','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','pageCode','531027fUHZJU','page','status','967264jgwjqE','React\x20custom\x20page\x20ID','23035270QiBzaF','runtimePageUrl','4DKDByI','warnings','54ZMekAr','cookie','trim','remark','779808mIPvoE','102956mwPdPp','FORMAL','POST','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20React\x20custom\x20page','195lwtbWg','pageId','2826348hDOfGQ','str','2670834ErpiAF','unknown','compress','push','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','Would\x20publish\x20React\x20custom\x20page\x20','apiError'];a150_0x29ca=function(){return _0x4afdd9;};return a150_0x29ca();}const a150_0x3db4a0=a150_0x338c;(function(_0x203b9e,_0x3d7181){const _0x426bb7=a150_0x338c,_0x238bf0=_0x203b9e();while(!![]){try{const _0x10c76f=parseInt(_0x426bb7(0x86))/0x1+parseInt(_0x426bb7(0x8a))/0x2*(parseInt(_0x426bb7(0x83))/0x3)+parseInt(_0x426bb7(0x91))/0x4*(parseInt(_0x426bb7(0x75))/0x5)+-parseInt(_0x426bb7(0x79))/0x6+parseInt(_0x426bb7(0x77))/0x7+-parseInt(_0x426bb7(0x90))/0x8*(-parseInt(_0x426bb7(0x8c))/0x9)+-parseInt(_0x426bb7(0x88))/0xa;if(_0x10c76f===_0x3d7181)break;else _0x238bf0['push'](_0x238bf0['shift']());}catch(_0x46eb22){_0x238bf0['push'](_0x238bf0['shift']());}}}(a150_0x29ca,0x89f41));import{getReactPageSource,publishReactPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';function a150_0x338c(_0x2975c4,_0x18f711){_0x2975c4=_0x2975c4-0x72;const _0x29ca04=a150_0x29ca();let _0x338cd9=_0x29ca04[_0x2975c4];return _0x338cd9;}import{buildReactPageEditUrl,buildReactPageRuntimeUrl,readReactPageId,resolveReactPageDevelopmentUrl}from'./shared.js';export const pageReactPublish={'service':a150_0x3db4a0(0x84),'command':'react-publish','description':a150_0x3db4a0(0x74),'risk':'write','defaultOutputFormat':a150_0x3db4a0(0x7b),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':'number','required':!![],'description':a150_0x3db4a0(0x87)},{'name':a150_0x3db4a0(0x8f),'type':'string','description':'Optional\x20publish\x20remark'}],async 'validate'(_0x105ef8){readReactPageId(_0x105ef8);},async 'dryRun'(_0x480480){const _0x12faf2=a150_0x3db4a0,_0x249d69=readInput(_0x480480);return{'method':_0x12faf2(0x73),'url':_0x12faf2(0x80),'body':{'id':_0x249d69['pageId'],..._0x249d69[_0x12faf2(0x8f)]?{'remark':_0x249d69[_0x12faf2(0x8f)]}:{}},'description':_0x12faf2(0x7e)+_0x249d69[_0x12faf2(0x76)]+'.'};},async 'execute'(_0x2500b7){const _0x5c33e8=a150_0x3db4a0,_0x5bd51c=readInput(_0x2500b7);await getReactPageSource(_0x5bd51c['pageId']);const _0x3d15ec=await publishReactPage(_0x5bd51c);if(!Number['isInteger'](_0x3d15ec)||_0x3d15ec!==_0x5bd51c[_0x5c33e8(0x76)])throw CliErrors[_0x5c33e8(0x7f)]('React\x20custom\x20page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.');const _0x2fe996=await getReactPageSource(_0x5bd51c[_0x5c33e8(0x76)]);if(_0x2fe996[_0x5c33e8(0x85)]!=='FORMAL')throw CliErrors[_0x5c33e8(0x7f)]('React\x20custom\x20page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20'+(_0x2fe996[_0x5c33e8(0x85)]??_0x5c33e8(0x7a))+'.');const _0x578c8b=_0x2fe996['appCode']?.['trim'](),_0x1740d7=buildReactPageEditUrl(_0x578c8b,_0x5bd51c[_0x5c33e8(0x76)]),_0x2186ec=await resolveReactPageDevelopmentUrl(_0x578c8b,_0x5bd51c[_0x5c33e8(0x76)],_0x2500b7[_0x5c33e8(0x8d)]),_0x14b198=buildMutationData(_0x5bd51c,!![],_0x2186ec,_0x1740d7);_0x578c8b&&!_0x2186ec&&_0x14b198[_0x5c33e8(0x8b)]['push'](_0x5c33e8(0x81));const _0x5a8228=buildReactPageRuntimeUrl(_0x2fe996['appCode'],_0x2fe996[_0x5c33e8(0x82)]);return _0x5a8228?_0x14b198[_0x5c33e8(0x89)]=_0x5a8228:_0x14b198[_0x5c33e8(0x8b)][_0x5c33e8(0x7c)](_0x5c33e8(0x7d)),{'ok':!![],'data':_0x14b198,'message':'Published\x20React\x20custom\x20page\x20'+_0x5bd51c[_0x5c33e8(0x76)]+'.'};}};function readInput(_0x3aa0a0){const _0x257f5a=a150_0x3db4a0,_0x1f3f31=readReactPageId(_0x3aa0a0),_0x514113=_0x3aa0a0[_0x257f5a(0x78)](_0x257f5a(0x8f))[_0x257f5a(0x8e)]();return{'pageId':_0x1f3f31,..._0x514113?{'remark':_0x514113}:{}};}function buildMutationData(_0x429c42,_0xf9e61f=![],_0x4f0cad,_0x3fcf66){const _0x50c054=a150_0x3db4a0;return{'operation':'page.react-publish','selector':{'pageId':_0x429c42[_0x50c054(0x76)]},'before':null,'after':{'pageId':_0x429c42[_0x50c054(0x76)],'status':_0x50c054(0x72)},'dryRun':!_0xf9e61f,'request':_0x429c42,..._0x4f0cad?{'pageUrl':_0x4f0cad}:{},..._0x3fcf66?{'editPageUrl':_0x3fcf66}:{},'warnings':[]};}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x4ea29b,_0x2aa364){const _0x41fd29=a151_0x4247,_0x4dfc6f=_0x4ea29b();while(!![]){try{const _0x455b55=parseInt(_0x41fd29(0x1b8))/0x1+-parseInt(_0x41fd29(0x1a4))/0x2+-parseInt(_0x41fd29(0x1a7))/0x3*(parseInt(_0x41fd29(0x1a8))/0x4)+-parseInt(_0x41fd29(0x1bd))/0x5*(parseInt(_0x41fd29(0x1c1))/0x6)+-parseInt(_0x41fd29(0x1ac))/0x7+parseInt(_0x41fd29(0x1b6))/0x8+parseInt(_0x41fd29(0x1a2))/0x9;if(_0x455b55===_0x2aa364)break;else _0x4dfc6f['push'](_0x4dfc6f['shift']());}catch(_0x50eb83){_0x4dfc6f['push'](_0x4dfc6f['shift']());}}}(a151_0x56d3,0x2b259));function a151_0x56d3(){const _0x45db16=['114ImOKjA','trim','path','map','flagMissing','3025062HUlsGW','num','15136uBTstP','parse','isInteger','303fZxbLt','10184zWcWJn','string','https://app.lovrabet.com','.app.lovrabet.com','1815737WGcpYO','--page-content\x20must\x20be\x20a\x20JSON\x20object\x20whose\x20values\x20are\x20file\x20content\x20strings.','join','values','length','--id\x20must\x20be\x20a\x20positive\x20integer.','pageId','.daily.lovrabet.com','type','react','2488720MRlDeM','/pages/','308378HOXuut','page-content','object','/app','isArray','67040psxIQz','file','validation','/web-app/app'];a151_0x56d3=function(){return _0x45db16;};return a151_0x56d3();}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getEnv,isProduction}from'../../../constant/env.js';import{getAppBaseUrl}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateReactPageSourceFiles}from'./syntax.js';export const REACT_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':'Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted'};function a151_0x4247(_0x5a0295,_0x5b31fb){_0x5a0295=_0x5a0295-0x1a0;const _0x56d3ff=a151_0x56d3();let _0x42470e=_0x56d3ff[_0x5a0295];return _0x42470e;}function trimOptional(_0x30961b){const _0x6cd9fa=a151_0x4247;return _0x30961b?.[_0x6cd9fa(0x1c2)]()||undefined;}export function buildReactPageRuntimeUrl(_0x14916c,_0x55356b){const _0x26538c=a151_0x4247,_0x4a8ce8=trimOptional(_0x14916c),_0x26961f=trimOptional(_0x55356b);if(!_0x4a8ce8||!_0x26961f)return undefined;const _0x4c1b93=isProduction(getEnv())?_0x4a8ce8+_0x26538c(0x1ab):_0x4a8ce8+_0x26538c(0x1b3);return'https://'+_0x4c1b93+'/'+encodeURIComponent(_0x26961f);}export function buildReactPageDevelopmentUrl(_0x2874ca,_0x29be4c){const _0x336d53=a151_0x4247,_0x23534e=trimOptional(_0x2874ca),_0x22b87b=trimOptional(_0x29be4c);if(!_0x23534e||!_0x22b87b)return undefined;return getAppBaseUrl(_0x23534e)+_0x336d53(0x1b7)+encodeURIComponent(_0x22b87b);}export async function resolveReactPageDevelopmentUrl(_0x2d6dc6,_0x15531c,_0x3aa9a5){const _0x427b1c=a151_0x4247,_0x497beb=trimOptional(_0x2d6dc6);if(!_0x497beb)return undefined;try{const _0x5c1e4a=(await fetchMenuSnapshot(_0x497beb,_0x3aa9a5))['menus']['find'](_0xbc585b=>_0xbc585b[_0x427b1c(0x1b4)]===_0x427b1c(0x1b5)&&_0xbc585b[_0x427b1c(0x1b2)]===_0x15531c);return buildReactPageDevelopmentUrl(_0x497beb,_0x5c1e4a?.[_0x427b1c(0x1c3)]);}catch{return undefined;}}export function buildReactPageEditUrl(_0x45fd4d,_0x4bf26a){const _0x14eda2=a151_0x4247,_0x1b2c5f=trimOptional(_0x45fd4d);if(!_0x1b2c5f)return;const _0x1b839c=trimOptional(_0x4bf26a==null?undefined:String(_0x4bf26a));if(!_0x1b839c)return;const _0x40e27d=isProduction(getEnv())?_0x14eda2(0x1bb):_0x14eda2(0x1c0),_0x3d2f8b=isProduction(getEnv())?_0x14eda2(0x1aa):'https://daily.lovrabet.com';return''+_0x3d2f8b+_0x40e27d+'/'+encodeURIComponent(_0x1b2c5f)+'/ide/'+encodeURIComponent(_0x1b839c);}export function parseReactPageContent(_0x58c6fc){const _0x422e9c=a151_0x4247;if(!_0x58c6fc[_0x422e9c(0x1c2)]())throw CliErrors[_0x422e9c(0x1a1)](_0x422e9c(0x1b9));let _0x12b7aa;try{_0x12b7aa=JSON[_0x422e9c(0x1a5)](_0x58c6fc);}catch{throw CliErrors['validation']('--page-content\x20must\x20be\x20valid\x20JSON.');}if(typeof _0x12b7aa!==_0x422e9c(0x1ba)||_0x12b7aa===null||Array[_0x422e9c(0x1bc)](_0x12b7aa)||Object[_0x422e9c(0x1af)](_0x12b7aa)['some'](_0xe1d7e0=>typeof _0xe1d7e0!==_0x422e9c(0x1a9)))throw CliErrors[_0x422e9c(0x1bf)](_0x422e9c(0x1ad));return _0x12b7aa;}export async function validateReactPageContent(_0x4bd0b2){const _0x433a65=a151_0x4247,_0x53ccc5=await validateReactPageSourceFiles(_0x4bd0b2);if(_0x53ccc5[_0x433a65(0x1b0)]>0x0)throw CliErrors[_0x433a65(0x1bf)]('Invalid\x20React\x20page\x20content:\x20'+_0x53ccc5[_0x433a65(0x1a0)](_0x433d5a=>_0x433d5a[_0x433a65(0x1be)]+':\x20'+_0x433d5a['message'])[_0x433a65(0x1ae)](';\x20'));}export function readReactPageId(_0x581c61){const _0x1d55d7=a151_0x4247,_0x26580e=_0x581c61[_0x1d55d7(0x1a3)]('id');if(!Number[_0x1d55d7(0x1a6)](_0x26580e)||_0x26580e<=0x0)throw CliErrors[_0x1d55d7(0x1bf)](_0x1d55d7(0x1b1));return _0x26580e;}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a152_0xa09fe7=a152_0x1ff8;(function(_0x125434,_0x2ae204){const _0x10bb42=a152_0x1ff8,_0x205481=_0x125434();while(!![]){try{const _0x4b1a6f=-parseInt(_0x10bb42(0x132))/0x1*(-parseInt(_0x10bb42(0x133))/0x2)+-parseInt(_0x10bb42(0x12f))/0x3+-parseInt(_0x10bb42(0x139))/0x4+-parseInt(_0x10bb42(0x136))/0x5+parseInt(_0x10bb42(0x12e))/0x6*(-parseInt(_0x10bb42(0x13e))/0x7)+-parseInt(_0x10bb42(0x13b))/0x8+parseInt(_0x10bb42(0x135))/0x9*(parseInt(_0x10bb42(0x131))/0xa);if(_0x4b1a6f===_0x2ae204)break;else _0x205481['push'](_0x205481['shift']());}catch(_0x510fcd){_0x205481['push'](_0x205481['shift']());}}}(a152_0x5335,0xcf98e));import{format}from'prettier';function a152_0x5335(){const _0x51cf19=['196985zWWMhm','endsWith','trim','3319728fxwWeO','typescript','8735368PWWeYQ','find','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','10774043PMbgPj','.tsx','entries','toLowerCase','6PsbDcy','2888982JtoAvy','.jsx','480ORZxOE','1LqdFGR','3383934OFJSoJ','filter','679077wKdJod'];a152_0x5335=function(){return _0x51cf19;};return a152_0x5335();}const SOURCE_PARSERS={'.js':'babel','.jsx':'babel','.ts':a152_0xa09fe7(0x13a),'.tsx':a152_0xa09fe7(0x13a)},REACT_PAGE_EXTENSIONS=[a152_0xa09fe7(0x130),a152_0xa09fe7(0x12b)];export async function validateReactPageSourceFiles(_0x137486){const _0x5ee821=a152_0xa09fe7,_0x285343=Object[_0x5ee821(0x12c)](_0x137486)[_0x5ee821(0x134)](([_0x3cf42e])=>getParser(_0x3cf42e));if(!_0x285343['some'](([_0x31c825])=>isReactSourceFile(_0x31c825)))return[{'file':'page-content','message':_0x5ee821(0x13d)}];const _0x400034=await Promise['all'](_0x285343['map'](async([_0x2fe6ed,_0x462244])=>{try{return await format(_0x462244,{'parser':getParser(_0x2fe6ed)}),undefined;}catch(_0x375b26){return{'file':_0x2fe6ed,'message':_0x375b26 instanceof Error?_0x375b26['message']:String(_0x375b26)};}}));return _0x400034['filter'](_0x268a9f=>_0x268a9f!==undefined);}function a152_0x1ff8(_0x5a1705,_0x2b568d){_0x5a1705=_0x5a1705-0x12b;const _0x53356a=a152_0x5335();let _0x1ff883=_0x53356a[_0x5a1705];return _0x1ff883;}function getParser(_0x532fc9){const _0x463b93=a152_0xa09fe7,_0x4fcf02=_0x532fc9[_0x463b93(0x138)]()[_0x463b93(0x12d)]();return Object[_0x463b93(0x12c)](SOURCE_PARSERS)[_0x463b93(0x13c)](([_0x166631])=>_0x4fcf02['endsWith'](_0x166631))?.[0x1];}function isReactSourceFile(_0x388add){const _0x4e3083=a152_0xa09fe7,_0xb8420b=_0x388add['trim']()[_0x4e3083(0x12d)]();return REACT_PAGE_EXTENSIONS['some'](_0x49efd8=>_0xb8420b[_0x4e3083(0x137)](_0x49efd8));}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0xdd45f7,_0x2478d8){const _0x5f4962=a153_0x237e,_0x463616=_0xdd45f7();while(!![]){try{const _0x57a55f=-parseInt(_0x5f4962(0x127))/0x1*(parseInt(_0x5f4962(0x123))/0x2)+-parseInt(_0x5f4962(0x12c))/0x3*(parseInt(_0x5f4962(0x131))/0x4)+parseInt(_0x5f4962(0x11d))/0x5+parseInt(_0x5f4962(0x125))/0x6*(-parseInt(_0x5f4962(0x11c))/0x7)+parseInt(_0x5f4962(0x11a))/0x8*(-parseInt(_0x5f4962(0x133))/0x9)+-parseInt(_0x5f4962(0x12e))/0xa+parseInt(_0x5f4962(0x11f))/0xb;if(_0x57a55f===_0x2478d8)break;else _0x463616['push'](_0x463616['shift']());}catch(_0xe5493c){_0x463616['push'](_0x463616['shift']());}}}(a153_0x36e5,0x36396));function a153_0x36e5(){const _0x48135d=['map','id-ID','35314yjMsmh','Bu\x20bir\x20temel\x20sayfa\x20şablonudur.\x20Bu\x20temaplana\x20dayanarak\x20geliştirilebilir.','142134NWEbGZ','stringify','5iafhRF','pageDescription','这是一个基础页面模板,你可以在此基础上进行开发。','\x0a};\x0a','}</Typography.Title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{$i18n.t(\x27pageDescription\x27,\x20\x27这是一个基础页面模板,你可以在此基础上进行开发。\x27)}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</Typography.Paragraph>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</Typography>\x0a\x20\x20\x20\x20\x20\x20</Card>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20);\x0a};\x0a\x0aexport\x20default\x20App;\x0a','437076sicUcU','This\x20is\x20a\x20basic\x20page\x20template,\x20you\x20can\x20develop\x20based\x20on\x20it.','1637090FZDwXG','これは基本ページテンプレートです。あなたは、これに基づいて開発できます。','.page-container\x20{\x0a\x20\x20padding:\x2024px;\x0a\x20\x20background:\x20#f0f2f5;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a','12Nuwoxm','ja-JP','1457991GHJefP','import\x20React\x20from\x20\x27react\x27;\x0aimport\x20{\x20Card,\x20Typography\x20}\x20from\x20\x27antd\x27;\x0aimport\x20{\x20useSdkClient,\x20useI18n,\x20useNavigate,\x20useLocation\x20}\x20from\x20\x22@/context/app-context\x22;\x0aimport\x20{\x20locales\x20}\x20from\x20\x27../locales\x27;\x0aimport\x20\x27./index.css\x27;\x0a\x0aconst\x20App\x20=\x20()\x20=>\x20{\x0a\x20\x20const\x20client\x20=\x20useSdkClient();\x20//\x20client\x20可以用于获取其他数据集的数据\x0a\x20\x20const\x20$i18n\x20=\x20useI18n();\x20//\x20国际化多语言\x20i18n\x20实例\x0a\x20\x20const\x20navigate\x20=\x20useNavigate();\x20//\x20react-router\x20navigate\x20导航实例\x0a\x20\x20const\x20location\x20=\x20useLocation();\x20//\x20浏览器\x20location\x20实例\x0a\x0a\x20\x20$i18n.addLocale(locales);\x20//\x20添加多语言词包\x0a\x0a\x20\x20return\x20(\x0a\x20\x20\x20\x20<div\x20className=\x22page-container\x22>\x0a\x20\x20\x20\x20\x20\x20<Card>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<Typography>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Typography.Title\x20level={2}>{','tr-TR','8dzrWKE','en-US','49CVZAIx','13800JdgYpy',',\x0a\x20\x20}','13598574sAmekm','join'];a153_0x36e5=function(){return _0x48135d;};return a153_0x36e5();}function a153_0x237e(_0x2433d0,_0x524448){_0x2433d0=_0x2433d0-0x119;const _0x36e574=a153_0x36e5();let _0x237ee2=_0x36e574[_0x2433d0];return _0x237ee2;}function buildIndexFile(_0x4f5ed3){const _0x4cad3a=a153_0x237e;return _0x4cad3a(0x134)+JSON[_0x4cad3a(0x126)](_0x4f5ed3)+_0x4cad3a(0x12b);}function buildStyleFile(){const _0x39c9f5=a153_0x237e;return _0x39c9f5(0x130);}function buildLocalesFile(_0x25f00d){const _0x24be34=a153_0x237e,_0x3d00f0=_0x25f00d[_0x24be34(0x121)](_0xa450d0=>{const _0x3773bb=_0x24be34;let _0xf37407='';switch(_0xa450d0){case'zh-CN':_0xf37407=_0x3773bb(0x129);break;case _0x3773bb(0x11b):_0xf37407=_0x3773bb(0x12d);break;case _0x3773bb(0x132):_0xf37407=_0x3773bb(0x12f);break;case _0x3773bb(0x119):_0xf37407=_0x3773bb(0x124);break;case _0x3773bb(0x122):_0xf37407='Ini\x20adalah\x20sebuah\x20halaman\x20dasar.\x20Anda\x20dapat\x20mengembangkan\x20ini.';break;default:_0xf37407=_0x3773bb(0x12d);}return'\x20\x20'+JSON[_0x3773bb(0x126)](_0xa450d0)+':\x20{\x0a\x20\x20\x20\x20'+JSON[_0x3773bb(0x126)](_0x3773bb(0x128))+':\x20'+JSON[_0x3773bb(0x126)](_0xf37407)+_0x3773bb(0x11e);})[_0x24be34(0x120)](',\x0a');return'export\x20const\x20locales\x20=\x20{\x0a'+_0x3d00f0+_0x24be34(0x12a);}export function buildInitialFiles(_0xcc3296,_0x251a06){return{'src/app/index.jsx':buildIndexFile(_0xcc3296),'src/app/index.css':buildStyleFile(),'src/locales/index.js':buildLocalesFile(_0x251a06)};}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a154_0x310c(){const _0x3458f5=['isInteger','17127ythlLN','Cannot\x20determine\x20the\x20appCode\x20for\x20React\x20custom\x20page\x20','Save\x20all\x20files\x20of\x20a\x20React\x20custom\x20page','trim','string','902wpuWdq','appCode','818292SkFeHh','Updated\x20React\x20custom\x20page\x20','page','react-update','page.react-update','1317232EqbmzF','str','Would\x20save\x20all\x20files\x20of\x20React\x20custom\x20page\x20','6206608LPFbrN','page-content','1072950hkcOWg','compress','363310IZRCfT','Complete\x20page\x20files\x20as\x20JSON','cookie','pageId','pageContent','/smartapi/webcode/page/update/content','39jEXmyl','number','POST','newVersion'];a154_0x310c=function(){return _0x3458f5;};return a154_0x310c();}const a154_0x1efda4=a154_0x2101;(function(_0x434c51,_0xd013f8){const _0x17e00a=a154_0x2101,_0x3aabdc=_0x434c51();while(!![]){try{const _0x3f8da9=-parseInt(_0x17e00a(0x148))/0x1+-parseInt(_0x17e00a(0x14d))/0x2*(-parseInt(_0x17e00a(0x143))/0x3)+-parseInt(_0x17e00a(0x131))/0x4+-parseInt(_0x17e00a(0x13d))/0x5+-parseInt(_0x17e00a(0x13b))/0x6+-parseInt(_0x17e00a(0x136))/0x7+parseInt(_0x17e00a(0x139))/0x8;if(_0x3f8da9===_0xd013f8)break;else _0x3aabdc['push'](_0x3aabdc['shift']());}catch(_0xc207e6){_0x3aabdc['push'](_0x3aabdc['shift']());}}}(a154_0x310c,0x1d606));function a154_0x2101(_0x4b8d3e,_0x1b8d11){_0x4b8d3e=_0x4b8d3e-0x130;const _0x310c93=a154_0x310c();let _0x210145=_0x310c93[_0x4b8d3e];return _0x210145;}import{getReactPageSource,updateReactPageContent}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildReactPageEditUrl,parseReactPageContent,resolveReactPageDevelopmentUrl,readReactPageId,REACT_PAGE_APPCODE_FLAG_OPTIONAL,validateReactPageContent}from'./shared.js';export const pageReactUpdate={'service':a154_0x1efda4(0x133),'command':a154_0x1efda4(0x134),'description':a154_0x1efda4(0x14a),'risk':'write','defaultOutputFormat':a154_0x1efda4(0x13c),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a154_0x1efda4(0x144),'required':!![],'description':'React\x20custom\x20page\x20ID'},{'name':a154_0x1efda4(0x13a),'type':a154_0x1efda4(0x14c),'required':!![],'description':a154_0x1efda4(0x13e)},REACT_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4ec858){const _0x40d480=a154_0x1efda4;readReactPageId(_0x4ec858),await validateReactPageContent(parseReactPageContent(_0x4ec858[_0x40d480(0x137)](_0x40d480(0x13a))));},async 'dryRun'(_0x113967){const _0x2f49de=a154_0x1efda4,_0x1eaee5=await readInput(_0x113967);return{'method':_0x2f49de(0x145),'url':_0x2f49de(0x142),'body':{'id':_0x1eaee5[_0x2f49de(0x140)],'codeContent':_0x1eaee5['pageContent']},'description':_0x2f49de(0x138)+_0x1eaee5[_0x2f49de(0x140)]+'.'};},async 'execute'(_0x454ee4){const _0xff2577=a154_0x1efda4,_0x30dcfa=await readInput(_0x454ee4),_0x49b554=await updateReactPageContent({'pageId':_0x30dcfa['pageId'],'pageContent':_0x30dcfa[_0xff2577(0x141)]});if(!Number[_0xff2577(0x147)](_0x49b554[_0xff2577(0x146)])||_0x49b554[_0xff2577(0x146)]<=0x0)throw CliErrors['apiError']('React\x20custom\x20page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.');const _0x274357=buildReactPageEditUrl(_0x30dcfa[_0xff2577(0x130)],_0x30dcfa[_0xff2577(0x140)]),_0x4fb2e6=await resolveReactPageDevelopmentUrl(_0x30dcfa[_0xff2577(0x130)],_0x30dcfa[_0xff2577(0x140)],_0x454ee4[_0xff2577(0x13f)]);return{'ok':!![],'data':buildMutationData(_0x30dcfa,_0x49b554,_0x4fb2e6,_0x274357,_0x4fb2e6?[]:['React\x20custom\x20page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.']),'message':_0xff2577(0x132)+_0x30dcfa[_0xff2577(0x140)]+'.'};}};async function readInput(_0x20b97a){const _0x2247ce=a154_0x1efda4,_0x1f5e2b=readReactPageId(_0x20b97a),_0x16d40c=_0x20b97a[_0x2247ce(0x137)]('appcode')[_0x2247ce(0x14b)]()||(await getReactPageSource(_0x1f5e2b))[_0x2247ce(0x130)]?.[_0x2247ce(0x14b)]();if(!_0x16d40c)throw CliErrors['validation'](_0x2247ce(0x149)+_0x1f5e2b+'.');return{'appCode':_0x16d40c,'pageId':_0x1f5e2b,'pageContent':parseReactPageContent(_0x20b97a[_0x2247ce(0x137)]('page-content'))};}function buildMutationData(_0x578c80,_0x259616,_0x3b1a5e,_0x10d1dc,_0xe4f335=[]){const _0x35f2a0=a154_0x1efda4;return{'operation':_0x35f2a0(0x135),'selector':{'appCode':_0x578c80[_0x35f2a0(0x130)],'pageId':_0x578c80['pageId']},'before':null,'after':{'pageId':_0x259616?.[_0x35f2a0(0x140)]??_0x578c80[_0x35f2a0(0x140)],'version':_0x259616?.[_0x35f2a0(0x146)]??null,'pageContent':_0x578c80[_0x35f2a0(0x141)]},'dryRun':_0x259616===undefined,'request':_0x578c80,..._0x3b1a5e?{'pageUrl':_0x3b1a5e}:{},..._0x10d1dc?{'editPageUrl':_0x10d1dc}:{},'warnings':_0xe4f335};}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a158_0x2444(_0x32f941,_0x1f9f1c){_0x32f941=_0x32f941-0x1ce;const _0x50fc13=a158_0x50fc();let _0x244484=_0x50fc13[_0x32f941];return _0x244484;}const a158_0x2a4dc1=a158_0x2444;(function(_0x360181,_0xe7eca2){const _0xfb96aa=a158_0x2444,_0x4169be=_0x360181();while(!![]){try{const _0x4d139d=parseInt(_0xfb96aa(0x1e5))/0x1+-parseInt(_0xfb96aa(0x1de))/0x2+parseInt(_0xfb96aa(0x1e9))/0x3+-parseInt(_0xfb96aa(0x1d4))/0x4+parseInt(_0xfb96aa(0x1d7))/0x5*(parseInt(_0xfb96aa(0x1e1))/0x6)+parseInt(_0xfb96aa(0x1cf))/0x7*(-parseInt(_0xfb96aa(0x1d5))/0x8)+parseInt(_0xfb96aa(0x1d2))/0x9;if(_0x4d139d===_0xe7eca2)break;else _0x4169be['push'](_0x4169be['shift']());}catch(_0x5cfc55){_0x4169be['push'](_0x4169be['shift']());}}}(a158_0x50fc,0x4c6f1));function a158_0x50fc(){const _0x558c56=['status','string','10816497JRKpWt','standard-page-status','948540tbadPw','3112aWiIha','page','5NsrOAy','/smartapi/lovrabet/dataset/','related-pages-fallback','length','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','name','appCode','591320EyvKnU','read','relatedPages','151350susEjW','GET','/standard-page-status?appCode=','code','171285uXwGvj','query-standard-page-status','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','nextAction','146757hptFbz','source','compress','10822AFxKxE'];a158_0x50fc=function(){return _0x558c56;};return a158_0x50fc();}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageStandardPageStatus={'service':a158_0x2a4dc1(0x1d6),'command':a158_0x2a4dc1(0x1d3),'description':a158_0x2a4dc1(0x1e7),'risk':a158_0x2a4dc1(0x1df),'defaultOutputFormat':a158_0x2a4dc1(0x1ce),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a158_0x2a4dc1(0x1d1),'description':a158_0x2a4dc1(0x1db)}],async 'validate'(_0x3da34a){validateDatasetSelector(_0x3da34a);},async 'dryRun'(_0x557e51){const _0x1b59ee=a158_0x2a4dc1,_0x401eb0=await loadDatasetDetailForPage(_0x557e51);return{'method':_0x1b59ee(0x1e2),'url':_0x1b59ee(0x1d8)+_0x401eb0[_0x1b59ee(0x1e4)]+_0x1b59ee(0x1e3)+encodeURIComponent(_0x557e51[_0x1b59ee(0x1dd)]),'description':serializeDryRunDescription({'dataset':{'id':_0x401eb0['id'],'code':_0x401eb0[_0x1b59ee(0x1e4)],'name':_0x401eb0[_0x1b59ee(0x1dc)]},'action':_0x1b59ee(0x1e6)})};},async 'execute'(_0x3157c0){const _0x3f1054=a158_0x2a4dc1,_0x28edf3=await loadDatasetDetailForPage(_0x3157c0),_0x5cc0ea=await loadStandardPageStatusForGenerate(_0x3157c0,_0x28edf3[_0x3f1054(0x1e4)]),_0x3c74f9=getUndeletedRelatedPages(_0x28edf3),_0x716443=assessStandardPageState(_0x28edf3['code'],_0x5cc0ea,{'fallbackUndeletedPages':_0x3c74f9});return{'ok':!![],'data':{'datasetCode':_0x28edf3[_0x3f1054(0x1e4)],'precheckSource':_0x5cc0ea?.[_0x3f1054(0x1ea)]??_0x3f1054(0x1d9),'status':_0x716443[_0x3f1054(0x1d0)],'manualResolutionRequired':_0x716443['manualResolutionRequired'],'nextAction':_0x716443[_0x3f1054(0x1e8)],'standardPageStatus':_0x5cc0ea,'relatedPages':{'total':_0x28edf3[_0x3f1054(0x1e0)][_0x3f1054(0x1da)],'undeletedCount':_0x3c74f9[_0x3f1054(0x1da)]}}};}};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# page react-create
|
|
2
|
-
|
|
3
|
-
创建 React 自定义页面,初始化 JSX、样式和多语言词包,并同时创建菜单入口。
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
rabetbase page react-create --name "客户看板" --appcode <appCode> --dry-run --format compress
|
|
7
|
-
rabetbase page react-create --name "客户看板" --parent-menu-id 100 --appcode <appCode>
|
|
8
|
-
rabetbase page react-create --name "客户看板" --page-content '<json>' --appcode <appCode>
|
|
9
|
-
rabetbase page react-create --appcode <appCode> --dry-run --format compress
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## 参数
|
|
13
|
-
|
|
14
|
-
| 参数 | 必填 | 说明 |
|
|
15
|
-
|---|---|---|
|
|
16
|
-
| `--name <name>` | 否 | 可选页面名称,1–100 个字符;省略时默认 `自定义页面_<timestamp>` |
|
|
17
|
-
| `--parent-menu-id <id>` | 否 | 父菜单 ID |
|
|
18
|
-
| `--page-content <json>` | 否 | 完整页面文件 JSON;对象的键为相对路径,值为文件内容,省略时生成默认 JSX、样式和词包 |
|
|
19
|
-
| `--appcode <code>` | 是 | 目标应用 code |
|
|
20
|
-
|
|
21
|
-
## 执行步骤
|
|
22
|
-
|
|
23
|
-
1. 可选传入 `--page-content` 作为完整页面文件 JSON;省略时 CLI 生成默认文件。
|
|
24
|
-
2. 使用 `--dry-run` 确认页面名称、父菜单与最终页面文件。
|
|
25
|
-
3. 确认后使用相同参数执行创建。
|
|
26
|
-
4. 从结构化输出的 `data.after.pageId` 确认新页面 ID,并核对页面名称和生成的文件。
|
|
27
|
-
5. 输出的 `pageUrl` 用于查看最新保存内容,包含尚未发布的修改;`editPageUrl` 用于打开页面编辑器,继续修改页面。
|
|
28
|
-
|
|
29
|
-
页面创建始终同时创建菜单。CLI 会按应用语言设置生成词包;读取设置失败时使用默认中英文词包。
|
|
File without changes
|