@lovrabet/rabetbase-cli 2.3.9-beta.2 → 2.3.9-beta.3
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 -0
- 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 -0
- package/lib/commands/menu/group-create.js +1 -0
- package/lib/commands/menu/group-update.js +1 -0
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -0
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -0
- package/lib/commands/menu/shared/facts.js +1 -0
- 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 -0
- 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 -0
- package/lib/commands/task/status.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 -0
- 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 -0
- package/lib/framework/explicit-yes.js +1 -0
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a131_0x3f85(){const _0x3d0c19=['name','manualResolutionRequired','4545717VYIGSR','relatedPages','source','standard-page-status','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','nextAction','compress','appCode','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','162FYzpIJ','read','361390Aewmui','12565FDOELj','280370TKxOGj','437440EYdTCD','length','GET','code','328sHtiPL','48bfWAld','534UmDTiK','51996FcuEMK','117UhyuoB','24896gJGVxl','/standard-page-status?appCode=','page'];a131_0x3f85=function(){return _0x3d0c19;};return a131_0x3f85();}const a131_0x412581=a131_0x9956;(function(_0x513b58,_0x9a357d){const _0x28ded2=a131_0x9956,_0x2b0428=_0x513b58();while(!![]){try{const _0x5d7279=-parseInt(_0x28ded2(0x1fe))/0x1+-parseInt(_0x28ded2(0x1fb))/0x2+parseInt(_0x28ded2(0x1f9))/0x3*(-parseInt(_0x28ded2(0x207))/0x4)+parseInt(_0x28ded2(0x1fc))/0x5*(parseInt(_0x28ded2(0x204))/0x6)+parseInt(_0x28ded2(0x205))/0x7*(-parseInt(_0x28ded2(0x202))/0x8)+-parseInt(_0x28ded2(0x206))/0x9*(parseInt(_0x28ded2(0x1fd))/0xa)+parseInt(_0x28ded2(0x1f0))/0xb*(parseInt(_0x28ded2(0x203))/0xc);if(_0x5d7279===_0x9a357d)break;else _0x2b0428['push'](_0x2b0428['shift']());}catch(_0x235eaf){_0x2b0428['push'](_0x2b0428['shift']());}}}(a131_0x3f85,0x3ddc9));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a131_0x9956(_0x3eba6e,_0x55390a){_0x3eba6e=_0x3eba6e-0x1ed;const _0x3f854b=a131_0x3f85();let _0x9956ed=_0x3f854b[_0x3eba6e];return _0x9956ed;}export const pageStandardPageStatus={'service':a131_0x412581(0x1ed),'command':a131_0x412581(0x1f3),'description':a131_0x412581(0x1f4),'risk':a131_0x412581(0x1fa),'defaultOutputFormat':a131_0x412581(0x1f6),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a131_0x412581(0x1f8)}],async 'validate'(_0x396492){validateDatasetSelector(_0x396492);},async 'dryRun'(_0x4ef25a){const _0x5bc8fd=a131_0x412581,_0x261ede=await loadDatasetDetailForPage(_0x4ef25a);return{'method':_0x5bc8fd(0x200),'url':'/smartapi/lovrabet/dataset/'+_0x261ede[_0x5bc8fd(0x201)]+_0x5bc8fd(0x208)+encodeURIComponent(_0x4ef25a[_0x5bc8fd(0x1f7)]),'description':serializeDryRunDescription({'dataset':{'id':_0x261ede['id'],'code':_0x261ede[_0x5bc8fd(0x201)],'name':_0x261ede[_0x5bc8fd(0x1ee)]},'action':'query-standard-page-status'})};},async 'execute'(_0x106a5a){const _0x109dcc=a131_0x412581,_0x46e2f2=await loadDatasetDetailForPage(_0x106a5a),_0x268ba6=await loadStandardPageStatusForGenerate(_0x106a5a,_0x46e2f2[_0x109dcc(0x201)]),_0xf3107c=getUndeletedRelatedPages(_0x46e2f2),_0x2118a7=assessStandardPageState(_0x46e2f2[_0x109dcc(0x201)],_0x268ba6,{'fallbackUndeletedPages':_0xf3107c});return{'ok':!![],'data':{'datasetCode':_0x46e2f2['code'],'precheckSource':_0x268ba6?.[_0x109dcc(0x1f2)]??'related-pages-fallback','status':_0x2118a7['status'],'manualResolutionRequired':_0x2118a7[_0x109dcc(0x1ef)],'nextAction':_0x2118a7[_0x109dcc(0x1f5)],'standardPageStatus':_0x268ba6,'relatedPages':{'total':_0x46e2f2[_0x109dcc(0x1f1)]['length'],'undeletedCount':_0xf3107c[_0x109dcc(0x1ff)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a132_0x432704=a132_0x3f0d;function a132_0x3f0d(_0xdd3125,_0x947341){_0xdd3125=_0xdd3125-0x19e;const _0x47ae6f=a132_0x47ae();let _0x3f0d2a=_0x47ae6f[_0xdd3125];return _0x3f0d2a;}(function(_0x308349,_0x5b3ca7){const _0x87f23b=a132_0x3f0d,_0x52a0c2=_0x308349();while(!![]){try{const _0x34db83=-parseInt(_0x87f23b(0x19f))/0x1*(-parseInt(_0x87f23b(0x1a0))/0x2)+-parseInt(_0x87f23b(0x1b2))/0x3*(-parseInt(_0x87f23b(0x1ad))/0x4)+parseInt(_0x87f23b(0x1bb))/0x5*(parseInt(_0x87f23b(0x19e))/0x6)+-parseInt(_0x87f23b(0x1b0))/0x7*(parseInt(_0x87f23b(0x1a2))/0x8)+-parseInt(_0x87f23b(0x1b8))/0x9+parseInt(_0x87f23b(0x1a7))/0xa+-parseInt(_0x87f23b(0x1ab))/0xb*(parseInt(_0x87f23b(0x1ba))/0xc);if(_0x34db83===_0x5b3ca7)break;else _0x52a0c2['push'](_0x52a0c2['shift']());}catch(_0x258b74){_0x52a0c2['push'](_0x52a0c2['shift']());}}}(a132_0x47ae,0x4422c));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a132_0x47ae(){const _0x5f51e5=['12BJFJfz','169245Ltxjjm','relatedPages','24PpoCTb','1flgQKM','794366vDrLtk','部分页面同步失败','384528ZuKXoM','length','\x20undeleted\x20related\x20page(s)\x20found','failedPages','undeletedPages','5117830zECTmC','alias','/smartapi/lovrabet/dataset/','sync','8127823iYvVyN','code','2063632LeGLRT','string','isArray','7itomAk','page','3QXeuwh','compress','POST','appCode','dataset','fieldCount','4448043Zuvtsn','同步成功'];a132_0x47ae=function(){return _0x5f51e5;};return a132_0x47ae();}import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a132_0x432704(0x1b1),'command':a132_0x432704(0x1aa),'description':'Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','risk':'write','defaultOutputFormat':a132_0x432704(0x1b3),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a132_0x432704(0x1a8),'type':a132_0x432704(0x1ae),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x5a1c24){validateDatasetSelector(_0x5a1c24);},async 'dryRun'(_0x39b055){const _0x51f1f1=a132_0x432704,_0x4cb58a=await prepare(_0x39b055);return{'method':_0x51f1f1(0x1b4),'url':_0x51f1f1(0x1a9)+_0x4cb58a['dataset'][_0x51f1f1(0x1ac)]+'/sync-to-pages','body':{'appCode':_0x39b055[_0x51f1f1(0x1b5)]},'description':serializeDryRunDescription({'dataset':{'id':_0x4cb58a[_0x51f1f1(0x1b6)]['id'],'code':_0x4cb58a[_0x51f1f1(0x1b6)][_0x51f1f1(0x1ac)],'name':_0x4cb58a[_0x51f1f1(0x1b6)]['name'],'fieldCount':_0x4cb58a[_0x51f1f1(0x1b6)][_0x51f1f1(0x1b7)]},'relatedPages':{'total':_0x4cb58a[_0x51f1f1(0x1b6)][_0x51f1f1(0x1bc)]['length'],'undeletedCount':_0x4cb58a[_0x51f1f1(0x1a6)][_0x51f1f1(0x1a3)]},'action':'sync','reason':_0x4cb58a[_0x51f1f1(0x1a6)][_0x51f1f1(0x1a3)]+_0x51f1f1(0x1a4)})};},async 'execute'(_0x4a2cc9){const _0x3cd9bd=a132_0x432704,_0x27509b=await prepare(_0x4a2cc9),_0x388920=await syncStandardPages(_0x4a2cc9['appCode'],_0x27509b[_0x3cd9bd(0x1b6)][_0x3cd9bd(0x1ac)]),_0x2b3e54=Array[_0x3cd9bd(0x1af)](_0x388920[_0x3cd9bd(0x1a5)])&&_0x388920[_0x3cd9bd(0x1a5)][_0x3cd9bd(0x1a3)]>0x0,_0xcae81c=_0x2b3e54?_0x3cd9bd(0x1a1):_0x3cd9bd(0x1b9);return{'ok':!![],'message':_0xcae81c,'data':{'datasetCode':_0x27509b[_0x3cd9bd(0x1b6)][_0x3cd9bd(0x1ac)],..._0x388920}};}};async function prepare(_0x1cd5b3){const _0x46fe91=a132_0x432704,_0x3a9e82=await loadDatasetDetailForPage(_0x1cd5b3);return prepareDatasetAction(_0x3a9e82,_0x46fe91(0x1aa));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a133_0x2fb2(_0x870aac,_0xe859aa){_0x870aac=_0x870aac-0x7c;const _0x598b2d=a133_0x598b();let _0x2fb2ec=_0x598b2d[_0x870aac];return _0x2fb2ec;}(function(_0x4d48f1,_0x40ccc4){const _0x253148=a133_0x2fb2,_0x1b8e27=_0x4d48f1();while(!![]){try{const _0x1a8a6f=-parseInt(_0x253148(0x80))/0x1*(-parseInt(_0x253148(0x84))/0x2)+-parseInt(_0x253148(0x7c))/0x3+parseInt(_0x253148(0x82))/0x4*(parseInt(_0x253148(0x7e))/0x5)+parseInt(_0x253148(0x7f))/0x6+parseInt(_0x253148(0x83))/0x7+parseInt(_0x253148(0x85))/0x8+parseInt(_0x253148(0x81))/0x9*(-parseInt(_0x253148(0x7d))/0xa);if(_0x1a8a6f===_0x40ccc4)break;else _0x1b8e27['push'](_0x1b8e27['shift']());}catch(_0x2c9120){_0x1b8e27['push'](_0x1b8e27['shift']());}}}(a133_0x598b,0xc5b77));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 a133_0x598b(){const _0x663e24=['29566wslzsJ','60309ppxcKp','2172EeFPnD','8704528HvTLra','92FPVzje','3564112blobVb','1924227BtOpSV','4310wwDIle','1815audCTQ','6559344LHXfFT'];a133_0x598b=function(){return _0x663e24;};return a133_0x598b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a134_0x476a(){const _0x527ccd=['576BndZZN','895181xebPEK','34114652djKChr','2360340brouws','5uiswLy','11691JpZxSL','66DUMWRA','menu-id','Page\x20permit\x20for\x20menu\x20','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','42OYtrDx','46659yVlLWG','read','3206528cuAVgb','page-get','3838932RvClRK','permit'];a134_0x476a=function(){return _0x527ccd;};return a134_0x476a();}function a134_0x57bf(_0xca2a7e,_0x28c993){_0xca2a7e=_0xca2a7e-0x161;const _0x476aaf=a134_0x476a();let _0x57bf3a=_0x476aaf[_0xca2a7e];return _0x57bf3a;}const a134_0xa6ef7=a134_0x57bf;(function(_0x21c43f,_0x22ad2e){const _0x3077d0=a134_0x57bf,_0x318639=_0x21c43f();while(!![]){try{const _0x521bcd=-parseInt(_0x3077d0(0x166))/0x1*(parseInt(_0x3077d0(0x165))/0x2)+parseInt(_0x3077d0(0x16a))/0x3+-parseInt(_0x3077d0(0x168))/0x4*(parseInt(_0x3077d0(0x170))/0x5)+-parseInt(_0x3077d0(0x161))/0x6*(parseInt(_0x3077d0(0x16d))/0x7)+parseInt(_0x3077d0(0x16c))/0x8*(-parseInt(_0x3077d0(0x171))/0x9)+-parseInt(_0x3077d0(0x16f))/0xa+parseInt(_0x3077d0(0x16e))/0xb;if(_0x521bcd===_0x22ad2e)break;else _0x318639['push'](_0x318639['shift']());}catch(_0x2c02a4){_0x318639['push'](_0x318639['shift']());}}}(a134_0x476a,0xd2bfe));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a134_0xa6ef7(0x16b),'command':a134_0xa6ef7(0x169),'description':a134_0xa6ef7(0x164),'risk':a134_0xa6ef7(0x167),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x53c936){const _0x12a113=a134_0xa6ef7,_0x27e144=_0x53c936['num'](_0x12a113(0x162)),_0x536ac4=await getPagePermit(_0x27e144);return{'ok':!![],'data':{'page':projectPagePermit(_0x536ac4)},'message':_0x12a113(0x163)+_0x27e144};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a135_0x22bbc8=a135_0x1ac5;(function(_0x26795f,_0x57344c){const _0xdf7781=a135_0x1ac5,_0xc9710c=_0x26795f();while(!![]){try{const _0x28d269=parseInt(_0xdf7781(0xca))/0x1*(-parseInt(_0xdf7781(0xc2))/0x2)+parseInt(_0xdf7781(0xbe))/0x3*(-parseInt(_0xdf7781(0xd7))/0x4)+-parseInt(_0xdf7781(0xdf))/0x5*(parseInt(_0xdf7781(0xd9))/0x6)+-parseInt(_0xdf7781(0xc0))/0x7*(parseInt(_0xdf7781(0xdc))/0x8)+-parseInt(_0xdf7781(0xbd))/0x9+-parseInt(_0xdf7781(0xd8))/0xa+parseInt(_0xdf7781(0xd3))/0xb*(parseInt(_0xdf7781(0xd1))/0xc);if(_0x28d269===_0x57344c)break;else _0xc9710c['push'](_0xc9710c['shift']());}catch(_0x788681){_0xc9710c['push'](_0xc9710c['shift']());}}}(a135_0x2103,0x3c9ff));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 a135_0x1ac5(_0x3a4b88,_0x45537a){_0x3a4b88=_0x3a4b88-0xbb;const _0x2103fb=a135_0x2103();let _0x1ac59a=_0x2103fb[_0x3a4b88];return _0x1ac59a;}import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';function a135_0x2103(){const _0x2b38ca=['menu-id','7knNQpA','menuId','2tBkoEM','Pass\x20at\x20least\x20one\x20of:\x20','Updated\x20page\x20permit\x20for\x20menu\x20','permit','num','page-set','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','Nothing\x20to\x20set.','128135NizGWH','label','length','POST','join','appCode','validation','3540HSMxJc','map','64867TxXhFZ','push','flag','allowSelf','4pCVEet','1310640hqsenr','570JOYFkx','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','This\x20page\x20has\x20no\x20\x22','3295384IBrnCe','rolePermit','key','15085CuXfbZ','high-risk-write','selector','spec','2998881TBpXJM','601050UGZyNw'];a135_0x2103=function(){return _0x2b38ca;};return a135_0x2103();}const SAVE_PATH='/smartapi/permit/page/save';function collectRequestedSlots(_0x4ec8e9){const _0x2f1b33=a135_0x1ac5,_0x4f33f8=[];for(const _0x2f8bd8 of PAGE_SLOT_SPECS){const _0x3281a4=_0x4ec8e9['flag'](_0x2f8bd8[_0x2f1b33(0xd5)]);if(_0x3281a4===undefined||_0x3281a4===null)continue;const _0x5a31cf=splitList(String(_0x3281a4));if(_0x5a31cf[_0x2f1b33(0xcc)]===0x0)throw CliErrors[_0x2f1b33(0xd0)]('--'+_0x2f8bd8['flag']+'\x20cannot\x20be\x20empty.','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.');_0x4f33f8[_0x2f1b33(0xd4)]({'spec':_0x2f8bd8,'refs':_0x5a31cf});}return _0x4f33f8;}async function buildPlan(_0x405451,_0x15be0d){const _0x2d50e6=a135_0x1ac5,_0x3d5f35=_0x405451[_0x2d50e6(0xc6)](_0x2d50e6(0xbf)),_0x1038e9=collectRequestedSlots(_0x405451);if(_0x1038e9['length']===0x0)throw CliErrors[_0x2d50e6(0xd0)](_0x2d50e6(0xc9),_0x2d50e6(0xc3)+PAGE_SLOT_SPECS[_0x2d50e6(0xd2)](_0x4843e7=>'--'+_0x4843e7[_0x2d50e6(0xd5)])[_0x2d50e6(0xce)](',\x20')+'.');const _0x71e69e=await getPagePermit(_0x3d5f35),_0x287f52={},_0x39d917={},_0x30d3eb=[];for(const {spec:_0x3566fa,refs:_0x28b10a}of _0x1038e9){const _0x4c3fdd=_0x71e69e[_0x3566fa['key']];if(!_0x4c3fdd)throw CliErrors[_0x2d50e6(0xd0)](_0x2d50e6(0xdb)+_0x3566fa[_0x2d50e6(0xcb)]+'\x22\x20permission\x20slot\x20('+_0x3566fa[_0x2d50e6(0xde)]+').',_0x2d50e6(0xda));_0x287f52[_0x3566fa[_0x2d50e6(0xde)]]=projectPageSlot(_0x4c3fdd);const _0x36c020=await resolvePermitRoles(_0x405451['appCode'],_0x28b10a,{'allowSelf':_0x3566fa[_0x2d50e6(0xd6)],'label':_0x3566fa['label']});_0x4c3fdd[_0x2d50e6(0xdd)]=_0x36c020,_0x39d917[_0x3566fa[_0x2d50e6(0xde)]]=projectPageSlot(_0x4c3fdd);}const _0x38e984={'operation':'page-set','selector':{'appCode':_0x405451[_0x2d50e6(0xcf)],'menuId':_0x3d5f35,'slots':_0x1038e9[_0x2d50e6(0xd2)](_0x2fc53e=>_0x2fc53e[_0x2d50e6(0xbc)][_0x2d50e6(0xde)])},'before':_0x287f52,'after':_0x39d917,'dryRun':_0x15be0d,'backend':{'method':_0x2d50e6(0xcd),'path':SAVE_PATH},'warnings':_0x30d3eb};return{'page':_0x71e69e,'mutation':_0x38e984};}export const permitPageSet={'service':a135_0x22bbc8(0xc5),'command':a135_0x22bbc8(0xc7),'description':a135_0x22bbc8(0xc8),'risk':a135_0x22bbc8(0xe0),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x11c5e3){const _0x562636=a135_0x22bbc8,_0x14762d=collectRequestedSlots(_0x11c5e3);if(_0x14762d[_0x562636(0xcc)]===0x0)throw CliErrors[_0x562636(0xd0)](_0x562636(0xc9),_0x562636(0xc3)+PAGE_SLOT_SPECS[_0x562636(0xd2)](_0x3f5fed=>'--'+_0x3f5fed[_0x562636(0xd5)])[_0x562636(0xce)](',\x20')+'.');},async 'dryRun'(_0x2d1543){const {mutation:_0x1707f3}=await buildPlan(_0x2d1543,!![]);return asDryRunResult(_0x1707f3,{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x5c3b2b){const _0x20d2ef=a135_0x22bbc8,{page:_0x4c749b,mutation:_0x598bc8}=await buildPlan(_0x5c3b2b,![]);return await savePagePermit(_0x4c749b),{'ok':!![],'data':_0x598bc8,'message':_0x20d2ef(0xc4)+_0x598bc8[_0x20d2ef(0xbb)][_0x20d2ef(0xc1)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a136_0x57af(_0x8cdafb,_0x4a941b){_0x8cdafb=_0x8cdafb-0xa8;const _0x3917e3=a136_0x3917();let _0x57af13=_0x3917e3[_0x8cdafb];return _0x57af13;}const a136_0x19d98c=a136_0x57af;(function(_0x4a1d42,_0x33e4d6){const _0x4763d1=a136_0x57af,_0x3064ce=_0x4a1d42();while(!![]){try{const _0x2e2bf1=-parseInt(_0x4763d1(0xc7))/0x1*(-parseInt(_0x4763d1(0xa9))/0x2)+-parseInt(_0x4763d1(0xae))/0x3+parseInt(_0x4763d1(0xcd))/0x4+parseInt(_0x4763d1(0xc5))/0x5+parseInt(_0x4763d1(0xb0))/0x6*(parseInt(_0x4763d1(0xc9))/0x7)+-parseInt(_0x4763d1(0xcb))/0x8*(-parseInt(_0x4763d1(0xbd))/0x9)+-parseInt(_0x4763d1(0xc4))/0xa;if(_0x2e2bf1===_0x33e4d6)break;else _0x3064ce['push'](_0x3064ce['shift']());}catch(_0x51c771){_0x3064ce['push'](_0x3064ce['shift']());}}}(a136_0x3917,0xb6211));function a136_0x3917(){const _0x28dd8d=['5QSHRPC','selector','7ImLQzk','API','24WSkSlE','api-revoke','5449924tGrYIv','validation','high-risk-write','596506ucpUfJ','flagMissing','filter','has','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.','1798041QuILMv','Missing\x20--revoke.','1015914hgJhWM','Revoked\x20API\x20access\x20for\x20','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','appCode','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','role-apis-set','set','length','roleName','bool','action','POST','join','3505797tqLMbo','revoke','Pass\x20--datasets\x20<datasetCode,...>.','/smartapi/permit/role/update','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','push','str','33774960XMGIER','2655900OjQxkF','get'];a136_0x3917=function(){return _0x28dd8d;};return a136_0x3917();}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=a136_0x19d98c(0xc0);async function buildPlan(_0x319ece,_0x6a37ee){const _0x4228d9=a136_0x19d98c,_0x5e8dc9=await resolveRoleRef(_0x319ece[_0x4228d9(0xb3)],readRoleRef(_0x319ece));assertPermConfigurable(_0x5e8dc9);if(!_0x319ece[_0x4228d9(0xb9)]('revoke'))throw CliErrors[_0x4228d9(0xce)](_0x4228d9(0xaf),'role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).');const _0x190397=splitList(_0x319ece[_0x4228d9(0xc3)]('datasets'));if(_0x190397[_0x4228d9(0xb7)]===0x0)throw CliErrors[_0x4228d9(0xaa)]('datasets',_0x4228d9(0xbf));const _0x4caba2=await getRoleApiResources(_0x319ece['appCode'],_0x5e8dc9['id']),{byCode:_0x39715c,byDataset:_0x333b7f}=flattenApiResources(_0x4caba2),_0x2b6205=_0x190397[_0x4228d9(0xab)](_0x253c88=>!_0x333b7f[_0x4228d9(0xac)](_0x253c88));if(_0x2b6205[_0x4228d9(0xb7)]>0x0)throw CliErrors['validation'](_0x4228d9(0xb4)+_0x2b6205[_0x4228d9(0xbc)](',\x20')+'.',_0x4228d9(0xad));const _0x5ad201=new Map(),_0x4fa1c5=[],_0x55e2ab=[];for(const _0x1358b7 of _0x190397){for(const _0x1692c2 of _0x333b7f[_0x4228d9(0xc6)](_0x1358b7)){const _0x270d47=_0x39715c['get'](_0x1692c2);_0x5ad201[_0x4228d9(0xb6)](_0x1692c2,'0'),_0x4fa1c5[_0x4228d9(0xc2)]({'resourceCode':_0x1692c2,'datasetCode':_0x1358b7,'action':_0x270d47[_0x4228d9(0xba)]}),_0x55e2ab[_0x4228d9(0xc2)]({'resourceCode':_0x1692c2,'datasetCode':_0x1358b7,'action':'0'});}}const _0xa6fb61=buildPermits(_0x39715c,_0x5ad201),_0x4d8e74={'operation':_0x4228d9(0xcc),'selector':{'appCode':_0x319ece[_0x4228d9(0xb3)],'roleId':_0x5e8dc9['id'],'roleName':_0x5e8dc9['roleName'],'datasetCodes':_0x190397},'before':_0x4fa1c5,'after':_0x55e2ab,'dryRun':_0x6a37ee,'backend':{'method':_0x4228d9(0xbb),'path':UPDATE_PATH,'roleType':'API'},'warnings':[]};return{'role':_0x5e8dc9,'permits':_0xa6fb61,'mutation':_0x4d8e74};}export const permitRoleApisSet={'service':'permit','command':a136_0x19d98c(0xb5),'description':a136_0x19d98c(0xc1),'risk':a136_0x19d98c(0xa8),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0xb21bb6){const _0x2d2040=a136_0x19d98c;if(!_0xb21bb6[_0x2d2040(0xb9)](_0x2d2040(0xbe)))throw CliErrors['validation'](_0x2d2040(0xaf),_0x2d2040(0xb2));if(splitList(_0xb21bb6['str']('datasets'))[_0x2d2040(0xb7)]===0x0)throw CliErrors[_0x2d2040(0xaa)]('datasets','Pass\x20--datasets\x20<datasetCode,...>.');},async 'dryRun'(_0x4fa1f2){const {mutation:_0x8dc33c}=await buildPlan(_0x4fa1f2,!![]);return asDryRunResult(_0x8dc33c,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x345c69){const _0x5373eb=a136_0x19d98c,{role:_0x384b29,permits:_0x408479,mutation:_0x3cc5f3}=await buildPlan(_0x345c69,![]);return await updateAppRole({'id':_0x384b29['id'],'appCode':_0x345c69[_0x5373eb(0xb3)],'roleType':_0x5373eb(0xca),'permits':_0x408479}),{'ok':!![],'data':_0x3cc5f3,'message':_0x5373eb(0xb1)+_0x3cc5f3[_0x5373eb(0xc8)]['datasetCodes'][_0x5373eb(0xb7)]+'\x20dataset(s)\x20on\x20role\x20'+_0x384b29[_0x5373eb(0xb8)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a137_0x139ab2=a137_0x239e;(function(_0x17418c,_0x577bd9){const _0x2e9196=a137_0x239e,_0x1ab097=_0x17418c();while(!![]){try{const _0x5c64dd=-parseInt(_0x2e9196(0xfa))/0x1+-parseInt(_0x2e9196(0xf7))/0x2+-parseInt(_0x2e9196(0xfd))/0x3*(-parseInt(_0x2e9196(0x106))/0x4)+-parseInt(_0x2e9196(0x109))/0x5*(parseInt(_0x2e9196(0x103))/0x6)+parseInt(_0x2e9196(0x104))/0x7+parseInt(_0x2e9196(0x101))/0x8*(-parseInt(_0x2e9196(0xf5))/0x9)+parseInt(_0x2e9196(0xf1))/0xa;if(_0x5c64dd===_0x577bd9)break;else _0x1ab097['push'](_0x1ab097['shift']());}catch(_0x48e795){_0x1ab097['push'](_0x1ab097['shift']());}}}(a137_0x4c6b,0xb93ee));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 a137_0x239e(_0x31db38,_0x3d8719){_0x31db38=_0x31db38-0xec;const _0x4c6b45=a137_0x4c6b();let _0x239e2a=_0x4c6b45[_0x31db38];return _0x239e2a;}function a137_0x4c6b(){const _0x5983e9=['high-risk-write','30666LlQLPF','POST','resourceCodes','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','583768AmkuRj','join','7160586Nhqdql','3627204CXSApm','str','292MUlHBD','/smartapi/permit/role/update','selector','5bYSXxV','roleName','access','PAGE','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','validation','role-menus-set','length','31231170ryDSsI','action','get','has','81bZAuQD','Unknown\x20menu\x20resourceCode(s):\x20','899520lWZCDn','flagMissing','appCode','1328799oibgxx','menus'];a137_0x4c6b=function(){return _0x5983e9;};return a137_0x4c6b();}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=a137_0x139ab2(0x107);async function buildPlan(_0x1433b6,_0x1f6fa1){const _0x1d5313=a137_0x139ab2,_0x4e8fd4=await resolveRoleRef(_0x1433b6[_0x1d5313(0xf9)],readRoleRef(_0x1433b6));assertPermConfigurable(_0x4e8fd4);const _0x5ac83b=readGrantRevoke(_0x1433b6),_0x447b8c=splitList(_0x1433b6[_0x1d5313(0x105)](_0x1d5313(0xfb)));if(_0x447b8c['length']===0x0)throw CliErrors[_0x1d5313(0xf8)]('menus','Pass\x20--menus\x20<resourceCode,...>.');const _0x4d23a0=await getRoleMenuResources(_0x1433b6[_0x1d5313(0xf9)],_0x4e8fd4['id']),_0x5dd5bc=flattenMenuResources(_0x4d23a0),_0x381047=_0x447b8c['filter'](_0x39b5b6=>!_0x5dd5bc[_0x1d5313(0xf4)](_0x39b5b6));if(_0x381047['length']>0x0)throw CliErrors[_0x1d5313(0xee)](_0x1d5313(0xf6)+_0x381047[_0x1d5313(0x102)](',\x20')+'.',_0x1d5313(0xed));const _0x2fa144=new Map(),_0x554503=[],_0x4cbe40=[];for(const _0x3037bf of _0x447b8c){const _0x40b1e9=_0x5dd5bc[_0x1d5313(0xf3)](_0x3037bf);_0x2fa144['set'](_0x3037bf,_0x5ac83b),_0x554503['push']({'resourceCode':_0x3037bf,'action':_0x40b1e9[_0x1d5313(0xf2)]}),_0x4cbe40['push']({'resourceCode':_0x3037bf,'action':_0x5ac83b});}const _0x500ba4=buildPermits(_0x5dd5bc,_0x2fa144),_0x2eb8cc={'operation':_0x5ac83b===_0x1d5313(0x10b)?'menu-grant':'menu-revoke','selector':{'appCode':_0x1433b6['appCode'],'roleId':_0x4e8fd4['id'],'roleName':_0x4e8fd4[_0x1d5313(0x10a)],'resourceCodes':_0x447b8c},'before':_0x554503,'after':_0x4cbe40,'dryRun':_0x1f6fa1,'backend':{'method':_0x1d5313(0xfe),'path':UPDATE_PATH,'roleType':_0x1d5313(0xec)},'warnings':[]};return{'role':_0x4e8fd4,'permits':_0x500ba4,'mutation':_0x2eb8cc};}export const permitRoleMenusSet={'service':'permit','command':a137_0x139ab2(0xef),'description':a137_0x139ab2(0x100),'risk':a137_0x139ab2(0xfc),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x19bbaa){const _0x2dba2a=a137_0x139ab2;readGrantRevoke(_0x19bbaa);if(splitList(_0x19bbaa[_0x2dba2a(0x105)](_0x2dba2a(0xfb)))[_0x2dba2a(0xf0)]===0x0)throw CliErrors[_0x2dba2a(0xf8)](_0x2dba2a(0xfb),'Pass\x20--menus\x20<resourceCode,...>.');},async 'dryRun'(_0x23a97d){const _0x57705b=a137_0x139ab2,{mutation:_0x3cc53f}=await buildPlan(_0x23a97d,!![]);return asDryRunResult(_0x3cc53f,{'method':_0x57705b(0xfe),'url':UPDATE_PATH});},async 'execute'(_0x482ba5){const _0x388da1=a137_0x139ab2,{role:_0x3a8eab,permits:_0x5c9e66,mutation:_0x3c7e08}=await buildPlan(_0x482ba5,![]);return await updateAppRole({'id':_0x3a8eab['id'],'appCode':_0x482ba5[_0x388da1(0xf9)],'roleType':_0x388da1(0xec),'permits':_0x5c9e66}),{'ok':!![],'data':_0x3c7e08,'message':'Updated\x20'+_0x3c7e08[_0x388da1(0x108)][_0x388da1(0xff)]['length']+'\x20menu\x20permit(s)\x20for\x20role\x20'+_0x3a8eab[_0x388da1(0x10a)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a138_0x447377=a138_0x549d;(function(_0x5b8741,_0x36c4c9){const _0x462c7d=a138_0x549d,_0x2bcfff=_0x5b8741();while(!![]){try{const _0x14be4d=-parseInt(_0x462c7d(0x146))/0x1*(-parseInt(_0x462c7d(0x151))/0x2)+-parseInt(_0x462c7d(0x149))/0x3+parseInt(_0x462c7d(0x15c))/0x4*(-parseInt(_0x462c7d(0x157))/0x5)+-parseInt(_0x462c7d(0x147))/0x6*(-parseInt(_0x462c7d(0x15e))/0x7)+parseInt(_0x462c7d(0x14b))/0x8+parseInt(_0x462c7d(0x15b))/0x9*(parseInt(_0x462c7d(0x14c))/0xa)+-parseInt(_0x462c7d(0x152))/0xb;if(_0x14be4d===_0x36c4c9)break;else _0x2bcfff['push'](_0x2bcfff['shift']());}catch(_0x2e735d){_0x2bcfff['push'](_0x2bcfff['shift']());}}}(a138_0x3220,0x4bf4c));function a138_0x549d(_0x325383,_0x145a86){_0x325383=_0x325383-0x146;const _0x322099=a138_0x3220();let _0x549d13=_0x322099[_0x325383];return _0x549d13;}import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';function a138_0x3220(){const _0xdfe3d6=['length','55914GoyHLb','2292521bdWyyc','resourceName','permit','roleName','\x20has\x20','259495BuYVcX','access','allowed','Role\x20','927WbDDqj','32AXviAo','values','89173HDRAma','map','19RQPIBD','168krAxHp','filter','407958hDDrLw','appCode','443352ZszWCn','12370TIKFbQ','resourceCode','read','action'];a138_0x3220=function(){return _0xdfe3d6;};return a138_0x3220();}import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a138_0x447377(0x154),'command':'role-menus','description':'Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','risk':a138_0x447377(0x14e),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x65bf36){const _0x217bdf=a138_0x447377,_0x448d19=await resolveRoleRef(_0x65bf36[_0x217bdf(0x14a)],readRoleRef(_0x65bf36)),_0x38c1ea=await getRoleMenuResources(_0x65bf36['appCode'],_0x448d19['id']),_0x2665bb=flattenMenuResources(_0x38c1ea),_0x3791ca=Array['from'](_0x2665bb[_0x217bdf(0x15d)]())[_0x217bdf(0x15f)](_0x101565=>({'resourceCode':_0x101565[_0x217bdf(0x14d)],'resourceName':_0x101565[_0x217bdf(0x153)],'allowed':_0x101565[_0x217bdf(0x14f)]===_0x217bdf(0x158),'action':_0x101565['action']}));return{'ok':!![],'data':{'selector':{'appCode':_0x65bf36[_0x217bdf(0x14a)],'roleId':_0x448d19['id'],'roleName':_0x448d19[_0x217bdf(0x155)]},'menus':_0x3791ca},'message':_0x217bdf(0x15a)+_0x448d19[_0x217bdf(0x155)]+_0x217bdf(0x156)+_0x3791ca[_0x217bdf(0x148)](_0x4a29b6=>_0x4a29b6[_0x217bdf(0x159)])[_0x217bdf(0x150)]+'/'+_0x3791ca[_0x217bdf(0x150)]+'\x20menu(s)\x20allowed'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a139_0x4fd444=a139_0x1592;(function(_0x4af7ba,_0x306080){const _0x4cbe3f=a139_0x1592,_0x310d4a=_0x4af7ba();while(!![]){try{const _0x464f32=-parseInt(_0x4cbe3f(0x199))/0x1*(-parseInt(_0x4cbe3f(0x18d))/0x2)+-parseInt(_0x4cbe3f(0x15f))/0x3+-parseInt(_0x4cbe3f(0x177))/0x4+parseInt(_0x4cbe3f(0x14c))/0x5*(parseInt(_0x4cbe3f(0x15e))/0x6)+parseInt(_0x4cbe3f(0x18f))/0x7*(-parseInt(_0x4cbe3f(0x158))/0x8)+parseInt(_0x4cbe3f(0x186))/0x9*(-parseInt(_0x4cbe3f(0x14b))/0xa)+parseInt(_0x4cbe3f(0x15b))/0xb;if(_0x464f32===_0x306080)break;else _0x310d4a['push'](_0x310d4a['shift']());}catch(_0x314e49){_0x310d4a['push'](_0x310d4a['shift']());}}}(a139_0x29db,0x68d83));function a139_0x1592(_0x4f9339,_0x2caf03){_0x4f9339=_0x4f9339-0x145;const _0x29db3f=a139_0x29db();let _0x159278=_0x29db3f[_0x4f9339];return _0x159278;}import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a139_0x4fd444(0x159),'type':a139_0x4fd444(0x178),'required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};export const ROLE_REF_FLAG={'name':a139_0x4fd444(0x176),'type':a139_0x4fd444(0x165),'required':!![],'description':a139_0x4fd444(0x163)};export const GRANT_FLAG={'name':'grant','type':a139_0x4fd444(0x156),'required':![],'description':a139_0x4fd444(0x17c)};export const REVOKE_FLAG={'name':a139_0x4fd444(0x182),'type':a139_0x4fd444(0x156),'required':![],'description':a139_0x4fd444(0x181)};export const MENUS_FLAG={'name':a139_0x4fd444(0x172),'type':'string','required':!![],'description':'Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke'};function a139_0x29db(){const _0x44b38d=['some','string','data\x20detail','Disambiguate\x20with\x20an\x20id.','roleName','access','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','data\x20create','bool','export-roles','\x20is\x20not\x20available\x20for\x20this\x20app.','data\x20update','datasetCode','dataExport','menus','find','menuId','filter','role','1228720vPevUi','number','trim','dataPermit','\x22\x20not\x20found.','Grant\x20access\x20to\x20the\x20listed\x20resources','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','update-roles','Role\x20id\x20','data\x20delete','Revoke\x20access\x20to\x20the\x20listed\x20resources','revoke','get','map','\x22\x20is\x20ambiguous\x20(ids:\x20','9nQMZWQ','join','dataDetail','resourceName','action','split','data\x20export','35158poNcpp','menuPermit','441ViDyzP','allowedActions','toUpperCase','datasets','flag','Role\x20\x22','row-roles','Run\x20`role\x20list`.','roleType','rolePermit','41QOIpIn','SELF','dataCreate','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','detail-roles','ALL','pageNodeList','3861620mQBSmZ','860vnyJEB','push','apiList','allowSelf','\x20(comma-separated\x20SELF/ALL/id/name)','Roles\x20for\x20','create-roles','Missing\x20action.','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','key','boolean','flagMissing','25624mpckVK','menu-id','set','10104985JZltoo','Pass\x20--role\x20<id|name>.','resourceCode','8340ExKIKt','1661640poHWXg','test','validation','length','Role\x20id\x20or\x20role\x20name'];a139_0x29db=function(){return _0x44b38d;};return a139_0x29db();}export const DATASETS_FLAG={'name':a139_0x4fd444(0x192),'type':a139_0x4fd444(0x165),'required':!![],'description':'Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for'};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a139_0x4fd444(0x18e),'allowSelf':![],'label':'menu\x20visibility'},{'flag':a139_0x4fd444(0x152),'key':a139_0x4fd444(0x146),'allowSelf':![],'label':a139_0x4fd444(0x16b)},{'flag':a139_0x4fd444(0x17e),'key':'dataUpdate','allowSelf':![],'label':a139_0x4fd444(0x16f)},{'flag':'delete-roles','key':'dataDelete','allowSelf':![],'label':a139_0x4fd444(0x180)},{'flag':a139_0x4fd444(0x148),'key':a139_0x4fd444(0x188),'allowSelf':![],'label':a139_0x4fd444(0x166)},{'flag':a139_0x4fd444(0x16d),'key':a139_0x4fd444(0x171),'allowSelf':![],'label':a139_0x4fd444(0x18c)},{'flag':a139_0x4fd444(0x195),'key':a139_0x4fd444(0x17a),'allowSelf':!![],'label':'row\x20visibility'}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x59c645=>({'name':_0x59c645[a139_0x4fd444(0x193)],'type':a139_0x4fd444(0x165),'required':![],'description':a139_0x4fd444(0x151)+_0x59c645['label']+a139_0x4fd444(0x150)+(_0x59c645[a139_0x4fd444(0x14f)]?';\x20SELF\x20=\x20only\x20own\x20rows':'')}));export function splitList(_0x2bea85){const _0x49369=a139_0x4fd444;return _0x2bea85[_0x49369(0x18b)](',')['map'](_0x4a5719=>_0x4a5719[_0x49369(0x179)]())[_0x49369(0x175)](Boolean);}export function projectRoleRef(_0x30248c){const _0x212282=a139_0x4fd444;return{'id':_0x30248c['id'],'roleName':_0x30248c[_0x212282(0x168)],'roleType':_0x30248c[_0x212282(0x197)]};}export async function resolvePermitRoles(_0x3862c1,_0x80ef68,_0xaf98a0){const _0x172cdd=a139_0x4fd444,_0x15a389=await listPermitRoles(_0x3862c1,{'needSelf':!![],'needPublic':!![]}),_0x27c73e=[];for(const _0xc66a of _0x80ef68){const _0x2f4b12=resolveOnePermitRole(_0x15a389,_0xc66a);if(!_0xaf98a0['allowSelf']&&_0x2f4b12['roleType']===_0x172cdd(0x145))throw CliErrors[_0x172cdd(0x161)]('SELF\x20is\x20not\x20allowed\x20for\x20'+_0xaf98a0['label']+'.',_0x172cdd(0x16a));if(!_0x27c73e[_0x172cdd(0x164)](_0xb7607d=>_0xb7607d['id']===_0x2f4b12['id']))_0x27c73e['push'](_0x2f4b12);}return _0x27c73e;}function resolveOnePermitRole(_0x2ea59e,_0x55d240){const _0x110a34=a139_0x4fd444,_0x1398b0=_0x55d240['trim'](),_0x479c68=_0x1398b0[_0x110a34(0x191)]();if(_0x479c68===_0x110a34(0x145)||_0x479c68===_0x110a34(0x149)){const _0x5e7341=_0x2ea59e[_0x110a34(0x173)](_0x367e34=>_0x367e34['roleType']===_0x479c68);if(!_0x5e7341)throw CliErrors[_0x110a34(0x161)]('Special\x20role\x20'+_0x479c68+_0x110a34(0x16e));return _0x5e7341;}if(/^-?\d+$/[_0x110a34(0x160)](_0x1398b0)){const _0x4dc512=Number(_0x1398b0),_0x195b06=_0x2ea59e[_0x110a34(0x173)](_0x1e4174=>_0x1e4174['id']===_0x4dc512);if(!_0x195b06)throw CliErrors[_0x110a34(0x161)](_0x110a34(0x17f)+_0x4dc512+'\x20not\x20found.',_0x110a34(0x196));return _0x195b06;}const _0x5370a4=_0x2ea59e[_0x110a34(0x175)](_0x5c3890=>_0x5c3890[_0x110a34(0x168)]===_0x1398b0);if(_0x5370a4[_0x110a34(0x162)]===0x0)throw CliErrors['validation'](_0x110a34(0x194)+_0x1398b0+_0x110a34(0x17b),_0x110a34(0x154));if(_0x5370a4[_0x110a34(0x162)]>0x1)throw CliErrors[_0x110a34(0x161)]('Role\x20\x22'+_0x1398b0+_0x110a34(0x185)+_0x5370a4[_0x110a34(0x184)](_0x2d45fe=>_0x2d45fe['id'])[_0x110a34(0x187)](',\x20')+').',_0x110a34(0x167));return _0x5370a4[0x0];}export function projectPageSlot(_0x517d91){const _0x3a7202=a139_0x4fd444;if(!_0x517d91)return null;return{'resourceCode':_0x517d91['resourceCode'],'roles':(_0x517d91[_0x3a7202(0x198)]??[])[_0x3a7202(0x184)](projectRoleRef)};}export function projectPagePermit(_0x6e298c){const _0x4246e6=a139_0x4fd444,_0x28e2bd={'menuId':_0x6e298c[_0x4246e6(0x174)],'appCode':_0x6e298c['appCode'],'menuPermit':projectPageSlot(_0x6e298c[_0x4246e6(0x18e)])};for(const _0x71d1be of PAGE_SLOT_SPECS){if(_0x71d1be[_0x4246e6(0x155)]===_0x4246e6(0x18e))continue;_0x28e2bd[_0x71d1be[_0x4246e6(0x155)]]=projectPageSlot(_0x6e298c[_0x71d1be['key']]);}return _0x28e2bd;}export function flattenMenuResources(_0x16c210){const _0x48cfa4=new Map(),_0x5bd911=_0x319967=>{const _0x1ddfc1=a139_0x1592;for(const _0x3cb208 of _0x319967??[]){_0x48cfa4[_0x1ddfc1(0x15a)](_0x3cb208[_0x1ddfc1(0x15d)],{'resourceCode':_0x3cb208['resourceCode'],'resourceName':_0x3cb208[_0x1ddfc1(0x189)],'action':_0x3cb208[_0x1ddfc1(0x190)]?.[0x0]??'0'});if(_0x3cb208[_0x1ddfc1(0x14a)])_0x5bd911(_0x3cb208[_0x1ddfc1(0x14a)]);}};return _0x5bd911(_0x16c210),_0x48cfa4;}export function flattenApiResources(_0x559667){const _0x19ff36=a139_0x4fd444,_0x800b59=new Map(),_0x4f0d02=new Map();for(const _0x1dd03f of _0x559667){const _0x259cca=_0x1dd03f[_0x19ff36(0x14e)]??{};for(const [_0x52023b,_0x42d0eb]of Object['entries'](_0x259cca)){_0x800b59['set'](_0x52023b,{'resourceCode':_0x52023b,'resourceName':_0x1dd03f[_0x19ff36(0x189)],'datasetCode':_0x1dd03f['datasetCode'],'action':_0x42d0eb?.[0x0]??'0'});const _0x3cc4eb=_0x4f0d02['get'](_0x1dd03f['datasetCode'])??[];_0x3cc4eb[_0x19ff36(0x14d)](_0x52023b),_0x4f0d02[_0x19ff36(0x15a)](_0x1dd03f[_0x19ff36(0x170)],_0x3cc4eb);}}return{'byCode':_0x800b59,'byDataset':_0x4f0d02};}export function buildPermits(_0x2ed8ed,_0x125068){const _0x316370=a139_0x4fd444,_0xc32775={};for(const [_0x751c70,_0x201166]of _0x2ed8ed){const _0x21d047=_0x125068[_0x316370(0x183)](_0x751c70)??_0x201166[_0x316370(0x18a)];_0xc32775[_0x751c70]=[_0x21d047];}return _0xc32775;}export function readRoleRef(_0x4b0551){const _0x200a2f=a139_0x4fd444,_0x21c73a=_0x4b0551['str'](_0x200a2f(0x176))[_0x200a2f(0x179)]();if(!_0x21c73a)throw CliErrors[_0x200a2f(0x157)]('role',_0x200a2f(0x15c));return _0x21c73a;}export function readGrantRevoke(_0x4d0e1f){const _0x1eedfd=a139_0x4fd444,_0x3d4fd3=_0x4d0e1f[_0x1eedfd(0x16c)]('grant'),_0x12b6c=_0x4d0e1f[_0x1eedfd(0x16c)]('revoke');if(_0x3d4fd3&&_0x12b6c)throw CliErrors[_0x1eedfd(0x161)](_0x1eedfd(0x147));if(!_0x3d4fd3&&!_0x12b6c)throw CliErrors[_0x1eedfd(0x161)](_0x1eedfd(0x153),_0x1eedfd(0x17d));return _0x3d4fd3?_0x1eedfd(0x169):'0';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5810a4,_0x3d5e13){const _0x4561d2=a140_0x1bc3,_0x4157dc=_0x5810a4();while(!![]){try{const _0x330ef7=parseInt(_0x4561d2(0x202))/0x1+parseInt(_0x4561d2(0x1eb))/0x2+-parseInt(_0x4561d2(0x1fb))/0x3+parseInt(_0x4561d2(0x1ea))/0x4*(parseInt(_0x4561d2(0x1ed))/0x5)+parseInt(_0x4561d2(0x1ee))/0x6+parseInt(_0x4561d2(0x1ec))/0x7*(-parseInt(_0x4561d2(0x1ef))/0x8)+-parseInt(_0x4561d2(0x200))/0x9*(parseInt(_0x4561d2(0x1f5))/0xa);if(_0x330ef7===_0x3d5e13)break;else _0x4157dc['push'](_0x4157dc['shift']());}catch(_0x52f8a5){_0x4157dc['push'](_0x4157dc['shift']());}}}(a140_0x2ea7,0xc8039));import{existsSync}from'node:fs';import a140_0x4564af from'node:path';import a140_0x233ec1 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a140_0x1bc3(_0x55843a,_0x367dbb){_0x55843a=_0x55843a-0x1e7;const _0x2ea795=a140_0x2ea7();let _0x1bc3d7=_0x2ea795[_0x55843a];return _0x1bc3d7;}function a140_0x2ea7(){const _0x350c4a=['production','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','Directory\x20\x22','Not\x20set','3772989TEGsdz','my-app','trim','Skipped','Project\x20name\x20cannot\x20exceed\x2050\x20characters','11448mGYAtw','log','41609NgMDUe','Logged\x20in','\x22\x20already\x20exists','√\x20Login\x20status:\x20','√\x20App\x20Code:\x20','green','Project\x20name:','√\x20Project\x20Name:\x20','31764sGxUIr','2252314hxMLpw','3051895oisvwp','805kmdXXj','2880228IVRqRd','8HohMtu','cwd','env','test','length','cyan','3250bBMAJk','Login\x20failed'];a140_0x2ea7=function(){return _0x350c4a;};return a140_0x2ea7();}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x390677,_0x25da72,_0xd466f2){const _0x475d21=a140_0x1bc3,_0x371e34=_0x475d21(0x1fc),_0x1969f0=readConfig(),_0x54994d=typeof _0x1969f0[_0x475d21(0x1f1)]==='string'?_0x1969f0[_0x475d21(0x1f1)]:undefined,_0x223ffa=await input({'message':_0x475d21(0x1e8),'default':_0x371e34,'validate':_0x53a018=>{const _0x4a659d=_0x475d21,_0x4809d8=_0x53a018[_0x4a659d(0x1fd)]()||_0x371e34;if(_0x4809d8[_0x4a659d(0x1f3)]>0x32)return _0x4a659d(0x1ff);const _0x4f239a=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x4809d8&&!_0x4f239a[_0x4a659d(0x1f2)](_0x4809d8))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0x2db52d=a140_0x4564af['resolve'](process[_0x4a659d(0x1f0)](),_0x4809d8);if(existsSync(_0x2db52d))return _0x4a659d(0x1f9)+_0x4809d8+_0x4a659d(0x204);return!![];}});console[_0x475d21(0x201)](a140_0x233ec1[_0x475d21(0x1e7)](_0x475d21(0x1e9)+a140_0x233ec1[_0x475d21(0x1f4)](_0x223ffa)));const _0x30de0b=await selectSingleAppcode(_0xd466f2);console[_0x475d21(0x201)](a140_0x233ec1[_0x475d21(0x1e7)](_0x475d21(0x206)+a140_0x233ec1['cyan'](_0x30de0b||_0x475d21(0x1fa))));if(_0x30de0b){const _0x2bce4a=await getIsSessionValid();if(!_0x2bce4a){const _0x296819=await confirm({'message':_0x475d21(0x1f8),'default':!![]});if(_0x296819){const _0x4a0157=await authServer({'silent':!![]});console[_0x475d21(0x201)](a140_0x233ec1[_0x475d21(0x1e7)](_0x475d21(0x205)+a140_0x233ec1[_0x475d21(0x1f4)](_0x4a0157?_0x475d21(0x203):_0x475d21(0x1f6))));}else console[_0x475d21(0x201)](a140_0x233ec1[_0x475d21(0x1e7)](_0x475d21(0x205)+a140_0x233ec1[_0x475d21(0x1f4)](_0x475d21(0x1fe))));}await _0x390677({'projectName':_0x223ffa,'appCode':_0x30de0b,'env':_0x25da72||_0x54994d||_0x475d21(0x1f7)});}else await _0x390677({'projectName':_0x223ffa,'env':_0x25da72||_0x54994d||_0x475d21(0x1f7)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a141_0x4507(){const _0x2a0a54=['666aRHquy','3175768TDSTxP','replace','391841IeEOJZ','9rJhlrx','9140052pyhShQ','2905928jvCDIB','2EopdOf','5zItDON','33oKaxWk','toFixed','81011xTyiYU','1041216bjbPIC','6486780GizwrV'];a141_0x4507=function(){return _0x2a0a54;};return a141_0x4507();}function a141_0x286a(_0x5b9545,_0xa03c8e){_0x5b9545=_0x5b9545-0x115;const _0x4507f6=a141_0x4507();let _0x286acc=_0x4507f6[_0x5b9545];return _0x286acc;}(function(_0x245876,_0x25a5fe){const _0x2723a8=a141_0x286a,_0x18f675=_0x245876();while(!![]){try{const _0xd10264=parseInt(_0x2723a8(0x116))/0x1*(parseInt(_0x2723a8(0x11a))/0x2)+parseInt(_0x2723a8(0x11f))/0x3+-parseInt(_0x2723a8(0x119))/0x4*(-parseInt(_0x2723a8(0x11b))/0x5)+-parseInt(_0x2723a8(0x121))/0x6*(-parseInt(_0x2723a8(0x11e))/0x7)+-parseInt(_0x2723a8(0x122))/0x8+-parseInt(_0x2723a8(0x117))/0x9*(-parseInt(_0x2723a8(0x120))/0xa)+parseInt(_0x2723a8(0x11c))/0xb*(-parseInt(_0x2723a8(0x118))/0xc);if(_0xd10264===_0x25a5fe)break;else _0x18f675['push'](_0x18f675['shift']());}catch(_0x23dad1){_0x18f675['push'](_0x18f675['shift']());}}}(a141_0x4507,0xaef94));export function formatElapsed(_0x3dc904){const _0x5ac35f=a141_0x286a,_0x580d64=Date['now']()-_0x3dc904;if(_0x580d64<0x3e8)return _0x580d64+'ms';const _0x2d9212=(_0x580d64/0x3e8)[_0x5ac35f(0x11d)](0x2),_0x4d17b4=_0x2d9212[_0x5ac35f(0x115)](/\.?0+$/u,'');return _0x4d17b4+'s';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2ba51d,_0x488b42){const _0xb0f4b0=a134_0x23ef,_0x717eef=_0x2ba51d();while(!![]){try{const _0x550cf6=parseInt(_0xb0f4b0(0x200))/0x1*(parseInt(_0xb0f4b0(0x1ec))/0x2)+parseInt(_0xb0f4b0(0x22a))/0x3*(parseInt(_0xb0f4b0(0x1e0))/0x4)+parseInt(_0xb0f4b0(0x22d))/0x5+-parseInt(_0xb0f4b0(0x21a))/0x6+-parseInt(_0xb0f4b0(0x1e3))/0x7*(-parseInt(_0xb0f4b0(0x214))/0x8)+-parseInt(_0xb0f4b0(0x1fe))/0x9+-parseInt(_0xb0f4b0(0x1fa))/0xa*(parseInt(_0xb0f4b0(0x222))/0xb);if(_0x550cf6===_0x488b42)break;else _0x717eef['push'](_0x717eef['shift']());}catch(_0x3aa210){_0x717eef['push'](_0x717eef['shift']());}}}(a134_0x2037,0x68ab3));import a134_0x54649b from'path';import a134_0x43768b from'fs';function a134_0x23ef(_0xfb2aaa,_0xd0d476){_0xfb2aaa=_0xfb2aaa-0x1cc;const _0x2037aa=a134_0x2037();let _0x23ef13=_0x2037aa[_0xfb2aaa];return _0x23ef13;}import a134_0x414975 from'chalk';import a134_0x16be23 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';function a134_0x2037(){const _0x394800=['projectName','create','\x20model(s)','cwd','更新\x20package.json\x20name','4nwCIsV','cyan','parse','174475coBmsq','production','清理项目目录失败:\x20','stringify','√\x20Configuration\x20file\x20created,\x20Apps:\x20','existsSync','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','repeat','trim','2906MxygXC','🚀\x20Next\x20Steps:','env','error','API\x20配置拉取异常','warn','bold','package.json','fail','readFileSync','Install\x20dependencies','W_OK','needsUpgrade','配置应用AppCode失败','20FjoTAy','更新\x20package.json\x20失败','Project\x20directory\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','9900CeRcyr','toLocaleString','562rawqvW','\x20|\x20Default:\x20','\x20dataset(s),\x20generated\x20','apps','stableVersion','\x20\x201.\x20Start\x20project:\x20','Format\x20code','resolve','*\x20Pulling\x20API\x20configuration...','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','success','\x20run\x20start','*\x20Configuring\x20AppCode\x20for\x20project\x20','belowMinimum','modelCount','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','join','projectCode','CLI\x20版本检查','224BXbKdd','writeFileSync','setLogPath','accessSync','\x20\x202.\x20Pull\x20API\x20configuration:\x20','start','2381904LebzdB','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','defaultApp','appCode','API\x20configuration\x20pulled:\x20','\x20api\x20pull','\x20config\x20set\x20appcode\x20<app-code>\x27','1.0.0','7357009yDhidU','description','Project\x20name\x20cannot\x20be\x20empty','\x20|\x20AppCode:\x20','version','项目创建失败:\x20','utf8','项目创建完成:\x20','188955LbwwOG','\x20&&\x20','√\x20Pulled\x20','2934870WcpiMX','green','\x20√\x20','配置应用AppCode:\x20','√\x20package.json\x20updated:\x20name=','开始创建项目:\x20','length','keys','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','cookie','chdir','gray','log','...','message','info'];a134_0x2037=function(){return _0x394800;};return a134_0x2037();}import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x1e887f){const _0x34a7b8=a134_0x23ef,_0x3dc0b5=await checkCliVersion();(_0x3dc0b5[_0x34a7b8(0x1f8)]||_0x3dc0b5[_0x34a7b8(0x20d)])&&(printCliUpgradeWarning(_0x3dc0b5),assertCliVersionSupported(_0x3dc0b5),logger['info'](_0x34a7b8(0x1dc),_0x34a7b8(0x213),{'currentVersion':_0x3dc0b5['currentVersion'],'stableVersion':_0x3dc0b5[_0x34a7b8(0x204)],'minimumVersion':_0x3dc0b5['minimumVersion'],'needsUpgrade':_0x3dc0b5['needsUpgrade'],'belowMinimum':_0x3dc0b5[_0x34a7b8(0x20d)]}));if(_0x1e887f[_0x34a7b8(0x212)]&&_0x1e887f[_0x34a7b8(0x21d)])await runCreate({'projectName':_0x1e887f[_0x34a7b8(0x212)],'appCode':_0x1e887f[_0x34a7b8(0x21d)],'env':_0x1e887f[_0x34a7b8(0x1ee)]},_0x1e887f);else{if(_0x1e887f[_0x34a7b8(0x212)]){const _0x55f8ca=await selectSingleAppcode(_0x1e887f[_0x34a7b8(0x1d4)]);await runCreate({'projectName':_0x1e887f[_0x34a7b8(0x212)],'appCode':_0x55f8ca||undefined,'env':_0x1e887f[_0x34a7b8(0x1ee)]},_0x1e887f);}else await guidedCreateProject(_0x45db3b=>runCreate(_0x45db3b,_0x1e887f),_0x1e887f['env'],_0x1e887f['cookie']);}}async function runCreate(_0x3bfd4d,_0x789576){const _0x1103dd=a134_0x23ef;if(!_0x3bfd4d[_0x1103dd(0x1db)]||_0x3bfd4d[_0x1103dd(0x1db)][_0x1103dd(0x1eb)]()==='')throw new Error(_0x1103dd(0x224));const _0x22d8a4=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x22d8a4['test'](_0x3bfd4d[_0x1103dd(0x1db)]))throw new Error(_0x1103dd(0x1fd));if(_0x3bfd4d[_0x1103dd(0x1db)]['length']>0x64)throw new Error(_0x1103dd(0x20f));const _0x149045=a134_0x54649b[_0x1103dd(0x207)](process['cwd'](),_0x3bfd4d['projectName']);if(a134_0x43768b['existsSync'](_0x149045))throw new Error(_0x1103dd(0x1fc)+_0x3bfd4d[_0x1103dd(0x1db)]+'\x20already\x20exists');try{a134_0x43768b[_0x1103dd(0x217)](a134_0x54649b['dirname'](_0x149045),a134_0x43768b['constants'][_0x1103dd(0x1f7)]);}catch{throw new Error(_0x1103dd(0x1e9));}logger[_0x1103dd(0x216)](_0x149045),logger['info']('create',_0x1103dd(0x1d0)+_0x3bfd4d[_0x1103dd(0x1db)],{'projectDir':_0x149045,'appCode':_0x3bfd4d[_0x1103dd(0x21d)]}),console['log'](),console[_0x1103dd(0x1d7)](a134_0x414975[_0x1103dd(0x1cc)](_0x1103dd(0x1cd))+'Project\x20name:\x20'+a134_0x414975[_0x1103dd(0x1cc)](_0x3bfd4d[_0x1103dd(0x1db)])+(_0x3bfd4d[_0x1103dd(0x21d)]?_0x1103dd(0x225)+a134_0x414975[_0x1103dd(0x1e1)](_0x3bfd4d[_0x1103dd(0x21d)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x3bfd4d[_0x1103dd(0x1db)])),await updatePackageJsonName(_0x3bfd4d[_0x1103dd(0x1db)]),await runTask(_0x1103dd(0x1f6),()=>installDependencies(_0x3bfd4d[_0x1103dd(0x1db)])),await runTask(_0x1103dd(0x206),()=>formatProjectCode(_0x3bfd4d[_0x1103dd(0x1db)])),await configureAppCode(_0x3bfd4d['projectName'],_0x3bfd4d['appCode']||'',_0x3bfd4d[_0x1103dd(0x1ee)]);let _0x33a75f=![];if(_0x3bfd4d[_0x1103dd(0x21d)]){console[_0x1103dd(0x1d7)](_0x1103dd(0x208));const _0x50e22d=process['cwd']();try{process[_0x1103dd(0x1d5)](_0x149045);const _0xe241a5=_0x3bfd4d[_0x1103dd(0x1ee)]||_0x1103dd(0x1e4);initEnv(_0xe241a5);const {configArray:_0x1f4694}=await fetchModelList(_0x3bfd4d[_0x1103dd(0x21d)],_0x789576[_0x1103dd(0x1d4)]||''),_0x39787=DEFAULT_API_DIR,_0x4ff1f2=await generateApiFile(_0x1f4694,'',_0x3bfd4d[_0x1103dd(0x21d)],!![],_0xe241a5,_0x39787);console['log'](_0x1103dd(0x22c)+_0x1f4694[_0x1103dd(0x1d1)]+_0x1103dd(0x202)+_0x4ff1f2[_0x1103dd(0x20e)]+_0x1103dd(0x1dd)),logger['info']('create',_0x1103dd(0x21e)+_0x3bfd4d['appCode']);}catch(_0x247721){_0x33a75f=!![],console[_0x1103dd(0x1d7)](_0x1103dd(0x209)),logger['warn']('create',_0x1103dd(0x1f0),{'error':_0x247721 instanceof Error?_0x247721['message']:String(_0x247721)});}finally{process[_0x1103dd(0x1d5)](_0x50e22d);}}logger[_0x1103dd(0x20a)](_0x1103dd(0x1dc),_0x1103dd(0x229)+_0x3bfd4d[_0x1103dd(0x1db)]),console[_0x1103dd(0x1d7)](),console['log'](a134_0x414975[_0x1103dd(0x1cc)]('─'[_0x1103dd(0x1ea)](0x3c))),console[_0x1103dd(0x1d7)](a134_0x414975['cyan'][_0x1103dd(0x1f2)](_0x1103dd(0x1ed))),console[_0x1103dd(0x1d7)](),console[_0x1103dd(0x1d7)](_0x1103dd(0x205)+a134_0x414975[_0x1103dd(0x1e1)][_0x1103dd(0x1f2)]('cd\x20'+_0x3bfd4d[_0x1103dd(0x1db)]+_0x1103dd(0x22b)+CLI_BIN_NAME+_0x1103dd(0x20b))),_0x33a75f&&console['log'](_0x1103dd(0x218)+a134_0x414975[_0x1103dd(0x1e1)][_0x1103dd(0x1f2)](CLI_BIN_NAME+_0x1103dd(0x21f))),console['log'](a134_0x414975[_0x1103dd(0x1cc)]('─'[_0x1103dd(0x1ea)](0x3c)));}catch(_0x58cdc8){logger['error']('create',_0x1103dd(0x227)+_0x3bfd4d['projectName'],{'error':_0x58cdc8 instanceof Error?_0x58cdc8[_0x1103dd(0x1d9)]:String(_0x58cdc8)});try{a134_0x43768b[_0x1103dd(0x1e8)](_0x149045)&&(console[_0x1103dd(0x1d7)](_0x1103dd(0x1d3)+_0x149045),a134_0x43768b['rmSync'](_0x149045,{'recursive':!![],'force':!![]}));}catch{logger[_0x1103dd(0x1f1)](_0x1103dd(0x1dc),_0x1103dd(0x1e5)+_0x149045);}throw _0x58cdc8;}}async function runTask(_0x3413ff,_0x261cb0){const _0x272535=a134_0x23ef,_0x4cb933=a134_0x16be23(_0x3413ff+_0x272535(0x1d8))[_0x272535(0x219)]();try{const _0x24b219=await _0x261cb0();_0x4cb933['stop'](),console[_0x272535(0x1d7)](''+a134_0x414975[_0x272535(0x1cc)](_0x272535(0x1cd))+_0x3413ff+'\x20'+a134_0x414975[_0x272535(0x1d6)]('['+_0x24b219+']'));}catch(_0x38dc6c){_0x4cb933[_0x272535(0x1f4)](_0x3413ff);throw _0x38dc6c;}}async function updatePackageJsonName(_0x43fc17){const _0xb4f46d=a134_0x23ef,_0x523c02=a134_0x54649b[_0xb4f46d(0x207)](process[_0xb4f46d(0x1de)](),_0x43fc17),_0x1621ce=a134_0x54649b[_0xb4f46d(0x211)](_0x523c02,_0xb4f46d(0x1f3));try{console[_0xb4f46d(0x1d7)](_0xb4f46d(0x210));const _0x5537f8=getRabetbaseCliPackageRoot(),_0x3ee268=a134_0x54649b['join'](_0x5537f8,_0xb4f46d(0x1f3));let _0x5aafeb='1.0.0';try{const _0x50f6e8=JSON[_0xb4f46d(0x1e2)](a134_0x43768b['readFileSync'](_0x3ee268,_0xb4f46d(0x228)));_0x5aafeb=_0x50f6e8[_0xb4f46d(0x226)]||_0xb4f46d(0x221);}catch{}const _0x386e9e=a134_0x43768b['readFileSync'](_0x1621ce,_0xb4f46d(0x228)),_0x5f3546=JSON['parse'](_0x386e9e);_0x5f3546['name']=_0x43fc17,_0x5f3546[_0xb4f46d(0x223)]=_0x43fc17+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x5aafeb,a134_0x43768b[_0xb4f46d(0x215)](_0x1621ce,JSON[_0xb4f46d(0x1e6)](_0x5f3546,null,0x2)+'\x0a','utf8'),console[_0xb4f46d(0x1d7)](_0xb4f46d(0x1cf)+_0x43fc17),logger[_0xb4f46d(0x1da)](_0xb4f46d(0x1dc),_0xb4f46d(0x1df));}catch(_0x5f5491){logger['error'](_0xb4f46d(0x1dc),_0xb4f46d(0x1fb));throw _0x5f5491;}}async function configureAppCode(_0x203d92,_0x5ebe1c,_0x429149){const _0x41b7be=a134_0x23ef,_0x4180be=a134_0x54649b['resolve'](process[_0x41b7be(0x1de)](),_0x203d92),_0x19b422=a134_0x54649b[_0x41b7be(0x211)](_0x4180be,NEW_CONFIG_NAME);try{_0x5ebe1c?console[_0x41b7be(0x1d7)](_0x41b7be(0x20c)+_0x203d92+':\x20'+_0x5ebe1c):console[_0x41b7be(0x1d7)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x203d92);const _0x3260b7=getRabetbaseCliPackageRoot(),_0x39619f=a134_0x54649b['join'](_0x3260b7,'package.json');let _0x79be45=_0x41b7be(0x221);try{const _0x23fb7f=JSON['parse'](a134_0x43768b[_0x41b7be(0x1f5)](_0x39619f,_0x41b7be(0x228)));_0x79be45=_0x23fb7f[_0x41b7be(0x226)]||'1.0.0';}catch{}const _0x25cd7c=readConfig(),_0x3f99a6=typeof _0x25cd7c[_0x41b7be(0x1ee)]==='string'?_0x25cd7c['env']:undefined,_0x123e8b={};for(const _0x18f86d of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x25cd7c[_0x18f86d]!=null)_0x123e8b[_0x18f86d]=_0x25cd7c[_0x18f86d];}const _0xba0c29=buildCanonicalProjectConfig(_0x123e8b,{'appCodes':_0x5ebe1c?[_0x5ebe1c]:[],'env':_0x429149||_0x3f99a6||_0x41b7be(0x1e4),'metadata':{'createdAt':new Date()[_0x41b7be(0x1ff)](),'version':_0x79be45}});writeConfigFile(_0x19b422,_0xba0c29),_0x5ebe1c?console[_0x41b7be(0x1d7)](_0x41b7be(0x1e7)+Object[_0x41b7be(0x1d2)](_0xba0c29[_0x41b7be(0x203)]||{})[_0x41b7be(0x211)](',\x20')+_0x41b7be(0x201)+_0xba0c29[_0x41b7be(0x21c)]):console[_0x41b7be(0x1d7)](_0x41b7be(0x21b)+CLI_BIN_NAME+_0x41b7be(0x220)),logger[_0x41b7be(0x1da)]('create',_0x41b7be(0x1ce)+_0x5ebe1c);}catch(_0x4f54ed){logger[_0x41b7be(0x1ef)](_0x41b7be(0x1dc),_0x41b7be(0x1f9));}}
|
|
1
|
+
(function(_0x201ac9,_0x39fb0e){const _0x4f0a69=a142_0x3d88,_0x2cc399=_0x201ac9();while(!![]){try{const _0x19bc25=parseInt(_0x4f0a69(0xf9))/0x1*(parseInt(_0x4f0a69(0xf7))/0x2)+parseInt(_0x4f0a69(0xd2))/0x3+-parseInt(_0x4f0a69(0xfb))/0x4*(parseInt(_0x4f0a69(0xc5))/0x5)+parseInt(_0x4f0a69(0xa9))/0x6+-parseInt(_0x4f0a69(0xe7))/0x7*(-parseInt(_0x4f0a69(0xa6))/0x8)+parseInt(_0x4f0a69(0xdf))/0x9+-parseInt(_0x4f0a69(0xb9))/0xa;if(_0x19bc25===_0x39fb0e)break;else _0x2cc399['push'](_0x2cc399['shift']());}catch(_0x12496d){_0x2cc399['push'](_0x2cc399['shift']());}}}(a142_0x5c43,0x85209));import a142_0x54ab35 from'path';import a142_0x30b0dd from'fs';import a142_0x30dd0f from'chalk';import a142_0x4a00bf 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';function a142_0x3d88(_0x5278e1,_0x4bb54e){_0x5278e1=_0x5278e1-0xa4;const _0x5c4330=a142_0x5c43();let _0x3d88a8=_0x5c4330[_0x5278e1];return _0x3d88a8;}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(_0x2a3cc5){const _0x566bb9=a142_0x3d88,_0x31385b=await checkCliVersion();(_0x31385b[_0x566bb9(0xe0)]||_0x31385b[_0x566bb9(0xcd)])&&(printCliUpgradeWarning(_0x31385b),assertCliVersionSupported(_0x31385b),logger[_0x566bb9(0xd3)]('create',_0x566bb9(0xfa),{'currentVersion':_0x31385b[_0x566bb9(0xc9)],'stableVersion':_0x31385b[_0x566bb9(0xa8)],'minimumVersion':_0x31385b[_0x566bb9(0xad)],'needsUpgrade':_0x31385b[_0x566bb9(0xe0)],'belowMinimum':_0x31385b['belowMinimum']}));if(_0x2a3cc5[_0x566bb9(0xf6)]&&_0x2a3cc5[_0x566bb9(0xbb)])await runCreate({'projectName':_0x2a3cc5['projectCode'],'appCode':_0x2a3cc5[_0x566bb9(0xbb)],'env':_0x2a3cc5['env']},_0x2a3cc5);else{if(_0x2a3cc5[_0x566bb9(0xf6)]){const _0x22d19b=await selectSingleAppcode(_0x2a3cc5[_0x566bb9(0xfd)]);await runCreate({'projectName':_0x2a3cc5[_0x566bb9(0xf6)],'appCode':_0x22d19b||undefined,'env':_0x2a3cc5['env']},_0x2a3cc5);}else await guidedCreateProject(_0xa77ed1=>runCreate(_0xa77ed1,_0x2a3cc5),_0x2a3cc5[_0x566bb9(0xbd)],_0x2a3cc5[_0x566bb9(0xfd)]);}}async function runCreate(_0x34c88a,_0x58dad2){const _0x1f43de=a142_0x3d88;if(!_0x34c88a[_0x1f43de(0xc2)]||_0x34c88a[_0x1f43de(0xc2)]['trim']()==='')throw new Error('Project\x20name\x20cannot\x20be\x20empty');const _0x105577=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x105577[_0x1f43de(0xc0)](_0x34c88a[_0x1f43de(0xc2)]))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x34c88a[_0x1f43de(0xc2)][_0x1f43de(0xf8)]>0x64)throw new Error(_0x1f43de(0xa5));const _0x1c3797=a142_0x54ab35[_0x1f43de(0xd4)](process[_0x1f43de(0xc6)](),_0x34c88a[_0x1f43de(0xc2)]);if(a142_0x30b0dd[_0x1f43de(0xdb)](_0x1c3797))throw new Error(_0x1f43de(0xe5)+_0x34c88a['projectName']+_0x1f43de(0xa7));try{a142_0x30b0dd['accessSync'](a142_0x54ab35['dirname'](_0x1c3797),a142_0x30b0dd[_0x1f43de(0xaf)][_0x1f43de(0xfc)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x1f43de(0xd7)](_0x1c3797),logger[_0x1f43de(0xd3)]('create','开始创建项目:\x20'+_0x34c88a['projectName'],{'projectDir':_0x1c3797,'appCode':_0x34c88a[_0x1f43de(0xbb)]}),console[_0x1f43de(0xd1)](),console[_0x1f43de(0xd1)](a142_0x30dd0f['green'](_0x1f43de(0xb8))+_0x1f43de(0xda)+a142_0x30dd0f[_0x1f43de(0xea)](_0x34c88a[_0x1f43de(0xc2)])+(_0x34c88a[_0x1f43de(0xbb)]?_0x1f43de(0xa4)+a142_0x30dd0f[_0x1f43de(0xaa)](_0x34c88a[_0x1f43de(0xbb)]):''));try{await runTask(_0x1f43de(0xe9),()=>copyProjectTemplate(_0x34c88a[_0x1f43de(0xc2)])),await updatePackageJsonName(_0x34c88a['projectName']),await runTask('Install\x20dependencies',()=>installDependencies(_0x34c88a['projectName'])),await runTask(_0x1f43de(0xac),()=>formatProjectCode(_0x34c88a[_0x1f43de(0xc2)])),await configureAppCode(_0x34c88a[_0x1f43de(0xc2)],_0x34c88a['appCode']||'',_0x34c88a['env']);let _0x36f91b=![];if(_0x34c88a[_0x1f43de(0xbb)]){console[_0x1f43de(0xd1)]('*\x20Pulling\x20API\x20configuration...');const _0x4dfdfd=process[_0x1f43de(0xc6)]();try{process[_0x1f43de(0xe3)](_0x1c3797);const _0x194a5f=_0x34c88a['env']||'production';initEnv(_0x194a5f);const {configArray:_0x11c847}=await fetchModelList(_0x34c88a[_0x1f43de(0xbb)],_0x58dad2['cookie']||''),_0x39cbd5=DEFAULT_API_DIR,_0x34270d=await generateApiFile(_0x11c847,'',_0x34c88a['appCode'],!![],_0x194a5f,_0x39cbd5);console[_0x1f43de(0xd1)]('√\x20Pulled\x20'+_0x11c847[_0x1f43de(0xf8)]+_0x1f43de(0xb0)+_0x34270d[_0x1f43de(0xe1)]+_0x1f43de(0xf3)),logger[_0x1f43de(0xd3)](_0x1f43de(0xe6),_0x1f43de(0xb3)+_0x34c88a[_0x1f43de(0xbb)]);}catch(_0x39b3b5){_0x36f91b=!![],console['log']('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger['warn'](_0x1f43de(0xe6),_0x1f43de(0xdd),{'error':_0x39b3b5 instanceof Error?_0x39b3b5[_0x1f43de(0xc8)]:String(_0x39b3b5)});}finally{process[_0x1f43de(0xe3)](_0x4dfdfd);}}logger[_0x1f43de(0xd8)](_0x1f43de(0xe6),'项目创建完成:\x20'+_0x34c88a['projectName']),console['log'](),console['log'](a142_0x30dd0f[_0x1f43de(0xea)]('─'[_0x1f43de(0xb4)](0x3c))),console[_0x1f43de(0xd1)](a142_0x30dd0f['cyan'][_0x1f43de(0xc1)](_0x1f43de(0xe4))),console[_0x1f43de(0xd1)](),console['log'](_0x1f43de(0xb6)+a142_0x30dd0f['cyan'][_0x1f43de(0xc1)](_0x1f43de(0xcc)+_0x34c88a[_0x1f43de(0xc2)]+_0x1f43de(0xec)+CLI_BIN_NAME+_0x1f43de(0xc7))),_0x36f91b&&console[_0x1f43de(0xd1)](_0x1f43de(0xc3)+a142_0x30dd0f[_0x1f43de(0xaa)][_0x1f43de(0xc1)](CLI_BIN_NAME+'\x20api\x20pull')),console['log'](a142_0x30dd0f[_0x1f43de(0xea)]('─'[_0x1f43de(0xb4)](0x3c)));}catch(_0x19889a){logger[_0x1f43de(0xb5)]('create',_0x1f43de(0xb2)+_0x34c88a[_0x1f43de(0xc2)],{'error':_0x19889a instanceof Error?_0x19889a[_0x1f43de(0xc8)]:String(_0x19889a)});try{a142_0x30b0dd['existsSync'](_0x1c3797)&&(console['log'](_0x1f43de(0xcb)+_0x1c3797),a142_0x30b0dd[_0x1f43de(0xbc)](_0x1c3797,{'recursive':!![],'force':!![]}));}catch{logger[_0x1f43de(0xd0)]('create',_0x1f43de(0xe8)+_0x1c3797);}throw _0x19889a;}}async function runTask(_0x4311fc,_0xa7af8c){const _0x1656e1=a142_0x3d88,_0x4376de=a142_0x4a00bf(_0x4311fc+_0x1656e1(0xef))[_0x1656e1(0xe2)]();try{const _0x5b0f8c=await _0xa7af8c();_0x4376de['stop'](),console[_0x1656e1(0xd1)](''+a142_0x30dd0f[_0x1656e1(0xea)]('\x20√\x20')+_0x4311fc+'\x20'+a142_0x30dd0f[_0x1656e1(0xcf)]('['+_0x5b0f8c+']'));}catch(_0x334897){_0x4376de[_0x1656e1(0xed)](_0x4311fc);throw _0x334897;}}function a142_0x5c43(){const _0x37f8c2=['fail','配置应用AppCode失败','...','更新\x20package.json\x20失败','更新\x20package.json\x20name','defaultApp','\x20model(s)','1.0.0','join','projectCode','1010510vaaawI','length','1dBUhyh','CLI\x20版本检查','4XbkPIs','W_OK','cookie','配置应用AppCode:\x20','utf8','\x20|\x20AppCode:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','760oqdczj','\x20already\x20exists','stableVersion','4757646lyoqxb','cyan','\x20config\x20set\x20appcode\x20<app-code>\x27','Format\x20code','minimumVersion','stringify','constants','\x20dataset(s),\x20generated\x20','√\x20package.json\x20updated:\x20name=','项目创建失败:\x20','API\x20configuration\x20pulled:\x20','repeat','error','\x20\x201.\x20Start\x20project:\x20','version','\x20√\x20','23348010hHPbqq','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','appCode','rmSync','env','parse','keys','test','bold','projectName','\x20\x202.\x20Pull\x20API\x20configuration:\x20','\x20Generated\x20by\x20rabetbase\x20cli\x20','2307365XweLUU','cwd','\x20run\x20start','message','currentVersion','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','cd\x20','belowMinimum','\x20|\x20Default:\x20','gray','warn','log','2887977DgPXfM','info','resolve','package.json','production','setLogPath','success','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','Project\x20name:\x20','existsSync','description','API\x20配置拉取异常','*\x20Configuring\x20AppCode\x20for\x20project\x20','3419892AFhrjp','needsUpgrade','modelCount','start','chdir','🚀\x20Next\x20Steps:','Project\x20directory\x20','create','51632byPqSw','清理项目目录失败:\x20','Copy\x20project\x20files','green','string','\x20&&\x20'];a142_0x5c43=function(){return _0x37f8c2;};return a142_0x5c43();}async function updatePackageJsonName(_0xdbeeeb){const _0x53c7f0=a142_0x3d88,_0x20e081=a142_0x54ab35[_0x53c7f0(0xd4)](process[_0x53c7f0(0xc6)](),_0xdbeeeb),_0x178957=a142_0x54ab35[_0x53c7f0(0xf5)](_0x20e081,_0x53c7f0(0xd5));try{console[_0x53c7f0(0xd1)](_0x53c7f0(0xd9));const _0x2e4006=getRabetbaseCliPackageRoot(),_0x4163d8=a142_0x54ab35[_0x53c7f0(0xf5)](_0x2e4006,_0x53c7f0(0xd5));let _0x1887da='1.0.0';try{const _0x2e282d=JSON[_0x53c7f0(0xbe)](a142_0x30b0dd['readFileSync'](_0x4163d8,_0x53c7f0(0xff)));_0x1887da=_0x2e282d[_0x53c7f0(0xb7)]||_0x53c7f0(0xf4);}catch{}const _0x4f1f88=a142_0x30b0dd['readFileSync'](_0x178957,_0x53c7f0(0xff)),_0x227ac7=JSON[_0x53c7f0(0xbe)](_0x4f1f88);_0x227ac7['name']=_0xdbeeeb,_0x227ac7[_0x53c7f0(0xdc)]=_0xdbeeeb+_0x53c7f0(0xc4)+_0x1887da,a142_0x30b0dd['writeFileSync'](_0x178957,JSON[_0x53c7f0(0xae)](_0x227ac7,null,0x2)+'\x0a','utf8'),console[_0x53c7f0(0xd1)](_0x53c7f0(0xb1)+_0xdbeeeb),logger[_0x53c7f0(0xd3)](_0x53c7f0(0xe6),_0x53c7f0(0xf1));}catch(_0x3d3fea){logger[_0x53c7f0(0xb5)]('create',_0x53c7f0(0xf0));throw _0x3d3fea;}}async function configureAppCode(_0xf6a16e,_0x39439c,_0x51e0b9){const _0x826af=a142_0x3d88,_0x46551a=a142_0x54ab35[_0x826af(0xd4)](process[_0x826af(0xc6)](),_0xf6a16e),_0x34b6bf=a142_0x54ab35[_0x826af(0xf5)](_0x46551a,NEW_CONFIG_NAME);try{_0x39439c?console[_0x826af(0xd1)](_0x826af(0xde)+_0xf6a16e+':\x20'+_0x39439c):console['log'](_0x826af(0xba)+_0xf6a16e);const _0x1e94de=getRabetbaseCliPackageRoot(),_0x4485d1=a142_0x54ab35[_0x826af(0xf5)](_0x1e94de,_0x826af(0xd5));let _0x42f323='1.0.0';try{const _0x4b18ec=JSON[_0x826af(0xbe)](a142_0x30b0dd['readFileSync'](_0x4485d1,_0x826af(0xff)));_0x42f323=_0x4b18ec['version']||'1.0.0';}catch{}const _0x163bb0=readConfig(),_0x14d395=typeof _0x163bb0[_0x826af(0xbd)]===_0x826af(0xeb)?_0x163bb0['env']:undefined,_0xf745c9={};for(const _0x279f68 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x163bb0[_0x279f68]!=null)_0xf745c9[_0x279f68]=_0x163bb0[_0x279f68];}const _0x1ded4b=buildCanonicalProjectConfig(_0xf745c9,{'appCodes':_0x39439c?[_0x39439c]:[],'env':_0x51e0b9||_0x14d395||_0x826af(0xd6),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x42f323}});writeConfigFile(_0x34b6bf,_0x1ded4b),_0x39439c?console[_0x826af(0xd1)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x826af(0xbf)](_0x1ded4b['apps']||{})['join'](',\x20')+_0x826af(0xce)+_0x1ded4b[_0x826af(0xf2)]):console['log'](_0x826af(0xca)+CLI_BIN_NAME+_0x826af(0xab)),logger[_0x826af(0xd3)](_0x826af(0xe6),_0x826af(0xfe)+_0x39439c);}catch(_0x366097){logger['error'](_0x826af(0xe6),_0x826af(0xee));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e7cdd,_0x264344){const _0x219887=a143_0x1ff9,_0x475829=_0x2e7cdd();while(!![]){try{const _0x105f3a=-parseInt(_0x219887(0x100))/0x1*(-parseInt(_0x219887(0x11a))/0x2)+parseInt(_0x219887(0x125))/0x3+-parseInt(_0x219887(0x10e))/0x4+parseInt(_0x219887(0x107))/0x5+-parseInt(_0x219887(0x109))/0x6*(-parseInt(_0x219887(0x10f))/0x7)+parseInt(_0x219887(0x12c))/0x8*(-parseInt(_0x219887(0x102))/0x9)+-parseInt(_0x219887(0x110))/0xa;if(_0x105f3a===_0x264344)break;else _0x475829['push'](_0x475829['shift']());}catch(_0xc1b5fd){_0x475829['push'](_0x475829['shift']());}}}(a143_0x5dab,0xdf393));import a143_0x296fe5 from'path';import a143_0xef369c 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';function a143_0x1ff9(_0x56b6c6,_0x10e0d2){_0x56b6c6=_0x56b6c6-0xfc;const _0x5dab01=a143_0x5dab();let _0x1ff9ba=_0x5dab01[_0x56b6c6];return _0x1ff9ba;}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';function a143_0x5dab(){const _0x59f2c2=['env','1640336gHPcLx','87927xApkGx','31649130lMcida','\x20\x20√\x20Code\x20formatted','package.json','*\x20Creating\x20project\x20','belowMinimum','name','length','Project\x20directory\x20\x22','\x20api\x20pull`\x20manually\x20later.','\x20\x20Installing\x20dependencies...','4rRpoHj','log','ignore','dirname','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20\x20√\x20Project\x20template\x20created','bun\x20run\x20format','validation','\x20\x20rabetbase\x20run\x20start\x0a','test','constants','4198539dXkuXE','resolve','cwd','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','Project\x20name\x20contains\x20invalid\x20characters.','npm','Project\x20name\x20cannot\x20be\x20empty.','10312HxJYhi','stringify','production','\x20\x20√\x20package.json\x20updated','Use\x20a\x20different\x20project\x20name.','access','755411qVsmud','writeFile','657uAQWsb','modelCount','\x0a√\x20Project\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','chdir','7925775OQKtMz','join','42UlhBhy','...','\x22\x20already\x20exists.','\x20created\x20successfully!'];a143_0x5dab=function(){return _0x59f2c2;};return a143_0x5dab();}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(_0x3c7f77,_0x116df2,_0x24eabe,_0x30e149){const _0x426267=a143_0x1ff9,_0x44a9a3=await checkCliVersion();(_0x44a9a3['needsUpgrade']||_0x44a9a3[_0x426267(0x114)])&&(printCliUpgradeWarning(_0x44a9a3),assertCliVersionSupported(_0x44a9a3));if(!_0x3c7f77||_0x3c7f77['trim']()==='')throw CliErrors[_0x426267(0x121)](_0x426267(0x12b));const _0x2abff0=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2abff0[_0x426267(0x123)](_0x3c7f77))throw CliErrors[_0x426267(0x121)](_0x426267(0x129),_0x426267(0x11e));if(_0x3c7f77[_0x426267(0x116)]>0x64)throw CliErrors[_0x426267(0x121)](_0x426267(0x105));const _0x606b34=a143_0x296fe5[_0x426267(0x126)](process[_0x426267(0x127)](),_0x3c7f77);if(existsSync(_0x606b34))throw CliErrors[_0x426267(0x121)](_0x426267(0x117)+_0x3c7f77+_0x426267(0x10b),_0x426267(0xfe));try{const _0x184a31=a143_0x296fe5[_0x426267(0x11d)](_0x606b34);await a143_0xef369c[_0x426267(0xff)](_0x184a31,a143_0xef369c[_0x426267(0x124)]['W_OK']);}catch{throw CliErrors[_0x426267(0x121)]('Cannot\x20create\x20project\x20in\x20current\x20directory.','Check\x20directory\x20permissions.');}try{console['log'](_0x426267(0x113)+_0x3c7f77+_0x426267(0x10a));const _0x94c800=getSubAppReactDemoTemplateDir();await copyDirectory(_0x94c800,_0x606b34),console[_0x426267(0x11b)](_0x426267(0x11f)),await updatePackageJsonName(_0x3c7f77),console[_0x426267(0x11b)](_0x426267(0xfd)),console['log'](_0x426267(0x119)),console['log']('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x606b34),console[_0x426267(0x11b)](_0x426267(0x111)),await configureProject(_0x3c7f77,_0x24eabe,_0x116df2),console[_0x426267(0x11b)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x24eabe&&await pullApiConfig(_0x606b34,_0x24eabe,_0x116df2,_0x30e149),console[_0x426267(0x11b)](_0x426267(0x104)+_0x3c7f77+_0x426267(0x10c)),console[_0x426267(0x11b)]('\x0a\x20\x20cd\x20'+_0x3c7f77),console['log'](_0x426267(0x122));}catch(_0x4fe514){try{existsSync(_0x606b34)&&await a143_0xef369c['rm'](_0x606b34,{'recursive':!![],'force':!![]});}catch{}throw _0x4fe514;}}async function updatePackageJsonName(_0x29f96e){const _0x2107b3=a143_0x1ff9,_0xe5a52c=a143_0x296fe5['resolve'](process[_0x2107b3(0x127)](),_0x29f96e),_0x1e600d=a143_0x296fe5['join'](_0xe5a52c,_0x2107b3(0x112)),_0x5b2c04=await a143_0xef369c['readFile'](_0x1e600d,'utf-8'),_0x313739=JSON['parse'](_0x5b2c04);_0x313739[_0x2107b3(0x115)]=_0x29f96e,_0x313739['description']=_0x2107b3(0x128),await a143_0xef369c[_0x2107b3(0x101)](_0x1e600d,JSON[_0x2107b3(0x12d)](_0x313739,null,0x2)+'\x0a');}function detectPackageManager(){const _0xb2b9b5=a143_0x1ff9;try{return execSync('bun\x20--version',{'stdio':_0xb2b9b5(0x11c)}),'bun';}catch{return _0xb2b9b5(0x12a);}}async function formatCode(_0x562466){const _0x5108dd=a143_0x1ff9;try{await execAsync(_0x5108dd(0x120),{'cwd':_0x562466});}catch{}}async function configureProject(_0x53428d,_0x5d62a9,_0x43263d){const _0xbe7c08=a143_0x1ff9,_0x424589=a143_0x296fe5[_0xbe7c08(0x126)](process['cwd'](),_0x53428d),_0x83c8dc=a143_0x296fe5[_0xbe7c08(0x108)](_0x424589,NEW_CONFIG_NAME),_0xd686c3=readConfig(),_0x159c7b=typeof _0xd686c3[_0xbe7c08(0x10d)]==='string'?_0xd686c3[_0xbe7c08(0x10d)]:undefined,_0x42b2a6={};for(const _0x1301c3 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0xd686c3[_0x1301c3]!=null)_0x42b2a6[_0x1301c3]=_0xd686c3[_0x1301c3];}const _0x19ac81=buildCanonicalProjectConfig(_0x42b2a6,{'appCodes':_0x5d62a9?[_0x5d62a9]:[],'env':_0x43263d||_0x159c7b||_0xbe7c08(0xfc),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x83c8dc,_0x19ac81);}async function pullApiConfig(_0x17609a,_0x59b1ea,_0x1bc1c3,_0x140710){const _0x547709=a143_0x1ff9,_0x193a83=process['cwd']();try{process[_0x547709(0x106)](_0x17609a);const _0x503d00=_0x1bc1c3||_0x547709(0xfc);initEnv(_0x503d00),console[_0x547709(0x11b)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x3c9a56}=await fetchModelList(_0x59b1ea,_0x140710||''),_0x44465a=await generateApiFile(_0x3c9a56,'',_0x59b1ea,!![],_0x503d00,DEFAULT_API_DIR);console[_0x547709(0x11b)]('\x20\x20√\x20Pulled\x20'+_0x3c9a56[_0x547709(0x116)]+'\x20dataset(s),\x20generated\x20'+_0x44465a[_0x547709(0x103)]+'\x20model(s)');}catch(_0x5bda78){console['log']('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x547709(0x118));}finally{process[_0x547709(0x106)](_0x193a83);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a144_0x545e7c=a144_0x3f2b;function a144_0x5317(){const _0x4b23c3=['14mWqhYO','templates','../../../../','9QxRbeU','13664296gFBIlI','projects','dirname','3042AVhUNi','342033UsVUhA','25921QsKpMB','36427017xXvOrD','sub-app-react-demo','5351190ZVBWOa','join','30xTGzUg','85964YFNzFk','495650szoPMT'];a144_0x5317=function(){return _0x4b23c3;};return a144_0x5317();}(function(_0x3c3337,_0x5dc487){const _0x3201d4=a144_0x3f2b,_0x51eb01=_0x3c3337();while(!![]){try{const _0x3990b4=-parseInt(_0x3201d4(0x1ba))/0x1+-parseInt(_0x3201d4(0x1bb))/0x2*(-parseInt(_0x3201d4(0x1b2))/0x3)+-parseInt(_0x3201d4(0x1b9))/0x4*(parseInt(_0x3201d4(0x1b8))/0x5)+parseInt(_0x3201d4(0x1b1))/0x6*(parseInt(_0x3201d4(0x1b3))/0x7)+parseInt(_0x3201d4(0x1ae))/0x8*(parseInt(_0x3201d4(0x1ad))/0x9)+parseInt(_0x3201d4(0x1b6))/0xa+-parseInt(_0x3201d4(0x1b4))/0xb;if(_0x3990b4===_0x5dc487)break;else _0x51eb01['push'](_0x51eb01['shift']());}catch(_0x1df3fe){_0x51eb01['push'](_0x51eb01['shift']());}}}(a144_0x5317,0xefdef));import a144_0x1b304d from'node:path';import{fileURLToPath}from'node:url';const __dirname=a144_0x1b304d[a144_0x545e7c(0x1b0)](fileURLToPath(import.meta.url));function a144_0x3f2b(_0x404428,_0x5618d4){_0x404428=_0x404428-0x1ab;const _0x531718=a144_0x5317();let _0x3f2b7e=_0x531718[_0x404428];return _0x3f2b7e;}export function getRabetbaseCliPackageRoot(){const _0x439308=a144_0x545e7c;return a144_0x1b304d['resolve'](__dirname,_0x439308(0x1ac));}export function getSubAppReactDemoTemplateDir(){const _0x17d7df=a144_0x545e7c;return a144_0x1b304d[_0x17d7df(0x1b7)](getRabetbaseCliPackageRoot(),_0x17d7df(0x1ab),_0x17d7df(0x1af),_0x17d7df(0x1b5));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4bc19e,_0x14b03a){const _0xa1e656=a145_0x1fd5,_0x382337=_0x4bc19e();while(!![]){try{const _0x28c690=-parseInt(_0xa1e656(0xdf))/0x1+parseInt(_0xa1e656(0xe0))/0x2*(parseInt(_0xa1e656(0xcf))/0x3)+parseInt(_0xa1e656(0xd9))/0x4+parseInt(_0xa1e656(0xdd))/0x5*(parseInt(_0xa1e656(0xd5))/0x6)+parseInt(_0xa1e656(0xd6))/0x7+parseInt(_0xa1e656(0xd0))/0x8*(-parseInt(_0xa1e656(0xd3))/0x9)+-parseInt(_0xa1e656(0xd8))/0xa*(parseInt(_0xa1e656(0xd7))/0xb);if(_0x28c690===_0x14b03a)break;else _0x382337['push'](_0x382337['shift']());}catch(_0x1a49c5){_0x382337['push'](_0x382337['shift']());}}}(a145_0x3a7c,0x38c61));function a145_0x1fd5(_0x308ff8,_0x5a5b0c){_0x308ff8=_0x308ff8-0xce;const _0x3a7ce6=a145_0x3a7c();let _0x1fd51d=_0x3a7ce6[_0x308ff8];return _0x1fd51d;}import a145_0x12784f 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 a145_0x3a7c(){const _0x4d9abe=['416872pXRYov','602428wKFera','开始复制项目模板','cwd','3SSjSKH','1810504VSoBhm','copy','now','9tDHaUS','success','102516bSfuFA','2445870pbtElf','22QTXXmX','445580qTeuVB','1120200GNBhuN','resolve','info','项目模板复制完成','10cAbpCC','项目模板复制失败'];a145_0x3a7c=function(){return _0x4d9abe;};return a145_0x3a7c();}export async function copyProjectTemplate(_0x8a0f71){const _0x1c74b1=a145_0x1fd5,_0x4012e1=Date[_0x1c74b1(0xd2)](),_0x44ae6f=a145_0x12784f[_0x1c74b1(0xda)](process[_0x1c74b1(0xce)](),_0x8a0f71);try{logger[_0x1c74b1(0xdb)]('copy',_0x1c74b1(0xe1),{'projectCode':_0x8a0f71,'templateDir':templateDir}),await copyDirectory(templateDir,_0x44ae6f);const _0x1714c2=Date[_0x1c74b1(0xd2)]()-_0x4012e1;logger[_0x1c74b1(0xd4)](_0x1c74b1(0xd1),_0x1c74b1(0xdc),_0x1714c2,{'projectCode':_0x8a0f71});}catch(_0x8e0a67){const _0x741fe8=Date[_0x1c74b1(0xd2)]()-_0x4012e1;logger['error'](_0x1c74b1(0xd1),_0x1c74b1(0xde),{'projectCode':_0x8a0f71,'error':_0x8e0a67 instanceof Error?_0x8e0a67['message']:String(_0x8e0a67),'duration':_0x741fe8});throw _0x8e0a67;}return formatElapsed(_0x4012e1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x299e25,_0x4320b1){const _0x2e1b7e=a146_0x313e,_0x1d660f=_0x299e25();while(!![]){try{const _0x102cf3=-parseInt(_0x2e1b7e(0x10a))/0x1*(parseInt(_0x2e1b7e(0x100))/0x2)+parseInt(_0x2e1b7e(0xfa))/0x3*(-parseInt(_0x2e1b7e(0xfe))/0x4)+-parseInt(_0x2e1b7e(0xfd))/0x5+-parseInt(_0x2e1b7e(0x10b))/0x6*(-parseInt(_0x2e1b7e(0x105))/0x7)+parseInt(_0x2e1b7e(0xff))/0x8+-parseInt(_0x2e1b7e(0xfc))/0x9*(parseInt(_0x2e1b7e(0x101))/0xa)+-parseInt(_0x2e1b7e(0x102))/0xb*(-parseInt(_0x2e1b7e(0x10e))/0xc);if(_0x102cf3===_0x4320b1)break;else _0x1d660f['push'](_0x1d660f['shift']());}catch(_0x23a387){_0x1d660f['push'](_0x1d660f['shift']());}}}(a146_0x44d2,0x23187));import a146_0x586b51 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';function a146_0x313e(_0x4d910d,_0x15a0a2){_0x4d910d=_0x4d910d-0xfa;const _0x44d247=a146_0x44d2();let _0x313eef=_0x44d247[_0x4d910d];return _0x313eef;}function a146_0x44d2(){const _0x276f27=['238244TOJqpK','1034056SojoZF','2818MVpcKP','2004570ILZLtU','40491PNaYRe','代码格式化完成','npx','112YGpSYJ','resolve','format','--write','now','156didQpB','44904ZiXgHH','prettier','success','2040JuCMdV','代码格式化失败','error','6rcqIJc','开始格式化代码','9OyCMiB','958185mRUbwV'];a146_0x44d2=function(){return _0x276f27;};return a146_0x44d2();}export async function formatProjectCode(_0x3250f0){const _0xcd3d09=a146_0x313e,_0x4a0083=Date[_0xcd3d09(0x109)](),_0xd42dc9=a146_0x586b51[_0xcd3d09(0x106)](process['cwd'](),_0x3250f0);try{logger['info'](_0xcd3d09(0x107),_0xcd3d09(0xfb),{'projectCode':_0x3250f0}),await execa(resolveNpmBin(_0xcd3d09(0x104)),[_0xcd3d09(0x10c),_0xcd3d09(0x108),'.'],{'cwd':_0xd42dc9});const _0x204cd2=Date[_0xcd3d09(0x109)]()-_0x4a0083;logger[_0xcd3d09(0x10d)](_0xcd3d09(0x107),_0xcd3d09(0x103),_0x204cd2,{'projectCode':_0x3250f0});}catch(_0x56490f){const _0x2ccb53=Date[_0xcd3d09(0x109)]()-_0x4a0083;logger[_0xcd3d09(0x110)](_0xcd3d09(0x107),_0xcd3d09(0x10f),{'projectCode':_0x3250f0,'error':_0x56490f instanceof Error?_0x56490f['message']:String(_0x56490f),'duration':_0x2ccb53});throw _0x56490f;}return formatElapsed(_0x4a0083);}
|