@lovrabet/rabetbase-cli 2.3.11 → 2.3.12
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
|
-
|
|
1
|
+
(function(_0x53f142,_0x1df156){const _0x5aac1e=a135_0x397f,_0x2fc16d=_0x53f142();while(!![]){try{const _0xf72059=parseInt(_0x5aac1e(0x193))/0x1+-parseInt(_0x5aac1e(0x18d))/0x2+parseInt(_0x5aac1e(0x18f))/0x3+-parseInt(_0x5aac1e(0x195))/0x4+-parseInt(_0x5aac1e(0x191))/0x5*(parseInt(_0x5aac1e(0x192))/0x6)+parseInt(_0x5aac1e(0x190))/0x7*(parseInt(_0x5aac1e(0x194))/0x8)+parseInt(_0x5aac1e(0x18e))/0x9;if(_0xf72059===_0x1df156)break;else _0x2fc16d['push'](_0x2fc16d['shift']());}catch(_0x5254d5){_0x2fc16d['push'](_0x2fc16d['shift']());}}}(a135_0xd9b0,0x8f83d));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';function a135_0xd9b0(){const _0x38652a=['1238544MgFGvk','2348244BenFNZ','29715FcMAnI','60170FRxTpy','402VfXnrI','1140184pvdypQ','600RvXVEy','3910508ikeXwP','14362XZweOl'];a135_0xd9b0=function(){return _0x38652a;};return a135_0xd9b0();}function a135_0x397f(_0x568e9a,_0x2c95b4){_0x568e9a=_0x568e9a-0x18d;const _0xd9b050=a135_0xd9b0();let _0x397f7c=_0xd9b050[_0x568e9a];return _0x397f7c;}import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a136_0x2bbb7e=a136_0x4dd1;(function(_0x1c5143,_0x1bcc80){const _0x31f091=a136_0x4dd1,_0x675fb1=_0x1c5143();while(!![]){try{const _0x41613f=-parseInt(_0x31f091(0x104))/0x1*(-parseInt(_0x31f091(0x10b))/0x2)+parseInt(_0x31f091(0x10a))/0x3*(parseInt(_0x31f091(0x10e))/0x4)+-parseInt(_0x31f091(0x109))/0x5*(-parseInt(_0x31f091(0x110))/0x6)+parseInt(_0x31f091(0x10d))/0x7+parseInt(_0x31f091(0x112))/0x8+-parseInt(_0x31f091(0x108))/0x9*(-parseInt(_0x31f091(0x105))/0xa)+-parseInt(_0x31f091(0x10f))/0xb*(parseInt(_0x31f091(0x114))/0xc);if(_0x41613f===_0x1bcc80)break;else _0x675fb1['push'](_0x675fb1['shift']());}catch(_0x29f4ba){_0x675fb1['push'](_0x675fb1['shift']());}}}(a136_0x392b,0xa88ab));function a136_0x4dd1(_0x5af8c0,_0x54e8c9){_0x5af8c0=_0x5af8c0-0x104;const _0x392b52=a136_0x392b();let _0x4dd1fd=_0x392b52[_0x5af8c0];return _0x4dd1fd;}import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a136_0x392b(){const _0x57b589=['page-get','1416TUhReM','1wvUnei','362810PTAWEh','Page\x20permit\x20for\x20menu\x20','num','153KTvScU','5tliDVa','21bWCIvD','92028uEqZIt','menu-id','1577247oMtPYC','179216BrcBYe','137467qhGfSe','281286OYHNVS','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','7330976juzTkJ'];a136_0x392b=function(){return _0x57b589;};return a136_0x392b();}import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':'permit','command':a136_0x2bbb7e(0x113),'description':a136_0x2bbb7e(0x111),'risk':'read','flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x240b3e){const _0x1f44ae=a136_0x2bbb7e,_0x4bc4fd=_0x240b3e[_0x1f44ae(0x107)](_0x1f44ae(0x10c)),_0x38361c=await getPagePermit(_0x4bc4fd);return{'ok':!![],'data':{'page':projectPagePermit(_0x38361c)},'message':_0x1f44ae(0x106)+_0x4bc4fd};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x36089e=a137_0x4aa8;(function(_0x284747,_0x37e66c){const _0x3777e1=a137_0x4aa8,_0x339f30=_0x284747();while(!![]){try{const _0x4e3058=-parseInt(_0x3777e1(0x1e3))/0x1*(-parseInt(_0x3777e1(0x1ef))/0x2)+-parseInt(_0x3777e1(0x1e6))/0x3*(-parseInt(_0x3777e1(0x1f5))/0x4)+parseInt(_0x3777e1(0x1f0))/0x5+parseInt(_0x3777e1(0x1ff))/0x6+parseInt(_0x3777e1(0x1f7))/0x7+-parseInt(_0x3777e1(0x1f9))/0x8+-parseInt(_0x3777e1(0x1f1))/0x9*(parseInt(_0x3777e1(0x1e2))/0xa);if(_0x4e3058===_0x37e66c)break;else _0x339f30['push'](_0x339f30['shift']());}catch(_0x3f866c){_0x339f30['push'](_0x339f30['shift']());}}}(a137_0x14bf,0x7e694));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a137_0x14bf(){const _0x3d49aa=['3mzzgid','key','num','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','join','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','menuId','/smartapi/permit/page/save','Pass\x20at\x20least\x20one\x20of:\x20','186ATTDUW','2462305leeiGH','63VVTBYJ','rolePermit','flag','push','2817908azOdIv','This\x20page\x20has\x20no\x20\x22','3091963fuoBMc','label','4773168mPLyiz','map','allowSelf','selector','menu-id','appCode','4603752ISsbEN','high-risk-write','length','validation','2714170NtrmHb','6542BwOPvq','permit','Nothing\x20to\x20set.'];a137_0x14bf=function(){return _0x3d49aa;};return a137_0x14bf();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a137_0x4aa8(_0xf30daf,_0x46a366){_0xf30daf=_0xf30daf-0x1e0;const _0x14bf80=a137_0x14bf();let _0x4aa824=_0x14bf80[_0xf30daf];return _0x4aa824;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH=a137_0x36089e(0x1ed);function collectRequestedSlots(_0x2596ce){const _0x3ad693=a137_0x36089e,_0x3ae78e=[];for(const _0x4e15ec of PAGE_SLOT_SPECS){const _0x1f6e3f=_0x2596ce[_0x3ad693(0x1f3)](_0x4e15ec[_0x3ad693(0x1f3)]);if(_0x1f6e3f===undefined||_0x1f6e3f===null)continue;const _0x57c378=splitList(String(_0x1f6e3f));if(_0x57c378['length']===0x0)throw CliErrors[_0x3ad693(0x1e1)]('--'+_0x4e15ec['flag']+'\x20cannot\x20be\x20empty.','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.');_0x3ae78e[_0x3ad693(0x1f4)]({'spec':_0x4e15ec,'refs':_0x57c378});}return _0x3ae78e;}async function buildPlan(_0x5e0a4d,_0xc38e56){const _0x4e09f8=a137_0x36089e,_0xb4db2e=_0x5e0a4d[_0x4e09f8(0x1e8)](_0x4e09f8(0x1fd)),_0x3456b3=collectRequestedSlots(_0x5e0a4d);if(_0x3456b3[_0x4e09f8(0x1e0)]===0x0)throw CliErrors['validation'](_0x4e09f8(0x1e5),_0x4e09f8(0x1ee)+PAGE_SLOT_SPECS[_0x4e09f8(0x1fa)](_0xc1912f=>'--'+_0xc1912f[_0x4e09f8(0x1f3)])[_0x4e09f8(0x1ea)](',\x20')+'.');const _0x52ef2c=await getPagePermit(_0xb4db2e),_0x43f13f={},_0x5befaa={},_0x173a8f=[];for(const {spec:_0x3973cf,refs:_0x2d250d}of _0x3456b3){const _0x4c449d=_0x52ef2c[_0x3973cf[_0x4e09f8(0x1e7)]];if(!_0x4c449d)throw CliErrors['validation'](_0x4e09f8(0x1f6)+_0x3973cf[_0x4e09f8(0x1f8)]+'\x22\x20permission\x20slot\x20('+_0x3973cf[_0x4e09f8(0x1e7)]+').',_0x4e09f8(0x1eb));_0x43f13f[_0x3973cf['key']]=projectPageSlot(_0x4c449d);const _0x34dfdd=await resolvePermitRoles(_0x5e0a4d[_0x4e09f8(0x1fe)],_0x2d250d,{'allowSelf':_0x3973cf[_0x4e09f8(0x1fb)],'label':_0x3973cf[_0x4e09f8(0x1f8)]});_0x4c449d[_0x4e09f8(0x1f2)]=_0x34dfdd,_0x5befaa[_0x3973cf[_0x4e09f8(0x1e7)]]=projectPageSlot(_0x4c449d);}const _0x1198f9={'operation':'page-set','selector':{'appCode':_0x5e0a4d[_0x4e09f8(0x1fe)],'menuId':_0xb4db2e,'slots':_0x3456b3['map'](_0x5d8338=>_0x5d8338['spec']['key'])},'before':_0x43f13f,'after':_0x5befaa,'dryRun':_0xc38e56,'backend':{'method':'POST','path':SAVE_PATH},'warnings':_0x173a8f};return{'page':_0x52ef2c,'mutation':_0x1198f9};}export const permitPageSet={'service':a137_0x36089e(0x1e4),'command':'page-set','description':a137_0x36089e(0x1e9),'risk':a137_0x36089e(0x200),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x240d55){const _0x4e450f=a137_0x36089e,_0xf5fa62=collectRequestedSlots(_0x240d55);if(_0xf5fa62['length']===0x0)throw CliErrors[_0x4e450f(0x1e1)](_0x4e450f(0x1e5),_0x4e450f(0x1ee)+PAGE_SLOT_SPECS['map'](_0xb04581=>'--'+_0xb04581['flag'])[_0x4e450f(0x1ea)](',\x20')+'.');},async 'dryRun'(_0x1c84e0){const {mutation:_0x23fead}=await buildPlan(_0x1c84e0,!![]);return asDryRunResult(_0x23fead,{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x4f4f4f){const _0x310106=a137_0x36089e,{page:_0x14a2d2,mutation:_0x5b8f99}=await buildPlan(_0x4f4f4f,![]);return await savePagePermit(_0x14a2d2),{'ok':!![],'data':_0x5b8f99,'message':'Updated\x20page\x20permit\x20for\x20menu\x20'+_0x5b8f99[_0x310106(0x1fc)][_0x310106(0x1ec)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a138_0x56af(_0x1e9be2,_0x15896b){_0x1e9be2=_0x1e9be2-0x12b;const _0x5988c3=a138_0x5988();let _0x56afb9=_0x5988c3[_0x1e9be2];return _0x56afb9;}const a138_0x9f1175=a138_0x56af;(function(_0x4b75d5,_0x45a241){const _0x10f882=a138_0x56af,_0x44c160=_0x4b75d5();while(!![]){try{const _0x54c676=parseInt(_0x10f882(0x143))/0x1+parseInt(_0x10f882(0x12c))/0x2+parseInt(_0x10f882(0x14c))/0x3+-parseInt(_0x10f882(0x14f))/0x4+-parseInt(_0x10f882(0x145))/0x5+-parseInt(_0x10f882(0x149))/0x6+-parseInt(_0x10f882(0x142))/0x7*(parseInt(_0x10f882(0x138))/0x8);if(_0x54c676===_0x45a241)break;else _0x44c160['push'](_0x44c160['shift']());}catch(_0x15b1cf){_0x44c160['push'](_0x44c160['shift']());}}}(a138_0x5988,0x952a8));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';function a138_0x5988(){const _0x4b1188=['push','action','POST','str','validation','get','roleName','Missing\x20--revoke.','41800ClfepI','api-revoke','datasets','flagMissing','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','set','datasetCodes','high-risk-write','length','Revoked\x20API\x20access\x20for\x20','217rxajEw','368783cIyQay','selector','3167470wyplmf','permit','bool','join','110418gsQdPM','role-apis-set','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','2011446pVLDJZ','filter','API','1443812XcWdrx','appCode','1493088neTtCR','Pass\x20--datasets\x20<datasetCode,...>.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','revoke'];a138_0x5988=function(){return _0x4b1188;};return a138_0x5988();}import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x245519,_0x11c0a8){const _0x3df4a0=a138_0x56af,_0x46b8bf=await resolveRoleRef(_0x245519['appCode'],readRoleRef(_0x245519));assertPermConfigurable(_0x46b8bf);if(!_0x245519['bool'](_0x3df4a0(0x12f)))throw CliErrors[_0x3df4a0(0x134)]('Missing\x20--revoke.',_0x3df4a0(0x14b));const _0x14099a=splitList(_0x245519['str'](_0x3df4a0(0x13a)));if(_0x14099a[_0x3df4a0(0x140)]===0x0)throw CliErrors[_0x3df4a0(0x13b)]('datasets',_0x3df4a0(0x12d));const _0x2f891e=await getRoleApiResources(_0x245519[_0x3df4a0(0x12b)],_0x46b8bf['id']),{byCode:_0x366094,byDataset:_0x9d17c6}=flattenApiResources(_0x2f891e),_0x45446a=_0x14099a[_0x3df4a0(0x14d)](_0x362904=>!_0x9d17c6['has'](_0x362904));if(_0x45446a[_0x3df4a0(0x140)]>0x0)throw CliErrors['validation']('Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20'+_0x45446a[_0x3df4a0(0x148)](',\x20')+'.',_0x3df4a0(0x12e));const _0x1a2dab=new Map(),_0x1711c9=[],_0xa8317a=[];for(const _0x5ed805 of _0x14099a){for(const _0x59ea12 of _0x9d17c6[_0x3df4a0(0x135)](_0x5ed805)){const _0x2dc235=_0x366094[_0x3df4a0(0x135)](_0x59ea12);_0x1a2dab[_0x3df4a0(0x13d)](_0x59ea12,'0'),_0x1711c9[_0x3df4a0(0x130)]({'resourceCode':_0x59ea12,'datasetCode':_0x5ed805,'action':_0x2dc235[_0x3df4a0(0x131)]}),_0xa8317a[_0x3df4a0(0x130)]({'resourceCode':_0x59ea12,'datasetCode':_0x5ed805,'action':'0'});}}const _0x52361e=buildPermits(_0x366094,_0x1a2dab),_0x4320f3={'operation':_0x3df4a0(0x139),'selector':{'appCode':_0x245519[_0x3df4a0(0x12b)],'roleId':_0x46b8bf['id'],'roleName':_0x46b8bf[_0x3df4a0(0x136)],'datasetCodes':_0x14099a},'before':_0x1711c9,'after':_0xa8317a,'dryRun':_0x11c0a8,'backend':{'method':_0x3df4a0(0x132),'path':UPDATE_PATH,'roleType':'API'},'warnings':[]};return{'role':_0x46b8bf,'permits':_0x52361e,'mutation':_0x4320f3};}export const permitRoleApisSet={'service':a138_0x9f1175(0x146),'command':a138_0x9f1175(0x14a),'description':a138_0x9f1175(0x13c),'risk':a138_0x9f1175(0x13f),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4a4970){const _0x301b0e=a138_0x9f1175;if(!_0x4a4970[_0x301b0e(0x147)]('revoke'))throw CliErrors['validation'](_0x301b0e(0x137),_0x301b0e(0x14b));if(splitList(_0x4a4970[_0x301b0e(0x133)](_0x301b0e(0x13a)))[_0x301b0e(0x140)]===0x0)throw CliErrors[_0x301b0e(0x13b)](_0x301b0e(0x13a),_0x301b0e(0x12d));},async 'dryRun'(_0x5c0391){const _0x37f1ed=a138_0x9f1175,{mutation:_0x2f634f}=await buildPlan(_0x5c0391,!![]);return asDryRunResult(_0x2f634f,{'method':_0x37f1ed(0x132),'url':UPDATE_PATH});},async 'execute'(_0x1cad4d){const _0x361528=a138_0x9f1175,{role:_0x7cf6f0,permits:_0x4cf4bb,mutation:_0x1dd9bb}=await buildPlan(_0x1cad4d,![]);return await updateAppRole({'id':_0x7cf6f0['id'],'appCode':_0x1cad4d[_0x361528(0x12b)],'roleType':_0x361528(0x14e),'permits':_0x4cf4bb}),{'ok':!![],'data':_0x1dd9bb,'message':_0x361528(0x141)+_0x1dd9bb[_0x361528(0x144)][_0x361528(0x13e)][_0x361528(0x140)]+'\x20dataset(s)\x20on\x20role\x20'+_0x7cf6f0[_0x361528(0x136)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a139_0x299087=a139_0x2f39;(function(_0x400e5c,_0x4db152){const _0x5ec09e=a139_0x2f39,_0x32a0ac=_0x400e5c();while(!![]){try{const _0x12a161=-parseInt(_0x5ec09e(0x14a))/0x1+-parseInt(_0x5ec09e(0x13f))/0x2*(parseInt(_0x5ec09e(0x130))/0x3)+-parseInt(_0x5ec09e(0x13a))/0x4*(parseInt(_0x5ec09e(0x12b))/0x5)+-parseInt(_0x5ec09e(0x142))/0x6*(-parseInt(_0x5ec09e(0x145))/0x7)+parseInt(_0x5ec09e(0x136))/0x8+-parseInt(_0x5ec09e(0x139))/0x9+-parseInt(_0x5ec09e(0x13e))/0xa*(-parseInt(_0x5ec09e(0x140))/0xb);if(_0x12a161===_0x4db152)break;else _0x32a0ac['push'](_0x32a0ac['shift']());}catch(_0x1878ab){_0x32a0ac['push'](_0x32a0ac['shift']());}}}(a139_0x34b6,0xd7501));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a139_0x2f39(_0x5ae632,_0x12fede){_0x5ae632=_0x5ae632-0x128;const _0x34b66d=a139_0x34b6();let _0x2f3924=_0x34b66d[_0x5ae632];return _0x2f3924;}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_0x299087(0x147);async function buildPlan(_0x41ffb5,_0x6dc5d8){const _0x524209=a139_0x299087,_0x4366c2=await resolveRoleRef(_0x41ffb5[_0x524209(0x13b)],readRoleRef(_0x41ffb5));assertPermConfigurable(_0x4366c2);const _0x31dace=readGrantRevoke(_0x41ffb5),_0x4de2bf=splitList(_0x41ffb5[_0x524209(0x132)](_0x524209(0x12a)));if(_0x4de2bf[_0x524209(0x12f)]===0x0)throw CliErrors[_0x524209(0x12e)](_0x524209(0x12a),_0x524209(0x13d));const _0x344f06=await getRoleMenuResources(_0x41ffb5[_0x524209(0x13b)],_0x4366c2['id']),_0x2dd4d8=flattenMenuResources(_0x344f06),_0x3c4d2e=_0x4de2bf[_0x524209(0x131)](_0x121151=>!_0x2dd4d8[_0x524209(0x135)](_0x121151));if(_0x3c4d2e[_0x524209(0x12f)]>0x0)throw CliErrors['validation'](_0x524209(0x148)+_0x3c4d2e['join'](',\x20')+'.',_0x524209(0x143));const _0x39d66c=new Map(),_0x253ad2=[],_0x38f778=[];for(const _0x540322 of _0x4de2bf){const _0x295e0a=_0x2dd4d8[_0x524209(0x12d)](_0x540322);_0x39d66c[_0x524209(0x134)](_0x540322,_0x31dace),_0x253ad2[_0x524209(0x13c)]({'resourceCode':_0x540322,'action':_0x295e0a[_0x524209(0x138)]}),_0x38f778[_0x524209(0x13c)]({'resourceCode':_0x540322,'action':_0x31dace});}const _0x594fb5=buildPermits(_0x2dd4d8,_0x39d66c),_0x30dad5={'operation':_0x31dace===_0x524209(0x137)?_0x524209(0x12c):_0x524209(0x144),'selector':{'appCode':_0x41ffb5[_0x524209(0x13b)],'roleId':_0x4366c2['id'],'roleName':_0x4366c2[_0x524209(0x146)],'resourceCodes':_0x4de2bf},'before':_0x253ad2,'after':_0x38f778,'dryRun':_0x6dc5d8,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x524209(0x133)},'warnings':[]};return{'role':_0x4366c2,'permits':_0x594fb5,'mutation':_0x30dad5};}export const permitRoleMenusSet={'service':a139_0x299087(0x129),'command':'role-menus-set','description':'Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','risk':'high-risk-write','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x560dc2){const _0x27b160=a139_0x299087;readGrantRevoke(_0x560dc2);if(splitList(_0x560dc2['str']('menus'))['length']===0x0)throw CliErrors[_0x27b160(0x12e)](_0x27b160(0x12a),_0x27b160(0x13d));},async 'dryRun'(_0xdcd524){const {mutation:_0x58a239}=await buildPlan(_0xdcd524,!![]);return asDryRunResult(_0x58a239,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x154a36){const _0x1ae5a2=a139_0x299087,{role:_0x2fb164,permits:_0x3dc516,mutation:_0x56f454}=await buildPlan(_0x154a36,![]);return await updateAppRole({'id':_0x2fb164['id'],'appCode':_0x154a36[_0x1ae5a2(0x13b)],'roleType':_0x1ae5a2(0x133),'permits':_0x3dc516}),{'ok':!![],'data':_0x56f454,'message':'Updated\x20'+_0x56f454[_0x1ae5a2(0x128)][_0x1ae5a2(0x149)][_0x1ae5a2(0x12f)]+_0x1ae5a2(0x141)+_0x2fb164['roleName']};}};function a139_0x34b6(){const _0x792e01=['Pass\x20--menus\x20<resourceCode,...>.','5230uiVkAo','2733726RuWuNG','50831hJthli','\x20menu\x20permit(s)\x20for\x20role\x20','125886GMVwFG','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','menu-revoke','42bwxYRW','roleName','/smartapi/permit/role/update','Unknown\x20menu\x20resourceCode(s):\x20','resourceCodes','212385WEmupv','selector','permit','menus','915ITbDQM','menu-grant','get','flagMissing','length','3LQjESo','filter','str','PAGE','set','has','7294440yrDkbO','access','action','246879viumed','21112jQtPsv','appCode','push'];a139_0x34b6=function(){return _0x792e01;};return a139_0x34b6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a140_0x1fcd86=a140_0x59b4;(function(_0x376d2a,_0x27a3b1){const _0x2fc0f2=a140_0x59b4,_0x4bbbe8=_0x376d2a();while(!![]){try{const _0xc5124e=parseInt(_0x2fc0f2(0x124))/0x1+-parseInt(_0x2fc0f2(0x128))/0x2*(parseInt(_0x2fc0f2(0x11e))/0x3)+parseInt(_0x2fc0f2(0x122))/0x4*(-parseInt(_0x2fc0f2(0x12b))/0x5)+parseInt(_0x2fc0f2(0x121))/0x6+-parseInt(_0x2fc0f2(0x129))/0x7+-parseInt(_0x2fc0f2(0x11d))/0x8*(parseInt(_0x2fc0f2(0x125))/0x9)+parseInt(_0x2fc0f2(0x11b))/0xa;if(_0xc5124e===_0x27a3b1)break;else _0x4bbbe8['push'](_0x4bbbe8['shift']());}catch(_0x350356){_0x4bbbe8['push'](_0x4bbbe8['shift']());}}}(a140_0x5044,0x6ac71));function a140_0x59b4(_0x3ecbb1,_0x182436){_0x3ecbb1=_0x3ecbb1-0x117;const _0x5044f7=a140_0x5044();let _0x59b4bc=_0x5044f7[_0x3ecbb1];return _0x59b4bc;}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_0x5044(){const _0x418bcb=['roleName','32nKPABN','3mWiRGj','\x20has\x20','role-menus','1493718UjkJcm','1852xTQKAL','length','570523teZDGB','672552RNkfUI','permit','read','1185362ZdAztY','5552428bwTbng','appCode','635KycnIA','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','filter','values','action','13614830zZzUGC'];a140_0x5044=function(){return _0x418bcb;};return a140_0x5044();}import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a140_0x1fcd86(0x126),'command':a140_0x1fcd86(0x120),'description':a140_0x1fcd86(0x117),'risk':a140_0x1fcd86(0x127),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x29b1ca){const _0x56d1d5=a140_0x1fcd86,_0x304d41=await resolveRoleRef(_0x29b1ca[_0x56d1d5(0x12a)],readRoleRef(_0x29b1ca)),_0x3e01d1=await getRoleMenuResources(_0x29b1ca['appCode'],_0x304d41['id']),_0x182f33=flattenMenuResources(_0x3e01d1),_0x5d38ab=Array['from'](_0x182f33[_0x56d1d5(0x119)]())['map'](_0x1ddb50=>({'resourceCode':_0x1ddb50['resourceCode'],'resourceName':_0x1ddb50['resourceName'],'allowed':_0x1ddb50[_0x56d1d5(0x11a)]==='access','action':_0x1ddb50[_0x56d1d5(0x11a)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x29b1ca[_0x56d1d5(0x12a)],'roleId':_0x304d41['id'],'roleName':_0x304d41[_0x56d1d5(0x11c)]},'menus':_0x5d38ab},'message':'Role\x20'+_0x304d41[_0x56d1d5(0x11c)]+_0x56d1d5(0x11f)+_0x5d38ab[_0x56d1d5(0x118)](_0x209439=>_0x209439['allowed'])[_0x56d1d5(0x123)]+'/'+_0x5d38ab['length']+'\x20menu(s)\x20allowed'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a141_0x3e60da=a141_0x1b47;function a141_0x1e64(){const _0x4942a3=['create-roles','5DCvWDA','set','allowSelf','action','row-roles','\x22\x20not\x20found.','Run\x20`role\x20list`.','763120rIsMRY','flag','trim','revoke','length','map','roleType','datasets','find','data\x20delete','access','data\x20update','21ikVdYL','ALL','Revoke\x20access\x20to\x20the\x20listed\x20resources','dataExport','1354014PWWqnM','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','entries','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','15189CppNPo','pageNodeList','Missing\x20action.','1724280hTbsaS','Grant\x20access\x20to\x20the\x20listed\x20resources','3202HaLXrE','export-roles','menu-id','dataCreate',';\x20SELF\x20=\x20only\x20own\x20rows','Special\x20role\x20','Pass\x20--role\x20<id|name>.','bool','2543373xvJiVF','resourceName','data\x20create','validation','11RyStyF','dataUpdate','toUpperCase','apiList','push','test','get','\x22\x20is\x20ambiguous\x20(ids:\x20','1522970Jympjk','key','role','boolean','dataDetail','label','menu-roles','string','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','menuPermit','appCode','SELF\x20is\x20not\x20allowed\x20for\x20','Role\x20id\x20or\x20role\x20name','resourceCode','\x20(comma-separated\x20SELF/ALL/id/name)','116fxZhHk','\x20not\x20found.','filter','roleName','159ZzbVTT','row\x20visibility','split','datasetCode','rolePermit','dataPermit','Role\x20\x22','data\x20detail','SELF'];a141_0x1e64=function(){return _0x4942a3;};return a141_0x1e64();}function a141_0x1b47(_0x2d6bbb,_0x162361){_0x2d6bbb=_0x2d6bbb-0x6e;const _0x1e6439=a141_0x1e64();let _0x1b47ee=_0x1e6439[_0x2d6bbb];return _0x1b47ee;}(function(_0x261cb8,_0x18c925){const _0x3f27d4=a141_0x1b47,_0x2efc2e=_0x261cb8();while(!![]){try{const _0x54eb21=-parseInt(_0x3f27d4(0x73))/0x1*(-parseInt(_0x3f27d4(0x9d))/0x2)+parseInt(_0x3f27d4(0x98))/0x3*(-parseInt(_0x3f27d4(0x6f))/0x4)+-parseInt(_0x3f27d4(0x7d))/0x5*(parseInt(_0x3f27d4(0x94))/0x6)+-parseInt(_0x3f27d4(0x90))/0x7*(-parseInt(_0x3f27d4(0x84))/0x8)+parseInt(_0x3f27d4(0xa5))/0x9+-parseInt(_0x3f27d4(0xb1))/0xa+-parseInt(_0x3f27d4(0xa9))/0xb*(parseInt(_0x3f27d4(0x9b))/0xc);if(_0x54eb21===_0x18c925)break;else _0x2efc2e['push'](_0x2efc2e['shift']());}catch(_0x491919){_0x2efc2e['push'](_0x2efc2e['shift']());}}}(a141_0x1e64,0x25cdb));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a141_0x3e60da(0x9f),'type':'number','required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};export const ROLE_REF_FLAG={'name':a141_0x3e60da(0xb3),'type':a141_0x3e60da(0xb8),'required':!![],'description':a141_0x3e60da(0xbd)};export const GRANT_FLAG={'name':'grant','type':a141_0x3e60da(0xb4),'required':![],'description':a141_0x3e60da(0x9c)};export const REVOKE_FLAG={'name':a141_0x3e60da(0x87),'type':a141_0x3e60da(0xb4),'required':![],'description':a141_0x3e60da(0x92)};export const MENUS_FLAG={'name':'menus','type':a141_0x3e60da(0xb8),'required':!![],'description':a141_0x3e60da(0x95)};export const DATASETS_FLAG={'name':a141_0x3e60da(0x8b),'type':a141_0x3e60da(0xb8),'required':!![],'description':'Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for'};export const PAGE_SLOT_SPECS=[{'flag':a141_0x3e60da(0xb7),'key':'menuPermit','allowSelf':![],'label':'menu\x20visibility'},{'flag':a141_0x3e60da(0x7c),'key':a141_0x3e60da(0xa0),'allowSelf':![],'label':a141_0x3e60da(0xa7)},{'flag':'update-roles','key':a141_0x3e60da(0xaa),'allowSelf':![],'label':a141_0x3e60da(0x8f)},{'flag':'delete-roles','key':'dataDelete','allowSelf':![],'label':a141_0x3e60da(0x8d)},{'flag':'detail-roles','key':a141_0x3e60da(0xb5),'allowSelf':![],'label':a141_0x3e60da(0x7a)},{'flag':a141_0x3e60da(0x9e),'key':a141_0x3e60da(0x93),'allowSelf':![],'label':'data\x20export'},{'flag':a141_0x3e60da(0x81),'key':a141_0x3e60da(0x78),'allowSelf':!![],'label':a141_0x3e60da(0x74)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a141_0x3e60da(0x89)](_0x46984f=>({'name':_0x46984f[a141_0x3e60da(0x85)],'type':a141_0x3e60da(0xb8),'required':![],'description':'Roles\x20for\x20'+_0x46984f['label']+a141_0x3e60da(0x6e)+(_0x46984f[a141_0x3e60da(0x7f)]?a141_0x3e60da(0xa1):'')}));export function splitList(_0x4a819e){const _0xeddf69=a141_0x3e60da;return _0x4a819e[_0xeddf69(0x75)](',')[_0xeddf69(0x89)](_0x20e752=>_0x20e752[_0xeddf69(0x86)]())[_0xeddf69(0x71)](Boolean);}export function projectRoleRef(_0x283e78){const _0x2a793c=a141_0x3e60da;return{'id':_0x283e78['id'],'roleName':_0x283e78[_0x2a793c(0x72)],'roleType':_0x283e78[_0x2a793c(0x8a)]};}export async function resolvePermitRoles(_0x5ed9d9,_0x347927,_0x28fce5){const _0x463d01=a141_0x3e60da,_0x39473d=await listPermitRoles(_0x5ed9d9,{'needSelf':!![],'needPublic':!![]}),_0x5ddcde=[];for(const _0xcc2e2 of _0x347927){const _0xedf315=resolveOnePermitRole(_0x39473d,_0xcc2e2);if(!_0x28fce5[_0x463d01(0x7f)]&&_0xedf315[_0x463d01(0x8a)]===_0x463d01(0x7b))throw CliErrors[_0x463d01(0xa8)](_0x463d01(0xbc)+_0x28fce5[_0x463d01(0xb6)]+'.',_0x463d01(0x97));if(!_0x5ddcde['some'](_0x13b91e=>_0x13b91e['id']===_0xedf315['id']))_0x5ddcde[_0x463d01(0xad)](_0xedf315);}return _0x5ddcde;}function resolveOnePermitRole(_0x191dcd,_0x51c21d){const _0x1d089c=a141_0x3e60da,_0x2819f4=_0x51c21d[_0x1d089c(0x86)](),_0x247615=_0x2819f4[_0x1d089c(0xab)]();if(_0x247615===_0x1d089c(0x7b)||_0x247615===_0x1d089c(0x91)){const _0x112cd8=_0x191dcd['find'](_0x3dc442=>_0x3dc442[_0x1d089c(0x8a)]===_0x247615);if(!_0x112cd8)throw CliErrors[_0x1d089c(0xa8)](_0x1d089c(0xa2)+_0x247615+'\x20is\x20not\x20available\x20for\x20this\x20app.');return _0x112cd8;}if(/^-?\d+$/[_0x1d089c(0xae)](_0x2819f4)){const _0x46b8de=Number(_0x2819f4),_0x2e2b6f=_0x191dcd[_0x1d089c(0x8c)](_0x543f29=>_0x543f29['id']===_0x46b8de);if(!_0x2e2b6f)throw CliErrors[_0x1d089c(0xa8)]('Role\x20id\x20'+_0x46b8de+_0x1d089c(0x70),_0x1d089c(0x83));return _0x2e2b6f;}const _0x29e838=_0x191dcd[_0x1d089c(0x71)](_0x2073fb=>_0x2073fb[_0x1d089c(0x72)]===_0x2819f4);if(_0x29e838[_0x1d089c(0x88)]===0x0)throw CliErrors[_0x1d089c(0xa8)](_0x1d089c(0x79)+_0x2819f4+_0x1d089c(0x82),'Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.');if(_0x29e838[_0x1d089c(0x88)]>0x1)throw CliErrors[_0x1d089c(0xa8)]('Role\x20\x22'+_0x2819f4+_0x1d089c(0xb0)+_0x29e838[_0x1d089c(0x89)](_0x50adf4=>_0x50adf4['id'])['join'](',\x20')+').','Disambiguate\x20with\x20an\x20id.');return _0x29e838[0x0];}export function projectPageSlot(_0xe5fdde){const _0x574457=a141_0x3e60da;if(!_0xe5fdde)return null;return{'resourceCode':_0xe5fdde[_0x574457(0xbe)],'roles':(_0xe5fdde[_0x574457(0x77)]??[])['map'](projectRoleRef)};}export function projectPagePermit(_0x1153f1){const _0x5afc71=a141_0x3e60da,_0x42fa50={'menuId':_0x1153f1['menuId'],'appCode':_0x1153f1[_0x5afc71(0xbb)],'menuPermit':projectPageSlot(_0x1153f1[_0x5afc71(0xba)])};for(const _0x56bfa6 of PAGE_SLOT_SPECS){if(_0x56bfa6[_0x5afc71(0xb2)]===_0x5afc71(0xba))continue;_0x42fa50[_0x56bfa6['key']]=projectPageSlot(_0x1153f1[_0x56bfa6[_0x5afc71(0xb2)]]);}return _0x42fa50;}export function flattenMenuResources(_0x2f21ab){const _0x480c29=new Map(),_0x371d10=_0xd874c9=>{const _0x55bf48=a141_0x1b47;for(const _0x1d252b of _0xd874c9??[]){_0x480c29[_0x55bf48(0x7e)](_0x1d252b[_0x55bf48(0xbe)],{'resourceCode':_0x1d252b['resourceCode'],'resourceName':_0x1d252b[_0x55bf48(0xa6)],'action':_0x1d252b['allowedActions']?.[0x0]??'0'});if(_0x1d252b[_0x55bf48(0x99)])_0x371d10(_0x1d252b[_0x55bf48(0x99)]);}};return _0x371d10(_0x2f21ab),_0x480c29;}export function flattenApiResources(_0x2c7846){const _0x205520=a141_0x3e60da,_0x56c33c=new Map(),_0x2d8e2b=new Map();for(const _0x1e9653 of _0x2c7846){const _0x4ecc18=_0x1e9653[_0x205520(0xac)]??{};for(const [_0x5dffd2,_0x32d8a9]of Object[_0x205520(0x96)](_0x4ecc18)){_0x56c33c['set'](_0x5dffd2,{'resourceCode':_0x5dffd2,'resourceName':_0x1e9653[_0x205520(0xa6)],'datasetCode':_0x1e9653[_0x205520(0x76)],'action':_0x32d8a9?.[0x0]??'0'});const _0x1da829=_0x2d8e2b['get'](_0x1e9653['datasetCode'])??[];_0x1da829['push'](_0x5dffd2),_0x2d8e2b['set'](_0x1e9653[_0x205520(0x76)],_0x1da829);}}return{'byCode':_0x56c33c,'byDataset':_0x2d8e2b};}export function buildPermits(_0x4ce066,_0x2b0be4){const _0x8c0eaf=a141_0x3e60da,_0x270306={};for(const [_0x37d321,_0x4a7da8]of _0x4ce066){const _0x3b59f3=_0x2b0be4[_0x8c0eaf(0xaf)](_0x37d321)??_0x4a7da8[_0x8c0eaf(0x80)];_0x270306[_0x37d321]=[_0x3b59f3];}return _0x270306;}export function readRoleRef(_0x1f59e8){const _0x27e937=a141_0x3e60da,_0x454ee2=_0x1f59e8['str'](_0x27e937(0xb3))['trim']();if(!_0x454ee2)throw CliErrors['flagMissing'](_0x27e937(0xb3),_0x27e937(0xa3));return _0x454ee2;}export function readGrantRevoke(_0x2f8242){const _0x371c75=a141_0x3e60da,_0x2b8dbe=_0x2f8242[_0x371c75(0xa4)]('grant'),_0xe2a10c=_0x2f8242[_0x371c75(0xa4)](_0x371c75(0x87));if(_0x2b8dbe&&_0xe2a10c)throw CliErrors[_0x371c75(0xa8)](_0x371c75(0xb9));if(!_0x2b8dbe&&!_0xe2a10c)throw CliErrors[_0x371c75(0xa8)](_0x371c75(0x9a),'Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.');return _0x2b8dbe?_0x371c75(0x8e):'0';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x161573,_0x487163){const _0x1359ef=a142_0x38c4,_0x5dfd6e=_0x161573();while(!![]){try{const _0x5c50e8=-parseInt(_0x1359ef(0x1a7))/0x1*(-parseInt(_0x1359ef(0x195))/0x2)+parseInt(_0x1359ef(0x198))/0x3*(-parseInt(_0x1359ef(0x19f))/0x4)+-parseInt(_0x1359ef(0x196))/0x5*(parseInt(_0x1359ef(0x19a))/0x6)+-parseInt(_0x1359ef(0x1a0))/0x7+-parseInt(_0x1359ef(0x191))/0x8+-parseInt(_0x1359ef(0x19c))/0x9+parseInt(_0x1359ef(0x1a8))/0xa;if(_0x5c50e8===_0x487163)break;else _0x5dfd6e['push'](_0x5dfd6e['shift']());}catch(_0x58357e){_0x5dfd6e['push'](_0x5dfd6e['shift']());}}}(a142_0x3723,0x75334));import{existsSync}from'node:fs';function a142_0x3723(){const _0x52e580=['Not\x20set','green','Login\x20failed','1YINpjV','27308490JjJjFe','env','log','3473360LZcfyF','Project\x20name:','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','trim','141074IIjljS','5oQQukf','cyan','235461cIkQBr','Project\x20name\x20cannot\x20exceed\x2050\x20characters','3987402MSMkGX','√\x20Login\x20status:\x20','6469893RHkSwt','√\x20App\x20Code:\x20','Logged\x20in','4iZBiCZ','2976631HoyabB','resolve','Skipped','production'];a142_0x3723=function(){return _0x52e580;};return a142_0x3723();}import a142_0x1bc104 from'node:path';import a142_0x3ca3f9 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';function a142_0x38c4(_0x11f719,_0x4fa187){_0x11f719=_0x11f719-0x191;const _0x37233a=a142_0x3723();let _0x38c422=_0x37233a[_0x11f719];return _0x38c422;}import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x44b474,_0x5e8d52,_0x10323d){const _0x540127=a142_0x38c4,_0x58b4f3='my-app',_0x3b1400=readConfig(),_0x2ffa5b=typeof _0x3b1400['env']==='string'?_0x3b1400[_0x540127(0x1a9)]:undefined,_0x588593=await input({'message':_0x540127(0x192),'default':_0x58b4f3,'validate':_0x451e1f=>{const _0x4d5b62=_0x540127,_0x331da6=_0x451e1f[_0x4d5b62(0x194)]()||_0x58b4f3;if(_0x331da6['length']>0x32)return _0x4d5b62(0x199);const _0x514610=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x331da6&&!_0x514610['test'](_0x331da6))return _0x4d5b62(0x193);const _0x1b1b93=a142_0x1bc104[_0x4d5b62(0x1a1)](process['cwd'](),_0x331da6);if(existsSync(_0x1b1b93))return'Directory\x20\x22'+_0x331da6+'\x22\x20already\x20exists';return!![];}});console[_0x540127(0x1aa)](a142_0x3ca3f9['green']('√\x20Project\x20Name:\x20'+a142_0x3ca3f9[_0x540127(0x197)](_0x588593)));const _0x8d5359=await selectSingleAppcode(_0x10323d);console[_0x540127(0x1aa)](a142_0x3ca3f9['green'](_0x540127(0x19d)+a142_0x3ca3f9[_0x540127(0x197)](_0x8d5359||_0x540127(0x1a4))));if(_0x8d5359){const _0x5f1d22=await getIsSessionValid();if(!_0x5f1d22){const _0x3c45ac=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x3c45ac){const _0x2cda1a=await authServer({'silent':!![]});console[_0x540127(0x1aa)](a142_0x3ca3f9[_0x540127(0x1a5)](_0x540127(0x19b)+a142_0x3ca3f9[_0x540127(0x197)](_0x2cda1a?_0x540127(0x19e):_0x540127(0x1a6))));}else console[_0x540127(0x1aa)](a142_0x3ca3f9[_0x540127(0x1a5)](_0x540127(0x19b)+a142_0x3ca3f9[_0x540127(0x197)](_0x540127(0x1a2))));}await _0x44b474({'projectName':_0x588593,'appCode':_0x8d5359,'env':_0x5e8d52||_0x2ffa5b||_0x540127(0x1a3)});}else await _0x44b474({'projectName':_0x588593,'env':_0x5e8d52||_0x2ffa5b||'production'});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4494d3,_0x21369e){const _0x227498=a143_0x31cd,_0x55144d=_0x4494d3();while(!![]){try{const _0x58e239=-parseInt(_0x227498(0xe7))/0x1*(-parseInt(_0x227498(0xe5))/0x2)+parseInt(_0x227498(0xe2))/0x3*(parseInt(_0x227498(0xe6))/0x4)+-parseInt(_0x227498(0xec))/0x5+-parseInt(_0x227498(0xee))/0x6*(parseInt(_0x227498(0xed))/0x7)+parseInt(_0x227498(0xe3))/0x8*(parseInt(_0x227498(0xeb))/0x9)+-parseInt(_0x227498(0xe9))/0xa*(-parseInt(_0x227498(0xea))/0xb)+parseInt(_0x227498(0xe8))/0xc*(-parseInt(_0x227498(0xe4))/0xd);if(_0x58e239===_0x21369e)break;else _0x55144d['push'](_0x55144d['shift']());}catch(_0x1991d0){_0x55144d['push'](_0x55144d['shift']());}}}(a143_0x4d31,0x4f33d));function a143_0x31cd(_0x136b40,_0x43af45){_0x136b40=_0x136b40-0xe2;const _0x4d3192=a143_0x4d31();let _0x31cd56=_0x4d3192[_0x136b40];return _0x31cd56;}export function formatElapsed(_0x27bcfd){const _0x167cf4=Date['now']()-_0x27bcfd;if(_0x167cf4<0x3e8)return _0x167cf4+'ms';const _0x3861af=(_0x167cf4/0x3e8)['toFixed'](0x2),_0x64431e=_0x3861af['replace'](/\.?0+$/u,'');return _0x64431e+'s';}function a143_0x4d31(){const _0x46f163=['1527132VZEdTi','10ZxzIxO','4360763GgASbo','115281bDPuAg','684425uvsvHh','1492778zfHohg','6VtVVoT','27Nwgfca','16siNAIp','26qONFWO','899152FZKeAD','25532kiNMPW','1YdzIvm'];a143_0x4d31=function(){return _0x46f163;};return a143_0x4d31();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x574933,_0x5b8b5a){const _0x4fd49b=a144_0x5342,_0xd1d1c3=_0x574933();while(!![]){try{const _0x46fa90=-parseInt(_0x4fd49b(0x1df))/0x1*(parseInt(_0x4fd49b(0x1ab))/0x2)+-parseInt(_0x4fd49b(0x1d0))/0x3*(-parseInt(_0x4fd49b(0x1f4))/0x4)+parseInt(_0x4fd49b(0x1a7))/0x5+-parseInt(_0x4fd49b(0x1e9))/0x6*(-parseInt(_0x4fd49b(0x1a9))/0x7)+-parseInt(_0x4fd49b(0x1eb))/0x8+parseInt(_0x4fd49b(0x1fe))/0x9*(-parseInt(_0x4fd49b(0x1dc))/0xa)+parseInt(_0x4fd49b(0x1f3))/0xb;if(_0x46fa90===_0x5b8b5a)break;else _0xd1d1c3['push'](_0xd1d1c3['shift']());}catch(_0x54db6c){_0xd1d1c3['push'](_0xd1d1c3['shift']());}}}(a144_0x10d6,0xf35b3));import a144_0x5b5b8c from'path';import a144_0x1be16f from'fs';import a144_0x5b15e5 from'chalk';import a144_0xb52b27 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';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_0x10d6(){const _0x599137=['bold','message','√\x20Configuration\x20file\x20created,\x20Apps:\x20','API\x20configuration\x20pulled:\x20','green','readFileSync','配置应用AppCode:\x20','3639kOaotm','*\x20Pulling\x20API\x20configuration...','log','success','writeFileSync','resolve','env','cd\x20','cyan','\x20run\x20start','join','stop','40NEwcRe','\x20api\x20pull','\x20\x201.\x20Start\x20project:\x20','701ztyDZv','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','needsUpgrade','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','cookie','constants','modelCount','warn','stringify','清理项目目录失败:\x20','21636lwvWkt','create','12973144KWqKRd','√\x20Pulled\x20','rmSync','toLocaleString','production','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','\x20config\x20set\x20appcode\x20<app-code>\x27','开始创建项目:\x20','7936973JUPQfZ','5384iDINwB','配置应用AppCode失败','info','\x20already\x20exists','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','package.json','version','\x20Generated\x20by\x20rabetbase\x20cli\x20','更新\x20package.json\x20失败','Project\x20name\x20cannot\x20be\x20empty','558153ugpvcG','√\x20package.json\x20updated:\x20name=','projectName','1.0.0','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','appCode','string','1536600KyGIAG','utf8','1183LZooLh','\x20dataset(s),\x20generated\x20','1154eoGtEQ','repeat','trim','fail','\x20|\x20AppCode:\x20','dirname','parse','项目创建完成:\x20','\x20|\x20Default:\x20','\x20model(s)','accessSync','currentVersion','existsSync','error','belowMinimum','更新\x20package.json\x20name','项目创建失败:\x20','cwd','apps','length','description','\x20√\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','projectCode','Copy\x20project\x20files','chdir','stableVersion','Format\x20code','W_OK','...'];a144_0x10d6=function(){return _0x599137;};return a144_0x10d6();}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(_0x5b5b17){const _0x5c2c08=a144_0x5342,_0x453ecc=await checkCliVersion();(_0x453ecc[_0x5c2c08(0x1e1)]||_0x453ecc[_0x5c2c08(0x1b9)])&&(printCliUpgradeWarning(_0x453ecc),assertCliVersionSupported(_0x453ecc),logger[_0x5c2c08(0x1f6)](_0x5c2c08(0x1ea),'CLI\x20版本检查',{'currentVersion':_0x453ecc[_0x5c2c08(0x1b6)],'stableVersion':_0x453ecc[_0x5c2c08(0x1c5)],'minimumVersion':_0x453ecc['minimumVersion'],'needsUpgrade':_0x453ecc[_0x5c2c08(0x1e1)],'belowMinimum':_0x453ecc[_0x5c2c08(0x1b9)]}));if(_0x5b5b17[_0x5c2c08(0x1c2)]&&_0x5b5b17[_0x5c2c08(0x1a5)])await runCreate({'projectName':_0x5b5b17[_0x5c2c08(0x1c2)],'appCode':_0x5b5b17[_0x5c2c08(0x1a5)],'env':_0x5b5b17[_0x5c2c08(0x1d6)]},_0x5b5b17);else{if(_0x5b5b17[_0x5c2c08(0x1c2)]){const _0xa91339=await selectSingleAppcode(_0x5b5b17[_0x5c2c08(0x1e3)]);await runCreate({'projectName':_0x5b5b17[_0x5c2c08(0x1c2)],'appCode':_0xa91339||undefined,'env':_0x5b5b17[_0x5c2c08(0x1d6)]},_0x5b5b17);}else await guidedCreateProject(_0x5946d1=>runCreate(_0x5946d1,_0x5b5b17),_0x5b5b17['env'],_0x5b5b17['cookie']);}}async function runCreate(_0x5b6684,_0x51dbb2){const _0x4fc16a=a144_0x5342;if(!_0x5b6684[_0x4fc16a(0x200)]||_0x5b6684[_0x4fc16a(0x200)][_0x4fc16a(0x1ad)]()==='')throw new Error(_0x4fc16a(0x1fd));const _0x890b8f=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x890b8f['test'](_0x5b6684[_0x4fc16a(0x200)]))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x5b6684[_0x4fc16a(0x200)][_0x4fc16a(0x1be)]>0x64)throw new Error(_0x4fc16a(0x1f0));const _0x31d034=a144_0x5b5b8c[_0x4fc16a(0x1d5)](process[_0x4fc16a(0x1bc)](),_0x5b6684['projectName']);if(a144_0x1be16f[_0x4fc16a(0x1b7)](_0x31d034))throw new Error('Project\x20directory\x20'+_0x5b6684[_0x4fc16a(0x200)]+_0x4fc16a(0x1f7));try{a144_0x1be16f[_0x4fc16a(0x1b5)](a144_0x5b5b8c[_0x4fc16a(0x1b0)](_0x31d034),a144_0x1be16f[_0x4fc16a(0x1e4)][_0x4fc16a(0x1c7)]);}catch{throw new Error(_0x4fc16a(0x1e0));}logger['setLogPath'](_0x31d034),logger[_0x4fc16a(0x1f6)]('create',_0x4fc16a(0x1f2)+_0x5b6684[_0x4fc16a(0x200)],{'projectDir':_0x31d034,'appCode':_0x5b6684[_0x4fc16a(0x1a5)]}),console[_0x4fc16a(0x1d2)](),console[_0x4fc16a(0x1d2)](a144_0x5b15e5[_0x4fc16a(0x1cd)](_0x4fc16a(0x1c0))+'Project\x20name:\x20'+a144_0x5b15e5['green'](_0x5b6684['projectName'])+(_0x5b6684['appCode']?_0x4fc16a(0x1af)+a144_0x5b15e5[_0x4fc16a(0x1d8)](_0x5b6684[_0x4fc16a(0x1a5)]):''));try{await runTask(_0x4fc16a(0x1c3),()=>copyProjectTemplate(_0x5b6684[_0x4fc16a(0x200)])),await updatePackageJsonName(_0x5b6684[_0x4fc16a(0x200)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x5b6684[_0x4fc16a(0x200)])),await runTask(_0x4fc16a(0x1c6),()=>formatProjectCode(_0x5b6684[_0x4fc16a(0x200)])),await configureAppCode(_0x5b6684[_0x4fc16a(0x200)],_0x5b6684[_0x4fc16a(0x1a5)]||'',_0x5b6684['env']);let _0x18ebc4=![];if(_0x5b6684['appCode']){console['log'](_0x4fc16a(0x1d1));const _0x1aa258=process[_0x4fc16a(0x1bc)]();try{process[_0x4fc16a(0x1c4)](_0x31d034);const _0x4a4bae=_0x5b6684[_0x4fc16a(0x1d6)]||_0x4fc16a(0x1ef);initEnv(_0x4a4bae);const {configArray:_0x577a69}=await fetchModelList(_0x5b6684[_0x4fc16a(0x1a5)],_0x51dbb2[_0x4fc16a(0x1e3)]||''),_0x43c1a3=DEFAULT_API_DIR,_0x257bc0=await generateApiFile(_0x577a69,'',_0x5b6684[_0x4fc16a(0x1a5)],!![],_0x4a4bae,_0x43c1a3);console[_0x4fc16a(0x1d2)](_0x4fc16a(0x1ec)+_0x577a69['length']+_0x4fc16a(0x1aa)+_0x257bc0[_0x4fc16a(0x1e5)]+_0x4fc16a(0x1b4)),logger[_0x4fc16a(0x1f6)]('create',_0x4fc16a(0x1cc)+_0x5b6684[_0x4fc16a(0x1a5)]);}catch(_0x37af60){_0x18ebc4=!![],console[_0x4fc16a(0x1d2)]('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x4fc16a(0x1e6)](_0x4fc16a(0x1ea),'API\x20配置拉取异常',{'error':_0x37af60 instanceof Error?_0x37af60[_0x4fc16a(0x1ca)]:String(_0x37af60)});}finally{process[_0x4fc16a(0x1c4)](_0x1aa258);}}logger[_0x4fc16a(0x1d3)](_0x4fc16a(0x1ea),_0x4fc16a(0x1b2)+_0x5b6684[_0x4fc16a(0x200)]),console[_0x4fc16a(0x1d2)](),console[_0x4fc16a(0x1d2)](a144_0x5b15e5[_0x4fc16a(0x1cd)]('─'['repeat'](0x3c))),console[_0x4fc16a(0x1d2)](a144_0x5b15e5[_0x4fc16a(0x1d8)][_0x4fc16a(0x1c9)]('🚀\x20Next\x20Steps:')),console[_0x4fc16a(0x1d2)](),console[_0x4fc16a(0x1d2)](_0x4fc16a(0x1de)+a144_0x5b15e5[_0x4fc16a(0x1d8)][_0x4fc16a(0x1c9)](_0x4fc16a(0x1d7)+_0x5b6684['projectName']+'\x20&&\x20'+CLI_BIN_NAME+_0x4fc16a(0x1d9))),_0x18ebc4&&console['log']('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a144_0x5b15e5[_0x4fc16a(0x1d8)][_0x4fc16a(0x1c9)](CLI_BIN_NAME+_0x4fc16a(0x1dd))),console['log'](a144_0x5b15e5[_0x4fc16a(0x1cd)]('─'[_0x4fc16a(0x1ac)](0x3c)));}catch(_0xc316ee){logger[_0x4fc16a(0x1b8)](_0x4fc16a(0x1ea),_0x4fc16a(0x1bb)+_0x5b6684[_0x4fc16a(0x200)],{'error':_0xc316ee instanceof Error?_0xc316ee[_0x4fc16a(0x1ca)]:String(_0xc316ee)});try{a144_0x1be16f[_0x4fc16a(0x1b7)](_0x31d034)&&(console['log'](_0x4fc16a(0x1e2)+_0x31d034),a144_0x1be16f[_0x4fc16a(0x1ed)](_0x31d034,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x4fc16a(0x1ea),_0x4fc16a(0x1e8)+_0x31d034);}throw _0xc316ee;}}async function runTask(_0x20d27c,_0x21506c){const _0x325e49=a144_0x5342,_0x3abf14=a144_0xb52b27(_0x20d27c+_0x325e49(0x1c8))['start']();try{const _0xf04088=await _0x21506c();_0x3abf14[_0x325e49(0x1db)](),console[_0x325e49(0x1d2)](''+a144_0x5b15e5[_0x325e49(0x1cd)]('\x20√\x20')+_0x20d27c+'\x20'+a144_0x5b15e5['gray']('['+_0xf04088+']'));}catch(_0x2db4c0){_0x3abf14[_0x325e49(0x1ae)](_0x20d27c);throw _0x2db4c0;}}function a144_0x5342(_0x3e2542,_0xb7d420){_0x3e2542=_0x3e2542-0x1a3;const _0x10d678=a144_0x10d6();let _0x534240=_0x10d678[_0x3e2542];return _0x534240;}async function updatePackageJsonName(_0x4ebbed){const _0x24a7db=a144_0x5342,_0x363429=a144_0x5b5b8c['resolve'](process[_0x24a7db(0x1bc)](),_0x4ebbed),_0x436277=a144_0x5b5b8c[_0x24a7db(0x1da)](_0x363429,_0x24a7db(0x1f9));try{console[_0x24a7db(0x1d2)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x2a9b45=getRabetbaseCliPackageRoot(),_0x2ad307=a144_0x5b5b8c[_0x24a7db(0x1da)](_0x2a9b45,_0x24a7db(0x1f9));let _0x1645e2='1.0.0';try{const _0x514084=JSON[_0x24a7db(0x1b1)](a144_0x1be16f[_0x24a7db(0x1ce)](_0x2ad307,_0x24a7db(0x1a8)));_0x1645e2=_0x514084['version']||_0x24a7db(0x1a3);}catch{}const _0x38c592=a144_0x1be16f[_0x24a7db(0x1ce)](_0x436277,_0x24a7db(0x1a8)),_0xdaa805=JSON[_0x24a7db(0x1b1)](_0x38c592);_0xdaa805['name']=_0x4ebbed,_0xdaa805[_0x24a7db(0x1bf)]=_0x4ebbed+_0x24a7db(0x1fb)+_0x1645e2,a144_0x1be16f[_0x24a7db(0x1d4)](_0x436277,JSON[_0x24a7db(0x1e7)](_0xdaa805,null,0x2)+'\x0a',_0x24a7db(0x1a8)),console[_0x24a7db(0x1d2)](_0x24a7db(0x1ff)+_0x4ebbed),logger[_0x24a7db(0x1f6)](_0x24a7db(0x1ea),_0x24a7db(0x1ba));}catch(_0x19b7fc){logger[_0x24a7db(0x1b8)](_0x24a7db(0x1ea),_0x24a7db(0x1fc));throw _0x19b7fc;}}async function configureAppCode(_0x331972,_0x1a736e,_0x1581c9){const _0x374890=a144_0x5342,_0x59dd0b=a144_0x5b5b8c[_0x374890(0x1d5)](process[_0x374890(0x1bc)](),_0x331972),_0x5b83ea=a144_0x5b5b8c['join'](_0x59dd0b,NEW_CONFIG_NAME);try{_0x1a736e?console[_0x374890(0x1d2)](_0x374890(0x1c1)+_0x331972+':\x20'+_0x1a736e):console[_0x374890(0x1d2)](_0x374890(0x1a4)+_0x331972);const _0x88d990=getRabetbaseCliPackageRoot(),_0x2f35dd=a144_0x5b5b8c[_0x374890(0x1da)](_0x88d990,_0x374890(0x1f9));let _0xf2725c=_0x374890(0x1a3);try{const _0x372175=JSON[_0x374890(0x1b1)](a144_0x1be16f[_0x374890(0x1ce)](_0x2f35dd,_0x374890(0x1a8)));_0xf2725c=_0x372175[_0x374890(0x1fa)]||'1.0.0';}catch{}const _0x163940=readConfig(),_0x15a9e1=typeof _0x163940[_0x374890(0x1d6)]===_0x374890(0x1a6)?_0x163940[_0x374890(0x1d6)]:undefined,_0x1ba429={};for(const _0x22ffc9 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x163940[_0x22ffc9]!=null)_0x1ba429[_0x22ffc9]=_0x163940[_0x22ffc9];}const _0x37fc9b=buildCanonicalProjectConfig(_0x1ba429,{'appCodes':_0x1a736e?[_0x1a736e]:[],'env':_0x1581c9||_0x15a9e1||_0x374890(0x1ef),'metadata':{'createdAt':new Date()[_0x374890(0x1ee)](),'version':_0xf2725c}});writeConfigFile(_0x5b83ea,_0x37fc9b),_0x1a736e?console[_0x374890(0x1d2)](_0x374890(0x1cb)+Object['keys'](_0x37fc9b[_0x374890(0x1bd)]||{})[_0x374890(0x1da)](',\x20')+_0x374890(0x1b3)+_0x37fc9b['defaultApp']):console['log'](_0x374890(0x1f8)+CLI_BIN_NAME+_0x374890(0x1f1)),logger[_0x374890(0x1f6)](_0x374890(0x1ea),_0x374890(0x1cf)+_0x1a736e);}catch(_0x5de106){logger[_0x374890(0x1b8)](_0x374890(0x1ea),_0x374890(0x1f5));}}
|
|
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 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3859c2,_0x53912d){const _0x390b13=a145_0xe407,_0x56ef4f=_0x3859c2();while(!![]){try{const _0x3f6c83=parseInt(_0x390b13(0xfd))/0x1*(parseInt(_0x390b13(0x12a))/0x2)+parseInt(_0x390b13(0x11b))/0x3*(parseInt(_0x390b13(0x130))/0x4)+-parseInt(_0x390b13(0x113))/0x5+parseInt(_0x390b13(0x107))/0x6*(parseInt(_0x390b13(0x11a))/0x7)+-parseInt(_0x390b13(0x105))/0x8+parseInt(_0x390b13(0x12e))/0x9+-parseInt(_0x390b13(0x129))/0xa*(parseInt(_0x390b13(0x12c))/0xb);if(_0x3f6c83===_0x53912d)break;else _0x56ef4f['push'](_0x56ef4f['shift']());}catch(_0x3e23c6){_0x56ef4f['push'](_0x56ef4f['shift']());}}}(a145_0x5da1,0x88441));import a145_0x28b2b0 from'path';import a145_0x38600c 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';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';function a145_0xe407(_0xe67cbf,_0x54b138){_0xe67cbf=_0xe67cbf-0xf7;const _0x5da10e=a145_0x5da1();let _0xe40738=_0x5da10e[_0xe67cbf];return _0xe40738;}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(_0x31800e,_0x2b14aa,_0x442539,_0x26bbd4){const _0x1ec66b=a145_0xe407,_0x5c3550=await checkCliVersion();(_0x5c3550[_0x1ec66b(0x131)]||_0x5c3550[_0x1ec66b(0x11f)])&&(printCliUpgradeWarning(_0x5c3550),assertCliVersionSupported(_0x5c3550));if(!_0x31800e||_0x31800e['trim']()==='')throw CliErrors[_0x1ec66b(0xff)](_0x1ec66b(0x125));const _0x2bb5b4=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2bb5b4[_0x1ec66b(0xfe)](_0x31800e))throw CliErrors[_0x1ec66b(0xff)](_0x1ec66b(0x122),_0x1ec66b(0x109));if(_0x31800e[_0x1ec66b(0x108)]>0x64)throw CliErrors[_0x1ec66b(0xff)](_0x1ec66b(0x120));const _0x516c1f=a145_0x28b2b0['resolve'](process['cwd'](),_0x31800e);if(existsSync(_0x516c1f))throw CliErrors[_0x1ec66b(0xff)]('Project\x20directory\x20\x22'+_0x31800e+'\x22\x20already\x20exists.',_0x1ec66b(0x104));try{const _0x486391=a145_0x28b2b0[_0x1ec66b(0x10b)](_0x516c1f);await a145_0x38600c[_0x1ec66b(0x124)](_0x486391,a145_0x38600c[_0x1ec66b(0x12b)][_0x1ec66b(0x10f)]);}catch{throw CliErrors[_0x1ec66b(0xff)](_0x1ec66b(0x121),_0x1ec66b(0x126));}try{console['log'](_0x1ec66b(0xfc)+_0x31800e+_0x1ec66b(0x10c));const _0x5aa628=getSubAppReactDemoTemplateDir();await copyDirectory(_0x5aa628,_0x516c1f),console['log'](_0x1ec66b(0x128)),await updatePackageJsonName(_0x31800e),console[_0x1ec66b(0x12f)](_0x1ec66b(0x119)),console[_0x1ec66b(0x12f)]('\x20\x20Installing\x20dependencies...'),console[_0x1ec66b(0x12f)](_0x1ec66b(0x10e)),await formatCode(_0x516c1f),console[_0x1ec66b(0x12f)](_0x1ec66b(0x101)),await configureProject(_0x31800e,_0x442539,_0x2b14aa),console[_0x1ec66b(0x12f)](_0x1ec66b(0x115)),_0x442539&&await pullApiConfig(_0x516c1f,_0x442539,_0x2b14aa,_0x26bbd4),console[_0x1ec66b(0x12f)](_0x1ec66b(0xfa)+_0x31800e+_0x1ec66b(0x111)),console[_0x1ec66b(0x12f)](_0x1ec66b(0x11d)+_0x31800e),console['log'](_0x1ec66b(0x117));}catch(_0x47c973){try{existsSync(_0x516c1f)&&await a145_0x38600c['rm'](_0x516c1f,{'recursive':!![],'force':!![]});}catch{}throw _0x47c973;}}async function updatePackageJsonName(_0x482c69){const _0x3776fd=a145_0xe407,_0x1c26d9=a145_0x28b2b0['resolve'](process['cwd'](),_0x482c69),_0x5ed16c=a145_0x28b2b0[_0x3776fd(0x11c)](_0x1c26d9,_0x3776fd(0x123)),_0x3bb155=await a145_0x38600c[_0x3776fd(0x102)](_0x5ed16c,'utf-8'),_0x1f6228=JSON[_0x3776fd(0xf7)](_0x3bb155);_0x1f6228[_0x3776fd(0x103)]=_0x482c69,_0x1f6228[_0x3776fd(0xf8)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a145_0x38600c['writeFile'](_0x5ed16c,JSON[_0x3776fd(0x100)](_0x1f6228,null,0x2)+'\x0a');}function detectPackageManager(){const _0x2e1943=a145_0xe407;try{return execSync(_0x2e1943(0xf9),{'stdio':'ignore'}),_0x2e1943(0x11e);}catch{return _0x2e1943(0x118);}}async function formatCode(_0xd071d3){const _0x4b6d1e=a145_0xe407;try{await execAsync(_0x4b6d1e(0x112),{'cwd':_0xd071d3});}catch{}}function a145_0x5da1(){const _0x508e48=['env','dirname','...','\x20dataset(s),\x20generated\x20','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','W_OK','\x20\x20√\x20Pulled\x20','\x20created\x20successfully!','bun\x20run\x20format','344555nnCuSF','string','\x20\x20√\x20Configuration\x20file\x20created','cwd','\x20\x20rabetbase\x20run\x20start\x0a','npm','\x20\x20√\x20package.json\x20updated','84ViZPUG','759uxrMnC','join','\x0a\x20\x20cd\x20','bun','belowMinimum','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','Cannot\x20create\x20project\x20in\x20current\x20directory.','Project\x20name\x20contains\x20invalid\x20characters.','package.json','access','Project\x20name\x20cannot\x20be\x20empty.','Check\x20directory\x20permissions.','chdir','\x20\x20√\x20Project\x20template\x20created','484450erAanG','8ogTwer','constants','231mDxjjg','\x20model(s)','4467510MgdXHt','log','3568iLfKPv','needsUpgrade','modelCount','parse','description','bun\x20--version','\x0a√\x20Project\x20','production','*\x20Creating\x20project\x20','179131ImTGSI','test','validation','stringify','\x20\x20√\x20Code\x20formatted','readFile','name','Use\x20a\x20different\x20project\x20name.','2962184sReynb','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','288042CfzgSL','length','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters'];a145_0x5da1=function(){return _0x508e48;};return a145_0x5da1();}async function configureProject(_0x28ecbc,_0x4f7214,_0x3bf2f4){const _0x4de08b=a145_0xe407,_0x16f911=a145_0x28b2b0['resolve'](process[_0x4de08b(0x116)](),_0x28ecbc),_0x23a6b2=a145_0x28b2b0[_0x4de08b(0x11c)](_0x16f911,NEW_CONFIG_NAME),_0x4bc169=readConfig(),_0x5a00c1=typeof _0x4bc169[_0x4de08b(0x10a)]===_0x4de08b(0x114)?_0x4bc169[_0x4de08b(0x10a)]:undefined,_0x44e9ee={};for(const _0x60803 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4bc169[_0x60803]!=null)_0x44e9ee[_0x60803]=_0x4bc169[_0x60803];}const _0x1a9872=buildCanonicalProjectConfig(_0x44e9ee,{'appCodes':_0x4f7214?[_0x4f7214]:[],'env':_0x3bf2f4||_0x5a00c1||_0x4de08b(0xfb),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x23a6b2,_0x1a9872);}async function pullApiConfig(_0x567f32,_0x13c3cd,_0x50cd3a,_0x4609a1){const _0x215c25=a145_0xe407,_0x972e60=process[_0x215c25(0x116)]();try{process['chdir'](_0x567f32);const _0x306118=_0x50cd3a||_0x215c25(0xfb);initEnv(_0x306118),console[_0x215c25(0x12f)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x28d37e}=await fetchModelList(_0x13c3cd,_0x4609a1||''),_0xf9c380=await generateApiFile(_0x28d37e,'',_0x13c3cd,!![],_0x306118,DEFAULT_API_DIR);console['log'](_0x215c25(0x110)+_0x28d37e[_0x215c25(0x108)]+_0x215c25(0x10d)+_0xf9c380[_0x215c25(0x132)]+_0x215c25(0x12d));}catch(_0x1fd158){console[_0x215c25(0x12f)](_0x215c25(0x106)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x215c25(0x127)](_0x972e60);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a146_0x2da697=a146_0x6a40;(function(_0x3a9ef0,_0x3cf1fb){const _0x6cf36f=a146_0x6a40,_0xf68fff=_0x3a9ef0();while(!![]){try{const _0x504235=parseInt(_0x6cf36f(0x15a))/0x1+parseInt(_0x6cf36f(0x15f))/0x2*(-parseInt(_0x6cf36f(0x159))/0x3)+parseInt(_0x6cf36f(0x15d))/0x4*(parseInt(_0x6cf36f(0x15e))/0x5)+-parseInt(_0x6cf36f(0x15b))/0x6+-parseInt(_0x6cf36f(0x162))/0x7+-parseInt(_0x6cf36f(0x160))/0x8*(-parseInt(_0x6cf36f(0x154))/0x9)+parseInt(_0x6cf36f(0x158))/0xa*(parseInt(_0x6cf36f(0x161))/0xb);if(_0x504235===_0x3cf1fb)break;else _0xf68fff['push'](_0xf68fff['shift']());}catch(_0x57cde1){_0xf68fff['push'](_0xf68fff['shift']());}}}(a146_0x426e,0x76a86));import a146_0x21625a from'node:path';function a146_0x6a40(_0x18ddd0,_0x20c9b5){_0x18ddd0=_0x18ddd0-0x153;const _0x426e77=a146_0x426e();let _0x6a40fb=_0x426e77[_0x18ddd0];return _0x6a40fb;}import{fileURLToPath}from'node:url';const __dirname=a146_0x21625a[a146_0x2da697(0x155)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x20efd5=a146_0x2da697;return a146_0x21625a['resolve'](__dirname,_0x20efd5(0x157));}function a146_0x426e(){const _0x166db7=['42143HPdTSQ','860478XhLNvJ','projects','892YsEjrl','5545rUHhLe','4szHhME','152ThFeFV','404536DRSJYI','4992610BdLQzv','join','359343ngblva','dirname','templates','../../../../','180NfoJDG','551049ozZLky'];a146_0x426e=function(){return _0x166db7;};return a146_0x426e();}export function getSubAppReactDemoTemplateDir(){const _0x46bb0a=a146_0x2da697;return a146_0x21625a[_0x46bb0a(0x153)](getRabetbaseCliPackageRoot(),_0x46bb0a(0x156),_0x46bb0a(0x15c),'sub-app-react-demo');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a147_0x5e59(_0x4cc5b4,_0x4438d5){_0x4cc5b4=_0x4cc5b4-0x1a2;const _0x67776=a147_0x6777();let _0x5e59b8=_0x67776[_0x4cc5b4];return _0x5e59b8;}function a147_0x6777(){const _0x1d426d=['message','275548QiNMFU','copy','780534xrERZY','102697fjQXQt','2149679ftjSXW','项目模板复制失败','cwd','50dfRubj','error','info','3WFYcrw','230280izhMUi','784618cMwgYj','1715070dPtfnG','6lwlxoZ','resolve','now'];a147_0x6777=function(){return _0x1d426d;};return a147_0x6777();}(function(_0x4c97a0,_0x165a30){const _0x12ef3a=a147_0x5e59,_0x2c07b1=_0x4c97a0();while(!![]){try{const _0x53ff88=parseInt(_0x12ef3a(0x1a6))/0x1+parseInt(_0x12ef3a(0x1af))/0x2*(-parseInt(_0x12ef3a(0x1ad))/0x3)+parseInt(_0x12ef3a(0x1a3))/0x4+-parseInt(_0x12ef3a(0x1b0))/0x5*(parseInt(_0x12ef3a(0x1b1))/0x6)+parseInt(_0x12ef3a(0x1a7))/0x7+parseInt(_0x12ef3a(0x1ae))/0x8+parseInt(_0x12ef3a(0x1a5))/0x9*(parseInt(_0x12ef3a(0x1aa))/0xa);if(_0x53ff88===_0x165a30)break;else _0x2c07b1['push'](_0x2c07b1['shift']());}catch(_0x107de8){_0x2c07b1['push'](_0x2c07b1['shift']());}}}(a147_0x6777,0x323cd));import a147_0x14eff6 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x578e1c){const _0xd5e363=a147_0x5e59,_0x47e542=Date[_0xd5e363(0x1b3)](),_0x255212=a147_0x14eff6[_0xd5e363(0x1b2)](process[_0xd5e363(0x1a9)](),_0x578e1c);try{logger[_0xd5e363(0x1ac)]('copy','开始复制项目模板',{'projectCode':_0x578e1c,'templateDir':templateDir}),await copyDirectory(templateDir,_0x255212);const _0x540ad4=Date[_0xd5e363(0x1b3)]()-_0x47e542;logger['success'](_0xd5e363(0x1a4),'项目模板复制完成',_0x540ad4,{'projectCode':_0x578e1c});}catch(_0x12c17f){const _0x343ba5=Date['now']()-_0x47e542;logger[_0xd5e363(0x1ab)](_0xd5e363(0x1a4),_0xd5e363(0x1a8),{'projectCode':_0x578e1c,'error':_0x12c17f instanceof Error?_0x12c17f[_0xd5e363(0x1a2)]:String(_0x12c17f),'duration':_0x343ba5});throw _0x12c17f;}return formatElapsed(_0x47e542);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a148_0x23df(_0x4aa2b9,_0x162aae){_0x4aa2b9=_0x4aa2b9-0xb0;const _0x37b67a=a148_0x37b6();let _0x23df62=_0x37b67a[_0x4aa2b9];return _0x23df62;}(function(_0x87a488,_0x4056bf){const _0x52af18=a148_0x23df,_0xa237eb=_0x87a488();while(!![]){try{const _0x3b4d94=parseInt(_0x52af18(0xb0))/0x1*(parseInt(_0x52af18(0xb9))/0x2)+-parseInt(_0x52af18(0xc6))/0x3+-parseInt(_0x52af18(0xc5))/0x4*(-parseInt(_0x52af18(0xbd))/0x5)+parseInt(_0x52af18(0xb6))/0x6+-parseInt(_0x52af18(0xc1))/0x7*(-parseInt(_0x52af18(0xb3))/0x8)+parseInt(_0x52af18(0xc7))/0x9+parseInt(_0x52af18(0xb7))/0xa*(-parseInt(_0x52af18(0xc2))/0xb);if(_0x3b4d94===_0x4056bf)break;else _0xa237eb['push'](_0xa237eb['shift']());}catch(_0x5cc02e){_0xa237eb['push'](_0xa237eb['shift']());}}}(a148_0x37b6,0xa3fa5));function a148_0x37b6(){const _0xf5a659=['522332uQllvy','3771780EKTCMY','6522210MQKMIX','526065IlHAJy','resolve','info','856ATeQgc','npx','代码格式化失败','2824224JEEUUq','10BtUJhy','format','2aNgzAt','success','开始格式化代码','message','40PSbgNB','cwd','--write','代码格式化完成','42259PgfzNa','16314859bFfkxN','now','prettier'];a148_0x37b6=function(){return _0xf5a659;};return a148_0x37b6();}import a148_0x350b63 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(_0x4009e6){const _0x1a95f4=a148_0x23df,_0x79b19e=Date[_0x1a95f4(0xc3)](),_0x5e7876=a148_0x350b63[_0x1a95f4(0xb1)](process[_0x1a95f4(0xbe)](),_0x4009e6);try{logger[_0x1a95f4(0xb2)]('format',_0x1a95f4(0xbb),{'projectCode':_0x4009e6}),await execa(resolveNpmBin(_0x1a95f4(0xb4)),[_0x1a95f4(0xc4),_0x1a95f4(0xbf),'.'],{'cwd':_0x5e7876});const _0x3527b4=Date[_0x1a95f4(0xc3)]()-_0x79b19e;logger[_0x1a95f4(0xba)](_0x1a95f4(0xb8),_0x1a95f4(0xc0),_0x3527b4,{'projectCode':_0x4009e6});}catch(_0x580fde){const _0x2b3cac=Date[_0x1a95f4(0xc3)]()-_0x79b19e;logger['error']('format',_0x1a95f4(0xb5),{'projectCode':_0x4009e6,'error':_0x580fde instanceof Error?_0x580fde[_0x1a95f4(0xbc)]:String(_0x580fde),'duration':_0x2b3cac});throw _0x580fde;}return formatElapsed(_0x79b19e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x45801a,_0x2dc86d){const _0x3854ca=a149_0x21c5,_0x1a3eac=_0x45801a();while(!![]){try{const _0x31e006=-parseInt(_0x3854ca(0xe2))/0x1+-parseInt(_0x3854ca(0xea))/0x2*(parseInt(_0x3854ca(0xe3))/0x3)+-parseInt(_0x3854ca(0xf2))/0x4*(parseInt(_0x3854ca(0xf3))/0x5)+-parseInt(_0x3854ca(0xe7))/0x6+parseInt(_0x3854ca(0xef))/0x7+parseInt(_0x3854ca(0xed))/0x8*(parseInt(_0x3854ca(0xe0))/0x9)+parseInt(_0x3854ca(0xec))/0xa;if(_0x31e006===_0x2dc86d)break;else _0x1a3eac['push'](_0x1a3eac['shift']());}catch(_0x574462){_0x1a3eac['push'](_0x1a3eac['shift']());}}}(a149_0x2001,0x7b858));import a149_0x2883e8 from'node:path';function a149_0x21c5(_0x5d6ee2,_0x42288f){_0x5d6ee2=_0x5d6ee2-0xde;const _0x2001cc=a149_0x2001();let _0x21c5ac=_0x2001cc[_0x5d6ee2];return _0x21c5ac;}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';function a149_0x2001(){const _0x466a89=['message','7029380BHIPSx','16BLKJQX','error','2350642ylflvM','now','install','20wPrmMY','537265xUQYba','npm','https://registry.npmmirror.com','4100994uGGXmc','依赖安装失败','417405CDEFNd','1410891rhghRs','依赖安装完成','cwd','resolve','114990SOjepR','--registry','info','2rxyCKq'];a149_0x2001=function(){return _0x466a89;};return a149_0x2001();}export async function installDependencies(_0xf2e784){const _0x21f742=a149_0x21c5,_0x519811=Date['now'](),_0x148435=a149_0x2883e8[_0x21f742(0xe6)](process[_0x21f742(0xe5)](),_0xf2e784);try{logger[_0x21f742(0xe9)](_0x21f742(0xf1),'开始安装依赖',{'projectCode':_0xf2e784,'registry':_0x21f742(0xdf)}),await execa(resolveNpmBin(_0x21f742(0xde)),[_0x21f742(0xf1),_0x21f742(0xe8),_0x21f742(0xdf)],{'cwd':_0x148435});const _0x2753cb=Date['now']()-_0x519811;logger['success']('install',_0x21f742(0xe4),_0x2753cb,{'projectCode':_0xf2e784});}catch(_0x2cb814){const _0x4e1323=Date[_0x21f742(0xf0)]()-_0x519811;logger[_0x21f742(0xee)](_0x21f742(0xf1),_0x21f742(0xe1),{'projectCode':_0xf2e784,'error':_0x2cb814 instanceof Error?_0x2cb814[_0x21f742(0xeb)]:String(_0x2cb814),'duration':_0x4e1323});throw _0x2cb814;}return formatElapsed(_0x519811);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a150_0x57cdad=a150_0x93cc;(function(_0x1a1c2b,_0x33f706){const _0x49604d=a150_0x93cc,_0x51acc0=_0x1a1c2b();while(!![]){try{const _0x4f42bb=parseInt(_0x49604d(0x75))/0x1*(-parseInt(_0x49604d(0x72))/0x2)+-parseInt(_0x49604d(0x8c))/0x3*(parseInt(_0x49604d(0x77))/0x4)+parseInt(_0x49604d(0x82))/0x5*(parseInt(_0x49604d(0x7c))/0x6)+-parseInt(_0x49604d(0x8f))/0x7+-parseInt(_0x49604d(0x92))/0x8*(parseInt(_0x49604d(0x90))/0x9)+-parseInt(_0x49604d(0x87))/0xa+-parseInt(_0x49604d(0x67))/0xb*(-parseInt(_0x49604d(0x8d))/0xc);if(_0x4f42bb===_0x33f706)break;else _0x51acc0['push'](_0x51acc0['shift']());}catch(_0x411751){_0x51acc0['push'](_0x51acc0['shift']());}}}(a150_0x1fc0,0xc69e6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';function a150_0x1fc0(){const _0x44f833=['../../commands/project/create/non-interactive.js','upgrade','340JBFzss','boolean','Target\x20environment','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','string','3975250kjqyQn','create','str','appcode','write','21cAStAb','108StTNVU','yes','2892183EywsJv','207pxVMfK','Create\x20a\x20new\x20project','437704cuYkAL','env','4568069uRxeyK','init','App\x20code\x20to\x20initialize','trim','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Usage:\x20','Skip\x20confirmation\x20prompt','project-name','\x20workspace\x20init','../../commands/project/create/main.js','name','130082YuHADu','project','nonInteractive','17cuZBKU','validation','512660zYEHxU','cookie','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Project\x20name','2026-07','101292dDDJhy','bool','Auto-confirm\x20prompts','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'];a150_0x1fc0=function(){return _0x44f833;};return a150_0x1fc0();}function a150_0x93cc(_0x11c6e6,_0x4cd856){_0x11c6e6=_0x11c6e6-0x67;const _0x1fc008=a150_0x1fc0();let _0x93cc37=_0x1fc008[_0x11c6e6];return _0x93cc37;}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a150_0x57cdad(0x8a),'type':'string','description':a150_0x57cdad(0x69)},{'name':a150_0x57cdad(0x93),'type':a150_0x57cdad(0x86),'description':a150_0x57cdad(0x84)},{'name':'yes','type':'boolean','description':a150_0x57cdad(0x7e),'default':![]}],createFlags=[{'name':a150_0x57cdad(0x71),'type':a150_0x57cdad(0x86),'description':a150_0x57cdad(0x7a)},{'name':'env','type':'string','description':a150_0x57cdad(0x84)},{'name':'appcode','type':a150_0x57cdad(0x86),'description':a150_0x57cdad(0x7f)}],upgradeFlags=[{'name':a150_0x57cdad(0x8e),'type':a150_0x57cdad(0x83),'description':a150_0x57cdad(0x6d),'default':![]}];export const projectDefinitions=[{'service':a150_0x57cdad(0x73),'command':a150_0x57cdad(0x68),'description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a150_0x57cdad(0x8b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a150_0x57cdad(0x6f),'since':a150_0x57cdad(0x7b)},'flags':initFlags,async 'execute'(_0x106c2a){const _0x3f3cff=a150_0x57cdad;return await initConfig({'appcode':_0x106c2a[_0x3f3cff(0x89)](_0x3f3cff(0x8a))||undefined,'env':_0x106c2a['str'](_0x3f3cff(0x93))||undefined,'autoYes':_0x106c2a[_0x3f3cff(0x7d)](_0x3f3cff(0x8e))}),{'ok':!![]};}},{'service':a150_0x57cdad(0x73),'command':a150_0x57cdad(0x88),'description':a150_0x57cdad(0x91),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a150_0x57cdad(0x6e),'description':a150_0x57cdad(0x6b),'required':![]}],'flags':createFlags,async 'execute'(_0x58b636){const _0x23c34c=a150_0x57cdad,{createApp:_0x4a8ccf}=await import(_0x23c34c(0x70)),{createProjectNonInteractive:_0x39d6fd}=await import(_0x23c34c(0x80)),_0x305411=_0x58b636[_0x23c34c(0x89)]('name')[_0x23c34c(0x6a)]()||_0x58b636['args'][0x0]?.[_0x23c34c(0x6a)](),_0x3c3f44=_0x58b636[_0x23c34c(0x89)](_0x23c34c(0x93))||undefined,_0xa6b6d8=_0x58b636[_0x23c34c(0x89)](_0x23c34c(0x8a))||undefined;if(_0x58b636[_0x23c34c(0x74)]){if(!_0x305411)throw CliErrors[_0x23c34c(0x76)](_0x23c34c(0x79),_0x23c34c(0x6c)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x39d6fd(_0x305411,_0x3c3f44,_0xa6b6d8,_0x58b636[_0x23c34c(0x78)]);}else await _0x4a8ccf({'projectCode':_0x305411,'appCode':_0xa6b6d8,'env':_0x3c3f44,'cookie':_0x58b636[_0x23c34c(0x78)]});return{'ok':!![]};}},{'service':a150_0x57cdad(0x73),'command':a150_0x57cdad(0x81),'description':a150_0x57cdad(0x85),'risk':a150_0x57cdad(0x8b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0xe30bce){const _0x5a734c=a150_0x57cdad;return await upgradeApp(_0xe30bce[_0x5a734c(0x74)],{'yes':_0xe30bce[_0x5a734c(0x7d)](_0x5a734c(0x8e))}),{'ok':!![]};}}];
|