@lovrabet/rabetbase-cli 2.2.2-beta.1 → 2.2.3-beta.1
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/list.js +1 -0
- 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_0x108779=a102_0x1c2d;(function(_0x3599da,_0x19c90e){const _0x548bc7=a102_0x1c2d,_0x100ef0=_0x3599da();while(!![]){try{const _0xdaf558=parseInt(_0x548bc7(0x1cb))/0x1*(-parseInt(_0x548bc7(0x1b5))/0x2)+parseInt(_0x548bc7(0x1d9))/0x3*(parseInt(_0x548bc7(0x1c0))/0x4)+parseInt(_0x548bc7(0x1d6))/0x5*(parseInt(_0x548bc7(0x1bf))/0x6)+parseInt(_0x548bc7(0x1c4))/0x7+parseInt(_0x548bc7(0x1d0))/0x8+-parseInt(_0x548bc7(0x1e0))/0x9+parseInt(_0x548bc7(0x1dc))/0xa*(parseInt(_0x548bc7(0x1aa))/0xb);if(_0xdaf558===_0x19c90e)break;else _0x100ef0['push'](_0x100ef0['shift']());}catch(_0x29f65b){_0x100ef0['push'](_0x100ef0['shift']());}}}(a102_0x1a50,0xc4618));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_0x108779(0x1dd);export const pageRelationAudit={'service':'page','command':'relation-audit','description':a102_0x108779(0x1b4),'risk':a102_0x108779(0x1af),'defaultOutputFormat':a102_0x108779(0x1ac),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a102_0x108779(0x203),'type':'string','description':a102_0x108779(0x1ed)}],async 'validate'(_0xe5891a){validateDatasetSelector(_0xe5891a);},async 'execute'(_0xee1fba){const _0x24014d=a102_0x108779,_0x19361c=await loadDatasetDetailForPage(_0xee1fba),_0x40c334=await datasetRelations[_0x24014d(0x1e6)](_0xee1fba),_0x4084d1=(_0x40c334[_0x24014d(0x1f7)]?.[_0x24014d(0x1b3)]??[])[_0x24014d(0x1e9)](_0x1de561=>_0x1de561['from']?.['datasetCode']===_0x19361c['code']),_0x18095f=_0x19361c['relatedPages'][_0x24014d(0x1e9)](_0x2b3eb7=>!_0x2b3eb7[_0x24014d(0x1b8)]),_0x6ddc2c=await Promise[_0x24014d(0x1c2)](_0x18095f[_0x24014d(0x1e2)](async _0x5c738f=>auditPage(_0xee1fba,_0x5c738f,_0x19361c,_0x4084d1))),_0x3643f8=_0x6ddc2c[_0x24014d(0x1f9)]();return{'ok':!![],'message':_0x24014d(0x1a6)+_0x3643f8[_0x24014d(0x1ec)]+'\x20item(s)','data':{'protocol':PROTOCOL,'appCode':_0xee1fba[_0x24014d(0x1a8)],'datasetCode':_0x19361c[_0x24014d(0x1fc)],'total':_0x3643f8[_0x24014d(0x1ec)],'items':_0x3643f8}};}};async function auditPage(_0x198bbc,_0x3c2a8f,_0x393c97,_0x3d528b){const _0x2eb364=a102_0x108779,_0x571d86=await loadPageDetailForPage(_0x198bbc,_0x3c2a8f['id']),_0x15224e=parsePageSchema(_0x571d86['code']),_0xc9e4d8=collectDataSources(_0x15224e),_0x292acd=buildFromFieldAuditMap(_0x393c97);return _0x3d528b[_0x2eb364(0x1e2)](_0x537034=>{const _0x5e6e9b=_0x2eb364,_0x191645=buildExpectedBinding(_0x198bbc[_0x5e6e9b(0x1a8)],_0x537034),_0x1d72e6=_0x292acd[_0x5e6e9b(0x1b9)](_0x537034[_0x5e6e9b(0x1d2)][_0x5e6e9b(0x1eb)])??buildFallbackFromFieldAudit(_0x537034[_0x5e6e9b(0x1d2)]['field']),_0x548c7e=collectFieldCandidates(_0x15224e,_0x537034[_0x5e6e9b(0x1d2)]['field']),_0x37f017=_0x548c7e[0x0]??findDataSourceCandidate(_0xc9e4d8,_0x537034[_0x5e6e9b(0x1d2)][_0x5e6e9b(0x1eb)]);if(!_0x37f017)return buildAuditItem({'pageId':_0x571d86[_0x5e6e9b(0x1c6)],'pageType':_0x571d86[_0x5e6e9b(0x1b1)],'datasetCode':_0x393c97[_0x5e6e9b(0x1fc)],'relation':_0x537034,'location':_0x5e6e9b(0x1f3),'currentBinding':null,'expectedBinding':_0x191645,'fromField':_0x1d72e6,'status':'missing'});if(_0x37f017['optionsType']===_0x5e6e9b(0x1e5)){const _0x19ebbc=classifyCustomOptions(_0x1d72e6);return buildAuditItem({'pageId':_0x571d86['pageId'],'pageType':_0x571d86[_0x5e6e9b(0x1b1)],'datasetCode':_0x393c97['code'],'relation':_0x537034,'location':_0x37f017[_0x5e6e9b(0x1c3)],'currentBinding':{'optionsType':_0x5e6e9b(0x1e5)},'expectedBinding':_0x191645,'fromField':_0x1d72e6,'status':_0x19ebbc});}const _0x49ecd5=findDataSourceForCandidate(_0xc9e4d8,_0x37f017,_0x537034[_0x5e6e9b(0x1d2)][_0x5e6e9b(0x1eb)]),_0x267846=_0x49ecd5?{'optionsType':_0x5e6e9b(0x1e3),'dataSourceId':_0x49ecd5['id'],..._0x49ecd5[_0x5e6e9b(0x1ab)]?{'uri':_0x49ecd5[_0x5e6e9b(0x1ab)]}:{},..._0x49ecd5[_0x5e6e9b(0x1fc)]?{'code':_0x49ecd5[_0x5e6e9b(0x1fc)]}:{},..._0x49ecd5[_0x5e6e9b(0x1c7)]?{'label':_0x49ecd5['label']}:{},..._0x37f017[_0x5e6e9b(0x1bd)]?{'stateKey':_0x37f017[_0x5e6e9b(0x1bd)]}:{}}:_0x37f017[_0x5e6e9b(0x1bd)]?{'optionsType':_0x5e6e9b(0x1e3),'stateKey':_0x37f017['stateKey']}:null,_0x5ac9c8=classifyBinding(_0x37f017,_0x49ecd5,_0x537034);return buildAuditItem({'pageId':_0x571d86['pageId'],'pageType':_0x571d86[_0x5e6e9b(0x1b1)],'datasetCode':_0x393c97[_0x5e6e9b(0x1fc)],'relation':_0x537034,'location':_0x37f017[_0x5e6e9b(0x1c3)],'currentBinding':_0x267846,'expectedBinding':_0x191645,'fromField':_0x1d72e6,'status':_0x5ac9c8});});}function buildAuditItem(_0x305950){const _0x210b44=a102_0x108779;return{'pageId':_0x305950[_0x210b44(0x1c6)],'pageType':_0x305950['pageType'],'datasetCode':_0x305950['datasetCode'],'field':_0x305950[_0x210b44(0x1e3)][_0x210b44(0x1d2)][_0x210b44(0x1eb)],'location':_0x305950['location'],'currentBinding':_0x305950['currentBinding'],'expectedBinding':_0x305950[_0x210b44(0x1b7)],'fromField':_0x305950[_0x210b44(0x1d5)],'status':_0x305950[_0x210b44(0x201)]};}function buildFromFieldAuditMap(_0x11e275){const _0x3ab8b7=a102_0x108779,_0x3dcdac=Array[_0x3ab8b7(0x1f0)](_0x11e275[_0x3ab8b7(0x1c5)]?.[_0x3ab8b7(0x1d1)])?_0x11e275['raw'][_0x3ab8b7(0x1d1)]:Array[_0x3ab8b7(0x1f0)](_0x11e275[_0x3ab8b7(0x1c5)]?.[_0x3ab8b7(0x1ad)])?_0x11e275[_0x3ab8b7(0x1c5)][_0x3ab8b7(0x1ad)]:[],_0x3c439e=new Map();for(const _0x4e9ce2 of _0x3dcdac){const _0x4dfd9e=normalizeFromFieldAudit(_0x4e9ce2);if(_0x4dfd9e)_0x3c439e['set'](_0x4dfd9e[_0x3ab8b7(0x1ff)],_0x4dfd9e);}return _0x3c439e;}function normalizeFromFieldAudit(_0x47f0f2){const _0x1eb837=a102_0x108779;if(!isRecord(_0x47f0f2)||_0x47f0f2[_0x1eb837(0x1b8)]===!![])return null;const _0x48bde2=_0x47f0f2[_0x1eb837(0x1bb)]!==undefined||_0x47f0f2[_0x1eb837(0x1e8)]!==undefined,_0x1ff958=text(_0x48bde2?_0x47f0f2[_0x1eb837(0x1ff)]??_0x47f0f2[_0x1eb837(0x1fc)]??_0x47f0f2[_0x1eb837(0x1eb)]??_0x47f0f2['key']:_0x47f0f2['code']??_0x47f0f2[_0x1eb837(0x1ff)]??_0x47f0f2[_0x1eb837(0x1eb)]??_0x47f0f2[_0x1eb837(0x1b6)]);if(!_0x1ff958)return null;const _0x25f9c5=text(_0x48bde2?_0x47f0f2[_0x1eb837(0x1bb)]:_0x47f0f2['name']),_0x7fcb2a=parseObjectMaybe(_0x47f0f2[_0x1eb837(0x1f1)]),_0x31722d=text(_0x47f0f2['doType']),_0x34e611=text(_0x47f0f2[_0x1eb837(0x1b1)]??_0x47f0f2[_0x1eb837(0x1ee)]),_0x383e1e=hasOptionsArray(_0x47f0f2[_0x1eb837(0x1cc)])||hasOptionsArray(_0x7fcb2a?.[_0x1eb837(0x1cc)])||hasOptionsArray(_0x7fcb2a?.[_0x1eb837(0x1ca)]),_0x5e02d7=classifyFromFieldOptionsType({'explicitOptionsType':normalizeOptionsType(_0x47f0f2[_0x1eb837(0x1cf)]??_0x7fcb2a?.['optionsType']),'hasOptions':_0x383e1e});return{'name':_0x1ff958,..._0x25f9c5?{'displayName':_0x25f9c5}:{},..._0x31722d?{'doType':_0x31722d}:{},..._0x34e611?{'type':_0x34e611}:{},'optionsType':_0x5e02d7,'hasOptions':_0x383e1e};}function buildFallbackFromFieldAudit(_0x44a682){const _0x4589e6=a102_0x108779;return{'name':_0x44a682,'optionsType':_0x4589e6(0x1a9),'hasOptions':![]};}function normalizeOptionsType(_0x2ed132){const _0x209a02=a102_0x108779;if(typeof _0x2ed132!==_0x209a02(0x1c1))return null;const _0x2a3153=_0x2ed132[_0x209a02(0x1fe)]()['toLowerCase']();if(_0x2a3153==='relation'||_0x2a3153===_0x209a02(0x1e5))return _0x2a3153;return null;}function classifyFromFieldOptionsType(_0x16da63){const _0xb5ffee=a102_0x108779;if(_0x16da63[_0xb5ffee(0x1ae)])return _0x16da63[_0xb5ffee(0x1ae)];return _0x16da63[_0xb5ffee(0x1cd)]?_0xb5ffee(0x1e5):_0xb5ffee(0x1a9);}function hasOptionsArray(_0x2c3cbd){const _0x1f7530=a102_0x108779;return Array['isArray'](_0x2c3cbd)&&_0x2c3cbd[_0x1f7530(0x1ec)]>0x0;}function parseObjectMaybe(_0x24621){const _0x185604=a102_0x108779;if(isRecord(_0x24621))return _0x24621;if(typeof _0x24621!=='string'||!_0x24621[_0x185604(0x1fe)]())return null;try{const _0x4634f9=JSON[_0x185604(0x1bc)](_0x24621);return isRecord(_0x4634f9)?_0x4634f9:null;}catch{return null;}}function parsePageSchema(_0x41f152){const _0x497ef4=a102_0x108779;if(!_0x41f152[_0x497ef4(0x1fe)]())return{};try{return JSON[_0x497ef4(0x1bc)](_0x41f152);}catch{return{};}}function collectDataSources(_0x53aefc){const _0x127483=[];return walk(_0x53aefc,[],(_0xfc6d09,_0x143b5a)=>{const _0x2bef33=a102_0x1c2d;if(!isRecord(_0xfc6d09))return;const _0x3ff004=isRecord(_0xfc6d09[_0x2bef33(0x1df)])&&Array['isArray'](_0xfc6d09['dataSource']['list'])?_0xfc6d09['dataSource'][_0x2bef33(0x1f2)]:_0x143b5a[_0x143b5a[_0x2bef33(0x1ec)]-0x1]===_0x2bef33(0x1df)&&Array[_0x2bef33(0x1f0)](_0xfc6d09[_0x2bef33(0x1f2)])?_0xfc6d09[_0x2bef33(0x1f2)]:[];for(const _0x57727c of _0x3ff004){const _0x2203fa=normalizeDataSource(_0x57727c);if(_0x2203fa)_0x127483[_0x2bef33(0x1db)](_0x2203fa);}}),uniqueById(_0x127483);}function normalizeDataSource(_0x22f521){const _0x5a828c=a102_0x108779;if(!isRecord(_0x22f521))return null;const _0x303fee=text(_0x22f521['id']??_0x22f521[_0x5a828c(0x1ff)]??_0x22f521[_0x5a828c(0x1b6)]);if(!_0x303fee)return null;const _0x52e40c=isRecord(_0x22f521[_0x5a828c(0x1cc)])?_0x22f521[_0x5a828c(0x1cc)]:{},_0x419bd5=isRecord(_0x52e40c['params'])?_0x52e40c['params']:isRecord(_0x22f521['params'])?_0x22f521[_0x5a828c(0x1da)]:{},_0x2d1cb7=_0x52e40c['paramsArr']??_0x22f521[_0x5a828c(0x1ea)];return{'id':_0x303fee,'uri':text(_0x52e40c['uri']??_0x52e40c[_0x5a828c(0x1d4)]??_0x22f521[_0x5a828c(0x1ab)]??_0x22f521[_0x5a828c(0x1d4)]),'code':text(_0x419bd5[_0x5a828c(0x1fc)]??readParamFromArray(_0x2d1cb7,_0x5a828c(0x1fc))),'label':text(_0x419bd5['label']??readParamFromArray(_0x2d1cb7,_0x5a828c(0x1c7)))};}function readParamFromArray(_0x1e303a,_0x15c9c5){const _0x5cf7d9=a102_0x108779;if(!Array['isArray'](_0x1e303a))return undefined;return _0x1e303a['find'](_0x390898=>isRecord(_0x390898)&&_0x390898[_0x5cf7d9(0x1ff)]===_0x15c9c5)?.[_0x5cf7d9(0x1ba)];}function collectFieldCandidates(_0x5507bc,_0x47b74d){const _0x505677=[];return walk(_0x5507bc,[],(_0x4f6027,_0x84a28b)=>{const _0x1f43d5=a102_0x1c2d;if(!isRecord(_0x4f6027))return;if(!objectTargetsField(_0x4f6027,_0x47b74d))return;const _0x17b1dd=readStateKey(_0x4f6027);_0x505677[_0x1f43d5(0x1db)]({'field':_0x47b74d,'location':inferLocation(_0x84a28b),'optionsType':hasPageOptionsArray(_0x4f6027)?_0x1f43d5(0x1e5):'relation','stateKey':_0x17b1dd});}),_0x505677;}function objectTargetsField(_0x236daa,_0x750fdf){const _0x358946=a102_0x108779;return[_0x358946(0x1eb),_0x358946(0x1d3),_0x358946(0x1ff),'id',_0x358946(0x1b6),_0x358946(0x1a5)][_0x358946(0x1f6)](_0x56e62e=>text(_0x236daa[_0x56e62e])===_0x750fdf);}function a102_0x1a50(){const _0x50ad54=['get','value','displayName','parse','stateKey','labelField','18tzraqP','96seofMG','string','all','location','3350235akXQSM','raw','pageId','label','JSExpression','custom_options','selectItems','404432IRTWDc','options','hasOptions','/getSelectOptions','optionsType','5936576qmDAAd','fields','from','dataIndex','url','fromField','1108175rtHZgh','missing','find','53970tnHRYu','params','push','45340qEddem','page-relation-audit.v1','forEach','dataSource','11796768MpDmjJ','datasource','map','relation','table','custom','execute','has','doType','filter','paramsArr','field','length','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','dataType','relation_options','isArray','extend','list','form','formatOptions','search','some','data','datasetCode','flat','entries','toLowerCase','code','match','trim','name','wrong_label','status','includes','alias','wrong_state','prop','Page\x20relation\x20audit:\x20','wrong_code','appCode','unknown','2453iAtPqW','uri','compress','properties','explicitOptionsType','read','column','type','/api/','relations','Audit\x20Smart\x20List\x20Page\x20option\x20bindings\x20against\x20dataset\x20relations','6UHTyiW','key','expectedBinding','deleted'];a102_0x1a50=function(){return _0x50ad54;};return a102_0x1a50();}function hasPageOptionsArray(_0x22f520){const _0x2adf8d=a102_0x108779,_0x181c3b=isRecord(_0x22f520['formatOptions'])?_0x22f520[_0x2adf8d(0x1f4)]:{};return Array[_0x2adf8d(0x1f0)](_0x22f520[_0x2adf8d(0x1cc)])||Array['isArray'](_0x181c3b[_0x2adf8d(0x1cc)]);}function readStateKey(_0x2f3ee6){const _0x2b3dd4=a102_0x108779,_0x1b6c87=isRecord(_0x2f3ee6[_0x2b3dd4(0x1f4)])?_0x2f3ee6[_0x2b3dd4(0x1f4)]:{};return readStateKeyFromUnknown(_0x2f3ee6['options'])??readStateKeyFromUnknown(_0x1b6c87['options']);}function readStateKeyFromUnknown(_0x5077fc){const _0x1e7473=a102_0x108779;if(isRecord(_0x5077fc)&&_0x5077fc['type']===_0x1e7473(0x1c8))return readStateKeyFromUnknown(_0x5077fc[_0x1e7473(0x1ba)]);if(typeof _0x5077fc!==_0x1e7473(0x1c1))return undefined;const _0x25b027=_0x5077fc[_0x1e7473(0x1fd)](/(?:this\.)?state\.([A-Za-z0-9_-]+)/);return _0x25b027?.[0x1];}function inferLocation(_0x408a35){const _0x489042=a102_0x108779,_0x433bf9=_0x408a35['map'](_0x1717a3=>_0x1717a3[_0x489042(0x1fb)]());if(_0x433bf9[_0x489042(0x1f6)](_0x5b6060=>_0x5b6060['includes'](_0x489042(0x1e1))))return _0x489042(0x1df);if(_0x433bf9[_0x489042(0x1f6)](_0x22e1ed=>_0x22e1ed[_0x489042(0x202)](_0x489042(0x1b0))||_0x22e1ed[_0x489042(0x202)](_0x489042(0x1e4))))return'table';if(_0x433bf9['some'](_0x3d4f16=>_0x3d4f16[_0x489042(0x202)](_0x489042(0x1e9))||_0x3d4f16['includes'](_0x489042(0x1f5))))return'filter';return _0x489042(0x1f3);}function findDataSourceCandidate(_0x164be2,_0x6e6f52){const _0x214f68=a102_0x108779;return _0x164be2[_0x214f68(0x1f6)](_0xe9caed=>_0xe9caed['id']['includes'](_0x6e6f52))?{'field':_0x6e6f52,'location':_0x214f68(0x1df),'optionsType':_0x214f68(0x1e3)}:undefined;}function findDataSourceForCandidate(_0x46dcdc,_0x30f5e4,_0x40f106){const _0x3845b1=a102_0x108779;if(_0x30f5e4[_0x3845b1(0x1bd)])return _0x46dcdc[_0x3845b1(0x1d8)](_0x195b68=>_0x195b68['id']===_0x30f5e4[_0x3845b1(0x1bd)]);return _0x46dcdc[_0x3845b1(0x1d8)](_0x3dc1c9=>_0x3dc1c9['id'][_0x3845b1(0x202)](_0x40f106));}function classifyBinding(_0x35f32b,_0xf636bb,_0x53f2b5){const _0x3cd5c1=a102_0x108779;if(!_0xf636bb)return _0x35f32b[_0x3cd5c1(0x1bd)]?_0x3cd5c1(0x1a4):_0x3cd5c1(0x1d7);if(_0x35f32b[_0x3cd5c1(0x1bd)]&&_0xf636bb['id']!==_0x35f32b[_0x3cd5c1(0x1bd)])return _0x3cd5c1(0x1a4);if(_0xf636bb[_0x3cd5c1(0x1fc)]&&_0xf636bb[_0x3cd5c1(0x1fc)]!==_0x53f2b5['to'][_0x3cd5c1(0x1eb)])return _0x3cd5c1(0x1a7);const _0x4d1be7=readRelationLabel(_0x53f2b5);if(_0x4d1be7&&_0xf636bb[_0x3cd5c1(0x1c7)]!==_0x4d1be7)return _0x3cd5c1(0x200);return _0x3cd5c1(0x1ef);}function classifyCustomOptions(_0x237a1e){const _0x72b167=a102_0x108779;if(_0x237a1e['optionsType']===_0x72b167(0x1e3))return'missing';return _0x72b167(0x1c9);}function buildExpectedBinding(_0x31779c,_0x2157e2){const _0x261eb8=a102_0x108779,_0x37bc4e=readRelationLabel(_0x2157e2);return{'toDatasetCode':_0x2157e2['to'][_0x261eb8(0x1f8)],'code':_0x2157e2['to']['field'],..._0x37bc4e?{'label':_0x37bc4e}:{},'uri':_0x261eb8(0x1b2)+_0x31779c+'/'+_0x2157e2['to'][_0x261eb8(0x1f8)]+_0x261eb8(0x1ce)};}function readRelationLabel(_0x1fd1fb){const _0x107501=a102_0x108779;return text(_0x1fd1fb['to'][_0x107501(0x1be)])||undefined;}function a102_0x1c2d(_0x4228ef,_0x4d434d){_0x4228ef=_0x4228ef-0x1a4;const _0x1a505b=a102_0x1a50();let _0x1c2d42=_0x1a505b[_0x4228ef];return _0x1c2d42;}function uniqueById(_0x546e19){const _0x3b3cc9=a102_0x108779,_0x30073b=new Set();return _0x546e19[_0x3b3cc9(0x1e9)](_0x443409=>{const _0x24acde=_0x3b3cc9;if(_0x30073b[_0x24acde(0x1e7)](_0x443409['id']))return![];return _0x30073b['add'](_0x443409['id']),!![];});}function walk(_0x74ede2,_0x5033a2,_0x3bf352){const _0x12fcb5=a102_0x108779;_0x3bf352(_0x74ede2,_0x5033a2);if(Array[_0x12fcb5(0x1f0)](_0x74ede2)){_0x74ede2[_0x12fcb5(0x1de)]((_0x570542,_0x547603)=>walk(_0x570542,[..._0x5033a2,String(_0x547603)],_0x3bf352));return;}if(!isRecord(_0x74ede2))return;for(const [_0x158091,_0x3bd6d3]of Object[_0x12fcb5(0x1fa)](_0x74ede2)){walk(_0x3bd6d3,[..._0x5033a2,_0x158091],_0x3bf352);}}function isRecord(_0x14a1af){const _0x3dcc26=a102_0x108779;return Boolean(_0x14a1af)&&typeof _0x14a1af==='object'&&!Array[_0x3dcc26(0x1f0)](_0x14a1af);}function text(_0x28cf17){const _0x46c49f=a102_0x108779;return typeof _0x28cf17==='string'?_0x28cf17[_0x46c49f(0x1fe)]():'';}
|
|
1
|
+
const a103_0x30e382=a103_0x3bf6;(function(_0x4fcec8,_0x4318f6){const _0x2cb397=a103_0x3bf6,_0x1a8e17=_0x4fcec8();while(!![]){try{const _0x44264d=parseInt(_0x2cb397(0x16e))/0x1*(parseInt(_0x2cb397(0x14d))/0x2)+parseInt(_0x2cb397(0x133))/0x3+parseInt(_0x2cb397(0x156))/0x4*(parseInt(_0x2cb397(0x128))/0x5)+-parseInt(_0x2cb397(0x17d))/0x6+parseInt(_0x2cb397(0x161))/0x7*(parseInt(_0x2cb397(0x15e))/0x8)+-parseInt(_0x2cb397(0x13b))/0x9*(parseInt(_0x2cb397(0x143))/0xa)+parseInt(_0x2cb397(0x14f))/0xb*(-parseInt(_0x2cb397(0x181))/0xc);if(_0x44264d===_0x4318f6)break;else _0x1a8e17['push'](_0x1a8e17['shift']());}catch(_0x43bc09){_0x1a8e17['push'](_0x1a8e17['shift']());}}}(a103_0x397a,0x55a77));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='page-relation-audit.v1';export const pageRelationAudit={'service':a103_0x30e382(0x13f),'command':a103_0x30e382(0x17c),'description':a103_0x30e382(0x180),'risk':a103_0x30e382(0x16d),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a103_0x30e382(0x138),'description':a103_0x30e382(0x17f)}],async 'validate'(_0x3c78a8){validateDatasetSelector(_0x3c78a8);},async 'execute'(_0x269756){const _0x5e4614=a103_0x30e382,_0x42afad=await loadDatasetDetailForPage(_0x269756),_0x19445d=await datasetRelations[_0x5e4614(0x127)](_0x269756),_0x248f49=(_0x19445d[_0x5e4614(0x172)]?.['relations']??[])[_0x5e4614(0x160)](_0x4fbda2=>_0x4fbda2[_0x5e4614(0x140)]?.[_0x5e4614(0x150)]===_0x42afad['code']),_0x543760=_0x42afad[_0x5e4614(0x15f)][_0x5e4614(0x160)](_0x6c3e5c=>!_0x6c3e5c[_0x5e4614(0x142)]),_0x58574e=await Promise['all'](_0x543760[_0x5e4614(0x136)](async _0x2f1708=>auditPage(_0x269756,_0x2f1708,_0x42afad,_0x248f49))),_0x4ad45a=_0x58574e[_0x5e4614(0x16c)]();return{'ok':!![],'message':'Page\x20relation\x20audit:\x20'+_0x4ad45a[_0x5e4614(0x146)]+_0x5e4614(0x173),'data':{'protocol':PROTOCOL,'appCode':_0x269756[_0x5e4614(0x14e)],'datasetCode':_0x42afad[_0x5e4614(0x139)],'total':_0x4ad45a[_0x5e4614(0x146)],'items':_0x4ad45a}};}};async function auditPage(_0x4d1518,_0x5e426d,_0x53764f,_0x3c947e){const _0x48fbb6=a103_0x30e382,_0x51c5ad=await loadPageDetailForPage(_0x4d1518,_0x5e426d['id']),_0x3bc3cc=parsePageSchema(_0x51c5ad[_0x48fbb6(0x139)]),_0x567c8c=collectDataSources(_0x3bc3cc),_0x509c16=buildFromFieldAuditMap(_0x53764f);return _0x3c947e[_0x48fbb6(0x136)](_0x3dec99=>{const _0x454eaf=_0x48fbb6,_0x190e22=buildExpectedBinding(_0x4d1518[_0x454eaf(0x14e)],_0x3dec99),_0x3cbca5=_0x509c16['get'](_0x3dec99[_0x454eaf(0x140)]['field'])??buildFallbackFromFieldAudit(_0x3dec99[_0x454eaf(0x140)][_0x454eaf(0x164)]),_0xdb1955=collectFieldCandidates(_0x3bc3cc,_0x3dec99[_0x454eaf(0x140)]['field']),_0x87bf05=_0xdb1955[0x0]??findDataSourceCandidate(_0x567c8c,_0x3dec99['from']['field']);if(!_0x87bf05)return buildAuditItem({'pageId':_0x51c5ad[_0x454eaf(0x16b)],'pageType':_0x51c5ad['type'],'datasetCode':_0x53764f[_0x454eaf(0x139)],'relation':_0x3dec99,'location':_0x454eaf(0x17b),'currentBinding':null,'expectedBinding':_0x190e22,'fromField':_0x3cbca5,'status':_0x454eaf(0x12a)});if(_0x87bf05[_0x454eaf(0x13d)]===_0x454eaf(0x166)){const _0x3be3ba=classifyCustomOptions(_0x3cbca5);return buildAuditItem({'pageId':_0x51c5ad[_0x454eaf(0x16b)],'pageType':_0x51c5ad[_0x454eaf(0x178)],'datasetCode':_0x53764f[_0x454eaf(0x139)],'relation':_0x3dec99,'location':_0x87bf05[_0x454eaf(0x17e)],'currentBinding':{'optionsType':_0x454eaf(0x166)},'expectedBinding':_0x190e22,'fromField':_0x3cbca5,'status':_0x3be3ba});}const _0x42c3b7=findDataSourceForCandidate(_0x567c8c,_0x87bf05,_0x3dec99['from'][_0x454eaf(0x164)]),_0xe44957=_0x42c3b7?{'optionsType':_0x454eaf(0x157),'dataSourceId':_0x42c3b7['id'],..._0x42c3b7['uri']?{'uri':_0x42c3b7[_0x454eaf(0x13a)]}:{},..._0x42c3b7[_0x454eaf(0x139)]?{'code':_0x42c3b7[_0x454eaf(0x139)]}:{},..._0x42c3b7[_0x454eaf(0x12b)]?{'label':_0x42c3b7[_0x454eaf(0x12b)]}:{},..._0x87bf05['stateKey']?{'stateKey':_0x87bf05[_0x454eaf(0x15b)]}:{}}:_0x87bf05[_0x454eaf(0x15b)]?{'optionsType':_0x454eaf(0x157),'stateKey':_0x87bf05[_0x454eaf(0x15b)]}:null,_0x9e65d0=classifyBinding(_0x87bf05,_0x42c3b7,_0x3dec99);return buildAuditItem({'pageId':_0x51c5ad[_0x454eaf(0x16b)],'pageType':_0x51c5ad[_0x454eaf(0x178)],'datasetCode':_0x53764f['code'],'relation':_0x3dec99,'location':_0x87bf05[_0x454eaf(0x17e)],'currentBinding':_0xe44957,'expectedBinding':_0x190e22,'fromField':_0x3cbca5,'status':_0x9e65d0});});}function buildAuditItem(_0x2950c6){const _0x44a0dc=a103_0x30e382;return{'pageId':_0x2950c6['pageId'],'pageType':_0x2950c6['pageType'],'datasetCode':_0x2950c6['datasetCode'],'field':_0x2950c6['relation'][_0x44a0dc(0x140)][_0x44a0dc(0x164)],'location':_0x2950c6[_0x44a0dc(0x17e)],'currentBinding':_0x2950c6[_0x44a0dc(0x135)],'expectedBinding':_0x2950c6[_0x44a0dc(0x16a)],'fromField':_0x2950c6['fromField'],'status':_0x2950c6[_0x44a0dc(0x15d)]};}function buildFromFieldAuditMap(_0x377c6c){const _0x31f684=a103_0x30e382,_0x18e72c=Array[_0x31f684(0x13e)](_0x377c6c[_0x31f684(0x170)]?.['fields'])?_0x377c6c['raw'][_0x31f684(0x12e)]:Array[_0x31f684(0x13e)](_0x377c6c[_0x31f684(0x170)]?.[_0x31f684(0x162)])?_0x377c6c['raw'][_0x31f684(0x162)]:[],_0xc5e8de=new Map();for(const _0x322079 of _0x18e72c){const _0x4b5a1d=normalizeFromFieldAudit(_0x322079);if(_0x4b5a1d)_0xc5e8de[_0x31f684(0x12c)](_0x4b5a1d['name'],_0x4b5a1d);}return _0xc5e8de;}function normalizeFromFieldAudit(_0xf877da){const _0x319de5=a103_0x30e382;if(!isRecord(_0xf877da)||_0xf877da[_0x319de5(0x142)]===!![])return null;const _0x380a7c=_0xf877da['displayName']!==undefined||_0xf877da[_0x319de5(0x12f)]!==undefined,_0x84d297=text(_0x380a7c?_0xf877da[_0x319de5(0x174)]??_0xf877da['code']??_0xf877da[_0x319de5(0x164)]??_0xf877da[_0x319de5(0x134)]:_0xf877da[_0x319de5(0x139)]??_0xf877da[_0x319de5(0x174)]??_0xf877da[_0x319de5(0x164)]??_0xf877da[_0x319de5(0x134)]);if(!_0x84d297)return null;const _0x4dcdec=text(_0x380a7c?_0xf877da[_0x319de5(0x168)]:_0xf877da[_0x319de5(0x174)]),_0x37be79=parseObjectMaybe(_0xf877da[_0x319de5(0x151)]),_0x5f373b=text(_0xf877da['doType']),_0x2fba10=text(_0xf877da[_0x319de5(0x178)]??_0xf877da[_0x319de5(0x132)]),_0xf4281b=hasOptionsArray(_0xf877da[_0x319de5(0x141)])||hasOptionsArray(_0x37be79?.[_0x319de5(0x141)])||hasOptionsArray(_0x37be79?.[_0x319de5(0x165)]),_0x4bcf8c=classifyFromFieldOptionsType({'explicitOptionsType':normalizeOptionsType(_0xf877da[_0x319de5(0x13d)]??_0x37be79?.[_0x319de5(0x13d)]),'hasOptions':_0xf4281b});return{'name':_0x84d297,..._0x4dcdec?{'displayName':_0x4dcdec}:{},..._0x5f373b?{'doType':_0x5f373b}:{},..._0x2fba10?{'type':_0x2fba10}:{},'optionsType':_0x4bcf8c,'hasOptions':_0xf4281b};}function a103_0x3bf6(_0xd11a75,_0x32032c){_0xd11a75=_0xd11a75-0x127;const _0x397a0c=a103_0x397a();let _0x3bf65b=_0x397a0c[_0xd11a75];return _0x3bf65b;}function a103_0x397a(){const _0x5e8986=['custom_options','paramsArr','form','relation-audit','88440sJQVAi','location','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','Audit\x20Smart\x20List\x20Page\x20option\x20bindings\x20against\x20dataset\x20relations','35220bARLqY','execute','155ZEfSNu','hasOptions','missing','label','set','parse','fields','doType','wrong_code','forEach','dataType','553272qqLwpF','key','currentBinding','map','dataIndex','string','code','uri','1574838LYdani','value','optionsType','isArray','page','from','options','deleted','10cNPWPs','prop','object','length','find','list','wrong_state','wrong_label','table','add','138jfQaSf','appCode','1023SmqxHK','datasetCode','extend','datasource','entries','column','JSExpression','23568uYYpYC','relation','params','relation_options','unknown','stateKey','some','status','8jnZFcV','relatedPages','filter','2931397DAvsqX','properties','toLowerCase','field','selectItems','custom','trim','displayName','explicitOptionsType','expectedBinding','pageId','flat','read','401fqcOpe','includes','raw','formatOptions','data','\x20item(s)','name','search','push','dataSource','type'];a103_0x397a=function(){return _0x5e8986;};return a103_0x397a();}function buildFallbackFromFieldAudit(_0x3e3443){const _0x4998f5=a103_0x30e382;return{'name':_0x3e3443,'optionsType':_0x4998f5(0x15a),'hasOptions':![]};}function normalizeOptionsType(_0x3226ec){const _0x227f80=a103_0x30e382;if(typeof _0x3226ec!=='string')return null;const _0xc33043=_0x3226ec['trim']()['toLowerCase']();if(_0xc33043===_0x227f80(0x157)||_0xc33043===_0x227f80(0x166))return _0xc33043;return null;}function classifyFromFieldOptionsType(_0x38947c){const _0x2106c2=a103_0x30e382;if(_0x38947c[_0x2106c2(0x169)])return _0x38947c[_0x2106c2(0x169)];return _0x38947c[_0x2106c2(0x129)]?_0x2106c2(0x166):_0x2106c2(0x15a);}function hasOptionsArray(_0x42241d){const _0x5ed544=a103_0x30e382;return Array[_0x5ed544(0x13e)](_0x42241d)&&_0x42241d[_0x5ed544(0x146)]>0x0;}function parseObjectMaybe(_0x4e1b16){const _0x2d0005=a103_0x30e382;if(isRecord(_0x4e1b16))return _0x4e1b16;if(typeof _0x4e1b16!==_0x2d0005(0x138)||!_0x4e1b16[_0x2d0005(0x167)]())return null;try{const _0x5bdd96=JSON['parse'](_0x4e1b16);return isRecord(_0x5bdd96)?_0x5bdd96:null;}catch{return null;}}function parsePageSchema(_0x2c527f){const _0x56bf8a=a103_0x30e382;if(!_0x2c527f['trim']())return{};try{return JSON[_0x56bf8a(0x12d)](_0x2c527f);}catch{return{};}}function collectDataSources(_0x5a36ae){const _0x1577fa=[];return walk(_0x5a36ae,[],(_0x4fbbf4,_0x372d45)=>{const _0x46ce1c=a103_0x3bf6;if(!isRecord(_0x4fbbf4))return;const _0x2d07ad=isRecord(_0x4fbbf4['dataSource'])&&Array[_0x46ce1c(0x13e)](_0x4fbbf4['dataSource']['list'])?_0x4fbbf4[_0x46ce1c(0x177)][_0x46ce1c(0x148)]:_0x372d45[_0x372d45['length']-0x1]===_0x46ce1c(0x177)&&Array[_0x46ce1c(0x13e)](_0x4fbbf4['list'])?_0x4fbbf4[_0x46ce1c(0x148)]:[];for(const _0x5ca7f6 of _0x2d07ad){const _0x52cda0=normalizeDataSource(_0x5ca7f6);if(_0x52cda0)_0x1577fa['push'](_0x52cda0);}}),uniqueById(_0x1577fa);}function normalizeDataSource(_0x170eee){const _0x4b683e=a103_0x30e382;if(!isRecord(_0x170eee))return null;const _0x3af222=text(_0x170eee['id']??_0x170eee[_0x4b683e(0x174)]??_0x170eee[_0x4b683e(0x134)]);if(!_0x3af222)return null;const _0x26e30a=isRecord(_0x170eee['options'])?_0x170eee['options']:{},_0x2e46ba=isRecord(_0x26e30a[_0x4b683e(0x158)])?_0x26e30a[_0x4b683e(0x158)]:isRecord(_0x170eee[_0x4b683e(0x158)])?_0x170eee['params']:{},_0x2c202c=_0x26e30a[_0x4b683e(0x17a)]??_0x170eee[_0x4b683e(0x17a)];return{'id':_0x3af222,'uri':text(_0x26e30a[_0x4b683e(0x13a)]??_0x26e30a['url']??_0x170eee['uri']??_0x170eee['url']),'code':text(_0x2e46ba['code']??readParamFromArray(_0x2c202c,_0x4b683e(0x139))),'label':text(_0x2e46ba[_0x4b683e(0x12b)]??readParamFromArray(_0x2c202c,_0x4b683e(0x12b)))};}function readParamFromArray(_0x3b34d1,_0x3426e9){const _0x1f9742=a103_0x30e382;if(!Array[_0x1f9742(0x13e)](_0x3b34d1))return undefined;return _0x3b34d1['find'](_0x161e76=>isRecord(_0x161e76)&&_0x161e76[_0x1f9742(0x174)]===_0x3426e9)?.['value'];}function collectFieldCandidates(_0x4a33f7,_0x3a9eee){const _0x551788=[];return walk(_0x4a33f7,[],(_0x37861f,_0x2175bc)=>{const _0x4930fb=a103_0x3bf6;if(!isRecord(_0x37861f))return;if(!objectTargetsField(_0x37861f,_0x3a9eee))return;const _0x4c771e=readStateKey(_0x37861f);_0x551788[_0x4930fb(0x176)]({'field':_0x3a9eee,'location':inferLocation(_0x2175bc),'optionsType':hasPageOptionsArray(_0x37861f)?'custom':'relation','stateKey':_0x4c771e});}),_0x551788;}function objectTargetsField(_0x30caad,_0xc4c6c8){const _0x573356=a103_0x30e382;return[_0x573356(0x164),_0x573356(0x137),_0x573356(0x174),'id',_0x573356(0x134),_0x573356(0x144)][_0x573356(0x15c)](_0x9bb71a=>text(_0x30caad[_0x9bb71a])===_0xc4c6c8);}function hasPageOptionsArray(_0x163e29){const _0x299e09=a103_0x30e382,_0x5e0e84=isRecord(_0x163e29[_0x299e09(0x171)])?_0x163e29[_0x299e09(0x171)]:{};return Array['isArray'](_0x163e29[_0x299e09(0x141)])||Array[_0x299e09(0x13e)](_0x5e0e84['options']);}function readStateKey(_0x6e5062){const _0x3d456b=a103_0x30e382,_0x5f944f=isRecord(_0x6e5062[_0x3d456b(0x171)])?_0x6e5062[_0x3d456b(0x171)]:{};return readStateKeyFromUnknown(_0x6e5062[_0x3d456b(0x141)])??readStateKeyFromUnknown(_0x5f944f[_0x3d456b(0x141)]);}function readStateKeyFromUnknown(_0x349833){const _0x5aa55f=a103_0x30e382;if(isRecord(_0x349833)&&_0x349833[_0x5aa55f(0x178)]===_0x5aa55f(0x155))return readStateKeyFromUnknown(_0x349833[_0x5aa55f(0x13c)]);if(typeof _0x349833!==_0x5aa55f(0x138))return undefined;const _0x4e623f=_0x349833['match'](/(?:this\.)?state\.([A-Za-z0-9_-]+)/);return _0x4e623f?.[0x1];}function inferLocation(_0xa55985){const _0x2d7e60=a103_0x30e382,_0x8f643=_0xa55985[_0x2d7e60(0x136)](_0x41f058=>_0x41f058[_0x2d7e60(0x163)]());if(_0x8f643['some'](_0x3d7d97=>_0x3d7d97[_0x2d7e60(0x16f)](_0x2d7e60(0x152))))return'dataSource';if(_0x8f643[_0x2d7e60(0x15c)](_0xb0f0ef=>_0xb0f0ef[_0x2d7e60(0x16f)](_0x2d7e60(0x154))||_0xb0f0ef[_0x2d7e60(0x16f)](_0x2d7e60(0x14b))))return _0x2d7e60(0x14b);if(_0x8f643[_0x2d7e60(0x15c)](_0x56446c=>_0x56446c[_0x2d7e60(0x16f)](_0x2d7e60(0x160))||_0x56446c['includes'](_0x2d7e60(0x175))))return _0x2d7e60(0x160);return _0x2d7e60(0x17b);}function findDataSourceCandidate(_0x430422,_0x4f7ac5){const _0xc913a5=a103_0x30e382;return _0x430422[_0xc913a5(0x15c)](_0x24ee96=>_0x24ee96['id'][_0xc913a5(0x16f)](_0x4f7ac5))?{'field':_0x4f7ac5,'location':_0xc913a5(0x177),'optionsType':_0xc913a5(0x157)}:undefined;}function findDataSourceForCandidate(_0x51857b,_0x2dbf51,_0x22dda3){const _0x4592b1=a103_0x30e382;if(_0x2dbf51[_0x4592b1(0x15b)])return _0x51857b[_0x4592b1(0x147)](_0x9a8173=>_0x9a8173['id']===_0x2dbf51[_0x4592b1(0x15b)]);return _0x51857b['find'](_0x526919=>_0x526919['id']['includes'](_0x22dda3));}function classifyBinding(_0x99b66,_0x18d60d,_0x209cd7){const _0x414c08=a103_0x30e382;if(!_0x18d60d)return _0x99b66[_0x414c08(0x15b)]?_0x414c08(0x149):_0x414c08(0x12a);if(_0x99b66['stateKey']&&_0x18d60d['id']!==_0x99b66[_0x414c08(0x15b)])return _0x414c08(0x149);if(_0x18d60d[_0x414c08(0x139)]&&_0x18d60d[_0x414c08(0x139)]!==_0x209cd7['to'][_0x414c08(0x164)])return _0x414c08(0x130);const _0x3d976e=readRelationLabel(_0x209cd7);if(_0x3d976e&&_0x18d60d[_0x414c08(0x12b)]!==_0x3d976e)return _0x414c08(0x14a);return _0x414c08(0x159);}function classifyCustomOptions(_0xd1897e){const _0x2d0305=a103_0x30e382;if(_0xd1897e[_0x2d0305(0x13d)]===_0x2d0305(0x157))return _0x2d0305(0x12a);return _0x2d0305(0x179);}function buildExpectedBinding(_0x4e989b,_0x49882d){const _0x4b755a=a103_0x30e382,_0x18744d=readRelationLabel(_0x49882d);return{'toDatasetCode':_0x49882d['to'][_0x4b755a(0x150)],'code':_0x49882d['to'][_0x4b755a(0x164)],..._0x18744d?{'label':_0x18744d}:{},'uri':'/api/'+_0x4e989b+'/'+_0x49882d['to']['datasetCode']+'/getSelectOptions'};}function readRelationLabel(_0x5a8048){return text(_0x5a8048['to']['labelField'])||undefined;}function uniqueById(_0x4d7fe9){const _0x4a79c8=a103_0x30e382,_0x4e1a91=new Set();return _0x4d7fe9[_0x4a79c8(0x160)](_0x515781=>{const _0x3d2f2d=_0x4a79c8;if(_0x4e1a91['has'](_0x515781['id']))return![];return _0x4e1a91[_0x3d2f2d(0x14c)](_0x515781['id']),!![];});}function walk(_0x35657d,_0x5c51f5,_0x4a34e8){const _0x4a1146=a103_0x30e382;_0x4a34e8(_0x35657d,_0x5c51f5);if(Array[_0x4a1146(0x13e)](_0x35657d)){_0x35657d[_0x4a1146(0x131)]((_0x42f97c,_0x2b2420)=>walk(_0x42f97c,[..._0x5c51f5,String(_0x2b2420)],_0x4a34e8));return;}if(!isRecord(_0x35657d))return;for(const [_0x17f9a4,_0x32f17e]of Object[_0x4a1146(0x153)](_0x35657d)){walk(_0x32f17e,[..._0x5c51f5,_0x17f9a4],_0x4a34e8);}}function isRecord(_0x5dd978){const _0x1a02ed=a103_0x30e382;return Boolean(_0x5dd978)&&typeof _0x5dd978===_0x1a02ed(0x145)&&!Array['isArray'](_0x5dd978);}function text(_0x1dfe70){const _0xdd979a=a103_0x30e382;return typeof _0x1dfe70===_0xdd979a(0x138)?_0x1dfe70[_0xdd979a(0x167)]():'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1639fd,_0x1bdcef){const _0x4f71ba=a103_0xd273,_0x391946=_0x1639fd();while(!![]){try{const _0x5e0adf=parseInt(_0x4f71ba(0x14b))/0x1+-parseInt(_0x4f71ba(0xe2))/0x2*(-parseInt(_0x4f71ba(0xe9))/0x3)+parseInt(_0x4f71ba(0x122))/0x4*(parseInt(_0x4f71ba(0xdc))/0x5)+parseInt(_0x4f71ba(0x126))/0x6+-parseInt(_0x4f71ba(0x11a))/0x7+-parseInt(_0x4f71ba(0xed))/0x8*(-parseInt(_0x4f71ba(0xf8))/0x9)+-parseInt(_0x4f71ba(0x10f))/0xa*(parseInt(_0x4f71ba(0xf3))/0xb);if(_0x5e0adf===_0x1bdcef)break;else _0x391946['push'](_0x391946['shift']());}catch(_0x5101ee){_0x391946['push'](_0x391946['shift']());}}}(a103_0x21ad,0x8ccc8));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(_0x38dc6d){const _0x5b9899=a103_0xd273,_0x4ea59b=_0x38dc6d[_0x5b9899(0xd5)]('id');if(typeof _0x4ea59b==='number'&&Number[_0x5b9899(0x141)](_0x4ea59b)&&_0x4ea59b>0x0)return _0x4ea59b;return undefined;}export function validateDatasetSelector(_0x3f36ca){const _0x38d140=a103_0xd273,_0x293fd9=Boolean(_0x3f36ca[_0x38d140(0x14d)](_0x38d140(0x153))),_0x59f2a1=Boolean(_0x3f36ca[_0x38d140(0x14d)](_0x38d140(0x104)));if(_0x293fd9&&_0x59f2a1)throw CliErrors['validation']('Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.');if(!_0x293fd9&&!_0x59f2a1)throw CliErrors[_0x38d140(0xd7)](_0x38d140(0x12f));}function a103_0x21ad(){const _0x18abcc=['incompleteSets','apiDir','\x20page\x20sync\x20--datasetcode\x20','UNKNOWN','\x22\x20has\x20incomplete\x20Smart\x20List\x20Page\x20sets.','no_standard_pages_found','unknown_reconcile_failed','isArray','One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.','standard-page-status','residualPages','dataset','menuPages','CANCELING','code','modelCode','run_sync','\x22,\x20but\x20Smart\x20List\x20Page\x20facts\x20are\x20unavailable.','push','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','datasetId','stringify','operation-id','blocked_complete_plus_residual_sets','set','Run\x20`','isFinite','<empty>','\x20page\x20generate-status\x20--datasetcode\x20','client-operation-id','\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.','pages','Alias\x20\x22','\x20page\x20generate-start\x20--datasetcode\x20','map','totalSets','53770QFurHL','run_generate_start','str','--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.','type','get','sync','Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20','datasetcode','Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.','Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.','hasMenu','fields','menuPath','pageSets','flag','config','validation','object','\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','operation_pending','\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','5OSHqoG','SUCCESS','modelId','complete','page-generate-','\x22\x20returned\x20an\x20unsupported\x20Smart\x20List\x20Page\x20state.','173874CgowwP','manual_resolution_required','deleted','clientOperationId','\x20page\x20standard-page-status\x20--datasetcode\x20','One\x20of\x20--operation-id\x20or\x20--client-operation-id\x20is\x20required.','number','39gPBkAf','versionTag','pageVersion','\x22\x20not\x20found.\x20','128vbyGeZ','string','Version\x20tag\x20\x22','PENDING','operationId','Page\x20\x22','2409ZaaNRe','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','\x20--format\x20json','Dataset\x20\x22','\x22,\x20but\x20no\x20Smart\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','410526UbPWGD','title','query_operation_status','already_exists_complete_set','length','boolean','blocked_incomplete_sets','unknown','generated_complete_set','One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.','__EMPTY__','relatedPageInfoList','alias','`\x20first,\x20then\x20poll\x20`','version-tag','from','trim','relatedPages','\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.','pageId','filter','`\x20instead.','toUpperCase','97130TzPZfk','join','menuVisible','Use\x20either\x20--operation-id\x20or\x20--client-operation-id,\x20not\x20both.','blocked_multiple_complete_sets','datasetIds','\x20--appcode\x20','properties','Smart\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22','datasetCode','Smart\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22','1912442wzvsPf','Operation\x20finished\x20for\x20dataset\x20\x22','completeSets','appCode','\x22\x20belongs\x20to\x20app\x20\x22','name','status','FAILED','3930100kQLnRH','page-','keys','\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','484590hCbvLN'];a103_0x21ad=function(){return _0x18abcc;};return a103_0x21ad();}export function validateGenerateOperationSelector(_0x132e43){const _0x5ef441=a103_0xd273,_0x2c8e06=Boolean(_0x132e43['str'](_0x5ef441(0x13d))),_0x44d4cf=Boolean(_0x132e43[_0x5ef441(0x14d)](_0x5ef441(0x144)));if(_0x2c8e06&&_0x44d4cf)throw CliErrors[_0x5ef441(0xd7)](_0x5ef441(0x112));if(!_0x2c8e06&&!_0x44d4cf)throw CliErrors['validation'](_0x5ef441(0xe7));}export function validatePageTargetSelector(_0x58e336){const _0x4b743c=a103_0xd273,_0x1cb379=getPageIdFlag(_0x58e336)!==undefined,_0x4def27=Boolean(_0x58e336[_0x4b743c(0x14d)](_0x4b743c(0x153))||_0x58e336[_0x4b743c(0x14d)]('alias'));if(_0x1cb379&&_0x4def27)throw CliErrors['validation'](_0x4b743c(0x154));if(!_0x1cb379&&!_0x4def27)throw CliErrors['validation'](_0x4b743c(0x101));if(_0x58e336['str'](_0x4b743c(0x106))&&!_0x4def27)throw CliErrors[_0x4b743c(0xd7)](_0x4b743c(0x14e));}export function resolveDatasetCode(_0xa224bd){const _0x32b910=a103_0xd273;validateDatasetSelector(_0xa224bd);const _0x5a3c50=_0xa224bd['str']('datasetcode');if(_0x5a3c50)return _0x5a3c50;const _0x36bc14=_0xa224bd[_0x32b910(0x14d)](_0x32b910(0x104)),_0x1fe6ff=resolveApiFilePath(_0xa224bd[_0x32b910(0x128)],_0xa224bd['appCode']),_0x3c0546=resolveAlias(_0xa224bd[_0x32b910(0x128)],_0x36bc14,undefined,_0x1fe6ff);if(_0x3c0546)return _0x3c0546;const _0x58a3c8=loadAliasMap(_0xa224bd[_0x32b910(0x128)],undefined,_0x1fe6ff),_0x187c2a=_0x58a3c8[_0x32b910(0xfc)]>0x0?'Available\x20aliases:\x20'+_0x58a3c8[_0x32b910(0x149)](_0x3cfe20=>_0x3cfe20[_0x32b910(0x104)])[_0x32b910(0x110)](',\x20'):_0x32b910(0x140)+CLI_BIN_NAME+_0x32b910(0x145);throw CliErrors[_0x32b910(0xd7)](_0x32b910(0x147)+_0x36bc14+_0x32b910(0xec)+_0x187c2a);}export async function loadDatasetDetailForPage(_0x195532){const _0x9ba584=a103_0xd273,_0x2c3b2a=resolveDatasetCode(_0x195532),_0x1921d7=await getDatasetDetail(_0x2c3b2a),_0x206e59=normalizeDatasetDetail(_0x1921d7,_0x2c3b2a);return ensureAppOwnership(_0x195532[_0x9ba584(0x11d)],_0x206e59[_0x9ba584(0x11d)],'Dataset\x20\x22'+_0x206e59[_0x9ba584(0x135)]+'\x22\x20belongs\x20to\x20app\x20\x22'+_0x206e59[_0x9ba584(0x11d)]+'\x22,\x20not\x20current\x20app\x20\x22'+_0x195532[_0x9ba584(0x11d)]+'\x22.'),_0x206e59;}export async function loadPageDetailForPage(_0x15facc,_0x5141df){const _0x5a1142=a103_0xd273,_0x2be3e4=await getPageDetail(_0x5141df),_0x51b88d=normalizePageDetail(_0x2be3e4);return ensureAppOwnership(_0x15facc['appCode'],_0x51b88d[_0x5a1142(0x11d)],_0x5a1142(0xf2)+_0x5141df+_0x5a1142(0x11e)+_0x51b88d[_0x5a1142(0x11d)]+'\x22,\x20not\x20current\x20app\x20\x22'+_0x15facc['appCode']+'\x22.'),_0x51b88d;}export function getUndeletedRelatedPages(_0x4a8bd1){const _0x280048=a103_0xd273;return _0x4a8bd1[_0x280048(0x109)][_0x280048(0x10c)](_0x13cdcd=>!_0x13cdcd[_0x280048(0xe4)]);}export function buildPageGenerateOperationStatusQueryCommand(_0x46e0aa,_0x4c92fd){const _0x496c2b=a103_0xd273,_0x320693=_0x4c92fd?.[_0x496c2b(0x11d)]&&_0x4c92fd[_0x496c2b(0x11d)][_0x496c2b(0x108)]()!==''?_0x496c2b(0x115)+_0x4c92fd[_0x496c2b(0x11d)]:'',_0x1a8f1a=_0x4c92fd?.[_0x496c2b(0xf1)]&&_0x4c92fd[_0x496c2b(0xf1)][_0x496c2b(0x108)]()!==''?'\x20--operation-id\x20'+_0x4c92fd[_0x496c2b(0xf1)]:_0x4c92fd?.[_0x496c2b(0xe5)]&&_0x4c92fd[_0x496c2b(0xe5)][_0x496c2b(0x108)]()!==''?'\x20--client-operation-id\x20'+_0x4c92fd[_0x496c2b(0xe5)]:'';return CLI_BIN_NAME+_0x496c2b(0x143)+_0x46e0aa+_0x320693+_0x1a8f1a+'\x20--format\x20json';}export function createPageGenerateClientOperationId(){const _0x119d86=a103_0xd273;return _0x119d86(0xe0)+randomUUID();}export function buildStandardPageStatusQueryCommand(_0x3b91b8,_0xfce69b){const _0x1f9429=a103_0xd273,_0x2606a1=_0xfce69b&&_0xfce69b[_0x1f9429(0x108)]()!==''?_0x1f9429(0x115)+_0xfce69b:'';return CLI_BIN_NAME+_0x1f9429(0xe6)+_0x3b91b8+_0x2606a1+_0x1f9429(0xf5);}export function prepareDatasetAction(_0x2229f0,_0x2467ac){const _0x2ac56a=a103_0xd273,_0x1bb0fd=getUndeletedRelatedPages(_0x2229f0);if(_0x2467ac==='generate'&&_0x1bb0fd[_0x2ac56a(0xfc)]>0x0)throw CliErrors[_0x2ac56a(0xd7)](_0x2ac56a(0xf6)+_0x2229f0[_0x2ac56a(0x135)]+_0x2ac56a(0xf4),_0x2ac56a(0x140)+CLI_BIN_NAME+_0x2ac56a(0x129)+_0x2229f0['code']+_0x2ac56a(0x10d));if(_0x2467ac===_0x2ac56a(0x151)&&_0x1bb0fd['length']===0x0)throw CliErrors[_0x2ac56a(0xd7)]('Dataset\x20\x22'+_0x2229f0[_0x2ac56a(0x135)]+'\x22\x20has\x20no\x20undeleted\x20related\x20pages.',_0x2ac56a(0x140)+CLI_BIN_NAME+_0x2ac56a(0x148)+_0x2229f0[_0x2ac56a(0x135)]+_0x2ac56a(0x105)+CLI_BIN_NAME+_0x2ac56a(0x143)+_0x2229f0['code']+_0x2ac56a(0x10a));return{'dataset':_0x2229f0,'undeletedPages':_0x1bb0fd};}export function prepareGenerateDatasetAction(_0x2a3a11,_0x578ca6){const _0x13dd87=a103_0xd273,_0x162f42=getUndeletedRelatedPages(_0x2a3a11);if(!_0x578ca6){if(_0x162f42[_0x13dd87(0xfc)]>0x0)throw CliErrors[_0x13dd87(0xd7)](_0x13dd87(0xf6)+_0x2a3a11['code']+_0x13dd87(0xf4),_0x13dd87(0x140)+CLI_BIN_NAME+_0x13dd87(0x129)+_0x2a3a11[_0x13dd87(0x135)]+_0x13dd87(0x10d));return{'dataset':_0x2a3a11,'undeletedPages':_0x162f42,'standardPageStatus':null};}const _0x278478=_0x578ca6['completeSets'],_0x562f0c=_0x578ca6[_0x13dd87(0x127)],_0x2a5539=_0x578ca6[_0x13dd87(0x131)]['length'];if(_0x278478===0x0&&_0x562f0c===0x0&&_0x2a5539===0x0)return{'dataset':_0x2a3a11,'undeletedPages':_0x162f42,'standardPageStatus':_0x578ca6};if(_0x278478===0x1&&_0x562f0c===0x0&&_0x2a5539===0x0)throw CliErrors[_0x13dd87(0xd7)]('Dataset\x20\x22'+_0x2a3a11[_0x13dd87(0x135)]+_0x13dd87(0xdb),_0x13dd87(0x140)+CLI_BIN_NAME+_0x13dd87(0x129)+_0x2a3a11['code']+'`\x20instead.');throw CliErrors['validation'](_0x13dd87(0xf6)+_0x2a3a11[_0x13dd87(0x135)]+'\x22\x20has\x20multiple\x20or\x20incomplete\x20Smart\x20List\x20Page\x20sets.','Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.');}export function assessStandardPageState(_0x207eda,_0x439df6,_0x2c0449){const _0x5e3345=a103_0xd273,_0x313ba0=_0x2c0449?.['successStatus']??_0x5e3345(0xfb),_0x570dd2=_0x2c0449?.['fallbackUndeletedPages']??[];if(!_0x439df6){if(_0x570dd2[_0x5e3345(0xfc)]>0x0)return{'status':_0x5e3345(0xfe),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x5e3345(0xf6)+_0x207eda+_0x5e3345(0x125),'nextAction':_0x5e3345(0xe3)};return{'status':_0x5e3345(0x12c),'allowGenerate':!![],'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x207eda+_0x5e3345(0xd9),'nextAction':_0x5e3345(0x14c)};}const _0x5bffc7=_0x439df6[_0x5e3345(0x11c)],_0x2fe84d=_0x439df6[_0x5e3345(0x127)],_0x59badc=_0x439df6['residualPages']['length'];if(_0x5bffc7===0x0&&_0x2fe84d===0x0&&_0x59badc===0x0)return{'status':'no_standard_pages_found','allowGenerate':!![],'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x207eda+_0x5e3345(0xd9),'nextAction':_0x5e3345(0x14c)};if(_0x5bffc7>0x1)return{'status':_0x5e3345(0x113),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x5e3345(0xf6)+_0x207eda+'\x22\x20has\x20multiple\x20complete\x20Smart\x20List\x20Page\x20sets.','nextAction':_0x5e3345(0xe3)};if(_0x2fe84d>0x0)return{'status':_0x5e3345(0xfe),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x5e3345(0xf6)+_0x207eda+_0x5e3345(0x12b),'nextAction':_0x5e3345(0xe3)};if(_0x5bffc7===0x1&&_0x59badc>0x0)return{'status':_0x5e3345(0x13e),'allowGenerate':![],'manualResolutionRequired':!![],'message':'Dataset\x20\x22'+_0x207eda+'\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','nextAction':_0x5e3345(0xe3)};if(_0x5bffc7===0x1)return{'status':_0x313ba0,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x313ba0===_0x5e3345(0x100)?'Dataset\x20\x22'+_0x207eda+'\x22\x20now\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.':_0x5e3345(0xf6)+_0x207eda+_0x5e3345(0xdb),'nextAction':_0x313ba0===_0x5e3345(0x100)?undefined:_0x5e3345(0x137)};return{'status':_0x5e3345(0x12d),'allowGenerate':![],'manualResolutionRequired':![],'message':_0x5e3345(0xf6)+_0x207eda+_0x5e3345(0xe1),'nextAction':'query_operation_status'};}export function assessGenerateOperationState(_0x13fe47,_0x5bb054,_0x17fbff){const _0xed3f8b=a103_0xd273,_0x3c0df1=String(_0x5bb054||'')[_0xed3f8b(0x108)]()[_0xed3f8b(0x10e)]();if(_0x3c0df1===_0xed3f8b(0xf0))return{'status':_0xed3f8b(0xda),'manualResolutionRequired':![],'message':'Smart\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22'+_0x13fe47+'\x22.','nextAction':_0xed3f8b(0xfa)};if(_0x3c0df1==='RUNNING'||_0x3c0df1==='RETRYING'||_0x3c0df1===_0xed3f8b(0x134))return{'status':'operation_running','manualResolutionRequired':![],'message':_0xed3f8b(0x117)+_0x13fe47+'\x22.','nextAction':_0xed3f8b(0xfa)};if(_0x3c0df1===_0xed3f8b(0xdd)||_0x3c0df1==='PARTIAL_SUCCESS'){if(!_0x17fbff)return{'status':'unknown_reconcile_failed','manualResolutionRequired':![],'message':'Operation\x20finished\x20for\x20dataset\x20\x22'+_0x13fe47+_0xed3f8b(0x138),'nextAction':'query_operation_status'};const _0x2fde8a=assessStandardPageState(_0x13fe47,_0x17fbff,{'successStatus':_0xed3f8b(0x100)});if(_0x2fde8a[_0xed3f8b(0x120)]===_0xed3f8b(0x12c))return{'status':_0xed3f8b(0x12d),'manualResolutionRequired':![],'message':_0xed3f8b(0x11b)+_0x13fe47+_0xed3f8b(0xf7),'nextAction':'query_operation_status'};return _0x2fde8a;}if(_0x3c0df1===_0xed3f8b(0x121)||_0x3c0df1==='CANCELLED'||_0x3c0df1==='')return{'status':'operation_failed','manualResolutionRequired':![],'message':_0xed3f8b(0x119)+_0x13fe47+'\x22.','nextAction':_0xed3f8b(0xfa)};return{'status':'unknown_reconcile_failed','manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x13fe47+_0xed3f8b(0x13a)+_0x3c0df1+'\x22.','nextAction':_0xed3f8b(0xfa)};}export function normalizePageDetail(_0x45e465){const _0x3ce1ff=a103_0xd273;return{'pageId':Number(_0x45e465[_0x3ce1ff(0x10b)]),'appCode':_0x45e465[_0x3ce1ff(0x11d)],'name':_0x45e465[_0x3ce1ff(0x11f)]||_0x3ce1ff(0x123)+_0x45e465['pageId'],'code':_0x45e465[_0x3ce1ff(0x135)]||'','type':_0x45e465[_0x3ce1ff(0x14f)]?String(_0x45e465[_0x3ce1ff(0x14f)]):'UNKNOWN','datasetIds':Array[_0x3ce1ff(0x12e)](_0x45e465[_0x3ce1ff(0x114)])?_0x45e465['datasetIds']['map'](_0x5bf076=>Number(_0x5bf076))[_0x3ce1ff(0x10c)](_0x28e050=>Number[_0x3ce1ff(0x141)](_0x28e050)):[],'pageVersion':_0x45e465[_0x3ce1ff(0xd6)]&&typeof _0x45e465[_0x3ce1ff(0xd6)][_0x3ce1ff(0xeb)]===_0x3ce1ff(0xe8)?_0x45e465[_0x3ce1ff(0xd6)][_0x3ce1ff(0xeb)]:null,'versionTag':_0x45e465[_0x3ce1ff(0xd6)]&&typeof _0x45e465['config'][_0x3ce1ff(0xea)]===_0x3ce1ff(0xee)&&_0x45e465[_0x3ce1ff(0xd6)][_0x3ce1ff(0xea)][_0x3ce1ff(0x108)]()!==''?_0x45e465[_0x3ce1ff(0xd6)][_0x3ce1ff(0xea)]:null,'relatedPages':normalizeRelatedPages(_0x45e465[_0x3ce1ff(0x103)]),'raw':_0x45e465};}export function serializeDryRunDescription(_0x21a2d0){const _0x593d5c=a103_0xd273;return JSON[_0x593d5c(0x13c)](_0x21a2d0,null,0x2);}export async function loadStandardPageStatusForGenerate(_0xc21cc5,_0xce2ca5){const _0x48eeac=a103_0xd273,_0x170707=await tryGetStandardPageStatus(_0xc21cc5[_0x48eeac(0x11d)],_0xce2ca5);if(!_0x170707)return null;return normalizeStandardPageStatus(_0x170707,_0xce2ca5);}export function selectVersionTagGroup(_0x108d80,_0x14859b,_0x2f26b0){const _0x4ed5de=a103_0xd273,_0x5d3756=new Map();for(const _0x19255e of _0x108d80){const _0x250911=normalizeVersionTag(_0x14859b(_0x19255e)),_0x2284dd=_0x5d3756[_0x4ed5de(0x150)](_0x250911)??[];_0x2284dd[_0x4ed5de(0x139)](_0x19255e),_0x5d3756[_0x4ed5de(0x13f)](_0x250911,_0x2284dd);}const _0x37ea20=Array[_0x4ed5de(0x107)](_0x5d3756[_0x4ed5de(0x124)]());if(_0x37ea20[_0x4ed5de(0xfc)]<=0x1&&!_0x2f26b0)return{'items':_0x108d80,'availableTags':_0x37ea20};if(_0x2f26b0){const _0x4a5a4d=normalizeVersionTag(_0x2f26b0),_0x3e439a=_0x5d3756['get'](_0x4a5a4d);if(!_0x3e439a)throw CliErrors['validation'](_0x4ed5de(0xef)+_0x2f26b0+'\x22\x20not\x20found.',buildVersionTagHint(_0x37ea20));return{'items':_0x3e439a,'availableTags':_0x37ea20};}throw CliErrors[_0x4ed5de(0xd7)](_0x4ed5de(0xd0),buildVersionTagHint(_0x37ea20));}function normalizeDatasetDetail(_0x23051f,_0x3b4ce9){const _0x5f2ce2=a103_0xd273,_0x445d8f=Array[_0x5f2ce2(0x12e)](_0x23051f['fields'])?_0x23051f[_0x5f2ce2(0xd2)]:Array[_0x5f2ce2(0x12e)](_0x23051f[_0x5f2ce2(0x116)])?_0x23051f[_0x5f2ce2(0x116)]:[];return{'id':Number(_0x23051f['id']??_0x23051f[_0x5f2ce2(0xde)]??0x0),'code':String(_0x23051f[_0x5f2ce2(0x135)]||_0x23051f[_0x5f2ce2(0x136)]||_0x3b4ce9),'name':String(_0x23051f[_0x5f2ce2(0x11f)]||_0x3b4ce9),'appCode':_0x23051f[_0x5f2ce2(0x11d)]||_0x23051f[_0x5f2ce2(0x132)]?.[_0x5f2ce2(0x11d)],'fieldCount':_0x445d8f[_0x5f2ce2(0xfc)],'relatedPages':normalizeRelatedPages(_0x23051f[_0x5f2ce2(0x103)]),'raw':_0x23051f};}function normalizeStandardPageStatus(_0x2072db,_0x45b2c0){const _0x55f184=a103_0xd273,_0x41f6fd=_0x2a38a0=>({'pageId':Number(_0x2a38a0['pageId']??_0x2a38a0['id']??0x0),'title':String(_0x2a38a0['title']||_0x2a38a0[_0x55f184(0x11f)]||_0x55f184(0x123)+(_0x2a38a0['pageId']??_0x2a38a0['id']??_0x55f184(0xff))),'type':_0x2a38a0[_0x55f184(0x14f)]?String(_0x2a38a0[_0x55f184(0x14f)]):_0x55f184(0x12a),'deleted':_0x2a38a0[_0x55f184(0xe4)]===!![],'hasMenu':_0x2a38a0[_0x55f184(0xd1)]===!![],'menuVisible':typeof _0x2a38a0['menuVisible']===_0x55f184(0xfd)?_0x2a38a0[_0x55f184(0x111)]:null,'menuPath':typeof _0x2a38a0[_0x55f184(0xd3)]===_0x55f184(0xee)&&_0x2a38a0[_0x55f184(0xd3)][_0x55f184(0x108)]()!==''?_0x2a38a0[_0x55f184(0xd3)]:null}),_0x482547=Array['isArray'](_0x2072db[_0x55f184(0xd4)])?_0x2072db['pageSets'][_0x55f184(0x149)](_0x2c7e79=>({'versionTag':typeof _0x2c7e79[_0x55f184(0xea)]===_0x55f184(0xee)&&_0x2c7e79[_0x55f184(0xea)][_0x55f184(0x108)]()!==''?_0x2c7e79[_0x55f184(0xea)]:null,'complete':_0x2c7e79['complete']===!![],'pages':Array[_0x55f184(0x12e)](_0x2c7e79[_0x55f184(0x146)])?_0x2c7e79[_0x55f184(0x146)][_0x55f184(0x149)](_0x41f6fd):[]})):[];return{'datasetId':typeof _0x2072db['datasetId']===_0x55f184(0xe8)&&Number[_0x55f184(0x141)](_0x2072db[_0x55f184(0x13b)])?_0x2072db[_0x55f184(0x13b)]:null,'datasetCode':typeof _0x2072db[_0x55f184(0x118)]===_0x55f184(0xee)&&_0x2072db[_0x55f184(0x118)][_0x55f184(0x108)]()!==''?_0x2072db[_0x55f184(0x118)]:_0x45b2c0,'pageSets':_0x482547,'totalSets':typeof _0x2072db[_0x55f184(0x14a)]==='number'&&Number[_0x55f184(0x141)](_0x2072db[_0x55f184(0x14a)])?_0x2072db['totalSets']:_0x482547['length'],'completeSets':typeof _0x2072db[_0x55f184(0x11c)]==='number'&&Number[_0x55f184(0x141)](_0x2072db['completeSets'])?_0x2072db[_0x55f184(0x11c)]:_0x482547[_0x55f184(0x10c)](_0x5d1bb9=>_0x5d1bb9[_0x55f184(0xdf)])['length'],'incompleteSets':typeof _0x2072db[_0x55f184(0x127)]===_0x55f184(0xe8)&&Number['isFinite'](_0x2072db[_0x55f184(0x127)])?_0x2072db[_0x55f184(0x127)]:_0x482547['filter'](_0x5e7bd5=>!_0x5e7bd5[_0x55f184(0xdf)]&&_0x5e7bd5[_0x55f184(0x146)][_0x55f184(0xfc)]>0x0)[_0x55f184(0xfc)],'residualPages':Array[_0x55f184(0x12e)](_0x2072db[_0x55f184(0x131)])?_0x2072db[_0x55f184(0x131)][_0x55f184(0x149)](_0x41f6fd):[],'menuPages':Array[_0x55f184(0x12e)](_0x2072db[_0x55f184(0x133)])?_0x2072db[_0x55f184(0x133)][_0x55f184(0x149)](_0x41f6fd):[],'source':_0x55f184(0x130)};}function a103_0xd273(_0x55aa28,_0x4d8a27){_0x55aa28=_0x55aa28-0xd0;const _0x21ad70=a103_0x21ad();let _0xd273e=_0x21ad70[_0x55aa28];return _0xd273e;}function normalizeRelatedPages(_0x13ccac){const _0x4d880c=a103_0xd273;if(!Array['isArray'](_0x13ccac))return[];return _0x13ccac['filter'](_0x451f9e=>_0x451f9e&&typeof _0x451f9e===_0x4d880c(0xd8))[_0x4d880c(0x149)](_0x3d7ee0=>({'id':Number(_0x3d7ee0['id']),'type':_0x3d7ee0[_0x4d880c(0x14f)]?String(_0x3d7ee0[_0x4d880c(0x14f)]):_0x4d880c(0x12a),'code':_0x3d7ee0['code']||undefined,'title':_0x3d7ee0[_0x4d880c(0xf9)]||_0x3d7ee0['name']||_0x4d880c(0x123)+_0x3d7ee0['id'],'deleted':_0x3d7ee0['deleted']===!![]}))['filter'](_0x5751c6=>Number['isFinite'](_0x5751c6['id']));}function ensureAppOwnership(_0x1c25b3,_0x1117a6,_0x406f84){const _0x38cd4d=a103_0xd273;if(!_0x1117a6)return;if(_0x1117a6!==_0x1c25b3)throw CliErrors[_0x38cd4d(0xd7)](_0x406f84,'Switch\x20app\x20with\x20`'+CLI_BIN_NAME+'\x20app\x20use\x20<name>`\x20or\x20pass\x20--appcode.');}function normalizeVersionTag(_0x490d36){const _0x3d50b7=a103_0xd273;return _0x490d36&&_0x490d36[_0x3d50b7(0x108)]()!==''?_0x490d36:_0x3d50b7(0x102);}function buildVersionTagHint(_0x58da87){const _0x43dd12=a103_0xd273,_0x43e96a=_0x58da87['map'](_0x4d70bb=>_0x4d70bb==='__EMPTY__'?_0x43dd12(0x142):_0x4d70bb)[_0x43dd12(0x110)](',\x20');return _0x43dd12(0x152)+_0x43e96a;}
|
|
1
|
+
(function(_0x56a104,_0x31bce1){const _0x313845=a104_0x23e3,_0x4caece=_0x56a104();while(!![]){try{const _0x4fd5ae=parseInt(_0x313845(0x144))/0x1+-parseInt(_0x313845(0xdf))/0x2*(parseInt(_0x313845(0x156))/0x3)+parseInt(_0x313845(0x162))/0x4*(-parseInt(_0x313845(0x15a))/0x5)+parseInt(_0x313845(0x122))/0x6+parseInt(_0x313845(0x11c))/0x7+-parseInt(_0x313845(0x132))/0x8+parseInt(_0x313845(0x115))/0x9*(parseInt(_0x313845(0x10f))/0xa);if(_0x4fd5ae===_0x31bce1)break;else _0x4caece['push'](_0x4caece['shift']());}catch(_0x3fccf5){_0x4caece['push'](_0x4caece['shift']());}}}(a104_0x243e,0xdd49b));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(_0x3d45af){const _0x74063=a104_0x23e3,_0x18c8f2=_0x3d45af[_0x74063(0x143)]('id');if(typeof _0x18c8f2===_0x74063(0xe9)&&Number[_0x74063(0x15b)](_0x18c8f2)&&_0x18c8f2>0x0)return _0x18c8f2;return undefined;}export function validateDatasetSelector(_0x5911f9){const _0x16e9ed=a104_0x23e3,_0x51ecf9=Boolean(_0x5911f9[_0x16e9ed(0x10e)](_0x16e9ed(0x11b))),_0x13fcc9=Boolean(_0x5911f9[_0x16e9ed(0x10e)]('alias'));if(_0x51ecf9&&_0x13fcc9)throw CliErrors[_0x16e9ed(0xf2)](_0x16e9ed(0x120));if(!_0x51ecf9&&!_0x13fcc9)throw CliErrors[_0x16e9ed(0xf2)](_0x16e9ed(0x154));}export function validateGenerateOperationSelector(_0x51b740){const _0x4904b9=a104_0x23e3,_0x12c8b5=Boolean(_0x51b740[_0x4904b9(0x10e)](_0x4904b9(0x13f))),_0xdd2c62=Boolean(_0x51b740['str']('client-operation-id'));if(_0x12c8b5&&_0xdd2c62)throw CliErrors[_0x4904b9(0xf2)]('Use\x20either\x20--operation-id\x20or\x20--client-operation-id,\x20not\x20both.');if(!_0x12c8b5&&!_0xdd2c62)throw CliErrors[_0x4904b9(0xf2)](_0x4904b9(0xed));}export function validatePageTargetSelector(_0x385ff7){const _0x296c13=a104_0x23e3,_0x1b5ba5=getPageIdFlag(_0x385ff7)!==undefined,_0xfd8184=Boolean(_0x385ff7['str']('datasetcode')||_0x385ff7['str'](_0x296c13(0x117)));if(_0x1b5ba5&&_0xfd8184)throw CliErrors[_0x296c13(0xf2)](_0x296c13(0x105));if(!_0x1b5ba5&&!_0xfd8184)throw CliErrors[_0x296c13(0xf2)](_0x296c13(0xf6));if(_0x385ff7['str'](_0x296c13(0xeb))&&!_0xfd8184)throw CliErrors[_0x296c13(0xf2)](_0x296c13(0x12a));}export function resolveDatasetCode(_0x1d0cce){const _0x270f9f=a104_0x23e3;validateDatasetSelector(_0x1d0cce);const _0x90b371=_0x1d0cce[_0x270f9f(0x10e)](_0x270f9f(0x11b));if(_0x90b371)return _0x90b371;const _0x5cd888=_0x1d0cce['str']('alias'),_0x279517=resolveApiFilePath(_0x1d0cce[_0x270f9f(0x102)],_0x1d0cce[_0x270f9f(0x157)]),_0x4c3726=resolveAlias(_0x1d0cce[_0x270f9f(0x102)],_0x5cd888,undefined,_0x279517);if(_0x4c3726)return _0x4c3726;const _0x1c4c6b=loadAliasMap(_0x1d0cce[_0x270f9f(0x102)],undefined,_0x279517),_0x38d4f0=_0x1c4c6b[_0x270f9f(0x138)]>0x0?_0x270f9f(0x12f)+_0x1c4c6b['map'](_0x229cf8=>_0x229cf8[_0x270f9f(0x117)])[_0x270f9f(0xfc)](',\x20'):_0x270f9f(0x148)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.';throw CliErrors['validation']('Alias\x20\x22'+_0x5cd888+_0x270f9f(0x13c)+_0x38d4f0);}export async function loadDatasetDetailForPage(_0x138f93){const _0x1a1c55=a104_0x23e3,_0x565195=resolveDatasetCode(_0x138f93),_0x515be5=await getDatasetDetail(_0x565195),_0x15f10c=normalizeDatasetDetail(_0x515be5,_0x565195);return ensureAppOwnership(_0x138f93[_0x1a1c55(0x157)],_0x15f10c['appCode'],_0x1a1c55(0xec)+_0x15f10c['code']+'\x22\x20belongs\x20to\x20app\x20\x22'+_0x15f10c['appCode']+'\x22,\x20not\x20current\x20app\x20\x22'+_0x138f93[_0x1a1c55(0x157)]+'\x22.'),_0x15f10c;}export async function loadPageDetailForPage(_0x17c427,_0xeb45e){const _0x5635a3=a104_0x23e3,_0x4a9e61=await getPageDetail(_0xeb45e),_0x453664=normalizePageDetail(_0x4a9e61);return ensureAppOwnership(_0x17c427[_0x5635a3(0x157)],_0x453664[_0x5635a3(0x157)],_0x5635a3(0xef)+_0xeb45e+_0x5635a3(0xfb)+_0x453664['appCode']+_0x5635a3(0xe8)+_0x17c427[_0x5635a3(0x157)]+'\x22.'),_0x453664;}export function getUndeletedRelatedPages(_0x223ae0){const _0x2e9ce1=a104_0x23e3;return _0x223ae0[_0x2e9ce1(0x11e)][_0x2e9ce1(0x141)](_0x36ab14=>!_0x36ab14['deleted']);}export function buildPageGenerateOperationStatusQueryCommand(_0x203290,_0x1e14e1){const _0x3fa82b=a104_0x23e3,_0x3427c4=_0x1e14e1?.[_0x3fa82b(0x157)]&&_0x1e14e1[_0x3fa82b(0x157)]['trim']()!==''?_0x3fa82b(0xe7)+_0x1e14e1[_0x3fa82b(0x157)]:'',_0x371ec8=_0x1e14e1?.['operationId']&&_0x1e14e1[_0x3fa82b(0x149)][_0x3fa82b(0x130)]()!==''?_0x3fa82b(0x110)+_0x1e14e1['operationId']:_0x1e14e1?.[_0x3fa82b(0x13d)]&&_0x1e14e1['clientOperationId'][_0x3fa82b(0x130)]()!==''?_0x3fa82b(0x135)+_0x1e14e1[_0x3fa82b(0x13d)]:'';return CLI_BIN_NAME+_0x3fa82b(0x15d)+_0x203290+_0x3427c4+_0x371ec8+_0x3fa82b(0x100);}export function createPageGenerateClientOperationId(){const _0xe11cfb=a104_0x23e3;return _0xe11cfb(0x10c)+randomUUID();}export function buildStandardPageStatusQueryCommand(_0x2a245a,_0x4fb37f){const _0x5779e4=a104_0x23e3,_0x4249d5=_0x4fb37f&&_0x4fb37f['trim']()!==''?_0x5779e4(0xe7)+_0x4fb37f:'';return CLI_BIN_NAME+_0x5779e4(0x163)+_0x2a245a+_0x4249d5+_0x5779e4(0x100);}export function prepareDatasetAction(_0x446834,_0x1a46da){const _0x10a029=a104_0x23e3,_0x27fa1d=getUndeletedRelatedPages(_0x446834);if(_0x1a46da===_0x10a029(0x11f)&&_0x27fa1d[_0x10a029(0x138)]>0x0)throw CliErrors['validation'](_0x10a029(0xec)+_0x446834['code']+_0x10a029(0xe6),_0x10a029(0x148)+CLI_BIN_NAME+'\x20page\x20sync\x20--datasetcode\x20'+_0x446834[_0x10a029(0x12e)]+_0x10a029(0x153));if(_0x1a46da==='sync'&&_0x27fa1d[_0x10a029(0x138)]===0x0)throw CliErrors[_0x10a029(0xf2)]('Dataset\x20\x22'+_0x446834['code']+_0x10a029(0x14e),'Run\x20`'+CLI_BIN_NAME+_0x10a029(0xf8)+_0x446834[_0x10a029(0x12e)]+_0x10a029(0x114)+CLI_BIN_NAME+_0x10a029(0x15d)+_0x446834['code']+'\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.');return{'dataset':_0x446834,'undeletedPages':_0x27fa1d};}function a104_0x23e3(_0x4f8e34,_0x410a3d){_0x4f8e34=_0x4f8e34-0xdd;const _0x243e80=a104_0x243e();let _0x23e3c2=_0x243e80[_0x4f8e34];return _0x23e3c2;}export function prepareGenerateDatasetAction(_0x3dc398,_0x185eb3){const _0x54daae=a104_0x23e3,_0x38b7fa=getUndeletedRelatedPages(_0x3dc398);if(!_0x185eb3){if(_0x38b7fa[_0x54daae(0x138)]>0x0)throw CliErrors['validation'](_0x54daae(0xec)+_0x3dc398['code']+_0x54daae(0xe6),_0x54daae(0x148)+CLI_BIN_NAME+_0x54daae(0x146)+_0x3dc398[_0x54daae(0x12e)]+_0x54daae(0x153));return{'dataset':_0x3dc398,'undeletedPages':_0x38b7fa,'standardPageStatus':null};}const _0x4c899b=_0x185eb3[_0x54daae(0x160)],_0x3b390d=_0x185eb3[_0x54daae(0xfa)],_0x16f225=_0x185eb3[_0x54daae(0x14d)][_0x54daae(0x138)];if(_0x4c899b===0x0&&_0x3b390d===0x0&&_0x16f225===0x0)return{'dataset':_0x3dc398,'undeletedPages':_0x38b7fa,'standardPageStatus':_0x185eb3};if(_0x4c899b===0x1&&_0x3b390d===0x0&&_0x16f225===0x0)throw CliErrors[_0x54daae(0xf2)](_0x54daae(0xec)+_0x3dc398[_0x54daae(0x12e)]+'\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.',_0x54daae(0x148)+CLI_BIN_NAME+_0x54daae(0x146)+_0x3dc398[_0x54daae(0x12e)]+_0x54daae(0x153));throw CliErrors[_0x54daae(0xf2)](_0x54daae(0xec)+_0x3dc398[_0x54daae(0x12e)]+_0x54daae(0xf5),_0x54daae(0xfd));}export function assessStandardPageState(_0x4d2211,_0x52b7f8,_0x205967){const _0x20c066=a104_0x23e3,_0x34b6be=_0x205967?.[_0x20c066(0x142)]??_0x20c066(0x118),_0x2f1078=_0x205967?.[_0x20c066(0x119)]??[];if(!_0x52b7f8){if(_0x2f1078[_0x20c066(0x138)]>0x0)return{'status':_0x20c066(0xe2),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x20c066(0xec)+_0x4d2211+'\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','nextAction':_0x20c066(0x12c)};return{'status':_0x20c066(0x145),'allowGenerate':!![],'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x4d2211+_0x20c066(0xe1),'nextAction':_0x20c066(0x116)};}const _0x18b294=_0x52b7f8['completeSets'],_0x40bac1=_0x52b7f8[_0x20c066(0xfa)],_0x44f2f6=_0x52b7f8[_0x20c066(0x14d)][_0x20c066(0x138)];if(_0x18b294===0x0&&_0x40bac1===0x0&&_0x44f2f6===0x0)return{'status':_0x20c066(0x145),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x20c066(0xec)+_0x4d2211+_0x20c066(0xe1),'nextAction':_0x20c066(0x116)};if(_0x18b294>0x1)return{'status':_0x20c066(0xea),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x20c066(0xec)+_0x4d2211+'\x22\x20has\x20multiple\x20complete\x20Smart\x20List\x20Page\x20sets.','nextAction':'manual_resolution_required'};if(_0x40bac1>0x0)return{'status':_0x20c066(0xe2),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x20c066(0xec)+_0x4d2211+'\x22\x20has\x20incomplete\x20Smart\x20List\x20Page\x20sets.','nextAction':'manual_resolution_required'};if(_0x18b294===0x1&&_0x44f2f6>0x0)return{'status':_0x20c066(0x13b),'allowGenerate':![],'manualResolutionRequired':!![],'message':'Dataset\x20\x22'+_0x4d2211+_0x20c066(0xf9),'nextAction':_0x20c066(0x12c)};if(_0x18b294===0x1)return{'status':_0x34b6be,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x34b6be===_0x20c066(0x108)?_0x20c066(0xec)+_0x4d2211+'\x22\x20now\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.':'Dataset\x20\x22'+_0x4d2211+_0x20c066(0x15e),'nextAction':_0x34b6be===_0x20c066(0x108)?undefined:_0x20c066(0x11d)};return{'status':_0x20c066(0x104),'allowGenerate':![],'manualResolutionRequired':![],'message':_0x20c066(0xec)+_0x4d2211+_0x20c066(0x147),'nextAction':_0x20c066(0x125)};}export function assessGenerateOperationState(_0x4cd592,_0x58a237,_0x1269ae){const _0x3176b8=a104_0x23e3,_0x10e3f2=String(_0x58a237||'')['trim']()['toUpperCase']();if(_0x10e3f2==='PENDING')return{'status':_0x3176b8(0x134),'manualResolutionRequired':![],'message':_0x3176b8(0x15f)+_0x4cd592+'\x22.','nextAction':_0x3176b8(0x125)};if(_0x10e3f2===_0x3176b8(0x14c)||_0x10e3f2===_0x3176b8(0x150)||_0x10e3f2==='CANCELING')return{'status':_0x3176b8(0xf1),'manualResolutionRequired':![],'message':_0x3176b8(0x101)+_0x4cd592+'\x22.','nextAction':'query_operation_status'};if(_0x10e3f2===_0x3176b8(0x10b)||_0x10e3f2===_0x3176b8(0x13e)){if(!_0x1269ae)return{'status':'unknown_reconcile_failed','manualResolutionRequired':![],'message':_0x3176b8(0xff)+_0x4cd592+'\x22,\x20but\x20Smart\x20List\x20Page\x20facts\x20are\x20unavailable.','nextAction':_0x3176b8(0x125)};const _0x34a555=assessStandardPageState(_0x4cd592,_0x1269ae,{'successStatus':_0x3176b8(0x108)});if(_0x34a555['status']===_0x3176b8(0x145))return{'status':_0x3176b8(0x104),'manualResolutionRequired':![],'message':'Operation\x20finished\x20for\x20dataset\x20\x22'+_0x4cd592+_0x3176b8(0x126),'nextAction':_0x3176b8(0x125)};return _0x34a555;}if(_0x10e3f2===_0x3176b8(0x112)||_0x10e3f2===_0x3176b8(0x111)||_0x10e3f2==='')return{'status':_0x3176b8(0x10d),'manualResolutionRequired':![],'message':_0x3176b8(0x121)+_0x4cd592+'\x22.','nextAction':_0x3176b8(0x125)};return{'status':_0x3176b8(0x104),'manualResolutionRequired':![],'message':_0x3176b8(0xec)+_0x4cd592+'\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22'+_0x10e3f2+'\x22.','nextAction':_0x3176b8(0x125)};}function a104_0x243e(){const _0xfa7f44=['\x22,\x20but\x20no\x20Smart\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.','datasetCode','properties','--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.','menuVisible','manual_resolution_required','__EMPTY__','code','Available\x20aliases:\x20','trim','string','13716912ZekHyL','dataset','operation_pending','\x20--client-operation-id\x20','stringify','fields','length','push','get','blocked_complete_plus_residual_sets','\x22\x20not\x20found.\x20','clientOperationId','PARTIAL_SUCCESS','operation-id','versionTag','filter','successStatus','flag','1070242JcGiEN','no_standard_pages_found','\x20page\x20sync\x20--datasetcode\x20','\x22\x20returned\x20an\x20unsupported\x20Smart\x20List\x20Page\x20state.','Run\x20`','operationId','title','set','RUNNING','residualPages','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','name','RETRYING','object','UNKNOWN','`\x20instead.','One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.','type','6ZgCkCA','appCode','\x22\x20not\x20found.','unknown','5600215yuXVXJ','isFinite','datasetId','\x20page\x20generate-status\x20--datasetcode\x20','\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','Smart\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22','completeSets','config','4BARJaX','\x20page\x20standard-page-status\x20--datasetcode\x20','hasMenu','relatedPageInfoList','100498qEOKac','menuPages','\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','blocked_incomplete_sets','keys','modelId','complete','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','\x20--appcode\x20','\x22,\x20not\x20current\x20app\x20\x22','number','blocked_multiple_complete_sets','version-tag','Dataset\x20\x22','One\x20of\x20--operation-id\x20or\x20--client-operation-id\x20is\x20required.','deleted','Page\x20\x22','map','operation_running','validation','pageId','page-','\x22\x20has\x20multiple\x20or\x20incomplete\x20Smart\x20List\x20Page\x20sets.','One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.','\x20app\x20use\x20<name>`\x20or\x20pass\x20--appcode.','\x20page\x20generate-start\x20--datasetcode\x20','\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','incompleteSets','\x22\x20belongs\x20to\x20app\x20\x22','join','Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.','pageSets','Operation\x20finished\x20for\x20dataset\x20\x22','\x20--format\x20json','Smart\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22','apiDir','pages','unknown_reconcile_failed','Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.','menuPath','pageVersion','generated_complete_set','datasetIds','Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20','SUCCESS','page-generate-','operation_failed','str','211490UFuuBU','\x20--operation-id\x20','CANCELLED','FAILED','<empty>','`\x20first,\x20then\x20poll\x20`','693MWfmly','run_generate_start','alias','already_exists_complete_set','fallbackUndeletedPages','totalSets','datasetcode','3635436HOrddM','run_sync','relatedPages','generate','Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.','Smart\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22','3740922rlEEbo','isArray','standard-page-status','query_operation_status'];a104_0x243e=function(){return _0xfa7f44;};return a104_0x243e();}export function normalizePageDetail(_0x5f1838){const _0x2079be=a104_0x23e3;return{'pageId':Number(_0x5f1838[_0x2079be(0xf3)]),'appCode':_0x5f1838[_0x2079be(0x157)],'name':_0x5f1838['name']||_0x2079be(0xf4)+_0x5f1838[_0x2079be(0xf3)],'code':_0x5f1838[_0x2079be(0x12e)]||'','type':_0x5f1838[_0x2079be(0x155)]?String(_0x5f1838[_0x2079be(0x155)]):_0x2079be(0x152),'datasetIds':Array[_0x2079be(0x123)](_0x5f1838['datasetIds'])?_0x5f1838[_0x2079be(0x109)]['map'](_0x3bdf7c=>Number(_0x3bdf7c))[_0x2079be(0x141)](_0x59bedc=>Number[_0x2079be(0x15b)](_0x59bedc)):[],'pageVersion':_0x5f1838[_0x2079be(0x161)]&&typeof _0x5f1838[_0x2079be(0x161)][_0x2079be(0x107)]===_0x2079be(0xe9)?_0x5f1838[_0x2079be(0x161)][_0x2079be(0x107)]:null,'versionTag':_0x5f1838[_0x2079be(0x161)]&&typeof _0x5f1838['config']['versionTag']===_0x2079be(0x131)&&_0x5f1838[_0x2079be(0x161)]['versionTag'][_0x2079be(0x130)]()!==''?_0x5f1838[_0x2079be(0x161)][_0x2079be(0x140)]:null,'relatedPages':normalizeRelatedPages(_0x5f1838[_0x2079be(0xde)]),'raw':_0x5f1838};}export function serializeDryRunDescription(_0xe472f4){const _0xf666ae=a104_0x23e3;return JSON[_0xf666ae(0x136)](_0xe472f4,null,0x2);}export async function loadStandardPageStatusForGenerate(_0x15de22,_0x49c675){const _0x309c60=a104_0x23e3,_0x2b2b79=await tryGetStandardPageStatus(_0x15de22[_0x309c60(0x157)],_0x49c675);if(!_0x2b2b79)return null;return normalizeStandardPageStatus(_0x2b2b79,_0x49c675);}export function selectVersionTagGroup(_0x467350,_0x83b550,_0x3b6f62){const _0xc57752=a104_0x23e3,_0x141647=new Map();for(const _0x1e8f77 of _0x467350){const _0x2c9d9c=normalizeVersionTag(_0x83b550(_0x1e8f77)),_0x1f39f5=_0x141647[_0xc57752(0x13a)](_0x2c9d9c)??[];_0x1f39f5[_0xc57752(0x139)](_0x1e8f77),_0x141647[_0xc57752(0x14b)](_0x2c9d9c,_0x1f39f5);}const _0x4f6ea3=Array['from'](_0x141647[_0xc57752(0xe3)]());if(_0x4f6ea3[_0xc57752(0x138)]<=0x1&&!_0x3b6f62)return{'items':_0x467350,'availableTags':_0x4f6ea3};if(_0x3b6f62){const _0x5b8b46=normalizeVersionTag(_0x3b6f62),_0x5a8b2b=_0x141647['get'](_0x5b8b46);if(!_0x5a8b2b)throw CliErrors[_0xc57752(0xf2)]('Version\x20tag\x20\x22'+_0x3b6f62+_0xc57752(0x158),buildVersionTagHint(_0x4f6ea3));return{'items':_0x5a8b2b,'availableTags':_0x4f6ea3};}throw CliErrors['validation'](_0xc57752(0x127),buildVersionTagHint(_0x4f6ea3));}function normalizeDatasetDetail(_0x1bc8e9,_0x516f8e){const _0x124002=a104_0x23e3,_0x5872f6=Array[_0x124002(0x123)](_0x1bc8e9[_0x124002(0x137)])?_0x1bc8e9[_0x124002(0x137)]:Array['isArray'](_0x1bc8e9[_0x124002(0x129)])?_0x1bc8e9['properties']:[];return{'id':Number(_0x1bc8e9['id']??_0x1bc8e9[_0x124002(0xe4)]??0x0),'code':String(_0x1bc8e9[_0x124002(0x12e)]||_0x1bc8e9['modelCode']||_0x516f8e),'name':String(_0x1bc8e9[_0x124002(0x14f)]||_0x516f8e),'appCode':_0x1bc8e9[_0x124002(0x157)]||_0x1bc8e9[_0x124002(0x133)]?.[_0x124002(0x157)],'fieldCount':_0x5872f6[_0x124002(0x138)],'relatedPages':normalizeRelatedPages(_0x1bc8e9[_0x124002(0xde)]),'raw':_0x1bc8e9};}function normalizeStandardPageStatus(_0x4ef68e,_0x3376ad){const _0xeb87fa=a104_0x23e3,_0x4bd962=_0x2ce1c4=>({'pageId':Number(_0x2ce1c4['pageId']??_0x2ce1c4['id']??0x0),'title':String(_0x2ce1c4[_0xeb87fa(0x14a)]||_0x2ce1c4[_0xeb87fa(0x14f)]||'page-'+(_0x2ce1c4[_0xeb87fa(0xf3)]??_0x2ce1c4['id']??_0xeb87fa(0x159))),'type':_0x2ce1c4[_0xeb87fa(0x155)]?String(_0x2ce1c4[_0xeb87fa(0x155)]):_0xeb87fa(0x152),'deleted':_0x2ce1c4['deleted']===!![],'hasMenu':_0x2ce1c4[_0xeb87fa(0xdd)]===!![],'menuVisible':typeof _0x2ce1c4[_0xeb87fa(0x12b)]==='boolean'?_0x2ce1c4[_0xeb87fa(0x12b)]:null,'menuPath':typeof _0x2ce1c4['menuPath']==='string'&&_0x2ce1c4[_0xeb87fa(0x106)][_0xeb87fa(0x130)]()!==''?_0x2ce1c4[_0xeb87fa(0x106)]:null}),_0x17115e=Array['isArray'](_0x4ef68e[_0xeb87fa(0xfe)])?_0x4ef68e[_0xeb87fa(0xfe)][_0xeb87fa(0xf0)](_0x40efa7=>({'versionTag':typeof _0x40efa7[_0xeb87fa(0x140)]===_0xeb87fa(0x131)&&_0x40efa7['versionTag'][_0xeb87fa(0x130)]()!==''?_0x40efa7['versionTag']:null,'complete':_0x40efa7['complete']===!![],'pages':Array[_0xeb87fa(0x123)](_0x40efa7[_0xeb87fa(0x103)])?_0x40efa7[_0xeb87fa(0x103)][_0xeb87fa(0xf0)](_0x4bd962):[]})):[];return{'datasetId':typeof _0x4ef68e[_0xeb87fa(0x15c)]===_0xeb87fa(0xe9)&&Number[_0xeb87fa(0x15b)](_0x4ef68e['datasetId'])?_0x4ef68e['datasetId']:null,'datasetCode':typeof _0x4ef68e[_0xeb87fa(0x128)]===_0xeb87fa(0x131)&&_0x4ef68e[_0xeb87fa(0x128)][_0xeb87fa(0x130)]()!==''?_0x4ef68e['datasetCode']:_0x3376ad,'pageSets':_0x17115e,'totalSets':typeof _0x4ef68e[_0xeb87fa(0x11a)]===_0xeb87fa(0xe9)&&Number['isFinite'](_0x4ef68e['totalSets'])?_0x4ef68e[_0xeb87fa(0x11a)]:_0x17115e[_0xeb87fa(0x138)],'completeSets':typeof _0x4ef68e[_0xeb87fa(0x160)]===_0xeb87fa(0xe9)&&Number[_0xeb87fa(0x15b)](_0x4ef68e[_0xeb87fa(0x160)])?_0x4ef68e[_0xeb87fa(0x160)]:_0x17115e[_0xeb87fa(0x141)](_0x182189=>_0x182189['complete'])['length'],'incompleteSets':typeof _0x4ef68e['incompleteSets']===_0xeb87fa(0xe9)&&Number[_0xeb87fa(0x15b)](_0x4ef68e[_0xeb87fa(0xfa)])?_0x4ef68e[_0xeb87fa(0xfa)]:_0x17115e[_0xeb87fa(0x141)](_0x1ea281=>!_0x1ea281[_0xeb87fa(0xe5)]&&_0x1ea281['pages'][_0xeb87fa(0x138)]>0x0)[_0xeb87fa(0x138)],'residualPages':Array[_0xeb87fa(0x123)](_0x4ef68e[_0xeb87fa(0x14d)])?_0x4ef68e['residualPages']['map'](_0x4bd962):[],'menuPages':Array[_0xeb87fa(0x123)](_0x4ef68e[_0xeb87fa(0xe0)])?_0x4ef68e[_0xeb87fa(0xe0)]['map'](_0x4bd962):[],'source':_0xeb87fa(0x124)};}function normalizeRelatedPages(_0x4f1f95){const _0x337235=a104_0x23e3;if(!Array[_0x337235(0x123)](_0x4f1f95))return[];return _0x4f1f95[_0x337235(0x141)](_0x3a743c=>_0x3a743c&&typeof _0x3a743c===_0x337235(0x151))[_0x337235(0xf0)](_0x376173=>({'id':Number(_0x376173['id']),'type':_0x376173[_0x337235(0x155)]?String(_0x376173[_0x337235(0x155)]):_0x337235(0x152),'code':_0x376173[_0x337235(0x12e)]||undefined,'title':_0x376173[_0x337235(0x14a)]||_0x376173[_0x337235(0x14f)]||_0x337235(0xf4)+_0x376173['id'],'deleted':_0x376173[_0x337235(0xee)]===!![]}))['filter'](_0x36a00f=>Number[_0x337235(0x15b)](_0x36a00f['id']));}function ensureAppOwnership(_0x923c3b,_0x1cf4ee,_0x57fce7){const _0x13ffba=a104_0x23e3;if(!_0x1cf4ee)return;if(_0x1cf4ee!==_0x923c3b)throw CliErrors[_0x13ffba(0xf2)](_0x57fce7,'Switch\x20app\x20with\x20`'+CLI_BIN_NAME+_0x13ffba(0xf7));}function normalizeVersionTag(_0x24e308){const _0x426777=a104_0x23e3;return _0x24e308&&_0x24e308[_0x426777(0x130)]()!==''?_0x24e308:_0x426777(0x12d);}function buildVersionTagHint(_0x5778a0){const _0x24c085=a104_0x23e3,_0x36b363=_0x5778a0[_0x24c085(0xf0)](_0x150931=>_0x150931===_0x24c085(0x12d)?_0x24c085(0x113):_0x150931)['join'](',\x20');return _0x24c085(0x10a)+_0x36b363;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a105_0x27907d=a105_0x174e;(function(_0x4ef040,_0x1e478a){const _0x49386b=a105_0x174e,_0x46caa2=_0x4ef040();while(!![]){try{const _0x1e34ab=parseInt(_0x49386b(0x127))/0x1+parseInt(_0x49386b(0x117))/0x2+-parseInt(_0x49386b(0x129))/0x3*(-parseInt(_0x49386b(0x123))/0x4)+-parseInt(_0x49386b(0x11d))/0x5*(parseInt(_0x49386b(0x126))/0x6)+parseInt(_0x49386b(0x12a))/0x7*(parseInt(_0x49386b(0x11c))/0x8)+parseInt(_0x49386b(0x11e))/0x9+-parseInt(_0x49386b(0x120))/0xa;if(_0x1e34ab===_0x1e478a)break;else _0x46caa2['push'](_0x46caa2['shift']());}catch(_0x5edfd8){_0x46caa2['push'](_0x46caa2['shift']());}}}(a105_0x4d9d,0xb1ff2));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageStandardPageStatus={'service':a105_0x27907d(0x125),'command':a105_0x27907d(0x11a),'description':'Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','risk':a105_0x27907d(0x130),'defaultOutputFormat':a105_0x27907d(0x128),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a105_0x27907d(0x12e),'type':'string','description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x3f1ad9){validateDatasetSelector(_0x3f1ad9);},async 'dryRun'(_0x17da55){const _0x353d75=a105_0x27907d,_0x3c86c5=await loadDatasetDetailForPage(_0x17da55);return{'method':_0x353d75(0x12d),'url':_0x353d75(0x121)+_0x3c86c5[_0x353d75(0x11b)]+_0x353d75(0x12c)+encodeURIComponent(_0x17da55[_0x353d75(0x124)]),'description':serializeDryRunDescription({'dataset':{'id':_0x3c86c5['id'],'code':_0x3c86c5['code'],'name':_0x3c86c5['name']},'action':'query-standard-page-status'})};},async 'execute'(_0x3898c9){const _0x5c725b=a105_0x27907d,_0x1065f3=await loadDatasetDetailForPage(_0x3898c9),_0x3a26ff=await loadStandardPageStatusForGenerate(_0x3898c9,_0x1065f3['code']),_0x531ecd=getUndeletedRelatedPages(_0x1065f3),_0x450aae=assessStandardPageState(_0x1065f3[_0x5c725b(0x11b)],_0x3a26ff,{'fallbackUndeletedPages':_0x531ecd});return{'ok':!![],'data':{'datasetCode':_0x1065f3[_0x5c725b(0x11b)],'precheckSource':_0x3a26ff?.[_0x5c725b(0x118)]??_0x5c725b(0x12b),'status':_0x450aae[_0x5c725b(0x11f)],'manualResolutionRequired':_0x450aae[_0x5c725b(0x122)],'nextAction':_0x450aae[_0x5c725b(0x119)],'standardPageStatus':_0x3a26ff,'relatedPages':{'total':_0x1065f3[_0x5c725b(0x12f)]['length'],'undeletedCount':_0x531ecd['length']}}};}};function a105_0x174e(_0x253b97,_0x363316){_0x253b97=_0x253b97-0x117;const _0x4d9d3d=a105_0x4d9d();let _0x174e62=_0x4d9d3d[_0x253b97];return _0x174e62;}function a105_0x4d9d(){const _0x327ab3=['status','14138080NYvJYr','/smartapi/lovrabet/dataset/','manualResolutionRequired','104GeWtMf','appCode','page','1032cXYCBw','1187855YJJzWx','compress','140646KTBedg','8666XHhJRA','related-pages-fallback','/standard-page-status?appCode=','GET','alias','relatedPages','read','1606322MFzBEC','source','nextAction','standard-page-status','code','96Aujiqr','39485RswYvi','2487258wgkBgs'];a105_0x4d9d=function(){return _0x327ab3;};return a105_0x4d9d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a106_0x2d4a47=a106_0x12d2;function a106_0x12d2(_0x5c0509,_0x4f1695){_0x5c0509=_0x5c0509-0x1e3;const _0x182af0=a106_0x182a();let _0x12d2a1=_0x182af0[_0x5c0509];return _0x12d2a1;}(function(_0x2d86ae,_0x2dc709){const _0x5a26f2=a106_0x12d2,_0x528bb0=_0x2d86ae();while(!![]){try{const _0x100784=-parseInt(_0x5a26f2(0x1e6))/0x1+parseInt(_0x5a26f2(0x1fb))/0x2*(parseInt(_0x5a26f2(0x1e7))/0x3)+parseInt(_0x5a26f2(0x1ee))/0x4*(parseInt(_0x5a26f2(0x1fe))/0x5)+-parseInt(_0x5a26f2(0x1ed))/0x6*(parseInt(_0x5a26f2(0x1f2))/0x7)+-parseInt(_0x5a26f2(0x1ef))/0x8+parseInt(_0x5a26f2(0x1e5))/0x9+parseInt(_0x5a26f2(0x1fc))/0xa*(parseInt(_0x5a26f2(0x1e4))/0xb);if(_0x100784===_0x2dc709)break;else _0x528bb0['push'](_0x528bb0['shift']());}catch(_0x33d173){_0x528bb0['push'](_0x528bb0['shift']());}}}(a106_0x182a,0xa245f));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a106_0x182a(){const _0x23a675=['undeletedPages','failedPages','code','compress','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','relatedPages','length','fieldCount','794gpAdeI','10nmXQUH','name','3873525wltjah','/sync-to-pages','部分页面同步失败','/smartapi/lovrabet/dataset/','POST','3002879IminRC','10417392tDIgdQ','895770MZfCII','2004RYgVuN','write','page','sync','\x20undeleted\x20related\x20page(s)\x20found','appCode','26502lJlvua','4RanxSL','2650480btPLrO','alias','dataset','917rSJnsQ'];a106_0x182a=function(){return _0x23a675;};return a106_0x182a();}import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a106_0x2d4a47(0x1e9),'command':a106_0x2d4a47(0x1ea),'description':'Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','risk':a106_0x2d4a47(0x1e8),'defaultOutputFormat':a106_0x2d4a47(0x1f6),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a106_0x2d4a47(0x1f0),'type':'string','description':a106_0x2d4a47(0x1f7)}],async 'validate'(_0x1c044b){validateDatasetSelector(_0x1c044b);},async 'dryRun'(_0x366e29){const _0x363e75=a106_0x2d4a47,_0x440dea=await prepare(_0x366e29);return{'method':_0x363e75(0x1e3),'url':_0x363e75(0x201)+_0x440dea['dataset'][_0x363e75(0x1f5)]+_0x363e75(0x1ff),'body':{'appCode':_0x366e29[_0x363e75(0x1ec)]},'description':serializeDryRunDescription({'dataset':{'id':_0x440dea[_0x363e75(0x1f1)]['id'],'code':_0x440dea[_0x363e75(0x1f1)][_0x363e75(0x1f5)],'name':_0x440dea[_0x363e75(0x1f1)][_0x363e75(0x1fd)],'fieldCount':_0x440dea[_0x363e75(0x1f1)][_0x363e75(0x1fa)]},'relatedPages':{'total':_0x440dea[_0x363e75(0x1f1)][_0x363e75(0x1f8)]['length'],'undeletedCount':_0x440dea['undeletedPages']['length']},'action':_0x363e75(0x1ea),'reason':_0x440dea[_0x363e75(0x1f3)][_0x363e75(0x1f9)]+_0x363e75(0x1eb)})};},async 'execute'(_0x69c50c){const _0x4ef767=a106_0x2d4a47,_0x4ff0df=await prepare(_0x69c50c),_0x59d872=await syncStandardPages(_0x69c50c[_0x4ef767(0x1ec)],_0x4ff0df[_0x4ef767(0x1f1)][_0x4ef767(0x1f5)]),_0x55c700=Array['isArray'](_0x59d872[_0x4ef767(0x1f4)])&&_0x59d872['failedPages']['length']>0x0,_0x34af25=_0x55c700?_0x4ef767(0x200):'同步成功';return{'ok':!![],'message':_0x34af25,'data':{'datasetCode':_0x4ff0df[_0x4ef767(0x1f1)][_0x4ef767(0x1f5)],..._0x59d872}};}};async function prepare(_0x273ca7){const _0x1a1c53=a106_0x2d4a47,_0x13cdf9=await loadDatasetDetailForPage(_0x273ca7);return prepareDatasetAction(_0x13cdf9,_0x1a1c53(0x1ea));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x19ee86,_0x15e53d){const _0x147015=a107_0x3f1a,_0x53d626=_0x19ee86();while(!![]){try{const _0x4bc95e=-parseInt(_0x147015(0x12b))/0x1*(-parseInt(_0x147015(0x13c))/0x2)+parseInt(_0x147015(0x121))/0x3+parseInt(_0x147015(0x12e))/0x4*(-parseInt(_0x147015(0x128))/0x5)+parseInt(_0x147015(0x130))/0x6+parseInt(_0x147015(0x120))/0x7+-parseInt(_0x147015(0x125))/0x8+-parseInt(_0x147015(0x12a))/0x9*(parseInt(_0x147015(0x123))/0xa);if(_0x4bc95e===_0x15e53d)break;else _0x53d626['push'](_0x53d626['shift']());}catch(_0x5b4cef){_0x53d626['push'](_0x53d626['shift']());}}}(a107_0x2e43,0x74d0c));function a107_0x3f1a(_0x40e7ff,_0x5c15ca){_0x40e7ff=_0x40e7ff-0x11f;const _0x2e434d=a107_0x2e43();let _0x3f1a07=_0x2e434d[_0x40e7ff];return _0x3f1a07;}import{existsSync}from'node:fs';import a107_0x17c5a2 from'node:path';function a107_0x2e43(){const _0x4a062b=['Login\x20failed','string','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','14FzcICy','√\x20Login\x20status:\x20','trim','5107396ppTnjg','1779801yOyhvh','cwd','1000760pjgFYw','Logged\x20in','4275928qvenyu','log','env','5KlwKzg','production','36okIcSq','81515wfWqsX','Project\x20name:','green','3345812FLlBSu','test','2137344WasulN','Project\x20name\x20cannot\x20exceed\x2050\x20characters','√\x20Project\x20Name:\x20','my-app','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','Not\x20set','Skipped','√\x20App\x20Code:\x20','cyan'];a107_0x2e43=function(){return _0x4a062b;};return a107_0x2e43();}import a107_0x44c551 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x4763ce,_0x559c77,_0x1e4a45){const _0x49b45a=a107_0x3f1a,_0x5fc7a4=_0x49b45a(0x133),_0x5327c2=readConfig(),_0x37e16a=typeof _0x5327c2[_0x49b45a(0x127)]===_0x49b45a(0x13a)?_0x5327c2[_0x49b45a(0x127)]:undefined,_0x346ff9=await input({'message':_0x49b45a(0x12c),'default':_0x5fc7a4,'validate':_0x4dce5a=>{const _0x3e83be=_0x49b45a,_0x5c571f=_0x4dce5a[_0x3e83be(0x11f)]()||_0x5fc7a4;if(_0x5c571f['length']>0x32)return _0x3e83be(0x131);const _0x150649=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x5c571f&&!_0x150649[_0x3e83be(0x12f)](_0x5c571f))return _0x3e83be(0x134);const _0xe48e65=a107_0x17c5a2['resolve'](process[_0x3e83be(0x122)](),_0x5c571f);if(existsSync(_0xe48e65))return'Directory\x20\x22'+_0x5c571f+'\x22\x20already\x20exists';return!![];}});console['log'](a107_0x44c551[_0x49b45a(0x12d)](_0x49b45a(0x132)+a107_0x44c551[_0x49b45a(0x138)](_0x346ff9)));const _0x31f3c1=await selectSingleAppcode(_0x1e4a45);console['log'](a107_0x44c551[_0x49b45a(0x12d)](_0x49b45a(0x137)+a107_0x44c551[_0x49b45a(0x138)](_0x31f3c1||_0x49b45a(0x135))));if(_0x31f3c1){const _0x389f45=await getIsSessionValid();if(!_0x389f45){const _0x2e6c19=await confirm({'message':_0x49b45a(0x13b),'default':!![]});if(_0x2e6c19){const _0x39d524=await authServer({'silent':!![]});console['log'](a107_0x44c551['green'](_0x49b45a(0x13d)+a107_0x44c551['cyan'](_0x39d524?_0x49b45a(0x124):_0x49b45a(0x139))));}else console[_0x49b45a(0x126)](a107_0x44c551[_0x49b45a(0x12d)](_0x49b45a(0x13d)+a107_0x44c551[_0x49b45a(0x138)](_0x49b45a(0x136))));}await _0x4763ce({'projectName':_0x346ff9,'appCode':_0x31f3c1,'env':_0x559c77||_0x37e16a||_0x49b45a(0x129)});}else await _0x4763ce({'projectName':_0x346ff9,'env':_0x559c77||_0x37e16a||_0x49b45a(0x129)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a108_0xb849(_0x562864,_0x30eb4e){_0x562864=_0x562864-0x16a;const _0x56ced5=a108_0x56ce();let _0xb84930=_0x56ced5[_0x562864];return _0xb84930;}(function(_0x2c6344,_0x2e345f){const _0x148147=a108_0xb849,_0x34b79d=_0x2c6344();while(!![]){try{const _0x3b6140=-parseInt(_0x148147(0x173))/0x1+-parseInt(_0x148147(0x170))/0x2*(-parseInt(_0x148147(0x16d))/0x3)+-parseInt(_0x148147(0x16a))/0x4+-parseInt(_0x148147(0x16c))/0x5+-parseInt(_0x148147(0x172))/0x6+-parseInt(_0x148147(0x171))/0x7*(parseInt(_0x148147(0x16e))/0x8)+parseInt(_0x148147(0x16b))/0x9*(parseInt(_0x148147(0x16f))/0xa);if(_0x3b6140===_0x2e345f)break;else _0x34b79d['push'](_0x34b79d['shift']());}catch(_0x3785eb){_0x34b79d['push'](_0x34b79d['shift']());}}}(a108_0x56ce,0x82ab6));function a108_0x56ce(){const _0x10fe8e=['40IEgFCF','202ItLXPL','133OLJymB','6410592moKpPB','663148PzIShb','1721292QGQXae','4785192Wjskbp','494085wMKXKP','24591WZswUM','66824QrRigg'];a108_0x56ce=function(){return _0x10fe8e;};return a108_0x56ce();}export function formatElapsed(_0x101052){const _0x560ce2=Date['now']()-_0x101052;if(_0x560ce2<0x3e8)return _0x560ce2+'ms';const _0x21c4fc=(_0x560ce2/0x3e8)['toFixed'](0x2),_0x2b61a5=_0x21c4fc['replace'](/\.?0+$/u,'');return _0x2b61a5+'s';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4b31f0,_0x25cbe4){const _0x824f03=a108_0x3e78,_0x46991e=_0x4b31f0();while(!![]){try{const _0x1adea2=parseInt(_0x824f03(0x1c6))/0x1+-parseInt(_0x824f03(0x1c9))/0x2+-parseInt(_0x824f03(0x1e9))/0x3*(parseInt(_0x824f03(0x1d1))/0x4)+parseInt(_0x824f03(0x19a))/0x5+-parseInt(_0x824f03(0x1a9))/0x6+-parseInt(_0x824f03(0x1aa))/0x7+parseInt(_0x824f03(0x1f7))/0x8;if(_0x1adea2===_0x25cbe4)break;else _0x46991e['push'](_0x46991e['shift']());}catch(_0x51ce11){_0x46991e['push'](_0x46991e['shift']());}}}(a108_0x19e9,0xade0c));function a108_0x3e78(_0x32e8a2,_0x206214){_0x32e8a2=_0x32e8a2-0x19a;const _0x19e944=a108_0x19e9();let _0x3e787f=_0x19e944[_0x32e8a2];return _0x3e787f;}import a108_0x118b10 from'path';import a108_0x16682d from'fs';import a108_0x510e71 from'chalk';import a108_0x29f2ec 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';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';function a108_0x19e9(){const _0x668f6e=['\x20run\x20start','2306976slNvKg','4515490QHPHEk','cyan','keys','1.0.0','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','Copy\x20project\x20files','*\x20Configuring\x20AppCode\x20for\x20project\x20','writeFileSync','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','readFileSync','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','test','repeat','production','开始创建项目:\x20','start','配置应用AppCode失败','Format\x20code','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','清理项目目录失败:\x20','defaultApp','message','success','更新\x20package.json\x20失败','\x20&&\x20','Project\x20directory\x20','constants','1405021OgILan','create','API\x20configuration\x20pulled:\x20','299458Ecenss','\x20√\x20','bold','项目创建失败:\x20','env','\x20already\x20exists','cookie','package.json','4buOWCK','\x20api\x20pull','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','projectCode','stringify','chdir','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','cd\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','dirname','toLocaleString','...','stop','setLogPath','minimumVersion','√\x20package.json\x20updated:\x20name=','项目创建完成:\x20','trim','\x20dataset(s),\x20generated\x20','info','belowMinimum','*\x20Pulling\x20API\x20configuration...','stableVersion','Project\x20name\x20cannot\x20be\x20empty','3464205goVDju','modelCount','apps','cwd','string','resolve','appCode','rmSync','parse','projectName','\x20|\x20AppCode:\x20','error','currentVersion','utf8','9637176sGQbEj','green','2182830Ylcief','W_OK','name','accessSync','配置应用AppCode:\x20','length','√\x20Pulled\x20','join','warn','API\x20配置拉取异常','gray','CLI\x20版本检查','log','version'];a108_0x19e9=function(){return _0x668f6e;};return a108_0x19e9();}import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x2d2f95){const _0x121114=a108_0x3e78,_0x1d1b32=await checkCliVersion();(_0x1d1b32['needsUpgrade']||_0x1d1b32[_0x121114(0x1e5)])&&(printCliUpgradeWarning(_0x1d1b32),assertCliVersionSupported(_0x1d1b32),logger[_0x121114(0x1e4)](_0x121114(0x1c7),_0x121114(0x1a5),{'currentVersion':_0x1d1b32[_0x121114(0x1f5)],'stableVersion':_0x1d1b32[_0x121114(0x1e7)],'minimumVersion':_0x1d1b32[_0x121114(0x1df)],'needsUpgrade':_0x1d1b32['needsUpgrade'],'belowMinimum':_0x1d1b32[_0x121114(0x1e5)]}));if(_0x2d2f95[_0x121114(0x1d4)]&&_0x2d2f95[_0x121114(0x1ef)])await runCreate({'projectName':_0x2d2f95[_0x121114(0x1d4)],'appCode':_0x2d2f95[_0x121114(0x1ef)],'env':_0x2d2f95[_0x121114(0x1cd)]},_0x2d2f95);else{if(_0x2d2f95[_0x121114(0x1d4)]){const _0x7cb4dc=await selectSingleAppcode(_0x2d2f95['cookie']);await runCreate({'projectName':_0x2d2f95['projectCode'],'appCode':_0x7cb4dc||undefined,'env':_0x2d2f95[_0x121114(0x1cd)]},_0x2d2f95);}else await guidedCreateProject(_0x3b6230=>runCreate(_0x3b6230,_0x2d2f95),_0x2d2f95[_0x121114(0x1cd)],_0x2d2f95[_0x121114(0x1cf)]);}}async function runCreate(_0x275c40,_0x50a38c){const _0x8bebd2=a108_0x3e78;if(!_0x275c40[_0x8bebd2(0x1f2)]||_0x275c40[_0x8bebd2(0x1f2)][_0x8bebd2(0x1e2)]()==='')throw new Error(_0x8bebd2(0x1e8));const _0x446cb2=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x446cb2[_0x8bebd2(0x1b6)](_0x275c40[_0x8bebd2(0x1f2)]))throw new Error(_0x8bebd2(0x1ae));if(_0x275c40[_0x8bebd2(0x1f2)][_0x8bebd2(0x19f)]>0x64)throw new Error(_0x8bebd2(0x1bd));const _0x27072e=a108_0x118b10[_0x8bebd2(0x1ee)](process[_0x8bebd2(0x1ec)](),_0x275c40['projectName']);if(a108_0x16682d['existsSync'](_0x27072e))throw new Error(_0x8bebd2(0x1c4)+_0x275c40[_0x8bebd2(0x1f2)]+_0x8bebd2(0x1ce));try{a108_0x16682d[_0x8bebd2(0x19d)](a108_0x118b10[_0x8bebd2(0x1da)](_0x27072e),a108_0x16682d[_0x8bebd2(0x1c5)][_0x8bebd2(0x19b)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x8bebd2(0x1de)](_0x27072e),logger[_0x8bebd2(0x1e4)]('create',_0x8bebd2(0x1b9)+_0x275c40[_0x8bebd2(0x1f2)],{'projectDir':_0x27072e,'appCode':_0x275c40['appCode']}),console[_0x8bebd2(0x1a6)](),console[_0x8bebd2(0x1a6)](a108_0x510e71[_0x8bebd2(0x1f8)](_0x8bebd2(0x1ca))+'Project\x20name:\x20'+a108_0x510e71[_0x8bebd2(0x1f8)](_0x275c40[_0x8bebd2(0x1f2)])+(_0x275c40[_0x8bebd2(0x1ef)]?_0x8bebd2(0x1f3)+a108_0x510e71[_0x8bebd2(0x1ab)](_0x275c40['appCode']):''));try{await runTask(_0x8bebd2(0x1af),()=>copyProjectTemplate(_0x275c40[_0x8bebd2(0x1f2)])),await updatePackageJsonName(_0x275c40[_0x8bebd2(0x1f2)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x275c40[_0x8bebd2(0x1f2)])),await runTask(_0x8bebd2(0x1bc),()=>formatProjectCode(_0x275c40[_0x8bebd2(0x1f2)])),await configureAppCode(_0x275c40['projectName'],_0x275c40[_0x8bebd2(0x1ef)]||'',_0x275c40[_0x8bebd2(0x1cd)]);let _0x48e84e=![];if(_0x275c40['appCode']){console['log'](_0x8bebd2(0x1e6));const _0x213996=process['cwd']();try{process['chdir'](_0x27072e);const _0xf3c69d=_0x275c40[_0x8bebd2(0x1cd)]||_0x8bebd2(0x1b8);initEnv(_0xf3c69d);const {configArray:_0x118248}=await fetchModelList(_0x275c40['appCode'],_0x50a38c[_0x8bebd2(0x1cf)]||''),_0x57587e=DEFAULT_API_DIR,_0x1eb7a2=await generateApiFile(_0x118248,'',_0x275c40[_0x8bebd2(0x1ef)],!![],_0xf3c69d,_0x57587e);console[_0x8bebd2(0x1a6)](_0x8bebd2(0x1a0)+_0x118248[_0x8bebd2(0x19f)]+_0x8bebd2(0x1e3)+_0x1eb7a2[_0x8bebd2(0x1ea)]+'\x20model(s)'),logger['info'](_0x8bebd2(0x1c7),_0x8bebd2(0x1c8)+_0x275c40['appCode']);}catch(_0x42e810){_0x48e84e=!![],console['log'](_0x8bebd2(0x1d3)),logger[_0x8bebd2(0x1a2)](_0x8bebd2(0x1c7),_0x8bebd2(0x1a3),{'error':_0x42e810 instanceof Error?_0x42e810[_0x8bebd2(0x1c0)]:String(_0x42e810)});}finally{process[_0x8bebd2(0x1d6)](_0x213996);}}logger[_0x8bebd2(0x1c1)](_0x8bebd2(0x1c7),_0x8bebd2(0x1e1)+_0x275c40[_0x8bebd2(0x1f2)]),console[_0x8bebd2(0x1a6)](),console[_0x8bebd2(0x1a6)](a108_0x510e71[_0x8bebd2(0x1f8)]('─'[_0x8bebd2(0x1b7)](0x3c))),console[_0x8bebd2(0x1a6)](a108_0x510e71[_0x8bebd2(0x1ab)]['bold']('🚀\x20Next\x20Steps:')),console[_0x8bebd2(0x1a6)](),console[_0x8bebd2(0x1a6)]('\x20\x201.\x20Start\x20project:\x20'+a108_0x510e71[_0x8bebd2(0x1ab)][_0x8bebd2(0x1cb)](_0x8bebd2(0x1d8)+_0x275c40[_0x8bebd2(0x1f2)]+_0x8bebd2(0x1c3)+CLI_BIN_NAME+_0x8bebd2(0x1a8))),_0x48e84e&&console[_0x8bebd2(0x1a6)](_0x8bebd2(0x1d9)+a108_0x510e71['cyan'][_0x8bebd2(0x1cb)](CLI_BIN_NAME+_0x8bebd2(0x1d2))),console[_0x8bebd2(0x1a6)](a108_0x510e71[_0x8bebd2(0x1f8)]('─'['repeat'](0x3c)));}catch(_0x2b44fa){logger[_0x8bebd2(0x1f4)](_0x8bebd2(0x1c7),_0x8bebd2(0x1cc)+_0x275c40[_0x8bebd2(0x1f2)],{'error':_0x2b44fa instanceof Error?_0x2b44fa[_0x8bebd2(0x1c0)]:String(_0x2b44fa)});try{a108_0x16682d['existsSync'](_0x27072e)&&(console[_0x8bebd2(0x1a6)](_0x8bebd2(0x1b2)+_0x27072e),a108_0x16682d[_0x8bebd2(0x1f0)](_0x27072e,{'recursive':!![],'force':!![]}));}catch{logger[_0x8bebd2(0x1a2)](_0x8bebd2(0x1c7),_0x8bebd2(0x1be)+_0x27072e);}throw _0x2b44fa;}}async function runTask(_0x48e7fc,_0x266aa9){const _0x3701c2=a108_0x3e78,_0x13823b=a108_0x29f2ec(_0x48e7fc+_0x3701c2(0x1dc))[_0x3701c2(0x1ba)]();try{const _0x4ce431=await _0x266aa9();_0x13823b[_0x3701c2(0x1dd)](),console[_0x3701c2(0x1a6)](''+a108_0x510e71['green'](_0x3701c2(0x1ca))+_0x48e7fc+'\x20'+a108_0x510e71[_0x3701c2(0x1a4)]('['+_0x4ce431+']'));}catch(_0x902ebf){_0x13823b['fail'](_0x48e7fc);throw _0x902ebf;}}async function updatePackageJsonName(_0x5bac71){const _0x2b74fa=a108_0x3e78,_0x279c9d=a108_0x118b10[_0x2b74fa(0x1ee)](process['cwd'](),_0x5bac71),_0x391b91=a108_0x118b10[_0x2b74fa(0x1a1)](_0x279c9d,_0x2b74fa(0x1d0));try{console[_0x2b74fa(0x1a6)](_0x2b74fa(0x1d7));const _0x35af6e=getRabetbaseCliPackageRoot(),_0x283221=a108_0x118b10[_0x2b74fa(0x1a1)](_0x35af6e,'package.json');let _0x39d26b=_0x2b74fa(0x1ad);try{const _0x4b8412=JSON[_0x2b74fa(0x1f1)](a108_0x16682d[_0x2b74fa(0x1b4)](_0x283221,_0x2b74fa(0x1f6)));_0x39d26b=_0x4b8412[_0x2b74fa(0x1a7)]||_0x2b74fa(0x1ad);}catch{}const _0x145926=a108_0x16682d[_0x2b74fa(0x1b4)](_0x391b91,_0x2b74fa(0x1f6)),_0x4e8ee7=JSON['parse'](_0x145926);_0x4e8ee7[_0x2b74fa(0x19c)]=_0x5bac71,_0x4e8ee7['description']=_0x5bac71+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x39d26b,a108_0x16682d[_0x2b74fa(0x1b1)](_0x391b91,JSON[_0x2b74fa(0x1d5)](_0x4e8ee7,null,0x2)+'\x0a',_0x2b74fa(0x1f6)),console[_0x2b74fa(0x1a6)](_0x2b74fa(0x1e0)+_0x5bac71),logger[_0x2b74fa(0x1e4)]('create','更新\x20package.json\x20name');}catch(_0x67cc3d){logger[_0x2b74fa(0x1f4)](_0x2b74fa(0x1c7),_0x2b74fa(0x1c2));throw _0x67cc3d;}}async function configureAppCode(_0x1a6f7e,_0x40d37a,_0x38dde5){const _0x1c06a2=a108_0x3e78,_0x1b8f82=a108_0x118b10[_0x1c06a2(0x1ee)](process[_0x1c06a2(0x1ec)](),_0x1a6f7e),_0x5f40a8=a108_0x118b10['join'](_0x1b8f82,NEW_CONFIG_NAME);try{_0x40d37a?console[_0x1c06a2(0x1a6)](_0x1c06a2(0x1b0)+_0x1a6f7e+':\x20'+_0x40d37a):console[_0x1c06a2(0x1a6)](_0x1c06a2(0x1b5)+_0x1a6f7e);const _0x34b0ef=getRabetbaseCliPackageRoot(),_0x1d30e7=a108_0x118b10[_0x1c06a2(0x1a1)](_0x34b0ef,_0x1c06a2(0x1d0));let _0x4c4e0d=_0x1c06a2(0x1ad);try{const _0x436b6=JSON['parse'](a108_0x16682d[_0x1c06a2(0x1b4)](_0x1d30e7,'utf8'));_0x4c4e0d=_0x436b6[_0x1c06a2(0x1a7)]||'1.0.0';}catch{}const _0x300ff6=readConfig(),_0x2f9380=typeof _0x300ff6['env']===_0x1c06a2(0x1ed)?_0x300ff6['env']:undefined,_0x5a7f8f={};for(const _0x37bb02 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x300ff6[_0x37bb02]!=null)_0x5a7f8f[_0x37bb02]=_0x300ff6[_0x37bb02];}const _0x2c5334=buildCanonicalProjectConfig(_0x5a7f8f,{'appCodes':_0x40d37a?[_0x40d37a]:[],'env':_0x38dde5||_0x2f9380||_0x1c06a2(0x1b8),'metadata':{'createdAt':new Date()[_0x1c06a2(0x1db)](),'version':_0x4c4e0d}});writeConfigFile(_0x5f40a8,_0x2c5334),_0x40d37a?console[_0x1c06a2(0x1a6)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x1c06a2(0x1ac)](_0x2c5334[_0x1c06a2(0x1eb)]||{})[_0x1c06a2(0x1a1)](',\x20')+'\x20|\x20Default:\x20'+_0x2c5334[_0x1c06a2(0x1bf)]):console[_0x1c06a2(0x1a6)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x1c06a2(0x1b3)),logger[_0x1c06a2(0x1e4)]('create',_0x1c06a2(0x19e)+_0x40d37a);}catch(_0x21f24d){logger[_0x1c06a2(0x1f4)](_0x1c06a2(0x1c7),_0x1c06a2(0x1bb));}}
|
|
1
|
+
(function(_0x42a0e2,_0x309bdd){const _0x46bd0a=a109_0x2c9f,_0x20fa96=_0x42a0e2();while(!![]){try{const _0x3d0692=parseInt(_0x46bd0a(0xc9))/0x1+parseInt(_0x46bd0a(0xb6))/0x2+-parseInt(_0x46bd0a(0x93))/0x3*(-parseInt(_0x46bd0a(0xb5))/0x4)+-parseInt(_0x46bd0a(0xbc))/0x5+parseInt(_0x46bd0a(0xc4))/0x6*(-parseInt(_0x46bd0a(0xd0))/0x7)+-parseInt(_0x46bd0a(0xb2))/0x8+parseInt(_0x46bd0a(0xd3))/0x9*(-parseInt(_0x46bd0a(0xc1))/0xa);if(_0x3d0692===_0x309bdd)break;else _0x20fa96['push'](_0x20fa96['shift']());}catch(_0x488d08){_0x20fa96['push'](_0x20fa96['shift']());}}}(a109_0x48dc,0x6905d));function a109_0x48dc(){const _0x275851=['resolve','message','writeFileSync','info','开始创建项目:\x20','3698296RZTDmm','version','配置应用AppCode失败','3322964vSKkUk','1135846MmjpgD','log','项目创建完成:\x20','needsUpgrade','CLI\x20版本检查','green','1871395ijeHXi','production','\x20run\x20start','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','cyan','10aDumiU','项目创建失败:\x20','existsSync','113994POsVHZ','\x20config\x20set\x20appcode\x20<app-code>\x27','currentVersion','accessSync','belowMinimum','404711xYOEpP','create','W_OK','defaultApp','\x20\x202.\x20Pull\x20API\x20configuration:\x20','\x20|\x20Default:\x20','🚀\x20Next\x20Steps:','161IYbuMW','\x20Generated\x20by\x20rabetbase\x20cli\x20','\x20\x201.\x20Start\x20project:\x20','896931zdMUdh','Project\x20directory\x20','dirname','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','\x20dataset(s),\x20generated\x20','trim','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','env','API\x20configuration\x20pulled:\x20','√\x20Configuration\x20file\x20created,\x20Apps:\x20','\x20|\x20AppCode:\x20','appCode','join','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','modelCount','constants','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','readFileSync','keys','repeat','toLocaleString','test','projectCode','cwd','\x20&&\x20','更新\x20package.json\x20name','cd\x20','package.json','bold','length','warn','projectName','3SBsOMd','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','name','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','配置应用AppCode:\x20','1.0.0','chdir','Copy\x20project\x20files','setLogPath','Project\x20name:\x20','更新\x20package.json\x20失败','utf8','√\x20package.json\x20updated:\x20name=','parse','Install\x20dependencies','description','√\x20Pulled\x20','fail','cookie','success','*\x20Configuring\x20AppCode\x20for\x20project\x20','stop','string','error','minimumVersion','...'];a109_0x48dc=function(){return _0x275851;};return a109_0x48dc();}import a109_0xeb2c26 from'path';import a109_0x1fe264 from'fs';import a109_0x54aeb7 from'chalk';import a109_0x58e9b4 from'ora';function a109_0x2c9f(_0x1720b4,_0x4125af){_0x1720b4=_0x1720b4-0x8b;const _0x48dc85=a109_0x48dc();let _0x2c9f25=_0x48dc85[_0x1720b4];return _0x2c9f25;}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';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(_0x1ab33d){const _0x4764f1=a109_0x2c9f,_0x54c5a8=await checkCliVersion();(_0x54c5a8[_0x4764f1(0xb9)]||_0x54c5a8[_0x4764f1(0xc8)])&&(printCliUpgradeWarning(_0x54c5a8),assertCliVersionSupported(_0x54c5a8),logger['info']('create',_0x4764f1(0xba),{'currentVersion':_0x54c5a8[_0x4764f1(0xc6)],'stableVersion':_0x54c5a8['stableVersion'],'minimumVersion':_0x54c5a8[_0x4764f1(0xab)],'needsUpgrade':_0x54c5a8[_0x4764f1(0xb9)],'belowMinimum':_0x54c5a8[_0x4764f1(0xc8)]}));if(_0x1ab33d[_0x4764f1(0xe9)]&&_0x1ab33d[_0x4764f1(0xde)])await runCreate({'projectName':_0x1ab33d[_0x4764f1(0xe9)],'appCode':_0x1ab33d['appCode'],'env':_0x1ab33d[_0x4764f1(0xda)]},_0x1ab33d);else{if(_0x1ab33d[_0x4764f1(0xe9)]){const _0x10e481=await selectSingleAppcode(_0x1ab33d[_0x4764f1(0xa5)]);await runCreate({'projectName':_0x1ab33d[_0x4764f1(0xe9)],'appCode':_0x10e481||undefined,'env':_0x1ab33d[_0x4764f1(0xda)]},_0x1ab33d);}else await guidedCreateProject(_0x14e146=>runCreate(_0x14e146,_0x1ab33d),_0x1ab33d[_0x4764f1(0xda)],_0x1ab33d[_0x4764f1(0xa5)]);}}async function runCreate(_0x20a453,_0x53b291){const _0x3b7898=a109_0x2c9f;if(!_0x20a453[_0x3b7898(0x92)]||_0x20a453[_0x3b7898(0x92)][_0x3b7898(0xd8)]()==='')throw new Error('Project\x20name\x20cannot\x20be\x20empty');const _0x4f0b2d=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4f0b2d[_0x3b7898(0xe8)](_0x20a453[_0x3b7898(0x92)]))throw new Error(_0x3b7898(0xd9));if(_0x20a453[_0x3b7898(0x92)]['length']>0x64)throw new Error(_0x3b7898(0xbf));const _0x2980dc=a109_0xeb2c26[_0x3b7898(0xad)](process['cwd'](),_0x20a453[_0x3b7898(0x92)]);if(a109_0x1fe264[_0x3b7898(0xc3)](_0x2980dc))throw new Error(_0x3b7898(0xd4)+_0x20a453[_0x3b7898(0x92)]+'\x20already\x20exists');try{a109_0x1fe264[_0x3b7898(0xc7)](a109_0xeb2c26[_0x3b7898(0xd5)](_0x2980dc),a109_0x1fe264[_0x3b7898(0xe2)][_0x3b7898(0xcb)]);}catch{throw new Error(_0x3b7898(0xe3));}logger[_0x3b7898(0x9b)](_0x2980dc),logger[_0x3b7898(0xb0)](_0x3b7898(0xca),_0x3b7898(0xb1)+_0x20a453['projectName'],{'projectDir':_0x2980dc,'appCode':_0x20a453[_0x3b7898(0xde)]}),console[_0x3b7898(0xb7)](),console[_0x3b7898(0xb7)](a109_0x54aeb7[_0x3b7898(0xbb)]('\x20√\x20')+_0x3b7898(0x9c)+a109_0x54aeb7[_0x3b7898(0xbb)](_0x20a453['projectName'])+(_0x20a453['appCode']?_0x3b7898(0xdd)+a109_0x54aeb7[_0x3b7898(0xc0)](_0x20a453[_0x3b7898(0xde)]):''));try{await runTask(_0x3b7898(0x9a),()=>copyProjectTemplate(_0x20a453[_0x3b7898(0x92)])),await updatePackageJsonName(_0x20a453[_0x3b7898(0x92)]),await runTask(_0x3b7898(0xa1),()=>installDependencies(_0x20a453[_0x3b7898(0x92)])),await runTask('Format\x20code',()=>formatProjectCode(_0x20a453[_0x3b7898(0x92)])),await configureAppCode(_0x20a453[_0x3b7898(0x92)],_0x20a453[_0x3b7898(0xde)]||'',_0x20a453[_0x3b7898(0xda)]);let _0x49ba9f=![];if(_0x20a453[_0x3b7898(0xde)]){console[_0x3b7898(0xb7)]('*\x20Pulling\x20API\x20configuration...');const _0x449f17=process[_0x3b7898(0xea)]();try{process[_0x3b7898(0x99)](_0x2980dc);const _0x48df5d=_0x20a453['env']||_0x3b7898(0xbd);initEnv(_0x48df5d);const {configArray:_0x3b19c4}=await fetchModelList(_0x20a453['appCode'],_0x53b291[_0x3b7898(0xa5)]||''),_0x37b5ab=DEFAULT_API_DIR,_0x213713=await generateApiFile(_0x3b19c4,'',_0x20a453[_0x3b7898(0xde)],!![],_0x48df5d,_0x37b5ab);console[_0x3b7898(0xb7)](_0x3b7898(0xa3)+_0x3b19c4[_0x3b7898(0x90)]+_0x3b7898(0xd7)+_0x213713[_0x3b7898(0xe1)]+'\x20model(s)'),logger[_0x3b7898(0xb0)](_0x3b7898(0xca),_0x3b7898(0xdb)+_0x20a453['appCode']);}catch(_0x3075fc){_0x49ba9f=!![],console[_0x3b7898(0xb7)](_0x3b7898(0x94)),logger[_0x3b7898(0x91)](_0x3b7898(0xca),'API\x20配置拉取异常',{'error':_0x3075fc instanceof Error?_0x3075fc[_0x3b7898(0xae)]:String(_0x3075fc)});}finally{process[_0x3b7898(0x99)](_0x449f17);}}logger[_0x3b7898(0xa6)](_0x3b7898(0xca),_0x3b7898(0xb8)+_0x20a453[_0x3b7898(0x92)]),console[_0x3b7898(0xb7)](),console[_0x3b7898(0xb7)](a109_0x54aeb7[_0x3b7898(0xbb)]('─'['repeat'](0x3c))),console[_0x3b7898(0xb7)](a109_0x54aeb7[_0x3b7898(0xc0)][_0x3b7898(0x8f)](_0x3b7898(0xcf))),console['log'](),console['log'](_0x3b7898(0xd2)+a109_0x54aeb7[_0x3b7898(0xc0)][_0x3b7898(0x8f)](_0x3b7898(0x8d)+_0x20a453[_0x3b7898(0x92)]+_0x3b7898(0x8b)+CLI_BIN_NAME+_0x3b7898(0xbe))),_0x49ba9f&&console['log'](_0x3b7898(0xcd)+a109_0x54aeb7[_0x3b7898(0xc0)][_0x3b7898(0x8f)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x3b7898(0xb7)](a109_0x54aeb7[_0x3b7898(0xbb)]('─'[_0x3b7898(0xe6)](0x3c)));}catch(_0x735d68){logger[_0x3b7898(0xaa)](_0x3b7898(0xca),_0x3b7898(0xc2)+_0x20a453[_0x3b7898(0x92)],{'error':_0x735d68 instanceof Error?_0x735d68[_0x3b7898(0xae)]:String(_0x735d68)});try{a109_0x1fe264[_0x3b7898(0xc3)](_0x2980dc)&&(console[_0x3b7898(0xb7)](_0x3b7898(0xd6)+_0x2980dc),a109_0x1fe264['rmSync'](_0x2980dc,{'recursive':!![],'force':!![]}));}catch{logger[_0x3b7898(0x91)](_0x3b7898(0xca),'清理项目目录失败:\x20'+_0x2980dc);}throw _0x735d68;}}async function runTask(_0x242ce3,_0xa3de03){const _0x19d194=a109_0x2c9f,_0x1123d7=a109_0x58e9b4(_0x242ce3+_0x19d194(0xac))['start']();try{const _0x4607ff=await _0xa3de03();_0x1123d7[_0x19d194(0xa8)](),console[_0x19d194(0xb7)](''+a109_0x54aeb7[_0x19d194(0xbb)]('\x20√\x20')+_0x242ce3+'\x20'+a109_0x54aeb7['gray']('['+_0x4607ff+']'));}catch(_0x8133b2){_0x1123d7[_0x19d194(0xa4)](_0x242ce3);throw _0x8133b2;}}async function updatePackageJsonName(_0x234fc6){const _0x5f334f=a109_0x2c9f,_0x3bfb6e=a109_0xeb2c26['resolve'](process[_0x5f334f(0xea)](),_0x234fc6),_0x354a9d=a109_0xeb2c26[_0x5f334f(0xdf)](_0x3bfb6e,'package.json');try{console[_0x5f334f(0xb7)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0xa44e66=getRabetbaseCliPackageRoot(),_0x15a43e=a109_0xeb2c26[_0x5f334f(0xdf)](_0xa44e66,_0x5f334f(0x8e));let _0x531641='1.0.0';try{const _0x22ee81=JSON[_0x5f334f(0xa0)](a109_0x1fe264[_0x5f334f(0xe4)](_0x15a43e,_0x5f334f(0x9e)));_0x531641=_0x22ee81[_0x5f334f(0xb3)]||_0x5f334f(0x98);}catch{}const _0x46b2bd=a109_0x1fe264[_0x5f334f(0xe4)](_0x354a9d,_0x5f334f(0x9e)),_0x17f373=JSON[_0x5f334f(0xa0)](_0x46b2bd);_0x17f373[_0x5f334f(0x95)]=_0x234fc6,_0x17f373[_0x5f334f(0xa2)]=_0x234fc6+_0x5f334f(0xd1)+_0x531641,a109_0x1fe264[_0x5f334f(0xaf)](_0x354a9d,JSON['stringify'](_0x17f373,null,0x2)+'\x0a',_0x5f334f(0x9e)),console[_0x5f334f(0xb7)](_0x5f334f(0x9f)+_0x234fc6),logger[_0x5f334f(0xb0)](_0x5f334f(0xca),_0x5f334f(0x8c));}catch(_0x366a00){logger['error'](_0x5f334f(0xca),_0x5f334f(0x9d));throw _0x366a00;}}async function configureAppCode(_0x5df380,_0x29b7e6,_0x17c187){const _0x346639=a109_0x2c9f,_0x3d47d8=a109_0xeb2c26[_0x346639(0xad)](process[_0x346639(0xea)](),_0x5df380),_0x2b0e4a=a109_0xeb2c26['join'](_0x3d47d8,NEW_CONFIG_NAME);try{_0x29b7e6?console[_0x346639(0xb7)](_0x346639(0xa7)+_0x5df380+':\x20'+_0x29b7e6):console['log'](_0x346639(0xe0)+_0x5df380);const _0x478a76=getRabetbaseCliPackageRoot(),_0x268ba4=a109_0xeb2c26[_0x346639(0xdf)](_0x478a76,_0x346639(0x8e));let _0x263aa9=_0x346639(0x98);try{const _0x5a6a4e=JSON['parse'](a109_0x1fe264['readFileSync'](_0x268ba4,_0x346639(0x9e)));_0x263aa9=_0x5a6a4e[_0x346639(0xb3)]||_0x346639(0x98);}catch{}const _0x1ca851=readConfig(),_0x1e47d4=typeof _0x1ca851[_0x346639(0xda)]===_0x346639(0xa9)?_0x1ca851[_0x346639(0xda)]:undefined,_0x3f6d91={};for(const _0x348f29 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1ca851[_0x348f29]!=null)_0x3f6d91[_0x348f29]=_0x1ca851[_0x348f29];}const _0x19f75b=buildCanonicalProjectConfig(_0x3f6d91,{'appCodes':_0x29b7e6?[_0x29b7e6]:[],'env':_0x17c187||_0x1e47d4||_0x346639(0xbd),'metadata':{'createdAt':new Date()[_0x346639(0xe7)](),'version':_0x263aa9}});writeConfigFile(_0x2b0e4a,_0x19f75b),_0x29b7e6?console[_0x346639(0xb7)](_0x346639(0xdc)+Object[_0x346639(0xe5)](_0x19f75b['apps']||{})[_0x346639(0xdf)](',\x20')+_0x346639(0xce)+_0x19f75b[_0x346639(0xcc)]):console[_0x346639(0xb7)](_0x346639(0x96)+CLI_BIN_NAME+_0x346639(0xc5)),logger[_0x346639(0xb0)](_0x346639(0xca),_0x346639(0x97)+_0x29b7e6);}catch(_0x1855f9){logger[_0x346639(0xaa)](_0x346639(0xca),_0x346639(0xb4));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c6414,_0x24deb1){const _0x40f204=a110_0x1c11,_0x273266=_0x2c6414();while(!![]){try{const _0x2db9bb=-parseInt(_0x40f204(0x130))/0x1+parseInt(_0x40f204(0x103))/0x2*(-parseInt(_0x40f204(0x127))/0x3)+parseInt(_0x40f204(0x11f))/0x4*(-parseInt(_0x40f204(0x11b))/0x5)+-parseInt(_0x40f204(0x105))/0x6*(-parseInt(_0x40f204(0x134))/0x7)+-parseInt(_0x40f204(0x12b))/0x8*(parseInt(_0x40f204(0x11a))/0x9)+-parseInt(_0x40f204(0x104))/0xa+-parseInt(_0x40f204(0x123))/0xb*(-parseInt(_0x40f204(0x112))/0xc);if(_0x2db9bb===_0x24deb1)break;else _0x273266['push'](_0x273266['shift']());}catch(_0x3e26f3){_0x273266['push'](_0x273266['shift']());}}}(a110_0x220a,0x216a3));import a110_0x3f8c3b from'path';import a110_0x3ffe32 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';function a110_0x220a(){const _0x44a636=['needsUpgrade','toLocaleString','string','2oyvUnn','1671080REleII','6EbofUX','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','\x20\x20√\x20Pulled\x20','Project\x20directory\x20\x22','belowMinimum','log','production','\x22\x20already\x20exists.','\x20\x20Installing\x20dependencies...','\x20api\x20pull`\x20manually\x20later.','W_OK','\x20created\x20successfully!','env','8093568JDGTAk','join','chdir','resolve','\x20\x20√\x20Project\x20template\x20created','Use\x20a\x20different\x20project\x20name.','writeFile','\x20\x20√\x20package.json\x20updated','279rWkDHl','293860skpDKI','\x20model(s)','readFile','stringify','8OCbSXo','\x20\x20Pulling\x20API\x20configuration...','Cannot\x20create\x20project\x20in\x20current\x20directory.','constants','11nRaTFR','test','\x20\x20√\x20Configuration\x20file\x20created','name','678255nDuFyl','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','length','ignore','34072GkLVlG','\x20\x20rabetbase\x20run\x20start\x0a','utf-8','cwd','dirname','161932tZodCh','bun','npm','modelCount','1869707kUrpSh','bun\x20run\x20format','validation','...','access','trim','Check\x20directory\x20permissions.'];a110_0x220a=function(){return _0x44a636;};return a110_0x220a();}import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.js';function a110_0x1c11(_0x979396,_0x19c300){_0x979396=_0x979396-0xfc;const _0x220ab1=a110_0x220a();let _0x1c117f=_0x220ab1[_0x979396];return _0x1c117f;}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(_0x49eba1,_0x321055,_0x422d49,_0x494aa7){const _0xc508a2=a110_0x1c11,_0x2aed0e=await checkCliVersion();(_0x2aed0e[_0xc508a2(0x100)]||_0x2aed0e[_0xc508a2(0x109)])&&(printCliUpgradeWarning(_0x2aed0e),assertCliVersionSupported(_0x2aed0e));if(!_0x49eba1||_0x49eba1[_0xc508a2(0xfe)]()==='')throw CliErrors['validation']('Project\x20name\x20cannot\x20be\x20empty.');const _0x3358b2=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x3358b2[_0xc508a2(0x124)](_0x49eba1))throw CliErrors[_0xc508a2(0x136)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x49eba1[_0xc508a2(0x129)]>0x64)throw CliErrors['validation'](_0xc508a2(0x106));const _0x4ecc11=a110_0x3f8c3b[_0xc508a2(0x115)](process[_0xc508a2(0x12e)](),_0x49eba1);if(existsSync(_0x4ecc11))throw CliErrors['validation'](_0xc508a2(0x108)+_0x49eba1+_0xc508a2(0x10c),_0xc508a2(0x117));try{const _0x1aa082=a110_0x3f8c3b[_0xc508a2(0x12f)](_0x4ecc11);await a110_0x3ffe32[_0xc508a2(0xfd)](_0x1aa082,a110_0x3ffe32[_0xc508a2(0x122)][_0xc508a2(0x10f)]);}catch{throw CliErrors[_0xc508a2(0x136)](_0xc508a2(0x121),_0xc508a2(0xff));}try{console[_0xc508a2(0x10a)]('*\x20Creating\x20project\x20'+_0x49eba1+_0xc508a2(0xfc));const _0x345351=getSubAppReactDemoTemplateDir();await copyDirectory(_0x345351,_0x4ecc11),console['log'](_0xc508a2(0x116)),await updatePackageJsonName(_0x49eba1),console['log'](_0xc508a2(0x119)),console[_0xc508a2(0x10a)](_0xc508a2(0x10d)),console[_0xc508a2(0x10a)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x4ecc11),console['log']('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x49eba1,_0x422d49,_0x321055),console['log'](_0xc508a2(0x125)),_0x422d49&&await pullApiConfig(_0x4ecc11,_0x422d49,_0x321055,_0x494aa7),console[_0xc508a2(0x10a)]('\x0a√\x20Project\x20'+_0x49eba1+_0xc508a2(0x110)),console['log']('\x0a\x20\x20cd\x20'+_0x49eba1),console[_0xc508a2(0x10a)](_0xc508a2(0x12c));}catch(_0x386a43){try{existsSync(_0x4ecc11)&&await a110_0x3ffe32['rm'](_0x4ecc11,{'recursive':!![],'force':!![]});}catch{}throw _0x386a43;}}async function updatePackageJsonName(_0x53106f){const _0x57935a=a110_0x1c11,_0x21515b=a110_0x3f8c3b[_0x57935a(0x115)](process[_0x57935a(0x12e)](),_0x53106f),_0x2dd2f1=a110_0x3f8c3b[_0x57935a(0x113)](_0x21515b,'package.json'),_0x2501b0=await a110_0x3ffe32[_0x57935a(0x11d)](_0x2dd2f1,_0x57935a(0x12d)),_0x254bf6=JSON['parse'](_0x2501b0);_0x254bf6[_0x57935a(0x126)]=_0x53106f,_0x254bf6['description']='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a110_0x3ffe32[_0x57935a(0x118)](_0x2dd2f1,JSON[_0x57935a(0x11e)](_0x254bf6,null,0x2)+'\x0a');}function detectPackageManager(){const _0x1939de=a110_0x1c11;try{return execSync('bun\x20--version',{'stdio':_0x1939de(0x12a)}),_0x1939de(0x131);}catch{return _0x1939de(0x132);}}async function formatCode(_0xb27416){const _0x1a12d2=a110_0x1c11;try{await execAsync(_0x1a12d2(0x135),{'cwd':_0xb27416});}catch{}}async function configureProject(_0x526254,_0x136d87,_0x1e109f){const _0x35f5a3=a110_0x1c11,_0x1e9fa5=a110_0x3f8c3b[_0x35f5a3(0x115)](process[_0x35f5a3(0x12e)](),_0x526254),_0x461e1b=a110_0x3f8c3b[_0x35f5a3(0x113)](_0x1e9fa5,NEW_CONFIG_NAME),_0x37c0f1=readConfig(),_0x1d5d27=typeof _0x37c0f1[_0x35f5a3(0x111)]===_0x35f5a3(0x102)?_0x37c0f1['env']:undefined,_0x2869df={};for(const _0x1102d4 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x37c0f1[_0x1102d4]!=null)_0x2869df[_0x1102d4]=_0x37c0f1[_0x1102d4];}const _0x580aa8=buildCanonicalProjectConfig(_0x2869df,{'appCodes':_0x136d87?[_0x136d87]:[],'env':_0x1e109f||_0x1d5d27||_0x35f5a3(0x10b),'metadata':{'createdAt':new Date()[_0x35f5a3(0x101)](),'version':getCliVersion()}});writeConfigFile(_0x461e1b,_0x580aa8);}async function pullApiConfig(_0x490d98,_0x44efea,_0x226912,_0xa42274){const _0xf6c79d=a110_0x1c11,_0x4478e4=process[_0xf6c79d(0x12e)]();try{process[_0xf6c79d(0x114)](_0x490d98);const _0x204761=_0x226912||_0xf6c79d(0x10b);initEnv(_0x204761),console[_0xf6c79d(0x10a)](_0xf6c79d(0x120));const {configArray:_0x2f9899}=await fetchModelList(_0x44efea,_0xa42274||''),_0x340ef4=await generateApiFile(_0x2f9899,'',_0x44efea,!![],_0x204761,DEFAULT_API_DIR);console[_0xf6c79d(0x10a)](_0xf6c79d(0x107)+_0x2f9899[_0xf6c79d(0x129)]+'\x20dataset(s),\x20generated\x20'+_0x340ef4[_0xf6c79d(0x133)]+_0xf6c79d(0x11c));}catch(_0x3ec85f){console['log'](_0xf6c79d(0x128)+CLI_BIN_NAME+_0xf6c79d(0x10e));}finally{process[_0xf6c79d(0x114)](_0x4478e4);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x24dea5,_0x25543b){const _0x349d12=a111_0x5985,_0x48a822=_0x24dea5();while(!![]){try{const _0x149dcb=-parseInt(_0x349d12(0xe9))/0x1+-parseInt(_0x349d12(0xe2))/0x2+-parseInt(_0x349d12(0xe7))/0x3+-parseInt(_0x349d12(0xee))/0x4+-parseInt(_0x349d12(0xf0))/0x5*(-parseInt(_0x349d12(0xed))/0x6)+parseInt(_0x349d12(0xef))/0x7*(parseInt(_0x349d12(0xe4))/0x8)+parseInt(_0x349d12(0xea))/0x9;if(_0x149dcb===_0x25543b)break;else _0x48a822['push'](_0x48a822['shift']());}catch(_0x585903){_0x48a822['push'](_0x48a822['shift']());}}}(a111_0x540c,0x8fce4));import a111_0x141c38 from'node:path';import{fileURLToPath}from'node:url';function a111_0x540c(){const _0x2b143f=['103901ffYprB','4116654GJEcLC','resolve','sub-app-react-demo','4962TlgwHi','1127744SMgdmF','1631OHGxZm','3090NZUgOE','556838ptMzjt','join','23216occDxR','projects','../../../../','1174122FDLSMB','templates'];a111_0x540c=function(){return _0x2b143f;};return a111_0x540c();}const __dirname=a111_0x141c38['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x4925b5=a111_0x5985;return a111_0x141c38[_0x4925b5(0xeb)](__dirname,_0x4925b5(0xe6));}function a111_0x5985(_0x2df571,_0x9ff7){_0x2df571=_0x2df571-0xe2;const _0x540c1e=a111_0x540c();let _0x5985e4=_0x540c1e[_0x2df571];return _0x5985e4;}export function getSubAppReactDemoTemplateDir(){const _0x5ed9dd=a111_0x5985;return a111_0x141c38[_0x5ed9dd(0xe3)](getRabetbaseCliPackageRoot(),_0x5ed9dd(0xe8),_0x5ed9dd(0xe5),_0x5ed9dd(0xec));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3c56a5,_0x234e03){const _0x466543=a112_0x3ff8,_0x4bb907=_0x3c56a5();while(!![]){try{const _0x20785e=parseInt(_0x466543(0x200))/0x1*(-parseInt(_0x466543(0x1fd))/0x2)+-parseInt(_0x466543(0x205))/0x3+-parseInt(_0x466543(0x1f5))/0x4*(parseInt(_0x466543(0x201))/0x5)+parseInt(_0x466543(0x1fb))/0x6+-parseInt(_0x466543(0x1f9))/0x7*(parseInt(_0x466543(0x1f3))/0x8)+-parseInt(_0x466543(0x1fc))/0x9*(-parseInt(_0x466543(0x1f8))/0xa)+parseInt(_0x466543(0x1f7))/0xb*(parseInt(_0x466543(0x1fa))/0xc);if(_0x20785e===_0x234e03)break;else _0x4bb907['push'](_0x4bb907['shift']());}catch(_0x443f4d){_0x4bb907['push'](_0x4bb907['shift']());}}}(a112_0x2870,0x29e5a));function a112_0x2870(){const _0x512d0f=['now','27736lkzkti','resolve','1152836bhJQMv','info','22BOKWsr','1362590GxpnJA','7kSxIzg','2836056cbkevG','554232VLOPYF','18xLZqwP','318772gdGbIT','项目模板复制完成','cwd','1jiJqkG','5TDyqrT','success','message','copy','644682paQYUY','开始复制项目模板','error'];a112_0x2870=function(){return _0x512d0f;};return a112_0x2870();}import a112_0xd8f4d2 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';function a112_0x3ff8(_0x5252df,_0x57859e){_0x5252df=_0x5252df-0x1f1;const _0x28707c=a112_0x2870();let _0x3ff808=_0x28707c[_0x5252df];return _0x3ff808;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x314942){const _0x1d07d7=a112_0x3ff8,_0x1e9ff9=Date[_0x1d07d7(0x1f2)](),_0x14b6b3=a112_0xd8f4d2[_0x1d07d7(0x1f4)](process[_0x1d07d7(0x1ff)](),_0x314942);try{logger[_0x1d07d7(0x1f6)](_0x1d07d7(0x204),_0x1d07d7(0x206),{'projectCode':_0x314942,'templateDir':templateDir}),await copyDirectory(templateDir,_0x14b6b3);const _0x493e81=Date[_0x1d07d7(0x1f2)]()-_0x1e9ff9;logger[_0x1d07d7(0x202)](_0x1d07d7(0x204),_0x1d07d7(0x1fe),_0x493e81,{'projectCode':_0x314942});}catch(_0x214201){const _0x6189df=Date[_0x1d07d7(0x1f2)]()-_0x1e9ff9;logger[_0x1d07d7(0x1f1)](_0x1d07d7(0x204),'项目模板复制失败',{'projectCode':_0x314942,'error':_0x214201 instanceof Error?_0x214201[_0x1d07d7(0x203)]:String(_0x214201),'duration':_0x6189df});throw _0x214201;}return formatElapsed(_0x1e9ff9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a113_0x47f9(){const _0xf60475=['代码格式化失败','9SqcyOw','success','1984608nQWwZX','resolve','format','14aQiffz','112pFUkiZ','error','4862696jIOAWL','npx','开始格式化代码','1591476kFRBPG','64390oWQcHh','885710hvwEyB','2302lZQsLF','44zOcUus','463YOOUvO','1203528blsLUT','prettier','now','info','--write'];a113_0x47f9=function(){return _0xf60475;};return a113_0x47f9();}(function(_0x3885dd,_0x3582b0){const _0x584d9c=a113_0x1048,_0xaf9f18=_0x3885dd();while(!![]){try{const _0x2b4860=parseInt(_0x584d9c(0x1c6))/0x1*(parseInt(_0x584d9c(0x1c4))/0x2)+-parseInt(_0x584d9c(0x1b8))/0x3+parseInt(_0x584d9c(0x1bc))/0x4*(parseInt(_0x584d9c(0x1c2))/0x5)+-parseInt(_0x584d9c(0x1c7))/0x6*(-parseInt(_0x584d9c(0x1bb))/0x7)+-parseInt(_0x584d9c(0x1be))/0x8+-parseInt(_0x584d9c(0x1b6))/0x9*(parseInt(_0x584d9c(0x1c3))/0xa)+parseInt(_0x584d9c(0x1c5))/0xb*(parseInt(_0x584d9c(0x1c1))/0xc);if(_0x2b4860===_0x3582b0)break;else _0xaf9f18['push'](_0xaf9f18['shift']());}catch(_0x475efa){_0xaf9f18['push'](_0xaf9f18['shift']());}}}(a113_0x47f9,0x72115));import a113_0x5ede51 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a113_0x1048(_0x40aa8b,_0x37337a){_0x40aa8b=_0x40aa8b-0x1b2;const _0x47f965=a113_0x47f9();let _0x104899=_0x47f965[_0x40aa8b];return _0x104899;}export async function formatProjectCode(_0x55b32a){const _0x5c5aa1=a113_0x1048,_0x2e9ba6=Date[_0x5c5aa1(0x1b2)](),_0x15ab19=a113_0x5ede51[_0x5c5aa1(0x1b9)](process['cwd'](),_0x55b32a);try{logger[_0x5c5aa1(0x1b3)]('format',_0x5c5aa1(0x1c0),{'projectCode':_0x55b32a}),await execa(resolveNpmBin(_0x5c5aa1(0x1bf)),[_0x5c5aa1(0x1c8),_0x5c5aa1(0x1b4),'.'],{'cwd':_0x15ab19});const _0x202354=Date[_0x5c5aa1(0x1b2)]()-_0x2e9ba6;logger[_0x5c5aa1(0x1b7)](_0x5c5aa1(0x1ba),'代码格式化完成',_0x202354,{'projectCode':_0x55b32a});}catch(_0x44d21b){const _0x132fed=Date[_0x5c5aa1(0x1b2)]()-_0x2e9ba6;logger[_0x5c5aa1(0x1bd)]('format',_0x5c5aa1(0x1b5),{'projectCode':_0x55b32a,'error':_0x44d21b instanceof Error?_0x44d21b['message']:String(_0x44d21b),'duration':_0x132fed});throw _0x44d21b;}return formatElapsed(_0x2e9ba6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f59b6,_0x5f52f0){const _0x41426f=a114_0x5f57,_0x47c21d=_0x1f59b6();while(!![]){try{const _0x335e49=-parseInt(_0x41426f(0x174))/0x1+parseInt(_0x41426f(0x16c))/0x2*(-parseInt(_0x41426f(0x176))/0x3)+-parseInt(_0x41426f(0x17c))/0x4*(-parseInt(_0x41426f(0x16d))/0x5)+-parseInt(_0x41426f(0x175))/0x6*(parseInt(_0x41426f(0x178))/0x7)+-parseInt(_0x41426f(0x172))/0x8+-parseInt(_0x41426f(0x17f))/0x9*(parseInt(_0x41426f(0x16e))/0xa)+parseInt(_0x41426f(0x17b))/0xb;if(_0x335e49===_0x5f52f0)break;else _0x47c21d['push'](_0x47c21d['shift']());}catch(_0x3aa8fd){_0x47c21d['push'](_0x47c21d['shift']());}}}(a114_0x4473,0x56a06));import a114_0x362f09 from'node:path';function a114_0x4473(){const _0x20b599=['依赖安装失败','2420640tBOrHv','依赖安装完成','180159dlcxFq','2046714swxuYJ','743097kbuoym','success','7hGmEOI','https://registry.npmmirror.com','resolve','16356538dVwniR','844tDTIkM','install','error','2920761szcSNZ','now','2AxPrLo','13945qqnIso','20VivfvN','info','--registry'];a114_0x4473=function(){return _0x20b599;};return a114_0x4473();}import{execa}from'execa';function a114_0x5f57(_0x18cfb4,_0x311ade){_0x18cfb4=_0x18cfb4-0x16b;const _0x4473af=a114_0x4473();let _0x5f5724=_0x4473af[_0x18cfb4];return _0x5f5724;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0xb75d00){const _0x31d3eb=a114_0x5f57,_0x299238=Date[_0x31d3eb(0x16b)](),_0x2003d4=a114_0x362f09[_0x31d3eb(0x17a)](process['cwd'](),_0xb75d00);try{logger[_0x31d3eb(0x16f)](_0x31d3eb(0x17d),'开始安装依赖',{'projectCode':_0xb75d00,'registry':_0x31d3eb(0x179)}),await execa(resolveNpmBin('npm'),[_0x31d3eb(0x17d),_0x31d3eb(0x170),_0x31d3eb(0x179)],{'cwd':_0x2003d4});const _0x24d1af=Date[_0x31d3eb(0x16b)]()-_0x299238;logger[_0x31d3eb(0x177)](_0x31d3eb(0x17d),_0x31d3eb(0x173),_0x24d1af,{'projectCode':_0xb75d00});}catch(_0x29e1cb){const _0x28fa7e=Date[_0x31d3eb(0x16b)]()-_0x299238;logger[_0x31d3eb(0x17e)](_0x31d3eb(0x17d),_0x31d3eb(0x171),{'projectCode':_0xb75d00,'error':_0x29e1cb instanceof Error?_0x29e1cb['message']:String(_0x29e1cb),'duration':_0x28fa7e});throw _0x29e1cb;}return formatElapsed(_0x299238);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a115_0x1eefd7=a115_0x1796;(function(_0x15f368,_0x426cc1){const _0x4c0d71=a115_0x1796,_0x23c1fd=_0x15f368();while(!![]){try{const _0x3aa9b9=-parseInt(_0x4c0d71(0x1be))/0x1+-parseInt(_0x4c0d71(0x1b5))/0x2*(-parseInt(_0x4c0d71(0x1cc))/0x3)+parseInt(_0x4c0d71(0x1d2))/0x4+parseInt(_0x4c0d71(0x1c6))/0x5*(-parseInt(_0x4c0d71(0x1b6))/0x6)+parseInt(_0x4c0d71(0x1b9))/0x7+-parseInt(_0x4c0d71(0x1c4))/0x8+parseInt(_0x4c0d71(0x1c0))/0x9;if(_0x3aa9b9===_0x426cc1)break;else _0x23c1fd['push'](_0x23c1fd['shift']());}catch(_0x2edf59){_0x23c1fd['push'](_0x23c1fd['shift']());}}}(a115_0x27a3,0x4fac8));import{CliErrors}from'../../errors.js';function a115_0x1796(_0x30d47a,_0x22338a){_0x30d47a=_0x30d47a-0x1b1;const _0x27a310=a115_0x27a3();let _0x179662=_0x27a310[_0x30d47a];return _0x179662;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';function a115_0x27a3(){const _0x4a6458=['str','args','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','1823028cXBNzl','env','Usage:\x20','write','trim','Auto-confirm\x20prompts','nonInteractive','Skip\x20confirmation\x20prompt','7226RXbnMP','617622DoYyQT','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','name','1572725XVCuJs','bool','appcode','../../commands/project/create/non-interactive.js','../../commands/project/create/main.js','251229IfGGqj','Target\x20environment','447957yKMcbK','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Project\x20name','cookie','2536456cJpAMU','upgrade','5HZotec','project-name','string','yes','boolean','project','222ZmWecY','App\x20code\x20to\x20initialize','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.'];a115_0x27a3=function(){return _0x4a6458;};return a115_0x27a3();}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a115_0x1eefd7(0x1bb),'type':a115_0x1eefd7(0x1c8),'description':a115_0x1eefd7(0x1cd)},{'name':a115_0x1eefd7(0x1d3),'type':'string','description':a115_0x1eefd7(0x1bf)},{'name':a115_0x1eefd7(0x1c9),'type':'boolean','description':a115_0x1eefd7(0x1b2),'default':![]}],createFlags=[{'name':a115_0x1eefd7(0x1b8),'type':a115_0x1eefd7(0x1c8),'description':a115_0x1eefd7(0x1c2)},{'name':a115_0x1eefd7(0x1d3),'type':'string','description':'Target\x20environment'},{'name':a115_0x1eefd7(0x1bb),'type':a115_0x1eefd7(0x1c8),'description':a115_0x1eefd7(0x1d1)}],upgradeFlags=[{'name':'yes','type':a115_0x1eefd7(0x1ca),'description':a115_0x1eefd7(0x1b4),'default':![]}];export const projectDefinitions=[{'service':a115_0x1eefd7(0x1cb),'command':'init','description':a115_0x1eefd7(0x1b7),'risk':a115_0x1eefd7(0x1d5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x15ff16){const _0x115dbd=a115_0x1eefd7;return await initConfig({'appcode':_0x15ff16[_0x115dbd(0x1cf)]('appcode')||undefined,'env':_0x15ff16[_0x115dbd(0x1cf)]('env')||undefined,'autoYes':_0x15ff16[_0x115dbd(0x1ba)](_0x115dbd(0x1c9))}),{'ok':!![]};}},{'service':a115_0x1eefd7(0x1cb),'command':'create','description':'Create\x20a\x20new\x20project','risk':a115_0x1eefd7(0x1d5),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a115_0x1eefd7(0x1c7),'description':a115_0x1eefd7(0x1c1),'required':![]}],'flags':createFlags,async 'execute'(_0x1e5cc8){const _0x1cf35e=a115_0x1eefd7,{createApp:_0x54f7b4}=await import(_0x1cf35e(0x1bd)),{createProjectNonInteractive:_0x4933d1}=await import(_0x1cf35e(0x1bc)),_0x2d62f4=_0x1e5cc8[_0x1cf35e(0x1cf)](_0x1cf35e(0x1b8))[_0x1cf35e(0x1b1)]()||_0x1e5cc8[_0x1cf35e(0x1d0)][0x0]?.[_0x1cf35e(0x1b1)](),_0x5e4d56=_0x1e5cc8['str'](_0x1cf35e(0x1d3))||undefined,_0x50a04f=_0x1e5cc8[_0x1cf35e(0x1cf)]('appcode')||undefined;if(_0x1e5cc8[_0x1cf35e(0x1b3)]){if(!_0x2d62f4)throw CliErrors['validation'](_0x1cf35e(0x1ce),_0x1cf35e(0x1d4)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x4933d1(_0x2d62f4,_0x5e4d56,_0x50a04f,_0x1e5cc8[_0x1cf35e(0x1c3)]);}else await _0x54f7b4({'projectCode':_0x2d62f4,'appCode':_0x50a04f,'env':_0x5e4d56,'cookie':_0x1e5cc8['cookie']});return{'ok':!![]};}},{'service':a115_0x1eefd7(0x1cb),'command':a115_0x1eefd7(0x1c5),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a115_0x1eefd7(0x1d5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x4f2fc3){const _0x6c832=a115_0x1eefd7;return await upgradeApp(_0x4f2fc3[_0x6c832(0x1b3)],{'yes':_0x4f2fc3[_0x6c832(0x1ba)]('yes')}),{'ok':!![]};}}];
|