@lovrabet/rabetbase-cli 2.3.12-beta.1 → 2.3.13-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a135_0x2865(_0x554b28,_0x3af433){_0x554b28=_0x554b28-0x18b;const _0x25a612=a135_0x25a6();let _0x2865ee=_0x25a612[_0x554b28];return _0x2865ee;}(function(_0x4545ff,_0x398530){const _0x5d9c80=a135_0x2865,_0x4bced9=_0x4545ff();while(!![]){try{const _0x1b7c83=-parseInt(_0x5d9c80(0x18d))/0x1*(parseInt(_0x5d9c80(0x194))/0x2)+parseInt(_0x5d9c80(0x18b))/0x3+parseInt(_0x5d9c80(0x191))/0x4*(parseInt(_0x5d9c80(0x18e))/0x5)+parseInt(_0x5d9c80(0x193))/0x6+parseInt(_0x5d9c80(0x195))/0x7+parseInt(_0x5d9c80(0x192))/0x8*(parseInt(_0x5d9c80(0x18f))/0x9)+-parseInt(_0x5d9c80(0x18c))/0xa*(parseInt(_0x5d9c80(0x190))/0xb);if(_0x1b7c83===_0x398530)break;else _0x4bced9['push'](_0x4bced9['shift']());}catch(_0x18d248){_0x4bced9['push'](_0x4bced9['shift']());}}}(a135_0x25a6,0x91a91));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];function a135_0x25a6(){const _0x4f8c3f=['2245PnSabP','2899431AsQbWs','113531jvUMzm','4548lcqJHn','8fAcNSi','5030256MPGeRw','2duuzGv','475055VQwAcD','2725380gfVGsG','1910MVHQjn','79437pBYJzp'];a135_0x25a6=function(){return _0x4f8c3f;};return a135_0x25a6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a136_0x16f5e4=a136_0x22fc;(function(_0xcc86af,_0x3f3def){const _0x113833=a136_0x22fc,_0x306f31=_0xcc86af();while(!![]){try{const _0x267eb8=-parseInt(_0x113833(0x177))/0x1*(parseInt(_0x113833(0x16e))/0x2)+parseInt(_0x113833(0x16b))/0x3+-parseInt(_0x113833(0x171))/0x4+-parseInt(_0x113833(0x173))/0x5+parseInt(_0x113833(0x16c))/0x6*(parseInt(_0x113833(0x178))/0x7)+parseInt(_0x113833(0x175))/0x8+parseInt(_0x113833(0x172))/0x9*(-parseInt(_0x113833(0x174))/0xa);if(_0x267eb8===_0x3f3def)break;else _0x306f31['push'](_0x306f31['shift']());}catch(_0x1de3cf){_0x306f31['push'](_0x306f31['shift']());}}}(a136_0x1b00,0xe1402));function a136_0x1b00(){const _0x2cb43f=['4600760VUDmLK','437120pLEBnR','13445096yGWLhO','num','1eTNdWQ','338324sjxokd','Page\x20permit\x20for\x20menu\x20','page-get','3629874IPjejt','222eTQzRG','permit','2692960KBxhbI','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','read','4035156RJOjVR','99pDQclc'];a136_0x1b00=function(){return _0x2cb43f;};return a136_0x1b00();}import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a136_0x22fc(_0x29c08c,_0x123518){_0x29c08c=_0x29c08c-0x16b;const _0x1b0054=a136_0x1b00();let _0x22fcbb=_0x1b0054[_0x29c08c];return _0x22fcbb;}import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a136_0x16f5e4(0x16d),'command':a136_0x16f5e4(0x17a),'description':a136_0x16f5e4(0x16f),'risk':a136_0x16f5e4(0x170),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x422270){const _0x55d121=a136_0x16f5e4,_0x52ced9=_0x422270[_0x55d121(0x176)]('menu-id'),_0x4dbe13=await getPagePermit(_0x52ced9);return{'ok':!![],'data':{'page':projectPagePermit(_0x4dbe13)},'message':_0x55d121(0x179)+_0x52ced9};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x2a0f83=a137_0x5b61;function a137_0x5b61(_0x2491ec,_0x2f9de3){_0x2491ec=_0x2491ec-0x1c1;const _0x404409=a137_0x4044();let _0x5b61ff=_0x404409[_0x2491ec];return _0x5b61ff;}(function(_0x591b8e,_0x58af3b){const _0x34ebb=a137_0x5b61,_0xb3962a=_0x591b8e();while(!![]){try{const _0x50a560=-parseInt(_0x34ebb(0x1c5))/0x1*(parseInt(_0x34ebb(0x1e1))/0x2)+-parseInt(_0x34ebb(0x1de))/0x3*(-parseInt(_0x34ebb(0x1cf))/0x4)+-parseInt(_0x34ebb(0x1d8))/0x5*(parseInt(_0x34ebb(0x1d6))/0x6)+parseInt(_0x34ebb(0x1c9))/0x7+-parseInt(_0x34ebb(0x1c1))/0x8+parseInt(_0x34ebb(0x1e2))/0x9*(parseInt(_0x34ebb(0x1dc))/0xa)+parseInt(_0x34ebb(0x1c7))/0xb;if(_0x50a560===_0x58af3b)break;else _0xb3962a['push'](_0xb3962a['shift']());}catch(_0x121997){_0xb3962a['push'](_0xb3962a['shift']());}}}(a137_0x4044,0xe1307));import{getPagePermit,savePagePermit}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a137_0x4044(){const _0x5daa23=['63glOfcy','map','5198963rrItKD','validation','111111uVwXUm','high-risk-write','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','flag','Updated\x20page\x20permit\x20for\x20menu\x20','5859516ZcqqVs','join','key','menu-id','rolePermit','This\x20page\x20has\x20no\x20\x22','Nothing\x20to\x20set.','46884fVckNf','menuId','1005QIFLjR','allowSelf','label','spec','16998290fvpzhr','appCode','3KNfRBz','selector','num','5538jjcbRU','9rDZtho','page-set','7886224LCcPJa','length','/smartapi/permit/page/save','POST'];a137_0x4044=function(){return _0x5daa23;};return a137_0x4044();}import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH=a137_0x2a0f83(0x1c3);function collectRequestedSlots(_0x4223f7){const _0x10962e=a137_0x2a0f83,_0x17133f=[];for(const _0x410c4e of PAGE_SLOT_SPECS){const _0x3c7f86=_0x4223f7['flag'](_0x410c4e[_0x10962e(0x1cd)]);if(_0x3c7f86===undefined||_0x3c7f86===null)continue;const _0x4cfb67=splitList(String(_0x3c7f86));if(_0x4cfb67['length']===0x0)throw CliErrors[_0x10962e(0x1c8)]('--'+_0x410c4e[_0x10962e(0x1cd)]+'\x20cannot\x20be\x20empty.',_0x10962e(0x1cc));_0x17133f['push']({'spec':_0x410c4e,'refs':_0x4cfb67});}return _0x17133f;}async function buildPlan(_0x2b62c3,_0x2e0f78){const _0x47437e=a137_0x2a0f83,_0x494103=_0x2b62c3[_0x47437e(0x1e0)](_0x47437e(0x1d2)),_0x372107=collectRequestedSlots(_0x2b62c3);if(_0x372107[_0x47437e(0x1c2)]===0x0)throw CliErrors[_0x47437e(0x1c8)]('Nothing\x20to\x20set.','Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS['map'](_0x350fb7=>'--'+_0x350fb7[_0x47437e(0x1cd)])['join'](',\x20')+'.');const _0x4bfc33=await getPagePermit(_0x494103),_0x366dce={},_0x4457d5={},_0x3e2c2a=[];for(const {spec:_0x592daa,refs:_0x52b57c}of _0x372107){const _0x31f6fe=_0x4bfc33[_0x592daa['key']];if(!_0x31f6fe)throw CliErrors[_0x47437e(0x1c8)](_0x47437e(0x1d4)+_0x592daa[_0x47437e(0x1da)]+'\x22\x20permission\x20slot\x20('+_0x592daa['key']+').',_0x47437e(0x1cb));_0x366dce[_0x592daa[_0x47437e(0x1d1)]]=projectPageSlot(_0x31f6fe);const _0x5c45b0=await resolvePermitRoles(_0x2b62c3[_0x47437e(0x1dd)],_0x52b57c,{'allowSelf':_0x592daa[_0x47437e(0x1d9)],'label':_0x592daa[_0x47437e(0x1da)]});_0x31f6fe[_0x47437e(0x1d3)]=_0x5c45b0,_0x4457d5[_0x592daa[_0x47437e(0x1d1)]]=projectPageSlot(_0x31f6fe);}const _0x138869={'operation':_0x47437e(0x1e3),'selector':{'appCode':_0x2b62c3[_0x47437e(0x1dd)],'menuId':_0x494103,'slots':_0x372107[_0x47437e(0x1c6)](_0xabd64c=>_0xabd64c[_0x47437e(0x1db)][_0x47437e(0x1d1)])},'before':_0x366dce,'after':_0x4457d5,'dryRun':_0x2e0f78,'backend':{'method':_0x47437e(0x1c4),'path':SAVE_PATH},'warnings':_0x3e2c2a};return{'page':_0x4bfc33,'mutation':_0x138869};}export const permitPageSet={'service':'permit','command':a137_0x2a0f83(0x1e3),'description':'Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','risk':a137_0x2a0f83(0x1ca),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x522be4){const _0xa77675=a137_0x2a0f83,_0x1af3cd=collectRequestedSlots(_0x522be4);if(_0x1af3cd[_0xa77675(0x1c2)]===0x0)throw CliErrors['validation'](_0xa77675(0x1d5),'Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS[_0xa77675(0x1c6)](_0x2cc8ba=>'--'+_0x2cc8ba['flag'])[_0xa77675(0x1d0)](',\x20')+'.');},async 'dryRun'(_0x1cb24d){const _0xac89c4=a137_0x2a0f83,{mutation:_0x332cc3}=await buildPlan(_0x1cb24d,!![]);return asDryRunResult(_0x332cc3,{'method':_0xac89c4(0x1c4),'url':SAVE_PATH});},async 'execute'(_0x54bfd1){const _0x179d33=a137_0x2a0f83,{page:_0x19c8c6,mutation:_0x58617c}=await buildPlan(_0x54bfd1,![]);return await savePagePermit(_0x19c8c6),{'ok':!![],'data':_0x58617c,'message':_0x179d33(0x1ce)+_0x58617c[_0x179d33(0x1df)][_0x179d33(0x1d7)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a138_0x20502a=a138_0xee8e;(function(_0x47cf4e,_0x451ce0){const _0x3a5e1e=a138_0xee8e,_0x1c39b3=_0x47cf4e();while(!![]){try{const _0x21986b=-parseInt(_0x3a5e1e(0x8d))/0x1*(-parseInt(_0x3a5e1e(0x8e))/0x2)+-parseInt(_0x3a5e1e(0xa6))/0x3+parseInt(_0x3a5e1e(0x9a))/0x4+-parseInt(_0x3a5e1e(0x89))/0x5+-parseInt(_0x3a5e1e(0xa2))/0x6+parseInt(_0x3a5e1e(0x99))/0x7+parseInt(_0x3a5e1e(0x95))/0x8;if(_0x21986b===_0x451ce0)break;else _0x1c39b3['push'](_0x1c39b3['shift']());}catch(_0x19b8a3){_0x1c39b3['push'](_0x1c39b3['shift']());}}}(a138_0x2caf,0x88571));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';function a138_0xee8e(_0x3e3fff,_0x468985){_0x3e3fff=_0x3e3fff-0x89;const _0x2cafb4=a138_0x2caf();let _0xee8ed3=_0x2cafb4[_0x3e3fff];return _0xee8ed3;}async function buildPlan(_0x2d56eb,_0x7de9c9){const _0x41da82=a138_0xee8e,_0x7d1402=await resolveRoleRef(_0x2d56eb[_0x41da82(0x9f)],readRoleRef(_0x2d56eb));assertPermConfigurable(_0x7d1402);if(!_0x2d56eb['bool'](_0x41da82(0xaa)))throw CliErrors[_0x41da82(0xa4)](_0x41da82(0x97),_0x41da82(0xac));const _0x80ac82=splitList(_0x2d56eb[_0x41da82(0xa3)]('datasets'));if(_0x80ac82['length']===0x0)throw CliErrors[_0x41da82(0x93)](_0x41da82(0x9c),'Pass\x20--datasets\x20<datasetCode,...>.');const _0x35a9e3=await getRoleApiResources(_0x2d56eb[_0x41da82(0x9f)],_0x7d1402['id']),{byCode:_0x5f4c2e,byDataset:_0x3967cb}=flattenApiResources(_0x35a9e3),_0x5b1ee5=_0x80ac82[_0x41da82(0xa5)](_0x547e93=>!_0x3967cb[_0x41da82(0xab)](_0x547e93));if(_0x5b1ee5[_0x41da82(0x9d)]>0x0)throw CliErrors[_0x41da82(0xa4)](_0x41da82(0xa8)+_0x5b1ee5[_0x41da82(0x94)](',\x20')+'.',_0x41da82(0xa1));const _0x87e90e=new Map(),_0x3d36d4=[],_0x2caee1=[];for(const _0x3ca290 of _0x80ac82){for(const _0xae8147 of _0x3967cb[_0x41da82(0xa7)](_0x3ca290)){const _0x2506d4=_0x5f4c2e[_0x41da82(0xa7)](_0xae8147);_0x87e90e['set'](_0xae8147,'0'),_0x3d36d4[_0x41da82(0xa0)]({'resourceCode':_0xae8147,'datasetCode':_0x3ca290,'action':_0x2506d4[_0x41da82(0xad)]}),_0x2caee1[_0x41da82(0xa0)]({'resourceCode':_0xae8147,'datasetCode':_0x3ca290,'action':'0'});}}const _0x250a8c=buildPermits(_0x5f4c2e,_0x87e90e),_0xb04d6b={'operation':_0x41da82(0x98),'selector':{'appCode':_0x2d56eb[_0x41da82(0x9f)],'roleId':_0x7d1402['id'],'roleName':_0x7d1402[_0x41da82(0x8c)],'datasetCodes':_0x80ac82},'before':_0x3d36d4,'after':_0x2caee1,'dryRun':_0x7de9c9,'backend':{'method':_0x41da82(0x8b),'path':UPDATE_PATH,'roleType':_0x41da82(0x8a)},'warnings':[]};return{'role':_0x7d1402,'permits':_0x250a8c,'mutation':_0xb04d6b};}function a138_0x2caf(){const _0x549390=['join','13211224nIRZDy','high-risk-write','Missing\x20--revoke.','api-revoke','1794240VqZXGP','617984IDglIJ','\x20dataset(s)\x20on\x20role\x20','datasets','length','role-apis-set','appCode','push','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','5804544RcEsjL','str','validation','filter','1144890QsCJyA','get','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','revoke','has','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','action','permit','3290725ZKNMOr','API','POST','roleName','1exPnRO','1006858cQpWkp','Revoked\x20API\x20access\x20for\x20','datasetCodes','selector','bool','flagMissing'];a138_0x2caf=function(){return _0x549390;};return a138_0x2caf();}export const permitRoleApisSet={'service':a138_0x20502a(0xae),'command':a138_0x20502a(0x9e),'description':a138_0x20502a(0xa9),'risk':a138_0x20502a(0x96),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3dcc85){const _0x2f2bad=a138_0x20502a;if(!_0x3dcc85[_0x2f2bad(0x92)](_0x2f2bad(0xaa)))throw CliErrors[_0x2f2bad(0xa4)](_0x2f2bad(0x97),_0x2f2bad(0xac));if(splitList(_0x3dcc85[_0x2f2bad(0xa3)](_0x2f2bad(0x9c)))[_0x2f2bad(0x9d)]===0x0)throw CliErrors[_0x2f2bad(0x93)]('datasets','Pass\x20--datasets\x20<datasetCode,...>.');},async 'dryRun'(_0x4b462a){const _0x5eb550=a138_0x20502a,{mutation:_0x4eb5a7}=await buildPlan(_0x4b462a,!![]);return asDryRunResult(_0x4eb5a7,{'method':_0x5eb550(0x8b),'url':UPDATE_PATH});},async 'execute'(_0x1ad7d3){const _0x48f3ee=a138_0x20502a,{role:_0x4b1206,permits:_0x815adf,mutation:_0x1a7b12}=await buildPlan(_0x1ad7d3,![]);return await updateAppRole({'id':_0x4b1206['id'],'appCode':_0x1ad7d3['appCode'],'roleType':'API','permits':_0x815adf}),{'ok':!![],'data':_0x1a7b12,'message':_0x48f3ee(0x8f)+_0x1a7b12[_0x48f3ee(0x91)][_0x48f3ee(0x90)][_0x48f3ee(0x9d)]+_0x48f3ee(0x9b)+_0x4b1206['roleName']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a139_0x2b54d6=a139_0x80fc;(function(_0x538056,_0x3c332c){const _0x3bc58e=a139_0x80fc,_0x52fb34=_0x538056();while(!![]){try{const _0x43dd11=-parseInt(_0x3bc58e(0x1e6))/0x1+-parseInt(_0x3bc58e(0x1c9))/0x2*(parseInt(_0x3bc58e(0x1d2))/0x3)+-parseInt(_0x3bc58e(0x1e8))/0x4*(-parseInt(_0x3bc58e(0x1e4))/0x5)+parseInt(_0x3bc58e(0x1df))/0x6*(-parseInt(_0x3bc58e(0x1e7))/0x7)+parseInt(_0x3bc58e(0x1d6))/0x8+parseInt(_0x3bc58e(0x1e2))/0x9*(-parseInt(_0x3bc58e(0x1d9))/0xa)+parseInt(_0x3bc58e(0x1db))/0xb;if(_0x43dd11===_0x3c332c)break;else _0x52fb34['push'](_0x52fb34['shift']());}catch(_0xab8781){_0x52fb34['push'](_0x52fb34['shift']());}}}(a139_0x2610,0x314ce));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,flattenMenuResources,GRANT_FLAG,MENUS_FLAG,readGrantRevoke,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x4799de,_0x39a2){const _0x112fe1=a139_0x80fc,_0x3c85f4=await resolveRoleRef(_0x4799de[_0x112fe1(0x1ea)],readRoleRef(_0x4799de));assertPermConfigurable(_0x3c85f4);const _0x4e71fc=readGrantRevoke(_0x4799de),_0x34b87f=splitList(_0x4799de[_0x112fe1(0x1d7)](_0x112fe1(0x1c8)));if(_0x34b87f['length']===0x0)throw CliErrors['flagMissing'](_0x112fe1(0x1c8),'Pass\x20--menus\x20<resourceCode,...>.');const _0x3eeb7e=await getRoleMenuResources(_0x4799de[_0x112fe1(0x1ea)],_0x3c85f4['id']),_0x13e625=flattenMenuResources(_0x3eeb7e),_0xfd678d=_0x34b87f['filter'](_0x459ec9=>!_0x13e625[_0x112fe1(0x1e0)](_0x459ec9));if(_0xfd678d[_0x112fe1(0x1cf)]>0x0)throw CliErrors[_0x112fe1(0x1d0)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0xfd678d['join'](',\x20')+'.','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.');const _0x427400=new Map(),_0x50074e=[],_0x185a5e=[];for(const _0x50f0f4 of _0x34b87f){const _0x1cf061=_0x13e625[_0x112fe1(0x1d8)](_0x50f0f4);_0x427400[_0x112fe1(0x1e9)](_0x50f0f4,_0x4e71fc),_0x50074e[_0x112fe1(0x1cc)]({'resourceCode':_0x50f0f4,'action':_0x1cf061[_0x112fe1(0x1e5)]}),_0x185a5e[_0x112fe1(0x1cc)]({'resourceCode':_0x50f0f4,'action':_0x4e71fc});}const _0x3a8d89=buildPermits(_0x13e625,_0x427400),_0x400349={'operation':_0x4e71fc===_0x112fe1(0x1dc)?_0x112fe1(0x1cb):_0x112fe1(0x1dd),'selector':{'appCode':_0x4799de[_0x112fe1(0x1ea)],'roleId':_0x3c85f4['id'],'roleName':_0x3c85f4['roleName'],'resourceCodes':_0x34b87f},'before':_0x50074e,'after':_0x185a5e,'dryRun':_0x39a2,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x112fe1(0x1d3)},'warnings':[]};return{'role':_0x3c85f4,'permits':_0x3a8d89,'mutation':_0x400349};}export const permitRoleMenusSet={'service':a139_0x2b54d6(0x1cd),'command':a139_0x2b54d6(0x1d1),'description':'Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','risk':a139_0x2b54d6(0x1e1),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3f37ab){const _0x59fc7f=a139_0x2b54d6;readGrantRevoke(_0x3f37ab);if(splitList(_0x3f37ab['str']('menus'))[_0x59fc7f(0x1cf)]===0x0)throw CliErrors[_0x59fc7f(0x1ca)](_0x59fc7f(0x1c8),_0x59fc7f(0x1de));},async 'dryRun'(_0x23cf6f){const _0x26bb71=a139_0x2b54d6,{mutation:_0x15d933}=await buildPlan(_0x23cf6f,!![]);return asDryRunResult(_0x15d933,{'method':_0x26bb71(0x1e3),'url':UPDATE_PATH});},async 'execute'(_0x538119){const _0x5edaa2=a139_0x2b54d6,{role:_0x12611f,permits:_0x4fe43b,mutation:_0x2b9a83}=await buildPlan(_0x538119,![]);return await updateAppRole({'id':_0x12611f['id'],'appCode':_0x538119[_0x5edaa2(0x1ea)],'roleType':'PAGE','permits':_0x4fe43b}),{'ok':!![],'data':_0x2b9a83,'message':_0x5edaa2(0x1da)+_0x2b9a83[_0x5edaa2(0x1d5)]['resourceCodes'][_0x5edaa2(0x1cf)]+_0x5edaa2(0x1d4)+_0x12611f[_0x5edaa2(0x1ce)]};}};function a139_0x80fc(_0x44f3ec,_0x277d1b){_0x44f3ec=_0x44f3ec-0x1c8;const _0x2610eb=a139_0x2610();let _0x80fcda=_0x2610eb[_0x44f3ec];return _0x80fcda;}function a139_0x2610(){const _0x58bae3=['menus','1906tuPyBL','flagMissing','menu-grant','push','permit','roleName','length','validation','role-menus-set','1263nrKWZI','PAGE','\x20menu\x20permit(s)\x20for\x20role\x20','selector','1598472oUVxId','str','get','20UlNplG','Updated\x20','7304319ibDHlo','access','menu-revoke','Pass\x20--menus\x20<resourceCode,...>.','384mFxiVo','has','high-risk-write','1424187YYKWxa','POST','11140FxveFD','action','21133JbgNrJ','11081xRKQiC','320oXvwpl','set','appCode'];a139_0x2610=function(){return _0x58bae3;};return a139_0x2610();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a140_0x40f319=a140_0x380b;(function(_0x6a94f6,_0x45f04e){const _0x26ca7b=a140_0x380b,_0x41c026=_0x6a94f6();while(!![]){try{const _0x10566a=-parseInt(_0x26ca7b(0xab))/0x1*(-parseInt(_0x26ca7b(0xa6))/0x2)+parseInt(_0x26ca7b(0xb3))/0x3+parseInt(_0x26ca7b(0xa8))/0x4+-parseInt(_0x26ca7b(0xa1))/0x5+parseInt(_0x26ca7b(0xa2))/0x6*(parseInt(_0x26ca7b(0x9f))/0x7)+-parseInt(_0x26ca7b(0xa0))/0x8*(-parseInt(_0x26ca7b(0xa5))/0x9)+-parseInt(_0x26ca7b(0xaf))/0xa;if(_0x10566a===_0x45f04e)break;else _0x41c026['push'](_0x41c026['shift']());}catch(_0x5969d2){_0x41c026['push'](_0x41c026['shift']());}}}(a140_0x4d50,0x269e6));function a140_0x380b(_0x43d91b,_0x5c0eff){_0x43d91b=_0x43d91b-0x9c;const _0x4d507f=a140_0x4d50();let _0x380b30=_0x4d507f[_0x43d91b];return _0x380b30;}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';import{resolveRoleRef}from'../../commands/role/shared.js';function a140_0x4d50(){const _0x237589=['2921190OExdsH','\x20has\x20','resourceCode','action','562743UScoCH','values','roleName','role-menus','12481PRWUre','2015000GlOjeB','878375BFbFds','66Kcaxpb','appCode','Role\x20','9qAraoM','19534mBuTXe','map','472288IKZLQC','read','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','5FCbMpg','\x20menu(s)\x20allowed','length','access'];a140_0x4d50=function(){return _0x237589;};return a140_0x4d50();}export const permitRoleMenus={'service':'permit','command':a140_0x40f319(0x9e),'description':a140_0x40f319(0xaa),'risk':a140_0x40f319(0xa9),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3ba90a){const _0x3c8952=a140_0x40f319,_0x1ce4b0=await resolveRoleRef(_0x3ba90a[_0x3c8952(0xa3)],readRoleRef(_0x3ba90a)),_0x47de6e=await getRoleMenuResources(_0x3ba90a['appCode'],_0x1ce4b0['id']),_0x537c24=flattenMenuResources(_0x47de6e),_0x2c13ab=Array['from'](_0x537c24[_0x3c8952(0x9c)]())[_0x3c8952(0xa7)](_0x315085=>({'resourceCode':_0x315085[_0x3c8952(0xb1)],'resourceName':_0x315085['resourceName'],'allowed':_0x315085[_0x3c8952(0xb2)]===_0x3c8952(0xae),'action':_0x315085[_0x3c8952(0xb2)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x3ba90a[_0x3c8952(0xa3)],'roleId':_0x1ce4b0['id'],'roleName':_0x1ce4b0[_0x3c8952(0x9d)]},'menus':_0x2c13ab},'message':_0x3c8952(0xa4)+_0x1ce4b0[_0x3c8952(0x9d)]+_0x3c8952(0xb0)+_0x2c13ab['filter'](_0x5ac687=>_0x5ac687['allowed'])[_0x3c8952(0xad)]+'/'+_0x2c13ab[_0x3c8952(0xad)]+_0x3c8952(0xac)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a141_0x26d082=a141_0x2882;(function(_0x1bc503,_0x1da934){const _0x4b55e7=a141_0x2882,_0x245cde=_0x1bc503();while(!![]){try{const _0x5c8d4a=parseInt(_0x4b55e7(0x108))/0x1*(-parseInt(_0x4b55e7(0x116))/0x2)+parseInt(_0x4b55e7(0x10a))/0x3+-parseInt(_0x4b55e7(0xee))/0x4+-parseInt(_0x4b55e7(0x134))/0x5*(parseInt(_0x4b55e7(0xed))/0x6)+parseInt(_0x4b55e7(0x123))/0x7*(parseInt(_0x4b55e7(0x111))/0x8)+-parseInt(_0x4b55e7(0x122))/0x9+parseInt(_0x4b55e7(0x125))/0xa;if(_0x5c8d4a===_0x1da934)break;else _0x245cde['push'](_0x245cde['shift']());}catch(_0x2432bc){_0x245cde['push'](_0x245cde['shift']());}}}(a141_0x4513,0xe8732));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a141_0x26d082(0x10d),'type':a141_0x26d082(0x114),'required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};export const ROLE_REF_FLAG={'name':a141_0x26d082(0xe6),'type':a141_0x26d082(0x132),'required':!![],'description':'Role\x20id\x20or\x20role\x20name'};export const GRANT_FLAG={'name':a141_0x26d082(0x10e),'type':a141_0x26d082(0xf5),'required':![],'description':a141_0x26d082(0x100)};function a141_0x2882(_0x5d19ca,_0x266db8){_0x5d19ca=_0x5d19ca-0xe6;const _0x451327=a141_0x4513();let _0x288227=_0x451327[_0x5d19ca];return _0x288227;}export const REVOKE_FLAG={'name':a141_0x26d082(0xe7),'type':'boolean','required':![],'description':a141_0x26d082(0x12a)};export const MENUS_FLAG={'name':'menus','type':a141_0x26d082(0x132),'required':!![],'description':a141_0x26d082(0x104)};export const DATASETS_FLAG={'name':a141_0x26d082(0x11e),'type':a141_0x26d082(0x132),'required':!![],'description':'Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for'};export const PAGE_SLOT_SPECS=[{'flag':a141_0x26d082(0x137),'key':'menuPermit','allowSelf':![],'label':a141_0x26d082(0x107)},{'flag':'create-roles','key':a141_0x26d082(0x131),'allowSelf':![],'label':a141_0x26d082(0x117)},{'flag':a141_0x26d082(0x106),'key':a141_0x26d082(0x110),'allowSelf':![],'label':a141_0x26d082(0xf4)},{'flag':a141_0x26d082(0xf9),'key':a141_0x26d082(0x138),'allowSelf':![],'label':'data\x20delete'},{'flag':'detail-roles','key':'dataDetail','allowSelf':![],'label':a141_0x26d082(0x115)},{'flag':a141_0x26d082(0x133),'key':a141_0x26d082(0xf2),'allowSelf':![],'label':a141_0x26d082(0x12b)},{'flag':a141_0x26d082(0xeb),'key':a141_0x26d082(0xfa),'allowSelf':!![],'label':a141_0x26d082(0xf8)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a141_0x26d082(0x135)](_0x36f157=>({'name':_0x36f157[a141_0x26d082(0x105)],'type':a141_0x26d082(0x132),'required':![],'description':a141_0x26d082(0x11b)+_0x36f157['label']+'\x20(comma-separated\x20SELF/ALL/id/name)'+(_0x36f157[a141_0x26d082(0xfb)]?a141_0x26d082(0xe9):'')}));export function splitList(_0xdeb5d9){const _0x36748d=a141_0x26d082;return _0xdeb5d9[_0x36748d(0x103)](',')['map'](_0x20239f=>_0x20239f[_0x36748d(0xf1)]())[_0x36748d(0x127)](Boolean);}export function projectRoleRef(_0x1902e1){const _0x58dc1a=a141_0x26d082;return{'id':_0x1902e1['id'],'roleName':_0x1902e1[_0x58dc1a(0x113)],'roleType':_0x1902e1[_0x58dc1a(0x109)]};}export async function resolvePermitRoles(_0x3d4ad3,_0x38ea5e,_0x184024){const _0x38f5a4=a141_0x26d082,_0x7abff3=await listPermitRoles(_0x3d4ad3,{'needSelf':!![],'needPublic':!![]}),_0x1db2ed=[];for(const _0x20cb1e of _0x38ea5e){const _0x2254e1=resolveOnePermitRole(_0x7abff3,_0x20cb1e);if(!_0x184024['allowSelf']&&_0x2254e1[_0x38f5a4(0x109)]==='SELF')throw CliErrors[_0x38f5a4(0x102)](_0x38f5a4(0x119)+_0x184024['label']+'.',_0x38f5a4(0x128));if(!_0x1db2ed[_0x38f5a4(0x10c)](_0x19dd29=>_0x19dd29['id']===_0x2254e1['id']))_0x1db2ed[_0x38f5a4(0x124)](_0x2254e1);}return _0x1db2ed;}function resolveOnePermitRole(_0x1a071b,_0x56b30e){const _0x4b90e3=a141_0x26d082,_0x534b3b=_0x56b30e[_0x4b90e3(0xf1)](),_0x2f7fcc=_0x534b3b[_0x4b90e3(0x11a)]();if(_0x2f7fcc===_0x4b90e3(0x12e)||_0x2f7fcc===_0x4b90e3(0xe8)){const _0x2c09bd=_0x1a071b[_0x4b90e3(0x120)](_0x3dc6a0=>_0x3dc6a0[_0x4b90e3(0x109)]===_0x2f7fcc);if(!_0x2c09bd)throw CliErrors['validation']('Special\x20role\x20'+_0x2f7fcc+_0x4b90e3(0x101));return _0x2c09bd;}if(/^-?\d+$/['test'](_0x534b3b)){const _0x506e8c=Number(_0x534b3b),_0x1f8cc3=_0x1a071b[_0x4b90e3(0x120)](_0xa847eb=>_0xa847eb['id']===_0x506e8c);if(!_0x1f8cc3)throw CliErrors[_0x4b90e3(0x102)](_0x4b90e3(0x126)+_0x506e8c+_0x4b90e3(0x121),_0x4b90e3(0xf6));return _0x1f8cc3;}const _0x56b9f4=_0x1a071b[_0x4b90e3(0x127)](_0x3ae22f=>_0x3ae22f[_0x4b90e3(0x113)]===_0x534b3b);if(_0x56b9f4[_0x4b90e3(0xef)]===0x0)throw CliErrors[_0x4b90e3(0x102)]('Role\x20\x22'+_0x534b3b+'\x22\x20not\x20found.',_0x4b90e3(0x12f));if(_0x56b9f4['length']>0x1)throw CliErrors[_0x4b90e3(0x102)](_0x4b90e3(0x130)+_0x534b3b+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x56b9f4['map'](_0x188ccb=>_0x188ccb['id'])[_0x4b90e3(0x11c)](',\x20')+').',_0x4b90e3(0xf3));return _0x56b9f4[0x0];}export function projectPageSlot(_0x2b9b2d){const _0x452331=a141_0x26d082;if(!_0x2b9b2d)return null;return{'resourceCode':_0x2b9b2d[_0x452331(0x129)],'roles':(_0x2b9b2d[_0x452331(0x118)]??[])[_0x452331(0x135)](projectRoleRef)};}export function projectPagePermit(_0x19f625){const _0x3ca775=a141_0x26d082,_0x136187={'menuId':_0x19f625['menuId'],'appCode':_0x19f625[_0x3ca775(0xf7)],'menuPermit':projectPageSlot(_0x19f625[_0x3ca775(0x11d)])};for(const _0x1ea3de of PAGE_SLOT_SPECS){if(_0x1ea3de[_0x3ca775(0x10f)]==='menuPermit')continue;_0x136187[_0x1ea3de[_0x3ca775(0x10f)]]=projectPageSlot(_0x19f625[_0x1ea3de[_0x3ca775(0x10f)]]);}return _0x136187;}export function flattenMenuResources(_0x45335a){const _0x56409e=new Map(),_0x27e786=_0x5923e3=>{const _0xb91cbc=a141_0x2882;for(const _0x3b109c of _0x5923e3??[]){_0x56409e[_0xb91cbc(0xfc)](_0x3b109c[_0xb91cbc(0x129)],{'resourceCode':_0x3b109c[_0xb91cbc(0x129)],'resourceName':_0x3b109c[_0xb91cbc(0xff)],'action':_0x3b109c[_0xb91cbc(0x112)]?.[0x0]??'0'});if(_0x3b109c['pageNodeList'])_0x27e786(_0x3b109c[_0xb91cbc(0xf0)]);}};return _0x27e786(_0x45335a),_0x56409e;}export function flattenApiResources(_0x4dcb4a){const _0x1ddaf9=a141_0x26d082,_0x4f8461=new Map(),_0xd9bc7c=new Map();for(const _0x43e8ab of _0x4dcb4a){const _0x48e763=_0x43e8ab[_0x1ddaf9(0x10b)]??{};for(const [_0xb6bafc,_0x408530]of Object[_0x1ddaf9(0xea)](_0x48e763)){_0x4f8461[_0x1ddaf9(0xfc)](_0xb6bafc,{'resourceCode':_0xb6bafc,'resourceName':_0x43e8ab['resourceName'],'datasetCode':_0x43e8ab[_0x1ddaf9(0xfe)],'action':_0x408530?.[0x0]??'0'});const _0x3a2bbe=_0xd9bc7c[_0x1ddaf9(0x12d)](_0x43e8ab[_0x1ddaf9(0xfe)])??[];_0x3a2bbe['push'](_0xb6bafc),_0xd9bc7c['set'](_0x43e8ab[_0x1ddaf9(0xfe)],_0x3a2bbe);}}return{'byCode':_0x4f8461,'byDataset':_0xd9bc7c};}function a141_0x4513(){const _0x4d5be1=['validation','split','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','flag','update-roles','menu\x20visibility','556mXbpVW','roleType','3683505cDqgLg','apiList','some','menu-id','grant','key','dataUpdate','369680RMVDMn','allowedActions','roleName','number','data\x20detail','1088XUUoIt','data\x20create','rolePermit','SELF\x20is\x20not\x20allowed\x20for\x20','toUpperCase','Roles\x20for\x20','join','menuPermit','datasets','str','find','\x20not\x20found.','7238628TzEzIv','14OMviQx','push','32939740dRiCYm','Role\x20id\x20','filter','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','resourceCode','Revoke\x20access\x20to\x20the\x20listed\x20resources','data\x20export','Missing\x20action.','get','SELF','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','Role\x20\x22','dataCreate','string','export-roles','3693295EIqAsj','map','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','menu-roles','dataDelete','role','revoke','ALL',';\x20SELF\x20=\x20only\x20own\x20rows','entries','row-roles','action','12Vzabtm','4312164iblpcU','length','pageNodeList','trim','dataExport','Disambiguate\x20with\x20an\x20id.','data\x20update','boolean','Run\x20`role\x20list`.','appCode','row\x20visibility','delete-roles','dataPermit','allowSelf','set','access','datasetCode','resourceName','Grant\x20access\x20to\x20the\x20listed\x20resources','\x20is\x20not\x20available\x20for\x20this\x20app.'];a141_0x4513=function(){return _0x4d5be1;};return a141_0x4513();}export function buildPermits(_0x2d8748,_0x6fd305){const _0x5c99db=a141_0x26d082,_0x208cff={};for(const [_0x3095d9,_0x35ec0]of _0x2d8748){const _0x92d8ca=_0x6fd305[_0x5c99db(0x12d)](_0x3095d9)??_0x35ec0[_0x5c99db(0xec)];_0x208cff[_0x3095d9]=[_0x92d8ca];}return _0x208cff;}export function readRoleRef(_0x4e6c2d){const _0x5462c2=a141_0x26d082,_0x44b5be=_0x4e6c2d[_0x5462c2(0x11f)](_0x5462c2(0xe6))[_0x5462c2(0xf1)]();if(!_0x44b5be)throw CliErrors['flagMissing'](_0x5462c2(0xe6),'Pass\x20--role\x20<id|name>.');return _0x44b5be;}export function readGrantRevoke(_0xb9070d){const _0x36be62=a141_0x26d082,_0x37a1de=_0xb9070d['bool'](_0x36be62(0x10e)),_0xbba3c1=_0xb9070d['bool']('revoke');if(_0x37a1de&&_0xbba3c1)throw CliErrors[_0x36be62(0x102)](_0x36be62(0x136));if(!_0x37a1de&&!_0xbba3c1)throw CliErrors['validation'](_0x36be62(0x12c),'Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.');return _0x37a1de?_0x36be62(0xfd):'0';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f1788,_0x36df1e){const _0x1110c1=a142_0x1013,_0x498d6f=_0x4f1788();while(!![]){try{const _0x3db0d8=parseInt(_0x1110c1(0x13a))/0x1*(-parseInt(_0x1110c1(0x144))/0x2)+-parseInt(_0x1110c1(0x130))/0x3*(parseInt(_0x1110c1(0x143))/0x4)+-parseInt(_0x1110c1(0x137))/0x5*(parseInt(_0x1110c1(0x12f))/0x6)+-parseInt(_0x1110c1(0x140))/0x7*(parseInt(_0x1110c1(0x13c))/0x8)+-parseInt(_0x1110c1(0x12a))/0x9+parseInt(_0x1110c1(0x12d))/0xa*(-parseInt(_0x1110c1(0x12e))/0xb)+parseInt(_0x1110c1(0x139))/0xc;if(_0x3db0d8===_0x36df1e)break;else _0x498d6f['push'](_0x498d6f['shift']());}catch(_0x546585){_0x498d6f['push'](_0x498d6f['shift']());}}}(a142_0x1bb3,0x9cdf6));function a142_0x1bb3(){const _0x3e1801=['test','cyan','1268433jrJKlY','string','cwd','1310vOGGLm','14773IicUZz','6jwPZhd','33891cRfAqD','length','env','Skipped','√\x20App\x20Code:\x20','Not\x20set','√\x20Project\x20Name:\x20','5220795ZQAHcZ','log','52966476kaodaD','298705POktZS','\x22\x20already\x20exists','24FKQiZE','Logged\x20in','my-app','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','2001118pfAmEv','√\x20Login\x20status:\x20','production','444dRmJEO','2lnBddG','green','resolve','trim'];a142_0x1bb3=function(){return _0x3e1801;};return a142_0x1bb3();}import{existsSync}from'node:fs';import a142_0x89ae49 from'node:path';import a142_0x2968f8 from'chalk';function a142_0x1013(_0x2830a5,_0xdcae39){_0x2830a5=_0x2830a5-0x125;const _0x1bb352=a142_0x1bb3();let _0x101311=_0x1bb352[_0x2830a5];return _0x101311;}import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0xeabdcd,_0x29fc7a,_0xff2872){const _0x4bbeda=a142_0x1013,_0x21776b=_0x4bbeda(0x13e),_0xed6d0e=readConfig(),_0x4b9d8b=typeof _0xed6d0e[_0x4bbeda(0x132)]===_0x4bbeda(0x12b)?_0xed6d0e[_0x4bbeda(0x132)]:undefined,_0x171ac9=await input({'message':'Project\x20name:','default':_0x21776b,'validate':_0x2dec27=>{const _0x5e0002=_0x4bbeda,_0x4a2779=_0x2dec27[_0x5e0002(0x127)]()||_0x21776b;if(_0x4a2779[_0x5e0002(0x131)]>0x32)return'Project\x20name\x20cannot\x20exceed\x2050\x20characters';const _0xb82690=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x4a2779&&!_0xb82690[_0x5e0002(0x128)](_0x4a2779))return _0x5e0002(0x13f);const _0x590f9c=a142_0x89ae49[_0x5e0002(0x126)](process[_0x5e0002(0x12c)](),_0x4a2779);if(existsSync(_0x590f9c))return'Directory\x20\x22'+_0x4a2779+_0x5e0002(0x13b);return!![];}});console['log'](a142_0x2968f8['green'](_0x4bbeda(0x136)+a142_0x2968f8[_0x4bbeda(0x129)](_0x171ac9)));const _0x214251=await selectSingleAppcode(_0xff2872);console[_0x4bbeda(0x138)](a142_0x2968f8[_0x4bbeda(0x125)](_0x4bbeda(0x134)+a142_0x2968f8[_0x4bbeda(0x129)](_0x214251||_0x4bbeda(0x135))));if(_0x214251){const _0x4469cd=await getIsSessionValid();if(!_0x4469cd){const _0x388e38=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x388e38){const _0x5ecf2b=await authServer({'silent':!![]});console[_0x4bbeda(0x138)](a142_0x2968f8[_0x4bbeda(0x125)](_0x4bbeda(0x141)+a142_0x2968f8[_0x4bbeda(0x129)](_0x5ecf2b?_0x4bbeda(0x13d):'Login\x20failed')));}else console[_0x4bbeda(0x138)](a142_0x2968f8[_0x4bbeda(0x125)](_0x4bbeda(0x141)+a142_0x2968f8[_0x4bbeda(0x129)](_0x4bbeda(0x133))));}await _0xeabdcd({'projectName':_0x171ac9,'appCode':_0x214251,'env':_0x29fc7a||_0x4b9d8b||'production'});}else await _0xeabdcd({'projectName':_0x171ac9,'env':_0x29fc7a||_0x4b9d8b||_0x4bbeda(0x142)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a143_0x54de(_0x168705,_0x5a2e6e){_0x168705=_0x168705-0x1ea;const _0x18834e=a143_0x1883();let _0x54ded0=_0x18834e[_0x168705];return _0x54ded0;}(function(_0x51f916,_0x4eaeb3){const _0x10c845=a143_0x54de,_0x3c19c1=_0x51f916();while(!![]){try{const _0x328288=-parseInt(_0x10c845(0x1f3))/0x1+parseInt(_0x10c845(0x1ec))/0x2*(-parseInt(_0x10c845(0x1ee))/0x3)+-parseInt(_0x10c845(0x1f0))/0x4+-parseInt(_0x10c845(0x1f1))/0x5+-parseInt(_0x10c845(0x1ef))/0x6+-parseInt(_0x10c845(0x1f2))/0x7+parseInt(_0x10c845(0x1ed))/0x8*(parseInt(_0x10c845(0x1ea))/0x9);if(_0x328288===_0x4eaeb3)break;else _0x3c19c1['push'](_0x3c19c1['shift']());}catch(_0x5101a1){_0x3c19c1['push'](_0x3c19c1['shift']());}}}(a143_0x1883,0xf2aa7));function a143_0x1883(){const _0x57ef41=['110200MLTGsf','7914anjSty','11357358zoVzYv','666152vuChIp','4685430pdkGgV','6512898TBIzHw','1422056BiLVMd','4158Cxtefv','toFixed','16yHgeBN'];a143_0x1883=function(){return _0x57ef41;};return a143_0x1883();}export function formatElapsed(_0x415a3a){const _0xb00b33=a143_0x54de,_0x449996=Date['now']()-_0x415a3a;if(_0x449996<0x3e8)return _0x449996+'ms';const _0x71f39d=(_0x449996/0x3e8)[_0xb00b33(0x1eb)](0x2),_0x196c32=_0x71f39d['replace'](/\.?0+$/u,'');return _0x196c32+'s';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x520bcf,_0x176f17){const _0x216fd9=a144_0xfcd1,_0x4efc98=_0x520bcf();while(!![]){try{const _0x5a2440=-parseInt(_0x216fd9(0x122))/0x1*(parseInt(_0x216fd9(0xd7))/0x2)+-parseInt(_0x216fd9(0xfd))/0x3*(parseInt(_0x216fd9(0xef))/0x4)+-parseInt(_0x216fd9(0xf4))/0x5+parseInt(_0x216fd9(0xff))/0x6+parseInt(_0x216fd9(0x11a))/0x7*(parseInt(_0x216fd9(0x10b))/0x8)+parseInt(_0x216fd9(0x118))/0x9+-parseInt(_0x216fd9(0xce))/0xa;if(_0x5a2440===_0x176f17)break;else _0x4efc98['push'](_0x4efc98['shift']());}catch(_0x100274){_0x4efc98['push'](_0x4efc98['shift']());}}}(a144_0x3cfe,0xd6374));import a144_0x334446 from'path';import a144_0x35457d from'fs';import a144_0x4eec2f from'chalk';import a144_0x57e1d1 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';function a144_0xfcd1(_0x4d27f7,_0x4b7bd4){_0x4d27f7=_0x4d27f7-0xcc;const _0x3cfe70=a144_0x3cfe();let _0xfcd1dc=_0x3cfe70[_0x4d27f7];return _0xfcd1dc;}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';function a144_0x3cfe(){const _0x57f537=['495922BeWJwg','projectName','writeFileSync','\x20run\x20start','\x20dataset(s),\x20generated\x20','配置应用AppCode:\x20','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','rmSync','964793ExSQuD','\x20api\x20pull','cyan','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','readFileSync','join','\x20\x201.\x20Start\x20project:\x20','759580NYMHPB','success','🚀\x20Next\x20Steps:','package.json','env','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','*\x20Configuring\x20AppCode\x20for\x20project\x20','开始创建项目:\x20','API\x20配置拉取异常','2DdPjrV','message','清理项目目录失败:\x20','*\x20Pulling\x20API\x20configuration...','green','√\x20Pulled\x20','resolve','parse','info','length','string','gray','bold','Copy\x20project\x20files','\x20|\x20Default:\x20','Format\x20code','currentVersion','\x20√\x20','projectCode','CLI\x20版本检查','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','setLogPath','chdir','dirname','988reZYwT','test','create','\x20|\x20AppCode:\x20','...','4124605ODphBQ','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','belowMinimum','production','\x20config\x20set\x20appcode\x20<app-code>\x27','error','API\x20configuration\x20pulled:\x20','项目创建失败:\x20','stableVersion','2811DDZxWM','log','6181254wSfejy','1.0.0','minimumVersion','repeat','√\x20package.json\x20updated:\x20name=','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','utf8','\x20Generated\x20by\x20rabetbase\x20cli\x20','needsUpgrade','\x20&&\x20','配置应用AppCode失败','fail','112ctrvEI','Install\x20dependencies','cwd','stop','Project\x20name\x20cannot\x20be\x20empty','Project\x20directory\x20','apps','keys','\x20model(s)','existsSync','modelCount','appCode','cookie','8572374nOQabj','version'];a144_0x3cfe=function(){return _0x57f537;};return a144_0x3cfe();}import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x22f27e){const _0x313a6e=a144_0xfcd1,_0x1dc10c=await checkCliVersion();(_0x1dc10c['needsUpgrade']||_0x1dc10c[_0x313a6e(0xf6)])&&(printCliUpgradeWarning(_0x1dc10c),assertCliVersionSupported(_0x1dc10c),logger[_0x313a6e(0xdf)](_0x313a6e(0xf1),_0x313a6e(0xea),{'currentVersion':_0x1dc10c[_0x313a6e(0xe7)],'stableVersion':_0x1dc10c[_0x313a6e(0xfc)],'minimumVersion':_0x1dc10c[_0x313a6e(0x101)],'needsUpgrade':_0x1dc10c[_0x313a6e(0x107)],'belowMinimum':_0x1dc10c[_0x313a6e(0xf6)]}));if(_0x22f27e[_0x313a6e(0xe9)]&&_0x22f27e[_0x313a6e(0x116)])await runCreate({'projectName':_0x22f27e['projectCode'],'appCode':_0x22f27e[_0x313a6e(0x116)],'env':_0x22f27e[_0x313a6e(0xd2)]},_0x22f27e);else{if(_0x22f27e[_0x313a6e(0xe9)]){const _0x379fa9=await selectSingleAppcode(_0x22f27e[_0x313a6e(0x117)]);await runCreate({'projectName':_0x22f27e[_0x313a6e(0xe9)],'appCode':_0x379fa9||undefined,'env':_0x22f27e[_0x313a6e(0xd2)]},_0x22f27e);}else await guidedCreateProject(_0x5e0c5b=>runCreate(_0x5e0c5b,_0x22f27e),_0x22f27e[_0x313a6e(0xd2)],_0x22f27e['cookie']);}}async function runCreate(_0x455e7f,_0x2dd651){const _0x317eca=a144_0xfcd1;if(!_0x455e7f[_0x317eca(0x11b)]||_0x455e7f[_0x317eca(0x11b)]['trim']()==='')throw new Error(_0x317eca(0x10f));const _0x252e0f=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x252e0f[_0x317eca(0xf0)](_0x455e7f[_0x317eca(0x11b)]))throw new Error(_0x317eca(0x104));if(_0x455e7f[_0x317eca(0x11b)][_0x317eca(0xe0)]>0x64)throw new Error(_0x317eca(0xeb));const _0x82dfcb=a144_0x334446[_0x317eca(0xdd)](process[_0x317eca(0x10d)](),_0x455e7f['projectName']);if(a144_0x35457d[_0x317eca(0x114)](_0x82dfcb))throw new Error(_0x317eca(0x110)+_0x455e7f[_0x317eca(0x11b)]+'\x20already\x20exists');try{a144_0x35457d['accessSync'](a144_0x334446[_0x317eca(0xee)](_0x82dfcb),a144_0x35457d['constants']['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x317eca(0xec)](_0x82dfcb),logger['info'](_0x317eca(0xf1),_0x317eca(0xd5)+_0x455e7f[_0x317eca(0x11b)],{'projectDir':_0x82dfcb,'appCode':_0x455e7f['appCode']}),console['log'](),console[_0x317eca(0xfe)](a144_0x4eec2f['green']('\x20√\x20')+'Project\x20name:\x20'+a144_0x4eec2f['green'](_0x455e7f[_0x317eca(0x11b)])+(_0x455e7f[_0x317eca(0x116)]?_0x317eca(0xf2)+a144_0x4eec2f[_0x317eca(0x124)](_0x455e7f[_0x317eca(0x116)]):''));try{await runTask(_0x317eca(0xe4),()=>copyProjectTemplate(_0x455e7f['projectName'])),await updatePackageJsonName(_0x455e7f[_0x317eca(0x11b)]),await runTask(_0x317eca(0x10c),()=>installDependencies(_0x455e7f[_0x317eca(0x11b)])),await runTask(_0x317eca(0xe6),()=>formatProjectCode(_0x455e7f['projectName'])),await configureAppCode(_0x455e7f['projectName'],_0x455e7f[_0x317eca(0x116)]||'',_0x455e7f['env']);let _0x2aa0db=![];if(_0x455e7f[_0x317eca(0x116)]){console[_0x317eca(0xfe)](_0x317eca(0xda));const _0x4f8fa0=process[_0x317eca(0x10d)]();try{process[_0x317eca(0xed)](_0x82dfcb);const _0x4bbce9=_0x455e7f[_0x317eca(0xd2)]||'production';initEnv(_0x4bbce9);const {configArray:_0x21543f}=await fetchModelList(_0x455e7f['appCode'],_0x2dd651['cookie']||''),_0xbf2b27=DEFAULT_API_DIR,_0x48a760=await generateApiFile(_0x21543f,'',_0x455e7f[_0x317eca(0x116)],!![],_0x4bbce9,_0xbf2b27);console[_0x317eca(0xfe)](_0x317eca(0xdc)+_0x21543f['length']+_0x317eca(0x11e)+_0x48a760[_0x317eca(0x115)]+_0x317eca(0x113)),logger[_0x317eca(0xdf)](_0x317eca(0xf1),_0x317eca(0xfa)+_0x455e7f[_0x317eca(0x116)]);}catch(_0x3aa705){_0x2aa0db=!![],console[_0x317eca(0xfe)](_0x317eca(0x125)),logger['warn']('create',_0x317eca(0xd6),{'error':_0x3aa705 instanceof Error?_0x3aa705[_0x317eca(0xd8)]:String(_0x3aa705)});}finally{process[_0x317eca(0xed)](_0x4f8fa0);}}logger[_0x317eca(0xcf)](_0x317eca(0xf1),'项目创建完成:\x20'+_0x455e7f[_0x317eca(0x11b)]),console['log'](),console[_0x317eca(0xfe)](a144_0x4eec2f[_0x317eca(0xdb)]('─'[_0x317eca(0x102)](0x3c))),console[_0x317eca(0xfe)](a144_0x4eec2f['cyan'][_0x317eca(0xe3)](_0x317eca(0xd0))),console[_0x317eca(0xfe)](),console['log'](_0x317eca(0xcd)+a144_0x4eec2f[_0x317eca(0x124)][_0x317eca(0xe3)]('cd\x20'+_0x455e7f[_0x317eca(0x11b)]+_0x317eca(0x108)+CLI_BIN_NAME+_0x317eca(0x11d))),_0x2aa0db&&console[_0x317eca(0xfe)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a144_0x4eec2f[_0x317eca(0x124)][_0x317eca(0xe3)](CLI_BIN_NAME+_0x317eca(0x123))),console[_0x317eca(0xfe)](a144_0x4eec2f[_0x317eca(0xdb)]('─'[_0x317eca(0x102)](0x3c)));}catch(_0x582261){logger[_0x317eca(0xf9)](_0x317eca(0xf1),_0x317eca(0xfb)+_0x455e7f['projectName'],{'error':_0x582261 instanceof Error?_0x582261[_0x317eca(0xd8)]:String(_0x582261)});try{a144_0x35457d[_0x317eca(0x114)](_0x82dfcb)&&(console[_0x317eca(0xfe)](_0x317eca(0xf5)+_0x82dfcb),a144_0x35457d[_0x317eca(0x121)](_0x82dfcb,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x317eca(0xf1),_0x317eca(0xd9)+_0x82dfcb);}throw _0x582261;}}async function runTask(_0x18ab25,_0x36083a){const _0x2d1a93=a144_0xfcd1,_0x2e74b7=a144_0x57e1d1(_0x18ab25+_0x2d1a93(0xf3))['start']();try{const _0xd5a612=await _0x36083a();_0x2e74b7[_0x2d1a93(0x10e)](),console[_0x2d1a93(0xfe)](''+a144_0x4eec2f['green'](_0x2d1a93(0xe8))+_0x18ab25+'\x20'+a144_0x4eec2f[_0x2d1a93(0xe2)]('['+_0xd5a612+']'));}catch(_0x542014){_0x2e74b7[_0x2d1a93(0x10a)](_0x18ab25);throw _0x542014;}}async function updatePackageJsonName(_0xddc063){const _0xe5919b=a144_0xfcd1,_0x2ccc84=a144_0x334446[_0xe5919b(0xdd)](process['cwd'](),_0xddc063),_0x3b8db2=a144_0x334446[_0xe5919b(0xcc)](_0x2ccc84,_0xe5919b(0xd1));try{console[_0xe5919b(0xfe)](_0xe5919b(0xd3));const _0x4cacc0=getRabetbaseCliPackageRoot(),_0x37aa1f=a144_0x334446[_0xe5919b(0xcc)](_0x4cacc0,'package.json');let _0x20ce4c='1.0.0';try{const _0x24103f=JSON[_0xe5919b(0xde)](a144_0x35457d[_0xe5919b(0x126)](_0x37aa1f,_0xe5919b(0x105)));_0x20ce4c=_0x24103f[_0xe5919b(0x119)]||'1.0.0';}catch{}const _0x2f1f0a=a144_0x35457d[_0xe5919b(0x126)](_0x3b8db2,'utf8'),_0x4414f0=JSON[_0xe5919b(0xde)](_0x2f1f0a);_0x4414f0['name']=_0xddc063,_0x4414f0['description']=_0xddc063+_0xe5919b(0x106)+_0x20ce4c,a144_0x35457d[_0xe5919b(0x11c)](_0x3b8db2,JSON['stringify'](_0x4414f0,null,0x2)+'\x0a',_0xe5919b(0x105)),console[_0xe5919b(0xfe)](_0xe5919b(0x103)+_0xddc063),logger['info']('create','更新\x20package.json\x20name');}catch(_0x1afb9c){logger['error'](_0xe5919b(0xf1),'更新\x20package.json\x20失败');throw _0x1afb9c;}}async function configureAppCode(_0x1d6dda,_0x1c0174,_0x47d35b){const _0x52961a=a144_0xfcd1,_0x173ecb=a144_0x334446[_0x52961a(0xdd)](process[_0x52961a(0x10d)](),_0x1d6dda),_0x72798b=a144_0x334446[_0x52961a(0xcc)](_0x173ecb,NEW_CONFIG_NAME);try{_0x1c0174?console[_0x52961a(0xfe)](_0x52961a(0xd4)+_0x1d6dda+':\x20'+_0x1c0174):console[_0x52961a(0xfe)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x1d6dda);const _0x2ae243=getRabetbaseCliPackageRoot(),_0x2dd585=a144_0x334446[_0x52961a(0xcc)](_0x2ae243,_0x52961a(0xd1));let _0x402980=_0x52961a(0x100);try{const _0x4590c4=JSON[_0x52961a(0xde)](a144_0x35457d[_0x52961a(0x126)](_0x2dd585,_0x52961a(0x105)));_0x402980=_0x4590c4[_0x52961a(0x119)]||'1.0.0';}catch{}const _0x49373d=readConfig(),_0x3420c2=typeof _0x49373d['env']===_0x52961a(0xe1)?_0x49373d['env']:undefined,_0x50f064={};for(const _0x213a12 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x49373d[_0x213a12]!=null)_0x50f064[_0x213a12]=_0x49373d[_0x213a12];}const _0xb3872a=buildCanonicalProjectConfig(_0x50f064,{'appCodes':_0x1c0174?[_0x1c0174]:[],'env':_0x47d35b||_0x3420c2||_0x52961a(0xf7),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x402980}});writeConfigFile(_0x72798b,_0xb3872a),_0x1c0174?console[_0x52961a(0xfe)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x52961a(0x112)](_0xb3872a[_0x52961a(0x111)]||{})[_0x52961a(0xcc)](',\x20')+_0x52961a(0xe5)+_0xb3872a['defaultApp']):console['log'](_0x52961a(0x120)+CLI_BIN_NAME+_0x52961a(0xf8)),logger['info'](_0x52961a(0xf1),_0x52961a(0x11f)+_0x1c0174);}catch(_0x45f8b2){logger[_0x52961a(0xf9)]('create',_0x52961a(0x109));}}
|
|
1
|
+
(function(_0x205d65,_0xdec407){const _0x2f2fe7=a144_0x2f27,_0x3e026a=_0x205d65();while(!![]){try{const _0x7743ba=parseInt(_0x2f2fe7(0x10c))/0x1+-parseInt(_0x2f2fe7(0xc3))/0x2+-parseInt(_0x2f2fe7(0x102))/0x3*(parseInt(_0x2f2fe7(0x11d))/0x4)+parseInt(_0x2f2fe7(0x10a))/0x5+parseInt(_0x2f2fe7(0x108))/0x6*(-parseInt(_0x2f2fe7(0x104))/0x7)+parseInt(_0x2f2fe7(0x11b))/0x8*(-parseInt(_0x2f2fe7(0x101))/0x9)+-parseInt(_0x2f2fe7(0xbf))/0xa*(-parseInt(_0x2f2fe7(0x105))/0xb);if(_0x7743ba===_0xdec407)break;else _0x3e026a['push'](_0x3e026a['shift']());}catch(_0x4c7403){_0x3e026a['push'](_0x3e026a['shift']());}}}(a144_0x162e,0xd9d04));import a144_0xbab26c from'path';import a144_0x3191b1 from'fs';function a144_0x2f27(_0x449bab,_0x23f788){_0x449bab=_0x449bab-0xbe;const _0x162e93=a144_0x162e();let _0x2f27f7=_0x162e93[_0x449bab];return _0x2f27f7;}import a144_0x9db5a9 from'chalk';import a144_0x3ef576 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';function a144_0x162e(){const _0x38f1e2=['√\x20Pulled\x20','trim','*\x20Pulling\x20API\x20configuration...','*\x20Configuring\x20AppCode\x20for\x20project\x20','projectName','stableVersion','\x20|\x20Default:\x20','apps','√\x20package.json\x20updated:\x20name=','utf8','needsUpgrade','CLI\x20版本检查','开始创建项目:\x20','keys','green','bold','name','start','810dHsESR','39IdYtES','currentVersion','22232FQEeuh','11xjMZKy','error','\x20Generated\x20by\x20rabetbase\x20cli\x20','894wxSVKJ','配置应用AppCode失败','6708760wNuUoH','minimumVersion','611562qpxcVK','appCode','🚀\x20Next\x20Steps:','√\x20Configuration\x20file\x20created,\x20Apps:\x20','W_OK','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','cyan','cwd','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','accessSync','info','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','Format\x20code','join','writeFileSync','3688JciPzy','existsSync','149628ytNLQB','readFileSync','warn','log','11603240ePHHZE','projectCode','repeat','message','2440938ElWvYs','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20|\x20AppCode:\x20','...','production','resolve','\x20√\x20','清理项目目录失败:\x20','belowMinimum','API\x20配置拉取异常','cd\x20','length','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','配置应用AppCode:\x20','Project\x20directory\x20','fail','package.json','更新\x20package.json\x20失败','1.0.0','项目创建失败:\x20','constants','Project\x20name:\x20','\x20\x201.\x20Start\x20project:\x20','stringify','stop','success','Project\x20name\x20cannot\x20be\x20empty','create','Copy\x20project\x20files','\x20\x202.\x20Pull\x20API\x20configuration:\x20','string','API\x20configuration\x20pulled:\x20','parse','setLogPath','\x20config\x20set\x20appcode\x20<app-code>\x27','dirname','version','cookie','\x20run\x20start','env','chdir','Install\x20dependencies','\x20dataset(s),\x20generated\x20'];a144_0x162e=function(){return _0x38f1e2;};return a144_0x162e();}import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x516647){const _0x54796d=a144_0x2f27,_0x4ddeea=await checkCliVersion();(_0x4ddeea[_0x54796d(0xf9)]||_0x4ddeea[_0x54796d(0xcb)])&&(printCliUpgradeWarning(_0x4ddeea),assertCliVersionSupported(_0x4ddeea),logger[_0x54796d(0x116)](_0x54796d(0xdf),_0x54796d(0xfa),{'currentVersion':_0x4ddeea[_0x54796d(0x103)],'stableVersion':_0x4ddeea[_0x54796d(0xf4)],'minimumVersion':_0x4ddeea[_0x54796d(0x10b)],'needsUpgrade':_0x4ddeea[_0x54796d(0xf9)],'belowMinimum':_0x4ddeea[_0x54796d(0xcb)]}));if(_0x516647[_0x54796d(0xc0)]&&_0x516647[_0x54796d(0x10d)])await runCreate({'projectName':_0x516647[_0x54796d(0xc0)],'appCode':_0x516647['appCode'],'env':_0x516647[_0x54796d(0xeb)]},_0x516647);else{if(_0x516647[_0x54796d(0xc0)]){const _0x54c86e=await selectSingleAppcode(_0x516647[_0x54796d(0xe9)]);await runCreate({'projectName':_0x516647[_0x54796d(0xc0)],'appCode':_0x54c86e||undefined,'env':_0x516647[_0x54796d(0xeb)]},_0x516647);}else await guidedCreateProject(_0x643d68=>runCreate(_0x643d68,_0x516647),_0x516647[_0x54796d(0xeb)],_0x516647['cookie']);}}async function runCreate(_0x242fcd,_0xfcf4ff){const _0x188c70=a144_0x2f27;if(!_0x242fcd['projectName']||_0x242fcd[_0x188c70(0xf3)][_0x188c70(0xf0)]()==='')throw new Error(_0x188c70(0xde));const _0x4c56ea=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4c56ea['test'](_0x242fcd['projectName']))throw new Error(_0x188c70(0xc4));if(_0x242fcd['projectName'][_0x188c70(0xce)]>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x22f804=a144_0xbab26c[_0x188c70(0xc8)](process[_0x188c70(0x113)](),_0x242fcd[_0x188c70(0xf3)]);if(a144_0x3191b1[_0x188c70(0x11c)](_0x22f804))throw new Error(_0x188c70(0xd2)+_0x242fcd[_0x188c70(0xf3)]+'\x20already\x20exists');try{a144_0x3191b1[_0x188c70(0x115)](a144_0xbab26c[_0x188c70(0xe7)](_0x22f804),a144_0x3191b1[_0x188c70(0xd8)][_0x188c70(0x110)]);}catch{throw new Error(_0x188c70(0x117));}logger[_0x188c70(0xe5)](_0x22f804),logger[_0x188c70(0x116)]('create',_0x188c70(0xfb)+_0x242fcd['projectName'],{'projectDir':_0x22f804,'appCode':_0x242fcd['appCode']}),console[_0x188c70(0xbe)](),console[_0x188c70(0xbe)](a144_0x9db5a9['green'](_0x188c70(0xc9))+_0x188c70(0xd9)+a144_0x9db5a9['green'](_0x242fcd['projectName'])+(_0x242fcd[_0x188c70(0x10d)]?_0x188c70(0xc5)+a144_0x9db5a9[_0x188c70(0x112)](_0x242fcd[_0x188c70(0x10d)]):''));try{await runTask(_0x188c70(0xe0),()=>copyProjectTemplate(_0x242fcd[_0x188c70(0xf3)])),await updatePackageJsonName(_0x242fcd[_0x188c70(0xf3)]),await runTask(_0x188c70(0xed),()=>installDependencies(_0x242fcd[_0x188c70(0xf3)])),await runTask(_0x188c70(0x118),()=>formatProjectCode(_0x242fcd[_0x188c70(0xf3)])),await configureAppCode(_0x242fcd[_0x188c70(0xf3)],_0x242fcd['appCode']||'',_0x242fcd[_0x188c70(0xeb)]);let _0x26d703=![];if(_0x242fcd[_0x188c70(0x10d)]){console['log'](_0x188c70(0xf1));const _0x4367f0=process[_0x188c70(0x113)]();try{process[_0x188c70(0xec)](_0x22f804);const _0x58220e=_0x242fcd[_0x188c70(0xeb)]||_0x188c70(0xc7);initEnv(_0x58220e);const {configArray:_0x41d5e5}=await fetchModelList(_0x242fcd[_0x188c70(0x10d)],_0xfcf4ff[_0x188c70(0xe9)]||''),_0x2d7486=DEFAULT_API_DIR,_0xf6bd79=await generateApiFile(_0x41d5e5,'',_0x242fcd[_0x188c70(0x10d)],!![],_0x58220e,_0x2d7486);console[_0x188c70(0xbe)](_0x188c70(0xef)+_0x41d5e5[_0x188c70(0xce)]+_0x188c70(0xee)+_0xf6bd79['modelCount']+'\x20model(s)'),logger['info'](_0x188c70(0xdf),_0x188c70(0xe3)+_0x242fcd[_0x188c70(0x10d)]);}catch(_0x53347b){_0x26d703=!![],console[_0x188c70(0xbe)](_0x188c70(0x114)),logger['warn'](_0x188c70(0xdf),_0x188c70(0xcc),{'error':_0x53347b instanceof Error?_0x53347b[_0x188c70(0xc2)]:String(_0x53347b)});}finally{process[_0x188c70(0xec)](_0x4367f0);}}logger[_0x188c70(0xdd)]('create','项目创建完成:\x20'+_0x242fcd[_0x188c70(0xf3)]),console['log'](),console[_0x188c70(0xbe)](a144_0x9db5a9[_0x188c70(0xfd)]('─'[_0x188c70(0xc1)](0x3c))),console[_0x188c70(0xbe)](a144_0x9db5a9[_0x188c70(0x112)]['bold'](_0x188c70(0x10e))),console['log'](),console[_0x188c70(0xbe)](_0x188c70(0xda)+a144_0x9db5a9['cyan'][_0x188c70(0xfe)](_0x188c70(0xcd)+_0x242fcd[_0x188c70(0xf3)]+'\x20&&\x20'+CLI_BIN_NAME+_0x188c70(0xea))),_0x26d703&&console[_0x188c70(0xbe)](_0x188c70(0xe1)+a144_0x9db5a9[_0x188c70(0x112)][_0x188c70(0xfe)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x188c70(0xbe)](a144_0x9db5a9['green']('─'[_0x188c70(0xc1)](0x3c)));}catch(_0x49390c){logger[_0x188c70(0x106)](_0x188c70(0xdf),_0x188c70(0xd7)+_0x242fcd['projectName'],{'error':_0x49390c instanceof Error?_0x49390c[_0x188c70(0xc2)]:String(_0x49390c)});try{a144_0x3191b1[_0x188c70(0x11c)](_0x22f804)&&(console[_0x188c70(0xbe)](_0x188c70(0xcf)+_0x22f804),a144_0x3191b1['rmSync'](_0x22f804,{'recursive':!![],'force':!![]}));}catch{logger[_0x188c70(0x11f)](_0x188c70(0xdf),_0x188c70(0xca)+_0x22f804);}throw _0x49390c;}}async function runTask(_0x26f3ee,_0x1b006b){const _0x207e42=a144_0x2f27,_0x1b4218=a144_0x3ef576(_0x26f3ee+_0x207e42(0xc6))[_0x207e42(0x100)]();try{const _0x21bc31=await _0x1b006b();_0x1b4218[_0x207e42(0xdc)](),console[_0x207e42(0xbe)](''+a144_0x9db5a9[_0x207e42(0xfd)]('\x20√\x20')+_0x26f3ee+'\x20'+a144_0x9db5a9['gray']('['+_0x21bc31+']'));}catch(_0x86a122){_0x1b4218[_0x207e42(0xd3)](_0x26f3ee);throw _0x86a122;}}async function updatePackageJsonName(_0x4577f4){const _0x331a14=a144_0x2f27,_0x41e38c=a144_0xbab26c[_0x331a14(0xc8)](process[_0x331a14(0x113)](),_0x4577f4),_0x54caf7=a144_0xbab26c[_0x331a14(0x119)](_0x41e38c,'package.json');try{console[_0x331a14(0xbe)](_0x331a14(0x111));const _0x1065f9=getRabetbaseCliPackageRoot(),_0x8e884f=a144_0xbab26c[_0x331a14(0x119)](_0x1065f9,_0x331a14(0xd4));let _0x384f1c='1.0.0';try{const _0x411947=JSON['parse'](a144_0x3191b1[_0x331a14(0x11e)](_0x8e884f,_0x331a14(0xf8)));_0x384f1c=_0x411947[_0x331a14(0xe8)]||'1.0.0';}catch{}const _0x42d05e=a144_0x3191b1[_0x331a14(0x11e)](_0x54caf7,_0x331a14(0xf8)),_0x854df3=JSON['parse'](_0x42d05e);_0x854df3[_0x331a14(0xff)]=_0x4577f4,_0x854df3['description']=_0x4577f4+_0x331a14(0x107)+_0x384f1c,a144_0x3191b1[_0x331a14(0x11a)](_0x54caf7,JSON[_0x331a14(0xdb)](_0x854df3,null,0x2)+'\x0a',_0x331a14(0xf8)),console['log'](_0x331a14(0xf7)+_0x4577f4),logger[_0x331a14(0x116)]('create','更新\x20package.json\x20name');}catch(_0x16bac4){logger[_0x331a14(0x106)]('create',_0x331a14(0xd5));throw _0x16bac4;}}async function configureAppCode(_0x1c667f,_0x2c6d8f,_0x5e0e7f){const _0x20d2c9=a144_0x2f27,_0x1fb56d=a144_0xbab26c[_0x20d2c9(0xc8)](process[_0x20d2c9(0x113)](),_0x1c667f),_0x46b261=a144_0xbab26c[_0x20d2c9(0x119)](_0x1fb56d,NEW_CONFIG_NAME);try{_0x2c6d8f?console[_0x20d2c9(0xbe)](_0x20d2c9(0xf2)+_0x1c667f+':\x20'+_0x2c6d8f):console['log'](_0x20d2c9(0xd0)+_0x1c667f);const _0xd0d4ef=getRabetbaseCliPackageRoot(),_0x22c66b=a144_0xbab26c[_0x20d2c9(0x119)](_0xd0d4ef,_0x20d2c9(0xd4));let _0x3bb23d='1.0.0';try{const _0x2a1704=JSON[_0x20d2c9(0xe4)](a144_0x3191b1[_0x20d2c9(0x11e)](_0x22c66b,'utf8'));_0x3bb23d=_0x2a1704[_0x20d2c9(0xe8)]||_0x20d2c9(0xd6);}catch{}const _0x4f29ed=readConfig(),_0x5036ea=typeof _0x4f29ed[_0x20d2c9(0xeb)]===_0x20d2c9(0xe2)?_0x4f29ed[_0x20d2c9(0xeb)]:undefined,_0x3070ad={};for(const _0x31fa1b of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4f29ed[_0x31fa1b]!=null)_0x3070ad[_0x31fa1b]=_0x4f29ed[_0x31fa1b];}const _0x123da3=buildCanonicalProjectConfig(_0x3070ad,{'appCodes':_0x2c6d8f?[_0x2c6d8f]:[],'env':_0x5e0e7f||_0x5036ea||_0x20d2c9(0xc7),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x3bb23d}});writeConfigFile(_0x46b261,_0x123da3),_0x2c6d8f?console[_0x20d2c9(0xbe)](_0x20d2c9(0x10f)+Object[_0x20d2c9(0xfc)](_0x123da3[_0x20d2c9(0xf6)]||{})[_0x20d2c9(0x119)](',\x20')+_0x20d2c9(0xf5)+_0x123da3['defaultApp']):console[_0x20d2c9(0xbe)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x20d2c9(0xe6)),logger[_0x20d2c9(0x116)](_0x20d2c9(0xdf),_0x20d2c9(0xd1)+_0x2c6d8f);}catch(_0x12da25){logger[_0x20d2c9(0x106)](_0x20d2c9(0xdf),_0x20d2c9(0x109));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14f688,_0x561382){const _0x1b3c78=a145_0x4e30,_0x1df95c=_0x14f688();while(!![]){try{const _0x2c6bcb=-parseInt(_0x1b3c78(0x1ee))/0x1*(parseInt(_0x1b3c78(0x1c9))/0x2)+parseInt(_0x1b3c78(0x1f0))/0x3*(parseInt(_0x1b3c78(0x1d6))/0x4)+parseInt(_0x1b3c78(0x1de))/0x5*(-parseInt(_0x1b3c78(0x1c1))/0x6)+parseInt(_0x1b3c78(0x1c0))/0x7*(-parseInt(_0x1b3c78(0x1d8))/0x8)+-parseInt(_0x1b3c78(0x1e9))/0x9+parseInt(_0x1b3c78(0x1e3))/0xa*(parseInt(_0x1b3c78(0x1e0))/0xb)+parseInt(_0x1b3c78(0x1d7))/0xc;if(_0x2c6bcb===_0x561382)break;else _0x1df95c['push'](_0x1df95c['shift']());}catch(_0x571401){_0x1df95c['push'](_0x1df95c['shift']());}}}(a145_0x43e5,0xe601e));import a145_0x763727 from'path';import a145_0x4b6d0e from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';function a145_0x4e30(_0x154f74,_0x384987){_0x154f74=_0x154f74-0x1c0;const _0x43e5cc=a145_0x43e5();let _0x4e3090=_0x43e5cc[_0x154f74];return _0x4e3090;}import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';function a145_0x43e5(){const _0x31a857=['production','needsUpgrade','10yIvAzm','env','readFile','\x20\x20Installing\x20dependencies...','\x20model(s)','\x20\x20rabetbase\x20run\x20start\x0a','15431148mdajWl','Use\x20a\x20different\x20project\x20name.','\x20\x20√\x20Configuration\x20file\x20created','package.json','test','1wFLxTs','\x22\x20already\x20exists.','6LuQjEP','Cannot\x20create\x20project\x20in\x20current\x20directory.','Project\x20directory\x20\x22','...','W_OK','\x20\x20√\x20Code\x20formatted','stringify','301YlnFMA','10652142msYpmS','dirname','\x20api\x20pull`\x20manually\x20later.','length','access','\x0a√\x20Project\x20','\x20created\x20successfully!','trim','3745352cRnIOp','chdir','\x20\x20Pulling\x20API\x20configuration...','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','bun\x20--version','string','bun\x20run\x20format','validation','cwd','resolve','log','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','belowMinimum','345440hQPERs','74618544lKGUeR','164080lCzmjW','\x20\x20√\x20package.json\x20updated','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','*\x20Creating\x20project\x20','description','Project\x20name\x20contains\x20invalid\x20characters.','5PQLFGw','join','8752843eFgMMb'];a145_0x43e5=function(){return _0x31a857;};return a145_0x43e5();}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(_0x419808,_0x580e68,_0x13794e,_0x40929c){const _0x52d436=a145_0x4e30,_0x8790da=await checkCliVersion();(_0x8790da[_0x52d436(0x1e2)]||_0x8790da[_0x52d436(0x1d5)])&&(printCliUpgradeWarning(_0x8790da),assertCliVersionSupported(_0x8790da));if(!_0x419808||_0x419808[_0x52d436(0x1c8)]()==='')throw CliErrors[_0x52d436(0x1d0)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x197eb3=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x197eb3[_0x52d436(0x1ed)](_0x419808))throw CliErrors[_0x52d436(0x1d0)](_0x52d436(0x1dd),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x419808['length']>0x64)throw CliErrors['validation'](_0x52d436(0x1d4));const _0x103df2=a145_0x763727['resolve'](process[_0x52d436(0x1d1)](),_0x419808);if(existsSync(_0x103df2))throw CliErrors[_0x52d436(0x1d0)](_0x52d436(0x1f2)+_0x419808+_0x52d436(0x1ef),_0x52d436(0x1ea));try{const _0x20b81d=a145_0x763727[_0x52d436(0x1c2)](_0x103df2);await a145_0x4b6d0e[_0x52d436(0x1c5)](_0x20b81d,a145_0x4b6d0e['constants'][_0x52d436(0x1f4)]);}catch{throw CliErrors[_0x52d436(0x1d0)](_0x52d436(0x1f1),'Check\x20directory\x20permissions.');}try{console[_0x52d436(0x1d3)](_0x52d436(0x1db)+_0x419808+_0x52d436(0x1f3));const _0x53d9a7=getSubAppReactDemoTemplateDir();await copyDirectory(_0x53d9a7,_0x103df2),console[_0x52d436(0x1d3)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x419808),console[_0x52d436(0x1d3)](_0x52d436(0x1d9)),console[_0x52d436(0x1d3)](_0x52d436(0x1e6)),console[_0x52d436(0x1d3)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x103df2),console[_0x52d436(0x1d3)](_0x52d436(0x1f5)),await configureProject(_0x419808,_0x13794e,_0x580e68),console[_0x52d436(0x1d3)](_0x52d436(0x1eb)),_0x13794e&&await pullApiConfig(_0x103df2,_0x13794e,_0x580e68,_0x40929c),console[_0x52d436(0x1d3)](_0x52d436(0x1c6)+_0x419808+_0x52d436(0x1c7)),console[_0x52d436(0x1d3)]('\x0a\x20\x20cd\x20'+_0x419808),console[_0x52d436(0x1d3)](_0x52d436(0x1e8));}catch(_0x26d21a){try{existsSync(_0x103df2)&&await a145_0x4b6d0e['rm'](_0x103df2,{'recursive':!![],'force':!![]});}catch{}throw _0x26d21a;}}async function updatePackageJsonName(_0x7aa037){const _0x5ccc31=a145_0x4e30,_0x315817=a145_0x763727[_0x5ccc31(0x1d2)](process[_0x5ccc31(0x1d1)](),_0x7aa037),_0xb7ba00=a145_0x763727[_0x5ccc31(0x1df)](_0x315817,_0x5ccc31(0x1ec)),_0x2a1cc5=await a145_0x4b6d0e[_0x5ccc31(0x1e5)](_0xb7ba00,'utf-8'),_0x53eb46=JSON['parse'](_0x2a1cc5);_0x53eb46['name']=_0x7aa037,_0x53eb46[_0x5ccc31(0x1dc)]=_0x5ccc31(0x1cc),await a145_0x4b6d0e['writeFile'](_0xb7ba00,JSON[_0x5ccc31(0x1f6)](_0x53eb46,null,0x2)+'\x0a');}function detectPackageManager(){const _0x4730c0=a145_0x4e30;try{return execSync(_0x4730c0(0x1cd),{'stdio':'ignore'}),'bun';}catch{return'npm';}}async function formatCode(_0x5b144d){const _0x30e74a=a145_0x4e30;try{await execAsync(_0x30e74a(0x1cf),{'cwd':_0x5b144d});}catch{}}async function configureProject(_0xf20e49,_0x2f75eb,_0x5df627){const _0xa9d437=a145_0x4e30,_0x48879c=a145_0x763727[_0xa9d437(0x1d2)](process[_0xa9d437(0x1d1)](),_0xf20e49),_0x1056be=a145_0x763727[_0xa9d437(0x1df)](_0x48879c,NEW_CONFIG_NAME),_0x3ba381=readConfig(),_0x1d8442=typeof _0x3ba381[_0xa9d437(0x1e4)]===_0xa9d437(0x1ce)?_0x3ba381[_0xa9d437(0x1e4)]:undefined,_0x3d23eb={};for(const _0x552c97 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3ba381[_0x552c97]!=null)_0x3d23eb[_0x552c97]=_0x3ba381[_0x552c97];}const _0x42b58a=buildCanonicalProjectConfig(_0x3d23eb,{'appCodes':_0x2f75eb?[_0x2f75eb]:[],'env':_0x5df627||_0x1d8442||_0xa9d437(0x1e1),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x1056be,_0x42b58a);}async function pullApiConfig(_0x2938c3,_0x4d248d,_0x7b882a,_0x2b52b1){const _0x5dc7bd=a145_0x4e30,_0x143294=process[_0x5dc7bd(0x1d1)]();try{process[_0x5dc7bd(0x1ca)](_0x2938c3);const _0x4f16ae=_0x7b882a||'production';initEnv(_0x4f16ae),console['log'](_0x5dc7bd(0x1cb));const {configArray:_0x398220}=await fetchModelList(_0x4d248d,_0x2b52b1||''),_0x58aad3=await generateApiFile(_0x398220,'',_0x4d248d,!![],_0x4f16ae,DEFAULT_API_DIR);console[_0x5dc7bd(0x1d3)]('\x20\x20√\x20Pulled\x20'+_0x398220[_0x5dc7bd(0x1c4)]+'\x20dataset(s),\x20generated\x20'+_0x58aad3['modelCount']+_0x5dc7bd(0x1e7));}catch(_0x3eafe2){console['log'](_0x5dc7bd(0x1da)+CLI_BIN_NAME+_0x5dc7bd(0x1c3));}finally{process[_0x5dc7bd(0x1ca)](_0x143294);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0x527960=a146_0x467c;(function(_0x273e66,_0x49d14d){const _0xbdf46f=a146_0x467c,_0xe619ca=_0x273e66();while(!![]){try{const _0x3c9abb=parseInt(_0xbdf46f(0xc3))/0x1*(-parseInt(_0xbdf46f(0xd1))/0x2)+parseInt(_0xbdf46f(0xc6))/0x3*(-parseInt(_0xbdf46f(0xd0))/0x4)+-parseInt(_0xbdf46f(0xc8))/0x5+-parseInt(_0xbdf46f(0xc4))/0x6+-parseInt(_0xbdf46f(0xcc))/0x7*(-parseInt(_0xbdf46f(0xcb))/0x8)+parseInt(_0xbdf46f(0xcd))/0x9+parseInt(_0xbdf46f(0xce))/0xa;if(_0x3c9abb===_0x49d14d)break;else _0xe619ca['push'](_0xe619ca['shift']());}catch(_0x17fe36){_0xe619ca['push'](_0xe619ca['shift']());}}}(a146_0x1191,0x9dbcd));import a146_0x4ee2f2 from'node:path';import{fileURLToPath}from'node:url';function a146_0x1191(){const _0x2939f4=['../../../../','231SXQnss','dirname','1303105TAUQYm','sub-app-react-demo','resolve','50864cIKjGQ','1421ReerJC','1215720OVldnZ','19221000FoAHgC','projects','15524uCdHoX','3262RgUrmO','join','655AfkAdA','6443988PfKaJe'];a146_0x1191=function(){return _0x2939f4;};return a146_0x1191();}const __dirname=a146_0x4ee2f2[a146_0x527960(0xc7)](fileURLToPath(import.meta.url));function a146_0x467c(_0x124693,_0x5b13a0){_0x124693=_0x124693-0xc3;const _0x119139=a146_0x1191();let _0x467c95=_0x119139[_0x124693];return _0x467c95;}export function getRabetbaseCliPackageRoot(){const _0x1f0e48=a146_0x527960;return a146_0x4ee2f2[_0x1f0e48(0xca)](__dirname,_0x1f0e48(0xc5));}export function getSubAppReactDemoTemplateDir(){const _0x405ccd=a146_0x527960;return a146_0x4ee2f2[_0x405ccd(0xd2)](getRabetbaseCliPackageRoot(),'templates',_0x405ccd(0xcf),_0x405ccd(0xc9));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x550e0e,_0x3c93c2){const _0x4815b4=a147_0x4c0a,_0x4835c0=_0x550e0e();while(!![]){try{const _0x4a069a=-parseInt(_0x4815b4(0x9e))/0x1*(parseInt(_0x4815b4(0x8f))/0x2)+parseInt(_0x4815b4(0x9c))/0x3+-parseInt(_0x4815b4(0x97))/0x4+-parseInt(_0x4815b4(0x93))/0x5+parseInt(_0x4815b4(0x8e))/0x6+parseInt(_0x4815b4(0x9b))/0x7*(-parseInt(_0x4815b4(0x96))/0x8)+parseInt(_0x4815b4(0x92))/0x9;if(_0x4a069a===_0x3c93c2)break;else _0x4835c0['push'](_0x4835c0['shift']());}catch(_0x35c471){_0x4835c0['push'](_0x4835c0['shift']());}}}(a147_0x391c,0x6f944));import a147_0x28ab13 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();function a147_0x391c(){const _0x3b44da=['2586356DwQTBH','resolve','now','cwd','266tNayON','1772478TTAzHv','开始复制项目模板','6453AcQXXB','3295152xunUuQ','164CXMuXx','copy','项目模板复制完成','12669453DUoJVv','149570WgOOZN','success','message','186328zHSUiP'];a147_0x391c=function(){return _0x3b44da;};return a147_0x391c();}function a147_0x4c0a(_0x5d9508,_0x5a8100){_0x5d9508=_0x5d9508-0x8e;const _0x391c07=a147_0x391c();let _0x4c0ac8=_0x391c07[_0x5d9508];return _0x4c0ac8;}export async function copyProjectTemplate(_0x5ad9ee){const _0x5ea66e=a147_0x4c0a,_0x3c8f1b=Date[_0x5ea66e(0x99)](),_0x1de548=a147_0x28ab13[_0x5ea66e(0x98)](process[_0x5ea66e(0x9a)](),_0x5ad9ee);try{logger['info']('copy',_0x5ea66e(0x9d),{'projectCode':_0x5ad9ee,'templateDir':templateDir}),await copyDirectory(templateDir,_0x1de548);const _0x226083=Date[_0x5ea66e(0x99)]()-_0x3c8f1b;logger[_0x5ea66e(0x94)](_0x5ea66e(0x90),_0x5ea66e(0x91),_0x226083,{'projectCode':_0x5ad9ee});}catch(_0x364344){const _0x2a5574=Date[_0x5ea66e(0x99)]()-_0x3c8f1b;logger['error'](_0x5ea66e(0x90),'项目模板复制失败',{'projectCode':_0x5ad9ee,'error':_0x364344 instanceof Error?_0x364344[_0x5ea66e(0x95)]:String(_0x364344),'duration':_0x2a5574});throw _0x364344;}return formatElapsed(_0x3c8f1b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2639b4,_0x752275){const _0x173958=a148_0x3349,_0x1643b6=_0x2639b4();while(!![]){try{const _0x18d0e3=parseInt(_0x173958(0x96))/0x1+parseInt(_0x173958(0xa3))/0x2+-parseInt(_0x173958(0x98))/0x3*(-parseInt(_0x173958(0x9b))/0x4)+-parseInt(_0x173958(0xa4))/0x5*(parseInt(_0x173958(0xa1))/0x6)+parseInt(_0x173958(0x9f))/0x7+parseInt(_0x173958(0x97))/0x8+-parseInt(_0x173958(0xa5))/0x9;if(_0x18d0e3===_0x752275)break;else _0x1643b6['push'](_0x1643b6['shift']());}catch(_0x2b67a0){_0x1643b6['push'](_0x1643b6['shift']());}}}(a148_0x2250,0x19eeb));import a148_0x241d5a from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a148_0x3349(_0x37c6fc,_0x33c54d){_0x37c6fc=_0x37c6fc-0x94;const _0x225066=a148_0x2250();let _0x3349bd=_0x225066[_0x37c6fc];return _0x3349bd;}import{logger}from'../../../utils/logger.js';function a148_0x2250(){const _0x355b81=['npx','开始格式化代码','prettier','1234870dfRedi','resolve','6nujHry','now','52940eMAZfE','179890WJcBtI','4395015FQMcNJ','info','cwd','--write','format','message','185370xkSeWL','981784LUJstj','358677fTRdoW','error','代码格式化失败','4GjxOvw'];a148_0x2250=function(){return _0x355b81;};return a148_0x2250();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0xcf69a5){const _0x2101f7=a148_0x3349,_0x3f9606=Date[_0x2101f7(0xa2)](),_0x548632=a148_0x241d5a[_0x2101f7(0xa0)](process[_0x2101f7(0xa7)](),_0xcf69a5);try{logger[_0x2101f7(0xa6)](_0x2101f7(0x94),_0x2101f7(0x9d),{'projectCode':_0xcf69a5}),await execa(resolveNpmBin(_0x2101f7(0x9c)),[_0x2101f7(0x9e),_0x2101f7(0xa8),'.'],{'cwd':_0x548632});const _0x3b9bc7=Date[_0x2101f7(0xa2)]()-_0x3f9606;logger['success'](_0x2101f7(0x94),'代码格式化完成',_0x3b9bc7,{'projectCode':_0xcf69a5});}catch(_0x31f1e1){const _0x5bc00a=Date[_0x2101f7(0xa2)]()-_0x3f9606;logger[_0x2101f7(0x99)]('format',_0x2101f7(0x9a),{'projectCode':_0xcf69a5,'error':_0x31f1e1 instanceof Error?_0x31f1e1[_0x2101f7(0x95)]:String(_0x31f1e1),'duration':_0x5bc00a});throw _0x31f1e1;}return formatElapsed(_0x3f9606);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a149_0x31b3(_0x16149a,_0x26c370){_0x16149a=_0x16149a-0xa9;const _0x1ee343=a149_0x1ee3();let _0x31b357=_0x1ee343[_0x16149a];return _0x31b357;}(function(_0x174fac,_0x254f54){const _0xd87ef7=a149_0x31b3,_0xd99577=_0x174fac();while(!![]){try{const _0x589d07=-parseInt(_0xd87ef7(0xbe))/0x1*(-parseInt(_0xd87ef7(0xba))/0x2)+-parseInt(_0xd87ef7(0xb8))/0x3+parseInt(_0xd87ef7(0xb7))/0x4+parseInt(_0xd87ef7(0xb9))/0x5+-parseInt(_0xd87ef7(0xb1))/0x6*(-parseInt(_0xd87ef7(0xab))/0x7)+parseInt(_0xd87ef7(0xad))/0x8+-parseInt(_0xd87ef7(0xb4))/0x9;if(_0x589d07===_0x254f54)break;else _0xd99577['push'](_0xd99577['shift']());}catch(_0x4adc84){_0xd99577['push'](_0xd99577['shift']());}}}(a149_0x1ee3,0xe527b));import a149_0x4ad217 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a149_0x1ee3(){const _0x1f7b3a=['info','message','1111914ouKedT','依赖安装完成','--registry','19352862AOcamM','resolve','install','3853384IUGlZp','629532uWsOpt','2277030oOhmrF','1905334xajPMO','cwd','依赖安装失败','npm','1JdssaA','now','error','28LVVVaK','开始安装依赖','1488688aLGWSh','https://registry.npmmirror.com'];a149_0x1ee3=function(){return _0x1f7b3a;};return a149_0x1ee3();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x14a1b){const _0x431047=a149_0x31b3,_0x3d2844=Date[_0x431047(0xa9)](),_0x5ea88b=a149_0x4ad217[_0x431047(0xb5)](process[_0x431047(0xbb)](),_0x14a1b);try{logger[_0x431047(0xaf)](_0x431047(0xb6),_0x431047(0xac),{'projectCode':_0x14a1b,'registry':_0x431047(0xae)}),await execa(resolveNpmBin(_0x431047(0xbd)),[_0x431047(0xb6),_0x431047(0xb3),_0x431047(0xae)],{'cwd':_0x5ea88b});const _0x355b30=Date[_0x431047(0xa9)]()-_0x3d2844;logger['success'](_0x431047(0xb6),_0x431047(0xb2),_0x355b30,{'projectCode':_0x14a1b});}catch(_0x405c22){const _0x3c26b5=Date[_0x431047(0xa9)]()-_0x3d2844;logger[_0x431047(0xaa)](_0x431047(0xb6),_0x431047(0xbc),{'projectCode':_0x14a1b,'error':_0x405c22 instanceof Error?_0x405c22[_0x431047(0xb0)]:String(_0x405c22),'duration':_0x3c26b5});throw _0x405c22;}return formatElapsed(_0x3d2844);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a150_0x1f9fc5=a150_0x5875;(function(_0x1c41c7,_0x418140){const _0xbcee93=a150_0x5875,_0x3553fb=_0x1c41c7();while(!![]){try{const _0xe06f20=-parseInt(_0xbcee93(0xee))/0x1+-parseInt(_0xbcee93(0x109))/0x2*(parseInt(_0xbcee93(0xf4))/0x3)+-parseInt(_0xbcee93(0x10d))/0x4*(parseInt(_0xbcee93(0x10b))/0x5)+parseInt(_0xbcee93(0xef))/0x6*(parseInt(_0xbcee93(0xf0))/0x7)+-parseInt(_0xbcee93(0x106))/0x8+-parseInt(_0xbcee93(0xf2))/0x9+parseInt(_0xbcee93(0x111))/0xa;if(_0xe06f20===_0x418140)break;else _0x3553fb['push'](_0x3553fb['shift']());}catch(_0x1ea628){_0x3553fb['push'](_0x3553fb['shift']());}}}(a150_0x1073,0x5bc6e));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';function a150_0x1073(){const _0x221431=['Skip\x20confirmation\x20prompt','10caXVit','App\x20code\x20to\x20initialize','785716pnueFr','Target\x20environment','boolean','yes','14688990AmpsXi','Project\x20name','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','124053ZBeCNg','6kLrmxj','3783227fyqccj','nonInteractive','3092661nvEWRo','str','36MOUBrf','Auto-confirm\x20prompts','project','name','init','Usage:\x20','args','string','../../commands/project/create/main.js','trim','env','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','\x20workspace\x20init','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','project-name','write','cookie','bool','742800svUyTD','appcode','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','113342gZTPvR'];a150_0x1073=function(){return _0x221431;};return a150_0x1073();}function a150_0x5875(_0x2707f6,_0x1c7882){_0x2707f6=_0x2707f6-0xee;const _0x107346=a150_0x1073();let _0x5875e0=_0x107346[_0x2707f6];return _0x5875e0;}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a150_0x1f9fc5(0x107),'type':a150_0x1f9fc5(0xfb),'description':a150_0x1f9fc5(0x10c)},{'name':a150_0x1f9fc5(0xfe),'type':a150_0x1f9fc5(0xfb),'description':'Target\x20environment'},{'name':a150_0x1f9fc5(0x110),'type':a150_0x1f9fc5(0x10f),'description':a150_0x1f9fc5(0xf5),'default':![]}],createFlags=[{'name':a150_0x1f9fc5(0xf7),'type':a150_0x1f9fc5(0xfb),'description':a150_0x1f9fc5(0x112)},{'name':a150_0x1f9fc5(0xfe),'type':a150_0x1f9fc5(0xfb),'description':a150_0x1f9fc5(0x10e)},{'name':'appcode','type':'string','description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a150_0x1f9fc5(0x110),'type':'boolean','description':a150_0x1f9fc5(0x10a),'default':![]}];export const projectDefinitions=[{'service':a150_0x1f9fc5(0xf6),'command':a150_0x1f9fc5(0xf8),'description':a150_0x1f9fc5(0xff),'risk':a150_0x1f9fc5(0x103),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a150_0x1f9fc5(0x100),'since':'2026-07'},'flags':initFlags,async 'execute'(_0xb62e20){const _0x2b4f57=a150_0x1f9fc5;return await initConfig({'appcode':_0xb62e20[_0x2b4f57(0xf3)](_0x2b4f57(0x107))||undefined,'env':_0xb62e20[_0x2b4f57(0xf3)](_0x2b4f57(0xfe))||undefined,'autoYes':_0xb62e20[_0x2b4f57(0x105)](_0x2b4f57(0x110))}),{'ok':!![]};}},{'service':'project','command':'create','description':'Create\x20a\x20new\x20project','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a150_0x1f9fc5(0x102),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x26be07){const _0x2e63a9=a150_0x1f9fc5,{createApp:_0x7bd03c}=await import(_0x2e63a9(0xfc)),{createProjectNonInteractive:_0xa98dbe}=await import('../../commands/project/create/non-interactive.js'),_0x4a569e=_0x26be07[_0x2e63a9(0xf3)](_0x2e63a9(0xf7))['trim']()||_0x26be07[_0x2e63a9(0xfa)][0x0]?.[_0x2e63a9(0xfd)](),_0x2389af=_0x26be07[_0x2e63a9(0xf3)](_0x2e63a9(0xfe))||undefined,_0x40d506=_0x26be07['str'](_0x2e63a9(0x107))||undefined;if(_0x26be07[_0x2e63a9(0xf1)]){if(!_0x4a569e)throw CliErrors['validation'](_0x2e63a9(0x108),_0x2e63a9(0xf9)+CLI_BIN_NAME+_0x2e63a9(0x113));await _0xa98dbe(_0x4a569e,_0x2389af,_0x40d506,_0x26be07['cookie']);}else await _0x7bd03c({'projectCode':_0x4a569e,'appCode':_0x40d506,'env':_0x2389af,'cookie':_0x26be07[_0x2e63a9(0x104)]});return{'ok':!![]};}},{'service':a150_0x1f9fc5(0xf6),'command':'upgrade','description':a150_0x1f9fc5(0x101),'risk':a150_0x1f9fc5(0x103),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x37dd7e){const _0x2ce137=a150_0x1f9fc5;return await upgradeApp(_0x37dd7e[_0x2ce137(0xf1)],{'yes':_0x37dd7e[_0x2ce137(0x105)]('yes')}),{'ok':!![]};}}];
|