@lovrabet/rabetbase-cli 2.2.1-beta.1 → 2.2.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.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-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-selector.js +1 -1
- package/lib/commands/common/flags.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/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/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-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/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/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.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/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/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.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-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/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a102_0x5742ab=a102_0x1fe8;(function(_0x15be00,_0x4c0489){const _0x3302ec=a102_0x1fe8,_0x124883=_0x15be00();while(!![]){try{const _0x2ec7d5=parseInt(_0x3302ec(0xce))/0x1*(-parseInt(_0x3302ec(0xb5))/0x2)+parseInt(_0x3302ec(0xd7))/0x3*(-parseInt(_0x3302ec(0xc2))/0x4)+parseInt(_0x3302ec(0xb6))/0x5+-parseInt(_0x3302ec(0xc1))/0x6+parseInt(_0x3302ec(0xbf))/0x7*(parseInt(_0x3302ec(0x96))/0x8)+-parseInt(_0x3302ec(0xbd))/0x9+parseInt(_0x3302ec(0xc5))/0xa*(parseInt(_0x3302ec(0x9b))/0xb);if(_0x2ec7d5===_0x4c0489)break;else _0x124883['push'](_0x124883['shift']());}catch(_0x41fcce){_0x124883['push'](_0x124883['shift']());}}}(a102_0x160e,0xdacb0));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{datasetRelations}from'../../commands/dataset/relations.js';import{loadDatasetDetailForPage,loadPageDetailForPage,validateDatasetSelector}from'../../commands/page/shared.js';const PROTOCOL=a102_0x5742ab(0xa8);export const pageRelationAudit={'service':a102_0x5742ab(0xd1),'command':a102_0x5742ab(0xa2),'description':a102_0x5742ab(0x95),'risk':a102_0x5742ab(0x9a),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a102_0x5742ab(0xdd),'type':a102_0x5742ab(0xb3),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x85f1c7){validateDatasetSelector(_0x85f1c7);},async 'execute'(_0x3bbe75){const _0xecf601=a102_0x5742ab,_0x483741=await loadDatasetDetailForPage(_0x3bbe75),_0x5706f2=await datasetRelations[_0xecf601(0xd2)](_0x3bbe75),_0x164a6e=(_0x5706f2[_0xecf601(0xdb)]?.[_0xecf601(0xa6)]??[])['filter'](_0x593b62=>_0x593b62[_0xecf601(0xa7)]?.['datasetCode']===_0x483741[_0xecf601(0x9f)]),_0x3a4b66=_0x483741[_0xecf601(0xec)][_0xecf601(0xa3)](_0x5d2238=>!_0x5d2238[_0xecf601(0x99)]),_0x53ec64=await Promise[_0xecf601(0xaf)](_0x3a4b66[_0xecf601(0xa5)](async _0x414065=>auditPage(_0x3bbe75,_0x414065,_0x483741,_0x164a6e))),_0x5dd9bc=_0x53ec64[_0xecf601(0x93)]();return{'ok':!![],'message':_0xecf601(0x8f)+_0x5dd9bc[_0xecf601(0xc7)]+'\x20item(s)','data':{'protocol':PROTOCOL,'appCode':_0x3bbe75[_0xecf601(0x92)],'datasetCode':_0x483741['code'],'total':_0x5dd9bc[_0xecf601(0xc7)],'items':_0x5dd9bc}};}};async function auditPage(_0x49a4d5,_0x160737,_0x108b21,_0x43c173){const _0x5eac65=a102_0x5742ab,_0x523c32=await loadPageDetailForPage(_0x49a4d5,_0x160737['id']),_0x44f671=parsePageSchema(_0x523c32['code']),_0x19baa2=collectDataSources(_0x44f671),_0x4400bc=buildFromFieldAuditMap(_0x108b21);return _0x43c173[_0x5eac65(0xa5)](_0x2a76b7=>{const _0x4863c0=_0x5eac65,_0x5422a1=buildExpectedBinding(_0x49a4d5[_0x4863c0(0x92)],_0x2a76b7),_0x4e6d1f=_0x4400bc['get'](_0x2a76b7['from']['field'])??buildFallbackFromFieldAudit(_0x2a76b7[_0x4863c0(0xa7)][_0x4863c0(0xe1)]),_0x300991=collectFieldCandidates(_0x44f671,_0x2a76b7['from']['field']),_0x4db01e=_0x300991[0x0]??findDataSourceCandidate(_0x19baa2,_0x2a76b7[_0x4863c0(0xa7)]['field']);if(!_0x4db01e)return buildAuditItem({'pageId':_0x523c32[_0x4863c0(0xbc)],'pageType':_0x523c32['type'],'datasetCode':_0x108b21[_0x4863c0(0x9f)],'relation':_0x2a76b7,'location':_0x4863c0(0xc8),'currentBinding':null,'expectedBinding':_0x5422a1,'fromField':_0x4e6d1f,'status':_0x4863c0(0x90)});if(_0x4db01e['optionsType']===_0x4863c0(0xcd)){const _0x331d73=classifyCustomOptions(_0x4e6d1f);return buildAuditItem({'pageId':_0x523c32['pageId'],'pageType':_0x523c32['type'],'datasetCode':_0x108b21[_0x4863c0(0x9f)],'relation':_0x2a76b7,'location':_0x4db01e[_0x4863c0(0xbb)],'currentBinding':{'optionsType':_0x4863c0(0xcd)},'expectedBinding':_0x5422a1,'fromField':_0x4e6d1f,'status':_0x331d73});}const _0x4c60f3=findDataSourceForCandidate(_0x19baa2,_0x4db01e,_0x2a76b7[_0x4863c0(0xa7)][_0x4863c0(0xe1)]),_0x56d2d8=_0x4c60f3?{'optionsType':_0x4863c0(0xd9),'dataSourceId':_0x4c60f3['id'],..._0x4c60f3[_0x4863c0(0xb2)]?{'uri':_0x4c60f3[_0x4863c0(0xb2)]}:{},..._0x4c60f3[_0x4863c0(0x9f)]?{'code':_0x4c60f3[_0x4863c0(0x9f)]}:{},..._0x4c60f3['label']?{'label':_0x4c60f3[_0x4863c0(0x9d)]}:{},..._0x4db01e[_0x4863c0(0xd3)]?{'stateKey':_0x4db01e['stateKey']}:{}}:_0x4db01e[_0x4863c0(0xd3)]?{'optionsType':_0x4863c0(0xd9),'stateKey':_0x4db01e[_0x4863c0(0xd3)]}:null,_0x22c5ca=classifyBinding(_0x4db01e,_0x4c60f3,_0x2a76b7);return buildAuditItem({'pageId':_0x523c32[_0x4863c0(0xbc)],'pageType':_0x523c32[_0x4863c0(0xe2)],'datasetCode':_0x108b21['code'],'relation':_0x2a76b7,'location':_0x4db01e[_0x4863c0(0xbb)],'currentBinding':_0x56d2d8,'expectedBinding':_0x5422a1,'fromField':_0x4e6d1f,'status':_0x22c5ca});});}function a102_0x1fe8(_0x4404e5,_0x180367){_0x4404e5=_0x4404e5-0x8d;const _0x160e11=a102_0x160e();let _0x1fe82a=_0x160e11[_0x4404e5];return _0x1fe82a;}function buildAuditItem(_0x232cb9){const _0x39a63e=a102_0x5742ab;return{'pageId':_0x232cb9[_0x39a63e(0xbc)],'pageType':_0x232cb9[_0x39a63e(0xa9)],'datasetCode':_0x232cb9['datasetCode'],'field':_0x232cb9[_0x39a63e(0xd9)]['from']['field'],'location':_0x232cb9['location'],'currentBinding':_0x232cb9[_0x39a63e(0xeb)],'expectedBinding':_0x232cb9[_0x39a63e(0xa0)],'fromField':_0x232cb9[_0x39a63e(0x8d)],'status':_0x232cb9[_0x39a63e(0xe0)]};}function buildFromFieldAuditMap(_0xb1fa7f){const _0x3f874c=a102_0x5742ab,_0xce2e0f=Array[_0x3f874c(0x94)](_0xb1fa7f[_0x3f874c(0xb0)]?.['fields'])?_0xb1fa7f['raw'][_0x3f874c(0xda)]:Array['isArray'](_0xb1fa7f[_0x3f874c(0xb0)]?.['properties'])?_0xb1fa7f[_0x3f874c(0xb0)][_0x3f874c(0xa4)]:[],_0x5b035d=new Map();for(const _0x325c56 of _0xce2e0f){const _0x23c1f5=normalizeFromFieldAudit(_0x325c56);if(_0x23c1f5)_0x5b035d[_0x3f874c(0x91)](_0x23c1f5[_0x3f874c(0xca)],_0x23c1f5);}return _0x5b035d;}function normalizeFromFieldAudit(_0x296c07){const _0x16373d=a102_0x5742ab;if(!isRecord(_0x296c07)||_0x296c07[_0x16373d(0x99)]===!![])return null;const _0x2ff7f1=_0x296c07[_0x16373d(0xe3)]!==undefined||_0x296c07[_0x16373d(0xb4)]!==undefined,_0x4820b3=text(_0x2ff7f1?_0x296c07[_0x16373d(0xca)]??_0x296c07[_0x16373d(0x9f)]??_0x296c07[_0x16373d(0xe1)]??_0x296c07[_0x16373d(0xae)]:_0x296c07[_0x16373d(0x9f)]??_0x296c07[_0x16373d(0xca)]??_0x296c07[_0x16373d(0xe1)]??_0x296c07[_0x16373d(0xae)]);if(!_0x4820b3)return null;const _0x379e8f=text(_0x2ff7f1?_0x296c07[_0x16373d(0xe3)]:_0x296c07[_0x16373d(0xca)]),_0x4c8e0b=parseObjectMaybe(_0x296c07[_0x16373d(0xc9)]),_0x30a130=text(_0x296c07[_0x16373d(0xb4)]),_0x2ba952=text(_0x296c07[_0x16373d(0xe2)]??_0x296c07[_0x16373d(0xc4)]),_0x436790=hasOptionsArray(_0x296c07[_0x16373d(0xc6)])||hasOptionsArray(_0x4c8e0b?.[_0x16373d(0xc6)])||hasOptionsArray(_0x4c8e0b?.[_0x16373d(0xe7)]),_0x3704e2=classifyFromFieldOptionsType({'explicitOptionsType':normalizeOptionsType(_0x296c07[_0x16373d(0xcb)]??_0x4c8e0b?.[_0x16373d(0xcb)]),'hasOptions':_0x436790});return{'name':_0x4820b3,..._0x379e8f?{'displayName':_0x379e8f}:{},..._0x30a130?{'doType':_0x30a130}:{},..._0x2ba952?{'type':_0x2ba952}:{},'optionsType':_0x3704e2,'hasOptions':_0x436790};}function buildFallbackFromFieldAudit(_0x1e04b3){const _0x5be857=a102_0x5742ab;return{'name':_0x1e04b3,'optionsType':_0x5be857(0xe6),'hasOptions':![]};}function normalizeOptionsType(_0xfc7c1d){const _0xb466e0=a102_0x5742ab;if(typeof _0xfc7c1d!==_0xb466e0(0xb3))return null;const _0x48b5a1=_0xfc7c1d[_0xb466e0(0x9c)]()[_0xb466e0(0xad)]();if(_0x48b5a1===_0xb466e0(0xd9)||_0x48b5a1===_0xb466e0(0xcd))return _0x48b5a1;return null;}function classifyFromFieldOptionsType(_0x55b4d5){const _0x5ce508=a102_0x5742ab;if(_0x55b4d5[_0x5ce508(0xd0)])return _0x55b4d5[_0x5ce508(0xd0)];return _0x55b4d5[_0x5ce508(0xdc)]?_0x5ce508(0xcd):_0x5ce508(0xe6);}function hasOptionsArray(_0x5994af){const _0x3655ea=a102_0x5742ab;return Array[_0x3655ea(0x94)](_0x5994af)&&_0x5994af[_0x3655ea(0xc7)]>0x0;}function parseObjectMaybe(_0x49f87a){if(isRecord(_0x49f87a))return _0x49f87a;if(typeof _0x49f87a!=='string'||!_0x49f87a['trim']())return null;try{const _0xb00efa=JSON['parse'](_0x49f87a);return isRecord(_0xb00efa)?_0xb00efa:null;}catch{return null;}}function parsePageSchema(_0x433644){const _0x1e3830=a102_0x5742ab;if(!_0x433644[_0x1e3830(0x9c)]())return{};try{return JSON[_0x1e3830(0xc0)](_0x433644);}catch{return{};}}function collectDataSources(_0x1a4cdf){const _0x4c9f6e=[];return walk(_0x1a4cdf,[],(_0x3f4c41,_0x1b1cc6)=>{const _0x5d8316=a102_0x1fe8;if(!isRecord(_0x3f4c41))return;const _0x5bf854=isRecord(_0x3f4c41['dataSource'])&&Array[_0x5d8316(0x94)](_0x3f4c41[_0x5d8316(0x8e)][_0x5d8316(0xd8)])?_0x3f4c41[_0x5d8316(0x8e)]['list']:_0x1b1cc6[_0x1b1cc6[_0x5d8316(0xc7)]-0x1]===_0x5d8316(0x8e)&&Array[_0x5d8316(0x94)](_0x3f4c41[_0x5d8316(0xd8)])?_0x3f4c41[_0x5d8316(0xd8)]:[];for(const _0x9aa41d of _0x5bf854){const _0x67e046=normalizeDataSource(_0x9aa41d);if(_0x67e046)_0x4c9f6e[_0x5d8316(0xcf)](_0x67e046);}}),uniqueById(_0x4c9f6e);}function normalizeDataSource(_0x20e7d8){const _0x1e1d27=a102_0x5742ab;if(!isRecord(_0x20e7d8))return null;const _0x117b72=text(_0x20e7d8['id']??_0x20e7d8[_0x1e1d27(0xca)]??_0x20e7d8['key']);if(!_0x117b72)return null;const _0x41ad84=isRecord(_0x20e7d8[_0x1e1d27(0xc6)])?_0x20e7d8['options']:{},_0x3c2f62=isRecord(_0x41ad84[_0x1e1d27(0xd5)])?_0x41ad84['params']:isRecord(_0x20e7d8[_0x1e1d27(0xd5)])?_0x20e7d8[_0x1e1d27(0xd5)]:{},_0xfd0007=_0x41ad84['paramsArr']??_0x20e7d8['paramsArr'];return{'id':_0x117b72,'uri':text(_0x41ad84[_0x1e1d27(0xb2)]??_0x41ad84[_0x1e1d27(0xdf)]??_0x20e7d8[_0x1e1d27(0xb2)]??_0x20e7d8[_0x1e1d27(0xdf)]),'code':text(_0x3c2f62[_0x1e1d27(0x9f)]??readParamFromArray(_0xfd0007,'code')),'label':text(_0x3c2f62[_0x1e1d27(0x9d)]??readParamFromArray(_0xfd0007,'label'))};}function readParamFromArray(_0x555adc,_0x205982){const _0x2346c1=a102_0x5742ab;if(!Array[_0x2346c1(0x94)](_0x555adc))return undefined;return _0x555adc[_0x2346c1(0xd6)](_0x4f048f=>isRecord(_0x4f048f)&&_0x4f048f[_0x2346c1(0xca)]===_0x205982)?.[_0x2346c1(0xde)];}function collectFieldCandidates(_0x1239f6,_0x450bfb){const _0x5cb3ab=[];return walk(_0x1239f6,[],(_0x45894c,_0x54d9de)=>{const _0x11a6a1=a102_0x1fe8;if(!isRecord(_0x45894c))return;if(!objectTargetsField(_0x45894c,_0x450bfb))return;const _0x306c9d=readStateKey(_0x45894c);_0x5cb3ab[_0x11a6a1(0xcf)]({'field':_0x450bfb,'location':inferLocation(_0x54d9de),'optionsType':hasPageOptionsArray(_0x45894c)?_0x11a6a1(0xcd):_0x11a6a1(0xd9),'stateKey':_0x306c9d});}),_0x5cb3ab;}function objectTargetsField(_0x37763d,_0x211770){const _0x21d914=a102_0x5742ab;return['field',_0x21d914(0xe9),_0x21d914(0xca),'id','key',_0x21d914(0xcc)][_0x21d914(0xb7)](_0x61741=>text(_0x37763d[_0x61741])===_0x211770);}function a102_0x160e(){const _0x34208f=['768082YgnvWI','parse','1258590NJjgDX','12gMNiyA','custom_options','dataType','729890colAOA','options','length','form','extend','name','optionsType','prop','custom','98GYkJbR','push','explicitOptionsType','page','execute','stateKey','datasource','params','find','957849UJPqwN','list','relation','fields','data','hasOptions','alias','value','url','status','field','type','displayName','formatOptions','wrong_state','unknown','selectItems','JSExpression','dataIndex','search','currentBinding','relatedPages','fromField','dataSource','Page\x20relation\x20audit:\x20','missing','set','appCode','flat','isArray','Audit\x20Smart\x20List\x20Page\x20option\x20bindings\x20against\x20dataset\x20relations','80jJUXSd','match','/api/','deleted','read','209DqPjvx','trim','label','datasetCode','code','expectedBinding','table','relation-audit','filter','properties','map','relations','from','page-relation-audit.v1','pageType','includes','wrong_code','relation_options','toLowerCase','key','all','raw','forEach','uri','string','doType','10918lVVgMa','2785280KwQMos','some','wrong_label','add','entries','location','pageId','3981015pDQXGc','/getSelectOptions'];a102_0x160e=function(){return _0x34208f;};return a102_0x160e();}function hasPageOptionsArray(_0x3df12f){const _0x2aba3b=a102_0x5742ab,_0x52cb50=isRecord(_0x3df12f[_0x2aba3b(0xe4)])?_0x3df12f[_0x2aba3b(0xe4)]:{};return Array[_0x2aba3b(0x94)](_0x3df12f[_0x2aba3b(0xc6)])||Array[_0x2aba3b(0x94)](_0x52cb50[_0x2aba3b(0xc6)]);}function readStateKey(_0x4a16ef){const _0x4e644f=a102_0x5742ab,_0x56441b=isRecord(_0x4a16ef[_0x4e644f(0xe4)])?_0x4a16ef[_0x4e644f(0xe4)]:{};return readStateKeyFromUnknown(_0x4a16ef['options'])??readStateKeyFromUnknown(_0x56441b['options']);}function readStateKeyFromUnknown(_0x5f2420){const _0x42f16b=a102_0x5742ab;if(isRecord(_0x5f2420)&&_0x5f2420[_0x42f16b(0xe2)]===_0x42f16b(0xe8))return readStateKeyFromUnknown(_0x5f2420[_0x42f16b(0xde)]);if(typeof _0x5f2420!==_0x42f16b(0xb3))return undefined;const _0x236458=_0x5f2420[_0x42f16b(0x97)](/(?:this\.)?state\.([A-Za-z0-9_-]+)/);return _0x236458?.[0x1];}function inferLocation(_0x137dde){const _0x35bc4e=a102_0x5742ab,_0x587449=_0x137dde[_0x35bc4e(0xa5)](_0x22de95=>_0x22de95['toLowerCase']());if(_0x587449[_0x35bc4e(0xb7)](_0x31a718=>_0x31a718[_0x35bc4e(0xaa)](_0x35bc4e(0xd4))))return'dataSource';if(_0x587449[_0x35bc4e(0xb7)](_0x2c88c0=>_0x2c88c0[_0x35bc4e(0xaa)]('column')||_0x2c88c0[_0x35bc4e(0xaa)](_0x35bc4e(0xa1))))return _0x35bc4e(0xa1);if(_0x587449[_0x35bc4e(0xb7)](_0x1498a6=>_0x1498a6[_0x35bc4e(0xaa)](_0x35bc4e(0xa3))||_0x1498a6[_0x35bc4e(0xaa)](_0x35bc4e(0xea))))return'filter';return _0x35bc4e(0xc8);}function findDataSourceCandidate(_0x174efa,_0x299417){const _0x1b706c=a102_0x5742ab;return _0x174efa['some'](_0x52aa02=>_0x52aa02['id']['includes'](_0x299417))?{'field':_0x299417,'location':_0x1b706c(0x8e),'optionsType':_0x1b706c(0xd9)}:undefined;}function findDataSourceForCandidate(_0x4cdf29,_0x47c6cd,_0xb8a852){const _0x2411fc=a102_0x5742ab;if(_0x47c6cd[_0x2411fc(0xd3)])return _0x4cdf29['find'](_0x1b033e=>_0x1b033e['id']===_0x47c6cd[_0x2411fc(0xd3)]);return _0x4cdf29[_0x2411fc(0xd6)](_0x37db3d=>_0x37db3d['id'][_0x2411fc(0xaa)](_0xb8a852));}function classifyBinding(_0x23f304,_0x1eb202,_0x1a830b){const _0x3e69fe=a102_0x5742ab;if(!_0x1eb202)return _0x23f304['stateKey']?_0x3e69fe(0xe5):_0x3e69fe(0x90);if(_0x23f304['stateKey']&&_0x1eb202['id']!==_0x23f304[_0x3e69fe(0xd3)])return'wrong_state';if(_0x1eb202[_0x3e69fe(0x9f)]&&_0x1eb202[_0x3e69fe(0x9f)]!==_0x1a830b['to'][_0x3e69fe(0xe1)])return _0x3e69fe(0xab);const _0x5c1f46=readRelationLabel(_0x1a830b);if(_0x5c1f46&&_0x1eb202[_0x3e69fe(0x9d)]!==_0x5c1f46)return _0x3e69fe(0xb8);return _0x3e69fe(0xac);}function classifyCustomOptions(_0x5aa8d7){const _0x54aa18=a102_0x5742ab;if(_0x5aa8d7[_0x54aa18(0xcb)]===_0x54aa18(0xd9))return _0x54aa18(0x90);return _0x54aa18(0xc3);}function buildExpectedBinding(_0xc58019,_0x463599){const _0x49958a=a102_0x5742ab,_0x24cdfd=readRelationLabel(_0x463599);return{'toDatasetCode':_0x463599['to'][_0x49958a(0x9e)],'code':_0x463599['to']['field'],..._0x24cdfd?{'label':_0x24cdfd}:{},'uri':_0x49958a(0x98)+_0xc58019+'/'+_0x463599['to'][_0x49958a(0x9e)]+_0x49958a(0xbe)};}function readRelationLabel(_0x59c8e7){return text(_0x59c8e7['to']['labelField'])||undefined;}function uniqueById(_0xb486d4){const _0x5ede0d=a102_0x5742ab,_0x120ab4=new Set();return _0xb486d4[_0x5ede0d(0xa3)](_0x50733b=>{const _0x496e45=_0x5ede0d;if(_0x120ab4['has'](_0x50733b['id']))return![];return _0x120ab4[_0x496e45(0xb9)](_0x50733b['id']),!![];});}function walk(_0x185272,_0x55ebe6,_0x228482){const _0x42dee2=a102_0x5742ab;_0x228482(_0x185272,_0x55ebe6);if(Array[_0x42dee2(0x94)](_0x185272)){_0x185272[_0x42dee2(0xb1)]((_0x3e0479,_0x12ade7)=>walk(_0x3e0479,[..._0x55ebe6,String(_0x12ade7)],_0x228482));return;}if(!isRecord(_0x185272))return;for(const [_0x23270b,_0x1777f1]of Object[_0x42dee2(0xba)](_0x185272)){walk(_0x1777f1,[..._0x55ebe6,_0x23270b],_0x228482);}}function isRecord(_0x39adb2){const _0x5f0496=a102_0x5742ab;return Boolean(_0x39adb2)&&typeof _0x39adb2==='object'&&!Array[_0x5f0496(0x94)](_0x39adb2);}function text(_0x49bd31){const _0x147a14=a102_0x5742ab;return typeof _0x49bd31===_0x147a14(0xb3)?_0x49bd31[_0x147a14(0x9c)]():'';}
|
|
1
|
+
const a102_0x342c2d=a102_0x4e17;(function(_0x2c6667,_0x4499e3){const _0x216d28=a102_0x4e17,_0x2a2723=_0x2c6667();while(!![]){try{const _0x5ffdfc=-parseInt(_0x216d28(0x200))/0x1*(parseInt(_0x216d28(0x245))/0x2)+parseInt(_0x216d28(0x23c))/0x3*(-parseInt(_0x216d28(0x225))/0x4)+-parseInt(_0x216d28(0x223))/0x5+parseInt(_0x216d28(0x248))/0x6+parseInt(_0x216d28(0x247))/0x7*(parseInt(_0x216d28(0x1ef))/0x8)+-parseInt(_0x216d28(0x226))/0x9*(parseInt(_0x216d28(0x22d))/0xa)+parseInt(_0x216d28(0x22f))/0xb*(parseInt(_0x216d28(0x1f8))/0xc);if(_0x5ffdfc===_0x4499e3)break;else _0x2a2723['push'](_0x2a2723['shift']());}catch(_0x3e2ed1){_0x2a2723['push'](_0x2a2723['shift']());}}}(a102_0x5253,0xbd055));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{datasetRelations}from'../../commands/dataset/relations.js';import{loadDatasetDetailForPage,loadPageDetailForPage,validateDatasetSelector}from'../../commands/page/shared.js';const PROTOCOL=a102_0x342c2d(0x21e);export const pageRelationAudit={'service':a102_0x342c2d(0x1f3),'command':a102_0x342c2d(0x1f2),'description':a102_0x342c2d(0x202),'risk':a102_0x342c2d(0x227),'defaultOutputFormat':a102_0x342c2d(0x21b),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a102_0x342c2d(0x204),'type':'string','description':a102_0x342c2d(0x23d)}],async 'validate'(_0x287baa){validateDatasetSelector(_0x287baa);},async 'execute'(_0x3fbed4){const _0x45033e=a102_0x342c2d,_0x5693a0=await loadDatasetDetailForPage(_0x3fbed4),_0xeca596=await datasetRelations[_0x45033e(0x238)](_0x3fbed4),_0x1cc79a=(_0xeca596[_0x45033e(0x1f9)]?.[_0x45033e(0x207)]??[])[_0x45033e(0x1ee)](_0x38db26=>_0x38db26[_0x45033e(0x239)]?.[_0x45033e(0x20c)]===_0x5693a0[_0x45033e(0x205)]),_0x4aa20e=_0x5693a0['relatedPages'][_0x45033e(0x1ee)](_0x46de1a=>!_0x46de1a[_0x45033e(0x219)]),_0x389d13=await Promise[_0x45033e(0x21d)](_0x4aa20e[_0x45033e(0x210)](async _0x411d0d=>auditPage(_0x3fbed4,_0x411d0d,_0x5693a0,_0x1cc79a))),_0x8a9a4e=_0x389d13[_0x45033e(0x20f)]();return{'ok':!![],'message':_0x45033e(0x20e)+_0x8a9a4e[_0x45033e(0x229)]+'\x20item(s)','data':{'protocol':PROTOCOL,'appCode':_0x3fbed4[_0x45033e(0x22a)],'datasetCode':_0x5693a0[_0x45033e(0x205)],'total':_0x8a9a4e[_0x45033e(0x229)],'items':_0x8a9a4e}};}};async function auditPage(_0x37c4ed,_0x5b2548,_0x4df3fc,_0x48342a){const _0x5eaef1=a102_0x342c2d,_0x38bd4e=await loadPageDetailForPage(_0x37c4ed,_0x5b2548['id']),_0x3c2381=parsePageSchema(_0x38bd4e[_0x5eaef1(0x205)]),_0x532fb4=collectDataSources(_0x3c2381),_0x19f873=buildFromFieldAuditMap(_0x4df3fc);return _0x48342a[_0x5eaef1(0x210)](_0x5ea73b=>{const _0x1de045=_0x5eaef1,_0x72f0a2=buildExpectedBinding(_0x37c4ed[_0x1de045(0x22a)],_0x5ea73b),_0x4fcf13=_0x19f873[_0x1de045(0x21c)](_0x5ea73b[_0x1de045(0x239)][_0x1de045(0x246)])??buildFallbackFromFieldAudit(_0x5ea73b[_0x1de045(0x239)]['field']),_0x416008=collectFieldCandidates(_0x3c2381,_0x5ea73b['from'][_0x1de045(0x246)]),_0x1ff1b2=_0x416008[0x0]??findDataSourceCandidate(_0x532fb4,_0x5ea73b[_0x1de045(0x239)][_0x1de045(0x246)]);if(!_0x1ff1b2)return buildAuditItem({'pageId':_0x38bd4e[_0x1de045(0x1f4)],'pageType':_0x38bd4e[_0x1de045(0x243)],'datasetCode':_0x4df3fc[_0x1de045(0x205)],'relation':_0x5ea73b,'location':_0x1de045(0x218),'currentBinding':null,'expectedBinding':_0x72f0a2,'fromField':_0x4fcf13,'status':'missing'});if(_0x1ff1b2[_0x1de045(0x201)]===_0x1de045(0x213)){const _0x1b5797=classifyCustomOptions(_0x4fcf13);return buildAuditItem({'pageId':_0x38bd4e[_0x1de045(0x1f4)],'pageType':_0x38bd4e[_0x1de045(0x243)],'datasetCode':_0x4df3fc[_0x1de045(0x205)],'relation':_0x5ea73b,'location':_0x1ff1b2[_0x1de045(0x23f)],'currentBinding':{'optionsType':_0x1de045(0x213)},'expectedBinding':_0x72f0a2,'fromField':_0x4fcf13,'status':_0x1b5797});}const _0x4c930e=findDataSourceForCandidate(_0x532fb4,_0x1ff1b2,_0x5ea73b[_0x1de045(0x239)][_0x1de045(0x246)]),_0x2cc38f=_0x4c930e?{'optionsType':'relation','dataSourceId':_0x4c930e['id'],..._0x4c930e[_0x1de045(0x237)]?{'uri':_0x4c930e[_0x1de045(0x237)]}:{},..._0x4c930e['code']?{'code':_0x4c930e['code']}:{},..._0x4c930e[_0x1de045(0x230)]?{'label':_0x4c930e[_0x1de045(0x230)]}:{},..._0x1ff1b2[_0x1de045(0x242)]?{'stateKey':_0x1ff1b2[_0x1de045(0x242)]}:{}}:_0x1ff1b2[_0x1de045(0x242)]?{'optionsType':_0x1de045(0x1fb),'stateKey':_0x1ff1b2[_0x1de045(0x242)]}:null,_0x479aae=classifyBinding(_0x1ff1b2,_0x4c930e,_0x5ea73b);return buildAuditItem({'pageId':_0x38bd4e['pageId'],'pageType':_0x38bd4e['type'],'datasetCode':_0x4df3fc[_0x1de045(0x205)],'relation':_0x5ea73b,'location':_0x1ff1b2[_0x1de045(0x23f)],'currentBinding':_0x2cc38f,'expectedBinding':_0x72f0a2,'fromField':_0x4fcf13,'status':_0x479aae});});}function buildAuditItem(_0x3cd87e){const _0x42e8e4=a102_0x342c2d;return{'pageId':_0x3cd87e['pageId'],'pageType':_0x3cd87e[_0x42e8e4(0x20b)],'datasetCode':_0x3cd87e[_0x42e8e4(0x20c)],'field':_0x3cd87e[_0x42e8e4(0x1fb)]['from'][_0x42e8e4(0x246)],'location':_0x3cd87e[_0x42e8e4(0x23f)],'currentBinding':_0x3cd87e[_0x42e8e4(0x234)],'expectedBinding':_0x3cd87e[_0x42e8e4(0x233)],'fromField':_0x3cd87e[_0x42e8e4(0x208)],'status':_0x3cd87e[_0x42e8e4(0x1f7)]};}function buildFromFieldAuditMap(_0xb6b81a){const _0x2c6f92=a102_0x342c2d,_0x2b6110=Array[_0x2c6f92(0x22b)](_0xb6b81a[_0x2c6f92(0x212)]?.[_0x2c6f92(0x232)])?_0xb6b81a[_0x2c6f92(0x212)][_0x2c6f92(0x232)]:Array[_0x2c6f92(0x22b)](_0xb6b81a[_0x2c6f92(0x212)]?.[_0x2c6f92(0x1f0)])?_0xb6b81a[_0x2c6f92(0x212)][_0x2c6f92(0x1f0)]:[],_0x4cf5c7=new Map();for(const _0x522a8c of _0x2b6110){const _0x423344=normalizeFromFieldAudit(_0x522a8c);if(_0x423344)_0x4cf5c7[_0x2c6f92(0x1f1)](_0x423344[_0x2c6f92(0x23b)],_0x423344);}return _0x4cf5c7;}function normalizeFromFieldAudit(_0x1a0ce4){const _0x220fb7=a102_0x342c2d;if(!isRecord(_0x1a0ce4)||_0x1a0ce4[_0x220fb7(0x219)]===!![])return null;const _0x5a3bff=_0x1a0ce4[_0x220fb7(0x1ff)]!==undefined||_0x1a0ce4[_0x220fb7(0x236)]!==undefined,_0x2be77c=text(_0x5a3bff?_0x1a0ce4[_0x220fb7(0x23b)]??_0x1a0ce4[_0x220fb7(0x205)]??_0x1a0ce4[_0x220fb7(0x246)]??_0x1a0ce4[_0x220fb7(0x222)]:_0x1a0ce4[_0x220fb7(0x205)]??_0x1a0ce4[_0x220fb7(0x23b)]??_0x1a0ce4['field']??_0x1a0ce4[_0x220fb7(0x222)]);if(!_0x2be77c)return null;const _0x39588d=text(_0x5a3bff?_0x1a0ce4[_0x220fb7(0x1ff)]:_0x1a0ce4[_0x220fb7(0x23b)]),_0x1fb540=parseObjectMaybe(_0x1a0ce4['extend']),_0x121241=text(_0x1a0ce4[_0x220fb7(0x236)]),_0x40b3fe=text(_0x1a0ce4[_0x220fb7(0x243)]??_0x1a0ce4[_0x220fb7(0x214)]),_0x1db146=hasOptionsArray(_0x1a0ce4['options'])||hasOptionsArray(_0x1fb540?.[_0x220fb7(0x1fa)])||hasOptionsArray(_0x1fb540?.[_0x220fb7(0x22e)]),_0x3a5b28=classifyFromFieldOptionsType({'explicitOptionsType':normalizeOptionsType(_0x1a0ce4[_0x220fb7(0x201)]??_0x1fb540?.['optionsType']),'hasOptions':_0x1db146});return{'name':_0x2be77c,..._0x39588d?{'displayName':_0x39588d}:{},..._0x121241?{'doType':_0x121241}:{},..._0x40b3fe?{'type':_0x40b3fe}:{},'optionsType':_0x3a5b28,'hasOptions':_0x1db146};}function buildFallbackFromFieldAudit(_0x2ebadf){const _0x448658=a102_0x342c2d;return{'name':_0x2ebadf,'optionsType':_0x448658(0x1ed),'hasOptions':![]};}function normalizeOptionsType(_0xb866f1){const _0x5bfe9a=a102_0x342c2d;if(typeof _0xb866f1!==_0x5bfe9a(0x216))return null;const _0x145658=_0xb866f1[_0x5bfe9a(0x203)]()['toLowerCase']();if(_0x145658===_0x5bfe9a(0x1fb)||_0x145658===_0x5bfe9a(0x213))return _0x145658;return null;}function classifyFromFieldOptionsType(_0x3a2f53){const _0x395254=a102_0x342c2d;if(_0x3a2f53[_0x395254(0x240)])return _0x3a2f53[_0x395254(0x240)];return _0x3a2f53['hasOptions']?'custom':'unknown';}function hasOptionsArray(_0x47206c){const _0x3f53c4=a102_0x342c2d;return Array['isArray'](_0x47206c)&&_0x47206c[_0x3f53c4(0x229)]>0x0;}function parseObjectMaybe(_0x19656f){const _0xc0985f=a102_0x342c2d;if(isRecord(_0x19656f))return _0x19656f;if(typeof _0x19656f!==_0xc0985f(0x216)||!_0x19656f[_0xc0985f(0x203)]())return null;try{const _0x4c3877=JSON['parse'](_0x19656f);return isRecord(_0x4c3877)?_0x4c3877:null;}catch{return null;}}function parsePageSchema(_0x4e092e){const _0x3cf152=a102_0x342c2d;if(!_0x4e092e[_0x3cf152(0x203)]())return{};try{return JSON[_0x3cf152(0x224)](_0x4e092e);}catch{return{};}}function collectDataSources(_0x430fae){const _0x3d9460=[];return walk(_0x430fae,[],(_0x6d1d63,_0x4f44d8)=>{const _0x147ebb=a102_0x4e17;if(!isRecord(_0x6d1d63))return;const _0xdf6421=isRecord(_0x6d1d63[_0x147ebb(0x249)])&&Array[_0x147ebb(0x22b)](_0x6d1d63[_0x147ebb(0x249)]['list'])?_0x6d1d63[_0x147ebb(0x249)]['list']:_0x4f44d8[_0x4f44d8[_0x147ebb(0x229)]-0x1]==='dataSource'&&Array[_0x147ebb(0x22b)](_0x6d1d63['list'])?_0x6d1d63[_0x147ebb(0x22c)]:[];for(const _0x525591 of _0xdf6421){const _0x4d9c9f=normalizeDataSource(_0x525591);if(_0x4d9c9f)_0x3d9460[_0x147ebb(0x20d)](_0x4d9c9f);}}),uniqueById(_0x3d9460);}function normalizeDataSource(_0x3e84e6){const _0x52c95b=a102_0x342c2d;if(!isRecord(_0x3e84e6))return null;const _0x810eb1=text(_0x3e84e6['id']??_0x3e84e6[_0x52c95b(0x23b)]??_0x3e84e6['key']);if(!_0x810eb1)return null;const _0x406fc0=isRecord(_0x3e84e6[_0x52c95b(0x1fa)])?_0x3e84e6[_0x52c95b(0x1fa)]:{},_0x14a378=isRecord(_0x406fc0[_0x52c95b(0x1f5)])?_0x406fc0[_0x52c95b(0x1f5)]:isRecord(_0x3e84e6[_0x52c95b(0x1f5)])?_0x3e84e6[_0x52c95b(0x1f5)]:{},_0x4b042e=_0x406fc0['paramsArr']??_0x3e84e6[_0x52c95b(0x1fe)];return{'id':_0x810eb1,'uri':text(_0x406fc0[_0x52c95b(0x237)]??_0x406fc0[_0x52c95b(0x211)]??_0x3e84e6[_0x52c95b(0x237)]??_0x3e84e6[_0x52c95b(0x211)]),'code':text(_0x14a378['code']??readParamFromArray(_0x4b042e,'code')),'label':text(_0x14a378['label']??readParamFromArray(_0x4b042e,_0x52c95b(0x230)))};}function readParamFromArray(_0x23646c,_0x5e7602){const _0x4384f9=a102_0x342c2d;if(!Array[_0x4384f9(0x22b)](_0x23646c))return undefined;return _0x23646c[_0x4384f9(0x1f6)](_0x1b04ed=>isRecord(_0x1b04ed)&&_0x1b04ed[_0x4384f9(0x23b)]===_0x5e7602)?.[_0x4384f9(0x23a)];}function collectFieldCandidates(_0x46f8f5,_0x3abd84){const _0x4130a3=[];return walk(_0x46f8f5,[],(_0x36183f,_0x5ed278)=>{const _0x28ee7c=a102_0x4e17;if(!isRecord(_0x36183f))return;if(!objectTargetsField(_0x36183f,_0x3abd84))return;const _0x2adb4e=readStateKey(_0x36183f);_0x4130a3[_0x28ee7c(0x20d)]({'field':_0x3abd84,'location':inferLocation(_0x5ed278),'optionsType':hasPageOptionsArray(_0x36183f)?_0x28ee7c(0x213):_0x28ee7c(0x1fb),'stateKey':_0x2adb4e});}),_0x4130a3;}function objectTargetsField(_0x238c7c,_0xe499ab){const _0x44c2fa=a102_0x342c2d;return['field',_0x44c2fa(0x20a),_0x44c2fa(0x23b),'id',_0x44c2fa(0x222),_0x44c2fa(0x221)][_0x44c2fa(0x235)](_0x543ef8=>text(_0x238c7c[_0x543ef8])===_0xe499ab);}function hasPageOptionsArray(_0x2cbf79){const _0x1b5e78=a102_0x342c2d,_0x21c1af=isRecord(_0x2cbf79[_0x1b5e78(0x1fd)])?_0x2cbf79[_0x1b5e78(0x1fd)]:{};return Array['isArray'](_0x2cbf79[_0x1b5e78(0x1fa)])||Array[_0x1b5e78(0x22b)](_0x21c1af['options']);}function readStateKey(_0xe04286){const _0x5b138d=a102_0x342c2d,_0x1d4ce5=isRecord(_0xe04286[_0x5b138d(0x1fd)])?_0xe04286[_0x5b138d(0x1fd)]:{};return readStateKeyFromUnknown(_0xe04286[_0x5b138d(0x1fa)])??readStateKeyFromUnknown(_0x1d4ce5['options']);}function a102_0x5253(){const _0x56bf4b=['missing','string','add','form','deleted','wrong_code','compress','get','all','page-relation-audit.v1','includes','custom_options','prop','key','126250BqyhQe','parse','3558452kxOqmE','9upyVxu','read','wrong_label','length','appCode','isArray','list','3603080Qczrnz','selectItems','9144817OLEPUs','label','table','fields','expectedBinding','currentBinding','some','doType','uri','execute','from','value','name','3MAVDfn','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','match','location','explicitOptionsType','has','stateKey','type','/api/','3554GHreLf','field','77zEKzjg','4424622EUUhFD','dataSource','unknown','filter','609304PQERpq','properties','set','relation-audit','page','pageId','params','find','status','12zAUwJy','data','options','relation','toLowerCase','formatOptions','paramsArr','displayName','201EuuGDZ','optionsType','Audit\x20Smart\x20List\x20Page\x20option\x20bindings\x20against\x20dataset\x20relations','trim','alias','code','JSExpression','relations','fromField','wrong_state','dataIndex','pageType','datasetCode','push','Page\x20relation\x20audit:\x20','flat','map','url','raw','custom','dataType'];a102_0x5253=function(){return _0x56bf4b;};return a102_0x5253();}function a102_0x4e17(_0x37ecbc,_0x2a7dba){_0x37ecbc=_0x37ecbc-0x1ed;const _0x5253f7=a102_0x5253();let _0x4e172d=_0x5253f7[_0x37ecbc];return _0x4e172d;}function readStateKeyFromUnknown(_0x4c003b){const _0x2e939c=a102_0x342c2d;if(isRecord(_0x4c003b)&&_0x4c003b[_0x2e939c(0x243)]===_0x2e939c(0x206))return readStateKeyFromUnknown(_0x4c003b[_0x2e939c(0x23a)]);if(typeof _0x4c003b!=='string')return undefined;const _0x5a43b9=_0x4c003b[_0x2e939c(0x23e)](/(?:this\.)?state\.([A-Za-z0-9_-]+)/);return _0x5a43b9?.[0x1];}function inferLocation(_0x589d45){const _0x5447a2=a102_0x342c2d,_0x250c60=_0x589d45['map'](_0x247e9e=>_0x247e9e[_0x5447a2(0x1fc)]());if(_0x250c60[_0x5447a2(0x235)](_0x5358b4=>_0x5358b4[_0x5447a2(0x21f)]('datasource')))return _0x5447a2(0x249);if(_0x250c60[_0x5447a2(0x235)](_0x5b33b7=>_0x5b33b7[_0x5447a2(0x21f)]('column')||_0x5b33b7[_0x5447a2(0x21f)](_0x5447a2(0x231))))return'table';if(_0x250c60['some'](_0x3b59dc=>_0x3b59dc[_0x5447a2(0x21f)](_0x5447a2(0x1ee))||_0x3b59dc['includes']('search')))return _0x5447a2(0x1ee);return _0x5447a2(0x218);}function findDataSourceCandidate(_0x2e566c,_0x150a7d){const _0x69e3e2=a102_0x342c2d;return _0x2e566c['some'](_0x396b59=>_0x396b59['id'][_0x69e3e2(0x21f)](_0x150a7d))?{'field':_0x150a7d,'location':_0x69e3e2(0x249),'optionsType':_0x69e3e2(0x1fb)}:undefined;}function findDataSourceForCandidate(_0x58a2f6,_0x2a59f7,_0x3fd01d){const _0x4dbb6c=a102_0x342c2d;if(_0x2a59f7[_0x4dbb6c(0x242)])return _0x58a2f6[_0x4dbb6c(0x1f6)](_0x21ca67=>_0x21ca67['id']===_0x2a59f7[_0x4dbb6c(0x242)]);return _0x58a2f6[_0x4dbb6c(0x1f6)](_0x22b267=>_0x22b267['id'][_0x4dbb6c(0x21f)](_0x3fd01d));}function classifyBinding(_0x3a368d,_0xbf0885,_0x5855d6){const _0x4bf19e=a102_0x342c2d;if(!_0xbf0885)return _0x3a368d[_0x4bf19e(0x242)]?_0x4bf19e(0x209):_0x4bf19e(0x215);if(_0x3a368d['stateKey']&&_0xbf0885['id']!==_0x3a368d[_0x4bf19e(0x242)])return _0x4bf19e(0x209);if(_0xbf0885[_0x4bf19e(0x205)]&&_0xbf0885['code']!==_0x5855d6['to'][_0x4bf19e(0x246)])return _0x4bf19e(0x21a);const _0x222b7b=readRelationLabel(_0x5855d6);if(_0x222b7b&&_0xbf0885[_0x4bf19e(0x230)]!==_0x222b7b)return _0x4bf19e(0x228);return'relation_options';}function classifyCustomOptions(_0x2dd71c){const _0x424cf0=a102_0x342c2d;if(_0x2dd71c['optionsType']===_0x424cf0(0x1fb))return'missing';return _0x424cf0(0x220);}function buildExpectedBinding(_0x2bc7a8,_0xfee889){const _0x52910b=a102_0x342c2d,_0x467cc9=readRelationLabel(_0xfee889);return{'toDatasetCode':_0xfee889['to'][_0x52910b(0x20c)],'code':_0xfee889['to']['field'],..._0x467cc9?{'label':_0x467cc9}:{},'uri':_0x52910b(0x244)+_0x2bc7a8+'/'+_0xfee889['to'][_0x52910b(0x20c)]+'/getSelectOptions'};}function readRelationLabel(_0x17f5cb){return text(_0x17f5cb['to']['labelField'])||undefined;}function uniqueById(_0x3929ee){const _0x3c00e1=a102_0x342c2d,_0x3d6477=new Set();return _0x3929ee[_0x3c00e1(0x1ee)](_0x349427=>{const _0x46e549=_0x3c00e1;if(_0x3d6477[_0x46e549(0x241)](_0x349427['id']))return![];return _0x3d6477[_0x46e549(0x217)](_0x349427['id']),!![];});}function walk(_0x5aef32,_0x393f6c,_0x410381){const _0x127fff=a102_0x342c2d;_0x410381(_0x5aef32,_0x393f6c);if(Array[_0x127fff(0x22b)](_0x5aef32)){_0x5aef32['forEach']((_0xa3dff1,_0x61b1b3)=>walk(_0xa3dff1,[..._0x393f6c,String(_0x61b1b3)],_0x410381));return;}if(!isRecord(_0x5aef32))return;for(const [_0x2bdf1c,_0x147bc8]of Object['entries'](_0x5aef32)){walk(_0x147bc8,[..._0x393f6c,_0x2bdf1c],_0x410381);}}function isRecord(_0x518b49){const _0x3dfcb4=a102_0x342c2d;return Boolean(_0x518b49)&&typeof _0x518b49==='object'&&!Array[_0x3dfcb4(0x22b)](_0x518b49);}function text(_0x47a878){const _0x3066f0=a102_0x342c2d;return typeof _0x47a878==='string'?_0x47a878[_0x3066f0(0x203)]():'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a103_0x1352(_0x31c088,_0x22dff4){_0x31c088=_0x31c088-0xa8;const _0x381152=a103_0x3811();let _0x1352af=_0x381152[_0x31c088];return _0x1352af;}(function(_0x9375ef,_0x1c61a6){const _0x64a7ec=a103_0x1352,_0x2dbf75=_0x9375ef();while(!![]){try{const _0x35c399=-parseInt(_0x64a7ec(0xda))/0x1*(parseInt(_0x64a7ec(0x11d))/0x2)+-parseInt(_0x64a7ec(0xc3))/0x3*(-parseInt(_0x64a7ec(0x112))/0x4)+parseInt(_0x64a7ec(0x116))/0x5*(-parseInt(_0x64a7ec(0x124))/0x6)+-parseInt(_0x64a7ec(0x11e))/0x7+-parseInt(_0x64a7ec(0xce))/0x8+parseInt(_0x64a7ec(0xfb))/0x9+parseInt(_0x64a7ec(0xed))/0xa*(parseInt(_0x64a7ec(0x115))/0xb);if(_0x35c399===_0x1c61a6)break;else _0x2dbf75['push'](_0x2dbf75['shift']());}catch(_0x440cb2){_0x2dbf75['push'](_0x2dbf75['shift']());}}}(a103_0x3811,0x80b16));import{randomUUID}from'node:crypto';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getDatasetDetail,getPageDetail,tryGetStandardPageStatus}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{CliErrors}from'../../errors.js';export function getPageIdFlag(_0x1f89b5){const _0xe2e769=a103_0x1352,_0x3bceb6=_0x1f89b5['flag']('id');if(typeof _0x3bceb6===_0xe2e769(0x12e)&&Number['isFinite'](_0x3bceb6)&&_0x3bceb6>0x0)return _0x3bceb6;return undefined;}export function validateDatasetSelector(_0x2a3a0f){const _0x2fe685=a103_0x1352,_0x3d9aa8=Boolean(_0x2a3a0f[_0x2fe685(0xf5)](_0x2fe685(0xbe))),_0x29d893=Boolean(_0x2a3a0f[_0x2fe685(0xf5)](_0x2fe685(0xe3)));if(_0x3d9aa8&&_0x29d893)throw CliErrors[_0x2fe685(0xf8)](_0x2fe685(0xc1));if(!_0x3d9aa8&&!_0x29d893)throw CliErrors[_0x2fe685(0xf8)](_0x2fe685(0xea));}export function validateGenerateOperationSelector(_0x219a1f){const _0x4e08b9=a103_0x1352,_0x388fc6=Boolean(_0x219a1f[_0x4e08b9(0xf5)](_0x4e08b9(0xba))),_0x7758ee=Boolean(_0x219a1f[_0x4e08b9(0xf5)](_0x4e08b9(0x12f)));if(_0x388fc6&&_0x7758ee)throw CliErrors[_0x4e08b9(0xf8)]('Use\x20either\x20--operation-id\x20or\x20--client-operation-id,\x20not\x20both.');if(!_0x388fc6&&!_0x7758ee)throw CliErrors[_0x4e08b9(0xf8)](_0x4e08b9(0xe9));}export function validatePageTargetSelector(_0x3edec8){const _0x522e13=a103_0x1352,_0x580ac5=getPageIdFlag(_0x3edec8)!==undefined,_0x55dc48=Boolean(_0x3edec8['str'](_0x522e13(0xbe))||_0x3edec8[_0x522e13(0xf5)](_0x522e13(0xe3)));if(_0x580ac5&&_0x55dc48)throw CliErrors[_0x522e13(0xf8)](_0x522e13(0xd3));if(!_0x580ac5&&!_0x55dc48)throw CliErrors[_0x522e13(0xf8)](_0x522e13(0xc7));if(_0x3edec8[_0x522e13(0xf5)](_0x522e13(0xc6))&&!_0x55dc48)throw CliErrors['validation'](_0x522e13(0xb6));}export function resolveDatasetCode(_0x27f6b3){const _0x27a830=a103_0x1352;validateDatasetSelector(_0x27f6b3);const _0x41f28c=_0x27f6b3['str'](_0x27a830(0xbe));if(_0x41f28c)return _0x41f28c;const _0x9f2f60=_0x27f6b3[_0x27a830(0xf5)]('alias'),_0x52f493=resolveApiFilePath(_0x27f6b3[_0x27a830(0xd4)],_0x27f6b3[_0x27a830(0xa8)]),_0x15480d=resolveAlias(_0x27f6b3['apiDir'],_0x9f2f60,undefined,_0x52f493);if(_0x15480d)return _0x15480d;const _0x27fb12=loadAliasMap(_0x27f6b3[_0x27a830(0xd4)],undefined,_0x52f493),_0x4b0492=_0x27fb12[_0x27a830(0x100)]>0x0?_0x27a830(0x123)+_0x27fb12[_0x27a830(0x133)](_0x89eb56=>_0x89eb56[_0x27a830(0xe3)])[_0x27a830(0xbf)](',\x20'):'Run\x20`'+CLI_BIN_NAME+_0x27a830(0xac);throw CliErrors[_0x27a830(0xf8)](_0x27a830(0xe5)+_0x9f2f60+_0x27a830(0x127)+_0x4b0492);}function a103_0x3811(){const _0x56ad96=['\x20page\x20generate-status\x20--datasetcode\x20','26556oMtfDU','\x20app\x20use\x20<name>`\x20or\x20pass\x20--appcode.','status','132638BKCBdJ','557195ucNDnc','unknown_reconcile_failed','isFinite','config','string','datasetIds','query_operation_status','2qGKwAS','1606381OWFYtt','Page\x20\x22','toUpperCase','\x22\x20has\x20incomplete\x20Smart\x20List\x20Page\x20sets.','versionTag','Available\x20aliases:\x20','6MvBCOk','operationId','from','\x22\x20not\x20found.\x20','\x20--client-operation-id\x20','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','relatedPages','run_generate_start','clientOperationId','\x20--format\x20json','number','client-operation-id','\x20page\x20standard-page-status\x20--datasetcode\x20','fallbackUndeletedPages','title','map','appCode','trim','blocked_complete_plus_residual_sets','pageId','\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.','generate','boolean','deleted','run_sync','get','menuPath','CANCELING','keys','fields','--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.','\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','push','UNKNOWN','operation-id','\x22,\x20not\x20current\x20app\x20\x22','type','complete','datasetcode','join','set','Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.','datasetCode','141TFYcHM','Dataset\x20\x22','\x20page\x20generate-start\x20--datasetcode\x20','version-tag','One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.','sync','\x22\x20returned\x20an\x20unsupported\x20Smart\x20List\x20Page\x20state.','already_exists_complete_set','\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.','relatedPageInfoList','modelCode','6875336dsSWjK','PENDING','dataset','`\x20instead.','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.','apiDir','pageVersion','\x20page\x20sync\x20--datasetcode\x20','menuPages','datasetId','PARTIAL_SUCCESS','972709trLvIe','Run\x20`','FAILED','generated_complete_set','operation_running','menuVisible','\x22\x20belongs\x20to\x20app\x20\x22','Version\x20tag\x20\x22','Smart\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22','alias','totalSets','Alias\x20\x22','RETRYING','blocked_incomplete_sets','Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20','One\x20of\x20--operation-id\x20or\x20--client-operation-id\x20is\x20required.','One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.','__EMPTY__','successStatus','1110qXYYYC','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','filter','Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.','properties','pageSets','completeSets','isArray','str','manual_resolution_required','modelId','validation','blocked_multiple_complete_sets','\x20--operation-id\x20','9447327zFWkaM','SUCCESS','\x20--appcode\x20','\x22\x20not\x20found.','\x22\x20now\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','length','\x22,\x20but\x20no\x20Smart\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','name','no_standard_pages_found','incompleteSets','code','residualPages','\x22,\x20but\x20Smart\x20List\x20Page\x20facts\x20are\x20unavailable.','Switch\x20app\x20with\x20`','`\x20first,\x20then\x20poll\x20`','Operation\x20finished\x20for\x20dataset\x20\x22','hasMenu','page-','Smart\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22','<empty>','\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','pages'];a103_0x3811=function(){return _0x56ad96;};return a103_0x3811();}export async function loadDatasetDetailForPage(_0x55187d){const _0x1d3a6a=a103_0x1352,_0x54db10=resolveDatasetCode(_0x55187d),_0x2f6ec8=await getDatasetDetail(_0x54db10),_0x1029a4=normalizeDatasetDetail(_0x2f6ec8,_0x54db10);return ensureAppOwnership(_0x55187d['appCode'],_0x1029a4['appCode'],'Dataset\x20\x22'+_0x1029a4[_0x1d3a6a(0x105)]+_0x1d3a6a(0xe0)+_0x1029a4[_0x1d3a6a(0xa8)]+_0x1d3a6a(0xbb)+_0x55187d[_0x1d3a6a(0xa8)]+'\x22.'),_0x1029a4;}export async function loadPageDetailForPage(_0x1adfca,_0x5db5cd){const _0x50ede5=a103_0x1352,_0x365732=await getPageDetail(_0x5db5cd),_0x15561b=normalizePageDetail(_0x365732);return ensureAppOwnership(_0x1adfca[_0x50ede5(0xa8)],_0x15561b['appCode'],_0x50ede5(0x11f)+_0x5db5cd+_0x50ede5(0xe0)+_0x15561b[_0x50ede5(0xa8)]+'\x22,\x20not\x20current\x20app\x20\x22'+_0x1adfca[_0x50ede5(0xa8)]+'\x22.'),_0x15561b;}export function getUndeletedRelatedPages(_0x1d2bb2){const _0x474d1f=a103_0x1352;return _0x1d2bb2[_0x474d1f(0x12a)]['filter'](_0x244c82=>!_0x244c82[_0x474d1f(0xaf)]);}export function buildPageGenerateOperationStatusQueryCommand(_0x57500d,_0x574b47){const _0xdd7033=a103_0x1352,_0x581fa8=_0x574b47?.[_0xdd7033(0xa8)]&&_0x574b47[_0xdd7033(0xa8)][_0xdd7033(0xa9)]()!==''?_0xdd7033(0xfd)+_0x574b47['appCode']:'',_0x614c42=_0x574b47?.[_0xdd7033(0x125)]&&_0x574b47[_0xdd7033(0x125)]['trim']()!==''?_0xdd7033(0xfa)+_0x574b47[_0xdd7033(0x125)]:_0x574b47?.[_0xdd7033(0x12c)]&&_0x574b47[_0xdd7033(0x12c)][_0xdd7033(0xa9)]()!==''?_0xdd7033(0x128)+_0x574b47['clientOperationId']:'';return CLI_BIN_NAME+_0xdd7033(0x111)+_0x57500d+_0x581fa8+_0x614c42+_0xdd7033(0x12d);}export function createPageGenerateClientOperationId(){return'page-generate-'+randomUUID();}export function buildStandardPageStatusQueryCommand(_0x35b821,_0x7b022b){const _0x29ac76=a103_0x1352,_0x40e93e=_0x7b022b&&_0x7b022b['trim']()!==''?_0x29ac76(0xfd)+_0x7b022b:'';return CLI_BIN_NAME+_0x29ac76(0x130)+_0x35b821+_0x40e93e+_0x29ac76(0x12d);}export function prepareDatasetAction(_0x4eaf80,_0x5de3ad){const _0x46f5a5=a103_0x1352,_0x1ec074=getUndeletedRelatedPages(_0x4eaf80);if(_0x5de3ad===_0x46f5a5(0xad)&&_0x1ec074[_0x46f5a5(0x100)]>0x0)throw CliErrors[_0x46f5a5(0xf8)](_0x46f5a5(0xc4)+_0x4eaf80[_0x46f5a5(0x105)]+_0x46f5a5(0x129),_0x46f5a5(0xdb)+CLI_BIN_NAME+'\x20page\x20sync\x20--datasetcode\x20'+_0x4eaf80[_0x46f5a5(0x105)]+_0x46f5a5(0xd1));if(_0x5de3ad===_0x46f5a5(0xc8)&&_0x1ec074[_0x46f5a5(0x100)]===0x0)throw CliErrors['validation']('Dataset\x20\x22'+_0x4eaf80[_0x46f5a5(0x105)]+_0x46f5a5(0xd2),'Run\x20`'+CLI_BIN_NAME+_0x46f5a5(0xc5)+_0x4eaf80[_0x46f5a5(0x105)]+_0x46f5a5(0x109)+CLI_BIN_NAME+'\x20page\x20generate-status\x20--datasetcode\x20'+_0x4eaf80[_0x46f5a5(0x105)]+_0x46f5a5(0xcb));return{'dataset':_0x4eaf80,'undeletedPages':_0x1ec074};}export function prepareGenerateDatasetAction(_0x53ed02,_0x32069a){const _0x10a424=a103_0x1352,_0x3cf2a9=getUndeletedRelatedPages(_0x53ed02);if(!_0x32069a){if(_0x3cf2a9['length']>0x0)throw CliErrors['validation'](_0x10a424(0xc4)+_0x53ed02[_0x10a424(0x105)]+'\x22\x20already\x20has\x20undeleted\x20related\x20pages.',_0x10a424(0xdb)+CLI_BIN_NAME+'\x20page\x20sync\x20--datasetcode\x20'+_0x53ed02[_0x10a424(0x105)]+_0x10a424(0xd1));return{'dataset':_0x53ed02,'undeletedPages':_0x3cf2a9,'standardPageStatus':null};}const _0x482948=_0x32069a['completeSets'],_0x358638=_0x32069a[_0x10a424(0x104)],_0x39eeac=_0x32069a[_0x10a424(0x106)][_0x10a424(0x100)];if(_0x482948===0x0&&_0x358638===0x0&&_0x39eeac===0x0)return{'dataset':_0x53ed02,'undeletedPages':_0x3cf2a9,'standardPageStatus':_0x32069a};if(_0x482948===0x1&&_0x358638===0x0&&_0x39eeac===0x0)throw CliErrors[_0x10a424(0xf8)](_0x10a424(0xc4)+_0x53ed02[_0x10a424(0x105)]+_0x10a424(0x10f),_0x10a424(0xdb)+CLI_BIN_NAME+_0x10a424(0xd6)+_0x53ed02['code']+_0x10a424(0xd1));throw CliErrors[_0x10a424(0xf8)](_0x10a424(0xc4)+_0x53ed02[_0x10a424(0x105)]+'\x22\x20has\x20multiple\x20or\x20incomplete\x20Smart\x20List\x20Page\x20sets.','Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.');}export function assessStandardPageState(_0x1dea64,_0xb48b5f,_0x3e742a){const _0x19f776=a103_0x1352,_0x36fddb=_0x3e742a?.[_0x19f776(0xec)]??_0x19f776(0xca),_0x48a986=_0x3e742a?.[_0x19f776(0x131)]??[];if(!_0xb48b5f){if(_0x48a986[_0x19f776(0x100)]>0x0)return{'status':_0x19f776(0xe7),'allowGenerate':![],'manualResolutionRequired':!![],'message':'Dataset\x20\x22'+_0x1dea64+'\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','nextAction':_0x19f776(0xf6)};return{'status':'no_standard_pages_found','allowGenerate':!![],'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x1dea64+_0x19f776(0xb7),'nextAction':_0x19f776(0x12b)};}const _0x278692=_0xb48b5f[_0x19f776(0xf3)],_0x363e4c=_0xb48b5f[_0x19f776(0x104)],_0x5e928d=_0xb48b5f['residualPages'][_0x19f776(0x100)];if(_0x278692===0x0&&_0x363e4c===0x0&&_0x5e928d===0x0)return{'status':'no_standard_pages_found','allowGenerate':!![],'manualResolutionRequired':![],'message':_0x19f776(0xc4)+_0x1dea64+_0x19f776(0xb7),'nextAction':'run_generate_start'};if(_0x278692>0x1)return{'status':_0x19f776(0xf9),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x19f776(0xc4)+_0x1dea64+'\x22\x20has\x20multiple\x20complete\x20Smart\x20List\x20Page\x20sets.','nextAction':'manual_resolution_required'};if(_0x363e4c>0x0)return{'status':'blocked_incomplete_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':_0x19f776(0xc4)+_0x1dea64+_0x19f776(0x121),'nextAction':_0x19f776(0xf6)};if(_0x278692===0x1&&_0x5e928d>0x0)return{'status':_0x19f776(0xaa),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x19f776(0xc4)+_0x1dea64+'\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','nextAction':_0x19f776(0xf6)};if(_0x278692===0x1)return{'status':_0x36fddb,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x36fddb===_0x19f776(0xdd)?'Dataset\x20\x22'+_0x1dea64+_0x19f776(0xff):'Dataset\x20\x22'+_0x1dea64+_0x19f776(0x10f),'nextAction':_0x36fddb===_0x19f776(0xdd)?undefined:_0x19f776(0xb0)};return{'status':_0x19f776(0x117),'allowGenerate':![],'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x1dea64+_0x19f776(0xc9),'nextAction':_0x19f776(0x11c)};}export function assessGenerateOperationState(_0xecd902,_0x1c00fc,_0x31b420){const _0x5325f4=a103_0x1352,_0x252feb=String(_0x1c00fc||'')[_0x5325f4(0xa9)]()[_0x5325f4(0x120)]();if(_0x252feb===_0x5325f4(0xcf))return{'status':'operation_pending','manualResolutionRequired':![],'message':_0x5325f4(0x10d)+_0xecd902+'\x22.','nextAction':_0x5325f4(0x11c)};if(_0x252feb==='RUNNING'||_0x252feb===_0x5325f4(0xe6)||_0x252feb===_0x5325f4(0xb3))return{'status':_0x5325f4(0xde),'manualResolutionRequired':![],'message':'Smart\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22'+_0xecd902+'\x22.','nextAction':_0x5325f4(0x11c)};if(_0x252feb===_0x5325f4(0xfc)||_0x252feb===_0x5325f4(0xd9)){if(!_0x31b420)return{'status':_0x5325f4(0x117),'manualResolutionRequired':![],'message':'Operation\x20finished\x20for\x20dataset\x20\x22'+_0xecd902+_0x5325f4(0x107),'nextAction':_0x5325f4(0x11c)};const _0x353619=assessStandardPageState(_0xecd902,_0x31b420,{'successStatus':_0x5325f4(0xdd)});if(_0x353619[_0x5325f4(0x114)]===_0x5325f4(0x103))return{'status':_0x5325f4(0x117),'manualResolutionRequired':![],'message':_0x5325f4(0x10a)+_0xecd902+_0x5325f4(0x101),'nextAction':'query_operation_status'};return _0x353619;}if(_0x252feb===_0x5325f4(0xdc)||_0x252feb==='CANCELLED'||_0x252feb==='')return{'status':'operation_failed','manualResolutionRequired':![],'message':_0x5325f4(0xe2)+_0xecd902+'\x22.','nextAction':'query_operation_status'};return{'status':_0x5325f4(0x117),'manualResolutionRequired':![],'message':_0x5325f4(0xc4)+_0xecd902+_0x5325f4(0xee)+_0x252feb+'\x22.','nextAction':'query_operation_status'};}export function normalizePageDetail(_0x3d9513){const _0x21b2b4=a103_0x1352;return{'pageId':Number(_0x3d9513[_0x21b2b4(0xab)]),'appCode':_0x3d9513[_0x21b2b4(0xa8)],'name':_0x3d9513[_0x21b2b4(0x102)]||_0x21b2b4(0x10c)+_0x3d9513['pageId'],'code':_0x3d9513[_0x21b2b4(0x105)]||'','type':_0x3d9513['type']?String(_0x3d9513[_0x21b2b4(0xbc)]):'UNKNOWN','datasetIds':Array['isArray'](_0x3d9513[_0x21b2b4(0x11b)])?_0x3d9513[_0x21b2b4(0x11b)][_0x21b2b4(0x133)](_0x59567b=>Number(_0x59567b))[_0x21b2b4(0xef)](_0x53f24b=>Number['isFinite'](_0x53f24b)):[],'pageVersion':_0x3d9513[_0x21b2b4(0x119)]&&typeof _0x3d9513['config'][_0x21b2b4(0xd5)]===_0x21b2b4(0x12e)?_0x3d9513[_0x21b2b4(0x119)]['pageVersion']:null,'versionTag':_0x3d9513[_0x21b2b4(0x119)]&&typeof _0x3d9513['config'][_0x21b2b4(0x122)]===_0x21b2b4(0x11a)&&_0x3d9513[_0x21b2b4(0x119)][_0x21b2b4(0x122)]['trim']()!==''?_0x3d9513[_0x21b2b4(0x119)][_0x21b2b4(0x122)]:null,'relatedPages':normalizeRelatedPages(_0x3d9513['relatedPageInfoList']),'raw':_0x3d9513};}export function serializeDryRunDescription(_0x5754a2){return JSON['stringify'](_0x5754a2,null,0x2);}export async function loadStandardPageStatusForGenerate(_0x5c01e1,_0x484a7c){const _0x2f4c46=await tryGetStandardPageStatus(_0x5c01e1['appCode'],_0x484a7c);if(!_0x2f4c46)return null;return normalizeStandardPageStatus(_0x2f4c46,_0x484a7c);}export function selectVersionTagGroup(_0x532854,_0x20ef75,_0x30654a){const _0x226913=a103_0x1352,_0x18d875=new Map();for(const _0xea989c of _0x532854){const _0x4001de=normalizeVersionTag(_0x20ef75(_0xea989c)),_0x4cd459=_0x18d875[_0x226913(0xb1)](_0x4001de)??[];_0x4cd459[_0x226913(0xb8)](_0xea989c),_0x18d875[_0x226913(0xc0)](_0x4001de,_0x4cd459);}const _0x4b852a=Array[_0x226913(0x126)](_0x18d875[_0x226913(0xb4)]());if(_0x4b852a[_0x226913(0x100)]<=0x1&&!_0x30654a)return{'items':_0x532854,'availableTags':_0x4b852a};if(_0x30654a){const _0x4cb7c4=normalizeVersionTag(_0x30654a),_0x485bbd=_0x18d875[_0x226913(0xb1)](_0x4cb7c4);if(!_0x485bbd)throw CliErrors[_0x226913(0xf8)](_0x226913(0xe1)+_0x30654a+_0x226913(0xfe),buildVersionTagHint(_0x4b852a));return{'items':_0x485bbd,'availableTags':_0x4b852a};}throw CliErrors['validation'](_0x226913(0xf0),buildVersionTagHint(_0x4b852a));}function normalizeDatasetDetail(_0x545b2a,_0x397989){const _0x44b20a=a103_0x1352,_0x4e8ec0=Array['isArray'](_0x545b2a[_0x44b20a(0xb5)])?_0x545b2a['fields']:Array[_0x44b20a(0xf4)](_0x545b2a['properties'])?_0x545b2a[_0x44b20a(0xf1)]:[];return{'id':Number(_0x545b2a['id']??_0x545b2a[_0x44b20a(0xf7)]??0x0),'code':String(_0x545b2a[_0x44b20a(0x105)]||_0x545b2a[_0x44b20a(0xcd)]||_0x397989),'name':String(_0x545b2a[_0x44b20a(0x102)]||_0x397989),'appCode':_0x545b2a[_0x44b20a(0xa8)]||_0x545b2a[_0x44b20a(0xd0)]?.[_0x44b20a(0xa8)],'fieldCount':_0x4e8ec0[_0x44b20a(0x100)],'relatedPages':normalizeRelatedPages(_0x545b2a[_0x44b20a(0xcc)]),'raw':_0x545b2a};}function normalizeStandardPageStatus(_0x25289c,_0x1e97d7){const _0x1438e0=a103_0x1352,_0x179c8d=_0x30fbd3=>({'pageId':Number(_0x30fbd3['pageId']??_0x30fbd3['id']??0x0),'title':String(_0x30fbd3[_0x1438e0(0x132)]||_0x30fbd3[_0x1438e0(0x102)]||_0x1438e0(0x10c)+(_0x30fbd3[_0x1438e0(0xab)]??_0x30fbd3['id']??'unknown')),'type':_0x30fbd3[_0x1438e0(0xbc)]?String(_0x30fbd3[_0x1438e0(0xbc)]):_0x1438e0(0xb9),'deleted':_0x30fbd3[_0x1438e0(0xaf)]===!![],'hasMenu':_0x30fbd3[_0x1438e0(0x10b)]===!![],'menuVisible':typeof _0x30fbd3['menuVisible']===_0x1438e0(0xae)?_0x30fbd3[_0x1438e0(0xdf)]:null,'menuPath':typeof _0x30fbd3['menuPath']===_0x1438e0(0x11a)&&_0x30fbd3['menuPath'][_0x1438e0(0xa9)]()!==''?_0x30fbd3[_0x1438e0(0xb2)]:null}),_0x363095=Array[_0x1438e0(0xf4)](_0x25289c[_0x1438e0(0xf2)])?_0x25289c['pageSets']['map'](_0x2addf4=>({'versionTag':typeof _0x2addf4['versionTag']===_0x1438e0(0x11a)&&_0x2addf4[_0x1438e0(0x122)][_0x1438e0(0xa9)]()!==''?_0x2addf4['versionTag']:null,'complete':_0x2addf4['complete']===!![],'pages':Array[_0x1438e0(0xf4)](_0x2addf4[_0x1438e0(0x110)])?_0x2addf4['pages'][_0x1438e0(0x133)](_0x179c8d):[]})):[];return{'datasetId':typeof _0x25289c['datasetId']===_0x1438e0(0x12e)&&Number['isFinite'](_0x25289c[_0x1438e0(0xd8)])?_0x25289c[_0x1438e0(0xd8)]:null,'datasetCode':typeof _0x25289c['datasetCode']===_0x1438e0(0x11a)&&_0x25289c[_0x1438e0(0xc2)][_0x1438e0(0xa9)]()!==''?_0x25289c[_0x1438e0(0xc2)]:_0x1e97d7,'pageSets':_0x363095,'totalSets':typeof _0x25289c[_0x1438e0(0xe4)]===_0x1438e0(0x12e)&&Number[_0x1438e0(0x118)](_0x25289c[_0x1438e0(0xe4)])?_0x25289c[_0x1438e0(0xe4)]:_0x363095['length'],'completeSets':typeof _0x25289c[_0x1438e0(0xf3)]===_0x1438e0(0x12e)&&Number['isFinite'](_0x25289c['completeSets'])?_0x25289c[_0x1438e0(0xf3)]:_0x363095['filter'](_0x41af1d=>_0x41af1d[_0x1438e0(0xbd)])[_0x1438e0(0x100)],'incompleteSets':typeof _0x25289c[_0x1438e0(0x104)]===_0x1438e0(0x12e)&&Number[_0x1438e0(0x118)](_0x25289c[_0x1438e0(0x104)])?_0x25289c['incompleteSets']:_0x363095[_0x1438e0(0xef)](_0x36bff4=>!_0x36bff4[_0x1438e0(0xbd)]&&_0x36bff4['pages']['length']>0x0)[_0x1438e0(0x100)],'residualPages':Array['isArray'](_0x25289c['residualPages'])?_0x25289c[_0x1438e0(0x106)][_0x1438e0(0x133)](_0x179c8d):[],'menuPages':Array[_0x1438e0(0xf4)](_0x25289c[_0x1438e0(0xd7)])?_0x25289c['menuPages'][_0x1438e0(0x133)](_0x179c8d):[],'source':'standard-page-status'};}function normalizeRelatedPages(_0x4d59f2){const _0x82420d=a103_0x1352;if(!Array[_0x82420d(0xf4)](_0x4d59f2))return[];return _0x4d59f2['filter'](_0x22c568=>_0x22c568&&typeof _0x22c568==='object')['map'](_0x4d7309=>({'id':Number(_0x4d7309['id']),'type':_0x4d7309[_0x82420d(0xbc)]?String(_0x4d7309[_0x82420d(0xbc)]):'UNKNOWN','code':_0x4d7309[_0x82420d(0x105)]||undefined,'title':_0x4d7309[_0x82420d(0x132)]||_0x4d7309[_0x82420d(0x102)]||'page-'+_0x4d7309['id'],'deleted':_0x4d7309[_0x82420d(0xaf)]===!![]}))['filter'](_0x50b658=>Number[_0x82420d(0x118)](_0x50b658['id']));}function ensureAppOwnership(_0x4e2a81,_0xade49a,_0x30f444){const _0x2fe113=a103_0x1352;if(!_0xade49a)return;if(_0xade49a!==_0x4e2a81)throw CliErrors[_0x2fe113(0xf8)](_0x30f444,_0x2fe113(0x108)+CLI_BIN_NAME+_0x2fe113(0x113));}function normalizeVersionTag(_0x401258){const _0x144c9c=a103_0x1352;return _0x401258&&_0x401258['trim']()!==''?_0x401258:_0x144c9c(0xeb);}function buildVersionTagHint(_0x536eb4){const _0x415627=a103_0x1352,_0x5a9eb9=_0x536eb4[_0x415627(0x133)](_0x582c00=>_0x582c00===_0x415627(0xeb)?_0x415627(0x10e):_0x582c00)['join'](',\x20');return _0x415627(0xe8)+_0x5a9eb9;}
|
|
1
|
+
(function(_0x3eb5b4,_0x152e83){const _0x34d7bc=a103_0x1ea3,_0x23097b=_0x3eb5b4();while(!![]){try{const _0x82e30=-parseInt(_0x34d7bc(0xcd))/0x1*(parseInt(_0x34d7bc(0x12e))/0x2)+-parseInt(_0x34d7bc(0xcf))/0x3+-parseInt(_0x34d7bc(0x12b))/0x4*(parseInt(_0x34d7bc(0xe9))/0x5)+-parseInt(_0x34d7bc(0xc0))/0x6+-parseInt(_0x34d7bc(0xcb))/0x7+parseInt(_0x34d7bc(0xe4))/0x8+-parseInt(_0x34d7bc(0x10a))/0x9*(-parseInt(_0x34d7bc(0x12c))/0xa);if(_0x82e30===_0x152e83)break;else _0x23097b['push'](_0x23097b['shift']());}catch(_0x5c2a09){_0x23097b['push'](_0x23097b['shift']());}}}(a103_0x3ec0,0x8bf9f));import{randomUUID}from'node:crypto';function a103_0x1ea3(_0x895d4e,_0x4e3875){_0x895d4e=_0x895d4e-0xb1;const _0x3ec03c=a103_0x3ec0();let _0x1ea348=_0x3ec03c[_0x895d4e];return _0x1ea348;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getDatasetDetail,getPageDetail,tryGetStandardPageStatus}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{CliErrors}from'../../errors.js';export function getPageIdFlag(_0x3bf30a){const _0x4ecad7=a103_0x1ea3,_0x44db6b=_0x3bf30a[_0x4ecad7(0xc6)]('id');if(typeof _0x44db6b===_0x4ecad7(0xd9)&&Number['isFinite'](_0x44db6b)&&_0x44db6b>0x0)return _0x44db6b;return undefined;}export function validateDatasetSelector(_0x1bb387){const _0x1f180b=a103_0x1ea3,_0x2d9b97=Boolean(_0x1bb387[_0x1f180b(0xb5)](_0x1f180b(0xbb))),_0x3643cb=Boolean(_0x1bb387['str'](_0x1f180b(0xbe)));if(_0x2d9b97&&_0x3643cb)throw CliErrors[_0x1f180b(0x10c)](_0x1f180b(0xff));if(!_0x2d9b97&&!_0x3643cb)throw CliErrors[_0x1f180b(0x10c)](_0x1f180b(0xdc));}export function validateGenerateOperationSelector(_0x491b0d){const _0x32de64=a103_0x1ea3,_0x9f9fe=Boolean(_0x491b0d[_0x32de64(0xb5)]('operation-id')),_0x5a7c53=Boolean(_0x491b0d[_0x32de64(0xb5)](_0x32de64(0xf7)));if(_0x9f9fe&&_0x5a7c53)throw CliErrors[_0x32de64(0x10c)](_0x32de64(0xbf));if(!_0x9f9fe&&!_0x5a7c53)throw CliErrors[_0x32de64(0x10c)](_0x32de64(0xef));}export function validatePageTargetSelector(_0x332aab){const _0x33ea2a=a103_0x1ea3,_0xb4899a=getPageIdFlag(_0x332aab)!==undefined,_0x46aa11=Boolean(_0x332aab['str']('datasetcode')||_0x332aab[_0x33ea2a(0xb5)](_0x33ea2a(0xbe)));if(_0xb4899a&&_0x46aa11)throw CliErrors[_0x33ea2a(0x10c)](_0x33ea2a(0xde));if(!_0xb4899a&&!_0x46aa11)throw CliErrors[_0x33ea2a(0x10c)](_0x33ea2a(0xf6));if(_0x332aab['str'](_0x33ea2a(0xdb))&&!_0x46aa11)throw CliErrors[_0x33ea2a(0x10c)](_0x33ea2a(0xb3));}export function resolveDatasetCode(_0x1a3710){const _0x4ed461=a103_0x1ea3;validateDatasetSelector(_0x1a3710);const _0x5273d0=_0x1a3710[_0x4ed461(0xb5)](_0x4ed461(0xbb));if(_0x5273d0)return _0x5273d0;const _0x4a1e89=_0x1a3710[_0x4ed461(0xb5)]('alias'),_0x4b5748=resolveApiFilePath(_0x1a3710['apiDir'],_0x1a3710[_0x4ed461(0xd8)]),_0xc1a55=resolveAlias(_0x1a3710[_0x4ed461(0xcc)],_0x4a1e89,undefined,_0x4b5748);if(_0xc1a55)return _0xc1a55;const _0x1242c0=loadAliasMap(_0x1a3710[_0x4ed461(0xcc)],undefined,_0x4b5748),_0x153d33=_0x1242c0[_0x4ed461(0xe5)]>0x0?_0x4ed461(0x129)+_0x1242c0['map'](_0x3acabe=>_0x3acabe['alias'])['join'](',\x20'):_0x4ed461(0x116)+CLI_BIN_NAME+_0x4ed461(0xe0);throw CliErrors['validation'](_0x4ed461(0x119)+_0x4a1e89+_0x4ed461(0x11e)+_0x153d33);}export async function loadDatasetDetailForPage(_0x580110){const _0x12ad56=a103_0x1ea3,_0x2a13ef=resolveDatasetCode(_0x580110),_0x5af8c5=await getDatasetDetail(_0x2a13ef),_0x38cfdb=normalizeDatasetDetail(_0x5af8c5,_0x2a13ef);return ensureAppOwnership(_0x580110[_0x12ad56(0xd8)],_0x38cfdb[_0x12ad56(0xd8)],'Dataset\x20\x22'+_0x38cfdb[_0x12ad56(0xd7)]+_0x12ad56(0xb9)+_0x38cfdb[_0x12ad56(0xd8)]+'\x22,\x20not\x20current\x20app\x20\x22'+_0x580110[_0x12ad56(0xd8)]+'\x22.'),_0x38cfdb;}export async function loadPageDetailForPage(_0x5d7a10,_0x39dc6f){const _0x681146=a103_0x1ea3,_0x4c209c=await getPageDetail(_0x39dc6f),_0x4eceb4=normalizePageDetail(_0x4c209c);return ensureAppOwnership(_0x5d7a10['appCode'],_0x4eceb4[_0x681146(0xd8)],_0x681146(0xc2)+_0x39dc6f+_0x681146(0xb9)+_0x4eceb4[_0x681146(0xd8)]+_0x681146(0xd2)+_0x5d7a10[_0x681146(0xd8)]+'\x22.'),_0x4eceb4;}export function getUndeletedRelatedPages(_0x80043a){const _0x26f61d=a103_0x1ea3;return _0x80043a[_0x26f61d(0x10f)][_0x26f61d(0xc4)](_0x3aed42=>!_0x3aed42[_0x26f61d(0xc8)]);}export function buildPageGenerateOperationStatusQueryCommand(_0x41afd8,_0x566863){const _0x297b8b=a103_0x1ea3,_0x5370e7=_0x566863?.[_0x297b8b(0xd8)]&&_0x566863[_0x297b8b(0xd8)][_0x297b8b(0xed)]()!==''?_0x297b8b(0x130)+_0x566863['appCode']:'',_0x5a9d50=_0x566863?.[_0x297b8b(0x121)]&&_0x566863[_0x297b8b(0x121)][_0x297b8b(0xed)]()!==''?_0x297b8b(0x127)+_0x566863[_0x297b8b(0x121)]:_0x566863?.[_0x297b8b(0xb1)]&&_0x566863[_0x297b8b(0xb1)]['trim']()!==''?_0x297b8b(0xf5)+_0x566863[_0x297b8b(0xb1)]:'';return CLI_BIN_NAME+'\x20page\x20generate-status\x20--datasetcode\x20'+_0x41afd8+_0x5370e7+_0x5a9d50+_0x297b8b(0xf4);}export function createPageGenerateClientOperationId(){const _0x5563fb=a103_0x1ea3;return _0x5563fb(0xdd)+randomUUID();}export function buildStandardPageStatusQueryCommand(_0x1d7f6a,_0x239395){const _0x270a91=a103_0x1ea3,_0x42a66a=_0x239395&&_0x239395[_0x270a91(0xed)]()!==''?_0x270a91(0x130)+_0x239395:'';return CLI_BIN_NAME+'\x20page\x20standard-page-status\x20--datasetcode\x20'+_0x1d7f6a+_0x42a66a+_0x270a91(0xf4);}export function prepareDatasetAction(_0x1ff8b1,_0x53ecb7){const _0x4762f2=a103_0x1ea3,_0x2bf237=getUndeletedRelatedPages(_0x1ff8b1);if(_0x53ecb7===_0x4762f2(0x100)&&_0x2bf237['length']>0x0)throw CliErrors[_0x4762f2(0x10c)](_0x4762f2(0xb6)+_0x1ff8b1['code']+_0x4762f2(0xc5),_0x4762f2(0x116)+CLI_BIN_NAME+_0x4762f2(0x11f)+_0x1ff8b1[_0x4762f2(0xd7)]+_0x4762f2(0xd1));if(_0x53ecb7===_0x4762f2(0x109)&&_0x2bf237[_0x4762f2(0xe5)]===0x0)throw CliErrors['validation'](_0x4762f2(0xb6)+_0x1ff8b1['code']+_0x4762f2(0xe7),_0x4762f2(0x116)+CLI_BIN_NAME+_0x4762f2(0x12a)+_0x1ff8b1[_0x4762f2(0xd7)]+_0x4762f2(0xf9)+CLI_BIN_NAME+'\x20page\x20generate-status\x20--datasetcode\x20'+_0x1ff8b1[_0x4762f2(0xd7)]+_0x4762f2(0x118));return{'dataset':_0x1ff8b1,'undeletedPages':_0x2bf237};}export function prepareGenerateDatasetAction(_0x47f2b3,_0x5dfb6a){const _0x419cd0=a103_0x1ea3,_0xd70bc6=getUndeletedRelatedPages(_0x47f2b3);if(!_0x5dfb6a){if(_0xd70bc6[_0x419cd0(0xe5)]>0x0)throw CliErrors[_0x419cd0(0x10c)]('Dataset\x20\x22'+_0x47f2b3[_0x419cd0(0xd7)]+_0x419cd0(0xc5),'Run\x20`'+CLI_BIN_NAME+_0x419cd0(0x11f)+_0x47f2b3[_0x419cd0(0xd7)]+'`\x20instead.');return{'dataset':_0x47f2b3,'undeletedPages':_0xd70bc6,'standardPageStatus':null};}const _0x447294=_0x5dfb6a[_0x419cd0(0xb2)],_0x178394=_0x5dfb6a[_0x419cd0(0xb8)],_0x1ee470=_0x5dfb6a['residualPages']['length'];if(_0x447294===0x0&&_0x178394===0x0&&_0x1ee470===0x0)return{'dataset':_0x47f2b3,'undeletedPages':_0xd70bc6,'standardPageStatus':_0x5dfb6a};if(_0x447294===0x1&&_0x178394===0x0&&_0x1ee470===0x0)throw CliErrors[_0x419cd0(0x10c)](_0x419cd0(0xb6)+_0x47f2b3[_0x419cd0(0xd7)]+_0x419cd0(0x11b),'Run\x20`'+CLI_BIN_NAME+_0x419cd0(0x11f)+_0x47f2b3[_0x419cd0(0xd7)]+_0x419cd0(0xd1));throw CliErrors[_0x419cd0(0x10c)](_0x419cd0(0xb6)+_0x47f2b3['code']+_0x419cd0(0x125),_0x419cd0(0xf1));}function a103_0x3ec0(){const _0x299b50=['--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.','from','str','Dataset\x20\x22','Smart\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22','incompleteSets','\x22\x20belongs\x20to\x20app\x20\x22','blocked_complete_plus_residual_sets','datasetcode','menuPath','unknown_reconcile_failed','alias','Use\x20either\x20--operation-id\x20or\x20--client-operation-id,\x20not\x20both.','4577484ifcLCi','run_sync','Page\x20\x22','Smart\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22','filter','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','flag','\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','deleted','pageSets','totalSets','1909971HAxRxs','apiDir','2913gAaFhY','blocked_incomplete_sets','3349194VnTFxl','\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','`\x20instead.','\x22,\x20not\x20current\x20app\x20\x22','datasetId','type','keys','blocked_multiple_complete_sets','code','appCode','number','\x22\x20has\x20multiple\x20complete\x20Smart\x20List\x20Page\x20sets.','version-tag','One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.','page-generate-','Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.','pageId','\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.','generated_complete_set','FAILED','set','5330640fZymat','length','query_operation_status','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','PENDING','260qjVHJX','SUCCESS','\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','dataset','trim','RETRYING','One\x20of\x20--operation-id\x20or\x20--client-operation-id\x20is\x20required.','residualPages','Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.','run_generate_start','name','\x20--format\x20json','\x20--client-operation-id\x20','One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.','client-operation-id','string','`\x20first,\x20then\x20poll\x20`','hasMenu','get','toUpperCase','manual_resolution_required','fallbackUndeletedPages','Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.','generate','status','pageVersion','pages','__EMPTY__','complete','\x22,\x20but\x20Smart\x20List\x20Page\x20facts\x20are\x20unavailable.','UNKNOWN','versionTag','sync','9OYDdZv','Operation\x20finished\x20for\x20dataset\x20\x22','validation','page-','menuPages','relatedPages','isFinite','CANCELING','config','join','push','Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.','Run\x20`','no_standard_pages_found','\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.','Alias\x20\x22','CANCELLED','\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','Version\x20tag\x20\x22','properties','\x22\x20not\x20found.\x20','\x20page\x20sync\x20--datasetcode\x20','object','operationId','Smart\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22','relatedPageInfoList','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','\x22\x20has\x20multiple\x20or\x20incomplete\x20Smart\x20List\x20Page\x20sets.','title','\x20--operation-id\x20','RUNNING','Available\x20aliases:\x20','\x20page\x20generate-start\x20--datasetcode\x20','76576xYusQT','40713030KJxDAj','datasetCode','698eLjFrf','standard-page-status','\x20--appcode\x20','\x22\x20now\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','isArray','map','fields','stringify','clientOperationId','completeSets'];a103_0x3ec0=function(){return _0x299b50;};return a103_0x3ec0();}export function assessStandardPageState(_0x547b60,_0x41e84d,_0x3b8e80){const _0x57112c=a103_0x1ea3,_0x2505ac=_0x3b8e80?.['successStatus']??'already_exists_complete_set',_0x21a8ea=_0x3b8e80?.[_0x57112c(0xfe)]??[];if(!_0x41e84d){if(_0x21a8ea[_0x57112c(0xe5)]>0x0)return{'status':_0x57112c(0xce),'allowGenerate':![],'manualResolutionRequired':!![],'message':'Dataset\x20\x22'+_0x547b60+_0x57112c(0xd0),'nextAction':'manual_resolution_required'};return{'status':_0x57112c(0x117),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x57112c(0xb6)+_0x547b60+_0x57112c(0xeb),'nextAction':_0x57112c(0xf2)};}const _0x139ce7=_0x41e84d['completeSets'],_0xd238d4=_0x41e84d['incompleteSets'],_0x4f5cc6=_0x41e84d[_0x57112c(0xf0)]['length'];if(_0x139ce7===0x0&&_0xd238d4===0x0&&_0x4f5cc6===0x0)return{'status':_0x57112c(0x117),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x57112c(0xb6)+_0x547b60+_0x57112c(0xeb),'nextAction':'run_generate_start'};if(_0x139ce7>0x1)return{'status':_0x57112c(0xd6),'allowGenerate':![],'manualResolutionRequired':!![],'message':'Dataset\x20\x22'+_0x547b60+_0x57112c(0xda),'nextAction':_0x57112c(0xfd)};if(_0xd238d4>0x0)return{'status':_0x57112c(0xce),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x57112c(0xb6)+_0x547b60+'\x22\x20has\x20incomplete\x20Smart\x20List\x20Page\x20sets.','nextAction':'manual_resolution_required'};if(_0x139ce7===0x1&&_0x4f5cc6>0x0)return{'status':_0x57112c(0xba),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x57112c(0xb6)+_0x547b60+_0x57112c(0xc7),'nextAction':_0x57112c(0xfd)};if(_0x139ce7===0x1)return{'status':_0x2505ac,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x2505ac===_0x57112c(0xe1)?_0x57112c(0xb6)+_0x547b60+_0x57112c(0x131):_0x57112c(0xb6)+_0x547b60+_0x57112c(0x11b),'nextAction':_0x2505ac===_0x57112c(0xe1)?undefined:_0x57112c(0xc1)};return{'status':_0x57112c(0xbd),'allowGenerate':![],'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x547b60+'\x22\x20returned\x20an\x20unsupported\x20Smart\x20List\x20Page\x20state.','nextAction':'query_operation_status'};}export function assessGenerateOperationState(_0x2865a5,_0x3b5c0f,_0x23200f){const _0x590206=a103_0x1ea3,_0x10aa67=String(_0x3b5c0f||'')[_0x590206(0xed)]()[_0x590206(0xfc)]();if(_0x10aa67===_0x590206(0xe8))return{'status':'operation_pending','manualResolutionRequired':![],'message':_0x590206(0x122)+_0x2865a5+'\x22.','nextAction':_0x590206(0xe6)};if(_0x10aa67===_0x590206(0x128)||_0x10aa67===_0x590206(0xee)||_0x10aa67===_0x590206(0x111))return{'status':'operation_running','manualResolutionRequired':![],'message':_0x590206(0xc3)+_0x2865a5+'\x22.','nextAction':_0x590206(0xe6)};if(_0x10aa67===_0x590206(0xea)||_0x10aa67==='PARTIAL_SUCCESS'){if(!_0x23200f)return{'status':_0x590206(0xbd),'manualResolutionRequired':![],'message':'Operation\x20finished\x20for\x20dataset\x20\x22'+_0x2865a5+_0x590206(0x106),'nextAction':'query_operation_status'};const _0x5b4400=assessStandardPageState(_0x2865a5,_0x23200f,{'successStatus':'generated_complete_set'});if(_0x5b4400[_0x590206(0x101)]===_0x590206(0x117))return{'status':_0x590206(0xbd),'manualResolutionRequired':![],'message':_0x590206(0x10b)+_0x2865a5+'\x22,\x20but\x20no\x20Smart\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','nextAction':'query_operation_status'};return _0x5b4400;}if(_0x10aa67===_0x590206(0xe2)||_0x10aa67===_0x590206(0x11a)||_0x10aa67==='')return{'status':'operation_failed','manualResolutionRequired':![],'message':_0x590206(0xb7)+_0x2865a5+'\x22.','nextAction':_0x590206(0xe6)};return{'status':_0x590206(0xbd),'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x2865a5+_0x590206(0x124)+_0x10aa67+'\x22.','nextAction':_0x590206(0xe6)};}export function normalizePageDetail(_0x10b9f6){const _0x3b5848=a103_0x1ea3;return{'pageId':Number(_0x10b9f6['pageId']),'appCode':_0x10b9f6['appCode'],'name':_0x10b9f6[_0x3b5848(0xf3)]||_0x3b5848(0x10d)+_0x10b9f6[_0x3b5848(0xdf)],'code':_0x10b9f6[_0x3b5848(0xd7)]||'','type':_0x10b9f6['type']?String(_0x10b9f6[_0x3b5848(0xd4)]):'UNKNOWN','datasetIds':Array[_0x3b5848(0x132)](_0x10b9f6['datasetIds'])?_0x10b9f6['datasetIds']['map'](_0x3bf89e=>Number(_0x3bf89e))[_0x3b5848(0xc4)](_0x19e194=>Number[_0x3b5848(0x110)](_0x19e194)):[],'pageVersion':_0x10b9f6[_0x3b5848(0x112)]&&typeof _0x10b9f6['config']['pageVersion']===_0x3b5848(0xd9)?_0x10b9f6[_0x3b5848(0x112)][_0x3b5848(0x102)]:null,'versionTag':_0x10b9f6[_0x3b5848(0x112)]&&typeof _0x10b9f6[_0x3b5848(0x112)][_0x3b5848(0x108)]===_0x3b5848(0xf8)&&_0x10b9f6[_0x3b5848(0x112)][_0x3b5848(0x108)][_0x3b5848(0xed)]()!==''?_0x10b9f6[_0x3b5848(0x112)][_0x3b5848(0x108)]:null,'relatedPages':normalizeRelatedPages(_0x10b9f6[_0x3b5848(0x123)]),'raw':_0x10b9f6};}export function serializeDryRunDescription(_0x573601){const _0x814944=a103_0x1ea3;return JSON[_0x814944(0x135)](_0x573601,null,0x2);}export async function loadStandardPageStatusForGenerate(_0x1dbcc1,_0x5752f6){const _0x1679f8=a103_0x1ea3,_0x7d604c=await tryGetStandardPageStatus(_0x1dbcc1[_0x1679f8(0xd8)],_0x5752f6);if(!_0x7d604c)return null;return normalizeStandardPageStatus(_0x7d604c,_0x5752f6);}export function selectVersionTagGroup(_0x1207d9,_0x2848aa,_0x33e556){const _0xca701c=a103_0x1ea3,_0x14cf0f=new Map();for(const _0x3149cf of _0x1207d9){const _0x4d3d3f=normalizeVersionTag(_0x2848aa(_0x3149cf)),_0x251900=_0x14cf0f[_0xca701c(0xfb)](_0x4d3d3f)??[];_0x251900[_0xca701c(0x114)](_0x3149cf),_0x14cf0f[_0xca701c(0xe3)](_0x4d3d3f,_0x251900);}const _0x5bf9b2=Array[_0xca701c(0xb4)](_0x14cf0f[_0xca701c(0xd5)]());if(_0x5bf9b2['length']<=0x1&&!_0x33e556)return{'items':_0x1207d9,'availableTags':_0x5bf9b2};if(_0x33e556){const _0x21bbfd=normalizeVersionTag(_0x33e556),_0x4ee80b=_0x14cf0f[_0xca701c(0xfb)](_0x21bbfd);if(!_0x4ee80b)throw CliErrors['validation'](_0xca701c(0x11c)+_0x33e556+'\x22\x20not\x20found.',buildVersionTagHint(_0x5bf9b2));return{'items':_0x4ee80b,'availableTags':_0x5bf9b2};}throw CliErrors['validation'](_0xca701c(0x115),buildVersionTagHint(_0x5bf9b2));}function normalizeDatasetDetail(_0x325925,_0x5b45d2){const _0x37ef45=a103_0x1ea3,_0xc3c3c3=Array['isArray'](_0x325925['fields'])?_0x325925[_0x37ef45(0x134)]:Array['isArray'](_0x325925['properties'])?_0x325925[_0x37ef45(0x11d)]:[];return{'id':Number(_0x325925['id']??_0x325925['modelId']??0x0),'code':String(_0x325925[_0x37ef45(0xd7)]||_0x325925['modelCode']||_0x5b45d2),'name':String(_0x325925[_0x37ef45(0xf3)]||_0x5b45d2),'appCode':_0x325925[_0x37ef45(0xd8)]||_0x325925[_0x37ef45(0xec)]?.['appCode'],'fieldCount':_0xc3c3c3['length'],'relatedPages':normalizeRelatedPages(_0x325925[_0x37ef45(0x123)]),'raw':_0x325925};}function normalizeStandardPageStatus(_0x2961b9,_0x144972){const _0x254275=a103_0x1ea3,_0xf2b876=_0x215d9a=>({'pageId':Number(_0x215d9a[_0x254275(0xdf)]??_0x215d9a['id']??0x0),'title':String(_0x215d9a[_0x254275(0x126)]||_0x215d9a[_0x254275(0xf3)]||_0x254275(0x10d)+(_0x215d9a['pageId']??_0x215d9a['id']??'unknown')),'type':_0x215d9a['type']?String(_0x215d9a['type']):'UNKNOWN','deleted':_0x215d9a[_0x254275(0xc8)]===!![],'hasMenu':_0x215d9a[_0x254275(0xfa)]===!![],'menuVisible':typeof _0x215d9a['menuVisible']==='boolean'?_0x215d9a['menuVisible']:null,'menuPath':typeof _0x215d9a['menuPath']===_0x254275(0xf8)&&_0x215d9a['menuPath'][_0x254275(0xed)]()!==''?_0x215d9a[_0x254275(0xbc)]:null}),_0x2f9ff5=Array[_0x254275(0x132)](_0x2961b9[_0x254275(0xc9)])?_0x2961b9[_0x254275(0xc9)][_0x254275(0x133)](_0x42b816=>({'versionTag':typeof _0x42b816[_0x254275(0x108)]===_0x254275(0xf8)&&_0x42b816['versionTag']['trim']()!==''?_0x42b816[_0x254275(0x108)]:null,'complete':_0x42b816[_0x254275(0x105)]===!![],'pages':Array['isArray'](_0x42b816[_0x254275(0x103)])?_0x42b816[_0x254275(0x103)][_0x254275(0x133)](_0xf2b876):[]})):[];return{'datasetId':typeof _0x2961b9[_0x254275(0xd3)]===_0x254275(0xd9)&&Number[_0x254275(0x110)](_0x2961b9[_0x254275(0xd3)])?_0x2961b9[_0x254275(0xd3)]:null,'datasetCode':typeof _0x2961b9[_0x254275(0x12d)]===_0x254275(0xf8)&&_0x2961b9['datasetCode'][_0x254275(0xed)]()!==''?_0x2961b9[_0x254275(0x12d)]:_0x144972,'pageSets':_0x2f9ff5,'totalSets':typeof _0x2961b9['totalSets']===_0x254275(0xd9)&&Number[_0x254275(0x110)](_0x2961b9[_0x254275(0xca)])?_0x2961b9[_0x254275(0xca)]:_0x2f9ff5['length'],'completeSets':typeof _0x2961b9['completeSets']===_0x254275(0xd9)&&Number[_0x254275(0x110)](_0x2961b9[_0x254275(0xb2)])?_0x2961b9[_0x254275(0xb2)]:_0x2f9ff5[_0x254275(0xc4)](_0x494794=>_0x494794[_0x254275(0x105)])[_0x254275(0xe5)],'incompleteSets':typeof _0x2961b9[_0x254275(0xb8)]===_0x254275(0xd9)&&Number[_0x254275(0x110)](_0x2961b9[_0x254275(0xb8)])?_0x2961b9[_0x254275(0xb8)]:_0x2f9ff5['filter'](_0x525eba=>!_0x525eba[_0x254275(0x105)]&&_0x525eba[_0x254275(0x103)][_0x254275(0xe5)]>0x0)[_0x254275(0xe5)],'residualPages':Array[_0x254275(0x132)](_0x2961b9[_0x254275(0xf0)])?_0x2961b9[_0x254275(0xf0)]['map'](_0xf2b876):[],'menuPages':Array['isArray'](_0x2961b9[_0x254275(0x10e)])?_0x2961b9[_0x254275(0x10e)]['map'](_0xf2b876):[],'source':_0x254275(0x12f)};}function normalizeRelatedPages(_0x581790){const _0x1e643c=a103_0x1ea3;if(!Array[_0x1e643c(0x132)](_0x581790))return[];return _0x581790['filter'](_0xf1b745=>_0xf1b745&&typeof _0xf1b745===_0x1e643c(0x120))[_0x1e643c(0x133)](_0x107d37=>({'id':Number(_0x107d37['id']),'type':_0x107d37['type']?String(_0x107d37[_0x1e643c(0xd4)]):_0x1e643c(0x107),'code':_0x107d37[_0x1e643c(0xd7)]||undefined,'title':_0x107d37['title']||_0x107d37[_0x1e643c(0xf3)]||_0x1e643c(0x10d)+_0x107d37['id'],'deleted':_0x107d37['deleted']===!![]}))['filter'](_0x142ea4=>Number[_0x1e643c(0x110)](_0x142ea4['id']));}function ensureAppOwnership(_0x1e9032,_0x1a5ca7,_0x563824){const _0x2e5fe2=a103_0x1ea3;if(!_0x1a5ca7)return;if(_0x1a5ca7!==_0x1e9032)throw CliErrors[_0x2e5fe2(0x10c)](_0x563824,'Switch\x20app\x20with\x20`'+CLI_BIN_NAME+'\x20app\x20use\x20<name>`\x20or\x20pass\x20--appcode.');}function normalizeVersionTag(_0x5a385c){const _0x557144=a103_0x1ea3;return _0x5a385c&&_0x5a385c[_0x557144(0xed)]()!==''?_0x5a385c:_0x557144(0x104);}function buildVersionTagHint(_0x47df42){const _0xa88f87=a103_0x1ea3,_0x3dd6b2=_0x47df42['map'](_0x152ec1=>_0x152ec1==='__EMPTY__'?'<empty>':_0x152ec1)[_0xa88f87(0x113)](',\x20');return'Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20'+_0x3dd6b2;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a104_0x1ee69b=a104_0x60d9;(function(_0x1e9c6c,_0x57484c){const _0x3de4d7=a104_0x60d9,_0x2d20e1=_0x1e9c6c();while(!![]){try{const _0x2f33c8=-parseInt(_0x3de4d7(0x166))/0x1*(parseInt(_0x3de4d7(0x161))/0x2)+-parseInt(_0x3de4d7(0x157))/0x3+-parseInt(_0x3de4d7(0x165))/0x4*(parseInt(_0x3de4d7(0x16d))/0x5)+parseInt(_0x3de4d7(0x164))/0x6+-parseInt(_0x3de4d7(0x15f))/0x7*(parseInt(_0x3de4d7(0x16c))/0x8)+parseInt(_0x3de4d7(0x167))/0x9*(-parseInt(_0x3de4d7(0x158))/0xa)+parseInt(_0x3de4d7(0x163))/0xb*(parseInt(_0x3de4d7(0x152))/0xc);if(_0x2f33c8===_0x57484c)break;else _0x2d20e1['push'](_0x2d20e1['shift']());}catch(_0x1d54d8){_0x2d20e1['push'](_0x2d20e1['shift']());}}}(a104_0x189f,0xc73db));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a104_0x189f(){const _0x506a69=['Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','5189471OYkNbm','standard-page-status','37670SRKhNA','relatedPages','10330221uyABQl','8321034coBPpP','2036964mxdkPW','25ILNvBa','9AcpKyr','appCode','manualResolutionRequired','related-pages-fallback','code','16AkWGCD','15iitgYf','60EtNyKS','name','/smartapi/lovrabet/dataset/','query-standard-page-status','string','1769256FqzoBM','11952470cbImGn','GET','status','length','/standard-page-status?appCode=','nextAction'];a104_0x189f=function(){return _0x506a69;};return a104_0x189f();}function a104_0x60d9(_0x422963,_0x592caf){_0x422963=_0x422963-0x152;const _0x189f2f=a104_0x189f();let _0x60d908=_0x189f2f[_0x422963];return _0x60d908;}export const pageStandardPageStatus={'service':'page','command':a104_0x1ee69b(0x160),'description':a104_0x1ee69b(0x15e),'risk':'read','defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a104_0x1ee69b(0x156),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x63052f){validateDatasetSelector(_0x63052f);},async 'dryRun'(_0x1cf9f7){const _0x5b2ae4=a104_0x1ee69b,_0x16e7ad=await loadDatasetDetailForPage(_0x1cf9f7);return{'method':_0x5b2ae4(0x159),'url':_0x5b2ae4(0x154)+_0x16e7ad['code']+_0x5b2ae4(0x15c)+encodeURIComponent(_0x1cf9f7[_0x5b2ae4(0x168)]),'description':serializeDryRunDescription({'dataset':{'id':_0x16e7ad['id'],'code':_0x16e7ad[_0x5b2ae4(0x16b)],'name':_0x16e7ad[_0x5b2ae4(0x153)]},'action':_0x5b2ae4(0x155)})};},async 'execute'(_0x5ae200){const _0x5c984b=a104_0x1ee69b,_0x1bf441=await loadDatasetDetailForPage(_0x5ae200),_0x1fe4ce=await loadStandardPageStatusForGenerate(_0x5ae200,_0x1bf441['code']),_0x3f996b=getUndeletedRelatedPages(_0x1bf441),_0x23094c=assessStandardPageState(_0x1bf441[_0x5c984b(0x16b)],_0x1fe4ce,{'fallbackUndeletedPages':_0x3f996b});return{'ok':!![],'data':{'datasetCode':_0x1bf441[_0x5c984b(0x16b)],'precheckSource':_0x1fe4ce?.['source']??_0x5c984b(0x16a),'status':_0x23094c[_0x5c984b(0x15a)],'manualResolutionRequired':_0x23094c[_0x5c984b(0x169)],'nextAction':_0x23094c[_0x5c984b(0x15d)],'standardPageStatus':_0x1fe4ce,'relatedPages':{'total':_0x1bf441[_0x5c984b(0x162)][_0x5c984b(0x15b)],'undeletedCount':_0x3f996b[_0x5c984b(0x15b)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a105_0x596bf1=a105_0x359f;function a105_0x58ba(){const _0x36b383=['Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','compress','code','length','name','failedPages','8wUQARX','relatedPages','69372colOru','11ZThihd','isArray','1276495quqZAa','undeletedPages','sync','1euYwvy','2807530rabFQh','部分页面同步失败','2790092UqavJQ','128088OJPuSP','160nJjtFp','page','\x20undeleted\x20related\x20page(s)\x20found','dataset','POST','appCode','280vSkjpB','459513YfYnHg','/smartapi/lovrabet/dataset/','4217388SxpiXa','string','alias'];a105_0x58ba=function(){return _0x36b383;};return a105_0x58ba();}(function(_0x3b3fce,_0x4ca84b){const _0xd5573c=a105_0x359f,_0x4ca432=_0x3b3fce();while(!![]){try{const _0xf80ee6=parseInt(_0xd5573c(0x129))/0x1*(parseInt(_0xd5573c(0x12c))/0x2)+-parseInt(_0xd5573c(0x118))/0x3+-parseInt(_0xd5573c(0x121))/0x4*(-parseInt(_0xd5573c(0x126))/0x5)+parseInt(_0xd5573c(0x123))/0x6*(-parseInt(_0xd5573c(0x115))/0x7)+parseInt(_0xd5573c(0x12e))/0x8*(parseInt(_0xd5573c(0x116))/0x9)+parseInt(_0xd5573c(0x12a))/0xa*(-parseInt(_0xd5573c(0x124))/0xb)+parseInt(_0xd5573c(0x12d))/0xc;if(_0xf80ee6===_0x4ca84b)break;else _0x4ca432['push'](_0x4ca432['shift']());}catch(_0x421562){_0x4ca432['push'](_0x4ca432['shift']());}}}(a105_0x58ba,0xc07cd));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{syncStandardPages}from'../../core/api-client.js';function a105_0x359f(_0x11246b,_0x4ed3ba){_0x11246b=_0x11246b-0x112;const _0x58ba30=a105_0x58ba();let _0x359ff3=_0x58ba30[_0x11246b];return _0x359ff3;}export const pageSync={'service':a105_0x596bf1(0x12f),'command':a105_0x596bf1(0x128),'description':a105_0x596bf1(0x11b),'risk':'write','defaultOutputFormat':a105_0x596bf1(0x11c),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a105_0x596bf1(0x11a),'type':a105_0x596bf1(0x119),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x42b7db){validateDatasetSelector(_0x42b7db);},async 'dryRun'(_0x679c00){const _0x5149b8=a105_0x596bf1,_0x1fe2c9=await prepare(_0x679c00);return{'method':_0x5149b8(0x113),'url':_0x5149b8(0x117)+_0x1fe2c9[_0x5149b8(0x112)][_0x5149b8(0x11d)]+'/sync-to-pages','body':{'appCode':_0x679c00[_0x5149b8(0x114)]},'description':serializeDryRunDescription({'dataset':{'id':_0x1fe2c9[_0x5149b8(0x112)]['id'],'code':_0x1fe2c9[_0x5149b8(0x112)][_0x5149b8(0x11d)],'name':_0x1fe2c9[_0x5149b8(0x112)][_0x5149b8(0x11f)],'fieldCount':_0x1fe2c9['dataset']['fieldCount']},'relatedPages':{'total':_0x1fe2c9[_0x5149b8(0x112)][_0x5149b8(0x122)][_0x5149b8(0x11e)],'undeletedCount':_0x1fe2c9[_0x5149b8(0x127)][_0x5149b8(0x11e)]},'action':_0x5149b8(0x128),'reason':_0x1fe2c9[_0x5149b8(0x127)][_0x5149b8(0x11e)]+_0x5149b8(0x130)})};},async 'execute'(_0x4e58c2){const _0x16c177=a105_0x596bf1,_0x4dc0b7=await prepare(_0x4e58c2),_0x26fb6e=await syncStandardPages(_0x4e58c2['appCode'],_0x4dc0b7[_0x16c177(0x112)][_0x16c177(0x11d)]),_0x9b8cc6=Array[_0x16c177(0x125)](_0x26fb6e[_0x16c177(0x120)])&&_0x26fb6e[_0x16c177(0x120)][_0x16c177(0x11e)]>0x0,_0x51c64a=_0x9b8cc6?_0x16c177(0x12b):'同步成功';return{'ok':!![],'message':_0x51c64a,'data':{'datasetCode':_0x4dc0b7[_0x16c177(0x112)][_0x16c177(0x11d)],..._0x26fb6e}};}};async function prepare(_0x188f3f){const _0x1e47c5=a105_0x596bf1,_0x378221=await loadDatasetDetailForPage(_0x188f3f);return prepareDatasetAction(_0x378221,_0x1e47c5(0x128));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51205c,_0x5889ba){const _0x401ee8=a106_0x1697,_0x374492=_0x51205c();while(!![]){try{const _0x316720=-parseInt(_0x401ee8(0x17c))/0x1+parseInt(_0x401ee8(0x186))/0x2*(parseInt(_0x401ee8(0x195))/0x3)+-parseInt(_0x401ee8(0x188))/0x4+-parseInt(_0x401ee8(0x185))/0x5*(-parseInt(_0x401ee8(0x18a))/0x6)+-parseInt(_0x401ee8(0x17d))/0x7+parseInt(_0x401ee8(0x196))/0x8+parseInt(_0x401ee8(0x193))/0x9*(-parseInt(_0x401ee8(0x187))/0xa);if(_0x316720===_0x5889ba)break;else _0x374492['push'](_0x374492['shift']());}catch(_0x1585fc){_0x374492['push'](_0x374492['shift']());}}}(a106_0x434a,0xd7f4d));import{existsSync}from'node:fs';function a106_0x1697(_0x29c0be,_0x3eabe3){_0x29c0be=_0x29c0be-0x17b;const _0x434a05=a106_0x434a();let _0x1697ae=_0x434a05[_0x29c0be];return _0x1697ae;}import a106_0xf82afb from'node:path';import a106_0x1f74c7 from'chalk';import{input,confirm}from'@inquirer/prompts';function a106_0x434a(){const _0x43623e=['10KxouBe','6934284CxAANL','green','2166vpRTcL','√\x20Project\x20Name:\x20','trim','\x22\x20already\x20exists','test','Project\x20name:','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','Project\x20name\x20cannot\x20exceed\x2050\x20characters','10534149zbgSLY','Directory\x20\x22','409548gZsLJo','10129256GQcOol','Login\x20failed','√\x20Login\x20status:\x20','√\x20App\x20Code:\x20','44532sghNkq','1146607bWoxmB','my-app','env','cyan','log','production','string','Not\x20set','20805CybABY','18SWylQu'];a106_0x434a=function(){return _0x43623e;};return a106_0x434a();}import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x54f41c,_0x1a912f,_0x286b0f){const _0x3f3ae5=a106_0x1697,_0xc361fb=_0x3f3ae5(0x17e),_0x1e3941=readConfig(),_0xc30c5d=typeof _0x1e3941[_0x3f3ae5(0x17f)]===_0x3f3ae5(0x183)?_0x1e3941[_0x3f3ae5(0x17f)]:undefined,_0x16bde3=await input({'message':_0x3f3ae5(0x18f),'default':_0xc361fb,'validate':_0x26553e=>{const _0x4288b1=_0x3f3ae5,_0x2303b2=_0x26553e[_0x4288b1(0x18c)]()||_0xc361fb;if(_0x2303b2['length']>0x32)return _0x4288b1(0x192);const _0x3cac8b=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x2303b2&&!_0x3cac8b[_0x4288b1(0x18e)](_0x2303b2))return _0x4288b1(0x190);const _0x138df6=a106_0xf82afb['resolve'](process['cwd'](),_0x2303b2);if(existsSync(_0x138df6))return _0x4288b1(0x194)+_0x2303b2+_0x4288b1(0x18d);return!![];}});console[_0x3f3ae5(0x181)](a106_0x1f74c7['green'](_0x3f3ae5(0x18b)+a106_0x1f74c7[_0x3f3ae5(0x180)](_0x16bde3)));const _0x8c7e9=await selectSingleAppcode(_0x286b0f);console[_0x3f3ae5(0x181)](a106_0x1f74c7['green'](_0x3f3ae5(0x17b)+a106_0x1f74c7['cyan'](_0x8c7e9||_0x3f3ae5(0x184))));if(_0x8c7e9){const _0x439310=await getIsSessionValid();if(!_0x439310){const _0x3a0533=await confirm({'message':_0x3f3ae5(0x191),'default':!![]});if(_0x3a0533){const _0x1caa3e=await authServer({'silent':!![]});console['log'](a106_0x1f74c7[_0x3f3ae5(0x189)](_0x3f3ae5(0x198)+a106_0x1f74c7[_0x3f3ae5(0x180)](_0x1caa3e?'Logged\x20in':_0x3f3ae5(0x197))));}else console['log'](a106_0x1f74c7['green'](_0x3f3ae5(0x198)+a106_0x1f74c7[_0x3f3ae5(0x180)]('Skipped')));}await _0x54f41c({'projectName':_0x16bde3,'appCode':_0x8c7e9,'env':_0x1a912f||_0xc30c5d||_0x3f3ae5(0x182)});}else await _0x54f41c({'projectName':_0x16bde3,'env':_0x1a912f||_0xc30c5d||_0x3f3ae5(0x182)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a107_0x3dc2(){const _0xef9aed=['21558eOCxBb','now','10003805pJYcAo','7819368OblSAI','11908NYmDZw','879XCWitU','2649612lgwkYG','5lRKlOH','5536557CpmtPU','1373094wKHqpc'];a107_0x3dc2=function(){return _0xef9aed;};return a107_0x3dc2();}(function(_0x11895b,_0x4543e3){const _0x444921=a107_0x1d70,_0x24ca2c=_0x11895b();while(!![]){try{const _0x538f5a=-parseInt(_0x444921(0x10b))/0x1+-parseInt(_0x444921(0x107))/0x2+-parseInt(_0x444921(0x106))/0x3*(-parseInt(_0x444921(0x10f))/0x4)+-parseInt(_0x444921(0x108))/0x5*(-parseInt(_0x444921(0x10a))/0x6)+parseInt(_0x444921(0x10d))/0x7+-parseInt(_0x444921(0x10e))/0x8+parseInt(_0x444921(0x109))/0x9;if(_0x538f5a===_0x4543e3)break;else _0x24ca2c['push'](_0x24ca2c['shift']());}catch(_0x4be3b6){_0x24ca2c['push'](_0x24ca2c['shift']());}}}(a107_0x3dc2,0xc896d));function a107_0x1d70(_0xae9ec2,_0x2064a4){_0xae9ec2=_0xae9ec2-0x106;const _0x3dc2d2=a107_0x3dc2();let _0x1d70e2=_0x3dc2d2[_0xae9ec2];return _0x1d70e2;}export function formatElapsed(_0xef6eaa){const _0x1c97b5=a107_0x1d70,_0x330157=Date[_0x1c97b5(0x10c)]()-_0xef6eaa;if(_0x330157<0x3e8)return _0x330157+'ms';const _0x24463f=(_0x330157/0x3e8)['toFixed'](0x2),_0x3170e0=_0x24463f['replace'](/\.?0+$/u,'');return _0x3170e0+'s';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4c28f7,_0x5d3a81){const _0x4e5401=a108_0x23a7,_0x5daf92=_0x4c28f7();while(!![]){try{const _0x1c73ca=parseInt(_0x4e5401(0x1c2))/0x1+parseInt(_0x4e5401(0x1d8))/0x2*(-parseInt(_0x4e5401(0x1f6))/0x3)+-parseInt(_0x4e5401(0x1c3))/0x4+-parseInt(_0x4e5401(0x1b2))/0x5*(-parseInt(_0x4e5401(0x1e0))/0x6)+parseInt(_0x4e5401(0x1e8))/0x7*(parseInt(_0x4e5401(0x19b))/0x8)+parseInt(_0x4e5401(0x19a))/0x9+-parseInt(_0x4e5401(0x1da))/0xa;if(_0x1c73ca===_0x5d3a81)break;else _0x5daf92['push'](_0x5daf92['shift']());}catch(_0x39a384){_0x5daf92['push'](_0x5daf92['shift']());}}}(a108_0x498e,0xc9f4a));import a108_0xce812a from'path';import a108_0xb7efcf from'fs';function a108_0x498e(){const _0x6032a4=['info','writeFileSync','projectCode','配置应用AppCode:\x20','projectName','toLocaleString','更新\x20package.json\x20失败','项目创建完成:\x20','cookie','description','stringify','production','appCode','Copy\x20project\x20files','apps','\x20already\x20exists','项目创建失败:\x20','package.json','\x20\x201.\x20Start\x20project:\x20','defaultApp','6OEvRCm','√\x20Pulled\x20','8242080odQFTJ','stableVersion','create','CLI\x20版本检查','\x20|\x20Default:\x20','start','120UhulAv','gray','1.0.0','\x20Generated\x20by\x20rabetbase\x20cli\x20','repeat','stop','\x20dataset(s),\x20generated\x20','accessSync','14VUPiRx','API\x20配置拉取异常','Project\x20name:\x20','resolve','*\x20Configuring\x20AppCode\x20for\x20project\x20','\x20api\x20pull','keys','currentVersion','清理项目目录失败:\x20','log','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','message','name','version','1626414hpdfxR','\x20config\x20set\x20appcode\x20<app-code>\x27','4344984EErwAE','6058152VIlcGY','parse','error','cyan','constants','Install\x20dependencies','warn','W_OK','√\x20Configuration\x20file\x20created,\x20Apps:\x20','cwd','belowMinimum','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','env','\x20run\x20start','green','Project\x20name\x20cannot\x20be\x20empty','chdir','Project\x20directory\x20','utf8','readFileSync','bold','\x20&&\x20','🚀\x20Next\x20Steps:','57410cBeTSw','\x20model(s)','dirname','Format\x20code','join','length','\x20|\x20AppCode:\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','\x20√\x20','*\x20Pulling\x20API\x20configuration...','modelCount','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','开始创建项目:\x20','API\x20configuration\x20pulled:\x20','配置应用AppCode失败','needsUpgrade','1469783WlxiNS','1675620AkvELz'];a108_0x498e=function(){return _0x6032a4;};return a108_0x498e();}import a108_0x588fe7 from'chalk';import a108_0x12c371 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';function a108_0x23a7(_0xd87614,_0x1cb3be){_0xd87614=_0xd87614-0x199;const _0x498ee2=a108_0x498e();let _0x23a7f3=_0x498ee2[_0xd87614];return _0x23a7f3;}import{fetchModelList}from'../../../api/fetch-model-list.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(_0x1c2fef){const _0x287954=a108_0x23a7,_0x1a00a9=await checkCliVersion();(_0x1a00a9[_0x287954(0x1c1)]||_0x1a00a9[_0x287954(0x1a5)])&&(printCliUpgradeWarning(_0x1a00a9),assertCliVersionSupported(_0x1a00a9),logger[_0x287954(0x1c4)](_0x287954(0x1dc),_0x287954(0x1dd),{'currentVersion':_0x1a00a9[_0x287954(0x1ef)],'stableVersion':_0x1a00a9[_0x287954(0x1db)],'minimumVersion':_0x1a00a9['minimumVersion'],'needsUpgrade':_0x1a00a9[_0x287954(0x1c1)],'belowMinimum':_0x1a00a9[_0x287954(0x1a5)]}));if(_0x1c2fef['projectCode']&&_0x1c2fef[_0x287954(0x1d0)])await runCreate({'projectName':_0x1c2fef[_0x287954(0x1c6)],'appCode':_0x1c2fef['appCode'],'env':_0x1c2fef[_0x287954(0x1a7)]},_0x1c2fef);else{if(_0x1c2fef[_0x287954(0x1c6)]){const _0x18da42=await selectSingleAppcode(_0x1c2fef[_0x287954(0x1cc)]);await runCreate({'projectName':_0x1c2fef['projectCode'],'appCode':_0x18da42||undefined,'env':_0x1c2fef['env']},_0x1c2fef);}else await guidedCreateProject(_0x4268a2=>runCreate(_0x4268a2,_0x1c2fef),_0x1c2fef[_0x287954(0x1a7)],_0x1c2fef['cookie']);}}async function runCreate(_0x5070fb,_0xb2bfe5){const _0x4df265=a108_0x23a7;if(!_0x5070fb[_0x4df265(0x1c8)]||_0x5070fb['projectName']['trim']()==='')throw new Error(_0x4df265(0x1aa));const _0x3a5226=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x3a5226['test'](_0x5070fb['projectName']))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x5070fb[_0x4df265(0x1c8)][_0x4df265(0x1b7)]>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x13d7dd=a108_0xce812a[_0x4df265(0x1eb)](process[_0x4df265(0x1a4)](),_0x5070fb['projectName']);if(a108_0xb7efcf['existsSync'](_0x13d7dd))throw new Error(_0x4df265(0x1ac)+_0x5070fb['projectName']+_0x4df265(0x1d3));try{a108_0xb7efcf[_0x4df265(0x1e7)](a108_0xce812a[_0x4df265(0x1b4)](_0x13d7dd),a108_0xb7efcf[_0x4df265(0x19f)][_0x4df265(0x1a2)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger['setLogPath'](_0x13d7dd),logger[_0x4df265(0x1c4)](_0x4df265(0x1dc),_0x4df265(0x1be)+_0x5070fb[_0x4df265(0x1c8)],{'projectDir':_0x13d7dd,'appCode':_0x5070fb[_0x4df265(0x1d0)]}),console['log'](),console[_0x4df265(0x1f1)](a108_0x588fe7[_0x4df265(0x1a9)](_0x4df265(0x1ba))+_0x4df265(0x1ea)+a108_0x588fe7[_0x4df265(0x1a9)](_0x5070fb['projectName'])+(_0x5070fb['appCode']?_0x4df265(0x1b8)+a108_0x588fe7[_0x4df265(0x19e)](_0x5070fb[_0x4df265(0x1d0)]):''));try{await runTask(_0x4df265(0x1d1),()=>copyProjectTemplate(_0x5070fb['projectName'])),await updatePackageJsonName(_0x5070fb['projectName']),await runTask(_0x4df265(0x1a0),()=>installDependencies(_0x5070fb[_0x4df265(0x1c8)])),await runTask(_0x4df265(0x1b5),()=>formatProjectCode(_0x5070fb[_0x4df265(0x1c8)])),await configureAppCode(_0x5070fb['projectName'],_0x5070fb[_0x4df265(0x1d0)]||'',_0x5070fb['env']);let _0x1ddd4c=![];if(_0x5070fb[_0x4df265(0x1d0)]){console[_0x4df265(0x1f1)](_0x4df265(0x1bb));const _0x1965b5=process[_0x4df265(0x1a4)]();try{process['chdir'](_0x13d7dd);const _0x4dc8b8=_0x5070fb[_0x4df265(0x1a7)]||_0x4df265(0x1cf);initEnv(_0x4dc8b8);const {configArray:_0x44498b}=await fetchModelList(_0x5070fb[_0x4df265(0x1d0)],_0xb2bfe5[_0x4df265(0x1cc)]||''),_0x33a1fa=DEFAULT_API_DIR,_0x1f236f=await generateApiFile(_0x44498b,'',_0x5070fb[_0x4df265(0x1d0)],!![],_0x4dc8b8,_0x33a1fa);console['log'](_0x4df265(0x1d9)+_0x44498b[_0x4df265(0x1b7)]+_0x4df265(0x1e6)+_0x1f236f[_0x4df265(0x1bc)]+_0x4df265(0x1b3)),logger[_0x4df265(0x1c4)](_0x4df265(0x1dc),_0x4df265(0x1bf)+_0x5070fb[_0x4df265(0x1d0)]);}catch(_0x3f2f5d){_0x1ddd4c=!![],console[_0x4df265(0x1f1)](_0x4df265(0x1a6)),logger[_0x4df265(0x1a1)](_0x4df265(0x1dc),_0x4df265(0x1e9),{'error':_0x3f2f5d instanceof Error?_0x3f2f5d[_0x4df265(0x1f3)]:String(_0x3f2f5d)});}finally{process[_0x4df265(0x1ab)](_0x1965b5);}}logger['success'](_0x4df265(0x1dc),_0x4df265(0x1cb)+_0x5070fb[_0x4df265(0x1c8)]),console[_0x4df265(0x1f1)](),console[_0x4df265(0x1f1)](a108_0x588fe7['green']('─'['repeat'](0x3c))),console[_0x4df265(0x1f1)](a108_0x588fe7['cyan'][_0x4df265(0x1af)](_0x4df265(0x1b1))),console['log'](),console[_0x4df265(0x1f1)](_0x4df265(0x1d6)+a108_0x588fe7['cyan']['bold']('cd\x20'+_0x5070fb[_0x4df265(0x1c8)]+_0x4df265(0x1b0)+CLI_BIN_NAME+_0x4df265(0x1a8))),_0x1ddd4c&&console[_0x4df265(0x1f1)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a108_0x588fe7[_0x4df265(0x19e)][_0x4df265(0x1af)](CLI_BIN_NAME+_0x4df265(0x1ed))),console[_0x4df265(0x1f1)](a108_0x588fe7[_0x4df265(0x1a9)]('─'[_0x4df265(0x1e4)](0x3c)));}catch(_0x4223da){logger[_0x4df265(0x19d)](_0x4df265(0x1dc),_0x4df265(0x1d4)+_0x5070fb[_0x4df265(0x1c8)],{'error':_0x4223da instanceof Error?_0x4223da[_0x4df265(0x1f3)]:String(_0x4223da)});try{a108_0xb7efcf['existsSync'](_0x13d7dd)&&(console['log'](_0x4df265(0x1b9)+_0x13d7dd),a108_0xb7efcf['rmSync'](_0x13d7dd,{'recursive':!![],'force':!![]}));}catch{logger[_0x4df265(0x1a1)](_0x4df265(0x1dc),_0x4df265(0x1f0)+_0x13d7dd);}throw _0x4223da;}}async function runTask(_0x574fb7,_0x28f506){const _0x5b7849=a108_0x23a7,_0x5e6af0=a108_0x12c371(_0x574fb7+'...')[_0x5b7849(0x1df)]();try{const _0xdca42=await _0x28f506();_0x5e6af0[_0x5b7849(0x1e5)](),console['log'](''+a108_0x588fe7[_0x5b7849(0x1a9)]('\x20√\x20')+_0x574fb7+'\x20'+a108_0x588fe7[_0x5b7849(0x1e1)]('['+_0xdca42+']'));}catch(_0x1e2c50){_0x5e6af0['fail'](_0x574fb7);throw _0x1e2c50;}}async function updatePackageJsonName(_0xb36209){const _0x3885a5=a108_0x23a7,_0x21ced6=a108_0xce812a[_0x3885a5(0x1eb)](process[_0x3885a5(0x1a4)](),_0xb36209),_0x5b8b57=a108_0xce812a[_0x3885a5(0x1b6)](_0x21ced6,_0x3885a5(0x1d5));try{console[_0x3885a5(0x1f1)](_0x3885a5(0x1f2));const _0x47d517=getRabetbaseCliPackageRoot(),_0x4d54a5=a108_0xce812a[_0x3885a5(0x1b6)](_0x47d517,'package.json');let _0x1cffeb='1.0.0';try{const _0x114312=JSON[_0x3885a5(0x19c)](a108_0xb7efcf[_0x3885a5(0x1ae)](_0x4d54a5,'utf8'));_0x1cffeb=_0x114312[_0x3885a5(0x1f5)]||_0x3885a5(0x1e2);}catch{}const _0x3f4be5=a108_0xb7efcf[_0x3885a5(0x1ae)](_0x5b8b57,_0x3885a5(0x1ad)),_0x568f4e=JSON[_0x3885a5(0x19c)](_0x3f4be5);_0x568f4e[_0x3885a5(0x1f4)]=_0xb36209,_0x568f4e[_0x3885a5(0x1cd)]=_0xb36209+_0x3885a5(0x1e3)+_0x1cffeb,a108_0xb7efcf[_0x3885a5(0x1c5)](_0x5b8b57,JSON[_0x3885a5(0x1ce)](_0x568f4e,null,0x2)+'\x0a',_0x3885a5(0x1ad)),console[_0x3885a5(0x1f1)]('√\x20package.json\x20updated:\x20name='+_0xb36209),logger[_0x3885a5(0x1c4)](_0x3885a5(0x1dc),'更新\x20package.json\x20name');}catch(_0x3c0c4e){logger[_0x3885a5(0x19d)](_0x3885a5(0x1dc),_0x3885a5(0x1ca));throw _0x3c0c4e;}}async function configureAppCode(_0x5d3ac3,_0x7bfc56,_0x58113e){const _0x1da700=a108_0x23a7,_0x3d41ed=a108_0xce812a[_0x1da700(0x1eb)](process[_0x1da700(0x1a4)](),_0x5d3ac3),_0x4a3af3=a108_0xce812a[_0x1da700(0x1b6)](_0x3d41ed,NEW_CONFIG_NAME);try{_0x7bfc56?console[_0x1da700(0x1f1)](_0x1da700(0x1ec)+_0x5d3ac3+':\x20'+_0x7bfc56):console['log']('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x5d3ac3);const _0x505e9e=getRabetbaseCliPackageRoot(),_0x48f06c=a108_0xce812a[_0x1da700(0x1b6)](_0x505e9e,'package.json');let _0x2ce0be=_0x1da700(0x1e2);try{const _0x2c799b=JSON[_0x1da700(0x19c)](a108_0xb7efcf['readFileSync'](_0x48f06c,_0x1da700(0x1ad)));_0x2ce0be=_0x2c799b[_0x1da700(0x1f5)]||_0x1da700(0x1e2);}catch{}const _0x5075d9=readConfig(),_0x2ef4b0=typeof _0x5075d9['env']==='string'?_0x5075d9[_0x1da700(0x1a7)]:undefined,_0x1f5100={};for(const _0x513f5c of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x5075d9[_0x513f5c]!=null)_0x1f5100[_0x513f5c]=_0x5075d9[_0x513f5c];}const _0x302adb=buildCanonicalProjectConfig(_0x1f5100,{'appCodes':_0x7bfc56?[_0x7bfc56]:[],'env':_0x58113e||_0x2ef4b0||_0x1da700(0x1cf),'metadata':{'createdAt':new Date()[_0x1da700(0x1c9)](),'version':_0x2ce0be}});writeConfigFile(_0x4a3af3,_0x302adb),_0x7bfc56?console[_0x1da700(0x1f1)](_0x1da700(0x1a3)+Object[_0x1da700(0x1ee)](_0x302adb[_0x1da700(0x1d2)]||{})[_0x1da700(0x1b6)](',\x20')+_0x1da700(0x1de)+_0x302adb[_0x1da700(0x1d7)]):console[_0x1da700(0x1f1)](_0x1da700(0x1bd)+CLI_BIN_NAME+_0x1da700(0x199)),logger[_0x1da700(0x1c4)](_0x1da700(0x1dc),_0x1da700(0x1c7)+_0x7bfc56);}catch(_0x3ca366){logger[_0x1da700(0x19d)](_0x1da700(0x1dc),_0x1da700(0x1c0));}}
|
|
1
|
+
(function(_0x3082a9,_0xaaaf36){const _0x4dcc30=a108_0x4f25,_0x27373d=_0x3082a9();while(!![]){try{const _0x3e110f=parseInt(_0x4dcc30(0x11a))/0x1+-parseInt(_0x4dcc30(0x16c))/0x2+parseInt(_0x4dcc30(0x120))/0x3+parseInt(_0x4dcc30(0x174))/0x4*(parseInt(_0x4dcc30(0x124))/0x5)+parseInt(_0x4dcc30(0x137))/0x6+-parseInt(_0x4dcc30(0x118))/0x7*(parseInt(_0x4dcc30(0x162))/0x8)+parseInt(_0x4dcc30(0x170))/0x9*(-parseInt(_0x4dcc30(0x11c))/0xa);if(_0x3e110f===_0xaaaf36)break;else _0x27373d['push'](_0x27373d['shift']());}catch(_0x4e9e2d){_0x27373d['push'](_0x27373d['shift']());}}}(a108_0x8637,0x8ebff));import a108_0x5294d0 from'path';import a108_0x3ccc7e from'fs';import a108_0x2d07ca from'chalk';import a108_0x5c3c07 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';function a108_0x4f25(_0x285040,_0x27540e){_0x285040=_0x285040-0x117;const _0x86375d=a108_0x8637();let _0x4f25ff=_0x86375d[_0x285040];return _0x4f25ff;}function a108_0x8637(){const _0x2b3f10=['join','message','toLocaleString','trim','\x20\x201.\x20Start\x20project:\x20','\x20Generated\x20by\x20rabetbase\x20cli\x20','1.0.0','*\x20Pulling\x20API\x20configuration...','apps','2034342tkNwtX','cd\x20','repeat','belowMinimum','create','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','warn','\x20|\x20AppCode:\x20','cookie','length','utf8','green','项目创建失败:\x20','log','√\x20Pulled\x20','Project\x20name:\x20','Project\x20directory\x20','appCode','\x20already\x20exists','parse','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','version','modelCount','√\x20package.json\x20updated:\x20name=','start','resolve','\x20dataset(s),\x20generated\x20','env','info','cwd','项目创建完成:\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','name','projectCode','minimumVersion','\x20model(s)','cyan','success','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','stringify','stop','test','Format\x20code','1192jSLTYP','chdir','error','Project\x20name\x20cannot\x20be\x20empty','stableVersion','\x20run\x20start','bold','API\x20配置拉取异常','API\x20configuration\x20pulled:\x20','package.json','62130SMnMli','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','CLI\x20版本检查','writeFileSync','95895iUSgiP','*\x20Configuring\x20AppCode\x20for\x20project\x20','\x20|\x20Default:\x20','defaultApp','25316pILtCx','🚀\x20Next\x20Steps:','49945uPfFFq','existsSync','899274AgyGdg','fail','310rCFvBS','配置应用AppCode:\x20','constants','setLogPath','1420182YhrXlO','projectName','accessSync','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','235uuXIvk','string','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','production','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','readFileSync','Install\x20dependencies','\x20api\x20pull','rmSync','\x20√\x20'];a108_0x8637=function(){return _0x2b3f10;};return a108_0x8637();}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(_0x325952){const _0xc126c8=a108_0x4f25,_0x3fd50c=await checkCliVersion();(_0x3fd50c['needsUpgrade']||_0x3fd50c[_0xc126c8(0x13a)])&&(printCliUpgradeWarning(_0x3fd50c),assertCliVersionSupported(_0x3fd50c),logger[_0xc126c8(0x153)]('create',_0xc126c8(0x16e),{'currentVersion':_0x3fd50c['currentVersion'],'stableVersion':_0x3fd50c[_0xc126c8(0x166)],'minimumVersion':_0x3fd50c[_0xc126c8(0x159)],'needsUpgrade':_0x3fd50c['needsUpgrade'],'belowMinimum':_0x3fd50c[_0xc126c8(0x13a)]}));if(_0x325952['projectCode']&&_0x325952[_0xc126c8(0x148)])await runCreate({'projectName':_0x325952[_0xc126c8(0x158)],'appCode':_0x325952[_0xc126c8(0x148)],'env':_0x325952[_0xc126c8(0x152)]},_0x325952);else{if(_0x325952[_0xc126c8(0x158)]){const _0x14bab1=await selectSingleAppcode(_0x325952[_0xc126c8(0x13f)]);await runCreate({'projectName':_0x325952[_0xc126c8(0x158)],'appCode':_0x14bab1||undefined,'env':_0x325952['env']},_0x325952);}else await guidedCreateProject(_0x311d51=>runCreate(_0x311d51,_0x325952),_0x325952[_0xc126c8(0x152)],_0x325952[_0xc126c8(0x13f)]);}}async function runCreate(_0x1e072f,_0x3094c8){const _0x587ffd=a108_0x4f25;if(!_0x1e072f['projectName']||_0x1e072f[_0x587ffd(0x121)][_0x587ffd(0x131)]()==='')throw new Error(_0x587ffd(0x165));const _0x5e7f4d=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5e7f4d[_0x587ffd(0x160)](_0x1e072f[_0x587ffd(0x121)]))throw new Error(_0x587ffd(0x126));if(_0x1e072f['projectName'][_0x587ffd(0x140)]>0x64)throw new Error(_0x587ffd(0x16d));const _0x5607c1=a108_0x5294d0['resolve'](process[_0x587ffd(0x154)](),_0x1e072f['projectName']);if(a108_0x3ccc7e[_0x587ffd(0x119)](_0x5607c1))throw new Error(_0x587ffd(0x147)+_0x1e072f[_0x587ffd(0x121)]+_0x587ffd(0x149));try{a108_0x3ccc7e[_0x587ffd(0x122)](a108_0x5294d0['dirname'](_0x5607c1),a108_0x3ccc7e[_0x587ffd(0x11e)]['W_OK']);}catch{throw new Error(_0x587ffd(0x13c));}logger[_0x587ffd(0x11f)](_0x5607c1),logger[_0x587ffd(0x153)](_0x587ffd(0x13b),'开始创建项目:\x20'+_0x1e072f[_0x587ffd(0x121)],{'projectDir':_0x5607c1,'appCode':_0x1e072f[_0x587ffd(0x148)]}),console[_0x587ffd(0x144)](),console[_0x587ffd(0x144)](a108_0x2d07ca[_0x587ffd(0x142)](_0x587ffd(0x12d))+_0x587ffd(0x146)+a108_0x2d07ca[_0x587ffd(0x142)](_0x1e072f[_0x587ffd(0x121)])+(_0x1e072f[_0x587ffd(0x148)]?_0x587ffd(0x13e)+a108_0x2d07ca['cyan'](_0x1e072f[_0x587ffd(0x148)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x1e072f['projectName'])),await updatePackageJsonName(_0x1e072f[_0x587ffd(0x121)]),await runTask(_0x587ffd(0x12a),()=>installDependencies(_0x1e072f[_0x587ffd(0x121)])),await runTask(_0x587ffd(0x161),()=>formatProjectCode(_0x1e072f[_0x587ffd(0x121)])),await configureAppCode(_0x1e072f['projectName'],_0x1e072f['appCode']||'',_0x1e072f[_0x587ffd(0x152)]);let _0xb1e74c=![];if(_0x1e072f[_0x587ffd(0x148)]){console[_0x587ffd(0x144)](_0x587ffd(0x135));const _0x1b1ed3=process[_0x587ffd(0x154)]();try{process[_0x587ffd(0x163)](_0x5607c1);const _0x1337d9=_0x1e072f['env']||'production';initEnv(_0x1337d9);const {configArray:_0x3105c7}=await fetchModelList(_0x1e072f[_0x587ffd(0x148)],_0x3094c8[_0x587ffd(0x13f)]||''),_0x8f2fb3=DEFAULT_API_DIR,_0x1871bd=await generateApiFile(_0x3105c7,'',_0x1e072f[_0x587ffd(0x148)],!![],_0x1337d9,_0x8f2fb3);console['log'](_0x587ffd(0x145)+_0x3105c7[_0x587ffd(0x140)]+_0x587ffd(0x151)+_0x1871bd[_0x587ffd(0x14d)]+_0x587ffd(0x15a)),logger[_0x587ffd(0x153)](_0x587ffd(0x13b),_0x587ffd(0x16a)+_0x1e072f['appCode']);}catch(_0x1694c4){_0xb1e74c=!![],console[_0x587ffd(0x144)](_0x587ffd(0x123)),logger['warn'](_0x587ffd(0x13b),_0x587ffd(0x169),{'error':_0x1694c4 instanceof Error?_0x1694c4['message']:String(_0x1694c4)});}finally{process[_0x587ffd(0x163)](_0x1b1ed3);}}logger[_0x587ffd(0x15c)](_0x587ffd(0x13b),_0x587ffd(0x155)+_0x1e072f[_0x587ffd(0x121)]),console[_0x587ffd(0x144)](),console[_0x587ffd(0x144)](a108_0x2d07ca[_0x587ffd(0x142)]('─'[_0x587ffd(0x139)](0x3c))),console[_0x587ffd(0x144)](a108_0x2d07ca[_0x587ffd(0x15b)]['bold'](_0x587ffd(0x117))),console['log'](),console[_0x587ffd(0x144)](_0x587ffd(0x132)+a108_0x2d07ca['cyan'][_0x587ffd(0x168)](_0x587ffd(0x138)+_0x1e072f['projectName']+'\x20&&\x20'+CLI_BIN_NAME+_0x587ffd(0x167))),_0xb1e74c&&console[_0x587ffd(0x144)](_0x587ffd(0x156)+a108_0x2d07ca[_0x587ffd(0x15b)][_0x587ffd(0x168)](CLI_BIN_NAME+_0x587ffd(0x12b))),console[_0x587ffd(0x144)](a108_0x2d07ca['green']('─'['repeat'](0x3c)));}catch(_0x44e767){logger['error'](_0x587ffd(0x13b),_0x587ffd(0x143)+_0x1e072f[_0x587ffd(0x121)],{'error':_0x44e767 instanceof Error?_0x44e767[_0x587ffd(0x12f)]:String(_0x44e767)});try{a108_0x3ccc7e[_0x587ffd(0x119)](_0x5607c1)&&(console['log'](_0x587ffd(0x15d)+_0x5607c1),a108_0x3ccc7e[_0x587ffd(0x12c)](_0x5607c1,{'recursive':!![],'force':!![]}));}catch{logger[_0x587ffd(0x13d)](_0x587ffd(0x13b),'清理项目目录失败:\x20'+_0x5607c1);}throw _0x44e767;}}async function runTask(_0x2c2eeb,_0x581f4f){const _0x1fea60=a108_0x4f25,_0x30169e=a108_0x5c3c07(_0x2c2eeb+'...')[_0x1fea60(0x14f)]();try{const _0xc93135=await _0x581f4f();_0x30169e[_0x1fea60(0x15f)](),console['log'](''+a108_0x2d07ca[_0x1fea60(0x142)]('\x20√\x20')+_0x2c2eeb+'\x20'+a108_0x2d07ca['gray']('['+_0xc93135+']'));}catch(_0xb69af9){_0x30169e[_0x1fea60(0x11b)](_0x2c2eeb);throw _0xb69af9;}}async function updatePackageJsonName(_0x4ae975){const _0x54f0c5=a108_0x4f25,_0x17bcd1=a108_0x5294d0[_0x54f0c5(0x150)](process[_0x54f0c5(0x154)](),_0x4ae975),_0x3ee82d=a108_0x5294d0[_0x54f0c5(0x12e)](_0x17bcd1,'package.json');try{console[_0x54f0c5(0x144)](_0x54f0c5(0x14b));const _0x480d29=getRabetbaseCliPackageRoot(),_0x3d5f1a=a108_0x5294d0['join'](_0x480d29,'package.json');let _0x500b5f=_0x54f0c5(0x134);try{const _0x33eb03=JSON['parse'](a108_0x3ccc7e[_0x54f0c5(0x129)](_0x3d5f1a,'utf8'));_0x500b5f=_0x33eb03[_0x54f0c5(0x14c)]||_0x54f0c5(0x134);}catch{}const _0x5e4c9d=a108_0x3ccc7e[_0x54f0c5(0x129)](_0x3ee82d,'utf8'),_0x28f1a8=JSON[_0x54f0c5(0x14a)](_0x5e4c9d);_0x28f1a8[_0x54f0c5(0x157)]=_0x4ae975,_0x28f1a8['description']=_0x4ae975+_0x54f0c5(0x133)+_0x500b5f,a108_0x3ccc7e[_0x54f0c5(0x16f)](_0x3ee82d,JSON[_0x54f0c5(0x15e)](_0x28f1a8,null,0x2)+'\x0a',_0x54f0c5(0x141)),console[_0x54f0c5(0x144)](_0x54f0c5(0x14e)+_0x4ae975),logger['info'](_0x54f0c5(0x13b),'更新\x20package.json\x20name');}catch(_0x2e7ba9){logger[_0x54f0c5(0x164)](_0x54f0c5(0x13b),'更新\x20package.json\x20失败');throw _0x2e7ba9;}}async function configureAppCode(_0x545183,_0x1d44da,_0x557545){const _0x327c9c=a108_0x4f25,_0x3b8681=a108_0x5294d0[_0x327c9c(0x150)](process[_0x327c9c(0x154)](),_0x545183),_0x4bd152=a108_0x5294d0['join'](_0x3b8681,NEW_CONFIG_NAME);try{_0x1d44da?console['log'](_0x327c9c(0x171)+_0x545183+':\x20'+_0x1d44da):console[_0x327c9c(0x144)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x545183);const _0x190a98=getRabetbaseCliPackageRoot(),_0x5ed26d=a108_0x5294d0[_0x327c9c(0x12e)](_0x190a98,_0x327c9c(0x16b));let _0x15af24=_0x327c9c(0x134);try{const _0x4d7c78=JSON[_0x327c9c(0x14a)](a108_0x3ccc7e[_0x327c9c(0x129)](_0x5ed26d,_0x327c9c(0x141)));_0x15af24=_0x4d7c78['version']||_0x327c9c(0x134);}catch{}const _0x17daba=readConfig(),_0x2e0002=typeof _0x17daba['env']===_0x327c9c(0x125)?_0x17daba[_0x327c9c(0x152)]:undefined,_0xe0d0a6={};for(const _0x31d28a of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x17daba[_0x31d28a]!=null)_0xe0d0a6[_0x31d28a]=_0x17daba[_0x31d28a];}const _0x3e6f84=buildCanonicalProjectConfig(_0xe0d0a6,{'appCodes':_0x1d44da?[_0x1d44da]:[],'env':_0x557545||_0x2e0002||_0x327c9c(0x127),'metadata':{'createdAt':new Date()[_0x327c9c(0x130)](),'version':_0x15af24}});writeConfigFile(_0x4bd152,_0x3e6f84),_0x1d44da?console[_0x327c9c(0x144)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object['keys'](_0x3e6f84[_0x327c9c(0x136)]||{})[_0x327c9c(0x12e)](',\x20')+_0x327c9c(0x172)+_0x3e6f84[_0x327c9c(0x173)]):console['log'](_0x327c9c(0x128)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger['info'](_0x327c9c(0x13b),_0x327c9c(0x11d)+_0x1d44da);}catch(_0x51d2aa){logger[_0x327c9c(0x164)]('create','配置应用AppCode失败');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a109_0x2e48(_0x59fdbe,_0xc1d00c){_0x59fdbe=_0x59fdbe-0x1e5;const _0x3ab74f=a109_0x3ab7();let _0x2e48c8=_0x3ab74f[_0x59fdbe];return _0x2e48c8;}(function(_0x265755,_0x1989c2){const _0x1e924f=a109_0x2e48,_0x4b9ca4=_0x265755();while(!![]){try{const _0x240699=-parseInt(_0x1e924f(0x1f4))/0x1*(-parseInt(_0x1e924f(0x20d))/0x2)+parseInt(_0x1e924f(0x21d))/0x3*(parseInt(_0x1e924f(0x215))/0x4)+-parseInt(_0x1e924f(0x21a))/0x5*(parseInt(_0x1e924f(0x21e))/0x6)+parseInt(_0x1e924f(0x1ed))/0x7*(-parseInt(_0x1e924f(0x202))/0x8)+parseInt(_0x1e924f(0x214))/0x9+parseInt(_0x1e924f(0x1f2))/0xa*(-parseInt(_0x1e924f(0x1eb))/0xb)+parseInt(_0x1e924f(0x1fe))/0xc;if(_0x240699===_0x1989c2)break;else _0x4b9ca4['push'](_0x4b9ca4['shift']());}catch(_0x5724b1){_0x4b9ca4['push'](_0x4b9ca4['shift']());}}}(a109_0x3ab7,0x262fc));import a109_0x4f2c1e from'path';import a109_0x32122f from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';function a109_0x3ab7(){const _0x5ec6d2=['package.json','\x20model(s)','bun','\x20\x20√\x20Configuration\x20file\x20created','writeFile','116127LEpiwV','\x22\x20already\x20exists.','1771931olODgf','Project\x20directory\x20\x22','length','\x20dataset(s),\x20generated\x20','\x20\x20√\x20package.json\x20updated','10zoPOrn','chdir','184501GKcLHy','log','env','W_OK','\x20\x20Installing\x20dependencies...','description','\x0a√\x20Project\x20','needsUpgrade','\x20api\x20pull`\x20manually\x20later.','toLocaleString','131088TIQcRz','dirname','\x0a\x20\x20cd\x20','access','8WTrqJi','constants','Cannot\x20create\x20project\x20in\x20current\x20directory.','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','resolve','...','Use\x20a\x20different\x20project\x20name.','bun\x20run\x20format','utf-8','string','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','2OYMTGx','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','bun\x20--version','*\x20Creating\x20project\x20','production','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','943911shJkkP','364guFDMD','ignore','join','cwd','\x20\x20√\x20Pulled\x20','385XwVzpY','validation','modelCount','4287gfsjpg','798rSSTLF','trim'];a109_0x3ab7=function(){return _0x5ec6d2;};return a109_0x3ab7();}import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.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(_0x21be00,_0x598f8f,_0x120456,_0xcdb5f){const _0x217a1f=a109_0x2e48,_0x42e638=await checkCliVersion();(_0x42e638[_0x217a1f(0x1fb)]||_0x42e638['belowMinimum'])&&(printCliUpgradeWarning(_0x42e638),assertCliVersionSupported(_0x42e638));if(!_0x21be00||_0x21be00[_0x217a1f(0x1e5)]()==='')throw CliErrors[_0x217a1f(0x21b)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x491420=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x491420['test'](_0x21be00))throw CliErrors[_0x217a1f(0x21b)]('Project\x20name\x20contains\x20invalid\x20characters.',_0x217a1f(0x20e));if(_0x21be00[_0x217a1f(0x1ef)]>0x64)throw CliErrors[_0x217a1f(0x21b)](_0x217a1f(0x20c));const _0x3dc490=a109_0x4f2c1e['resolve'](process['cwd'](),_0x21be00);if(existsSync(_0x3dc490))throw CliErrors[_0x217a1f(0x21b)](_0x217a1f(0x1ee)+_0x21be00+_0x217a1f(0x1ec),_0x217a1f(0x208));try{const _0xaf1d26=a109_0x4f2c1e[_0x217a1f(0x1ff)](_0x3dc490);await a109_0x32122f[_0x217a1f(0x201)](_0xaf1d26,a109_0x32122f[_0x217a1f(0x203)][_0x217a1f(0x1f7)]);}catch{throw CliErrors[_0x217a1f(0x21b)](_0x217a1f(0x204),'Check\x20directory\x20permissions.');}try{console['log'](_0x217a1f(0x211)+_0x21be00+_0x217a1f(0x207));const _0x4efc89=getSubAppReactDemoTemplateDir();await copyDirectory(_0x4efc89,_0x3dc490),console[_0x217a1f(0x1f5)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x21be00),console[_0x217a1f(0x1f5)](_0x217a1f(0x1f1)),console[_0x217a1f(0x1f5)](_0x217a1f(0x1f8)),console[_0x217a1f(0x1f5)](_0x217a1f(0x213)),await formatCode(_0x3dc490),console[_0x217a1f(0x1f5)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x21be00,_0x120456,_0x598f8f),console['log'](_0x217a1f(0x1e9)),_0x120456&&await pullApiConfig(_0x3dc490,_0x120456,_0x598f8f,_0xcdb5f),console[_0x217a1f(0x1f5)](_0x217a1f(0x1fa)+_0x21be00+'\x20created\x20successfully!'),console[_0x217a1f(0x1f5)](_0x217a1f(0x200)+_0x21be00),console[_0x217a1f(0x1f5)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x106554){try{existsSync(_0x3dc490)&&await a109_0x32122f['rm'](_0x3dc490,{'recursive':!![],'force':!![]});}catch{}throw _0x106554;}}async function updatePackageJsonName(_0x345dca){const _0x91020d=a109_0x2e48,_0x38ac81=a109_0x4f2c1e[_0x91020d(0x206)](process[_0x91020d(0x218)](),_0x345dca),_0x398a47=a109_0x4f2c1e[_0x91020d(0x217)](_0x38ac81,_0x91020d(0x1e6)),_0x2748ac=await a109_0x32122f['readFile'](_0x398a47,_0x91020d(0x20a)),_0xc855ba=JSON['parse'](_0x2748ac);_0xc855ba['name']=_0x345dca,_0xc855ba[_0x91020d(0x1f9)]=_0x91020d(0x205),await a109_0x32122f[_0x91020d(0x1ea)](_0x398a47,JSON['stringify'](_0xc855ba,null,0x2)+'\x0a');}function detectPackageManager(){const _0x35ddc0=a109_0x2e48;try{return execSync(_0x35ddc0(0x210),{'stdio':_0x35ddc0(0x216)}),_0x35ddc0(0x1e8);}catch{return'npm';}}async function formatCode(_0xcafd6d){const _0x5035c8=a109_0x2e48;try{await execAsync(_0x5035c8(0x209),{'cwd':_0xcafd6d});}catch{}}async function configureProject(_0x27ef6f,_0x2b7d3a,_0x5d6c85){const _0x32bce1=a109_0x2e48,_0x1d373c=a109_0x4f2c1e[_0x32bce1(0x206)](process['cwd'](),_0x27ef6f),_0x54d2eb=a109_0x4f2c1e[_0x32bce1(0x217)](_0x1d373c,NEW_CONFIG_NAME),_0x59842c=readConfig(),_0xa24adc=typeof _0x59842c[_0x32bce1(0x1f6)]===_0x32bce1(0x20b)?_0x59842c[_0x32bce1(0x1f6)]:undefined,_0x43f5e5={};for(const _0x3c49f5 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x59842c[_0x3c49f5]!=null)_0x43f5e5[_0x3c49f5]=_0x59842c[_0x3c49f5];}const _0x451dd3=buildCanonicalProjectConfig(_0x43f5e5,{'appCodes':_0x2b7d3a?[_0x2b7d3a]:[],'env':_0x5d6c85||_0xa24adc||_0x32bce1(0x212),'metadata':{'createdAt':new Date()[_0x32bce1(0x1fd)](),'version':getCliVersion()}});writeConfigFile(_0x54d2eb,_0x451dd3);}async function pullApiConfig(_0x2426ad,_0x62fd69,_0x1adc0a,_0x3b0214){const _0x424077=a109_0x2e48,_0x2b2bee=process[_0x424077(0x218)]();try{process[_0x424077(0x1f3)](_0x2426ad);const _0x4607fe=_0x1adc0a||_0x424077(0x212);initEnv(_0x4607fe),console[_0x424077(0x1f5)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x1752f4}=await fetchModelList(_0x62fd69,_0x3b0214||''),_0x2e1013=await generateApiFile(_0x1752f4,'',_0x62fd69,!![],_0x4607fe,DEFAULT_API_DIR);console['log'](_0x424077(0x219)+_0x1752f4['length']+_0x424077(0x1f0)+_0x2e1013[_0x424077(0x21c)]+_0x424077(0x1e7));}catch(_0x988299){console[_0x424077(0x1f5)](_0x424077(0x20f)+CLI_BIN_NAME+_0x424077(0x1fc));}finally{process[_0x424077(0x1f3)](_0x2b2bee);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a110_0x9d0a(_0x23d3d,_0x1d9433){_0x23d3d=_0x23d3d-0x158;const _0x34fbd0=a110_0x34fb();let _0x9d0a8f=_0x34fbd0[_0x23d3d];return _0x9d0a8f;}const a110_0x2dfa57=a110_0x9d0a;(function(_0x988175,_0x4e4e9b){const _0x1a58f4=a110_0x9d0a,_0x496d47=_0x988175();while(!![]){try{const _0x4bb3f3=parseInt(_0x1a58f4(0x164))/0x1*(parseInt(_0x1a58f4(0x167))/0x2)+-parseInt(_0x1a58f4(0x15d))/0x3*(parseInt(_0x1a58f4(0x15a))/0x4)+-parseInt(_0x1a58f4(0x165))/0x5*(-parseInt(_0x1a58f4(0x15b))/0x6)+-parseInt(_0x1a58f4(0x161))/0x7+-parseInt(_0x1a58f4(0x160))/0x8+parseInt(_0x1a58f4(0x163))/0x9+parseInt(_0x1a58f4(0x158))/0xa*(parseInt(_0x1a58f4(0x166))/0xb);if(_0x4bb3f3===_0x4e4e9b)break;else _0x496d47['push'](_0x496d47['shift']());}catch(_0x3b4080){_0x496d47['push'](_0x496d47['shift']());}}}(a110_0x34fb,0xac18c));import a110_0x349c99 from'node:path';function a110_0x34fb(){const _0x2dd68c=['2AvwLlf','templates','../../../../','10EkiuDa','projects','260740bDkQZN','9510mkZEqA','resolve','51iMrjzd','sub-app-react-demo','join','7849936zcrjbJ','2477678HgpLUt','dirname','7290972GKvqZy','66115rHnfqN','2525tfyvJL','16187611NRaCkg'];a110_0x34fb=function(){return _0x2dd68c;};return a110_0x34fb();}import{fileURLToPath}from'node:url';const __dirname=a110_0x349c99[a110_0x2dfa57(0x162)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x1723ac=a110_0x2dfa57;return a110_0x349c99[_0x1723ac(0x15c)](__dirname,_0x1723ac(0x169));}export function getSubAppReactDemoTemplateDir(){const _0x202d5d=a110_0x2dfa57;return a110_0x349c99[_0x202d5d(0x15f)](getRabetbaseCliPackageRoot(),_0x202d5d(0x168),_0x202d5d(0x159),_0x202d5d(0x15e));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a111_0x47d5(){const _0x2594b2=['cwd','2315763SotzGA','3887655MlvIrD','success','88086yCwGJj','403443PBdoxW','1182978AXxKPa','5792912euaQLk','项目模板复制失败','项目模板复制完成','8nutOEH','6KgyZOj','copy','info','now','6887461eEpvIo','开始复制项目模板','resolve'];a111_0x47d5=function(){return _0x2594b2;};return a111_0x47d5();}(function(_0x162bca,_0x182b12){const _0x25d74d=a111_0x4871,_0x274414=_0x162bca();while(!![]){try{const _0x4a07dc=-parseInt(_0x25d74d(0x91))/0x1+-parseInt(_0x25d74d(0x8f))/0x2+parseInt(_0x25d74d(0x8c))/0x3+parseInt(_0x25d74d(0x92))/0x4+-parseInt(_0x25d74d(0x8d))/0x5*(-parseInt(_0x25d74d(0x84))/0x6)+parseInt(_0x25d74d(0x88))/0x7*(-parseInt(_0x25d74d(0x95))/0x8)+-parseInt(_0x25d74d(0x90))/0x9;if(_0x4a07dc===_0x182b12)break;else _0x274414['push'](_0x274414['shift']());}catch(_0x40fd0e){_0x274414['push'](_0x274414['shift']());}}}(a111_0x47d5,0xb5215));import a111_0x4e83ff from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a111_0x4871(_0x275dce,_0x2d0165){_0x275dce=_0x275dce-0x84;const _0x47d52c=a111_0x47d5();let _0x487101=_0x47d52c[_0x275dce];return _0x487101;}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x2c7247){const _0x429221=a111_0x4871,_0x1af1da=Date[_0x429221(0x87)](),_0xd8602a=a111_0x4e83ff[_0x429221(0x8a)](process[_0x429221(0x8b)](),_0x2c7247);try{logger[_0x429221(0x86)](_0x429221(0x85),_0x429221(0x89),{'projectCode':_0x2c7247,'templateDir':templateDir}),await copyDirectory(templateDir,_0xd8602a);const _0x383869=Date[_0x429221(0x87)]()-_0x1af1da;logger[_0x429221(0x8e)](_0x429221(0x85),_0x429221(0x94),_0x383869,{'projectCode':_0x2c7247});}catch(_0x2cded6){const _0x2f7482=Date[_0x429221(0x87)]()-_0x1af1da;logger['error'](_0x429221(0x85),_0x429221(0x93),{'projectCode':_0x2c7247,'error':_0x2cded6 instanceof Error?_0x2cded6['message']:String(_0x2cded6),'duration':_0x2f7482});throw _0x2cded6;}return formatElapsed(_0x1af1da);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x55b45b,_0xb07809){const _0x28cb80=a112_0x1bec,_0x36046e=_0x55b45b();while(!![]){try{const _0xd54819=-parseInt(_0x28cb80(0xf7))/0x1*(-parseInt(_0x28cb80(0xf2))/0x2)+parseInt(_0x28cb80(0xf4))/0x3*(-parseInt(_0x28cb80(0xf9))/0x4)+-parseInt(_0x28cb80(0xf0))/0x5+-parseInt(_0x28cb80(0xef))/0x6*(-parseInt(_0x28cb80(0xe5))/0x7)+-parseInt(_0x28cb80(0xe4))/0x8*(-parseInt(_0x28cb80(0xe6))/0x9)+-parseInt(_0x28cb80(0xee))/0xa+parseInt(_0x28cb80(0xea))/0xb*(parseInt(_0x28cb80(0xe7))/0xc);if(_0xd54819===_0xb07809)break;else _0x36046e['push'](_0x36046e['shift']());}catch(_0x194a02){_0x36046e['push'](_0x36046e['shift']());}}}(a112_0x32a8,0xe14c8));function a112_0x32a8(){const _0x18ea38=['11NJBlpw','info','--write','prettier','15910250GSBqxS','6rQAayh','6317715bVAlSV','npx','2joNgri','resolve','3UWWVoJ','format','代码格式化失败','988789FLZdox','success','3463796ooDdpL','message','error','16BTMnIX','1126538wPQTwx','7673355rXWoMI','21461136YQBgYo','代码格式化完成','now'];a112_0x32a8=function(){return _0x18ea38;};return a112_0x32a8();}import a112_0x3560bf from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a112_0x1bec(_0x4b4250,_0x11b700){_0x4b4250=_0x4b4250-0xe3;const _0x32a809=a112_0x32a8();let _0x1bec9e=_0x32a809[_0x4b4250];return _0x1bec9e;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x300542){const _0x1b8e4f=a112_0x1bec,_0x1256b8=Date[_0x1b8e4f(0xe9)](),_0x8f1771=a112_0x3560bf[_0x1b8e4f(0xf3)](process['cwd'](),_0x300542);try{logger[_0x1b8e4f(0xeb)](_0x1b8e4f(0xf5),'开始格式化代码',{'projectCode':_0x300542}),await execa(resolveNpmBin(_0x1b8e4f(0xf1)),[_0x1b8e4f(0xed),_0x1b8e4f(0xec),'.'],{'cwd':_0x8f1771});const _0x3b4a94=Date[_0x1b8e4f(0xe9)]()-_0x1256b8;logger[_0x1b8e4f(0xf8)](_0x1b8e4f(0xf5),_0x1b8e4f(0xe8),_0x3b4a94,{'projectCode':_0x300542});}catch(_0x398ce3){const _0x3e53f0=Date['now']()-_0x1256b8;logger[_0x1b8e4f(0xe3)](_0x1b8e4f(0xf5),_0x1b8e4f(0xf6),{'projectCode':_0x300542,'error':_0x398ce3 instanceof Error?_0x398ce3[_0x1b8e4f(0xfa)]:String(_0x398ce3),'duration':_0x3e53f0});throw _0x398ce3;}return formatElapsed(_0x1256b8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23aa28,_0x3f0890){const _0x32a3c0=a113_0x26e9,_0x302e7d=_0x23aa28();while(!![]){try{const _0x3f7d31=-parseInt(_0x32a3c0(0xd8))/0x1*(parseInt(_0x32a3c0(0xda))/0x2)+-parseInt(_0x32a3c0(0xd6))/0x3+-parseInt(_0x32a3c0(0xde))/0x4+-parseInt(_0x32a3c0(0xe5))/0x5+-parseInt(_0x32a3c0(0xdb))/0x6*(-parseInt(_0x32a3c0(0xe7))/0x7)+-parseInt(_0x32a3c0(0xe8))/0x8*(parseInt(_0x32a3c0(0xd9))/0x9)+parseInt(_0x32a3c0(0xd7))/0xa;if(_0x3f7d31===_0x3f0890)break;else _0x302e7d['push'](_0x302e7d['shift']());}catch(_0xfbff4d){_0x302e7d['push'](_0x302e7d['shift']());}}}(a113_0x40ab,0x5968c));import a113_0x510780 from'node:path';import{execa}from'execa';function a113_0x40ab(){const _0x49dda6=['install','now','message','依赖安装完成','依赖安装失败','--registry','2745180zWFfrU','info','18676XgqGwU','3150232ntVKEs','开始安装依赖','https://registry.npmmirror.com','cwd','1572468OdZASt','21256980iiOXpN','1zoDjOQ','9WmBgdW','1015818Gdbekd','1278VbqUau','success','error','1411528rzVxUM'];a113_0x40ab=function(){return _0x49dda6;};return a113_0x40ab();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a113_0x26e9(_0x1d9e67,_0x236374){_0x1d9e67=_0x1d9e67-0xd6;const _0x40ab13=a113_0x40ab();let _0x26e935=_0x40ab13[_0x1d9e67];return _0x26e935;}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x36e47b){const _0x1ebdb1=a113_0x26e9,_0x23a982=Date[_0x1ebdb1(0xe0)](),_0x2de669=a113_0x510780['resolve'](process[_0x1ebdb1(0xeb)](),_0x36e47b);try{logger[_0x1ebdb1(0xe6)](_0x1ebdb1(0xdf),_0x1ebdb1(0xe9),{'projectCode':_0x36e47b,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin('npm'),[_0x1ebdb1(0xdf),_0x1ebdb1(0xe4),_0x1ebdb1(0xea)],{'cwd':_0x2de669});const _0x4d073d=Date[_0x1ebdb1(0xe0)]()-_0x23a982;logger[_0x1ebdb1(0xdc)](_0x1ebdb1(0xdf),_0x1ebdb1(0xe2),_0x4d073d,{'projectCode':_0x36e47b});}catch(_0xb07a42){const _0xa79d14=Date[_0x1ebdb1(0xe0)]()-_0x23a982;logger[_0x1ebdb1(0xdd)](_0x1ebdb1(0xdf),_0x1ebdb1(0xe3),{'projectCode':_0x36e47b,'error':_0xb07a42 instanceof Error?_0xb07a42[_0x1ebdb1(0xe1)]:String(_0xb07a42),'duration':_0xa79d14});throw _0xb07a42;}return formatElapsed(_0x23a982);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a114_0x2817e5=a114_0x100e;(function(_0x47a839,_0x292c61){const _0x4d57c6=a114_0x100e,_0x1689fa=_0x47a839();while(!![]){try{const _0x5a89a1=-parseInt(_0x4d57c6(0x1f6))/0x1+-parseInt(_0x4d57c6(0x201))/0x2*(-parseInt(_0x4d57c6(0x1f0))/0x3)+-parseInt(_0x4d57c6(0x1fd))/0x4+parseInt(_0x4d57c6(0x1e7))/0x5*(-parseInt(_0x4d57c6(0x205))/0x6)+parseInt(_0x4d57c6(0x206))/0x7*(-parseInt(_0x4d57c6(0x1f4))/0x8)+-parseInt(_0x4d57c6(0x207))/0x9*(parseInt(_0x4d57c6(0x1e3))/0xa)+parseInt(_0x4d57c6(0x1f7))/0xb*(parseInt(_0x4d57c6(0x1ee))/0xc);if(_0x5a89a1===_0x292c61)break;else _0x1689fa['push'](_0x1689fa['shift']());}catch(_0x3fc487){_0x1689fa['push'](_0x1689fa['shift']());}}}(a114_0x2a2e,0xd3441));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a114_0x100e(_0x3282d8,_0x2b3e04){_0x3282d8=_0x3282d8-0x1e1;const _0x2a2e67=a114_0x2a2e();let _0x100e5a=_0x2a2e67[_0x3282d8];return _0x100e5a;}const initFlags=[{'name':a114_0x2817e5(0x204),'type':'string','description':a114_0x2817e5(0x1f8)},{'name':a114_0x2817e5(0x1fb),'type':a114_0x2817e5(0x1fc),'description':'Target\x20environment'},{'name':a114_0x2817e5(0x1ea),'type':a114_0x2817e5(0x1e2),'description':a114_0x2817e5(0x200),'default':![]}],createFlags=[{'name':a114_0x2817e5(0x1fe),'type':'string','description':a114_0x2817e5(0x1f5)},{'name':'env','type':a114_0x2817e5(0x1fc),'description':a114_0x2817e5(0x1ef)},{'name':'appcode','type':a114_0x2817e5(0x1fc),'description':a114_0x2817e5(0x1ed)}],upgradeFlags=[{'name':a114_0x2817e5(0x1ea),'type':a114_0x2817e5(0x1e2),'description':a114_0x2817e5(0x1f3),'default':![]}];function a114_0x2a2e(){const _0x5a4aa7=['486926BbXVsc','55IQAiNo','App\x20code\x20to\x20initialize','upgrade','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','env','string','4225824sJLGUr','name','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Auto-confirm\x20prompts','18MpNgCJ','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','cookie','appcode','6OpPKkZ','23709bZPWyB','382041rZOMPK','project-name','write','nonInteractive','boolean','110FciCJa','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','create','str','5609535HHfilZ','project','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','yes','bool','Usage:\x20','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','7988748TjlhNY','Target\x20environment','276039HzZlpm','init','trim','Skip\x20confirmation\x20prompt','376dRDGnF','Project\x20name'];a114_0x2a2e=function(){return _0x5a4aa7;};return a114_0x2a2e();}export const projectDefinitions=[{'service':a114_0x2817e5(0x1e8),'command':a114_0x2817e5(0x1f1),'description':a114_0x2817e5(0x1e9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x59baa3){const _0x645757=a114_0x2817e5;return await initConfig({'appcode':_0x59baa3[_0x645757(0x1e6)]('appcode')||undefined,'env':_0x59baa3[_0x645757(0x1e6)](_0x645757(0x1fb))||undefined,'autoYes':_0x59baa3[_0x645757(0x1eb)](_0x645757(0x1ea))}),{'ok':!![]};}},{'service':a114_0x2817e5(0x1e8),'command':a114_0x2817e5(0x1e5),'description':'Create\x20a\x20new\x20project','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a114_0x2817e5(0x208),'description':a114_0x2817e5(0x1e4),'required':![]}],'flags':createFlags,async 'execute'(_0x312551){const _0x198a88=a114_0x2817e5,{createApp:_0x2182cf}=await import('../../commands/project/create/main.js'),{createProjectNonInteractive:_0x2cac9f}=await import('../../commands/project/create/non-interactive.js'),_0x5289cd=_0x312551[_0x198a88(0x1e6)](_0x198a88(0x1fe))[_0x198a88(0x1f2)]()||_0x312551['args'][0x0]?.[_0x198a88(0x1f2)](),_0x2ec3bb=_0x312551['str'](_0x198a88(0x1fb))||undefined,_0xf52e30=_0x312551[_0x198a88(0x1e6)]('appcode')||undefined;if(_0x312551[_0x198a88(0x1e1)]){if(!_0x5289cd)throw CliErrors['validation'](_0x198a88(0x1ff),_0x198a88(0x1ec)+CLI_BIN_NAME+_0x198a88(0x1fa));await _0x2cac9f(_0x5289cd,_0x2ec3bb,_0xf52e30,_0x312551['cookie']);}else await _0x2182cf({'projectCode':_0x5289cd,'appCode':_0xf52e30,'env':_0x2ec3bb,'cookie':_0x312551[_0x198a88(0x203)]});return{'ok':!![]};}},{'service':a114_0x2817e5(0x1e8),'command':a114_0x2817e5(0x1f9),'description':a114_0x2817e5(0x202),'risk':a114_0x2817e5(0x209),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x4c0d57){const _0x3c2eb9=a114_0x2817e5;return await upgradeApp(_0x4c0d57[_0x3c2eb9(0x1e1)],{'yes':_0x4c0d57[_0x3c2eb9(0x1eb)](_0x3c2eb9(0x1ea))}),{'ok':!![]};}}];
|