@lovrabet/rabetbase-cli 2.3.15 → 2.3.16-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/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/kb/create.js +1 -0
- package/lib/commands/kb/delete.js +1 -0
- package/lib/commands/kb/detail.js +1 -0
- package/lib/commands/kb/index.js +1 -0
- package/lib/commands/kb/list.js +1 -0
- package/lib/commands/kb/shared.js +1 -0
- package/lib/commands/kb/update.js +1 -0
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/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/restore.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/tenant/index.js +1 -0
- package/lib/commands/tenant/members-list.js +1 -0
- package/lib/commands/tenant/shared.js +1 -0
- 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/skills/skill-presence.js +1 -0
- 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 +2 -2
- package/lib/commands/app/add.js +0 -1
- package/lib/commands/app/remove.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a149_0x431a69=a149_0x456e;(function(_0x18ec5f,_0x427fbe){const _0x31f5c6=a149_0x456e,_0x3eb350=_0x18ec5f();while(!![]){try{const _0x25733a=-parseInt(_0x31f5c6(0x1f3))/0x1*(parseInt(_0x31f5c6(0x1d5))/0x2)+parseInt(_0x31f5c6(0x1f6))/0x3*(-parseInt(_0x31f5c6(0x1d7))/0x4)+parseInt(_0x31f5c6(0x1f5))/0x5+parseInt(_0x31f5c6(0x1da))/0x6*(-parseInt(_0x31f5c6(0x1ef))/0x7)+parseInt(_0x31f5c6(0x1e7))/0x8*(parseInt(_0x31f5c6(0x1e6))/0x9)+parseInt(_0x31f5c6(0x1ec))/0xa*(parseInt(_0x31f5c6(0x1f7))/0xb)+parseInt(_0x31f5c6(0x1dd))/0xc*(-parseInt(_0x31f5c6(0x1e0))/0xd);if(_0x25733a===_0x427fbe)break;else _0x3eb350['push'](_0x3eb350['shift']());}catch(_0x27d974){_0x3eb350['push'](_0x3eb350['shift']());}}}(a149_0x1fe3,0xeefa7));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';function a149_0x456e(_0x26ea8a,_0x53ff19){_0x26ea8a=_0x26ea8a-0x1d1;const _0x1fe38e=a149_0x1fe3();let _0x456eb7=_0x1fe38e[_0x26ea8a];return _0x456eb7;}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=a149_0x431a69(0x1db);async function buildPlan(_0x23ec58,_0x21df3a){const _0x5c2a6d=a149_0x431a69,_0xb28503=await resolveRoleRef(_0x23ec58[_0x5c2a6d(0x1de)],readRoleRef(_0x23ec58));assertPermConfigurable(_0xb28503);const _0x170830=readGrantRevoke(_0x23ec58),_0x4de7b4=splitList(_0x23ec58[_0x5c2a6d(0x1f0)](_0x5c2a6d(0x1d4)));if(_0x4de7b4[_0x5c2a6d(0x1d1)]===0x0)throw CliErrors[_0x5c2a6d(0x1d3)](_0x5c2a6d(0x1d4),'Pass\x20--menus\x20<resourceCode,...>.');const _0x37670f=await getRoleMenuResources(_0x23ec58[_0x5c2a6d(0x1de)],_0xb28503['id']),_0x1d8639=flattenMenuResources(_0x37670f),_0xaf5cee=_0x4de7b4['filter'](_0xd73c76=>!_0x1d8639[_0x5c2a6d(0x1e4)](_0xd73c76));if(_0xaf5cee['length']>0x0)throw CliErrors[_0x5c2a6d(0x1ea)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0xaf5cee[_0x5c2a6d(0x1e9)](',\x20')+'.',_0x5c2a6d(0x1dc));const _0x358715=new Map(),_0xbcbd44=[],_0x2cb032=[];for(const _0xef2577 of _0x4de7b4){const _0xbb4001=_0x1d8639[_0x5c2a6d(0x1f4)](_0xef2577);_0x358715[_0x5c2a6d(0x1d6)](_0xef2577,_0x170830),_0xbcbd44[_0x5c2a6d(0x1f2)]({'resourceCode':_0xef2577,'action':_0xbb4001['action']}),_0x2cb032['push']({'resourceCode':_0xef2577,'action':_0x170830});}const _0xf334ca=buildPermits(_0x1d8639,_0x358715),_0x187153={'operation':_0x170830==='access'?_0x5c2a6d(0x1ed):_0x5c2a6d(0x1d2),'selector':{'appCode':_0x23ec58['appCode'],'roleId':_0xb28503['id'],'roleName':_0xb28503['roleName'],'resourceCodes':_0x4de7b4},'before':_0xbcbd44,'after':_0x2cb032,'dryRun':_0x21df3a,'backend':{'method':_0x5c2a6d(0x1e3),'path':UPDATE_PATH,'roleType':_0x5c2a6d(0x1d9)},'warnings':[]};return{'role':_0xb28503,'permits':_0xf334ca,'mutation':_0x187153};}function a149_0x1fe3(){const _0x5a4db0=['\x20menu\x20permit(s)\x20for\x20role\x20','3913ntCpzd','permit','roleName','POST','has','high-risk-write','99ngUVij','965920KLCbfr','resourceCodes','join','validation','Updated\x20','2769310GLSgOM','menu-grant','Pass\x20--menus\x20<resourceCode,...>.','363279cUYAOe','str','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','push','1yolXzi','get','6726440zWvAbr','3baivAO','22VXiMrA','role-menus-set','length','menu-revoke','flagMissing','menus','1096674zvJHaU','set','301148pQtWVG','selector','PAGE','174bFPlwV','/smartapi/permit/role/update','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','4776WFGYDO','appCode'];a149_0x1fe3=function(){return _0x5a4db0;};return a149_0x1fe3();}export const permitRoleMenusSet={'service':a149_0x431a69(0x1e1),'command':a149_0x431a69(0x1f8),'description':a149_0x431a69(0x1f1),'risk':a149_0x431a69(0x1e5),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x221c0d){const _0x4403c4=a149_0x431a69;readGrantRevoke(_0x221c0d);if(splitList(_0x221c0d['str'](_0x4403c4(0x1d4)))[_0x4403c4(0x1d1)]===0x0)throw CliErrors[_0x4403c4(0x1d3)](_0x4403c4(0x1d4),_0x4403c4(0x1ee));},async 'dryRun'(_0x2e6df7){const _0x4b7c14=a149_0x431a69,{mutation:_0x414eba}=await buildPlan(_0x2e6df7,!![]);return asDryRunResult(_0x414eba,{'method':_0x4b7c14(0x1e3),'url':UPDATE_PATH});},async 'execute'(_0x2d2911){const _0x212784=a149_0x431a69,{role:_0x5b61fa,permits:_0x29bd25,mutation:_0x57f73a}=await buildPlan(_0x2d2911,![]);return await updateAppRole({'id':_0x5b61fa['id'],'appCode':_0x2d2911[_0x212784(0x1de)],'roleType':_0x212784(0x1d9),'permits':_0x29bd25}),{'ok':!![],'data':_0x57f73a,'message':_0x212784(0x1eb)+_0x57f73a[_0x212784(0x1d8)][_0x212784(0x1e8)][_0x212784(0x1d1)]+_0x212784(0x1df)+_0x5b61fa[_0x212784(0x1e2)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a150_0x278d(){const _0x537179=['\x20menu(s)\x20allowed','appCode','7763KYCMYQ','172FMcxBR','values','resourceName','permit','53706IlLbqQ','3127040rxaMkq','filter','role-menus','1343160aesIiQ','action','length','read','allowed','access','338325paWlcx','resourceCode','roleName','7136izomBH','from','10326447PnYsHC','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','map','\x20has\x20','105952BKrpFr'];a150_0x278d=function(){return _0x537179;};return a150_0x278d();}const a150_0xd57fee=a150_0x4d2e;(function(_0x321375,_0x1818cf){const _0x5acb30=a150_0x4d2e,_0x505890=_0x321375();while(!![]){try{const _0x19d61f=parseInt(_0x5acb30(0x12f))/0x1+-parseInt(_0x5acb30(0x138))/0x2+parseInt(_0x5acb30(0x125))/0x3*(-parseInt(_0x5acb30(0x121))/0x4)+parseInt(_0x5acb30(0x126))/0x5+parseInt(_0x5acb30(0x129))/0x6+-parseInt(_0x5acb30(0x13b))/0x7*(parseInt(_0x5acb30(0x132))/0x8)+parseInt(_0x5acb30(0x134))/0x9;if(_0x19d61f===_0x1818cf)break;else _0x505890['push'](_0x505890['shift']());}catch(_0x2f08fa){_0x505890['push'](_0x505890['shift']());}}}(a150_0x278d,0x7faea));function a150_0x4d2e(_0x58bd19,_0x10f82d){_0x58bd19=_0x58bd19-0x121;const _0x278d8a=a150_0x278d();let _0x4d2e25=_0x278d8a[_0x58bd19];return _0x4d2e25;}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';export const permitRoleMenus={'service':a150_0xd57fee(0x124),'command':a150_0xd57fee(0x128),'description':a150_0xd57fee(0x135),'risk':a150_0xd57fee(0x12c),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x41170f){const _0x205e6c=a150_0xd57fee,_0x1c03b8=await resolveRoleRef(_0x41170f[_0x205e6c(0x13a)],readRoleRef(_0x41170f)),_0x5cd2ff=await getRoleMenuResources(_0x41170f[_0x205e6c(0x13a)],_0x1c03b8['id']),_0x51409b=flattenMenuResources(_0x5cd2ff),_0x3a57bd=Array[_0x205e6c(0x133)](_0x51409b[_0x205e6c(0x122)]())[_0x205e6c(0x136)](_0x1ebbee=>({'resourceCode':_0x1ebbee[_0x205e6c(0x130)],'resourceName':_0x1ebbee[_0x205e6c(0x123)],'allowed':_0x1ebbee[_0x205e6c(0x12a)]===_0x205e6c(0x12e),'action':_0x1ebbee[_0x205e6c(0x12a)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x41170f['appCode'],'roleId':_0x1c03b8['id'],'roleName':_0x1c03b8[_0x205e6c(0x131)]},'menus':_0x3a57bd},'message':'Role\x20'+_0x1c03b8[_0x205e6c(0x131)]+_0x205e6c(0x137)+_0x3a57bd[_0x205e6c(0x127)](_0xc71ac9=>_0xc71ac9[_0x205e6c(0x12d)])[_0x205e6c(0x12b)]+'/'+_0x3a57bd[_0x205e6c(0x12b)]+_0x205e6c(0x139)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x207385=a151_0x2869;(function(_0x1f95f0,_0x5716ba){const _0x123dc3=a151_0x2869,_0x4e4945=_0x1f95f0();while(!![]){try{const _0x1a6a1b=-parseInt(_0x123dc3(0xfe))/0x1*(-parseInt(_0x123dc3(0x10a))/0x2)+-parseInt(_0x123dc3(0x14b))/0x3*(-parseInt(_0x123dc3(0x140))/0x4)+parseInt(_0x123dc3(0x11b))/0x5*(-parseInt(_0x123dc3(0x12a))/0x6)+-parseInt(_0x123dc3(0x121))/0x7*(parseInt(_0x123dc3(0x129))/0x8)+parseInt(_0x123dc3(0x13a))/0x9+-parseInt(_0x123dc3(0x13d))/0xa+parseInt(_0x123dc3(0x11f))/0xb;if(_0x1a6a1b===_0x5716ba)break;else _0x4e4945['push'](_0x4e4945['shift']());}catch(_0x24e957){_0x4e4945['push'](_0x4e4945['shift']());}}}(a151_0x36df,0xce027));import{listPermitRoles}from'../../core/api-client.js';function a151_0x36df(){const _0xb1dbd8=['ALL','Pass\x20--role\x20<id|name>.','10876608LWCqyK','boolean','menuId','8306200OcQDlz','dataDetail','roleType','4132TvvFoS','dataPermit','allowedActions','SELF','Disambiguate\x20with\x20an\x20id.','key','datasetCode','trim','Role\x20\x22',';\x20SELF\x20=\x20only\x20own\x20rows','resourceCode','621ATched','create-roles','menuPermit','dataCreate','validation','entries','filter','role','find','8598jynqkC','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','flagMissing','data\x20update','length','number','Grant\x20access\x20to\x20the\x20listed\x20resources','roleName','row-roles','row\x20visibility','delete-roles','dataUpdate','38KTxHfT','string','Roles\x20for\x20','menus','label','action','split','grant','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','export-roles','revoke','bool','pageNodeList','\x22\x20is\x20ambiguous\x20(ids:\x20','appCode','apiList','set','414805hqGNnG','toUpperCase','join','rolePermit','26087072tVWAMD','resourceName','9591757MhIWgo','Run\x20`role\x20list`.','allowSelf','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','Special\x20role\x20','push','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','data\x20delete','8qKkRuI','66bLYuWP','\x20(comma-separated\x20SELF/ALL/id/name)','\x22\x20not\x20found.','map','access','data\x20create','menu-id','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','detail-roles','get','dataExport','Role\x20id\x20or\x20role\x20name','update-roles','Menu\x20id\x20(from\x20`menu\x20list`)'];a151_0x36df=function(){return _0xb1dbd8;};return a151_0x36df();}import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a151_0x207385(0x130),'type':a151_0x207385(0x103),'required':!![],'description':a151_0x207385(0x137)};export const ROLE_REF_FLAG={'name':'role','type':a151_0x207385(0x10b),'required':!![],'description':a151_0x207385(0x135)};export const GRANT_FLAG={'name':'grant','type':a151_0x207385(0x13b),'required':![],'description':a151_0x207385(0x104)};export const REVOKE_FLAG={'name':'revoke','type':a151_0x207385(0x13b),'required':![],'description':'Revoke\x20access\x20to\x20the\x20listed\x20resources'};export const MENUS_FLAG={'name':a151_0x207385(0x10d),'type':a151_0x207385(0x10b),'required':!![],'description':'Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke'};export const DATASETS_FLAG={'name':'datasets','type':a151_0x207385(0x10b),'required':!![],'description':a151_0x207385(0x127)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a151_0x207385(0xf7),'allowSelf':![],'label':'menu\x20visibility'},{'flag':a151_0x207385(0x14c),'key':a151_0x207385(0xf8),'allowSelf':![],'label':a151_0x207385(0x12f)},{'flag':a151_0x207385(0x136),'key':a151_0x207385(0x109),'allowSelf':![],'label':a151_0x207385(0x101)},{'flag':a151_0x207385(0x108),'key':'dataDelete','allowSelf':![],'label':a151_0x207385(0x128)},{'flag':a151_0x207385(0x132),'key':a151_0x207385(0x13e),'allowSelf':![],'label':'data\x20detail'},{'flag':a151_0x207385(0x113),'key':a151_0x207385(0x134),'allowSelf':![],'label':'data\x20export'},{'flag':a151_0x207385(0x106),'key':a151_0x207385(0x141),'allowSelf':!![],'label':a151_0x207385(0x107)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a151_0x207385(0x12d)](_0x1cd76a=>({'name':_0x1cd76a['flag'],'type':a151_0x207385(0x10b),'required':![],'description':a151_0x207385(0x10c)+_0x1cd76a[a151_0x207385(0x10e)]+a151_0x207385(0x12b)+(_0x1cd76a[a151_0x207385(0x123)]?a151_0x207385(0x149):'')}));export function splitList(_0x58326d){const _0x1c6883=a151_0x207385;return _0x58326d[_0x1c6883(0x110)](',')[_0x1c6883(0x12d)](_0x476742=>_0x476742[_0x1c6883(0x147)]())[_0x1c6883(0xfb)](Boolean);}export function projectRoleRef(_0x54c5ad){const _0x5ea205=a151_0x207385;return{'id':_0x54c5ad['id'],'roleName':_0x54c5ad[_0x5ea205(0x105)],'roleType':_0x54c5ad[_0x5ea205(0x13f)]};}export async function resolvePermitRoles(_0x8762ef,_0x5065a3,_0x373b54){const _0x3ced91=a151_0x207385,_0x14b570=await listPermitRoles(_0x8762ef,{'needSelf':!![],'needPublic':!![]}),_0x3a2c08=[];for(const _0x4beee3 of _0x5065a3){const _0x329ee5=resolveOnePermitRole(_0x14b570,_0x4beee3);if(!_0x373b54[_0x3ced91(0x123)]&&_0x329ee5[_0x3ced91(0x13f)]===_0x3ced91(0x143))throw CliErrors[_0x3ced91(0xf9)]('SELF\x20is\x20not\x20allowed\x20for\x20'+_0x373b54[_0x3ced91(0x10e)]+'.',_0x3ced91(0x124));if(!_0x3a2c08['some'](_0x42fc16=>_0x42fc16['id']===_0x329ee5['id']))_0x3a2c08[_0x3ced91(0x126)](_0x329ee5);}return _0x3a2c08;}function resolveOnePermitRole(_0x21d8f4,_0x17acfa){const _0x3bcc91=a151_0x207385,_0x29bdb9=_0x17acfa[_0x3bcc91(0x147)](),_0x3163e1=_0x29bdb9[_0x3bcc91(0x11c)]();if(_0x3163e1===_0x3bcc91(0x143)||_0x3163e1===_0x3bcc91(0x138)){const _0x2555a9=_0x21d8f4[_0x3bcc91(0xfd)](_0x348ec5=>_0x348ec5[_0x3bcc91(0x13f)]===_0x3163e1);if(!_0x2555a9)throw CliErrors[_0x3bcc91(0xf9)](_0x3bcc91(0x125)+_0x3163e1+'\x20is\x20not\x20available\x20for\x20this\x20app.');return _0x2555a9;}if(/^-?\d+$/['test'](_0x29bdb9)){const _0x56aecc=Number(_0x29bdb9),_0x1c8b94=_0x21d8f4[_0x3bcc91(0xfd)](_0x16d098=>_0x16d098['id']===_0x56aecc);if(!_0x1c8b94)throw CliErrors[_0x3bcc91(0xf9)]('Role\x20id\x20'+_0x56aecc+'\x20not\x20found.',_0x3bcc91(0x122));return _0x1c8b94;}const _0x215355=_0x21d8f4[_0x3bcc91(0xfb)](_0x15e7de=>_0x15e7de[_0x3bcc91(0x105)]===_0x29bdb9);if(_0x215355[_0x3bcc91(0x102)]===0x0)throw CliErrors[_0x3bcc91(0xf9)](_0x3bcc91(0x148)+_0x29bdb9+_0x3bcc91(0x12c),_0x3bcc91(0xff));if(_0x215355[_0x3bcc91(0x102)]>0x1)throw CliErrors[_0x3bcc91(0xf9)](_0x3bcc91(0x148)+_0x29bdb9+_0x3bcc91(0x117)+_0x215355[_0x3bcc91(0x12d)](_0x588f2e=>_0x588f2e['id'])[_0x3bcc91(0x11d)](',\x20')+').',_0x3bcc91(0x144));return _0x215355[0x0];}export function projectPageSlot(_0x228d2b){const _0x35f322=a151_0x207385;if(!_0x228d2b)return null;return{'resourceCode':_0x228d2b[_0x35f322(0x14a)],'roles':(_0x228d2b[_0x35f322(0x11e)]??[])[_0x35f322(0x12d)](projectRoleRef)};}export function projectPagePermit(_0x4ade0e){const _0x5cd7e8=a151_0x207385,_0x4a23c2={'menuId':_0x4ade0e[_0x5cd7e8(0x13c)],'appCode':_0x4ade0e[_0x5cd7e8(0x118)],'menuPermit':projectPageSlot(_0x4ade0e[_0x5cd7e8(0xf7)])};for(const _0x22b588 of PAGE_SLOT_SPECS){if(_0x22b588[_0x5cd7e8(0x145)]==='menuPermit')continue;_0x4a23c2[_0x22b588[_0x5cd7e8(0x145)]]=projectPageSlot(_0x4ade0e[_0x22b588['key']]);}return _0x4a23c2;}export function flattenMenuResources(_0x54911b){const _0x16bc71=new Map(),_0x3d14b1=_0x19ad6e=>{const _0x4471a4=a151_0x2869;for(const _0x4241ea of _0x19ad6e??[]){_0x16bc71[_0x4471a4(0x11a)](_0x4241ea[_0x4471a4(0x14a)],{'resourceCode':_0x4241ea['resourceCode'],'resourceName':_0x4241ea['resourceName'],'action':_0x4241ea[_0x4471a4(0x142)]?.[0x0]??'0'});if(_0x4241ea['pageNodeList'])_0x3d14b1(_0x4241ea[_0x4471a4(0x116)]);}};return _0x3d14b1(_0x54911b),_0x16bc71;}export function flattenApiResources(_0x107022){const _0x2ab4dd=a151_0x207385,_0x51b0f3=new Map(),_0x265ad1=new Map();for(const _0x259425 of _0x107022){const _0x3708a1=_0x259425[_0x2ab4dd(0x119)]??{};for(const [_0xfce6bb,_0x179996]of Object[_0x2ab4dd(0xfa)](_0x3708a1)){_0x51b0f3[_0x2ab4dd(0x11a)](_0xfce6bb,{'resourceCode':_0xfce6bb,'resourceName':_0x259425[_0x2ab4dd(0x120)],'datasetCode':_0x259425['datasetCode'],'action':_0x179996?.[0x0]??'0'});const _0x5db97f=_0x265ad1['get'](_0x259425['datasetCode'])??[];_0x5db97f[_0x2ab4dd(0x126)](_0xfce6bb),_0x265ad1[_0x2ab4dd(0x11a)](_0x259425[_0x2ab4dd(0x146)],_0x5db97f);}}return{'byCode':_0x51b0f3,'byDataset':_0x265ad1};}export function buildPermits(_0x331a45,_0x2607a6){const _0x599bf3=a151_0x207385,_0xdbb41={};for(const [_0x4df0f1,_0x5d0c3e]of _0x331a45){const _0x16f63e=_0x2607a6[_0x599bf3(0x133)](_0x4df0f1)??_0x5d0c3e[_0x599bf3(0x10f)];_0xdbb41[_0x4df0f1]=[_0x16f63e];}return _0xdbb41;}export function readRoleRef(_0x2ff093){const _0x503f35=a151_0x207385,_0x5995e8=_0x2ff093['str'](_0x503f35(0xfc))[_0x503f35(0x147)]();if(!_0x5995e8)throw CliErrors[_0x503f35(0x100)](_0x503f35(0xfc),_0x503f35(0x139));return _0x5995e8;}function a151_0x2869(_0x44d008,_0x5bea48){_0x44d008=_0x44d008-0xf7;const _0x36dfaf=a151_0x36df();let _0x2869c4=_0x36dfaf[_0x44d008];return _0x2869c4;}export function readGrantRevoke(_0x1c3fe3){const _0x2cfee9=a151_0x207385,_0x2e1293=_0x1c3fe3[_0x2cfee9(0x115)](_0x2cfee9(0x111)),_0x13ac2c=_0x1c3fe3[_0x2cfee9(0x115)](_0x2cfee9(0x114));if(_0x2e1293&&_0x13ac2c)throw CliErrors[_0x2cfee9(0xf9)](_0x2cfee9(0x131));if(!_0x2e1293&&!_0x13ac2c)throw CliErrors[_0x2cfee9(0xf9)]('Missing\x20action.',_0x2cfee9(0x112));return _0x2e1293?_0x2cfee9(0x12e):'0';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x44272a,_0x150a47){const _0xfdd3ea=a152_0x4601,_0x2e8a76=_0x44272a();while(!![]){try{const _0x2c26d5=parseInt(_0xfdd3ea(0xfd))/0x1+parseInt(_0xfdd3ea(0xf9))/0x2+-parseInt(_0xfdd3ea(0x104))/0x3*(parseInt(_0xfdd3ea(0xf3))/0x4)+-parseInt(_0xfdd3ea(0x107))/0x5*(-parseInt(_0xfdd3ea(0x103))/0x6)+parseInt(_0xfdd3ea(0xfb))/0x7+parseInt(_0xfdd3ea(0xf4))/0x8*(-parseInt(_0xfdd3ea(0xff))/0x9)+-parseInt(_0xfdd3ea(0x105))/0xa*(parseInt(_0xfdd3ea(0x109))/0xb);if(_0x2c26d5===_0x150a47)break;else _0x2e8a76['push'](_0x2e8a76['shift']());}catch(_0x7ce1e7){_0x2e8a76['push'](_0x2e8a76['shift']());}}}(a152_0xb0c5,0xcd588));import{existsSync}from'node:fs';function a152_0x4601(_0x4b1dc8,_0x16f918){_0x4b1dc8=_0x4b1dc8-0xf1;const _0xb0c5b5=a152_0xb0c5();let _0x460150=_0xb0c5b5[_0x4b1dc8];return _0x460150;}function a152_0xb0c5(){const _0x44f256=['28EPOuvb','304FJGxjF','√\x20Project\x20Name:\x20','env','length','log','2300238PRBghV','Skipped','2964241EEZKUU','Directory\x20\x22','1523293telMDB','my-app','199701cHTOuw','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','resolve','√\x20Login\x20status:\x20','6isCqtT','310653KNQTcG','10bIROFy','trim','3021610iEdLbI','cwd','14212682EVKsPW','Project\x20name:','Login\x20failed','Logged\x20in','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','green','Not\x20set','cyan'];a152_0xb0c5=function(){return _0x44f256;};return a152_0xb0c5();}import a152_0x10b956 from'node:path';import a152_0x393c88 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x4a6e30,_0x108329,_0x44deb7){const _0xa2689c=a152_0x4601,_0x8428c2=_0xa2689c(0xfe),_0x39b06a=readConfig(),_0x3f1f90=typeof _0x39b06a[_0xa2689c(0xf6)]==='string'?_0x39b06a[_0xa2689c(0xf6)]:undefined,_0x3a7fd3=await input({'message':_0xa2689c(0x10a),'default':_0x8428c2,'validate':_0x485058=>{const _0x34da37=_0xa2689c,_0x327392=_0x485058[_0x34da37(0x106)]()||_0x8428c2;if(_0x327392[_0x34da37(0xf7)]>0x32)return'Project\x20name\x20cannot\x20exceed\x2050\x20characters';const _0x34556f=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x327392&&!_0x34556f['test'](_0x327392))return _0x34da37(0x10d);const _0x1e1ca1=a152_0x10b956[_0x34da37(0x101)](process[_0x34da37(0x108)](),_0x327392);if(existsSync(_0x1e1ca1))return _0x34da37(0xfc)+_0x327392+'\x22\x20already\x20exists';return!![];}});console[_0xa2689c(0xf8)](a152_0x393c88[_0xa2689c(0x10e)](_0xa2689c(0xf5)+a152_0x393c88['cyan'](_0x3a7fd3)));const _0x3f6512=await selectSingleAppcode(_0x44deb7);console[_0xa2689c(0xf8)](a152_0x393c88['green']('√\x20App\x20Code:\x20'+a152_0x393c88[_0xa2689c(0xf2)](_0x3f6512||_0xa2689c(0xf1))));if(_0x3f6512){const _0x40191a=await getIsSessionValid();if(!_0x40191a){const _0x35872d=await confirm({'message':_0xa2689c(0x100),'default':!![]});if(_0x35872d){const _0x3295e2=await authServer({'silent':!![]});console[_0xa2689c(0xf8)](a152_0x393c88[_0xa2689c(0x10e)](_0xa2689c(0x102)+a152_0x393c88['cyan'](_0x3295e2?_0xa2689c(0x10c):_0xa2689c(0x10b))));}else console[_0xa2689c(0xf8)](a152_0x393c88[_0xa2689c(0x10e)](_0xa2689c(0x102)+a152_0x393c88[_0xa2689c(0xf2)](_0xa2689c(0xfa))));}await _0x4a6e30({'projectName':_0x3a7fd3,'appCode':_0x3f6512,'env':_0x108329||_0x3f1f90||'production'});}else await _0x4a6e30({'projectName':_0x3a7fd3,'env':_0x108329||_0x3f1f90||'production'});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a153_0x2b9e(_0x12c708,_0x43d6a4){_0x12c708=_0x12c708-0x1eb;const _0x34834e=a153_0x3483();let _0x2b9ebf=_0x34834e[_0x12c708];return _0x2b9ebf;}function a153_0x3483(){const _0x3b2025=['4248090goydgA','1254470Qsxohv','28OyfZsN','8JodqOh','214050YtSweM','186fmjpOK','11693QfHerm','42381BrMPvf','now','48330YEAEDB','503836dQCyzu','3abkmxr'];a153_0x3483=function(){return _0x3b2025;};return a153_0x3483();}(function(_0x550e2f,_0x540eb1){const _0x4b8893=a153_0x2b9e,_0x37d947=_0x550e2f();while(!![]){try{const _0x12fb6f=-parseInt(_0x4b8893(0x1f0))/0x1*(-parseInt(_0x4b8893(0x1ec))/0x2)+parseInt(_0x4b8893(0x1f5))/0x3*(parseInt(_0x4b8893(0x1f4))/0x4)+-parseInt(_0x4b8893(0x1f3))/0x5*(parseInt(_0x4b8893(0x1ef))/0x6)+parseInt(_0x4b8893(0x1eb))/0x7*(-parseInt(_0x4b8893(0x1ed))/0x8)+-parseInt(_0x4b8893(0x1f1))/0x9+-parseInt(_0x4b8893(0x1ee))/0xa+parseInt(_0x4b8893(0x1f6))/0xb;if(_0x12fb6f===_0x540eb1)break;else _0x37d947['push'](_0x37d947['shift']());}catch(_0x33b49f){_0x37d947['push'](_0x37d947['shift']());}}}(a153_0x3483,0x29b81));export function formatElapsed(_0x31c6df){const _0xf43f0=a153_0x2b9e,_0x102d83=Date[_0xf43f0(0x1f2)]()-_0x31c6df;if(_0x102d83<0x3e8)return _0x102d83+'ms';const _0x302dbd=(_0x102d83/0x3e8)['toFixed'](0x2),_0x2e8ccd=_0x302dbd['replace'](/\.?0+$/u,'');return _0x2e8ccd+'s';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x286422,_0xef4a82){const _0xf046c7=a148_0x4bbc,_0x496423=_0x286422();while(!![]){try{const _0x59f4ad=-parseInt(_0xf046c7(0x17c))/0x1*(-parseInt(_0xf046c7(0x1a7))/0x2)+parseInt(_0xf046c7(0x166))/0x3*(parseInt(_0xf046c7(0x173))/0x4)+-parseInt(_0xf046c7(0x161))/0x5+parseInt(_0xf046c7(0x186))/0x6+-parseInt(_0xf046c7(0x15c))/0x7+parseInt(_0xf046c7(0x1a2))/0x8+-parseInt(_0xf046c7(0x183))/0x9;if(_0x59f4ad===_0xef4a82)break;else _0x496423['push'](_0x496423['shift']());}catch(_0x37d727){_0x496423['push'](_0x496423['shift']());}}}(a148_0xf3d2,0x4ece7));function a148_0x4bbc(_0x336c2a,_0xafa8e){_0x336c2a=_0x336c2a-0x157;const _0xf3d22b=a148_0xf3d2();let _0x4bbc5d=_0xf3d22b[_0x336c2a];return _0x4bbc5d;}import a148_0x351140 from'path';import a148_0x1da210 from'fs';import a148_0x4b999e from'chalk';import a148_0x2dcf84 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';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';function a148_0xf3d2(){const _0x3d0349=['readFileSync','needsUpgrade','stop','gray','appCode','resolve','currentVersion','项目创建失败:\x20','4370064gZBopX','info','constants','setLogPath','modelCount','10YVzewz','join','cwd','Install\x20dependencies','项目创建完成:\x20','\x20Generated\x20by\x20rabetbase\x20cli\x20','cookie','dirname','projectCode','package.json','√\x20Configuration\x20file\x20created,\x20Apps:\x20','W_OK','\x20run\x20start','3543295GfEXET','Copy\x20project\x20files','CLI\x20版本检查','env','repeat','817685LqmHwe','production','keys','parse','rmSync','1069083wqqUxM','utf8','stableVersion','配置应用AppCode失败','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','API\x20configuration\x20pulled:\x20','green','length','log','更新\x20package.json\x20name','bold','message','trim','4bqJDuJ','cyan','belowMinimum','√\x20package.json\x20updated:\x20name=','\x20already\x20exists','error','test','开始创建项目:\x20','warn','122212kdrWsH','name','🚀\x20Next\x20Steps:','cd\x20','apps','\x20√\x20','...','8157717CHphOe','version','accessSync','2311482FigSNs','create','\x20&&\x20','description','\x20model(s)','projectName','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','chdir','\x20dataset(s),\x20generated\x20','1.0.0','√\x20Pulled\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','API\x20配置拉取异常','清理项目目录失败:\x20','minimumVersion','\x20api\x20pull','\x20\x201.\x20Start\x20project:\x20','string'];a148_0xf3d2=function(){return _0x3d0349;};return a148_0xf3d2();}export async function createApp(_0xf2e3f9){const _0x5ee1c5=a148_0x4bbc,_0x23df30=await checkCliVersion();(_0x23df30['needsUpgrade']||_0x23df30['belowMinimum'])&&(printCliUpgradeWarning(_0x23df30),assertCliVersionSupported(_0x23df30),logger[_0x5ee1c5(0x1a3)](_0x5ee1c5(0x187),_0x5ee1c5(0x15e),{'currentVersion':_0x23df30[_0x5ee1c5(0x1a0)],'stableVersion':_0x23df30[_0x5ee1c5(0x168)],'minimumVersion':_0x23df30[_0x5ee1c5(0x196)],'needsUpgrade':_0x23df30[_0x5ee1c5(0x19b)],'belowMinimum':_0x23df30[_0x5ee1c5(0x175)]}));if(_0xf2e3f9[_0x5ee1c5(0x157)]&&_0xf2e3f9[_0x5ee1c5(0x19e)])await runCreate({'projectName':_0xf2e3f9[_0x5ee1c5(0x157)],'appCode':_0xf2e3f9[_0x5ee1c5(0x19e)],'env':_0xf2e3f9[_0x5ee1c5(0x15f)]},_0xf2e3f9);else{if(_0xf2e3f9[_0x5ee1c5(0x157)]){const _0x470a34=await selectSingleAppcode(_0xf2e3f9[_0x5ee1c5(0x1ad)]);await runCreate({'projectName':_0xf2e3f9['projectCode'],'appCode':_0x470a34||undefined,'env':_0xf2e3f9[_0x5ee1c5(0x15f)]},_0xf2e3f9);}else await guidedCreateProject(_0x16671d=>runCreate(_0x16671d,_0xf2e3f9),_0xf2e3f9[_0x5ee1c5(0x15f)],_0xf2e3f9[_0x5ee1c5(0x1ad)]);}}async function runCreate(_0x537035,_0x1203de){const _0x22424b=a148_0x4bbc;if(!_0x537035['projectName']||_0x537035[_0x22424b(0x18b)][_0x22424b(0x172)]()==='')throw new Error('Project\x20name\x20cannot\x20be\x20empty');const _0x5d4c9b=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5d4c9b[_0x22424b(0x179)](_0x537035[_0x22424b(0x18b)]))throw new Error(_0x22424b(0x193));if(_0x537035[_0x22424b(0x18b)]['length']>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x13a500=a148_0x351140[_0x22424b(0x19f)](process['cwd'](),_0x537035['projectName']);if(a148_0x1da210['existsSync'](_0x13a500))throw new Error('Project\x20directory\x20'+_0x537035['projectName']+_0x22424b(0x177));try{a148_0x1da210[_0x22424b(0x185)](a148_0x351140[_0x22424b(0x1ae)](_0x13a500),a148_0x1da210[_0x22424b(0x1a4)][_0x22424b(0x15a)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x22424b(0x1a5)](_0x13a500),logger[_0x22424b(0x1a3)]('create',_0x22424b(0x17a)+_0x537035[_0x22424b(0x18b)],{'projectDir':_0x13a500,'appCode':_0x537035[_0x22424b(0x19e)]}),console['log'](),console[_0x22424b(0x16e)](a148_0x4b999e['green'](_0x22424b(0x181))+'Project\x20name:\x20'+a148_0x4b999e[_0x22424b(0x16c)](_0x537035[_0x22424b(0x18b)])+(_0x537035[_0x22424b(0x19e)]?'\x20|\x20AppCode:\x20'+a148_0x4b999e['cyan'](_0x537035[_0x22424b(0x19e)]):''));try{await runTask(_0x22424b(0x15d),()=>copyProjectTemplate(_0x537035[_0x22424b(0x18b)])),await updatePackageJsonName(_0x537035[_0x22424b(0x18b)]),await runTask(_0x22424b(0x1aa),()=>installDependencies(_0x537035[_0x22424b(0x18b)])),await runTask('Format\x20code',()=>formatProjectCode(_0x537035[_0x22424b(0x18b)])),await configureAppCode(_0x537035[_0x22424b(0x18b)],_0x537035[_0x22424b(0x19e)]||'',_0x537035[_0x22424b(0x15f)]);let _0x235987=![];if(_0x537035[_0x22424b(0x19e)]){console[_0x22424b(0x16e)]('*\x20Pulling\x20API\x20configuration...');const _0x42f2b0=process[_0x22424b(0x1a9)]();try{process[_0x22424b(0x18d)](_0x13a500);const _0x1fb171=_0x537035[_0x22424b(0x15f)]||_0x22424b(0x162);initEnv(_0x1fb171);const {configArray:_0x54e180}=await fetchModelList(_0x537035[_0x22424b(0x19e)],_0x1203de[_0x22424b(0x1ad)]||''),_0x4f3b4b=DEFAULT_API_DIR,_0x50d5cb=await generateApiFile(_0x54e180,'',_0x537035[_0x22424b(0x19e)],!![],_0x1fb171,_0x4f3b4b);console[_0x22424b(0x16e)](_0x22424b(0x190)+_0x54e180[_0x22424b(0x16d)]+_0x22424b(0x18e)+_0x50d5cb[_0x22424b(0x1a6)]+_0x22424b(0x18a)),logger['info'](_0x22424b(0x187),_0x22424b(0x16b)+_0x537035[_0x22424b(0x19e)]);}catch(_0x520bbf){_0x235987=!![],console[_0x22424b(0x16e)]('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x22424b(0x17b)](_0x22424b(0x187),_0x22424b(0x194),{'error':_0x520bbf instanceof Error?_0x520bbf[_0x22424b(0x171)]:String(_0x520bbf)});}finally{process[_0x22424b(0x18d)](_0x42f2b0);}}logger['success'](_0x22424b(0x187),_0x22424b(0x1ab)+_0x537035[_0x22424b(0x18b)]),console[_0x22424b(0x16e)](),console[_0x22424b(0x16e)](a148_0x4b999e['green']('─'[_0x22424b(0x160)](0x3c))),console['log'](a148_0x4b999e[_0x22424b(0x174)][_0x22424b(0x170)](_0x22424b(0x17e))),console[_0x22424b(0x16e)](),console[_0x22424b(0x16e)](_0x22424b(0x198)+a148_0x4b999e[_0x22424b(0x174)][_0x22424b(0x170)](_0x22424b(0x17f)+_0x537035[_0x22424b(0x18b)]+_0x22424b(0x188)+CLI_BIN_NAME+_0x22424b(0x15b))),_0x235987&&console[_0x22424b(0x16e)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a148_0x4b999e[_0x22424b(0x174)]['bold'](CLI_BIN_NAME+_0x22424b(0x197))),console[_0x22424b(0x16e)](a148_0x4b999e[_0x22424b(0x16c)]('─'['repeat'](0x3c)));}catch(_0x14f8d9){logger[_0x22424b(0x178)](_0x22424b(0x187),_0x22424b(0x1a1)+_0x537035[_0x22424b(0x18b)],{'error':_0x14f8d9 instanceof Error?_0x14f8d9['message']:String(_0x14f8d9)});try{a148_0x1da210['existsSync'](_0x13a500)&&(console[_0x22424b(0x16e)](_0x22424b(0x18c)+_0x13a500),a148_0x1da210[_0x22424b(0x165)](_0x13a500,{'recursive':!![],'force':!![]}));}catch{logger[_0x22424b(0x17b)]('create',_0x22424b(0x195)+_0x13a500);}throw _0x14f8d9;}}async function runTask(_0x3ae99b,_0x31b28c){const _0x5bace8=a148_0x4bbc,_0x2630e2=a148_0x2dcf84(_0x3ae99b+_0x5bace8(0x182))['start']();try{const _0x42b48b=await _0x31b28c();_0x2630e2[_0x5bace8(0x19c)](),console[_0x5bace8(0x16e)](''+a148_0x4b999e['green'](_0x5bace8(0x181))+_0x3ae99b+'\x20'+a148_0x4b999e[_0x5bace8(0x19d)]('['+_0x42b48b+']'));}catch(_0x5ce7b1){_0x2630e2['fail'](_0x3ae99b);throw _0x5ce7b1;}}async function updatePackageJsonName(_0x59c41b){const _0x4ba3f3=a148_0x4bbc,_0x1aa0f6=a148_0x351140[_0x4ba3f3(0x19f)](process[_0x4ba3f3(0x1a9)](),_0x59c41b),_0x34c42a=a148_0x351140['join'](_0x1aa0f6,_0x4ba3f3(0x158));try{console[_0x4ba3f3(0x16e)](_0x4ba3f3(0x16a));const _0x3abd97=getRabetbaseCliPackageRoot(),_0x44a0a1=a148_0x351140[_0x4ba3f3(0x1a8)](_0x3abd97,_0x4ba3f3(0x158));let _0x1b88ce=_0x4ba3f3(0x18f);try{const _0x2e5ce6=JSON[_0x4ba3f3(0x164)](a148_0x1da210[_0x4ba3f3(0x19a)](_0x44a0a1,_0x4ba3f3(0x167)));_0x1b88ce=_0x2e5ce6[_0x4ba3f3(0x184)]||'1.0.0';}catch{}const _0x4c70fc=a148_0x1da210[_0x4ba3f3(0x19a)](_0x34c42a,_0x4ba3f3(0x167)),_0x1351a7=JSON[_0x4ba3f3(0x164)](_0x4c70fc);_0x1351a7[_0x4ba3f3(0x17d)]=_0x59c41b,_0x1351a7[_0x4ba3f3(0x189)]=_0x59c41b+_0x4ba3f3(0x1ac)+_0x1b88ce,a148_0x1da210['writeFileSync'](_0x34c42a,JSON['stringify'](_0x1351a7,null,0x2)+'\x0a',_0x4ba3f3(0x167)),console[_0x4ba3f3(0x16e)](_0x4ba3f3(0x176)+_0x59c41b),logger['info'](_0x4ba3f3(0x187),_0x4ba3f3(0x16f));}catch(_0x18b6a0){logger[_0x4ba3f3(0x178)](_0x4ba3f3(0x187),'更新\x20package.json\x20失败');throw _0x18b6a0;}}async function configureAppCode(_0x4215da,_0x99508a,_0x58514c){const _0x5df488=a148_0x4bbc,_0x278e4a=a148_0x351140[_0x5df488(0x19f)](process['cwd'](),_0x4215da),_0x20c51f=a148_0x351140[_0x5df488(0x1a8)](_0x278e4a,NEW_CONFIG_NAME);try{_0x99508a?console['log'](_0x5df488(0x192)+_0x4215da+':\x20'+_0x99508a):console[_0x5df488(0x16e)](_0x5df488(0x191)+_0x4215da);const _0x3bbea2=getRabetbaseCliPackageRoot(),_0x38af51=a148_0x351140['join'](_0x3bbea2,_0x5df488(0x158));let _0x11d8fb=_0x5df488(0x18f);try{const _0x2577fc=JSON[_0x5df488(0x164)](a148_0x1da210[_0x5df488(0x19a)](_0x38af51,_0x5df488(0x167)));_0x11d8fb=_0x2577fc[_0x5df488(0x184)]||_0x5df488(0x18f);}catch{}const _0x4888a0=readConfig(),_0x16663e=typeof _0x4888a0[_0x5df488(0x15f)]===_0x5df488(0x199)?_0x4888a0[_0x5df488(0x15f)]:undefined,_0x5ec97b={};for(const _0x51574a of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4888a0[_0x51574a]!=null)_0x5ec97b[_0x51574a]=_0x4888a0[_0x51574a];}const _0x58589b=buildCanonicalProjectConfig(_0x5ec97b,{'appCodes':_0x99508a?[_0x99508a]:[],'env':_0x58514c||_0x16663e||_0x5df488(0x162),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x11d8fb}});writeConfigFile(_0x20c51f,_0x58589b),_0x99508a?console['log'](_0x5df488(0x159)+Object[_0x5df488(0x163)](_0x58589b[_0x5df488(0x180)]||{})[_0x5df488(0x1a8)](',\x20')+'\x20|\x20Default:\x20'+_0x58589b['defaultApp']):console['log']('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0x5df488(0x1a3)]('create','配置应用AppCode:\x20'+_0x99508a);}catch(_0x5cbc87){logger[_0x5df488(0x178)](_0x5df488(0x187),_0x5df488(0x169));}}
|
|
1
|
+
(function(_0x504621,_0x4f3e69){const _0x59914b=a154_0x41a3,_0x332cbd=_0x504621();while(!![]){try{const _0x4b6deb=-parseInt(_0x59914b(0xa9))/0x1*(parseInt(_0x59914b(0xcb))/0x2)+-parseInt(_0x59914b(0xb0))/0x3*(-parseInt(_0x59914b(0xcd))/0x4)+parseInt(_0x59914b(0xc8))/0x5+parseInt(_0x59914b(0xe1))/0x6*(parseInt(_0x59914b(0xa6))/0x7)+parseInt(_0x59914b(0xc4))/0x8+-parseInt(_0x59914b(0xbf))/0x9+parseInt(_0x59914b(0xb6))/0xa*(-parseInt(_0x59914b(0xe5))/0xb);if(_0x4b6deb===_0x4f3e69)break;else _0x332cbd['push'](_0x332cbd['shift']());}catch(_0x4c4c4f){_0x332cbd['push'](_0x332cbd['shift']());}}}(a154_0xd14c,0x9d810));import a154_0x146989 from'path';import a154_0x506a51 from'fs';import a154_0x18d149 from'chalk';import a154_0x2b0851 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';function a154_0x41a3(_0x5a2752,_0x311745){_0x5a2752=_0x5a2752-0x85;const _0xd14c68=a154_0xd14c();let _0x41a3a8=_0xd14c68[_0x5a2752];return _0x41a3a8;}import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x2f952e){const _0x180390=a154_0x41a3,_0xd034ac=await checkCliVersion();(_0xd034ac[_0x180390(0xaf)]||_0xd034ac[_0x180390(0xe3)])&&(printCliUpgradeWarning(_0xd034ac),assertCliVersionSupported(_0xd034ac),logger[_0x180390(0xbe)]('create',_0x180390(0xcf),{'currentVersion':_0xd034ac[_0x180390(0xa5)],'stableVersion':_0xd034ac['stableVersion'],'minimumVersion':_0xd034ac[_0x180390(0xc5)],'needsUpgrade':_0xd034ac[_0x180390(0xaf)],'belowMinimum':_0xd034ac[_0x180390(0xe3)]}));if(_0x2f952e[_0x180390(0xb7)]&&_0x2f952e['appCode'])await runCreate({'projectName':_0x2f952e[_0x180390(0xb7)],'appCode':_0x2f952e[_0x180390(0xa8)],'env':_0x2f952e[_0x180390(0xb4)]},_0x2f952e);else{if(_0x2f952e[_0x180390(0xb7)]){const _0x100bcb=await selectSingleAppcode(_0x2f952e[_0x180390(0x98)]);await runCreate({'projectName':_0x2f952e[_0x180390(0xb7)],'appCode':_0x100bcb||undefined,'env':_0x2f952e[_0x180390(0xb4)]},_0x2f952e);}else await guidedCreateProject(_0x56c384=>runCreate(_0x56c384,_0x2f952e),_0x2f952e[_0x180390(0xb4)],_0x2f952e[_0x180390(0x98)]);}}function a154_0xd14c(){const _0x25c0ba=['\x20already\x20exists','Project\x20name\x20cannot\x20be\x20empty','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','√\x20package.json\x20updated:\x20name=','production','modelCount','\x20&&\x20','√\x20Pulled\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','fail','\x20|\x20AppCode:\x20','constants','Project\x20name:\x20','length','existsSync','\x20√\x20','defaultApp','cookie','1.0.0','Install\x20dependencies','success','\x20api\x20pull','accessSync','🚀\x20Next\x20Steps:','setLogPath','join','API\x20configuration\x20pulled:\x20','W_OK','\x20config\x20set\x20appcode\x20<app-code>\x27','API\x20配置拉取异常','currentVersion','2037973PcuGvX','配置应用AppCode:\x20','appCode','1xSgHEB','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','message','chdir','readFileSync','Format\x20code','needsUpgrade','555498vRrSBE','writeFileSync','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','keys','env','name','190700YKcMCK','projectCode','Project\x20directory\x20','配置应用AppCode失败','项目创建完成:\x20','gray','\x20Generated\x20by\x20rabetbase\x20cli\x20','toLocaleString','info','11578851QUhOHT','...','projectName','cd\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','8890328szNDoo','minimumVersion','package.json','utf8','1548070IiDTAK','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','cwd','50426HPuTXT','start','16WIwHHp','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','CLI\x20版本检查','log','error','\x20|\x20Default:\x20','create','version','warn','*\x20Configuring\x20AppCode\x20for\x20project\x20','dirname','repeat','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','resolve','*\x20Pulling\x20API\x20configuration...','cyan','\x20model(s)','bold','√\x20Configuration\x20file\x20created,\x20Apps:\x20','Copy\x20project\x20files','6AbnIoj','parse','belowMinimum','\x20run\x20start','286OIEyEO','green','stop'];a154_0xd14c=function(){return _0x25c0ba;};return a154_0xd14c();}async function runCreate(_0x5ccf87,_0x10cf26){const _0x4dcf6a=a154_0x41a3;if(!_0x5ccf87[_0x4dcf6a(0xc1)]||_0x5ccf87[_0x4dcf6a(0xc1)]['trim']()==='')throw new Error(_0x4dcf6a(0x88));const _0x30e36f=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x30e36f['test'](_0x5ccf87[_0x4dcf6a(0xc1)]))throw new Error(_0x4dcf6a(0xc9));if(_0x5ccf87[_0x4dcf6a(0xc1)]['length']>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x5e478a=a154_0x146989[_0x4dcf6a(0xda)](process[_0x4dcf6a(0xca)](),_0x5ccf87[_0x4dcf6a(0xc1)]);if(a154_0x506a51['existsSync'](_0x5e478a))throw new Error(_0x4dcf6a(0xb8)+_0x5ccf87[_0x4dcf6a(0xc1)]+_0x4dcf6a(0x87));try{a154_0x506a51[_0x4dcf6a(0x9d)](a154_0x146989[_0x4dcf6a(0xd7)](_0x5e478a),a154_0x506a51[_0x4dcf6a(0x92)][_0x4dcf6a(0xa2)]);}catch{throw new Error(_0x4dcf6a(0xce));}logger[_0x4dcf6a(0x9f)](_0x5e478a),logger[_0x4dcf6a(0xbe)](_0x4dcf6a(0xd3),'开始创建项目:\x20'+_0x5ccf87[_0x4dcf6a(0xc1)],{'projectDir':_0x5e478a,'appCode':_0x5ccf87[_0x4dcf6a(0xa8)]}),console['log'](),console['log'](a154_0x18d149[_0x4dcf6a(0x85)](_0x4dcf6a(0x96))+_0x4dcf6a(0x93)+a154_0x18d149[_0x4dcf6a(0x85)](_0x5ccf87[_0x4dcf6a(0xc1)])+(_0x5ccf87['appCode']?_0x4dcf6a(0x91)+a154_0x18d149[_0x4dcf6a(0xdc)](_0x5ccf87[_0x4dcf6a(0xa8)]):''));try{await runTask(_0x4dcf6a(0xe0),()=>copyProjectTemplate(_0x5ccf87[_0x4dcf6a(0xc1)])),await updatePackageJsonName(_0x5ccf87[_0x4dcf6a(0xc1)]),await runTask(_0x4dcf6a(0x9a),()=>installDependencies(_0x5ccf87[_0x4dcf6a(0xc1)])),await runTask(_0x4dcf6a(0xae),()=>formatProjectCode(_0x5ccf87['projectName'])),await configureAppCode(_0x5ccf87[_0x4dcf6a(0xc1)],_0x5ccf87[_0x4dcf6a(0xa8)]||'',_0x5ccf87[_0x4dcf6a(0xb4)]);let _0x3a22fe=![];if(_0x5ccf87[_0x4dcf6a(0xa8)]){console[_0x4dcf6a(0xd0)](_0x4dcf6a(0xdb));const _0x5c5cf4=process[_0x4dcf6a(0xca)]();try{process[_0x4dcf6a(0xac)](_0x5e478a);const _0xdd068c=_0x5ccf87[_0x4dcf6a(0xb4)]||_0x4dcf6a(0x8b);initEnv(_0xdd068c);const {configArray:_0x35becd}=await fetchModelList(_0x5ccf87[_0x4dcf6a(0xa8)],_0x10cf26[_0x4dcf6a(0x98)]||''),_0x48ddc5=DEFAULT_API_DIR,_0x7e9915=await generateApiFile(_0x35becd,'',_0x5ccf87[_0x4dcf6a(0xa8)],!![],_0xdd068c,_0x48ddc5);console[_0x4dcf6a(0xd0)](_0x4dcf6a(0x8e)+_0x35becd[_0x4dcf6a(0x94)]+'\x20dataset(s),\x20generated\x20'+_0x7e9915[_0x4dcf6a(0x8c)]+_0x4dcf6a(0xdd)),logger[_0x4dcf6a(0xbe)](_0x4dcf6a(0xd3),_0x4dcf6a(0xa1)+_0x5ccf87[_0x4dcf6a(0xa8)]);}catch(_0xad3697){_0x3a22fe=!![],console[_0x4dcf6a(0xd0)](_0x4dcf6a(0xaa)),logger['warn'](_0x4dcf6a(0xd3),_0x4dcf6a(0xa4),{'error':_0xad3697 instanceof Error?_0xad3697[_0x4dcf6a(0xab)]:String(_0xad3697)});}finally{process[_0x4dcf6a(0xac)](_0x5c5cf4);}}logger[_0x4dcf6a(0x9b)](_0x4dcf6a(0xd3),_0x4dcf6a(0xba)+_0x5ccf87[_0x4dcf6a(0xc1)]),console[_0x4dcf6a(0xd0)](),console['log'](a154_0x18d149[_0x4dcf6a(0x85)]('─'[_0x4dcf6a(0xd8)](0x3c))),console['log'](a154_0x18d149[_0x4dcf6a(0xdc)][_0x4dcf6a(0xde)](_0x4dcf6a(0x9e))),console[_0x4dcf6a(0xd0)](),console[_0x4dcf6a(0xd0)]('\x20\x201.\x20Start\x20project:\x20'+a154_0x18d149[_0x4dcf6a(0xdc)][_0x4dcf6a(0xde)](_0x4dcf6a(0xc2)+_0x5ccf87[_0x4dcf6a(0xc1)]+_0x4dcf6a(0x8d)+CLI_BIN_NAME+_0x4dcf6a(0xe4))),_0x3a22fe&&console[_0x4dcf6a(0xd0)](_0x4dcf6a(0x8f)+a154_0x18d149[_0x4dcf6a(0xdc)]['bold'](CLI_BIN_NAME+_0x4dcf6a(0x9c))),console['log'](a154_0x18d149['green']('─'[_0x4dcf6a(0xd8)](0x3c)));}catch(_0x1a758a){logger[_0x4dcf6a(0xd1)](_0x4dcf6a(0xd3),'项目创建失败:\x20'+_0x5ccf87[_0x4dcf6a(0xc1)],{'error':_0x1a758a instanceof Error?_0x1a758a[_0x4dcf6a(0xab)]:String(_0x1a758a)});try{a154_0x506a51[_0x4dcf6a(0x95)](_0x5e478a)&&(console[_0x4dcf6a(0xd0)](_0x4dcf6a(0xc3)+_0x5e478a),a154_0x506a51['rmSync'](_0x5e478a,{'recursive':!![],'force':!![]}));}catch{logger[_0x4dcf6a(0xd5)]('create','清理项目目录失败:\x20'+_0x5e478a);}throw _0x1a758a;}}async function runTask(_0x3bf40f,_0x40cb67){const _0x195855=a154_0x41a3,_0x477845=a154_0x2b0851(_0x3bf40f+_0x195855(0xc0))[_0x195855(0xcc)]();try{const _0x333db8=await _0x40cb67();_0x477845[_0x195855(0x86)](),console[_0x195855(0xd0)](''+a154_0x18d149['green'](_0x195855(0x96))+_0x3bf40f+'\x20'+a154_0x18d149[_0x195855(0xbb)]('['+_0x333db8+']'));}catch(_0x52ef50){_0x477845[_0x195855(0x90)](_0x3bf40f);throw _0x52ef50;}}async function updatePackageJsonName(_0x1f0038){const _0x194d84=a154_0x41a3,_0x444593=a154_0x146989[_0x194d84(0xda)](process[_0x194d84(0xca)](),_0x1f0038),_0x58154f=a154_0x146989[_0x194d84(0xa0)](_0x444593,_0x194d84(0xc6));try{console['log'](_0x194d84(0xd9));const _0x231020=getRabetbaseCliPackageRoot(),_0x58d054=a154_0x146989[_0x194d84(0xa0)](_0x231020,_0x194d84(0xc6));let _0x11a4af=_0x194d84(0x99);try{const _0x27af8f=JSON['parse'](a154_0x506a51[_0x194d84(0xad)](_0x58d054,_0x194d84(0xc7)));_0x11a4af=_0x27af8f[_0x194d84(0xd4)]||_0x194d84(0x99);}catch{}const _0x2369b9=a154_0x506a51[_0x194d84(0xad)](_0x58154f,_0x194d84(0xc7)),_0x456ab4=JSON['parse'](_0x2369b9);_0x456ab4[_0x194d84(0xb5)]=_0x1f0038,_0x456ab4['description']=_0x1f0038+_0x194d84(0xbc)+_0x11a4af,a154_0x506a51[_0x194d84(0xb1)](_0x58154f,JSON['stringify'](_0x456ab4,null,0x2)+'\x0a',_0x194d84(0xc7)),console[_0x194d84(0xd0)](_0x194d84(0x8a)+_0x1f0038),logger[_0x194d84(0xbe)](_0x194d84(0xd3),'更新\x20package.json\x20name');}catch(_0x33ef47){logger['error']('create','更新\x20package.json\x20失败');throw _0x33ef47;}}async function configureAppCode(_0x4376fe,_0x4da28c,_0x29a0c6){const _0x43bdea=a154_0x41a3,_0x1a03c8=a154_0x146989[_0x43bdea(0xda)](process[_0x43bdea(0xca)](),_0x4376fe),_0x400a90=a154_0x146989[_0x43bdea(0xa0)](_0x1a03c8,NEW_CONFIG_NAME);try{_0x4da28c?console[_0x43bdea(0xd0)](_0x43bdea(0xd6)+_0x4376fe+':\x20'+_0x4da28c):console[_0x43bdea(0xd0)](_0x43bdea(0xb2)+_0x4376fe);const _0x445eb2=getRabetbaseCliPackageRoot(),_0x1b9541=a154_0x146989['join'](_0x445eb2,_0x43bdea(0xc6));let _0x2a8f85=_0x43bdea(0x99);try{const _0x3aa2ff=JSON[_0x43bdea(0xe2)](a154_0x506a51['readFileSync'](_0x1b9541,_0x43bdea(0xc7)));_0x2a8f85=_0x3aa2ff[_0x43bdea(0xd4)]||_0x43bdea(0x99);}catch{}const _0x3c2751=readConfig(),_0x288e86=typeof _0x3c2751[_0x43bdea(0xb4)]==='string'?_0x3c2751[_0x43bdea(0xb4)]:undefined,_0x5a38ac={};for(const _0x21e85e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3c2751[_0x21e85e]!=null)_0x5a38ac[_0x21e85e]=_0x3c2751[_0x21e85e];}const _0xe5da45=buildCanonicalProjectConfig(_0x5a38ac,{'appCodes':_0x4da28c?[_0x4da28c]:[],'env':_0x29a0c6||_0x288e86||_0x43bdea(0x8b),'metadata':{'createdAt':new Date()[_0x43bdea(0xbd)](),'version':_0x2a8f85}});writeConfigFile(_0x400a90,_0xe5da45),_0x4da28c?console['log'](_0x43bdea(0xdf)+Object[_0x43bdea(0xb3)](_0xe5da45['apps']||{})[_0x43bdea(0xa0)](',\x20')+_0x43bdea(0xd2)+_0xe5da45[_0x43bdea(0x97)]):console[_0x43bdea(0xd0)](_0x43bdea(0x89)+CLI_BIN_NAME+_0x43bdea(0xa3)),logger[_0x43bdea(0xbe)](_0x43bdea(0xd3),_0x43bdea(0xa7)+_0x4da28c);}catch(_0x413bf0){logger[_0x43bdea(0xd1)](_0x43bdea(0xd3),_0x43bdea(0xb9));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1abac6,_0x547970){const _0xd93187=a155_0x2db8,_0x2ae7de=_0x1abac6();while(!![]){try{const _0x133fca=-parseInt(_0xd93187(0x129))/0x1*(parseInt(_0xd93187(0x126))/0x2)+-parseInt(_0xd93187(0x12d))/0x3*(parseInt(_0xd93187(0x138))/0x4)+parseInt(_0xd93187(0x141))/0x5*(parseInt(_0xd93187(0x120))/0x6)+-parseInt(_0xd93187(0x14c))/0x7+parseInt(_0xd93187(0x11e))/0x8*(parseInt(_0xd93187(0x133))/0x9)+-parseInt(_0xd93187(0x139))/0xa+parseInt(_0xd93187(0x122))/0xb;if(_0x133fca===_0x547970)break;else _0x2ae7de['push'](_0x2ae7de['shift']());}catch(_0x5001b4){_0x2ae7de['push'](_0x2ae7de['shift']());}}}(a155_0x2513,0xcf1a4));import a155_0x9a620b from'path';import a155_0x52e829 from'fs/promises';function a155_0x2db8(_0x5a05ac,_0x18e863){_0x5a05ac=_0x5a05ac-0x11a;const _0x2513d9=a155_0x2513();let _0x2db8d3=_0x2513d9[_0x5a05ac];return _0x2db8d3;}import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0xd9bff2,_0x36d950,_0x1deba5,_0x485135){const _0x408832=a155_0x2db8,_0x5bbaa9=await checkCliVersion();(_0x5bbaa9[_0x408832(0x146)]||_0x5bbaa9['belowMinimum'])&&(printCliUpgradeWarning(_0x5bbaa9),assertCliVersionSupported(_0x5bbaa9));if(!_0xd9bff2||_0xd9bff2[_0x408832(0x14e)]()==='')throw CliErrors[_0x408832(0x12c)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x564c13=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x564c13['test'](_0xd9bff2))throw CliErrors[_0x408832(0x12c)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0xd9bff2[_0x408832(0x145)]>0x64)throw CliErrors[_0x408832(0x12c)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x339f42=a155_0x9a620b[_0x408832(0x14d)](process[_0x408832(0x12f)](),_0xd9bff2);if(existsSync(_0x339f42))throw CliErrors['validation'](_0x408832(0x136)+_0xd9bff2+_0x408832(0x131),'Use\x20a\x20different\x20project\x20name.');try{const _0x2cb35e=a155_0x9a620b['dirname'](_0x339f42);await a155_0x52e829[_0x408832(0x144)](_0x2cb35e,a155_0x52e829[_0x408832(0x13b)][_0x408832(0x127)]);}catch{throw CliErrors[_0x408832(0x12c)](_0x408832(0x12b),_0x408832(0x137));}try{console[_0x408832(0x12e)](_0x408832(0x11d)+_0xd9bff2+'...');const _0x9b2e08=getSubAppReactDemoTemplateDir();await copyDirectory(_0x9b2e08,_0x339f42),console['log'](_0x408832(0x130)),await updatePackageJsonName(_0xd9bff2),console[_0x408832(0x12e)](_0x408832(0x150)),console[_0x408832(0x12e)](_0x408832(0x121)),console['log'](_0x408832(0x13f)),await formatCode(_0x339f42),console['log'](_0x408832(0x11a)),await configureProject(_0xd9bff2,_0x1deba5,_0x36d950),console[_0x408832(0x12e)](_0x408832(0x149)),_0x1deba5&&await pullApiConfig(_0x339f42,_0x1deba5,_0x36d950,_0x485135),console[_0x408832(0x12e)](_0x408832(0x125)+_0xd9bff2+_0x408832(0x132)),console[_0x408832(0x12e)](_0x408832(0x124)+_0xd9bff2),console[_0x408832(0x12e)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x5e1d89){try{existsSync(_0x339f42)&&await a155_0x52e829['rm'](_0x339f42,{'recursive':!![],'force':!![]});}catch{}throw _0x5e1d89;}}async function updatePackageJsonName(_0x3c6e9e){const _0x3f30a1=a155_0x2db8,_0x202f3e=a155_0x9a620b['resolve'](process[_0x3f30a1(0x12f)](),_0x3c6e9e),_0x5819ec=a155_0x9a620b['join'](_0x202f3e,'package.json'),_0x4f1c12=await a155_0x52e829[_0x3f30a1(0x11b)](_0x5819ec,_0x3f30a1(0x148)),_0x2ef25e=JSON['parse'](_0x4f1c12);_0x2ef25e['name']=_0x3c6e9e,_0x2ef25e['description']='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a155_0x52e829[_0x3f30a1(0x12a)](_0x5819ec,JSON[_0x3f30a1(0x11f)](_0x2ef25e,null,0x2)+'\x0a');}function detectPackageManager(){const _0x1e8c3c=a155_0x2db8;try{return execSync(_0x1e8c3c(0x142),{'stdio':'ignore'}),_0x1e8c3c(0x14b);}catch{return _0x1e8c3c(0x13a);}}async function formatCode(_0x6fad34){try{await execAsync('bun\x20run\x20format',{'cwd':_0x6fad34});}catch{}}function a155_0x2513(){const _0x5bb8f8=['\x20\x20√\x20Pulled\x20','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','\x20model(s)','8113260tkPSOD','bun\x20--version','\x20api\x20pull`\x20manually\x20later.','access','length','needsUpgrade','env','utf-8','\x20\x20√\x20Configuration\x20file\x20created','chdir','bun','8590918AEfPuS','resolve','trim','modelCount','\x20\x20√\x20package.json\x20updated','\x20\x20√\x20Code\x20formatted','readFile','production','*\x20Creating\x20project\x20','9235640GRnTwm','stringify','6kQvZCw','\x20\x20Installing\x20dependencies...','20120683MwgHMg','\x20\x20Pulling\x20API\x20configuration...','\x0a\x20\x20cd\x20','\x0a√\x20Project\x20','319120SMGbhk','W_OK','join','1YOEFde','writeFile','Cannot\x20create\x20project\x20in\x20current\x20directory.','validation','3226614iDGLAE','log','cwd','\x20\x20√\x20Project\x20template\x20created','\x22\x20already\x20exists.','\x20created\x20successfully!','9JAMKCf','toLocaleString','string','Project\x20directory\x20\x22','Check\x20directory\x20permissions.','4LJbXNy','12955960Yfcpxc','npm','constants','\x20dataset(s),\x20generated\x20','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'];a155_0x2513=function(){return _0x5bb8f8;};return a155_0x2513();}async function configureProject(_0x375956,_0x12274a,_0xea7650){const _0x524d5b=a155_0x2db8,_0x2277d0=a155_0x9a620b[_0x524d5b(0x14d)](process[_0x524d5b(0x12f)](),_0x375956),_0xa34faa=a155_0x9a620b[_0x524d5b(0x128)](_0x2277d0,NEW_CONFIG_NAME),_0x4b6a2c=readConfig(),_0x27b351=typeof _0x4b6a2c[_0x524d5b(0x147)]===_0x524d5b(0x135)?_0x4b6a2c[_0x524d5b(0x147)]:undefined,_0x5849eb={};for(const _0xadcefb of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4b6a2c[_0xadcefb]!=null)_0x5849eb[_0xadcefb]=_0x4b6a2c[_0xadcefb];}const _0x43ef38=buildCanonicalProjectConfig(_0x5849eb,{'appCodes':_0x12274a?[_0x12274a]:[],'env':_0xea7650||_0x27b351||_0x524d5b(0x11c),'metadata':{'createdAt':new Date()[_0x524d5b(0x134)](),'version':getCliVersion()}});writeConfigFile(_0xa34faa,_0x43ef38);}async function pullApiConfig(_0x496e98,_0x109b15,_0xca4709,_0xf25f4f){const _0x4a9b09=a155_0x2db8,_0x12f24f=process[_0x4a9b09(0x12f)]();try{process[_0x4a9b09(0x14a)](_0x496e98);const _0x2efa3a=_0xca4709||_0x4a9b09(0x11c);initEnv(_0x2efa3a),console[_0x4a9b09(0x12e)](_0x4a9b09(0x123));const {configArray:_0x52022f}=await fetchModelList(_0x109b15,_0xf25f4f||''),_0x59fd93=await generateApiFile(_0x52022f,'',_0x109b15,!![],_0x2efa3a,DEFAULT_API_DIR);console['log'](_0x4a9b09(0x13e)+_0x52022f[_0x4a9b09(0x145)]+_0x4a9b09(0x13c)+_0x59fd93[_0x4a9b09(0x14f)]+_0x4a9b09(0x140));}catch(_0x3f6735){console[_0x4a9b09(0x12e)](_0x4a9b09(0x13d)+CLI_BIN_NAME+_0x4a9b09(0x143));}finally{process['chdir'](_0x12f24f);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a156_0x4caf(){const _0x426d97=['30zPsuHh','99pLBrSZ','4685bQRLaH','1508TQyrUF','26gLoEOe','1548351kDWezM','join','43314imSXam','301EKuyzj','427068cxUVNk','projects','resolve','../../../../','6728192giSMSd','904297mYrkNN','templates','69933ZtviNg','dirname'];a156_0x4caf=function(){return _0x426d97;};return a156_0x4caf();}function a156_0x1350(_0xe991b4,_0x5e41b9){_0xe991b4=_0xe991b4-0x196;const _0x4caf19=a156_0x4caf();let _0x1350d1=_0x4caf19[_0xe991b4];return _0x1350d1;}const a156_0x2ce924=a156_0x1350;(function(_0x2c0460,_0xc55757){const _0x1ec19f=a156_0x1350,_0x2993ca=_0x2c0460();while(!![]){try{const _0x44b3bf=parseInt(_0x1ec19f(0x19d))/0x1+-parseInt(_0x1ec19f(0x1a5))/0x2*(-parseInt(_0x1ec19f(0x19f))/0x3)+-parseInt(_0x1ec19f(0x1a4))/0x4*(parseInt(_0x1ec19f(0x1a3))/0x5)+-parseInt(_0x1ec19f(0x196))/0x6*(parseInt(_0x1ec19f(0x197))/0x7)+parseInt(_0x1ec19f(0x19c))/0x8+parseInt(_0x1ec19f(0x1a6))/0x9*(-parseInt(_0x1ec19f(0x1a1))/0xa)+parseInt(_0x1ec19f(0x1a2))/0xb*(-parseInt(_0x1ec19f(0x198))/0xc);if(_0x44b3bf===_0xc55757)break;else _0x2993ca['push'](_0x2993ca['shift']());}catch(_0x743930){_0x2993ca['push'](_0x2993ca['shift']());}}}(a156_0x4caf,0x85db8));import a156_0x389629 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a156_0x389629[a156_0x2ce924(0x1a0)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0xdcae47=a156_0x2ce924;return a156_0x389629[_0xdcae47(0x19a)](__dirname,_0xdcae47(0x19b));}export function getSubAppReactDemoTemplateDir(){const _0x3c224e=a156_0x2ce924;return a156_0x389629[_0x3c224e(0x1a7)](getRabetbaseCliPackageRoot(),_0x3c224e(0x19e),_0x3c224e(0x199),'sub-app-react-demo');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25ab31,_0x5d1c5e){const _0x3b2c01=a157_0x6a10,_0x416765=_0x25ab31();while(!![]){try{const _0x43bd4d=parseInt(_0x3b2c01(0x137))/0x1*(-parseInt(_0x3b2c01(0x130))/0x2)+-parseInt(_0x3b2c01(0x13b))/0x3*(-parseInt(_0x3b2c01(0x138))/0x4)+-parseInt(_0x3b2c01(0x13d))/0x5*(-parseInt(_0x3b2c01(0x13a))/0x6)+parseInt(_0x3b2c01(0x13c))/0x7+parseInt(_0x3b2c01(0x135))/0x8*(-parseInt(_0x3b2c01(0x12c))/0x9)+-parseInt(_0x3b2c01(0x12b))/0xa*(parseInt(_0x3b2c01(0x133))/0xb)+parseInt(_0x3b2c01(0x139))/0xc;if(_0x43bd4d===_0x5d1c5e)break;else _0x416765['push'](_0x416765['shift']());}catch(_0x99f554){_0x416765['push'](_0x416765['shift']());}}}(a157_0x1fb1,0xab96a));import a157_0xc3aa4c 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';function a157_0x1fb1(){const _0x427989=['copy','info','28rKadBa','now','success','3201WhBtHN','开始复制项目模板','16312fDqNcp','resolve','84701uLQslD','28BlRIDx','25474944MvVRVE','888zAYfap','362841VFjEeQ','4525619CmFqaE','24620rcGWLT','cwd','39070CaTpWd','5823RSwUAv','项目模板复制完成'];a157_0x1fb1=function(){return _0x427989;};return a157_0x1fb1();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a157_0x6a10(_0x438af3,_0x704609){_0x438af3=_0x438af3-0x12b;const _0x1fb1b1=a157_0x1fb1();let _0x6a1077=_0x1fb1b1[_0x438af3];return _0x6a1077;}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x4d1453){const _0x1a58c1=a157_0x6a10,_0x12ebe3=Date[_0x1a58c1(0x131)](),_0x259111=a157_0xc3aa4c[_0x1a58c1(0x136)](process[_0x1a58c1(0x13e)](),_0x4d1453);try{logger[_0x1a58c1(0x12f)](_0x1a58c1(0x12e),_0x1a58c1(0x134),{'projectCode':_0x4d1453,'templateDir':templateDir}),await copyDirectory(templateDir,_0x259111);const _0x139518=Date[_0x1a58c1(0x131)]()-_0x12ebe3;logger[_0x1a58c1(0x132)]('copy',_0x1a58c1(0x12d),_0x139518,{'projectCode':_0x4d1453});}catch(_0x405394){const _0x219bbb=Date[_0x1a58c1(0x131)]()-_0x12ebe3;logger['error'](_0x1a58c1(0x12e),'项目模板复制失败',{'projectCode':_0x4d1453,'error':_0x405394 instanceof Error?_0x405394['message']:String(_0x405394),'duration':_0x219bbb});throw _0x405394;}return formatElapsed(_0x12ebe3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x195e6f,_0x5a28dc){const _0xe56cc1=a158_0x35e4,_0x4dd502=_0x195e6f();while(!![]){try{const _0x257fa5=-parseInt(_0xe56cc1(0x148))/0x1+parseInt(_0xe56cc1(0x143))/0x2+parseInt(_0xe56cc1(0x13e))/0x3+-parseInt(_0xe56cc1(0x13c))/0x4*(-parseInt(_0xe56cc1(0x13f))/0x5)+-parseInt(_0xe56cc1(0x14a))/0x6*(-parseInt(_0xe56cc1(0x13d))/0x7)+parseInt(_0xe56cc1(0x142))/0x8*(parseInt(_0xe56cc1(0x141))/0x9)+-parseInt(_0xe56cc1(0x146))/0xa*(parseInt(_0xe56cc1(0x147))/0xb);if(_0x257fa5===_0x5a28dc)break;else _0x4dd502['push'](_0x4dd502['shift']());}catch(_0x503a7f){_0x4dd502['push'](_0x4dd502['shift']());}}}(a158_0x2a75,0xf3345));function a158_0x35e4(_0x13f348,_0x3b2a5e){_0x13f348=_0x13f348-0x138;const _0x2a7596=a158_0x2a75();let _0x35e486=_0x2a7596[_0x13f348];return _0x35e486;}import a158_0x7402b4 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a158_0x2a75(){const _0xbb736d=['567590iMuuws','693GMYePT','1247896xVhGkf','代码格式化完成','7917654NFTlci','info','--write','now','开始格式化代码','format','295148HggEdJ','7SjLkvI','4586190ycXggt','10NsjHFO','代码格式化失败','96822OaeokM','704QPTFcm','3754522ohxeEy','error','cwd'];a158_0x2a75=function(){return _0xbb736d;};return a158_0x2a75();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x8ed22a){const _0xbf5e25=a158_0x35e4,_0x3585a7=Date[_0xbf5e25(0x139)](),_0x4e277c=a158_0x7402b4['resolve'](process[_0xbf5e25(0x145)](),_0x8ed22a);try{logger[_0xbf5e25(0x14b)](_0xbf5e25(0x13b),_0xbf5e25(0x13a),{'projectCode':_0x8ed22a}),await execa(resolveNpmBin('npx'),['prettier',_0xbf5e25(0x138),'.'],{'cwd':_0x4e277c});const _0x575e11=Date[_0xbf5e25(0x139)]()-_0x3585a7;logger['success'](_0xbf5e25(0x13b),_0xbf5e25(0x149),_0x575e11,{'projectCode':_0x8ed22a});}catch(_0x3a75eb){const _0x507408=Date[_0xbf5e25(0x139)]()-_0x3585a7;logger[_0xbf5e25(0x144)](_0xbf5e25(0x13b),_0xbf5e25(0x140),{'projectCode':_0x8ed22a,'error':_0x3a75eb instanceof Error?_0x3a75eb['message']:String(_0x3a75eb),'duration':_0x507408});throw _0x3a75eb;}return formatElapsed(_0x3585a7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ae1cb,_0x69a0b8){const _0x39d5da=a159_0x49eb,_0x540e72=_0x3ae1cb();while(!![]){try{const _0x3a58cd=-parseInt(_0x39d5da(0x174))/0x1+-parseInt(_0x39d5da(0x169))/0x2*(-parseInt(_0x39d5da(0x16b))/0x3)+parseInt(_0x39d5da(0x167))/0x4+parseInt(_0x39d5da(0x16d))/0x5+parseInt(_0x39d5da(0x16e))/0x6+parseInt(_0x39d5da(0x168))/0x7+-parseInt(_0x39d5da(0x16c))/0x8;if(_0x3a58cd===_0x69a0b8)break;else _0x540e72['push'](_0x540e72['shift']());}catch(_0x191472){_0x540e72['push'](_0x540e72['shift']());}}}(a159_0x2355,0x3c97e));function a159_0x2355(){const _0x481f43=['install','61359xpjWEH','6833120kuCgCM','1016160zWTfTR','2491764NiAppe','cwd','message','now','success','--registry','158051dTRfOk','https://registry.npmmirror.com','444036uNFNWo','2570554NcMQqt','16BfsKaq'];a159_0x2355=function(){return _0x481f43;};return a159_0x2355();}function a159_0x49eb(_0xfb7f80,_0x3b5d02){_0xfb7f80=_0xfb7f80-0x166;const _0x235560=a159_0x2355();let _0x49ebbf=_0x235560[_0xfb7f80];return _0x49ebbf;}import a159_0x28f150 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x337952){const _0x1c7c05=a159_0x49eb,_0x529016=Date['now'](),_0x43a1f3=a159_0x28f150['resolve'](process[_0x1c7c05(0x16f)](),_0x337952);try{logger['info'](_0x1c7c05(0x16a),'开始安装依赖',{'projectCode':_0x337952,'registry':_0x1c7c05(0x166)}),await execa(resolveNpmBin('npm'),['install',_0x1c7c05(0x173),_0x1c7c05(0x166)],{'cwd':_0x43a1f3});const _0x16fc81=Date[_0x1c7c05(0x171)]()-_0x529016;logger[_0x1c7c05(0x172)](_0x1c7c05(0x16a),'依赖安装完成',_0x16fc81,{'projectCode':_0x337952});}catch(_0x458330){const _0x4d706c=Date[_0x1c7c05(0x171)]()-_0x529016;logger['error'](_0x1c7c05(0x16a),'依赖安装失败',{'projectCode':_0x337952,'error':_0x458330 instanceof Error?_0x458330[_0x1c7c05(0x170)]:String(_0x458330),'duration':_0x4d706c});throw _0x458330;}return formatElapsed(_0x529016);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a160_0x5f3130=a160_0x4444;function a160_0x4444(_0x493fa1,_0x3c9087){_0x493fa1=_0x493fa1-0x7b;const _0x1d4115=a160_0x1d41();let _0x4444c9=_0x1d4115[_0x493fa1];return _0x4444c9;}(function(_0x416293,_0x416770){const _0xc17d6e=a160_0x4444,_0x3b6b81=_0x416293();while(!![]){try{const _0x3d5e4e=parseInt(_0xc17d6e(0x86))/0x1+parseInt(_0xc17d6e(0x94))/0x2*(-parseInt(_0xc17d6e(0x9b))/0x3)+-parseInt(_0xc17d6e(0x8d))/0x4*(parseInt(_0xc17d6e(0x97))/0x5)+parseInt(_0xc17d6e(0x85))/0x6*(-parseInt(_0xc17d6e(0x91))/0x7)+parseInt(_0xc17d6e(0x88))/0x8+parseInt(_0xc17d6e(0x87))/0x9*(-parseInt(_0xc17d6e(0x81))/0xa)+parseInt(_0xc17d6e(0x84))/0xb*(parseInt(_0xc17d6e(0x89))/0xc);if(_0x3d5e4e===_0x416770)break;else _0x3b6b81['push'](_0x3b6b81['shift']());}catch(_0x443c76){_0x3b6b81['push'](_0x3b6b81['shift']());}}}(a160_0x1d41,0x77183));import{CliErrors}from'../../errors.js';function a160_0x1d41(){const _0x3a4b20=['Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','string','2026-07','1805490XMItub','appcode','trim','11bDtzsp','654LgpjkB','642809kLJsMH','45PLDZgW','1445760SCazaS','37639176rRSbxS','Usage:\x20','write','validation','908792pnozpG','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','str','nonInteractive','57393GrmvuD','yes','project-name','63924eKlttq','cookie','boolean','20AbZbVu','../../commands/project/create/main.js','create','upgrade','72iQGlFl','bool','args','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','env','Create\x20a\x20new\x20project','project','../../commands/project/create/non-interactive.js'];a160_0x1d41=function(){return _0x3a4b20;};return a160_0x1d41();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a160_0x5f3130(0x82),'type':a160_0x5f3130(0x7f),'description':'App\x20code\x20to\x20initialize'},{'name':'env','type':a160_0x5f3130(0x7f),'description':'Target\x20environment'},{'name':a160_0x5f3130(0x92),'type':a160_0x5f3130(0x96),'description':'Auto-confirm\x20prompts','default':![]}],createFlags=[{'name':'name','type':a160_0x5f3130(0x7f),'description':'Project\x20name'},{'name':a160_0x5f3130(0x9f),'type':a160_0x5f3130(0x7f),'description':'Target\x20environment'},{'name':a160_0x5f3130(0x82),'type':a160_0x5f3130(0x7f),'description':a160_0x5f3130(0x9e)}],upgradeFlags=[{'name':a160_0x5f3130(0x92),'type':a160_0x5f3130(0x96),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':'project','command':'init','description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a160_0x5f3130(0x8b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+'\x20workspace\x20init','since':a160_0x5f3130(0x80)},'flags':initFlags,async 'execute'(_0x27dde3){const _0x1af910=a160_0x5f3130;return await initConfig({'appcode':_0x27dde3[_0x1af910(0x8f)]('appcode')||undefined,'env':_0x27dde3[_0x1af910(0x8f)]('env')||undefined,'autoYes':_0x27dde3[_0x1af910(0x9c)](_0x1af910(0x92))}),{'ok':!![]};}},{'service':a160_0x5f3130(0x7b),'command':a160_0x5f3130(0x99),'description':a160_0x5f3130(0xa0),'risk':a160_0x5f3130(0x8b),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a160_0x5f3130(0x93),'description':a160_0x5f3130(0x8e),'required':![]}],'flags':createFlags,async 'execute'(_0x4dec1a){const _0x197078=a160_0x5f3130,{createApp:_0x41a5e1}=await import(_0x197078(0x98)),{createProjectNonInteractive:_0x274c8b}=await import(_0x197078(0x7c)),_0x10b791=_0x4dec1a[_0x197078(0x8f)]('name')[_0x197078(0x83)]()||_0x4dec1a[_0x197078(0x9d)][0x0]?.[_0x197078(0x83)](),_0x3a363c=_0x4dec1a[_0x197078(0x8f)](_0x197078(0x9f))||undefined,_0x289b1b=_0x4dec1a['str'](_0x197078(0x82))||undefined;if(_0x4dec1a[_0x197078(0x90)]){if(!_0x10b791)throw CliErrors[_0x197078(0x8c)](_0x197078(0x7d),_0x197078(0x8a)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x274c8b(_0x10b791,_0x3a363c,_0x289b1b,_0x4dec1a['cookie']);}else await _0x41a5e1({'projectCode':_0x10b791,'appCode':_0x289b1b,'env':_0x3a363c,'cookie':_0x4dec1a[_0x197078(0x95)]});return{'ok':!![]};}},{'service':a160_0x5f3130(0x7b),'command':a160_0x5f3130(0x9a),'description':a160_0x5f3130(0x7e),'risk':a160_0x5f3130(0x8b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x3e4c29){const _0x2d1061=a160_0x5f3130;return await upgradeApp(_0x3e4c29['nonInteractive'],{'yes':_0x3e4c29[_0x2d1061(0x9c)](_0x2d1061(0x92))}),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30aea1,_0x5c7f9c){const _0x46b991=a161_0x4846,_0x5687cc=_0x30aea1();while(!![]){try{const _0x26c001=-parseInt(_0x46b991(0x123))/0x1+-parseInt(_0x46b991(0x106))/0x2+parseInt(_0x46b991(0x10c))/0x3*(-parseInt(_0x46b991(0x110))/0x4)+parseInt(_0x46b991(0xff))/0x5*(-parseInt(_0x46b991(0x128))/0x6)+parseInt(_0x46b991(0x125))/0x7*(-parseInt(_0x46b991(0xf9))/0x8)+-parseInt(_0x46b991(0x111))/0x9+parseInt(_0x46b991(0x100))/0xa;if(_0x26c001===_0x5c7f9c)break;else _0x5687cc['push'](_0x5687cc['shift']());}catch(_0x1f240c){_0x5687cc['push'](_0x5687cc['shift']());}}}(a161_0x477e,0x465d9));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';function a161_0x4846(_0x15db03,_0x3344b0){_0x15db03=_0x15db03-0xf7;const _0x477e63=a161_0x477e();let _0x4846b7=_0x477e63[_0x15db03];return _0x4846b7;}import a161_0x5db4fa from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';function a161_0x477e(){const _0x420d86=['169187pdKSwG','Upgrade\x20it\x20to\x20','374283YcvVZZ','init','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','146868QgWmFj','\x20\x20Apps:\x20','.rabetbase.json','?\x20(Old\x20file\x20→\x20*.bak)','72ppvYPm','✓\x20Upgraded\x20','log','bold','appcode','\x20\x20Default:\x20','10oWhseR','18692530cEQsNu','defaultApp','parse','App\x20Code\x20cannot\x20be\x20empty','cwd','gray','987466vJwuex','package.json','trim','\x20api\x20pull\x27','join','\x20workspace\x20init`\x20to\x20start\x20fresh.','3ymomib','\x20→\x20.rabetbase.json','Please\x20enter\x20App\x20Code:','Invalid\x20App\x20Code','1536048rLlcsN','35343YDNZZH','apps','string','1.0.0','\x20api\x20generate\x27\x20and\x20\x27','toLocaleString','utf8','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','green','app','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','setLogPath','env','.bak','初始化项目配置文件成功','cyan','version','info'];a161_0x477e=function(){return _0x420d86;};return a161_0x477e();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x389c36){const _0x7ed70d=a161_0x4846,{appcode:_0x428224,env:_0x4c355b,autoYes:_0x3490d6}=_0x389c36,_0x3453e9=process[_0x7ed70d(0x104)]();if(getProjectConfigPath())throw new Error('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.');let _0x2aac2c;for(const _0x31ba6b of LEGACY_CONFIG_NAMES){const _0x2efa18=resolve(_0x3453e9,_0x31ba6b);if(existsSync(_0x2efa18)){_0x2aac2c=_0x2efa18;break;}}if(_0x2aac2c){let _0x2a141c={};try{_0x2a141c=JSON[_0x7ed70d(0x102)](readFileSync(_0x2aac2c,'utf8'));}catch{}const _0xbec3ab=basename(_0x2aac2c),_0x1ef899=_0x2a141c?.[_0x7ed70d(0xfd)]||_0x2a141c?.[_0x7ed70d(0x11a)];let _0x4c1844=_0x3490d6;!_0x3490d6&&(console[_0x7ed70d(0xfb)](a161_0x5db4fa['yellow'](_0x7ed70d(0x127)+a161_0x5db4fa[_0x7ed70d(0xfc)](_0xbec3ab))),_0x1ef899&&console[_0x7ed70d(0xfb)](a161_0x5db4fa['cyan']('\x20\x20appcode:\x20'+_0x1ef899)),_0x4c1844=await confirm({'message':_0x7ed70d(0x124)+a161_0x5db4fa[_0x7ed70d(0xfc)](_0x7ed70d(0xf7))+_0x7ed70d(0xf8),'default':!![]}));if(!_0x4c1844){console[_0x7ed70d(0xfb)]('Migration\x20cancelled.\x20Run\x20`'+CLI_BIN_NAME+_0x7ed70d(0x10b));return;}const _0x4a19d3=resolve(_0x3453e9,NEW_CONFIG_NAME),_0x3875c9=getCliVersionFromPkg(),_0x5c9406=readRawConfig(),_0x2eeed1=_0x428224||(typeof _0x2a141c?.['appcode']===_0x7ed70d(0x113)?_0x2a141c[_0x7ed70d(0xfd)]:undefined)||(typeof _0x2a141c?.[_0x7ed70d(0x11a)]===_0x7ed70d(0x113)?_0x2a141c['app']:undefined)||await askAppcode(),_0x36d592=typeof _0x2a141c?.[_0x7ed70d(0x11d)]==='string'?_0x2a141c['env']:typeof _0x5c9406[_0x7ed70d(0x11d)]===_0x7ed70d(0x113)?_0x5c9406[_0x7ed70d(0x11d)]:'production',_0x21051f=buildCanonicalProjectConfig({..._0x5c9406,..._0x2a141c},{'appCodes':[_0x2eeed1],'env':_0x36d592,'metadata':{'version':_0x3875c9,'migratedAt':new Date()[_0x7ed70d(0x116)](),'migratedFrom':_0x2aac2c}});writeConfigFile(_0x4a19d3,_0x21051f);const _0x4e6026=_0x2aac2c+'.bak';renameSync(_0x2aac2c,_0x4e6026),logger[_0x7ed70d(0x11c)](_0x3453e9),logger[_0x7ed70d(0x122)](_0x7ed70d(0x126),'从旧配置文件升级成功',{'from':_0x2aac2c,'to':_0x4a19d3,'appcode':_0x2eeed1,'env':_0x21051f[_0x7ed70d(0x11d)]}),console['log'](a161_0x5db4fa['green'](_0x7ed70d(0xfa)+_0xbec3ab+_0x7ed70d(0x10d))),console[_0x7ed70d(0xfb)](a161_0x5db4fa[_0x7ed70d(0x120)](_0x7ed70d(0x129)+Object['keys'](_0x21051f[_0x7ed70d(0x112)]||{})[_0x7ed70d(0x10a)](',\x20'))),console[_0x7ed70d(0xfb)](a161_0x5db4fa[_0x7ed70d(0x120)]('\x20\x20Default:\x20'+_0x21051f[_0x7ed70d(0x101)])),console[_0x7ed70d(0xfb)](a161_0x5db4fa[_0x7ed70d(0x105)](_0x7ed70d(0x118)+_0xbec3ab+_0x7ed70d(0x11e)));return;}const _0x107ac6=_0x428224||await askAppcode(),_0xafb9b8=resolve(_0x3453e9,NEW_CONFIG_NAME),_0x477345=getCliVersionFromPkg(),_0x5a9458=readRawConfig(),_0x2357df=typeof _0x5a9458[_0x7ed70d(0x11d)]===_0x7ed70d(0x113)?_0x5a9458['env']:undefined,_0x146677=buildCanonicalProjectConfig({},{'appCodes':[_0x107ac6],'env':_0x4c355b||_0x2357df||'production','metadata':{'version':_0x477345,'createdAt':new Date()[_0x7ed70d(0x116)]()}});writeConfigFile(_0xafb9b8,_0x146677),logger[_0x7ed70d(0x11c)](_0x3453e9),logger['info'](_0x7ed70d(0x126),_0x7ed70d(0x11f),{'appcode':_0x107ac6,'env':_0x146677[_0x7ed70d(0x11d)],'version':_0x146677[_0x7ed70d(0x121)],'configPath':_0xafb9b8}),console['log'](a161_0x5db4fa[_0x7ed70d(0x119)](_0x7ed70d(0x11b))),console['log'](a161_0x5db4fa[_0x7ed70d(0x120)](_0x7ed70d(0x129)+Object['keys'](_0x146677['apps']||{})[_0x7ed70d(0x10a)](',\x20'))),console[_0x7ed70d(0xfb)](a161_0x5db4fa['cyan'](_0x7ed70d(0xfe)+_0x146677[_0x7ed70d(0x101)])),console['log']('\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27'+CLI_BIN_NAME+_0x7ed70d(0x115)+CLI_BIN_NAME+_0x7ed70d(0x109));}function askAppcode(){const _0x520c9e=a161_0x4846;return input({'message':_0x520c9e(0x10e),'validate':_0x4db694=>{const _0x56b35d=_0x520c9e;if(!_0x4db694[_0x56b35d(0x108)]())return _0x56b35d(0x103);const {valid:_0x349da2,message:_0x1da23b}=validateAppcode(_0x4db694[_0x56b35d(0x108)]());return _0x349da2||_0x1da23b||_0x56b35d(0x10f);}});}function getCliVersionFromPkg(){const _0x379a28=a161_0x4846;try{const _0x157b95=fileURLToPath(import.meta.url),_0x18b2f6=resolve(dirname(_0x157b95),'../..'),_0x3a7317=JSON['parse'](readFileSync(resolve(_0x18b2f6,_0x379a28(0x107)),_0x379a28(0x117)));return _0x3a7317[_0x379a28(0x121)]||_0x379a28(0x114);}catch{return'1.0.0';}}
|