@lovrabet/rabetbase-cli 2.3.12 → 2.3.13-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.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/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.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/logs/index.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/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/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/update.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.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/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/non-interactive.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/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.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/save.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/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.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/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.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.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/copy-directory.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
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37144c,_0x31e692){const _0x1abdd9=a135_0x3c78,_0x40123c=_0x37144c();while(!![]){try{const _0x55836f=parseInt(_0x1abdd9(0x1c3))/0x1+parseInt(_0x1abdd9(0x1c7))/0x2*(parseInt(_0x1abdd9(0x1cb))/0x3)+-parseInt(_0x1abdd9(0x1c5))/0x4*(parseInt(_0x1abdd9(0x1c6))/0x5)+parseInt(_0x1abdd9(0x1c4))/0x6*(parseInt(_0x1abdd9(0x1c8))/0x7)+-parseInt(_0x1abdd9(0x1ca))/0x8+parseInt(_0x1abdd9(0x1c9))/0x9+-parseInt(_0x1abdd9(0x1cc))/0xa;if(_0x55836f===_0x31e692)break;else _0x40123c['push'](_0x40123c['shift']());}catch(_0x51327f){_0x40123c['push'](_0x40123c['shift']());}}}(a135_0x2bc3,0x6e8cc));function a135_0x2bc3(){const _0x22a4a3=['3EyJhAi','8456330GehFad','816766hifimw','6prZcSZ','5636cyPLRI','445cNDlwR','284612RDsvMu','704333UsbnBG','4421754AWaxOO','1017208WSrTKc'];a135_0x2bc3=function(){return _0x22a4a3;};return a135_0x2bc3();}import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';function a135_0x3c78(_0x2b6d3d,_0x553e69){_0x2b6d3d=_0x2b6d3d-0x1c3;const _0x2bc3a4=a135_0x2bc3();let _0x3c7898=_0x2bc3a4[_0x2b6d3d];return _0x3c7898;}export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a136_0x5efed3=a136_0x51a6;(function(_0x8ec13,_0x23ecfb){const _0x3707f9=a136_0x51a6,_0x1442aa=_0x8ec13();while(!![]){try{const _0x3c5ece=-parseInt(_0x3707f9(0x174))/0x1*(parseInt(_0x3707f9(0x164))/0x2)+parseInt(_0x3707f9(0x16a))/0x3+parseInt(_0x3707f9(0x172))/0x4*(parseInt(_0x3707f9(0x16d))/0x5)+-parseInt(_0x3707f9(0x16b))/0x6*(parseInt(_0x3707f9(0x168))/0x7)+-parseInt(_0x3707f9(0x16c))/0x8*(-parseInt(_0x3707f9(0x175))/0x9)+-parseInt(_0x3707f9(0x163))/0xa+-parseInt(_0x3707f9(0x16e))/0xb*(parseInt(_0x3707f9(0x166))/0xc);if(_0x3c5ece===_0x23ecfb)break;else _0x1442aa['push'](_0x1442aa['shift']());}catch(_0x1f1501){_0x1442aa['push'](_0x1442aa['shift']());}}}(a136_0x1d58,0x8ca04));import{getPagePermit}from'../../core/api-client.js';function a136_0x51a6(_0x3e535b,_0x6b91f5){_0x3e535b=_0x3e535b-0x163;const _0x1d5848=a136_0x1d58();let _0x51a6a2=_0x1d5848[_0x3e535b];return _0x51a6a2;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a136_0x5efed3(0x16f),'command':a136_0x5efed3(0x165),'description':a136_0x5efed3(0x170),'risk':a136_0x5efed3(0x173),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x993240){const _0x3cef40=a136_0x5efed3,_0x3acb10=_0x993240[_0x3cef40(0x167)](_0x3cef40(0x169)),_0x33637b=await getPagePermit(_0x3acb10);return{'ok':!![],'data':{'page':projectPagePermit(_0x33637b)},'message':_0x3cef40(0x171)+_0x3acb10};}};function a136_0x1d58(){const _0x1771cc=['30ssxYVn','72oCCzzU','220Utfund','11kROUrz','permit','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','Page\x20permit\x20for\x20menu\x20','25796WAQvmN','read','1fQRghU','448587baBVUV','1799010uTNztT','934294OSUzzj','page-get','536124heKTkg','num','685888ayTvFY','menu-id','3075918GWdWKg'];a136_0x1d58=function(){return _0x1771cc;};return a136_0x1d58();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a137_0x5361(){const _0x580f08=['979476iadxyB','\x22\x20permission\x20slot\x20(','202489wKbVBE','/smartapi/permit/page/save','key','join','Nothing\x20to\x20set.','4314VxyOGE','8AhyjFZ','allowSelf','3063890rfAhyL','num','spec','selector','6272973aCSEWJ','4727380YDrOmM','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','flag','label','high-risk-write','2zNbxmy','187WgKaqT','length','3436agOegY','180AjJoxn','Updated\x20page\x20permit\x20for\x20menu\x20','page-set','map','839083tJhCqi','rolePermit','Pass\x20at\x20least\x20one\x20of:\x20','\x20cannot\x20be\x20empty.','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','validation','permit','push','appCode'];a137_0x5361=function(){return _0x580f08;};return a137_0x5361();}const a137_0xe38f74=a137_0x3590;(function(_0x5211b6,_0x54f66c){const _0xbc2ef9=a137_0x3590,_0x276600=_0x5211b6();while(!![]){try{const _0x40a679=-parseInt(_0xbc2ef9(0x1db))/0x1*(parseInt(_0xbc2ef9(0x1d3))/0x2)+parseInt(_0xbc2ef9(0x1c6))/0x3*(parseInt(_0xbc2ef9(0x1d6))/0x4)+parseInt(_0xbc2ef9(0x1c9))/0x5+parseInt(_0xbc2ef9(0x1d7))/0x6*(parseInt(_0xbc2ef9(0x1c1))/0x7)+parseInt(_0xbc2ef9(0x1c7))/0x8*(parseInt(_0xbc2ef9(0x1cd))/0x9)+-parseInt(_0xbc2ef9(0x1ce))/0xa+parseInt(_0xbc2ef9(0x1d4))/0xb*(-parseInt(_0xbc2ef9(0x1bf))/0xc);if(_0x40a679===_0x54f66c)break;else _0x276600['push'](_0x276600['shift']());}catch(_0x484160){_0x276600['push'](_0x276600['shift']());}}}(a137_0x5361,0xae2c7));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a137_0x3590(_0x3a7696,_0x55fe2){_0x3a7696=_0x3a7696-0x1bc;const _0x536176=a137_0x5361();let _0x3590d7=_0x536176[_0x3a7696];return _0x3590d7;}import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH=a137_0xe38f74(0x1c2);function collectRequestedSlots(_0x468104){const _0x31e8a4=a137_0xe38f74,_0x4ad80d=[];for(const _0x161d8d of PAGE_SLOT_SPECS){const _0x7a9fa3=_0x468104['flag'](_0x161d8d[_0x31e8a4(0x1d0)]);if(_0x7a9fa3===undefined||_0x7a9fa3===null)continue;const _0x5a07bd=splitList(String(_0x7a9fa3));if(_0x5a07bd[_0x31e8a4(0x1d5)]===0x0)throw CliErrors['validation']('--'+_0x161d8d[_0x31e8a4(0x1d0)]+_0x31e8a4(0x1de),'Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.');_0x4ad80d[_0x31e8a4(0x1bd)]({'spec':_0x161d8d,'refs':_0x5a07bd});}return _0x4ad80d;}async function buildPlan(_0x3da4ba,_0x34efb2){const _0x4b5ffb=a137_0xe38f74,_0x444d8a=_0x3da4ba[_0x4b5ffb(0x1ca)]('menu-id'),_0x3975bf=collectRequestedSlots(_0x3da4ba);if(_0x3975bf[_0x4b5ffb(0x1d5)]===0x0)throw CliErrors[_0x4b5ffb(0x1e0)](_0x4b5ffb(0x1c5),_0x4b5ffb(0x1dd)+PAGE_SLOT_SPECS[_0x4b5ffb(0x1da)](_0x34c9a6=>'--'+_0x34c9a6[_0x4b5ffb(0x1d0)])[_0x4b5ffb(0x1c4)](',\x20')+'.');const _0x40945c=await getPagePermit(_0x444d8a),_0x245991={},_0x34c60e={},_0x811ac8=[];for(const {spec:_0x4b2f65,refs:_0xfa824b}of _0x3975bf){const _0x1e20eb=_0x40945c[_0x4b2f65[_0x4b5ffb(0x1c3)]];if(!_0x1e20eb)throw CliErrors[_0x4b5ffb(0x1e0)]('This\x20page\x20has\x20no\x20\x22'+_0x4b2f65[_0x4b5ffb(0x1d1)]+_0x4b5ffb(0x1c0)+_0x4b2f65[_0x4b5ffb(0x1c3)]+').',_0x4b5ffb(0x1df));_0x245991[_0x4b2f65[_0x4b5ffb(0x1c3)]]=projectPageSlot(_0x1e20eb);const _0x39406a=await resolvePermitRoles(_0x3da4ba[_0x4b5ffb(0x1be)],_0xfa824b,{'allowSelf':_0x4b2f65[_0x4b5ffb(0x1c8)],'label':_0x4b2f65['label']});_0x1e20eb[_0x4b5ffb(0x1dc)]=_0x39406a,_0x34c60e[_0x4b2f65['key']]=projectPageSlot(_0x1e20eb);}const _0x21b9bf={'operation':_0x4b5ffb(0x1d9),'selector':{'appCode':_0x3da4ba[_0x4b5ffb(0x1be)],'menuId':_0x444d8a,'slots':_0x3975bf[_0x4b5ffb(0x1da)](_0x19946b=>_0x19946b[_0x4b5ffb(0x1cb)][_0x4b5ffb(0x1c3)])},'before':_0x245991,'after':_0x34c60e,'dryRun':_0x34efb2,'backend':{'method':'POST','path':SAVE_PATH},'warnings':_0x811ac8};return{'page':_0x40945c,'mutation':_0x21b9bf};}export const permitPageSet={'service':a137_0xe38f74(0x1bc),'command':'page-set','description':a137_0xe38f74(0x1cf),'risk':a137_0xe38f74(0x1d2),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x30a826){const _0x5f17f1=a137_0xe38f74,_0x549acb=collectRequestedSlots(_0x30a826);if(_0x549acb['length']===0x0)throw CliErrors[_0x5f17f1(0x1e0)]('Nothing\x20to\x20set.','Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS['map'](_0xfa9490=>'--'+_0xfa9490['flag'])[_0x5f17f1(0x1c4)](',\x20')+'.');},async 'dryRun'(_0x15d00e){const {mutation:_0x4bbd62}=await buildPlan(_0x15d00e,!![]);return asDryRunResult(_0x4bbd62,{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x21d5fd){const _0x38c69c=a137_0xe38f74,{page:_0x14d707,mutation:_0x2bb3f4}=await buildPlan(_0x21d5fd,![]);return await savePagePermit(_0x14d707),{'ok':!![],'data':_0x2bb3f4,'message':_0x38c69c(0x1d8)+_0x2bb3f4[_0x38c69c(0x1cc)]['menuId']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a138_0x183f5b=a138_0x4006;(function(_0x527ec9,_0x6135ae){const _0x800a28=a138_0x4006,_0x15fe1e=_0x527ec9();while(!![]){try{const _0xedb0ed=-parseInt(_0x800a28(0x1c9))/0x1*(parseInt(_0x800a28(0x1dc))/0x2)+-parseInt(_0x800a28(0x1d3))/0x3+-parseInt(_0x800a28(0x1ec))/0x4+-parseInt(_0x800a28(0x1cc))/0x5*(parseInt(_0x800a28(0x1e9))/0x6)+-parseInt(_0x800a28(0x1df))/0x7*(parseInt(_0x800a28(0x1c8))/0x8)+-parseInt(_0x800a28(0x1e4))/0x9*(parseInt(_0x800a28(0x1d7))/0xa)+parseInt(_0x800a28(0x1ed))/0xb*(parseInt(_0x800a28(0x1d8))/0xc);if(_0xedb0ed===_0x6135ae)break;else _0x15fe1e['push'](_0x15fe1e['shift']());}catch(_0x25383b){_0x15fe1e['push'](_0x15fe1e['shift']());}}}(a138_0x2987,0xa37d6));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';function a138_0x4006(_0x5aca70,_0x574370){_0x5aca70=_0x5aca70-0x1c7;const _0x29873f=a138_0x2987();let _0x4006e6=_0x29873f[_0x5aca70];return _0x4006e6;}import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';function a138_0x2987(){const _0x3d0b04=['10rnAxkg','255756BalkNx','datasets','permit','push','164418SqlKLi','role-apis-set','bool','65786Guflbj','selector','length','POST','api-revoke','3636747LItaUp','Revoked\x20API\x20access\x20for\x20','has','API','get','2405640httUCC','revoke','validation','3172804JOXPbT','1870igBBFW','filter','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','Missing\x20--revoke.','624cyVyCO','1UICpbJ','datasetCodes','join','5JDKWyH','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','\x20dataset(s)\x20on\x20role\x20','action','str','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','flagMissing','1620237exnOOJ','roleName','appCode','Pass\x20--datasets\x20<datasetCode,...>.'];a138_0x2987=function(){return _0x3d0b04;};return a138_0x2987();}const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x50659b,_0x1f2930){const _0x561b43=a138_0x4006,_0x4204ae=await resolveRoleRef(_0x50659b[_0x561b43(0x1d5)],readRoleRef(_0x50659b));assertPermConfigurable(_0x4204ae);if(!_0x50659b[_0x561b43(0x1de)](_0x561b43(0x1ea)))throw CliErrors[_0x561b43(0x1eb)](_0x561b43(0x1c7),_0x561b43(0x1d1));const _0x3838a5=splitList(_0x50659b[_0x561b43(0x1d0)](_0x561b43(0x1d9)));if(_0x3838a5['length']===0x0)throw CliErrors[_0x561b43(0x1d2)]('datasets',_0x561b43(0x1d6));const _0xbee90b=await getRoleApiResources(_0x50659b[_0x561b43(0x1d5)],_0x4204ae['id']),{byCode:_0x1ce4ac,byDataset:_0x140062}=flattenApiResources(_0xbee90b),_0x49403d=_0x3838a5[_0x561b43(0x1ee)](_0x365880=>!_0x140062[_0x561b43(0x1e6)](_0x365880));if(_0x49403d[_0x561b43(0x1e1)]>0x0)throw CliErrors['validation'](_0x561b43(0x1ef)+_0x49403d[_0x561b43(0x1cb)](',\x20')+'.',_0x561b43(0x1f0));const _0x5c8a2d=new Map(),_0x1c2012=[],_0x52a06c=[];for(const _0x417e29 of _0x3838a5){for(const _0x45b987 of _0x140062[_0x561b43(0x1e8)](_0x417e29)){const _0xd8455a=_0x1ce4ac[_0x561b43(0x1e8)](_0x45b987);_0x5c8a2d['set'](_0x45b987,'0'),_0x1c2012['push']({'resourceCode':_0x45b987,'datasetCode':_0x417e29,'action':_0xd8455a[_0x561b43(0x1cf)]}),_0x52a06c[_0x561b43(0x1db)]({'resourceCode':_0x45b987,'datasetCode':_0x417e29,'action':'0'});}}const _0x5e9bca=buildPermits(_0x1ce4ac,_0x5c8a2d),_0x4dd163={'operation':_0x561b43(0x1e3),'selector':{'appCode':_0x50659b['appCode'],'roleId':_0x4204ae['id'],'roleName':_0x4204ae[_0x561b43(0x1d4)],'datasetCodes':_0x3838a5},'before':_0x1c2012,'after':_0x52a06c,'dryRun':_0x1f2930,'backend':{'method':_0x561b43(0x1e2),'path':UPDATE_PATH,'roleType':_0x561b43(0x1e7)},'warnings':[]};return{'role':_0x4204ae,'permits':_0x5e9bca,'mutation':_0x4dd163};}export const permitRoleApisSet={'service':a138_0x183f5b(0x1da),'command':a138_0x183f5b(0x1dd),'description':a138_0x183f5b(0x1cd),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3f6f6e){const _0x4f345c=a138_0x183f5b;if(!_0x3f6f6e[_0x4f345c(0x1de)](_0x4f345c(0x1ea)))throw CliErrors['validation'](_0x4f345c(0x1c7),_0x4f345c(0x1d1));if(splitList(_0x3f6f6e['str']('datasets'))[_0x4f345c(0x1e1)]===0x0)throw CliErrors[_0x4f345c(0x1d2)](_0x4f345c(0x1d9),_0x4f345c(0x1d6));},async 'dryRun'(_0x3db49b){const _0x2ff763=a138_0x183f5b,{mutation:_0x59e726}=await buildPlan(_0x3db49b,!![]);return asDryRunResult(_0x59e726,{'method':_0x2ff763(0x1e2),'url':UPDATE_PATH});},async 'execute'(_0x2aadde){const _0x4e417f=a138_0x183f5b,{role:_0x3f91c2,permits:_0x3b8c8b,mutation:_0x1e2889}=await buildPlan(_0x2aadde,![]);return await updateAppRole({'id':_0x3f91c2['id'],'appCode':_0x2aadde[_0x4e417f(0x1d5)],'roleType':_0x4e417f(0x1e7),'permits':_0x3b8c8b}),{'ok':!![],'data':_0x1e2889,'message':_0x4e417f(0x1e5)+_0x1e2889[_0x4e417f(0x1e0)][_0x4e417f(0x1ca)][_0x4e417f(0x1e1)]+_0x4e417f(0x1ce)+_0x3f91c2[_0x4e417f(0x1d4)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a139_0x1c27ac=a139_0x3104;(function(_0x25959f,_0xf469bc){const _0x3bec6c=a139_0x3104,_0x4ec299=_0x25959f();while(!![]){try{const _0x26e9e4=parseInt(_0x3bec6c(0x158))/0x1+-parseInt(_0x3bec6c(0x157))/0x2*(parseInt(_0x3bec6c(0x15d))/0x3)+-parseInt(_0x3bec6c(0x153))/0x4*(-parseInt(_0x3bec6c(0x154))/0x5)+parseInt(_0x3bec6c(0x15c))/0x6*(-parseInt(_0x3bec6c(0x166))/0x7)+parseInt(_0x3bec6c(0x159))/0x8+-parseInt(_0x3bec6c(0x156))/0x9*(parseInt(_0x3bec6c(0x14d))/0xa)+parseInt(_0x3bec6c(0x161))/0xb;if(_0x26e9e4===_0xf469bc)break;else _0x4ec299['push'](_0x4ec299['shift']());}catch(_0x206fac){_0x4ec299['push'](_0x4ec299['shift']());}}}(a139_0x3c88,0xb18e8));function a139_0x3104(_0x2d0f90,_0x26d63a){_0x2d0f90=_0x2d0f90-0x14a;const _0x3c88e1=a139_0x3c88();let _0x310404=_0x3c88e1[_0x2d0f90];return _0x310404;}import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,flattenMenuResources,GRANT_FLAG,MENUS_FLAG,readGrantRevoke,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a139_0x1c27ac(0x16c);function a139_0x3c88(){const _0x4d421b=['4014084NogjkG','6upgbXM','POST','access','flagMissing','4756521tlsSvl','PAGE','set','roleName','join','14XGgzOR','validation','str','filter','\x20menu\x20permit(s)\x20for\x20role\x20','menus','/smartapi/permit/role/update','Updated\x20','role-menus-set','length','770920OWsaHD','Pass\x20--menus\x20<resourceCode,...>.','selector','appCode','get','high-risk-write','100wSIzRD','206285SfNBZT','push','63GMJxFf','174844AUIzdt','1310680dAyZYs','42176jOebeB','menu-grant','has'];a139_0x3c88=function(){return _0x4d421b;};return a139_0x3c88();}async function buildPlan(_0x444638,_0x312825){const _0x43ca0f=a139_0x1c27ac,_0x1a2b7f=await resolveRoleRef(_0x444638[_0x43ca0f(0x150)],readRoleRef(_0x444638));assertPermConfigurable(_0x1a2b7f);const _0x285865=readGrantRevoke(_0x444638),_0xb76194=splitList(_0x444638['str'](_0x43ca0f(0x16b)));if(_0xb76194[_0x43ca0f(0x14c)]===0x0)throw CliErrors[_0x43ca0f(0x160)](_0x43ca0f(0x16b),'Pass\x20--menus\x20<resourceCode,...>.');const _0x293c0e=await getRoleMenuResources(_0x444638['appCode'],_0x1a2b7f['id']),_0x47a468=flattenMenuResources(_0x293c0e),_0x2d67d9=_0xb76194[_0x43ca0f(0x169)](_0x3cd34f=>!_0x47a468[_0x43ca0f(0x15b)](_0x3cd34f));if(_0x2d67d9[_0x43ca0f(0x14c)]>0x0)throw CliErrors[_0x43ca0f(0x167)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0x2d67d9[_0x43ca0f(0x165)](',\x20')+'.','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.');const _0x42454f=new Map(),_0x42ac4d=[],_0x387567=[];for(const _0x25cb65 of _0xb76194){const _0x406f7d=_0x47a468[_0x43ca0f(0x151)](_0x25cb65);_0x42454f[_0x43ca0f(0x163)](_0x25cb65,_0x285865),_0x42ac4d[_0x43ca0f(0x155)]({'resourceCode':_0x25cb65,'action':_0x406f7d['action']}),_0x387567['push']({'resourceCode':_0x25cb65,'action':_0x285865});}const _0x2ef8a1=buildPermits(_0x47a468,_0x42454f),_0x4eeb57={'operation':_0x285865===_0x43ca0f(0x15f)?_0x43ca0f(0x15a):'menu-revoke','selector':{'appCode':_0x444638[_0x43ca0f(0x150)],'roleId':_0x1a2b7f['id'],'roleName':_0x1a2b7f[_0x43ca0f(0x164)],'resourceCodes':_0xb76194},'before':_0x42ac4d,'after':_0x387567,'dryRun':_0x312825,'backend':{'method':_0x43ca0f(0x15e),'path':UPDATE_PATH,'roleType':'PAGE'},'warnings':[]};return{'role':_0x1a2b7f,'permits':_0x2ef8a1,'mutation':_0x4eeb57};}export const permitRoleMenusSet={'service':'permit','command':a139_0x1c27ac(0x14b),'description':'Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','risk':a139_0x1c27ac(0x152),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0xaf02de){const _0x54977d=a139_0x1c27ac;readGrantRevoke(_0xaf02de);if(splitList(_0xaf02de[_0x54977d(0x168)]('menus'))[_0x54977d(0x14c)]===0x0)throw CliErrors[_0x54977d(0x160)](_0x54977d(0x16b),_0x54977d(0x14e));},async 'dryRun'(_0x5287e9){const _0x4dc1ab=a139_0x1c27ac,{mutation:_0x3c8ef4}=await buildPlan(_0x5287e9,!![]);return asDryRunResult(_0x3c8ef4,{'method':_0x4dc1ab(0x15e),'url':UPDATE_PATH});},async 'execute'(_0x5bde6a){const _0x84c645=a139_0x1c27ac,{role:_0x310a58,permits:_0xdc4c47,mutation:_0x4d8d92}=await buildPlan(_0x5bde6a,![]);return await updateAppRole({'id':_0x310a58['id'],'appCode':_0x5bde6a['appCode'],'roleType':_0x84c645(0x162),'permits':_0xdc4c47}),{'ok':!![],'data':_0x4d8d92,'message':_0x84c645(0x14a)+_0x4d8d92[_0x84c645(0x14f)]['resourceCodes'][_0x84c645(0x14c)]+_0x84c645(0x16a)+_0x310a58[_0x84c645(0x164)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a140_0xcb6a(_0x330cf2,_0x3fd16d){_0x330cf2=_0x330cf2-0x150;const _0x50b992=a140_0x50b9();let _0xcb6a0f=_0x50b992[_0x330cf2];return _0xcb6a0f;}const a140_0x93eba5=a140_0xcb6a;(function(_0x2cf7b7,_0x5c16e9){const _0x4d08c8=a140_0xcb6a,_0x1d1930=_0x2cf7b7();while(!![]){try{const _0x101b02=parseInt(_0x4d08c8(0x164))/0x1+parseInt(_0x4d08c8(0x15f))/0x2+-parseInt(_0x4d08c8(0x160))/0x3*(parseInt(_0x4d08c8(0x161))/0x4)+-parseInt(_0x4d08c8(0x166))/0x5*(parseInt(_0x4d08c8(0x155))/0x6)+parseInt(_0x4d08c8(0x153))/0x7*(-parseInt(_0x4d08c8(0x151))/0x8)+parseInt(_0x4d08c8(0x158))/0x9+parseInt(_0x4d08c8(0x16a))/0xa;if(_0x101b02===_0x5c16e9)break;else _0x1d1930['push'](_0x1d1930['shift']());}catch(_0x52626a){_0x1d1930['push'](_0x1d1930['shift']());}}}(a140_0x50b9,0xd8b63));import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';function a140_0x50b9(){const _0x44efea=['1085442bTsOwK','length','5fggTCp','resourceName','permit','values','34576930tvRtCY','map','7493160bfVKZd','from','7Kjvtmf','appCode','10402362QabUBC','\x20has\x20','action','1978227oSLWqS','allowed','filter','roleName','Role\x20','\x20menu(s)\x20allowed','access','510994HxXVyK','12nGjCFX','1460412vQsJGD','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','role-menus'];a140_0x50b9=function(){return _0x44efea;};return a140_0x50b9();}import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a140_0x93eba5(0x168),'command':a140_0x93eba5(0x163),'description':a140_0x93eba5(0x162),'risk':'read','flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1050f4){const _0x2f47d6=a140_0x93eba5,_0x29c9d3=await resolveRoleRef(_0x1050f4['appCode'],readRoleRef(_0x1050f4)),_0x18d44d=await getRoleMenuResources(_0x1050f4['appCode'],_0x29c9d3['id']),_0x5c8ea7=flattenMenuResources(_0x18d44d),_0x339c5c=Array[_0x2f47d6(0x152)](_0x5c8ea7[_0x2f47d6(0x169)]())[_0x2f47d6(0x150)](_0x130625=>({'resourceCode':_0x130625['resourceCode'],'resourceName':_0x130625[_0x2f47d6(0x167)],'allowed':_0x130625[_0x2f47d6(0x157)]===_0x2f47d6(0x15e),'action':_0x130625[_0x2f47d6(0x157)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x1050f4[_0x2f47d6(0x154)],'roleId':_0x29c9d3['id'],'roleName':_0x29c9d3[_0x2f47d6(0x15b)]},'menus':_0x339c5c},'message':_0x2f47d6(0x15c)+_0x29c9d3[_0x2f47d6(0x15b)]+_0x2f47d6(0x156)+_0x339c5c[_0x2f47d6(0x15a)](_0x22a389=>_0x22a389[_0x2f47d6(0x159)])[_0x2f47d6(0x165)]+'/'+_0x339c5c[_0x2f47d6(0x165)]+_0x2f47d6(0x15d)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a141_0x5ee05a=a141_0x3e2f;(function(_0xbeee78,_0x11e7ff){const _0x387df9=a141_0x3e2f,_0x46f990=_0xbeee78();while(!![]){try{const _0x3d5c29=parseInt(_0x387df9(0x193))/0x1+parseInt(_0x387df9(0x15a))/0x2*(-parseInt(_0x387df9(0x185))/0x3)+-parseInt(_0x387df9(0x14f))/0x4*(-parseInt(_0x387df9(0x147))/0x5)+-parseInt(_0x387df9(0x14c))/0x6+parseInt(_0x387df9(0x178))/0x7+-parseInt(_0x387df9(0x165))/0x8+parseInt(_0x387df9(0x170))/0x9*(parseInt(_0x387df9(0x15f))/0xa);if(_0x3d5c29===_0x11e7ff)break;else _0x46f990['push'](_0x46f990['shift']());}catch(_0x200703){_0x46f990['push'](_0x46f990['shift']());}}}(a141_0x23ba,0x8341c));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a141_0x5ee05a(0x168),'type':a141_0x5ee05a(0x176),'required':!![],'description':a141_0x5ee05a(0x16b)};export const ROLE_REF_FLAG={'name':'role','type':a141_0x5ee05a(0x189),'required':!![],'description':a141_0x5ee05a(0x154)};export const GRANT_FLAG={'name':a141_0x5ee05a(0x142),'type':'boolean','required':![],'description':'Grant\x20access\x20to\x20the\x20listed\x20resources'};export const REVOKE_FLAG={'name':a141_0x5ee05a(0x195),'type':a141_0x5ee05a(0x18f),'required':![],'description':a141_0x5ee05a(0x171)};export const MENUS_FLAG={'name':a141_0x5ee05a(0x163),'type':'string','required':!![],'description':a141_0x5ee05a(0x14d)};export const DATASETS_FLAG={'name':a141_0x5ee05a(0x169),'type':a141_0x5ee05a(0x189),'required':!![],'description':'Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for'};export const PAGE_SLOT_SPECS=[{'flag':a141_0x5ee05a(0x181),'key':a141_0x5ee05a(0x175),'allowSelf':![],'label':'menu\x20visibility'},{'flag':a141_0x5ee05a(0x155),'key':'dataCreate','allowSelf':![],'label':a141_0x5ee05a(0x186)},{'flag':a141_0x5ee05a(0x183),'key':'dataUpdate','allowSelf':![],'label':a141_0x5ee05a(0x16c)},{'flag':a141_0x5ee05a(0x156),'key':a141_0x5ee05a(0x180),'allowSelf':![],'label':'data\x20delete'},{'flag':a141_0x5ee05a(0x17a),'key':a141_0x5ee05a(0x17d),'allowSelf':![],'label':a141_0x5ee05a(0x148)},{'flag':a141_0x5ee05a(0x190),'key':a141_0x5ee05a(0x160),'allowSelf':![],'label':a141_0x5ee05a(0x14a)},{'flag':'row-roles','key':a141_0x5ee05a(0x153),'allowSelf':!![],'label':'row\x20visibility'}];function a141_0x3e2f(_0x42c8eb,_0x37baff){_0x42c8eb=_0x42c8eb-0x142;const _0x23ba22=a141_0x23ba();let _0x3e2f8b=_0x23ba22[_0x42c8eb];return _0x3e2f8b;}function a141_0x23ba(){const _0x90bf29=['filter','Disambiguate\x20with\x20an\x20id.',';\x20SELF\x20=\x20only\x20own\x20rows','join','boolean','export-roles','\x22\x20not\x20found.','access','190246eUpNpT','get','revoke','appCode','test','resourceCode','grant','roleType','SELF','Run\x20`role\x20list`.','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','251835wusmoE','data\x20detail','key','data\x20export','Roles\x20for\x20','5541480omSnOR','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','label','48vWMDDT','ALL','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','\x22\x20is\x20ambiguous\x20(ids:\x20','dataPermit','Role\x20id\x20or\x20role\x20name','create-roles','delete-roles','push','resourceName','split','42376gxCXxg','set','\x20is\x20not\x20available\x20for\x20this\x20app.','SELF\x20is\x20not\x20allowed\x20for\x20','map','70GmbpMN','dataExport','roleName','role','menus','find','4344736NzddLD','length','datasetCode','menu-id','datasets','pageNodeList','Menu\x20id\x20(from\x20`menu\x20list`)','data\x20update','Special\x20role\x20','Role\x20\x22','Missing\x20action.','1269855IBZBSr','Revoke\x20access\x20to\x20the\x20listed\x20resources','action','menuId','\x20not\x20found.','menuPermit','number','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','7486535bboiAT','validation','detail-roles','trim','allowSelf','dataDetail','apiList','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','dataDelete','menu-roles','\x20(comma-separated\x20SELF/ALL/id/name)','update-roles','bool','120TqcvSs','data\x20create','entries','toUpperCase','string','rolePermit'];a141_0x23ba=function(){return _0x90bf29;};return a141_0x23ba();}export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x3cf891=>({'name':_0x3cf891['flag'],'type':a141_0x5ee05a(0x189),'required':![],'description':a141_0x5ee05a(0x14b)+_0x3cf891[a141_0x5ee05a(0x14e)]+a141_0x5ee05a(0x182)+(_0x3cf891[a141_0x5ee05a(0x17c)]?a141_0x5ee05a(0x18d):'')}));export function splitList(_0x11b5f2){const _0x39c8a6=a141_0x5ee05a;return _0x11b5f2[_0x39c8a6(0x159)](',')[_0x39c8a6(0x15e)](_0x170da0=>_0x170da0[_0x39c8a6(0x17b)]())[_0x39c8a6(0x18b)](Boolean);}export function projectRoleRef(_0x5cb88d){return{'id':_0x5cb88d['id'],'roleName':_0x5cb88d['roleName'],'roleType':_0x5cb88d['roleType']};}export async function resolvePermitRoles(_0x20173b,_0x4a19e0,_0x45aaf4){const _0x244307=a141_0x5ee05a,_0x1dbe32=await listPermitRoles(_0x20173b,{'needSelf':!![],'needPublic':!![]}),_0x47bff0=[];for(const _0x397cb1 of _0x4a19e0){const _0x1d0927=resolveOnePermitRole(_0x1dbe32,_0x397cb1);if(!_0x45aaf4[_0x244307(0x17c)]&&_0x1d0927[_0x244307(0x143)]===_0x244307(0x144))throw CliErrors[_0x244307(0x179)](_0x244307(0x15d)+_0x45aaf4[_0x244307(0x14e)]+'.',_0x244307(0x17f));if(!_0x47bff0['some'](_0x27c703=>_0x27c703['id']===_0x1d0927['id']))_0x47bff0[_0x244307(0x157)](_0x1d0927);}return _0x47bff0;}function resolveOnePermitRole(_0x15fcc9,_0x3b6082){const _0x58bdf0=a141_0x5ee05a,_0x3ec72e=_0x3b6082['trim'](),_0x4ed8c2=_0x3ec72e[_0x58bdf0(0x188)]();if(_0x4ed8c2===_0x58bdf0(0x144)||_0x4ed8c2===_0x58bdf0(0x150)){const _0x2cec5c=_0x15fcc9[_0x58bdf0(0x164)](_0x161988=>_0x161988['roleType']===_0x4ed8c2);if(!_0x2cec5c)throw CliErrors[_0x58bdf0(0x179)](_0x58bdf0(0x16d)+_0x4ed8c2+_0x58bdf0(0x15c));return _0x2cec5c;}if(/^-?\d+$/[_0x58bdf0(0x197)](_0x3ec72e)){const _0x73723=Number(_0x3ec72e),_0x1e7657=_0x15fcc9[_0x58bdf0(0x164)](_0xa6f699=>_0xa6f699['id']===_0x73723);if(!_0x1e7657)throw CliErrors['validation']('Role\x20id\x20'+_0x73723+_0x58bdf0(0x174),_0x58bdf0(0x145));return _0x1e7657;}const _0x4b9a2c=_0x15fcc9['filter'](_0x5447c8=>_0x5447c8[_0x58bdf0(0x161)]===_0x3ec72e);if(_0x4b9a2c['length']===0x0)throw CliErrors[_0x58bdf0(0x179)](_0x58bdf0(0x16e)+_0x3ec72e+_0x58bdf0(0x191),_0x58bdf0(0x146));if(_0x4b9a2c[_0x58bdf0(0x166)]>0x1)throw CliErrors['validation'](_0x58bdf0(0x16e)+_0x3ec72e+_0x58bdf0(0x152)+_0x4b9a2c[_0x58bdf0(0x15e)](_0x11dc75=>_0x11dc75['id'])[_0x58bdf0(0x18e)](',\x20')+').',_0x58bdf0(0x18c));return _0x4b9a2c[0x0];}export function projectPageSlot(_0x2486e7){const _0x1ded0d=a141_0x5ee05a;if(!_0x2486e7)return null;return{'resourceCode':_0x2486e7['resourceCode'],'roles':(_0x2486e7[_0x1ded0d(0x18a)]??[])[_0x1ded0d(0x15e)](projectRoleRef)};}export function projectPagePermit(_0x580ec1){const _0x5a7c41=a141_0x5ee05a,_0x5245e5={'menuId':_0x580ec1[_0x5a7c41(0x173)],'appCode':_0x580ec1[_0x5a7c41(0x196)],'menuPermit':projectPageSlot(_0x580ec1[_0x5a7c41(0x175)])};for(const _0x2ee3d1 of PAGE_SLOT_SPECS){if(_0x2ee3d1['key']==='menuPermit')continue;_0x5245e5[_0x2ee3d1['key']]=projectPageSlot(_0x580ec1[_0x2ee3d1[_0x5a7c41(0x149)]]);}return _0x5245e5;}export function flattenMenuResources(_0x22a404){const _0x2435db=new Map(),_0x424f0f=_0xc27a30=>{const _0xb9988f=a141_0x3e2f;for(const _0x84205f of _0xc27a30??[]){_0x2435db[_0xb9988f(0x15b)](_0x84205f['resourceCode'],{'resourceCode':_0x84205f[_0xb9988f(0x198)],'resourceName':_0x84205f[_0xb9988f(0x158)],'action':_0x84205f['allowedActions']?.[0x0]??'0'});if(_0x84205f[_0xb9988f(0x16a)])_0x424f0f(_0x84205f[_0xb9988f(0x16a)]);}};return _0x424f0f(_0x22a404),_0x2435db;}export function flattenApiResources(_0x32674c){const _0x582c09=a141_0x5ee05a,_0x73c6de=new Map(),_0x5c8ad5=new Map();for(const _0x50c46b of _0x32674c){const _0x5d5aa3=_0x50c46b[_0x582c09(0x17e)]??{};for(const [_0x217ff9,_0x2a28c5]of Object[_0x582c09(0x187)](_0x5d5aa3)){_0x73c6de['set'](_0x217ff9,{'resourceCode':_0x217ff9,'resourceName':_0x50c46b[_0x582c09(0x158)],'datasetCode':_0x50c46b['datasetCode'],'action':_0x2a28c5?.[0x0]??'0'});const _0x1d8e08=_0x5c8ad5[_0x582c09(0x194)](_0x50c46b[_0x582c09(0x167)])??[];_0x1d8e08[_0x582c09(0x157)](_0x217ff9),_0x5c8ad5[_0x582c09(0x15b)](_0x50c46b[_0x582c09(0x167)],_0x1d8e08);}}return{'byCode':_0x73c6de,'byDataset':_0x5c8ad5};}export function buildPermits(_0x5c934f,_0xf3e143){const _0x139cb9=a141_0x5ee05a,_0x252c9b={};for(const [_0x38591d,_0x28a632]of _0x5c934f){const _0x2a568a=_0xf3e143['get'](_0x38591d)??_0x28a632[_0x139cb9(0x172)];_0x252c9b[_0x38591d]=[_0x2a568a];}return _0x252c9b;}export function readRoleRef(_0x335841){const _0x5ac649=a141_0x5ee05a,_0x216c20=_0x335841['str'](_0x5ac649(0x162))[_0x5ac649(0x17b)]();if(!_0x216c20)throw CliErrors['flagMissing'](_0x5ac649(0x162),'Pass\x20--role\x20<id|name>.');return _0x216c20;}export function readGrantRevoke(_0x2f62de){const _0x10d78a=a141_0x5ee05a,_0x2948d5=_0x2f62de[_0x10d78a(0x184)](_0x10d78a(0x142)),_0x466a58=_0x2f62de[_0x10d78a(0x184)]('revoke');if(_0x2948d5&&_0x466a58)throw CliErrors[_0x10d78a(0x179)](_0x10d78a(0x177));if(!_0x2948d5&&!_0x466a58)throw CliErrors[_0x10d78a(0x179)](_0x10d78a(0x16f),_0x10d78a(0x151));return _0x2948d5?_0x10d78a(0x192):'0';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c487e,_0x421a2a){const _0x5896f0=a142_0x4e80,_0x4472e8=_0x2c487e();while(!![]){try{const _0x226903=-parseInt(_0x5896f0(0xde))/0x1+parseInt(_0x5896f0(0xd8))/0x2*(parseInt(_0x5896f0(0xd4))/0x3)+parseInt(_0x5896f0(0xcb))/0x4*(-parseInt(_0x5896f0(0xda))/0x5)+-parseInt(_0x5896f0(0xd0))/0x6+parseInt(_0x5896f0(0xcd))/0x7*(parseInt(_0x5896f0(0xdc))/0x8)+-parseInt(_0x5896f0(0xd1))/0x9+parseInt(_0x5896f0(0xdb))/0xa;if(_0x226903===_0x421a2a)break;else _0x4472e8['push'](_0x4472e8['shift']());}catch(_0x50bf11){_0x4472e8['push'](_0x4472e8['shift']());}}}(a142_0x2bc8,0x2701b));import{existsSync}from'node:fs';import a142_0x3cb175 from'node:path';function a142_0x2bc8(){const _0x48830a=['96MPbaTS','√\x20Project\x20Name:\x20','186154lYpJMQ','√\x20Login\x20status:\x20','\x22\x20already\x20exists','Skipped','production','log','trim','Directory\x20\x22','my-app','cyan','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','100144meuhIg','length','114933uOpfPB','Login\x20failed','Not\x20set','544572JlARLc','1575162VIWnsa','resolve','test','27SAuGLg','Project\x20name:','Project\x20name\x20cannot\x20exceed\x2050\x20characters','green','39796KMrJRJ','env','45weKqhV','4609190nrjVSA'];a142_0x2bc8=function(){return _0x48830a;};return a142_0x2bc8();}import a142_0x24d144 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a142_0x4e80(_0x2d27c7,_0x508308){_0x2d27c7=_0x2d27c7-0xc8;const _0x2bc8d4=a142_0x2bc8();let _0x4e8059=_0x2bc8d4[_0x2d27c7];return _0x4e8059;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x56b64d,_0xb7d2aa,_0x2cf24e){const _0x25521d=a142_0x4e80,_0xfa7af8=_0x25521d(0xc8),_0x3fccf0=readConfig(),_0x1a3e9f=typeof _0x3fccf0['env']==='string'?_0x3fccf0[_0x25521d(0xd9)]:undefined,_0x4d9860=await input({'message':_0x25521d(0xd5),'default':_0xfa7af8,'validate':_0x4a2032=>{const _0x58ab56=_0x25521d,_0x5f26ec=_0x4a2032[_0x58ab56(0xe4)]()||_0xfa7af8;if(_0x5f26ec[_0x58ab56(0xcc)]>0x32)return _0x58ab56(0xd6);const _0xd92e58=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x5f26ec&&!_0xd92e58[_0x58ab56(0xd3)](_0x5f26ec))return _0x58ab56(0xca);const _0xa88c6c=a142_0x3cb175[_0x58ab56(0xd2)](process['cwd'](),_0x5f26ec);if(existsSync(_0xa88c6c))return _0x58ab56(0xe5)+_0x5f26ec+_0x58ab56(0xe0);return!![];}});console[_0x25521d(0xe3)](a142_0x24d144['green'](_0x25521d(0xdd)+a142_0x24d144[_0x25521d(0xc9)](_0x4d9860)));const _0x30fc69=await selectSingleAppcode(_0x2cf24e);console[_0x25521d(0xe3)](a142_0x24d144['green']('√\x20App\x20Code:\x20'+a142_0x24d144['cyan'](_0x30fc69||_0x25521d(0xcf))));if(_0x30fc69){const _0x24ed07=await getIsSessionValid();if(!_0x24ed07){const _0x115292=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x115292){const _0x2ee97d=await authServer({'silent':!![]});console[_0x25521d(0xe3)](a142_0x24d144[_0x25521d(0xd7)]('√\x20Login\x20status:\x20'+a142_0x24d144[_0x25521d(0xc9)](_0x2ee97d?'Logged\x20in':_0x25521d(0xce))));}else console['log'](a142_0x24d144[_0x25521d(0xd7)](_0x25521d(0xdf)+a142_0x24d144[_0x25521d(0xc9)](_0x25521d(0xe1))));}await _0x56b64d({'projectName':_0x4d9860,'appCode':_0x30fc69,'env':_0xb7d2aa||_0x1a3e9f||_0x25521d(0xe2)});}else await _0x56b64d({'projectName':_0x4d9860,'env':_0xb7d2aa||_0x1a3e9f||_0x25521d(0xe2)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ea24c,_0x218b08){const _0x2a6b0e=a143_0x35c3,_0x54b72a=_0x1ea24c();while(!![]){try{const _0x3059e7=parseInt(_0x2a6b0e(0x141))/0x1*(parseInt(_0x2a6b0e(0x139))/0x2)+-parseInt(_0x2a6b0e(0x143))/0x3*(-parseInt(_0x2a6b0e(0x13f))/0x4)+parseInt(_0x2a6b0e(0x140))/0x5*(-parseInt(_0x2a6b0e(0x144))/0x6)+parseInt(_0x2a6b0e(0x13b))/0x7+parseInt(_0x2a6b0e(0x13d))/0x8*(parseInt(_0x2a6b0e(0x13a))/0x9)+parseInt(_0x2a6b0e(0x13e))/0xa*(-parseInt(_0x2a6b0e(0x145))/0xb)+-parseInt(_0x2a6b0e(0x142))/0xc;if(_0x3059e7===_0x218b08)break;else _0x54b72a['push'](_0x54b72a['shift']());}catch(_0x17507e){_0x54b72a['push'](_0x54b72a['shift']());}}}(a143_0x20a9,0xb5a3f));function a143_0x35c3(_0x567624,_0x2e81a2){_0x567624=_0x567624-0x137;const _0x20a9c4=a143_0x20a9();let _0x35c374=_0x20a9c4[_0x567624];return _0x35c374;}function a143_0x20a9(){const _0x1a91c4=['88310wBemxG','2718XpEWBS','3516394vcLuNP','toFixed','15160ecHlSR','57990WCzhTd','9468wkjxle','595aRzNJs','29zOXEvV','17135220vTMhur','1077AXBjjT','28398PIaujx','891sdbrNC','replace','now'];a143_0x20a9=function(){return _0x1a91c4;};return a143_0x20a9();}export function formatElapsed(_0x19a453){const _0x597d3f=a143_0x35c3,_0x558b31=Date[_0x597d3f(0x138)]()-_0x19a453;if(_0x558b31<0x3e8)return _0x558b31+'ms';const _0x3e9b3d=(_0x558b31/0x3e8)[_0x597d3f(0x13c)](0x2),_0x5b5dbb=_0x3e9b3d[_0x597d3f(0x137)](/\.?0+$/u,'');return _0x5b5dbb+'s';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x28bd18,_0x584225){const _0x56d1a0=a144_0x1fc6,_0x129e7d=_0x28bd18();while(!![]){try{const _0x2a446a=parseInt(_0x56d1a0(0xc6))/0x1*(-parseInt(_0x56d1a0(0xd9))/0x2)+parseInt(_0x56d1a0(0xe7))/0x3*(parseInt(_0x56d1a0(0xf3))/0x4)+-parseInt(_0x56d1a0(0xb7))/0x5*(-parseInt(_0x56d1a0(0x10b))/0x6)+parseInt(_0x56d1a0(0x110))/0x7*(parseInt(_0x56d1a0(0x108))/0x8)+parseInt(_0x56d1a0(0xf9))/0x9*(-parseInt(_0x56d1a0(0xd2))/0xa)+parseInt(_0x56d1a0(0x10a))/0xb*(-parseInt(_0x56d1a0(0xbc))/0xc)+-parseInt(_0x56d1a0(0xed))/0xd*(-parseInt(_0x56d1a0(0xf4))/0xe);if(_0x2a446a===_0x584225)break;else _0x129e7d['push'](_0x129e7d['shift']());}catch(_0x45b3e0){_0x129e7d['push'](_0x129e7d['shift']());}}}(a144_0x5afa,0xbf49f));import a144_0x3a57d3 from'path';import a144_0x2adf2c from'fs';import a144_0x58115 from'chalk';import a144_0x352c35 from'ora';function a144_0x1fc6(_0x32562b,_0x3a1b1f){_0x32562b=_0x32562b-0xb3;const _0x5afaf3=a144_0x5afa();let _0x1fc622=_0x5afaf3[_0x32562b];return _0x1fc622;}import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';function a144_0x5afa(){const _0x322af1=['2IqJqJN','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','Install\x20dependencies','...','\x20already\x20exists','existsSync','utf8','name','更新\x20package.json\x20失败','trim','项目创建失败:\x20','error','length','test','14571VsEcVb','cwd','\x20&&\x20','\x20Generated\x20by\x20rabetbase\x20cli\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','Project\x20name:\x20','22122061bgJeOi','√\x20Pulled\x20','\x20√\x20','CLI\x20版本检查','gray','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','56TCCIXA','28xPWhWy','\x20|\x20AppCode:\x20','配置应用AppCode失败','\x20dataset(s),\x20generated\x20','create','792bVhLGd','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','minimumVersion','Project\x20directory\x20','toLocaleString','配置应用AppCode:\x20','projectCode','\x20config\x20set\x20appcode\x20<app-code>\x27','belowMinimum','message','1.0.0','cd\x20','accessSync','writeFileSync','stop','24168RWiHWp','log','1078FibJbf','2236854LfNhqf','constants','join','parse','production','945xSccpZ','\x20run\x20start','开始创建项目:\x20','needsUpgrade','cyan','5yufVgk','rmSync','repeat','info','*\x20Pulling\x20API\x20configuration...','146940WNFPwu','Project\x20name\x20cannot\x20be\x20empty','清理项目目录失败:\x20','Format\x20code','dirname','readFileSync','success','🚀\x20Next\x20Steps:','bold','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','1438579DlPTDb','warn','resolve','\x20\x202.\x20Pull\x20API\x20configuration:\x20','green','cookie','start','chdir','projectName','appCode','package.json','env','94310XCRAQJ','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','stableVersion','string','defaultApp','项目创建完成:\x20','√\x20package.json\x20updated:\x20name='];a144_0x5afa=function(){return _0x322af1;};return a144_0x5afa();}import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x153fda){const _0x4ffb03=a144_0x1fc6,_0x35a0d0=await checkCliVersion();(_0x35a0d0[_0x4ffb03(0xb5)]||_0x35a0d0[_0x4ffb03(0x101)])&&(printCliUpgradeWarning(_0x35a0d0),assertCliVersionSupported(_0x35a0d0),logger[_0x4ffb03(0xba)](_0x4ffb03(0xf8),_0x4ffb03(0xf0),{'currentVersion':_0x35a0d0['currentVersion'],'stableVersion':_0x35a0d0[_0x4ffb03(0xd4)],'minimumVersion':_0x35a0d0[_0x4ffb03(0xfb)],'needsUpgrade':_0x35a0d0[_0x4ffb03(0xb5)],'belowMinimum':_0x35a0d0[_0x4ffb03(0x101)]}));if(_0x153fda[_0x4ffb03(0xff)]&&_0x153fda[_0x4ffb03(0xcf)])await runCreate({'projectName':_0x153fda['projectCode'],'appCode':_0x153fda[_0x4ffb03(0xcf)],'env':_0x153fda[_0x4ffb03(0xd1)]},_0x153fda);else{if(_0x153fda[_0x4ffb03(0xff)]){const _0x5c98fe=await selectSingleAppcode(_0x153fda[_0x4ffb03(0xcb)]);await runCreate({'projectName':_0x153fda[_0x4ffb03(0xff)],'appCode':_0x5c98fe||undefined,'env':_0x153fda[_0x4ffb03(0xd1)]},_0x153fda);}else await guidedCreateProject(_0x2eb2cb=>runCreate(_0x2eb2cb,_0x153fda),_0x153fda[_0x4ffb03(0xd1)],_0x153fda['cookie']);}}async function runCreate(_0x500e74,_0x33e7b4){const _0x255bd5=a144_0x1fc6;if(!_0x500e74[_0x255bd5(0xce)]||_0x500e74[_0x255bd5(0xce)][_0x255bd5(0xe2)]()==='')throw new Error(_0x255bd5(0xbd));const _0x171dc8=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x171dc8[_0x255bd5(0xe6)](_0x500e74[_0x255bd5(0xce)]))throw new Error(_0x255bd5(0xf2));if(_0x500e74[_0x255bd5(0xce)]['length']>0x64)throw new Error(_0x255bd5(0xda));const _0x5470c0=a144_0x3a57d3[_0x255bd5(0xc8)](process[_0x255bd5(0xe8)](),_0x500e74[_0x255bd5(0xce)]);if(a144_0x2adf2c['existsSync'](_0x5470c0))throw new Error(_0x255bd5(0xfc)+_0x500e74[_0x255bd5(0xce)]+_0x255bd5(0xdd));try{a144_0x2adf2c[_0x255bd5(0x105)](a144_0x3a57d3[_0x255bd5(0xc0)](_0x5470c0),a144_0x2adf2c[_0x255bd5(0x10c)]['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger['setLogPath'](_0x5470c0),logger['info'](_0x255bd5(0xf8),_0x255bd5(0xb4)+_0x500e74[_0x255bd5(0xce)],{'projectDir':_0x5470c0,'appCode':_0x500e74[_0x255bd5(0xcf)]}),console[_0x255bd5(0x109)](),console[_0x255bd5(0x109)](a144_0x58115['green']('\x20√\x20')+_0x255bd5(0xec)+a144_0x58115['green'](_0x500e74[_0x255bd5(0xce)])+(_0x500e74['appCode']?_0x255bd5(0xf5)+a144_0x58115[_0x255bd5(0xb6)](_0x500e74[_0x255bd5(0xcf)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x500e74[_0x255bd5(0xce)])),await updatePackageJsonName(_0x500e74['projectName']),await runTask(_0x255bd5(0xdb),()=>installDependencies(_0x500e74[_0x255bd5(0xce)])),await runTask(_0x255bd5(0xbf),()=>formatProjectCode(_0x500e74[_0x255bd5(0xce)])),await configureAppCode(_0x500e74[_0x255bd5(0xce)],_0x500e74[_0x255bd5(0xcf)]||'',_0x500e74['env']);let _0x4fa399=![];if(_0x500e74[_0x255bd5(0xcf)]){console[_0x255bd5(0x109)](_0x255bd5(0xbb));const _0x2f5ffc=process[_0x255bd5(0xe8)]();try{process[_0x255bd5(0xcd)](_0x5470c0);const _0x484c58=_0x500e74[_0x255bd5(0xd1)]||_0x255bd5(0x10f);initEnv(_0x484c58);const {configArray:_0x12a94e}=await fetchModelList(_0x500e74[_0x255bd5(0xcf)],_0x33e7b4[_0x255bd5(0xcb)]||''),_0x954dc2=DEFAULT_API_DIR,_0x3cf199=await generateApiFile(_0x12a94e,'',_0x500e74[_0x255bd5(0xcf)],!![],_0x484c58,_0x954dc2);console['log'](_0x255bd5(0xee)+_0x12a94e[_0x255bd5(0xe5)]+_0x255bd5(0xf7)+_0x3cf199['modelCount']+'\x20model(s)'),logger[_0x255bd5(0xba)](_0x255bd5(0xf8),'API\x20configuration\x20pulled:\x20'+_0x500e74[_0x255bd5(0xcf)]);}catch(_0x5debd6){_0x4fa399=!![],console[_0x255bd5(0x109)](_0x255bd5(0xeb)),logger[_0x255bd5(0xc7)]('create','API\x20配置拉取异常',{'error':_0x5debd6 instanceof Error?_0x5debd6[_0x255bd5(0x102)]:String(_0x5debd6)});}finally{process[_0x255bd5(0xcd)](_0x2f5ffc);}}logger[_0x255bd5(0xc2)](_0x255bd5(0xf8),_0x255bd5(0xd7)+_0x500e74[_0x255bd5(0xce)]),console[_0x255bd5(0x109)](),console[_0x255bd5(0x109)](a144_0x58115['green']('─'[_0x255bd5(0xb9)](0x3c))),console[_0x255bd5(0x109)](a144_0x58115[_0x255bd5(0xb6)][_0x255bd5(0xc4)](_0x255bd5(0xc3))),console['log'](),console[_0x255bd5(0x109)]('\x20\x201.\x20Start\x20project:\x20'+a144_0x58115[_0x255bd5(0xb6)][_0x255bd5(0xc4)](_0x255bd5(0x104)+_0x500e74[_0x255bd5(0xce)]+_0x255bd5(0xe9)+CLI_BIN_NAME+_0x255bd5(0xb3))),_0x4fa399&&console[_0x255bd5(0x109)](_0x255bd5(0xc9)+a144_0x58115[_0x255bd5(0xb6)][_0x255bd5(0xc4)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x255bd5(0x109)](a144_0x58115[_0x255bd5(0xca)]('─'[_0x255bd5(0xb9)](0x3c)));}catch(_0x14f431){logger['error'](_0x255bd5(0xf8),_0x255bd5(0xe3)+_0x500e74[_0x255bd5(0xce)],{'error':_0x14f431 instanceof Error?_0x14f431[_0x255bd5(0x102)]:String(_0x14f431)});try{a144_0x2adf2c[_0x255bd5(0xde)](_0x5470c0)&&(console[_0x255bd5(0x109)](_0x255bd5(0xc5)+_0x5470c0),a144_0x2adf2c[_0x255bd5(0xb8)](_0x5470c0,{'recursive':!![],'force':!![]}));}catch{logger['warn']('create',_0x255bd5(0xbe)+_0x5470c0);}throw _0x14f431;}}async function runTask(_0x93a1a8,_0x477b26){const _0x1d384e=a144_0x1fc6,_0x1b9b82=a144_0x352c35(_0x93a1a8+_0x1d384e(0xdc))[_0x1d384e(0xcc)]();try{const _0x5ac115=await _0x477b26();_0x1b9b82[_0x1d384e(0x107)](),console['log'](''+a144_0x58115[_0x1d384e(0xca)](_0x1d384e(0xef))+_0x93a1a8+'\x20'+a144_0x58115[_0x1d384e(0xf1)]('['+_0x5ac115+']'));}catch(_0x494489){_0x1b9b82['fail'](_0x93a1a8);throw _0x494489;}}async function updatePackageJsonName(_0x5cf5a9){const _0x4f6afc=a144_0x1fc6,_0x306332=a144_0x3a57d3[_0x4f6afc(0xc8)](process[_0x4f6afc(0xe8)](),_0x5cf5a9),_0xb9ba87=a144_0x3a57d3[_0x4f6afc(0x10d)](_0x306332,_0x4f6afc(0xd0));try{console[_0x4f6afc(0x109)](_0x4f6afc(0xd3));const _0x2721ec=getRabetbaseCliPackageRoot(),_0x336c6e=a144_0x3a57d3[_0x4f6afc(0x10d)](_0x2721ec,_0x4f6afc(0xd0));let _0x239f8d=_0x4f6afc(0x103);try{const _0x51667a=JSON[_0x4f6afc(0x10e)](a144_0x2adf2c[_0x4f6afc(0xc1)](_0x336c6e,_0x4f6afc(0xdf)));_0x239f8d=_0x51667a['version']||_0x4f6afc(0x103);}catch{}const _0x2cfac3=a144_0x2adf2c['readFileSync'](_0xb9ba87,_0x4f6afc(0xdf)),_0x2bf5e1=JSON[_0x4f6afc(0x10e)](_0x2cfac3);_0x2bf5e1[_0x4f6afc(0xe0)]=_0x5cf5a9,_0x2bf5e1['description']=_0x5cf5a9+_0x4f6afc(0xea)+_0x239f8d,a144_0x2adf2c[_0x4f6afc(0x106)](_0xb9ba87,JSON['stringify'](_0x2bf5e1,null,0x2)+'\x0a',_0x4f6afc(0xdf)),console['log'](_0x4f6afc(0xd8)+_0x5cf5a9),logger['info'](_0x4f6afc(0xf8),'更新\x20package.json\x20name');}catch(_0x3d6bed){logger[_0x4f6afc(0xe4)](_0x4f6afc(0xf8),_0x4f6afc(0xe1));throw _0x3d6bed;}}async function configureAppCode(_0x2adea5,_0x492ec1,_0x26824d){const _0x28b824=a144_0x1fc6,_0x2680f6=a144_0x3a57d3[_0x28b824(0xc8)](process[_0x28b824(0xe8)](),_0x2adea5),_0x311a0d=a144_0x3a57d3['join'](_0x2680f6,NEW_CONFIG_NAME);try{_0x492ec1?console[_0x28b824(0x109)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x2adea5+':\x20'+_0x492ec1):console[_0x28b824(0x109)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x2adea5);const _0x2684c5=getRabetbaseCliPackageRoot(),_0x4e64a3=a144_0x3a57d3['join'](_0x2684c5,'package.json');let _0x3f014d=_0x28b824(0x103);try{const _0xe09d62=JSON[_0x28b824(0x10e)](a144_0x2adf2c[_0x28b824(0xc1)](_0x4e64a3,'utf8'));_0x3f014d=_0xe09d62['version']||_0x28b824(0x103);}catch{}const _0x11759d=readConfig(),_0x5ac258=typeof _0x11759d[_0x28b824(0xd1)]===_0x28b824(0xd5)?_0x11759d[_0x28b824(0xd1)]:undefined,_0x173234={};for(const _0x4a834e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x11759d[_0x4a834e]!=null)_0x173234[_0x4a834e]=_0x11759d[_0x4a834e];}const _0x2be3bb=buildCanonicalProjectConfig(_0x173234,{'appCodes':_0x492ec1?[_0x492ec1]:[],'env':_0x26824d||_0x5ac258||_0x28b824(0x10f),'metadata':{'createdAt':new Date()[_0x28b824(0xfd)](),'version':_0x3f014d}});writeConfigFile(_0x311a0d,_0x2be3bb),_0x492ec1?console[_0x28b824(0x109)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object['keys'](_0x2be3bb['apps']||{})[_0x28b824(0x10d)](',\x20')+'\x20|\x20Default:\x20'+_0x2be3bb[_0x28b824(0xd6)]):console[_0x28b824(0x109)](_0x28b824(0xfa)+CLI_BIN_NAME+_0x28b824(0x100)),logger[_0x28b824(0xba)](_0x28b824(0xf8),_0x28b824(0xfe)+_0x492ec1);}catch(_0x55c213){logger[_0x28b824(0xe4)](_0x28b824(0xf8),_0x28b824(0xf6));}}
|
|
1
|
+
(function(_0x54b154,_0x409260){const _0x4037f3=a144_0x41ff,_0x5e4d65=_0x54b154();while(!![]){try{const _0x409aad=-parseInt(_0x4037f3(0x117))/0x1+parseInt(_0x4037f3(0xe9))/0x2+-parseInt(_0x4037f3(0x10a))/0x3*(parseInt(_0x4037f3(0xd3))/0x4)+parseInt(_0x4037f3(0xde))/0x5*(-parseInt(_0x4037f3(0x119))/0x6)+-parseInt(_0x4037f3(0xce))/0x7+parseInt(_0x4037f3(0x112))/0x8+parseInt(_0x4037f3(0xe3))/0x9*(parseInt(_0x4037f3(0x106))/0xa);if(_0x409aad===_0x409260)break;else _0x5e4d65['push'](_0x5e4d65['shift']());}catch(_0xffbc5b){_0x5e4d65['push'](_0x5e4d65['shift']());}}}(a144_0x3bfe,0x7f25e));import a144_0xae2575 from'path';import a144_0x556c59 from'fs';import a144_0x433acd from'chalk';import a144_0x3cc909 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';function a144_0x41ff(_0x3dbce3,_0x45d9c7){_0x3dbce3=_0x3dbce3-0xca;const _0x3bfe75=a144_0x3bfe();let _0x41ffd7=_0x3bfe75[_0x3dbce3];return _0x41ffd7;}import{readConfig}from'../../../utils/config.js';function a144_0x3bfe(){const _0x4c511b=['更新\x20package.json\x20失败','13707RcFFKc','\x20|\x20Default:\x20','Copy\x20project\x20files','projectName','stringify','CLI\x20版本检查','354096BpcZsd','create','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','Project\x20name:\x20','length','fail','Format\x20code','parse','string','package.json','defaultApp','cyan','needsUpgrade','dirname','info','\x20\x202.\x20Pull\x20API\x20configuration:\x20','join','message','apps','项目创建失败:\x20','existsSync','Project\x20directory\x20','\x20api\x20pull','rmSync','\x20\x201.\x20Start\x20project:\x20','projectCode','\x20run\x20start','production','🚀\x20Next\x20Steps:','15310qophVs','belowMinimum','stableVersion','env','12Rudffu','1.0.0','writeFileSync','constants','error','更新\x20package.json\x20name','\x20model(s)','chdir','958216NNAYlt','stop','W_OK','bold','Install\x20dependencies','233184GUltnG','setLogPath','6Xsehhe','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','description','\x20dataset(s),\x20generated\x20','cwd','resolve','√\x20Configuration\x20file\x20created,\x20Apps:\x20','√\x20package.json\x20updated:\x20name=','*\x20Pulling\x20API\x20configuration...','cookie','currentVersion','开始创建项目:\x20','\x20already\x20exists','√\x20Pulled\x20','log','\x20√\x20','配置应用AppCode:\x20','Project\x20name\x20cannot\x20be\x20empty','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','warn','项目创建完成:\x20','5462135oVoqrs','API\x20配置拉取异常','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','readFileSync','test','479684zCGiia','keys','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','utf8','配置应用AppCode失败','*\x20Configuring\x20AppCode\x20for\x20project\x20','repeat','\x20|\x20AppCode:\x20','modelCount','appCode','\x20&&\x20','3072835PukxoB','green','API\x20configuration\x20pulled:\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20'];a144_0x3bfe=function(){return _0x4c511b;};return a144_0x3bfe();}import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x5b84dc){const _0x21dcff=a144_0x41ff,_0x4d86c6=await checkCliVersion();(_0x4d86c6[_0x21dcff(0xf5)]||_0x4d86c6[_0x21dcff(0x107)])&&(printCliUpgradeWarning(_0x4d86c6),assertCliVersionSupported(_0x4d86c6),logger[_0x21dcff(0xf7)](_0x21dcff(0xea),_0x21dcff(0xe8),{'currentVersion':_0x4d86c6[_0x21dcff(0x123)],'stableVersion':_0x4d86c6[_0x21dcff(0x108)],'minimumVersion':_0x4d86c6['minimumVersion'],'needsUpgrade':_0x4d86c6[_0x21dcff(0xf5)],'belowMinimum':_0x4d86c6['belowMinimum']}));if(_0x5b84dc[_0x21dcff(0x102)]&&_0x5b84dc['appCode'])await runCreate({'projectName':_0x5b84dc[_0x21dcff(0x102)],'appCode':_0x5b84dc[_0x21dcff(0xdc)],'env':_0x5b84dc['env']},_0x5b84dc);else{if(_0x5b84dc[_0x21dcff(0x102)]){const _0x4cc1a2=await selectSingleAppcode(_0x5b84dc[_0x21dcff(0x122)]);await runCreate({'projectName':_0x5b84dc[_0x21dcff(0x102)],'appCode':_0x4cc1a2||undefined,'env':_0x5b84dc['env']},_0x5b84dc);}else await guidedCreateProject(_0x7edc6b=>runCreate(_0x7edc6b,_0x5b84dc),_0x5b84dc[_0x21dcff(0x109)],_0x5b84dc['cookie']);}}async function runCreate(_0x535d57,_0xf4accf){const _0x4472af=a144_0x41ff;if(!_0x535d57[_0x4472af(0xe6)]||_0x535d57[_0x4472af(0xe6)]['trim']()==='')throw new Error(_0x4472af(0xca));const _0x4e36df=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4e36df[_0x4472af(0xd2)](_0x535d57[_0x4472af(0xe6)]))throw new Error(_0x4472af(0xcb));if(_0x535d57['projectName'][_0x4472af(0xed)]>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x5f5ad7=a144_0xae2575[_0x4472af(0x11e)](process[_0x4472af(0x11d)](),_0x535d57[_0x4472af(0xe6)]);if(a144_0x556c59[_0x4472af(0xfd)](_0x5f5ad7))throw new Error(_0x4472af(0xfe)+_0x535d57['projectName']+_0x4472af(0x125));try{a144_0x556c59['accessSync'](a144_0xae2575[_0x4472af(0xf6)](_0x5f5ad7),a144_0x556c59[_0x4472af(0x10d)][_0x4472af(0x114)]);}catch{throw new Error(_0x4472af(0x11a));}logger[_0x4472af(0x118)](_0x5f5ad7),logger[_0x4472af(0xf7)]('create',_0x4472af(0x124)+_0x535d57[_0x4472af(0xe6)],{'projectDir':_0x5f5ad7,'appCode':_0x535d57[_0x4472af(0xdc)]}),console['log'](),console[_0x4472af(0x127)](a144_0x433acd['green']('\x20√\x20')+_0x4472af(0xec)+a144_0x433acd[_0x4472af(0xdf)](_0x535d57['projectName'])+(_0x535d57[_0x4472af(0xdc)]?_0x4472af(0xda)+a144_0x433acd[_0x4472af(0xf4)](_0x535d57[_0x4472af(0xdc)]):''));try{await runTask(_0x4472af(0xe5),()=>copyProjectTemplate(_0x535d57[_0x4472af(0xe6)])),await updatePackageJsonName(_0x535d57['projectName']),await runTask(_0x4472af(0x116),()=>installDependencies(_0x535d57['projectName'])),await runTask(_0x4472af(0xef),()=>formatProjectCode(_0x535d57[_0x4472af(0xe6)])),await configureAppCode(_0x535d57['projectName'],_0x535d57[_0x4472af(0xdc)]||'',_0x535d57[_0x4472af(0x109)]);let _0x39c7d0=![];if(_0x535d57['appCode']){console[_0x4472af(0x127)](_0x4472af(0x121));const _0x5f2049=process[_0x4472af(0x11d)]();try{process[_0x4472af(0x111)](_0x5f5ad7);const _0x4616c2=_0x535d57[_0x4472af(0x109)]||'production';initEnv(_0x4616c2);const {configArray:_0x41cfe2}=await fetchModelList(_0x535d57['appCode'],_0xf4accf['cookie']||''),_0x1825db=DEFAULT_API_DIR,_0x3b8860=await generateApiFile(_0x41cfe2,'',_0x535d57['appCode'],!![],_0x4616c2,_0x1825db);console[_0x4472af(0x127)](_0x4472af(0x126)+_0x41cfe2[_0x4472af(0xed)]+_0x4472af(0x11c)+_0x3b8860[_0x4472af(0xdb)]+_0x4472af(0x110)),logger['info']('create',_0x4472af(0xe0)+_0x535d57['appCode']);}catch(_0x53cdbd){_0x39c7d0=!![],console['log']('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x4472af(0xcc)](_0x4472af(0xea),_0x4472af(0xcf),{'error':_0x53cdbd instanceof Error?_0x53cdbd[_0x4472af(0xfa)]:String(_0x53cdbd)});}finally{process[_0x4472af(0x111)](_0x5f2049);}}logger['success']('create',_0x4472af(0xcd)+_0x535d57['projectName']),console[_0x4472af(0x127)](),console['log'](a144_0x433acd[_0x4472af(0xdf)]('─'[_0x4472af(0xd9)](0x3c))),console[_0x4472af(0x127)](a144_0x433acd[_0x4472af(0xf4)][_0x4472af(0x115)](_0x4472af(0x105))),console[_0x4472af(0x127)](),console[_0x4472af(0x127)](_0x4472af(0x101)+a144_0x433acd[_0x4472af(0xf4)][_0x4472af(0x115)]('cd\x20'+_0x535d57[_0x4472af(0xe6)]+_0x4472af(0xdd)+CLI_BIN_NAME+_0x4472af(0x103))),_0x39c7d0&&console[_0x4472af(0x127)](_0x4472af(0xf8)+a144_0x433acd[_0x4472af(0xf4)][_0x4472af(0x115)](CLI_BIN_NAME+_0x4472af(0xff))),console[_0x4472af(0x127)](a144_0x433acd[_0x4472af(0xdf)]('─'['repeat'](0x3c)));}catch(_0x1a5efb){logger['error'](_0x4472af(0xea),_0x4472af(0xfc)+_0x535d57[_0x4472af(0xe6)],{'error':_0x1a5efb instanceof Error?_0x1a5efb[_0x4472af(0xfa)]:String(_0x1a5efb)});try{a144_0x556c59[_0x4472af(0xfd)](_0x5f5ad7)&&(console[_0x4472af(0x127)](_0x4472af(0xd5)+_0x5f5ad7),a144_0x556c59[_0x4472af(0x100)](_0x5f5ad7,{'recursive':!![],'force':!![]}));}catch{logger[_0x4472af(0xcc)](_0x4472af(0xea),'清理项目目录失败:\x20'+_0x5f5ad7);}throw _0x1a5efb;}}async function runTask(_0x31319e,_0x55fbbc){const _0xe30629=a144_0x41ff,_0x3944b6=a144_0x3cc909(_0x31319e+'...')['start']();try{const _0x39e4e3=await _0x55fbbc();_0x3944b6[_0xe30629(0x113)](),console[_0xe30629(0x127)](''+a144_0x433acd['green'](_0xe30629(0x128))+_0x31319e+'\x20'+a144_0x433acd['gray']('['+_0x39e4e3+']'));}catch(_0x1bb696){_0x3944b6[_0xe30629(0xee)](_0x31319e);throw _0x1bb696;}}async function updatePackageJsonName(_0x3e49f0){const _0x552dea=a144_0x41ff,_0x55562c=a144_0xae2575[_0x552dea(0x11e)](process[_0x552dea(0x11d)](),_0x3e49f0),_0x17bc03=a144_0xae2575[_0x552dea(0xf9)](_0x55562c,_0x552dea(0xf2));try{console[_0x552dea(0x127)](_0x552dea(0xeb));const _0x51c527=getRabetbaseCliPackageRoot(),_0x981f83=a144_0xae2575['join'](_0x51c527,'package.json');let _0x12e1ea=_0x552dea(0x10b);try{const _0x5f4369=JSON['parse'](a144_0x556c59['readFileSync'](_0x981f83,_0x552dea(0xd6)));_0x12e1ea=_0x5f4369['version']||'1.0.0';}catch{}const _0x46720b=a144_0x556c59['readFileSync'](_0x17bc03,_0x552dea(0xd6)),_0x1ba794=JSON[_0x552dea(0xf0)](_0x46720b);_0x1ba794['name']=_0x3e49f0,_0x1ba794[_0x552dea(0x11b)]=_0x3e49f0+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x12e1ea,a144_0x556c59[_0x552dea(0x10c)](_0x17bc03,JSON[_0x552dea(0xe7)](_0x1ba794,null,0x2)+'\x0a',_0x552dea(0xd6)),console[_0x552dea(0x127)](_0x552dea(0x120)+_0x3e49f0),logger['info'](_0x552dea(0xea),_0x552dea(0x10f));}catch(_0x430a7){logger['error'](_0x552dea(0xea),_0x552dea(0xe2));throw _0x430a7;}}async function configureAppCode(_0x4b47ca,_0x20abc0,_0x11bbab){const _0x452202=a144_0x41ff,_0x58fb60=a144_0xae2575['resolve'](process['cwd'](),_0x4b47ca),_0xc7eccc=a144_0xae2575[_0x452202(0xf9)](_0x58fb60,NEW_CONFIG_NAME);try{_0x20abc0?console[_0x452202(0x127)](_0x452202(0xd8)+_0x4b47ca+':\x20'+_0x20abc0):console[_0x452202(0x127)](_0x452202(0xe1)+_0x4b47ca);const _0x571f6=getRabetbaseCliPackageRoot(),_0x4c0a0a=a144_0xae2575[_0x452202(0xf9)](_0x571f6,_0x452202(0xf2));let _0x1db908=_0x452202(0x10b);try{const _0x1e1b2d=JSON['parse'](a144_0x556c59[_0x452202(0xd1)](_0x4c0a0a,_0x452202(0xd6)));_0x1db908=_0x1e1b2d['version']||_0x452202(0x10b);}catch{}const _0x33d86f=readConfig(),_0x2e2a80=typeof _0x33d86f[_0x452202(0x109)]===_0x452202(0xf1)?_0x33d86f[_0x452202(0x109)]:undefined,_0x5d041d={};for(const _0x584821 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x33d86f[_0x584821]!=null)_0x5d041d[_0x584821]=_0x33d86f[_0x584821];}const _0x38a37b=buildCanonicalProjectConfig(_0x5d041d,{'appCodes':_0x20abc0?[_0x20abc0]:[],'env':_0x11bbab||_0x2e2a80||_0x452202(0x104),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x1db908}});writeConfigFile(_0xc7eccc,_0x38a37b),_0x20abc0?console[_0x452202(0x127)](_0x452202(0x11f)+Object[_0x452202(0xd4)](_0x38a37b[_0x452202(0xfb)]||{})['join'](',\x20')+_0x452202(0xe4)+_0x38a37b[_0x452202(0xf3)]):console[_0x452202(0x127)](_0x452202(0xd0)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger['info'](_0x452202(0xea),_0x452202(0x129)+_0x20abc0);}catch(_0xe4fc6f){logger[_0x452202(0x10e)]('create',_0x452202(0xd7));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e24ba,_0x45771b){const _0x240da8=a145_0x37ce,_0x4f23eb=_0x2e24ba();while(!![]){try{const _0x4fddb8=parseInt(_0x240da8(0x17e))/0x1+-parseInt(_0x240da8(0x1a5))/0x2*(parseInt(_0x240da8(0x18b))/0x3)+-parseInt(_0x240da8(0x1a3))/0x4*(-parseInt(_0x240da8(0x1a9))/0x5)+parseInt(_0x240da8(0x19b))/0x6*(-parseInt(_0x240da8(0x19a))/0x7)+-parseInt(_0x240da8(0x191))/0x8*(parseInt(_0x240da8(0x18e))/0x9)+parseInt(_0x240da8(0x1a1))/0xa+parseInt(_0x240da8(0x1a7))/0xb;if(_0x4fddb8===_0x45771b)break;else _0x4f23eb['push'](_0x4f23eb['shift']());}catch(_0x462c2b){_0x4f23eb['push'](_0x4f23eb['shift']());}}}(a145_0x1a3b,0x5c383));import a145_0x3150b8 from'path';import a145_0x467332 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';function a145_0x1a3b(){const _0x464a03=['\x20api\x20pull`\x20manually\x20later.','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','trim','\x0a\x20\x20cd\x20','string','resolve','bun\x20run\x20format','Use\x20a\x20different\x20project\x20name.','28tnVOjb','34824ljiRCZ','env','chdir','stringify','dirname','\x20\x20√\x20Configuration\x20file\x20created','193260XBcEUs','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','243428SKyizS','cwd','4pMyPRt','toLocaleString','4282531iJidZD','name','50TZkDnv','length','test','access','\x0a√\x20Project\x20','validation','production','ignore','\x22\x20already\x20exists.','Project\x20directory\x20\x22','584139PUAVdJ','W_OK','\x20dataset(s),\x20generated\x20','join','utf-8','\x20model(s)','readFile','modelCount','log','*\x20Creating\x20project\x20','description','belowMinimum','\x20\x20√\x20Pulled\x20','1066647YCaEcW','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20package.json\x20updated','41157JOiNZb','package.json','needsUpgrade','856kobwBV'];a145_0x1a3b=function(){return _0x464a03;};return a145_0x1a3b();}import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x105325,_0x10a9d2,_0xf87bfd,_0x182c73){const _0x3c1255=a145_0x37ce,_0x296db4=await checkCliVersion();(_0x296db4[_0x3c1255(0x190)]||_0x296db4[_0x3c1255(0x189)])&&(printCliUpgradeWarning(_0x296db4),assertCliVersionSupported(_0x296db4));if(!_0x105325||_0x105325[_0x3c1255(0x194)]()==='')throw CliErrors[_0x3c1255(0x1ae)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x162b22=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x162b22[_0x3c1255(0x1ab)](_0x105325))throw CliErrors[_0x3c1255(0x1ae)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x105325[_0x3c1255(0x1aa)]>0x64)throw CliErrors[_0x3c1255(0x1ae)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x59f51a=a145_0x3150b8[_0x3c1255(0x197)](process['cwd'](),_0x105325);if(existsSync(_0x59f51a))throw CliErrors[_0x3c1255(0x1ae)](_0x3c1255(0x17d)+_0x105325+_0x3c1255(0x17c),_0x3c1255(0x199));try{const _0x13f498=a145_0x3150b8[_0x3c1255(0x19f)](_0x59f51a);await a145_0x467332[_0x3c1255(0x1ac)](_0x13f498,a145_0x467332['constants'][_0x3c1255(0x17f)]);}catch{throw CliErrors[_0x3c1255(0x1ae)](_0x3c1255(0x18c),'Check\x20directory\x20permissions.');}try{console[_0x3c1255(0x186)](_0x3c1255(0x187)+_0x105325+'...');const _0x22f1ec=getSubAppReactDemoTemplateDir();await copyDirectory(_0x22f1ec,_0x59f51a),console[_0x3c1255(0x186)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x105325),console['log'](_0x3c1255(0x18d)),console['log']('\x20\x20Installing\x20dependencies...'),console[_0x3c1255(0x186)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x59f51a),console[_0x3c1255(0x186)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x105325,_0xf87bfd,_0x10a9d2),console[_0x3c1255(0x186)](_0x3c1255(0x1a0)),_0xf87bfd&&await pullApiConfig(_0x59f51a,_0xf87bfd,_0x10a9d2,_0x182c73),console[_0x3c1255(0x186)](_0x3c1255(0x1ad)+_0x105325+'\x20created\x20successfully!'),console[_0x3c1255(0x186)](_0x3c1255(0x195)+_0x105325),console[_0x3c1255(0x186)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x1361ef){try{existsSync(_0x59f51a)&&await a145_0x467332['rm'](_0x59f51a,{'recursive':!![],'force':!![]});}catch{}throw _0x1361ef;}}async function updatePackageJsonName(_0x4324cf){const _0x34b5a4=a145_0x37ce,_0x5400a0=a145_0x3150b8[_0x34b5a4(0x197)](process[_0x34b5a4(0x1a4)](),_0x4324cf),_0x1aeb4d=a145_0x3150b8[_0x34b5a4(0x181)](_0x5400a0,_0x34b5a4(0x18f)),_0x107c26=await a145_0x467332[_0x34b5a4(0x184)](_0x1aeb4d,_0x34b5a4(0x182)),_0x3efc7a=JSON['parse'](_0x107c26);_0x3efc7a[_0x34b5a4(0x1a8)]=_0x4324cf,_0x3efc7a[_0x34b5a4(0x188)]=_0x34b5a4(0x1a2),await a145_0x467332['writeFile'](_0x1aeb4d,JSON[_0x34b5a4(0x19e)](_0x3efc7a,null,0x2)+'\x0a');}function detectPackageManager(){const _0x2e068c=a145_0x37ce;try{return execSync('bun\x20--version',{'stdio':_0x2e068c(0x17b)}),'bun';}catch{return'npm';}}function a145_0x37ce(_0xb25f06,_0x2ce973){_0xb25f06=_0xb25f06-0x17b;const _0x1a3bc1=a145_0x1a3b();let _0x37ce0c=_0x1a3bc1[_0xb25f06];return _0x37ce0c;}async function formatCode(_0x24e410){const _0x33ff34=a145_0x37ce;try{await execAsync(_0x33ff34(0x198),{'cwd':_0x24e410});}catch{}}async function configureProject(_0x29d4bb,_0x425f0f,_0x4b8688){const _0x170f21=a145_0x37ce,_0x36f128=a145_0x3150b8[_0x170f21(0x197)](process[_0x170f21(0x1a4)](),_0x29d4bb),_0x5437d3=a145_0x3150b8[_0x170f21(0x181)](_0x36f128,NEW_CONFIG_NAME),_0x3d1f76=readConfig(),_0x18510a=typeof _0x3d1f76[_0x170f21(0x19c)]===_0x170f21(0x196)?_0x3d1f76['env']:undefined,_0x567e77={};for(const _0x310b56 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3d1f76[_0x310b56]!=null)_0x567e77[_0x310b56]=_0x3d1f76[_0x310b56];}const _0xf8e4ee=buildCanonicalProjectConfig(_0x567e77,{'appCodes':_0x425f0f?[_0x425f0f]:[],'env':_0x4b8688||_0x18510a||_0x170f21(0x1af),'metadata':{'createdAt':new Date()[_0x170f21(0x1a6)](),'version':getCliVersion()}});writeConfigFile(_0x5437d3,_0xf8e4ee);}async function pullApiConfig(_0x5d58f2,_0xcb58c7,_0x15c631,_0x42dced){const _0x3401e4=a145_0x37ce,_0x25d7f3=process[_0x3401e4(0x1a4)]();try{process[_0x3401e4(0x19d)](_0x5d58f2);const _0x26f57e=_0x15c631||_0x3401e4(0x1af);initEnv(_0x26f57e),console[_0x3401e4(0x186)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x12d386}=await fetchModelList(_0xcb58c7,_0x42dced||''),_0x1c584b=await generateApiFile(_0x12d386,'',_0xcb58c7,!![],_0x26f57e,DEFAULT_API_DIR);console['log'](_0x3401e4(0x18a)+_0x12d386[_0x3401e4(0x1aa)]+_0x3401e4(0x180)+_0x1c584b[_0x3401e4(0x185)]+_0x3401e4(0x183));}catch(_0x4edda1){console[_0x3401e4(0x186)](_0x3401e4(0x193)+CLI_BIN_NAME+_0x3401e4(0x192));}finally{process['chdir'](_0x25d7f3);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0x2d27f3=a146_0x2abe;function a146_0x54e0(){const _0x55c978=['5793816pzoiPi','templates','1943522VSZnKK','2MXGnYO','5ijaLKE','1064606XznTco','sub-app-react-demo','108654miKVCF','dirname','1560228yXCtZS','resolve','../../../../','projects','32420430ZypCIK','join','2701032JmFZtN'];a146_0x54e0=function(){return _0x55c978;};return a146_0x54e0();}(function(_0x2a4281,_0x3f202b){const _0xcad578=a146_0x2abe,_0x42a8c6=_0x2a4281();while(!![]){try{const _0x1659ce=parseInt(_0xcad578(0x9d))/0x1*(-parseInt(_0xcad578(0x9f))/0x2)+parseInt(_0xcad578(0xa1))/0x3+-parseInt(_0xcad578(0x9a))/0x4+parseInt(_0xcad578(0x9e))/0x5*(parseInt(_0xcad578(0x93))/0x6)+-parseInt(_0xcad578(0x9c))/0x7+-parseInt(_0xcad578(0x99))/0x8+parseInt(_0xcad578(0x97))/0x9;if(_0x1659ce===_0x3f202b)break;else _0x42a8c6['push'](_0x42a8c6['shift']());}catch(_0x15db4d){_0x42a8c6['push'](_0x42a8c6['shift']());}}}(a146_0x54e0,0xbc08f));import a146_0x4138b1 from'node:path';import{fileURLToPath}from'node:url';function a146_0x2abe(_0x5bd966,_0x48d9dc){_0x5bd966=_0x5bd966-0x93;const _0x54e0a7=a146_0x54e0();let _0x2abe3d=_0x54e0a7[_0x5bd966];return _0x2abe3d;}const __dirname=a146_0x4138b1[a146_0x2d27f3(0xa2)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x1f7821=a146_0x2d27f3;return a146_0x4138b1[_0x1f7821(0x94)](__dirname,_0x1f7821(0x95));}export function getSubAppReactDemoTemplateDir(){const _0x21804e=a146_0x2d27f3;return a146_0x4138b1[_0x21804e(0x98)](getRabetbaseCliPackageRoot(),_0x21804e(0x9b),_0x21804e(0x96),_0x21804e(0xa0));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4eb1cf,_0xbaf7e5){const _0x2a5535=a147_0x33e2,_0x2d6732=_0x4eb1cf();while(!![]){try{const _0x28bc29=parseInt(_0x2a5535(0xfe))/0x1*(parseInt(_0x2a5535(0xfa))/0x2)+parseInt(_0x2a5535(0xff))/0x3+-parseInt(_0x2a5535(0xf8))/0x4*(parseInt(_0x2a5535(0xf2))/0x5)+-parseInt(_0x2a5535(0xfc))/0x6+parseInt(_0x2a5535(0x100))/0x7*(-parseInt(_0x2a5535(0x103))/0x8)+parseInt(_0x2a5535(0xfb))/0x9+parseInt(_0x2a5535(0x105))/0xa;if(_0x28bc29===_0xbaf7e5)break;else _0x2d6732['push'](_0x2d6732['shift']());}catch(_0x270d16){_0x2d6732['push'](_0x2d6732['shift']());}}}(a147_0x15cd,0xb0bec));import a147_0x20186e from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a147_0x15cd(){const _0x2bfc83=['now','项目模板复制失败','resolve','message','info','352fJQYAl','cwd','2NVolGz','4712904geXccW','412374eiCPWM','项目模板复制完成','1194185ffmyNs','2675499ruLSzZ','434DYASjy','开始复制项目模板','error','158272hYmEoi','copy','4640270iYSZaL','59910MxLDeO'];a147_0x15cd=function(){return _0x2bfc83;};return a147_0x15cd();}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a147_0x33e2(_0x56ed84,_0x29591d){_0x56ed84=_0x56ed84-0xf2;const _0x15cd3f=a147_0x15cd();let _0x33e285=_0x15cd3f[_0x56ed84];return _0x33e285;}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x5a61a9){const _0x2c0020=a147_0x33e2,_0x48c38c=Date[_0x2c0020(0xf3)](),_0x5a0346=a147_0x20186e[_0x2c0020(0xf5)](process[_0x2c0020(0xf9)](),_0x5a61a9);try{logger[_0x2c0020(0xf7)](_0x2c0020(0x104),_0x2c0020(0x101),{'projectCode':_0x5a61a9,'templateDir':templateDir}),await copyDirectory(templateDir,_0x5a0346);const _0x57cfa3=Date[_0x2c0020(0xf3)]()-_0x48c38c;logger['success'](_0x2c0020(0x104),_0x2c0020(0xfd),_0x57cfa3,{'projectCode':_0x5a61a9});}catch(_0x2b1f50){const _0xdd5d0a=Date[_0x2c0020(0xf3)]()-_0x48c38c;logger[_0x2c0020(0x102)](_0x2c0020(0x104),_0x2c0020(0xf4),{'projectCode':_0x5a61a9,'error':_0x2b1f50 instanceof Error?_0x2b1f50[_0x2c0020(0xf6)]:String(_0x2b1f50),'duration':_0xdd5d0a});throw _0x2b1f50;}return formatElapsed(_0x48c38c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a148_0x2965(){const _0x1c7176=['resolve','522810dSYQrq','2935656pIppzV','7wtoYLk','159fbwhdi','cwd','npx','format','now','339190GEZCms','842xHuRmL','代码格式化完成','--write','info','message','246102ENngjS','prettier','180848QbVKIS','1414926wOwQLk'];a148_0x2965=function(){return _0x1c7176;};return a148_0x2965();}(function(_0x509d7e,_0x4f4092){const _0x5e7c7d=a148_0x56d6,_0x1d4271=_0x509d7e();while(!![]){try{const _0x4a7516=parseInt(_0x5e7c7d(0x174))/0x1*(parseInt(_0x5e7c7d(0x17a))/0x2)+-parseInt(_0x5e7c7d(0x17f))/0x3+-parseInt(_0x5e7c7d(0x16e))/0x4+parseInt(_0x5e7c7d(0x179))/0x5+-parseInt(_0x5e7c7d(0x16f))/0x6+-parseInt(_0x5e7c7d(0x173))/0x7*(-parseInt(_0x5e7c7d(0x172))/0x8)+parseInt(_0x5e7c7d(0x171))/0x9;if(_0x4a7516===_0x4f4092)break;else _0x1d4271['push'](_0x1d4271['shift']());}catch(_0x53bf1a){_0x1d4271['push'](_0x1d4271['shift']());}}}(a148_0x2965,0x30095));function a148_0x56d6(_0x55c9bb,_0x48faec){_0x55c9bb=_0x55c9bb-0x16d;const _0x296590=a148_0x2965();let _0x56d682=_0x296590[_0x55c9bb];return _0x56d682;}import a148_0x262ba6 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x54d8f0){const _0x1f4aef=a148_0x56d6,_0x5eea18=Date['now'](),_0x56dabe=a148_0x262ba6[_0x1f4aef(0x170)](process[_0x1f4aef(0x175)](),_0x54d8f0);try{logger[_0x1f4aef(0x17d)](_0x1f4aef(0x177),'开始格式化代码',{'projectCode':_0x54d8f0}),await execa(resolveNpmBin(_0x1f4aef(0x176)),[_0x1f4aef(0x16d),_0x1f4aef(0x17c),'.'],{'cwd':_0x56dabe});const _0x19e757=Date[_0x1f4aef(0x178)]()-_0x5eea18;logger['success'](_0x1f4aef(0x177),_0x1f4aef(0x17b),_0x19e757,{'projectCode':_0x54d8f0});}catch(_0x1d3e34){const _0x250c44=Date[_0x1f4aef(0x178)]()-_0x5eea18;logger['error']('format','代码格式化失败',{'projectCode':_0x54d8f0,'error':_0x1d3e34 instanceof Error?_0x1d3e34[_0x1f4aef(0x17e)]:String(_0x1d3e34),'duration':_0x250c44});throw _0x1d3e34;}return formatElapsed(_0x5eea18);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2503be,_0x524321){const _0x54d598=a149_0x424a,_0x3ad6c=_0x2503be();while(!![]){try{const _0x297b07=parseInt(_0x54d598(0x1e7))/0x1+-parseInt(_0x54d598(0x1f5))/0x2+parseInt(_0x54d598(0x1f3))/0x3+-parseInt(_0x54d598(0x1ec))/0x4+parseInt(_0x54d598(0x1f2))/0x5+parseInt(_0x54d598(0x1f1))/0x6+-parseInt(_0x54d598(0x1f6))/0x7;if(_0x297b07===_0x524321)break;else _0x3ad6c['push'](_0x3ad6c['shift']());}catch(_0x155f94){_0x3ad6c['push'](_0x3ad6c['shift']());}}}(a149_0x2565,0x9bdaf));import a149_0x50ae81 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a149_0x424a(_0x2034df,_0x50ee89){_0x2034df=_0x2034df-0x1e5;const _0x2565a4=a149_0x2565();let _0x424ad3=_0x2565a4[_0x2034df];return _0x424ad3;}function a149_0x2565(){const _0x165caa=['8066317lBsUiX','message','依赖安装完成','info','451339IYrRoH','install','--registry','开始安装依赖','success','1033520Uhompo','依赖安装失败','now','https://registry.npmmirror.com','npm','4641438yxjExQ','4650215ZRsBEQ','2638860VpFQVL','cwd','1970962fHYahQ'];a149_0x2565=function(){return _0x165caa;};return a149_0x2565();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x34bbaa){const _0xb36683=a149_0x424a,_0x262bb5=Date['now'](),_0x3db45d=a149_0x50ae81['resolve'](process[_0xb36683(0x1f4)](),_0x34bbaa);try{logger[_0xb36683(0x1e6)](_0xb36683(0x1e8),_0xb36683(0x1ea),{'projectCode':_0x34bbaa,'registry':_0xb36683(0x1ef)}),await execa(resolveNpmBin(_0xb36683(0x1f0)),['install',_0xb36683(0x1e9),_0xb36683(0x1ef)],{'cwd':_0x3db45d});const _0x2c061d=Date['now']()-_0x262bb5;logger[_0xb36683(0x1eb)](_0xb36683(0x1e8),_0xb36683(0x1e5),_0x2c061d,{'projectCode':_0x34bbaa});}catch(_0x1e1a2){const _0x39d153=Date[_0xb36683(0x1ee)]()-_0x262bb5;logger['error'](_0xb36683(0x1e8),_0xb36683(0x1ed),{'projectCode':_0x34bbaa,'error':_0x1e1a2 instanceof Error?_0x1e1a2[_0xb36683(0x1f7)]:String(_0x1e1a2),'duration':_0x39d153});throw _0x1e1a2;}return formatElapsed(_0x262bb5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a150_0x2725de=a150_0x251a;(function(_0x3a58a8,_0x2b87fd){const _0x117655=a150_0x251a,_0x281f09=_0x3a58a8();while(!![]){try{const _0x5af72e=parseInt(_0x117655(0x1a5))/0x1*(-parseInt(_0x117655(0x1b3))/0x2)+parseInt(_0x117655(0x1a9))/0x3+-parseInt(_0x117655(0x1a7))/0x4*(parseInt(_0x117655(0x19e))/0x5)+parseInt(_0x117655(0x1a6))/0x6*(parseInt(_0x117655(0x1a2))/0x7)+parseInt(_0x117655(0x19b))/0x8*(parseInt(_0x117655(0x1ae))/0x9)+parseInt(_0x117655(0x1a1))/0xa+-parseInt(_0x117655(0x199))/0xb;if(_0x5af72e===_0x2b87fd)break;else _0x281f09['push'](_0x281f09['shift']());}catch(_0x2d43d1){_0x281f09['push'](_0x281f09['shift']());}}}(a150_0x4ed6,0x6b8e9));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';function a150_0x251a(_0x237bef,_0x1b08b6){_0x237bef=_0x237bef-0x194;const _0x4ed680=a150_0x4ed6();let _0x251af3=_0x4ed680[_0x237bef];return _0x251af3;}function a150_0x4ed6(){const _0x122f1b=['Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','660078sqPDFt','project','Auto-confirm\x20prompts','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','trim','6KVuwwM','string','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','bool','env','project-name','upgrade','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','name','init','\x20workspace\x20init','../../commands/project/create/non-interactive.js','write','yes','App\x20code\x20to\x20initialize','args','10346699EwJRcP','boolean','24hsJsCG','create','Usage:\x20','176955QmQZlb','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Skip\x20confirmation\x20prompt','4987330epaGEb','14jfqFEc','../../commands/project/create/main.js','2026-07','3344aSwWtx','2106042eREFHn','92qIxUjk','Project\x20name','2353242nCBnqC','str','appcode','cookie'];a150_0x4ed6=function(){return _0x122f1b;};return a150_0x4ed6();}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a150_0x2725de(0x1ab),'type':'string','description':a150_0x2725de(0x197)},{'name':a150_0x2725de(0x1b7),'type':a150_0x2725de(0x1b4),'description':'Target\x20environment'},{'name':'yes','type':'boolean','description':a150_0x2725de(0x1b0),'default':![]}],createFlags=[{'name':a150_0x2725de(0x1bb),'type':a150_0x2725de(0x1b4),'description':a150_0x2725de(0x1a8)},{'name':'env','type':a150_0x2725de(0x1b4),'description':'Target\x20environment'},{'name':'appcode','type':a150_0x2725de(0x1b4),'description':a150_0x2725de(0x1b1)}],upgradeFlags=[{'name':a150_0x2725de(0x196),'type':a150_0x2725de(0x19a),'description':a150_0x2725de(0x1a0),'default':![]}];export const projectDefinitions=[{'service':a150_0x2725de(0x1af),'command':a150_0x2725de(0x1bc),'description':a150_0x2725de(0x1b5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a150_0x2725de(0x1bd),'since':a150_0x2725de(0x1a4)},'flags':initFlags,async 'execute'(_0x24ba97){const _0xc6efc5=a150_0x2725de;return await initConfig({'appcode':_0x24ba97[_0xc6efc5(0x1aa)](_0xc6efc5(0x1ab))||undefined,'env':_0x24ba97[_0xc6efc5(0x1aa)](_0xc6efc5(0x1b7))||undefined,'autoYes':_0x24ba97[_0xc6efc5(0x1b6)](_0xc6efc5(0x196))}),{'ok':!![]};}},{'service':'project','command':a150_0x2725de(0x19c),'description':'Create\x20a\x20new\x20project','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a150_0x2725de(0x1b8),'description':a150_0x2725de(0x19f),'required':![]}],'flags':createFlags,async 'execute'(_0x3d3cfe){const _0xe704df=a150_0x2725de,{createApp:_0x2b095b}=await import(_0xe704df(0x1a3)),{createProjectNonInteractive:_0x3ad812}=await import(_0xe704df(0x194)),_0xc18f04=_0x3d3cfe[_0xe704df(0x1aa)](_0xe704df(0x1bb))[_0xe704df(0x1b2)]()||_0x3d3cfe[_0xe704df(0x198)][0x0]?.[_0xe704df(0x1b2)](),_0x26f0e5=_0x3d3cfe[_0xe704df(0x1aa)](_0xe704df(0x1b7))||undefined,_0x2e7636=_0x3d3cfe[_0xe704df(0x1aa)](_0xe704df(0x1ab))||undefined;if(_0x3d3cfe['nonInteractive']){if(!_0xc18f04)throw CliErrors['validation'](_0xe704df(0x1ba),_0xe704df(0x19d)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x3ad812(_0xc18f04,_0x26f0e5,_0x2e7636,_0x3d3cfe['cookie']);}else await _0x2b095b({'projectCode':_0xc18f04,'appCode':_0x2e7636,'env':_0x26f0e5,'cookie':_0x3d3cfe[_0xe704df(0x1ac)]});return{'ok':!![]};}},{'service':a150_0x2725de(0x1af),'command':a150_0x2725de(0x1b9),'description':a150_0x2725de(0x1ad),'risk':a150_0x2725de(0x195),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x28407e){const _0x563955=a150_0x2725de;return await upgradeApp(_0x28407e['nonInteractive'],{'yes':_0x28407e[_0x563955(0x1b6)](_0x563955(0x196))}),{'ok':!![]};}}];
|