@lovrabet/rabetbase-cli 2.3.16-beta.2 → 2.3.16-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -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
- package/templates/projects/sub-app-react-demo/CHANGELOG.md +1 -1
- package/templates/projects/sub-app-react-demo/README.md +1 -1
- package/templates/projects/sub-app-react-demo/docs/quick-start.md +1 -1
- package/templates/projects/sub-app-react-demo/src/pages/index.tsx +1 -1
- package/lib/commands/project/init.js +0 -1
- package/lib/commands/sql/save.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x1c972b=a143_0x448a;(function(_0x550540,_0x170226){const _0xe7c736=a143_0x448a,_0x4ccad3=_0x550540();while(!![]){try{const _0x34f179=-parseInt(_0xe7c736(0x1e1))/0x1*(parseInt(_0xe7c736(0x1f6))/0x2)+parseInt(_0xe7c736(0x1e2))/0x3*(parseInt(_0xe7c736(0x1ef))/0x4)+parseInt(_0xe7c736(0x1e9))/0x5*(-parseInt(_0xe7c736(0x1e5))/0x6)+-parseInt(_0xe7c736(0x1ea))/0x7+parseInt(_0xe7c736(0x1f3))/0x8+-parseInt(_0xe7c736(0x1ec))/0x9+-parseInt(_0xe7c736(0x1e0))/0xa*(-parseInt(_0xe7c736(0x1e4))/0xb);if(_0x34f179===_0x170226)break;else _0x4ccad3['push'](_0x4ccad3['shift']());}catch(_0xa1fdca){_0x4ccad3['push'](_0x4ccad3['shift']());}}}(a143_0x30e5,0x51b16));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':a143_0x1c972b(0x1ee),'command':'standard-page-status','description':a143_0x1c972b(0x1e3),'risk':a143_0x1c972b(0x1fb),'defaultOutputFormat':a143_0x1c972b(0x1ed),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a143_0x1c972b(0x1fa),'type':a143_0x1c972b(0x1f1),'description':a143_0x1c972b(0x1f7)}],async 'validate'(_0xd8154f){validateDatasetSelector(_0xd8154f);},async 'dryRun'(_0x1e6a5f){const _0x3733ba=a143_0x1c972b,_0x3f03d7=await loadDatasetDetailForPage(_0x1e6a5f);return{'method':_0x3733ba(0x1f5),'url':_0x3733ba(0x1f9)+_0x3f03d7[_0x3733ba(0x1eb)]+'/standard-page-status?appCode='+encodeURIComponent(_0x1e6a5f['appCode']),'description':serializeDryRunDescription({'dataset':{'id':_0x3f03d7['id'],'code':_0x3f03d7[_0x3733ba(0x1eb)],'name':_0x3f03d7[_0x3733ba(0x1e6)]},'action':_0x3733ba(0x1df)})};},async 'execute'(_0x3d2ddf){const _0x40a3e8=a143_0x1c972b,_0x14b5fc=await loadDatasetDetailForPage(_0x3d2ddf),_0x5ad7fd=await loadStandardPageStatusForGenerate(_0x3d2ddf,_0x14b5fc[_0x40a3e8(0x1eb)]),_0x5baed7=getUndeletedRelatedPages(_0x14b5fc),_0x3313df=assessStandardPageState(_0x14b5fc[_0x40a3e8(0x1eb)],_0x5ad7fd,{'fallbackUndeletedPages':_0x5baed7});return{'ok':!![],'data':{'datasetCode':_0x14b5fc[_0x40a3e8(0x1eb)],'precheckSource':_0x5ad7fd?.[_0x40a3e8(0x1f2)]??_0x40a3e8(0x1f4),'status':_0x3313df['status'],'manualResolutionRequired':_0x3313df[_0x40a3e8(0x1e7)],'nextAction':_0x3313df[_0x40a3e8(0x1e8)],'standardPageStatus':_0x5ad7fd,'relatedPages':{'total':_0x14b5fc[_0x40a3e8(0x1f8)][_0x40a3e8(0x1f0)],'undeletedCount':_0x5baed7['length']}}};}};function a143_0x448a(_0x4ad3fe,_0x566cd2){_0x4ad3fe=_0x4ad3fe-0x1df;const _0x30e53e=a143_0x30e5();let _0x448afe=_0x30e53e[_0x4ad3fe];return _0x448afe;}function a143_0x30e5(){const _0x22bb75=['length','string','source','3722560MScaGm','related-pages-fallback','GET','44SmaJAG','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','relatedPages','/smartapi/lovrabet/dataset/','alias','read','query-standard-page-status','2330080peUhBT','14395uLrKER','99357CwbGrZ','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','55OvWAJV','1620726rZDigG','name','manualResolutionRequired','nextAction','5QcZGXU','3083675yfzPVc','code','5694471LxowuI','compress','page','44DBQlgI'];a143_0x30e5=function(){return _0x22bb75;};return a143_0x30e5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a144_0x392ce6=a144_0x5620;(function(_0x29384b,_0x2a2288){const _0x706645=a144_0x5620,_0x55e385=_0x29384b();while(!![]){try{const _0x2f5cf8=parseInt(_0x706645(0xfe))/0x1*(parseInt(_0x706645(0x10b))/0x2)+-parseInt(_0x706645(0x118))/0x3+parseInt(_0x706645(0x102))/0x4*(-parseInt(_0x706645(0xfb))/0x5)+-parseInt(_0x706645(0x117))/0x6*(-parseInt(_0x706645(0x114))/0x7)+parseInt(_0x706645(0x116))/0x8*(-parseInt(_0x706645(0x112))/0x9)+-parseInt(_0x706645(0x10a))/0xa*(parseInt(_0x706645(0x10f))/0xb)+parseInt(_0x706645(0x110))/0xc*(parseInt(_0x706645(0x113))/0xd);if(_0x2f5cf8===_0x2a2288)break;else _0x55e385['push'](_0x55e385['shift']());}catch(_0x3473b4){_0x55e385['push'](_0x55e385['shift']());}}}(a144_0x4c71,0x38052));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a144_0x5620(_0x193b11,_0x4ddf97){_0x193b11=_0x193b11-0xfa;const _0x4c711e=a144_0x4c71();let _0x5620b7=_0x4c711e[_0x193b11];return _0x5620b7;}import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a144_0x392ce6(0x10d),'command':'sync','description':'Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','risk':a144_0x392ce6(0x105),'defaultOutputFormat':a144_0x392ce6(0xff),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a144_0x392ce6(0x103),'type':'string','description':a144_0x392ce6(0x109)}],async 'validate'(_0x25d35f){validateDatasetSelector(_0x25d35f);},async 'dryRun'(_0x31f496){const _0x19f537=a144_0x392ce6,_0x49eb08=await prepare(_0x31f496);return{'method':'POST','url':_0x19f537(0x119)+_0x49eb08[_0x19f537(0x104)]['code']+_0x19f537(0x11a),'body':{'appCode':_0x31f496[_0x19f537(0x111)]},'description':serializeDryRunDescription({'dataset':{'id':_0x49eb08[_0x19f537(0x104)]['id'],'code':_0x49eb08[_0x19f537(0x104)][_0x19f537(0x10c)],'name':_0x49eb08[_0x19f537(0x104)][_0x19f537(0x101)],'fieldCount':_0x49eb08[_0x19f537(0x104)]['fieldCount']},'relatedPages':{'total':_0x49eb08[_0x19f537(0x104)][_0x19f537(0x107)][_0x19f537(0x108)],'undeletedCount':_0x49eb08[_0x19f537(0x100)][_0x19f537(0x108)]},'action':_0x19f537(0x115),'reason':_0x49eb08[_0x19f537(0x100)][_0x19f537(0x108)]+_0x19f537(0x106)})};},async 'execute'(_0x41494b){const _0x2ac440=a144_0x392ce6,_0xf2b400=await prepare(_0x41494b),_0x47a284=await syncStandardPages(_0x41494b['appCode'],_0xf2b400[_0x2ac440(0x104)]['code']),_0x4baccc=Array[_0x2ac440(0xfa)](_0x47a284[_0x2ac440(0xfd)])&&_0x47a284['failedPages'][_0x2ac440(0x108)]>0x0,_0x361ca1=_0x4baccc?_0x2ac440(0xfc):_0x2ac440(0x10e);return{'ok':!![],'message':_0x361ca1,'data':{'datasetCode':_0xf2b400[_0x2ac440(0x104)][_0x2ac440(0x10c)],..._0x47a284}};}};function a144_0x4c71(){const _0x1e577a=['1219012AAYnPu','alias','dataset','write','\x20undeleted\x20related\x20page(s)\x20found','relatedPages','length','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','498990HOlZnU','407806oYjZeu','code','page','同步成功','55mvheXI','10603140oIYvXP','appCode','45eRzZqD','13ZifwqS','908005Zlolnh','sync','353144zqACRU','12XQYqSS','1027521bXgbKE','/smartapi/lovrabet/dataset/','/sync-to-pages','isArray','5gcKrJk','部分页面同步失败','failedPages','1rNAtgI','compress','undeletedPages','name'];a144_0x4c71=function(){return _0x1e577a;};return a144_0x4c71();}async function prepare(_0x276012){const _0x254df8=await loadDatasetDetailForPage(_0x276012);return prepareDatasetAction(_0x254df8,'sync');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x26fc70,_0x41e9c1){const _0x2545cc=a145_0x4bf6,_0x527887=_0x26fc70();while(!![]){try{const _0x5f2b08=-parseInt(_0x2545cc(0x1d8))/0x1*(-parseInt(_0x2545cc(0x1d9))/0x2)+-parseInt(_0x2545cc(0x1da))/0x3*(parseInt(_0x2545cc(0x1d7))/0x4)+-parseInt(_0x2545cc(0x1dd))/0x5*(parseInt(_0x2545cc(0x1d5))/0x6)+-parseInt(_0x2545cc(0x1db))/0x7+parseInt(_0x2545cc(0x1d6))/0x8+parseInt(_0x2545cc(0x1dc))/0x9+parseInt(_0x2545cc(0x1d4))/0xa;if(_0x5f2b08===_0x41e9c1)break;else _0x527887['push'](_0x527887['shift']());}catch(_0x552091){_0x527887['push'](_0x527887['shift']());}}}(a145_0x4870,0x36184));import{permitPageGet}from'../../commands/permit/page-get.js';import{permitPageSet}from'../../commands/permit/page-set.js';import{permitRoleMenus}from'../../commands/permit/role-menus.js';import{permitRoleMenusSet}from'../../commands/permit/role-menus-set.js';import{permitRoleApisSet}from'../../commands/permit/role-apis-set.js';export const permitDefinitions=[permitPageGet,permitPageSet,permitRoleMenus,permitRoleMenusSet,permitRoleApisSet];function a145_0x4bf6(_0x410323,_0x4570c3){_0x410323=_0x410323-0x1d4;const _0x4870f1=a145_0x4870();let _0x4bf6d2=_0x4870f1[_0x410323];return _0x4bf6d2;}function a145_0x4870(){const _0xdda53c=['1306836IOYhgY','10975kqcora','181800RQxvVX','12cHFfZw','1190240RfVlCf','284CNSbel','3921MBuyDL','154gVhWDO','6087lbXfCa','1708420GbcvqK'];a145_0x4870=function(){return _0xdda53c;};return a145_0x4870();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a146_0x3fea11=a146_0x14d7;(function(_0x17986b,_0x4591cc){const _0x245d80=a146_0x14d7,_0x4ca289=_0x17986b();while(!![]){try{const _0x4eaf5c=-parseInt(_0x245d80(0xfc))/0x1*(parseInt(_0x245d80(0xf2))/0x2)+-parseInt(_0x245d80(0xfa))/0x3*(-parseInt(_0x245d80(0xf6))/0x4)+-parseInt(_0x245d80(0xf1))/0x5*(-parseInt(_0x245d80(0xf3))/0x6)+-parseInt(_0x245d80(0xf0))/0x7*(parseInt(_0x245d80(0xf8))/0x8)+-parseInt(_0x245d80(0xec))/0x9*(-parseInt(_0x245d80(0xef))/0xa)+-parseInt(_0x245d80(0xf9))/0xb+parseInt(_0x245d80(0xee))/0xc;if(_0x4eaf5c===_0x4591cc)break;else _0x4ca289['push'](_0x4ca289['shift']());}catch(_0x5865ab){_0x4ca289['push'](_0x4ca289['shift']());}}}(a146_0x41d2,0x71350));import{getPagePermit}from'../../core/api-client.js';function a146_0x41d2(){const _0x3b8b91=['5209416fHsrkc','2630lXcilF','1085AOWTAj','5bpYLye','18338sJdoTZ','4524918QxWbYv','menu-id','num','16992OhNrfj','Page\x20permit\x20for\x20menu\x20','45688FUhNVF','1498288GXzzaY','39plshRi','read','5kqfynw','permit','9837oHwyQz','page-get'];a146_0x41d2=function(){return _0x3b8b91;};return a146_0x41d2();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a146_0x14d7(_0x50d407,_0x1697c3){_0x50d407=_0x50d407-0xeb;const _0x41d26a=a146_0x41d2();let _0x14d7e5=_0x41d26a[_0x50d407];return _0x14d7e5;}import{MENU_ID_FLAG,projectPagePermit}from'../../commands/permit/shared.js';export const permitPageGet={'service':a146_0x3fea11(0xeb),'command':a146_0x3fea11(0xed),'description':'Show\x20the\x20page\x20permission\x20snapshot\x20for\x20a\x20menu','risk':a146_0x3fea11(0xfb),'flags':[MENU_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4a6828){const _0x3b3d01=a146_0x3fea11,_0x425ecf=_0x4a6828[_0x3b3d01(0xf5)](_0x3b3d01(0xf4)),_0x4e19bc=await getPagePermit(_0x425ecf);return{'ok':!![],'data':{'page':projectPagePermit(_0x4e19bc)},'message':_0x3b3d01(0xf7)+_0x425ecf};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a147_0xd585(_0x179268,_0x10ce24){_0x179268=_0x179268-0xcc;const _0x1b2f31=a147_0x1b2f();let _0xd5854c=_0x1b2f31[_0x179268];return _0xd5854c;}const a147_0x387bd4=a147_0xd585;(function(_0x4910cb,_0x2d8b59){const _0x50d85f=a147_0xd585,_0x536fea=_0x4910cb();while(!![]){try{const _0x22c678=parseInt(_0x50d85f(0xcf))/0x1*(-parseInt(_0x50d85f(0xe4))/0x2)+-parseInt(_0x50d85f(0xd1))/0x3*(-parseInt(_0x50d85f(0xef))/0x4)+parseInt(_0x50d85f(0xdf))/0x5+-parseInt(_0x50d85f(0xe7))/0x6*(parseInt(_0x50d85f(0xd4))/0x7)+parseInt(_0x50d85f(0xe3))/0x8*(parseInt(_0x50d85f(0xd6))/0x9)+-parseInt(_0x50d85f(0xe6))/0xa*(parseInt(_0x50d85f(0xda))/0xb)+parseInt(_0x50d85f(0xd9))/0xc;if(_0x22c678===_0x2d8b59)break;else _0x536fea['push'](_0x536fea['shift']());}catch(_0x1dad6e){_0x536fea['push'](_0x536fea['shift']());}}}(a147_0x1b2f,0x8cc41));import{getPagePermit,savePagePermit}from'../../core/api-client.js';function a147_0x1b2f(){const _0x410c61=['spec','4jmNtvF','permit','\x22\x20permission\x20slot\x20(','appCode','num','165pgfkxC','page-set','580332VNMqIj','allowSelf','POST','14KcOhmR','Nothing\x20to\x20set.','693WZrkUR','Pass\x20at\x20least\x20one\x20role,\x20or\x20omit\x20the\x20flag.\x20Clearing\x20permissions\x20is\x20not\x20supported\x20by\x20this\x20command.','\x20cannot\x20be\x20empty.','4401936qyjPYg','22yVXQem','high-risk-write','label','Only\x20slots\x20present\x20in\x20`permit\x20page-get`\x20can\x20be\x20set.','flag','559840wvphGM','map','join','push','61760XJwaqt','2978vudisN','/smartapi/permit/page/save','838910dVhXQf','829908KrTUCi','key','Set\x20page\x20permissions\x20for\x20a\x20menu\x20(menu/create/update/delete/detail/export/row\x20roles);\x20requires\x20--yes','This\x20page\x20has\x20no\x20\x22','length','validation','Pass\x20at\x20least\x20one\x20of:\x20'];a147_0x1b2f=function(){return _0x410c61;};return a147_0x1b2f();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{MENU_ID_FLAG,PAGE_SET_ROLE_FLAGS,PAGE_SLOT_SPECS,projectPageSlot,resolvePermitRoles,splitList}from'../../commands/permit/shared.js';const SAVE_PATH=a147_0x387bd4(0xe5);function collectRequestedSlots(_0x3cdb6d){const _0x5bbe28=a147_0x387bd4,_0x186c70=[];for(const _0x343e60 of PAGE_SLOT_SPECS){const _0x2489d9=_0x3cdb6d['flag'](_0x343e60[_0x5bbe28(0xde)]);if(_0x2489d9===undefined||_0x2489d9===null)continue;const _0x5b0633=splitList(String(_0x2489d9));if(_0x5b0633[_0x5bbe28(0xeb)]===0x0)throw CliErrors['validation']('--'+_0x343e60['flag']+_0x5bbe28(0xd8),_0x5bbe28(0xd7));_0x186c70[_0x5bbe28(0xe2)]({'spec':_0x343e60,'refs':_0x5b0633});}return _0x186c70;}async function buildPlan(_0x16df30,_0x4c8c1a){const _0x3dda94=a147_0x387bd4,_0x40ea93=_0x16df30[_0x3dda94(0xce)]('menu-id'),_0x258093=collectRequestedSlots(_0x16df30);if(_0x258093['length']===0x0)throw CliErrors[_0x3dda94(0xec)](_0x3dda94(0xd5),_0x3dda94(0xed)+PAGE_SLOT_SPECS[_0x3dda94(0xe0)](_0xf35be6=>'--'+_0xf35be6['flag'])['join'](',\x20')+'.');const _0x466332=await getPagePermit(_0x40ea93),_0x224eb7={},_0x56df5a={},_0x13abc3=[];for(const {spec:_0x3771f6,refs:_0x42d264}of _0x258093){const _0xf0f1dc=_0x466332[_0x3771f6[_0x3dda94(0xe8)]];if(!_0xf0f1dc)throw CliErrors['validation'](_0x3dda94(0xea)+_0x3771f6[_0x3dda94(0xdc)]+_0x3dda94(0xcc)+_0x3771f6[_0x3dda94(0xe8)]+').',_0x3dda94(0xdd));_0x224eb7[_0x3771f6['key']]=projectPageSlot(_0xf0f1dc);const _0x38f653=await resolvePermitRoles(_0x16df30[_0x3dda94(0xcd)],_0x42d264,{'allowSelf':_0x3771f6[_0x3dda94(0xd2)],'label':_0x3771f6[_0x3dda94(0xdc)]});_0xf0f1dc['rolePermit']=_0x38f653,_0x56df5a[_0x3771f6[_0x3dda94(0xe8)]]=projectPageSlot(_0xf0f1dc);}const _0x448457={'operation':'page-set','selector':{'appCode':_0x16df30[_0x3dda94(0xcd)],'menuId':_0x40ea93,'slots':_0x258093[_0x3dda94(0xe0)](_0x29f2c0=>_0x29f2c0[_0x3dda94(0xee)]['key'])},'before':_0x224eb7,'after':_0x56df5a,'dryRun':_0x4c8c1a,'backend':{'method':_0x3dda94(0xd3),'path':SAVE_PATH},'warnings':_0x13abc3};return{'page':_0x466332,'mutation':_0x448457};}export const permitPageSet={'service':a147_0x387bd4(0xf0),'command':a147_0x387bd4(0xd0),'description':a147_0x387bd4(0xe9),'risk':a147_0x387bd4(0xdb),'flags':[MENU_ID_FLAG,...PAGE_SET_ROLE_FLAGS,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x573c05){const _0x189fb4=a147_0x387bd4,_0x41e08d=collectRequestedSlots(_0x573c05);if(_0x41e08d[_0x189fb4(0xeb)]===0x0)throw CliErrors['validation'](_0x189fb4(0xd5),_0x189fb4(0xed)+PAGE_SLOT_SPECS['map'](_0xa7bbbc=>'--'+_0xa7bbbc[_0x189fb4(0xde)])[_0x189fb4(0xe1)](',\x20')+'.');},async 'dryRun'(_0x164b72){const {mutation:_0x1d914b}=await buildPlan(_0x164b72,!![]);return asDryRunResult(_0x1d914b,{'method':'POST','url':SAVE_PATH});},async 'execute'(_0x11cbd3){const {page:_0x3cc5df,mutation:_0x40fc87}=await buildPlan(_0x11cbd3,![]);return await savePagePermit(_0x3cc5df),{'ok':!![],'data':_0x40fc87,'message':'Updated\x20page\x20permit\x20for\x20menu\x20'+_0x40fc87['selector']['menuId']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x1bc822=a148_0x3c2d;function a148_0x3c2d(_0x224d13,_0x2ac38b){_0x224d13=_0x224d13-0xd2;const _0x6e63c0=a148_0x6e63();let _0x3c2d7d=_0x6e63c0[_0x224d13];return _0x3c2d7d;}(function(_0x14383a,_0x1eb109){const _0x1fedf1=a148_0x3c2d,_0x338d36=_0x14383a();while(!![]){try{const _0x5c9f55=parseInt(_0x1fedf1(0xd8))/0x1*(parseInt(_0x1fedf1(0xe9))/0x2)+parseInt(_0x1fedf1(0xe2))/0x3*(-parseInt(_0x1fedf1(0xf0))/0x4)+parseInt(_0x1fedf1(0xeb))/0x5*(parseInt(_0x1fedf1(0xd3))/0x6)+parseInt(_0x1fedf1(0xd7))/0x7*(parseInt(_0x1fedf1(0xe8))/0x8)+parseInt(_0x1fedf1(0xf8))/0x9+parseInt(_0x1fedf1(0xf5))/0xa*(parseInt(_0x1fedf1(0xea))/0xb)+-parseInt(_0x1fedf1(0xf4))/0xc;if(_0x5c9f55===_0x1eb109)break;else _0x338d36['push'](_0x338d36['shift']());}catch(_0x56fd35){_0x338d36['push'](_0x338d36['shift']());}}}(a148_0x6e63,0xea928));import{getRoleApiResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,DATASETS_FLAG,flattenApiResources,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';function a148_0x6e63(){const _0x44fe19=['API','revoke','push','4oCNSbG','action','join','has','49485396qicAkR','10piLYJV','Pass\x20--datasets\x20<datasetCode,...>.','filter','16124994FNsEzj','high-risk-write','18ROknmJ','datasetCodes','appCode','validation','651KfhYUN','861562PaKjyj','length','get','role-apis-set','str','set','bool','Unknown\x20datasetCode(s)\x20for\x20this\x20role\x27s\x20API\x20resources:\x20','permit','selector','2395641HOIPOa','POST','Revoke\x20a\x20role\x27s\x20dataset\x20API\x20access\x20by\x20datasetCode\x20(roleType\x20API);\x20requires\x20--yes','Missing\x20--revoke.','flagMissing','datasets','129936cADGHz','2GoQGtd','924649lcJyaT','2725575AcXdxM','role-apis-set\x20currently\x20supports\x20revoking\x20dataset\x20API\x20access\x20(use\x20case\x204).'];a148_0x6e63=function(){return _0x44fe19;};return a148_0x6e63();}import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x3d3e55,_0x323804){const _0x408f41=a148_0x3c2d,_0x3a21e8=await resolveRoleRef(_0x3d3e55[_0x408f41(0xd5)],readRoleRef(_0x3d3e55));assertPermConfigurable(_0x3a21e8);if(!_0x3d3e55['bool'](_0x408f41(0xee)))throw CliErrors[_0x408f41(0xd6)](_0x408f41(0xe5),_0x408f41(0xec));const _0x2d64ac=splitList(_0x3d3e55['str'](_0x408f41(0xe7)));if(_0x2d64ac[_0x408f41(0xd9)]===0x0)throw CliErrors[_0x408f41(0xe6)](_0x408f41(0xe7),_0x408f41(0xf6));const _0x129ad1=await getRoleApiResources(_0x3d3e55[_0x408f41(0xd5)],_0x3a21e8['id']),{byCode:_0x58c9bf,byDataset:_0x396511}=flattenApiResources(_0x129ad1),_0x5b1863=_0x2d64ac[_0x408f41(0xf7)](_0x4eabab=>!_0x396511[_0x408f41(0xf3)](_0x4eabab));if(_0x5b1863['length']>0x0)throw CliErrors[_0x408f41(0xd6)](_0x408f41(0xdf)+_0x5b1863[_0x408f41(0xf2)](',\x20')+'.','Verify\x20the\x20datasetCode,\x20or\x20check\x20the\x20role\x27s\x20API\x20resource\x20matrix.');const _0x20a12c=new Map(),_0x20bb2d=[],_0x3346c4=[];for(const _0x4212e2 of _0x2d64ac){for(const _0x33653a of _0x396511[_0x408f41(0xda)](_0x4212e2)){const _0x5c872c=_0x58c9bf['get'](_0x33653a);_0x20a12c[_0x408f41(0xdd)](_0x33653a,'0'),_0x20bb2d[_0x408f41(0xef)]({'resourceCode':_0x33653a,'datasetCode':_0x4212e2,'action':_0x5c872c[_0x408f41(0xf1)]}),_0x3346c4[_0x408f41(0xef)]({'resourceCode':_0x33653a,'datasetCode':_0x4212e2,'action':'0'});}}const _0x54a536=buildPermits(_0x58c9bf,_0x20a12c),_0xbacabb={'operation':'api-revoke','selector':{'appCode':_0x3d3e55[_0x408f41(0xd5)],'roleId':_0x3a21e8['id'],'roleName':_0x3a21e8['roleName'],'datasetCodes':_0x2d64ac},'before':_0x20bb2d,'after':_0x3346c4,'dryRun':_0x323804,'backend':{'method':_0x408f41(0xe3),'path':UPDATE_PATH,'roleType':'API'},'warnings':[]};return{'role':_0x3a21e8,'permits':_0x54a536,'mutation':_0xbacabb};}export const permitRoleApisSet={'service':a148_0x1bc822(0xe0),'command':a148_0x1bc822(0xdb),'description':a148_0x1bc822(0xe4),'risk':a148_0x1bc822(0xd2),'flags':[ROLE_REF_FLAG,REVOKE_FLAG,DATASETS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x57ffcf){const _0x53b1f9=a148_0x1bc822;if(!_0x57ffcf[_0x53b1f9(0xde)](_0x53b1f9(0xee)))throw CliErrors['validation']('Missing\x20--revoke.',_0x53b1f9(0xec));if(splitList(_0x57ffcf[_0x53b1f9(0xdc)](_0x53b1f9(0xe7)))[_0x53b1f9(0xd9)]===0x0)throw CliErrors[_0x53b1f9(0xe6)](_0x53b1f9(0xe7),_0x53b1f9(0xf6));},async 'dryRun'(_0x16057b){const {mutation:_0x3b5171}=await buildPlan(_0x16057b,!![]);return asDryRunResult(_0x3b5171,{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x532dc1){const _0x1bf1f2=a148_0x1bc822,{role:_0xc38cf5,permits:_0x555cd,mutation:_0x1a846d}=await buildPlan(_0x532dc1,![]);return await updateAppRole({'id':_0xc38cf5['id'],'appCode':_0x532dc1[_0x1bf1f2(0xd5)],'roleType':_0x1bf1f2(0xed),'permits':_0x555cd}),{'ok':!![],'data':_0x1a846d,'message':'Revoked\x20API\x20access\x20for\x20'+_0x1a846d[_0x1bf1f2(0xe1)][_0x1bf1f2(0xd4)][_0x1bf1f2(0xd9)]+'\x20dataset(s)\x20on\x20role\x20'+_0xc38cf5['roleName']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a149_0x3f9e(_0x57733a,_0x1088b3){_0x57733a=_0x57733a-0x8f;const _0x3a6156=a149_0x3a61();let _0x3f9e6f=_0x3a6156[_0x57733a];return _0x3f9e6f;}const a149_0x247a6f=a149_0x3f9e;(function(_0x13e762,_0x273439){const _0x2e353e=a149_0x3f9e,_0x1142d8=_0x13e762();while(!![]){try{const _0x552e9c=parseInt(_0x2e353e(0xa2))/0x1+-parseInt(_0x2e353e(0xa0))/0x2+parseInt(_0x2e353e(0xab))/0x3*(-parseInt(_0x2e353e(0xa7))/0x4)+parseInt(_0x2e353e(0xaa))/0x5+-parseInt(_0x2e353e(0x96))/0x6*(-parseInt(_0x2e353e(0x93))/0x7)+-parseInt(_0x2e353e(0xa8))/0x8*(-parseInt(_0x2e353e(0x8f))/0x9)+parseInt(_0x2e353e(0x91))/0xa*(parseInt(_0x2e353e(0xad))/0xb);if(_0x552e9c===_0x273439)break;else _0x1142d8['push'](_0x1142d8['shift']());}catch(_0x4d9903){_0x1142d8['push'](_0x1142d8['shift']());}}}(a149_0x3a61,0xe6e01));import{getRoleMenuResources,updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{buildPermits,flattenMenuResources,GRANT_FLAG,MENUS_FLAG,readGrantRevoke,readRoleRef,REVOKE_FLAG,ROLE_REF_FLAG,splitList}from'../../commands/permit/shared.js';import{assertPermConfigurable,resolveRoleRef}from'../../commands/role/shared.js';const UPDATE_PATH='/smartapi/permit/role/update';async function buildPlan(_0x2d9863,_0x48eb5f){const _0x472153=a149_0x3f9e,_0x578134=await resolveRoleRef(_0x2d9863[_0x472153(0xa1)],readRoleRef(_0x2d9863));assertPermConfigurable(_0x578134);const _0x3f4566=readGrantRevoke(_0x2d9863),_0x5a6dd6=splitList(_0x2d9863[_0x472153(0xa5)](_0x472153(0xaf)));if(_0x5a6dd6[_0x472153(0xa3)]===0x0)throw CliErrors[_0x472153(0xa4)](_0x472153(0xaf),_0x472153(0x92));const _0x2ebd76=await getRoleMenuResources(_0x2d9863[_0x472153(0xa1)],_0x578134['id']),_0x46d057=flattenMenuResources(_0x2ebd76),_0x55f9a8=_0x5a6dd6[_0x472153(0x9e)](_0x4a65cc=>!_0x46d057[_0x472153(0x99)](_0x4a65cc));if(_0x55f9a8[_0x472153(0xa3)]>0x0)throw CliErrors[_0x472153(0xa9)](_0x472153(0x9a)+_0x55f9a8[_0x472153(0x9b)](',\x20')+'.',_0x472153(0x9f));const _0x1d4c11=new Map(),_0x56e08c=[],_0x5afa58=[];for(const _0x214d2f of _0x5a6dd6){const _0x22bffd=_0x46d057['get'](_0x214d2f);_0x1d4c11['set'](_0x214d2f,_0x3f4566),_0x56e08c[_0x472153(0x98)]({'resourceCode':_0x214d2f,'action':_0x22bffd[_0x472153(0x90)]}),_0x5afa58['push']({'resourceCode':_0x214d2f,'action':_0x3f4566});}const _0x3b1004=buildPermits(_0x46d057,_0x1d4c11),_0x2cfc19={'operation':_0x3f4566==='access'?_0x472153(0x94):'menu-revoke','selector':{'appCode':_0x2d9863['appCode'],'roleId':_0x578134['id'],'roleName':_0x578134[_0x472153(0xa6)],'resourceCodes':_0x5a6dd6},'before':_0x56e08c,'after':_0x5afa58,'dryRun':_0x48eb5f,'backend':{'method':_0x472153(0x95),'path':UPDATE_PATH,'roleType':_0x472153(0x9c)},'warnings':[]};return{'role':_0x578134,'permits':_0x3b1004,'mutation':_0x2cfc19};}export const permitRoleMenusSet={'service':a149_0x247a6f(0xae),'command':a149_0x247a6f(0x9d),'description':'Grant\x20or\x20revoke\x20a\x20role\x27s\x20menu\x20access\x20by\x20resourceCode\x20(roleType\x20PAGE);\x20requires\x20--yes','risk':a149_0x247a6f(0x97),'flags':[ROLE_REF_FLAG,GRANT_FLAG,REVOKE_FLAG,MENUS_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3da903){const _0x343ca9=a149_0x247a6f;readGrantRevoke(_0x3da903);if(splitList(_0x3da903['str'](_0x343ca9(0xaf)))['length']===0x0)throw CliErrors['flagMissing'](_0x343ca9(0xaf),'Pass\x20--menus\x20<resourceCode,...>.');},async 'dryRun'(_0x10ef39){const _0x38cd9b=a149_0x247a6f,{mutation:_0x326e52}=await buildPlan(_0x10ef39,!![]);return asDryRunResult(_0x326e52,{'method':_0x38cd9b(0x95),'url':UPDATE_PATH});},async 'execute'(_0x34216e){const _0x2e989b=a149_0x247a6f,{role:_0x980f5c,permits:_0xd21653,mutation:_0x46afd3}=await buildPlan(_0x34216e,![]);return await updateAppRole({'id':_0x980f5c['id'],'appCode':_0x34216e['appCode'],'roleType':_0x2e989b(0x9c),'permits':_0xd21653}),{'ok':!![],'data':_0x46afd3,'message':'Updated\x20'+_0x46afd3['selector'][_0x2e989b(0xac)][_0x2e989b(0xa3)]+'\x20menu\x20permit(s)\x20for\x20role\x20'+_0x980f5c[_0x2e989b(0xa6)]};}};function a149_0x3a61(){const _0x4fd717=['validation','2834390InTAdG','2042862HqJyGv','resourceCodes','12606ClKpzi','permit','menus','2699208hfvEos','action','4450WARlQG','Pass\x20--menus\x20<resourceCode,...>.','21kYrnWG','menu-grant','POST','1360014VoCWSm','high-risk-write','push','has','Unknown\x20menu\x20resourceCode(s):\x20','join','PAGE','role-menus-set','filter','Run\x20`permit\x20role-menus\x20--role\x20<id>`\x20to\x20see\x20valid\x20resourceCodes.','2458540IWgLab','appCode','280428qmKIgo','length','flagMissing','str','roleName','8CriLur','40kqGypo'];a149_0x3a61=function(){return _0x4fd717;};return a149_0x3a61();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a150_0x29c5c7=a150_0x2a5d;(function(_0x52949e,_0x5e5ea8){const _0x35dae9=a150_0x2a5d,_0x8a43ab=_0x52949e();while(!![]){try{const _0x3451e5=-parseInt(_0x35dae9(0xcf))/0x1*(parseInt(_0x35dae9(0xd7))/0x2)+parseInt(_0x35dae9(0xde))/0x3+-parseInt(_0x35dae9(0xd5))/0x4+-parseInt(_0x35dae9(0xce))/0x5*(-parseInt(_0x35dae9(0xd0))/0x6)+-parseInt(_0x35dae9(0xe2))/0x7+parseInt(_0x35dae9(0xcd))/0x8+-parseInt(_0x35dae9(0xe0))/0x9*(-parseInt(_0x35dae9(0xdc))/0xa);if(_0x3451e5===_0x5e5ea8)break;else _0x8a43ab['push'](_0x8a43ab['shift']());}catch(_0x54a2e9){_0x8a43ab['push'](_0x8a43ab['shift']());}}}(a150_0x4631,0x35491));function a150_0x2a5d(_0x12391d,_0x2ed69c){_0x12391d=_0x12391d-0xcb;const _0x4631f8=a150_0x4631();let _0x2a5d9d=_0x4631f8[_0x12391d];return _0x2a5d9d;}function a150_0x4631(){const _0x51622b=['653874KdrLDQ','from','\x20menu(s)\x20allowed','allowed','role-menus','737312OxuLef','read','2058arASjz','Role\x20','Show\x20a\x20role\x27s\x20current\x20menu\x20permission\x20matrix','\x20has\x20','length','30LorkJh','values','1177935Sdtivv','roleName','16776BvIwRF','permit','2078727TFfILu','appCode','action','map','1974936bwFTNX','5wfFjjN','53ZsjYBp'];a150_0x4631=function(){return _0x51622b;};return a150_0x4631();}import{getRoleMenuResources}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{flattenMenuResources,readRoleRef,ROLE_REF_FLAG}from'../../commands/permit/shared.js';import{resolveRoleRef}from'../../commands/role/shared.js';export const permitRoleMenus={'service':a150_0x29c5c7(0xe1),'command':a150_0x29c5c7(0xd4),'description':a150_0x29c5c7(0xd9),'risk':a150_0x29c5c7(0xd6),'flags':[ROLE_REF_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x816c3a){const _0x396c4d=a150_0x29c5c7,_0x532d80=await resolveRoleRef(_0x816c3a[_0x396c4d(0xe3)],readRoleRef(_0x816c3a)),_0x3eafb6=await getRoleMenuResources(_0x816c3a['appCode'],_0x532d80['id']),_0x258c27=flattenMenuResources(_0x3eafb6),_0x2394b3=Array[_0x396c4d(0xd1)](_0x258c27[_0x396c4d(0xdd)]())[_0x396c4d(0xcc)](_0x4b6dcc=>({'resourceCode':_0x4b6dcc['resourceCode'],'resourceName':_0x4b6dcc['resourceName'],'allowed':_0x4b6dcc['action']==='access','action':_0x4b6dcc[_0x396c4d(0xcb)]}));return{'ok':!![],'data':{'selector':{'appCode':_0x816c3a[_0x396c4d(0xe3)],'roleId':_0x532d80['id'],'roleName':_0x532d80[_0x396c4d(0xdf)]},'menus':_0x2394b3},'message':_0x396c4d(0xd8)+_0x532d80[_0x396c4d(0xdf)]+_0x396c4d(0xda)+_0x2394b3['filter'](_0x5a59d3=>_0x5a59d3[_0x396c4d(0xd3)])[_0x396c4d(0xdb)]+'/'+_0x2394b3[_0x396c4d(0xdb)]+_0x396c4d(0xd2)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x336e15=a151_0x4b11;(function(_0x270b11,_0xeb37d2){const _0x25611e=a151_0x4b11,_0x32717c=_0x270b11();while(!![]){try{const _0x10f126=-parseInt(_0x25611e(0x1b1))/0x1+-parseInt(_0x25611e(0x1c5))/0x2+parseInt(_0x25611e(0x17f))/0x3*(parseInt(_0x25611e(0x196))/0x4)+parseInt(_0x25611e(0x18d))/0x5*(parseInt(_0x25611e(0x1b5))/0x6)+-parseInt(_0x25611e(0x1c8))/0x7*(-parseInt(_0x25611e(0x179))/0x8)+parseInt(_0x25611e(0x1bb))/0x9*(parseInt(_0x25611e(0x1bd))/0xa)+parseInt(_0x25611e(0x1d0))/0xb*(-parseInt(_0x25611e(0x1a9))/0xc);if(_0x10f126===_0xeb37d2)break;else _0x32717c['push'](_0x32717c['shift']());}catch(_0x4a0046){_0x32717c['push'](_0x32717c['shift']());}}}(a151_0xa844,0xe6e4d));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a151_0x336e15(0x181),'type':a151_0x336e15(0x1cc),'required':!![],'description':a151_0x336e15(0x18c)};export const ROLE_REF_FLAG={'name':a151_0x336e15(0x18e),'type':a151_0x336e15(0x19c),'required':!![],'description':a151_0x336e15(0x17a)};export const GRANT_FLAG={'name':'grant','type':a151_0x336e15(0x1c1),'required':![],'description':a151_0x336e15(0x191)};export const REVOKE_FLAG={'name':a151_0x336e15(0x1ce),'type':'boolean','required':![],'description':a151_0x336e15(0x1b2)};export const MENUS_FLAG={'name':a151_0x336e15(0x197),'type':a151_0x336e15(0x19c),'required':!![],'description':a151_0x336e15(0x1ad)};export const DATASETS_FLAG={'name':a151_0x336e15(0x1b7),'type':a151_0x336e15(0x19c),'required':!![],'description':a151_0x336e15(0x1ab)};export const PAGE_SLOT_SPECS=[{'flag':a151_0x336e15(0x18b),'key':'menuPermit','allowSelf':![],'label':a151_0x336e15(0x1b8)},{'flag':'create-roles','key':a151_0x336e15(0x19e),'allowSelf':![],'label':a151_0x336e15(0x1ca)},{'flag':a151_0x336e15(0x183),'key':'dataUpdate','allowSelf':![],'label':a151_0x336e15(0x1a3)},{'flag':a151_0x336e15(0x178),'key':a151_0x336e15(0x19b),'allowSelf':![],'label':a151_0x336e15(0x195)},{'flag':a151_0x336e15(0x19a),'key':'dataDetail','allowSelf':![],'label':'data\x20detail'},{'flag':'export-roles','key':a151_0x336e15(0x18f),'allowSelf':![],'label':a151_0x336e15(0x186)},{'flag':a151_0x336e15(0x1a7),'key':a151_0x336e15(0x1c3),'allowSelf':!![],'label':a151_0x336e15(0x1a4)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a151_0x336e15(0x1a0)](_0x1580ee=>({'name':_0x1580ee[a151_0x336e15(0x177)],'type':a151_0x336e15(0x19c),'required':![],'description':a151_0x336e15(0x1a1)+_0x1580ee[a151_0x336e15(0x1a2)]+a151_0x336e15(0x1a8)+(_0x1580ee['allowSelf']?a151_0x336e15(0x17b):'')}));export function splitList(_0x4c69ff){const _0x1b4d5f=a151_0x336e15;return _0x4c69ff['split'](',')['map'](_0x273df4=>_0x273df4[_0x1b4d5f(0x180)]())[_0x1b4d5f(0x188)](Boolean);}export function projectRoleRef(_0x5bd7d8){return{'id':_0x5bd7d8['id'],'roleName':_0x5bd7d8['roleName'],'roleType':_0x5bd7d8['roleType']};}export async function resolvePermitRoles(_0x12ede8,_0x5968cb,_0x217c2c){const _0xde2225=a151_0x336e15,_0xf466a5=await listPermitRoles(_0x12ede8,{'needSelf':!![],'needPublic':!![]}),_0x1df45d=[];for(const _0x3a854e of _0x5968cb){const _0x4b3d90=resolveOnePermitRole(_0xf466a5,_0x3a854e);if(!_0x217c2c['allowSelf']&&_0x4b3d90['roleType']==='SELF')throw CliErrors[_0xde2225(0x1bf)](_0xde2225(0x1cb)+_0x217c2c[_0xde2225(0x1a2)]+'.','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.');if(!_0x1df45d['some'](_0x567f8e=>_0x567f8e['id']===_0x4b3d90['id']))_0x1df45d['push'](_0x4b3d90);}return _0x1df45d;}function a151_0x4b11(_0x3eebac,_0xc4028f){_0x3eebac=_0x3eebac-0x177;const _0xa8448e=a151_0xa844();let _0x4b11b2=_0xa8448e[_0x3eebac];return _0x4b11b2;}function resolveOnePermitRole(_0x3c4621,_0x43ce62){const _0x582a33=a151_0x336e15,_0x462f96=_0x43ce62['trim'](),_0xe4aa00=_0x462f96[_0x582a33(0x17d)]();if(_0xe4aa00==='SELF'||_0xe4aa00===_0x582a33(0x1ac)){const _0x57ad4f=_0x3c4621[_0x582a33(0x1c7)](_0x169e63=>_0x169e63[_0x582a33(0x1b6)]===_0xe4aa00);if(!_0x57ad4f)throw CliErrors[_0x582a33(0x1bf)](_0x582a33(0x199)+_0xe4aa00+_0x582a33(0x194));return _0x57ad4f;}if(/^-?\d+$/[_0x582a33(0x185)](_0x462f96)){const _0x3c6077=Number(_0x462f96),_0x2a9e05=_0x3c4621[_0x582a33(0x1c7)](_0x57935a=>_0x57935a['id']===_0x3c6077);if(!_0x2a9e05)throw CliErrors[_0x582a33(0x1bf)](_0x582a33(0x1a6)+_0x3c6077+_0x582a33(0x1cd),'Run\x20`role\x20list`.');return _0x2a9e05;}const _0x2ea9bf=_0x3c4621[_0x582a33(0x188)](_0x14d49e=>_0x14d49e[_0x582a33(0x182)]===_0x462f96);if(_0x2ea9bf[_0x582a33(0x1cf)]===0x0)throw CliErrors[_0x582a33(0x1bf)](_0x582a33(0x1c6)+_0x462f96+_0x582a33(0x1c0),_0x582a33(0x1c4));if(_0x2ea9bf[_0x582a33(0x1cf)]>0x1)throw CliErrors[_0x582a33(0x1bf)]('Role\x20\x22'+_0x462f96+_0x582a33(0x1c9)+_0x2ea9bf['map'](_0x1127ff=>_0x1127ff['id'])[_0x582a33(0x1b4)](',\x20')+').','Disambiguate\x20with\x20an\x20id.');return _0x2ea9bf[0x0];}export function projectPageSlot(_0x135a0f){const _0x5d3563=a151_0x336e15;if(!_0x135a0f)return null;return{'resourceCode':_0x135a0f[_0x5d3563(0x18a)],'roles':(_0x135a0f['rolePermit']??[])[_0x5d3563(0x1a0)](projectRoleRef)};}export function projectPagePermit(_0xd4b537){const _0x13fecd=a151_0x336e15,_0x2c4514={'menuId':_0xd4b537[_0x13fecd(0x190)],'appCode':_0xd4b537[_0x13fecd(0x1b0)],'menuPermit':projectPageSlot(_0xd4b537[_0x13fecd(0x184)])};for(const _0x4dc8b2 of PAGE_SLOT_SPECS){if(_0x4dc8b2[_0x13fecd(0x19d)]===_0x13fecd(0x184))continue;_0x2c4514[_0x4dc8b2[_0x13fecd(0x19d)]]=projectPageSlot(_0xd4b537[_0x4dc8b2[_0x13fecd(0x19d)]]);}return _0x2c4514;}function a151_0xa844(){const _0x391c46=['dataCreate','action','map','Roles\x20for\x20','label','data\x20update','row\x20visibility','pageNodeList','Role\x20id\x20','row-roles','\x20(comma-separated\x20SELF/ALL/id/name)','12gHbpXI','resourceName','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','ALL','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','flagMissing','datasetCode','appCode','406244MhvudG','Revoke\x20access\x20to\x20the\x20listed\x20resources','Pass\x20--role\x20<id|name>.','join','102SCECxg','roleType','datasets','menu\x20visibility','set','apiList','139644yRfJfy','grant','330YKMEeU','allowedActions','validation','\x22\x20not\x20found.','boolean','bool','dataPermit','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','1378428MKWLbP','Role\x20\x22','find','14091VWXUOA','\x22\x20is\x20ambiguous\x20(ids:\x20','data\x20create','SELF\x20is\x20not\x20allowed\x20for\x20','number','\x20not\x20found.','revoke','length','22315953KlgvcY','flag','delete-roles','3904zEoPUN','Role\x20id\x20or\x20role\x20name',';\x20SELF\x20=\x20only\x20own\x20rows','get','toUpperCase','entries','164283xdxUeN','trim','menu-id','roleName','update-roles','menuPermit','test','data\x20export','Missing\x20action.','filter','str','resourceCode','menu-roles','Menu\x20id\x20(from\x20`menu\x20list`)','419285nIFnHD','role','dataExport','menuId','Grant\x20access\x20to\x20the\x20listed\x20resources','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','\x20is\x20not\x20available\x20for\x20this\x20app.','data\x20delete','84RZxflm','menus','access','Special\x20role\x20','detail-roles','dataDelete','string','key'];a151_0xa844=function(){return _0x391c46;};return a151_0xa844();}export function flattenMenuResources(_0x580554){const _0x4be453=new Map(),_0x4c7f65=_0x4a2f9b=>{const _0x14b63b=a151_0x4b11;for(const _0x276479 of _0x4a2f9b??[]){_0x4be453[_0x14b63b(0x1b9)](_0x276479['resourceCode'],{'resourceCode':_0x276479[_0x14b63b(0x18a)],'resourceName':_0x276479['resourceName'],'action':_0x276479[_0x14b63b(0x1be)]?.[0x0]??'0'});if(_0x276479[_0x14b63b(0x1a5)])_0x4c7f65(_0x276479[_0x14b63b(0x1a5)]);}};return _0x4c7f65(_0x580554),_0x4be453;}export function flattenApiResources(_0x487d62){const _0x395a51=a151_0x336e15,_0x25fad5=new Map(),_0x2d8cd1=new Map();for(const _0x204b40 of _0x487d62){const _0xa43fb4=_0x204b40[_0x395a51(0x1ba)]??{};for(const [_0x1c4e40,_0x357bf5]of Object[_0x395a51(0x17e)](_0xa43fb4)){_0x25fad5[_0x395a51(0x1b9)](_0x1c4e40,{'resourceCode':_0x1c4e40,'resourceName':_0x204b40[_0x395a51(0x1aa)],'datasetCode':_0x204b40[_0x395a51(0x1af)],'action':_0x357bf5?.[0x0]??'0'});const _0x1a4ac6=_0x2d8cd1[_0x395a51(0x17c)](_0x204b40['datasetCode'])??[];_0x1a4ac6['push'](_0x1c4e40),_0x2d8cd1[_0x395a51(0x1b9)](_0x204b40[_0x395a51(0x1af)],_0x1a4ac6);}}return{'byCode':_0x25fad5,'byDataset':_0x2d8cd1};}export function buildPermits(_0x32a3fe,_0x9c2c3f){const _0x492be4=a151_0x336e15,_0x5894d8={};for(const [_0x2d2794,_0x1a8b46]of _0x32a3fe){const _0xfebdd8=_0x9c2c3f[_0x492be4(0x17c)](_0x2d2794)??_0x1a8b46[_0x492be4(0x19f)];_0x5894d8[_0x2d2794]=[_0xfebdd8];}return _0x5894d8;}export function readRoleRef(_0x2efb3b){const _0xa386e9=a151_0x336e15,_0x2d0c0d=_0x2efb3b[_0xa386e9(0x189)]('role')[_0xa386e9(0x180)]();if(!_0x2d0c0d)throw CliErrors[_0xa386e9(0x1ae)](_0xa386e9(0x18e),_0xa386e9(0x1b3));return _0x2d0c0d;}export function readGrantRevoke(_0x40a51c){const _0xf248bf=a151_0x336e15,_0x39721a=_0x40a51c[_0xf248bf(0x1c2)](_0xf248bf(0x1bc)),_0x4e5c42=_0x40a51c['bool'](_0xf248bf(0x1ce));if(_0x39721a&&_0x4e5c42)throw CliErrors[_0xf248bf(0x1bf)](_0xf248bf(0x193));if(!_0x39721a&&!_0x4e5c42)throw CliErrors['validation'](_0xf248bf(0x187),_0xf248bf(0x192));return _0x39721a?_0xf248bf(0x198):'0';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x50b78c,_0x204239){const _0x16289b=a152_0x53a1,_0x8d8585=_0x50b78c();while(!![]){try{const _0xe87d0f=-parseInt(_0x16289b(0x209))/0x1+parseInt(_0x16289b(0x1f4))/0x2*(parseInt(_0x16289b(0x1ed))/0x3)+-parseInt(_0x16289b(0x1f5))/0x4+-parseInt(_0x16289b(0x200))/0x5*(-parseInt(_0x16289b(0x1ec))/0x6)+-parseInt(_0x16289b(0x20c))/0x7+parseInt(_0x16289b(0x206))/0x8*(-parseInt(_0x16289b(0x207))/0x9)+parseInt(_0x16289b(0x202))/0xa*(parseInt(_0x16289b(0x1f3))/0xb);if(_0xe87d0f===_0x204239)break;else _0x8d8585['push'](_0x8d8585['shift']());}catch(_0x4e6c07){_0x8d8585['push'](_0x8d8585['shift']());}}}(a152_0x5c70,0x1fa7c));import{existsSync}from'node:fs';import a152_0x17e19c from'node:path';import a152_0x24c42f from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';function a152_0x5c70(){const _0x564366=['No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','Directory\x20\x22','test','10mYpZqK','my-app','10TSKUaa','Skipped','Project\x20name:','length','48qWXXYJ','85167KYSFni','resolve','59695ueovhM','Project\x20name\x20cannot\x20exceed\x2050\x20characters','green','135261AzAoJf','Not\x20set','58044daPIwB','15ebjpsO','√\x20Login\x20status:\x20','Logged\x20in','Login\x20failed','cwd','log','4841111HmHMkX','23860RqFVQi','1014572ZwWMAm','production','√\x20App\x20Code:\x20','cyan','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','string','\x22\x20already\x20exists','env'];a152_0x5c70=function(){return _0x564366;};return a152_0x5c70();}import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a152_0x53a1(_0x287863,_0x39ab52){_0x287863=_0x287863-0x1ec;const _0x5c70a9=a152_0x5c70();let _0x53a145=_0x5c70a9[_0x287863];return _0x53a145;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x386df5,_0x50c7a9,_0x3063ff){const _0x4210ac=a152_0x53a1,_0x1656ea=_0x4210ac(0x201),_0x179b46=readConfig(),_0x49b68e=typeof _0x179b46['env']===_0x4210ac(0x1fa)?_0x179b46[_0x4210ac(0x1fc)]:undefined,_0x67581=await input({'message':_0x4210ac(0x204),'default':_0x1656ea,'validate':_0x51284f=>{const _0x33401d=_0x4210ac,_0x249841=_0x51284f['trim']()||_0x1656ea;if(_0x249841[_0x33401d(0x205)]>0x32)return _0x33401d(0x20a);const _0x396483=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x249841&&!_0x396483[_0x33401d(0x1ff)](_0x249841))return _0x33401d(0x1f9);const _0x1e70f7=a152_0x17e19c[_0x33401d(0x208)](process[_0x33401d(0x1f1)](),_0x249841);if(existsSync(_0x1e70f7))return _0x33401d(0x1fe)+_0x249841+_0x33401d(0x1fb);return!![];}});console[_0x4210ac(0x1f2)](a152_0x24c42f[_0x4210ac(0x20b)]('√\x20Project\x20Name:\x20'+a152_0x24c42f[_0x4210ac(0x1f8)](_0x67581)));const _0x3f7c5c=await selectSingleAppcode(_0x3063ff);console['log'](a152_0x24c42f[_0x4210ac(0x20b)](_0x4210ac(0x1f7)+a152_0x24c42f[_0x4210ac(0x1f8)](_0x3f7c5c||_0x4210ac(0x20d))));if(_0x3f7c5c){const _0x2ce32e=await getIsSessionValid();if(!_0x2ce32e){const _0x31a555=await confirm({'message':_0x4210ac(0x1fd),'default':!![]});if(_0x31a555){const _0x543513=await authServer({'silent':!![]});console[_0x4210ac(0x1f2)](a152_0x24c42f[_0x4210ac(0x20b)](_0x4210ac(0x1ee)+a152_0x24c42f[_0x4210ac(0x1f8)](_0x543513?_0x4210ac(0x1ef):_0x4210ac(0x1f0))));}else console['log'](a152_0x24c42f[_0x4210ac(0x20b)](_0x4210ac(0x1ee)+a152_0x24c42f[_0x4210ac(0x1f8)](_0x4210ac(0x203))));}await _0x386df5({'projectName':_0x67581,'appCode':_0x3f7c5c,'env':_0x50c7a9||_0x49b68e||'production'});}else await _0x386df5({'projectName':_0x67581,'env':_0x50c7a9||_0x49b68e||_0x4210ac(0x1f6)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a153_0x2e9e(_0x60b9d,_0x573845){_0x60b9d=_0x60b9d-0xbe;const _0x3e8b42=a153_0x3e8b();let _0x2e9e6d=_0x3e8b42[_0x60b9d];return _0x2e9e6d;}(function(_0x3af756,_0x178435){const _0x3a8ac7=a153_0x2e9e,_0x2da2fb=_0x3af756();while(!![]){try{const _0x435d05=-parseInt(_0x3a8ac7(0xc2))/0x1+-parseInt(_0x3a8ac7(0xc9))/0x2*(parseInt(_0x3a8ac7(0xc3))/0x3)+-parseInt(_0x3a8ac7(0xc6))/0x4+-parseInt(_0x3a8ac7(0xc1))/0x5+parseInt(_0x3a8ac7(0xc4))/0x6+parseInt(_0x3a8ac7(0xc5))/0x7*(parseInt(_0x3a8ac7(0xca))/0x8)+parseInt(_0x3a8ac7(0xbf))/0x9*(parseInt(_0x3a8ac7(0xc0))/0xa);if(_0x435d05===_0x178435)break;else _0x2da2fb['push'](_0x2da2fb['shift']());}catch(_0x1a7044){_0x2da2fb['push'](_0x2da2fb['shift']());}}}(a153_0x3e8b,0x1dc99));export function formatElapsed(_0x1e72a7){const _0x54e08d=a153_0x2e9e,_0x47448b=Date[_0x54e08d(0xc8)]()-_0x1e72a7;if(_0x47448b<0x3e8)return _0x47448b+'ms';const _0x4806e9=(_0x47448b/0x3e8)[_0x54e08d(0xc7)](0x2),_0x1281f4=_0x4806e9[_0x54e08d(0xbe)](/\.?0+$/u,'');return _0x1281f4+'s';}function a153_0x3e8b(){const _0x225eb3=['now','670JnbnUP','8vviviz','replace','3396303nyZDVr','10IYHjal','1154035EctZgG','48138zNESyT','1311fEjRqU','1225140pijcPa','469987EtOjiT','405396ZOIiRH','toFixed'];a153_0x3e8b=function(){return _0x225eb3;};return a153_0x3e8b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x504621,_0x4f3e69){const _0x59914b=a154_0x41a3,_0x332cbd=_0x504621();while(!![]){try{const _0x4b6deb=-parseInt(_0x59914b(0xa9))/0x1*(parseInt(_0x59914b(0xcb))/0x2)+-parseInt(_0x59914b(0xb0))/0x3*(-parseInt(_0x59914b(0xcd))/0x4)+parseInt(_0x59914b(0xc8))/0x5+parseInt(_0x59914b(0xe1))/0x6*(parseInt(_0x59914b(0xa6))/0x7)+parseInt(_0x59914b(0xc4))/0x8+-parseInt(_0x59914b(0xbf))/0x9+parseInt(_0x59914b(0xb6))/0xa*(-parseInt(_0x59914b(0xe5))/0xb);if(_0x4b6deb===_0x4f3e69)break;else _0x332cbd['push'](_0x332cbd['shift']());}catch(_0x4c4c4f){_0x332cbd['push'](_0x332cbd['shift']());}}}(a154_0xd14c,0x9d810));import a154_0x146989 from'path';import a154_0x506a51 from'fs';import a154_0x18d149 from'chalk';import a154_0x2b0851 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';function a154_0x41a3(_0x5a2752,_0x311745){_0x5a2752=_0x5a2752-0x85;const _0xd14c68=a154_0xd14c();let _0x41a3a8=_0xd14c68[_0x5a2752];return _0x41a3a8;}import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x2f952e){const _0x180390=a154_0x41a3,_0xd034ac=await checkCliVersion();(_0xd034ac[_0x180390(0xaf)]||_0xd034ac[_0x180390(0xe3)])&&(printCliUpgradeWarning(_0xd034ac),assertCliVersionSupported(_0xd034ac),logger[_0x180390(0xbe)]('create',_0x180390(0xcf),{'currentVersion':_0xd034ac[_0x180390(0xa5)],'stableVersion':_0xd034ac['stableVersion'],'minimumVersion':_0xd034ac[_0x180390(0xc5)],'needsUpgrade':_0xd034ac[_0x180390(0xaf)],'belowMinimum':_0xd034ac[_0x180390(0xe3)]}));if(_0x2f952e[_0x180390(0xb7)]&&_0x2f952e['appCode'])await runCreate({'projectName':_0x2f952e[_0x180390(0xb7)],'appCode':_0x2f952e[_0x180390(0xa8)],'env':_0x2f952e[_0x180390(0xb4)]},_0x2f952e);else{if(_0x2f952e[_0x180390(0xb7)]){const _0x100bcb=await selectSingleAppcode(_0x2f952e[_0x180390(0x98)]);await runCreate({'projectName':_0x2f952e[_0x180390(0xb7)],'appCode':_0x100bcb||undefined,'env':_0x2f952e[_0x180390(0xb4)]},_0x2f952e);}else await guidedCreateProject(_0x56c384=>runCreate(_0x56c384,_0x2f952e),_0x2f952e[_0x180390(0xb4)],_0x2f952e[_0x180390(0x98)]);}}function a154_0xd14c(){const _0x25c0ba=['\x20already\x20exists','Project\x20name\x20cannot\x20be\x20empty','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','√\x20package.json\x20updated:\x20name=','production','modelCount','\x20&&\x20','√\x20Pulled\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','fail','\x20|\x20AppCode:\x20','constants','Project\x20name:\x20','length','existsSync','\x20√\x20','defaultApp','cookie','1.0.0','Install\x20dependencies','success','\x20api\x20pull','accessSync','🚀\x20Next\x20Steps:','setLogPath','join','API\x20configuration\x20pulled:\x20','W_OK','\x20config\x20set\x20appcode\x20<app-code>\x27','API\x20配置拉取异常','currentVersion','2037973PcuGvX','配置应用AppCode:\x20','appCode','1xSgHEB','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','message','chdir','readFileSync','Format\x20code','needsUpgrade','555498vRrSBE','writeFileSync','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','keys','env','name','190700YKcMCK','projectCode','Project\x20directory\x20','配置应用AppCode失败','项目创建完成:\x20','gray','\x20Generated\x20by\x20rabetbase\x20cli\x20','toLocaleString','info','11578851QUhOHT','...','projectName','cd\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','8890328szNDoo','minimumVersion','package.json','utf8','1548070IiDTAK','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','cwd','50426HPuTXT','start','16WIwHHp','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','CLI\x20版本检查','log','error','\x20|\x20Default:\x20','create','version','warn','*\x20Configuring\x20AppCode\x20for\x20project\x20','dirname','repeat','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','resolve','*\x20Pulling\x20API\x20configuration...','cyan','\x20model(s)','bold','√\x20Configuration\x20file\x20created,\x20Apps:\x20','Copy\x20project\x20files','6AbnIoj','parse','belowMinimum','\x20run\x20start','286OIEyEO','green','stop'];a154_0xd14c=function(){return _0x25c0ba;};return a154_0xd14c();}async function runCreate(_0x5ccf87,_0x10cf26){const _0x4dcf6a=a154_0x41a3;if(!_0x5ccf87[_0x4dcf6a(0xc1)]||_0x5ccf87[_0x4dcf6a(0xc1)]['trim']()==='')throw new Error(_0x4dcf6a(0x88));const _0x30e36f=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x30e36f['test'](_0x5ccf87[_0x4dcf6a(0xc1)]))throw new Error(_0x4dcf6a(0xc9));if(_0x5ccf87[_0x4dcf6a(0xc1)]['length']>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x5e478a=a154_0x146989[_0x4dcf6a(0xda)](process[_0x4dcf6a(0xca)](),_0x5ccf87[_0x4dcf6a(0xc1)]);if(a154_0x506a51['existsSync'](_0x5e478a))throw new Error(_0x4dcf6a(0xb8)+_0x5ccf87[_0x4dcf6a(0xc1)]+_0x4dcf6a(0x87));try{a154_0x506a51[_0x4dcf6a(0x9d)](a154_0x146989[_0x4dcf6a(0xd7)](_0x5e478a),a154_0x506a51[_0x4dcf6a(0x92)][_0x4dcf6a(0xa2)]);}catch{throw new Error(_0x4dcf6a(0xce));}logger[_0x4dcf6a(0x9f)](_0x5e478a),logger[_0x4dcf6a(0xbe)](_0x4dcf6a(0xd3),'开始创建项目:\x20'+_0x5ccf87[_0x4dcf6a(0xc1)],{'projectDir':_0x5e478a,'appCode':_0x5ccf87[_0x4dcf6a(0xa8)]}),console['log'](),console['log'](a154_0x18d149[_0x4dcf6a(0x85)](_0x4dcf6a(0x96))+_0x4dcf6a(0x93)+a154_0x18d149[_0x4dcf6a(0x85)](_0x5ccf87[_0x4dcf6a(0xc1)])+(_0x5ccf87['appCode']?_0x4dcf6a(0x91)+a154_0x18d149[_0x4dcf6a(0xdc)](_0x5ccf87[_0x4dcf6a(0xa8)]):''));try{await runTask(_0x4dcf6a(0xe0),()=>copyProjectTemplate(_0x5ccf87[_0x4dcf6a(0xc1)])),await updatePackageJsonName(_0x5ccf87[_0x4dcf6a(0xc1)]),await runTask(_0x4dcf6a(0x9a),()=>installDependencies(_0x5ccf87[_0x4dcf6a(0xc1)])),await runTask(_0x4dcf6a(0xae),()=>formatProjectCode(_0x5ccf87['projectName'])),await configureAppCode(_0x5ccf87[_0x4dcf6a(0xc1)],_0x5ccf87[_0x4dcf6a(0xa8)]||'',_0x5ccf87[_0x4dcf6a(0xb4)]);let _0x3a22fe=![];if(_0x5ccf87[_0x4dcf6a(0xa8)]){console[_0x4dcf6a(0xd0)](_0x4dcf6a(0xdb));const _0x5c5cf4=process[_0x4dcf6a(0xca)]();try{process[_0x4dcf6a(0xac)](_0x5e478a);const _0xdd068c=_0x5ccf87[_0x4dcf6a(0xb4)]||_0x4dcf6a(0x8b);initEnv(_0xdd068c);const {configArray:_0x35becd}=await fetchModelList(_0x5ccf87[_0x4dcf6a(0xa8)],_0x10cf26[_0x4dcf6a(0x98)]||''),_0x48ddc5=DEFAULT_API_DIR,_0x7e9915=await generateApiFile(_0x35becd,'',_0x5ccf87[_0x4dcf6a(0xa8)],!![],_0xdd068c,_0x48ddc5);console[_0x4dcf6a(0xd0)](_0x4dcf6a(0x8e)+_0x35becd[_0x4dcf6a(0x94)]+'\x20dataset(s),\x20generated\x20'+_0x7e9915[_0x4dcf6a(0x8c)]+_0x4dcf6a(0xdd)),logger[_0x4dcf6a(0xbe)](_0x4dcf6a(0xd3),_0x4dcf6a(0xa1)+_0x5ccf87[_0x4dcf6a(0xa8)]);}catch(_0xad3697){_0x3a22fe=!![],console[_0x4dcf6a(0xd0)](_0x4dcf6a(0xaa)),logger['warn'](_0x4dcf6a(0xd3),_0x4dcf6a(0xa4),{'error':_0xad3697 instanceof Error?_0xad3697[_0x4dcf6a(0xab)]:String(_0xad3697)});}finally{process[_0x4dcf6a(0xac)](_0x5c5cf4);}}logger[_0x4dcf6a(0x9b)](_0x4dcf6a(0xd3),_0x4dcf6a(0xba)+_0x5ccf87[_0x4dcf6a(0xc1)]),console[_0x4dcf6a(0xd0)](),console['log'](a154_0x18d149[_0x4dcf6a(0x85)]('─'[_0x4dcf6a(0xd8)](0x3c))),console['log'](a154_0x18d149[_0x4dcf6a(0xdc)][_0x4dcf6a(0xde)](_0x4dcf6a(0x9e))),console[_0x4dcf6a(0xd0)](),console[_0x4dcf6a(0xd0)]('\x20\x201.\x20Start\x20project:\x20'+a154_0x18d149[_0x4dcf6a(0xdc)][_0x4dcf6a(0xde)](_0x4dcf6a(0xc2)+_0x5ccf87[_0x4dcf6a(0xc1)]+_0x4dcf6a(0x8d)+CLI_BIN_NAME+_0x4dcf6a(0xe4))),_0x3a22fe&&console[_0x4dcf6a(0xd0)](_0x4dcf6a(0x8f)+a154_0x18d149[_0x4dcf6a(0xdc)]['bold'](CLI_BIN_NAME+_0x4dcf6a(0x9c))),console['log'](a154_0x18d149['green']('─'[_0x4dcf6a(0xd8)](0x3c)));}catch(_0x1a758a){logger[_0x4dcf6a(0xd1)](_0x4dcf6a(0xd3),'项目创建失败:\x20'+_0x5ccf87[_0x4dcf6a(0xc1)],{'error':_0x1a758a instanceof Error?_0x1a758a[_0x4dcf6a(0xab)]:String(_0x1a758a)});try{a154_0x506a51[_0x4dcf6a(0x95)](_0x5e478a)&&(console[_0x4dcf6a(0xd0)](_0x4dcf6a(0xc3)+_0x5e478a),a154_0x506a51['rmSync'](_0x5e478a,{'recursive':!![],'force':!![]}));}catch{logger[_0x4dcf6a(0xd5)]('create','清理项目目录失败:\x20'+_0x5e478a);}throw _0x1a758a;}}async function runTask(_0x3bf40f,_0x40cb67){const _0x195855=a154_0x41a3,_0x477845=a154_0x2b0851(_0x3bf40f+_0x195855(0xc0))[_0x195855(0xcc)]();try{const _0x333db8=await _0x40cb67();_0x477845[_0x195855(0x86)](),console[_0x195855(0xd0)](''+a154_0x18d149['green'](_0x195855(0x96))+_0x3bf40f+'\x20'+a154_0x18d149[_0x195855(0xbb)]('['+_0x333db8+']'));}catch(_0x52ef50){_0x477845[_0x195855(0x90)](_0x3bf40f);throw _0x52ef50;}}async function updatePackageJsonName(_0x1f0038){const _0x194d84=a154_0x41a3,_0x444593=a154_0x146989[_0x194d84(0xda)](process[_0x194d84(0xca)](),_0x1f0038),_0x58154f=a154_0x146989[_0x194d84(0xa0)](_0x444593,_0x194d84(0xc6));try{console['log'](_0x194d84(0xd9));const _0x231020=getRabetbaseCliPackageRoot(),_0x58d054=a154_0x146989[_0x194d84(0xa0)](_0x231020,_0x194d84(0xc6));let _0x11a4af=_0x194d84(0x99);try{const _0x27af8f=JSON['parse'](a154_0x506a51[_0x194d84(0xad)](_0x58d054,_0x194d84(0xc7)));_0x11a4af=_0x27af8f[_0x194d84(0xd4)]||_0x194d84(0x99);}catch{}const _0x2369b9=a154_0x506a51[_0x194d84(0xad)](_0x58154f,_0x194d84(0xc7)),_0x456ab4=JSON['parse'](_0x2369b9);_0x456ab4[_0x194d84(0xb5)]=_0x1f0038,_0x456ab4['description']=_0x1f0038+_0x194d84(0xbc)+_0x11a4af,a154_0x506a51[_0x194d84(0xb1)](_0x58154f,JSON['stringify'](_0x456ab4,null,0x2)+'\x0a',_0x194d84(0xc7)),console[_0x194d84(0xd0)](_0x194d84(0x8a)+_0x1f0038),logger[_0x194d84(0xbe)](_0x194d84(0xd3),'更新\x20package.json\x20name');}catch(_0x33ef47){logger['error']('create','更新\x20package.json\x20失败');throw _0x33ef47;}}async function configureAppCode(_0x4376fe,_0x4da28c,_0x29a0c6){const _0x43bdea=a154_0x41a3,_0x1a03c8=a154_0x146989[_0x43bdea(0xda)](process[_0x43bdea(0xca)](),_0x4376fe),_0x400a90=a154_0x146989[_0x43bdea(0xa0)](_0x1a03c8,NEW_CONFIG_NAME);try{_0x4da28c?console[_0x43bdea(0xd0)](_0x43bdea(0xd6)+_0x4376fe+':\x20'+_0x4da28c):console[_0x43bdea(0xd0)](_0x43bdea(0xb2)+_0x4376fe);const _0x445eb2=getRabetbaseCliPackageRoot(),_0x1b9541=a154_0x146989['join'](_0x445eb2,_0x43bdea(0xc6));let _0x2a8f85=_0x43bdea(0x99);try{const _0x3aa2ff=JSON[_0x43bdea(0xe2)](a154_0x506a51['readFileSync'](_0x1b9541,_0x43bdea(0xc7)));_0x2a8f85=_0x3aa2ff[_0x43bdea(0xd4)]||_0x43bdea(0x99);}catch{}const _0x3c2751=readConfig(),_0x288e86=typeof _0x3c2751[_0x43bdea(0xb4)]==='string'?_0x3c2751[_0x43bdea(0xb4)]:undefined,_0x5a38ac={};for(const _0x21e85e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3c2751[_0x21e85e]!=null)_0x5a38ac[_0x21e85e]=_0x3c2751[_0x21e85e];}const _0xe5da45=buildCanonicalProjectConfig(_0x5a38ac,{'appCodes':_0x4da28c?[_0x4da28c]:[],'env':_0x29a0c6||_0x288e86||_0x43bdea(0x8b),'metadata':{'createdAt':new Date()[_0x43bdea(0xbd)](),'version':_0x2a8f85}});writeConfigFile(_0x400a90,_0xe5da45),_0x4da28c?console['log'](_0x43bdea(0xdf)+Object[_0x43bdea(0xb3)](_0xe5da45['apps']||{})[_0x43bdea(0xa0)](',\x20')+_0x43bdea(0xd2)+_0xe5da45[_0x43bdea(0x97)]):console[_0x43bdea(0xd0)](_0x43bdea(0x89)+CLI_BIN_NAME+_0x43bdea(0xa3)),logger[_0x43bdea(0xbe)](_0x43bdea(0xd3),_0x43bdea(0xa7)+_0x4da28c);}catch(_0x413bf0){logger[_0x43bdea(0xd1)](_0x43bdea(0xd3),_0x43bdea(0xb9));}}
|
|
1
|
+
(function(_0x35f8c3,_0x21ac80){const _0x40715b=a154_0x127c,_0x8dbf17=_0x35f8c3();while(!![]){try{const _0x5afe27=-parseInt(_0x40715b(0x174))/0x1+parseInt(_0x40715b(0x193))/0x2+-parseInt(_0x40715b(0x1bc))/0x3+-parseInt(_0x40715b(0x1a7))/0x4+parseInt(_0x40715b(0x1cf))/0x5*(parseInt(_0x40715b(0x195))/0x6)+-parseInt(_0x40715b(0x1c4))/0x7*(-parseInt(_0x40715b(0x1bf))/0x8)+parseInt(_0x40715b(0x196))/0x9*(parseInt(_0x40715b(0x1ba))/0xa);if(_0x5afe27===_0x21ac80)break;else _0x8dbf17['push'](_0x8dbf17['shift']());}catch(_0x16625b){_0x8dbf17['push'](_0x8dbf17['shift']());}}}(a154_0x46f4,0x4d9cc));import a154_0x359673 from'path';import a154_0x2ebb38 from'fs';import a154_0x25b015 from'chalk';import a154_0xc62288 from'ora';function a154_0x127c(_0x3e6afd,_0x59a31a){_0x3e6afd=_0x3e6afd-0x16f;const _0x46f401=a154_0x46f4();let _0x127c1b=_0x46f401[_0x3e6afd];return _0x127c1b;}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(_0x57b57d){const _0x5563f8=a154_0x127c,_0x1c029f=await checkCliVersion();(_0x1c029f[_0x5563f8(0x175)]||_0x1c029f[_0x5563f8(0x176)])&&(printCliUpgradeWarning(_0x1c029f),assertCliVersionSupported(_0x1c029f),logger['info'](_0x5563f8(0x192),_0x5563f8(0x1c0),{'currentVersion':_0x1c029f[_0x5563f8(0x1b6)],'stableVersion':_0x1c029f[_0x5563f8(0x1b8)],'minimumVersion':_0x1c029f[_0x5563f8(0x1ae)],'needsUpgrade':_0x1c029f[_0x5563f8(0x175)],'belowMinimum':_0x1c029f[_0x5563f8(0x176)]}));if(_0x57b57d[_0x5563f8(0x180)]&&_0x57b57d['appCode'])await runCreate({'projectName':_0x57b57d[_0x5563f8(0x180)],'appCode':_0x57b57d[_0x5563f8(0x191)],'env':_0x57b57d[_0x5563f8(0x1c3)]},_0x57b57d);else{if(_0x57b57d['projectCode']){const _0xbff859=await selectSingleAppcode(_0x57b57d[_0x5563f8(0x19a)]);await runCreate({'projectName':_0x57b57d[_0x5563f8(0x180)],'appCode':_0xbff859||undefined,'env':_0x57b57d['env']},_0x57b57d);}else await guidedCreateProject(_0x46d48c=>runCreate(_0x46d48c,_0x57b57d),_0x57b57d[_0x5563f8(0x1c3)],_0x57b57d[_0x5563f8(0x19a)]);}}async function runCreate(_0x25012a,_0x45c374){const _0x238db5=a154_0x127c;if(!_0x25012a[_0x238db5(0x1c6)]||_0x25012a[_0x238db5(0x1c6)][_0x238db5(0x1a1)]()==='')throw new Error(_0x238db5(0x1b4));const _0x1deaaa=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1deaaa[_0x238db5(0x1c1)](_0x25012a[_0x238db5(0x1c6)]))throw new Error(_0x238db5(0x18c));if(_0x25012a[_0x238db5(0x1c6)][_0x238db5(0x183)]>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x290371=a154_0x359673[_0x238db5(0x1ac)](process[_0x238db5(0x197)](),_0x25012a[_0x238db5(0x1c6)]);if(a154_0x2ebb38[_0x238db5(0x190)](_0x290371))throw new Error(_0x238db5(0x1bb)+_0x25012a[_0x238db5(0x1c6)]+_0x238db5(0x17d));try{a154_0x2ebb38[_0x238db5(0x1c2)](a154_0x359673[_0x238db5(0x1c7)](_0x290371),a154_0x2ebb38[_0x238db5(0x1a5)][_0x238db5(0x1d2)]);}catch{throw new Error(_0x238db5(0x181));}logger[_0x238db5(0x1b2)](_0x290371),logger[_0x238db5(0x172)](_0x238db5(0x192),_0x238db5(0x178)+_0x25012a[_0x238db5(0x1c6)],{'projectDir':_0x290371,'appCode':_0x25012a[_0x238db5(0x191)]}),console[_0x238db5(0x19b)](),console[_0x238db5(0x19b)](a154_0x25b015[_0x238db5(0x1ca)](_0x238db5(0x173))+_0x238db5(0x19d)+a154_0x25b015[_0x238db5(0x1ca)](_0x25012a['projectName'])+(_0x25012a[_0x238db5(0x191)]?_0x238db5(0x1cb)+a154_0x25b015[_0x238db5(0x186)](_0x25012a['appCode']):''));try{await runTask(_0x238db5(0x1b1),()=>copyProjectTemplate(_0x25012a[_0x238db5(0x1c6)])),await updatePackageJsonName(_0x25012a['projectName']),await runTask(_0x238db5(0x1cc),()=>installDependencies(_0x25012a[_0x238db5(0x1c6)])),await runTask(_0x238db5(0x1b3),()=>formatProjectCode(_0x25012a[_0x238db5(0x1c6)])),await configureAppCode(_0x25012a['projectName'],_0x25012a['appCode']||'',_0x25012a[_0x238db5(0x1c3)]);let _0x1222d8=![];if(_0x25012a[_0x238db5(0x191)]){console['log'](_0x238db5(0x1a6));const _0x3f41c7=process[_0x238db5(0x197)]();try{process[_0x238db5(0x1a9)](_0x290371);const _0x2698ec=_0x25012a[_0x238db5(0x1c3)]||_0x238db5(0x1d1);initEnv(_0x2698ec);const {configArray:_0x1fae43}=await fetchModelList(_0x25012a[_0x238db5(0x191)],_0x45c374[_0x238db5(0x19a)]||''),_0x106d1e=DEFAULT_API_DIR,_0x21ed1e=await generateApiFile(_0x1fae43,'',_0x25012a[_0x238db5(0x191)],!![],_0x2698ec,_0x106d1e);console[_0x238db5(0x19b)](_0x238db5(0x184)+_0x1fae43['length']+'\x20dataset(s),\x20generated\x20'+_0x21ed1e['modelCount']+_0x238db5(0x1d3)),logger[_0x238db5(0x172)](_0x238db5(0x192),_0x238db5(0x17e)+_0x25012a[_0x238db5(0x191)]);}catch(_0x14514e){_0x1222d8=!![],console[_0x238db5(0x19b)](_0x238db5(0x189)),logger[_0x238db5(0x170)](_0x238db5(0x192),_0x238db5(0x17a),{'error':_0x14514e instanceof Error?_0x14514e[_0x238db5(0x1c8)]:String(_0x14514e)});}finally{process['chdir'](_0x3f41c7);}}logger[_0x238db5(0x1b7)](_0x238db5(0x192),_0x238db5(0x1d4)+_0x25012a[_0x238db5(0x1c6)]),console[_0x238db5(0x19b)](),console[_0x238db5(0x19b)](a154_0x25b015[_0x238db5(0x1ca)]('─'[_0x238db5(0x1aa)](0x3c))),console['log'](a154_0x25b015[_0x238db5(0x186)][_0x238db5(0x194)](_0x238db5(0x1a0))),console[_0x238db5(0x19b)](),console[_0x238db5(0x19b)](_0x238db5(0x199)+a154_0x25b015[_0x238db5(0x186)]['bold'](_0x238db5(0x182)+_0x25012a[_0x238db5(0x1c6)]+_0x238db5(0x1af)+CLI_BIN_NAME+_0x238db5(0x1a3))),_0x1222d8&&console[_0x238db5(0x19b)](_0x238db5(0x1ad)+a154_0x25b015['cyan'][_0x238db5(0x194)](CLI_BIN_NAME+'\x20api\x20pull')),console['log'](a154_0x25b015[_0x238db5(0x1ca)]('─'['repeat'](0x3c)));}catch(_0x33c5e8){logger[_0x238db5(0x18b)](_0x238db5(0x192),'项目创建失败:\x20'+_0x25012a[_0x238db5(0x1c6)],{'error':_0x33c5e8 instanceof Error?_0x33c5e8['message']:String(_0x33c5e8)});try{a154_0x2ebb38[_0x238db5(0x190)](_0x290371)&&(console['log'](_0x238db5(0x1ce)+_0x290371),a154_0x2ebb38[_0x238db5(0x177)](_0x290371,{'recursive':!![],'force':!![]}));}catch{logger[_0x238db5(0x170)](_0x238db5(0x192),_0x238db5(0x16f)+_0x290371);}throw _0x33c5e8;}}async function runTask(_0x48a47b,_0x2f6b98){const _0x1f9dee=a154_0x127c,_0x18367c=a154_0xc62288(_0x48a47b+_0x1f9dee(0x1c9))[_0x1f9dee(0x179)]();try{const _0xaf4697=await _0x2f6b98();_0x18367c['stop'](),console['log'](''+a154_0x25b015[_0x1f9dee(0x1ca)](_0x1f9dee(0x173))+_0x48a47b+'\x20'+a154_0x25b015[_0x1f9dee(0x1c5)]('['+_0xaf4697+']'));}catch(_0x5c7e1d){_0x18367c[_0x1f9dee(0x1ab)](_0x48a47b);throw _0x5c7e1d;}}async function updatePackageJsonName(_0x4a9714){const _0x37042b=a154_0x127c,_0x265968=a154_0x359673[_0x37042b(0x1ac)](process['cwd'](),_0x4a9714),_0x106a6b=a154_0x359673[_0x37042b(0x18e)](_0x265968,_0x37042b(0x1bd));try{console[_0x37042b(0x19b)](_0x37042b(0x1be));const _0x533453=getRabetbaseCliPackageRoot(),_0x2c0ca1=a154_0x359673[_0x37042b(0x18e)](_0x533453,'package.json');let _0x4416b8='1.0.0';try{const _0x5821dd=JSON[_0x37042b(0x171)](a154_0x2ebb38[_0x37042b(0x1a8)](_0x2c0ca1,_0x37042b(0x198)));_0x4416b8=_0x5821dd['version']||_0x37042b(0x18d);}catch{}const _0x105f9d=a154_0x2ebb38[_0x37042b(0x1a8)](_0x106a6b,_0x37042b(0x198)),_0x6bdac4=JSON[_0x37042b(0x171)](_0x105f9d);_0x6bdac4[_0x37042b(0x1b0)]=_0x4a9714,_0x6bdac4[_0x37042b(0x18a)]=_0x4a9714+_0x37042b(0x1cd)+_0x4416b8,a154_0x2ebb38[_0x37042b(0x1a4)](_0x106a6b,JSON[_0x37042b(0x17f)](_0x6bdac4,null,0x2)+'\x0a','utf8'),console[_0x37042b(0x19b)](_0x37042b(0x1b5)+_0x4a9714),logger[_0x37042b(0x172)](_0x37042b(0x192),'更新\x20package.json\x20name');}catch(_0x47b698){logger[_0x37042b(0x18b)]('create',_0x37042b(0x19c));throw _0x47b698;}}async function configureAppCode(_0x55537b,_0x3663cf,_0x104e8c){const _0x2496d3=a154_0x127c,_0x477b88=a154_0x359673['resolve'](process[_0x2496d3(0x197)](),_0x55537b),_0x525348=a154_0x359673['join'](_0x477b88,NEW_CONFIG_NAME);try{_0x3663cf?console[_0x2496d3(0x19b)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x55537b+':\x20'+_0x3663cf):console['log'](_0x2496d3(0x187)+_0x55537b);const _0x2c0c1f=getRabetbaseCliPackageRoot(),_0x520cc1=a154_0x359673[_0x2496d3(0x18e)](_0x2c0c1f,'package.json');let _0x2749ca=_0x2496d3(0x18d);try{const _0x5da8a8=JSON[_0x2496d3(0x171)](a154_0x2ebb38[_0x2496d3(0x1a8)](_0x520cc1,'utf8'));_0x2749ca=_0x5da8a8[_0x2496d3(0x19f)]||_0x2496d3(0x18d);}catch{}const _0x9ab26b=readConfig(),_0x31963f=typeof _0x9ab26b[_0x2496d3(0x1c3)]===_0x2496d3(0x17b)?_0x9ab26b['env']:undefined,_0x50ae48={};for(const _0xb26ec6 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x9ab26b[_0xb26ec6]!=null)_0x50ae48[_0xb26ec6]=_0x9ab26b[_0xb26ec6];}const _0x492654=buildCanonicalProjectConfig(_0x50ae48,{'appCodes':_0x3663cf?[_0x3663cf]:[],'env':_0x104e8c||_0x31963f||_0x2496d3(0x1d1),'metadata':{'createdAt':new Date()[_0x2496d3(0x17c)](),'version':_0x2749ca}});writeConfigFile(_0x525348,_0x492654),_0x3663cf?console[_0x2496d3(0x19b)](_0x2496d3(0x188)+Object[_0x2496d3(0x19e)](_0x492654[_0x2496d3(0x1b9)]||{})['join'](',\x20')+_0x2496d3(0x185)+_0x492654[_0x2496d3(0x1d0)]):console[_0x2496d3(0x19b)](_0x2496d3(0x1a2)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger['info'](_0x2496d3(0x192),'配置应用AppCode:\x20'+_0x3663cf);}catch(_0x548e00){logger[_0x2496d3(0x18b)](_0x2496d3(0x192),_0x2496d3(0x18f));}}function a154_0x46f4(){const _0x521fb8=['trim','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','\x20run\x20start','writeFileSync','constants','*\x20Pulling\x20API\x20configuration...','721536IdZMSw','readFileSync','chdir','repeat','fail','resolve','\x20\x202.\x20Pull\x20API\x20configuration:\x20','minimumVersion','\x20&&\x20','name','Copy\x20project\x20files','setLogPath','Format\x20code','Project\x20name\x20cannot\x20be\x20empty','√\x20package.json\x20updated:\x20name=','currentVersion','success','stableVersion','apps','80YhsEkU','Project\x20directory\x20','1421976zsRARG','package.json','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','8QmQozE','CLI\x20版本检查','test','accessSync','env','3224431dLpbUq','gray','projectName','dirname','message','...','green','\x20|\x20AppCode:\x20','Install\x20dependencies','\x20Generated\x20by\x20rabetbase\x20cli\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','30mIzwXS','defaultApp','production','W_OK','\x20model(s)','项目创建完成:\x20','清理项目目录失败:\x20','warn','parse','info','\x20√\x20','499036OLSZQU','needsUpgrade','belowMinimum','rmSync','开始创建项目:\x20','start','API\x20配置拉取异常','string','toLocaleString','\x20already\x20exists','API\x20configuration\x20pulled:\x20','stringify','projectCode','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','cd\x20','length','√\x20Pulled\x20','\x20|\x20Default:\x20','cyan','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','√\x20Configuration\x20file\x20created,\x20Apps:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','description','error','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','1.0.0','join','配置应用AppCode失败','existsSync','appCode','create','229270UCjtNg','bold','609972MuuSSv','321831dkysEt','cwd','utf8','\x20\x201.\x20Start\x20project:\x20','cookie','log','更新\x20package.json\x20失败','Project\x20name:\x20','keys','version','🚀\x20Next\x20Steps:'];a154_0x46f4=function(){return _0x521fb8;};return a154_0x46f4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5bd049,_0x5afc59){const _0x200de7=a155_0x2af8,_0x45ba78=_0x5bd049();while(!![]){try{const _0x4ce4cf=-parseInt(_0x200de7(0x11f))/0x1*(-parseInt(_0x200de7(0x13b))/0x2)+parseInt(_0x200de7(0x12b))/0x3+parseInt(_0x200de7(0x149))/0x4*(parseInt(_0x200de7(0x142))/0x5)+-parseInt(_0x200de7(0x143))/0x6*(-parseInt(_0x200de7(0x12a))/0x7)+parseInt(_0x200de7(0x13c))/0x8+-parseInt(_0x200de7(0x120))/0x9*(-parseInt(_0x200de7(0x116))/0xa)+-parseInt(_0x200de7(0x13a))/0xb;if(_0x4ce4cf===_0x5afc59)break;else _0x45ba78['push'](_0x45ba78['shift']());}catch(_0x2c04e2){_0x45ba78['push'](_0x45ba78['shift']());}}}(a155_0x26a1,0x199c4));import a155_0x3d2eca from'path';import a155_0x108a0a from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';function a155_0x26a1(){const _0x5cb937=['writeFile','\x0a\x20\x20cd\x20','readFile','string','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','trim','5006122DlYZYB','198HdUczW','817792DQePvr','belowMinimum','*\x20Creating\x20project\x20','W_OK','description','length','290aHzHLz','6PQeZVL','...','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20Pulling\x20API\x20configuration...','\x0a√\x20Project\x20','Project\x20directory\x20\x22','4220lxemTR','\x22\x20already\x20exists.','\x20api\x20pull`\x20manually\x20later.','ignore','test','needsUpgrade','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','\x20\x20√\x20Pulled\x20','join','Check\x20directory\x20permissions.','\x20\x20rabetbase\x20run\x20start\x0a','10NGUIGa','parse','log','npm','\x20\x20√\x20Project\x20template\x20created','bun','\x20\x20Installing\x20dependencies...','modelCount','bun\x20run\x20format','13GHYZwl','554157HOQOUP','production','access','\x20\x20√\x20package.json\x20updated','resolve','\x20created\x20successfully!','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','\x20\x20√\x20Configuration\x20file\x20created','bun\x20--version','Project\x20name\x20contains\x20invalid\x20characters.','1329846yakgIS','431250boureS','\x20dataset(s),\x20generated\x20','validation','package.json','chdir','dirname','Use\x20a\x20different\x20project\x20name.','cwd','toLocaleString'];a155_0x26a1=function(){return _0x5cb937;};return a155_0x26a1();}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';function a155_0x2af8(_0x119073,_0x3e9813){_0x119073=_0x119073-0x10c;const _0x26a1ce=a155_0x26a1();let _0x2af821=_0x26a1ce[_0x119073];return _0x2af821;}import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x3618e9,_0x86e5f1,_0x4567a3,_0x5e7783){const _0x44ca26=a155_0x2af8,_0x2f9ca9=await checkCliVersion();(_0x2f9ca9[_0x44ca26(0x110)]||_0x2f9ca9[_0x44ca26(0x13d)])&&(printCliUpgradeWarning(_0x2f9ca9),assertCliVersionSupported(_0x2f9ca9));if(!_0x3618e9||_0x3618e9[_0x44ca26(0x139)]()==='')throw CliErrors['validation']('Project\x20name\x20cannot\x20be\x20empty.');const _0x513e8e=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x513e8e[_0x44ca26(0x10f)](_0x3618e9))throw CliErrors[_0x44ca26(0x12d)](_0x44ca26(0x129),_0x44ca26(0x138));if(_0x3618e9[_0x44ca26(0x141)]>0x64)throw CliErrors[_0x44ca26(0x12d)](_0x44ca26(0x126));const _0x5f4b24=a155_0x3d2eca['resolve'](process[_0x44ca26(0x132)](),_0x3618e9);if(existsSync(_0x5f4b24))throw CliErrors['validation'](_0x44ca26(0x148)+_0x3618e9+_0x44ca26(0x10c),_0x44ca26(0x131));try{const _0x40a41f=a155_0x3d2eca[_0x44ca26(0x130)](_0x5f4b24);await a155_0x108a0a[_0x44ca26(0x122)](_0x40a41f,a155_0x108a0a['constants'][_0x44ca26(0x13f)]);}catch{throw CliErrors[_0x44ca26(0x12d)](_0x44ca26(0x145),_0x44ca26(0x114));}try{console['log'](_0x44ca26(0x13e)+_0x3618e9+_0x44ca26(0x144));const _0x46835d=getSubAppReactDemoTemplateDir();await copyDirectory(_0x46835d,_0x5f4b24),console[_0x44ca26(0x118)](_0x44ca26(0x11a)),await updatePackageJsonName(_0x3618e9),console[_0x44ca26(0x118)](_0x44ca26(0x123)),console[_0x44ca26(0x118)](_0x44ca26(0x11c)),console['log']('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x5f4b24),console[_0x44ca26(0x118)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x3618e9,_0x4567a3,_0x86e5f1),console[_0x44ca26(0x118)](_0x44ca26(0x127)),_0x4567a3&&await pullApiConfig(_0x5f4b24,_0x4567a3,_0x86e5f1,_0x5e7783),console[_0x44ca26(0x118)](_0x44ca26(0x147)+_0x3618e9+_0x44ca26(0x125)),console[_0x44ca26(0x118)](_0x44ca26(0x135)+_0x3618e9),console[_0x44ca26(0x118)](_0x44ca26(0x115));}catch(_0x45c7ef){try{existsSync(_0x5f4b24)&&await a155_0x108a0a['rm'](_0x5f4b24,{'recursive':!![],'force':!![]});}catch{}throw _0x45c7ef;}}async function updatePackageJsonName(_0x4f0241){const _0x3aa607=a155_0x2af8,_0x4b80b4=a155_0x3d2eca['resolve'](process[_0x3aa607(0x132)](),_0x4f0241),_0x3a29d9=a155_0x3d2eca['join'](_0x4b80b4,_0x3aa607(0x12e)),_0x43fdc7=await a155_0x108a0a[_0x3aa607(0x136)](_0x3a29d9,'utf-8'),_0x57e86d=JSON[_0x3aa607(0x117)](_0x43fdc7);_0x57e86d['name']=_0x4f0241,_0x57e86d[_0x3aa607(0x140)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a155_0x108a0a[_0x3aa607(0x134)](_0x3a29d9,JSON['stringify'](_0x57e86d,null,0x2)+'\x0a');}function detectPackageManager(){const _0x38a9a0=a155_0x2af8;try{return execSync(_0x38a9a0(0x128),{'stdio':_0x38a9a0(0x10e)}),_0x38a9a0(0x11b);}catch{return _0x38a9a0(0x119);}}async function formatCode(_0xb6c172){const _0x6630a1=a155_0x2af8;try{await execAsync(_0x6630a1(0x11e),{'cwd':_0xb6c172});}catch{}}async function configureProject(_0x4c852c,_0x51d9e0,_0x286fff){const _0x32564c=a155_0x2af8,_0x46d256=a155_0x3d2eca[_0x32564c(0x124)](process[_0x32564c(0x132)](),_0x4c852c),_0xd00453=a155_0x3d2eca[_0x32564c(0x113)](_0x46d256,NEW_CONFIG_NAME),_0x176d10=readConfig(),_0x5c8d53=typeof _0x176d10['env']===_0x32564c(0x137)?_0x176d10['env']:undefined,_0x516e8d={};for(const _0x1b2d67 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x176d10[_0x1b2d67]!=null)_0x516e8d[_0x1b2d67]=_0x176d10[_0x1b2d67];}const _0x2fed5c=buildCanonicalProjectConfig(_0x516e8d,{'appCodes':_0x51d9e0?[_0x51d9e0]:[],'env':_0x286fff||_0x5c8d53||_0x32564c(0x121),'metadata':{'createdAt':new Date()[_0x32564c(0x133)](),'version':getCliVersion()}});writeConfigFile(_0xd00453,_0x2fed5c);}async function pullApiConfig(_0x7969c0,_0x58e817,_0x4bc345,_0x5309a8){const _0x3af761=a155_0x2af8,_0x330047=process[_0x3af761(0x132)]();try{process[_0x3af761(0x12f)](_0x7969c0);const _0x6018ec=_0x4bc345||_0x3af761(0x121);initEnv(_0x6018ec),console[_0x3af761(0x118)](_0x3af761(0x146));const {configArray:_0x2fb828}=await fetchModelList(_0x58e817,_0x5309a8||''),_0x3ecc18=await generateApiFile(_0x2fb828,'',_0x58e817,!![],_0x6018ec,DEFAULT_API_DIR);console['log'](_0x3af761(0x112)+_0x2fb828[_0x3af761(0x141)]+_0x3af761(0x12c)+_0x3ecc18[_0x3af761(0x11d)]+'\x20model(s)');}catch(_0xa17fa3){console[_0x3af761(0x118)](_0x3af761(0x111)+CLI_BIN_NAME+_0x3af761(0x10d));}finally{process[_0x3af761(0x12f)](_0x330047);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a156_0xd36d(_0x3422c8,_0x86cb99){_0x3422c8=_0x3422c8-0xb8;const _0x103f0f=a156_0x103f();let _0xd36d92=_0x103f0f[_0x3422c8];return _0xd36d92;}(function(_0x263c37,_0x34765a){const _0x5e8761=a156_0xd36d,_0xdf5134=_0x263c37();while(!![]){try{const _0x59f3e9=-parseInt(_0x5e8761(0xbf))/0x1*(parseInt(_0x5e8761(0xc1))/0x2)+parseInt(_0x5e8761(0xc3))/0x3+parseInt(_0x5e8761(0xbc))/0x4+-parseInt(_0x5e8761(0xbd))/0x5*(parseInt(_0x5e8761(0xbe))/0x6)+-parseInt(_0x5e8761(0xc4))/0x7*(parseInt(_0x5e8761(0xc2))/0x8)+-parseInt(_0x5e8761(0xc7))/0x9*(parseInt(_0x5e8761(0xc0))/0xa)+-parseInt(_0x5e8761(0xc6))/0xb*(-parseInt(_0x5e8761(0xbb))/0xc);if(_0x59f3e9===_0x34765a)break;else _0xdf5134['push'](_0xdf5134['shift']());}catch(_0x458561){_0xdf5134['push'](_0xdf5134['shift']());}}}(a156_0x103f,0xd487d));import a156_0x504195 from'node:path';function a156_0x103f(){const _0x42d640=['30983412JBVAHv','68856LHxBCh','14095vbcgxW','1578PnzYWn','37585luIBrO','2823910Bjowyf','18lGcnpz','72oMUsPo','3191877ueoBrz','673372KBWjLQ','resolve','11WheqzY','27znluXZ','sub-app-react-demo','../../../../','join','projects'];a156_0x103f=function(){return _0x42d640;};return a156_0x103f();}import{fileURLToPath}from'node:url';const __dirname=a156_0x504195['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x3a2b2e=a156_0xd36d;return a156_0x504195[_0x3a2b2e(0xc5)](__dirname,_0x3a2b2e(0xb8));}export function getSubAppReactDemoTemplateDir(){const _0x475613=a156_0xd36d;return a156_0x504195[_0x475613(0xb9)](getRabetbaseCliPackageRoot(),'templates',_0x475613(0xba),_0x475613(0xc8));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a157_0x3d56(_0x597835,_0x14b193){_0x597835=_0x597835-0x198;const _0x2f8eae=a157_0x2f8e();let _0x3d56ab=_0x2f8eae[_0x597835];return _0x3d56ab;}(function(_0x23cde5,_0xcd815a){const _0x252db3=a157_0x3d56,_0x2eff79=_0x23cde5();while(!![]){try{const _0x16cea7=-parseInt(_0x252db3(0x19f))/0x1+-parseInt(_0x252db3(0x19b))/0x2+-parseInt(_0x252db3(0x1a7))/0x3+parseInt(_0x252db3(0x198))/0x4*(-parseInt(_0x252db3(0x19a))/0x5)+-parseInt(_0x252db3(0x1a0))/0x6+-parseInt(_0x252db3(0x1a3))/0x7*(-parseInt(_0x252db3(0x1a8))/0x8)+parseInt(_0x252db3(0x19e))/0x9;if(_0x16cea7===_0xcd815a)break;else _0x2eff79['push'](_0x2eff79['shift']());}catch(_0x512965){_0x2eff79['push'](_0x2eff79['shift']());}}}(a157_0x2f8e,0x80efb));function a157_0x2f8e(){const _0x4d7839=['3699480gjoMVV','success','cwd','2513vinaFc','开始复制项目模板','项目模板复制完成','message','233862DiFwqW','14256DXEbcy','8XXSFKL','now','2564975SJpgNx','698730OGdqIV','error','copy','24016365SzGOTl','710211jeEVKw'];a157_0x2f8e=function(){return _0x4d7839;};return a157_0x2f8e();}import a157_0x3e9092 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x5a1e6f){const _0x58d681=a157_0x3d56,_0x2b56b6=Date[_0x58d681(0x199)](),_0x47254e=a157_0x3e9092['resolve'](process[_0x58d681(0x1a2)](),_0x5a1e6f);try{logger['info']('copy',_0x58d681(0x1a4),{'projectCode':_0x5a1e6f,'templateDir':templateDir}),await copyDirectory(templateDir,_0x47254e);const _0x9fb3df=Date['now']()-_0x2b56b6;logger[_0x58d681(0x1a1)](_0x58d681(0x19d),_0x58d681(0x1a5),_0x9fb3df,{'projectCode':_0x5a1e6f});}catch(_0x56a435){const _0x224d2b=Date['now']()-_0x2b56b6;logger[_0x58d681(0x19c)](_0x58d681(0x19d),'项目模板复制失败',{'projectCode':_0x5a1e6f,'error':_0x56a435 instanceof Error?_0x56a435[_0x58d681(0x1a6)]:String(_0x56a435),'duration':_0x224d2b});throw _0x56a435;}return formatElapsed(_0x2b56b6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1edfec,_0x23baf1){const _0x3de3da=a158_0x5e47,_0x17f9ae=_0x1edfec();while(!![]){try{const _0x408096=parseInt(_0x3de3da(0x108))/0x1*(parseInt(_0x3de3da(0x106))/0x2)+-parseInt(_0x3de3da(0x10a))/0x3*(-parseInt(_0x3de3da(0xfb))/0x4)+-parseInt(_0x3de3da(0xfc))/0x5+parseInt(_0x3de3da(0x105))/0x6*(parseInt(_0x3de3da(0x104))/0x7)+parseInt(_0x3de3da(0x107))/0x8*(parseInt(_0x3de3da(0xff))/0x9)+-parseInt(_0x3de3da(0xfd))/0xa+parseInt(_0x3de3da(0x102))/0xb*(-parseInt(_0x3de3da(0xfe))/0xc);if(_0x408096===_0x23baf1)break;else _0x17f9ae['push'](_0x17f9ae['shift']());}catch(_0x522172){_0x17f9ae['push'](_0x17f9ae['shift']());}}}(a158_0x3d73,0x46527));import a158_0x3ffc49 from'node:path';function a158_0x5e47(_0x388dee,_0x5519c4){_0x388dee=_0x388dee-0xf9;const _0x3d7348=a158_0x3d73();let _0x5e4797=_0x3d7348[_0x388dee];return _0x5e4797;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x140476){const _0x123b5c=a158_0x5e47,_0x270521=Date[_0x123b5c(0xfa)](),_0x36288c=a158_0x3ffc49['resolve'](process['cwd'](),_0x140476);try{logger[_0x123b5c(0x10c)](_0x123b5c(0x10b),'开始格式化代码',{'projectCode':_0x140476}),await execa(resolveNpmBin('npx'),[_0x123b5c(0xf9),_0x123b5c(0x101),'.'],{'cwd':_0x36288c});const _0x2127c4=Date[_0x123b5c(0xfa)]()-_0x270521;logger['success'](_0x123b5c(0x10b),_0x123b5c(0x109),_0x2127c4,{'projectCode':_0x140476});}catch(_0x4cc535){const _0x4a87a9=Date[_0x123b5c(0xfa)]()-_0x270521;logger[_0x123b5c(0x103)](_0x123b5c(0x10b),_0x123b5c(0x100),{'projectCode':_0x140476,'error':_0x4cc535 instanceof Error?_0x4cc535[_0x123b5c(0x10d)]:String(_0x4cc535),'duration':_0x4a87a9});throw _0x4cc535;}return formatElapsed(_0x270521);}function a158_0x3d73(){const _0x44315b=['3VHKCBR','format','info','message','prettier','now','2293336gxBZWx','1219065fZyZWz','1214450uPPcvu','60uAvbis','9xPeosL','代码格式化失败','--write','2095819wFyldF','error','590723HGALuF','30wXdDhX','26WzldiQ','1254040hYFrCu','34916XxxCEK','代码格式化完成'];a158_0x3d73=function(){return _0x44315b;};return a158_0x3d73();}
|