@lovrabet/rabetbase-cli 2.3.16-beta.5 → 2.3.16-beta.6
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
|
-
const
|
|
1
|
+
function a143_0x16ab(_0x5f4960,_0x273273){_0x5f4960=_0x5f4960-0x115;const _0x1b4a5d=a143_0x1b4a();let _0x16ab0f=_0x1b4a5d[_0x5f4960];return _0x16ab0f;}function a143_0x1b4a(){const _0x1ca50a=['38843409wDHjGh','/smartapi/lovrabet/dataset/','14CpDTYN','read','standard-page-status','code','relatedPages','3735528ByPsxZ','manualResolutionRequired','length','name','related-pages-fallback','2047504Qksnpw','10858275IVFqOc','nextAction','2SbLzhG','alias','297483TQKSro','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','10ymMRjW','1120bBwDnG','status','1002219RpptVC','appCode','2225EhtdEA'];a143_0x1b4a=function(){return _0x1ca50a;};return a143_0x1b4a();}const a143_0x4c586d=a143_0x16ab;(function(_0x550e68,_0x5c56eb){const _0x434147=a143_0x16ab,_0xccd9b0=_0x550e68();while(!![]){try{const _0x3587d3=-parseInt(_0x434147(0x116))/0x1+parseInt(_0x434147(0x12e))/0x2*(parseInt(_0x434147(0x11c))/0x3)+-parseInt(_0x434147(0x11a))/0x4*(parseInt(_0x434147(0x11e))/0x5)+parseInt(_0x434147(0x126))/0x6*(-parseInt(_0x434147(0x121))/0x7)+-parseInt(_0x434147(0x12b))/0x8+-parseInt(_0x434147(0x12c))/0x9+-parseInt(_0x434147(0x119))/0xa*(-parseInt(_0x434147(0x11f))/0xb);if(_0x3587d3===_0x5c56eb)break;else _0xccd9b0['push'](_0xccd9b0['shift']());}catch(_0x679acc){_0xccd9b0['push'](_0xccd9b0['shift']());}}}(a143_0x1b4a,0xb3984));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_0x4c586d(0x123),'description':a143_0x4c586d(0x118),'risk':a143_0x4c586d(0x122),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a143_0x4c586d(0x115),'type':'string','description':a143_0x4c586d(0x117)}],async 'validate'(_0x1d3294){validateDatasetSelector(_0x1d3294);},async 'dryRun'(_0x18db9){const _0xd30033=a143_0x4c586d,_0x108430=await loadDatasetDetailForPage(_0x18db9);return{'method':'GET','url':_0xd30033(0x120)+_0x108430['code']+'/standard-page-status?appCode='+encodeURIComponent(_0x18db9[_0xd30033(0x11d)]),'description':serializeDryRunDescription({'dataset':{'id':_0x108430['id'],'code':_0x108430[_0xd30033(0x124)],'name':_0x108430[_0xd30033(0x129)]},'action':'query-standard-page-status'})};},async 'execute'(_0x120149){const _0x5c8541=a143_0x4c586d,_0x13367b=await loadDatasetDetailForPage(_0x120149),_0x42da68=await loadStandardPageStatusForGenerate(_0x120149,_0x13367b[_0x5c8541(0x124)]),_0x10f9f2=getUndeletedRelatedPages(_0x13367b),_0x568e34=assessStandardPageState(_0x13367b[_0x5c8541(0x124)],_0x42da68,{'fallbackUndeletedPages':_0x10f9f2});return{'ok':!![],'data':{'datasetCode':_0x13367b[_0x5c8541(0x124)],'precheckSource':_0x42da68?.['source']??_0x5c8541(0x12a),'status':_0x568e34[_0x5c8541(0x11b)],'manualResolutionRequired':_0x568e34[_0x5c8541(0x127)],'nextAction':_0x568e34[_0x5c8541(0x12d)],'standardPageStatus':_0x42da68,'relatedPages':{'total':_0x13367b[_0x5c8541(0x125)][_0x5c8541(0x128)],'undeletedCount':_0x10f9f2[_0x5c8541(0x128)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a144_0x1b53d3=a144_0x4220;(function(_0x2fe7b7,_0x2710e2){const _0x31f83=a144_0x4220,_0x18dd20=_0x2fe7b7();while(!![]){try{const _0x2e28a2=-parseInt(_0x31f83(0xef))/0x1+-parseInt(_0x31f83(0xf5))/0x2*(parseInt(_0x31f83(0xe7))/0x3)+parseInt(_0x31f83(0xf6))/0x4*(-parseInt(_0x31f83(0xfa))/0x5)+parseInt(_0x31f83(0xf3))/0x6+parseInt(_0x31f83(0xf8))/0x7+-parseInt(_0x31f83(0xf9))/0x8+parseInt(_0x31f83(0xf4))/0x9;if(_0x2e28a2===_0x2710e2)break;else _0x18dd20['push'](_0x18dd20['shift']());}catch(_0x51861f){_0x18dd20['push'](_0x18dd20['shift']());}}}(a144_0x4ec4,0x451a4));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a144_0x4220(_0x1474b9,_0x1793a1){_0x1474b9=_0x1474b9-0xe3;const _0x4ec4cb=a144_0x4ec4();let _0x422017=_0x4ec4cb[_0x1474b9];return _0x422017;}import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a144_0x4ec4(){const _0x436897=['1327320NaGvgc','5CNvhoz','POST','/sync-to-pages','write','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','/smartapi/lovrabet/dataset/','sync','page','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','appCode','name','517785PizMfR','alias','isArray','length','code','dataset','部分页面同步失败','undeletedPages','445228AhBptE','同步成功','string','compress','1832436jCkGmD','6479406VhZYpf','2JQtYkB','257820qPBNkL','failedPages','741279hNkonH'];a144_0x4ec4=function(){return _0x436897;};return a144_0x4ec4();}import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a144_0x1b53d3(0xe3),'command':a144_0x1b53d3(0x100),'description':a144_0x1b53d3(0xfe),'risk':a144_0x1b53d3(0xfd),'defaultOutputFormat':a144_0x1b53d3(0xf2),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a144_0x1b53d3(0xe8),'type':a144_0x1b53d3(0xf1),'description':a144_0x1b53d3(0xe4)}],async 'validate'(_0x3064b9){validateDatasetSelector(_0x3064b9);},async 'dryRun'(_0x54e84f){const _0x101a5b=a144_0x1b53d3,_0x334015=await prepare(_0x54e84f);return{'method':_0x101a5b(0xfb),'url':_0x101a5b(0xff)+_0x334015[_0x101a5b(0xec)][_0x101a5b(0xeb)]+_0x101a5b(0xfc),'body':{'appCode':_0x54e84f[_0x101a5b(0xe5)]},'description':serializeDryRunDescription({'dataset':{'id':_0x334015['dataset']['id'],'code':_0x334015[_0x101a5b(0xec)][_0x101a5b(0xeb)],'name':_0x334015[_0x101a5b(0xec)][_0x101a5b(0xe6)],'fieldCount':_0x334015[_0x101a5b(0xec)]['fieldCount']},'relatedPages':{'total':_0x334015[_0x101a5b(0xec)]['relatedPages'][_0x101a5b(0xea)],'undeletedCount':_0x334015[_0x101a5b(0xee)]['length']},'action':_0x101a5b(0x100),'reason':_0x334015[_0x101a5b(0xee)][_0x101a5b(0xea)]+'\x20undeleted\x20related\x20page(s)\x20found'})};},async 'execute'(_0x4ed9d6){const _0x3c4b3b=a144_0x1b53d3,_0x124a69=await prepare(_0x4ed9d6),_0x1433f6=await syncStandardPages(_0x4ed9d6[_0x3c4b3b(0xe5)],_0x124a69[_0x3c4b3b(0xec)][_0x3c4b3b(0xeb)]),_0x1819bc=Array[_0x3c4b3b(0xe9)](_0x1433f6[_0x3c4b3b(0xf7)])&&_0x1433f6[_0x3c4b3b(0xf7)]['length']>0x0,_0x41b974=_0x1819bc?_0x3c4b3b(0xed):_0x3c4b3b(0xf0);return{'ok':!![],'message':_0x41b974,'data':{'datasetCode':_0x124a69['dataset'][_0x3c4b3b(0xeb)],..._0x1433f6}};}};async function prepare(_0x2b3c21){const _0x5ae024=await loadDatasetDetailForPage(_0x2b3c21);return prepareDatasetAction(_0x5ae024,'sync');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4278f7,_0x9090ac){const _0x4120bf=a145_0x1998,_0x4deb86=_0x4278f7();while(!![]){try{const _0x18e35e=-parseInt(_0x4120bf(0x14a))/0x1+parseInt(_0x4120bf(0x14d))/0x2+-parseInt(_0x4120bf(0x149))/0x3*(-parseInt(_0x4120bf(0x147))/0x4)+-parseInt(_0x4120bf(0x14c))/0x5+parseInt(_0x4120bf(0x14f))/0x6*(parseInt(_0x4120bf(0x14b))/0x7)+-parseInt(_0x4120bf(0x14e))/0x8+parseInt(_0x4120bf(0x150))/0x9*(-parseInt(_0x4120bf(0x148))/0xa);if(_0x18e35e===_0x9090ac)break;else _0x4deb86['push'](_0x4deb86['shift']());}catch(_0x3d1bdb){_0x4deb86['push'](_0x4deb86['shift']());}}}(a145_0x5272,0x4d4f5));import{permitPageGet}from'../../commands/permit/page-get.js';function a145_0x1998(_0x58998f,_0x7d6000){_0x58998f=_0x58998f-0x147;const _0x527251=a145_0x5272();let _0x1998a6=_0x527251[_0x58998f];return _0x1998a6;}function a145_0x5272(){const _0x3c358b=['10QMeAVj','1426947NNRXDR','195391qHnRce','28PLXSeR','718560BHQBpi','291486uvNTvh','3314256KDyDiO','686928ibWmTL','83682XmnByY','4QHagdy'];a145_0x5272=function(){return _0x3c358b;};return a145_0x5272();}import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0x218c14=a146_0x348f;(function(_0x663559,_0x184a81){const _0x1f7ff1=a146_0x348f,_0x1263de=_0x663559();while(!![]){try{const _0x3410d3=parseInt(_0x1f7ff1(0xc8))/0x1+parseInt(_0x1f7ff1(0xc7))/0x2+-parseInt(_0x1f7ff1(0xce))/0x3+parseInt(_0x1f7ff1(0xc9))/0x4*(-parseInt(_0x1f7ff1(0xcc))/0x5)+-parseInt(_0x1f7ff1(0xc2))/0x6*(parseInt(_0x1f7ff1(0xcb))/0x7)+-parseInt(_0x1f7ff1(0xc3))/0x8+parseInt(_0x1f7ff1(0xc5))/0x9;if(_0x3410d3===_0x184a81)break;else _0x1263de['push'](_0x1263de['shift']());}catch(_0x7e8761){_0x1263de['push'](_0x1263de['shift']());}}}(a146_0x75f1,0xcaafa));import{getPagePermit}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a146_0x348f(_0x374d10,_0x13ebac){_0x374d10=_0x374d10-0xc2;const _0x75f15c=a146_0x75f1();let _0x348f99=_0x75f15c[_0x374d10];return _0x348f99;}function a146_0x75f1(){const _0x54a1eb=['permit','522564qtNrhC','1526766rmSmYJ','4252FKYepE','num','7QObFfU','1645WUVHgs','menu-id','2762118ogNnkj','Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','page-get','8022648PnSBAi','231296URqXuh','read','15107463UwlyvN'];a146_0x75f1=function(){return _0x54a1eb;};return a146_0x75f1();}import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a146_0x218c14(0xc6),'command':a146_0x218c14(0xd0),'description':a146_0x218c14(0xcf),'risk':a146_0x218c14(0xc4),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x132876){const _0x594e81=a146_0x218c14,_0x23b3e9=_0x132876[_0x594e81(0xca)](_0x594e81(0xcd)),_0x2dab94=await getPagePermit(_0x23b3e9);return{'ok':!![],'data':{'page':projectPagePermit(_0x2dab94)},'message':'Page\x20permit\x20for\x20menu\x20'+_0x23b3e9};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x16edc4=a147_0x398f;(function(_0x1531ff,_0x11c8ad){const _0x92f1a1=a147_0x398f,_0x546084=_0x1531ff();while(!![]){try{const _0x15406b=-parseInt(_0x92f1a1(0xb1))/0x1+-parseInt(_0x92f1a1(0xa0))/0x2+parseInt(_0x92f1a1(0xad))/0x3+-parseInt(_0x92f1a1(0x9e))/0x4+parseInt(_0x92f1a1(0xab))/0x5*(parseInt(_0x92f1a1(0x96))/0x6)+parseInt(_0x92f1a1(0xa7))/0x7+-parseInt(_0x92f1a1(0x9d))/0x8;if(_0x15406b===_0x11c8ad)break;else _0x546084['push'](_0x546084['shift']());}catch(_0x313e0e){_0x546084['push'](_0x546084['shift']());}}}(a147_0xbdb1,0xbfb50));import{getPagePermit,savePagePermit}from'../../core/api-client.js';function a147_0x398f(_0x4ad7b9,_0x1b4d64){_0x4ad7b9=_0x4ad7b9-0x93;const _0xbdb14e=a147_0xbdb1();let _0x398f48=_0xbdb14e[_0x4ad7b9];return _0x398f48;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a147_0xbdb1(){const _0x3d0f7f=['num','length','map','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','/smartapi/permit/page/save','validation','10895675oPiEDJ','permit','spec','label','25AYckDY','Nothing\x20to\x20set.','4702650dIAiBR','flag','selector','appCode','1401050AJLKqD','POST','menu-id','push','1837902WwoHmh','key','join','menuId','\x20cannot\x20be\x20empty.','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','This\x20page\x20has\x20no\x20\x22','3447360tPOUjK','2855972abHFVL','rolePermit','2648930KQaUqQ'];a147_0xbdb1=function(){return _0x3d0f7f;};return a147_0xbdb1();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH=a147_0x16edc4(0xa5);function collectRequestedSlots(_0x37e492){const _0x3da238=a147_0x16edc4,_0x23bf74=[];for(const _0x2f9586 of PAGE_SLOT_SPECS){const _0x59b8c5=_0x37e492[_0x3da238(0xae)](_0x2f9586[_0x3da238(0xae)]);if(_0x59b8c5===undefined||_0x59b8c5===null)continue;const _0xf7ed2f=splitList(String(_0x59b8c5));if(_0xf7ed2f[_0x3da238(0xa2)]===0x0)throw CliErrors[_0x3da238(0xa6)]('--'+_0x2f9586['flag']+_0x3da238(0x9a),_0x3da238(0x9b));_0x23bf74[_0x3da238(0x95)]({'spec':_0x2f9586,'refs':_0xf7ed2f});}return _0x23bf74;}async function buildPlan(_0x27dc56,_0x6a6c34){const _0x102b1a=a147_0x16edc4,_0x103488=_0x27dc56[_0x102b1a(0xa1)](_0x102b1a(0x94)),_0x48ebab=collectRequestedSlots(_0x27dc56);if(_0x48ebab[_0x102b1a(0xa2)]===0x0)throw CliErrors['validation'](_0x102b1a(0xac),'Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS[_0x102b1a(0xa3)](_0x20ac75=>'--'+_0x20ac75[_0x102b1a(0xae)])[_0x102b1a(0x98)](',\x20')+'.');const _0x2906c6=await getPagePermit(_0x103488),_0x542b69={},_0x26177d={},_0x2a22fe=[];for(const {spec:_0x155d33,refs:_0x4decae}of _0x48ebab){const _0x4b1679=_0x2906c6[_0x155d33[_0x102b1a(0x97)]];if(!_0x4b1679)throw CliErrors['validation'](_0x102b1a(0x9c)+_0x155d33[_0x102b1a(0xaa)]+'\x22\x20permission\x20slot\x20('+_0x155d33['key']+').',_0x102b1a(0xa4));_0x542b69[_0x155d33[_0x102b1a(0x97)]]=projectPageSlot(_0x4b1679);const _0x118285=await resolvePermitRoles(_0x27dc56['appCode'],_0x4decae,{'allowSelf':_0x155d33['allowSelf'],'label':_0x155d33[_0x102b1a(0xaa)]});_0x4b1679[_0x102b1a(0x9f)]=_0x118285,_0x26177d[_0x155d33[_0x102b1a(0x97)]]=projectPageSlot(_0x4b1679);}const _0x2d1fee={'operation':'page-set','selector':{'appCode':_0x27dc56[_0x102b1a(0xb0)],'menuId':_0x103488,'slots':_0x48ebab[_0x102b1a(0xa3)](_0x58a0b6=>_0x58a0b6[_0x102b1a(0xa9)][_0x102b1a(0x97)])},'before':_0x542b69,'after':_0x26177d,'dryRun':_0x6a6c34,'backend':{'method':_0x102b1a(0x93),'path':SAVE_PATH},'warnings':_0x2a22fe};return{'page':_0x2906c6,'mutation':_0x2d1fee};}export const permitPageSet={'service':a147_0x16edc4(0xa8),'command':'page-set','description':'Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','risk':'high-risk-write','flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1003e8){const _0x2cffaf=a147_0x16edc4,_0x19d2b8=collectRequestedSlots(_0x1003e8);if(_0x19d2b8[_0x2cffaf(0xa2)]===0x0)throw CliErrors[_0x2cffaf(0xa6)]('Nothing\x20to\x20set.','Pass\x20at\x20least\x20one\x20of:\x20'+PAGE_SLOT_SPECS['map'](_0x1bf74d=>'--'+_0x1bf74d[_0x2cffaf(0xae)])['join'](',\x20')+'.');},async 'dryRun'(_0x27418e){const _0x45b1b2=a147_0x16edc4,{mutation:_0x2f11fc}=await buildPlan(_0x27418e,!![]);return asDryRunResult(_0x2f11fc,{'method':_0x45b1b2(0x93),'url':SAVE_PATH});},async 'execute'(_0x821e19){const _0x301ba1=a147_0x16edc4,{page:_0x5cfbe8,mutation:_0x32f720}=await buildPlan(_0x821e19,![]);return await savePagePermit(_0x5cfbe8),{'ok':!![],'data':_0x32f720,'message':'Updated\x20page\x20permit\x20for\x20menu\x20'+_0x32f720[_0x301ba1(0xaf)][_0x301ba1(0x99)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x133f0a=a148_0x9e9a;(function(_0x280b1c,_0x527f72){const _0xf842c1=a148_0x9e9a,_0x26a29b=_0x280b1c();while(!![]){try{const _0x43f722=parseInt(_0xf842c1(0x6a))/0x1*(-parseInt(_0xf842c1(0x88))/0x2)+-parseInt(_0xf842c1(0x87))/0x3+parseInt(_0xf842c1(0x71))/0x4+-parseInt(_0xf842c1(0x85))/0x5+parseInt(_0xf842c1(0x69))/0x6*(parseInt(_0xf842c1(0x7f))/0x7)+-parseInt(_0xf842c1(0x6f))/0x8+parseInt(_0xf842c1(0x86))/0x9*(parseInt(_0xf842c1(0x6c))/0xa);if(_0x43f722===_0x527f72)break;else _0x26a29b['push'](_0x26a29b['shift']());}catch(_0x136f44){_0x26a29b['push'](_0x26a29b['shift']());}}}(a148_0x49db,0xc769f));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a148_0x9e9a(_0x3ce3d6,_0x5df486){_0x3ce3d6=_0x3ce3d6-0x69;const _0x49db53=a148_0x49db();let _0x9e9adc=_0x49db53[_0x3ce3d6];return _0x9e9adc;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH=a148_0x133f0a(0x83);async function buildPlan(_0xbb1dd9,_0x50645c){const _0x48386d=a148_0x133f0a,_0x57c0d0=await resolveRoleRef(_0xbb1dd9['appCode'],readRoleRef(_0xbb1dd9));assertPermConfigurable(_0x57c0d0);if(!_0xbb1dd9[_0x48386d(0x8b)](_0x48386d(0x7e)))throw CliErrors[_0x48386d(0x80)]('Missing\x20--revoke.',_0x48386d(0x89));const _0x58b425=splitList(_0xbb1dd9[_0x48386d(0x84)](_0x48386d(0x6e)));if(_0x58b425['length']===0x0)throw CliErrors[_0x48386d(0x79)](_0x48386d(0x6e),'Pass\x20--datasets\x20<datasetCode,...>.');const _0x435be5=await getRoleApiResources(_0xbb1dd9['appCode'],_0x57c0d0['id']),{byCode:_0x177f49,byDataset:_0x1b7927}=flattenApiResources(_0x435be5),_0x4182d1=_0x58b425[_0x48386d(0x70)](_0x47066d=>!_0x1b7927[_0x48386d(0x74)](_0x47066d));if(_0x4182d1[_0x48386d(0x8d)]>0x0)throw CliErrors[_0x48386d(0x80)]('Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20'+_0x4182d1[_0x48386d(0x78)](',\x20')+'.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.');const _0x2e663=new Map(),_0x3305f9=[],_0x1977f0=[];for(const _0x6e12e2 of _0x58b425){for(const _0x2fb744 of _0x1b7927[_0x48386d(0x73)](_0x6e12e2)){const _0x4006a3=_0x177f49[_0x48386d(0x73)](_0x2fb744);_0x2e663[_0x48386d(0x76)](_0x2fb744,'0'),_0x3305f9['push']({'resourceCode':_0x2fb744,'datasetCode':_0x6e12e2,'action':_0x4006a3[_0x48386d(0x75)]}),_0x1977f0['push']({'resourceCode':_0x2fb744,'datasetCode':_0x6e12e2,'action':'0'});}}const _0x35cf77=buildPermits(_0x177f49,_0x2e663),_0x41d061={'operation':_0x48386d(0x8c),'selector':{'appCode':_0xbb1dd9[_0x48386d(0x7a)],'roleId':_0x57c0d0['id'],'roleName':_0x57c0d0[_0x48386d(0x72)],'datasetCodes':_0x58b425},'before':_0x3305f9,'after':_0x1977f0,'dryRun':_0x50645c,'backend':{'method':_0x48386d(0x7c),'path':UPDATE_PATH,'roleType':_0x48386d(0x7b)},'warnings':[]};return{'role':_0x57c0d0,'permits':_0x35cf77,'mutation':_0x41d061};}function a148_0x49db(){const _0x1938bc=['datasets','12084016UjDsTX','filter','2903316ZKwdjH','roleName','get','has','action','set','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','join','flagMissing','appCode','API','POST','Missing\x20--revoke.','revoke','63frRihV','validation','Revoked\x20API\x20access\x20for\x20','datasetCodes','/smartapi/permit/role/update','str','5103890iJGjDI','306UMXIqe','1612599ChUVJN','8ALQjBL','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).','role-apis-set','bool','api-revoke','length','permit','447522dyhZSU','143963SCfloY','high-risk-write','901280MLZYab','Pass\x20--datasets\x20<datasetCode,...>.'];a148_0x49db=function(){return _0x1938bc;};return a148_0x49db();}export const permitRoleApisSet={'service':a148_0x133f0a(0x8e),'command':a148_0x133f0a(0x8a),'description':a148_0x133f0a(0x77),'risk':a148_0x133f0a(0x6b),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x53d168){const _0x1d9a89=a148_0x133f0a;if(!_0x53d168[_0x1d9a89(0x8b)](_0x1d9a89(0x7e)))throw CliErrors['validation'](_0x1d9a89(0x7d),_0x1d9a89(0x89));if(splitList(_0x53d168[_0x1d9a89(0x84)](_0x1d9a89(0x6e)))[_0x1d9a89(0x8d)]===0x0)throw CliErrors[_0x1d9a89(0x79)](_0x1d9a89(0x6e),_0x1d9a89(0x6d));},async 'dryRun'(_0x31e27c){const {mutation:_0x561af7}=await buildPlan(_0x31e27c,!![]);return asDryRunResult(_0x561af7,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x3f90e9){const _0x35a6f2=a148_0x133f0a,{role:_0x30261d,permits:_0x2f34fd,mutation:_0xbfa685}=await buildPlan(_0x3f90e9,![]);return await updateAppRole({'id':_0x30261d['id'],'appCode':_0x3f90e9[_0x35a6f2(0x7a)],'roleType':_0x35a6f2(0x7b),'permits':_0x2f34fd}),{'ok':!![],'data':_0xbfa685,'message':_0x35a6f2(0x81)+_0xbfa685['selector'][_0x35a6f2(0x82)]['length']+'\x20dataset(s)\x20on\x20role\x20'+_0x30261d['roleName']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a149_0x379e14=a149_0x41b5;(function(_0x21a866,_0x45b2b5){const _0x434654=a149_0x41b5,_0x112801=_0x21a866();while(!![]){try{const _0x2c6d55=-parseInt(_0x434654(0x1cd))/0x1+parseInt(_0x434654(0x1c6))/0x2+-parseInt(_0x434654(0x1bf))/0x3+-parseInt(_0x434654(0x1d8))/0x4+-parseInt(_0x434654(0x1c9))/0x5+parseInt(_0x434654(0x1d0))/0x6*(-parseInt(_0x434654(0x1d6))/0x7)+parseInt(_0x434654(0x1da))/0x8;if(_0x2c6d55===_0x45b2b5)break;else _0x112801['push'](_0x112801['shift']());}catch(_0x56c722){_0x112801['push'](_0x112801['shift']());}}}(a149_0x4729,0x1e403));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';function a149_0x41b5(_0x13963d,_0x3679f1){_0x13963d=_0x13963d-0x1bc;const _0x47298f=a149_0x4729();let _0x41b577=_0x47298f[_0x13963d];return _0x41b577;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a149_0x4729(){const _0x3f0825=['menu-revoke','703125IuJBSP','push','\x20menu\x20permit(s)\x20for\x20role\x20','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','PAGE','roleName','has','85412lYVtHp','appCode','POST','912965Cbaccz','get','high-risk-write','Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','200140nrlOCG','length','/smartapi/permit/role/update','597624UEozYM','join','menu-grant','Pass\x20--menus\x20<resourceCode,...>.','selector','menus','7FGjJth','str','580288nAcEsW','permit','7543880JViucd','action','validation','filter','flagMissing'];a149_0x4729=function(){return _0x3f0825;};return a149_0x4729();}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_0x379e14(0x1cf);async function buildPlan(_0x2048e9,_0x2f2088){const _0x4f4316=a149_0x379e14,_0xba019b=await resolveRoleRef(_0x2048e9['appCode'],readRoleRef(_0x2048e9));assertPermConfigurable(_0xba019b);const _0x5dbe01=readGrantRevoke(_0x2048e9),_0x8202ea=splitList(_0x2048e9[_0x4f4316(0x1d7)]('menus'));if(_0x8202ea[_0x4f4316(0x1ce)]===0x0)throw CliErrors[_0x4f4316(0x1bd)](_0x4f4316(0x1d5),_0x4f4316(0x1d3));const _0x36c7cf=await getRoleMenuResources(_0x2048e9['appCode'],_0xba019b['id']),_0x51e905=flattenMenuResources(_0x36c7cf),_0x3468f4=_0x8202ea[_0x4f4316(0x1bc)](_0x396416=>!_0x51e905[_0x4f4316(0x1c5)](_0x396416));if(_0x3468f4[_0x4f4316(0x1ce)]>0x0)throw CliErrors[_0x4f4316(0x1dc)]('Unknown\x20menu\x20resourceCode(s):\x20'+_0x3468f4[_0x4f4316(0x1d1)](',\x20')+'.',_0x4f4316(0x1c2));const _0x1b0dcd=new Map(),_0x2ef2c6=[],_0x26cd53=[];for(const _0x3a35c2 of _0x8202ea){const _0x23236b=_0x51e905[_0x4f4316(0x1ca)](_0x3a35c2);_0x1b0dcd['set'](_0x3a35c2,_0x5dbe01),_0x2ef2c6[_0x4f4316(0x1c0)]({'resourceCode':_0x3a35c2,'action':_0x23236b[_0x4f4316(0x1db)]}),_0x26cd53[_0x4f4316(0x1c0)]({'resourceCode':_0x3a35c2,'action':_0x5dbe01});}const _0x32c40f=buildPermits(_0x51e905,_0x1b0dcd),_0x1fc2f2={'operation':_0x5dbe01==='access'?_0x4f4316(0x1d2):_0x4f4316(0x1be),'selector':{'appCode':_0x2048e9['appCode'],'roleId':_0xba019b['id'],'roleName':_0xba019b[_0x4f4316(0x1c4)],'resourceCodes':_0x8202ea},'before':_0x2ef2c6,'after':_0x26cd53,'dryRun':_0x2f2088,'backend':{'method':'POST','path':UPDATE_PATH,'roleType':_0x4f4316(0x1c3)},'warnings':[]};return{'role':_0xba019b,'permits':_0x32c40f,'mutation':_0x1fc2f2};}export const permitRoleMenusSet={'service':a149_0x379e14(0x1d9),'command':'role-menus-set','description':a149_0x379e14(0x1cc),'risk':a149_0x379e14(0x1cb),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x197721){const _0x2702ca=a149_0x379e14;readGrantRevoke(_0x197721);if(splitList(_0x197721['str'](_0x2702ca(0x1d5)))[_0x2702ca(0x1ce)]===0x0)throw CliErrors[_0x2702ca(0x1bd)](_0x2702ca(0x1d5),_0x2702ca(0x1d3));},async 'dryRun'(_0x57a25d){const _0x324834=a149_0x379e14,{mutation:_0x4537d6}=await buildPlan(_0x57a25d,!![]);return asDryRunResult(_0x4537d6,{'method':_0x324834(0x1c8),'url':UPDATE_PATH});},async 'execute'(_0x47dd01){const _0xe4ae53=a149_0x379e14,{role:_0x4ccfc2,permits:_0x370416,mutation:_0x4e377a}=await buildPlan(_0x47dd01,![]);return await updateAppRole({'id':_0x4ccfc2['id'],'appCode':_0x47dd01[_0xe4ae53(0x1c7)],'roleType':'PAGE','permits':_0x370416}),{'ok':!![],'data':_0x4e377a,'message':'Updated\x20'+_0x4e377a[_0xe4ae53(0x1d4)]['resourceCodes'][_0xe4ae53(0x1ce)]+_0xe4ae53(0x1c1)+_0x4ccfc2[_0xe4ae53(0x1c4)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a150_0x3802c8=a150_0x351d;(function(_0x5a2a43,_0xa26e94){const _0x1df1fe=a150_0x351d,_0xc968b6=_0x5a2a43();while(!![]){try{const _0x4ed73e=parseInt(_0x1df1fe(0xd6))/0x1+-parseInt(_0x1df1fe(0xcc))/0x2*(-parseInt(_0x1df1fe(0xd3))/0x3)+parseInt(_0x1df1fe(0xd1))/0x4+parseInt(_0x1df1fe(0xde))/0x5*(-parseInt(_0x1df1fe(0xdc))/0x6)+parseInt(_0x1df1fe(0xce))/0x7*(parseInt(_0x1df1fe(0xc7))/0x8)+parseInt(_0x1df1fe(0xdd))/0x9*(parseInt(_0x1df1fe(0xd9))/0xa)+-parseInt(_0x1df1fe(0xcb))/0xb*(parseInt(_0x1df1fe(0xc9))/0xc);if(_0x4ed73e===_0xa26e94)break;else _0xc968b6['push'](_0xc968b6['shift']());}catch(_0x320027){_0xc968b6['push'](_0xc968b6['shift']());}}}(a150_0x4e8e,0x6fac0));function a150_0x4e8e(){const _0x31db18=['7vQXAtn','resourceCode','\x20menu(s)\x20allowed','1487896sCzHEX','appCode','88059flzgMp','roleName','length','794996PNDyqS','access','read','760BBdXmX','map','action','306QCkgta','1899IafSfr','51395niTbOj','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','permit','role-menus','5129792DpsaPM','from','576fPXXhy','values','347809hxHKGa','46RQXNEh','Role\x20'];a150_0x4e8e=function(){return _0x31db18;};return a150_0x4e8e();}import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';function a150_0x351d(_0x120995,_0x1530b2){_0x120995=_0x120995-0xc6;const _0x4e8e7b=a150_0x4e8e();let _0x351d69=_0x4e8e7b[_0x120995];return _0x351d69;}export const permitRoleMenus={'service':a150_0x3802c8(0xe0),'command':a150_0x3802c8(0xc6),'description':a150_0x3802c8(0xdf),'risk':a150_0x3802c8(0xd8),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3b40c2){const _0x494560=a150_0x3802c8,_0x233de9=await resolveRoleRef(_0x3b40c2['appCode'],readRoleRef(_0x3b40c2)),_0xe9b6e2=await getRoleMenuResources(_0x3b40c2[_0x494560(0xd2)],_0x233de9['id']),_0xac6cd9=flattenMenuResources(_0xe9b6e2),_0x292cc2=Array[_0x494560(0xc8)](_0xac6cd9[_0x494560(0xca)]())[_0x494560(0xda)](_0x2a83dd=>({'resourceCode':_0x2a83dd[_0x494560(0xcf)],'resourceName':_0x2a83dd['resourceName'],'allowed':_0x2a83dd[_0x494560(0xdb)]===_0x494560(0xd7),'action':_0x2a83dd[_0x494560(0xdb)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x3b40c2['appCode'],'roleId':_0x233de9['id'],'roleName':_0x233de9[_0x494560(0xd4)]},'menus':_0x292cc2},'message':_0x494560(0xcd)+_0x233de9[_0x494560(0xd4)]+'\x20has\x20'+_0x292cc2['filter'](_0x473f2b=>_0x473f2b['allowed'])[_0x494560(0xd5)]+'/'+_0x292cc2[_0x494560(0xd5)]+_0x494560(0xd0)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x714ad8=a151_0xcb0b;(function(_0x2e16c7,_0x5eb52c){const _0x50ce35=a151_0xcb0b,_0x42d508=_0x2e16c7();while(!![]){try{const _0x366723=-parseInt(_0x50ce35(0x21f))/0x1*(-parseInt(_0x50ce35(0x223))/0x2)+-parseInt(_0x50ce35(0x211))/0x3*(parseInt(_0x50ce35(0x1eb))/0x4)+-parseInt(_0x50ce35(0x228))/0x5+parseInt(_0x50ce35(0x1ee))/0x6+-parseInt(_0x50ce35(0x1f5))/0x7*(-parseInt(_0x50ce35(0x1df))/0x8)+parseInt(_0x50ce35(0x1fb))/0x9+-parseInt(_0x50ce35(0x20a))/0xa;if(_0x366723===_0x5eb52c)break;else _0x42d508['push'](_0x42d508['shift']());}catch(_0x34bef9){_0x42d508['push'](_0x42d508['shift']());}}}(a151_0x3712,0x4c274));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a151_0x714ad8(0x1f2),'type':a151_0x714ad8(0x210),'required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};function a151_0xcb0b(_0x5f4670,_0x1a1a85){_0x5f4670=_0x5f4670-0x1de;const _0x37127e=a151_0x3712();let _0xcb0b63=_0x37127e[_0x5f4670];return _0xcb0b63;}export const ROLE_REF_FLAG={'name':a151_0x714ad8(0x1ed),'type':a151_0x714ad8(0x22f),'required':!![],'description':a151_0x714ad8(0x217)};export const GRANT_FLAG={'name':a151_0x714ad8(0x21a),'type':a151_0x714ad8(0x1e6),'required':![],'description':a151_0x714ad8(0x1f3)};export const REVOKE_FLAG={'name':a151_0x714ad8(0x206),'type':a151_0x714ad8(0x1e6),'required':![],'description':'Revoke\x20access\x20to\x20the\x20listed\x20resources'};export const MENUS_FLAG={'name':a151_0x714ad8(0x22c),'type':a151_0x714ad8(0x22f),'required':!![],'description':a151_0x714ad8(0x22a)};export const DATASETS_FLAG={'name':a151_0x714ad8(0x202),'type':a151_0x714ad8(0x22f),'required':!![],'description':a151_0x714ad8(0x233)};export const PAGE_SLOT_SPECS=[{'flag':a151_0x714ad8(0x1ec),'key':a151_0x714ad8(0x1f6),'allowSelf':![],'label':a151_0x714ad8(0x212)},{'flag':'create-roles','key':a151_0x714ad8(0x1e7),'allowSelf':![],'label':a151_0x714ad8(0x203)},{'flag':a151_0x714ad8(0x227),'key':a151_0x714ad8(0x1e0),'allowSelf':![],'label':a151_0x714ad8(0x1fe)},{'flag':a151_0x714ad8(0x214),'key':'dataDelete','allowSelf':![],'label':a151_0x714ad8(0x1e8)},{'flag':a151_0x714ad8(0x208),'key':a151_0x714ad8(0x1f7),'allowSelf':![],'label':a151_0x714ad8(0x219)},{'flag':'export-roles','key':a151_0x714ad8(0x22d),'allowSelf':![],'label':'data\x20export'},{'flag':a151_0x714ad8(0x21b),'key':a151_0x714ad8(0x232),'allowSelf':!![],'label':a151_0x714ad8(0x200)}];function a151_0x3712(){const _0x37d56f=['row-roles','test','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','resourceName','303775JmEiAJ','resourceCode','some','pageNodeList','2GFNYcx','Pass\x20--role\x20<id|name>.','allowSelf','\x22\x20is\x20ambiguous\x20(ids:\x20','update-roles','1596815xJdece','access','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','\x20(comma-separated\x20SELF/ALL/id/name)','menus','dataExport','length','string','SELF','Run\x20`role\x20list`.','dataPermit','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','set','get','validation','1662448Waxhim','dataUpdate','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','push','SELF\x20is\x20not\x20allowed\x20for\x20','Roles\x20for\x20','datasetCode','boolean','dataCreate','data\x20delete','roleType','join','348QYUnhx','menu-roles','role','243582JUhGYi','rolePermit','\x20not\x20found.','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','menu-id','Grant\x20access\x20to\x20the\x20listed\x20resources','map','14lkswDK','menuPermit','dataDetail','appCode','bool','split','4654035FdLyJh','roleName','find','data\x20update','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','row\x20visibility','filter','datasets','data\x20create','menuId','Role\x20\x22','revoke',';\x20SELF\x20=\x20only\x20own\x20rows','detail-roles','key','4023860PmSJgK','\x22\x20not\x20found.','flagMissing','action','apiList','Disambiguate\x20with\x20an\x20id.','number','8394zeenxO','menu\x20visibility','trim','delete-roles','Special\x20role\x20','Missing\x20action.','Role\x20id\x20or\x20role\x20name','\x20is\x20not\x20available\x20for\x20this\x20app.','data\x20detail','grant'];a151_0x3712=function(){return _0x37d56f;};return a151_0x3712();}export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x2fb7ee=>({'name':_0x2fb7ee['flag'],'type':'string','required':![],'description':a151_0x714ad8(0x1e4)+_0x2fb7ee['label']+a151_0x714ad8(0x22b)+(_0x2fb7ee[a151_0x714ad8(0x225)]?a151_0x714ad8(0x207):'')}));export function splitList(_0x124d05){const _0x1f7290=a151_0x714ad8;return _0x124d05[_0x1f7290(0x1fa)](',')[_0x1f7290(0x1f4)](_0x4bef1c=>_0x4bef1c[_0x1f7290(0x213)]())[_0x1f7290(0x201)](Boolean);}export function projectRoleRef(_0x467d4e){const _0x4cb582=a151_0x714ad8;return{'id':_0x467d4e['id'],'roleName':_0x467d4e[_0x4cb582(0x1fc)],'roleType':_0x467d4e[_0x4cb582(0x1e9)]};}export async function resolvePermitRoles(_0x216164,_0x27e108,_0x29ecc2){const _0x49f7c9=a151_0x714ad8,_0x146085=await listPermitRoles(_0x216164,{'needSelf':!![],'needPublic':!![]}),_0x5b9e02=[];for(const _0x3742dd of _0x27e108){const _0x36510b=resolveOnePermitRole(_0x146085,_0x3742dd);if(!_0x29ecc2[_0x49f7c9(0x225)]&&_0x36510b[_0x49f7c9(0x1e9)]==='SELF')throw CliErrors[_0x49f7c9(0x1de)](_0x49f7c9(0x1e3)+_0x29ecc2['label']+'.',_0x49f7c9(0x21d));if(!_0x5b9e02[_0x49f7c9(0x221)](_0x1ffbbb=>_0x1ffbbb['id']===_0x36510b['id']))_0x5b9e02[_0x49f7c9(0x1e2)](_0x36510b);}return _0x5b9e02;}function resolveOnePermitRole(_0x155190,_0x5c766e){const _0x269aff=a151_0x714ad8,_0x5d8d59=_0x5c766e[_0x269aff(0x213)](),_0x352bbd=_0x5d8d59['toUpperCase']();if(_0x352bbd===_0x269aff(0x230)||_0x352bbd==='ALL'){const _0x3c8d1e=_0x155190[_0x269aff(0x1fd)](_0x4c3868=>_0x4c3868['roleType']===_0x352bbd);if(!_0x3c8d1e)throw CliErrors[_0x269aff(0x1de)](_0x269aff(0x215)+_0x352bbd+_0x269aff(0x218));return _0x3c8d1e;}if(/^-?\d+$/[_0x269aff(0x21c)](_0x5d8d59)){const _0x1d9f77=Number(_0x5d8d59),_0x2bde85=_0x155190[_0x269aff(0x1fd)](_0x2811d3=>_0x2811d3['id']===_0x1d9f77);if(!_0x2bde85)throw CliErrors[_0x269aff(0x1de)]('Role\x20id\x20'+_0x1d9f77+_0x269aff(0x1f0),_0x269aff(0x231));return _0x2bde85;}const _0x323ae2=_0x155190[_0x269aff(0x201)](_0x253988=>_0x253988[_0x269aff(0x1fc)]===_0x5d8d59);if(_0x323ae2[_0x269aff(0x22e)]===0x0)throw CliErrors[_0x269aff(0x1de)](_0x269aff(0x205)+_0x5d8d59+_0x269aff(0x20b),_0x269aff(0x1ff));if(_0x323ae2[_0x269aff(0x22e)]>0x1)throw CliErrors[_0x269aff(0x1de)]('Role\x20\x22'+_0x5d8d59+_0x269aff(0x226)+_0x323ae2[_0x269aff(0x1f4)](_0x3c4890=>_0x3c4890['id'])[_0x269aff(0x1ea)](',\x20')+').',_0x269aff(0x20f));return _0x323ae2[0x0];}export function projectPageSlot(_0x949396){const _0x2f1a9e=a151_0x714ad8;if(!_0x949396)return null;return{'resourceCode':_0x949396['resourceCode'],'roles':(_0x949396[_0x2f1a9e(0x1ef)]??[])[_0x2f1a9e(0x1f4)](projectRoleRef)};}export function projectPagePermit(_0x33a593){const _0x51f581=a151_0x714ad8,_0x4135b4={'menuId':_0x33a593[_0x51f581(0x204)],'appCode':_0x33a593[_0x51f581(0x1f8)],'menuPermit':projectPageSlot(_0x33a593[_0x51f581(0x1f6)])};for(const _0x2eb9e9 of PAGE_SLOT_SPECS){if(_0x2eb9e9['key']==='menuPermit')continue;_0x4135b4[_0x2eb9e9[_0x51f581(0x209)]]=projectPageSlot(_0x33a593[_0x2eb9e9['key']]);}return _0x4135b4;}export function flattenMenuResources(_0x1e2c81){const _0x2c07c8=new Map(),_0xc36a7b=_0x409a0b=>{const _0x5dd923=a151_0xcb0b;for(const _0x3d65e9 of _0x409a0b??[]){_0x2c07c8['set'](_0x3d65e9[_0x5dd923(0x220)],{'resourceCode':_0x3d65e9['resourceCode'],'resourceName':_0x3d65e9[_0x5dd923(0x21e)],'action':_0x3d65e9['allowedActions']?.[0x0]??'0'});if(_0x3d65e9[_0x5dd923(0x222)])_0xc36a7b(_0x3d65e9['pageNodeList']);}};return _0xc36a7b(_0x1e2c81),_0x2c07c8;}export function flattenApiResources(_0x58df56){const _0x1afb58=a151_0x714ad8,_0x59eff5=new Map(),_0x2a1c15=new Map();for(const _0x192fc0 of _0x58df56){const _0x5976a2=_0x192fc0[_0x1afb58(0x20e)]??{};for(const [_0x385b32,_0xca3abe]of Object['entries'](_0x5976a2)){_0x59eff5[_0x1afb58(0x234)](_0x385b32,{'resourceCode':_0x385b32,'resourceName':_0x192fc0['resourceName'],'datasetCode':_0x192fc0[_0x1afb58(0x1e5)],'action':_0xca3abe?.[0x0]??'0'});const _0x449b1c=_0x2a1c15[_0x1afb58(0x235)](_0x192fc0['datasetCode'])??[];_0x449b1c['push'](_0x385b32),_0x2a1c15[_0x1afb58(0x234)](_0x192fc0[_0x1afb58(0x1e5)],_0x449b1c);}}return{'byCode':_0x59eff5,'byDataset':_0x2a1c15};}export function buildPermits(_0x4ab411,_0x570867){const _0x360bd2=a151_0x714ad8,_0x37df4a={};for(const [_0x4bd36d,_0x107e04]of _0x4ab411){const _0x4017e3=_0x570867[_0x360bd2(0x235)](_0x4bd36d)??_0x107e04[_0x360bd2(0x20d)];_0x37df4a[_0x4bd36d]=[_0x4017e3];}return _0x37df4a;}export function readRoleRef(_0x23f88c){const _0x29d4a2=a151_0x714ad8,_0x4bafe6=_0x23f88c['str'](_0x29d4a2(0x1ed))[_0x29d4a2(0x213)]();if(!_0x4bafe6)throw CliErrors[_0x29d4a2(0x20c)](_0x29d4a2(0x1ed),_0x29d4a2(0x224));return _0x4bafe6;}export function readGrantRevoke(_0x3be3ac){const _0x2a5b5b=a151_0x714ad8,_0x21022b=_0x3be3ac[_0x2a5b5b(0x1f9)](_0x2a5b5b(0x21a)),_0x5e16c1=_0x3be3ac[_0x2a5b5b(0x1f9)](_0x2a5b5b(0x206));if(_0x21022b&&_0x5e16c1)throw CliErrors[_0x2a5b5b(0x1de)](_0x2a5b5b(0x1f1));if(!_0x21022b&&!_0x5e16c1)throw CliErrors[_0x2a5b5b(0x1de)](_0x2a5b5b(0x216),_0x2a5b5b(0x1e1));return _0x21022b?_0x2a5b5b(0x229):'0';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2193a7,_0x11afb4){const _0x276113=a152_0x66bc,_0xa82ab1=_0x2193a7();while(!![]){try{const _0x10c657=parseInt(_0x276113(0x128))/0x1+-parseInt(_0x276113(0x115))/0x2*(-parseInt(_0x276113(0x116))/0x3)+parseInt(_0x276113(0x11e))/0x4*(parseInt(_0x276113(0x12e))/0x5)+-parseInt(_0x276113(0x118))/0x6+-parseInt(_0x276113(0x123))/0x7*(-parseInt(_0x276113(0x120))/0x8)+-parseInt(_0x276113(0x113))/0x9*(parseInt(_0x276113(0x131))/0xa)+parseInt(_0x276113(0x121))/0xb*(parseInt(_0x276113(0x124))/0xc);if(_0x10c657===_0x11afb4)break;else _0xa82ab1['push'](_0xa82ab1['shift']());}catch(_0x14bbb0){_0xa82ab1['push'](_0xa82ab1['shift']());}}}(a152_0x2770,0x469d4));import{existsSync}from'node:fs';import a152_0x289b26 from'node:path';function a152_0x66bc(_0x3d5e76,_0x275a22){_0x3d5e76=_0x3d5e76-0x113;const _0x277065=a152_0x2770();let _0x66bcfa=_0x277065[_0x3d5e76];return _0x66bcfa;}function a152_0x2770(){const _0x5b9e44=['log','500LlFYNJ','100089XKRvLH','env','914882XsIkCr','3XkKTDa','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','2682738oRibmN','trim','√\x20App\x20Code:\x20','green','Project\x20name:','Skipped','4TDzPzy','cwd','86696PIuThc','11chUCns','resolve','14PrPBcD','1713468gaMrir','test','string','Logged\x20in','530213mYfRkk','√\x20Project\x20Name:\x20','Project\x20name\x20cannot\x20exceed\x2050\x20characters','my-app','√\x20Login\x20status:\x20','production','701460ZENElg','cyan'];a152_0x2770=function(){return _0x5b9e44;};return a152_0x2770();}import a152_0x138336 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x248f1a,_0x17902e,_0x3c0b80){const _0xd1fcae=a152_0x66bc,_0x765a1e=_0xd1fcae(0x12b),_0xf063fe=readConfig(),_0x5b064d=typeof _0xf063fe['env']===_0xd1fcae(0x126)?_0xf063fe[_0xd1fcae(0x114)]:undefined,_0x152a3d=await input({'message':_0xd1fcae(0x11c),'default':_0x765a1e,'validate':_0x3b984f=>{const _0x3e86dd=_0xd1fcae,_0x43e5ed=_0x3b984f[_0x3e86dd(0x119)]()||_0x765a1e;if(_0x43e5ed['length']>0x32)return _0x3e86dd(0x12a);const _0x417401=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x43e5ed&&!_0x417401[_0x3e86dd(0x125)](_0x43e5ed))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0xb6967b=a152_0x289b26[_0x3e86dd(0x122)](process[_0x3e86dd(0x11f)](),_0x43e5ed);if(existsSync(_0xb6967b))return'Directory\x20\x22'+_0x43e5ed+'\x22\x20already\x20exists';return!![];}});console[_0xd1fcae(0x130)](a152_0x138336[_0xd1fcae(0x11b)](_0xd1fcae(0x129)+a152_0x138336[_0xd1fcae(0x12f)](_0x152a3d)));const _0x49ff08=await selectSingleAppcode(_0x3c0b80);console[_0xd1fcae(0x130)](a152_0x138336[_0xd1fcae(0x11b)](_0xd1fcae(0x11a)+a152_0x138336[_0xd1fcae(0x12f)](_0x49ff08||'Not\x20set')));if(_0x49ff08){const _0x50a940=await getIsSessionValid();if(!_0x50a940){const _0x1ff4e7=await confirm({'message':_0xd1fcae(0x117),'default':!![]});if(_0x1ff4e7){const _0x50acc0=await authServer({'silent':!![]});console[_0xd1fcae(0x130)](a152_0x138336[_0xd1fcae(0x11b)](_0xd1fcae(0x12c)+a152_0x138336['cyan'](_0x50acc0?_0xd1fcae(0x127):'Login\x20failed')));}else console[_0xd1fcae(0x130)](a152_0x138336[_0xd1fcae(0x11b)](_0xd1fcae(0x12c)+a152_0x138336[_0xd1fcae(0x12f)](_0xd1fcae(0x11d))));}await _0x248f1a({'projectName':_0x152a3d,'appCode':_0x49ff08,'env':_0x17902e||_0x5b064d||_0xd1fcae(0x12d)});}else await _0x248f1a({'projectName':_0x152a3d,'env':_0x17902e||_0x5b064d||_0xd1fcae(0x12d)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a153_0xd5ba(){const _0x4fd61f=['26248gHnVKJ','14KOyHPh','5872869qiFKIF','169456IwZhdP','24446510YGbyDg','replace','6741828LOlznO','8MxFNHn','2842580OmkWXY','1662535WiuJsy','408hmsTDJ'];a153_0xd5ba=function(){return _0x4fd61f;};return a153_0xd5ba();}function a153_0x2d99(_0x4ac479,_0x297de1){_0x4ac479=_0x4ac479-0x1d2;const _0xd5ba0f=a153_0xd5ba();let _0x2d99de=_0xd5ba0f[_0x4ac479];return _0x2d99de;}(function(_0x34bd8a,_0x318d52){const _0x1f71f8=a153_0x2d99,_0x2fa08f=_0x34bd8a();while(!![]){try{const _0xea9608=-parseInt(_0x1f71f8(0x1d6))/0x1*(-parseInt(_0x1f71f8(0x1d8))/0x2)+parseInt(_0x1f71f8(0x1d4))/0x3*(parseInt(_0x1f71f8(0x1d5))/0x4)+-parseInt(_0x1f71f8(0x1d2))/0x5+parseInt(_0x1f71f8(0x1db))/0x6+-parseInt(_0x1f71f8(0x1d3))/0x7*(parseInt(_0x1f71f8(0x1dc))/0x8)+parseInt(_0x1f71f8(0x1d7))/0x9+-parseInt(_0x1f71f8(0x1d9))/0xa;if(_0xea9608===_0x318d52)break;else _0x2fa08f['push'](_0x2fa08f['shift']());}catch(_0xad7d2a){_0x2fa08f['push'](_0x2fa08f['shift']());}}}(a153_0xd5ba,0x937e3));export function formatElapsed(_0x261257){const _0x1f4742=a153_0x2d99,_0x2095b4=Date['now']()-_0x261257;if(_0x2095b4<0x3e8)return _0x2095b4+'ms';const _0x57767b=(_0x2095b4/0x3e8)['toFixed'](0x2),_0x1e7c9c=_0x57767b[_0x1f4742(0x1da)](/\.?0+$/u,'');return _0x1e7c9c+'s';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4449b9,_0x58cf80){const _0x3f5322=a154_0x4eec,_0x32c246=_0x4449b9();while(!![]){try{const _0x472397=parseInt(_0x3f5322(0x1e0))/0x1*(parseInt(_0x3f5322(0x1d2))/0x2)+-parseInt(_0x3f5322(0x1c8))/0x3*(-parseInt(_0x3f5322(0x1b4))/0x4)+-parseInt(_0x3f5322(0x1d8))/0x5+parseInt(_0x3f5322(0x1a1))/0x6+-parseInt(_0x3f5322(0x19d))/0x7+parseInt(_0x3f5322(0x1bd))/0x8+-parseInt(_0x3f5322(0x185))/0x9;if(_0x472397===_0x58cf80)break;else _0x32c246['push'](_0x32c246['shift']());}catch(_0x166864){_0x32c246['push'](_0x32c246['shift']());}}}(a154_0x166b,0x1cd51));import a154_0x30488c from'path';import a154_0x208f02 from'fs';import a154_0x271594 from'chalk';function a154_0x166b(){const _0x5105a1=['green','配置应用AppCode:\x20','resolve','39248gfDFHg','defaultApp','info','\x20Generated\x20by\x20rabetbase\x20cli\x20','production','580086QtbRqJ','gray','projectCode','更新\x20package.json\x20失败','cyan','accessSync','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','currentVersion','existsSync','constants','fail','API\x20配置拉取异常','env','更新\x20package.json\x20name','parse','error','length','√\x20package.json\x20updated:\x20name=','Project\x20directory\x20','1.0.0','log','项目创建完成:\x20','version','projectName','282499JqPbvX','W_OK','🚀\x20Next\x20Steps:','dirname','62016kjqkyy','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','\x20api\x20pull','join','\x20\x201.\x20Start\x20project:\x20','name','apps','repeat','modelCount','CLI\x20版本检查','appCode','\x20√\x20','stableVersion','description','...','cd\x20','\x20|\x20Default:\x20','message','*\x20Pulling\x20API\x20configuration...','8hfNdhC','\x20dataset(s),\x20generated\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','needsUpgrade','cookie','minimumVersion','utf8','string','create','44696yUiqwq','rmSync','Copy\x20project\x20files','√\x20Pulled\x20','\x20already\x20exists','Project\x20name\x20cannot\x20be\x20empty','setLogPath','stop','清理项目目录失败:\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','test','270939XqArCq','stringify','readFileSync','success','chdir','bold','trim','keys','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','package.json','6KDsAhF','\x20run\x20start','belowMinimum','开始创建项目:\x20','cwd','\x20model(s)','456925VJcraB','Project\x20name:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','warn'];a154_0x166b=function(){return _0x5105a1;};return a154_0x166b();}import a154_0x536b75 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(_0x552237){const _0x4140e8=a154_0x4eec,_0x468f3f=await checkCliVersion();(_0x468f3f[_0x4140e8(0x1b7)]||_0x468f3f[_0x4140e8(0x1d4)])&&(printCliUpgradeWarning(_0x468f3f),assertCliVersionSupported(_0x468f3f),logger[_0x4140e8(0x1e2)](_0x4140e8(0x1bc),_0x4140e8(0x1aa),{'currentVersion':_0x468f3f[_0x4140e8(0x18c)],'stableVersion':_0x468f3f[_0x4140e8(0x1ad)],'minimumVersion':_0x468f3f[_0x4140e8(0x1b9)],'needsUpgrade':_0x468f3f[_0x4140e8(0x1b7)],'belowMinimum':_0x468f3f[_0x4140e8(0x1d4)]}));if(_0x552237['projectCode']&&_0x552237['appCode'])await runCreate({'projectName':_0x552237[_0x4140e8(0x187)],'appCode':_0x552237[_0x4140e8(0x1ab)],'env':_0x552237['env']},_0x552237);else{if(_0x552237[_0x4140e8(0x187)]){const _0x5bc8da=await selectSingleAppcode(_0x552237[_0x4140e8(0x1b8)]);await runCreate({'projectName':_0x552237[_0x4140e8(0x187)],'appCode':_0x5bc8da||undefined,'env':_0x552237['env']},_0x552237);}else await guidedCreateProject(_0x3eb6f5=>runCreate(_0x3eb6f5,_0x552237),_0x552237[_0x4140e8(0x191)],_0x552237[_0x4140e8(0x1b8)]);}}async function runCreate(_0x2cb40c,_0x36efdf){const _0x159e98=a154_0x4eec;if(!_0x2cb40c[_0x159e98(0x19c)]||_0x2cb40c[_0x159e98(0x19c)][_0x159e98(0x1ce)]()==='')throw new Error(_0x159e98(0x1c2));const _0x1904d1=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1904d1[_0x159e98(0x1c7)](_0x2cb40c['projectName']))throw new Error(_0x159e98(0x1d0));if(_0x2cb40c['projectName'][_0x159e98(0x195)]>0x64)throw new Error(_0x159e98(0x1b6));const _0x14c173=a154_0x30488c[_0x159e98(0x1df)](process[_0x159e98(0x1d6)](),_0x2cb40c[_0x159e98(0x19c)]);if(a154_0x208f02[_0x159e98(0x18d)](_0x14c173))throw new Error(_0x159e98(0x197)+_0x2cb40c[_0x159e98(0x19c)]+_0x159e98(0x1c1));try{a154_0x208f02[_0x159e98(0x18a)](a154_0x30488c[_0x159e98(0x1a0)](_0x14c173),a154_0x208f02[_0x159e98(0x18e)][_0x159e98(0x19e)]);}catch{throw new Error(_0x159e98(0x1db));}logger[_0x159e98(0x1c3)](_0x14c173),logger[_0x159e98(0x1e2)](_0x159e98(0x1bc),_0x159e98(0x1d5)+_0x2cb40c[_0x159e98(0x19c)],{'projectDir':_0x14c173,'appCode':_0x2cb40c[_0x159e98(0x1ab)]}),console[_0x159e98(0x199)](),console['log'](a154_0x271594['green']('\x20√\x20')+_0x159e98(0x1d9)+a154_0x271594[_0x159e98(0x1dd)](_0x2cb40c[_0x159e98(0x19c)])+(_0x2cb40c[_0x159e98(0x1ab)]?'\x20|\x20AppCode:\x20'+a154_0x271594['cyan'](_0x2cb40c[_0x159e98(0x1ab)]):''));try{await runTask(_0x159e98(0x1bf),()=>copyProjectTemplate(_0x2cb40c[_0x159e98(0x19c)])),await updatePackageJsonName(_0x2cb40c[_0x159e98(0x19c)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x2cb40c[_0x159e98(0x19c)])),await runTask('Format\x20code',()=>formatProjectCode(_0x2cb40c['projectName'])),await configureAppCode(_0x2cb40c[_0x159e98(0x19c)],_0x2cb40c[_0x159e98(0x1ab)]||'',_0x2cb40c[_0x159e98(0x191)]);let _0x3038ea=![];if(_0x2cb40c[_0x159e98(0x1ab)]){console[_0x159e98(0x199)](_0x159e98(0x1b3));const _0x2d87d3=process[_0x159e98(0x1d6)]();try{process[_0x159e98(0x1cc)](_0x14c173);const _0x3200f7=_0x2cb40c[_0x159e98(0x191)]||_0x159e98(0x1e4);initEnv(_0x3200f7);const {configArray:_0x1b314f}=await fetchModelList(_0x2cb40c[_0x159e98(0x1ab)],_0x36efdf[_0x159e98(0x1b8)]||''),_0x1db400=DEFAULT_API_DIR,_0x256abb=await generateApiFile(_0x1b314f,'',_0x2cb40c[_0x159e98(0x1ab)],!![],_0x3200f7,_0x1db400);console['log'](_0x159e98(0x1c0)+_0x1b314f[_0x159e98(0x195)]+_0x159e98(0x1b5)+_0x256abb[_0x159e98(0x1a9)]+_0x159e98(0x1d7)),logger['info']('create','API\x20configuration\x20pulled:\x20'+_0x2cb40c[_0x159e98(0x1ab)]);}catch(_0x5879f5){_0x3038ea=!![],console['log'](_0x159e98(0x1da)),logger[_0x159e98(0x1dc)](_0x159e98(0x1bc),_0x159e98(0x190),{'error':_0x5879f5 instanceof Error?_0x5879f5['message']:String(_0x5879f5)});}finally{process[_0x159e98(0x1cc)](_0x2d87d3);}}logger[_0x159e98(0x1cb)]('create',_0x159e98(0x19a)+_0x2cb40c['projectName']),console[_0x159e98(0x199)](),console[_0x159e98(0x199)](a154_0x271594[_0x159e98(0x1dd)]('─'[_0x159e98(0x1a8)](0x3c))),console[_0x159e98(0x199)](a154_0x271594['cyan'][_0x159e98(0x1cd)](_0x159e98(0x19f))),console[_0x159e98(0x199)](),console[_0x159e98(0x199)](_0x159e98(0x1a5)+a154_0x271594['cyan']['bold'](_0x159e98(0x1b0)+_0x2cb40c[_0x159e98(0x19c)]+'\x20&&\x20'+CLI_BIN_NAME+_0x159e98(0x1d3))),_0x3038ea&&console[_0x159e98(0x199)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a154_0x271594[_0x159e98(0x189)][_0x159e98(0x1cd)](CLI_BIN_NAME+_0x159e98(0x1a3))),console[_0x159e98(0x199)](a154_0x271594[_0x159e98(0x1dd)]('─'[_0x159e98(0x1a8)](0x3c)));}catch(_0x5b726e){logger[_0x159e98(0x194)](_0x159e98(0x1bc),'项目创建失败:\x20'+_0x2cb40c[_0x159e98(0x19c)],{'error':_0x5b726e instanceof Error?_0x5b726e[_0x159e98(0x1b2)]:String(_0x5b726e)});try{a154_0x208f02['existsSync'](_0x14c173)&&(console[_0x159e98(0x199)](_0x159e98(0x18b)+_0x14c173),a154_0x208f02[_0x159e98(0x1be)](_0x14c173,{'recursive':!![],'force':!![]}));}catch{logger[_0x159e98(0x1dc)](_0x159e98(0x1bc),_0x159e98(0x1c5)+_0x14c173);}throw _0x5b726e;}}function a154_0x4eec(_0xeef159,_0xf4ba95){_0xeef159=_0xeef159-0x185;const _0x166bf1=a154_0x166b();let _0x4eec19=_0x166bf1[_0xeef159];return _0x4eec19;}async function runTask(_0x13762b,_0x1dbcea){const _0x2ed032=a154_0x4eec,_0x3ad87d=a154_0x536b75(_0x13762b+_0x2ed032(0x1af))['start']();try{const _0x3967fb=await _0x1dbcea();_0x3ad87d[_0x2ed032(0x1c4)](),console['log'](''+a154_0x271594['green'](_0x2ed032(0x1ac))+_0x13762b+'\x20'+a154_0x271594[_0x2ed032(0x186)]('['+_0x3967fb+']'));}catch(_0x5cabe1){_0x3ad87d[_0x2ed032(0x18f)](_0x13762b);throw _0x5cabe1;}}async function updatePackageJsonName(_0x5889d0){const _0x37b5d8=a154_0x4eec,_0x30698f=a154_0x30488c['resolve'](process['cwd'](),_0x5889d0),_0x2c3f7a=a154_0x30488c[_0x37b5d8(0x1a4)](_0x30698f,_0x37b5d8(0x1d1));try{console[_0x37b5d8(0x199)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x13b868=getRabetbaseCliPackageRoot(),_0x30d60b=a154_0x30488c['join'](_0x13b868,_0x37b5d8(0x1d1));let _0x11e31b='1.0.0';try{const _0x145960=JSON['parse'](a154_0x208f02[_0x37b5d8(0x1ca)](_0x30d60b,'utf8'));_0x11e31b=_0x145960[_0x37b5d8(0x19b)]||_0x37b5d8(0x198);}catch{}const _0x3dad00=a154_0x208f02[_0x37b5d8(0x1ca)](_0x2c3f7a,_0x37b5d8(0x1ba)),_0x7e385=JSON[_0x37b5d8(0x193)](_0x3dad00);_0x7e385[_0x37b5d8(0x1a6)]=_0x5889d0,_0x7e385[_0x37b5d8(0x1ae)]=_0x5889d0+_0x37b5d8(0x1e3)+_0x11e31b,a154_0x208f02['writeFileSync'](_0x2c3f7a,JSON[_0x37b5d8(0x1c9)](_0x7e385,null,0x2)+'\x0a',_0x37b5d8(0x1ba)),console[_0x37b5d8(0x199)](_0x37b5d8(0x196)+_0x5889d0),logger[_0x37b5d8(0x1e2)](_0x37b5d8(0x1bc),_0x37b5d8(0x192));}catch(_0x43158d){logger[_0x37b5d8(0x194)](_0x37b5d8(0x1bc),_0x37b5d8(0x188));throw _0x43158d;}}async function configureAppCode(_0x39a160,_0x2ba484,_0x2f3981){const _0x4fda52=a154_0x4eec,_0x2397d9=a154_0x30488c[_0x4fda52(0x1df)](process[_0x4fda52(0x1d6)](),_0x39a160),_0x22d55e=a154_0x30488c[_0x4fda52(0x1a4)](_0x2397d9,NEW_CONFIG_NAME);try{_0x2ba484?console[_0x4fda52(0x199)](_0x4fda52(0x1c6)+_0x39a160+':\x20'+_0x2ba484):console['log'](_0x4fda52(0x1a2)+_0x39a160);const _0x4aaf4d=getRabetbaseCliPackageRoot(),_0x4b4b1d=a154_0x30488c[_0x4fda52(0x1a4)](_0x4aaf4d,_0x4fda52(0x1d1));let _0x32f097=_0x4fda52(0x198);try{const _0x4dfa6b=JSON[_0x4fda52(0x193)](a154_0x208f02[_0x4fda52(0x1ca)](_0x4b4b1d,'utf8'));_0x32f097=_0x4dfa6b['version']||_0x4fda52(0x198);}catch{}const _0x304b86=readConfig(),_0x379b82=typeof _0x304b86['env']===_0x4fda52(0x1bb)?_0x304b86['env']:undefined,_0x11a379={};for(const _0x533e47 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x304b86[_0x533e47]!=null)_0x11a379[_0x533e47]=_0x304b86[_0x533e47];}const _0x4eec22=buildCanonicalProjectConfig(_0x11a379,{'appCodes':_0x2ba484?[_0x2ba484]:[],'env':_0x2f3981||_0x379b82||_0x4fda52(0x1e4),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x32f097}});writeConfigFile(_0x22d55e,_0x4eec22),_0x2ba484?console[_0x4fda52(0x199)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x4fda52(0x1cf)](_0x4eec22[_0x4fda52(0x1a7)]||{})[_0x4fda52(0x1a4)](',\x20')+_0x4fda52(0x1b1)+_0x4eec22[_0x4fda52(0x1e1)]):console[_0x4fda52(0x199)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0x4fda52(0x1e2)](_0x4fda52(0x1bc),_0x4fda52(0x1de)+_0x2ba484);}catch(_0x2165ca){logger['error'](_0x4fda52(0x1bc),'配置应用AppCode失败');}}
|
|
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 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x395b25,_0x339846){const _0x37fd9b=a155_0x4d9a,_0x19ef02=_0x395b25();while(!![]){try{const _0x49e2fd=-parseInt(_0x37fd9b(0x19f))/0x1+-parseInt(_0x37fd9b(0x19a))/0x2+parseInt(_0x37fd9b(0x1ba))/0x3*(parseInt(_0x37fd9b(0x197))/0x4)+-parseInt(_0x37fd9b(0x1a5))/0x5+-parseInt(_0x37fd9b(0x1ad))/0x6+parseInt(_0x37fd9b(0x1b5))/0x7+parseInt(_0x37fd9b(0x1b3))/0x8;if(_0x49e2fd===_0x339846)break;else _0x19ef02['push'](_0x19ef02['shift']());}catch(_0x292779){_0x19ef02['push'](_0x19ef02['shift']());}}}(a155_0x250c,0xf1b04));import a155_0x3bc7fd from'path';import a155_0x2ae80b from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';function a155_0x4d9a(_0x212fd4,_0x433c52){_0x212fd4=_0x212fd4-0x18a;const _0x250c95=a155_0x250c();let _0x4d9a13=_0x250c95[_0x212fd4];return _0x4d9a13;}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_0x250c(){const _0x3c7f8a=['268945LAfcjy','toLocaleString','description','W_OK','bun\x20run\x20format','writeFile','\x0a\x20\x20cd\x20','Project\x20directory\x20\x22','7668996oLZwjx','ignore','modelCount','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20Code\x20formatted','\x20dataset(s),\x20generated\x20','34509912DdScTl','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','3864287vOIGDt','cwd','readFile','\x20\x20√\x20Pulled\x20','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','2597355kkgrIl','length','test','bun','\x20api\x20pull`\x20manually\x20later.','constants','Use\x20a\x20different\x20project\x20name.','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','env','npm','name','join','bun\x20--version','...','access','Project\x20name\x20cannot\x20be\x20empty.','log','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','4tXzddz','validation','parse','3769168AWGWhx','*\x20Creating\x20project\x20','production','chdir','resolve','1525070kqqaxn','needsUpgrade','\x20\x20√\x20Project\x20template\x20created','stringify','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x22\x20already\x20exists.'];a155_0x250c=function(){return _0x3c7f8a;};return a155_0x250c();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x3cbcbc,_0xa5d811,_0x1091fd,_0x442f7a){const _0x1c60c8=a155_0x4d9a,_0x10443e=await checkCliVersion();(_0x10443e[_0x1c60c8(0x1a0)]||_0x10443e['belowMinimum'])&&(printCliUpgradeWarning(_0x10443e),assertCliVersionSupported(_0x10443e));if(!_0x3cbcbc||_0x3cbcbc['trim']()==='')throw CliErrors[_0x1c60c8(0x198)](_0x1c60c8(0x194));const _0x2abae2=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2abae2[_0x1c60c8(0x1bc)](_0x3cbcbc))throw CliErrors['validation']('Project\x20name\x20contains\x20invalid\x20characters.',_0x1c60c8(0x1a3));if(_0x3cbcbc[_0x1c60c8(0x1bb)]>0x64)throw CliErrors[_0x1c60c8(0x198)](_0x1c60c8(0x196));const _0x5c668c=a155_0x3bc7fd[_0x1c60c8(0x19e)](process[_0x1c60c8(0x1b6)](),_0x3cbcbc);if(existsSync(_0x5c668c))throw CliErrors[_0x1c60c8(0x198)](_0x1c60c8(0x1ac)+_0x3cbcbc+_0x1c60c8(0x1a4),_0x1c60c8(0x18b));try{const _0x2f15d9=a155_0x3bc7fd['dirname'](_0x5c668c);await a155_0x2ae80b[_0x1c60c8(0x193)](_0x2f15d9,a155_0x2ae80b[_0x1c60c8(0x18a)][_0x1c60c8(0x1a8)]);}catch{throw CliErrors[_0x1c60c8(0x198)](_0x1c60c8(0x1b0),'Check\x20directory\x20permissions.');}try{console[_0x1c60c8(0x195)](_0x1c60c8(0x19b)+_0x3cbcbc+_0x1c60c8(0x192));const _0x56329d=getSubAppReactDemoTemplateDir();await copyDirectory(_0x56329d,_0x5c668c),console[_0x1c60c8(0x195)](_0x1c60c8(0x1a1)),await updatePackageJsonName(_0x3cbcbc),console['log']('\x20\x20√\x20package.json\x20updated'),console[_0x1c60c8(0x195)]('\x20\x20Installing\x20dependencies...'),console[_0x1c60c8(0x195)](_0x1c60c8(0x1b9)),await formatCode(_0x5c668c),console['log'](_0x1c60c8(0x1b1)),await configureProject(_0x3cbcbc,_0x1091fd,_0xa5d811),console[_0x1c60c8(0x195)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x1091fd&&await pullApiConfig(_0x5c668c,_0x1091fd,_0xa5d811,_0x442f7a),console[_0x1c60c8(0x195)]('\x0a√\x20Project\x20'+_0x3cbcbc+'\x20created\x20successfully!'),console[_0x1c60c8(0x195)](_0x1c60c8(0x1ab)+_0x3cbcbc),console[_0x1c60c8(0x195)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x245236){try{existsSync(_0x5c668c)&&await a155_0x2ae80b['rm'](_0x5c668c,{'recursive':!![],'force':!![]});}catch{}throw _0x245236;}}async function updatePackageJsonName(_0x29eb18){const _0xc56250=a155_0x4d9a,_0x373218=a155_0x3bc7fd[_0xc56250(0x19e)](process['cwd'](),_0x29eb18),_0x5012ca=a155_0x3bc7fd[_0xc56250(0x190)](_0x373218,'package.json'),_0x167c31=await a155_0x2ae80b[_0xc56250(0x1b7)](_0x5012ca,'utf-8'),_0x3ce19f=JSON[_0xc56250(0x199)](_0x167c31);_0x3ce19f[_0xc56250(0x18f)]=_0x29eb18,_0x3ce19f[_0xc56250(0x1a7)]=_0xc56250(0x18c),await a155_0x2ae80b[_0xc56250(0x1aa)](_0x5012ca,JSON[_0xc56250(0x1a2)](_0x3ce19f,null,0x2)+'\x0a');}function detectPackageManager(){const _0x3ab8a2=a155_0x4d9a;try{return execSync(_0x3ab8a2(0x191),{'stdio':_0x3ab8a2(0x1ae)}),_0x3ab8a2(0x1bd);}catch{return _0x3ab8a2(0x18e);}}async function formatCode(_0x1edd41){const _0x4e6855=a155_0x4d9a;try{await execAsync(_0x4e6855(0x1a9),{'cwd':_0x1edd41});}catch{}}async function configureProject(_0x5967f6,_0x27da72,_0x1a1ff3){const _0x4948f6=a155_0x4d9a,_0x33d532=a155_0x3bc7fd['resolve'](process['cwd'](),_0x5967f6),_0x16225b=a155_0x3bc7fd[_0x4948f6(0x190)](_0x33d532,NEW_CONFIG_NAME),_0x4d0e9d=readConfig(),_0xd50367=typeof _0x4d0e9d[_0x4948f6(0x18d)]==='string'?_0x4d0e9d['env']:undefined,_0x2a39de={};for(const _0x47721c of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4d0e9d[_0x47721c]!=null)_0x2a39de[_0x47721c]=_0x4d0e9d[_0x47721c];}const _0x98c524=buildCanonicalProjectConfig(_0x2a39de,{'appCodes':_0x27da72?[_0x27da72]:[],'env':_0x1a1ff3||_0xd50367||_0x4948f6(0x19c),'metadata':{'createdAt':new Date()[_0x4948f6(0x1a6)](),'version':getCliVersion()}});writeConfigFile(_0x16225b,_0x98c524);}async function pullApiConfig(_0x22244c,_0x146a1c,_0xb0c541,_0x3db003){const _0x4826ca=a155_0x4d9a,_0x241bc1=process[_0x4826ca(0x1b6)]();try{process['chdir'](_0x22244c);const _0x4e95e5=_0xb0c541||'production';initEnv(_0x4e95e5),console[_0x4826ca(0x195)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x407fd0}=await fetchModelList(_0x146a1c,_0x3db003||''),_0x23586f=await generateApiFile(_0x407fd0,'',_0x146a1c,!![],_0x4e95e5,DEFAULT_API_DIR);console['log'](_0x4826ca(0x1b8)+_0x407fd0[_0x4826ca(0x1bb)]+_0x4826ca(0x1b2)+_0x23586f[_0x4826ca(0x1af)]+'\x20model(s)');}catch(_0x37dd68){console[_0x4826ca(0x195)](_0x4826ca(0x1b4)+CLI_BIN_NAME+_0x4826ca(0x1be));}finally{process[_0x4826ca(0x19d)](_0x241bc1);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a156_0x4139(){const _0x2c3161=['205920ziSvea','../../../../','10608633sBDVqg','templates','dirname','6602766HeLosv','24YiajGk','2448733cfuPbk','143558wAkIGT','24861dzMbgc','resolve','8nPFRyw','202805TzPnGv','join'];a156_0x4139=function(){return _0x2c3161;};return a156_0x4139();}const a156_0x4b4b9d=a156_0x32c3;(function(_0x111b4f,_0x5873d7){const _0x519b88=a156_0x32c3,_0x433c86=_0x111b4f();while(!![]){try{const _0x17414a=-parseInt(_0x519b88(0xcc))/0x1+-parseInt(_0x519b88(0xc6))/0x2+parseInt(_0x519b88(0xc7))/0x3+parseInt(_0x519b88(0xc9))/0x4*(parseInt(_0x519b88(0xca))/0x5)+-parseInt(_0x519b88(0xc3))/0x6+-parseInt(_0x519b88(0xc5))/0x7*(-parseInt(_0x519b88(0xc4))/0x8)+parseInt(_0x519b88(0xc0))/0x9;if(_0x17414a===_0x5873d7)break;else _0x433c86['push'](_0x433c86['shift']());}catch(_0x2292b6){_0x433c86['push'](_0x433c86['shift']());}}}(a156_0x4139,0xe55b3));function a156_0x32c3(_0x5cf0db,_0x3042b4){_0x5cf0db=_0x5cf0db-0xbf;const _0x413985=a156_0x4139();let _0x32c399=_0x413985[_0x5cf0db];return _0x32c399;}import a156_0x536f45 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a156_0x536f45[a156_0x4b4b9d(0xc2)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x185e2f=a156_0x4b4b9d;return a156_0x536f45[_0x185e2f(0xc8)](__dirname,_0x185e2f(0xbf));}export function getSubAppReactDemoTemplateDir(){const _0x5c92cd=a156_0x4b4b9d;return a156_0x536f45[_0x5c92cd(0xcb)](getRabetbaseCliPackageRoot(),_0x5c92cd(0xc1),'projects','sub-app-react-demo');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x75b324,_0x40f7eb){const _0x57bc84=a157_0x22aa,_0x16cd3d=_0x75b324();while(!![]){try{const _0xdb6b3e=-parseInt(_0x57bc84(0x121))/0x1+-parseInt(_0x57bc84(0x11d))/0x2*(parseInt(_0x57bc84(0x12f))/0x3)+parseInt(_0x57bc84(0x125))/0x4*(parseInt(_0x57bc84(0x12e))/0x5)+parseInt(_0x57bc84(0x126))/0x6+parseInt(_0x57bc84(0x12d))/0x7*(-parseInt(_0x57bc84(0x130))/0x8)+parseInt(_0x57bc84(0x129))/0x9*(-parseInt(_0x57bc84(0x127))/0xa)+parseInt(_0x57bc84(0x124))/0xb;if(_0xdb6b3e===_0x40f7eb)break;else _0x16cd3d['push'](_0x16cd3d['shift']());}catch(_0x10b565){_0x16cd3d['push'](_0x16cd3d['shift']());}}}(a157_0x54dc,0xd3178));import a157_0x32d6dd from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';function a157_0x22aa(_0x117760,_0x30079c){_0x117760=_0x117760-0x11d;const _0x54dc29=a157_0x54dc();let _0x22aa59=_0x54dc29[_0x117760];return _0x22aa59;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a157_0x54dc(){const _0x502900=['8567720qftDTl','error','9QIYecO','开始复制项目模板','info','now','7514619BzARpw','28915gUEPzh','3DqAffA','8uCiaKz','项目模板复制完成','1728516qSplac','resolve','项目模板复制失败','message','985459WvjUUr','copy','cwd','25125375ISkPtR','572xWVsoL','9201264ILJoZR'];a157_0x54dc=function(){return _0x502900;};return a157_0x54dc();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x1fe4a4){const _0x503ba3=a157_0x22aa,_0x52000b=Date[_0x503ba3(0x12c)](),_0x32d370=a157_0x32d6dd[_0x503ba3(0x11e)](process[_0x503ba3(0x123)](),_0x1fe4a4);try{logger[_0x503ba3(0x12b)]('copy',_0x503ba3(0x12a),{'projectCode':_0x1fe4a4,'templateDir':templateDir}),await copyDirectory(templateDir,_0x32d370);const _0x4c7be2=Date[_0x503ba3(0x12c)]()-_0x52000b;logger['success'](_0x503ba3(0x122),_0x503ba3(0x131),_0x4c7be2,{'projectCode':_0x1fe4a4});}catch(_0x53302f){const _0x3680ed=Date[_0x503ba3(0x12c)]()-_0x52000b;logger[_0x503ba3(0x128)](_0x503ba3(0x122),_0x503ba3(0x11f),{'projectCode':_0x1fe4a4,'error':_0x53302f instanceof Error?_0x53302f[_0x503ba3(0x120)]:String(_0x53302f),'duration':_0x3680ed});throw _0x53302f;}return formatElapsed(_0x52000b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a158_0x5eef(){const _0xd7b869=['18599vnmvjb','cwd','281224wRdYTa','--write','代码格式化完成','11256odwWOS','resolve','代码格式化失败','success','format','message','63MuqINK','1632205esoYVS','610068DpqPWC','now','94380sWIyLa','175756ghTyTI','prettier','6RaEzgx','npx'];a158_0x5eef=function(){return _0xd7b869;};return a158_0x5eef();}(function(_0xa24776,_0x30f4fd){const _0x75b34=a158_0x36ba,_0x1f98d8=_0xa24776();while(!![]){try{const _0x211588=parseInt(_0x75b34(0xbf))/0x1+parseInt(_0x75b34(0xce))/0x2+parseInt(_0x75b34(0xcc))/0x3+parseInt(_0x75b34(0xc4))/0x4+-parseInt(_0x75b34(0xcb))/0x5*(parseInt(_0x75b34(0xbd))/0x6)+-parseInt(_0x75b34(0xbb))/0x7+parseInt(_0x75b34(0xc1))/0x8*(parseInt(_0x75b34(0xca))/0x9);if(_0x211588===_0x30f4fd)break;else _0x1f98d8['push'](_0x1f98d8['shift']());}catch(_0x356005){_0x1f98d8['push'](_0x1f98d8['shift']());}}}(a158_0x5eef,0x28a51));import a158_0x39804c from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a158_0x36ba(_0x25d251,_0x1025c4){_0x25d251=_0x25d251-0xbb;const _0x5eefe1=a158_0x5eef();let _0x36baff=_0x5eefe1[_0x25d251];return _0x36baff;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x265f6a){const _0x35ff74=a158_0x36ba,_0x3a948f=Date[_0x35ff74(0xcd)](),_0x1b29c2=a158_0x39804c[_0x35ff74(0xc5)](process[_0x35ff74(0xc0)](),_0x265f6a);try{logger['info'](_0x35ff74(0xc8),'开始格式化代码',{'projectCode':_0x265f6a}),await execa(resolveNpmBin(_0x35ff74(0xbe)),[_0x35ff74(0xbc),_0x35ff74(0xc2),'.'],{'cwd':_0x1b29c2});const _0x448f5d=Date['now']()-_0x3a948f;logger[_0x35ff74(0xc7)]('format',_0x35ff74(0xc3),_0x448f5d,{'projectCode':_0x265f6a});}catch(_0x1002e8){const _0x29123b=Date[_0x35ff74(0xcd)]()-_0x3a948f;logger['error']('format',_0x35ff74(0xc6),{'projectCode':_0x265f6a,'error':_0x1002e8 instanceof Error?_0x1002e8[_0x35ff74(0xc9)]:String(_0x1002e8),'duration':_0x29123b});throw _0x1002e8;}return formatElapsed(_0x3a948f);}
|