@lovrabet/rabetbase-cli 2.3.16-beta.1 → 2.3.16-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/react/create.js +1 -0
- package/lib/commands/page/react/detail.js +1 -0
- package/lib/commands/page/react/list.js +1 -0
- package/lib/commands/page/react/publish.js +1 -0
- package/lib/commands/page/react/shared.js +1 -0
- package/lib/commands/page/react/syntax.js +1 -0
- package/lib/commands/page/react/template.js +1 -0
- package/lib/commands/page/react/update.js +1 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -0
- package/lib/commands/tenant/members-list.js +1 -0
- package/lib/commands/tenant/shared.js +1 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/templates/projects/sub-app-react-demo/CHANGELOG.md +1 -1
- package/templates/projects/sub-app-react-demo/README.md +1 -1
- package/templates/projects/sub-app-react-demo/docs/quick-start.md +1 -1
- package/templates/projects/sub-app-react-demo/src/pages/index.tsx +1 -1
- package/lib/commands/app/add.js +0 -1
- package/lib/commands/app/remove.js +0 -1
- package/lib/commands/project/init.js +0 -1
- package/lib/commands/sql/save.js +0 -1
package/lib/commands/bff/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a35_0x12d544=a35_0xf7df;(function(_0x3ac3a4,_0x390164){const _0x403a9d=a35_0xf7df,_0x1c2438=_0x3ac3a4();while(!![]){try{const _0x319081=-parseInt(_0x403a9d(0x1dc))/0x1+parseInt(_0x403a9d(0x1f1))/0x2+parseInt(_0x403a9d(0x1d6))/0x3*(parseInt(_0x403a9d(0x1c1))/0x4)+parseInt(_0x403a9d(0x1c8))/0x5+parseInt(_0x403a9d(0x1c2))/0x6+parseInt(_0x403a9d(0x1f5))/0x7+-parseInt(_0x403a9d(0x1df))/0x8;if(_0x319081===_0x390164)break;else _0x1c2438['push'](_0x1c2438['shift']());}catch(_0x21ae0a){_0x1c2438['push'](_0x1c2438['shift']());}}}(a35_0x21a0,0x1918a));function a35_0xf7df(_0x5c71a1,_0x4801ea){_0x5c71a1=_0x5c71a1-0x1bd;const _0x21a03b=a35_0x21a0();let _0xf7df7b=_0x21a03b[_0x5c71a1];return _0xf7df7b;}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':a35_0x12d544(0x1e6),'command':'pull','description':a35_0x12d544(0x201),'risk':a35_0x12d544(0x1d7),'flags':[{'name':a35_0x12d544(0x1c6),'type':a35_0x12d544(0x203),'description':'Pull\x20only\x20this\x20script\x20type','enum':[a35_0x12d544(0x1eb),a35_0x12d544(0x1fa),a35_0x12d544(0x1f2)]},{'name':a35_0x12d544(0x1d2),'type':a35_0x12d544(0x1e5),'description':a35_0x12d544(0x1c3)}],async 'dryRun'(_0x13c30b){const _0x296d04=a35_0x12d544,_0x5c06bb=loadBffProjectConfig(_0x13c30b['appCode']),_0x325a1d=await readBffLockFile(_0x5c06bb['lockFilePath']),{appLock:_0xb021a}=ensureLockScope(_0x325a1d??createEmptyBffLock(),_0x13c30b[_0x296d04(0x1cc)],_0x5c06bb[_0x296d04(0x1e1)],_0x296d04(0x1e4)),_0x53c3b8=normalizeBffType(_0x13c30b[_0x296d04(0x1ea)](_0x296d04(0x1c6)))??undefined,_0x8fe88d=buildDatasetCodeToAliasMap(_0x13c30b['apiDir'],_0x13c30b[_0x296d04(0x1cc)]),[_0x397185,_0xeb6557]=await Promise['all']([listBffScripts(_0x13c30b['appCode'],_0x53c3b8),getBffScriptStatistics(_0x13c30b[_0x296d04(0x1cc)])]),_0x34e130=createHookLocationMap(_0xeb6557),_0x3f92a4=[];for(const _0x5dbdcb of _0x397185){const _0xac4b9b=resolveRemoteScriptTarget(_0x5c06bb,_0x5dbdcb,_0x34e130,_0xb021a[_0x296d04(0x1fd)],_0x8fe88d);if(!_0xac4b9b){_0x3f92a4[_0x296d04(0x1c5)]({'scriptType':_0x5dbdcb[_0x296d04(0x1da)],'functionName':_0x5dbdcb[_0x296d04(0x1fb)]??'','status':_0x296d04(0x1c0),'reason':_0x296d04(0x1cb)});continue;}const _0x2e8e0d=_0xb021a[_0x296d04(0x1fd)][_0xac4b9b[_0x296d04(0x1e3)]],_0x473208=_0x5dbdcb[_0x296d04(0x1bf)]!=null?computeContentHash(_0x5dbdcb['scriptContent']):undefined,_0x4e8fd9=await hasUnsyncedLocalChanges(_0xac4b9b[_0x296d04(0x202)],_0x2e8e0d,_0x473208);_0x3f92a4[_0x296d04(0x1c5)]({'lockKey':_0xac4b9b[_0x296d04(0x1e3)],'filePath':_0xac4b9b[_0x296d04(0x202)],'remoteId':_0x5dbdcb['id']??null,'status':_0x4e8fd9?_0x296d04(0x1be):_0x296d04(0x1fe)});}return{'method':_0x296d04(0x1d8),'url':_0x296d04(0x1ed)+_0x13c30b[_0x296d04(0x1cc)]+(_0x53c3b8?_0x296d04(0x1ef)+_0x53c3b8:''),'body':{'appCode':_0x13c30b[_0x296d04(0x1cc)],'filterType':_0x53c3b8??null,'files':_0x3f92a4},'description':_0x296d04(0x1d1)+_0x3f92a4[_0x296d04(0x1c9)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x5c6562){const _0x209725=a35_0x12d544,_0x36fdfa=loadBffProjectConfig(_0x5c6562[_0x209725(0x1cc)]),_0x22235c=await readBffLockFile(_0x36fdfa[_0x209725(0x1ee)]),{lockData:_0x538d73,appLock:_0x92b9fa}=ensureLockScope(_0x22235c??createEmptyBffLock(),_0x5c6562[_0x209725(0x1cc)],_0x36fdfa[_0x209725(0x1e1)],_0x209725(0x1e4)),_0x4bd193=normalizeBffType(_0x5c6562[_0x209725(0x1ea)](_0x209725(0x1c6)))??undefined;if(_0x5c6562[_0x209725(0x1ea)](_0x209725(0x1c6))&&!_0x4bd193)throw CliErrors[_0x209725(0x1f7)](_0x209725(0x1de));const [_0x5ab903,_0x40dbad]=await Promise[_0x209725(0x1e0)]([listBffScripts(_0x5c6562[_0x209725(0x1cc)],_0x4bd193),getBffScriptStatistics(_0x5c6562[_0x209725(0x1cc)])]);if(_0x5ab903[_0x209725(0x1c9)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x209725(0x1cd)};const _0x107d33=_0x5c6562[_0x209725(0x1f0)](_0x209725(0x1d2));if(_0x107d33&&!_0x5c6562[_0x209725(0x1d4)]){const _0x44f340=await confirmForce();if(!_0x44f340)throw CliErrors[_0x209725(0x1f4)](_0x209725(0x1fc));}if(_0x107d33&&_0x5c6562['nonInteractive']){}const _0x2c7a3b=buildDatasetCodeToAliasMap(_0x5c6562[_0x209725(0x1ce)],_0x5c6562[_0x209725(0x1cc)]),_0x3c2abb=createHookLocationMap(_0x40dbad),_0x1115fe=JSON['parse'](JSON['stringify'](_0x538d73)),_0x8a2624=_0x5c6562[_0x209725(0x1cc)],_0x43b14b=_0x1115fe['apps'][_0x8a2624];if(!_0x43b14b)throw new Error(_0x209725(0x1d3)+_0x8a2624+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x5d656b=[],_0x3440aa=[],_0xc1fd1a=[];for(const _0x7148e4 of _0x5ab903){const _0x33ae38=resolveRemoteScriptTarget(_0x36fdfa,_0x7148e4,_0x3c2abb,_0x92b9fa[_0x209725(0x1fd)],_0x2c7a3b);if(!_0x33ae38){_0x3440aa[_0x209725(0x1c5)]({'lockKey':_0x7148e4[_0x209725(0x1da)]+'/'+_0x7148e4[_0x209725(0x1fb)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x3b9601=_0x92b9fa['functions'][_0x33ae38[_0x209725(0x1e3)]];try{if(!_0x7148e4['id'])throw new Error(_0x209725(0x1e2));if(_0x7148e4['scriptContent']==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x1d55ec=_0x7148e4['scriptContent'],_0x418fbf=computeContentHash(_0x1d55ec);if(!_0x107d33){const _0xeda630=await hasUnsyncedLocalChanges(_0x33ae38[_0x209725(0x202)],_0x3b9601,_0x418fbf);if(_0xeda630){_0x3440aa[_0x209725(0x1c5)]({'lockKey':_0x33ae38[_0x209725(0x1e3)],'reason':_0x209725(0x1c7)});continue;}}await ensureParentDirectory(_0x33ae38[_0x209725(0x202)]),await writeFile(_0x33ae38[_0x209725(0x202)],_0x1d55ec,_0x209725(0x1d9));const _0x27bce8={'hash':_0x418fbf,'remoteId':_0x7148e4['id'],'version':_0x7148e4[_0x209725(0x1ec)]};_0x33ae38[_0x209725(0x1c6)]==='HOOK'&&_0x33ae38[_0x209725(0x1d0)]&&(_0x27bce8[_0x209725(0x1f3)]=_0x33ae38[_0x209725(0x1d0)]['alias'],_0x27bce8[_0x209725(0x1ca)]=_0x33ae38[_0x209725(0x1d0)]['datasetCode'],_0x27bce8[_0x209725(0x1e9)]=_0x33ae38[_0x209725(0x1d0)][_0x209725(0x1e9)],_0x27bce8[_0x209725(0x1f9)]=_0x33ae38['hookLocation'][_0x209725(0x1f9)]),_0x43b14b[_0x209725(0x1fd)][_0x33ae38[_0x209725(0x1e3)]]=_0x27bce8,_0x5d656b[_0x209725(0x1c5)]({'lockKey':_0x33ae38[_0x209725(0x1e3)],'remoteId':_0x7148e4['id']});}catch(_0x3a4bae){_0xc1fd1a[_0x209725(0x1c5)]({'lockKey':_0x33ae38[_0x209725(0x1e3)],'error':_0x3a4bae instanceof Error?_0x3a4bae[_0x209725(0x1e8)]:String(_0x3a4bae)});}}return _0x43b14b[_0x209725(0x1d5)]=new Date()[_0x209725(0x1ff)](),await writeBffLockFile(_0x36fdfa[_0x209725(0x1ee)],_0x1115fe),{'ok':_0xc1fd1a['length']===0x0,'data':{'pulled':_0x5d656b,'skipped':_0x3440aa,'failed':_0xc1fd1a},'message':_0x209725(0x200)+_0x5d656b['length']+'\x20pulled,\x20'+_0x3440aa[_0x209725(0x1c9)]+_0x209725(0x1dd)+_0xc1fd1a[_0x209725(0x1c9)]+'\x20failed'};}};function a35_0x21a0(){const _0x2790c2=['\x20skipped,\x20','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','4340096rNvHGc','all','scriptsRoot','Remote\x20script\x20missing\x20id.','lockKey','pull','boolean','bff','trim','message','operationType','str','COMMON','version','/api/management/library/scripts/list?appCode=','lockFilePath','&type=','bool','149526KkxGeZ','HOOK','alias','cancelled','1004549gIuZny','includes','validation','stdin','functionNode','ENDPOINT','functionName','Force\x20pull\x20cancelled.','functions','would_pull','toISOString','Pull\x20complete:\x20','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','filePath','string','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','conflict','scriptContent','skipped','116wGAOEu','1140828HaKPEV','Force\x20overwrite\x20local\x20unsynced\x20changes','yes','push','type','local\x20unsynced\x20changes','748600kYrNZt','length','datasetCode','unresolvable\x20target\x20path','appCode','No\x20remote\x20BFF\x20scripts\x20found.','apiDir','stderr','hookLocation','Would\x20inspect\x20','force','Lock\x20scope\x20for\x20app\x20\x22','nonInteractive','lastSync','13275MrZpYs','write','GET','utf8','scriptType','toLowerCase','41147iUOBSL'];a35_0x21a0=function(){return _0x2790c2;};return a35_0x21a0();}async function hasUnsyncedLocalChanges(_0x4b689a,_0x84e014,_0x182794){if(!await fileExists(_0x4b689a))return![];const _0x2efcf8=await computeFileHash(_0x4b689a);if(!_0x84e014)return _0x182794?_0x2efcf8!==_0x182794:!![];return _0x2efcf8!==_0x84e014['hash'];}function buildDatasetCodeToAliasMap(_0x56bca4,_0xc6effb){const _0x92b599=a35_0x12d544,_0x11b060=loadAliasMap(_0x56bca4,undefined,resolveApiFilePath(_0x56bca4,_0xc6effb));return new Map(_0x11b060['map'](_0x2648d2=>[_0x2648d2[_0x92b599(0x1ca)],_0x2648d2[_0x92b599(0x1f3)]]));}async function confirmForce(){const _0x1e2ba0=a35_0x12d544,_0x76b352=createInterface({'input':process[_0x1e2ba0(0x1f8)],'output':process[_0x1e2ba0(0x1cf)]}),_0xb178b5=await new Promise(_0x124222=>{const _0x4ff449=_0x1e2ba0;_0x76b352['question'](_0x4ff449(0x1bd),_0x124222);});return _0x76b352['close'](),['y',_0x1e2ba0(0x1c4)][_0x1e2ba0(0x1f6)](_0xb178b5[_0x1e2ba0(0x1e7)]()[_0x1e2ba0(0x1db)]());}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a37_0x9f4024=a37_0x3e26;(function(_0x53fd78,_0x2946ee){const _0x55c98b=a37_0x3e26,_0x587b10=_0x53fd78();while(!![]){try{const _0x3db054=parseInt(_0x55c98b(0xb4))/0x1*(parseInt(_0x55c98b(0x9d))/0x2)+-parseInt(_0x55c98b(0xdb))/0x3*(-parseInt(_0x55c98b(0xd5))/0x4)+parseInt(_0x55c98b(0xd9))/0x5*(-parseInt(_0x55c98b(0xeb))/0x6)+-parseInt(_0x55c98b(0xea))/0x7+parseInt(_0x55c98b(0xc0))/0x8+-parseInt(_0x55c98b(0xd7))/0x9+-parseInt(_0x55c98b(0xa1))/0xa*(parseInt(_0x55c98b(0xc9))/0xb);if(_0x3db054===_0x2946ee)break;else _0x587b10['push'](_0x587b10['shift']());}catch(_0x95ed74){_0x587b10['push'](_0x587b10['shift']());}}}(a37_0x4901,0x2e506));function a37_0x4901(){const _0x542cc2=['datasetCodeToDataset','would_push','alias','125362FkSxQw','Local\x20function\x20not\x20found:\x20','type','push','validation','functionNode','version','some','Force\x20push\x20ignoring\x20hash\x20protection','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','lastSync','bff','2209576hYVXdj','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','\x22\x20not\x20found\x20after\x20ensureLockScope.',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Push\x20complete:\x20','cleared','force','map','set','25751FUDiKP','join','hash','get','aliasToDatasetCode','filter','appCode','string','filePath','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Runtime\x20script\x20cache\x20cleared.','update','488LCJkkP','unchanged','1585494zYHCQL','remoteId','130835JrCyHc','lockKey','2076dSDbDC','Cannot\x20resolve\x20dataset\x20for\x20\x22','scriptsRoot','datasetId','stringify','/api/management/library/scripts/save','description','values','toISOString','Would\x20inspect\x20','bool','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','attempted','functions','POST','1401449bRUOFV','30jXNVyh','ENDPOINT','\x20skipped,\x20','has','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','6ElKdjP','runtime\x20cache\x20clear\x20failed','runtime\x20cache\x20not\x20needed','parse','170YzPJAQ','length','every','create','operationType','apps','name','script','Push\x20only\x20this\x20script\x20type','message','lockFilePath','status','Push\x20local\x20BFF\x20scripts\x20to\x20remote','datasetCode','str','HOOK'];a37_0x4901=function(){return _0x542cc2;};return a37_0x4901();}import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}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{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_0x9f4024(0xbf),'command':'push','description':a37_0x9f4024(0xad),'risk':'high-risk-write','flags':[{'name':a37_0x9f4024(0xb6),'type':a37_0x9f4024(0xd0),'description':a37_0x9f4024(0xa9),'enum':['COMMON',a37_0x9f4024(0xec),a37_0x9f4024(0xb0)]},{'name':a37_0x9f4024(0xa7),'type':a37_0x9f4024(0xd0),'description':a37_0x9f4024(0xef)},{'name':a37_0x9f4024(0xc6),'type':'boolean','description':a37_0x9f4024(0xbc)}],async 'dryRun'(_0x39055d){const _0x4f743a=a37_0x9f4024,_0x40f68c=loadBffProjectConfig(_0x39055d[_0x4f743a(0xcf)]),_0x49ea78=await readBffLockFile(_0x40f68c[_0x4f743a(0xab)]),{appLock:_0x5df1b5}=ensureLockScope(_0x49ea78??createEmptyBffLock(),_0x39055d[_0x4f743a(0xcf)],_0x40f68c[_0x4f743a(0xdd)],'push'),_0x15927c=await getTargetFunctions(_0x40f68c,_0x39055d),_0x3481da=_0x39055d[_0x4f743a(0xe5)]('force'),_0xfecd9b=[];for(const _0x584e47 of _0x15927c){const _0x29d198=await computeFileHash(_0x584e47['filePath']),_0x528bea=_0x5df1b5['functions'][_0x584e47['lockKey']],_0x526691=!!_0x528bea&&_0x528bea['hash']===_0x29d198;_0xfecd9b[_0x4f743a(0xb7)]({'lockKey':_0x584e47[_0x4f743a(0xda)],'filePath':_0x584e47[_0x4f743a(0xd1)],'remoteId':_0x528bea?.[_0x4f743a(0xd8)]??null,'mode':_0x528bea?.[_0x4f743a(0xd8)]?_0x4f743a(0xd4):_0x4f743a(0xa4),'status':!_0x3481da&&_0x526691?'unchanged':_0x4f743a(0xb2)});}return{'method':_0x4f743a(0xe9),'url':_0x4f743a(0xe0),'body':{'appCode':_0x39055d[_0x4f743a(0xcf)],'force':_0x3481da,'files':_0xfecd9b,'cacheClearAtRuntime':_0xfecd9b[_0x4f743a(0xbb)](_0x535f8d=>_0x535f8d[_0x4f743a(0xac)]===_0x4f743a(0xb2)),'cacheClearAtRuntimeTimes':_0xfecd9b[_0x4f743a(0xbb)](_0x3ea4b8=>_0x3ea4b8['status']===_0x4f743a(0xb2))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x4f743a(0xe4)+_0xfecd9b['length']+_0x4f743a(0xe6)};},async 'execute'(_0xde2e73){const _0x5da821=a37_0x9f4024,_0x7091ec=loadBffProjectConfig(_0xde2e73[_0x5da821(0xcf)]),_0x1d04a9=await readBffLockFile(_0x7091ec[_0x5da821(0xab)]),{lockData:_0x36ac50,appLock:_0x328e33}=ensureLockScope(_0x1d04a9??createEmptyBffLock(),_0xde2e73['appCode'],_0x7091ec[_0x5da821(0xdd)],_0x5da821(0xb7)),_0x41f39a=await getTargetFunctions(_0x7091ec,_0xde2e73);if(_0x41f39a[_0x5da821(0xa2)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x412c67=_0xde2e73[_0x5da821(0xe5)](_0x5da821(0xc6)),_0x239a00=JSON[_0x5da821(0xa0)](JSON[_0x5da821(0xdf)](_0x36ac50)),_0x11f15e=_0x239a00[_0x5da821(0xa6)][_0xde2e73['appCode']];if(!_0x11f15e)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0xde2e73[_0x5da821(0xcf)]+_0x5da821(0xc2));const _0x105518=await buildHookMaps(_0xde2e73[_0x5da821(0xcf)],_0xde2e73['apiDir'],_0x41f39a,_0x11f15e),_0x346b0c=[],_0x26de8f=[],_0x4d2628=[];for(const _0x552e8a of _0x41f39a){const _0x4cd627=await computeFileHash(_0x552e8a[_0x5da821(0xd1)]),_0x1a75db=_0x11f15e[_0x5da821(0xe8)][_0x552e8a[_0x5da821(0xda)]];if(!_0x412c67&&_0x1a75db&&_0x1a75db[_0x5da821(0xcb)]===_0x4cd627){_0x26de8f['push']({'lockKey':_0x552e8a[_0x5da821(0xda)],'reason':_0x5da821(0xd6)});continue;}try{await uploadSingleFunction(_0xde2e73[_0x5da821(0xcf)],_0x552e8a,_0x11f15e,_0x105518);const _0x39608a=_0x11f15e[_0x5da821(0xe8)][_0x552e8a[_0x5da821(0xda)]];_0x346b0c[_0x5da821(0xb7)]({'lockKey':_0x552e8a['lockKey'],'remoteId':_0x39608a?.['remoteId']??0x0});}catch(_0x27d8c8){_0x4d2628[_0x5da821(0xb7)]({'lockKey':_0x552e8a[_0x5da821(0xda)],'error':_0x27d8c8 instanceof Error?_0x27d8c8[_0x5da821(0xaa)]:String(_0x27d8c8)});}}_0x11f15e[_0x5da821(0xbe)]=new Date()[_0x5da821(0xe3)](),await writeBffLockFile(_0x7091ec[_0x5da821(0xab)],_0x239a00),await waitForUploadedLockEntries(_0x7091ec[_0x5da821(0xab)],_0xde2e73['appCode'],_0x346b0c[_0x5da821(0xc7)](_0x2f6b01=>_0x2f6b01['lockKey']));let _0x445b61={'attempted':![],'cleared':![]};if(_0x346b0c[_0x5da821(0xa2)]>0x0)try{let _0x205219='';for(let _0x591fea=0x0;_0x591fea<CACHE_CLEAR_ATTEMPTS;_0x591fea+=0x1){_0x205219=await clearBffScriptCache(),_0x591fea<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x445b61={'attempted':!![],'cleared':!![],'message':_0x205219||_0x5da821(0xd3)};}catch(_0x1ad20f){_0x445b61={'attempted':!![],'cleared':![],'error':_0x1ad20f instanceof Error?_0x1ad20f[_0x5da821(0xaa)]:String(_0x1ad20f)};}const _0x235926=_0x4d2628[_0x5da821(0xa2)]===0x0&&(_0x445b61['attempted']?_0x445b61['cleared']:!![]),_0x1bb5c8=_0x445b61[_0x5da821(0xe7)]?_0x445b61[_0x5da821(0xc5)]?'runtime\x20cache\x20cleared':_0x5da821(0x9e):_0x5da821(0x9f);return{'ok':_0x235926,'data':{'uploaded':_0x346b0c,'skipped':_0x26de8f,'failed':_0x4d2628,'cacheClear':_0x445b61},'message':_0x5da821(0xc4)+_0x346b0c[_0x5da821(0xa2)]+'\x20uploaded,\x20'+_0x26de8f[_0x5da821(0xa2)]+_0x5da821(0xed)+_0x4d2628[_0x5da821(0xa2)]+'\x20failed,\x20'+_0x1bb5c8};}};async function getTargetFunctions(_0x132011,_0x183ac7){const _0x4dace1=a37_0x9f4024,_0xce966a=_0x183ac7[_0x4dace1(0xaf)]('type'),_0x245166=_0x183ac7[_0x4dace1(0xaf)]('name'),_0x5485f1=normalizeBffType(_0xce966a)??undefined;if(_0x245166&&!_0x5485f1)throw CliErrors[_0x4dace1(0xb8)](_0x4dace1(0xd2));const _0x5cb97c=await scanLocalBffFunctions(_0x132011,_0x5485f1);if(_0x245166){const _0x2c952d=_0x5cb97c[_0x4dace1(0xce)](_0x31face=>_0x31face['name']===_0x245166);if(_0x2c952d['length']===0x0)throw CliErrors['validation'](_0x4dace1(0xb5)+_0x5485f1+'/'+_0x245166);return _0x2c952d;}return _0x5cb97c;}async function buildHookMaps(_0x24c15c,_0x33cc9f,_0x54875e,_0x155b9b){const _0x19771e=a37_0x9f4024,_0x5d2e45=_0x54875e[_0x19771e(0xbb)](_0x5889e1=>_0x5889e1[_0x19771e(0xb6)]==='HOOK');if(!_0x5d2e45)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x2fc672=loadAliasMap(_0x33cc9f,undefined,resolveApiFilePath(_0x33cc9f,_0x24c15c)),_0x3c6cca=new Map(_0x2fc672[_0x19771e(0xc7)](_0x292acb=>[_0x292acb[_0x19771e(0xb3)],_0x292acb[_0x19771e(0xae)]]));for(const _0x35cfcd of Object[_0x19771e(0xe2)](_0x155b9b[_0x19771e(0xe8)])){_0x35cfcd[_0x19771e(0xb3)]&&_0x35cfcd[_0x19771e(0xae)]&&!_0x3c6cca['has'](_0x35cfcd['alias'])&&_0x3c6cca[_0x19771e(0xc8)](_0x35cfcd[_0x19771e(0xb3)],_0x35cfcd[_0x19771e(0xae)]);}const _0x5a1a6f=await listDatasets(_0x24c15c),_0x436b57=new Map(_0x5a1a6f[_0x19771e(0xc7)](_0x532571=>[_0x532571['code'],_0x532571]));return{'aliasToDatasetCode':_0x3c6cca,'datasetCodeToDataset':_0x436b57};}async function uploadSingleFunction(_0x2a7331,_0x5f8db,_0x1afd62,_0x1b6809){const _0x50d448=a37_0x9f4024,_0x10a458=await readFile(_0x5f8db[_0x50d448(0xd1)],'utf8'),_0x365f92=await computeFileHash(_0x5f8db[_0x50d448(0xd1)]),_0x5bdcb4=_0x1afd62['functions'][_0x5f8db[_0x50d448(0xda)]];if(_0x5bdcb4?.[_0x50d448(0xd8)]&&_0x5bdcb4[_0x50d448(0xba)]==null)throw CliErrors[_0x50d448(0xb8)](_0x5f8db[_0x50d448(0xda)]+_0x50d448(0xc3));let _0x3297d9=extractScriptDescription(_0x10a458);if(!_0x3297d9&&_0x5bdcb4?.['remoteId']){const _0x1520de=await getBffScriptInfo(_0x5bdcb4['remoteId']);_0x3297d9=_0x1520de[_0x50d448(0xe1)]||undefined;}const _0x661955={'appCode':_0x2a7331,'functionName':_0x5f8db[_0x50d448(0xa7)],'scriptType':_0x5f8db[_0x50d448(0xb6)],'scriptContent':_0x10a458};if(_0x5bdcb4?.[_0x50d448(0xd8)])_0x661955['id']=_0x5bdcb4['remoteId'];if(_0x5bdcb4?.[_0x50d448(0xba)]!=null)_0x661955['version']=_0x5bdcb4['version'];if(_0x3297d9)_0x661955[_0x50d448(0xe1)]=_0x3297d9;if(_0x5f8db[_0x50d448(0xb6)]===_0x50d448(0xb0)){const _0x38c214=_0x5f8db[_0x50d448(0xb3)];if(!_0x38c214||!_0x5f8db[_0x50d448(0xa5)]||!_0x5f8db[_0x50d448(0xb9)])throw CliErrors[_0x50d448(0xb8)]('Incomplete\x20HOOK\x20path:\x20'+_0x5f8db[_0x50d448(0xda)]);const _0x4cdc54=_0x1b6809[_0x50d448(0xcd)][_0x50d448(0xcc)](_0x38c214)??_0x5bdcb4?.[_0x50d448(0xae)]??_0x38c214,_0x593fd8=_0x1b6809[_0x50d448(0xb1)][_0x50d448(0xcc)](_0x4cdc54);if(!_0x593fd8)throw CliErrors[_0x50d448(0xb8)](_0x50d448(0xdc)+_0x38c214+'\x22.\x20'+('Run\x20`'+CLI_BIN_NAME+_0x50d448(0xc1)));_0x661955[_0x50d448(0xde)]=_0x593fd8['id'],_0x661955[_0x50d448(0xa5)]=_0x5f8db[_0x50d448(0xa5)],_0x661955[_0x50d448(0xb9)]=_0x5f8db[_0x50d448(0xb9)];}const _0x3970ee=await saveBffScript(_0x661955),_0x58e00a=_0x3970ee['id'],_0x1a11ed=_0x3970ee[_0x50d448(0xa8)]??await getBffScriptInfo(_0x58e00a),_0x5593db={'hash':_0x365f92,'remoteId':_0x58e00a,'version':_0x1a11ed[_0x50d448(0xba)]};if(_0x5f8db['type']===_0x50d448(0xb0)){const _0x34fc53=_0x5f8db['alias'],_0x3e076a=_0x1b6809[_0x50d448(0xcd)]['get'](_0x34fc53)??_0x5bdcb4?.['datasetCode']??_0x34fc53;_0x1b6809[_0x50d448(0xcd)][_0x50d448(0xee)](_0x34fc53)?_0x5593db['alias']=_0x34fc53:_0x5593db[_0x50d448(0xb3)]=_0x5bdcb4?.[_0x50d448(0xb3)],_0x5593db[_0x50d448(0xae)]=_0x3e076a,_0x5593db[_0x50d448(0xa5)]=_0x5f8db[_0x50d448(0xa5)],_0x5593db[_0x50d448(0xb9)]=_0x5f8db[_0x50d448(0xb9)];}_0x1afd62['functions'][_0x5f8db[_0x50d448(0xda)]]=_0x5593db;}function a37_0x3e26(_0x3b9b26,_0x4f4855){_0x3b9b26=_0x3b9b26-0x9d;const _0x4901e8=a37_0x4901();let _0x3e26b3=_0x4901e8[_0x3b9b26];return _0x3e26b3;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3dcf3e,_0x7d36c3,_0x39beb6){const _0x101298=a37_0x9f4024;if(_0x39beb6[_0x101298(0xa2)]===0x0)return;for(let _0x448298=0x0;_0x448298<LOCK_SETTLE_RETRY_COUNT;_0x448298+=0x1){const _0x1f2ddf=await readBffLockFile(_0x3dcf3e),_0xce794c=_0x1f2ddf?.['apps']?.[_0x7d36c3]?.[_0x101298(0xe8)]??{},_0x6c8a6b=_0x39beb6[_0x101298(0xa3)](_0x57ca16=>!!_0xce794c[_0x57ca16]?.[_0x101298(0xd8)]);if(_0x6c8a6b)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x101298(0xbd)+_0x39beb6[_0x101298(0xca)](',\x20')+'.');}
|
|
1
|
+
const a36_0xa46be9=a36_0x4418;(function(_0x39ee62,_0x2f8c1c){const _0x423d31=a36_0x4418,_0x281eaa=_0x39ee62();while(!![]){try{const _0x27169f=parseInt(_0x423d31(0xfe))/0x1*(-parseInt(_0x423d31(0x10c))/0x2)+-parseInt(_0x423d31(0xf5))/0x3+-parseInt(_0x423d31(0xdc))/0x4*(-parseInt(_0x423d31(0x10d))/0x5)+parseInt(_0x423d31(0x105))/0x6+-parseInt(_0x423d31(0xd9))/0x7+-parseInt(_0x423d31(0x11e))/0x8+parseInt(_0x423d31(0xe6))/0x9;if(_0x27169f===_0x2f8c1c)break;else _0x281eaa['push'](_0x281eaa['shift']());}catch(_0x37ecdf){_0x281eaa['push'](_0x281eaa['shift']());}}}(a36_0x576b,0xba4c0));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}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{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a36_0x4418(_0x20d6e0,_0x5b196d){_0x20d6e0=_0x20d6e0-0xce;const _0x576b35=a36_0x576b();let _0x441814=_0x576b35[_0x20d6e0];return _0x441814;}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';function a36_0x576b(){const _0x4223e7=['values','get','5744334bRNZjr',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Lock\x20scope\x20for\x20app\x20\x22','runtime\x20cache\x20cleared','apiDir','toISOString','functionNode','4IDEIGp','5esedRL','Force\x20push\x20ignoring\x20hash\x20protection','code','remoteId','every','script','lockKey','Incomplete\x20HOOK\x20path:\x20','str','/api/management/library/scripts/save','runtime\x20cache\x20not\x20needed','Push\x20local\x20BFF\x20scripts\x20to\x20remote','boolean','HOOK','attempted','Push\x20complete:\x20','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','5488848KjBrUP','push','filter','hash','create','bff','datasetCode','parse','\x20skipped,\x20','type','aliasToDatasetCode','join','8970213wfLTKV','would_push','COMMON','5705440awlvQM','POST','string','filePath','\x22\x20not\x20found\x20after\x20ensureLockScope.','\x22.\x20','version','name','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','\x20failed,\x20','12414960ayMFOh','Push\x20only\x20this\x20script\x20type','datasetId','Runtime\x20script\x20cache\x20cleared.','description','length','functions','set','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','lastSync','appCode','force','bool','apps','utf8','3019374bRpyDE','unchanged','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','some','operationType','lockFilePath','alias','validation','runtime\x20cache\x20clear\x20failed','13047GCktGh','datasetCodeToDataset','cleared','map','status'];a36_0x576b=function(){return _0x4223e7;};return a36_0x576b();}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':a36_0xa46be9(0xd2),'command':a36_0xa46be9(0xce),'description':a36_0xa46be9(0x118),'risk':'high-risk-write','flags':[{'name':a36_0xa46be9(0xd6),'type':a36_0xa46be9(0xde),'description':a36_0xa46be9(0xe7),'enum':[a36_0xa46be9(0xdb),'ENDPOINT',a36_0xa46be9(0x11a)]},{'name':a36_0xa46be9(0xe3),'type':'string','description':a36_0xa46be9(0xf7)},{'name':a36_0xa46be9(0xf1),'type':a36_0xa46be9(0x119),'description':a36_0xa46be9(0x10e)}],async 'dryRun'(_0x1aaa57){const _0x239b5a=a36_0xa46be9,_0x2b1602=loadBffProjectConfig(_0x1aaa57[_0x239b5a(0xf0)]),_0x4ecb33=await readBffLockFile(_0x2b1602[_0x239b5a(0xfa)]),{appLock:_0x3588a1}=ensureLockScope(_0x4ecb33??createEmptyBffLock(),_0x1aaa57['appCode'],_0x2b1602['scriptsRoot'],_0x239b5a(0xce)),_0x4e9c18=await getTargetFunctions(_0x2b1602,_0x1aaa57),_0xa005b9=_0x1aaa57[_0x239b5a(0xf2)](_0x239b5a(0xf1)),_0x286a0d=[];for(const _0x4e8d3a of _0x4e9c18){const _0x1c529b=await computeFileHash(_0x4e8d3a[_0x239b5a(0xdf)]),_0x1c2468=_0x3588a1[_0x239b5a(0xec)][_0x4e8d3a['lockKey']],_0x1068dc=!!_0x1c2468&&_0x1c2468['hash']===_0x1c529b;_0x286a0d[_0x239b5a(0xce)]({'lockKey':_0x4e8d3a['lockKey'],'filePath':_0x4e8d3a[_0x239b5a(0xdf)],'remoteId':_0x1c2468?.[_0x239b5a(0x110)]??null,'mode':_0x1c2468?.[_0x239b5a(0x110)]?'update':_0x239b5a(0xd1),'status':!_0xa005b9&&_0x1068dc?_0x239b5a(0xf6):_0x239b5a(0xda)});}return{'method':_0x239b5a(0xdd),'url':_0x239b5a(0x116),'body':{'appCode':_0x1aaa57[_0x239b5a(0xf0)],'force':_0xa005b9,'files':_0x286a0d,'cacheClearAtRuntime':_0x286a0d[_0x239b5a(0xf8)](_0x35e934=>_0x35e934[_0x239b5a(0x102)]===_0x239b5a(0xda)),'cacheClearAtRuntimeTimes':_0x286a0d[_0x239b5a(0xf8)](_0x3efdc1=>_0x3efdc1[_0x239b5a(0x102)]===_0x239b5a(0xda))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x286a0d['length']+_0x239b5a(0x11d)};},async 'execute'(_0x380745){const _0x5b83d1=a36_0xa46be9,_0x24969f=loadBffProjectConfig(_0x380745[_0x5b83d1(0xf0)]),_0x251fe9=await readBffLockFile(_0x24969f[_0x5b83d1(0xfa)]),{lockData:_0x32e0bd,appLock:_0x1db417}=ensureLockScope(_0x251fe9??createEmptyBffLock(),_0x380745[_0x5b83d1(0xf0)],_0x24969f['scriptsRoot'],_0x5b83d1(0xce)),_0x5291bb=await getTargetFunctions(_0x24969f,_0x380745);if(_0x5291bb[_0x5b83d1(0xeb)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x5d8666=_0x380745['bool'](_0x5b83d1(0xf1)),_0x36cd5f=JSON[_0x5b83d1(0xd4)](JSON['stringify'](_0x32e0bd)),_0x1e3a9d=_0x36cd5f[_0x5b83d1(0xf3)][_0x380745[_0x5b83d1(0xf0)]];if(!_0x1e3a9d)throw new Error(_0x5b83d1(0x107)+_0x380745[_0x5b83d1(0xf0)]+_0x5b83d1(0xe0));const _0x5d1541=await buildHookMaps(_0x380745[_0x5b83d1(0xf0)],_0x380745[_0x5b83d1(0x109)],_0x5291bb,_0x1e3a9d),_0x594230=[],_0x377c52=[],_0x10e745=[];for(const _0x5f51a9 of _0x5291bb){const _0x28d2b4=await computeFileHash(_0x5f51a9[_0x5b83d1(0xdf)]),_0xcdac03=_0x1e3a9d[_0x5b83d1(0xec)][_0x5f51a9[_0x5b83d1(0x113)]];if(!_0x5d8666&&_0xcdac03&&_0xcdac03[_0x5b83d1(0xd0)]===_0x28d2b4){_0x377c52[_0x5b83d1(0xce)]({'lockKey':_0x5f51a9[_0x5b83d1(0x113)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x380745[_0x5b83d1(0xf0)],_0x5f51a9,_0x1e3a9d,_0x5d1541);const _0x418a89=_0x1e3a9d['functions'][_0x5f51a9[_0x5b83d1(0x113)]];_0x594230[_0x5b83d1(0xce)]({'lockKey':_0x5f51a9[_0x5b83d1(0x113)],'remoteId':_0x418a89?.[_0x5b83d1(0x110)]??0x0});}catch(_0x1b2a68){_0x10e745[_0x5b83d1(0xce)]({'lockKey':_0x5f51a9[_0x5b83d1(0x113)],'error':_0x1b2a68 instanceof Error?_0x1b2a68['message']:String(_0x1b2a68)});}}_0x1e3a9d[_0x5b83d1(0xef)]=new Date()[_0x5b83d1(0x10a)](),await writeBffLockFile(_0x24969f[_0x5b83d1(0xfa)],_0x36cd5f),await waitForUploadedLockEntries(_0x24969f['lockFilePath'],_0x380745[_0x5b83d1(0xf0)],_0x594230['map'](_0x243358=>_0x243358[_0x5b83d1(0x113)]));let _0x1e0f1f={'attempted':![],'cleared':![]};if(_0x594230[_0x5b83d1(0xeb)]>0x0)try{let _0x5766f3='';for(let _0x27bdda=0x0;_0x27bdda<CACHE_CLEAR_ATTEMPTS;_0x27bdda+=0x1){_0x5766f3=await clearBffScriptCache(),_0x27bdda<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x1e0f1f={'attempted':!![],'cleared':!![],'message':_0x5766f3||_0x5b83d1(0xe9)};}catch(_0x35d251){_0x1e0f1f={'attempted':!![],'cleared':![],'error':_0x35d251 instanceof Error?_0x35d251['message']:String(_0x35d251)};}const _0x4e3517=_0x10e745[_0x5b83d1(0xeb)]===0x0&&(_0x1e0f1f['attempted']?_0x1e0f1f[_0x5b83d1(0x100)]:!![]),_0x483b50=_0x1e0f1f[_0x5b83d1(0x11b)]?_0x1e0f1f[_0x5b83d1(0x100)]?_0x5b83d1(0x108):_0x5b83d1(0xfd):_0x5b83d1(0x117);return{'ok':_0x4e3517,'data':{'uploaded':_0x594230,'skipped':_0x377c52,'failed':_0x10e745,'cacheClear':_0x1e0f1f},'message':_0x5b83d1(0x11c)+_0x594230[_0x5b83d1(0xeb)]+'\x20uploaded,\x20'+_0x377c52[_0x5b83d1(0xeb)]+_0x5b83d1(0xd5)+_0x10e745['length']+_0x5b83d1(0xe5)+_0x483b50};}};async function getTargetFunctions(_0x2c447b,_0x19f329){const _0x598b88=a36_0xa46be9,_0x97f4ea=_0x19f329[_0x598b88(0x115)](_0x598b88(0xd6)),_0x20eb79=_0x19f329['str'](_0x598b88(0xe3)),_0x718a0a=normalizeBffType(_0x97f4ea)??undefined;if(_0x20eb79&&!_0x718a0a)throw CliErrors[_0x598b88(0xfc)](_0x598b88(0xee));const _0x37cf4f=await scanLocalBffFunctions(_0x2c447b,_0x718a0a);if(_0x20eb79){const _0x50642b=_0x37cf4f[_0x598b88(0xcf)](_0x6f85c7=>_0x6f85c7[_0x598b88(0xe3)]===_0x20eb79);if(_0x50642b[_0x598b88(0xeb)]===0x0)throw CliErrors['validation']('Local\x20function\x20not\x20found:\x20'+_0x718a0a+'/'+_0x20eb79);return _0x50642b;}return _0x37cf4f;}async function buildHookMaps(_0x3f2e82,_0x57fffc,_0x531b9e,_0x27126b){const _0xe27ef6=a36_0xa46be9,_0x5c1325=_0x531b9e[_0xe27ef6(0xf8)](_0x457bbf=>_0x457bbf[_0xe27ef6(0xd6)]==='HOOK');if(!_0x5c1325)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x40a027=loadAliasMap(_0x57fffc,undefined,resolveApiFilePath(_0x57fffc,_0x3f2e82)),_0x20e715=new Map(_0x40a027[_0xe27ef6(0x101)](_0x2f59ac=>[_0x2f59ac[_0xe27ef6(0xfb)],_0x2f59ac[_0xe27ef6(0xd3)]]));for(const _0x3fb8c7 of Object[_0xe27ef6(0x103)](_0x27126b[_0xe27ef6(0xec)])){_0x3fb8c7[_0xe27ef6(0xfb)]&&_0x3fb8c7[_0xe27ef6(0xd3)]&&!_0x20e715['has'](_0x3fb8c7[_0xe27ef6(0xfb)])&&_0x20e715[_0xe27ef6(0xed)](_0x3fb8c7['alias'],_0x3fb8c7[_0xe27ef6(0xd3)]);}const _0x5a26ba=await listDatasets(_0x3f2e82),_0x241722=new Map(_0x5a26ba[_0xe27ef6(0x101)](_0x8dfbc9=>[_0x8dfbc9[_0xe27ef6(0x10f)],_0x8dfbc9]));return{'aliasToDatasetCode':_0x20e715,'datasetCodeToDataset':_0x241722};}async function uploadSingleFunction(_0x5fffa4,_0x18e352,_0x20be4f,_0x14502e){const _0x5092c0=a36_0xa46be9,_0x369631=await readFile(_0x18e352[_0x5092c0(0xdf)],_0x5092c0(0xf4)),_0x1ab81a=await computeFileHash(_0x18e352[_0x5092c0(0xdf)]),_0x28c4da=_0x20be4f[_0x5092c0(0xec)][_0x18e352[_0x5092c0(0x113)]];if(_0x28c4da?.[_0x5092c0(0x110)]&&_0x28c4da[_0x5092c0(0xe2)]==null)throw CliErrors[_0x5092c0(0xfc)](_0x18e352[_0x5092c0(0x113)]+_0x5092c0(0x106));let _0x4e36bf=extractScriptDescription(_0x369631);if(!_0x4e36bf&&_0x28c4da?.[_0x5092c0(0x110)]){const _0x39b496=await getBffScriptInfo(_0x28c4da[_0x5092c0(0x110)]);_0x4e36bf=_0x39b496[_0x5092c0(0xea)]||undefined;}const _0x50f357={'appCode':_0x5fffa4,'functionName':_0x18e352[_0x5092c0(0xe3)],'scriptType':_0x18e352['type'],'scriptContent':_0x369631};if(_0x28c4da?.[_0x5092c0(0x110)])_0x50f357['id']=_0x28c4da[_0x5092c0(0x110)];if(_0x28c4da?.[_0x5092c0(0xe2)]!=null)_0x50f357[_0x5092c0(0xe2)]=_0x28c4da[_0x5092c0(0xe2)];if(_0x4e36bf)_0x50f357['description']=_0x4e36bf;if(_0x18e352[_0x5092c0(0xd6)]===_0x5092c0(0x11a)){const _0x50ec18=_0x18e352[_0x5092c0(0xfb)];if(!_0x50ec18||!_0x18e352[_0x5092c0(0xf9)]||!_0x18e352['functionNode'])throw CliErrors['validation'](_0x5092c0(0x114)+_0x18e352[_0x5092c0(0x113)]);const _0x2a5c6b=_0x14502e[_0x5092c0(0xd7)][_0x5092c0(0x104)](_0x50ec18)??_0x28c4da?.[_0x5092c0(0xd3)]??_0x50ec18,_0x4db32f=_0x14502e[_0x5092c0(0xff)][_0x5092c0(0x104)](_0x2a5c6b);if(!_0x4db32f)throw CliErrors[_0x5092c0(0xfc)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x50ec18+_0x5092c0(0xe1)+('Run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x50f357[_0x5092c0(0xe8)]=_0x4db32f['id'],_0x50f357[_0x5092c0(0xf9)]=_0x18e352[_0x5092c0(0xf9)],_0x50f357['functionNode']=_0x18e352['functionNode'];}const _0x51f9b0=await saveBffScript(_0x50f357),_0x1aa1c7=_0x51f9b0['id'],_0x5797cd=_0x51f9b0[_0x5092c0(0x112)]??await getBffScriptInfo(_0x1aa1c7),_0x200f27={'hash':_0x1ab81a,'remoteId':_0x1aa1c7,'version':_0x5797cd[_0x5092c0(0xe2)]};if(_0x18e352[_0x5092c0(0xd6)]===_0x5092c0(0x11a)){const _0x57c298=_0x18e352['alias'],_0xd0c99=_0x14502e[_0x5092c0(0xd7)]['get'](_0x57c298)??_0x28c4da?.['datasetCode']??_0x57c298;_0x14502e[_0x5092c0(0xd7)]['has'](_0x57c298)?_0x200f27['alias']=_0x57c298:_0x200f27[_0x5092c0(0xfb)]=_0x28c4da?.[_0x5092c0(0xfb)],_0x200f27[_0x5092c0(0xd3)]=_0xd0c99,_0x200f27[_0x5092c0(0xf9)]=_0x18e352[_0x5092c0(0xf9)],_0x200f27[_0x5092c0(0x10b)]=_0x18e352[_0x5092c0(0x10b)];}_0x20be4f[_0x5092c0(0xec)][_0x18e352[_0x5092c0(0x113)]]=_0x200f27;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x324637,_0x301d45,_0x4a61aa){const _0x2d8074=a36_0xa46be9;if(_0x4a61aa[_0x2d8074(0xeb)]===0x0)return;for(let _0xce7a63=0x0;_0xce7a63<LOCK_SETTLE_RETRY_COUNT;_0xce7a63+=0x1){const _0x592d1f=await readBffLockFile(_0x324637),_0x4de42b=_0x592d1f?.[_0x2d8074(0xf3)]?.[_0x301d45]?.['functions']??{},_0x535a21=_0x4a61aa[_0x2d8074(0x111)](_0x394ef3=>!!_0x4de42b[_0x394ef3]?.[_0x2d8074(0x110)]);if(_0x535a21)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x2d8074(0xe4)+_0x4a61aa[_0x2d8074(0xd8)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x35db74=a37_0x2585;(function(_0x3d65c8,_0x20e235){const _0x3d854a=a37_0x2585,_0x6135f0=_0x3d65c8();while(!![]){try{const _0x99ff35=-parseInt(_0x3d854a(0x148))/0x1+parseInt(_0x3d854a(0x136))/0x2+parseInt(_0x3d854a(0x13e))/0x3*(-parseInt(_0x3d854a(0x146))/0x4)+-parseInt(_0x3d854a(0x14c))/0x5*(-parseInt(_0x3d854a(0x137))/0x6)+-parseInt(_0x3d854a(0x14f))/0x7+-parseInt(_0x3d854a(0x13b))/0x8*(-parseInt(_0x3d854a(0x14e))/0x9)+parseInt(_0x3d854a(0x13f))/0xa*(parseInt(_0x3d854a(0x14d))/0xb);if(_0x99ff35===_0x20e235)break;else _0x6135f0['push'](_0x6135f0['shift']());}catch(_0x3bbeee){_0x6135f0['push'](_0x6135f0['shift']());}}}(a37_0x2936,0x8385b));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,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a37_0x2936(){const _0x2f5302=['1413896ldXQBV','2547tKEWTl','1902166cIxuBz','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','push','All\x20BFF\x20scripts\x20are\x20in\x20sync.','remote','\x20remote-only','924524MdCpCS','18DVsYfX','apiDir','bool','scriptsRoot','8792XjYgsB','lockKey','functions','449457WMaJeA','60bnjbRD','bff','\x20added,\x20','filePath','status','\x20modified,\x20','read','12KriajB','appCode','508205ZQTvtQ','boolean','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','length','372700BWjLQN'];a37_0x2936=function(){return _0x2f5302;};return a37_0x2936();}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a37_0x2585(_0x2849e9,_0x406d1b){_0x2849e9=_0x2849e9-0x131;const _0x29364a=a37_0x2936();let _0x2585d6=_0x29364a[_0x2849e9];return _0x2585d6;}export const bffStatus={'service':a37_0x35db74(0x140),'command':'status','description':a37_0x35db74(0x14a),'risk':a37_0x35db74(0x145),'flags':[{'name':a37_0x35db74(0x134),'type':a37_0x35db74(0x149),'description':a37_0x35db74(0x131)}],async 'execute'(_0x319cda){const _0x3c2959=a37_0x35db74,_0x1f1631=loadBffProjectConfig(_0x319cda['appCode']),_0x3e11b1=await readBffLockFile(_0x1f1631['lockFilePath']),{appLock:_0x1ed3da}=ensureLockScope(_0x3e11b1??createEmptyBffLock(),_0x319cda[_0x3c2959(0x147)],_0x1f1631[_0x3c2959(0x13a)],_0x3c2959(0x143)),_0x2dc850=await scanLocalBffFunctions(_0x1f1631),_0x15cf81=[],_0x2f3257=[],_0x490dc8=[];for(const _0x7e9290 of _0x2dc850){const _0x3b43c7=await computeFileHash(_0x7e9290[_0x3c2959(0x142)]),_0x58c253=_0x1ed3da['functions'][_0x7e9290['lockKey']];if(!_0x58c253)_0x15cf81[_0x3c2959(0x132)](_0x7e9290[_0x3c2959(0x13c)]);else _0x58c253['hash']!==_0x3b43c7?_0x2f3257['push'](_0x7e9290[_0x3c2959(0x13c)]):_0x490dc8[_0x3c2959(0x132)](_0x7e9290[_0x3c2959(0x13c)]);}const _0x1d8209=[];if(_0x319cda[_0x3c2959(0x139)]('remote')){const _0x26e283=loadAliasMap(_0x319cda[_0x3c2959(0x138)],undefined,resolveApiFilePath(_0x319cda[_0x3c2959(0x138)],_0x319cda[_0x3c2959(0x147)])),_0x1d9c69=new Map(_0x26e283['map'](_0x670ff4=>[_0x670ff4['datasetCode'],_0x670ff4['alias']])),[_0x4069fd,_0x3d93a3]=await Promise['all']([listBffScripts(_0x319cda[_0x3c2959(0x147)]),getBffScriptStatistics(_0x319cda[_0x3c2959(0x147)])]),_0x5a7a02=createHookLocationMap(_0x3d93a3),_0x398201=new Set(_0x2dc850['map'](_0x278d48=>_0x278d48[_0x3c2959(0x13c)]));for(const _0x103c3d of _0x4069fd){const _0x13528c=resolveRemoteScriptTarget(_0x1f1631,_0x103c3d,_0x5a7a02,_0x1ed3da[_0x3c2959(0x13d)],_0x1d9c69);_0x13528c&&!_0x398201['has'](_0x13528c[_0x3c2959(0x13c)])&&_0x1d8209['push'](_0x13528c[_0x3c2959(0x13c)]);}}const _0x6f8265=_0x15cf81[_0x3c2959(0x14b)]===0x0&&_0x2f3257[_0x3c2959(0x14b)]===0x0&&_0x1d8209['length']===0x0;return{'ok':!![],'data':{'added':_0x15cf81,'modified':_0x2f3257,'unchanged':_0x490dc8,'remoteOnly':_0x1d8209},'message':_0x6f8265?_0x3c2959(0x133):_0x15cf81[_0x3c2959(0x14b)]+_0x3c2959(0x141)+_0x2f3257[_0x3c2959(0x14b)]+_0x3c2959(0x144)+_0x490dc8[_0x3c2959(0x14b)]+'\x20unchanged'+(_0x1d8209[_0x3c2959(0x14b)]>0x0?',\x20'+_0x1d8209[_0x3c2959(0x14b)]+_0x3c2959(0x135):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x1960c7=a38_0x3534;(function(_0x4d6bab,_0x15810e){const _0x5584be=a38_0x3534,_0x1115c5=_0x4d6bab();while(!![]){try{const _0x1e3444=parseInt(_0x5584be(0x1da))/0x1*(-parseInt(_0x5584be(0x1e9))/0x2)+-parseInt(_0x5584be(0x1df))/0x3+parseInt(_0x5584be(0x1ea))/0x4+-parseInt(_0x5584be(0x1ec))/0x5+parseInt(_0x5584be(0x1e4))/0x6*(parseInt(_0x5584be(0x1dc))/0x7)+-parseInt(_0x5584be(0x1ef))/0x8*(-parseInt(_0x5584be(0x1de))/0x9)+parseInt(_0x5584be(0x1e7))/0xa;if(_0x1e3444===_0x15810e)break;else _0x1115c5['push'](_0x1115c5['shift']());}catch(_0x592b03){_0x1115c5['push'](_0x1115c5['shift']());}}}(a38_0x3024,0x41e03));function a38_0x3534(_0x543c5a,_0x3a1900){_0x543c5a=_0x543c5a-0x1d7;const _0x3024e9=a38_0x3024();let _0x353427=_0x3024e9[_0x543c5a];return _0x353427;}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a38_0x1960c7(0x1dd),'description':a38_0x1960c7(0x1f0),'risk':a38_0x1960c7(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1be428){const _0x171c96=a38_0x1960c7;logger['setLogPath'](process[_0x171c96(0x1f1)]()),logger['info'](_0x171c96(0x1e6),_0x171c96(0x1e3));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x593f0f,RABETBASE_SKILL_SOURCE:_0x5d58e2,runNpxSkillsAddGlobal:_0x4450f0}=await import(_0x171c96(0x1db)),_0x1420d6=_0x1be428[_0x171c96(0x1e2)]?_0x171c96(0x1ee):_0x171c96(0x1e8);console[_0x171c96(0x1e0)](_0x171c96(0x1eb)+_0x593f0f+_0x171c96(0x1e5));const _0x28ba53=_0x4450f0(process[_0x171c96(0x1f1)](),_0x5d58e2,{'stdio':_0x1420d6});if(_0x28ba53[_0x171c96(0x1d9)])console[_0x171c96(0x1e0)](_0x171c96(0x1ed));else{if(_0x28ba53['ok'])console[_0x171c96(0x1e0)]('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors['apiError']('npx\x20skills\x20add\x20failed:\x20'+(_0x28ba53[_0x171c96(0x1e1)]||_0x171c96(0x1d7)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20'+_0x593f0f);}return{'ok':!![]};}}];function a38_0x3024(){const _0x77b301=['38eXxoLz','38580RNYLhJ','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','1037870BCbsWn','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','pipe','21832vCzfWp','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','cwd','unknown','write','skipped','18199IkkalU','../../skills/npx-skills-add.js','21oSpNPw','install','1557yCSZig','220596xLVuls','log','error','nonInteractive','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','23682gKrtwE',')...','cli-skill-install','4031110EBwrQw','inherit'];a38_0x3024=function(){return _0x77b301;};return a38_0x3024();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x52cc40=a40_0x4e58;(function(_0x22b824,_0x1fa9db){const _0x3d746f=a40_0x4e58,_0x470703=_0x22b824();while(!![]){try{const _0xcf6806=parseInt(_0x3d746f(0x1b8))/0x1+-parseInt(_0x3d746f(0x1ca))/0x2+parseInt(_0x3d746f(0x1bd))/0x3*(parseInt(_0x3d746f(0x1c5))/0x4)+-parseInt(_0x3d746f(0x1e8))/0x5+-parseInt(_0x3d746f(0x1c4))/0x6*(parseInt(_0x3d746f(0x1d0))/0x7)+-parseInt(_0x3d746f(0x1dd))/0x8+parseInt(_0x3d746f(0x1bb))/0x9;if(_0xcf6806===_0x1fa9db)break;else _0x470703['push'](_0x470703['shift']());}catch(_0x4c6b38){_0x470703['push'](_0x470703['shift']());}}}(a40_0x49e0,0x3bc69));import a40_0x391a2c from'chalk';import a40_0x4f9e35 from'ora';import a40_0xfa7069 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 _0x24f7ad=a40_0x4e58;return GIT_COMMIT!==_0x24f7ad(0x1f5)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function a40_0x4e58(_0x6c96ba,_0x4665d7){_0x6c96ba=_0x6c96ba-0x1b5;const _0x49e03f=a40_0x49e0();let _0x4e5860=_0x49e03f[_0x6c96ba];return _0x4e5860;}function detectPackageManager(){const _0x1358b7=a40_0x4e58,_0x205320=process[_0x1358b7(0x1f9)][_0x1358b7(0x1f6)]();if(_0x205320[_0x1358b7(0x1cc)](_0x1358b7(0x1d5)))return'bun';return _0x1358b7(0x1ef);}const updateFlags=[{'name':a40_0x52cc40(0x1c8),'type':a40_0x52cc40(0x1b7),'description':a40_0x52cc40(0x1e4),'default':![]},{'name':'version','type':a40_0x52cc40(0x1ba),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a40_0x52cc40(0x1bf),'type':a40_0x52cc40(0x1b7),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a40_0x52cc40(0x1d9),'type':a40_0x52cc40(0x1b7),'description':a40_0x52cc40(0x1d4),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x1d498c){const _0x3e7e5e=a40_0x52cc40;return _0x1d498c['str']('version')[_0x3e7e5e(0x1ea)]();}function shouldSkipCliSkill(_0x5da0ce){const _0x4847b1=a40_0x52cc40;return _0x5da0ce[_0x4847b1(0x1c9)](_0x4847b1(0x1bf))||_0x5da0ce['flag'](_0x4847b1(0x1d9))===![];}async function validateUpdateFlags(_0x373d31){const _0x51d334=a40_0x52cc40,_0x13b5ed=_0x373d31[_0x51d334(0x1c9)](_0x51d334(0x1c8)),_0x268e5c=getRequestedVersion(_0x373d31);if(_0x13b5ed&&_0x268e5c)throw CliErrors['validation'](_0x51d334(0x1d6),_0x51d334(0x1f1));if(_0x268e5c&&!a40_0xfa7069[_0x51d334(0x1d7)](_0x268e5c))throw CliErrors[_0x51d334(0x1e6)](_0x51d334(0x1c6)+_0x268e5c,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x21dea0=a40_0x52cc40;try{const _0x29de27=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x21dea0(0x1da),{'signal':AbortSignal[_0x21dea0(0x1f2)](0x2710)});if(!_0x29de27['ok'])return null;const _0x2496dc=await _0x29de27[_0x21dea0(0x1e9)]();if(!_0x2496dc||typeof _0x2496dc!=='object')return null;return Object[_0x21dea0(0x1cf)](Object[_0x21dea0(0x1de)](_0x2496dc)[_0x21dea0(0x1b9)](([,_0x3d61df])=>typeof _0x3d61df==='string'&&_0x3d61df[_0x21dea0(0x1ea)]()[_0x21dea0(0x1eb)]>0x0)[_0x21dea0(0x1cb)](([_0x2013c8,_0x17a49d])=>[_0x2013c8,String(_0x17a49d)[_0x21dea0(0x1ea)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x101895){const _0x3adae4=await fetchNpmDistTags();return _0x3adae4?.[_0x101895]??null;}async function fetchLatestVersion(){const _0x1879dc=a40_0x52cc40;return fetchNpmDistTagVersion(_0x1879dc(0x1c2));}async function resolveTargetVersion(_0x2c35ac){const _0x4c6465=a40_0x52cc40,_0x4c9e26=getRequestedVersion(_0x2c35ac);if(_0x4c9e26)return{'version':_0x4c9e26,'source':_0x4c6465(0x1e3)};if(_0x2c35ac['bool'](_0x4c6465(0x1c8))){const _0xda27ce=await fetchNpmDistTagVersion(_0x4c6465(0x1c8));if(!_0xda27ce)return null;return{'version':_0xda27ce,'source':_0x4c6465(0x1c8)};}const _0x4fdd37=await fetchLatestVersion();if(!_0x4fdd37)return null;return{'version':_0x4fdd37,'source':'latest'};}function shouldInstallTarget(_0x1d1fc5,_0x1c3df0){const _0x2d8ff3=a40_0x52cc40;if(_0x1c3df0[_0x2d8ff3(0x1bc)]===_0x2d8ff3(0x1e3)||_0x1c3df0[_0x2d8ff3(0x1bc)]===_0x2d8ff3(0x1c8))return!a40_0xfa7069['eq'](_0x1d1fc5,_0x1c3df0[_0x2d8ff3(0x1e3)]);return a40_0xfa7069['lt'](_0x1d1fc5,_0x1c3df0['version']);}function getInstallPlanLabel(_0x361a81,_0x22d2d9){const _0x3939a9=a40_0x52cc40;switch(_0x22d2d9[_0x3939a9(0x1bc)]){case _0x3939a9(0x1c8):return _0x3939a9(0x1ff)+a40_0x391a2c[_0x3939a9(0x1c1)](_0x361a81)+_0x3939a9(0x1dc)+a40_0x391a2c['green'](_0x22d2d9[_0x3939a9(0x1e3)]);case _0x3939a9(0x1e3):return _0x3939a9(0x1c7)+a40_0x391a2c[_0x3939a9(0x1c1)](_0x361a81)+'\x20→\x20'+a40_0x391a2c[_0x3939a9(0x1fc)](_0x22d2d9[_0x3939a9(0x1e3)]);case _0x3939a9(0x1c2):default:return _0x3939a9(0x1f0)+a40_0x391a2c[_0x3939a9(0x1c1)](_0x361a81)+'\x20→\x20'+a40_0x391a2c[_0x3939a9(0x1fc)](_0x22d2d9[_0x3939a9(0x1e3)]);}}async function installCliSkill(_0x2e7da6){const _0x3c89f6=a40_0x52cc40;console['log'](a40_0x391a2c[_0x3c89f6(0x1d3)](_0x3c89f6(0x1fd)));const _0x45d123=runNpxSkillsAddGlobal(process[_0x3c89f6(0x1d1)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x2e7da6?_0x3c89f6(0x1f4):'inherit'});if(_0x45d123['skipped']){console[_0x3c89f6(0x1e1)](a40_0x391a2c[_0x3c89f6(0x1d3)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x45d123['ok']){console[_0x3c89f6(0x1e1)](a40_0x391a2c[_0x3c89f6(0x1d3)]('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.'));return;}console[_0x3c89f6(0x1c0)](a40_0x391a2c[_0x3c89f6(0x1c1)](_0x3c89f6(0x1f8)+(_0x45d123['error']||_0x3c89f6(0x1f5)))),console[_0x3c89f6(0x1e1)](a40_0x391a2c[_0x3c89f6(0x1d3)](_0x3c89f6(0x1f7)+CLI_BIN_NAME+_0x3c89f6(0x1f3)));}async function execute(_0x568a17){const _0x17d392=a40_0x52cc40;await validateUpdateFlags(_0x568a17);const _0x410aa9=getCurrentVersion();console[_0x17d392(0x1e1)]('Current\x20version:\x20'+_0x410aa9);const _0x2ae482=a40_0x4f9e35(_0x17d392(0x1d8))[_0x17d392(0x1cd)](),_0x1b55fc=await resolveTargetVersion(_0x568a17);if(!_0x1b55fc){const _0x3dc0ee=_0x568a17[_0x17d392(0x1c9)](_0x17d392(0x1c8))?_0x17d392(0x202):_0x17d392(0x1ec);return _0x2ae482[_0x17d392(0x1fe)](_0x3dc0ee),console[_0x17d392(0x1e1)](a40_0x391a2c[_0x17d392(0x1d3)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x17d392(0x1d2))),{'ok':![],'message':_0x3dc0ee};}const _0x5af793=a40_0xfa7069['valid'](VERSION),_0x450d01=a40_0xfa7069[_0x17d392(0x1d7)](_0x1b55fc[_0x17d392(0x1e3)]);if(!_0x5af793||!_0x450d01)return _0x2ae482['fail'](_0x17d392(0x1b5)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x5af793,_0x1b55fc)){const _0x19ae43=_0x1b55fc[_0x17d392(0x1bc)]==='version'?_0x17d392(0x1b6)+_0x1b55fc[_0x17d392(0x1e3)]+')':_0x17d392(0x1ed)+_0x1b55fc[_0x17d392(0x1e3)]+')';return _0x2ae482[_0x17d392(0x1df)](_0x19ae43),shouldSkipCliSkill(_0x568a17)?console['log'](a40_0x391a2c[_0x17d392(0x1d3)](_0x17d392(0x1e0))):await installCliSkill(_0x568a17[_0x17d392(0x1ce)]),{'ok':!![]};}_0x2ae482[_0x17d392(0x1fb)](getInstallPlanLabel(_0x410aa9,_0x1b55fc));const _0x1a4187=detectPackageManager(),_0x54437e=_0x1a4187===_0x17d392(0x1ef)?resolveNpmBin(_0x17d392(0x1ef)):_0x1a4187,_0x274a24=a40_0x4f9e35(_0x17d392(0x200)+_0x1a4187+_0x17d392(0x1be))[_0x17d392(0x1cd)]();try{return await execa(_0x54437e,['install','-g',NPM_PACKAGE_NAME+'@'+_0x1b55fc[_0x17d392(0x1e3)]],{'stdio':_0x17d392(0x1f4)}),_0x274a24[_0x17d392(0x1df)](_0x17d392(0x1db)+_0x1b55fc[_0x17d392(0x1e3)]),console[_0x17d392(0x1e1)](a40_0x391a2c['gray']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x568a17)?console[_0x17d392(0x1e1)](a40_0x391a2c[_0x17d392(0x1d3)](_0x17d392(0x1e0))):await installCliSkill(_0x568a17[_0x17d392(0x1ce)]),{'ok':!![]};}catch(_0x488f41){return _0x274a24[_0x17d392(0x1fe)]('Update\x20failed'),console[_0x17d392(0x1c3)](a40_0x391a2c[_0x17d392(0x1ee)]('\x20\x20'+_0x488f41['message'])),console['log'](a40_0x391a2c[_0x17d392(0x1d3)]('\x20\x20Try\x20manually:\x20'+_0x1a4187+_0x17d392(0x201)+NPM_PACKAGE_NAME+'@'+_0x1b55fc[_0x17d392(0x1e3)])),{'ok':![],'message':_0x488f41[_0x17d392(0x1e7)]};}}function a40_0x49e0(){const _0x518520=['beta','bool','854324MytNqM','map','includes','start','nonInteractive','fromEntries','5782SKCZLK','cwd','@latest','gray','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','bun','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','valid','Checking\x20for\x20updates...','skills','/dist-tags','Updated\x20to\x20v','\x20→\x20','1266712ufmgbI','entries','succeed','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','log','write','version','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','run','validation','message','30250CuxaPz','json','trim','length','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Already\x20up\x20to\x20date\x20(v','red','npm','Update\x20available:\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','timeout','\x20cli-skill\x20install','pipe','unknown','toLowerCase','\x20\x20Run\x20manually:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','execPath','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','info','green','Checking\x20CLI\x20Built-in\x20Skill...','fail','Beta\x20version:\x20','Updating\x20via\x20','\x20install\x20-g\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Version\x20comparison\x20failed','Already\x20on\x20requested\x20version\x20(v','boolean','379307WQaWXG','filter','string','2951451BCIqJF','source','717uBhMIq','...','no-skills','warn','yellow','latest','error','732iTdZGT','3848hKaVfo','Invalid\x20version:\x20','Requested\x20version:\x20'];a40_0x49e0=function(){return _0x518520;};return a40_0x49e0();}export const updateDefinition={'service':'update','command':a40_0x52cc40(0x1e5),'description':a40_0x52cc40(0x1fa),'risk':a40_0x52cc40(0x1e2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a39_0x5e80da=a39_0x1998;(function(_0x288495,_0x454783){const _0x56d203=a39_0x1998,_0x26f46d=_0x288495();while(!![]){try{const _0x264a54=-parseInt(_0x56d203(0x14b))/0x1*(-parseInt(_0x56d203(0x11e))/0x2)+parseInt(_0x56d203(0x11d))/0x3+-parseInt(_0x56d203(0x133))/0x4+-parseInt(_0x56d203(0x10f))/0x5+-parseInt(_0x56d203(0x118))/0x6+parseInt(_0x56d203(0x130))/0x7+-parseInt(_0x56d203(0x140))/0x8*(-parseInt(_0x56d203(0x147))/0x9);if(_0x264a54===_0x454783)break;else _0x26f46d['push'](_0x26f46d['shift']());}catch(_0x41732a){_0x26f46d['push'](_0x26f46d['shift']());}}}(a39_0x4846,0xe2316));import a39_0x20bacb from'chalk';import a39_0x1a6576 from'ora';import a39_0x4546d8 from'semver';import{execa}from'execa';function a39_0x4846(){const _0x75fbc6=['info','no-skills','11PZuPYf','boolean','\x20\x20Try\x20manually:\x20','valid','green','execPath','Install\x20a\x20specific\x20CLI\x20version','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','Update\x20failed','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','timeout','red','beta','Requested\x20version:\x20','trim','source','\x20cli-skill\x20install','string','update','8783430OSZaFz','entries','pipe','bool','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','...','filter','str','bun','1588818oSnVbu','slice','Current\x20version:\x20','skipped','log','4376670jlSDLl','188308JhNwmr','message','write','unknown','succeed','gray','Checking\x20CLI\x20Built-in\x20Skill...','Already\x20up\x20to\x20date\x20(v','validation','Update\x20available:\x20','npm','latest','yellow','length','Updated\x20to\x20v','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','run','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','7675710RbfOhD','map','flag','2766948nXHSUr','Version\x20comparison\x20failed','skills','Checking\x20for\x20updates...','fail','version','object','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','\x20install\x20-g\x20','Updating\x20via\x20','inherit','warn','@latest','16mrpGLL','toLowerCase','\x20→\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','cwd','nonInteractive','218691RwYyTl','https://registry.npmjs.org/-/package/'];a39_0x4846=function(){return _0x75fbc6;};return a39_0x4846();}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 _0xab1658=a39_0x1998;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xab1658(0x119)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x85eebb=a39_0x1998,_0x313730=process[_0x85eebb(0x150)][_0x85eebb(0x141)]();if(_0x313730['includes'](_0x85eebb(0x117)))return _0x85eebb(0x117);return _0x85eebb(0x128);}const updateFlags=[{'name':'beta','type':a39_0x5e80da(0x14c),'description':a39_0x5e80da(0x143),'default':![]},{'name':a39_0x5e80da(0x138),'type':'string','description':a39_0x5e80da(0x151)},{'name':a39_0x5e80da(0x14a),'type':'boolean','description':a39_0x5e80da(0x154),'default':![]},{'name':a39_0x5e80da(0x135),'type':a39_0x5e80da(0x14c),'description':a39_0x5e80da(0x12f),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x15f0bb){const _0xb7c21f=a39_0x5e80da;return _0x15f0bb[_0xb7c21f(0x116)](_0xb7c21f(0x138))[_0xb7c21f(0x159)]();}function shouldSkipCliSkill(_0x3c3ddb){const _0x41c27b=a39_0x5e80da;return _0x3c3ddb[_0x41c27b(0x112)](_0x41c27b(0x14a))||_0x3c3ddb[_0x41c27b(0x132)](_0x41c27b(0x135))===![];}async function validateUpdateFlags(_0x301a87){const _0x3d83f8=a39_0x5e80da,_0x5bbbfa=_0x301a87[_0x3d83f8(0x112)](_0x3d83f8(0x157)),_0x2c63fc=getRequestedVersion(_0x301a87);if(_0x5bbbfa&&_0x2c63fc)throw CliErrors[_0x3d83f8(0x126)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x2c63fc&&!a39_0x4546d8[_0x3d83f8(0x14e)](_0x2c63fc))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x2c63fc,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x2a3896=a39_0x5e80da;try{const _0x503b32=await fetch(_0x2a3896(0x148)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x2a3896(0x155)](0x2710)});if(!_0x503b32['ok'])return null;const _0x5dcb77=await _0x503b32['json']();if(!_0x5dcb77||typeof _0x5dcb77!==_0x2a3896(0x139))return null;return Object['fromEntries'](Object[_0x2a3896(0x110)](_0x5dcb77)[_0x2a3896(0x115)](([,_0x5f06c0])=>typeof _0x5f06c0===_0x2a3896(0x10d)&&_0x5f06c0['trim']()[_0x2a3896(0x12b)]>0x0)[_0x2a3896(0x131)](([_0x196a56,_0x1140fb])=>[_0x196a56,String(_0x1140fb)['trim']()]));}catch{return null;}}function a39_0x1998(_0x20af0e,_0x3de042){_0x20af0e=_0x20af0e-0x10b;const _0x48465c=a39_0x4846();let _0x19985b=_0x48465c[_0x20af0e];return _0x19985b;}async function fetchNpmDistTagVersion(_0x2b11c3){const _0x3fe0ae=await fetchNpmDistTags();return _0x3fe0ae?.[_0x2b11c3]??null;}async function fetchLatestVersion(){const _0x4d87fd=a39_0x5e80da;return fetchNpmDistTagVersion(_0x4d87fd(0x129));}async function resolveTargetVersion(_0x352f9a){const _0x1c4945=a39_0x5e80da,_0x1d9136=getRequestedVersion(_0x352f9a);if(_0x1d9136)return{'version':_0x1d9136,'source':_0x1c4945(0x138)};if(_0x352f9a['bool'](_0x1c4945(0x157))){const _0x3cd89f=await fetchNpmDistTagVersion(_0x1c4945(0x157));if(!_0x3cd89f)return null;return{'version':_0x3cd89f,'source':_0x1c4945(0x157)};}const _0x4805d2=await fetchLatestVersion();if(!_0x4805d2)return null;return{'version':_0x4805d2,'source':_0x1c4945(0x129)};}function shouldInstallTarget(_0x373b27,_0x288dc3){const _0x54a726=a39_0x5e80da;if(_0x288dc3['source']===_0x54a726(0x138)||_0x288dc3[_0x54a726(0x10b)]===_0x54a726(0x157))return!a39_0x4546d8['eq'](_0x373b27,_0x288dc3['version']);return a39_0x4546d8['lt'](_0x373b27,_0x288dc3['version']);}function getInstallPlanLabel(_0x1d2102,_0x5a7dbe){const _0x30a5b2=a39_0x5e80da;switch(_0x5a7dbe[_0x30a5b2(0x10b)]){case _0x30a5b2(0x157):return'Beta\x20version:\x20'+a39_0x20bacb[_0x30a5b2(0x12a)](_0x1d2102)+_0x30a5b2(0x142)+a39_0x20bacb['green'](_0x5a7dbe['version']);case _0x30a5b2(0x138):return _0x30a5b2(0x158)+a39_0x20bacb[_0x30a5b2(0x12a)](_0x1d2102)+_0x30a5b2(0x142)+a39_0x20bacb[_0x30a5b2(0x14f)](_0x5a7dbe['version']);case _0x30a5b2(0x129):default:return _0x30a5b2(0x127)+a39_0x20bacb[_0x30a5b2(0x12a)](_0x1d2102)+'\x20→\x20'+a39_0x20bacb[_0x30a5b2(0x14f)](_0x5a7dbe['version']);}}async function installCliSkill(_0x23ed2f){const _0x5e446c=a39_0x5e80da;console['log'](a39_0x20bacb[_0x5e446c(0x123)](_0x5e446c(0x124)));const _0x14f7df=runNpxSkillsAddGlobal(process[_0x5e446c(0x145)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x23ed2f?_0x5e446c(0x111):_0x5e446c(0x13d)});if(_0x14f7df[_0x5e446c(0x11b)]){console[_0x5e446c(0x11c)](a39_0x20bacb[_0x5e446c(0x123)](_0x5e446c(0x152)));return;}if(_0x14f7df['ok']){console[_0x5e446c(0x11c)](a39_0x20bacb['gray']('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.'));return;}console[_0x5e446c(0x13e)](a39_0x20bacb[_0x5e446c(0x12a)](_0x5e446c(0x144)+(_0x14f7df['error']||_0x5e446c(0x121)))),console['log'](a39_0x20bacb[_0x5e446c(0x123)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x5e446c(0x10c)));}async function execute(_0x4b4ce9){const _0x5267b1=a39_0x5e80da;await validateUpdateFlags(_0x4b4ce9);const _0x8c0980=getCurrentVersion();console[_0x5267b1(0x11c)](_0x5267b1(0x11a)+_0x8c0980);const _0x1ab517=a39_0x1a6576(_0x5267b1(0x136))['start'](),_0x5671f1=await resolveTargetVersion(_0x4b4ce9);if(!_0x5671f1){const _0x4f4fb6=_0x4b4ce9['bool'](_0x5267b1(0x157))?_0x5267b1(0x13a):_0x5267b1(0x113);return _0x1ab517['fail'](_0x4f4fb6),console[_0x5267b1(0x11c)](a39_0x20bacb[_0x5267b1(0x123)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x5267b1(0x13f))),{'ok':![],'message':_0x4f4fb6};}const _0x1e60de=a39_0x4546d8[_0x5267b1(0x14e)](VERSION),_0x103de3=a39_0x4546d8[_0x5267b1(0x14e)](_0x5671f1[_0x5267b1(0x138)]);if(!_0x1e60de||!_0x103de3)return _0x1ab517[_0x5267b1(0x137)](_0x5267b1(0x134)),{'ok':![],'message':_0x5267b1(0x134)};if(!shouldInstallTarget(_0x1e60de,_0x5671f1)){const _0x2af3df=_0x5671f1['source']===_0x5267b1(0x138)?'Already\x20on\x20requested\x20version\x20(v'+_0x5671f1[_0x5267b1(0x138)]+')':_0x5267b1(0x125)+_0x5671f1[_0x5267b1(0x138)]+')';return _0x1ab517[_0x5267b1(0x122)](_0x2af3df),shouldSkipCliSkill(_0x4b4ce9)?console['log'](a39_0x20bacb[_0x5267b1(0x123)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x4b4ce9[_0x5267b1(0x146)]),{'ok':!![]};}_0x1ab517[_0x5267b1(0x149)](getInstallPlanLabel(_0x8c0980,_0x5671f1));const _0x4052e1=detectPackageManager(),_0x5e5a71=_0x4052e1==='npm'?resolveNpmBin(_0x5267b1(0x128)):_0x4052e1,_0x5d2099=a39_0x1a6576(_0x5267b1(0x13c)+_0x4052e1+_0x5267b1(0x114))['start']();try{return await execa(_0x5e5a71,['install','-g',NPM_PACKAGE_NAME+'@'+_0x5671f1['version']],{'stdio':_0x5267b1(0x111)}),_0x5d2099[_0x5267b1(0x122)](_0x5267b1(0x12c)+_0x5671f1[_0x5267b1(0x138)]),console['log'](a39_0x20bacb['gray']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x4b4ce9)?console[_0x5267b1(0x11c)](a39_0x20bacb['gray']('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x4b4ce9[_0x5267b1(0x146)]),{'ok':!![]};}catch(_0x3da037){return _0x5d2099[_0x5267b1(0x137)](_0x5267b1(0x153)),console['error'](a39_0x20bacb[_0x5267b1(0x156)]('\x20\x20'+_0x3da037[_0x5267b1(0x11f)])),console[_0x5267b1(0x11c)](a39_0x20bacb['gray'](_0x5267b1(0x14d)+_0x4052e1+_0x5267b1(0x13b)+NPM_PACKAGE_NAME+'@'+_0x5671f1[_0x5267b1(0x138)])),{'ok':![],'message':_0x3da037['message']};}}export const updateDefinition={'service':a39_0x5e80da(0x10e),'command':a39_0x5e80da(0x12e),'description':a39_0x5e80da(0x12d),'risk':a39_0x5e80da(0x120),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4bcd52,_0x3c9d29){const _0xde0fd=a40_0x4fb3,_0x1474ec=_0x4bcd52();while(!![]){try{const _0x1ee7a6=-parseInt(_0xde0fd(0x1a3))/0x1*(-parseInt(_0xde0fd(0x19e))/0x2)+parseInt(_0xde0fd(0x1a0))/0x3+-parseInt(_0xde0fd(0x19d))/0x4+-parseInt(_0xde0fd(0x1a1))/0x5+parseInt(_0xde0fd(0x19f))/0x6*(-parseInt(_0xde0fd(0x19b))/0x7)+parseInt(_0xde0fd(0x19c))/0x8+-parseInt(_0xde0fd(0x1a2))/0x9*(-parseInt(_0xde0fd(0x1a4))/0xa);if(_0x1ee7a6===_0x3c9d29)break;else _0x1474ec['push'](_0x1474ec['shift']());}catch(_0x4d23a7){_0x1474ec['push'](_0x1474ec['shift']());}}}(a40_0xf4f4,0x1a5a6));function a40_0x4fb3(_0x34cd6b,_0x1b2b83){_0x34cd6b=_0x34cd6b-0x19b;const _0xf4f4ef=a40_0xf4f4();let _0x4fb3b3=_0xf4f4ef[_0x34cd6b];return _0x4fb3b3;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a40_0xf4f4(){const _0x213d65=['1SMhEPs','2110rTZcOe','7imjyHz','188832pLiqLz','758184BjQbiS','250702XyyBzP','669126GdiPSK','471159RGyxXR','1069605GlTINi','13518cdqnbD'];a40_0xf4f4=function(){return _0x213d65;};return a40_0xf4f4();}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a41_0x21c806=a41_0x1301;(function(_0x4ef967,_0x5c509b){const _0x29a21b=a41_0x1301,_0x21ef0f=_0x4ef967();while(!![]){try{const _0xaf9a5e=parseInt(_0x29a21b(0x1ae))/0x1*(parseInt(_0x29a21b(0x1af))/0x2)+-parseInt(_0x29a21b(0x1b7))/0x3+parseInt(_0x29a21b(0x1ac))/0x4+-parseInt(_0x29a21b(0x1a1))/0x5+-parseInt(_0x29a21b(0x1a5))/0x6*(parseInt(_0x29a21b(0x1b8))/0x7)+-parseInt(_0x29a21b(0x1a7))/0x8*(-parseInt(_0x29a21b(0x1aa))/0x9)+-parseInt(_0x29a21b(0x1a2))/0xa*(-parseInt(_0x29a21b(0x1b1))/0xb);if(_0xaf9a5e===_0x5c509b)break;else _0x21ef0f['push'](_0x21ef0f['shift']());}catch(_0x3a5040){_0x21ef0f['push'](_0x21ef0f['shift']());}}}(a41_0x48b8,0x294a2));function a41_0x1301(_0x5af485,_0x125814){_0x5af485=_0x5af485-0x1a0;const _0x48b814=a41_0x48b8();let _0x130156=_0x48b814[_0x5af485];return _0x130156;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a41_0x48b8(){const _0x3f1f65=['codegen','read','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','101931qbIPwL','196ezfrGs','bool','530620cVUJkd','2080020ayWXTK','code','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','65862WLvHuG','boolean','30712nwojUK','operation','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','27jatozt','name','57932GCoqsn','tableName','6983oaQobC','50qvvwHU','str','22jWhPFO','appCode','skip-imports'];a41_0x48b8=function(){return _0x3f1f65;};return a41_0x48b8();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a41_0x21c806(0x1b4),'command':'sdk','description':a41_0x21c806(0x1a4),'risk':a41_0x21c806(0x1b5),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a41_0x21c806(0x1a9)},{'name':'operation','type':'string','required':!![],'description':a41_0x21c806(0x1b6)},{'name':a41_0x21c806(0x1b3),'type':a41_0x21c806(0x1a6),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x4b3c4c){const _0x87d726=a41_0x21c806,{dataset:_0x794790,operation:_0x2c1bab}=await getOperationDetail(_0x4b3c4c[_0x87d726(0x1b2)],_0x4b3c4c['str'](_0x87d726(0x1a3)),_0x4b3c4c[_0x87d726(0x1b0)](_0x87d726(0x1a8))),_0x87f1ff=generateSdkCode(_0x794790,_0x2c1bab,{'includeImports':!_0x4b3c4c[_0x87d726(0x1a0)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x794790[_0x87d726(0x1ab)],'code':_0x794790[_0x87d726(0x1a3)],'tableName':_0x794790[_0x87d726(0x1ad)]},'operation':_0x4b3c4c['str']('operation'),'code':_0x87f1ff}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x5374a7=a42_0xcfb0;(function(_0x326b60,_0x431f91){const _0x17341a=a42_0xcfb0,_0x1335ff=_0x326b60();while(!![]){try{const _0x4d5ab2=-parseInt(_0x17341a(0x1c8))/0x1+parseInt(_0x17341a(0x1c1))/0x2*(parseInt(_0x17341a(0x1b7))/0x3)+-parseInt(_0x17341a(0x1c5))/0x4*(parseInt(_0x17341a(0x1be))/0x5)+-parseInt(_0x17341a(0x1ba))/0x6+parseInt(_0x17341a(0x1cb))/0x7+parseInt(_0x17341a(0x1cc))/0x8+parseInt(_0x17341a(0x1bd))/0x9;if(_0x4d5ab2===_0x431f91)break;else _0x1335ff['push'](_0x1335ff['shift']());}catch(_0x4ffb76){_0x1335ff['push'](_0x1335ff['shift']());}}}(a42_0x2e84,0x26585));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a42_0xcfb0(_0x55ee3f,_0x207a8d){_0x55ee3f=_0x55ee3f-0x1b7;const _0x2e849c=a42_0x2e84();let _0xcfb0a0=_0x2e849c[_0x55ee3f];return _0xcfb0a0;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a42_0x2e84(){const _0x39e65c=['bool','2QNZvrZ','string','target','sqlName','268012GHiDiA','sql','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','179146aydEHo','appCode','boolean','2171057YwAFJU','540992qwZYkD','807273Nteuau','sdk','no-imports','1026612eLYrzL','codegen','read','553068eAvBco','15wdyCtJ','Omit\x20import\x20statements\x20from\x20generated\x20code'];a42_0x2e84=function(){return _0x39e65c;};return a42_0x2e84();}export const codegenSql={'service':a42_0x5374a7(0x1bb),'command':a42_0x5374a7(0x1c6),'description':a42_0x5374a7(0x1c7),'risk':a42_0x5374a7(0x1bc),'flags':[SQLCODE_FLAG,{'name':a42_0x5374a7(0x1c3),'type':a42_0x5374a7(0x1c2),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':'sdk','enum':['sdk','bff']},{'name':a42_0x5374a7(0x1b9),'type':a42_0x5374a7(0x1ca),'description':a42_0x5374a7(0x1bf)}],async 'execute'(_0x41efbc){const _0x209ab0=a42_0x5374a7,_0xf6cf1c=await getSqlQueryInfo(_0x41efbc[_0x209ab0(0x1c9)],_0x41efbc['str']('sqlcode')),_0x431807=_0x41efbc['str']('target')||_0x209ab0(0x1b8),_0x2bb061=generateSqlCodeTemplate(_0xf6cf1c,{'target':_0x431807,'includeImports':!_0x41efbc[_0x209ab0(0x1c0)](_0x209ab0(0x1b9))});return{'ok':!![],'data':{'sqlCode':_0xf6cf1c['sqlCode'],'sqlName':_0xf6cf1c[_0x209ab0(0x1c4)],'target':_0x431807,'code':_0x2bb061}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a7b4c,_0x24f73d){const _0x11e0ea=a43_0x373c,_0x5a67ae=_0x4a7b4c();while(!![]){try{const _0x4f40c2=parseInt(_0x11e0ea(0xd7))/0x1*(-parseInt(_0x11e0ea(0xcf))/0x2)+parseInt(_0x11e0ea(0xe4))/0x3*(parseInt(_0x11e0ea(0xea))/0x4)+-parseInt(_0x11e0ea(0xd1))/0x5+-parseInt(_0x11e0ea(0xda))/0x6*(-parseInt(_0x11e0ea(0xc9))/0x7)+-parseInt(_0x11e0ea(0xe6))/0x8*(parseInt(_0x11e0ea(0xe1))/0x9)+parseInt(_0x11e0ea(0xbe))/0xa*(parseInt(_0x11e0ea(0xec))/0xb)+parseInt(_0x11e0ea(0xe3))/0xc;if(_0x4f40c2===_0x24f73d)break;else _0x5a67ae['push'](_0x5a67ae['shift']());}catch(_0x4139d3){_0x5a67ae['push'](_0x5a67ae['shift']());}}}(a43_0x2f14,0xf3c5d));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 a43_0x2f14(){const _0x3ef34e=['4191543BoSRKY','apps','15226284SHHNIg','5837559LHlAlW','defaultApp','24YiCPaQ','bool','App\x20\x22','appcode','4xnpJdN','length','165SZiIdv','342170NTzcBZ','\x20<name>\x20[--global]','inherit','\x20Default\x20app\x20changed\x20to\x20\x22','\x20<name>\x20--appcode\x20<code>','projectConfig','args','\x22\x20not\x20found.','both','global','Use\x20global\x20config\x20scope','36631GQUoGy','\x20Set\x20as\x20default\x20app.','globalConfig','project','object','validation','2HNUqTB','\x20app\x20\x22','7468710rMBFzu','Missing\x20app\x20name.','str','\x22\x20still\x20defined\x20in\x20','\x22\x20(appcode:\x20','Added','1240993zZidcT','keys','\x20config.','1608GVqlRY','boolean','\x20Note:\x20app\x20\x22','Usage:\x20','Updated','Removed\x20app\x20\x22','\x20<name>'];a43_0x2f14=function(){return _0x3ef34e;};return a43_0x2f14();}export function buildAppAddFlags(){const _0x257671=a43_0x373c;return[{'name':_0x257671(0xe9),'type':'string','description':'App\x20code','required':!![]},{'name':_0x257671(0xc7),'type':'boolean','description':_0x257671(0xc8),'default':![]},...getAppProfileFlagDefs()];}function a43_0x373c(_0xad0a0d,_0x468199){_0xad0a0d=_0xad0a0d-0xbe;const _0x2f147c=a43_0x2f14();let _0x373c47=_0x2f147c[_0xad0a0d];return _0x373c47;}export function buildAppRemoveFlags(){const _0x182978=a43_0x373c;return[{'name':_0x182978(0xc7),'type':_0x182978(0xdb),'description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x26a861,_0x7fd2ae){const _0x54b63b=a43_0x373c,_0x2ea94b=_0x26a861[_0x54b63b(0xc4)][0x0]?.['trim']();if(!_0x2ea94b)throw CliErrors[_0x54b63b(0xce)](_0x54b63b(0xd2),_0x54b63b(0xdd)+CLI_BIN_NAME+'\x20'+_0x7fd2ae+_0x54b63b(0xe0));}export async function runAppAdd(_0x1cfe57,_0x15bfa9){const _0x40449d=a43_0x373c,_0x47faea=_0x1cfe57[_0x40449d(0xc4)][0x0]?.['trim']();if(!_0x47faea)throw CliErrors[_0x40449d(0xce)](_0x40449d(0xd2),_0x40449d(0xdd)+CLI_BIN_NAME+'\x20'+_0x15bfa9+_0x40449d(0xc2));const _0x575407=_0x1cfe57[_0x40449d(0xd3)]('appcode');if(!_0x575407)throw CliErrors['flagMissing'](_0x40449d(0xe9),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x15bfa9+_0x40449d(0xc2));const _0x211959={'global':_0x1cfe57[_0x40449d(0xe7)](_0x40449d(0xc7))},_0x482206=readConfig(_0x211959);if(!_0x482206[_0x40449d(0xe2)])_0x482206['apps']={};const _0x698921={'appcode':_0x575407,...collectAppProfileOverrides(_0x56455c=>_0x1cfe57[_0x40449d(0xd3)](_0x56455c))},_0x1b35e3=_0x482206['apps'],_0x51c966=!!_0x1b35e3[_0x47faea];_0x1b35e3[_0x47faea]=_0x698921;if(!_0x482206['defaultApp'])_0x482206['defaultApp']=_0x47faea;writeConfig(_0x482206,_0x211959);const _0x11e51e=!_0x51c966&&_0x482206['defaultApp']===_0x47faea?_0x40449d(0xca):'',_0x8a6b97=(_0x51c966?_0x40449d(0xde):_0x40449d(0xd6))+_0x40449d(0xd0)+_0x47faea+_0x40449d(0xd5)+_0x575407+')'+scopeLabel(_0x211959)+'.'+_0x11e51e;return{'ok':!![],'message':_0x8a6b97};}export async function runAppRemove(_0x1bcd95,_0x24abd2){const _0x54a271=a43_0x373c,_0x2e6f8e=_0x1bcd95[_0x54a271(0xc4)][0x0]?.['trim']();if(!_0x2e6f8e)throw CliErrors['validation'](_0x54a271(0xd2),_0x54a271(0xdd)+CLI_BIN_NAME+'\x20'+_0x24abd2+_0x54a271(0xbf));const _0x20b825=_0x1bcd95[_0x54a271(0xe7)](_0x54a271(0xc7)),{config:_0x5acd17,layers:_0xc552ab}=readRawConfigWithLayers(),_0x4d6f56=_0x5acd17[_0x54a271(0xe2)]??{};if(!_0x4d6f56[_0x2e6f8e])throw CliErrors[_0x54a271(0xce)](_0x54a271(0xe8)+_0x2e6f8e+_0x54a271(0xc5));const _0x3c4c42=_0xc552ab[_0x54a271(0xcb)][_0x54a271(0xe2)]&&typeof _0xc552ab['globalConfig'][_0x54a271(0xe2)]===_0x54a271(0xcd)?_0xc552ab['globalConfig'][_0x54a271(0xe2)]:{},_0x15b636=_0xc552ab[_0x54a271(0xc3)]['apps']&&typeof _0xc552ab['projectConfig'][_0x54a271(0xe2)]===_0x54a271(0xcd)?_0xc552ab['projectConfig'][_0x54a271(0xe2)]:{},_0x4989f9=appDefinedIn(_0x2e6f8e,_0x3c4c42,_0x15b636,_0xc552ab[_0x54a271(0xc3)][_0x54a271(0xc0)]===![]),_0x3b3399=resolveAppScopeForWrite(_0x2e6f8e,_0x20b825,_0xc552ab),_0x2dd0a7={'global':_0x3b3399===_0x54a271(0xc7)},_0x550b46=readConfig(_0x2dd0a7),_0x36e397=_0x550b46[_0x54a271(0xe2)];if(!_0x36e397||!_0x36e397[_0x2e6f8e])throw CliErrors[_0x54a271(0xce)](_0x54a271(0xe8)+_0x2e6f8e+_0x54a271(0xc5));delete _0x36e397[_0x2e6f8e];let _0x47f04f='';if(_0x550b46[_0x54a271(0xe5)]===_0x2e6f8e){const _0x31bb5c=Object['keys'](_0x36e397);_0x550b46[_0x54a271(0xe5)]=_0x31bb5c[_0x54a271(0xeb)]>0x0?_0x31bb5c[0x0]:undefined,_0x550b46[_0x54a271(0xe5)]?_0x47f04f=_0x54a271(0xc1)+_0x550b46[_0x54a271(0xe5)]+'\x22.':delete _0x550b46[_0x54a271(0xe5)];}Object[_0x54a271(0xd8)](_0x36e397)['length']===0x0&&(delete _0x550b46[_0x54a271(0xe2)],delete _0x550b46[_0x54a271(0xe5)]);writeConfig(_0x550b46,_0x2dd0a7);const _0xf99f01=_0x4989f9===_0x54a271(0xc6)?_0x54a271(0xdc)+_0x2e6f8e+_0x54a271(0xd4)+(_0x3b3399===_0x54a271(0xcc)?_0x54a271(0xc7):'project')+_0x54a271(0xd9):'';return{'ok':!![],'message':_0x54a271(0xdf)+_0x2e6f8e+'\x22'+scopeLabel(_0x2dd0a7)+'.'+_0x47f04f+_0xf99f01};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a18a4,_0x2c2a4e){const _0x1f7449=a44_0x230b,_0x1169b6=_0x2a18a4();while(!![]){try{const _0x51a48f=parseInt(_0x1f7449(0x16d))/0x1+-parseInt(_0x1f7449(0x162))/0x2*(parseInt(_0x1f7449(0x16a))/0x3)+parseInt(_0x1f7449(0x161))/0x4*(-parseInt(_0x1f7449(0x17f))/0x5)+parseInt(_0x1f7449(0x169))/0x6+parseInt(_0x1f7449(0x170))/0x7*(-parseInt(_0x1f7449(0x180))/0x8)+parseInt(_0x1f7449(0x15e))/0x9+-parseInt(_0x1f7449(0x16c))/0xa*(parseInt(_0x1f7449(0x17b))/0xb);if(_0x51a48f===_0x2c2a4e)break;else _0x1169b6['push'](_0x1169b6['shift']());}catch(_0x12b7b9){_0x1169b6['push'](_0x1169b6['shift']());}}}(a44_0xf749,0x67b88));function a44_0xf749(){const _0x466d21=['cyan','无法获取远程应用列表,请手动输入。','\x20\x20(','\x0a无法获取远程应用列表,请手动输入。','4806090yteKEs','appName','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','24008jWjyld','10VoCTGB','message','正在获取可用应用列表...','skip','length','App\x20Code:','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','4474728adhdpH','83217fkVtWy','trim','136540atKpkw','776247pwGJUq','find','gray','1128302TNvqRc','Invalid\x20App\x20Code','map','custom','获取到\x20','includes','请输入\x20App\x20Code:','appCode','manual','\x0a未找到可用应用。','✎\x20自定义输入\x20appcode','330BQFhAv','(跳过,稍后配置)','yellow','未找到可用应用。','365bUSnJs','32prxvHa'];a44_0xf749=function(){return _0x466d21;};return a44_0xf749();}import{input,checkbox,select}from'@inquirer/prompts';import a44_0x5f3146 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 _0x1b5a3c=a44_0x230b,_0x5a0546=await input({'message':_0x1b5a3c(0x176),'validate':_0x5d5fa9=>{const _0x4db07c=_0x1b5a3c,_0xb6588b=validateAppcode(_0x5d5fa9[_0x4db07c(0x16b)]());return _0xb6588b['valid']||_0xb6588b[_0x4db07c(0x163)]||_0x4db07c(0x171);}});return _0x5a0546['trim']();}export async function promptAppSelection(_0x354654){const _0xe65608=a44_0x230b,_0x1ac901=[{'name':a44_0x5f3146[_0xe65608(0x17d)](_0xe65608(0x17a)),'value':-0x1},..._0x354654[_0xe65608(0x172)]((_0x5416e0,_0xfe97cf)=>({'name':_0x5416e0['appName']+'\x20\x20'+a44_0x5f3146['gray']('('+_0x5416e0[_0xe65608(0x177)]+')'),'value':_0xfe97cf}))],_0x3b3578=await checkbox({'message':_0xe65608(0x174)+a44_0x5f3146[_0xe65608(0x181)](_0x354654[_0xe65608(0x166)])+_0xe65608(0x168),'choices':_0x1ac901,'loop':![]});if(_0x3b3578[_0xe65608(0x175)](-0x1))return _0xe65608(0x173);if(_0x3b3578['length']===0x0)return'custom';return _0x3b3578['map'](_0x1f51ac=>_0x354654[_0x1f51ac]);}export async function promptSingleAppSelection(_0x48627f){const _0x58152e=a44_0x230b,_0x344bb9=[{'name':a44_0x5f3146['gray'](_0x58152e(0x160)),'value':'skip'},{'name':a44_0x5f3146['yellow'](_0x58152e(0x17a)),'value':_0x58152e(0x173)},..._0x48627f[_0x58152e(0x172)](_0xceb58d=>({'name':_0xceb58d[_0x58152e(0x15f)]+'\x20\x20'+a44_0x5f3146['gray']('('+_0xceb58d[_0x58152e(0x177)]+')'),'value':_0xceb58d[_0x58152e(0x177)]}))],_0x251ddf=await select({'message':'请选择要绑定的应用:','choices':_0x344bb9});if(_0x251ddf==='skip')return'skip';if(_0x251ddf==='custom')return _0x58152e(0x173);return _0x48627f[_0x58152e(0x16e)](_0x3fd2c4=>_0x3fd2c4['appCode']===_0x251ddf);}export async function selectSingleAppcode(_0x3cff63){const _0x476c7b=a44_0x230b;if(!_0x3cff63)return writeCliSideChannelLine(a44_0x5f3146[_0x476c7b(0x16f)]('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine(_0x476c7b(0x164));let _0x15bb3f;try{_0x15bb3f=await withActiveCookie(_0x3cff63,()=>listRemoteApps());}catch(_0x3de2d9){writeCliSideChannelLine(a44_0x5f3146[_0x476c7b(0x17d)](_0x476c7b(0x15b)));if(_0x3de2d9 instanceof Error)writeCliSideChannelLine(a44_0x5f3146[_0x476c7b(0x16f)](_0x476c7b(0x15c)+_0x3de2d9[_0x476c7b(0x163)]+')'));return _fallbackOrSkip();}if(_0x15bb3f[_0x476c7b(0x166)]===0x0)return writeCliSideChannelLine(a44_0x5f3146['yellow'](_0x476c7b(0x17e))),_fallbackOrSkip();const _0x2601b7=await promptSingleAppSelection(_0x15bb3f);if(_0x2601b7===_0x476c7b(0x165))return'';if(_0x2601b7===_0x476c7b(0x173))return promptCustomAppcode();return _0x2601b7['appCode'];}function a44_0x230b(_0x500819,_0x12f61e){_0x500819=_0x500819-0x15b;const _0xf749df=a44_0xf749();let _0x230b0c=_0xf749df[_0x500819];return _0x230b0c;}export async function selectMultipleApps(_0x448a9f){const _0x55b88d=a44_0x230b;writeCliSideChannelLine(_0x55b88d(0x164));let _0x1b09dd;try{_0x1b09dd=await withActiveCookie(_0x448a9f,()=>listRemoteApps());}catch(_0x172919){writeCliSideChannelLine(_0x55b88d(0x15d));if(_0x172919 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x172919[_0x55b88d(0x163)]+')');return'custom';}if(_0x1b09dd['length']===0x0)return writeCliSideChannelLine(_0x55b88d(0x179)),_0x55b88d(0x173);return promptAppSelection(_0x1b09dd);}async function _fallbackOrSkip(){const _0x1cae1f=a44_0x230b,_0x2256c9=await select({'message':_0x1cae1f(0x167),'choices':[{'name':a44_0x5f3146[_0x1cae1f(0x16f)](_0x1cae1f(0x17c)),'value':'skip'},{'name':a44_0x5f3146['yellow']('✎\x20手动输入'),'value':_0x1cae1f(0x178)}]});if(_0x2256c9==='skip')return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x54cf90=a45_0x3415;(function(_0x535630,_0x412dfe){const _0x117130=a45_0x3415,_0x30ec00=_0x535630();while(!![]){try{const _0x268610=-parseInt(_0x117130(0x1cb))/0x1*(-parseInt(_0x117130(0x1b6))/0x2)+parseInt(_0x117130(0x1b0))/0x3+parseInt(_0x117130(0x1bb))/0x4+-parseInt(_0x117130(0x1c2))/0x5*(parseInt(_0x117130(0x1c9))/0x6)+-parseInt(_0x117130(0x1c8))/0x7*(parseInt(_0x117130(0x1be))/0x8)+parseInt(_0x117130(0x1b4))/0x9+-parseInt(_0x117130(0x1ca))/0xa;if(_0x268610===_0x412dfe)break;else _0x30ec00['push'](_0x30ec00['shift']());}catch(_0x3a4dba){_0x30ec00['push'](_0x30ec00['shift']());}}}(a45_0x4450,0x7964b));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a45_0x3415(_0x36bc8a,_0x4dc860){_0x36bc8a=_0x36bc8a-0x1ad;const _0x445032=a45_0x4450();let _0x3415ee=_0x445032[_0x36bc8a];return _0x3415ee;}const TERMINAL_STATUSES=new Set([a45_0x54cf90(0x1bc),a45_0x54cf90(0x1cc)]),NON_TERMINAL_STATUSES=new Set([a45_0x54cf90(0x1b3),'PROCESSING']);export function normalizeAsyncTask(_0x49e605){const _0x26c4c3=a45_0x54cf90,_0x4bfdf1=typeof _0x49e605?.[_0x26c4c3(0x1c1)]===_0x26c4c3(0x1cd)?_0x49e605['taskId']['trim']():'';if(!_0x4bfdf1)throw CliErrors[_0x26c4c3(0x1c5)](_0x26c4c3(0x1c7));const _0x3d54ec=typeof _0x49e605[_0x26c4c3(0x1b8)]===_0x26c4c3(0x1cd)?_0x49e605[_0x26c4c3(0x1b8)]['trim']()[_0x26c4c3(0x1c0)]():'';if(!_0x3d54ec)throw CliErrors[_0x26c4c3(0x1c5)](_0x26c4c3(0x1b5)+_0x4bfdf1+_0x26c4c3(0x1b7));return{'taskId':_0x4bfdf1,'status':_0x3d54ec,'errorMessage':typeof _0x49e605['errorMessage']===_0x26c4c3(0x1cd)&&_0x49e605[_0x26c4c3(0x1ae)][_0x26c4c3(0x1c3)]()?_0x49e605['errorMessage'][_0x26c4c3(0x1c3)]():null,'isTerminal':TERMINAL_STATUSES[_0x26c4c3(0x1ad)](_0x3d54ec),'knownStatus':TERMINAL_STATUSES[_0x26c4c3(0x1ad)](_0x3d54ec)||NON_TERMINAL_STATUSES[_0x26c4c3(0x1ad)](_0x3d54ec)};}export function buildAsyncTaskStatusCommand(_0x1c9bb0,_0xf53638){const _0x4e2652=a45_0x54cf90;return CLI_BIN_NAME+_0x4e2652(0x1b2)+quoteShellArg(_0x1c9bb0)+_0x4e2652(0x1bd)+quoteShellArg(_0xf53638)+_0x4e2652(0x1c4);}export function asyncTaskMessage(_0x3cedb9){const _0x3f9820=a45_0x54cf90;switch(_0x3cedb9['status']){case _0x3f9820(0x1b3):return'Task\x20'+_0x3cedb9['taskId']+'\x20is\x20pending.';case _0x3f9820(0x1bf):return'Task\x20'+_0x3cedb9[_0x3f9820(0x1c1)]+'\x20is\x20processing.';case _0x3f9820(0x1bc):return'Task\x20'+_0x3cedb9[_0x3f9820(0x1c1)]+_0x3f9820(0x1c6);case'FAILED':return _0x3cedb9['errorMessage']?_0x3f9820(0x1af)+_0x3cedb9['taskId']+_0x3f9820(0x1b1)+_0x3cedb9[_0x3f9820(0x1ae)]:_0x3f9820(0x1af)+_0x3cedb9[_0x3f9820(0x1c1)]+'\x20failed.';default:return _0x3f9820(0x1af)+_0x3cedb9[_0x3f9820(0x1c1)]+'\x20returned\x20unknown\x20status\x20'+_0x3cedb9[_0x3f9820(0x1b8)]+'.';}}function quoteShellArg(_0x4c144d){const _0x4473b2=a45_0x54cf90;return'\x27'+_0x4c144d[_0x4473b2(0x1b9)](/'/g,_0x4473b2(0x1ba))+'\x27';}function a45_0x4450(){const _0x2146b6=['\x27\x5c\x27\x27','1462532ixjVeO','SUCCESS','\x20--appcode\x20','3896mxlpWN','PROCESSING','toUpperCase','taskId','240mUKNQB','trim','\x20--format\x20compress','apiError','\x20completed\x20successfully.','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','6419SrSMAr','15222kqkJOx','8846780irkYwt','305569zGIHbf','FAILED','string','has','errorMessage','Task\x20','2611347RatHAL','\x20failed:\x20','\x20task\x20status\x20--task-id\x20','PENDING','3677481HanDVQ','Async\x20task\x20','2ZXjSuh','\x20response\x20did\x20not\x20contain\x20a\x20status.','status','replace'];a45_0x4450=function(){return _0x2146b6;};return a45_0x4450();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a46_0x182c(_0x462f82,_0x5336a6){_0x462f82=_0x462f82-0xf1;var _0x125847=a46_0x1258();var _0x182cb2=_0x125847[_0x462f82];return _0x182cb2;}function a46_0x1258(){var _0x24551c=['924848EbTCwk','352376fkhpdQ','3GyjkVx','method','3813834rorYCn','279eiiWtH','954938DzutLN','4011512hMtIPa','7cIFAxy','3158785RMeHYP','28010ECYWCx','defineProperties','description'];a46_0x1258=function(){return _0x24551c;};return a46_0x1258();}(function(_0x53996a,_0x147221){var _0x1d91ed=a46_0x182c,_0x4f3a6f=_0x53996a();while(!![]){try{var _0x46be92=parseInt(_0x1d91ed(0xf5))/0x1+-parseInt(_0x1d91ed(0xfc))/0x2*(-parseInt(_0x1d91ed(0xf1))/0x3)+-parseInt(_0x1d91ed(0xf6))/0x4+-parseInt(_0x1d91ed(0xf8))/0x5+parseInt(_0x1d91ed(0xf3))/0x6*(parseInt(_0x1d91ed(0xf7))/0x7)+parseInt(_0x1d91ed(0xfd))/0x8+parseInt(_0x1d91ed(0xf4))/0x9*(parseInt(_0x1d91ed(0xf9))/0xa);if(_0x46be92===_0x147221)break;else _0x4f3a6f['push'](_0x4f3a6f['shift']());}catch(_0xa68705){_0x4f3a6f['push'](_0x4f3a6f['shift']());}}}(a46_0x1258,0x8617c));export function asDryRunResult(_0x33f071,_0x3d4c2f){var _0x23ab4c=a46_0x182c;return Object[_0x23ab4c(0xfa)](_0x33f071,{'method':{'value':_0x3d4c2f[_0x23ab4c(0xf2)],'enumerable':![]},'url':{'value':_0x3d4c2f['url'],'enumerable':![]},..._0x3d4c2f[_0x23ab4c(0xfb)]?{'description':{'value':_0x3d4c2f[_0x23ab4c(0xfb)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x3ade13=a47_0x15ee;(function(_0x462805,_0x326163){const _0x5be6d5=a47_0x15ee,_0x311d79=_0x462805();while(!![]){try{const _0x447615=parseInt(_0x5be6d5(0x17e))/0x1+-parseInt(_0x5be6d5(0x17b))/0x2*(parseInt(_0x5be6d5(0x177))/0x3)+parseInt(_0x5be6d5(0x173))/0x4+parseInt(_0x5be6d5(0x182))/0x5*(-parseInt(_0x5be6d5(0x178))/0x6)+-parseInt(_0x5be6d5(0x174))/0x7*(-parseInt(_0x5be6d5(0x172))/0x8)+-parseInt(_0x5be6d5(0x186))/0x9*(parseInt(_0x5be6d5(0x181))/0xa)+-parseInt(_0x5be6d5(0x180))/0xb*(parseInt(_0x5be6d5(0x17a))/0xc);if(_0x447615===_0x326163)break;else _0x311d79['push'](_0x311d79['shift']());}catch(_0x4d7d81){_0x311d79['push'](_0x311d79['shift']());}}}(a47_0x54aa,0xa7b33));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a47_0x3ade13(0x18a)};export const CODE_FLAG={'name':a47_0x3ade13(0x185),'type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};function a47_0x15ee(_0x494b5d,_0x34254d){_0x494b5d=_0x494b5d-0x172;const _0x54aa84=a47_0x54aa();let _0x15eec3=_0x54aa84[_0x494b5d];return _0x15eec3;}export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x3ade13(0x176),'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'};export const SQLCODE_FLAG={'name':a47_0x3ade13(0x17c),'type':a47_0x3ade13(0x184),'required':!![],'description':a47_0x3ade13(0x187),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x3ade13(0x188)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x3ade13(0x17f),'type':a47_0x3ade13(0x184),'required':![],'description':a47_0x3ade13(0x179)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x3ade13(0x189)};function a47_0x54aa(){const _0xaffb7f=['2094hrhFuy','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','12uzymbw','1313490PMPpRE','sqlcode','number','906397VzdWpL','appcode','12136289ceyQSs','1138190LqjiKl','4105hHyDOz','dbtype','string','code','45IMFvoq','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','App\x20code\x20(e.g.\x20app-xxxxx)','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','1554744EQJsye','4920448TaCauu','42iGJolE','Database\x20product\x20type','datasetcode','3QfhthJ'];a47_0x54aa=function(){return _0xaffb7f;};return a47_0x54aa();}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x3ade13(0x17d),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a47_0x3ade13(0x183),'type':a47_0x3ade13(0x184),'required':!![],'description':a47_0x3ade13(0x175),'enum':['MYSQL','POSTGRESQL']};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51da6c,_0x259ccf){const _0x3c59bc=a48_0xe003,_0x50e279=_0x51da6c();while(!![]){try{const _0x5c32a1=parseInt(_0x3c59bc(0xe9))/0x1*(parseInt(_0x3c59bc(0xde))/0x2)+-parseInt(_0x3c59bc(0xe5))/0x3+parseInt(_0x3c59bc(0xec))/0x4*(parseInt(_0x3c59bc(0xef))/0x5)+-parseInt(_0x3c59bc(0xe2))/0x6*(parseInt(_0x3c59bc(0xe4))/0x7)+parseInt(_0x3c59bc(0xe8))/0x8*(-parseInt(_0x3c59bc(0xe0))/0x9)+-parseInt(_0x3c59bc(0xe6))/0xa+parseInt(_0x3c59bc(0xeb))/0xb*(parseInt(_0x3c59bc(0xf1))/0xc);if(_0x5c32a1===_0x259ccf)break;else _0x50e279['push'](_0x50e279['shift']());}catch(_0x30f74c){_0x50e279['push'](_0x50e279['shift']());}}}(a48_0x3399,0xb2608));import{existsSync,statSync}from'node:fs';function a48_0x3399(){const _0x4e17fc=['File\x20is\x20not\x20a\x20regular\x20file:\x20','968ERphVw','16kjhJde','ceil','5027oKcDPn','4OjcakH','trim','\x20MB','5566950VKJxkp','size','63012Snkgcj','validation','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','151518LkHwCc','\x20path\x20is\x20required.','62388EirCOb','File\x20not\x20found:\x20','2204562TIpwsL','isFile','21ycOWXQ','3602508jdIGqH','8527200lsQWkh'];a48_0x3399=function(){return _0x4e17fc;};return a48_0x3399();}function a48_0xe003(_0x334c6d,_0x25f5fe){_0x334c6d=_0x334c6d-0xdd;const _0x339996=a48_0x3399();let _0xe003be=_0x339996[_0x334c6d];return _0xe003be;}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x4c0e9b){const _0x25cb07=a48_0xe003;if(_0x4c0e9b>=BYTES_PER_MB){const _0x30a2ec=Math[_0x25cb07(0xea)](_0x4c0e9b/BYTES_PER_MB*0x64)/0x64;return _0x30a2ec['toFixed'](0x2)+_0x25cb07(0xee);}return _0x4c0e9b+'\x20B';}export function requireDevelopmentUploadFile(_0x3df460,_0xfc52a7){const _0x1ba95f=a48_0xe003,_0x55e2ef=_0x3df460[_0x1ba95f(0xed)]();if(!_0x55e2ef)throw CliErrors[_0x1ba95f(0xf2)](_0xfc52a7+_0x1ba95f(0xdf));if(!existsSync(_0x55e2ef))throw CliErrors[_0x1ba95f(0xf2)](_0x1ba95f(0xe1)+_0x55e2ef);const _0x5ad70d=statSync(_0x55e2ef);if(!_0x5ad70d[_0x1ba95f(0xe3)]())throw CliErrors[_0x1ba95f(0xf2)](_0x1ba95f(0xe7)+_0x55e2ef);if(_0x5ad70d['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x1ba95f(0xf2)](_0x1ba95f(0xdd)+_0x55e2ef+'\x20('+formatBytes(_0x5ad70d[_0x1ba95f(0xf0)])+')');return{'path':_0x55e2ef,'size':_0x5ad70d[_0x1ba95f(0xf0)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a49_0xc823(_0x7fca3d,_0xe0edbb){_0x7fca3d=_0x7fca3d-0x1c8;const _0x5788f7=a49_0x5788();let _0xc8238=_0x5788f7[_0x7fca3d];return _0xc8238;}(function(_0xfd2769,_0x417ed3){const _0x254184=a49_0xc823,_0x69affb=_0xfd2769();while(!![]){try{const _0x25486a=parseInt(_0x254184(0x1c8))/0x1+-parseInt(_0x254184(0x1cb))/0x2+-parseInt(_0x254184(0x1d4))/0x3+parseInt(_0x254184(0x1d1))/0x4+-parseInt(_0x254184(0x1d2))/0x5*(-parseInt(_0x254184(0x1ce))/0x6)+-parseInt(_0x254184(0x1cc))/0x7*(-parseInt(_0x254184(0x1cf))/0x8)+-parseInt(_0x254184(0x1cd))/0x9;if(_0x25486a===_0x417ed3)break;else _0x69affb['push'](_0x69affb['shift']());}catch(_0x13ec8a){_0x69affb['push'](_0x69affb['shift']());}}}(a49_0x5788,0xe6990));export function validateAppcode(_0x35bd14){const _0x2b6a66=a49_0xc823,_0x9fdef8=_0x35bd14['trim']();if(!_0x9fdef8)return{'valid':![],'message':_0x2b6a66(0x1ca)};if(_0x9fdef8['length']>0x64)return{'valid':![],'message':_0x2b6a66(0x1c9)};if(!/^[A-Za-z0-9_-]+$/[_0x2b6a66(0x1d3)](_0x9fdef8))return{'valid':![],'message':_0x2b6a66(0x1d0)};return{'valid':!![]};}function a49_0x5788(){const _0x454eca=['1088556GlluOu','24HJDUYP','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','7014032nGiomr','50jYlFyH','test','821616VjvIGH','657312YzeQmH','App\x20Code\x20cannot\x20exceed\x20100\x20characters','App\x20Code\x20cannot\x20be\x20empty','3474300aBhUXy','1096011CDzfrm','15653241tAZTCa'];a49_0x5788=function(){return _0x454eca;};return a49_0x5788();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a50_0x2142(){const _0xb732ad=['object','678AadrqP','Missing\x20key.','277670GHfRLG','key','2452422kATVDj','validation','Key\x20not\x20found:\x20','519431fzCCjo','get','config','read','Usage:\x20','478662EPiqdV','Get\x20a\x20config\x20value\x20by\x20key','6699240eghFPK','8dsAbiG','str','9umyfdo','8477bUpAbS','5604740ftEKTC','1frOadV'];a50_0x2142=function(){return _0xb732ad;};return a50_0x2142();}function a50_0x1983(_0x1a894b,_0x57bd72){_0x1a894b=_0x1a894b-0x13a;const _0x2142e2=a50_0x2142();let _0x198371=_0x2142e2[_0x1a894b];return _0x198371;}const a50_0x1ab2fd=a50_0x1983;(function(_0x2cb979,_0x32ed45){const _0x14431c=a50_0x1983,_0x5882e7=_0x2cb979();while(!![]){try{const _0x503c19=parseInt(_0x14431c(0x143))/0x1*(parseInt(_0x14431c(0x13b))/0x2)+-parseInt(_0x14431c(0x149))/0x3+-parseInt(_0x14431c(0x13e))/0x4*(-parseInt(_0x14431c(0x147))/0x5)+parseInt(_0x14431c(0x145))/0x6*(-parseInt(_0x14431c(0x141))/0x7)+parseInt(_0x14431c(0x13d))/0x8+parseInt(_0x14431c(0x140))/0x9*(parseInt(_0x14431c(0x142))/0xa)+parseInt(_0x14431c(0x14c))/0xb;if(_0x503c19===_0x32ed45)break;else _0x5882e7['push'](_0x5882e7['shift']());}catch(_0xab250b){_0x5882e7['push'](_0x5882e7['shift']());}}}(a50_0x2142,0xcd5de));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0xf8a5c2){const _0x4188aa=a50_0x1983,_0x53fb77=_0xf8a5c2[_0x4188aa(0x13f)](_0x4188aa(0x148));if(!_0x53fb77)throw CliErrors[_0x4188aa(0x14a)](_0x4188aa(0x146),_0x4188aa(0x13a)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x46acfd=readConfig(),_0x1158b4=_0x53fb77==='app'?'appcode':_0x53fb77,_0x22006f=_0x46acfd[_0x1158b4];if(_0x22006f===undefined)throw CliErrors[_0x4188aa(0x14a)](_0x4188aa(0x14b)+_0x53fb77);return{'ok':!![],'data':typeof _0x22006f===_0x4188aa(0x144)?_0x22006f:{[_0x1158b4]:_0x22006f},'message':typeof _0x22006f===_0x4188aa(0x144)?undefined:String(_0x22006f)};}export const configGetDefinition={'service':a50_0x1ab2fd(0x14e),'command':a50_0x1ab2fd(0x14d),'description':a50_0x1ab2fd(0x13c),'risk':a50_0x1ab2fd(0x14f),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x1ab2fd(0x148),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a51_0x353d(_0x5ce2ca,_0x2d96e3){_0x5ce2ca=_0x5ce2ca-0x199;const _0x2dbd0b=a51_0x2dbd();let _0x353d65=_0x2dbd0b[_0x5ce2ca];return _0x353d65;}(function(_0x1f43b3,_0x8aca2a){const _0x4e62f5=a51_0x353d,_0x5846b4=_0x1f43b3();while(!![]){try{const _0xc1b3e9=-parseInt(_0x4e62f5(0x19e))/0x1*(parseInt(_0x4e62f5(0x1a3))/0x2)+-parseInt(_0x4e62f5(0x1a0))/0x3*(parseInt(_0x4e62f5(0x19f))/0x4)+-parseInt(_0x4e62f5(0x1a2))/0x5*(parseInt(_0x4e62f5(0x199))/0x6)+parseInt(_0x4e62f5(0x19a))/0x7*(parseInt(_0x4e62f5(0x19b))/0x8)+-parseInt(_0x4e62f5(0x1a1))/0x9*(-parseInt(_0x4e62f5(0x19c))/0xa)+parseInt(_0x4e62f5(0x19d))/0xb*(-parseInt(_0x4e62f5(0x1a4))/0xc)+parseInt(_0x4e62f5(0x1a5))/0xd;if(_0xc1b3e9===_0x8aca2a)break;else _0x5846b4['push'](_0x5846b4['shift']());}catch(_0x1a0c9e){_0x5846b4['push'](_0x5846b4['shift']());}}}(a51_0x2dbd,0x70b99));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a51_0x2dbd(){const _0x5efeab=['2619575ulCYFe','8GuWgZL','190uCdomF','880CSeXVu','174589VQSnZL','49396sjKEGL','120lTcpYG','421461BoHPUa','5hkzyHS','10soUfAj','42360gJfPGb','20468617VHkouh','4364754fgPBDI'];a51_0x2dbd=function(){return _0x5efeab;};return a51_0x2dbd();}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|