@lovrabet/rabetbase-cli 2.3.10 → 2.3.11
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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/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/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/commands/bff/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a36_0x641a(_0x2a726a,_0x224d6d){_0x2a726a=_0x2a726a-0x178;const _0x318131=a36_0x3181();let _0x641ac7=_0x318131[_0x2a726a];return _0x641ac7;}const a36_0x425128=a36_0x641a;(function(_0x3cc809,_0x38b516){const _0x305f7d=a36_0x641a,_0x324a15=_0x3cc809();while(!![]){try{const _0x262522=parseInt(_0x305f7d(0x1b6))/0x1+-parseInt(_0x305f7d(0x1bc))/0x2*(-parseInt(_0x305f7d(0x194))/0x3)+parseInt(_0x305f7d(0x186))/0x4*(-parseInt(_0x305f7d(0x17a))/0x5)+parseInt(_0x305f7d(0x1b5))/0x6*(-parseInt(_0x305f7d(0x199))/0x7)+-parseInt(_0x305f7d(0x1b0))/0x8+-parseInt(_0x305f7d(0x1b2))/0x9*(parseInt(_0x305f7d(0x1bb))/0xa)+parseInt(_0x305f7d(0x1ab))/0xb;if(_0x262522===_0x38b516)break;else _0x324a15['push'](_0x324a15['shift']());}catch(_0x49286d){_0x324a15['push'](_0x324a15['shift']());}}}(a36_0x3181,0xd576c));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x425128(0x19a),'command':'pull','description':a36_0x425128(0x1a7),'risk':a36_0x425128(0x17d),'flags':[{'name':a36_0x425128(0x18f),'type':a36_0x425128(0x1aa),'description':a36_0x425128(0x187),'enum':[a36_0x425128(0x18d),a36_0x425128(0x1a4),a36_0x425128(0x178)]},{'name':a36_0x425128(0x185),'type':a36_0x425128(0x19f),'description':a36_0x425128(0x1b1)}],async 'dryRun'(_0x2a145d){const _0x2223b7=a36_0x425128,_0x3ebbd9=loadBffProjectConfig(_0x2a145d[_0x2223b7(0x19b)]),_0x3e4cf8=await readBffLockFile(_0x3ebbd9[_0x2223b7(0x196)]),{appLock:_0x558839}=ensureLockScope(_0x3e4cf8??createEmptyBffLock(),_0x2a145d[_0x2223b7(0x19b)],_0x3ebbd9[_0x2223b7(0x197)],'pull'),_0x271055=normalizeBffType(_0x2a145d[_0x2223b7(0x19e)](_0x2223b7(0x18f)))??undefined,_0x4a3888=buildDatasetCodeToAliasMap(_0x2a145d['apiDir'],_0x2a145d[_0x2223b7(0x19b)]),[_0x449ec4,_0x582fe0]=await Promise['all']([listBffScripts(_0x2a145d[_0x2223b7(0x19b)],_0x271055),getBffScriptStatistics(_0x2a145d[_0x2223b7(0x19b)])]),_0xbdf0dc=createHookLocationMap(_0x582fe0),_0x47f1d3=[];for(const _0x27b4e6 of _0x449ec4){const _0x410cd5=resolveRemoteScriptTarget(_0x3ebbd9,_0x27b4e6,_0xbdf0dc,_0x558839[_0x2223b7(0x192)],_0x4a3888);if(!_0x410cd5){_0x47f1d3[_0x2223b7(0x1af)]({'scriptType':_0x27b4e6[_0x2223b7(0x18e)],'functionName':_0x27b4e6[_0x2223b7(0x181)]??'','status':'skipped','reason':_0x2223b7(0x1a3)});continue;}const _0x57b917=_0x558839[_0x2223b7(0x192)][_0x410cd5[_0x2223b7(0x183)]],_0x4654aa=_0x27b4e6[_0x2223b7(0x189)]!=null?computeContentHash(_0x27b4e6[_0x2223b7(0x189)]):undefined,_0x1c2438=await hasUnsyncedLocalChanges(_0x410cd5[_0x2223b7(0x182)],_0x57b917,_0x4654aa);_0x47f1d3[_0x2223b7(0x1af)]({'lockKey':_0x410cd5[_0x2223b7(0x183)],'filePath':_0x410cd5[_0x2223b7(0x182)],'remoteId':_0x27b4e6['id']??null,'status':_0x1c2438?'conflict':_0x2223b7(0x1a5)});}return{'method':_0x2223b7(0x17e),'url':_0x2223b7(0x17b)+_0x2a145d[_0x2223b7(0x19b)]+(_0x271055?_0x2223b7(0x179)+_0x271055:''),'body':{'appCode':_0x2a145d[_0x2223b7(0x19b)],'filterType':_0x271055??null,'files':_0x47f1d3},'description':'Would\x20inspect\x20'+_0x47f1d3[_0x2223b7(0x1bf)]+_0x2223b7(0x1ba)};},async 'execute'(_0x123d09){const _0x38f942=a36_0x425128,_0x140375=loadBffProjectConfig(_0x123d09[_0x38f942(0x19b)]),_0x78a1b3=await readBffLockFile(_0x140375[_0x38f942(0x196)]),{lockData:_0x1d3137,appLock:_0xc4307f}=ensureLockScope(_0x78a1b3??createEmptyBffLock(),_0x123d09['appCode'],_0x140375[_0x38f942(0x197)],_0x38f942(0x17f)),_0x23a48b=normalizeBffType(_0x123d09[_0x38f942(0x19e)](_0x38f942(0x18f)))??undefined;if(_0x123d09[_0x38f942(0x19e)](_0x38f942(0x18f))&&!_0x23a48b)throw CliErrors[_0x38f942(0x19d)]('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0xc48892,_0x42f79a]=await Promise['all']([listBffScripts(_0x123d09[_0x38f942(0x19b)],_0x23a48b),getBffScriptStatistics(_0x123d09[_0x38f942(0x19b)])]);if(_0xc48892[_0x38f942(0x1bf)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x38f942(0x1b3)};const _0x5a9f75=_0x123d09['bool'](_0x38f942(0x185));if(_0x5a9f75&&!_0x123d09[_0x38f942(0x18c)]){const _0x3362c8=await confirmForce();if(!_0x3362c8)throw CliErrors[_0x38f942(0x1be)]('Force\x20pull\x20cancelled.');}if(_0x5a9f75&&_0x123d09[_0x38f942(0x18c)]){}const _0x396e4b=buildDatasetCodeToAliasMap(_0x123d09['apiDir'],_0x123d09['appCode']),_0x1922a3=createHookLocationMap(_0x42f79a),_0x44a6b8=JSON[_0x38f942(0x1a2)](JSON[_0x38f942(0x1a6)](_0x1d3137)),_0x5e285c=_0x123d09['appCode'],_0x5c2a11=_0x44a6b8['apps'][_0x5e285c];if(!_0x5c2a11)throw new Error(_0x38f942(0x1ad)+_0x5e285c+_0x38f942(0x1a8));const _0x1894d2=[],_0x54c1a4=[],_0x33334f=[];for(const _0xc0db of _0xc48892){const _0x5d24e5=resolveRemoteScriptTarget(_0x140375,_0xc0db,_0x1922a3,_0xc4307f['functions'],_0x396e4b);if(!_0x5d24e5){_0x54c1a4[_0x38f942(0x1af)]({'lockKey':_0xc0db[_0x38f942(0x18e)]+'/'+_0xc0db['functionName'],'reason':_0x38f942(0x1a3)});continue;}const _0x8d582b=_0xc4307f[_0x38f942(0x192)][_0x5d24e5[_0x38f942(0x183)]];try{if(!_0xc0db['id'])throw new Error(_0x38f942(0x1b4));if(_0xc0db['scriptContent']==null)throw new Error(_0x38f942(0x1a0));const _0xed3a2e=_0xc0db[_0x38f942(0x189)],_0x44271a=computeContentHash(_0xed3a2e);if(!_0x5a9f75){const _0x25b61a=await hasUnsyncedLocalChanges(_0x5d24e5[_0x38f942(0x182)],_0x8d582b,_0x44271a);if(_0x25b61a){_0x54c1a4['push']({'lockKey':_0x5d24e5['lockKey'],'reason':_0x38f942(0x195)});continue;}}await ensureParentDirectory(_0x5d24e5[_0x38f942(0x182)]),await writeFile(_0x5d24e5[_0x38f942(0x182)],_0xed3a2e,_0x38f942(0x180));const _0x20bd55={'hash':_0x44271a,'remoteId':_0xc0db['id'],'version':_0xc0db['version']};_0x5d24e5[_0x38f942(0x18f)]===_0x38f942(0x178)&&_0x5d24e5['hookLocation']&&(_0x20bd55['alias']=_0x5d24e5['hookLocation'][_0x38f942(0x1bd)],_0x20bd55['datasetCode']=_0x5d24e5[_0x38f942(0x19c)][_0x38f942(0x191)],_0x20bd55['operationType']=_0x5d24e5[_0x38f942(0x19c)]['operationType'],_0x20bd55[_0x38f942(0x1b7)]=_0x5d24e5[_0x38f942(0x19c)]['functionNode']),_0x5c2a11['functions'][_0x5d24e5['lockKey']]=_0x20bd55,_0x1894d2[_0x38f942(0x1af)]({'lockKey':_0x5d24e5['lockKey'],'remoteId':_0xc0db['id']});}catch(_0x483987){_0x33334f[_0x38f942(0x1af)]({'lockKey':_0x5d24e5['lockKey'],'error':_0x483987 instanceof Error?_0x483987[_0x38f942(0x18b)]:String(_0x483987)});}}return _0x5c2a11[_0x38f942(0x1b8)]=new Date()[_0x38f942(0x184)](),await writeBffLockFile(_0x140375[_0x38f942(0x196)],_0x44a6b8),{'ok':_0x33334f['length']===0x0,'data':{'pulled':_0x1894d2,'skipped':_0x54c1a4,'failed':_0x33334f},'message':_0x38f942(0x17c)+_0x1894d2[_0x38f942(0x1bf)]+_0x38f942(0x1b9)+_0x54c1a4['length']+'\x20skipped,\x20'+_0x33334f[_0x38f942(0x1bf)]+_0x38f942(0x188)};}};async function hasUnsyncedLocalChanges(_0x4e5aa1,_0x446d09,_0x4beb15){const _0x547fa3=a36_0x425128;if(!await fileExists(_0x4e5aa1))return![];const _0x1d8db4=await computeFileHash(_0x4e5aa1);if(!_0x446d09)return _0x4beb15?_0x1d8db4!==_0x4beb15:!![];return _0x1d8db4!==_0x446d09[_0x547fa3(0x190)];}function buildDatasetCodeToAliasMap(_0x18216e,_0x335739){const _0x2f24ed=a36_0x425128,_0xc554a5=loadAliasMap(_0x18216e,undefined,resolveApiFilePath(_0x18216e,_0x335739));return new Map(_0xc554a5[_0x2f24ed(0x1a1)](_0x822993=>[_0x822993[_0x2f24ed(0x191)],_0x822993['alias']]));}async function confirmForce(){const _0x1aa445=a36_0x425128,_0x476d3c=createInterface({'input':process['stdin'],'output':process[_0x1aa445(0x1a9)]}),_0x3afe8c=await new Promise(_0x2cc1ce=>{const _0x2b6c02=_0x1aa445;_0x476d3c[_0x2b6c02(0x18a)](_0x2b6c02(0x1ae),_0x2cc1ce);});return _0x476d3c[_0x1aa445(0x1ac)](),['y','yes']['includes'](_0x3afe8c[_0x1aa445(0x198)]()[_0x1aa445(0x193)]());}function a36_0x3181(){const _0x1e103b=['lastSync','\x20pulled,\x20','\x20remote\x20BFF\x20script(s)\x20for\x20pull','18310ILhBaT','6fFlaQf','alias','cancelled','length','HOOK','&type=','6564965VKKnEd','/api/management/library/scripts/list?appCode=','Pull\x20complete:\x20','write','GET','pull','utf8','functionName','filePath','lockKey','toISOString','force','4CWSBBQ','Pull\x20only\x20this\x20script\x20type','\x20failed','scriptContent','question','message','nonInteractive','COMMON','scriptType','type','hash','datasetCode','functions','toLowerCase','579102GFdbXE','local\x20unsynced\x20changes','lockFilePath','scriptsRoot','trim','3361897PfmIAz','bff','appCode','hookLocation','validation','str','boolean','Remote\x20script\x20missing\x20content.','map','parse','unresolvable\x20target\x20path','ENDPOINT','would_pull','stringify','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','\x22\x20not\x20found\x20after\x20ensureLockScope.','stderr','string','32422335ubtcLE','close','Lock\x20scope\x20for\x20app\x20\x22','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','push','4886912CmEwXM','Force\x20overwrite\x20local\x20unsynced\x20changes','2718bYsaoE','No\x20remote\x20BFF\x20scripts\x20found.','Remote\x20script\x20missing\x20id.','6WVmncH','304851xSAyEe','functionNode'];a36_0x3181=function(){return _0x1e103b;};return a36_0x3181();}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a37_0x4b3084=a37_0x5414;(function(_0x4ee80b,_0x12f66c){const _0x5ae58a=a37_0x5414,_0x5d2956=_0x4ee80b();while(!![]){try{const _0x54eff8=parseInt(_0x5ae58a(0x1b8))/0x1*(parseInt(_0x5ae58a(0x196))/0x2)+parseInt(_0x5ae58a(0x167))/0x3*(parseInt(_0x5ae58a(0x18e))/0x4)+parseInt(_0x5ae58a(0x17b))/0x5+parseInt(_0x5ae58a(0x1a4))/0x6*(-parseInt(_0x5ae58a(0x175))/0x7)+parseInt(_0x5ae58a(0x1a2))/0x8*(parseInt(_0x5ae58a(0x169))/0x9)+-parseInt(_0x5ae58a(0x16c))/0xa+-parseInt(_0x5ae58a(0x180))/0xb*(parseInt(_0x5ae58a(0x192))/0xc);if(_0x54eff8===_0x12f66c)break;else _0x5d2956['push'](_0x5d2956['shift']());}catch(_0x3d335d){_0x5d2956['push'](_0x5d2956['shift']());}}}(a37_0x1218,0xe8b7d));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a37_0x5414(_0x5189b5,_0x240539){_0x5189b5=_0x5189b5-0x167;const _0x12185e=a37_0x1218();let _0x54144d=_0x12185e[_0x5189b5];return _0x54144d;}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';function a37_0x1218(){const _0x26a498=['Push\x20complete:\x20','13488750OHyNzZ','/api/management/library/scripts/save','Local\x20function\x20not\x20found:\x20','bool','status','stringify','create','filePath','type','7kKQAVS','scriptsRoot','Runtime\x20script\x20cache\x20cleared.','toISOString','Push\x20only\x20this\x20script\x20type','appCode','7230060JWjQaS','aliasToDatasetCode','runtime\x20cache\x20clear\x20failed','remoteId','version','55MBoqLZ','map','every','has','hash','set','attempted','parse','code','name','apiDir','unchanged','functions','\x20uploaded,\x20','4bJCTrM','values','string','some','1963956ZRhDNv','lastSync',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Force\x20push\x20ignoring\x20hash\x20protection','42232vwSNEw','functionNode','datasetId','length','datasetCodeToDataset','would_push','\x20failed,\x20','HOOK','datasetCode','utf8','Would\x20inspect\x20','force','1180056KefBcH','ENDPOINT','889944MyPQeR','\x20skipped,\x20','Lock\x20scope\x20for\x20app\x20\x22','description','\x22\x20not\x20found\x20after\x20ensureLockScope.','Push\x20local\x20BFF\x20scripts\x20to\x20remote','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','cleared','Run\x20`','apps','operationType','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','lockFilePath','filter','push','get','alias','No\x20local\x20BFF\x20functions\x20found.','str','lockKey','63VCTOVO','runtime\x20cache\x20not\x20needed','149658JzmXNT','POST','27XSIpJW','validation'];a37_0x1218=function(){return _0x26a498;};return a37_0x1218();}import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a37_0x4b3084(0x1b2),'description':a37_0x4b3084(0x1a9),'risk':'high-risk-write','flags':[{'name':a37_0x4b3084(0x174),'type':a37_0x4b3084(0x190),'description':a37_0x4b3084(0x179),'enum':['COMMON',a37_0x4b3084(0x1a3),a37_0x4b3084(0x19d)]},{'name':'name','type':a37_0x4b3084(0x190),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a37_0x4b3084(0x1a1),'type':'boolean','description':a37_0x4b3084(0x195)}],async 'dryRun'(_0x16bd47){const _0xe8d6b0=a37_0x4b3084,_0x4daaa0=loadBffProjectConfig(_0x16bd47[_0xe8d6b0(0x17a)]),_0x2cef5f=await readBffLockFile(_0x4daaa0[_0xe8d6b0(0x1b0)]),{appLock:_0x4d932b}=ensureLockScope(_0x2cef5f??createEmptyBffLock(),_0x16bd47['appCode'],_0x4daaa0['scriptsRoot'],_0xe8d6b0(0x1b2)),_0x3b9176=await getTargetFunctions(_0x4daaa0,_0x16bd47),_0x476251=_0x16bd47[_0xe8d6b0(0x16f)](_0xe8d6b0(0x1a1)),_0x32ad01=[];for(const _0x499127 of _0x3b9176){const _0x2b3a3e=await computeFileHash(_0x499127[_0xe8d6b0(0x173)]),_0x2733cc=_0x4d932b[_0xe8d6b0(0x18c)][_0x499127['lockKey']],_0x724c5c=!!_0x2733cc&&_0x2733cc['hash']===_0x2b3a3e;_0x32ad01[_0xe8d6b0(0x1b2)]({'lockKey':_0x499127[_0xe8d6b0(0x1b7)],'filePath':_0x499127[_0xe8d6b0(0x173)],'remoteId':_0x2733cc?.[_0xe8d6b0(0x17e)]??null,'mode':_0x2733cc?.['remoteId']?'update':_0xe8d6b0(0x172),'status':!_0x476251&&_0x724c5c?'unchanged':_0xe8d6b0(0x19b)});}return{'method':_0xe8d6b0(0x168),'url':_0xe8d6b0(0x16d),'body':{'appCode':_0x16bd47[_0xe8d6b0(0x17a)],'force':_0x476251,'files':_0x32ad01,'cacheClearAtRuntime':_0x32ad01[_0xe8d6b0(0x191)](_0x48cf16=>_0x48cf16['status']===_0xe8d6b0(0x19b)),'cacheClearAtRuntimeTimes':_0x32ad01[_0xe8d6b0(0x191)](_0x18e2cf=>_0x18e2cf[_0xe8d6b0(0x170)]===_0xe8d6b0(0x19b))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0xe8d6b0(0x1a0)+_0x32ad01[_0xe8d6b0(0x199)]+_0xe8d6b0(0x1aa)};},async 'execute'(_0x2370d6){const _0x57f5ef=a37_0x4b3084,_0x50d869=loadBffProjectConfig(_0x2370d6[_0x57f5ef(0x17a)]),_0x39b34b=await readBffLockFile(_0x50d869['lockFilePath']),{lockData:_0x8211a7,appLock:_0x40db8f}=ensureLockScope(_0x39b34b??createEmptyBffLock(),_0x2370d6[_0x57f5ef(0x17a)],_0x50d869[_0x57f5ef(0x176)],_0x57f5ef(0x1b2)),_0x3001f1=await getTargetFunctions(_0x50d869,_0x2370d6);if(_0x3001f1[_0x57f5ef(0x199)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x57f5ef(0x1b5)};const _0x1eaf81=_0x2370d6['bool']('force'),_0x5b691e=JSON[_0x57f5ef(0x187)](JSON[_0x57f5ef(0x171)](_0x8211a7)),_0x4db187=_0x5b691e[_0x57f5ef(0x1ad)][_0x2370d6[_0x57f5ef(0x17a)]];if(!_0x4db187)throw new Error(_0x57f5ef(0x1a6)+_0x2370d6[_0x57f5ef(0x17a)]+_0x57f5ef(0x1a8));const _0x47cc05=await buildHookMaps(_0x2370d6[_0x57f5ef(0x17a)],_0x2370d6[_0x57f5ef(0x18a)],_0x3001f1,_0x4db187),_0x558de8=[],_0x2bd2a5=[],_0x534d9f=[];for(const _0x5b1c3c of _0x3001f1){const _0x1fbdef=await computeFileHash(_0x5b1c3c[_0x57f5ef(0x173)]),_0x49022f=_0x4db187[_0x57f5ef(0x18c)][_0x5b1c3c[_0x57f5ef(0x1b7)]];if(!_0x1eaf81&&_0x49022f&&_0x49022f[_0x57f5ef(0x184)]===_0x1fbdef){_0x2bd2a5[_0x57f5ef(0x1b2)]({'lockKey':_0x5b1c3c['lockKey'],'reason':_0x57f5ef(0x18b)});continue;}try{await uploadSingleFunction(_0x2370d6[_0x57f5ef(0x17a)],_0x5b1c3c,_0x4db187,_0x47cc05);const _0x14e7a3=_0x4db187['functions'][_0x5b1c3c[_0x57f5ef(0x1b7)]];_0x558de8['push']({'lockKey':_0x5b1c3c['lockKey'],'remoteId':_0x14e7a3?.[_0x57f5ef(0x17e)]??0x0});}catch(_0x3e21ad){_0x534d9f['push']({'lockKey':_0x5b1c3c[_0x57f5ef(0x1b7)],'error':_0x3e21ad instanceof Error?_0x3e21ad['message']:String(_0x3e21ad)});}}_0x4db187[_0x57f5ef(0x193)]=new Date()[_0x57f5ef(0x178)](),await writeBffLockFile(_0x50d869[_0x57f5ef(0x1b0)],_0x5b691e),await waitForUploadedLockEntries(_0x50d869['lockFilePath'],_0x2370d6['appCode'],_0x558de8['map'](_0x249402=>_0x249402[_0x57f5ef(0x1b7)]));let _0x574edc={'attempted':![],'cleared':![]};if(_0x558de8['length']>0x0)try{let _0xa721b0='';for(let _0x3173b9=0x0;_0x3173b9<CACHE_CLEAR_ATTEMPTS;_0x3173b9+=0x1){_0xa721b0=await clearBffScriptCache(),_0x3173b9<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x574edc={'attempted':!![],'cleared':!![],'message':_0xa721b0||_0x57f5ef(0x177)};}catch(_0x19e076){_0x574edc={'attempted':!![],'cleared':![],'error':_0x19e076 instanceof Error?_0x19e076['message']:String(_0x19e076)};}const _0x18d9cb=_0x534d9f[_0x57f5ef(0x199)]===0x0&&(_0x574edc[_0x57f5ef(0x186)]?_0x574edc['cleared']:!![]),_0x20fa10=_0x574edc['attempted']?_0x574edc[_0x57f5ef(0x1ab)]?'runtime\x20cache\x20cleared':_0x57f5ef(0x17d):_0x57f5ef(0x1b9);return{'ok':_0x18d9cb,'data':{'uploaded':_0x558de8,'skipped':_0x2bd2a5,'failed':_0x534d9f,'cacheClear':_0x574edc},'message':_0x57f5ef(0x16b)+_0x558de8[_0x57f5ef(0x199)]+_0x57f5ef(0x18d)+_0x2bd2a5[_0x57f5ef(0x199)]+_0x57f5ef(0x1a5)+_0x534d9f[_0x57f5ef(0x199)]+_0x57f5ef(0x19c)+_0x20fa10};}};async function getTargetFunctions(_0x1e6f72,_0x3f151e){const _0x398fdf=a37_0x4b3084,_0x279fb4=_0x3f151e['str'](_0x398fdf(0x174)),_0x163201=_0x3f151e[_0x398fdf(0x1b6)]('name'),_0x6b6373=normalizeBffType(_0x279fb4)??undefined;if(_0x163201&&!_0x6b6373)throw CliErrors['validation'](_0x398fdf(0x1af));const _0x22ea22=await scanLocalBffFunctions(_0x1e6f72,_0x6b6373);if(_0x163201){const _0x282998=_0x22ea22[_0x398fdf(0x1b1)](_0xe55b2a=>_0xe55b2a[_0x398fdf(0x189)]===_0x163201);if(_0x282998['length']===0x0)throw CliErrors[_0x398fdf(0x16a)](_0x398fdf(0x16e)+_0x6b6373+'/'+_0x163201);return _0x282998;}return _0x22ea22;}async function buildHookMaps(_0x22db46,_0x49e74b,_0x24d046,_0x322eb8){const _0x3f8560=a37_0x4b3084,_0x44a138=_0x24d046[_0x3f8560(0x191)](_0x125617=>_0x125617[_0x3f8560(0x174)]==='HOOK');if(!_0x44a138)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x1cf4d6=loadAliasMap(_0x49e74b,undefined,resolveApiFilePath(_0x49e74b,_0x22db46)),_0x24e5ac=new Map(_0x1cf4d6[_0x3f8560(0x181)](_0x4d5883=>[_0x4d5883['alias'],_0x4d5883[_0x3f8560(0x19e)]]));for(const _0x2653de of Object[_0x3f8560(0x18f)](_0x322eb8[_0x3f8560(0x18c)])){_0x2653de[_0x3f8560(0x1b4)]&&_0x2653de[_0x3f8560(0x19e)]&&!_0x24e5ac[_0x3f8560(0x183)](_0x2653de[_0x3f8560(0x1b4)])&&_0x24e5ac[_0x3f8560(0x185)](_0x2653de['alias'],_0x2653de[_0x3f8560(0x19e)]);}const _0x1f7580=await listDatasets(_0x22db46),_0x14fa49=new Map(_0x1f7580[_0x3f8560(0x181)](_0x12ea8a=>[_0x12ea8a[_0x3f8560(0x188)],_0x12ea8a]));return{'aliasToDatasetCode':_0x24e5ac,'datasetCodeToDataset':_0x14fa49};}async function uploadSingleFunction(_0x2b8864,_0x3aedd4,_0x2ad655,_0x52459c){const _0x58b20e=a37_0x4b3084,_0x48bd39=await readFile(_0x3aedd4[_0x58b20e(0x173)],_0x58b20e(0x19f)),_0x33517e=await computeFileHash(_0x3aedd4[_0x58b20e(0x173)]),_0x34892d=_0x2ad655['functions'][_0x3aedd4[_0x58b20e(0x1b7)]];if(_0x34892d?.[_0x58b20e(0x17e)]&&_0x34892d[_0x58b20e(0x17f)]==null)throw CliErrors[_0x58b20e(0x16a)](_0x3aedd4[_0x58b20e(0x1b7)]+_0x58b20e(0x194));let _0x514029=extractScriptDescription(_0x48bd39);if(!_0x514029&&_0x34892d?.[_0x58b20e(0x17e)]){const _0xd1cfae=await getBffScriptInfo(_0x34892d['remoteId']);_0x514029=_0xd1cfae['description']||undefined;}const _0x20e14a={'appCode':_0x2b8864,'functionName':_0x3aedd4[_0x58b20e(0x189)],'scriptType':_0x3aedd4[_0x58b20e(0x174)],'scriptContent':_0x48bd39};if(_0x34892d?.[_0x58b20e(0x17e)])_0x20e14a['id']=_0x34892d[_0x58b20e(0x17e)];if(_0x34892d?.['version']!=null)_0x20e14a['version']=_0x34892d[_0x58b20e(0x17f)];if(_0x514029)_0x20e14a[_0x58b20e(0x1a7)]=_0x514029;if(_0x3aedd4[_0x58b20e(0x174)]==='HOOK'){const _0x1d07e8=_0x3aedd4['alias'];if(!_0x1d07e8||!_0x3aedd4['operationType']||!_0x3aedd4['functionNode'])throw CliErrors[_0x58b20e(0x16a)]('Incomplete\x20HOOK\x20path:\x20'+_0x3aedd4[_0x58b20e(0x1b7)]);const _0x1f5cf8=_0x52459c[_0x58b20e(0x17c)][_0x58b20e(0x1b3)](_0x1d07e8)??_0x34892d?.[_0x58b20e(0x19e)]??_0x1d07e8,_0x1d185d=_0x52459c[_0x58b20e(0x19a)][_0x58b20e(0x1b3)](_0x1f5cf8);if(!_0x1d185d)throw CliErrors[_0x58b20e(0x16a)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x1d07e8+'\x22.\x20'+(_0x58b20e(0x1ac)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x20e14a[_0x58b20e(0x198)]=_0x1d185d['id'],_0x20e14a['operationType']=_0x3aedd4[_0x58b20e(0x1ae)],_0x20e14a[_0x58b20e(0x197)]=_0x3aedd4[_0x58b20e(0x197)];}const _0x3b0bc8=await saveBffScript(_0x20e14a),_0x364390=_0x3b0bc8['id'],_0x326b6c=_0x3b0bc8['script']??await getBffScriptInfo(_0x364390),_0x405868={'hash':_0x33517e,'remoteId':_0x364390,'version':_0x326b6c[_0x58b20e(0x17f)]};if(_0x3aedd4['type']===_0x58b20e(0x19d)){const _0x5db12f=_0x3aedd4[_0x58b20e(0x1b4)],_0x1372d7=_0x52459c[_0x58b20e(0x17c)][_0x58b20e(0x1b3)](_0x5db12f)??_0x34892d?.['datasetCode']??_0x5db12f;_0x52459c[_0x58b20e(0x17c)][_0x58b20e(0x183)](_0x5db12f)?_0x405868[_0x58b20e(0x1b4)]=_0x5db12f:_0x405868[_0x58b20e(0x1b4)]=_0x34892d?.[_0x58b20e(0x1b4)],_0x405868[_0x58b20e(0x19e)]=_0x1372d7,_0x405868[_0x58b20e(0x1ae)]=_0x3aedd4[_0x58b20e(0x1ae)],_0x405868[_0x58b20e(0x197)]=_0x3aedd4[_0x58b20e(0x197)];}_0x2ad655[_0x58b20e(0x18c)][_0x3aedd4[_0x58b20e(0x1b7)]]=_0x405868;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x2a4766,_0x3247af,_0x181099){const _0x483a94=a37_0x4b3084;if(_0x181099[_0x483a94(0x199)]===0x0)return;for(let _0x1d6b42=0x0;_0x1d6b42<LOCK_SETTLE_RETRY_COUNT;_0x1d6b42+=0x1){const _0x5d04a4=await readBffLockFile(_0x2a4766),_0xe2004b=_0x5d04a4?.['apps']?.[_0x3247af]?.[_0x483a94(0x18c)]??{},_0x5d1337=_0x181099[_0x483a94(0x182)](_0x17f874=>!!_0xe2004b[_0x17f874]?.[_0x483a94(0x17e)]);if(_0x5d1337)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x181099['join'](',\x20')+'.');}
|
|
1
|
+
const a37_0x2f8d4f=a37_0x2fcc;(function(_0x32b729,_0x24e528){const _0x4df161=a37_0x2fcc,_0x1888bd=_0x32b729();while(!![]){try{const _0x3c6d1c=parseInt(_0x4df161(0x118))/0x1+-parseInt(_0x4df161(0x101))/0x2*(parseInt(_0x4df161(0x11b))/0x3)+parseInt(_0x4df161(0xdb))/0x4+-parseInt(_0x4df161(0xfd))/0x5*(parseInt(_0x4df161(0xfb))/0x6)+parseInt(_0x4df161(0xf0))/0x7+parseInt(_0x4df161(0xff))/0x8+parseInt(_0x4df161(0xf4))/0x9*(-parseInt(_0x4df161(0xf8))/0xa);if(_0x3c6d1c===_0x24e528)break;else _0x1888bd['push'](_0x1888bd['shift']());}catch(_0x2d5d8a){_0x1888bd['push'](_0x1888bd['shift']());}}}(a37_0x4293,0x5f370));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';function a37_0x2fcc(_0x3c2cc1,_0x1f01a8){_0x3c2cc1=_0x3c2cc1-0xd9;const _0x4293da=a37_0x4293();let _0x2fcc27=_0x4293da[_0x3c2cc1];return _0x2fcc27;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x2f8d4f(0xf6),'command':a37_0x2f8d4f(0xe7),'description':a37_0x2f8d4f(0x102),'risk':a37_0x2f8d4f(0xe9),'flags':[{'name':a37_0x2f8d4f(0xf9),'type':a37_0x2f8d4f(0xf5),'description':a37_0x2f8d4f(0x10a),'enum':['COMMON',a37_0x2f8d4f(0xfa),'HOOK']},{'name':a37_0x2f8d4f(0xf2),'type':a37_0x2f8d4f(0xf5),'description':a37_0x2f8d4f(0xe0)},{'name':'force','type':a37_0x2f8d4f(0x111),'description':a37_0x2f8d4f(0x115)}],async 'dryRun'(_0x1191cf){const _0x338266=a37_0x2f8d4f,_0x46757f=loadBffProjectConfig(_0x1191cf[_0x338266(0xd9)]),_0x16f733=await readBffLockFile(_0x46757f['lockFilePath']),{appLock:_0x4195f1}=ensureLockScope(_0x16f733??createEmptyBffLock(),_0x1191cf[_0x338266(0xd9)],_0x46757f[_0x338266(0x114)],_0x338266(0xe7)),_0x10e54c=await getTargetFunctions(_0x46757f,_0x1191cf),_0x6b12ee=_0x1191cf[_0x338266(0xf3)](_0x338266(0xee)),_0xdab09a=[];for(const _0x4a92f6 of _0x10e54c){const _0x440762=await computeFileHash(_0x4a92f6[_0x338266(0x10e)]),_0x2b5a64=_0x4195f1[_0x338266(0xfc)][_0x4a92f6[_0x338266(0x109)]],_0x3a0602=!!_0x2b5a64&&_0x2b5a64[_0x338266(0x11f)]===_0x440762;_0xdab09a[_0x338266(0xe7)]({'lockKey':_0x4a92f6['lockKey'],'filePath':_0x4a92f6[_0x338266(0x10e)],'remoteId':_0x2b5a64?.[_0x338266(0xf7)]??null,'mode':_0x2b5a64?.['remoteId']?'update':_0x338266(0x10f),'status':!_0x6b12ee&&_0x3a0602?_0x338266(0xed):_0x338266(0xdf)});}return{'method':'POST','url':'/api/management/library/scripts/save','body':{'appCode':_0x1191cf[_0x338266(0xd9)],'force':_0x6b12ee,'files':_0xdab09a,'cacheClearAtRuntime':_0xdab09a['some'](_0x209e99=>_0x209e99[_0x338266(0x121)]===_0x338266(0xdf)),'cacheClearAtRuntimeTimes':_0xdab09a[_0x338266(0x123)](_0x2938f2=>_0x2938f2['status']===_0x338266(0xdf))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0xdab09a[_0x338266(0xe5)]+_0x338266(0x112)};},async 'execute'(_0x253c7b){const _0xf32e4c=a37_0x2f8d4f,_0x3c1d11=loadBffProjectConfig(_0x253c7b[_0xf32e4c(0xd9)]),_0x3561c5=await readBffLockFile(_0x3c1d11[_0xf32e4c(0x10b)]),{lockData:_0x22f2c6,appLock:_0x13532b}=ensureLockScope(_0x3561c5??createEmptyBffLock(),_0x253c7b['appCode'],_0x3c1d11[_0xf32e4c(0x114)],_0xf32e4c(0xe7)),_0x4f3bab=await getTargetFunctions(_0x3c1d11,_0x253c7b);if(_0x4f3bab[_0xf32e4c(0xe5)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0xf32e4c(0xe4)};const _0x9d9d0=_0x253c7b['bool'](_0xf32e4c(0xee)),_0x51abad=JSON[_0xf32e4c(0x11a)](JSON[_0xf32e4c(0x100)](_0x22f2c6)),_0x4bb485=_0x51abad[_0xf32e4c(0x10c)][_0x253c7b['appCode']];if(!_0x4bb485)throw new Error(_0xf32e4c(0x11c)+_0x253c7b[_0xf32e4c(0xd9)]+_0xf32e4c(0x106));const _0x36a40d=await buildHookMaps(_0x253c7b['appCode'],_0x253c7b[_0xf32e4c(0xe3)],_0x4f3bab,_0x4bb485),_0x1bf628=[],_0x359e24=[],_0x1e4f0b=[];for(const _0x5ab793 of _0x4f3bab){const _0x4f9dc7=await computeFileHash(_0x5ab793[_0xf32e4c(0x10e)]),_0x2f0334=_0x4bb485[_0xf32e4c(0xfc)][_0x5ab793[_0xf32e4c(0x109)]];if(!_0x9d9d0&&_0x2f0334&&_0x2f0334[_0xf32e4c(0x11f)]===_0x4f9dc7){_0x359e24['push']({'lockKey':_0x5ab793[_0xf32e4c(0x109)],'reason':_0xf32e4c(0xed)});continue;}try{await uploadSingleFunction(_0x253c7b[_0xf32e4c(0xd9)],_0x5ab793,_0x4bb485,_0x36a40d);const _0x313e61=_0x4bb485[_0xf32e4c(0xfc)][_0x5ab793[_0xf32e4c(0x109)]];_0x1bf628[_0xf32e4c(0xe7)]({'lockKey':_0x5ab793[_0xf32e4c(0x109)],'remoteId':_0x313e61?.[_0xf32e4c(0xf7)]??0x0});}catch(_0x4b3b54){_0x1e4f0b['push']({'lockKey':_0x5ab793[_0xf32e4c(0x109)],'error':_0x4b3b54 instanceof Error?_0x4b3b54['message']:String(_0x4b3b54)});}}_0x4bb485[_0xf32e4c(0xe1)]=new Date()['toISOString'](),await writeBffLockFile(_0x3c1d11[_0xf32e4c(0x10b)],_0x51abad),await waitForUploadedLockEntries(_0x3c1d11[_0xf32e4c(0x10b)],_0x253c7b[_0xf32e4c(0xd9)],_0x1bf628[_0xf32e4c(0x107)](_0x1dd7d8=>_0x1dd7d8[_0xf32e4c(0x109)]));let _0x5e9c49={'attempted':![],'cleared':![]};if(_0x1bf628[_0xf32e4c(0xe5)]>0x0)try{let _0x352cff='';for(let _0x5c3745=0x0;_0x5c3745<CACHE_CLEAR_ATTEMPTS;_0x5c3745+=0x1){_0x352cff=await clearBffScriptCache(),_0x5c3745<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5e9c49={'attempted':!![],'cleared':!![],'message':_0x352cff||_0xf32e4c(0xfe)};}catch(_0x57700b){_0x5e9c49={'attempted':!![],'cleared':![],'error':_0x57700b instanceof Error?_0x57700b['message']:String(_0x57700b)};}const _0x21ac2c=_0x1e4f0b[_0xf32e4c(0xe5)]===0x0&&(_0x5e9c49[_0xf32e4c(0x120)]?_0x5e9c49[_0xf32e4c(0xe8)]:!![]),_0x409d6a=_0x5e9c49[_0xf32e4c(0x120)]?_0x5e9c49['cleared']?'runtime\x20cache\x20cleared':_0xf32e4c(0x117):'runtime\x20cache\x20not\x20needed';return{'ok':_0x21ac2c,'data':{'uploaded':_0x1bf628,'skipped':_0x359e24,'failed':_0x1e4f0b,'cacheClear':_0x5e9c49},'message':'Push\x20complete:\x20'+_0x1bf628[_0xf32e4c(0xe5)]+_0xf32e4c(0x105)+_0x359e24[_0xf32e4c(0xe5)]+'\x20skipped,\x20'+_0x1e4f0b['length']+_0xf32e4c(0x11d)+_0x409d6a};}};async function getTargetFunctions(_0x452d4a,_0x26eb6d){const _0x4c92e4=a37_0x2f8d4f,_0x5a4825=_0x26eb6d['str'](_0x4c92e4(0xf9)),_0x1c45e1=_0x26eb6d[_0x4c92e4(0xe6)]('name'),_0x34f811=normalizeBffType(_0x5a4825)??undefined;if(_0x1c45e1&&!_0x34f811)throw CliErrors[_0x4c92e4(0xdd)](_0x4c92e4(0xeb));const _0x6ab270=await scanLocalBffFunctions(_0x452d4a,_0x34f811);if(_0x1c45e1){const _0x147286=_0x6ab270[_0x4c92e4(0x126)](_0x576eaf=>_0x576eaf[_0x4c92e4(0xf2)]===_0x1c45e1);if(_0x147286[_0x4c92e4(0xe5)]===0x0)throw CliErrors[_0x4c92e4(0xdd)]('Local\x20function\x20not\x20found:\x20'+_0x34f811+'/'+_0x1c45e1);return _0x147286;}return _0x6ab270;}async function buildHookMaps(_0xff430c,_0x4327ab,_0x601fd9,_0x3b2ddb){const _0x400aa6=a37_0x2f8d4f,_0x32943e=_0x601fd9[_0x400aa6(0x123)](_0x448180=>_0x448180[_0x400aa6(0xf9)]===_0x400aa6(0x129));if(!_0x32943e)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x25c677=loadAliasMap(_0x4327ab,undefined,resolveApiFilePath(_0x4327ab,_0xff430c)),_0x3c37c4=new Map(_0x25c677[_0x400aa6(0x107)](_0x3c0931=>[_0x3c0931[_0x400aa6(0xde)],_0x3c0931['datasetCode']]));for(const _0x5972c7 of Object[_0x400aa6(0x119)](_0x3b2ddb[_0x400aa6(0xfc)])){_0x5972c7[_0x400aa6(0xde)]&&_0x5972c7[_0x400aa6(0xf1)]&&!_0x3c37c4[_0x400aa6(0x128)](_0x5972c7[_0x400aa6(0xde)])&&_0x3c37c4[_0x400aa6(0x127)](_0x5972c7[_0x400aa6(0xde)],_0x5972c7[_0x400aa6(0xf1)]);}const _0x207602=await listDatasets(_0xff430c),_0x3f7c5e=new Map(_0x207602[_0x400aa6(0x107)](_0x3c240a=>[_0x3c240a[_0x400aa6(0x116)],_0x3c240a]));return{'aliasToDatasetCode':_0x3c37c4,'datasetCodeToDataset':_0x3f7c5e};}async function uploadSingleFunction(_0x4c8ddc,_0x415cf0,_0xeb08e7,_0x16c6d3){const _0x45c750=a37_0x2f8d4f,_0x4d229b=await readFile(_0x415cf0['filePath'],_0x45c750(0xdc)),_0x471465=await computeFileHash(_0x415cf0[_0x45c750(0x10e)]),_0x5e5e56=_0xeb08e7[_0x45c750(0xfc)][_0x415cf0[_0x45c750(0x109)]];if(_0x5e5e56?.['remoteId']&&_0x5e5e56[_0x45c750(0x108)]==null)throw CliErrors['validation'](_0x415cf0[_0x45c750(0x109)]+_0x45c750(0x122));let _0x5cb027=extractScriptDescription(_0x4d229b);if(!_0x5cb027&&_0x5e5e56?.[_0x45c750(0xf7)]){const _0x2bd2e6=await getBffScriptInfo(_0x5e5e56[_0x45c750(0xf7)]);_0x5cb027=_0x2bd2e6[_0x45c750(0xec)]||undefined;}const _0x1c826d={'appCode':_0x4c8ddc,'functionName':_0x415cf0['name'],'scriptType':_0x415cf0[_0x45c750(0xf9)],'scriptContent':_0x4d229b};if(_0x5e5e56?.[_0x45c750(0xf7)])_0x1c826d['id']=_0x5e5e56['remoteId'];if(_0x5e5e56?.[_0x45c750(0x108)]!=null)_0x1c826d['version']=_0x5e5e56[_0x45c750(0x108)];if(_0x5cb027)_0x1c826d[_0x45c750(0xec)]=_0x5cb027;if(_0x415cf0[_0x45c750(0xf9)]===_0x45c750(0x129)){const _0x151f72=_0x415cf0[_0x45c750(0xde)];if(!_0x151f72||!_0x415cf0[_0x45c750(0x113)]||!_0x415cf0[_0x45c750(0x104)])throw CliErrors[_0x45c750(0xdd)](_0x45c750(0xea)+_0x415cf0['lockKey']);const _0x308793=_0x16c6d3[_0x45c750(0xda)]['get'](_0x151f72)??_0x5e5e56?.[_0x45c750(0xf1)]??_0x151f72,_0x8ded38=_0x16c6d3['datasetCodeToDataset']['get'](_0x308793);if(!_0x8ded38)throw CliErrors[_0x45c750(0xdd)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x151f72+'\x22.\x20'+(_0x45c750(0xef)+CLI_BIN_NAME+_0x45c750(0x10d)));_0x1c826d[_0x45c750(0x125)]=_0x8ded38['id'],_0x1c826d[_0x45c750(0x113)]=_0x415cf0[_0x45c750(0x113)],_0x1c826d[_0x45c750(0x104)]=_0x415cf0[_0x45c750(0x104)];}const _0x26e36a=await saveBffScript(_0x1c826d),_0x5fdba4=_0x26e36a['id'],_0x2a62c0=_0x26e36a[_0x45c750(0xe2)]??await getBffScriptInfo(_0x5fdba4),_0x5c16f3={'hash':_0x471465,'remoteId':_0x5fdba4,'version':_0x2a62c0[_0x45c750(0x108)]};if(_0x415cf0[_0x45c750(0xf9)]===_0x45c750(0x129)){const _0x45ce8a=_0x415cf0['alias'],_0x399c7d=_0x16c6d3[_0x45c750(0xda)][_0x45c750(0x124)](_0x45ce8a)??_0x5e5e56?.['datasetCode']??_0x45ce8a;_0x16c6d3[_0x45c750(0xda)][_0x45c750(0x128)](_0x45ce8a)?_0x5c16f3[_0x45c750(0xde)]=_0x45ce8a:_0x5c16f3[_0x45c750(0xde)]=_0x5e5e56?.[_0x45c750(0xde)],_0x5c16f3['datasetCode']=_0x399c7d,_0x5c16f3[_0x45c750(0x113)]=_0x415cf0[_0x45c750(0x113)],_0x5c16f3[_0x45c750(0x104)]=_0x415cf0[_0x45c750(0x104)];}_0xeb08e7[_0x45c750(0xfc)][_0x415cf0['lockKey']]=_0x5c16f3;}function a37_0x4293(){const _0x509076=['create','every','boolean','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','operationType','scriptsRoot','Force\x20push\x20ignoring\x20hash\x20protection','code','runtime\x20cache\x20clear\x20failed','43640MvwPkm','values','parse','3WEsPWN','Lock\x20scope\x20for\x20app\x20\x22','\x20failed,\x20','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','hash','attempted','status',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','some','get','datasetId','filter','set','has','HOOK','appCode','aliasToDatasetCode','1453224tIIgVR','utf8','validation','alias','would_push','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','lastSync','script','apiDir','No\x20local\x20BFF\x20functions\x20found.','length','str','push','cleared','high-risk-write','Incomplete\x20HOOK\x20path:\x20','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','description','unchanged','force','Run\x20`','2557926vOPCVv','datasetCode','name','bool','491499ItGhlb','string','bff','remoteId','20NOfKHZ','type','ENDPOINT','200688AFmxFN','functions','25XBpyun','Runtime\x20script\x20cache\x20cleared.','2364792hTsZqG','stringify','803002wvFZcf','Push\x20local\x20BFF\x20scripts\x20to\x20remote','join','functionNode','\x20uploaded,\x20','\x22\x20not\x20found\x20after\x20ensureLockScope.','map','version','lockKey','Push\x20only\x20this\x20script\x20type','lockFilePath','apps','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','filePath'];a37_0x4293=function(){return _0x509076;};return a37_0x4293();}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x52767d,_0x580311,_0x182e42){const _0xf97e9d=a37_0x2f8d4f;if(_0x182e42[_0xf97e9d(0xe5)]===0x0)return;for(let _0x185ba4=0x0;_0x185ba4<LOCK_SETTLE_RETRY_COUNT;_0x185ba4+=0x1){const _0x11bb01=await readBffLockFile(_0x52767d),_0xda1e1e=_0x11bb01?.[_0xf97e9d(0x10c)]?.[_0x580311]?.['functions']??{},_0x5a15bc=_0x182e42[_0xf97e9d(0x110)](_0x333ce6=>!!_0xda1e1e[_0x333ce6]?.[_0xf97e9d(0xf7)]);if(_0x5a15bc)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0xf97e9d(0x11e)+_0x182e42[_0xf97e9d(0x103)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a38_0x29d7(_0x51ab42,_0x2069be){_0x51ab42=_0x51ab42-0x157;const _0x581af9=a38_0x581a();let _0x29d762=_0x581af9[_0x51ab42];return _0x29d762;}const a38_0x447def=a38_0x29d7;(function(_0x2b5613,_0x376490){const _0x36e575=a38_0x29d7,_0x481b6d=_0x2b5613();while(!![]){try{const _0xd7e43f=-parseInt(_0x36e575(0x158))/0x1*(parseInt(_0x36e575(0x168))/0x2)+parseInt(_0x36e575(0x15c))/0x3+-parseInt(_0x36e575(0x167))/0x4*(parseInt(_0x36e575(0x160))/0x5)+-parseInt(_0x36e575(0x16e))/0x6+parseInt(_0x36e575(0x174))/0x7+-parseInt(_0x36e575(0x163))/0x8+-parseInt(_0x36e575(0x15d))/0x9*(-parseInt(_0x36e575(0x159))/0xa);if(_0xd7e43f===_0x376490)break;else _0x481b6d['push'](_0x481b6d['shift']());}catch(_0x5d7717){_0x481b6d['push'](_0x481b6d['shift']());}}}(a38_0x581a,0xedbcb));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a38_0x581a(){const _0x34426a=['\x20unchanged','functions','5396972JkCFxn','lockFilePath','\x20modified,\x20','apiDir','status','hash','234106LfLoav','4550930Tehqoq','all','bff','5508966jHpsNd','45jmTBsT','push','has','395vxNDUi','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','\x20remote-only','6674496MXneXf','lockKey','scriptsRoot','length','68004JhzQCn','12nYYuHe','\x20added,\x20','bool','boolean','remote','alias','1961910bMoUBb','appCode','filePath','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file'];a38_0x581a=function(){return _0x34426a;};return a38_0x581a();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x447def(0x15b),'command':'status','description':a38_0x447def(0x171),'risk':'read','flags':[{'name':'remote','type':a38_0x447def(0x16b),'description':a38_0x447def(0x161)}],async 'execute'(_0x1d1f14){const _0x294836=a38_0x447def,_0x2a3f6d=loadBffProjectConfig(_0x1d1f14[_0x294836(0x16f)]),_0x2e2cd2=await readBffLockFile(_0x2a3f6d[_0x294836(0x175)]),{appLock:_0x1df35e}=ensureLockScope(_0x2e2cd2??createEmptyBffLock(),_0x1d1f14['appCode'],_0x2a3f6d[_0x294836(0x165)],_0x294836(0x178)),_0x2f0394=await scanLocalBffFunctions(_0x2a3f6d),_0x2e61b2=[],_0x5b49bf=[],_0x3773cc=[];for(const _0x2b8e69 of _0x2f0394){const _0x88067d=await computeFileHash(_0x2b8e69[_0x294836(0x170)]),_0x3e7f98=_0x1df35e[_0x294836(0x173)][_0x2b8e69[_0x294836(0x164)]];if(!_0x3e7f98)_0x2e61b2[_0x294836(0x15e)](_0x2b8e69['lockKey']);else _0x3e7f98[_0x294836(0x157)]!==_0x88067d?_0x5b49bf[_0x294836(0x15e)](_0x2b8e69[_0x294836(0x164)]):_0x3773cc['push'](_0x2b8e69[_0x294836(0x164)]);}const _0x45d10e=[];if(_0x1d1f14[_0x294836(0x16a)](_0x294836(0x16c))){const _0x4ee125=loadAliasMap(_0x1d1f14[_0x294836(0x177)],undefined,resolveApiFilePath(_0x1d1f14['apiDir'],_0x1d1f14['appCode'])),_0x547fcc=new Map(_0x4ee125['map'](_0x3759ee=>[_0x3759ee['datasetCode'],_0x3759ee[_0x294836(0x16d)]])),[_0x4199f7,_0x43d74e]=await Promise[_0x294836(0x15a)]([listBffScripts(_0x1d1f14[_0x294836(0x16f)]),getBffScriptStatistics(_0x1d1f14['appCode'])]),_0x4f86aa=createHookLocationMap(_0x43d74e),_0x342067=new Set(_0x2f0394['map'](_0x2d3744=>_0x2d3744[_0x294836(0x164)]));for(const _0x162679 of _0x4199f7){const _0x32a974=resolveRemoteScriptTarget(_0x2a3f6d,_0x162679,_0x4f86aa,_0x1df35e['functions'],_0x547fcc);_0x32a974&&!_0x342067[_0x294836(0x15f)](_0x32a974[_0x294836(0x164)])&&_0x45d10e[_0x294836(0x15e)](_0x32a974['lockKey']);}}const _0x1c1945=_0x2e61b2['length']===0x0&&_0x5b49bf[_0x294836(0x166)]===0x0&&_0x45d10e[_0x294836(0x166)]===0x0;return{'ok':!![],'data':{'added':_0x2e61b2,'modified':_0x5b49bf,'unchanged':_0x3773cc,'remoteOnly':_0x45d10e},'message':_0x1c1945?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x2e61b2['length']+_0x294836(0x169)+_0x5b49bf[_0x294836(0x166)]+_0x294836(0x176)+_0x3773cc[_0x294836(0x166)]+_0x294836(0x172)+(_0x45d10e[_0x294836(0x166)]>0x0?',\x20'+_0x45d10e[_0x294836(0x166)]+_0x294836(0x162):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a39_0x101f(_0x4096a7,_0x2f9362){_0x4096a7=_0x4096a7-0x1a8;const _0x548e2a=a39_0x548e();let _0x101feb=_0x548e2a[_0x4096a7];return _0x101feb;}function a39_0x548e(){const _0x5854a1=['cwd','cli-skill-install','10GUwzZC','apiError','42KVRsyr',')...','7026633zThSBe','unknown','error','2BZpFNp','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','3030544mSkZoz','inherit','693914LJTGFG','skipped','CLI\x20Built-in\x20Skill\x20installed','setLogPath','2122455NiOiYO','225056JBfLxq','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','../../skills/npx-skills-add.js','cli-skill','log','install','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','385779ZOIxHF','npx\x20skills\x20add\x20failed:\x20','2049714JCRCNe'];a39_0x548e=function(){return _0x5854a1;};return a39_0x548e();}const a39_0x904a96=a39_0x101f;(function(_0x4548d6,_0x2a0566){const _0x417fc8=a39_0x101f,_0x555c5c=_0x4548d6();while(!![]){try{const _0x320615=parseInt(_0x417fc8(0x1a9))/0x1*(-parseInt(_0x417fc8(0x1c1))/0x2)+parseInt(_0x417fc8(0x1b5))/0x3+-parseInt(_0x417fc8(0x1c3))/0x4+parseInt(_0x417fc8(0x1ad))/0x5+parseInt(_0x417fc8(0x1b7))/0x6+-parseInt(_0x417fc8(0x1bc))/0x7*(-parseInt(_0x417fc8(0x1ae))/0x8)+parseInt(_0x417fc8(0x1be))/0x9*(parseInt(_0x417fc8(0x1ba))/0xa);if(_0x320615===_0x2a0566)break;else _0x555c5c['push'](_0x555c5c['shift']());}catch(_0x55d8cc){_0x555c5c['push'](_0x555c5c['shift']());}}}(a39_0x548e,0x5fdea));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x904a96(0x1b1),'command':a39_0x904a96(0x1b3),'description':a39_0x904a96(0x1b4),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1764c5){const _0x58b6f8=a39_0x904a96;logger[_0x58b6f8(0x1ac)](process[_0x58b6f8(0x1b8)]()),logger['info'](_0x58b6f8(0x1b9),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x52dc83,RABETBASE_SKILL_SOURCE:_0x3f5feb,runNpxSkillsAddGlobal:_0x5e4284}=await import(_0x58b6f8(0x1b0)),_0x5f57f7=_0x1764c5['nonInteractive']?'pipe':_0x58b6f8(0x1a8);console[_0x58b6f8(0x1b2)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20('+_0x52dc83+_0x58b6f8(0x1bd));const _0x207c0e=_0x5e4284(process[_0x58b6f8(0x1b8)](),_0x3f5feb,{'stdio':_0x5f57f7});if(_0x207c0e[_0x58b6f8(0x1aa)])console[_0x58b6f8(0x1b2)](_0x58b6f8(0x1c2));else{if(_0x207c0e['ok'])console[_0x58b6f8(0x1b2)](_0x58b6f8(0x1ab));else throw CliErrors[_0x58b6f8(0x1bb)](_0x58b6f8(0x1b6)+(_0x207c0e[_0x58b6f8(0x1c0)]||_0x58b6f8(0x1bf)),_0x58b6f8(0x1af)+_0x52dc83);}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x3af2e3=a40_0xfed1;(function(_0x2e9840,_0x14b1f4){const _0x376c03=a40_0xfed1,_0x5a2a66=_0x2e9840();while(!![]){try{const _0x47af8e=-parseInt(_0x376c03(0x1ec))/0x1*(-parseInt(_0x376c03(0x207))/0x2)+parseInt(_0x376c03(0x1df))/0x3*(-parseInt(_0x376c03(0x1e1))/0x4)+parseInt(_0x376c03(0x221))/0x5*(parseInt(_0x376c03(0x21e))/0x6)+parseInt(_0x376c03(0x210))/0x7+parseInt(_0x376c03(0x228))/0x8*(-parseInt(_0x376c03(0x1fe))/0x9)+parseInt(_0x376c03(0x1e3))/0xa+-parseInt(_0x376c03(0x1de))/0xb;if(_0x47af8e===_0x14b1f4)break;else _0x5a2a66['push'](_0x5a2a66['shift']());}catch(_0x34d3b3){_0x5a2a66['push'](_0x5a2a66['shift']());}}}(a40_0x3e64,0x3d899));import a40_0x113ec4 from'chalk';import a40_0x1487b1 from'ora';import a40_0x3627cb from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0xa19f66=a40_0xfed1,_0x5b60e1=process[_0xa19f66(0x1e5)][_0xa19f66(0x20e)]();if(_0x5b60e1[_0xa19f66(0x1f4)](_0xa19f66(0x22d)))return _0xa19f66(0x22d);return _0xa19f66(0x22e);}const updateFlags=[{'name':a40_0x3af2e3(0x229),'type':'boolean','description':a40_0x3af2e3(0x1fc),'default':![]},{'name':a40_0x3af2e3(0x1ff),'type':a40_0x3af2e3(0x217),'description':a40_0x3af2e3(0x208)},{'name':a40_0x3af2e3(0x1fa),'type':a40_0x3af2e3(0x1f1),'description':a40_0x3af2e3(0x20f),'default':![]},{'name':a40_0x3af2e3(0x1f3),'type':a40_0x3af2e3(0x1f1),'description':a40_0x3af2e3(0x215),'default':!![],'hidden':!![]}];function a40_0x3e64(){const _0x26e38b=['\x20→\x20','31004lCxMvk','Install\x20a\x20specific\x20CLI\x20version','green','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','object','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','@latest','toLowerCase','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','1801359KQQHWg','Already\x20on\x20requested\x20version\x20(v','cwd','inherit','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','string','run','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Beta\x20version:\x20','update','https://registry.npmjs.org/-/package/','Checking\x20CLI\x20Built-in\x20Skill...','900YPgxsp','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Updated\x20to\x20v','3710PwPFoN','fail','gray','...','info','Already\x20up\x20to\x20date\x20(v','unknown','46032HpMbLS','beta','trim','length','bool','bun','npm','Invalid\x20version:\x20','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','\x20\x20Run\x20manually:\x20','warn','Checking\x20for\x20updates...','pipe','succeed','3023911XooopW','159oIZgdX','\x20\x20Try\x20manually:\x20','1336UKcIYm','Version\x20comparison\x20failed','3550730dxsFBx','timeout','execPath','log','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Requested\x20version:\x20','flag','\x20cli-skill\x20install','nonInteractive','20HnljFu','valid','source','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','json','boolean','message','skills','includes','yellow','/dist-tags','write','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','start','no-skills','skipped','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','str','765DeUYHd','version','entries','validation','error','latest','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'];a40_0x3e64=function(){return _0x26e38b;};return a40_0x3e64();}function getRequestedVersion(_0x4122bc){const _0x56034c=a40_0x3af2e3;return _0x4122bc[_0x56034c(0x1fd)](_0x56034c(0x1ff))[_0x56034c(0x22a)]();}function shouldSkipCliSkill(_0x507a98){const _0x5f8e8f=a40_0x3af2e3;return _0x507a98['bool']('no-skills')||_0x507a98[_0x5f8e8f(0x1e9)]('skills')===![];}async function validateUpdateFlags(_0x23142a){const _0x2ba15a=a40_0x3af2e3,_0x13a1d0=_0x23142a['bool'](_0x2ba15a(0x229)),_0x11d335=getRequestedVersion(_0x23142a);if(_0x13a1d0&&_0x11d335)throw CliErrors[_0x2ba15a(0x201)](_0x2ba15a(0x219),_0x2ba15a(0x21f));if(_0x11d335&&!a40_0x3627cb['valid'](_0x11d335))throw CliErrors[_0x2ba15a(0x201)](_0x2ba15a(0x22f)+_0x11d335,_0x2ba15a(0x216));}function a40_0xfed1(_0x3e95c6,_0xadda0){_0x3e95c6=_0x3e95c6-0x1dd;const _0x3e64be=a40_0x3e64();let _0xfed1f3=_0x3e64be[_0x3e95c6];return _0xfed1f3;}async function fetchNpmDistTags(){const _0xa0718c=a40_0x3af2e3;try{const _0x53a660=await fetch(_0xa0718c(0x21c)+encodeURIComponent(NPM_PACKAGE_NAME)+_0xa0718c(0x1f6),{'signal':AbortSignal[_0xa0718c(0x1e4)](0x2710)});if(!_0x53a660['ok'])return null;const _0x2b3a05=await _0x53a660[_0xa0718c(0x1f0)]();if(!_0x2b3a05||typeof _0x2b3a05!==_0xa0718c(0x20b))return null;return Object['fromEntries'](Object[_0xa0718c(0x200)](_0x2b3a05)['filter'](([,_0x48ee55])=>typeof _0x48ee55===_0xa0718c(0x217)&&_0x48ee55['trim']()[_0xa0718c(0x22b)]>0x0)['map'](([_0xfa8990,_0x23f6e6])=>[_0xfa8990,String(_0x23f6e6)[_0xa0718c(0x22a)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2adc6f){const _0x19a376=await fetchNpmDistTags();return _0x19a376?.[_0x2adc6f]??null;}async function fetchLatestVersion(){const _0x2c2d30=a40_0x3af2e3;return fetchNpmDistTagVersion(_0x2c2d30(0x203));}async function resolveTargetVersion(_0x1c6b47){const _0x15fc5d=a40_0x3af2e3,_0x2b9036=getRequestedVersion(_0x1c6b47);if(_0x2b9036)return{'version':_0x2b9036,'source':_0x15fc5d(0x1ff)};if(_0x1c6b47[_0x15fc5d(0x22c)](_0x15fc5d(0x229))){const _0x37bab0=await fetchNpmDistTagVersion('beta');if(!_0x37bab0)return null;return{'version':_0x37bab0,'source':_0x15fc5d(0x229)};}const _0x34d576=await fetchLatestVersion();if(!_0x34d576)return null;return{'version':_0x34d576,'source':'latest'};}function shouldInstallTarget(_0x1ea265,_0x5db7d3){const _0x4197df=a40_0x3af2e3;if(_0x5db7d3[_0x4197df(0x1ee)]===_0x4197df(0x1ff)||_0x5db7d3['source']===_0x4197df(0x229))return!a40_0x3627cb['eq'](_0x1ea265,_0x5db7d3[_0x4197df(0x1ff)]);return a40_0x3627cb['lt'](_0x1ea265,_0x5db7d3[_0x4197df(0x1ff)]);}function getInstallPlanLabel(_0x553189,_0x558566){const _0x254a0f=a40_0x3af2e3;switch(_0x558566['source']){case _0x254a0f(0x229):return _0x254a0f(0x21a)+a40_0x113ec4[_0x254a0f(0x1f5)](_0x553189)+_0x254a0f(0x206)+a40_0x113ec4[_0x254a0f(0x209)](_0x558566['version']);case _0x254a0f(0x1ff):return _0x254a0f(0x1e8)+a40_0x113ec4[_0x254a0f(0x1f5)](_0x553189)+_0x254a0f(0x206)+a40_0x113ec4['green'](_0x558566['version']);case _0x254a0f(0x203):default:return'Update\x20available:\x20'+a40_0x113ec4[_0x254a0f(0x1f5)](_0x553189)+_0x254a0f(0x206)+a40_0x113ec4[_0x254a0f(0x209)](_0x558566['version']);}}async function installCliSkill(_0x5df284){const _0x1029d8=a40_0x3af2e3;console[_0x1029d8(0x1e6)](a40_0x113ec4['gray'](_0x1029d8(0x21d)));const _0x207699=runNpxSkillsAddGlobal(process[_0x1029d8(0x212)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5df284?_0x1029d8(0x234):_0x1029d8(0x213)});if(_0x207699[_0x1029d8(0x1fb)]){console[_0x1029d8(0x1e6)](a40_0x113ec4[_0x1029d8(0x223)](_0x1029d8(0x230)));return;}if(_0x207699['ok']){console['log'](a40_0x113ec4[_0x1029d8(0x223)](_0x1029d8(0x20a)));return;}console[_0x1029d8(0x232)](a40_0x113ec4['yellow'](_0x1029d8(0x204)+(_0x207699[_0x1029d8(0x202)]||_0x1029d8(0x227)))),console[_0x1029d8(0x1e6)](a40_0x113ec4[_0x1029d8(0x223)](_0x1029d8(0x231)+CLI_BIN_NAME+_0x1029d8(0x1ea)));}async function execute(_0x176114){const _0x226572=a40_0x3af2e3;await validateUpdateFlags(_0x176114);const _0x2ec978=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x2ec978);const _0x11908c=a40_0x1487b1(_0x226572(0x233))[_0x226572(0x1f9)](),_0x3c6fb3=await resolveTargetVersion(_0x176114);if(!_0x3c6fb3){const _0x998174=_0x176114['bool'](_0x226572(0x229))?_0x226572(0x1ef):_0x226572(0x1e7);return _0x11908c['fail'](_0x998174),console[_0x226572(0x1e6)](a40_0x113ec4[_0x226572(0x223)](_0x226572(0x214)+NPM_PACKAGE_NAME+_0x226572(0x20d))),{'ok':![],'message':_0x998174};}const _0x16805f=a40_0x3627cb[_0x226572(0x1ed)](VERSION),_0x28b2d7=a40_0x3627cb[_0x226572(0x1ed)](_0x3c6fb3[_0x226572(0x1ff)]);if(!_0x16805f||!_0x28b2d7)return _0x11908c[_0x226572(0x222)](_0x226572(0x1e2)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x16805f,_0x3c6fb3)){const _0x3ab38b=_0x3c6fb3['source']==='version'?_0x226572(0x211)+_0x3c6fb3[_0x226572(0x1ff)]+')':_0x226572(0x226)+_0x3c6fb3[_0x226572(0x1ff)]+')';return _0x11908c[_0x226572(0x1dd)](_0x3ab38b),shouldSkipCliSkill(_0x176114)?console[_0x226572(0x1e6)](a40_0x113ec4['gray']('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x176114['nonInteractive']),{'ok':!![]};}_0x11908c[_0x226572(0x225)](getInstallPlanLabel(_0x2ec978,_0x3c6fb3));const _0x319e7b=detectPackageManager(),_0x4f25dd=_0x319e7b==='npm'?resolveNpmBin('npm'):_0x319e7b,_0x56c966=a40_0x1487b1('Updating\x20via\x20'+_0x319e7b+_0x226572(0x224))[_0x226572(0x1f9)]();try{return await execa(_0x4f25dd,['install','-g',NPM_PACKAGE_NAME+'@'+_0x3c6fb3[_0x226572(0x1ff)]],{'stdio':_0x226572(0x234)}),_0x56c966['succeed'](_0x226572(0x220)+_0x3c6fb3[_0x226572(0x1ff)]),console[_0x226572(0x1e6)](a40_0x113ec4[_0x226572(0x223)](_0x226572(0x205))),shouldSkipCliSkill(_0x176114)?console['log'](a40_0x113ec4[_0x226572(0x223)](_0x226572(0x1f8))):await installCliSkill(_0x176114[_0x226572(0x1eb)]),{'ok':!![]};}catch(_0x4e8adb){return _0x56c966[_0x226572(0x222)]('Update\x20failed'),console['error'](a40_0x113ec4['red']('\x20\x20'+_0x4e8adb['message'])),console['log'](a40_0x113ec4[_0x226572(0x223)](_0x226572(0x1e0)+_0x319e7b+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x3c6fb3['version'])),{'ok':![],'message':_0x4e8adb[_0x226572(0x1f2)]};}}export const updateDefinition={'service':a40_0x3af2e3(0x21b),'command':a40_0x3af2e3(0x218),'description':a40_0x3af2e3(0x20c),'risk':a40_0x3af2e3(0x1f7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a40_0x415ea7=a40_0x1552;(function(_0x58c2ae,_0xdf676e){const _0x24562e=a40_0x1552,_0x52664b=_0x58c2ae();while(!![]){try{const _0x5b5d78=parseInt(_0x24562e(0x149))/0x1*(parseInt(_0x24562e(0x130))/0x2)+parseInt(_0x24562e(0x168))/0x3*(parseInt(_0x24562e(0x148))/0x4)+-parseInt(_0x24562e(0x12e))/0x5+parseInt(_0x24562e(0x122))/0x6*(parseInt(_0x24562e(0x146))/0x7)+-parseInt(_0x24562e(0x15f))/0x8*(-parseInt(_0x24562e(0x16a))/0x9)+-parseInt(_0x24562e(0x14c))/0xa*(-parseInt(_0x24562e(0x126))/0xb)+-parseInt(_0x24562e(0x155))/0xc*(parseInt(_0x24562e(0x165))/0xd);if(_0x5b5d78===_0xdf676e)break;else _0x52664b['push'](_0x52664b['shift']());}catch(_0x57287f){_0x52664b['push'](_0x52664b['shift']());}}}(a40_0x5497,0x34a00));import a40_0x32dfb7 from'chalk';function a40_0x5497(){const _0x2bef25=['map','unknown','Checking\x20CLI\x20Built-in\x20Skill...','skills','object','fromEntries','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','update','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','7UKwYHA','/dist-tags','1634044fOiWGf','5uLJuXM','inherit','length','110JtnIeR','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','latest','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','cwd','validation','Install\x20a\x20specific\x20CLI\x20version','Version\x20comparison\x20failed','bun','1086996YArvMd','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','str','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','\x20cli-skill\x20install','write','Checking\x20for\x20updates...','version','@latest','Requested\x20version:\x20','9752KBTdeG','...','pipe','execPath','npm','Invalid\x20version:\x20','78TJEkKK','valid','\x20\x20Try\x20manually:\x20','3mTHAvD','\x20→\x20','2547fRloCv','log','succeed','Update\x20available:\x20','slice','Current\x20version:\x20','Already\x20up\x20to\x20date\x20(v','no-skills','entries','nonInteractive','gray','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','https://registry.npmjs.org/-/package/','fail','flag','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','\x20install\x20-g\x20','35946fLSPON','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','red','yellow','343354GQyiwo','start','beta','Update\x20failed','green','install','source','string','2070940Fgrbqn','timeout','28162XgruQM','boolean','info','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','warn','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','bool','toLowerCase','Updated\x20to\x20v','trim','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','error'];a40_0x5497=function(){return _0x2bef25;};return a40_0x5497();}import a40_0x25e06b from'ora';import a40_0x527291 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x4eb86f=a40_0x1552;return GIT_COMMIT!==_0x4eb86f(0x13d)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4eb86f(0x16e)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x581f6d=a40_0x1552,_0x427e14=process[_0x581f6d(0x162)][_0x581f6d(0x137)]();if(_0x427e14['includes']('bun'))return _0x581f6d(0x154);return _0x581f6d(0x163);}const updateFlags=[{'name':a40_0x415ea7(0x128),'type':a40_0x415ea7(0x131),'description':a40_0x415ea7(0x123),'default':![]},{'name':a40_0x415ea7(0x15c),'type':a40_0x415ea7(0x12d),'description':a40_0x415ea7(0x152)},{'name':a40_0x415ea7(0x171),'type':a40_0x415ea7(0x131),'description':a40_0x415ea7(0x142),'default':![]},{'name':a40_0x415ea7(0x13f),'type':'boolean','description':a40_0x415ea7(0x133),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x5b8f45){const _0x271d44=a40_0x415ea7;return _0x5b8f45[_0x271d44(0x157)]('version')['trim']();}function shouldSkipCliSkill(_0x48469a){const _0x4c7319=a40_0x415ea7;return _0x48469a[_0x4c7319(0x136)]('no-skills')||_0x48469a[_0x4c7319(0x11f)]('skills')===![];}async function validateUpdateFlags(_0x96f393){const _0x4ab56f=a40_0x415ea7,_0x2a6b60=_0x96f393['bool']('beta'),_0x1c8ec1=getRequestedVersion(_0x96f393);if(_0x2a6b60&&_0x1c8ec1)throw CliErrors[_0x4ab56f(0x151)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x4ab56f(0x11c));if(_0x1c8ec1&&!a40_0x527291[_0x4ab56f(0x166)](_0x1c8ec1))throw CliErrors[_0x4ab56f(0x151)](_0x4ab56f(0x164)+_0x1c8ec1,_0x4ab56f(0x158));}async function fetchNpmDistTags(){const _0x17b7cd=a40_0x415ea7;try{const _0x5131c3=await fetch(_0x17b7cd(0x11d)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x17b7cd(0x147),{'signal':AbortSignal[_0x17b7cd(0x12f)](0x2710)});if(!_0x5131c3['ok'])return null;const _0x4be99d=await _0x5131c3['json']();if(!_0x4be99d||typeof _0x4be99d!==_0x17b7cd(0x140))return null;return Object[_0x17b7cd(0x141)](Object[_0x17b7cd(0x119)](_0x4be99d)['filter'](([,_0x374535])=>typeof _0x374535===_0x17b7cd(0x12d)&&_0x374535[_0x17b7cd(0x139)]()[_0x17b7cd(0x14b)]>0x0)[_0x17b7cd(0x13c)](([_0x2a3a7d,_0x5edf4e])=>[_0x2a3a7d,String(_0x5edf4e)[_0x17b7cd(0x139)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x4f8383){const _0x5efec2=await fetchNpmDistTags();return _0x5efec2?.[_0x4f8383]??null;}async function fetchLatestVersion(){const _0x4065df=a40_0x415ea7;return fetchNpmDistTagVersion(_0x4065df(0x14e));}async function resolveTargetVersion(_0x1f382c){const _0x5009fe=a40_0x415ea7,_0x3dfe96=getRequestedVersion(_0x1f382c);if(_0x3dfe96)return{'version':_0x3dfe96,'source':'version'};if(_0x1f382c[_0x5009fe(0x136)](_0x5009fe(0x128))){const _0x584a66=await fetchNpmDistTagVersion(_0x5009fe(0x128));if(!_0x584a66)return null;return{'version':_0x584a66,'source':_0x5009fe(0x128)};}const _0x4ad466=await fetchLatestVersion();if(!_0x4ad466)return null;return{'version':_0x4ad466,'source':_0x5009fe(0x14e)};}function shouldInstallTarget(_0x323102,_0x503f5c){const _0x1e471f=a40_0x415ea7;if(_0x503f5c[_0x1e471f(0x12c)]===_0x1e471f(0x15c)||_0x503f5c[_0x1e471f(0x12c)]===_0x1e471f(0x128))return!a40_0x527291['eq'](_0x323102,_0x503f5c[_0x1e471f(0x15c)]);return a40_0x527291['lt'](_0x323102,_0x503f5c[_0x1e471f(0x15c)]);}function getInstallPlanLabel(_0x571704,_0x42838f){const _0x2bea9d=a40_0x415ea7;switch(_0x42838f[_0x2bea9d(0x12c)]){case _0x2bea9d(0x128):return'Beta\x20version:\x20'+a40_0x32dfb7[_0x2bea9d(0x125)](_0x571704)+'\x20→\x20'+a40_0x32dfb7[_0x2bea9d(0x12a)](_0x42838f[_0x2bea9d(0x15c)]);case _0x2bea9d(0x15c):return _0x2bea9d(0x15e)+a40_0x32dfb7['yellow'](_0x571704)+_0x2bea9d(0x169)+a40_0x32dfb7[_0x2bea9d(0x12a)](_0x42838f[_0x2bea9d(0x15c)]);case _0x2bea9d(0x14e):default:return _0x2bea9d(0x16d)+a40_0x32dfb7[_0x2bea9d(0x125)](_0x571704)+'\x20→\x20'+a40_0x32dfb7['green'](_0x42838f['version']);}}async function installCliSkill(_0xa60897){const _0x13f932=a40_0x415ea7;console[_0x13f932(0x16b)](a40_0x32dfb7[_0x13f932(0x11b)](_0x13f932(0x13e)));const _0x3c167d=runNpxSkillsAddGlobal(process[_0x13f932(0x150)](),RABETBASE_SKILL_SOURCE,{'stdio':_0xa60897?_0x13f932(0x161):_0x13f932(0x14a)});if(_0x3c167d['skipped']){console[_0x13f932(0x16b)](a40_0x32dfb7[_0x13f932(0x11b)](_0x13f932(0x156)));return;}if(_0x3c167d['ok']){console[_0x13f932(0x16b)](a40_0x32dfb7['gray'](_0x13f932(0x120)));return;}console[_0x13f932(0x134)](a40_0x32dfb7[_0x13f932(0x125)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x3c167d[_0x13f932(0x13b)]||'unknown'))),console['log'](a40_0x32dfb7[_0x13f932(0x11b)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x13f932(0x159)));}function a40_0x1552(_0x2cddfa,_0x3d795c){_0x2cddfa=_0x2cddfa-0x119;const _0x5497f8=a40_0x5497();let _0x1552a9=_0x5497f8[_0x2cddfa];return _0x1552a9;}async function execute(_0x52d7a6){const _0x531c5d=a40_0x415ea7;await validateUpdateFlags(_0x52d7a6);const _0x286cf8=getCurrentVersion();console[_0x531c5d(0x16b)](_0x531c5d(0x16f)+_0x286cf8);const _0x613035=a40_0x25e06b(_0x531c5d(0x15b))[_0x531c5d(0x127)](),_0x1ae43a=await resolveTargetVersion(_0x52d7a6);if(!_0x1ae43a){const _0x1d02d7=_0x52d7a6[_0x531c5d(0x136)](_0x531c5d(0x128))?_0x531c5d(0x144):_0x531c5d(0x145);return _0x613035['fail'](_0x1d02d7),console[_0x531c5d(0x16b)](a40_0x32dfb7[_0x531c5d(0x11b)](_0x531c5d(0x14f)+NPM_PACKAGE_NAME+_0x531c5d(0x15d))),{'ok':![],'message':_0x1d02d7};}const _0x556b8b=a40_0x527291[_0x531c5d(0x166)](VERSION),_0x2c8dac=a40_0x527291[_0x531c5d(0x166)](_0x1ae43a[_0x531c5d(0x15c)]);if(!_0x556b8b||!_0x2c8dac)return _0x613035[_0x531c5d(0x11e)](_0x531c5d(0x153)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x556b8b,_0x1ae43a)){const _0x51c35b=_0x1ae43a[_0x531c5d(0x12c)]===_0x531c5d(0x15c)?'Already\x20on\x20requested\x20version\x20(v'+_0x1ae43a['version']+')':_0x531c5d(0x170)+_0x1ae43a[_0x531c5d(0x15c)]+')';return _0x613035[_0x531c5d(0x16c)](_0x51c35b),shouldSkipCliSkill(_0x52d7a6)?console[_0x531c5d(0x16b)](a40_0x32dfb7[_0x531c5d(0x11b)](_0x531c5d(0x135))):await installCliSkill(_0x52d7a6['nonInteractive']),{'ok':!![]};}_0x613035[_0x531c5d(0x132)](getInstallPlanLabel(_0x286cf8,_0x1ae43a));const _0x2ac1c5=detectPackageManager(),_0x358dd1=_0x2ac1c5==='npm'?resolveNpmBin(_0x531c5d(0x163)):_0x2ac1c5,_0xcf2aa6=a40_0x25e06b('Updating\x20via\x20'+_0x2ac1c5+_0x531c5d(0x160))[_0x531c5d(0x127)]();try{return await execa(_0x358dd1,[_0x531c5d(0x12b),'-g',NPM_PACKAGE_NAME+'@'+_0x1ae43a[_0x531c5d(0x15c)]],{'stdio':'pipe'}),_0xcf2aa6['succeed'](_0x531c5d(0x138)+_0x1ae43a[_0x531c5d(0x15c)]),console[_0x531c5d(0x16b)](a40_0x32dfb7[_0x531c5d(0x11b)](_0x531c5d(0x14d))),shouldSkipCliSkill(_0x52d7a6)?console[_0x531c5d(0x16b)](a40_0x32dfb7[_0x531c5d(0x11b)](_0x531c5d(0x135))):await installCliSkill(_0x52d7a6[_0x531c5d(0x11a)]),{'ok':!![]};}catch(_0x47654b){return _0xcf2aa6[_0x531c5d(0x11e)](_0x531c5d(0x129)),console[_0x531c5d(0x13b)](a40_0x32dfb7[_0x531c5d(0x124)]('\x20\x20'+_0x47654b['message'])),console[_0x531c5d(0x16b)](a40_0x32dfb7[_0x531c5d(0x11b)](_0x531c5d(0x167)+_0x2ac1c5+_0x531c5d(0x121)+NPM_PACKAGE_NAME+'@'+_0x1ae43a[_0x531c5d(0x15c)])),{'ok':![],'message':_0x47654b['message']};}}export const updateDefinition={'service':a40_0x415ea7(0x143),'command':'run','description':a40_0x415ea7(0x13a),'risk':a40_0x415ea7(0x15a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3e0481,_0x3521c7){const _0x508d3a=a41_0x362c,_0xcb2fb=_0x3e0481();while(!![]){try{const _0xd69dc3=parseInt(_0x508d3a(0x184))/0x1*(-parseInt(_0x508d3a(0x17e))/0x2)+parseInt(_0x508d3a(0x17d))/0x3*(-parseInt(_0x508d3a(0x183))/0x4)+-parseInt(_0x508d3a(0x186))/0x5*(-parseInt(_0x508d3a(0x181))/0x6)+-parseInt(_0x508d3a(0x17c))/0x7+parseInt(_0x508d3a(0x17f))/0x8*(parseInt(_0x508d3a(0x180))/0x9)+parseInt(_0x508d3a(0x182))/0xa+-parseInt(_0x508d3a(0x187))/0xb*(-parseInt(_0x508d3a(0x185))/0xc);if(_0xd69dc3===_0x3521c7)break;else _0xcb2fb['push'](_0xcb2fb['shift']());}catch(_0x5ab5a8){_0xcb2fb['push'](_0xcb2fb['shift']());}}}(a41_0x2964,0x40f80));function a41_0x362c(_0x348af8,_0x4651ba){_0x348af8=_0x348af8-0x17c;const _0x2964da=a41_0x2964();let _0x362cb5=_0x2964da[_0x348af8];return _0x362cb5;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x2964(){const _0x509342=['22370mmCntI','11Fhzjmd','346710eCVqFy','6efbXgD','136132epsHWe','392iHjeKa','89091rUuIyE','66UxlGgG','773120ARLrPp','419828gNcKOL','2mfebbs','601332wHrHJQ'];a41_0x2964=function(){return _0x509342;};return a41_0x2964();}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x2f2115=a42_0x2a40;function a42_0xe989(){const _0x17511c=['tableName','1505850VPhkRw','48PYVuva','11453140mCfUqb','codegen','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','code','operation','read','str','skip-imports','28VWZKzL','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','114725sJeaJB','142245SqcDka','sdk','9NoopsI','47814eTBPbU','name','376316uBQoSr','110537EhfJPS','string'];a42_0xe989=function(){return _0x17511c;};return a42_0xe989();}(function(_0x15b974,_0x2dc229){const _0x2334f6=a42_0x2a40,_0x470ef4=_0x15b974();while(!![]){try{const _0x2ea142=-parseInt(_0x2334f6(0x1f6))/0x1+-parseInt(_0x2334f6(0x1f4))/0x2*(parseInt(_0x2334f6(0x1f3))/0x3)+parseInt(_0x2334f6(0x204))/0x4*(-parseInt(_0x2334f6(0x1f0))/0x5)+-parseInt(_0x2334f6(0x1fa))/0x6+-parseInt(_0x2334f6(0x1f7))/0x7*(parseInt(_0x2334f6(0x1fb))/0x8)+parseInt(_0x2334f6(0x1f1))/0x9+parseInt(_0x2334f6(0x1fc))/0xa;if(_0x2ea142===_0x2dc229)break;else _0x470ef4['push'](_0x470ef4['shift']());}catch(_0x430904){_0x470ef4['push'](_0x470ef4['shift']());}}}(a42_0xe989,0x3279a));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x2a40(_0x226486,_0x67da50){_0x226486=_0x226486-0x1f0;const _0xe9893b=a42_0xe989();let _0x2a4030=_0xe9893b[_0x226486];return _0x2a4030;}export const codegenSdk={'service':a42_0x2f2115(0x1fd),'command':a42_0x2f2115(0x1f2),'description':a42_0x2f2115(0x205),'risk':a42_0x2f2115(0x201),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':a42_0x2f2115(0x1f8),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':'operation','type':a42_0x2f2115(0x1f8),'required':!![],'description':a42_0x2f2115(0x1fe)},{'name':a42_0x2f2115(0x203),'type':'boolean','description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0xdbdf87){const _0x224438=a42_0x2f2115,{dataset:_0x270b97,operation:_0x2f93d0}=await getOperationDetail(_0xdbdf87['appCode'],_0xdbdf87[_0x224438(0x202)](_0x224438(0x1ff)),_0xdbdf87['str'](_0x224438(0x200))),_0x2a83e2=generateSdkCode(_0x270b97,_0x2f93d0,{'includeImports':!_0xdbdf87['bool']('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x270b97[_0x224438(0x1f5)],'code':_0x270b97[_0x224438(0x1ff)],'tableName':_0x270b97[_0x224438(0x1f9)]},'operation':_0xdbdf87[_0x224438(0x202)](_0x224438(0x200)),'code':_0x2a83e2}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x6312ef=a43_0x1f50;function a43_0x1f50(_0x2a4da6,_0x5153ec){_0x2a4da6=_0x2a4da6-0xf2;const _0x440dfd=a43_0x440d();let _0x1f500b=_0x440dfd[_0x2a4da6];return _0x1f500b;}(function(_0x5a7bf9,_0x258333){const _0x3e62c7=a43_0x1f50,_0x192a60=_0x5a7bf9();while(!![]){try{const _0x3fb988=-parseInt(_0x3e62c7(0xfb))/0x1+-parseInt(_0x3e62c7(0xf9))/0x2+parseInt(_0x3e62c7(0x107))/0x3*(-parseInt(_0x3e62c7(0xff))/0x4)+-parseInt(_0x3e62c7(0xfa))/0x5+parseInt(_0x3e62c7(0x101))/0x6*(parseInt(_0x3e62c7(0x104))/0x7)+-parseInt(_0x3e62c7(0xf6))/0x8+parseInt(_0x3e62c7(0xf4))/0x9*(parseInt(_0x3e62c7(0x106))/0xa);if(_0x3fb988===_0x258333)break;else _0x192a60['push'](_0x192a60['shift']());}catch(_0x48b169){_0x192a60['push'](_0x192a60['shift']());}}}(a43_0x440d,0x874ec));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x440d(){const _0x4a3cb5=['boolean','479376GVkTwf','target','4447128SYYcba','sqlCode','Omit\x20import\x20statements\x20from\x20generated\x20code','739888hbBfsb','1295160sscAZI','4570OgauLe','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','codegen','bool','3340468sFOfzi','bff','2772djeMmf','sdk','appCode','3563hirliK','no-imports','440PqLBGs','3GHCwqF','str','sqlcode','string','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','read'];a43_0x440d=function(){return _0x4a3cb5;};return a43_0x440d();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x6312ef(0xfd),'command':'sql','description':a43_0x6312ef(0xfc),'risk':a43_0x6312ef(0xf2),'flags':[SQLCODE_FLAG,{'name':a43_0x6312ef(0xf5),'type':a43_0x6312ef(0x10a),'description':a43_0x6312ef(0x10b),'default':a43_0x6312ef(0x102),'enum':[a43_0x6312ef(0x102),a43_0x6312ef(0x100)]},{'name':a43_0x6312ef(0x105),'type':a43_0x6312ef(0xf3),'description':a43_0x6312ef(0xf8)}],async 'execute'(_0x31530b){const _0x591616=a43_0x6312ef,_0x392adf=await getSqlQueryInfo(_0x31530b[_0x591616(0x103)],_0x31530b[_0x591616(0x108)](_0x591616(0x109))),_0x577777=_0x31530b[_0x591616(0x108)](_0x591616(0xf5))||_0x591616(0x102),_0x8207ad=generateSqlCodeTemplate(_0x392adf,{'target':_0x577777,'includeImports':!_0x31530b[_0x591616(0xfe)](_0x591616(0x105))});return{'ok':!![],'data':{'sqlCode':_0x392adf[_0x591616(0xf7)],'sqlName':_0x392adf['sqlName'],'target':_0x577777,'code':_0x8207ad}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x375d48,_0x788c32){const _0x14be08=a44_0x770c,_0x462302=_0x375d48();while(!![]){try{const _0x261717=-parseInt(_0x14be08(0x1d3))/0x1+-parseInt(_0x14be08(0x1d5))/0x2*(-parseInt(_0x14be08(0x1df))/0x3)+parseInt(_0x14be08(0x1f4))/0x4+-parseInt(_0x14be08(0x1f1))/0x5*(-parseInt(_0x14be08(0x1e7))/0x6)+-parseInt(_0x14be08(0x1e5))/0x7*(-parseInt(_0x14be08(0x1fd))/0x8)+parseInt(_0x14be08(0x1f7))/0x9+-parseInt(_0x14be08(0x1ed))/0xa*(parseInt(_0x14be08(0x1e8))/0xb);if(_0x261717===_0x788c32)break;else _0x462302['push'](_0x462302['shift']());}catch(_0x1f3652){_0x462302['push'](_0x462302['shift']());}}}(a44_0x1c87,0x88360));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';function a44_0x1c87(){const _0x4f0db3=['972638kaKelE','length','1358306uRxVwy','projectConfig','\x20<name>','bool','trim','\x20<name>\x20[--global]','\x20app\x20\x22','Usage:\x20','defaultApp','App\x20code','3fPvAXQ','\x22\x20(appcode:\x20','App\x20\x22','args','Removed\x20app\x20\x22','boolean','35KrcudC','project','6tDsYtZ','33kFDmgJ','flagMissing','\x20Note:\x20app\x20\x22','str','object','214930UgVhiy','both','globalConfig','\x20config.','739195rGxcId','\x22\x20not\x20found.','validation','45756FGgXps','Added','keys','6455709gIouyy','Use\x20global\x20config\x20scope','appcode','global','\x20Default\x20app\x20changed\x20to\x20\x22','\x20Set\x20as\x20default\x20app.','62888aRIwVI','Missing\x20app\x20name.','inherit','apps'];a44_0x1c87=function(){return _0x4f0db3;};return a44_0x1c87();}export function buildAppAddFlags(){const _0x90795d=a44_0x770c;return[{'name':_0x90795d(0x1f9),'type':'string','description':_0x90795d(0x1de),'required':!![]},{'name':_0x90795d(0x1fa),'type':_0x90795d(0x1e4),'description':_0x90795d(0x1f8),'default':![]},...getAppProfileFlagDefs()];}function a44_0x770c(_0x9a7f11,_0x1d8e48){_0x9a7f11=_0x9a7f11-0x1d1;const _0x1c879d=a44_0x1c87();let _0x770c15=_0x1c879d[_0x9a7f11];return _0x770c15;}export function buildAppRemoveFlags(){const _0x3b153d=a44_0x770c;return[{'name':_0x3b153d(0x1fa),'type':_0x3b153d(0x1e4),'description':_0x3b153d(0x1f8),'default':![]}];}export async function validateAppName(_0x14015b,_0x4923a7){const _0x224afc=a44_0x770c,_0x35f029=_0x14015b[_0x224afc(0x1e2)][0x0]?.[_0x224afc(0x1d9)]();if(!_0x35f029)throw CliErrors[_0x224afc(0x1f3)]('Missing\x20app\x20name.',_0x224afc(0x1dc)+CLI_BIN_NAME+'\x20'+_0x4923a7+_0x224afc(0x1d7));}export async function runAppAdd(_0x2da4d,_0x5efbc8){const _0x211d8a=a44_0x770c,_0x4ff88c=_0x2da4d[_0x211d8a(0x1e2)][0x0]?.[_0x211d8a(0x1d9)]();if(!_0x4ff88c)throw CliErrors[_0x211d8a(0x1f3)](_0x211d8a(0x1fe),_0x211d8a(0x1dc)+CLI_BIN_NAME+'\x20'+_0x5efbc8+'\x20<name>\x20--appcode\x20<code>');const _0x2b9cc3=_0x2da4d[_0x211d8a(0x1eb)](_0x211d8a(0x1f9));if(!_0x2b9cc3)throw CliErrors[_0x211d8a(0x1e9)](_0x211d8a(0x1f9),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x5efbc8+'\x20<name>\x20--appcode\x20<code>');const _0x4f48b5={'global':_0x2da4d[_0x211d8a(0x1d8)](_0x211d8a(0x1fa))},_0x57c4b3=readConfig(_0x4f48b5);if(!_0x57c4b3[_0x211d8a(0x1d2)])_0x57c4b3['apps']={};const _0x565ee5={'appcode':_0x2b9cc3,...collectAppProfileOverrides(_0x5a72d2=>_0x2da4d[_0x211d8a(0x1eb)](_0x5a72d2))},_0x41fd09=_0x57c4b3[_0x211d8a(0x1d2)],_0xe7a81e=!!_0x41fd09[_0x4ff88c];_0x41fd09[_0x4ff88c]=_0x565ee5;if(!_0x57c4b3['defaultApp'])_0x57c4b3[_0x211d8a(0x1dd)]=_0x4ff88c;writeConfig(_0x57c4b3,_0x4f48b5);const _0x1b9192=!_0xe7a81e&&_0x57c4b3[_0x211d8a(0x1dd)]===_0x4ff88c?_0x211d8a(0x1fc):'',_0x1dbc47=(_0xe7a81e?'Updated':_0x211d8a(0x1f5))+_0x211d8a(0x1db)+_0x4ff88c+_0x211d8a(0x1e0)+_0x2b9cc3+')'+scopeLabel(_0x4f48b5)+'.'+_0x1b9192;return{'ok':!![],'message':_0x1dbc47};}export async function runAppRemove(_0x46aa09,_0x2d3f15){const _0x3b0ce0=a44_0x770c,_0x1c8187=_0x46aa09[_0x3b0ce0(0x1e2)][0x0]?.[_0x3b0ce0(0x1d9)]();if(!_0x1c8187)throw CliErrors[_0x3b0ce0(0x1f3)](_0x3b0ce0(0x1fe),_0x3b0ce0(0x1dc)+CLI_BIN_NAME+'\x20'+_0x2d3f15+_0x3b0ce0(0x1da));const _0x391c44=_0x46aa09[_0x3b0ce0(0x1d8)](_0x3b0ce0(0x1fa)),{config:_0x192a82,layers:_0x4608b7}=readRawConfigWithLayers(),_0x874511=_0x192a82[_0x3b0ce0(0x1d2)]??{};if(!_0x874511[_0x1c8187])throw CliErrors[_0x3b0ce0(0x1f3)]('App\x20\x22'+_0x1c8187+_0x3b0ce0(0x1f2));const _0x3333f6=_0x4608b7['globalConfig'][_0x3b0ce0(0x1d2)]&&typeof _0x4608b7['globalConfig']['apps']===_0x3b0ce0(0x1ec)?_0x4608b7[_0x3b0ce0(0x1ef)][_0x3b0ce0(0x1d2)]:{},_0x54e945=_0x4608b7[_0x3b0ce0(0x1d6)][_0x3b0ce0(0x1d2)]&&typeof _0x4608b7['projectConfig'][_0x3b0ce0(0x1d2)]===_0x3b0ce0(0x1ec)?_0x4608b7[_0x3b0ce0(0x1d6)][_0x3b0ce0(0x1d2)]:{},_0x9195ea=appDefinedIn(_0x1c8187,_0x3333f6,_0x54e945,_0x4608b7['projectConfig'][_0x3b0ce0(0x1d1)]===![]),_0x51d0ef=resolveAppScopeForWrite(_0x1c8187,_0x391c44,_0x4608b7),_0x3789a5={'global':_0x51d0ef==='global'},_0x4c5ffe=readConfig(_0x3789a5),_0x4a611d=_0x4c5ffe[_0x3b0ce0(0x1d2)];if(!_0x4a611d||!_0x4a611d[_0x1c8187])throw CliErrors['validation'](_0x3b0ce0(0x1e1)+_0x1c8187+_0x3b0ce0(0x1f2));delete _0x4a611d[_0x1c8187];let _0x402e82='';if(_0x4c5ffe[_0x3b0ce0(0x1dd)]===_0x1c8187){const _0x19f221=Object[_0x3b0ce0(0x1f6)](_0x4a611d);_0x4c5ffe[_0x3b0ce0(0x1dd)]=_0x19f221[_0x3b0ce0(0x1d4)]>0x0?_0x19f221[0x0]:undefined,_0x4c5ffe[_0x3b0ce0(0x1dd)]?_0x402e82=_0x3b0ce0(0x1fb)+_0x4c5ffe[_0x3b0ce0(0x1dd)]+'\x22.':delete _0x4c5ffe['defaultApp'];}Object[_0x3b0ce0(0x1f6)](_0x4a611d)[_0x3b0ce0(0x1d4)]===0x0&&(delete _0x4c5ffe[_0x3b0ce0(0x1d2)],delete _0x4c5ffe[_0x3b0ce0(0x1dd)]);writeConfig(_0x4c5ffe,_0x3789a5);const _0x2cbace=_0x9195ea===_0x3b0ce0(0x1ee)?_0x3b0ce0(0x1ea)+_0x1c8187+'\x22\x20still\x20defined\x20in\x20'+(_0x51d0ef==='project'?'global':_0x3b0ce0(0x1e6))+_0x3b0ce0(0x1f0):'';return{'ok':!![],'message':_0x3b0ce0(0x1e3)+_0x1c8187+'\x22'+scopeLabel(_0x3789a5)+'.'+_0x402e82+_0x2cbace};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xa4f1a4,_0x18156e){const _0x43fe2e=a45_0x2fcd,_0x265814=_0xa4f1a4();while(!![]){try{const _0x31b05d=parseInt(_0x43fe2e(0x1b1))/0x1+parseInt(_0x43fe2e(0x19b))/0x2*(-parseInt(_0x43fe2e(0x1a6))/0x3)+parseInt(_0x43fe2e(0x1a2))/0x4+parseInt(_0x43fe2e(0x1ab))/0x5*(parseInt(_0x43fe2e(0x196))/0x6)+parseInt(_0x43fe2e(0x19a))/0x7+parseInt(_0x43fe2e(0x1a5))/0x8*(-parseInt(_0x43fe2e(0x1a1))/0x9)+parseInt(_0x43fe2e(0x1ad))/0xa*(-parseInt(_0x43fe2e(0x1a4))/0xb);if(_0x31b05d===_0x18156e)break;else _0x265814['push'](_0x265814['shift']());}catch(_0x195e39){_0x265814['push'](_0x265814['shift']());}}}(a45_0x296f,0x6869f));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x26d8ae from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0xb4e0b7=await input({'message':'请输入\x20App\x20Code:','validate':_0x486d73=>{const _0x49e62b=a45_0x2fcd,_0xff7a2e=validateAppcode(_0x486d73['trim']());return _0xff7a2e[_0x49e62b(0x199)]||_0xff7a2e['message']||_0x49e62b(0x1b2);}});return _0xb4e0b7['trim']();}export async function promptAppSelection(_0x9aaa1e){const _0x434714=a45_0x2fcd,_0x3ce819=[{'name':a45_0x26d8ae['yellow']('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x9aaa1e[_0x434714(0x19e)]((_0x3057b4,_0x4a4d92)=>({'name':_0x3057b4[_0x434714(0x1a7)]+'\x20\x20'+a45_0x26d8ae[_0x434714(0x1b0)]('('+_0x3057b4[_0x434714(0x1a8)]+')'),'value':_0x4a4d92}))],_0x4a8129=await checkbox({'message':'获取到\x20'+a45_0x26d8ae['cyan'](_0x9aaa1e[_0x434714(0x197)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x3ce819,'loop':![]});if(_0x4a8129[_0x434714(0x19d)](-0x1))return'custom';if(_0x4a8129[_0x434714(0x197)]===0x0)return _0x434714(0x1a9);return _0x4a8129['map'](_0x527fe6=>_0x9aaa1e[_0x527fe6]);}export async function promptSingleAppSelection(_0xc0008d){const _0xd60266=a45_0x2fcd,_0x23e385=[{'name':a45_0x26d8ae[_0xd60266(0x1b0)](_0xd60266(0x1af)),'value':_0xd60266(0x19c)},{'name':a45_0x26d8ae[_0xd60266(0x1b8)](_0xd60266(0x198)),'value':_0xd60266(0x1a9)},..._0xc0008d['map'](_0x4158dc=>({'name':_0x4158dc[_0xd60266(0x1a7)]+'\x20\x20'+a45_0x26d8ae[_0xd60266(0x1b0)]('('+_0x4158dc[_0xd60266(0x1a8)]+')'),'value':_0x4158dc['appCode']}))],_0x159074=await select({'message':_0xd60266(0x1b5),'choices':_0x23e385});if(_0x159074===_0xd60266(0x19c))return _0xd60266(0x19c);if(_0x159074==='custom')return _0xd60266(0x1a9);return _0xc0008d[_0xd60266(0x1a3)](_0x595c25=>_0x595c25[_0xd60266(0x1a8)]===_0x159074);}export async function selectSingleAppcode(_0x3bfdde){const _0x4326be=a45_0x2fcd;if(!_0x3bfdde)return writeCliSideChannelLine(a45_0x26d8ae[_0x4326be(0x1b0)](_0x4326be(0x1b7))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x243b27;try{_0x243b27=await withActiveCookie(_0x3bfdde,()=>listRemoteApps());}catch(_0x473953){writeCliSideChannelLine(a45_0x26d8ae[_0x4326be(0x1b8)]('无法获取远程应用列表,请手动输入。'));if(_0x473953 instanceof Error)writeCliSideChannelLine(a45_0x26d8ae['gray'](_0x4326be(0x195)+_0x473953[_0x4326be(0x1a0)]+')'));return _fallbackOrSkip();}if(_0x243b27[_0x4326be(0x197)]===0x0)return writeCliSideChannelLine(a45_0x26d8ae[_0x4326be(0x1b8)](_0x4326be(0x19f))),_fallbackOrSkip();const _0xe73f2e=await promptSingleAppSelection(_0x243b27);if(_0xe73f2e==='skip')return'';if(_0xe73f2e===_0x4326be(0x1a9))return promptCustomAppcode();return _0xe73f2e[_0x4326be(0x1a8)];}function a45_0x2fcd(_0x5bb6ba,_0x439699){_0x5bb6ba=_0x5bb6ba-0x194;const _0x296f02=a45_0x296f();let _0x2fcd15=_0x296f02[_0x5bb6ba];return _0x2fcd15;}export async function selectMultipleApps(_0x4910c9){const _0x5bc5df=a45_0x2fcd;writeCliSideChannelLine(_0x5bc5df(0x1ac));let _0x266c63;try{_0x266c63=await withActiveCookie(_0x4910c9,()=>listRemoteApps());}catch(_0x27712d){writeCliSideChannelLine(_0x5bc5df(0x1b6));if(_0x27712d instanceof Error)writeCliSideChannelLine(_0x5bc5df(0x195)+_0x27712d[_0x5bc5df(0x1a0)]+')');return _0x5bc5df(0x1a9);}if(_0x266c63[_0x5bc5df(0x197)]===0x0)return writeCliSideChannelLine(_0x5bc5df(0x1b4)),_0x5bc5df(0x1a9);return promptAppSelection(_0x266c63);}function a45_0x296f(){const _0x3ee424=['App\x20Code:','\x20\x20(','6AwRlSE','length','✎\x20自定义输入\x20appcode','valid','5310774EKdgzA','2gVrATJ','skip','includes','map','未找到可用应用。','message','305478ihQqEX','3136980jIwdrV','find','83149bVrZtr','88hxEDgw','1998789AMGUss','appName','appCode','custom','(跳过,稍后配置)','630565TbEXMh','正在获取可用应用列表...','910cUDtqS','✎\x20手动输入','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','gray','486133gYJoAL','Invalid\x20App\x20Code','manual','\x0a未找到可用应用。','请选择要绑定的应用:','\x0a无法获取远程应用列表,请手动输入。','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','yellow'];a45_0x296f=function(){return _0x3ee424;};return a45_0x296f();}async function _fallbackOrSkip(){const _0xe32b21=a45_0x2fcd,_0x450b1e=await select({'message':_0xe32b21(0x194),'choices':[{'name':a45_0x26d8ae[_0xe32b21(0x1b0)](_0xe32b21(0x1aa)),'value':'skip'},{'name':a45_0x26d8ae[_0xe32b21(0x1b8)](_0xe32b21(0x1ae)),'value':_0xe32b21(0x1b3)}]});if(_0x450b1e===_0xe32b21(0x19c))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x1895ac=a46_0x3c62;function a46_0x4ead(){const _0x46b939=['\x20is\x20processing.','31566432lStpZn','FAILED','2490iUfeUJ','604puOiXM','taskId','\x20--format\x20compress','\x20failed:\x20','278968CbBpeU','668046ZbtaUB','15631Gpbmiz','PENDING','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x20completed\x20successfully.','status','PROCESSING','apiError','Task\x20','9966pBauVZ','\x20--appcode\x20','504224IhoJXx','28TqRXYG','has','SUCCESS','5RQawlV','string','854222nDxyiu','toUpperCase','errorMessage','replace','trim','81jSCThu','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.'];a46_0x4ead=function(){return _0x46b939;};return a46_0x4ead();}(function(_0x7c166f,_0x35c06e){const _0x9c1f7d=a46_0x3c62,_0x264da1=_0x7c166f();while(!![]){try{const _0x511905=parseInt(_0x9c1f7d(0x11a))/0x1+parseInt(_0x9c1f7d(0x125))/0x2*(parseInt(_0x9c1f7d(0x112))/0x3)+parseInt(_0x9c1f7d(0x108))/0x4*(-parseInt(_0x9c1f7d(0x118))/0x5)+parseInt(_0x9c1f7d(0x109))/0x6*(parseInt(_0x9c1f7d(0x115))/0x7)+parseInt(_0x9c1f7d(0x114))/0x8*(parseInt(_0x9c1f7d(0x11f))/0x9)+-parseInt(_0x9c1f7d(0x124))/0xa*(-parseInt(_0x9c1f7d(0x10a))/0xb)+-parseInt(_0x9c1f7d(0x122))/0xc;if(_0x511905===_0x35c06e)break;else _0x264da1['push'](_0x264da1['shift']());}catch(_0x522802){_0x264da1['push'](_0x264da1['shift']());}}}(a46_0x4ead,0x7fd71));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x1895ac(0x117),a46_0x1895ac(0x123)]),NON_TERMINAL_STATUSES=new Set([a46_0x1895ac(0x10b),'PROCESSING']);export function normalizeAsyncTask(_0xb25bae){const _0x5166c1=a46_0x1895ac,_0x42d52e=typeof _0xb25bae?.[_0x5166c1(0x105)]===_0x5166c1(0x119)?_0xb25bae['taskId'][_0x5166c1(0x11e)]():'';if(!_0x42d52e)throw CliErrors[_0x5166c1(0x110)](_0x5166c1(0x120));const _0x3b86fa=typeof _0xb25bae['status']===_0x5166c1(0x119)?_0xb25bae[_0x5166c1(0x10e)][_0x5166c1(0x11e)]()[_0x5166c1(0x11b)]():'';if(!_0x3b86fa)throw CliErrors[_0x5166c1(0x110)]('Async\x20task\x20'+_0x42d52e+_0x5166c1(0x10c));return{'taskId':_0x42d52e,'status':_0x3b86fa,'errorMessage':typeof _0xb25bae[_0x5166c1(0x11c)]===_0x5166c1(0x119)&&_0xb25bae['errorMessage'][_0x5166c1(0x11e)]()?_0xb25bae[_0x5166c1(0x11c)][_0x5166c1(0x11e)]():null,'isTerminal':TERMINAL_STATUSES[_0x5166c1(0x116)](_0x3b86fa),'knownStatus':TERMINAL_STATUSES[_0x5166c1(0x116)](_0x3b86fa)||NON_TERMINAL_STATUSES[_0x5166c1(0x116)](_0x3b86fa)};}export function buildAsyncTaskStatusCommand(_0x43e47e,_0x109832){const _0xa44ff6=a46_0x1895ac;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x43e47e)+_0xa44ff6(0x113)+quoteShellArg(_0x109832)+_0xa44ff6(0x106);}export function asyncTaskMessage(_0x5b0a7b){const _0x40e26c=a46_0x1895ac;switch(_0x5b0a7b[_0x40e26c(0x10e)]){case _0x40e26c(0x10b):return'Task\x20'+_0x5b0a7b[_0x40e26c(0x105)]+'\x20is\x20pending.';case _0x40e26c(0x10f):return _0x40e26c(0x111)+_0x5b0a7b[_0x40e26c(0x105)]+_0x40e26c(0x121);case'SUCCESS':return _0x40e26c(0x111)+_0x5b0a7b[_0x40e26c(0x105)]+_0x40e26c(0x10d);case _0x40e26c(0x123):return _0x5b0a7b[_0x40e26c(0x11c)]?'Task\x20'+_0x5b0a7b[_0x40e26c(0x105)]+_0x40e26c(0x107)+_0x5b0a7b['errorMessage']:_0x40e26c(0x111)+_0x5b0a7b[_0x40e26c(0x105)]+'\x20failed.';default:return _0x40e26c(0x111)+_0x5b0a7b['taskId']+'\x20returned\x20unknown\x20status\x20'+_0x5b0a7b['status']+'.';}}function a46_0x3c62(_0x282e4d,_0x4c94ba){_0x282e4d=_0x282e4d-0x105;const _0x4ead9a=a46_0x4ead();let _0x3c6288=_0x4ead9a[_0x282e4d];return _0x3c6288;}function quoteShellArg(_0x2e2e74){const _0x5828be=a46_0x1895ac;return'\x27'+_0x2e2e74[_0x5828be(0x11d)](/'/g,'\x27\x5c\x27\x27')+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4e7c7e,_0x2d6762){var _0x8007ac=a47_0x4246,_0x3391db=_0x4e7c7e();while(!![]){try{var _0x4cecfd=-parseInt(_0x8007ac(0x119))/0x1*(parseInt(_0x8007ac(0x11c))/0x2)+parseInt(_0x8007ac(0x114))/0x3+parseInt(_0x8007ac(0x118))/0x4*(-parseInt(_0x8007ac(0x117))/0x5)+parseInt(_0x8007ac(0x115))/0x6+parseInt(_0x8007ac(0x113))/0x7*(-parseInt(_0x8007ac(0x116))/0x8)+-parseInt(_0x8007ac(0x111))/0x9*(-parseInt(_0x8007ac(0x11a))/0xa)+parseInt(_0x8007ac(0x110))/0xb*(parseInt(_0x8007ac(0x112))/0xc);if(_0x4cecfd===_0x2d6762)break;else _0x3391db['push'](_0x3391db['shift']());}catch(_0x59782d){_0x3391db['push'](_0x3391db['shift']());}}}(a47_0xcb9d,0x81cb7));function a47_0x4246(_0x1b5152,_0x3d326c){_0x1b5152=_0x1b5152-0x110;var _0xcb9d9f=a47_0xcb9d();var _0x424699=_0xcb9d9f[_0x1b5152];return _0x424699;}function a47_0xcb9d(){var _0x580037=['url','882542ljkCwY','description','7678yktqNb','2646945URkEnO','6516kwMoNq','4074xNAIKW','617418TMvLLG','6185292CZoTwD','3768RiqiXA','5YCyKdI','3238856zuJrQp','2nPEPLX','30tKsVMG'];a47_0xcb9d=function(){return _0x580037;};return a47_0xcb9d();}export function asDryRunResult(_0x1ffc9b,_0x157ad7){var _0x3b96e5=a47_0x4246;return Object['defineProperties'](_0x1ffc9b,{'method':{'value':_0x157ad7['method'],'enumerable':![]},'url':{'value':_0x157ad7[_0x3b96e5(0x11b)],'enumerable':![]},..._0x157ad7[_0x3b96e5(0x11d)]?{'description':{'value':_0x157ad7['description'],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a48_0x5d67(_0x86f0e,_0x5a8ff6){_0x86f0e=_0x86f0e-0x81;const _0x5745cf=a48_0x5745();let _0x5d6760=_0x5745cf[_0x86f0e];return _0x5d6760;}const a48_0x352ed2=a48_0x5d67;(function(_0x41f470,_0x1e897e){const _0x1e6865=a48_0x5d67,_0x2a185b=_0x41f470();while(!![]){try{const _0x25d239=parseInt(_0x1e6865(0x83))/0x1*(-parseInt(_0x1e6865(0x94))/0x2)+-parseInt(_0x1e6865(0x96))/0x3*(parseInt(_0x1e6865(0x90))/0x4)+parseInt(_0x1e6865(0x8e))/0x5*(parseInt(_0x1e6865(0x92))/0x6)+parseInt(_0x1e6865(0x97))/0x7*(parseInt(_0x1e6865(0x8b))/0x8)+parseInt(_0x1e6865(0x85))/0x9*(-parseInt(_0x1e6865(0x8c))/0xa)+parseInt(_0x1e6865(0x86))/0xb*(-parseInt(_0x1e6865(0x89))/0xc)+parseInt(_0x1e6865(0x99))/0xd*(parseInt(_0x1e6865(0x84))/0xe);if(_0x25d239===_0x1e897e)break;else _0x2a185b['push'](_0x2a185b['shift']());}catch(_0x49442e){_0x2a185b['push'](_0x2a185b['shift']());}}}(a48_0x5745,0x9a0b5));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x352ed2(0x95)};export const CODE_FLAG={'name':'code','type':a48_0x352ed2(0x82),'required':!![],'description':a48_0x352ed2(0x81),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x352ed2(0x93),'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};export const SQLCODE_FLAG={'name':a48_0x352ed2(0x98),'type':a48_0x352ed2(0x82),'required':!![],'description':a48_0x352ed2(0x9a),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x352ed2(0x88),'type':a48_0x352ed2(0x82),'required':![],'description':a48_0x352ed2(0x87)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x352ed2(0x8d)};function a48_0x5745(){const _0x223403=['sqlcode','1222559dIcyQY','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Dataset\x20code\x20(32-char\x20hex\x20UUID)','string','1203089lBgiqG','378TSrfrn','27qxOTsr','11tXvFsk','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','appcode','12205356KHzzmB','dbtype','8fNEFTe','3921460utbLpq','App\x20code\x20(e.g.\x20app-xxxxx)','5dTGsUw','Database\x20product\x20type','648136jmrzry','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','6314094ExdAXR','datasetcode','2pKzRuU','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','6dfoOFO','5321141AHxmkg'];a48_0x5745=function(){return _0x223403;};return a48_0x5745();}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a48_0x352ed2(0x91)};export const DB_TYPE_FLAG={'name':a48_0x352ed2(0x8a),'type':a48_0x352ed2(0x82),'required':!![],'description':a48_0x352ed2(0x8f),'enum':['MYSQL','POSTGRESQL']};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d7f9a,_0x20116f){const _0x2c4f2e=a49_0x1d9f,_0x506ca3=_0x5d7f9a();while(!![]){try{const _0x50ca42=-parseInt(_0x2c4f2e(0x11a))/0x1*(-parseInt(_0x2c4f2e(0x114))/0x2)+-parseInt(_0x2c4f2e(0x10f))/0x3+-parseInt(_0x2c4f2e(0x110))/0x4*(-parseInt(_0x2c4f2e(0x115))/0x5)+-parseInt(_0x2c4f2e(0x111))/0x6*(parseInt(_0x2c4f2e(0x120))/0x7)+parseInt(_0x2c4f2e(0x119))/0x8+parseInt(_0x2c4f2e(0x10e))/0x9+-parseInt(_0x2c4f2e(0x11c))/0xa*(-parseInt(_0x2c4f2e(0x11f))/0xb);if(_0x50ca42===_0x20116f)break;else _0x506ca3['push'](_0x506ca3['shift']());}catch(_0x108af8){_0x506ca3['push'](_0x506ca3['shift']());}}}(a49_0x566b,0xdb419));function a49_0x1d9f(_0x1b8322,_0x4c7383){_0x1b8322=_0x1b8322-0x10c;const _0x566bdb=a49_0x566b();let _0x1d9fc3=_0x566bdb[_0x1b8322];return _0x1d9fc3;}import{existsSync,statSync}from'node:fs';function a49_0x566b(){const _0x1db242=['trim','\x20MB','112nvVlcs','5sBHjsg','\x20path\x20is\x20required.','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','File\x20not\x20found:\x20','415904fnlXCx','8101znMwDs','File\x20is\x20not\x20a\x20regular\x20file:\x20','24290yMCVmQ','size','toFixed','319nyBdrP','28JFkyEA','isFile','validation','2106279RRpikj','2017719PSinDy','3090424bcncTV','18114GzTtZS'];a49_0x566b=function(){return _0x1db242;};return a49_0x566b();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x19f8d0){const _0x4efb75=a49_0x1d9f;if(_0x19f8d0>=BYTES_PER_MB){const _0x55868c=Math['ceil'](_0x19f8d0/BYTES_PER_MB*0x64)/0x64;return _0x55868c[_0x4efb75(0x11e)](0x2)+_0x4efb75(0x113);}return _0x19f8d0+'\x20B';}export function requireDevelopmentUploadFile(_0xbd1582,_0x58333f){const _0x3d0753=a49_0x1d9f,_0x19f4d7=_0xbd1582[_0x3d0753(0x112)]();if(!_0x19f4d7)throw CliErrors[_0x3d0753(0x10d)](_0x58333f+_0x3d0753(0x116));if(!existsSync(_0x19f4d7))throw CliErrors[_0x3d0753(0x10d)](_0x3d0753(0x118)+_0x19f4d7);const _0x905e34=statSync(_0x19f4d7);if(!_0x905e34[_0x3d0753(0x10c)]())throw CliErrors['validation'](_0x3d0753(0x11b)+_0x19f4d7);if(_0x905e34[_0x3d0753(0x11d)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x3d0753(0x10d)](_0x3d0753(0x117)+_0x19f4d7+'\x20('+formatBytes(_0x905e34[_0x3d0753(0x11d)])+')');return{'path':_0x19f4d7,'size':_0x905e34[_0x3d0753(0x11d)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x669ef9,_0x7605c7){const _0x10071f=a50_0x48aa,_0x581186=_0x669ef9();while(!![]){try{const _0x23fcfd=parseInt(_0x10071f(0xae))/0x1+-parseInt(_0x10071f(0xb2))/0x2+parseInt(_0x10071f(0xb6))/0x3*(-parseInt(_0x10071f(0xb3))/0x4)+-parseInt(_0x10071f(0xb4))/0x5+parseInt(_0x10071f(0xb1))/0x6*(parseInt(_0x10071f(0xb5))/0x7)+parseInt(_0x10071f(0xac))/0x8+parseInt(_0x10071f(0xb0))/0x9;if(_0x23fcfd===_0x7605c7)break;else _0x581186['push'](_0x581186['shift']());}catch(_0x3837ad){_0x581186['push'](_0x581186['shift']());}}}(a50_0x2763,0xc608b));export function validateAppcode(_0x4ed65e){const _0x418133=a50_0x48aa,_0x4dca32=_0x4ed65e[_0x418133(0xad)]();if(!_0x4dca32)return{'valid':![],'message':_0x418133(0xab)};if(_0x4dca32[_0x418133(0xb7)]>0x64)return{'valid':![],'message':_0x418133(0xaf)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x4dca32))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a50_0x48aa(_0xa8a4d8,_0x3cece6){_0xa8a4d8=_0xa8a4d8-0xab;const _0x276335=a50_0x2763();let _0x48aad3=_0x276335[_0xa8a4d8];return _0x48aad3;}function a50_0x2763(){const _0x1aa315=['2296cDvCfM','10917YMcBYr','length','App\x20Code\x20cannot\x20be\x20empty','3423200jkweMF','trim','596038gQiiaf','App\x20Code\x20cannot\x20exceed\x20100\x20characters','18219069RjSsIi','13002fBSRzE','725468mThZFN','1336XOLCxL','6848740QxWBzL'];a50_0x2763=function(){return _0x1aa315;};return a50_0x2763();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x22feb3=a51_0x16fc;(function(_0x59ae88,_0xc5c7c){const _0x84c37e=a51_0x16fc,_0x207cf7=_0x59ae88();while(!![]){try{const _0x3eaeab=parseInt(_0x84c37e(0x15b))/0x1+parseInt(_0x84c37e(0x157))/0x2*(parseInt(_0x84c37e(0x152))/0x3)+-parseInt(_0x84c37e(0x144))/0x4*(-parseInt(_0x84c37e(0x153))/0x5)+parseInt(_0x84c37e(0x15a))/0x6*(parseInt(_0x84c37e(0x155))/0x7)+-parseInt(_0x84c37e(0x14c))/0x8+-parseInt(_0x84c37e(0x150))/0x9*(-parseInt(_0x84c37e(0x159))/0xa)+-parseInt(_0x84c37e(0x147))/0xb;if(_0x3eaeab===_0xc5c7c)break;else _0x207cf7['push'](_0x207cf7['shift']());}catch(_0x3e00df){_0x207cf7['push'](_0x207cf7['shift']());}}}(a51_0x5493,0xc5f44));import{CliErrors}from'../../errors.js';function a51_0x5493(){const _0x1367a4=['10775520ludTOZ','app','Key\x20not\x20found:\x20','read','805572CIrLIi','object','67623mItHTE','865EbLSAr','str','7otcKts','\x20config\x20get\x20--key\x20<key>','116WpydkN','string','150DRRclS','7080852VghRYX','1451571JsQEBm','21304oQsBAp','validation','Get\x20a\x20config\x20value\x20by\x20key','44498839IxzBMa','key','appcode','config','Missing\x20key.'];a51_0x5493=function(){return _0x1367a4;};return a51_0x5493();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x2d29e4){const _0x55c56e=a51_0x16fc,_0x3244a0=_0x2d29e4[_0x55c56e(0x154)]('key');if(!_0x3244a0)throw CliErrors[_0x55c56e(0x145)](_0x55c56e(0x14b),'Usage:\x20'+CLI_BIN_NAME+_0x55c56e(0x156));const _0x488333=readConfig(),_0x272399=_0x3244a0===_0x55c56e(0x14d)?_0x55c56e(0x149):_0x3244a0,_0x185285=_0x488333[_0x272399];if(_0x185285===undefined)throw CliErrors[_0x55c56e(0x145)](_0x55c56e(0x14e)+_0x3244a0);return{'ok':!![],'data':typeof _0x185285===_0x55c56e(0x151)?_0x185285:{[_0x272399]:_0x185285},'message':typeof _0x185285==='object'?undefined:String(_0x185285)};}function a51_0x16fc(_0x172b8b,_0x3decb3){_0x172b8b=_0x172b8b-0x144;const _0x549300=a51_0x5493();let _0x16fc12=_0x549300[_0x172b8b];return _0x16fc12;}export const configGetDefinition={'service':a51_0x22feb3(0x14a),'command':'get','description':a51_0x22feb3(0x146),'risk':a51_0x22feb3(0x14f),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x22feb3(0x148),'type':a51_0x22feb3(0x158),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|