@lovrabet/rabetbase-cli 2.1.14-beta.2 → 2.1.14-beta.3
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/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/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/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x534c68,_0x4b0943){const _0x2a9a48=a102_0x3c72,_0x3b0447=_0x534c68();while(!![]){try{const _0x4f542a=parseInt(_0x2a9a48(0x1eb))/0x1+-parseInt(_0x2a9a48(0x18a))/0x2+-parseInt(_0x2a9a48(0x1e6))/0x3*(parseInt(_0x2a9a48(0x191))/0x4)+parseInt(_0x2a9a48(0x1bd))/0x5+parseInt(_0x2a9a48(0x1db))/0x6*(-parseInt(_0x2a9a48(0x182))/0x7)+parseInt(_0x2a9a48(0x1b7))/0x8+parseInt(_0x2a9a48(0x1ec))/0x9*(-parseInt(_0x2a9a48(0x1fd))/0xa);if(_0x4f542a===_0x4b0943)break;else _0x3b0447['push'](_0x3b0447['shift']());}catch(_0x1c28f6){_0x3b0447['push'](_0x3b0447['shift']());}}}(a102_0x473c,0xa0ac4));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';function a102_0x473c(){const _0x71f4e2=['\x22\x20already\x20has\x20undeleted\x20related\x20pages.','datasetCode','version-tag','867752jxSiyL','datasetcode','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','appCode','deleted','menuVisible','\x20--client-operation-id\x20','500wuBjCu','\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','pageVersion','filter','run_sync','pageSets','keys','SUCCESS','\x20page\x20generate-status\x20--datasetcode\x20','str','UNKNOWN','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','PENDING','config','modelCode','completeSets','blocked_complete_plus_residual_sets','name','modelId','\x22\x20belongs\x20to\x20app\x20\x22','pageId','operation-id','Smart\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22','code','\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','string','`\x20instead.','fallbackUndeletedPages','hasMenu','incompleteSets','--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.','isFinite','join','complete','flag','Page\x20\x22','CANCELLED','4649296DTkeUQ','run_generate_start','page-generate-','validation','get','page-','4390375SDUpJY','push','menuPath','fields','operation_pending','versionTag','datasetIds','One\x20of\x20--operation-id\x20or\x20--client-operation-id\x20is\x20required.','generated_complete_set','\x22\x20not\x20found.\x20','unknown','Operation\x20finished\x20for\x20dataset\x20\x22','trim','__EMPTY__','manual_resolution_required','RUNNING','\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.','stringify','\x22\x20has\x20multiple\x20complete\x20Smart\x20List\x20Page\x20sets.','\x22\x20not\x20found.','\x20app\x20use\x20<name>`\x20or\x20pass\x20--appcode.','relatedPageInfoList','\x20page\x20sync\x20--datasetcode\x20','\x22\x20has\x20incomplete\x20Smart\x20List\x20Page\x20sets.','residualPages','Switch\x20app\x20with\x20`','Run\x20`','pages','clientOperationId','blocked_incomplete_sets','56634YZnZLT','alias','toUpperCase','\x20--format\x20json','apiDir','Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.','datasetId','operationId','blocked_multiple_complete_sets','menuPages','isArray','25293ISQCcm','\x22,\x20not\x20current\x20app\x20\x22','title','unknown_reconcile_failed','Smart\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22','1136641jyRxHi','742059hmZYjo','boolean','\x20--appcode\x20','set','status','\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','Dataset\x20\x22','\x22,\x20but\x20Smart\x20List\x20Page\x20facts\x20are\x20unavailable.','length','Available\x20aliases:\x20','map','\x20page\x20standard-page-status\x20--datasetcode\x20','operation_running','query_operation_status','generate','no_standard_pages_found','Alias\x20\x22','50xWVQcA','\x20page\x20generate-start\x20--datasetcode\x20','number','28bVZTVq','totalSets','type','dataset','<empty>'];a102_0x473c=function(){return _0x71f4e2;};return a102_0x473c();}import{CliErrors}from'../../errors.js';export function getPageIdFlag(_0x481e8e){const _0x3dfc42=a102_0x3c72,_0x4d5460=_0x481e8e[_0x3dfc42(0x1b4)]('id');if(typeof _0x4d5460==='number'&&Number[_0x3dfc42(0x1b1)](_0x4d5460)&&_0x4d5460>0x0)return _0x4d5460;return undefined;}export function validateDatasetSelector(_0x364ee4){const _0x47f679=a102_0x3c72,_0x5d6291=Boolean(_0x364ee4['str'](_0x47f679(0x18b))),_0x2226cf=Boolean(_0x364ee4['str'](_0x47f679(0x1dc)));if(_0x5d6291&&_0x2226cf)throw CliErrors[_0x47f679(0x1ba)]('Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.');if(!_0x5d6291&&!_0x2226cf)throw CliErrors[_0x47f679(0x1ba)]('One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.');}export function validateGenerateOperationSelector(_0x29a63e){const _0x561ecb=a102_0x3c72,_0x1d7759=Boolean(_0x29a63e[_0x561ecb(0x19b)](_0x561ecb(0x1a7))),_0xcea434=Boolean(_0x29a63e[_0x561ecb(0x19b)]('client-operation-id'));if(_0x1d7759&&_0xcea434)throw CliErrors['validation']('Use\x20either\x20--operation-id\x20or\x20--client-operation-id,\x20not\x20both.');if(!_0x1d7759&&!_0xcea434)throw CliErrors[_0x561ecb(0x1ba)](_0x561ecb(0x1c4));}export function validatePageTargetSelector(_0x3f264c){const _0x2b5dd1=a102_0x3c72,_0x39cea8=getPageIdFlag(_0x3f264c)!==undefined,_0x506d25=Boolean(_0x3f264c['str'](_0x2b5dd1(0x18b))||_0x3f264c[_0x2b5dd1(0x19b)](_0x2b5dd1(0x1dc)));if(_0x39cea8&&_0x506d25)throw CliErrors[_0x2b5dd1(0x1ba)]('Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.');if(!_0x39cea8&&!_0x506d25)throw CliErrors['validation']('One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.');if(_0x3f264c[_0x2b5dd1(0x19b)](_0x2b5dd1(0x189))&&!_0x506d25)throw CliErrors[_0x2b5dd1(0x1ba)](_0x2b5dd1(0x1b0));}export function resolveDatasetCode(_0x1e2fa7){const _0x551aef=a102_0x3c72;validateDatasetSelector(_0x1e2fa7);const _0xec521e=_0x1e2fa7['str'](_0x551aef(0x18b));if(_0xec521e)return _0xec521e;const _0x424bfb=_0x1e2fa7[_0x551aef(0x19b)]('alias'),_0x5d0df0=resolveApiFilePath(_0x1e2fa7[_0x551aef(0x1df)],_0x1e2fa7[_0x551aef(0x18d)]),_0x3e4007=resolveAlias(_0x1e2fa7['apiDir'],_0x424bfb,undefined,_0x5d0df0);if(_0x3e4007)return _0x3e4007;const _0x1c5fc4=loadAliasMap(_0x1e2fa7[_0x551aef(0x1df)],undefined,_0x5d0df0),_0xe37c37=_0x1c5fc4['length']>0x0?_0x551aef(0x1f5)+_0x1c5fc4[_0x551aef(0x1f6)](_0x54780d=>_0x54780d[_0x551aef(0x1dc)])[_0x551aef(0x1b2)](',\x20'):_0x551aef(0x1d7)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.';throw CliErrors[_0x551aef(0x1ba)](_0x551aef(0x1fc)+_0x424bfb+_0x551aef(0x1c6)+_0xe37c37);}export async function loadDatasetDetailForPage(_0x152894){const _0x4f85b8=a102_0x3c72,_0x52b66b=resolveDatasetCode(_0x152894),_0x5bdc5d=await getDatasetDetail(_0x52b66b),_0x29caa5=normalizeDatasetDetail(_0x5bdc5d,_0x52b66b);return ensureAppOwnership(_0x152894[_0x4f85b8(0x18d)],_0x29caa5['appCode'],_0x4f85b8(0x1f2)+_0x29caa5[_0x4f85b8(0x1a9)]+_0x4f85b8(0x1a5)+_0x29caa5[_0x4f85b8(0x18d)]+'\x22,\x20not\x20current\x20app\x20\x22'+_0x152894[_0x4f85b8(0x18d)]+'\x22.'),_0x29caa5;}export async function loadPageDetailForPage(_0x4ec366,_0x240a69){const _0x5d2c52=a102_0x3c72,_0x365998=await getPageDetail(_0x240a69),_0x412c88=normalizePageDetail(_0x365998);return ensureAppOwnership(_0x4ec366['appCode'],_0x412c88['appCode'],_0x5d2c52(0x1b5)+_0x240a69+_0x5d2c52(0x1a5)+_0x412c88[_0x5d2c52(0x18d)]+_0x5d2c52(0x1e7)+_0x4ec366[_0x5d2c52(0x18d)]+'\x22.'),_0x412c88;}export function getUndeletedRelatedPages(_0x5a68ba){const _0x48bd80=a102_0x3c72;return _0x5a68ba['relatedPages']['filter'](_0x21aa64=>!_0x21aa64[_0x48bd80(0x18e)]);}export function buildPageGenerateOperationStatusQueryCommand(_0x17afe8,_0x170e60){const _0x778664=a102_0x3c72,_0x59108a=_0x170e60?.[_0x778664(0x18d)]&&_0x170e60['appCode'][_0x778664(0x1c9)]()!==''?_0x778664(0x1ee)+_0x170e60[_0x778664(0x18d)]:'',_0x26f162=_0x170e60?.['operationId']&&_0x170e60['operationId'][_0x778664(0x1c9)]()!==''?'\x20--operation-id\x20'+_0x170e60[_0x778664(0x1e2)]:_0x170e60?.[_0x778664(0x1d9)]&&_0x170e60['clientOperationId'][_0x778664(0x1c9)]()!==''?_0x778664(0x190)+_0x170e60[_0x778664(0x1d9)]:'';return CLI_BIN_NAME+_0x778664(0x19a)+_0x17afe8+_0x59108a+_0x26f162+_0x778664(0x1de);}export function createPageGenerateClientOperationId(){const _0x318e80=a102_0x3c72;return _0x318e80(0x1b9)+randomUUID();}export function buildStandardPageStatusQueryCommand(_0x3c6c61,_0x1f257d){const _0x3fba61=a102_0x3c72,_0x47af61=_0x1f257d&&_0x1f257d[_0x3fba61(0x1c9)]()!==''?'\x20--appcode\x20'+_0x1f257d:'';return CLI_BIN_NAME+_0x3fba61(0x1f7)+_0x3c6c61+_0x47af61+_0x3fba61(0x1de);}export function prepareDatasetAction(_0x2703d4,_0x50d6b6){const _0x217907=a102_0x3c72,_0x10de98=getUndeletedRelatedPages(_0x2703d4);if(_0x50d6b6===_0x217907(0x1fa)&&_0x10de98[_0x217907(0x1f4)]>0x0)throw CliErrors['validation'](_0x217907(0x1f2)+_0x2703d4[_0x217907(0x1a9)]+_0x217907(0x187),_0x217907(0x1d7)+CLI_BIN_NAME+_0x217907(0x1d3)+_0x2703d4[_0x217907(0x1a9)]+_0x217907(0x1ac));if(_0x50d6b6==='sync'&&_0x10de98[_0x217907(0x1f4)]===0x0)throw CliErrors[_0x217907(0x1ba)]('Dataset\x20\x22'+_0x2703d4['code']+_0x217907(0x19d),'Run\x20`'+CLI_BIN_NAME+_0x217907(0x1fe)+_0x2703d4[_0x217907(0x1a9)]+'`\x20first,\x20then\x20poll\x20`'+CLI_BIN_NAME+_0x217907(0x19a)+_0x2703d4[_0x217907(0x1a9)]+_0x217907(0x1cd));return{'dataset':_0x2703d4,'undeletedPages':_0x10de98};}export function prepareGenerateDatasetAction(_0xf554a8,_0x1ee492){const _0x266f78=a102_0x3c72,_0x1dde16=getUndeletedRelatedPages(_0xf554a8);if(!_0x1ee492){if(_0x1dde16[_0x266f78(0x1f4)]>0x0)throw CliErrors[_0x266f78(0x1ba)](_0x266f78(0x1f2)+_0xf554a8[_0x266f78(0x1a9)]+_0x266f78(0x187),_0x266f78(0x1d7)+CLI_BIN_NAME+_0x266f78(0x1d3)+_0xf554a8[_0x266f78(0x1a9)]+_0x266f78(0x1ac));return{'dataset':_0xf554a8,'undeletedPages':_0x1dde16,'standardPageStatus':null};}const _0x298d78=_0x1ee492[_0x266f78(0x1a1)],_0xa29acd=_0x1ee492[_0x266f78(0x1af)],_0x17e9f3=_0x1ee492['residualPages'][_0x266f78(0x1f4)];if(_0x298d78===0x0&&_0xa29acd===0x0&&_0x17e9f3===0x0)return{'dataset':_0xf554a8,'undeletedPages':_0x1dde16,'standardPageStatus':_0x1ee492};if(_0x298d78===0x1&&_0xa29acd===0x0&&_0x17e9f3===0x0)throw CliErrors[_0x266f78(0x1ba)](_0x266f78(0x1f2)+_0xf554a8[_0x266f78(0x1a9)]+_0x266f78(0x193),'Run\x20`'+CLI_BIN_NAME+_0x266f78(0x1d3)+_0xf554a8[_0x266f78(0x1a9)]+_0x266f78(0x1ac));throw CliErrors[_0x266f78(0x1ba)](_0x266f78(0x1f2)+_0xf554a8[_0x266f78(0x1a9)]+'\x22\x20has\x20multiple\x20or\x20incomplete\x20Smart\x20List\x20Page\x20sets.',_0x266f78(0x1e0));}export function assessStandardPageState(_0x20a7da,_0x1a7266,_0x255210){const _0x2d76f1=a102_0x3c72,_0x36a01e=_0x255210?.['successStatus']??'already_exists_complete_set',_0x581d22=_0x255210?.[_0x2d76f1(0x1ad)]??[];if(!_0x1a7266){if(_0x581d22[_0x2d76f1(0x1f4)]>0x0)return{'status':'blocked_incomplete_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':_0x2d76f1(0x1f2)+_0x20a7da+_0x2d76f1(0x192),'nextAction':_0x2d76f1(0x1cb)};return{'status':_0x2d76f1(0x1fb),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x2d76f1(0x1f2)+_0x20a7da+_0x2d76f1(0x1aa),'nextAction':'run_generate_start'};}const _0x8c400d=_0x1a7266[_0x2d76f1(0x1a1)],_0xa512=_0x1a7266[_0x2d76f1(0x1af)],_0x494b6c=_0x1a7266['residualPages'][_0x2d76f1(0x1f4)];if(_0x8c400d===0x0&&_0xa512===0x0&&_0x494b6c===0x0)return{'status':_0x2d76f1(0x1fb),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x2d76f1(0x1f2)+_0x20a7da+_0x2d76f1(0x1aa),'nextAction':_0x2d76f1(0x1b8)};if(_0x8c400d>0x1)return{'status':_0x2d76f1(0x1e3),'allowGenerate':![],'manualResolutionRequired':!![],'message':'Dataset\x20\x22'+_0x20a7da+_0x2d76f1(0x1cf),'nextAction':'manual_resolution_required'};if(_0xa512>0x0)return{'status':_0x2d76f1(0x1da),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x2d76f1(0x1f2)+_0x20a7da+_0x2d76f1(0x1d4),'nextAction':_0x2d76f1(0x1cb)};if(_0x8c400d===0x1&&_0x494b6c>0x0)return{'status':_0x2d76f1(0x1a2),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x2d76f1(0x1f2)+_0x20a7da+_0x2d76f1(0x1f1),'nextAction':_0x2d76f1(0x1cb)};if(_0x8c400d===0x1)return{'status':_0x36a01e,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x36a01e===_0x2d76f1(0x1c5)?_0x2d76f1(0x1f2)+_0x20a7da+'\x22\x20now\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.':_0x2d76f1(0x1f2)+_0x20a7da+_0x2d76f1(0x193),'nextAction':_0x36a01e==='generated_complete_set'?undefined:_0x2d76f1(0x196)};return{'status':_0x2d76f1(0x1e9),'allowGenerate':![],'manualResolutionRequired':![],'message':_0x2d76f1(0x1f2)+_0x20a7da+'\x22\x20returned\x20an\x20unsupported\x20Smart\x20List\x20Page\x20state.','nextAction':_0x2d76f1(0x1f9)};}export function assessGenerateOperationState(_0x9df6fa,_0x4fde62,_0x30bd88){const _0x131557=a102_0x3c72,_0x1c1be6=String(_0x4fde62||'')[_0x131557(0x1c9)]()[_0x131557(0x1dd)]();if(_0x1c1be6===_0x131557(0x19e))return{'status':_0x131557(0x1c1),'manualResolutionRequired':![],'message':_0x131557(0x1a8)+_0x9df6fa+'\x22.','nextAction':_0x131557(0x1f9)};if(_0x1c1be6===_0x131557(0x1cc)||_0x1c1be6==='RETRYING'||_0x1c1be6==='CANCELING')return{'status':_0x131557(0x1f8),'manualResolutionRequired':![],'message':_0x131557(0x1ea)+_0x9df6fa+'\x22.','nextAction':_0x131557(0x1f9)};if(_0x1c1be6===_0x131557(0x199)||_0x1c1be6==='PARTIAL_SUCCESS'){if(!_0x30bd88)return{'status':_0x131557(0x1e9),'manualResolutionRequired':![],'message':_0x131557(0x1c8)+_0x9df6fa+_0x131557(0x1f3),'nextAction':_0x131557(0x1f9)};const _0x3954a5=assessStandardPageState(_0x9df6fa,_0x30bd88,{'successStatus':'generated_complete_set'});if(_0x3954a5[_0x131557(0x1f0)]==='no_standard_pages_found')return{'status':'unknown_reconcile_failed','manualResolutionRequired':![],'message':_0x131557(0x1c8)+_0x9df6fa+'\x22,\x20but\x20no\x20Smart\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','nextAction':'query_operation_status'};return _0x3954a5;}if(_0x1c1be6==='FAILED'||_0x1c1be6===_0x131557(0x1b6)||_0x1c1be6==='')return{'status':'operation_failed','manualResolutionRequired':![],'message':'Smart\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22'+_0x9df6fa+'\x22.','nextAction':_0x131557(0x1f9)};return{'status':_0x131557(0x1e9),'manualResolutionRequired':![],'message':_0x131557(0x1f2)+_0x9df6fa+_0x131557(0x18c)+_0x1c1be6+'\x22.','nextAction':_0x131557(0x1f9)};}export function normalizePageDetail(_0x5bd189){const _0x8a4f18=a102_0x3c72;return{'pageId':Number(_0x5bd189[_0x8a4f18(0x1a6)]),'appCode':_0x5bd189[_0x8a4f18(0x18d)],'name':_0x5bd189[_0x8a4f18(0x1a3)]||_0x8a4f18(0x1bc)+_0x5bd189[_0x8a4f18(0x1a6)],'code':_0x5bd189[_0x8a4f18(0x1a9)]||'','type':_0x5bd189[_0x8a4f18(0x184)]?String(_0x5bd189['type']):'UNKNOWN','datasetIds':Array[_0x8a4f18(0x1e5)](_0x5bd189[_0x8a4f18(0x1c3)])?_0x5bd189[_0x8a4f18(0x1c3)][_0x8a4f18(0x1f6)](_0x240bac=>Number(_0x240bac))[_0x8a4f18(0x195)](_0x174a0c=>Number[_0x8a4f18(0x1b1)](_0x174a0c)):[],'pageVersion':_0x5bd189[_0x8a4f18(0x19f)]&&typeof _0x5bd189[_0x8a4f18(0x19f)]['pageVersion']===_0x8a4f18(0x181)?_0x5bd189[_0x8a4f18(0x19f)][_0x8a4f18(0x194)]:null,'versionTag':_0x5bd189['config']&&typeof _0x5bd189[_0x8a4f18(0x19f)][_0x8a4f18(0x1c2)]==='string'&&_0x5bd189[_0x8a4f18(0x19f)]['versionTag'][_0x8a4f18(0x1c9)]()!==''?_0x5bd189[_0x8a4f18(0x19f)]['versionTag']:null,'relatedPages':normalizeRelatedPages(_0x5bd189[_0x8a4f18(0x1d2)]),'raw':_0x5bd189};}export function serializeDryRunDescription(_0x4b3b13){const _0x899731=a102_0x3c72;return JSON[_0x899731(0x1ce)](_0x4b3b13,null,0x2);}export async function loadStandardPageStatusForGenerate(_0x7809ba,_0x4ab41a){const _0x44a1b7=a102_0x3c72,_0x5dfb49=await tryGetStandardPageStatus(_0x7809ba[_0x44a1b7(0x18d)],_0x4ab41a);if(!_0x5dfb49)return null;return normalizeStandardPageStatus(_0x5dfb49,_0x4ab41a);}function a102_0x3c72(_0x1eda1c,_0x557bce){_0x1eda1c=_0x1eda1c-0x181;const _0x473c9f=a102_0x473c();let _0x3c7262=_0x473c9f[_0x1eda1c];return _0x3c7262;}export function selectVersionTagGroup(_0x244077,_0x2e7dd6,_0x10986b){const _0x902a44=a102_0x3c72,_0x4fd9ba=new Map();for(const _0x1bad44 of _0x244077){const _0x2bd604=normalizeVersionTag(_0x2e7dd6(_0x1bad44)),_0x510d4f=_0x4fd9ba['get'](_0x2bd604)??[];_0x510d4f[_0x902a44(0x1be)](_0x1bad44),_0x4fd9ba[_0x902a44(0x1ef)](_0x2bd604,_0x510d4f);}const _0x14ddab=Array['from'](_0x4fd9ba[_0x902a44(0x198)]());if(_0x14ddab[_0x902a44(0x1f4)]<=0x1&&!_0x10986b)return{'items':_0x244077,'availableTags':_0x14ddab};if(_0x10986b){const _0x190708=normalizeVersionTag(_0x10986b),_0x531489=_0x4fd9ba[_0x902a44(0x1bb)](_0x190708);if(!_0x531489)throw CliErrors['validation']('Version\x20tag\x20\x22'+_0x10986b+_0x902a44(0x1d0),buildVersionTagHint(_0x14ddab));return{'items':_0x531489,'availableTags':_0x14ddab};}throw CliErrors[_0x902a44(0x1ba)]('Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.',buildVersionTagHint(_0x14ddab));}function normalizeDatasetDetail(_0x38465b,_0x119786){const _0x1d6c31=a102_0x3c72,_0xbe6d2e=Array['isArray'](_0x38465b[_0x1d6c31(0x1c0)])?_0x38465b[_0x1d6c31(0x1c0)]:Array[_0x1d6c31(0x1e5)](_0x38465b['properties'])?_0x38465b['properties']:[];return{'id':Number(_0x38465b['id']??_0x38465b[_0x1d6c31(0x1a4)]??0x0),'code':String(_0x38465b[_0x1d6c31(0x1a9)]||_0x38465b[_0x1d6c31(0x1a0)]||_0x119786),'name':String(_0x38465b[_0x1d6c31(0x1a3)]||_0x119786),'appCode':_0x38465b['appCode']||_0x38465b[_0x1d6c31(0x185)]?.[_0x1d6c31(0x18d)],'fieldCount':_0xbe6d2e[_0x1d6c31(0x1f4)],'relatedPages':normalizeRelatedPages(_0x38465b[_0x1d6c31(0x1d2)]),'raw':_0x38465b};}function normalizeStandardPageStatus(_0x2a36d1,_0x547ea3){const _0x334130=a102_0x3c72,_0x5257b9=_0xa8471c=>({'pageId':Number(_0xa8471c[_0x334130(0x1a6)]??_0xa8471c['id']??0x0),'title':String(_0xa8471c[_0x334130(0x1e8)]||_0xa8471c[_0x334130(0x1a3)]||_0x334130(0x1bc)+(_0xa8471c[_0x334130(0x1a6)]??_0xa8471c['id']??_0x334130(0x1c7))),'type':_0xa8471c[_0x334130(0x184)]?String(_0xa8471c[_0x334130(0x184)]):'UNKNOWN','deleted':_0xa8471c[_0x334130(0x18e)]===!![],'hasMenu':_0xa8471c[_0x334130(0x1ae)]===!![],'menuVisible':typeof _0xa8471c[_0x334130(0x18f)]===_0x334130(0x1ed)?_0xa8471c[_0x334130(0x18f)]:null,'menuPath':typeof _0xa8471c[_0x334130(0x1bf)]===_0x334130(0x1ab)&&_0xa8471c['menuPath'][_0x334130(0x1c9)]()!==''?_0xa8471c[_0x334130(0x1bf)]:null}),_0x488bfe=Array[_0x334130(0x1e5)](_0x2a36d1[_0x334130(0x197)])?_0x2a36d1['pageSets']['map'](_0x5ce62d=>({'versionTag':typeof _0x5ce62d[_0x334130(0x1c2)]===_0x334130(0x1ab)&&_0x5ce62d[_0x334130(0x1c2)][_0x334130(0x1c9)]()!==''?_0x5ce62d['versionTag']:null,'complete':_0x5ce62d[_0x334130(0x1b3)]===!![],'pages':Array[_0x334130(0x1e5)](_0x5ce62d[_0x334130(0x1d8)])?_0x5ce62d[_0x334130(0x1d8)]['map'](_0x5257b9):[]})):[];return{'datasetId':typeof _0x2a36d1['datasetId']===_0x334130(0x181)&&Number[_0x334130(0x1b1)](_0x2a36d1[_0x334130(0x1e1)])?_0x2a36d1[_0x334130(0x1e1)]:null,'datasetCode':typeof _0x2a36d1[_0x334130(0x188)]===_0x334130(0x1ab)&&_0x2a36d1[_0x334130(0x188)][_0x334130(0x1c9)]()!==''?_0x2a36d1[_0x334130(0x188)]:_0x547ea3,'pageSets':_0x488bfe,'totalSets':typeof _0x2a36d1[_0x334130(0x183)]===_0x334130(0x181)&&Number[_0x334130(0x1b1)](_0x2a36d1[_0x334130(0x183)])?_0x2a36d1['totalSets']:_0x488bfe[_0x334130(0x1f4)],'completeSets':typeof _0x2a36d1[_0x334130(0x1a1)]==='number'&&Number[_0x334130(0x1b1)](_0x2a36d1['completeSets'])?_0x2a36d1[_0x334130(0x1a1)]:_0x488bfe[_0x334130(0x195)](_0x4f141c=>_0x4f141c[_0x334130(0x1b3)])['length'],'incompleteSets':typeof _0x2a36d1[_0x334130(0x1af)]===_0x334130(0x181)&&Number['isFinite'](_0x2a36d1[_0x334130(0x1af)])?_0x2a36d1[_0x334130(0x1af)]:_0x488bfe[_0x334130(0x195)](_0x445e17=>!_0x445e17[_0x334130(0x1b3)]&&_0x445e17[_0x334130(0x1d8)][_0x334130(0x1f4)]>0x0)[_0x334130(0x1f4)],'residualPages':Array['isArray'](_0x2a36d1[_0x334130(0x1d5)])?_0x2a36d1[_0x334130(0x1d5)][_0x334130(0x1f6)](_0x5257b9):[],'menuPages':Array[_0x334130(0x1e5)](_0x2a36d1[_0x334130(0x1e4)])?_0x2a36d1[_0x334130(0x1e4)][_0x334130(0x1f6)](_0x5257b9):[],'source':'standard-page-status'};}function normalizeRelatedPages(_0x1c88ee){const _0x3962cd=a102_0x3c72;if(!Array[_0x3962cd(0x1e5)](_0x1c88ee))return[];return _0x1c88ee[_0x3962cd(0x195)](_0x485abc=>_0x485abc&&typeof _0x485abc==='object')['map'](_0x6b036c=>({'id':Number(_0x6b036c['id']),'type':_0x6b036c['type']?String(_0x6b036c['type']):_0x3962cd(0x19c),'code':_0x6b036c[_0x3962cd(0x1a9)]||undefined,'title':_0x6b036c[_0x3962cd(0x1e8)]||_0x6b036c[_0x3962cd(0x1a3)]||'page-'+_0x6b036c['id'],'deleted':_0x6b036c[_0x3962cd(0x18e)]===!![]}))[_0x3962cd(0x195)](_0x3984af=>Number['isFinite'](_0x3984af['id']));}function ensureAppOwnership(_0x3a8ae5,_0x1b814c,_0x5176a4){const _0x3aef88=a102_0x3c72;if(!_0x1b814c)return;if(_0x1b814c!==_0x3a8ae5)throw CliErrors[_0x3aef88(0x1ba)](_0x5176a4,_0x3aef88(0x1d6)+CLI_BIN_NAME+_0x3aef88(0x1d1));}function normalizeVersionTag(_0xcfb735){const _0x112223=a102_0x3c72;return _0xcfb735&&_0xcfb735[_0x112223(0x1c9)]()!==''?_0xcfb735:_0x112223(0x1ca);}function buildVersionTagHint(_0x7fd05a){const _0x17479c=a102_0x3c72,_0x4f0119=_0x7fd05a[_0x17479c(0x1f6)](_0xfff063=>_0xfff063===_0x17479c(0x1ca)?_0x17479c(0x186):_0xfff063)[_0x17479c(0x1b2)](',\x20');return'Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20'+_0x4f0119;}
|
|
1
|
+
(function(_0xc780a6,_0x1a9124){const _0x71c87c=a102_0x5892,_0x59a479=_0xc780a6();while(!![]){try{const _0x433dc6=parseInt(_0x71c87c(0xee))/0x1*(-parseInt(_0x71c87c(0xfb))/0x2)+-parseInt(_0x71c87c(0x142))/0x3*(parseInt(_0x71c87c(0xfa))/0x4)+parseInt(_0x71c87c(0x12d))/0x5*(parseInt(_0x71c87c(0x118))/0x6)+parseInt(_0x71c87c(0x133))/0x7*(-parseInt(_0x71c87c(0xc9))/0x8)+parseInt(_0x71c87c(0x123))/0x9*(parseInt(_0x71c87c(0xfc))/0xa)+parseInt(_0x71c87c(0xd7))/0xb*(-parseInt(_0x71c87c(0xf7))/0xc)+-parseInt(_0x71c87c(0xd1))/0xd*(-parseInt(_0x71c87c(0xef))/0xe);if(_0x433dc6===_0x1a9124)break;else _0x59a479['push'](_0x59a479['shift']());}catch(_0x584ed3){_0x59a479['push'](_0x59a479['shift']());}}}(a102_0x2579,0xba00a));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(_0x1a0929){const _0x237a7f=a102_0x5892,_0x3b7c58=_0x1a0929['flag']('id');if(typeof _0x3b7c58===_0x237a7f(0x109)&&Number['isFinite'](_0x3b7c58)&&_0x3b7c58>0x0)return _0x3b7c58;return undefined;}export function validateDatasetSelector(_0x1c0f1f){const _0x173b1d=a102_0x5892,_0x39d512=Boolean(_0x1c0f1f['str'](_0x173b1d(0x13a))),_0x177d7=Boolean(_0x1c0f1f[_0x173b1d(0x125)](_0x173b1d(0x115)));if(_0x39d512&&_0x177d7)throw CliErrors['validation'](_0x173b1d(0x11c));if(!_0x39d512&&!_0x177d7)throw CliErrors[_0x173b1d(0x138)](_0x173b1d(0x13d));}export function validateGenerateOperationSelector(_0x2f6220){const _0x24234c=a102_0x5892,_0xb9df61=Boolean(_0x2f6220[_0x24234c(0x125)]('operation-id')),_0x5ac3c3=Boolean(_0x2f6220[_0x24234c(0x125)](_0x24234c(0xf9)));if(_0xb9df61&&_0x5ac3c3)throw CliErrors['validation']('Use\x20either\x20--operation-id\x20or\x20--client-operation-id,\x20not\x20both.');if(!_0xb9df61&&!_0x5ac3c3)throw CliErrors[_0x24234c(0x138)](_0x24234c(0xe5));}export function validatePageTargetSelector(_0x4d2dc8){const _0x4ef159=a102_0x5892,_0x437af5=getPageIdFlag(_0x4d2dc8)!==undefined,_0x5b50c7=Boolean(_0x4d2dc8[_0x4ef159(0x125)](_0x4ef159(0x13a))||_0x4d2dc8[_0x4ef159(0x125)](_0x4ef159(0x115)));if(_0x437af5&&_0x5b50c7)throw CliErrors[_0x4ef159(0x138)](_0x4ef159(0x147));if(!_0x437af5&&!_0x5b50c7)throw CliErrors[_0x4ef159(0x138)](_0x4ef159(0x112));if(_0x4d2dc8[_0x4ef159(0x125)](_0x4ef159(0xec))&&!_0x5b50c7)throw CliErrors[_0x4ef159(0x138)]('--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.');}export function resolveDatasetCode(_0x11ff5e){const _0x33e5ed=a102_0x5892;validateDatasetSelector(_0x11ff5e);const _0x243b3f=_0x11ff5e[_0x33e5ed(0x125)](_0x33e5ed(0x13a));if(_0x243b3f)return _0x243b3f;const _0x3a82e8=_0x11ff5e[_0x33e5ed(0x125)]('alias'),_0x471983=resolveApiFilePath(_0x11ff5e[_0x33e5ed(0x124)],_0x11ff5e['appCode']),_0x85cb82=resolveAlias(_0x11ff5e[_0x33e5ed(0x124)],_0x3a82e8,undefined,_0x471983);if(_0x85cb82)return _0x85cb82;const _0x4e822e=loadAliasMap(_0x11ff5e[_0x33e5ed(0x124)],undefined,_0x471983),_0x349fa7=_0x4e822e[_0x33e5ed(0xfe)]>0x0?_0x33e5ed(0x116)+_0x4e822e[_0x33e5ed(0x10b)](_0x577193=>_0x577193[_0x33e5ed(0x115)])[_0x33e5ed(0xf2)](',\x20'):_0x33e5ed(0x136)+CLI_BIN_NAME+_0x33e5ed(0xf1);throw CliErrors[_0x33e5ed(0x138)](_0x33e5ed(0xe0)+_0x3a82e8+'\x22\x20not\x20found.\x20'+_0x349fa7);}export async function loadDatasetDetailForPage(_0x5b43ff){const _0x301e09=a102_0x5892,_0x566b7c=resolveDatasetCode(_0x5b43ff),_0x4b0f0d=await getDatasetDetail(_0x566b7c),_0x2249e9=normalizeDatasetDetail(_0x4b0f0d,_0x566b7c);return ensureAppOwnership(_0x5b43ff[_0x301e09(0xe2)],_0x2249e9[_0x301e09(0xe2)],_0x301e09(0xcb)+_0x2249e9[_0x301e09(0x12f)]+_0x301e09(0x129)+_0x2249e9[_0x301e09(0xe2)]+_0x301e09(0x101)+_0x5b43ff[_0x301e09(0xe2)]+'\x22.'),_0x2249e9;}function a102_0x5892(_0x5dedec,_0x248807){_0x5dedec=_0x5dedec-0xc4;const _0x25794=a102_0x2579();let _0x58924b=_0x25794[_0x5dedec];return _0x58924b;}export async function loadPageDetailForPage(_0x1771c7,_0x588797){const _0x5c0839=a102_0x5892,_0x384d63=await getPageDetail(_0x588797),_0x508a58=normalizePageDetail(_0x384d63);return ensureAppOwnership(_0x1771c7[_0x5c0839(0xe2)],_0x508a58[_0x5c0839(0xe2)],'Page\x20\x22'+_0x588797+_0x5c0839(0x129)+_0x508a58[_0x5c0839(0xe2)]+_0x5c0839(0x101)+_0x1771c7[_0x5c0839(0xe2)]+'\x22.'),_0x508a58;}export function getUndeletedRelatedPages(_0x591752){const _0x2bcaa8=a102_0x5892;return _0x591752[_0x2bcaa8(0xe7)][_0x2bcaa8(0xf8)](_0x3a4246=>!_0x3a4246[_0x2bcaa8(0xff)]);}export function buildPageGenerateOperationStatusQueryCommand(_0x462c62,_0x227142){const _0x11a2f4=a102_0x5892,_0x3acd83=_0x227142?.['appCode']&&_0x227142[_0x11a2f4(0xe2)]['trim']()!==''?_0x11a2f4(0xd6)+_0x227142[_0x11a2f4(0xe2)]:'',_0x3517b9=_0x227142?.[_0x11a2f4(0x117)]&&_0x227142[_0x11a2f4(0x117)][_0x11a2f4(0x10f)]()!==''?_0x11a2f4(0x104)+_0x227142['operationId']:_0x227142?.[_0x11a2f4(0x141)]&&_0x227142[_0x11a2f4(0x141)][_0x11a2f4(0x10f)]()!==''?'\x20--client-operation-id\x20'+_0x227142[_0x11a2f4(0x141)]:'';return CLI_BIN_NAME+_0x11a2f4(0xd5)+_0x462c62+_0x3acd83+_0x3517b9+_0x11a2f4(0xcf);}export function createPageGenerateClientOperationId(){return'page-generate-'+randomUUID();}export function buildStandardPageStatusQueryCommand(_0x548bc4,_0x170fc9){const _0x596020=a102_0x5892,_0xfaa367=_0x170fc9&&_0x170fc9[_0x596020(0x10f)]()!==''?_0x596020(0xd6)+_0x170fc9:'';return CLI_BIN_NAME+'\x20page\x20standard-page-status\x20--datasetcode\x20'+_0x548bc4+_0xfaa367+_0x596020(0xcf);}export function prepareDatasetAction(_0x50f3ae,_0x5d7caa){const _0x19a807=a102_0x5892,_0x4e4c67=getUndeletedRelatedPages(_0x50f3ae);if(_0x5d7caa===_0x19a807(0xdd)&&_0x4e4c67[_0x19a807(0xfe)]>0x0)throw CliErrors[_0x19a807(0x138)](_0x19a807(0xcb)+_0x50f3ae['code']+'\x22\x20already\x20has\x20undeleted\x20related\x20pages.',_0x19a807(0x136)+CLI_BIN_NAME+'\x20page\x20sync\x20--datasetcode\x20'+_0x50f3ae[_0x19a807(0x12f)]+_0x19a807(0xf6));if(_0x5d7caa===_0x19a807(0xe1)&&_0x4e4c67[_0x19a807(0xfe)]===0x0)throw CliErrors['validation']('Dataset\x20\x22'+_0x50f3ae[_0x19a807(0x12f)]+_0x19a807(0xe4),_0x19a807(0x136)+CLI_BIN_NAME+_0x19a807(0xea)+_0x50f3ae['code']+_0x19a807(0xf4)+CLI_BIN_NAME+_0x19a807(0xd5)+_0x50f3ae[_0x19a807(0x12f)]+_0x19a807(0x11b));return{'dataset':_0x50f3ae,'undeletedPages':_0x4e4c67};}export function prepareGenerateDatasetAction(_0x44730c,_0x2866b8){const _0x4e07b1=a102_0x5892,_0x829293=getUndeletedRelatedPages(_0x44730c);if(!_0x2866b8){if(_0x829293[_0x4e07b1(0xfe)]>0x0)throw CliErrors[_0x4e07b1(0x138)](_0x4e07b1(0xcb)+_0x44730c[_0x4e07b1(0x12f)]+_0x4e07b1(0x10e),_0x4e07b1(0x136)+CLI_BIN_NAME+_0x4e07b1(0x11e)+_0x44730c[_0x4e07b1(0x12f)]+'`\x20instead.');return{'dataset':_0x44730c,'undeletedPages':_0x829293,'standardPageStatus':null};}const _0x5b7fb9=_0x2866b8[_0x4e07b1(0xdb)],_0xbc854d=_0x2866b8[_0x4e07b1(0x120)],_0x100500=_0x2866b8[_0x4e07b1(0x11a)][_0x4e07b1(0xfe)];if(_0x5b7fb9===0x0&&_0xbc854d===0x0&&_0x100500===0x0)return{'dataset':_0x44730c,'undeletedPages':_0x829293,'standardPageStatus':_0x2866b8};if(_0x5b7fb9===0x1&&_0xbc854d===0x0&&_0x100500===0x0)throw CliErrors[_0x4e07b1(0x138)]('Dataset\x20\x22'+_0x44730c['code']+'\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.',_0x4e07b1(0x136)+CLI_BIN_NAME+_0x4e07b1(0x11e)+_0x44730c[_0x4e07b1(0x12f)]+_0x4e07b1(0xf6));throw CliErrors[_0x4e07b1(0x138)]('Dataset\x20\x22'+_0x44730c[_0x4e07b1(0x12f)]+_0x4e07b1(0xc5),_0x4e07b1(0x127));}export function assessStandardPageState(_0xb23067,_0x34e4e2,_0x2f03e2){const _0x28cb2b=a102_0x5892,_0x3da79e=_0x2f03e2?.[_0x28cb2b(0x10c)]??_0x28cb2b(0x14c),_0x10eb65=_0x2f03e2?.[_0x28cb2b(0x119)]??[];if(!_0x34e4e2){if(_0x10eb65['length']>0x0)return{'status':_0x28cb2b(0xe8),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x28cb2b(0xcb)+_0xb23067+_0x28cb2b(0x10d),'nextAction':_0x28cb2b(0xd2)};return{'status':_0x28cb2b(0x13e),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x28cb2b(0xcb)+_0xb23067+'\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','nextAction':_0x28cb2b(0x131)};}const _0x1ccc1f=_0x34e4e2[_0x28cb2b(0xdb)],_0x3fdc6c=_0x34e4e2[_0x28cb2b(0x120)],_0xa7bf9e=_0x34e4e2[_0x28cb2b(0x11a)][_0x28cb2b(0xfe)];if(_0x1ccc1f===0x0&&_0x3fdc6c===0x0&&_0xa7bf9e===0x0)return{'status':_0x28cb2b(0x13e),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x28cb2b(0xcb)+_0xb23067+_0x28cb2b(0x14d),'nextAction':_0x28cb2b(0x131)};if(_0x1ccc1f>0x1)return{'status':_0x28cb2b(0xd0),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x28cb2b(0xcb)+_0xb23067+'\x22\x20has\x20multiple\x20complete\x20Smart\x20List\x20Page\x20sets.','nextAction':_0x28cb2b(0xd2)};if(_0x3fdc6c>0x0)return{'status':_0x28cb2b(0xe8),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x28cb2b(0xcb)+_0xb23067+_0x28cb2b(0x12c),'nextAction':_0x28cb2b(0xd2)};if(_0x1ccc1f===0x1&&_0xa7bf9e>0x0)return{'status':'blocked_complete_plus_residual_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':_0x28cb2b(0xcb)+_0xb23067+_0x28cb2b(0x108),'nextAction':_0x28cb2b(0xd2)};if(_0x1ccc1f===0x1)return{'status':_0x3da79e,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x3da79e==='generated_complete_set'?'Dataset\x20\x22'+_0xb23067+'\x22\x20now\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.':_0x28cb2b(0xcb)+_0xb23067+_0x28cb2b(0x14a),'nextAction':_0x3da79e==='generated_complete_set'?undefined:_0x28cb2b(0xfd)};return{'status':_0x28cb2b(0xf3),'allowGenerate':![],'manualResolutionRequired':![],'message':_0x28cb2b(0xcb)+_0xb23067+_0x28cb2b(0xf5),'nextAction':_0x28cb2b(0xce)};}function a102_0x2579(){const _0x2f7987=['validation','get','datasetcode','Version\x20tag\x20\x22','totalSets','One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.','no_standard_pages_found','\x22,\x20but\x20Smart\x20List\x20Page\x20facts\x20are\x20unavailable.','Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.','clientOperationId','3wGfIvG','string','modelId','config','PENDING','Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.','datasetIds','pages','\x22\x20already\x20has\x20one\x20complete\x20Smart\x20List\x20Page\x20set.','PARTIAL_SUCCESS','already_exists_complete_set','\x22\x20has\x20no\x20Smart\x20List\x20Pages\x20yet.','fields','\x22\x20has\x20multiple\x20or\x20incomplete\x20Smart\x20List\x20Page\x20sets.','dataset','push','Smart\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22','360QeWbwd','operation_running','Dataset\x20\x22','\x22\x20not\x20found.','type','query_operation_status','\x20--format\x20json','blocked_multiple_complete_sets','1625OKOiDf','manual_resolution_required','\x20app\x20use\x20<name>`\x20or\x20pass\x20--appcode.','properties','\x20page\x20generate-status\x20--datasetcode\x20','\x20--appcode\x20','10536229Uvyjhf','set','operation_pending','SUCCESS','completeSets','Operation\x20finished\x20for\x20dataset\x20\x22','generate','pageSets','Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20','Alias\x20\x22','sync','appCode','modelCode','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','One\x20of\x20--operation-id\x20or\x20--client-operation-id\x20is\x20required.','isArray','relatedPages','blocked_incomplete_sets','isFinite','\x20page\x20generate-start\x20--datasetcode\x20','Switch\x20app\x20with\x20`','version-tag','Smart\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22','427763QiukKe','243460nBoDXW','CANCELLED','\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.','join','unknown_reconcile_failed','`\x20first,\x20then\x20poll\x20`','\x22\x20returned\x20an\x20unsupported\x20Smart\x20List\x20Page\x20state.','`\x20instead.','12MYqjDd','filter','client-operation-id','1839564SzXtra','2FVTnFq','10LIMkmr','run_sync','length','deleted','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','\x22,\x20not\x20current\x20app\x20\x22','RETRYING','title','\x20--operation-id\x20','FAILED','relatedPageInfoList','object','\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','number','__EMPTY__','map','successStatus','\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','trim','generated_complete_set','UNKNOWN','One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.','Smart\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22','menuPages','alias','Available\x20aliases:\x20','operationId','24okpYLY','fallbackUndeletedPages','residualPages','\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.','Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.','hasMenu','\x20page\x20sync\x20--datasetcode\x20','complete','incompleteSets','pageVersion','name','7528104RNNvnx','apiDir','str','menuPath','Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.','standard-page-status','\x22\x20belongs\x20to\x20app\x20\x22','unknown','menuVisible','\x22\x20has\x20incomplete\x20Smart\x20List\x20Page\x20sets.','278260FGbpUC','RUNNING','code','status','run_generate_start','datasetId','97293PYcEiW','page-','versionTag','Run\x20`','pageId'];a102_0x2579=function(){return _0x2f7987;};return a102_0x2579();}export function assessGenerateOperationState(_0x5e017d,_0xbaadd0,_0xc42e4b){const _0x2d6cf0=a102_0x5892,_0x318ffb=String(_0xbaadd0||'')[_0x2d6cf0(0x10f)]()['toUpperCase']();if(_0x318ffb===_0x2d6cf0(0x146))return{'status':_0x2d6cf0(0xd9),'manualResolutionRequired':![],'message':_0x2d6cf0(0xc8)+_0x5e017d+'\x22.','nextAction':_0x2d6cf0(0xce)};if(_0x318ffb===_0x2d6cf0(0x12e)||_0x318ffb===_0x2d6cf0(0x102)||_0x318ffb==='CANCELING')return{'status':_0x2d6cf0(0xca),'manualResolutionRequired':![],'message':_0x2d6cf0(0xed)+_0x5e017d+'\x22.','nextAction':_0x2d6cf0(0xce)};if(_0x318ffb===_0x2d6cf0(0xda)||_0x318ffb===_0x2d6cf0(0x14b)){if(!_0xc42e4b)return{'status':_0x2d6cf0(0xf3),'manualResolutionRequired':![],'message':_0x2d6cf0(0xdc)+_0x5e017d+_0x2d6cf0(0x13f),'nextAction':_0x2d6cf0(0xce)};const _0x1ebdc3=assessStandardPageState(_0x5e017d,_0xc42e4b,{'successStatus':_0x2d6cf0(0x110)});if(_0x1ebdc3[_0x2d6cf0(0x130)]===_0x2d6cf0(0x13e))return{'status':_0x2d6cf0(0xf3),'manualResolutionRequired':![],'message':_0x2d6cf0(0xdc)+_0x5e017d+'\x22,\x20but\x20no\x20Smart\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','nextAction':_0x2d6cf0(0xce)};return _0x1ebdc3;}if(_0x318ffb===_0x2d6cf0(0x105)||_0x318ffb===_0x2d6cf0(0xf0)||_0x318ffb==='')return{'status':'operation_failed','manualResolutionRequired':![],'message':_0x2d6cf0(0x113)+_0x5e017d+'\x22.','nextAction':_0x2d6cf0(0xce)};return{'status':'unknown_reconcile_failed','manualResolutionRequired':![],'message':_0x2d6cf0(0xcb)+_0x5e017d+_0x2d6cf0(0x100)+_0x318ffb+'\x22.','nextAction':_0x2d6cf0(0xce)};}export function normalizePageDetail(_0x4959ab){const _0x4e7f67=a102_0x5892;return{'pageId':Number(_0x4959ab[_0x4e7f67(0x137)]),'appCode':_0x4959ab[_0x4e7f67(0xe2)],'name':_0x4959ab['name']||_0x4e7f67(0x134)+_0x4959ab[_0x4e7f67(0x137)],'code':_0x4959ab[_0x4e7f67(0x12f)]||'','type':_0x4959ab[_0x4e7f67(0xcd)]?String(_0x4959ab[_0x4e7f67(0xcd)]):_0x4e7f67(0x111),'datasetIds':Array[_0x4e7f67(0xe6)](_0x4959ab['datasetIds'])?_0x4959ab[_0x4e7f67(0x148)][_0x4e7f67(0x10b)](_0x57b1d8=>Number(_0x57b1d8))[_0x4e7f67(0xf8)](_0x2e292e=>Number[_0x4e7f67(0xe9)](_0x2e292e)):[],'pageVersion':_0x4959ab['config']&&typeof _0x4959ab[_0x4e7f67(0x145)]['pageVersion']===_0x4e7f67(0x109)?_0x4959ab['config'][_0x4e7f67(0x121)]:null,'versionTag':_0x4959ab['config']&&typeof _0x4959ab[_0x4e7f67(0x145)][_0x4e7f67(0x135)]===_0x4e7f67(0x143)&&_0x4959ab['config'][_0x4e7f67(0x135)][_0x4e7f67(0x10f)]()!==''?_0x4959ab[_0x4e7f67(0x145)][_0x4e7f67(0x135)]:null,'relatedPages':normalizeRelatedPages(_0x4959ab[_0x4e7f67(0x106)]),'raw':_0x4959ab};}export function serializeDryRunDescription(_0x2c1787){return JSON['stringify'](_0x2c1787,null,0x2);}export async function loadStandardPageStatusForGenerate(_0xdd134c,_0x5daf1e){const _0x505b13=a102_0x5892,_0x43b10f=await tryGetStandardPageStatus(_0xdd134c[_0x505b13(0xe2)],_0x5daf1e);if(!_0x43b10f)return null;return normalizeStandardPageStatus(_0x43b10f,_0x5daf1e);}export function selectVersionTagGroup(_0x4720cb,_0x3a4c8f,_0x2bc6db){const _0x11427b=a102_0x5892,_0x44039b=new Map();for(const _0x20a38c of _0x4720cb){const _0x427853=normalizeVersionTag(_0x3a4c8f(_0x20a38c)),_0x5c758b=_0x44039b['get'](_0x427853)??[];_0x5c758b[_0x11427b(0xc7)](_0x20a38c),_0x44039b[_0x11427b(0xd8)](_0x427853,_0x5c758b);}const _0x3c4264=Array['from'](_0x44039b['keys']());if(_0x3c4264['length']<=0x1&&!_0x2bc6db)return{'items':_0x4720cb,'availableTags':_0x3c4264};if(_0x2bc6db){const _0x6bc8d6=normalizeVersionTag(_0x2bc6db),_0x63a0ee=_0x44039b[_0x11427b(0x139)](_0x6bc8d6);if(!_0x63a0ee)throw CliErrors[_0x11427b(0x138)](_0x11427b(0x13b)+_0x2bc6db+_0x11427b(0xcc),buildVersionTagHint(_0x3c4264));return{'items':_0x63a0ee,'availableTags':_0x3c4264};}throw CliErrors[_0x11427b(0x138)](_0x11427b(0x140),buildVersionTagHint(_0x3c4264));}function normalizeDatasetDetail(_0x56cc52,_0x4ec2ba){const _0x247822=a102_0x5892,_0x3c9786=Array['isArray'](_0x56cc52[_0x247822(0xc4)])?_0x56cc52[_0x247822(0xc4)]:Array[_0x247822(0xe6)](_0x56cc52[_0x247822(0xd4)])?_0x56cc52[_0x247822(0xd4)]:[];return{'id':Number(_0x56cc52['id']??_0x56cc52[_0x247822(0x144)]??0x0),'code':String(_0x56cc52[_0x247822(0x12f)]||_0x56cc52[_0x247822(0xe3)]||_0x4ec2ba),'name':String(_0x56cc52[_0x247822(0x122)]||_0x4ec2ba),'appCode':_0x56cc52['appCode']||_0x56cc52[_0x247822(0xc6)]?.[_0x247822(0xe2)],'fieldCount':_0x3c9786['length'],'relatedPages':normalizeRelatedPages(_0x56cc52[_0x247822(0x106)]),'raw':_0x56cc52};}function normalizeStandardPageStatus(_0x4326f6,_0xbf4751){const _0x4df031=a102_0x5892,_0x45dce5=_0x36886c=>({'pageId':Number(_0x36886c['pageId']??_0x36886c['id']??0x0),'title':String(_0x36886c[_0x4df031(0x103)]||_0x36886c[_0x4df031(0x122)]||'page-'+(_0x36886c[_0x4df031(0x137)]??_0x36886c['id']??_0x4df031(0x12a))),'type':_0x36886c['type']?String(_0x36886c[_0x4df031(0xcd)]):_0x4df031(0x111),'deleted':_0x36886c['deleted']===!![],'hasMenu':_0x36886c[_0x4df031(0x11d)]===!![],'menuVisible':typeof _0x36886c[_0x4df031(0x12b)]==='boolean'?_0x36886c[_0x4df031(0x12b)]:null,'menuPath':typeof _0x36886c[_0x4df031(0x126)]===_0x4df031(0x143)&&_0x36886c[_0x4df031(0x126)][_0x4df031(0x10f)]()!==''?_0x36886c[_0x4df031(0x126)]:null}),_0xbcab3c=Array[_0x4df031(0xe6)](_0x4326f6[_0x4df031(0xde)])?_0x4326f6[_0x4df031(0xde)][_0x4df031(0x10b)](_0x32031b=>({'versionTag':typeof _0x32031b[_0x4df031(0x135)]===_0x4df031(0x143)&&_0x32031b[_0x4df031(0x135)][_0x4df031(0x10f)]()!==''?_0x32031b[_0x4df031(0x135)]:null,'complete':_0x32031b[_0x4df031(0x11f)]===!![],'pages':Array[_0x4df031(0xe6)](_0x32031b[_0x4df031(0x149)])?_0x32031b[_0x4df031(0x149)]['map'](_0x45dce5):[]})):[];return{'datasetId':typeof _0x4326f6['datasetId']==='number'&&Number[_0x4df031(0xe9)](_0x4326f6[_0x4df031(0x132)])?_0x4326f6[_0x4df031(0x132)]:null,'datasetCode':typeof _0x4326f6['datasetCode']===_0x4df031(0x143)&&_0x4326f6['datasetCode'][_0x4df031(0x10f)]()!==''?_0x4326f6['datasetCode']:_0xbf4751,'pageSets':_0xbcab3c,'totalSets':typeof _0x4326f6[_0x4df031(0x13c)]==='number'&&Number[_0x4df031(0xe9)](_0x4326f6[_0x4df031(0x13c)])?_0x4326f6[_0x4df031(0x13c)]:_0xbcab3c[_0x4df031(0xfe)],'completeSets':typeof _0x4326f6['completeSets']===_0x4df031(0x109)&&Number[_0x4df031(0xe9)](_0x4326f6[_0x4df031(0xdb)])?_0x4326f6[_0x4df031(0xdb)]:_0xbcab3c[_0x4df031(0xf8)](_0x74031b=>_0x74031b[_0x4df031(0x11f)])[_0x4df031(0xfe)],'incompleteSets':typeof _0x4326f6['incompleteSets']===_0x4df031(0x109)&&Number[_0x4df031(0xe9)](_0x4326f6['incompleteSets'])?_0x4326f6[_0x4df031(0x120)]:_0xbcab3c[_0x4df031(0xf8)](_0x51d8dd=>!_0x51d8dd[_0x4df031(0x11f)]&&_0x51d8dd[_0x4df031(0x149)][_0x4df031(0xfe)]>0x0)[_0x4df031(0xfe)],'residualPages':Array[_0x4df031(0xe6)](_0x4326f6['residualPages'])?_0x4326f6[_0x4df031(0x11a)][_0x4df031(0x10b)](_0x45dce5):[],'menuPages':Array[_0x4df031(0xe6)](_0x4326f6[_0x4df031(0x114)])?_0x4326f6['menuPages'][_0x4df031(0x10b)](_0x45dce5):[],'source':_0x4df031(0x128)};}function normalizeRelatedPages(_0x4e1d11){const _0x462c3a=a102_0x5892;if(!Array[_0x462c3a(0xe6)](_0x4e1d11))return[];return _0x4e1d11[_0x462c3a(0xf8)](_0x35f547=>_0x35f547&&typeof _0x35f547===_0x462c3a(0x107))[_0x462c3a(0x10b)](_0x238f98=>({'id':Number(_0x238f98['id']),'type':_0x238f98['type']?String(_0x238f98[_0x462c3a(0xcd)]):_0x462c3a(0x111),'code':_0x238f98[_0x462c3a(0x12f)]||undefined,'title':_0x238f98[_0x462c3a(0x103)]||_0x238f98[_0x462c3a(0x122)]||_0x462c3a(0x134)+_0x238f98['id'],'deleted':_0x238f98[_0x462c3a(0xff)]===!![]}))[_0x462c3a(0xf8)](_0x7f1043=>Number[_0x462c3a(0xe9)](_0x7f1043['id']));}function ensureAppOwnership(_0x3a4b95,_0x118e09,_0x3b4e94){const _0x59e35a=a102_0x5892;if(!_0x118e09)return;if(_0x118e09!==_0x3a4b95)throw CliErrors[_0x59e35a(0x138)](_0x3b4e94,_0x59e35a(0xeb)+CLI_BIN_NAME+_0x59e35a(0xd3));}function normalizeVersionTag(_0x403ca0){const _0x1e38c9=a102_0x5892;return _0x403ca0&&_0x403ca0[_0x1e38c9(0x10f)]()!==''?_0x403ca0:_0x1e38c9(0x10a);}function buildVersionTagHint(_0xd3f532){const _0x548015=a102_0x5892,_0xef2e12=_0xd3f532[_0x548015(0x10b)](_0x13ddcf=>_0x13ddcf===_0x548015(0x10a)?'<empty>':_0x13ddcf)[_0x548015(0xf2)](',\x20');return _0x548015(0xdf)+_0xef2e12;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a103_0x417b7e=a103_0x59e7;(function(_0x218870,_0x154208){const _0x26beef=a103_0x59e7,_0x40999e=_0x218870();while(!![]){try{const _0x24ea82=parseInt(_0x26beef(0x10c))/0x1*(-parseInt(_0x26beef(0x115))/0x2)+parseInt(_0x26beef(0x10d))/0x3+parseInt(_0x26beef(0x111))/0x4*(-parseInt(_0x26beef(0x109))/0x5)+parseInt(_0x26beef(0x114))/0x6+parseInt(_0x26beef(0x120))/0x7+parseInt(_0x26beef(0x11b))/0x8*(parseInt(_0x26beef(0x118))/0x9)+-parseInt(_0x26beef(0x110))/0xa*(-parseInt(_0x26beef(0x112))/0xb);if(_0x24ea82===_0x154208)break;else _0x40999e['push'](_0x40999e['shift']());}catch(_0x5d0ad5){_0x40999e['push'](_0x40999e['shift']());}}}(a103_0x1f30,0xaa1a0));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a103_0x1f30(){const _0x2544ca=['397926KqkZVR','1266418QwOLcl','alias','code','5103xpMWDB','query-standard-page-status','length','360SaNnJU','string','source','Query\x20Smart\x20List\x20Page\x20facts\x20for\x20a\x20dataset','/standard-page-status?appCode=','5758998oqnqNa','related-pages-fallback','read','status','6599990JSBvef','page','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','1WIWosp','2688855dWWWYZ','manualResolutionRequired','standard-page-status','1010eYoMAz','4gfzZdD','91388LiJdRy','appCode'];a103_0x1f30=function(){return _0x2544ca;};return a103_0x1f30();}function a103_0x59e7(_0x39d20d,_0x5c2788){_0x39d20d=_0x39d20d-0x108;const _0x1f30de=a103_0x1f30();let _0x59e772=_0x1f30de[_0x39d20d];return _0x59e772;}import{assessStandardPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadStandardPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageStandardPageStatus={'service':a103_0x417b7e(0x10a),'command':a103_0x417b7e(0x10f),'description':a103_0x417b7e(0x11e),'risk':a103_0x417b7e(0x122),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a103_0x417b7e(0x116),'type':a103_0x417b7e(0x11c),'description':a103_0x417b7e(0x10b)}],async 'validate'(_0x4a4b28){validateDatasetSelector(_0x4a4b28);},async 'dryRun'(_0xcc5e72){const _0x1a3559=a103_0x417b7e,_0x17f2e4=await loadDatasetDetailForPage(_0xcc5e72);return{'method':'GET','url':'/smartapi/lovrabet/dataset/'+_0x17f2e4[_0x1a3559(0x117)]+_0x1a3559(0x11f)+encodeURIComponent(_0xcc5e72[_0x1a3559(0x113)]),'description':serializeDryRunDescription({'dataset':{'id':_0x17f2e4['id'],'code':_0x17f2e4[_0x1a3559(0x117)],'name':_0x17f2e4['name']},'action':_0x1a3559(0x119)})};},async 'execute'(_0x5a40e4){const _0x522900=a103_0x417b7e,_0x4ce111=await loadDatasetDetailForPage(_0x5a40e4),_0x323e9e=await loadStandardPageStatusForGenerate(_0x5a40e4,_0x4ce111['code']),_0x2bb1a6=getUndeletedRelatedPages(_0x4ce111),_0x6ed749=assessStandardPageState(_0x4ce111['code'],_0x323e9e,{'fallbackUndeletedPages':_0x2bb1a6});return{'ok':!![],'data':{'datasetCode':_0x4ce111[_0x522900(0x117)],'precheckSource':_0x323e9e?.[_0x522900(0x11d)]??_0x522900(0x121),'status':_0x6ed749[_0x522900(0x108)],'manualResolutionRequired':_0x6ed749[_0x522900(0x10e)],'nextAction':_0x6ed749['nextAction'],'standardPageStatus':_0x323e9e,'relatedPages':{'total':_0x4ce111['relatedPages']['length'],'undeletedCount':_0x2bb1a6[_0x522900(0x11a)]}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a104_0x1ba394=a104_0x1cbd;function a104_0x1cbd(_0x233ea3,_0xcc0367){_0x233ea3=_0x233ea3-0x192;const _0x28c83f=a104_0x28c8();let _0x1cbd4d=_0x28c83f[_0x233ea3];return _0x1cbd4d;}(function(_0x5c86b1,_0x5f4d55){const _0x16f893=a104_0x1cbd,_0x3823e2=_0x5c86b1();while(!![]){try{const _0x5a903b=-parseInt(_0x16f893(0x1a8))/0x1*(parseInt(_0x16f893(0x1a5))/0x2)+parseInt(_0x16f893(0x1a0))/0x3+-parseInt(_0x16f893(0x195))/0x4+parseInt(_0x16f893(0x197))/0x5+-parseInt(_0x16f893(0x194))/0x6+-parseInt(_0x16f893(0x198))/0x7*(-parseInt(_0x16f893(0x19d))/0x8)+-parseInt(_0x16f893(0x19b))/0x9*(-parseInt(_0x16f893(0x1a9))/0xa);if(_0x5a903b===_0x5f4d55)break;else _0x3823e2['push'](_0x3823e2['shift']());}catch(_0x58469a){_0x3823e2['push'](_0x3823e2['shift']());}}}(a104_0x28c8,0xec1af));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a104_0x28c8(){const _0x16b1ce=['3TjanxT','1180BgQobZ','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','failedPages','code','部分页面同步失败','fieldCount','write','appCode','2464878FCeWBr','3047492wjKVPG','同步成功','917205iaOoPF','8351nTupJv','relatedPages','\x20undeleted\x20related\x20page(s)\x20found','115758vmjVNw','name','816BYVwrJ','undeletedPages','string','4181430UCSppz','length','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','/smartapi/lovrabet/dataset/','sync','717920RSZpjW','dataset','POST'];a104_0x28c8=function(){return _0x16b1ce;};return a104_0x28c8();}import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':'page','command':'sync','description':a104_0x1ba394(0x1aa),'risk':a104_0x1ba394(0x192),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a104_0x1ba394(0x19f),'description':a104_0x1ba394(0x1a2)}],async 'validate'(_0x1e20e6){validateDatasetSelector(_0x1e20e6);},async 'dryRun'(_0x9b9f20){const _0x2e947c=a104_0x1ba394,_0x5aa4d2=await prepare(_0x9b9f20);return{'method':_0x2e947c(0x1a7),'url':_0x2e947c(0x1a3)+_0x5aa4d2[_0x2e947c(0x1a6)][_0x2e947c(0x1ac)]+'/sync-to-pages','body':{'appCode':_0x9b9f20[_0x2e947c(0x193)]},'description':serializeDryRunDescription({'dataset':{'id':_0x5aa4d2[_0x2e947c(0x1a6)]['id'],'code':_0x5aa4d2['dataset'][_0x2e947c(0x1ac)],'name':_0x5aa4d2[_0x2e947c(0x1a6)][_0x2e947c(0x19c)],'fieldCount':_0x5aa4d2[_0x2e947c(0x1a6)][_0x2e947c(0x1ae)]},'relatedPages':{'total':_0x5aa4d2[_0x2e947c(0x1a6)][_0x2e947c(0x199)]['length'],'undeletedCount':_0x5aa4d2[_0x2e947c(0x19e)][_0x2e947c(0x1a1)]},'action':_0x2e947c(0x1a4),'reason':_0x5aa4d2['undeletedPages']['length']+_0x2e947c(0x19a)})};},async 'execute'(_0x15e88f){const _0x55b160=a104_0x1ba394,_0x48f3d0=await prepare(_0x15e88f),_0x107586=await syncStandardPages(_0x15e88f[_0x55b160(0x193)],_0x48f3d0['dataset']['code']),_0x51dc0a=Array['isArray'](_0x107586['failedPages'])&&_0x107586[_0x55b160(0x1ab)][_0x55b160(0x1a1)]>0x0,_0x145bd2=_0x51dc0a?_0x55b160(0x1ad):_0x55b160(0x196);return{'ok':!![],'message':_0x145bd2,'data':{'datasetCode':_0x48f3d0[_0x55b160(0x1a6)][_0x55b160(0x1ac)],..._0x107586}};}};async function prepare(_0x4d21a4){const _0x5e02e2=a104_0x1ba394,_0x5034af=await loadDatasetDetailForPage(_0x4d21a4);return prepareDatasetAction(_0x5034af,_0x5e02e2(0x1a4));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a105_0x26ee(){const _0x247a26=['9080AFBkdp','√\x20Login\x20status:\x20','trim','my-app','cyan','20391110zZgrEB','65277exYAEJ','Login\x20failed','1585qymNaY','production','green','env','Skipped','cwd','log','1190jybowp','Project\x20name\x20cannot\x20exceed\x2050\x20characters','Project\x20name:','7668440lzWShR','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','\x22\x20already\x20exists','test','18138IHwvoI','50tjKQkO','Directory\x20\x22','4197096wCvGOU','resolve','string','√\x20App\x20Code:\x20','659361dqsVZD'];a105_0x26ee=function(){return _0x247a26;};return a105_0x26ee();}(function(_0x660bd2,_0x3a9099){const _0x2d7826=a105_0x37b9,_0x1e2dd8=_0x660bd2();while(!![]){try{const _0x4165c2=-parseInt(_0x2d7826(0x151))/0x1+parseInt(_0x2d7826(0x14b))/0x2*(parseInt(_0x2d7826(0x158))/0x3)+parseInt(_0x2d7826(0x152))/0x4*(parseInt(_0x2d7826(0x13c))/0x5)+-parseInt(_0x2d7826(0x14a))/0x6*(-parseInt(_0x2d7826(0x143))/0x7)+parseInt(_0x2d7826(0x146))/0x8+parseInt(_0x2d7826(0x14d))/0x9+-parseInt(_0x2d7826(0x157))/0xa;if(_0x4165c2===_0x3a9099)break;else _0x1e2dd8['push'](_0x1e2dd8['shift']());}catch(_0xc9cc34){_0x1e2dd8['push'](_0x1e2dd8['shift']());}}}(a105_0x26ee,0x7b05e));import{existsSync}from'node:fs';import a105_0x495852 from'node:path';import a105_0xfd6281 from'chalk';function a105_0x37b9(_0x9c8151,_0x2b9856){_0x9c8151=_0x9c8151-0x13c;const _0x26ee5d=a105_0x26ee();let _0x37b976=_0x26ee5d[_0x9c8151];return _0x37b976;}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(_0x49c1fe,_0x31cdce,_0x2c2484){const _0x3761f3=a105_0x37b9,_0x3f645d=_0x3761f3(0x155),_0x12f5c0=readConfig(),_0x598ae7=typeof _0x12f5c0[_0x3761f3(0x13f)]===_0x3761f3(0x14f)?_0x12f5c0[_0x3761f3(0x13f)]:undefined,_0x3ce0cc=await input({'message':_0x3761f3(0x145),'default':_0x3f645d,'validate':_0x1dbca7=>{const _0x463962=_0x3761f3,_0x5c761e=_0x1dbca7[_0x463962(0x154)]()||_0x3f645d;if(_0x5c761e['length']>0x32)return _0x463962(0x144);const _0x3c5276=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x5c761e&&!_0x3c5276[_0x463962(0x149)](_0x5c761e))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0x5d5260=a105_0x495852[_0x463962(0x14e)](process[_0x463962(0x141)](),_0x5c761e);if(existsSync(_0x5d5260))return _0x463962(0x14c)+_0x5c761e+_0x463962(0x148);return!![];}});console['log'](a105_0xfd6281[_0x3761f3(0x13e)]('√\x20Project\x20Name:\x20'+a105_0xfd6281[_0x3761f3(0x156)](_0x3ce0cc)));const _0x495896=await selectSingleAppcode(_0x2c2484);console[_0x3761f3(0x142)](a105_0xfd6281[_0x3761f3(0x13e)](_0x3761f3(0x150)+a105_0xfd6281['cyan'](_0x495896||'Not\x20set')));if(_0x495896){const _0x259523=await getIsSessionValid();if(!_0x259523){const _0x79442c=await confirm({'message':_0x3761f3(0x147),'default':!![]});if(_0x79442c){const _0x5df88b=await authServer({'silent':!![]});console[_0x3761f3(0x142)](a105_0xfd6281[_0x3761f3(0x13e)](_0x3761f3(0x153)+a105_0xfd6281[_0x3761f3(0x156)](_0x5df88b?'Logged\x20in':_0x3761f3(0x159))));}else console[_0x3761f3(0x142)](a105_0xfd6281[_0x3761f3(0x13e)](_0x3761f3(0x153)+a105_0xfd6281[_0x3761f3(0x156)](_0x3761f3(0x140))));}await _0x49c1fe({'projectName':_0x3ce0cc,'appCode':_0x495896,'env':_0x31cdce||_0x598ae7||_0x3761f3(0x13d)});}else await _0x49c1fe({'projectName':_0x3ce0cc,'env':_0x31cdce||_0x598ae7||_0x3761f3(0x13d)});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xc6c249,_0xeca4a5){const _0x362489=a106_0x4685,_0x22353f=_0xc6c249();while(!![]){try{const _0x1dd5a8=parseInt(_0x362489(0x17b))/0x1*(parseInt(_0x362489(0x175))/0x2)+-parseInt(_0x362489(0x171))/0x3+-parseInt(_0x362489(0x173))/0x4+parseInt(_0x362489(0x178))/0x5+parseInt(_0x362489(0x174))/0x6*(parseInt(_0x362489(0x179))/0x7)+-parseInt(_0x362489(0x177))/0x8+parseInt(_0x362489(0x17a))/0x9;if(_0x1dd5a8===_0xeca4a5)break;else _0x22353f['push'](_0x22353f['shift']());}catch(_0xb3bf66){_0x22353f['push'](_0x22353f['shift']());}}}(a106_0x48a1,0x4d9b6));export function formatElapsed(_0x1b912c){const _0x1e61fa=a106_0x4685,_0x258801=Date['now']()-_0x1b912c;if(_0x258801<0x3e8)return _0x258801+'ms';const _0x4076b2=(_0x258801/0x3e8)[_0x1e61fa(0x176)](0x2),_0x113731=_0x4076b2[_0x1e61fa(0x172)](/\.?0+$/u,'');return _0x113731+'s';}function a106_0x4685(_0x3edee9,_0x203344){_0x3edee9=_0x3edee9-0x171;const _0x48a1fa=a106_0x48a1();let _0x4685dc=_0x48a1fa[_0x3edee9];return _0x4685dc;}function a106_0x48a1(){const _0x1d7340=['3480IyEfgl','3678IMrVDH','toFixed','4752144oTmRxJ','1925275qpXRAy','4319KkiYYg','2384325gIcxtv','245TjwegU','1357497lPWEgO','replace','376000AswYEq'];a106_0x48a1=function(){return _0x1d7340;};return a106_0x48a1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x52cee4,_0x221341){const _0xc4c8bc=a107_0x1fe3,_0x58f6e2=_0x52cee4();while(!![]){try{const _0x2bffea=-parseInt(_0xc4c8bc(0x18b))/0x1*(parseInt(_0xc4c8bc(0x16b))/0x2)+-parseInt(_0xc4c8bc(0x16c))/0x3*(parseInt(_0xc4c8bc(0x161))/0x4)+parseInt(_0xc4c8bc(0x18d))/0x5+-parseInt(_0xc4c8bc(0x162))/0x6*(-parseInt(_0xc4c8bc(0x190))/0x7)+-parseInt(_0xc4c8bc(0x17a))/0x8*(-parseInt(_0xc4c8bc(0x15e))/0x9)+parseInt(_0xc4c8bc(0x14b))/0xa+-parseInt(_0xc4c8bc(0x16a))/0xb;if(_0x2bffea===_0x221341)break;else _0x58f6e2['push'](_0x58f6e2['shift']());}catch(_0x5818f7){_0x58f6e2['push'](_0x58f6e2['shift']());}}}(a107_0xfb96,0x2f436));import a107_0x1dbfc7 from'path';import a107_0x4094a0 from'fs';import a107_0x5bc8bf from'chalk';import a107_0x3d88b6 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';function a107_0x1fe3(_0xae8397,_0x4fe2ae){_0xae8397=_0xae8397-0x140;const _0xfb9611=a107_0xfb96();let _0x1fe350=_0xfb9611[_0xae8397];return _0x1fe350;}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';function a107_0xfb96(){const _0x35a07f=['bold','package.json','minimumVersion','Project\x20name:\x20','accessSync','Project\x20directory\x20','开始创建项目:\x20','apps','parse','error','test','stableVersion','\x20model(s)','Project\x20name\x20cannot\x20be\x20empty','cyan','start','log','utf8','length','message','清理项目目录失败:\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','string','appCode','1785840ZHqEkE','stringify','Copy\x20project\x20files','info','...','setLogPath','\x20|\x20Default:\x20','\x20√\x20','配置应用AppCode失败','name','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','green','1.0.0','项目创建失败:\x20','projectCode','projectName','keys','belowMinimum','API\x20配置拉取异常','168471qKMDXX','√\x20package.json\x20updated:\x20name=','API\x20configuration\x20pulled:\x20','4iSEIzg','6dIaTFk','项目创建完成:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','constants','Install\x20dependencies','description','\x20|\x20AppCode:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','3719650RRyOMv','4314nnXKRx','228828GMdvlN','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','🚀\x20Next\x20Steps:','resolve','production','*\x20Configuring\x20AppCode\x20for\x20project\x20','needsUpgrade','stop','*\x20Pulling\x20API\x20configuration...','\x20dataset(s),\x20generated\x20','Format\x20code','readFileSync','repeat','modelCount','32xdmbnI','cookie','rmSync','\x20\x201.\x20Start\x20project:\x20','join','warn','\x20config\x20set\x20appcode\x20<app-code>\x27','√\x20Pulled\x20','create','trim','W_OK','\x20api\x20pull','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','cwd','\x20\x202.\x20Pull\x20API\x20configuration:\x20','writeFileSync','defaultApp','167GyRhIz','env','1772985OVZMFX','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','dirname','2521246AWvEYn'];a107_0xfb96=function(){return _0x35a07f;};return a107_0xfb96();}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(_0x13cc34){const _0x62e3d=a107_0x1fe3,_0x4b46fe=await checkCliVersion();(_0x4b46fe[_0x62e3d(0x172)]||_0x4b46fe[_0x62e3d(0x15c)])&&(printCliUpgradeWarning(_0x4b46fe),assertCliVersionSupported(_0x4b46fe),logger[_0x62e3d(0x14e)](_0x62e3d(0x182),'CLI\x20版本检查',{'currentVersion':_0x4b46fe['currentVersion'],'stableVersion':_0x4b46fe[_0x62e3d(0x19c)],'minimumVersion':_0x4b46fe[_0x62e3d(0x193)],'needsUpgrade':_0x4b46fe[_0x62e3d(0x172)],'belowMinimum':_0x4b46fe[_0x62e3d(0x15c)]}));if(_0x13cc34[_0x62e3d(0x159)]&&_0x13cc34['appCode'])await runCreate({'projectName':_0x13cc34[_0x62e3d(0x159)],'appCode':_0x13cc34['appCode'],'env':_0x13cc34[_0x62e3d(0x18c)]},_0x13cc34);else{if(_0x13cc34[_0x62e3d(0x159)]){const _0x83466f=await selectSingleAppcode(_0x13cc34['cookie']);await runCreate({'projectName':_0x13cc34['projectCode'],'appCode':_0x83466f||undefined,'env':_0x13cc34['env']},_0x13cc34);}else await guidedCreateProject(_0x5278d=>runCreate(_0x5278d,_0x13cc34),_0x13cc34[_0x62e3d(0x18c)],_0x13cc34[_0x62e3d(0x17b)]);}}async function runCreate(_0x5b07bb,_0x43e4db){const _0x36e04c=a107_0x1fe3;if(!_0x5b07bb[_0x36e04c(0x15a)]||_0x5b07bb[_0x36e04c(0x15a)][_0x36e04c(0x183)]()==='')throw new Error(_0x36e04c(0x140));const _0x2842eb=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2842eb[_0x36e04c(0x19b)](_0x5b07bb[_0x36e04c(0x15a)]))throw new Error(_0x36e04c(0x148));if(_0x5b07bb[_0x36e04c(0x15a)][_0x36e04c(0x145)]>0x64)throw new Error(_0x36e04c(0x164));const _0xfec7d=a107_0x1dbfc7[_0x36e04c(0x16f)](process[_0x36e04c(0x187)](),_0x5b07bb[_0x36e04c(0x15a)]);if(a107_0x4094a0['existsSync'](_0xfec7d))throw new Error(_0x36e04c(0x196)+_0x5b07bb[_0x36e04c(0x15a)]+'\x20already\x20exists');try{a107_0x4094a0[_0x36e04c(0x195)](a107_0x1dbfc7[_0x36e04c(0x18f)](_0xfec7d),a107_0x4094a0[_0x36e04c(0x165)][_0x36e04c(0x184)]);}catch{throw new Error(_0x36e04c(0x18e));}logger[_0x36e04c(0x150)](_0xfec7d),logger['info'](_0x36e04c(0x182),_0x36e04c(0x197)+_0x5b07bb[_0x36e04c(0x15a)],{'projectDir':_0xfec7d,'appCode':_0x5b07bb[_0x36e04c(0x14a)]}),console['log'](),console[_0x36e04c(0x143)](a107_0x5bc8bf['green'](_0x36e04c(0x152))+_0x36e04c(0x194)+a107_0x5bc8bf[_0x36e04c(0x156)](_0x5b07bb[_0x36e04c(0x15a)])+(_0x5b07bb[_0x36e04c(0x14a)]?_0x36e04c(0x168)+a107_0x5bc8bf[_0x36e04c(0x141)](_0x5b07bb[_0x36e04c(0x14a)]):''));try{await runTask(_0x36e04c(0x14d),()=>copyProjectTemplate(_0x5b07bb[_0x36e04c(0x15a)])),await updatePackageJsonName(_0x5b07bb[_0x36e04c(0x15a)]),await runTask(_0x36e04c(0x166),()=>installDependencies(_0x5b07bb[_0x36e04c(0x15a)])),await runTask(_0x36e04c(0x176),()=>formatProjectCode(_0x5b07bb[_0x36e04c(0x15a)])),await configureAppCode(_0x5b07bb['projectName'],_0x5b07bb[_0x36e04c(0x14a)]||'',_0x5b07bb[_0x36e04c(0x18c)]);let _0x2c7162=![];if(_0x5b07bb['appCode']){console[_0x36e04c(0x143)](_0x36e04c(0x174));const _0x199e84=process['cwd']();try{process['chdir'](_0xfec7d);const _0x4eaae6=_0x5b07bb[_0x36e04c(0x18c)]||'production';initEnv(_0x4eaae6);const {configArray:_0x1cc850}=await fetchModelList(_0x5b07bb[_0x36e04c(0x14a)],_0x43e4db['cookie']||''),_0x28788f=DEFAULT_API_DIR,_0x330d42=await generateApiFile(_0x1cc850,'',_0x5b07bb[_0x36e04c(0x14a)],!![],_0x4eaae6,_0x28788f);console[_0x36e04c(0x143)](_0x36e04c(0x181)+_0x1cc850['length']+_0x36e04c(0x175)+_0x330d42[_0x36e04c(0x179)]+_0x36e04c(0x19d)),logger[_0x36e04c(0x14e)](_0x36e04c(0x182),_0x36e04c(0x160)+_0x5b07bb[_0x36e04c(0x14a)]);}catch(_0x3701e8){_0x2c7162=!![],console[_0x36e04c(0x143)](_0x36e04c(0x169)),logger[_0x36e04c(0x17f)](_0x36e04c(0x182),_0x36e04c(0x15d),{'error':_0x3701e8 instanceof Error?_0x3701e8[_0x36e04c(0x146)]:String(_0x3701e8)});}finally{process['chdir'](_0x199e84);}}logger['success']('create',_0x36e04c(0x163)+_0x5b07bb[_0x36e04c(0x15a)]),console[_0x36e04c(0x143)](),console[_0x36e04c(0x143)](a107_0x5bc8bf[_0x36e04c(0x156)]('─'[_0x36e04c(0x178)](0x3c))),console[_0x36e04c(0x143)](a107_0x5bc8bf[_0x36e04c(0x141)][_0x36e04c(0x191)](_0x36e04c(0x16e))),console[_0x36e04c(0x143)](),console[_0x36e04c(0x143)](_0x36e04c(0x17d)+a107_0x5bc8bf[_0x36e04c(0x141)][_0x36e04c(0x191)]('cd\x20'+_0x5b07bb[_0x36e04c(0x15a)]+'\x20&&\x20'+CLI_BIN_NAME+'\x20run\x20start')),_0x2c7162&&console[_0x36e04c(0x143)](_0x36e04c(0x188)+a107_0x5bc8bf[_0x36e04c(0x141)]['bold'](CLI_BIN_NAME+_0x36e04c(0x185))),console[_0x36e04c(0x143)](a107_0x5bc8bf[_0x36e04c(0x156)]('─'[_0x36e04c(0x178)](0x3c)));}catch(_0x410a5c){logger['error'](_0x36e04c(0x182),_0x36e04c(0x158)+_0x5b07bb[_0x36e04c(0x15a)],{'error':_0x410a5c instanceof Error?_0x410a5c[_0x36e04c(0x146)]:String(_0x410a5c)});try{a107_0x4094a0['existsSync'](_0xfec7d)&&(console[_0x36e04c(0x143)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0xfec7d),a107_0x4094a0[_0x36e04c(0x17c)](_0xfec7d,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x36e04c(0x182),_0x36e04c(0x147)+_0xfec7d);}throw _0x410a5c;}}async function runTask(_0x51a2f1,_0xdfdd2a){const _0x2f56fd=a107_0x1fe3,_0x5c67cd=a107_0x3d88b6(_0x51a2f1+_0x2f56fd(0x14f))[_0x2f56fd(0x142)]();try{const _0x1b1253=await _0xdfdd2a();_0x5c67cd[_0x2f56fd(0x173)](),console[_0x2f56fd(0x143)](''+a107_0x5bc8bf[_0x2f56fd(0x156)](_0x2f56fd(0x152))+_0x51a2f1+'\x20'+a107_0x5bc8bf['gray']('['+_0x1b1253+']'));}catch(_0x3ad54a){_0x5c67cd['fail'](_0x51a2f1);throw _0x3ad54a;}}async function updatePackageJsonName(_0x2e3e6d){const _0x2d3660=a107_0x1fe3,_0x3959cc=a107_0x1dbfc7[_0x2d3660(0x16f)](process[_0x2d3660(0x187)](),_0x2e3e6d),_0x44d3d6=a107_0x1dbfc7['join'](_0x3959cc,_0x2d3660(0x192));try{console[_0x2d3660(0x143)](_0x2d3660(0x186));const _0x3062ae=getRabetbaseCliPackageRoot(),_0x23b952=a107_0x1dbfc7[_0x2d3660(0x17e)](_0x3062ae,_0x2d3660(0x192));let _0x154345=_0x2d3660(0x157);try{const _0x3bacea=JSON[_0x2d3660(0x199)](a107_0x4094a0['readFileSync'](_0x23b952,_0x2d3660(0x144)));_0x154345=_0x3bacea['version']||'1.0.0';}catch{}const _0x1a3fae=a107_0x4094a0[_0x2d3660(0x177)](_0x44d3d6,_0x2d3660(0x144)),_0x35da67=JSON[_0x2d3660(0x199)](_0x1a3fae);_0x35da67[_0x2d3660(0x154)]=_0x2e3e6d,_0x35da67[_0x2d3660(0x167)]=_0x2e3e6d+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x154345,a107_0x4094a0[_0x2d3660(0x189)](_0x44d3d6,JSON[_0x2d3660(0x14c)](_0x35da67,null,0x2)+'\x0a','utf8'),console[_0x2d3660(0x143)](_0x2d3660(0x15f)+_0x2e3e6d),logger[_0x2d3660(0x14e)](_0x2d3660(0x182),'更新\x20package.json\x20name');}catch(_0x23aaa9){logger['error']('create','更新\x20package.json\x20失败');throw _0x23aaa9;}}async function configureAppCode(_0x128077,_0x14a211,_0x6ce0a2){const _0x4bc1a9=a107_0x1fe3,_0x486633=a107_0x1dbfc7[_0x4bc1a9(0x16f)](process[_0x4bc1a9(0x187)](),_0x128077),_0x11d436=a107_0x1dbfc7[_0x4bc1a9(0x17e)](_0x486633,NEW_CONFIG_NAME);try{_0x14a211?console[_0x4bc1a9(0x143)](_0x4bc1a9(0x171)+_0x128077+':\x20'+_0x14a211):console[_0x4bc1a9(0x143)](_0x4bc1a9(0x16d)+_0x128077);const _0x47bc2b=getRabetbaseCliPackageRoot(),_0x32b431=a107_0x1dbfc7[_0x4bc1a9(0x17e)](_0x47bc2b,_0x4bc1a9(0x192));let _0x2445d8=_0x4bc1a9(0x157);try{const _0x4c9c4d=JSON['parse'](a107_0x4094a0[_0x4bc1a9(0x177)](_0x32b431,_0x4bc1a9(0x144)));_0x2445d8=_0x4c9c4d['version']||_0x4bc1a9(0x157);}catch{}const _0x37e8e3=readConfig(),_0x3dc79e=typeof _0x37e8e3[_0x4bc1a9(0x18c)]===_0x4bc1a9(0x149)?_0x37e8e3['env']:undefined,_0x5f1a39={};for(const _0x109fe4 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x37e8e3[_0x109fe4]!=null)_0x5f1a39[_0x109fe4]=_0x37e8e3[_0x109fe4];}const _0x494fa7=buildCanonicalProjectConfig(_0x5f1a39,{'appCodes':_0x14a211?[_0x14a211]:[],'env':_0x6ce0a2||_0x3dc79e||_0x4bc1a9(0x170),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x2445d8}});writeConfigFile(_0x11d436,_0x494fa7),_0x14a211?console[_0x4bc1a9(0x143)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x4bc1a9(0x15b)](_0x494fa7[_0x4bc1a9(0x198)]||{})[_0x4bc1a9(0x17e)](',\x20')+_0x4bc1a9(0x151)+_0x494fa7[_0x4bc1a9(0x18a)]):console['log'](_0x4bc1a9(0x155)+CLI_BIN_NAME+_0x4bc1a9(0x180)),logger[_0x4bc1a9(0x14e)](_0x4bc1a9(0x182),'配置应用AppCode:\x20'+_0x14a211);}catch(_0x909439){logger[_0x4bc1a9(0x19a)](_0x4bc1a9(0x182),_0x4bc1a9(0x153));}}
|
|
1
|
+
(function(_0x3670c0,_0xd7771f){const _0x1af910=a107_0x3789,_0x5c3151=_0x3670c0();while(!![]){try{const _0x7047b2=-parseInt(_0x1af910(0xb8))/0x1+parseInt(_0x1af910(0xc8))/0x2+parseInt(_0x1af910(0xd9))/0x3*(parseInt(_0x1af910(0xa3))/0x4)+-parseInt(_0x1af910(0xcb))/0x5+-parseInt(_0x1af910(0xa4))/0x6+-parseInt(_0x1af910(0xde))/0x7*(-parseInt(_0x1af910(0xed))/0x8)+parseInt(_0x1af910(0xcd))/0x9*(parseInt(_0x1af910(0xea))/0xa);if(_0x7047b2===_0xd7771f)break;else _0x5c3151['push'](_0x5c3151['shift']());}catch(_0x38326c){_0x5c3151['push'](_0x5c3151['shift']());}}}(a107_0x5236,0x5eb4c));import a107_0x1b615a from'path';function a107_0x3789(_0x42de9f,_0x376aeb){_0x42de9f=_0x42de9f-0x8b;const _0x5236f7=a107_0x5236();let _0x378937=_0x5236f7[_0x42de9f];return _0x378937;}import a107_0x271d0 from'fs';import a107_0xc863ac from'chalk';import a107_0x2bf545 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';function a107_0x5236(){const _0x43ddc7=['join','chdir','\x20Generated\x20by\x20rabetbase\x20cli\x20','Copy\x20project\x20files','项目创建失败:\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','currentVersion','...','utf8','7640jhMouF','keys','更新\x20package.json\x20name','24Hnfvyj','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','\x20model(s)','rmSync','配置应用AppCode:\x20','version','repeat','message','\x20dataset(s),\x20generated\x20','warn','success','existsSync','defaultApp','description','error','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','trim','bold','CLI\x20版本检查','projectCode','parse','√\x20Pulled\x20','stableVersion','*\x20Configuring\x20AppCode\x20for\x20project\x20','fail','modelCount','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','581852XxJZYV','772494CfcRDD','writeFileSync','Format\x20code','setLogPath','create','\x20|\x20AppCode:\x20','length','stringify','belowMinimum','test','cookie','Project\x20name:\x20','cwd','production','toLocaleString','\x20|\x20Default:\x20','cyan','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','stop','\x20√\x20','481339tCFosM','resolve','API\x20配置拉取异常','readFileSync','projectName','Project\x20name\x20cannot\x20be\x20empty','green','\x20already\x20exists','\x20config\x20set\x20appcode\x20<app-code>\x27','🚀\x20Next\x20Steps:','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','log','\x20api\x20pull','string','start','配置应用AppCode失败','1377888GyipIm','cd\x20','1.0.0','3484700kQFPuO','appCode','1620jMiwue','*\x20Pulling\x20API\x20configuration...','dirname','gray','name','\x20&&\x20','项目创建完成:\x20','info','更新\x20package.json\x20失败','package.json','accessSync','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','15OwbRPt','Install\x20dependencies','minimumVersion','env','needsUpgrade','329385VzCTEf','constants'];a107_0x5236=function(){return _0x43ddc7;};return a107_0x5236();}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(_0x277025){const _0x386273=a107_0x3789,_0xc38807=await checkCliVersion();(_0xc38807[_0x386273(0xdd)]||_0xc38807[_0x386273(0xac)])&&(printCliUpgradeWarning(_0xc38807),assertCliVersionSupported(_0xc38807),logger['info']('create',_0x386273(0x9a),{'currentVersion':_0xc38807[_0x386273(0xe7)],'stableVersion':_0xc38807[_0x386273(0x9e)],'minimumVersion':_0xc38807[_0x386273(0xdb)],'needsUpgrade':_0xc38807[_0x386273(0xdd)],'belowMinimum':_0xc38807[_0x386273(0xac)]}));if(_0x277025[_0x386273(0x9b)]&&_0x277025['appCode'])await runCreate({'projectName':_0x277025[_0x386273(0x9b)],'appCode':_0x277025[_0x386273(0xcc)],'env':_0x277025[_0x386273(0xdc)]},_0x277025);else{if(_0x277025[_0x386273(0x9b)]){const _0x3775f3=await selectSingleAppcode(_0x277025[_0x386273(0xae)]);await runCreate({'projectName':_0x277025[_0x386273(0x9b)],'appCode':_0x3775f3||undefined,'env':_0x277025['env']},_0x277025);}else await guidedCreateProject(_0x1631bb=>runCreate(_0x1631bb,_0x277025),_0x277025[_0x386273(0xdc)],_0x277025[_0x386273(0xae)]);}}async function runCreate(_0x3f4c8e,_0x4188b9){const _0xcbbf68=a107_0x3789;if(!_0x3f4c8e[_0xcbbf68(0xbc)]||_0x3f4c8e[_0xcbbf68(0xbc)][_0xcbbf68(0x98)]()==='')throw new Error(_0xcbbf68(0xbd));const _0x538100=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x538100[_0xcbbf68(0xad)](_0x3f4c8e[_0xcbbf68(0xbc)]))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x3f4c8e[_0xcbbf68(0xbc)]['length']>0x64)throw new Error(_0xcbbf68(0x97));const _0x4e1f8b=a107_0x1b615a[_0xcbbf68(0xb9)](process[_0xcbbf68(0xb0)](),_0x3f4c8e[_0xcbbf68(0xbc)]);if(a107_0x271d0[_0xcbbf68(0x93)](_0x4e1f8b))throw new Error('Project\x20directory\x20'+_0x3f4c8e[_0xcbbf68(0xbc)]+_0xcbbf68(0xbf));try{a107_0x271d0[_0xcbbf68(0xd7)](a107_0x1b615a[_0xcbbf68(0xcf)](_0x4e1f8b),a107_0x271d0[_0xcbbf68(0xdf)]['W_OK']);}catch{throw new Error(_0xcbbf68(0xc2));}logger[_0xcbbf68(0xa7)](_0x4e1f8b),logger[_0xcbbf68(0xd4)](_0xcbbf68(0xa8),'开始创建项目:\x20'+_0x3f4c8e[_0xcbbf68(0xbc)],{'projectDir':_0x4e1f8b,'appCode':_0x3f4c8e[_0xcbbf68(0xcc)]}),console[_0xcbbf68(0xc3)](),console[_0xcbbf68(0xc3)](a107_0xc863ac[_0xcbbf68(0xbe)](_0xcbbf68(0xb7))+_0xcbbf68(0xaf)+a107_0xc863ac[_0xcbbf68(0xbe)](_0x3f4c8e[_0xcbbf68(0xbc)])+(_0x3f4c8e[_0xcbbf68(0xcc)]?_0xcbbf68(0xa9)+a107_0xc863ac[_0xcbbf68(0xb4)](_0x3f4c8e['appCode']):''));try{await runTask(_0xcbbf68(0xe3),()=>copyProjectTemplate(_0x3f4c8e[_0xcbbf68(0xbc)])),await updatePackageJsonName(_0x3f4c8e['projectName']),await runTask(_0xcbbf68(0xda),()=>installDependencies(_0x3f4c8e[_0xcbbf68(0xbc)])),await runTask(_0xcbbf68(0xa6),()=>formatProjectCode(_0x3f4c8e[_0xcbbf68(0xbc)])),await configureAppCode(_0x3f4c8e[_0xcbbf68(0xbc)],_0x3f4c8e[_0xcbbf68(0xcc)]||'',_0x3f4c8e[_0xcbbf68(0xdc)]);let _0x14cbbe=![];if(_0x3f4c8e[_0xcbbf68(0xcc)]){console[_0xcbbf68(0xc3)](_0xcbbf68(0xce));const _0x29232a=process[_0xcbbf68(0xb0)]();try{process[_0xcbbf68(0xe1)](_0x4e1f8b);const _0x59ef5e=_0x3f4c8e[_0xcbbf68(0xdc)]||'production';initEnv(_0x59ef5e);const {configArray:_0x5c7f53}=await fetchModelList(_0x3f4c8e['appCode'],_0x4188b9[_0xcbbf68(0xae)]||''),_0x3b6e73=DEFAULT_API_DIR,_0x5a4849=await generateApiFile(_0x5c7f53,'',_0x3f4c8e[_0xcbbf68(0xcc)],!![],_0x59ef5e,_0x3b6e73);console[_0xcbbf68(0xc3)](_0xcbbf68(0x9d)+_0x5c7f53[_0xcbbf68(0xaa)]+_0xcbbf68(0x90)+_0x5a4849[_0xcbbf68(0xa1)]+_0xcbbf68(0xef)),logger[_0xcbbf68(0xd4)]('create','API\x20configuration\x20pulled:\x20'+_0x3f4c8e[_0xcbbf68(0xcc)]);}catch(_0x2128a2){_0x14cbbe=!![],console['log'](_0xcbbf68(0xa2)),logger[_0xcbbf68(0x91)](_0xcbbf68(0xa8),_0xcbbf68(0xba),{'error':_0x2128a2 instanceof Error?_0x2128a2[_0xcbbf68(0x8f)]:String(_0x2128a2)});}finally{process[_0xcbbf68(0xe1)](_0x29232a);}}logger[_0xcbbf68(0x92)](_0xcbbf68(0xa8),_0xcbbf68(0xd3)+_0x3f4c8e[_0xcbbf68(0xbc)]),console[_0xcbbf68(0xc3)](),console['log'](a107_0xc863ac[_0xcbbf68(0xbe)]('─'[_0xcbbf68(0x8e)](0x3c))),console[_0xcbbf68(0xc3)](a107_0xc863ac['cyan'][_0xcbbf68(0x99)](_0xcbbf68(0xc1))),console[_0xcbbf68(0xc3)](),console['log']('\x20\x201.\x20Start\x20project:\x20'+a107_0xc863ac[_0xcbbf68(0xb4)]['bold'](_0xcbbf68(0xc9)+_0x3f4c8e['projectName']+_0xcbbf68(0xd2)+CLI_BIN_NAME+'\x20run\x20start')),_0x14cbbe&&console[_0xcbbf68(0xc3)](_0xcbbf68(0xe6)+a107_0xc863ac[_0xcbbf68(0xb4)][_0xcbbf68(0x99)](CLI_BIN_NAME+_0xcbbf68(0xc4))),console['log'](a107_0xc863ac[_0xcbbf68(0xbe)]('─'[_0xcbbf68(0x8e)](0x3c)));}catch(_0xbf8c96){logger[_0xcbbf68(0x96)](_0xcbbf68(0xa8),_0xcbbf68(0xe4)+_0x3f4c8e[_0xcbbf68(0xbc)],{'error':_0xbf8c96 instanceof Error?_0xbf8c96['message']:String(_0xbf8c96)});try{a107_0x271d0['existsSync'](_0x4e1f8b)&&(console['log'](_0xcbbf68(0xe5)+_0x4e1f8b),a107_0x271d0[_0xcbbf68(0x8b)](_0x4e1f8b,{'recursive':!![],'force':!![]}));}catch{logger[_0xcbbf68(0x91)](_0xcbbf68(0xa8),'清理项目目录失败:\x20'+_0x4e1f8b);}throw _0xbf8c96;}}async function runTask(_0x2db22e,_0x1a7c66){const _0x1a7cc8=a107_0x3789,_0x51884d=a107_0x2bf545(_0x2db22e+_0x1a7cc8(0xe8))[_0x1a7cc8(0xc6)]();try{const _0xfa8b0e=await _0x1a7c66();_0x51884d[_0x1a7cc8(0xb6)](),console[_0x1a7cc8(0xc3)](''+a107_0xc863ac[_0x1a7cc8(0xbe)](_0x1a7cc8(0xb7))+_0x2db22e+'\x20'+a107_0xc863ac[_0x1a7cc8(0xd0)]('['+_0xfa8b0e+']'));}catch(_0x3aeeb1){_0x51884d[_0x1a7cc8(0xa0)](_0x2db22e);throw _0x3aeeb1;}}async function updatePackageJsonName(_0x2c3848){const _0x391010=a107_0x3789,_0x203ef4=a107_0x1b615a['resolve'](process[_0x391010(0xb0)](),_0x2c3848),_0x3e90f0=a107_0x1b615a[_0x391010(0xe0)](_0x203ef4,_0x391010(0xd6));try{console[_0x391010(0xc3)](_0x391010(0xd8));const _0x1135c1=getRabetbaseCliPackageRoot(),_0x420827=a107_0x1b615a[_0x391010(0xe0)](_0x1135c1,_0x391010(0xd6));let _0x32aac5='1.0.0';try{const _0x5a9c89=JSON['parse'](a107_0x271d0['readFileSync'](_0x420827,_0x391010(0xe9)));_0x32aac5=_0x5a9c89[_0x391010(0x8d)]||'1.0.0';}catch{}const _0x1d0b46=a107_0x271d0[_0x391010(0xbb)](_0x3e90f0,'utf8'),_0x462c47=JSON[_0x391010(0x9c)](_0x1d0b46);_0x462c47[_0x391010(0xd1)]=_0x2c3848,_0x462c47[_0x391010(0x95)]=_0x2c3848+_0x391010(0xe2)+_0x32aac5,a107_0x271d0[_0x391010(0xa5)](_0x3e90f0,JSON[_0x391010(0xab)](_0x462c47,null,0x2)+'\x0a',_0x391010(0xe9)),console[_0x391010(0xc3)]('√\x20package.json\x20updated:\x20name='+_0x2c3848),logger['info'](_0x391010(0xa8),_0x391010(0xec));}catch(_0x863db4){logger['error'](_0x391010(0xa8),_0x391010(0xd5));throw _0x863db4;}}async function configureAppCode(_0x12fa98,_0x4b0d50,_0x1b42bc){const _0x420b60=a107_0x3789,_0x1534cb=a107_0x1b615a[_0x420b60(0xb9)](process[_0x420b60(0xb0)](),_0x12fa98),_0x3bf731=a107_0x1b615a[_0x420b60(0xe0)](_0x1534cb,NEW_CONFIG_NAME);try{_0x4b0d50?console[_0x420b60(0xc3)](_0x420b60(0x9f)+_0x12fa98+':\x20'+_0x4b0d50):console[_0x420b60(0xc3)](_0x420b60(0xee)+_0x12fa98);const _0x5296f6=getRabetbaseCliPackageRoot(),_0x55330c=a107_0x1b615a['join'](_0x5296f6,_0x420b60(0xd6));let _0x51ba1d='1.0.0';try{const _0x56691c=JSON[_0x420b60(0x9c)](a107_0x271d0['readFileSync'](_0x55330c,_0x420b60(0xe9)));_0x51ba1d=_0x56691c[_0x420b60(0x8d)]||_0x420b60(0xca);}catch{}const _0x5833ff=readConfig(),_0x4026ad=typeof _0x5833ff['env']===_0x420b60(0xc5)?_0x5833ff[_0x420b60(0xdc)]:undefined,_0x5f3f21={};for(const _0x18c495 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x5833ff[_0x18c495]!=null)_0x5f3f21[_0x18c495]=_0x5833ff[_0x18c495];}const _0x5e145f=buildCanonicalProjectConfig(_0x5f3f21,{'appCodes':_0x4b0d50?[_0x4b0d50]:[],'env':_0x1b42bc||_0x4026ad||_0x420b60(0xb1),'metadata':{'createdAt':new Date()[_0x420b60(0xb2)](),'version':_0x51ba1d}});writeConfigFile(_0x3bf731,_0x5e145f),_0x4b0d50?console[_0x420b60(0xc3)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x420b60(0xeb)](_0x5e145f['apps']||{})[_0x420b60(0xe0)](',\x20')+_0x420b60(0xb3)+_0x5e145f[_0x420b60(0x94)]):console[_0x420b60(0xc3)](_0x420b60(0xb5)+CLI_BIN_NAME+_0x420b60(0xc0)),logger['info'](_0x420b60(0xa8),_0x420b60(0x8c)+_0x4b0d50);}catch(_0x2ce3ab){logger['error']('create',_0x420b60(0xc7));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x18a1d2,_0x4a4b6b){const _0x413a93=a108_0x1f84,_0xaa25ed=_0x18a1d2();while(!![]){try{const _0x5ce5ef=parseInt(_0x413a93(0x16e))/0x1+parseInt(_0x413a93(0x171))/0x2*(parseInt(_0x413a93(0x166))/0x3)+-parseInt(_0x413a93(0x16b))/0x4+-parseInt(_0x413a93(0x155))/0x5+parseInt(_0x413a93(0x16c))/0x6+parseInt(_0x413a93(0x175))/0x7+parseInt(_0x413a93(0x17a))/0x8;if(_0x5ce5ef===_0x4a4b6b)break;else _0xaa25ed['push'](_0xaa25ed['shift']());}catch(_0x445df7){_0xaa25ed['push'](_0xaa25ed['shift']());}}}(a108_0x471a,0xe1165));import a108_0x4d75d7 from'path';import a108_0x43cf3e from'fs/promises';import{existsSync}from'fs';function a108_0x471a(){const _0x255637=['env','string','4251328ncCWmD','4797450qkabhv','ignore','94050VEnmPh','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','53804YyjxEy','bun','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20package.json\x20updated','1603917bSrMyk','\x20model(s)','Project\x20name\x20cannot\x20be\x20empty.','writeFile','log','5987224QfbTfZ','npm','W_OK','resolve','bun\x20--version','readFile','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x20api\x20pull`\x20manually\x20later.','Use\x20a\x20different\x20project\x20name.','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','Project\x20name\x20contains\x20invalid\x20characters.','\x20\x20√\x20Configuration\x20file\x20created','cwd','production','name','needsUpgrade','length','\x20\x20rabetbase\x20run\x20start\x0a','trim','*\x20Creating\x20project\x20','description','8309510qswyIV','Project\x20directory\x20\x22','\x20\x20√\x20Pulled\x20','\x22\x20already\x20exists.','utf-8','\x20dataset(s),\x20generated\x20','\x20\x20Installing\x20dependencies...','\x0a\x20\x20cd\x20','stringify','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','parse','Check\x20directory\x20permissions.','validation','modelCount','chdir','dirname','...','198BeSNxH','join','access'];a108_0x471a=function(){return _0x255637;};return a108_0x471a();}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 a108_0x1f84(_0x5f33bd,_0x452e49){_0x5f33bd=_0x5f33bd-0x151;const _0x471a54=a108_0x471a();let _0x1f847a=_0x471a54[_0x5f33bd];return _0x1f847a;}import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x5d3a06,_0x187c73,_0x403755,_0x10399a){const _0xcc28a9=a108_0x1f84,_0x526dac=await checkCliVersion();(_0x526dac[_0xcc28a9(0x189)]||_0x526dac['belowMinimum'])&&(printCliUpgradeWarning(_0x526dac),assertCliVersionSupported(_0x526dac));if(!_0x5d3a06||_0x5d3a06[_0xcc28a9(0x152)]()==='')throw CliErrors[_0xcc28a9(0x161)](_0xcc28a9(0x177));const _0x56f826=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x56f826['test'](_0x5d3a06))throw CliErrors['validation'](_0xcc28a9(0x184),_0xcc28a9(0x170));if(_0x5d3a06[_0xcc28a9(0x18a)]>0x64)throw CliErrors['validation'](_0xcc28a9(0x16f));const _0x256981=a108_0x4d75d7[_0xcc28a9(0x17d)](process[_0xcc28a9(0x186)](),_0x5d3a06);if(existsSync(_0x256981))throw CliErrors[_0xcc28a9(0x161)](_0xcc28a9(0x156)+_0x5d3a06+_0xcc28a9(0x158),_0xcc28a9(0x182));try{const _0x128139=a108_0x4d75d7[_0xcc28a9(0x164)](_0x256981);await a108_0x43cf3e[_0xcc28a9(0x168)](_0x128139,a108_0x43cf3e['constants'][_0xcc28a9(0x17c)]);}catch{throw CliErrors[_0xcc28a9(0x161)](_0xcc28a9(0x173),_0xcc28a9(0x160));}try{console[_0xcc28a9(0x179)](_0xcc28a9(0x153)+_0x5d3a06+_0xcc28a9(0x165));const _0x595231=getSubAppReactDemoTemplateDir();await copyDirectory(_0x595231,_0x256981),console[_0xcc28a9(0x179)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x5d3a06),console[_0xcc28a9(0x179)](_0xcc28a9(0x174)),console[_0xcc28a9(0x179)](_0xcc28a9(0x15b)),console[_0xcc28a9(0x179)](_0xcc28a9(0x15e)),await formatCode(_0x256981),console[_0xcc28a9(0x179)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x5d3a06,_0x403755,_0x187c73),console[_0xcc28a9(0x179)](_0xcc28a9(0x185)),_0x403755&&await pullApiConfig(_0x256981,_0x403755,_0x187c73,_0x10399a),console[_0xcc28a9(0x179)]('\x0a√\x20Project\x20'+_0x5d3a06+'\x20created\x20successfully!'),console[_0xcc28a9(0x179)](_0xcc28a9(0x15c)+_0x5d3a06),console[_0xcc28a9(0x179)](_0xcc28a9(0x151));}catch(_0x235ef7){try{existsSync(_0x256981)&&await a108_0x43cf3e['rm'](_0x256981,{'recursive':!![],'force':!![]});}catch{}throw _0x235ef7;}}async function updatePackageJsonName(_0xd1b181){const _0x33da81=a108_0x1f84,_0x4128fe=a108_0x4d75d7[_0x33da81(0x17d)](process[_0x33da81(0x186)](),_0xd1b181),_0x26d067=a108_0x4d75d7[_0x33da81(0x167)](_0x4128fe,'package.json'),_0x812a04=await a108_0x43cf3e[_0x33da81(0x17f)](_0x26d067,_0x33da81(0x159)),_0x16dc16=JSON[_0x33da81(0x15f)](_0x812a04);_0x16dc16[_0x33da81(0x188)]=_0xd1b181,_0x16dc16[_0x33da81(0x154)]=_0x33da81(0x180),await a108_0x43cf3e[_0x33da81(0x178)](_0x26d067,JSON[_0x33da81(0x15d)](_0x16dc16,null,0x2)+'\x0a');}function detectPackageManager(){const _0x142e63=a108_0x1f84;try{return execSync(_0x142e63(0x17e),{'stdio':_0x142e63(0x16d)}),_0x142e63(0x172);}catch{return _0x142e63(0x17b);}}async function formatCode(_0x1e9968){try{await execAsync('bun\x20run\x20format',{'cwd':_0x1e9968});}catch{}}async function configureProject(_0x57ca7f,_0x5bcc48,_0x1394f7){const _0x3e046d=a108_0x1f84,_0x255615=a108_0x4d75d7[_0x3e046d(0x17d)](process['cwd'](),_0x57ca7f),_0x4cb04e=a108_0x4d75d7[_0x3e046d(0x167)](_0x255615,NEW_CONFIG_NAME),_0x2b8a33=readConfig(),_0x3ba49f=typeof _0x2b8a33['env']===_0x3e046d(0x16a)?_0x2b8a33[_0x3e046d(0x169)]:undefined,_0x2ebbee={};for(const _0x51a285 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x2b8a33[_0x51a285]!=null)_0x2ebbee[_0x51a285]=_0x2b8a33[_0x51a285];}const _0x54062a=buildCanonicalProjectConfig(_0x2ebbee,{'appCodes':_0x5bcc48?[_0x5bcc48]:[],'env':_0x1394f7||_0x3ba49f||_0x3e046d(0x187),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x4cb04e,_0x54062a);}async function pullApiConfig(_0x1b7b32,_0x10485e,_0x56d75c,_0x41235d){const _0x5c9e95=a108_0x1f84,_0x30db93=process['cwd']();try{process[_0x5c9e95(0x163)](_0x1b7b32);const _0x576906=_0x56d75c||_0x5c9e95(0x187);initEnv(_0x576906),console['log']('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x417dd9}=await fetchModelList(_0x10485e,_0x41235d||''),_0x596b40=await generateApiFile(_0x417dd9,'',_0x10485e,!![],_0x576906,DEFAULT_API_DIR);console[_0x5c9e95(0x179)](_0x5c9e95(0x157)+_0x417dd9[_0x5c9e95(0x18a)]+_0x5c9e95(0x15a)+_0x596b40[_0x5c9e95(0x162)]+_0x5c9e95(0x176));}catch(_0x20e410){console[_0x5c9e95(0x179)](_0x5c9e95(0x183)+CLI_BIN_NAME+_0x5c9e95(0x181));}finally{process['chdir'](_0x30db93);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a109_0x1b9af2=a109_0x5c48;(function(_0x1d9496,_0x3f1169){const _0x3d0ea4=a109_0x5c48,_0x1bf8b0=_0x1d9496();while(!![]){try{const _0x540636=parseInt(_0x3d0ea4(0xfb))/0x1*(parseInt(_0x3d0ea4(0x107))/0x2)+-parseInt(_0x3d0ea4(0x108))/0x3*(parseInt(_0x3d0ea4(0xff))/0x4)+-parseInt(_0x3d0ea4(0x102))/0x5*(parseInt(_0x3d0ea4(0x106))/0x6)+parseInt(_0x3d0ea4(0x109))/0x7+-parseInt(_0x3d0ea4(0x10a))/0x8+-parseInt(_0x3d0ea4(0x103))/0x9+-parseInt(_0x3d0ea4(0x104))/0xa*(-parseInt(_0x3d0ea4(0x100))/0xb);if(_0x540636===_0x3f1169)break;else _0x1bf8b0['push'](_0x1bf8b0['shift']());}catch(_0x198c08){_0x1bf8b0['push'](_0x1bf8b0['shift']());}}}(a109_0x3784,0x53ab5));import a109_0x53d216 from'node:path';import{fileURLToPath}from'node:url';function a109_0x3784(){const _0x5136a2=['sub-app-react-demo','979248ScWvzM','1032894KFWgta','106104xhaWoK','4066979VTEKpG','225832sspoXH','projects','templates','1qgantH','../../../../','resolve','join','76ENyvNp','99nAdcXA','dirname','20PDmfQk','281412GUyFuo','699540iRAWPo'];a109_0x3784=function(){return _0x5136a2;};return a109_0x3784();}const __dirname=a109_0x53d216[a109_0x1b9af2(0x101)](fileURLToPath(import.meta.url));function a109_0x5c48(_0x45c545,_0x235150){_0x45c545=_0x45c545-0xf9;const _0x37849e=a109_0x3784();let _0x5c48bc=_0x37849e[_0x45c545];return _0x5c48bc;}export function getRabetbaseCliPackageRoot(){const _0x2462c5=a109_0x1b9af2;return a109_0x53d216[_0x2462c5(0xfd)](__dirname,_0x2462c5(0xfc));}export function getSubAppReactDemoTemplateDir(){const _0x25ad65=a109_0x1b9af2;return a109_0x53d216[_0x25ad65(0xfe)](getRabetbaseCliPackageRoot(),_0x25ad65(0xfa),_0x25ad65(0xf9),_0x25ad65(0x105));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3850a0,_0xf1bc79){const _0x450912=a110_0x4f23,_0x4a8696=_0x3850a0();while(!![]){try{const _0x4963f1=-parseInt(_0x450912(0xdf))/0x1*(-parseInt(_0x450912(0xef))/0x2)+parseInt(_0x450912(0xe0))/0x3*(parseInt(_0x450912(0xe9))/0x4)+parseInt(_0x450912(0xe6))/0x5+-parseInt(_0x450912(0xe5))/0x6+parseInt(_0x450912(0xe7))/0x7*(-parseInt(_0x450912(0xe4))/0x8)+-parseInt(_0x450912(0xe3))/0x9+parseInt(_0x450912(0xee))/0xa;if(_0x4963f1===_0xf1bc79)break;else _0x4a8696['push'](_0x4a8696['shift']());}catch(_0x49dc94){_0x4a8696['push'](_0x4a8696['shift']());}}}(a110_0x420a,0x4879a));function a110_0x420a(){const _0x74cd9b=['resolve','message','now','9966050bnPCGJ','566HKwMMm','info','开始复制项目模板','41tuVzzd','3IniHzo','cwd','copy','4758309CChVCy','40enZLXw','3390390jgkOLH','949835FTCJIT','513625ezBXwY','success','2237296wHEZNZ','error'];a110_0x420a=function(){return _0x74cd9b;};return a110_0x420a();}import a110_0x234ad1 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a110_0x4f23(_0x498676,_0x2164f1){_0x498676=_0x498676-0xdf;const _0x420a23=a110_0x420a();let _0x4f2347=_0x420a23[_0x498676];return _0x4f2347;}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x2b0000){const _0x578c58=a110_0x4f23,_0x2eebb9=Date[_0x578c58(0xed)](),_0x401509=a110_0x234ad1[_0x578c58(0xeb)](process[_0x578c58(0xe1)](),_0x2b0000);try{logger[_0x578c58(0xf0)](_0x578c58(0xe2),_0x578c58(0xf1),{'projectCode':_0x2b0000,'templateDir':templateDir}),await copyDirectory(templateDir,_0x401509);const _0x1e45a0=Date[_0x578c58(0xed)]()-_0x2eebb9;logger[_0x578c58(0xe8)](_0x578c58(0xe2),'项目模板复制完成',_0x1e45a0,{'projectCode':_0x2b0000});}catch(_0x2102ef){const _0x3783fd=Date['now']()-_0x2eebb9;logger[_0x578c58(0xea)](_0x578c58(0xe2),'项目模板复制失败',{'projectCode':_0x2b0000,'error':_0x2102ef instanceof Error?_0x2102ef[_0x578c58(0xec)]:String(_0x2102ef),'duration':_0x3783fd});throw _0x2102ef;}return formatElapsed(_0x2eebb9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a5c2b,_0x4efc62){const _0xf3372b=a111_0x2709,_0x36db02=_0x5a5c2b();while(!![]){try{const _0x4b445f=-parseInt(_0xf3372b(0x19e))/0x1+-parseInt(_0xf3372b(0x19c))/0x2+-parseInt(_0xf3372b(0x195))/0x3*(parseInt(_0xf3372b(0x198))/0x4)+-parseInt(_0xf3372b(0x197))/0x5+-parseInt(_0xf3372b(0x193))/0x6*(-parseInt(_0xf3372b(0x1a3))/0x7)+parseInt(_0xf3372b(0x1a2))/0x8+parseInt(_0xf3372b(0x190))/0x9;if(_0x4b445f===_0x4efc62)break;else _0x36db02['push'](_0x36db02['shift']());}catch(_0x4e9b25){_0x36db02['push'](_0x36db02['shift']());}}}(a111_0x2108,0xbf2a8));import a111_0x46adf0 from'node:path';import{execa}from'execa';function a111_0x2709(_0x131725,_0x1726a2){_0x131725=_0x131725-0x190;const _0x2108e3=a111_0x2108();let _0x270941=_0x2108e3[_0x131725];return _0x270941;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a111_0x2108(){const _0x232019=['format','代码格式化失败','1334468olTXmD','now','1237204bUfSMn','info','npx','resolve','10466912xKhjvo','14ChIJXu','34882002DVexey','--write','代码格式化完成','131574jJcVmk','success','9buqZdB','开始格式化代码','6413635HjdHlH','1677092ziGQHK','cwd'];a111_0x2108=function(){return _0x232019;};return a111_0x2108();}export async function formatProjectCode(_0x26ec9f){const _0x328005=a111_0x2709,_0x267b8e=Date[_0x328005(0x19d)](),_0x2e87ce=a111_0x46adf0[_0x328005(0x1a1)](process[_0x328005(0x199)](),_0x26ec9f);try{logger[_0x328005(0x19f)]('format',_0x328005(0x196),{'projectCode':_0x26ec9f}),await execa(resolveNpmBin(_0x328005(0x1a0)),['prettier',_0x328005(0x191),'.'],{'cwd':_0x2e87ce});const _0x5c6a18=Date[_0x328005(0x19d)]()-_0x267b8e;logger[_0x328005(0x194)](_0x328005(0x19a),_0x328005(0x192),_0x5c6a18,{'projectCode':_0x26ec9f});}catch(_0x1c4573){const _0x124ea5=Date['now']()-_0x267b8e;logger['error'](_0x328005(0x19a),_0x328005(0x19b),{'projectCode':_0x26ec9f,'error':_0x1c4573 instanceof Error?_0x1c4573['message']:String(_0x1c4573),'duration':_0x124ea5});throw _0x1c4573;}return formatElapsed(_0x267b8e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ce174,_0x2b0e66){const _0x52c9c5=a112_0x50e3,_0x2edc69=_0x4ce174();while(!![]){try{const _0x31ec45=parseInt(_0x52c9c5(0x1d0))/0x1*(parseInt(_0x52c9c5(0x1c3))/0x2)+parseInt(_0x52c9c5(0x1bb))/0x3*(-parseInt(_0x52c9c5(0x1c8))/0x4)+parseInt(_0x52c9c5(0x1c5))/0x5*(parseInt(_0x52c9c5(0x1ba))/0x6)+parseInt(_0x52c9c5(0x1c7))/0x7*(parseInt(_0x52c9c5(0x1cd))/0x8)+parseInt(_0x52c9c5(0x1c9))/0x9*(-parseInt(_0x52c9c5(0x1bf))/0xa)+parseInt(_0x52c9c5(0x1c6))/0xb*(-parseInt(_0x52c9c5(0x1ce))/0xc)+-parseInt(_0x52c9c5(0x1cf))/0xd*(-parseInt(_0x52c9c5(0x1d1))/0xe);if(_0x31ec45===_0x2b0e66)break;else _0x2edc69['push'](_0x2edc69['shift']());}catch(_0x2a8d49){_0x2edc69['push'](_0x2edc69['shift']());}}}(a112_0x4128,0xed123));import a112_0x451148 from'node:path';import{execa}from'execa';function a112_0x50e3(_0x1747a3,_0x1ae0be){_0x1747a3=_0x1747a3-0x1b8;const _0x412834=a112_0x4128();let _0x50e319=_0x412834[_0x1747a3];return _0x50e319;}function a112_0x4128(){const _0x5f07af=['61950gEpiYr','82254wRytmS','cwd','https://registry.npmmirror.com','开始安装依赖','130BmVzka','resolve','now','依赖安装完成','2pYmHdr','--registry','385JnbwPT','154EjqDEP','26831LQSqOw','8eeNQOA','605979ADOiTH','依赖安装失败','install','npm','3952KpZZoM','1348692NfyQVi','65ZOJUuj','350464vsuhPg','1219862ugLemr','success','error'];a112_0x4128=function(){return _0x5f07af;};return a112_0x4128();}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(_0x576f7d){const _0x525484=a112_0x50e3,_0x2ebbff=Date[_0x525484(0x1c1)](),_0x17901a=a112_0x451148[_0x525484(0x1c0)](process[_0x525484(0x1bc)](),_0x576f7d);try{logger['info']('install',_0x525484(0x1be),{'projectCode':_0x576f7d,'registry':_0x525484(0x1bd)}),await execa(resolveNpmBin(_0x525484(0x1cc)),[_0x525484(0x1cb),_0x525484(0x1c4),_0x525484(0x1bd)],{'cwd':_0x17901a});const _0x4ca820=Date['now']()-_0x2ebbff;logger[_0x525484(0x1b8)](_0x525484(0x1cb),_0x525484(0x1c2),_0x4ca820,{'projectCode':_0x576f7d});}catch(_0x5dac03){const _0xa867ae=Date[_0x525484(0x1c1)]()-_0x2ebbff;logger[_0x525484(0x1b9)]('install',_0x525484(0x1ca),{'projectCode':_0x576f7d,'error':_0x5dac03 instanceof Error?_0x5dac03['message']:String(_0x5dac03),'duration':_0xa867ae});throw _0x5dac03;}return formatElapsed(_0x2ebbff);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a113_0x3209ff=a113_0x24e0;(function(_0x2eb508,_0x28ab3f){const _0x20663b=a113_0x24e0,_0x33f7b6=_0x2eb508();while(!![]){try{const _0x430b0e=-parseInt(_0x20663b(0xe8))/0x1*(-parseInt(_0x20663b(0xef))/0x2)+-parseInt(_0x20663b(0xec))/0x3*(parseInt(_0x20663b(0xed))/0x4)+-parseInt(_0x20663b(0xe7))/0x5+parseInt(_0x20663b(0xfc))/0x6*(parseInt(_0x20663b(0xfe))/0x7)+parseInt(_0x20663b(0xf4))/0x8+-parseInt(_0x20663b(0x102))/0x9+parseInt(_0x20663b(0xe6))/0xa;if(_0x430b0e===_0x28ab3f)break;else _0x33f7b6['push'](_0x33f7b6['shift']());}catch(_0x5af884){_0x33f7b6['push'](_0x33f7b6['shift']());}}}(a113_0x4167,0x6ca82));function a113_0x4167(){const _0x349291=['../../commands/project/create/non-interactive.js','cookie','9978wHCFfT','name','889boBFFw','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','string','appcode','501642hYGSsp','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','nonInteractive','upgrade','boolean','validation','trim','Project\x20name','Target\x20environment','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','1793130Gxyyeo','4301835zRlWnq','46RZEGKo','str','../../commands/project/create/main.js','Auto-confirm\x20prompts','42051dmDHHz','40PFoWmf','env','38362BVfpuj','create','write','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','App\x20code\x20to\x20initialize','1827944PKvFIo','bool','project','yes','args','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.'];a113_0x4167=function(){return _0x349291;};return a113_0x4167();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a113_0x24e0(_0x53210c,_0x275c89){_0x53210c=_0x53210c-0xe6;const _0x4167dc=a113_0x4167();let _0x24e0d7=_0x4167dc[_0x53210c];return _0x24e0d7;}import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a113_0x3209ff(0x101),'type':'string','description':a113_0x3209ff(0xf3)},{'name':a113_0x3209ff(0xee),'type':a113_0x3209ff(0x100),'description':a113_0x3209ff(0x10a)},{'name':a113_0x3209ff(0xf7),'type':'boolean','description':a113_0x3209ff(0xeb),'default':![]}],createFlags=[{'name':'name','type':a113_0x3209ff(0x100),'description':a113_0x3209ff(0x109)},{'name':a113_0x3209ff(0xee),'type':a113_0x3209ff(0x100),'description':a113_0x3209ff(0x10a)},{'name':'appcode','type':a113_0x3209ff(0x100),'description':a113_0x3209ff(0x103)}],upgradeFlags=[{'name':'yes','type':a113_0x3209ff(0x106),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a113_0x3209ff(0xf6),'command':'init','description':a113_0x3209ff(0xff),'risk':a113_0x3209ff(0xf1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x36a2b0){const _0x39c809=a113_0x3209ff;return await initConfig({'appcode':_0x36a2b0[_0x39c809(0xe9)](_0x39c809(0x101))||undefined,'env':_0x36a2b0[_0x39c809(0xe9)](_0x39c809(0xee))||undefined,'autoYes':_0x36a2b0[_0x39c809(0xf5)](_0x39c809(0xf7))}),{'ok':!![]};}},{'service':'project','command':a113_0x3209ff(0xf0),'description':'Create\x20a\x20new\x20project','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x30938a){const _0x464060=a113_0x3209ff,{createApp:_0x292ab0}=await import(_0x464060(0xea)),{createProjectNonInteractive:_0x1f6614}=await import(_0x464060(0xfa)),_0xd07abb=_0x30938a['str'](_0x464060(0xfd))[_0x464060(0x108)]()||_0x30938a[_0x464060(0xf8)][0x0]?.[_0x464060(0x108)](),_0x4926f6=_0x30938a[_0x464060(0xe9)](_0x464060(0xee))||undefined,_0x55031d=_0x30938a[_0x464060(0xe9)](_0x464060(0x101))||undefined;if(_0x30938a[_0x464060(0x104)]){if(!_0xd07abb)throw CliErrors[_0x464060(0x107)](_0x464060(0xf9),'Usage:\x20'+CLI_BIN_NAME+_0x464060(0xf2));await _0x1f6614(_0xd07abb,_0x4926f6,_0x55031d,_0x30938a[_0x464060(0xfb)]);}else await _0x292ab0({'projectCode':_0xd07abb,'appCode':_0x55031d,'env':_0x4926f6,'cookie':_0x30938a[_0x464060(0xfb)]});return{'ok':!![]};}},{'service':'project','command':a113_0x3209ff(0x105),'description':a113_0x3209ff(0x10b),'risk':a113_0x3209ff(0xf1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5d5a71){const _0x1deafa=a113_0x3209ff;return await upgradeApp(_0x5d5a71['nonInteractive'],{'yes':_0x5d5a71[_0x1deafa(0xf5)](_0x1deafa(0xf7))}),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a114_0x52b3(_0x136a5e,_0x5ab69f){_0x136a5e=_0x136a5e-0x76;const _0x253395=a114_0x2533();let _0x52b38e=_0x253395[_0x136a5e];return _0x52b38e;}(function(_0x7360fb,_0x22ddbe){const _0x4be678=a114_0x52b3,_0x9a182c=_0x7360fb();while(!![]){try{const _0x352b6d=-parseInt(_0x4be678(0xa2))/0x1+parseInt(_0x4be678(0x92))/0x2*(parseInt(_0x4be678(0xa0))/0x3)+-parseInt(_0x4be678(0x9d))/0x4+-parseInt(_0x4be678(0x8b))/0x5+parseInt(_0x4be678(0x96))/0x6+parseInt(_0x4be678(0x7a))/0x7+parseInt(_0x4be678(0x89))/0x8;if(_0x352b6d===_0x22ddbe)break;else _0x9a182c['push'](_0x9a182c['shift']());}catch(_0x85f248){_0x9a182c['push'](_0x9a182c['shift']());}}}(a114_0x2533,0xe00e7));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a114_0x16d097 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';function a114_0x2533(){const _0x5b8a00=['Migration\x20cancelled.\x20Run\x20`','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','version','50nkbhnk','info','.bak','toLocaleString','3538620AHAslC','setLogPath','defaultApp','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','apps','string','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','6510776xxJGyE','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','join','2721QnhRVh','utf8','814027QLYHCz','1.0.0','\x20\x20Default:\x20','../..','从旧配置文件升级成功','6576759Vvokgt','cyan','appcode','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','log','App\x20Code\x20cannot\x20be\x20empty','init','\x20\x20appcode:\x20','production','\x20→\x20.rabetbase.json','cwd','keys','green','parse','bold','28803920OXDNBg','env','8965080UETjPV','app','package.json','?\x20(Old\x20file\x20→\x20*.bak)'];a114_0x2533=function(){return _0x5b8a00;};return a114_0x2533();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x3093ff){const _0x486530=a114_0x52b3,{appcode:_0x3f6368,env:_0x1c46ac,autoYes:_0x5cdca0}=_0x3093ff,_0xd5e938=process[_0x486530(0x84)]();if(getProjectConfigPath())throw new Error(_0x486530(0x9e));let _0x3a7e2f;for(const _0x1a1ef6 of LEGACY_CONFIG_NAMES){const _0x3e6b7d=resolve(_0xd5e938,_0x1a1ef6);if(existsSync(_0x3e6b7d)){_0x3a7e2f=_0x3e6b7d;break;}}if(_0x3a7e2f){let _0x3a0997={};try{_0x3a0997=JSON[_0x486530(0x87)](readFileSync(_0x3a7e2f,_0x486530(0xa1)));}catch{}const _0x27b882=basename(_0x3a7e2f),_0x65ca2=_0x3a0997?.['appcode']||_0x3a0997?.[_0x486530(0x8c)];let _0x1907ae=_0x5cdca0;!_0x5cdca0&&(console[_0x486530(0x7e)](a114_0x16d097['yellow'](_0x486530(0x90)+a114_0x16d097[_0x486530(0x88)](_0x27b882))),_0x65ca2&&console[_0x486530(0x7e)](a114_0x16d097[_0x486530(0x7b)](_0x486530(0x81)+_0x65ca2)),_0x1907ae=await confirm({'message':'Upgrade\x20it\x20to\x20'+a114_0x16d097[_0x486530(0x88)]('.rabetbase.json')+_0x486530(0x8e),'default':!![]}));if(!_0x1907ae){console[_0x486530(0x7e)](_0x486530(0x8f)+CLI_BIN_NAME+'\x20project\x20init`\x20to\x20start\x20fresh.');return;}const _0x5eac9f=resolve(_0xd5e938,NEW_CONFIG_NAME),_0xc9c408=getCliVersionFromPkg(),_0x51b42d=readRawConfig(),_0x4ce5a8=_0x3f6368||(typeof _0x3a0997?.['appcode']===_0x486530(0x9b)?_0x3a0997[_0x486530(0x7c)]:undefined)||(typeof _0x3a0997?.[_0x486530(0x8c)]===_0x486530(0x9b)?_0x3a0997[_0x486530(0x8c)]:undefined)||await askAppcode(),_0x8c6671=typeof _0x3a0997?.['env']===_0x486530(0x9b)?_0x3a0997[_0x486530(0x8a)]:typeof _0x51b42d[_0x486530(0x8a)]===_0x486530(0x9b)?_0x51b42d[_0x486530(0x8a)]:_0x486530(0x82),_0xcb6783=buildCanonicalProjectConfig({..._0x51b42d,..._0x3a0997},{'appCodes':[_0x4ce5a8],'env':_0x8c6671,'metadata':{'version':_0xc9c408,'migratedAt':new Date()[_0x486530(0x95)](),'migratedFrom':_0x3a7e2f}});writeConfigFile(_0x5eac9f,_0xcb6783);const _0x26f06a=_0x3a7e2f+_0x486530(0x94);renameSync(_0x3a7e2f,_0x26f06a),logger['setLogPath'](_0xd5e938),logger['info'](_0x486530(0x80),_0x486530(0x79),{'from':_0x3a7e2f,'to':_0x5eac9f,'appcode':_0x4ce5a8,'env':_0xcb6783['env']}),console[_0x486530(0x7e)](a114_0x16d097[_0x486530(0x86)]('✓\x20Upgraded\x20'+_0x27b882+_0x486530(0x83))),console[_0x486530(0x7e)](a114_0x16d097['cyan']('\x20\x20Apps:\x20'+Object[_0x486530(0x85)](_0xcb6783[_0x486530(0x9a)]||{})[_0x486530(0x9f)](',\x20'))),console['log'](a114_0x16d097['cyan']('\x20\x20Default:\x20'+_0xcb6783[_0x486530(0x98)])),console[_0x486530(0x7e)](a114_0x16d097['gray'](_0x486530(0x7d)+_0x27b882+'.bak'));return;}const _0x314a50=_0x3f6368||await askAppcode(),_0x56569d=resolve(_0xd5e938,NEW_CONFIG_NAME),_0x3e602a=getCliVersionFromPkg(),_0x580fb9=readRawConfig(),_0x547f4c=typeof _0x580fb9[_0x486530(0x8a)]==='string'?_0x580fb9[_0x486530(0x8a)]:undefined,_0x19919c=buildCanonicalProjectConfig({},{'appCodes':[_0x314a50],'env':_0x1c46ac||_0x547f4c||'production','metadata':{'version':_0x3e602a,'createdAt':new Date()[_0x486530(0x95)]()}});writeConfigFile(_0x56569d,_0x19919c),logger[_0x486530(0x97)](_0xd5e938),logger[_0x486530(0x93)](_0x486530(0x80),'初始化项目配置文件成功',{'appcode':_0x314a50,'env':_0x19919c[_0x486530(0x8a)],'version':_0x19919c[_0x486530(0x91)],'configPath':_0x56569d}),console['log'](a114_0x16d097['green'](_0x486530(0x99))),console['log'](a114_0x16d097[_0x486530(0x7b)]('\x20\x20Apps:\x20'+Object['keys'](_0x19919c[_0x486530(0x9a)]||{})[_0x486530(0x9f)](',\x20'))),console[_0x486530(0x7e)](a114_0x16d097['cyan'](_0x486530(0x77)+_0x19919c['defaultApp'])),console['log'](_0x486530(0x9c)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){return input({'message':'Please\x20enter\x20App\x20Code:','validate':_0x571491=>{const _0x2b731f=a114_0x52b3;if(!_0x571491['trim']())return _0x2b731f(0x7f);const {valid:_0x48796b,message:_0x2efc79}=validateAppcode(_0x571491['trim']());return _0x48796b||_0x2efc79||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0xd9e277=a114_0x52b3;try{const _0x4e54e7=fileURLToPath(import.meta.url),_0x3bcdfc=resolve(dirname(_0x4e54e7),_0xd9e277(0x78)),_0xf107ee=JSON['parse'](readFileSync(resolve(_0x3bcdfc,_0xd9e277(0x8d)),'utf8'));return _0xf107ee['version']||_0xd9e277(0x76);}catch{return _0xd9e277(0x76);}}
|