@lovrabet/rabetbase-cli 2.3.16-beta.6 → 2.3.16-beta.7
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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/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/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a143_0x3250(_0x185de7,_0x2b5212){_0x185de7=_0x185de7-0xd4;const _0x39723b=a143_0x3972();let _0x3250a9=_0x39723b[_0x185de7];return _0x3250a9;}const a143_0x4c4bea=a143_0x3250;(function(_0x2b586e,_0x3aa6ae){const _0x10e20e=a143_0x3250,_0xc59995=_0x2b586e();while(!![]){try{const _0x401639=parseInt(_0x10e20e(0xde))/0x1*(parseInt(_0x10e20e(0xd6))/0x2)+parseInt(_0x10e20e(0xef))/0x3*(-parseInt(_0x10e20e(0xed))/0x4)+-parseInt(_0x10e20e(0xe5))/0x5+parseInt(_0x10e20e(0xdb))/0x6+-parseInt(_0x10e20e(0xe3))/0x7+parseInt(_0x10e20e(0xee))/0x8+parseInt(_0x10e20e(0xd9))/0x9;if(_0x401639===_0x3aa6ae)break;else _0xc59995['push'](_0xc59995['shift']());}catch(_0x26d9cd){_0xc59995['push'](_0xc59995['shift']());}}}(a143_0x3972,0xf05a6));function a143_0x3972(){const _0x1f06e6=['related-pages-fallback','2IrFqxS','code','nextAction','20203011UxaPrB','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','768678iqpaOo','/smartapi/lovrabet/dataset/','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','3366MDxJJu','query-standard-page-status','alias','manualResolutionRequired','string','2802562UnckAM','status','1528880mljrwP','/standard-page-status?appCode=','name','relatedPages','length','source','GET','standard-page-status','2100koGiGx','8807560hxaOQI','10209OYbeoh','read'];a143_0x3972=function(){return _0x1f06e6;};return a143_0x3972();}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageStandardPageStatus={'service':'page','command':a143_0x4c4bea(0xec),'description':a143_0x4c4bea(0xda),'risk':a143_0x4c4bea(0xd4),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a143_0x4c4bea(0xe0),'type':a143_0x4c4bea(0xe2),'description':a143_0x4c4bea(0xdd)}],async 'validate'(_0x4d0be5){validateDatasetSelector(_0x4d0be5);},async 'dryRun'(_0xcdf04b){const _0x344b99=a143_0x4c4bea,_0x328f50=await loadDatasetDetailForPage(_0xcdf04b);return{'method':_0x344b99(0xeb),'url':_0x344b99(0xdc)+_0x328f50['code']+_0x344b99(0xe6)+encodeURIComponent(_0xcdf04b['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x328f50['id'],'code':_0x328f50[_0x344b99(0xd7)],'name':_0x328f50[_0x344b99(0xe7)]},'action':_0x344b99(0xdf)})};},async 'execute'(_0x151866){const _0x287d55=a143_0x4c4bea,_0x358745=await loadDatasetDetailForPage(_0x151866),_0x176153=await loadStandardPageStatusForGenerate(_0x151866,_0x358745['code']),_0x584d34=getUndeletedRelatedPages(_0x358745),_0x3904d6=assessStandardPageState(_0x358745[_0x287d55(0xd7)],_0x176153,{'fallbackUndeletedPages':_0x584d34});return{'ok':!![],'data':{'datasetCode':_0x358745['code'],'precheckSource':_0x176153?.[_0x287d55(0xea)]??_0x287d55(0xd5),'status':_0x3904d6[_0x287d55(0xe4)],'manualResolutionRequired':_0x3904d6[_0x287d55(0xe1)],'nextAction':_0x3904d6[_0x287d55(0xd8)],'standardPageStatus':_0x176153,'relatedPages':{'total':_0x358745[_0x287d55(0xe8)][_0x287d55(0xe9)],'undeletedCount':_0x584d34[_0x287d55(0xe9)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a144_0x581aea=a144_0x39c1;(function(_0x4643bc,_0x5cda87){const _0x1533d7=a144_0x39c1,_0x4b59d5=_0x4643bc();while(!![]){try{const _0x46466a=parseInt(_0x1533d7(0xcf))/0x1+parseInt(_0x1533d7(0xc6))/0x2*(-parseInt(_0x1533d7(0xc9))/0x3)+parseInt(_0x1533d7(0xc4))/0x4*(-parseInt(_0x1533d7(0xcb))/0x5)+-parseInt(_0x1533d7(0xe2))/0x6*(-parseInt(_0x1533d7(0xdb))/0x7)+-parseInt(_0x1533d7(0xda))/0x8+parseInt(_0x1533d7(0xcc))/0x9+parseInt(_0x1533d7(0xe4))/0xa;if(_0x46466a===_0x5cda87)break;else _0x4b59d5['push'](_0x4b59d5['shift']());}catch(_0xe0c9bf){_0x4b59d5['push'](_0x4b59d5['shift']());}}}(a144_0x4bf6,0x3d71b));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{syncStandardPages}from'../../core/api-client.js';function a144_0x39c1(_0xc3da96,_0x40e61a){_0xc3da96=_0xc3da96-0xc4;const _0x4bf6cd=a144_0x4bf6();let _0x39c198=_0x4bf6cd[_0xc3da96];return _0x39c198;}export const pageSync={'service':a144_0x581aea(0xd5),'command':a144_0x581aea(0xd9),'description':a144_0x581aea(0xd1),'risk':a144_0x581aea(0xd0),'defaultOutputFormat':a144_0x581aea(0xd4),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a144_0x581aea(0xe0),'type':a144_0x581aea(0xd8),'description':a144_0x581aea(0xe3)}],async 'validate'(_0x58073e){validateDatasetSelector(_0x58073e);},async 'dryRun'(_0x1c89d8){const _0x3d0992=a144_0x581aea,_0x4bc1ff=await prepare(_0x1c89d8);return{'method':_0x3d0992(0xd6),'url':_0x3d0992(0xca)+_0x4bc1ff[_0x3d0992(0xcd)][_0x3d0992(0xd7)]+'/sync-to-pages','body':{'appCode':_0x1c89d8[_0x3d0992(0xce)]},'description':serializeDryRunDescription({'dataset':{'id':_0x4bc1ff['dataset']['id'],'code':_0x4bc1ff[_0x3d0992(0xcd)]['code'],'name':_0x4bc1ff[_0x3d0992(0xcd)][_0x3d0992(0xd3)],'fieldCount':_0x4bc1ff[_0x3d0992(0xcd)][_0x3d0992(0xde)]},'relatedPages':{'total':_0x4bc1ff['dataset'][_0x3d0992(0xdd)][_0x3d0992(0xdf)],'undeletedCount':_0x4bc1ff[_0x3d0992(0xc8)][_0x3d0992(0xdf)]},'action':_0x3d0992(0xd9),'reason':_0x4bc1ff[_0x3d0992(0xc8)][_0x3d0992(0xdf)]+_0x3d0992(0xd2)})};},async 'execute'(_0x10d258){const _0x2caf7a=a144_0x581aea,_0x1c26f1=await prepare(_0x10d258),_0x13a58f=await syncStandardPages(_0x10d258[_0x2caf7a(0xce)],_0x1c26f1[_0x2caf7a(0xcd)][_0x2caf7a(0xd7)]),_0x2eb104=Array[_0x2caf7a(0xc7)](_0x13a58f[_0x2caf7a(0xe1)])&&_0x13a58f[_0x2caf7a(0xe1)][_0x2caf7a(0xdf)]>0x0,_0x3f4a8e=_0x2eb104?_0x2caf7a(0xdc):_0x2caf7a(0xc5);return{'ok':!![],'message':_0x3f4a8e,'data':{'datasetCode':_0x1c26f1['dataset'][_0x2caf7a(0xd7)],..._0x13a58f}};}};async function prepare(_0x51570f){const _0x1b2ec5=a144_0x581aea,_0x429ba7=await loadDatasetDetailForPage(_0x51570f);return prepareDatasetAction(_0x429ba7,_0x1b2ec5(0xd9));}function a144_0x4bf6(){const _0x15a776=['string','sync','3309560Dukuai','14ITDSLG','部分页面同步失败','relatedPages','fieldCount','length','alias','failedPages','795738qotpsg','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','6930810vBgoFN','4ZOuYza','同步成功','1704vixhjF','isArray','undeletedPages','573AkBoTM','/smartapi/lovrabet/dataset/','1436290DrewBZ','584613gquOgI','dataset','appCode','92076rUiOOA','write','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','\x20undeleted\x20related\x20page(s)\x20found','name','compress','page','POST','code'];a144_0x4bf6=function(){return _0x15a776;};return a144_0x4bf6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a145_0xd044(){const _0x4fe615=['2836950oUfLri','32044SreUnK','475VISizJ','1497554GKSInn','1AuNeqs','111057rMBgDW','5211126WkqrSf','24OSSCZf','17466420VWkGSa','1975967RfcYtn'];a145_0xd044=function(){return _0x4fe615;};return a145_0xd044();}(function(_0x3e761c,_0x4a418a){const _0xb0024c=a145_0x31e3,_0x47f0fb=_0x3e761c();while(!![]){try{const _0x53a68e=-parseInt(_0xb0024c(0x1bc))/0x1*(-parseInt(_0xb0024c(0x1bb))/0x2)+-parseInt(_0xb0024c(0x1bd))/0x3+-parseInt(_0xb0024c(0x1b9))/0x4*(-parseInt(_0xb0024c(0x1ba))/0x5)+parseInt(_0xb0024c(0x1b8))/0x6+-parseInt(_0xb0024c(0x1b7))/0x7*(-parseInt(_0xb0024c(0x1b5))/0x8)+-parseInt(_0xb0024c(0x1be))/0x9+-parseInt(_0xb0024c(0x1b6))/0xa;if(_0x53a68e===_0x4a418a)break;else _0x47f0fb['push'](_0x47f0fb['shift']());}catch(_0x2ac08b){_0x47f0fb['push'](_0x47f0fb['shift']());}}}(a145_0xd044,0x71f7f));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';function a145_0x31e3(_0x4cf341,_0x4155cd){_0x4cf341=_0x4cf341-0x1b5;const _0xd04437=a145_0xd044();let _0x31e37f=_0xd04437[_0x4cf341];return _0x31e37f;}import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a146_0x2f4f(){const _0x46b30f=['598585IPikYZ','num','19658cOQMQg','7852744JftmRK','read','menu-id','4093838EZBBeY','9422690DHdsGS','9ynFkqF','6hnPYyj','26564637QzoOdr','1278040duOuaN','12NQNSjH','permit','40CkpSQI','12zvLqba'];a146_0x2f4f=function(){return _0x46b30f;};return a146_0x2f4f();}function a146_0x542a(_0x1c2f10,_0x4d1f2d){_0x1c2f10=_0x1c2f10-0x98;const _0x2f4f78=a146_0x2f4f();let _0x542a87=_0x2f4f78[_0x1c2f10];return _0x542a87;}const a146_0x697704=a146_0x542a;(function(_0x3f8df6,_0x4f3eb1){const _0x3885d6=a146_0x542a,_0x10d5c2=_0x3f8df6();while(!![]){try{const _0x338354=parseInt(_0x3885d6(0xa2))/0x1*(-parseInt(_0x3885d6(0xa6))/0x2)+-parseInt(_0x3885d6(0x9d))/0x3*(parseInt(_0x3885d6(0x9f))/0x4)+parseInt(_0x3885d6(0xa4))/0x5*(-parseInt(_0x3885d6(0xa3))/0x6)+-parseInt(_0x3885d6(0x9a))/0x7+-parseInt(_0x3885d6(0xa7))/0x8*(parseInt(_0x3885d6(0x9c))/0x9)+parseInt(_0x3885d6(0x9b))/0xa+parseInt(_0x3885d6(0x9e))/0xb*(parseInt(_0x3885d6(0xa0))/0xc);if(_0x338354===_0x4f3eb1)break;else _0x10d5c2['push'](_0x10d5c2['shift']());}catch(_0x2436cb){_0x10d5c2['push'](_0x10d5c2['shift']());}}}(a146_0x2f4f,0x7ec1b));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':a146_0x697704(0xa1),'command':'page-get','description':'Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','risk':a146_0x697704(0x98),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3b8200){const _0x1e02db=a146_0x697704,_0x59432b=_0x3b8200[_0x1e02db(0xa5)](_0x1e02db(0x99)),_0x219ac6=await getPagePermit(_0x59432b);return{'ok':!![],'data':{'page':projectPagePermit(_0x219ac6)},'message':'Page\x20permit\x20for\x20menu\x20'+_0x59432b};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x21155d=a147_0x4849;(function(_0x5174b6,_0x1d66f5){const _0x202c71=a147_0x4849,_0x46be52=_0x5174b6();while(!![]){try{const _0x2861c0=-parseInt(_0x202c71(0x1d3))/0x1*(parseInt(_0x202c71(0x1db))/0x2)+-parseInt(_0x202c71(0x1c8))/0x3*(-parseInt(_0x202c71(0x1e5))/0x4)+parseInt(_0x202c71(0x1e7))/0x5*(parseInt(_0x202c71(0x1d6))/0x6)+parseInt(_0x202c71(0x1e0))/0x7*(-parseInt(_0x202c71(0x1dc))/0x8)+parseInt(_0x202c71(0x1d1))/0x9*(parseInt(_0x202c71(0x1d4))/0xa)+-parseInt(_0x202c71(0x1d0))/0xb*(parseInt(_0x202c71(0x1de))/0xc)+parseInt(_0x202c71(0x1e3))/0xd*(parseInt(_0x202c71(0x1c6))/0xe);if(_0x2861c0===_0x1d66f5)break;else _0x46be52['push'](_0x46be52['shift']());}catch(_0x232727){_0x46be52['push'](_0x46be52['shift']());}}}(a147_0x47b6,0x274f5));import{getPagePermit,savePagePermit}from'../../core/api-client.js';function a147_0x4849(_0xf64415,_0x470b89){_0xf64415=_0xf64415-0x1c4;const _0x47b647=a147_0x47b6();let _0x484998=_0x47b647[_0xf64415];return _0x484998;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';function a147_0x47b6(){const _0x15920f=['join','validation','360776VftCGR','Pass\x20at\x20least\x20one\x20of:\x20','280wQubvy','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','156290znsKLw','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','length','140oFPfXr','POST','3495ENEInT','flag','Updated\x20page\x20permit\x20for\x20menu\x20','This\x20page\x20has\x20no\x20\x22','selector','label','\x20cannot\x20be\x20empty.','menuId','1308967VfPQvh','23454szodVH','key','1WeZCTY','650vAAwXP','menu-id','18RGzKdy','Nothing\x20to\x20set.','push','page-set','map','531294axuIii','584LkGmpT','appCode','12VhIOXO','num','7343QrSRqQ'];a147_0x47b6=function(){return _0x15920f;};return a147_0x47b6();}const SAVE_PATH='/smartapi/permit/page/save';function collectRequestedSlots(_0x159e6c){const _0x5c6fc5=a147_0x4849,_0x418777=[];for(const _0x3e6e9e of PAGE_SLOT_SPECS){const _0xe8ccde=_0x159e6c[_0x5c6fc5(0x1c9)](_0x3e6e9e[_0x5c6fc5(0x1c9)]);if(_0xe8ccde===undefined||_0xe8ccde===null)continue;const _0x5d7af2=splitList(String(_0xe8ccde));if(_0x5d7af2[_0x5c6fc5(0x1c5)]===0x0)throw CliErrors['validation']('--'+_0x3e6e9e[_0x5c6fc5(0x1c9)]+_0x5c6fc5(0x1ce),'Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.');_0x418777[_0x5c6fc5(0x1d8)]({'spec':_0x3e6e9e,'refs':_0x5d7af2});}return _0x418777;}async function buildPlan(_0x2ac23f,_0x4bd13a){const _0x7e9a69=a147_0x4849,_0x27aebf=_0x2ac23f[_0x7e9a69(0x1df)](_0x7e9a69(0x1d5)),_0x320f31=collectRequestedSlots(_0x2ac23f);if(_0x320f31['length']===0x0)throw CliErrors[_0x7e9a69(0x1e2)](_0x7e9a69(0x1d7),_0x7e9a69(0x1e4)+PAGE_SLOT_SPECS['map'](_0x3a497f=>'--'+_0x3a497f['flag'])[_0x7e9a69(0x1e1)](',\x20')+'.');const _0x2a1624=await getPagePermit(_0x27aebf),_0x4aa112={},_0x52975f={},_0x35298d=[];for(const {spec:_0x30ccf6,refs:_0x332f98}of _0x320f31){const _0x264bae=_0x2a1624[_0x30ccf6[_0x7e9a69(0x1d2)]];if(!_0x264bae)throw CliErrors[_0x7e9a69(0x1e2)](_0x7e9a69(0x1cb)+_0x30ccf6[_0x7e9a69(0x1cd)]+'\x22\x20permission\x20slot\x20('+_0x30ccf6[_0x7e9a69(0x1d2)]+').',_0x7e9a69(0x1c4));_0x4aa112[_0x30ccf6[_0x7e9a69(0x1d2)]]=projectPageSlot(_0x264bae);const _0x2b2304=await resolvePermitRoles(_0x2ac23f['appCode'],_0x332f98,{'allowSelf':_0x30ccf6['allowSelf'],'label':_0x30ccf6[_0x7e9a69(0x1cd)]});_0x264bae['rolePermit']=_0x2b2304,_0x52975f[_0x30ccf6[_0x7e9a69(0x1d2)]]=projectPageSlot(_0x264bae);}const _0x5429df={'operation':_0x7e9a69(0x1d9),'selector':{'appCode':_0x2ac23f[_0x7e9a69(0x1dd)],'menuId':_0x27aebf,'slots':_0x320f31[_0x7e9a69(0x1da)](_0x46f19f=>_0x46f19f['spec'][_0x7e9a69(0x1d2)])},'before':_0x4aa112,'after':_0x52975f,'dryRun':_0x4bd13a,'backend':{'method':_0x7e9a69(0x1c7),'path':SAVE_PATH},'warnings':_0x35298d};return{'page':_0x2a1624,'mutation':_0x5429df};}export const permitPageSet={'service':'permit','command':a147_0x21155d(0x1d9),'description':a147_0x21155d(0x1e6),'risk':'high-risk-write','flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x54ac98){const _0x2a17b7=a147_0x21155d,_0x15ab4e=collectRequestedSlots(_0x54ac98);if(_0x15ab4e['length']===0x0)throw CliErrors[_0x2a17b7(0x1e2)]('Nothing\x20to\x20set.',_0x2a17b7(0x1e4)+PAGE_SLOT_SPECS['map'](_0x47d5d6=>'--'+_0x47d5d6['flag'])[_0x2a17b7(0x1e1)](',\x20')+'.');},async 'dryRun'(_0x417fc3){const _0x173ac5=a147_0x21155d,{mutation:_0x134a75}=await buildPlan(_0x417fc3,!![]);return asDryRunResult(_0x134a75,{'method':_0x173ac5(0x1c7),'url':SAVE_PATH});},async 'execute'(_0x324756){const _0xe15f53=a147_0x21155d,{page:_0x5139d2,mutation:_0x445d5c}=await buildPlan(_0x324756,![]);return await savePagePermit(_0x5139d2),{'ok':!![],'data':_0x445d5c,'message':_0xe15f53(0x1ca)+_0x445d5c[_0xe15f53(0x1cc)][_0xe15f53(0x1cf)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x7913b7=a148_0x8d7c;(function(_0x5e2cfd,_0x2f3406){const _0x5d42da=a148_0x8d7c,_0xb72225=_0x5e2cfd();while(!![]){try{const _0xb1b92d=parseInt(_0x5d42da(0xdb))/0x1+parseInt(_0x5d42da(0xc7))/0x2*(-parseInt(_0x5d42da(0xc4))/0x3)+-parseInt(_0x5d42da(0xc2))/0x4*(parseInt(_0x5d42da(0xc9))/0x5)+-parseInt(_0x5d42da(0xd6))/0x6*(-parseInt(_0x5d42da(0xc8))/0x7)+-parseInt(_0x5d42da(0xd1))/0x8+-parseInt(_0x5d42da(0xea))/0x9*(-parseInt(_0x5d42da(0xe0))/0xa)+parseInt(_0x5d42da(0xd2))/0xb*(parseInt(_0x5d42da(0xd8))/0xc);if(_0xb1b92d===_0x2f3406)break;else _0xb72225['push'](_0xb72225['shift']());}catch(_0x432041){_0xb72225['push'](_0xb72225['shift']());}}}(a148_0x9077,0xd2fbf));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';function a148_0x9077(){const _0x1cb1eb=['datasets','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','Pass\x20--datasets\x20<datasetCode,...>.','9mHQhmd','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','datasetCodes','revoke','43164fAbhNn','validation','420225pJRiWo','push','high-risk-write','6BvKMAd','175721ZdqYGN','325duTnCX','action','selector','permit','get','bool','API','/smartapi/permit/role/update','3459416SoQPGj','110bONudp','has','length','POST','174atIpRS','role-apis-set','1299468VfbUYK','roleName','Revoked\x20API\x20access\x20for\x20','12356QKrRQf','appCode','\x20dataset(s)\x20on\x20role\x20','str','api-revoke','5950250ybePhD','join','set','Missing\x20--revoke.','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','filter','flagMissing'];a148_0x9077=function(){return _0x1cb1eb;};return a148_0x9077();}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';function a148_0x8d7c(_0x585628,_0xc50baf){_0x585628=_0x585628-0xc2;const _0x907724=a148_0x9077();let _0x8d7c4d=_0x907724[_0x585628];return _0x8d7c4d;}const UPDATE_PATH=a148_0x7913b7(0xd0);async function buildPlan(_0x3b7f0e,_0x2a2dd7){const _0x142b50=a148_0x7913b7,_0x3b9efa=await resolveRoleRef(_0x3b7f0e['appCode'],readRoleRef(_0x3b7f0e));assertPermConfigurable(_0x3b9efa);if(!_0x3b7f0e[_0x142b50(0xce)](_0x142b50(0xed)))throw CliErrors[_0x142b50(0xc3)]('Missing\x20--revoke.',_0x142b50(0xeb));const _0x26ddc0=splitList(_0x3b7f0e[_0x142b50(0xde)](_0x142b50(0xe7)));if(_0x26ddc0[_0x142b50(0xd4)]===0x0)throw CliErrors['flagMissing'](_0x142b50(0xe7),'Pass\x20--datasets\x20<datasetCode,...>.');const _0x2642f9=await getRoleApiResources(_0x3b7f0e[_0x142b50(0xdc)],_0x3b9efa['id']),{byCode:_0x39201c,byDataset:_0x3e31b3}=flattenApiResources(_0x2642f9),_0x31641a=_0x26ddc0[_0x142b50(0xe5)](_0x3e62a0=>!_0x3e31b3[_0x142b50(0xd3)](_0x3e62a0));if(_0x31641a['length']>0x0)throw CliErrors[_0x142b50(0xc3)](_0x142b50(0xe4)+_0x31641a[_0x142b50(0xe1)](',\x20')+'.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.');const _0x44522a=new Map(),_0x3980cf=[],_0x19e2e1=[];for(const _0xac83fa of _0x26ddc0){for(const _0x32f983 of _0x3e31b3[_0x142b50(0xcd)](_0xac83fa)){const _0x33f17d=_0x39201c[_0x142b50(0xcd)](_0x32f983);_0x44522a[_0x142b50(0xe2)](_0x32f983,'0'),_0x3980cf[_0x142b50(0xc5)]({'resourceCode':_0x32f983,'datasetCode':_0xac83fa,'action':_0x33f17d[_0x142b50(0xca)]}),_0x19e2e1[_0x142b50(0xc5)]({'resourceCode':_0x32f983,'datasetCode':_0xac83fa,'action':'0'});}}const _0x50fb6a=buildPermits(_0x39201c,_0x44522a),_0x1269b7={'operation':_0x142b50(0xdf),'selector':{'appCode':_0x3b7f0e[_0x142b50(0xdc)],'roleId':_0x3b9efa['id'],'roleName':_0x3b9efa['roleName'],'datasetCodes':_0x26ddc0},'before':_0x3980cf,'after':_0x19e2e1,'dryRun':_0x2a2dd7,'backend':{'method':_0x142b50(0xd5),'path':UPDATE_PATH,'roleType':_0x142b50(0xcf)},'warnings':[]};return{'role':_0x3b9efa,'permits':_0x50fb6a,'mutation':_0x1269b7};}export const permitRoleApisSet={'service':a148_0x7913b7(0xcc),'command':a148_0x7913b7(0xd7),'description':a148_0x7913b7(0xe8),'risk':a148_0x7913b7(0xc6),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1e2548){const _0x24f8ef=a148_0x7913b7;if(!_0x1e2548['bool'](_0x24f8ef(0xed)))throw CliErrors[_0x24f8ef(0xc3)](_0x24f8ef(0xe3),_0x24f8ef(0xeb));if(splitList(_0x1e2548[_0x24f8ef(0xde)](_0x24f8ef(0xe7)))[_0x24f8ef(0xd4)]===0x0)throw CliErrors[_0x24f8ef(0xe6)](_0x24f8ef(0xe7),_0x24f8ef(0xe9));},async 'dryRun'(_0x459b4b){const _0x4e5c0a=a148_0x7913b7,{mutation:_0x1c5efa}=await buildPlan(_0x459b4b,!![]);return asDryRunResult(_0x1c5efa,{'method':_0x4e5c0a(0xd5),'url':UPDATE_PATH});},async 'execute'(_0x2cb762){const _0x22cf7a=a148_0x7913b7,{role:_0x5af8a6,permits:_0x1232b0,mutation:_0x1e26aa}=await buildPlan(_0x2cb762,![]);return await updateAppRole({'id':_0x5af8a6['id'],'appCode':_0x2cb762[_0x22cf7a(0xdc)],'roleType':'API','permits':_0x1232b0}),{'ok':!![],'data':_0x1e26aa,'message':_0x22cf7a(0xda)+_0x1e26aa[_0x22cf7a(0xcb)][_0x22cf7a(0xec)][_0x22cf7a(0xd4)]+_0x22cf7a(0xdd)+_0x5af8a6[_0x22cf7a(0xd9)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a149_0x1851(){const _0x1b7dc4=['9810934VQtzoM','filter','set','resourceCodes','has','PAGE','appCode','flagMissing','menus','4713624khuUhH','/smartapi/permit/role/update','get','252VjbhFp','permit','Unknown\x20menu\x20resourceCode(s):\x20','Pass\x20--menus\x20<resourceCode,...>.','length','4999108iheLtz','push','roleName','role-menus-set','32276OWcyxv','action','2015130JArxcf','menu-grant','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','selector','27KDqgZD','POST','join','str','502168zzwmNs','86157TjZoQc'];a149_0x1851=function(){return _0x1b7dc4;};return a149_0x1851();}const a149_0x3be88e=a149_0x3677;(function(_0x436cff,_0x137655){const _0x471679=a149_0x3677,_0x4e18e9=_0x436cff();while(!![]){try{const _0x1ad580=-parseInt(_0x471679(0x17c))/0x1+parseInt(_0x471679(0x171))/0x2*(parseInt(_0x471679(0x177))/0x3)+-parseInt(_0x471679(0x16d))/0x4+-parseInt(_0x471679(0x173))/0x5+-parseInt(_0x471679(0x186))/0x6+parseInt(_0x471679(0x17d))/0x7+parseInt(_0x471679(0x17b))/0x8*(parseInt(_0x471679(0x189))/0x9);if(_0x1ad580===_0x137655)break;else _0x4e18e9['push'](_0x4e18e9['shift']());}catch(_0x2ce764){_0x4e18e9['push'](_0x4e18e9['shift']());}}}(a149_0x1851,0xbe634));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a149_0x3677(_0x418203,_0x295ee8){_0x418203=_0x418203-0x16b;const _0x18518b=a149_0x1851();let _0x367775=_0x18518b[_0x418203];return _0x367775;}import{buildPermits,flattenMenuResources,GRANT_FLAG,MENUS_FLAG,readGrantRevoke,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a149_0x3be88e(0x187);async function buildPlan(_0x28e581,_0x16b143){const _0x1c49bc=a149_0x3be88e,_0x124e43=await resolveRoleRef(_0x28e581[_0x1c49bc(0x183)],readRoleRef(_0x28e581));assertPermConfigurable(_0x124e43);const _0x23f508=readGrantRevoke(_0x28e581),_0x230b87=splitList(_0x28e581[_0x1c49bc(0x17a)](_0x1c49bc(0x185)));if(_0x230b87[_0x1c49bc(0x16c)]===0x0)throw CliErrors[_0x1c49bc(0x184)]('menus','Pass\x20--menus\x20<resourceCode,...>.');const _0x18ebdc=await getRoleMenuResources(_0x28e581[_0x1c49bc(0x183)],_0x124e43['id']),_0x4806eb=flattenMenuResources(_0x18ebdc),_0x5ae522=_0x230b87[_0x1c49bc(0x17e)](_0x4427fc=>!_0x4806eb[_0x1c49bc(0x181)](_0x4427fc));if(_0x5ae522['length']>0x0)throw CliErrors['validation'](_0x1c49bc(0x18b)+_0x5ae522[_0x1c49bc(0x179)](',\x20')+'.',_0x1c49bc(0x175));const _0x52ba36=new Map(),_0x3f773c=[],_0x428e64=[];for(const _0x12943c of _0x230b87){const _0x20539d=_0x4806eb[_0x1c49bc(0x188)](_0x12943c);_0x52ba36[_0x1c49bc(0x17f)](_0x12943c,_0x23f508),_0x3f773c[_0x1c49bc(0x16e)]({'resourceCode':_0x12943c,'action':_0x20539d[_0x1c49bc(0x172)]}),_0x428e64[_0x1c49bc(0x16e)]({'resourceCode':_0x12943c,'action':_0x23f508});}const _0x4ea55a=buildPermits(_0x4806eb,_0x52ba36),_0x34a598={'operation':_0x23f508==='access'?_0x1c49bc(0x174):'menu-revoke','selector':{'appCode':_0x28e581[_0x1c49bc(0x183)],'roleId':_0x124e43['id'],'roleName':_0x124e43[_0x1c49bc(0x16f)],'resourceCodes':_0x230b87},'before':_0x3f773c,'after':_0x428e64,'dryRun':_0x16b143,'backend':{'method':_0x1c49bc(0x178),'path':UPDATE_PATH,'roleType':_0x1c49bc(0x182)},'warnings':[]};return{'role':_0x124e43,'permits':_0x4ea55a,'mutation':_0x34a598};}export const permitRoleMenusSet={'service':a149_0x3be88e(0x18a),'command':a149_0x3be88e(0x170),'description':'Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','risk':'high-risk-write','flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x38d432){const _0xcee44a=a149_0x3be88e;readGrantRevoke(_0x38d432);if(splitList(_0x38d432[_0xcee44a(0x17a)]('menus'))[_0xcee44a(0x16c)]===0x0)throw CliErrors[_0xcee44a(0x184)](_0xcee44a(0x185),_0xcee44a(0x16b));},async 'dryRun'(_0xcd90aa){const _0x382b36=a149_0x3be88e,{mutation:_0x21bec2}=await buildPlan(_0xcd90aa,!![]);return asDryRunResult(_0x21bec2,{'method':_0x382b36(0x178),'url':UPDATE_PATH});},async 'execute'(_0x588dda){const _0x1f1aaf=a149_0x3be88e,{role:_0x542298,permits:_0x1ba1c9,mutation:_0x228ccb}=await buildPlan(_0x588dda,![]);return await updateAppRole({'id':_0x542298['id'],'appCode':_0x588dda['appCode'],'roleType':_0x1f1aaf(0x182),'permits':_0x1ba1c9}),{'ok':!![],'data':_0x228ccb,'message':'Updated\x20'+_0x228ccb[_0x1f1aaf(0x176)][_0x1f1aaf(0x180)]['length']+'\x20menu\x20permit(s)\x20for\x20role\x20'+_0x542298[_0x1f1aaf(0x16f)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a150_0x375165=a150_0x18ec;(function(_0x48db5d,_0x877e34){const _0x58dd37=a150_0x18ec,_0x58aed2=_0x48db5d();while(!![]){try{const _0x353cfd=-parseInt(_0x58dd37(0xf2))/0x1*(parseInt(_0x58dd37(0x10a))/0x2)+parseInt(_0x58dd37(0x105))/0x3*(parseInt(_0x58dd37(0xfe))/0x4)+-parseInt(_0x58dd37(0xfa))/0x5+-parseInt(_0x58dd37(0xf4))/0x6*(parseInt(_0x58dd37(0xf9))/0x7)+-parseInt(_0x58dd37(0xff))/0x8*(parseInt(_0x58dd37(0x104))/0x9)+parseInt(_0x58dd37(0x103))/0xa*(parseInt(_0x58dd37(0x10c))/0xb)+-parseInt(_0x58dd37(0x100))/0xc*(-parseInt(_0x58dd37(0xf3))/0xd);if(_0x353cfd===_0x877e34)break;else _0x58aed2['push'](_0x58aed2['shift']());}catch(_0x14287f){_0x58aed2['push'](_0x58aed2['shift']());}}}(a150_0x34bb,0xb916b));import{getRoleMenuResources}from'../../core/api-client.js';function a150_0x18ec(_0x36e7c9,_0x471e62){_0x36e7c9=_0x36e7c9-0xf2;const _0x34bb14=a150_0x34bb();let _0x18eccc=_0x34bb14[_0x36e7c9];return _0x18eccc;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';function a150_0x34bb(){const _0x2635f1=['626370OXgTAz','appCode','access','length','read','7952ufqPxr','\x20menu(s)\x20allowed','1315765BDhnlI','resourceCode','281cyngWU','13inyOLh','807198YNsUis','roleName','action','allowed','map','14glUDoW','2749570ZyksKe','filter','role-menus','resourceName','4MuQYvw','6056mlIbaM','38374548sEzPck','Role\x20','values','30wENjAy','12735hJGYlR'];a150_0x34bb=function(){return _0x2635f1;};return a150_0x34bb();}export const permitRoleMenus={'service':'permit','command':a150_0x375165(0xfc),'description':'Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','risk':a150_0x375165(0x109),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4dc8e8){const _0x2937a0=a150_0x375165,_0x136817=await resolveRoleRef(_0x4dc8e8[_0x2937a0(0x106)],readRoleRef(_0x4dc8e8)),_0x5a34e7=await getRoleMenuResources(_0x4dc8e8[_0x2937a0(0x106)],_0x136817['id']),_0x4e5e8e=flattenMenuResources(_0x5a34e7),_0x268cf7=Array['from'](_0x4e5e8e[_0x2937a0(0x102)]())[_0x2937a0(0xf8)](_0x2e4c73=>({'resourceCode':_0x2e4c73[_0x2937a0(0x10d)],'resourceName':_0x2e4c73[_0x2937a0(0xfd)],'allowed':_0x2e4c73[_0x2937a0(0xf6)]===_0x2937a0(0x107),'action':_0x2e4c73[_0x2937a0(0xf6)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x4dc8e8[_0x2937a0(0x106)],'roleId':_0x136817['id'],'roleName':_0x136817[_0x2937a0(0xf5)]},'menus':_0x268cf7},'message':_0x2937a0(0x101)+_0x136817[_0x2937a0(0xf5)]+'\x20has\x20'+_0x268cf7[_0x2937a0(0xfb)](_0x3e1a6=>_0x3e1a6[_0x2937a0(0xf7)])['length']+'/'+_0x268cf7[_0x2937a0(0x108)]+_0x2937a0(0x10b)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x5ace85=a151_0x33f6;(function(_0x1c5036,_0x5d1bd7){const _0x2aee85=a151_0x33f6,_0x17c067=_0x1c5036();while(!![]){try{const _0x502881=-parseInt(_0x2aee85(0x200))/0x1*(-parseInt(_0x2aee85(0x1ee))/0x2)+parseInt(_0x2aee85(0x236))/0x3*(parseInt(_0x2aee85(0x1f1))/0x4)+-parseInt(_0x2aee85(0x1e7))/0x5+-parseInt(_0x2aee85(0x1fa))/0x6*(parseInt(_0x2aee85(0x1fb))/0x7)+-parseInt(_0x2aee85(0x21c))/0x8+-parseInt(_0x2aee85(0x210))/0x9*(-parseInt(_0x2aee85(0x224))/0xa)+parseInt(_0x2aee85(0x1ec))/0xb;if(_0x502881===_0x5d1bd7)break;else _0x17c067['push'](_0x17c067['shift']());}catch(_0x40e416){_0x17c067['push'](_0x17c067['shift']());}}}(a151_0x405f,0x2dc10));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a151_0x5ace85(0x21f),'type':'number','required':!![],'description':a151_0x5ace85(0x1e9)};export const ROLE_REF_FLAG={'name':a151_0x5ace85(0x20e),'type':a151_0x5ace85(0x233),'required':!![],'description':a151_0x5ace85(0x1fd)};export const GRANT_FLAG={'name':a151_0x5ace85(0x231),'type':a151_0x5ace85(0x22b),'required':![],'description':'Grant\x20access\x20to\x20the\x20listed\x20resources'};function a151_0x405f(){const _0x22cf0f=['631750bXTELd','Missing\x20action.','Menu\x20id\x20(from\x20`menu\x20list`)','validation','data\x20export','3292256RVSkhw','SELF','1384DqEubo','menu\x20visibility',';\x20SELF\x20=\x20only\x20own\x20rows','4272stTJKE','data\x20update','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','Run\x20`role\x20list`.','row\x20visibility','pageNodeList','resourceName','Pass\x20--role\x20<id|name>.','update-roles','16806jckeyb','637qmekGg','dataPermit','Role\x20id\x20or\x20role\x20name','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','\x20is\x20not\x20available\x20for\x20this\x20app.','80btFmMk','Revoke\x20access\x20to\x20the\x20listed\x20resources','label','find','menuPermit','allowSelf','entries','bool','toUpperCase','roleType','resourceCode','row-roles','map','Role\x20id\x20','role','split','603ezqwZb','Roles\x20for\x20','\x20(comma-separated\x20SELF/ALL/id/name)','rolePermit','set','push','detail-roles','SELF\x20is\x20not\x20allowed\x20for\x20','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','data\x20create','dataDetail','Disambiguate\x20with\x20an\x20id.','2329712TVVEVZ','trim','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','menu-id','ALL','datasetCode','export-roles','length','31090sQFavp','delete-roles','\x22\x20not\x20found.','action','menuId','dataDelete','filter','boolean','dataUpdate','create-roles','data\x20delete','\x20not\x20found.','get','grant','access','string','Role\x20\x22','roleName','834SHjlbg','flagMissing','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','menus','Special\x20role\x20','dataCreate','allowedActions','flag','\x22\x20is\x20ambiguous\x20(ids:\x20','dataExport'];a151_0x405f=function(){return _0x22cf0f;};return a151_0x405f();}export const REVOKE_FLAG={'name':'revoke','type':a151_0x5ace85(0x22b),'required':![],'description':a151_0x5ace85(0x201)};export const MENUS_FLAG={'name':a151_0x5ace85(0x1e0),'type':a151_0x5ace85(0x233),'required':!![],'description':a151_0x5ace85(0x1df)};export const DATASETS_FLAG={'name':'datasets','type':a151_0x5ace85(0x233),'required':!![],'description':a151_0x5ace85(0x1f3)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a151_0x5ace85(0x204),'allowSelf':![],'label':a151_0x5ace85(0x1ef)},{'flag':a151_0x5ace85(0x22d),'key':a151_0x5ace85(0x1e2),'allowSelf':![],'label':a151_0x5ace85(0x219)},{'flag':a151_0x5ace85(0x1f9),'key':a151_0x5ace85(0x22c),'allowSelf':![],'label':a151_0x5ace85(0x1f2)},{'flag':a151_0x5ace85(0x225),'key':a151_0x5ace85(0x229),'allowSelf':![],'label':a151_0x5ace85(0x22e)},{'flag':a151_0x5ace85(0x216),'key':a151_0x5ace85(0x21a),'allowSelf':![],'label':'data\x20detail'},{'flag':a151_0x5ace85(0x222),'key':a151_0x5ace85(0x1e6),'allowSelf':![],'label':a151_0x5ace85(0x1eb)},{'flag':a151_0x5ace85(0x20b),'key':a151_0x5ace85(0x1fc),'allowSelf':!![],'label':a151_0x5ace85(0x1f5)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a151_0x5ace85(0x20c)](_0x33ed80=>({'name':_0x33ed80[a151_0x5ace85(0x1e4)],'type':a151_0x5ace85(0x233),'required':![],'description':a151_0x5ace85(0x211)+_0x33ed80[a151_0x5ace85(0x202)]+a151_0x5ace85(0x212)+(_0x33ed80['allowSelf']?a151_0x5ace85(0x1f0):'')}));export function splitList(_0x325074){const _0x1619fb=a151_0x5ace85;return _0x325074[_0x1619fb(0x20f)](',')[_0x1619fb(0x20c)](_0x396e80=>_0x396e80[_0x1619fb(0x21d)]())[_0x1619fb(0x22a)](Boolean);}export function projectRoleRef(_0x454b82){const _0x18dd63=a151_0x5ace85;return{'id':_0x454b82['id'],'roleName':_0x454b82[_0x18dd63(0x235)],'roleType':_0x454b82[_0x18dd63(0x209)]};}export async function resolvePermitRoles(_0x42b16b,_0x4dcb65,_0x3de304){const _0x263856=a151_0x5ace85,_0x584421=await listPermitRoles(_0x42b16b,{'needSelf':!![],'needPublic':!![]}),_0x3d52ff=[];for(const _0x17d807 of _0x4dcb65){const _0x485d2e=resolveOnePermitRole(_0x584421,_0x17d807);if(!_0x3de304[_0x263856(0x205)]&&_0x485d2e[_0x263856(0x209)]===_0x263856(0x1ed))throw CliErrors[_0x263856(0x1ea)](_0x263856(0x217)+_0x3de304[_0x263856(0x202)]+'.',_0x263856(0x21e));if(!_0x3d52ff['some'](_0x4813f5=>_0x4813f5['id']===_0x485d2e['id']))_0x3d52ff[_0x263856(0x215)](_0x485d2e);}return _0x3d52ff;}function resolveOnePermitRole(_0x27a126,_0x1fe466){const _0x352c8d=a151_0x5ace85,_0x4ce5aa=_0x1fe466[_0x352c8d(0x21d)](),_0x41f525=_0x4ce5aa[_0x352c8d(0x208)]();if(_0x41f525==='SELF'||_0x41f525===_0x352c8d(0x220)){const _0x5ea09e=_0x27a126[_0x352c8d(0x203)](_0xebb36b=>_0xebb36b['roleType']===_0x41f525);if(!_0x5ea09e)throw CliErrors[_0x352c8d(0x1ea)](_0x352c8d(0x1e1)+_0x41f525+_0x352c8d(0x1ff));return _0x5ea09e;}if(/^-?\d+$/['test'](_0x4ce5aa)){const _0x5e65d2=Number(_0x4ce5aa),_0x2f02ac=_0x27a126[_0x352c8d(0x203)](_0x486bd5=>_0x486bd5['id']===_0x5e65d2);if(!_0x2f02ac)throw CliErrors['validation'](_0x352c8d(0x20d)+_0x5e65d2+_0x352c8d(0x22f),_0x352c8d(0x1f4));return _0x2f02ac;}const _0x1d3d18=_0x27a126['filter'](_0x28eac5=>_0x28eac5[_0x352c8d(0x235)]===_0x4ce5aa);if(_0x1d3d18['length']===0x0)throw CliErrors[_0x352c8d(0x1ea)]('Role\x20\x22'+_0x4ce5aa+_0x352c8d(0x226),_0x352c8d(0x218));if(_0x1d3d18[_0x352c8d(0x223)]>0x1)throw CliErrors[_0x352c8d(0x1ea)](_0x352c8d(0x234)+_0x4ce5aa+_0x352c8d(0x1e5)+_0x1d3d18[_0x352c8d(0x20c)](_0x44cf09=>_0x44cf09['id'])['join'](',\x20')+').',_0x352c8d(0x21b));return _0x1d3d18[0x0];}function a151_0x33f6(_0x16f0f3,_0x47d4cf){_0x16f0f3=_0x16f0f3-0x1df;const _0x405f46=a151_0x405f();let _0x33f6c5=_0x405f46[_0x16f0f3];return _0x33f6c5;}export function projectPageSlot(_0x12633f){const _0x42cc4c=a151_0x5ace85;if(!_0x12633f)return null;return{'resourceCode':_0x12633f[_0x42cc4c(0x20a)],'roles':(_0x12633f[_0x42cc4c(0x213)]??[])[_0x42cc4c(0x20c)](projectRoleRef)};}export function projectPagePermit(_0x499c45){const _0x5d5bc2=a151_0x5ace85,_0xf03c49={'menuId':_0x499c45[_0x5d5bc2(0x228)],'appCode':_0x499c45['appCode'],'menuPermit':projectPageSlot(_0x499c45['menuPermit'])};for(const _0x36cdbe of PAGE_SLOT_SPECS){if(_0x36cdbe['key']===_0x5d5bc2(0x204))continue;_0xf03c49[_0x36cdbe['key']]=projectPageSlot(_0x499c45[_0x36cdbe['key']]);}return _0xf03c49;}export function flattenMenuResources(_0x436aa1){const _0xb49a81=new Map(),_0x5e0cb8=_0x58e716=>{const _0x2aea77=a151_0x33f6;for(const _0x345c47 of _0x58e716??[]){_0xb49a81[_0x2aea77(0x214)](_0x345c47[_0x2aea77(0x20a)],{'resourceCode':_0x345c47[_0x2aea77(0x20a)],'resourceName':_0x345c47[_0x2aea77(0x1f7)],'action':_0x345c47[_0x2aea77(0x1e3)]?.[0x0]??'0'});if(_0x345c47[_0x2aea77(0x1f6)])_0x5e0cb8(_0x345c47[_0x2aea77(0x1f6)]);}};return _0x5e0cb8(_0x436aa1),_0xb49a81;}export function flattenApiResources(_0x4fcddc){const _0x48f913=a151_0x5ace85,_0x2ca96f=new Map(),_0x16c432=new Map();for(const _0x391a61 of _0x4fcddc){const _0x4afae2=_0x391a61['apiList']??{};for(const [_0x2b5a45,_0x3428e4]of Object[_0x48f913(0x206)](_0x4afae2)){_0x2ca96f['set'](_0x2b5a45,{'resourceCode':_0x2b5a45,'resourceName':_0x391a61[_0x48f913(0x1f7)],'datasetCode':_0x391a61['datasetCode'],'action':_0x3428e4?.[0x0]??'0'});const _0x2fb5ab=_0x16c432[_0x48f913(0x230)](_0x391a61[_0x48f913(0x221)])??[];_0x2fb5ab[_0x48f913(0x215)](_0x2b5a45),_0x16c432[_0x48f913(0x214)](_0x391a61[_0x48f913(0x221)],_0x2fb5ab);}}return{'byCode':_0x2ca96f,'byDataset':_0x16c432};}export function buildPermits(_0x4ce975,_0x3edde6){const _0x59950=a151_0x5ace85,_0x2e3bac={};for(const [_0x55e285,_0x3d4ec2]of _0x4ce975){const _0x4140d5=_0x3edde6[_0x59950(0x230)](_0x55e285)??_0x3d4ec2[_0x59950(0x227)];_0x2e3bac[_0x55e285]=[_0x4140d5];}return _0x2e3bac;}export function readRoleRef(_0x48f681){const _0x2a6433=a151_0x5ace85,_0x3ad985=_0x48f681['str'](_0x2a6433(0x20e))[_0x2a6433(0x21d)]();if(!_0x3ad985)throw CliErrors[_0x2a6433(0x237)](_0x2a6433(0x20e),_0x2a6433(0x1f8));return _0x3ad985;}export function readGrantRevoke(_0x407076){const _0x343b31=a151_0x5ace85,_0x2e2bff=_0x407076['bool'](_0x343b31(0x231)),_0x3a934d=_0x407076[_0x343b31(0x207)]('revoke');if(_0x2e2bff&&_0x3a934d)throw CliErrors[_0x343b31(0x1ea)]('--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.');if(!_0x2e2bff&&!_0x3a934d)throw CliErrors[_0x343b31(0x1ea)](_0x343b31(0x1e8),_0x343b31(0x1fe));return _0x2e2bff?_0x343b31(0x232):'0';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fcb32,_0x332529){const _0x30f48b=a152_0x5d3f,_0x7260cf=_0x2fcb32();while(!![]){try{const _0x34e8af=parseInt(_0x30f48b(0xc5))/0x1*(-parseInt(_0x30f48b(0xc1))/0x2)+parseInt(_0x30f48b(0xdb))/0x3*(-parseInt(_0x30f48b(0xcf))/0x4)+parseInt(_0x30f48b(0xc9))/0x5+-parseInt(_0x30f48b(0xbd))/0x6+-parseInt(_0x30f48b(0xd7))/0x7*(parseInt(_0x30f48b(0xdc))/0x8)+parseInt(_0x30f48b(0xca))/0x9*(-parseInt(_0x30f48b(0xd4))/0xa)+parseInt(_0x30f48b(0xd2))/0xb;if(_0x34e8af===_0x332529)break;else _0x7260cf['push'](_0x7260cf['shift']());}catch(_0x39a4b4){_0x7260cf['push'](_0x7260cf['shift']());}}}(a152_0x25ca,0xa3d99));import{existsSync}from'node:fs';function a152_0x5d3f(_0x50a831,_0x348005){_0x50a831=_0x50a831-0xbd;const _0x25cab1=a152_0x25ca();let _0x5d3fc0=_0x25cab1[_0x50a831];return _0x5d3fc0;}import a152_0x2c3817 from'node:path';import a152_0x14b680 from'chalk';import{input,confirm}from'@inquirer/prompts';function a152_0x25ca(){const _0x11e740=['Not\x20set','4OqUmcD','Logged\x20in','test','27236847iHAzSH','log','3640FlhVUH','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','string','2067877fDlgQs','√\x20Login\x20status:\x20','my-app','resolve','1171119juMJJR','8rtuFoI','1343988yodqWa','Project\x20name\x20cannot\x20exceed\x2050\x20characters','env','Project\x20name:','484MDsTLQ','Directory\x20\x22','cyan','cwd','2951BsurbN','√\x20Project\x20Name:\x20','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','green','4061660ACyQHk','24561dGJCtC','production','\x22\x20already\x20exists','√\x20App\x20Code:\x20'];a152_0x25ca=function(){return _0x11e740;};return a152_0x25ca();}import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x1f25a5,_0xe09957,_0x3a21c0){const _0x3ba432=a152_0x5d3f,_0x1228bb=_0x3ba432(0xd9),_0x2aab83=readConfig(),_0x4fe431=typeof _0x2aab83[_0x3ba432(0xbf)]===_0x3ba432(0xd6)?_0x2aab83[_0x3ba432(0xbf)]:undefined,_0x568f9a=await input({'message':_0x3ba432(0xc0),'default':_0x1228bb,'validate':_0x5855c5=>{const _0x21f625=_0x3ba432,_0xc06f7b=_0x5855c5['trim']()||_0x1228bb;if(_0xc06f7b['length']>0x32)return _0x21f625(0xbe);const _0x594356=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0xc06f7b&&!_0x594356[_0x21f625(0xd1)](_0xc06f7b))return _0x21f625(0xc7);const _0x42f793=a152_0x2c3817[_0x21f625(0xda)](process[_0x21f625(0xc4)](),_0xc06f7b);if(existsSync(_0x42f793))return _0x21f625(0xc2)+_0xc06f7b+_0x21f625(0xcc);return!![];}});console[_0x3ba432(0xd3)](a152_0x14b680[_0x3ba432(0xc8)](_0x3ba432(0xc6)+a152_0x14b680[_0x3ba432(0xc3)](_0x568f9a)));const _0x26d741=await selectSingleAppcode(_0x3a21c0);console['log'](a152_0x14b680[_0x3ba432(0xc8)](_0x3ba432(0xcd)+a152_0x14b680[_0x3ba432(0xc3)](_0x26d741||_0x3ba432(0xce))));if(_0x26d741){const _0x22e384=await getIsSessionValid();if(!_0x22e384){const _0x11f4d6=await confirm({'message':_0x3ba432(0xd5),'default':!![]});if(_0x11f4d6){const _0x10a04c=await authServer({'silent':!![]});console[_0x3ba432(0xd3)](a152_0x14b680[_0x3ba432(0xc8)](_0x3ba432(0xd8)+a152_0x14b680[_0x3ba432(0xc3)](_0x10a04c?_0x3ba432(0xd0):'Login\x20failed')));}else console['log'](a152_0x14b680[_0x3ba432(0xc8)](_0x3ba432(0xd8)+a152_0x14b680[_0x3ba432(0xc3)]('Skipped')));}await _0x1f25a5({'projectName':_0x568f9a,'appCode':_0x26d741,'env':_0xe09957||_0x4fe431||_0x3ba432(0xcb)});}else await _0x1f25a5({'projectName':_0x568f9a,'env':_0xe09957||_0x4fe431||_0x3ba432(0xcb)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a153_0x1a24(){const _0x15bd55=['toFixed','2026bWYfeu','1387245uSgRSB','275376RAuZRz','850772AmybJZ','57659YlelXH','66YlSPYu','replace','550592TqSaEF','583790HflGEm','now','59CpGgol','36TaeqFn'];a153_0x1a24=function(){return _0x15bd55;};return a153_0x1a24();}(function(_0x960799,_0x583d9d){const _0x3a3c98=a153_0x22cb,_0x5b6be6=_0x960799();while(!![]){try{const _0x17332d=parseInt(_0x3a3c98(0x116))/0x1*(-parseInt(_0x3a3c98(0x10c))/0x2)+-parseInt(_0x3a3c98(0x10e))/0x3+-parseInt(_0x3a3c98(0x10f))/0x4+parseInt(_0x3a3c98(0x10d))/0x5+parseInt(_0x3a3c98(0x111))/0x6*(parseInt(_0x3a3c98(0x110))/0x7)+-parseInt(_0x3a3c98(0x113))/0x8+parseInt(_0x3a3c98(0x10a))/0x9*(parseInt(_0x3a3c98(0x114))/0xa);if(_0x17332d===_0x583d9d)break;else _0x5b6be6['push'](_0x5b6be6['shift']());}catch(_0xd34cea){_0x5b6be6['push'](_0x5b6be6['shift']());}}}(a153_0x1a24,0x29230));function a153_0x22cb(_0x144d8f,_0x16ca5f){_0x144d8f=_0x144d8f-0x10a;const _0x1a2486=a153_0x1a24();let _0x22cbdf=_0x1a2486[_0x144d8f];return _0x22cbdf;}export function formatElapsed(_0x1437bb){const _0x8f0588=a153_0x22cb,_0x47eb33=Date[_0x8f0588(0x115)]()-_0x1437bb;if(_0x47eb33<0x3e8)return _0x47eb33+'ms';const _0x40505d=(_0x47eb33/0x3e8)[_0x8f0588(0x10b)](0x2),_0xf916be=_0x40505d[_0x8f0588(0x112)](/\.?0+$/u,'');return _0xf916be+'s';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x489807,_0x8ade53){const _0x9f8fa5=a154_0x31f7,_0x324de0=_0x489807();while(!![]){try{const _0x3ca3f6=parseInt(_0x9f8fa5(0x10a))/0x1+-parseInt(_0x9f8fa5(0xf5))/0x2+-parseInt(_0x9f8fa5(0x111))/0x3*(parseInt(_0x9f8fa5(0x10b))/0x4)+parseInt(_0x9f8fa5(0xe2))/0x5*(-parseInt(_0x9f8fa5(0xea))/0x6)+-parseInt(_0x9f8fa5(0x11b))/0x7+-parseInt(_0x9f8fa5(0x108))/0x8+parseInt(_0x9f8fa5(0xd4))/0x9;if(_0x3ca3f6===_0x8ade53)break;else _0x324de0['push'](_0x324de0['shift']());}catch(_0x41da1d){_0x324de0['push'](_0x324de0['shift']());}}}(a154_0x5333,0x79eb3));import a154_0x1c4608 from'path';import a154_0x4c40ce from'fs';import a154_0x23c5ea from'chalk';import a154_0x3e6580 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';function a154_0x31f7(_0x54d93e,_0x4b4f3a){_0x54d93e=_0x54d93e-0xc5;const _0x533362=a154_0x5333();let _0x31f731=_0x533362[_0x54d93e];return _0x31f731;}import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';function a154_0x5333(){const _0x7417c8=['stringify','repeat','\x20|\x20Default:\x20','projectCode','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','6CKcWjO','Project\x20directory\x20','Project\x20name\x20cannot\x20be\x20empty','1.0.0','cwd','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','...','配置应用AppCode失败','error','env','readFileSync','1582656qfAWYx','\x20run\x20start','\x20model(s)','writeFileSync','\x20√\x20','join','utf8','CLI\x20版本检查','*\x20Pulling\x20API\x20configuration...','toLocaleString','chdir','version','needsUpgrade','green','appCode','Install\x20dependencies','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','production','bold','645816FRJVzv','apps','522368HyDViS','201844KAfqsx','package.json','keys','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','\x20|\x20AppCode:\x20','cyan','3PZjrgy','\x20api\x20pull','API\x20配置拉取异常','\x20already\x20exists','success','log','create','项目创建完成:\x20','stop','warn','5646648kLWCNp','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','项目创建失败:\x20','dirname','更新\x20package.json\x20name','description','setLogPath','start','🚀\x20Next\x20Steps:','Format\x20code','string','message','\x20Generated\x20by\x20rabetbase\x20cli\x20','\x20dataset(s),\x20generated\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','existsSync','16688340zoBlWx','modelCount','parse','projectName','更新\x20package.json\x20失败','√\x20Configuration\x20file\x20created,\x20Apps:\x20','currentVersion','\x20config\x20set\x20appcode\x20<app-code>\x27','cookie','*\x20Configuring\x20AppCode\x20for\x20project\x20','resolve','belowMinimum','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','info','740345LXxWeI','length','配置应用AppCode:\x20'];a154_0x5333=function(){return _0x7417c8;};return a154_0x5333();}import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0xc1f49b){const _0x1a4736=a154_0x31f7,_0x4dcf6e=await checkCliVersion();(_0x4dcf6e[_0x1a4736(0x101)]||_0x4dcf6e['belowMinimum'])&&(printCliUpgradeWarning(_0x4dcf6e),assertCliVersionSupported(_0x4dcf6e),logger['info'](_0x1a4736(0x117),_0x1a4736(0xfc),{'currentVersion':_0x4dcf6e[_0x1a4736(0xda)],'stableVersion':_0x4dcf6e['stableVersion'],'minimumVersion':_0x4dcf6e['minimumVersion'],'needsUpgrade':_0x4dcf6e[_0x1a4736(0x101)],'belowMinimum':_0x4dcf6e[_0x1a4736(0xdf)]}));if(_0xc1f49b[_0x1a4736(0xe8)]&&_0xc1f49b['appCode'])await runCreate({'projectName':_0xc1f49b['projectCode'],'appCode':_0xc1f49b[_0x1a4736(0x103)],'env':_0xc1f49b[_0x1a4736(0xf3)]},_0xc1f49b);else{if(_0xc1f49b[_0x1a4736(0xe8)]){const _0x208a8c=await selectSingleAppcode(_0xc1f49b[_0x1a4736(0xdc)]);await runCreate({'projectName':_0xc1f49b['projectCode'],'appCode':_0x208a8c||undefined,'env':_0xc1f49b[_0x1a4736(0xf3)]},_0xc1f49b);}else await guidedCreateProject(_0x2f7b14=>runCreate(_0x2f7b14,_0xc1f49b),_0xc1f49b[_0x1a4736(0xf3)],_0xc1f49b[_0x1a4736(0xdc)]);}}async function runCreate(_0x1388fe,_0x1f9fe5){const _0x4cb3e0=a154_0x31f7;if(!_0x1388fe[_0x4cb3e0(0xd7)]||_0x1388fe[_0x4cb3e0(0xd7)]['trim']()==='')throw new Error(_0x4cb3e0(0xec));const _0x5d558a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5d558a['test'](_0x1388fe[_0x4cb3e0(0xd7)]))throw new Error(_0x4cb3e0(0xd2));if(_0x1388fe[_0x4cb3e0(0xd7)][_0x4cb3e0(0xe3)]>0x64)throw new Error(_0x4cb3e0(0xef));const _0x1e1aef=a154_0x1c4608[_0x4cb3e0(0xde)](process['cwd'](),_0x1388fe[_0x4cb3e0(0xd7)]);if(a154_0x4c40ce[_0x4cb3e0(0xd3)](_0x1e1aef))throw new Error(_0x4cb3e0(0xeb)+_0x1388fe[_0x4cb3e0(0xd7)]+_0x4cb3e0(0x114));try{a154_0x4c40ce['accessSync'](a154_0x1c4608[_0x4cb3e0(0xc6)](_0x1e1aef),a154_0x4c40ce['constants']['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x4cb3e0(0xc9)](_0x1e1aef),logger[_0x4cb3e0(0xe1)](_0x4cb3e0(0x117),'开始创建项目:\x20'+_0x1388fe[_0x4cb3e0(0xd7)],{'projectDir':_0x1e1aef,'appCode':_0x1388fe['appCode']}),console[_0x4cb3e0(0x116)](),console['log'](a154_0x23c5ea[_0x4cb3e0(0x102)](_0x4cb3e0(0xf9))+'Project\x20name:\x20'+a154_0x23c5ea[_0x4cb3e0(0x102)](_0x1388fe[_0x4cb3e0(0xd7)])+(_0x1388fe[_0x4cb3e0(0x103)]?_0x4cb3e0(0x10f)+a154_0x23c5ea[_0x4cb3e0(0x110)](_0x1388fe['appCode']):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x1388fe[_0x4cb3e0(0xd7)])),await updatePackageJsonName(_0x1388fe[_0x4cb3e0(0xd7)]),await runTask(_0x4cb3e0(0x104),()=>installDependencies(_0x1388fe['projectName'])),await runTask(_0x4cb3e0(0xcc),()=>formatProjectCode(_0x1388fe[_0x4cb3e0(0xd7)])),await configureAppCode(_0x1388fe['projectName'],_0x1388fe[_0x4cb3e0(0x103)]||'',_0x1388fe[_0x4cb3e0(0xf3)]);let _0x46870e=![];if(_0x1388fe['appCode']){console['log'](_0x4cb3e0(0xfd));const _0x4d2345=process[_0x4cb3e0(0xee)]();try{process['chdir'](_0x1e1aef);const _0x33c793=_0x1388fe[_0x4cb3e0(0xf3)]||_0x4cb3e0(0x106);initEnv(_0x33c793);const {configArray:_0x4d2235}=await fetchModelList(_0x1388fe[_0x4cb3e0(0x103)],_0x1f9fe5[_0x4cb3e0(0xdc)]||''),_0x2cc289=DEFAULT_API_DIR,_0x226ea3=await generateApiFile(_0x4d2235,'',_0x1388fe[_0x4cb3e0(0x103)],!![],_0x33c793,_0x2cc289);console[_0x4cb3e0(0x116)]('√\x20Pulled\x20'+_0x4d2235[_0x4cb3e0(0xe3)]+_0x4cb3e0(0xd0)+_0x226ea3[_0x4cb3e0(0xd5)]+_0x4cb3e0(0xf7)),logger[_0x4cb3e0(0xe1)]('create','API\x20configuration\x20pulled:\x20'+_0x1388fe[_0x4cb3e0(0x103)]);}catch(_0x2e3af4){_0x46870e=!![],console[_0x4cb3e0(0x116)](_0x4cb3e0(0xe9)),logger[_0x4cb3e0(0x11a)](_0x4cb3e0(0x117),_0x4cb3e0(0x113),{'error':_0x2e3af4 instanceof Error?_0x2e3af4[_0x4cb3e0(0xce)]:String(_0x2e3af4)});}finally{process[_0x4cb3e0(0xff)](_0x4d2345);}}logger[_0x4cb3e0(0x115)](_0x4cb3e0(0x117),_0x4cb3e0(0x118)+_0x1388fe[_0x4cb3e0(0xd7)]),console[_0x4cb3e0(0x116)](),console[_0x4cb3e0(0x116)](a154_0x23c5ea['green']('─'[_0x4cb3e0(0xe6)](0x3c))),console[_0x4cb3e0(0x116)](a154_0x23c5ea[_0x4cb3e0(0x110)][_0x4cb3e0(0x107)](_0x4cb3e0(0xcb))),console[_0x4cb3e0(0x116)](),console[_0x4cb3e0(0x116)]('\x20\x201.\x20Start\x20project:\x20'+a154_0x23c5ea['cyan'][_0x4cb3e0(0x107)]('cd\x20'+_0x1388fe[_0x4cb3e0(0xd7)]+'\x20&&\x20'+CLI_BIN_NAME+_0x4cb3e0(0xf6))),_0x46870e&&console[_0x4cb3e0(0x116)](_0x4cb3e0(0xd1)+a154_0x23c5ea[_0x4cb3e0(0x110)][_0x4cb3e0(0x107)](CLI_BIN_NAME+_0x4cb3e0(0x112))),console[_0x4cb3e0(0x116)](a154_0x23c5ea[_0x4cb3e0(0x102)]('─'[_0x4cb3e0(0xe6)](0x3c)));}catch(_0x4b40e7){logger[_0x4cb3e0(0xf2)](_0x4cb3e0(0x117),_0x4cb3e0(0xc5)+_0x1388fe['projectName'],{'error':_0x4b40e7 instanceof Error?_0x4b40e7[_0x4cb3e0(0xce)]:String(_0x4b40e7)});try{a154_0x4c40ce['existsSync'](_0x1e1aef)&&(console[_0x4cb3e0(0x116)](_0x4cb3e0(0x105)+_0x1e1aef),a154_0x4c40ce['rmSync'](_0x1e1aef,{'recursive':!![],'force':!![]}));}catch{logger[_0x4cb3e0(0x11a)](_0x4cb3e0(0x117),'清理项目目录失败:\x20'+_0x1e1aef);}throw _0x4b40e7;}}async function runTask(_0x1fa2d6,_0x58d33f){const _0x5b9aa2=a154_0x31f7,_0x21827d=a154_0x3e6580(_0x1fa2d6+_0x5b9aa2(0xf0))[_0x5b9aa2(0xca)]();try{const _0x4ccd21=await _0x58d33f();_0x21827d[_0x5b9aa2(0x119)](),console['log'](''+a154_0x23c5ea[_0x5b9aa2(0x102)]('\x20√\x20')+_0x1fa2d6+'\x20'+a154_0x23c5ea['gray']('['+_0x4ccd21+']'));}catch(_0x20a9a5){_0x21827d['fail'](_0x1fa2d6);throw _0x20a9a5;}}async function updatePackageJsonName(_0x23ed8a){const _0x22e138=a154_0x31f7,_0x23b9c8=a154_0x1c4608[_0x22e138(0xde)](process[_0x22e138(0xee)](),_0x23ed8a),_0x349a56=a154_0x1c4608[_0x22e138(0xfa)](_0x23b9c8,_0x22e138(0x10c));try{console[_0x22e138(0x116)](_0x22e138(0x11c));const _0x139d03=getRabetbaseCliPackageRoot(),_0x4cf360=a154_0x1c4608[_0x22e138(0xfa)](_0x139d03,_0x22e138(0x10c));let _0x287f24=_0x22e138(0xed);try{const _0x1bac1f=JSON['parse'](a154_0x4c40ce[_0x22e138(0xf4)](_0x4cf360,'utf8'));_0x287f24=_0x1bac1f[_0x22e138(0x100)]||'1.0.0';}catch{}const _0x328762=a154_0x4c40ce[_0x22e138(0xf4)](_0x349a56,_0x22e138(0xfb)),_0x2783ab=JSON[_0x22e138(0xd6)](_0x328762);_0x2783ab['name']=_0x23ed8a,_0x2783ab[_0x22e138(0xc8)]=_0x23ed8a+_0x22e138(0xcf)+_0x287f24,a154_0x4c40ce[_0x22e138(0xf8)](_0x349a56,JSON[_0x22e138(0xe5)](_0x2783ab,null,0x2)+'\x0a',_0x22e138(0xfb)),console[_0x22e138(0x116)]('√\x20package.json\x20updated:\x20name='+_0x23ed8a),logger[_0x22e138(0xe1)]('create',_0x22e138(0xc7));}catch(_0x193d5a){logger[_0x22e138(0xf2)](_0x22e138(0x117),_0x22e138(0xd8));throw _0x193d5a;}}async function configureAppCode(_0x251052,_0x29ec47,_0x1a5b52){const _0x4dff74=a154_0x31f7,_0x3ecb12=a154_0x1c4608['resolve'](process[_0x4dff74(0xee)](),_0x251052),_0x3d7749=a154_0x1c4608[_0x4dff74(0xfa)](_0x3ecb12,NEW_CONFIG_NAME);try{_0x29ec47?console[_0x4dff74(0x116)](_0x4dff74(0xdd)+_0x251052+':\x20'+_0x29ec47):console['log'](_0x4dff74(0xe0)+_0x251052);const _0x23dfc3=getRabetbaseCliPackageRoot(),_0x4bca39=a154_0x1c4608['join'](_0x23dfc3,_0x4dff74(0x10c));let _0x13e953=_0x4dff74(0xed);try{const _0x1def39=JSON[_0x4dff74(0xd6)](a154_0x4c40ce[_0x4dff74(0xf4)](_0x4bca39,_0x4dff74(0xfb)));_0x13e953=_0x1def39[_0x4dff74(0x100)]||_0x4dff74(0xed);}catch{}const _0x101f37=readConfig(),_0x5c3bf2=typeof _0x101f37['env']===_0x4dff74(0xcd)?_0x101f37[_0x4dff74(0xf3)]:undefined,_0x19d9fd={};for(const _0x45a067 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x101f37[_0x45a067]!=null)_0x19d9fd[_0x45a067]=_0x101f37[_0x45a067];}const _0x2eaa75=buildCanonicalProjectConfig(_0x19d9fd,{'appCodes':_0x29ec47?[_0x29ec47]:[],'env':_0x1a5b52||_0x5c3bf2||_0x4dff74(0x106),'metadata':{'createdAt':new Date()[_0x4dff74(0xfe)](),'version':_0x13e953}});writeConfigFile(_0x3d7749,_0x2eaa75),_0x29ec47?console['log'](_0x4dff74(0xd9)+Object[_0x4dff74(0x10d)](_0x2eaa75[_0x4dff74(0x109)]||{})[_0x4dff74(0xfa)](',\x20')+_0x4dff74(0xe7)+_0x2eaa75['defaultApp']):console[_0x4dff74(0x116)](_0x4dff74(0x10e)+CLI_BIN_NAME+_0x4dff74(0xdb)),logger['info'](_0x4dff74(0x117),_0x4dff74(0xe4)+_0x29ec47);}catch(_0xc9835f){logger['error'](_0x4dff74(0x117),_0x4dff74(0xf1));}}
|
|
1
|
+
function a154_0x3ce1(){const _0x67b658=['gray','√\x20Pulled\x20','434344eDjLAC','description','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20√\x20','length','\x20\x201.\x20Start\x20project:\x20','env','*\x20Configuring\x20AppCode\x20for\x20project\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','更新\x20package.json\x20name','projectName','package.json','Install\x20dependencies','36DGsjqA','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','项目创建失败:\x20','constants','test','currentVersion','清理项目目录失败:\x20','Project\x20name:\x20','API\x20配置拉取异常','error','stringify','配置应用AppCode:\x20','stableVersion','\x20|\x20AppCode:\x20','\x20run\x20start','Project\x20name\x20cannot\x20be\x20empty','stop','readFileSync','utf8','204ikIfWL','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','\x20&&\x20','fail','message','appCode','minimumVersion','cookie','\x20Generated\x20by\x20rabetbase\x20cli\x20','accessSync','bold','production','cyan','71810KMCToB','1.0.0','version','repeat','green','chdir','setLogPath','name','132DVWLPz','\x20config\x20set\x20appcode\x20<app-code>\x27','log','配置应用AppCode失败','keys','rmSync','\x20|\x20Default:\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','existsSync','27792yQKfMT','defaultApp','\x20model(s)','info','开始创建项目:\x20','string','join','projectCode','W_OK','\x20api\x20pull','resolve','更新\x20package.json\x20失败','writeFileSync','parse','...','cwd','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','apps','warn','436316CXzPrU','create','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','\x20dataset(s),\x20generated\x20','Project\x20directory\x20','API\x20configuration\x20pulled:\x20','needsUpgrade','√\x20Configuration\x20file\x20created,\x20Apps:\x20','belowMinimum','6930450MSwKUb','\x20\x202.\x20Pull\x20API\x20configuration:\x20','145924bmsVKG','227668LfQHxr'];a154_0x3ce1=function(){return _0x67b658;};return a154_0x3ce1();}(function(_0x47b7fb,_0x2f6269){const _0xe5d29b=a154_0x2e91,_0x2db588=_0x47b7fb();while(!![]){try{const _0x3e637a=-parseInt(_0xe5d29b(0x1f6))/0x1+parseInt(_0xe5d29b(0x243))/0x2*(-parseInt(_0xe5d29b(0x23a))/0x3)+parseInt(_0xe5d29b(0x201))/0x4+-parseInt(_0xe5d29b(0x232))/0x5*(-parseInt(_0xe5d29b(0x225))/0x6)+-parseInt(_0xe5d29b(0x202))/0x7+-parseInt(_0xe5d29b(0x205))/0x8*(-parseInt(_0xe5d29b(0x212))/0x9)+parseInt(_0xe5d29b(0x1ff))/0xa;if(_0x3e637a===_0x2f6269)break;else _0x2db588['push'](_0x2db588['shift']());}catch(_0x2d1538){_0x2db588['push'](_0x2db588['shift']());}}}(a154_0x3ce1,0x569b6));import a154_0x17b4b0 from'path';import a154_0x30fc83 from'fs';import a154_0x170465 from'chalk';import a154_0x3aee1a from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x238e07){const _0xe37168=a154_0x2e91,_0x37ec32=await checkCliVersion();(_0x37ec32['needsUpgrade']||_0x37ec32[_0xe37168(0x1fe)])&&(printCliUpgradeWarning(_0x37ec32),assertCliVersionSupported(_0x37ec32),logger[_0xe37168(0x246)](_0xe37168(0x1f7),'CLI\x20版本检查',{'currentVersion':_0x37ec32[_0xe37168(0x217)],'stableVersion':_0x37ec32[_0xe37168(0x21e)],'minimumVersion':_0x37ec32[_0xe37168(0x22b)],'needsUpgrade':_0x37ec32[_0xe37168(0x1fc)],'belowMinimum':_0x37ec32[_0xe37168(0x1fe)]}));if(_0x238e07[_0xe37168(0x24a)]&&_0x238e07[_0xe37168(0x22a)])await runCreate({'projectName':_0x238e07[_0xe37168(0x24a)],'appCode':_0x238e07['appCode'],'env':_0x238e07[_0xe37168(0x20b)]},_0x238e07);else{if(_0x238e07[_0xe37168(0x24a)]){const _0x2c4a35=await selectSingleAppcode(_0x238e07[_0xe37168(0x22c)]);await runCreate({'projectName':_0x238e07[_0xe37168(0x24a)],'appCode':_0x2c4a35||undefined,'env':_0x238e07[_0xe37168(0x20b)]},_0x238e07);}else await guidedCreateProject(_0x45c4ce=>runCreate(_0x45c4ce,_0x238e07),_0x238e07[_0xe37168(0x20b)],_0x238e07['cookie']);}}async function runCreate(_0x45d06f,_0x4bedaf){const _0x34c8be=a154_0x2e91;if(!_0x45d06f[_0x34c8be(0x20f)]||_0x45d06f[_0x34c8be(0x20f)]['trim']()==='')throw new Error(_0x34c8be(0x221));const _0x2f48c9=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2f48c9[_0x34c8be(0x216)](_0x45d06f[_0x34c8be(0x20f)]))throw new Error(_0x34c8be(0x213));if(_0x45d06f[_0x34c8be(0x20f)][_0x34c8be(0x209)]>0x64)throw new Error(_0x34c8be(0x1f8));const _0x31ce65=a154_0x17b4b0['resolve'](process[_0x34c8be(0x1f2)](),_0x45d06f[_0x34c8be(0x20f)]);if(a154_0x30fc83['existsSync'](_0x31ce65))throw new Error(_0x34c8be(0x1fa)+_0x45d06f['projectName']+'\x20already\x20exists');try{a154_0x30fc83[_0x34c8be(0x22e)](a154_0x17b4b0['dirname'](_0x31ce65),a154_0x30fc83[_0x34c8be(0x215)][_0x34c8be(0x1eb)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x34c8be(0x238)](_0x31ce65),logger['info'](_0x34c8be(0x1f7),_0x34c8be(0x247)+_0x45d06f[_0x34c8be(0x20f)],{'projectDir':_0x31ce65,'appCode':_0x45d06f[_0x34c8be(0x22a)]}),console[_0x34c8be(0x23c)](),console[_0x34c8be(0x23c)](a154_0x170465['green'](_0x34c8be(0x208))+_0x34c8be(0x219)+a154_0x170465[_0x34c8be(0x236)](_0x45d06f[_0x34c8be(0x20f)])+(_0x45d06f[_0x34c8be(0x22a)]?_0x34c8be(0x21f)+a154_0x170465[_0x34c8be(0x231)](_0x45d06f[_0x34c8be(0x22a)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x45d06f['projectName'])),await updatePackageJsonName(_0x45d06f['projectName']),await runTask(_0x34c8be(0x211),()=>installDependencies(_0x45d06f[_0x34c8be(0x20f)])),await runTask('Format\x20code',()=>formatProjectCode(_0x45d06f[_0x34c8be(0x20f)])),await configureAppCode(_0x45d06f[_0x34c8be(0x20f)],_0x45d06f[_0x34c8be(0x22a)]||'',_0x45d06f['env']);let _0x6a82a9=![];if(_0x45d06f[_0x34c8be(0x22a)]){console['log']('*\x20Pulling\x20API\x20configuration...');const _0x428ea4=process[_0x34c8be(0x1f2)]();try{process[_0x34c8be(0x237)](_0x31ce65);const _0x2ae696=_0x45d06f[_0x34c8be(0x20b)]||_0x34c8be(0x230);initEnv(_0x2ae696);const {configArray:_0x10034b}=await fetchModelList(_0x45d06f[_0x34c8be(0x22a)],_0x4bedaf['cookie']||''),_0x3613bc=DEFAULT_API_DIR,_0x52fa79=await generateApiFile(_0x10034b,'',_0x45d06f[_0x34c8be(0x22a)],!![],_0x2ae696,_0x3613bc);console['log'](_0x34c8be(0x204)+_0x10034b[_0x34c8be(0x209)]+_0x34c8be(0x1f9)+_0x52fa79['modelCount']+_0x34c8be(0x245)),logger[_0x34c8be(0x246)](_0x34c8be(0x1f7),_0x34c8be(0x1fb)+_0x45d06f[_0x34c8be(0x22a)]);}catch(_0x23707c){_0x6a82a9=!![],console[_0x34c8be(0x23c)](_0x34c8be(0x207)),logger[_0x34c8be(0x1f5)](_0x34c8be(0x1f7),_0x34c8be(0x21a),{'error':_0x23707c instanceof Error?_0x23707c[_0x34c8be(0x229)]:String(_0x23707c)});}finally{process[_0x34c8be(0x237)](_0x428ea4);}}logger['success'](_0x34c8be(0x1f7),'项目创建完成:\x20'+_0x45d06f[_0x34c8be(0x20f)]),console['log'](),console['log'](a154_0x170465[_0x34c8be(0x236)]('─'[_0x34c8be(0x235)](0x3c))),console[_0x34c8be(0x23c)](a154_0x170465['cyan']['bold']('🚀\x20Next\x20Steps:')),console[_0x34c8be(0x23c)](),console['log'](_0x34c8be(0x20a)+a154_0x170465[_0x34c8be(0x231)][_0x34c8be(0x22f)]('cd\x20'+_0x45d06f[_0x34c8be(0x20f)]+_0x34c8be(0x227)+CLI_BIN_NAME+_0x34c8be(0x220))),_0x6a82a9&&console['log'](_0x34c8be(0x200)+a154_0x170465[_0x34c8be(0x231)][_0x34c8be(0x22f)](CLI_BIN_NAME+_0x34c8be(0x1ec))),console['log'](a154_0x170465['green']('─'[_0x34c8be(0x235)](0x3c)));}catch(_0x5eba62){logger[_0x34c8be(0x21b)]('create',_0x34c8be(0x214)+_0x45d06f[_0x34c8be(0x20f)],{'error':_0x5eba62 instanceof Error?_0x5eba62[_0x34c8be(0x229)]:String(_0x5eba62)});try{a154_0x30fc83[_0x34c8be(0x242)](_0x31ce65)&&(console['log'](_0x34c8be(0x241)+_0x31ce65),a154_0x30fc83[_0x34c8be(0x23f)](_0x31ce65,{'recursive':!![],'force':!![]}));}catch{logger[_0x34c8be(0x1f5)](_0x34c8be(0x1f7),_0x34c8be(0x218)+_0x31ce65);}throw _0x5eba62;}}async function runTask(_0x1dd5e6,_0x53f98c){const _0x460a17=a154_0x2e91,_0x4dd50a=a154_0x3aee1a(_0x1dd5e6+_0x460a17(0x1f1))['start']();try{const _0x289282=await _0x53f98c();_0x4dd50a[_0x460a17(0x222)](),console[_0x460a17(0x23c)](''+a154_0x170465['green'](_0x460a17(0x208))+_0x1dd5e6+'\x20'+a154_0x170465[_0x460a17(0x203)]('['+_0x289282+']'));}catch(_0x4275d5){_0x4dd50a[_0x460a17(0x228)](_0x1dd5e6);throw _0x4275d5;}}async function updatePackageJsonName(_0x207dfe){const _0xd01793=a154_0x2e91,_0x3c149e=a154_0x17b4b0['resolve'](process[_0xd01793(0x1f2)](),_0x207dfe),_0x40bfda=a154_0x17b4b0['join'](_0x3c149e,_0xd01793(0x210));try{console[_0xd01793(0x23c)](_0xd01793(0x226));const _0x268220=getRabetbaseCliPackageRoot(),_0x2f4c83=a154_0x17b4b0[_0xd01793(0x249)](_0x268220,_0xd01793(0x210));let _0x123f93=_0xd01793(0x233);try{const _0x547142=JSON[_0xd01793(0x1f0)](a154_0x30fc83[_0xd01793(0x223)](_0x2f4c83,'utf8'));_0x123f93=_0x547142[_0xd01793(0x234)]||_0xd01793(0x233);}catch{}const _0x163b39=a154_0x30fc83['readFileSync'](_0x40bfda,_0xd01793(0x224)),_0x1c4f2b=JSON[_0xd01793(0x1f0)](_0x163b39);_0x1c4f2b[_0xd01793(0x239)]=_0x207dfe,_0x1c4f2b[_0xd01793(0x206)]=_0x207dfe+_0xd01793(0x22d)+_0x123f93,a154_0x30fc83[_0xd01793(0x1ef)](_0x40bfda,JSON[_0xd01793(0x21c)](_0x1c4f2b,null,0x2)+'\x0a',_0xd01793(0x224)),console[_0xd01793(0x23c)]('√\x20package.json\x20updated:\x20name='+_0x207dfe),logger[_0xd01793(0x246)](_0xd01793(0x1f7),_0xd01793(0x20e));}catch(_0x119d04){logger[_0xd01793(0x21b)](_0xd01793(0x1f7),_0xd01793(0x1ee));throw _0x119d04;}}function a154_0x2e91(_0x977a97,_0x3563e5){_0x977a97=_0x977a97-0x1eb;const _0x3ce149=a154_0x3ce1();let _0x2e910d=_0x3ce149[_0x977a97];return _0x2e910d;}async function configureAppCode(_0x488642,_0x59598a,_0xec2f1f){const _0x231ebd=a154_0x2e91,_0x2c7ec4=a154_0x17b4b0[_0x231ebd(0x1ed)](process[_0x231ebd(0x1f2)](),_0x488642),_0xc621d6=a154_0x17b4b0[_0x231ebd(0x249)](_0x2c7ec4,NEW_CONFIG_NAME);try{_0x59598a?console[_0x231ebd(0x23c)](_0x231ebd(0x20c)+_0x488642+':\x20'+_0x59598a):console[_0x231ebd(0x23c)](_0x231ebd(0x20d)+_0x488642);const _0x2e8c19=getRabetbaseCliPackageRoot(),_0x1b3f50=a154_0x17b4b0[_0x231ebd(0x249)](_0x2e8c19,_0x231ebd(0x210));let _0x475cc0=_0x231ebd(0x233);try{const _0x5a8c10=JSON[_0x231ebd(0x1f0)](a154_0x30fc83['readFileSync'](_0x1b3f50,_0x231ebd(0x224)));_0x475cc0=_0x5a8c10['version']||_0x231ebd(0x233);}catch{}const _0x1aaa5b=readConfig(),_0x4ea3c9=typeof _0x1aaa5b['env']===_0x231ebd(0x248)?_0x1aaa5b[_0x231ebd(0x20b)]:undefined,_0x3641c2={};for(const _0x3d43e9 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1aaa5b[_0x3d43e9]!=null)_0x3641c2[_0x3d43e9]=_0x1aaa5b[_0x3d43e9];}const _0x1ecbf6=buildCanonicalProjectConfig(_0x3641c2,{'appCodes':_0x59598a?[_0x59598a]:[],'env':_0xec2f1f||_0x4ea3c9||_0x231ebd(0x230),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x475cc0}});writeConfigFile(_0xc621d6,_0x1ecbf6),_0x59598a?console[_0x231ebd(0x23c)](_0x231ebd(0x1fd)+Object[_0x231ebd(0x23e)](_0x1ecbf6[_0x231ebd(0x1f4)]||{})[_0x231ebd(0x249)](',\x20')+_0x231ebd(0x240)+_0x1ecbf6[_0x231ebd(0x244)]):console[_0x231ebd(0x23c)](_0x231ebd(0x1f3)+CLI_BIN_NAME+_0x231ebd(0x23b)),logger[_0x231ebd(0x246)](_0x231ebd(0x1f7),_0x231ebd(0x21d)+_0x59598a);}catch(_0x516512){logger[_0x231ebd(0x21b)](_0x231ebd(0x1f7),_0x231ebd(0x23d));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x133fad,_0x5ced96){const _0x2ea296=a155_0x2aab,_0x38da9d=_0x133fad();while(!![]){try{const _0x4661b7=-parseInt(_0x2ea296(0x9f))/0x1+parseInt(_0x2ea296(0x9d))/0x2*(-parseInt(_0x2ea296(0xad))/0x3)+parseInt(_0x2ea296(0xaa))/0x4+-parseInt(_0x2ea296(0x78))/0x5*(-parseInt(_0x2ea296(0xa1))/0x6)+-parseInt(_0x2ea296(0xa6))/0x7+parseInt(_0x2ea296(0x8c))/0x8*(-parseInt(_0x2ea296(0x98))/0x9)+-parseInt(_0x2ea296(0x77))/0xa*(-parseInt(_0x2ea296(0x7c))/0xb);if(_0x4661b7===_0x5ced96)break;else _0x38da9d['push'](_0x38da9d['shift']());}catch(_0x34588e){_0x38da9d['push'](_0x38da9d['shift']());}}}(a155_0x2739,0x84c51));import a155_0x3ba32b from'path';import a155_0x18131d from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';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 a155_0x2aab(_0x42fc82,_0x1c56f5){_0x42fc82=_0x42fc82-0x76;const _0x2739d5=a155_0x2739();let _0x2aabf2=_0x2739d5[_0x42fc82];return _0x2aabf2;}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);function a155_0x2739(){const _0x3b537a=['\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','\x0a\x20\x20cd\x20','\x20model(s)','trim','4TsjeUA','\x0a√\x20Project\x20','1010120IfUSph','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','344298YgqvzB','ignore','length','needsUpgrade','parse','2377487xKmujk','Project\x20name\x20cannot\x20be\x20empty.','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','modelCount','2955524lucPOx','env','toLocaleString','1075449POsFaS','dirname','6416170wtAoXb','85nnpHLL','\x20\x20√\x20Pulled\x20','writeFile','\x20\x20rabetbase\x20run\x20start\x0a','22JuiMBK','Check\x20directory\x20permissions.','test','chdir','*\x20Creating\x20project\x20','stringify','readFile','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20package.json\x20updated','name','\x20created\x20successfully!','\x22\x20already\x20exists.','Project\x20directory\x20\x22','string','join','cwd','15032emvccD','belowMinimum','Use\x20a\x20different\x20project\x20name.','validation','resolve','bun\x20--version','production','\x20\x20√\x20Project\x20template\x20created','npm','package.json','\x20\x20√\x20Configuration\x20file\x20created','log','1854jlVete'];a155_0x2739=function(){return _0x3b537a;};return a155_0x2739();}export async function createProjectNonInteractive(_0x2860b0,_0x1d9de1,_0x5b6402,_0x96acb1){const _0x502f08=a155_0x2aab,_0x561740=await checkCliVersion();(_0x561740[_0x502f08(0xa4)]||_0x561740[_0x502f08(0x8d)])&&(printCliUpgradeWarning(_0x561740),assertCliVersionSupported(_0x561740));if(!_0x2860b0||_0x2860b0[_0x502f08(0x9c)]()==='')throw CliErrors['validation'](_0x502f08(0xa7));const _0x5a8951=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5a8951[_0x502f08(0x7e)](_0x2860b0))throw CliErrors[_0x502f08(0x8f)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x2860b0[_0x502f08(0xa3)]>0x64)throw CliErrors[_0x502f08(0x8f)](_0x502f08(0xa8));const _0x2149ad=a155_0x3ba32b[_0x502f08(0x90)](process[_0x502f08(0x8b)](),_0x2860b0);if(existsSync(_0x2149ad))throw CliErrors['validation'](_0x502f08(0x88)+_0x2860b0+_0x502f08(0x87),_0x502f08(0x8e));try{const _0x491e80=a155_0x3ba32b[_0x502f08(0x76)](_0x2149ad);await a155_0x18131d['access'](_0x491e80,a155_0x18131d['constants']['W_OK']);}catch{throw CliErrors[_0x502f08(0x8f)](_0x502f08(0x83),_0x502f08(0x7d));}try{console[_0x502f08(0x97)](_0x502f08(0x80)+_0x2860b0+'...');const _0x32fd29=getSubAppReactDemoTemplateDir();await copyDirectory(_0x32fd29,_0x2149ad),console[_0x502f08(0x97)](_0x502f08(0x93)),await updatePackageJsonName(_0x2860b0),console['log'](_0x502f08(0x84)),console[_0x502f08(0x97)]('\x20\x20Installing\x20dependencies...'),console[_0x502f08(0x97)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x2149ad),console[_0x502f08(0x97)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x2860b0,_0x5b6402,_0x1d9de1),console[_0x502f08(0x97)](_0x502f08(0x96)),_0x5b6402&&await pullApiConfig(_0x2149ad,_0x5b6402,_0x1d9de1,_0x96acb1),console['log'](_0x502f08(0x9e)+_0x2860b0+_0x502f08(0x86)),console[_0x502f08(0x97)](_0x502f08(0x9a)+_0x2860b0),console[_0x502f08(0x97)](_0x502f08(0x7b));}catch(_0x471b46){try{existsSync(_0x2149ad)&&await a155_0x18131d['rm'](_0x2149ad,{'recursive':!![],'force':!![]});}catch{}throw _0x471b46;}}async function updatePackageJsonName(_0x51aafd){const _0x5acdb2=a155_0x2aab,_0x1e54aa=a155_0x3ba32b[_0x5acdb2(0x90)](process['cwd'](),_0x51aafd),_0x550728=a155_0x3ba32b['join'](_0x1e54aa,_0x5acdb2(0x95)),_0x148d00=await a155_0x18131d[_0x5acdb2(0x82)](_0x550728,'utf-8'),_0x35b8e7=JSON[_0x5acdb2(0xa5)](_0x148d00);_0x35b8e7[_0x5acdb2(0x85)]=_0x51aafd,_0x35b8e7['description']=_0x5acdb2(0xa0),await a155_0x18131d[_0x5acdb2(0x7a)](_0x550728,JSON[_0x5acdb2(0x81)](_0x35b8e7,null,0x2)+'\x0a');}function detectPackageManager(){const _0x4ddb30=a155_0x2aab;try{return execSync(_0x4ddb30(0x91),{'stdio':_0x4ddb30(0xa2)}),'bun';}catch{return _0x4ddb30(0x94);}}async function formatCode(_0x273617){try{await execAsync('bun\x20run\x20format',{'cwd':_0x273617});}catch{}}async function configureProject(_0x1ecef0,_0x48c6e5,_0x28e6a9){const _0x57dea6=a155_0x2aab,_0x1af53e=a155_0x3ba32b[_0x57dea6(0x90)](process[_0x57dea6(0x8b)](),_0x1ecef0),_0x48a855=a155_0x3ba32b[_0x57dea6(0x8a)](_0x1af53e,NEW_CONFIG_NAME),_0x10985b=readConfig(),_0x2b434b=typeof _0x10985b[_0x57dea6(0xab)]===_0x57dea6(0x89)?_0x10985b[_0x57dea6(0xab)]:undefined,_0x4cce23={};for(const _0x103dd3 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x10985b[_0x103dd3]!=null)_0x4cce23[_0x103dd3]=_0x10985b[_0x103dd3];}const _0x261e84=buildCanonicalProjectConfig(_0x4cce23,{'appCodes':_0x48c6e5?[_0x48c6e5]:[],'env':_0x28e6a9||_0x2b434b||_0x57dea6(0x92),'metadata':{'createdAt':new Date()[_0x57dea6(0xac)](),'version':getCliVersion()}});writeConfigFile(_0x48a855,_0x261e84);}async function pullApiConfig(_0x4cff96,_0x5197ba,_0x6a64bd,_0x4c61ed){const _0xd3c5fc=a155_0x2aab,_0x26630e=process[_0xd3c5fc(0x8b)]();try{process[_0xd3c5fc(0x7f)](_0x4cff96);const _0x5ea57f=_0x6a64bd||_0xd3c5fc(0x92);initEnv(_0x5ea57f),console[_0xd3c5fc(0x97)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x198dc6}=await fetchModelList(_0x5197ba,_0x4c61ed||''),_0x35f86d=await generateApiFile(_0x198dc6,'',_0x5197ba,!![],_0x5ea57f,DEFAULT_API_DIR);console[_0xd3c5fc(0x97)](_0xd3c5fc(0x79)+_0x198dc6[_0xd3c5fc(0xa3)]+'\x20dataset(s),\x20generated\x20'+_0x35f86d[_0xd3c5fc(0xa9)]+_0xd3c5fc(0x9b));}catch(_0x42aca6){console[_0xd3c5fc(0x97)](_0xd3c5fc(0x99)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process['chdir'](_0x26630e);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a156_0x433557=a156_0x18c2;function a156_0x48bc(){const _0x4488d6=['1173716qlczJB','5945780SIiEkv','../../../../','resolve','454795JVVWRM','1906998ZCmasd','3702440MBDrOh','dirname','7497NABbuz','templates','29056ylxycw','2gshhRt','198VRjGmD'];a156_0x48bc=function(){return _0x4488d6;};return a156_0x48bc();}(function(_0x242300,_0x485e44){const _0x1c0288=a156_0x18c2,_0x33ffb8=_0x242300();while(!![]){try{const _0x5ea8e8=-parseInt(_0x1c0288(0x198))/0x1+-parseInt(_0x1c0288(0x192))/0x2*(parseInt(_0x1c0288(0x19c))/0x3)+parseInt(_0x1c0288(0x194))/0x4+parseInt(_0x1c0288(0x195))/0x5+parseInt(_0x1c0288(0x199))/0x6+-parseInt(_0x1c0288(0x19a))/0x7+-parseInt(_0x1c0288(0x191))/0x8*(parseInt(_0x1c0288(0x193))/0x9);if(_0x5ea8e8===_0x485e44)break;else _0x33ffb8['push'](_0x33ffb8['shift']());}catch(_0x1993ac){_0x33ffb8['push'](_0x33ffb8['shift']());}}}(a156_0x48bc,0xb345c));import a156_0x392a40 from'node:path';function a156_0x18c2(_0x4432d4,_0x44638c){_0x4432d4=_0x4432d4-0x190;const _0x48bc6c=a156_0x48bc();let _0x18c2e7=_0x48bc6c[_0x4432d4];return _0x18c2e7;}import{fileURLToPath}from'node:url';const __dirname=a156_0x392a40[a156_0x433557(0x19b)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x51554c=a156_0x433557;return a156_0x392a40[_0x51554c(0x197)](__dirname,_0x51554c(0x196));}export function getSubAppReactDemoTemplateDir(){const _0x3c7aad=a156_0x433557;return a156_0x392a40['join'](getRabetbaseCliPackageRoot(),_0x3c7aad(0x190),'projects','sub-app-react-demo');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d3864,_0x982409){const _0x588595=a157_0x2e4f,_0x25e4ef=_0x1d3864();while(!![]){try{const _0x8507e4=parseInt(_0x588595(0x1c6))/0x1+-parseInt(_0x588595(0x1c9))/0x2*(-parseInt(_0x588595(0x1ba))/0x3)+parseInt(_0x588595(0x1c0))/0x4*(parseInt(_0x588595(0x1bb))/0x5)+parseInt(_0x588595(0x1c5))/0x6*(parseInt(_0x588595(0x1b8))/0x7)+parseInt(_0x588595(0x1c7))/0x8+-parseInt(_0x588595(0x1b7))/0x9*(-parseInt(_0x588595(0x1c3))/0xa)+-parseInt(_0x588595(0x1b9))/0xb;if(_0x8507e4===_0x982409)break;else _0x25e4ef['push'](_0x25e4ef['shift']());}catch(_0x2def90){_0x25e4ef['push'](_0x25e4ef['shift']());}}}(a157_0x48f9,0x41aa2));import a157_0x31a4d6 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x10fd74){const _0x3ff098=a157_0x2e4f,_0x550ebc=Date[_0x3ff098(0x1be)](),_0x45b7ce=a157_0x31a4d6[_0x3ff098(0x1bf)](process['cwd'](),_0x10fd74);try{logger[_0x3ff098(0x1bd)]('copy','开始复制项目模板',{'projectCode':_0x10fd74,'templateDir':templateDir}),await copyDirectory(templateDir,_0x45b7ce);const _0x402e2c=Date[_0x3ff098(0x1be)]()-_0x550ebc;logger[_0x3ff098(0x1bc)](_0x3ff098(0x1c2),'项目模板复制完成',_0x402e2c,{'projectCode':_0x10fd74});}catch(_0x1b11b7){const _0x3031a8=Date[_0x3ff098(0x1be)]()-_0x550ebc;logger[_0x3ff098(0x1c1)]('copy',_0x3ff098(0x1c8),{'projectCode':_0x10fd74,'error':_0x1b11b7 instanceof Error?_0x1b11b7[_0x3ff098(0x1c4)]:String(_0x1b11b7),'duration':_0x3031a8});throw _0x1b11b7;}return formatElapsed(_0x550ebc);}function a157_0x2e4f(_0x181751,_0x172240){_0x181751=_0x181751-0x1b7;const _0x48f9d1=a157_0x48f9();let _0x2e4fc1=_0x48f9d1[_0x181751];return _0x2e4fc1;}function a157_0x48f9(){const _0x4f1480=['526963BFWdoS','3094448KXzdRx','项目模板复制失败','7850jJREZR','9APqSZx','14Pwlswr','14946338PYSSvs','6FYFLZu','10RHBwxX','success','info','now','resolve','349340UdNYGX','error','copy','3904690DtWiPN','message','422886xNNocv'];a157_0x48f9=function(){return _0x4f1480;};return a157_0x48f9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x42b0c1,_0x58f94e){const _0x29d914=a158_0x2752,_0x510a59=_0x42b0c1();while(!![]){try{const _0x54d020=-parseInt(_0x29d914(0x7c))/0x1*(-parseInt(_0x29d914(0x73))/0x2)+-parseInt(_0x29d914(0x7e))/0x3+-parseInt(_0x29d914(0x82))/0x4+parseInt(_0x29d914(0x74))/0x5*(-parseInt(_0x29d914(0x88))/0x6)+parseInt(_0x29d914(0x89))/0x7*(parseInt(_0x29d914(0x85))/0x8)+parseInt(_0x29d914(0x87))/0x9*(parseInt(_0x29d914(0x79))/0xa)+parseInt(_0x29d914(0x84))/0xb;if(_0x54d020===_0x58f94e)break;else _0x510a59['push'](_0x510a59['shift']());}catch(_0x144d53){_0x510a59['push'](_0x510a59['shift']());}}}(a158_0x1d71,0x41858));import a158_0x1453f4 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a158_0x1d71(){const _0x34c80b=['2LTeJtA','30HCbcPy','开始格式化代码','resolve','prettier','npx','121960qmLSvF','代码格式化完成','now','154249VtyPNQ','format','740346gPzYUY','--write','info','error','740876hOuTOR','message','3041115nWVSoh','8ROXMLp','代码格式化失败','279dInCtS','324864iSQNrn','1515157uaFgRB','cwd','success'];a158_0x1d71=function(){return _0x34c80b;};return a158_0x1d71();}function a158_0x2752(_0x40743,_0x71fb1a){_0x40743=_0x40743-0x72;const _0x1d71df=a158_0x1d71();let _0x275251=_0x1d71df[_0x40743];return _0x275251;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x442137){const _0x271a0b=a158_0x2752,_0x138981=Date[_0x271a0b(0x7b)](),_0x5cedd0=a158_0x1453f4[_0x271a0b(0x76)](process[_0x271a0b(0x8a)](),_0x442137);try{logger[_0x271a0b(0x80)](_0x271a0b(0x7d),_0x271a0b(0x75),{'projectCode':_0x442137}),await execa(resolveNpmBin(_0x271a0b(0x78)),[_0x271a0b(0x77),_0x271a0b(0x7f),'.'],{'cwd':_0x5cedd0});const _0x234ef6=Date[_0x271a0b(0x7b)]()-_0x138981;logger[_0x271a0b(0x72)](_0x271a0b(0x7d),_0x271a0b(0x7a),_0x234ef6,{'projectCode':_0x442137});}catch(_0x459fb8){const _0x402c25=Date[_0x271a0b(0x7b)]()-_0x138981;logger[_0x271a0b(0x81)](_0x271a0b(0x7d),_0x271a0b(0x86),{'projectCode':_0x442137,'error':_0x459fb8 instanceof Error?_0x459fb8[_0x271a0b(0x83)]:String(_0x459fb8),'duration':_0x402c25});throw _0x459fb8;}return formatElapsed(_0x138981);}
|