@lovrabet/rabetbase-cli 2.1.7-beta.2 → 2.1.7-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x4402fc=a33_0x2000;(function(_0x37966b,_0x228cf0){const _0x5d5250=a33_0x2000,_0x38b613=_0x37966b();while(!![]){try{const _0xc19149=-parseInt(_0x5d5250(0xa5))/0x1+parseInt(_0x5d5250(0xa6))/0x2*(-parseInt(_0x5d5250(0xb1))/0x3)+parseInt(_0x5d5250(0x9a))/0x4*(-parseInt(_0x5d5250(0x9d))/0x5)+parseInt(_0x5d5250(0xa4))/0x6+-parseInt(_0x5d5250(0x9c))/0x7+-parseInt(_0x5d5250(0xae))/0x8*(-parseInt(_0x5d5250(0xa9))/0x9)+-parseInt(_0x5d5250(0xaf))/0xa*(-parseInt(_0x5d5250(0x99))/0xb);if(_0xc19149===_0x228cf0)break;else _0x38b613['push'](_0x38b613['shift']());}catch(_0x28b0d7){_0x38b613['push'](_0x38b613['shift']());}}}(a33_0x4969,0x2fc84));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a33_0x2000(_0x5371a7,_0x25c341){_0x5371a7=_0x5371a7-0x92;const _0x4969f9=a33_0x4969();let _0x2000ad=_0x4969f9[_0x5371a7];return _0x2000ad;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a33_0x4402fc(0xa8),'command':a33_0x4402fc(0x95),'description':a33_0x4402fc(0x98),'risk':'read','flags':[{'name':a33_0x4402fc(0x93),'type':a33_0x4402fc(0xb0),'description':a33_0x4402fc(0xac)}],async 'execute'(_0x5cc444){const _0x54aaae=a33_0x4402fc,_0x3af41f=loadBffProjectConfig(_0x5cc444[_0x54aaae(0xb3)]),_0x3b122c=await readBffLockFile(_0x3af41f[_0x54aaae(0xa1)]),{appLock:_0x4f69b9}=ensureLockScope(_0x3b122c??createEmptyBffLock(),_0x5cc444[_0x54aaae(0xb3)],_0x3af41f[_0x54aaae(0xb2)],_0x54aaae(0x95)),_0x429c33=await scanLocalBffFunctions(_0x3af41f),_0x59605b=[],_0x4e2946=[],_0x5d9732=[];for(const _0x35b5e5 of _0x429c33){const _0x1bc1b0=await computeFileHash(_0x35b5e5['filePath']),_0x4cec5e=_0x4f69b9[_0x54aaae(0x97)][_0x35b5e5[_0x54aaae(0xa0)]];if(!_0x4cec5e)_0x59605b[_0x54aaae(0xa7)](_0x35b5e5[_0x54aaae(0xa0)]);else _0x4cec5e[_0x54aaae(0x92)]!==_0x1bc1b0?_0x4e2946['push'](_0x35b5e5[_0x54aaae(0xa0)]):_0x5d9732['push'](_0x35b5e5[_0x54aaae(0xa0)]);}const _0x4dab08=[];if(_0x5cc444['bool'](_0x54aaae(0x93))){const _0x4e1c9c=loadAliasMap(_0x5cc444[_0x54aaae(0x9e)],undefined,resolveApiFilePath(_0x5cc444[_0x54aaae(0x9e)],_0x5cc444[_0x54aaae(0xb3)])),_0x2e352a=new Map(_0x4e1c9c[_0x54aaae(0xad)](_0x978026=>[_0x978026['datasetCode'],_0x978026[_0x54aaae(0xab)]])),[_0x5eb170,_0x4578b3]=await Promise['all']([listBffScripts(_0x5cc444['appCode']),getBffScriptStatistics(_0x5cc444[_0x54aaae(0xb3)])]),_0x24d755=createHookLocationMap(_0x4578b3),_0x58bffc=new Set(_0x429c33[_0x54aaae(0xad)](_0x2cc922=>_0x2cc922['lockKey']));for(const _0x410189 of _0x5eb170){const _0x51abe2=resolveRemoteScriptTarget(_0x3af41f,_0x410189,_0x24d755,_0x4f69b9[_0x54aaae(0x97)],_0x2e352a);_0x51abe2&&!_0x58bffc[_0x54aaae(0xa2)](_0x51abe2[_0x54aaae(0xa0)])&&_0x4dab08[_0x54aaae(0xa7)](_0x51abe2['lockKey']);}}const _0x510a1a=_0x59605b[_0x54aaae(0x94)]===0x0&&_0x4e2946[_0x54aaae(0x94)]===0x0&&_0x4dab08[_0x54aaae(0x94)]===0x0;return{'ok':!![],'data':{'added':_0x59605b,'modified':_0x4e2946,'unchanged':_0x5d9732,'remoteOnly':_0x4dab08},'message':_0x510a1a?_0x54aaae(0xaa):_0x59605b['length']+_0x54aaae(0x9f)+_0x4e2946[_0x54aaae(0x94)]+_0x54aaae(0x9b)+_0x5d9732[_0x54aaae(0x94)]+_0x54aaae(0xa3)+(_0x4dab08[_0x54aaae(0x94)]>0x0?',\x20'+_0x4dab08[_0x54aaae(0x94)]+_0x54aaae(0x96):'')};}};function a33_0x4969(){const _0x584a2c=['36289RBZJDH','4ytUDcJ','\x20modified,\x20','962605rujRIv','1482525BaSOtD','apiDir','\x20added,\x20','lockKey','lockFilePath','has','\x20unchanged','2068302MQOeTs','126620kOZQJg','7256MudfXi','push','bff','198MbXQlZ','All\x20BFF\x20scripts\x20are\x20in\x20sync.','alias','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','map','73864HIfNAk','830AwUKTV','boolean','54PANGsZ','scriptsRoot','appCode','hash','remote','length','status','\x20remote-only','functions','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file'];a33_0x4969=function(){return _0x584a2c;};return a33_0x4969();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a34_0x4ee59d=a34_0x5b83;(function(_0x4902dc,_0x36ec41){const _0x4a2de1=a34_0x5b83,_0x15e1fc=_0x4902dc();while(!![]){try{const _0x43c170=-parseInt(_0x4a2de1(0x1a8))/0x1*(parseInt(_0x4a2de1(0x1a9))/0x2)+-parseInt(_0x4a2de1(0x1ba))/0x3*(parseInt(_0x4a2de1(0x1bc))/0x4)+parseInt(_0x4a2de1(0x1aa))/0x5+parseInt(_0x4a2de1(0x1dd))/0x6+-parseInt(_0x4a2de1(0x1e1))/0x7*(parseInt(_0x4a2de1(0x1e8))/0x8)+parseInt(_0x4a2de1(0x1b5))/0x9+parseInt(_0x4a2de1(0x1ec))/0xa;if(_0x43c170===_0x36ec41)break;else _0x15e1fc['push'](_0x15e1fc['shift']());}catch(_0x3cccc9){_0x15e1fc['push'](_0x15e1fc['shift']());}}}(a34_0x9a13,0x41983));import a34_0x1c25ae from'chalk';import a34_0x42f482 from'ora';import a34_0x4bbfd1 from'semver';import{execa}from'execa';function a34_0x5b83(_0x2a4454,_0x3b7b82){_0x2a4454=_0x2a4454-0x1a0;const _0x9a13f=a34_0x9a13();let _0x5b83de=_0x9a13f[_0x2a4454];return _0x5b83de;}import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a34_0x9a13(){const _0x47b82e=['gray','run','Skipping\x20official\x20skill\x20package\x20(--no-skills).','\x20install\x20-g\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','update','boolean','object','str','Already\x20up\x20to\x20date\x20(v','cli','835860nKmJwN','fromEntries','length','includes','9667NfePXR','install','\x20\x20Run\x20manually:\x20','\x20\x20Try\x20manually:\x20','Version\x20comparison\x20failed','version','trim','1720ZSouXb','start','toLowerCase','\x20→\x20','5875530PDeIRL','source','Install\x20a\x20specific\x20CLI\x20version','bool','nonInteractive','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','json','Already\x20on\x20requested\x20version\x20(v','fail','string','Invalid\x20version:\x20','\x20\x20Official\x20skill\x20update\x20failed:\x20','Updated\x20to\x20v','filter','unknown','4xOsBCT','160882epUgHQ','1221060XPdGgR','bun','valid','no-skills','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','green','@latest','Checking\x20for\x20updates...','...','entries','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','1544733twUuvF','log','beta','cwd','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','6SxisGx','Update\x20available:\x20','510716HwejaB','Current\x20version:\x20','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','skipped','warn','info','https://registry.npmjs.org/-/package/','Updating\x20via\x20','validation','stableVersion','pipe','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','execPath','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','red','succeed','Requested\x20version:\x20','Beta\x20version:\x20','/dist-tags','error','message','latest'];a34_0x9a13=function(){return _0x47b82e;};return a34_0x9a13();}import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{getCdnConfig}from'../utils/cdn-config.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x471b21=a34_0x5b83;return GIT_COMMIT!==_0x471b21(0x1a7)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x58b284=a34_0x5b83,_0x45a3d8=process[_0x58b284(0x1c8)][_0x58b284(0x1ea)]();if(_0x45a3d8[_0x58b284(0x1e0)](_0x58b284(0x1ab)))return'bun';return'npm';}const updateFlags=[{'name':a34_0x4ee59d(0x1b7),'type':'boolean','description':a34_0x4ee59d(0x1b9),'default':![]},{'name':'version','type':'string','description':a34_0x4ee59d(0x1ee)},{'name':'no-skills','type':a34_0x4ee59d(0x1d8),'description':a34_0x4ee59d(0x1b4),'default':![]}];function getRequestedVersion(_0x1d7e6f){const _0x401db5=a34_0x4ee59d;return _0x1d7e6f[_0x401db5(0x1da)]('version')['trim']();}async function validateUpdateFlags(_0x39dca4){const _0x12a1d4=a34_0x4ee59d,_0x5694f9=_0x39dca4[_0x12a1d4(0x1ef)](_0x12a1d4(0x1b7)),_0x1e331f=getRequestedVersion(_0x39dca4);if(_0x5694f9&&_0x1e331f)throw CliErrors[_0x12a1d4(0x1c4)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x1e331f&&!a34_0x4bbfd1[_0x12a1d4(0x1ac)](_0x1e331f))throw CliErrors[_0x12a1d4(0x1c4)](_0x12a1d4(0x1a3)+_0x1e331f,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x10a7f3=a34_0x4ee59d;try{const _0x2866cb=await fetch(_0x10a7f3(0x1c2)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x10a7f3(0x1ce),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x2866cb['ok'])return null;const _0x9106fc=await _0x2866cb[_0x10a7f3(0x1f2)]();if(!_0x9106fc||typeof _0x9106fc!==_0x10a7f3(0x1d9))return null;return Object[_0x10a7f3(0x1de)](Object[_0x10a7f3(0x1b3)](_0x9106fc)[_0x10a7f3(0x1a6)](([,_0x2f5ba2])=>typeof _0x2f5ba2===_0x10a7f3(0x1a2)&&_0x2f5ba2['trim']()[_0x10a7f3(0x1df)]>0x0)['map'](([_0x714e67,_0x383f48])=>[_0x714e67,String(_0x383f48)[_0x10a7f3(0x1e7)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2f9773){const _0x5038d0=await fetchNpmDistTags();return _0x5038d0?.[_0x2f9773]??null;}async function fetchLatestVersion(){const _0x39fb31=a34_0x4ee59d,_0x427a1b=await fetchNpmDistTagVersion(_0x39fb31(0x1d1));if(_0x427a1b)return _0x427a1b;const _0x1a3f1c=await getCdnConfig();return _0x1a3f1c?.[_0x39fb31(0x1dc)]?.[_0x39fb31(0x1c5)]??null;}async function resolveTargetVersion(_0x1a1fcd){const _0x2f2786=a34_0x4ee59d,_0x33b001=getRequestedVersion(_0x1a1fcd);if(_0x33b001)return{'version':_0x33b001,'source':_0x2f2786(0x1e6)};if(_0x1a1fcd[_0x2f2786(0x1ef)](_0x2f2786(0x1b7))){const _0x4edac3=await fetchNpmDistTagVersion('beta');if(!_0x4edac3)return null;return{'version':_0x4edac3,'source':_0x2f2786(0x1b7)};}const _0xf34bc2=await fetchLatestVersion();if(!_0xf34bc2)return null;return{'version':_0xf34bc2,'source':_0x2f2786(0x1d1)};}function shouldInstallTarget(_0x33c5b0,_0x4fd35a){const _0x5bf30c=a34_0x4ee59d;if(_0x4fd35a[_0x5bf30c(0x1ed)]==='version')return!a34_0x4bbfd1['eq'](_0x33c5b0,_0x4fd35a[_0x5bf30c(0x1e6)]);return a34_0x4bbfd1['lt'](_0x33c5b0,_0x4fd35a['version']);}function getInstallPlanLabel(_0x34ceb7,_0x2b2a79){const _0x860a66=a34_0x4ee59d;switch(_0x2b2a79[_0x860a66(0x1ed)]){case _0x860a66(0x1b7):return _0x860a66(0x1cd)+a34_0x1c25ae['yellow'](_0x34ceb7)+_0x860a66(0x1eb)+a34_0x1c25ae[_0x860a66(0x1af)](_0x2b2a79[_0x860a66(0x1e6)]);case'version':return _0x860a66(0x1cc)+a34_0x1c25ae['yellow'](_0x34ceb7)+_0x860a66(0x1eb)+a34_0x1c25ae[_0x860a66(0x1af)](_0x2b2a79[_0x860a66(0x1e6)]);case'latest':default:return _0x860a66(0x1bb)+a34_0x1c25ae['yellow'](_0x34ceb7)+_0x860a66(0x1eb)+a34_0x1c25ae[_0x860a66(0x1af)](_0x2b2a79[_0x860a66(0x1e6)]);}}async function installOfficialSkill(_0x446006){const _0x4c1e70=a34_0x4ee59d;console[_0x4c1e70(0x1b6)](a34_0x1c25ae['gray']('Checking\x20official\x20skill\x20package...'));const _0x5c060b=runNpxSkillsAddGlobal(process[_0x4c1e70(0x1b8)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x446006?_0x4c1e70(0x1c6):'inherit'});if(_0x5c060b[_0x4c1e70(0x1bf)]){console[_0x4c1e70(0x1b6)](a34_0x1c25ae[_0x4c1e70(0x1d2)](_0x4c1e70(0x1be)));return;}if(_0x5c060b['ok']){console[_0x4c1e70(0x1b6)](a34_0x1c25ae[_0x4c1e70(0x1d2)](_0x4c1e70(0x1c7)));return;}console[_0x4c1e70(0x1c0)](a34_0x1c25ae['yellow'](_0x4c1e70(0x1a4)+(_0x5c060b[_0x4c1e70(0x1cf)]||_0x4c1e70(0x1a7)))),console['log'](a34_0x1c25ae[_0x4c1e70(0x1d2)](_0x4c1e70(0x1e3)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x2a7f6b){const _0x555e78=a34_0x4ee59d;await validateUpdateFlags(_0x2a7f6b);const _0x5cfa13=getCurrentVersion();console[_0x555e78(0x1b6)](_0x555e78(0x1bd)+_0x5cfa13);const _0x418c21=a34_0x42f482(_0x555e78(0x1b1))[_0x555e78(0x1e9)](),_0x2d7529=await resolveTargetVersion(_0x2a7f6b);if(!_0x2d7529){const _0x2f2429=_0x2a7f6b[_0x555e78(0x1ef)](_0x555e78(0x1b7))?_0x555e78(0x1f1):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x418c21[_0x555e78(0x1a1)](_0x2f2429),console[_0x555e78(0x1b6)](a34_0x1c25ae[_0x555e78(0x1d2)](_0x555e78(0x1d6)+NPM_PACKAGE_NAME+_0x555e78(0x1b0))),{'ok':![],'message':_0x2f2429};}const _0x19a1a6=a34_0x4bbfd1[_0x555e78(0x1ac)](VERSION),_0x4b9ca7=a34_0x4bbfd1['valid'](_0x2d7529[_0x555e78(0x1e6)]);if(!_0x19a1a6||!_0x4b9ca7)return _0x418c21['fail'](_0x555e78(0x1e5)),{'ok':![],'message':_0x555e78(0x1e5)};if(!shouldInstallTarget(_0x19a1a6,_0x2d7529)){const _0x4371b8=_0x2d7529['source']===_0x555e78(0x1e6)?_0x555e78(0x1a0)+_0x2d7529[_0x555e78(0x1e6)]+')':_0x555e78(0x1db)+_0x2d7529[_0x555e78(0x1e6)]+')';return _0x418c21[_0x555e78(0x1cb)](_0x4371b8),!_0x2a7f6b[_0x555e78(0x1ef)](_0x555e78(0x1ad))?await installOfficialSkill(_0x2a7f6b[_0x555e78(0x1f0)]):console[_0x555e78(0x1b6)](a34_0x1c25ae['gray'](_0x555e78(0x1d4))),{'ok':!![]};}_0x418c21[_0x555e78(0x1c1)](getInstallPlanLabel(_0x5cfa13,_0x2d7529));const _0xc02cb4=detectPackageManager(),_0x46a0a8=_0xc02cb4==='npm'?resolveNpmBin('npm'):_0xc02cb4,_0x406d16=a34_0x42f482(_0x555e78(0x1c3)+_0xc02cb4+_0x555e78(0x1b2))[_0x555e78(0x1e9)]();try{return await execa(_0x46a0a8,[_0x555e78(0x1e2),'-g',NPM_PACKAGE_NAME+'@'+_0x2d7529[_0x555e78(0x1e6)]],{'stdio':_0x555e78(0x1c6)}),_0x406d16[_0x555e78(0x1cb)](_0x555e78(0x1a5)+_0x2d7529[_0x555e78(0x1e6)]),console[_0x555e78(0x1b6)](a34_0x1c25ae[_0x555e78(0x1d2)](_0x555e78(0x1c9))),!_0x2a7f6b[_0x555e78(0x1ef)](_0x555e78(0x1ad))?await installOfficialSkill(_0x2a7f6b[_0x555e78(0x1f0)]):console[_0x555e78(0x1b6)](a34_0x1c25ae[_0x555e78(0x1d2)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).')),{'ok':!![]};}catch(_0x165e82){return _0x406d16[_0x555e78(0x1a1)]('Update\x20failed'),console[_0x555e78(0x1cf)](a34_0x1c25ae[_0x555e78(0x1ca)]('\x20\x20'+_0x165e82[_0x555e78(0x1d0)])),console[_0x555e78(0x1b6)](a34_0x1c25ae['gray'](_0x555e78(0x1e4)+_0xc02cb4+_0x555e78(0x1d5)+NPM_PACKAGE_NAME+'@'+_0x2d7529[_0x555e78(0x1e6)])),{'ok':![],'message':_0x165e82['message']};}}export const updateDefinition={'service':a34_0x4ee59d(0x1d7),'command':a34_0x4ee59d(0x1d3),'description':a34_0x4ee59d(0x1ae),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a34_0xdcf00b=a34_0x1b7c;(function(_0x7fd5d0,_0x1dfcea){const _0x193d43=a34_0x1b7c,_0x2e1b97=_0x7fd5d0();while(!![]){try{const _0x1ba7ce=-parseInt(_0x193d43(0xdd))/0x1+parseInt(_0x193d43(0xad))/0x2+parseInt(_0x193d43(0xf4))/0x3*(parseInt(_0x193d43(0xe3))/0x4)+-parseInt(_0x193d43(0xef))/0x5+-parseInt(_0x193d43(0xdc))/0x6+parseInt(_0x193d43(0xed))/0x7*(-parseInt(_0x193d43(0xd4))/0x8)+parseInt(_0x193d43(0xc2))/0x9*(parseInt(_0x193d43(0xc6))/0xa);if(_0x1ba7ce===_0x1dfcea)break;else _0x2e1b97['push'](_0x2e1b97['shift']());}catch(_0x59e472){_0x2e1b97['push'](_0x2e1b97['shift']());}}}(a34_0x2866,0xc1bec));import a34_0x48a6f7 from'chalk';import a34_0x151842 from'ora';import a34_0x1b8059 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';function a34_0x1b7c(_0x311534,_0x37b6a6){_0x311534=_0x311534-0xa9;const _0x286607=a34_0x2866();let _0x1b7c89=_0x286607[_0x311534];return _0x1b7c89;}import{getCdnConfig}from'../utils/cdn-config.js';function a34_0x2866(){const _0xefdbd4=['info','npm','fromEntries','filter','Already\x20up\x20to\x20date\x20(v','version','Checking\x20for\x20updates...','7dGuGfk','install','6500470CheeqY','includes','trim','\x20→\x20','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','60DjiuKn','error','fail','Install\x20a\x20specific\x20CLI\x20version','beta','1502162tuZYRz','succeed','boolean','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','inherit','bun','Version\x20comparison\x20failed','string','log','warn','message','length','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','source','pipe','\x20\x20Run\x20manually:\x20','latest','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','nonInteractive','timeout','27VNYHRY','write','start','json','10411150ShtzIc','valid','slice','map','\x20\x20Official\x20skill\x20update\x20failed:\x20','entries','Update\x20failed','str','Checking\x20official\x20skill\x20package...','Invalid\x20version:\x20','unknown','Updated\x20to\x20v','green','cwd','8003760ajqHaI','yellow','execPath','no-skills','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','cli','validation','1891524CEVGum','631848uefAnJ','https://registry.npmjs.org/-/package/','bool','Skipping\x20official\x20skill\x20package\x20(--no-skills).','gray','Current\x20version:\x20','33364RaXUHL','update','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'];a34_0x2866=function(){return _0xefdbd4;};return a34_0x2866();}import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x3a8aba=a34_0x1b7c;return GIT_COMMIT!==_0x3a8aba(0xd0)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3a8aba(0xc8)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x57c780=a34_0x1b7c,_0x429c7f=process[_0x57c780(0xd6)]['toLowerCase']();if(_0x429c7f[_0x57c780(0xf0)](_0x57c780(0xb3)))return _0x57c780(0xb3);return _0x57c780(0xe7);}const updateFlags=[{'name':a34_0xdcf00b(0xac),'type':a34_0xdcf00b(0xaf),'description':a34_0xdcf00b(0xb1),'default':![]},{'name':a34_0xdcf00b(0xeb),'type':a34_0xdcf00b(0xb5),'description':a34_0xdcf00b(0xab)},{'name':a34_0xdcf00b(0xd7),'type':a34_0xdcf00b(0xaf),'description':a34_0xdcf00b(0xf3),'default':![]}];function getRequestedVersion(_0x126e9b){const _0x3e3001=a34_0xdcf00b;return _0x126e9b[_0x3e3001(0xcd)](_0x3e3001(0xeb))[_0x3e3001(0xf1)]();}async function validateUpdateFlags(_0x42d91a){const _0x40e2b7=a34_0xdcf00b,_0x41806a=_0x42d91a[_0x40e2b7(0xdf)](_0x40e2b7(0xac)),_0x493164=getRequestedVersion(_0x42d91a);if(_0x41806a&&_0x493164)throw CliErrors[_0x40e2b7(0xdb)](_0x40e2b7(0xd9),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x493164&&!a34_0x1b8059[_0x40e2b7(0xc7)](_0x493164))throw CliErrors['validation'](_0x40e2b7(0xcf)+_0x493164,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x346f26=a34_0xdcf00b;try{const _0x1d75c0=await fetch(_0x346f26(0xde)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x346f26(0xc1)](0x2710)});if(!_0x1d75c0['ok'])return null;const _0x441459=await _0x1d75c0[_0x346f26(0xc5)]();if(!_0x441459||typeof _0x441459!=='object')return null;return Object[_0x346f26(0xe8)](Object[_0x346f26(0xcb)](_0x441459)[_0x346f26(0xe9)](([,_0x3fb4bd])=>typeof _0x3fb4bd==='string'&&_0x3fb4bd['trim']()[_0x346f26(0xb9)]>0x0)[_0x346f26(0xc9)](([_0x4cd823,_0x5be004])=>[_0x4cd823,String(_0x5be004)[_0x346f26(0xf1)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x46c80b){const _0x28482a=await fetchNpmDistTags();return _0x28482a?.[_0x46c80b]??null;}async function fetchLatestVersion(){const _0x249f9a=a34_0xdcf00b,_0x34002c=await fetchNpmDistTagVersion(_0x249f9a(0xbe));if(_0x34002c)return _0x34002c;const _0x1d0aac=await getCdnConfig();return _0x1d0aac?.[_0x249f9a(0xda)]?.['stableVersion']??null;}async function resolveTargetVersion(_0xa04569){const _0x3877d7=a34_0xdcf00b,_0x3b38d2=getRequestedVersion(_0xa04569);if(_0x3b38d2)return{'version':_0x3b38d2,'source':'version'};if(_0xa04569[_0x3877d7(0xdf)](_0x3877d7(0xac))){const _0x583ce0=await fetchNpmDistTagVersion(_0x3877d7(0xac));if(!_0x583ce0)return null;return{'version':_0x583ce0,'source':'beta'};}const _0x36a29a=await fetchLatestVersion();if(!_0x36a29a)return null;return{'version':_0x36a29a,'source':_0x3877d7(0xbe)};}function shouldInstallTarget(_0x478b7c,_0x34167e){const _0x28c214=a34_0xdcf00b;if(_0x34167e['source']===_0x28c214(0xeb))return!a34_0x1b8059['eq'](_0x478b7c,_0x34167e[_0x28c214(0xeb)]);return a34_0x1b8059['lt'](_0x478b7c,_0x34167e[_0x28c214(0xeb)]);}function getInstallPlanLabel(_0x36b52d,_0xdb93fe){const _0x2acd3e=a34_0xdcf00b;switch(_0xdb93fe[_0x2acd3e(0xbb)]){case _0x2acd3e(0xac):return'Beta\x20version:\x20'+a34_0x48a6f7[_0x2acd3e(0xd5)](_0x36b52d)+_0x2acd3e(0xf2)+a34_0x48a6f7['green'](_0xdb93fe[_0x2acd3e(0xeb)]);case _0x2acd3e(0xeb):return'Requested\x20version:\x20'+a34_0x48a6f7[_0x2acd3e(0xd5)](_0x36b52d)+_0x2acd3e(0xf2)+a34_0x48a6f7[_0x2acd3e(0xd2)](_0xdb93fe[_0x2acd3e(0xeb)]);case'latest':default:return'Update\x20available:\x20'+a34_0x48a6f7[_0x2acd3e(0xd5)](_0x36b52d)+_0x2acd3e(0xf2)+a34_0x48a6f7['green'](_0xdb93fe['version']);}}async function installOfficialSkill(_0x45b7b4){const _0x190cef=a34_0xdcf00b;console[_0x190cef(0xb6)](a34_0x48a6f7[_0x190cef(0xe1)](_0x190cef(0xce)));const _0x1ad908=runNpxSkillsAddGlobal(process[_0x190cef(0xd3)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x45b7b4?_0x190cef(0xbc):_0x190cef(0xb2)});if(_0x1ad908['skipped']){console[_0x190cef(0xb6)](a34_0x48a6f7[_0x190cef(0xe1)]('\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x1ad908['ok']){console[_0x190cef(0xb6)](a34_0x48a6f7[_0x190cef(0xe1)]('\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.'));return;}console[_0x190cef(0xb7)](a34_0x48a6f7['yellow'](_0x190cef(0xca)+(_0x1ad908[_0x190cef(0xa9)]||_0x190cef(0xd0)))),console[_0x190cef(0xb6)](a34_0x48a6f7[_0x190cef(0xe1)](_0x190cef(0xbd)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x35bafc){const _0x5e1549=a34_0xdcf00b;await validateUpdateFlags(_0x35bafc);const _0x4ea1cc=getCurrentVersion();console['log'](_0x5e1549(0xe2)+_0x4ea1cc);const _0x2e64c9=a34_0x151842(_0x5e1549(0xec))['start'](),_0xa0c275=await resolveTargetVersion(_0x35bafc);if(!_0xa0c275){const _0x173511=_0x35bafc[_0x5e1549(0xdf)](_0x5e1549(0xac))?_0x5e1549(0xd8):_0x5e1549(0xbf);return _0x2e64c9[_0x5e1549(0xaa)](_0x173511),console['log'](a34_0x48a6f7[_0x5e1549(0xe1)](_0x5e1549(0xe5)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x173511};}const _0x3d1e08=a34_0x1b8059[_0x5e1549(0xc7)](VERSION),_0x475be4=a34_0x1b8059[_0x5e1549(0xc7)](_0xa0c275[_0x5e1549(0xeb)]);if(!_0x3d1e08||!_0x475be4)return _0x2e64c9[_0x5e1549(0xaa)](_0x5e1549(0xb4)),{'ok':![],'message':_0x5e1549(0xb4)};if(!shouldInstallTarget(_0x3d1e08,_0xa0c275)){const _0x2c1296=_0xa0c275[_0x5e1549(0xbb)]===_0x5e1549(0xeb)?'Already\x20on\x20requested\x20version\x20(v'+_0xa0c275[_0x5e1549(0xeb)]+')':_0x5e1549(0xea)+_0xa0c275[_0x5e1549(0xeb)]+')';return _0x2e64c9[_0x5e1549(0xae)](_0x2c1296),!_0x35bafc[_0x5e1549(0xdf)](_0x5e1549(0xd7))?await installOfficialSkill(_0x35bafc[_0x5e1549(0xc0)]):console['log'](a34_0x48a6f7['gray'](_0x5e1549(0xe0))),{'ok':!![]};}_0x2e64c9[_0x5e1549(0xe6)](getInstallPlanLabel(_0x4ea1cc,_0xa0c275));const _0x1534db=detectPackageManager(),_0x10e79f=_0x1534db==='npm'?resolveNpmBin(_0x5e1549(0xe7)):_0x1534db,_0x159e9e=a34_0x151842('Updating\x20via\x20'+_0x1534db+'...')[_0x5e1549(0xc4)]();try{return await execa(_0x10e79f,[_0x5e1549(0xee),'-g',NPM_PACKAGE_NAME+'@'+_0xa0c275['version']],{'stdio':_0x5e1549(0xbc)}),_0x159e9e['succeed'](_0x5e1549(0xd1)+_0xa0c275[_0x5e1549(0xeb)]),console[_0x5e1549(0xb6)](a34_0x48a6f7['gray'](_0x5e1549(0xb0))),!_0x35bafc['bool'](_0x5e1549(0xd7))?await installOfficialSkill(_0x35bafc[_0x5e1549(0xc0)]):console[_0x5e1549(0xb6)](a34_0x48a6f7[_0x5e1549(0xe1)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).')),{'ok':!![]};}catch(_0xbfcde){return _0x159e9e[_0x5e1549(0xaa)](_0x5e1549(0xcc)),console[_0x5e1549(0xa9)](a34_0x48a6f7['red']('\x20\x20'+_0xbfcde[_0x5e1549(0xb8)])),console[_0x5e1549(0xb6)](a34_0x48a6f7[_0x5e1549(0xe1)]('\x20\x20Try\x20manually:\x20'+_0x1534db+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0xa0c275[_0x5e1549(0xeb)])),{'ok':![],'message':_0xbfcde[_0x5e1549(0xb8)]};}}export const updateDefinition={'service':a34_0xdcf00b(0xe4),'command':'run','description':a34_0xdcf00b(0xba),'risk':a34_0xdcf00b(0xc3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a35_0x27b8(_0xcf53c9,_0x2a3eb0){_0xcf53c9=_0xcf53c9-0x175;const _0x43bddf=a35_0x43bd();let _0x27b804=_0x43bddf[_0xcf53c9];return _0x27b804;}(function(_0x4a323f,_0x30a0da){const _0x2f085f=a35_0x27b8,_0x42077b=_0x4a323f();while(!![]){try{const _0x52a63e=parseInt(_0x2f085f(0x179))/0x1+parseInt(_0x2f085f(0x178))/0x2*(parseInt(_0x2f085f(0x17a))/0x3)+parseInt(_0x2f085f(0x17c))/0x4+-parseInt(_0x2f085f(0x17b))/0x5+-parseInt(_0x2f085f(0x177))/0x6+-parseInt(_0x2f085f(0x175))/0x7+-parseInt(_0x2f085f(0x176))/0x8;if(_0x52a63e===_0x30a0da)break;else _0x42077b['push'](_0x42077b['shift']());}catch(_0x5b68ef){_0x42077b['push'](_0x42077b['shift']());}}}(a35_0x43bd,0x7c51a));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a35_0x43bd(){const _0x2af674=['952344GWPRuj','850188tSEuZg','46zNeugN','1013216URzJyi','129192YbSWst','3504070ZGJiPe','1535484hcfqaQ','6417558BuUoPO'];a35_0x43bd=function(){return _0x2af674;};return a35_0x43bd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x41c381=a36_0x32e3;function a36_0xb17f(){const _0x57d853=['2588156WYuzdW','operation','string','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','7qCyfyf','2957940pyyNfH','name','bool','2508972tSFfOU','3891429oCyKGA','appCode','3162296WDTYvj','633cMhMAk','sdk','str','alias','810LgTFJH','244639mLyuJN','boolean','skip-imports','codegen','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','tableName','code','read'];a36_0xb17f=function(){return _0x57d853;};return a36_0xb17f();}(function(_0x52114e,_0x5a22e5){const _0x25ac17=a36_0x32e3,_0x3a8004=_0x52114e();while(!![]){try{const _0x57b1a5=parseInt(_0x25ac17(0x116))/0x1+parseInt(_0x25ac17(0x115))/0x2*(parseInt(_0x25ac17(0x111))/0x3)+-parseInt(_0x25ac17(0x105))/0x4+-parseInt(_0x25ac17(0x10a))/0x5+parseInt(_0x25ac17(0x10d))/0x6+parseInt(_0x25ac17(0x109))/0x7*(parseInt(_0x25ac17(0x110))/0x8)+parseInt(_0x25ac17(0x10e))/0x9;if(_0x57b1a5===_0x5a22e5)break;else _0x3a8004['push'](_0x3a8004['shift']());}catch(_0x5394e6){_0x3a8004['push'](_0x3a8004['shift']());}}}(a36_0xb17f,0x52591));function a36_0x32e3(_0x3c37b3,_0x4a3b39){_0x3c37b3=_0x3c37b3-0xfe;const _0xb17fdb=a36_0xb17f();let _0x32e34a=_0xb17fdb[_0x3c37b3];return _0x32e34a;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a36_0x41c381(0x100),'command':a36_0x41c381(0x112),'description':a36_0x41c381(0x101),'risk':a36_0x41c381(0x104),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x41c381(0x114),'type':a36_0x41c381(0x107),'description':a36_0x41c381(0x108)},{'name':'operation','type':a36_0x41c381(0x107),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a36_0x41c381(0xff),'type':a36_0x41c381(0xfe),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x54483c){const _0x21ae3a=a36_0x41c381,{dataset:_0x303d85,operation:_0x48af6c}=await getOperationDetail(_0x54483c[_0x21ae3a(0x10f)],_0x54483c[_0x21ae3a(0x113)]('code'),_0x54483c['str']('operation')),_0x181cab=generateSdkCode(_0x303d85,_0x48af6c,{'includeImports':!_0x54483c[_0x21ae3a(0x10c)](_0x21ae3a(0xff))});return{'ok':!![],'data':{'dataset':{'name':_0x303d85[_0x21ae3a(0x10b)],'code':_0x303d85[_0x21ae3a(0x103)],'tableName':_0x303d85[_0x21ae3a(0x102)]},'operation':_0x54483c[_0x21ae3a(0x113)](_0x21ae3a(0x106)),'code':_0x181cab}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0xba18c6=a37_0x58c9;function a37_0x58c9(_0x48f2ff,_0x53fb97){_0x48f2ff=_0x48f2ff-0x6e;const _0x490ebf=a37_0x490e();let _0x58c97b=_0x490ebf[_0x48f2ff];return _0x58c97b;}(function(_0x4cb507,_0x557022){const _0x588be1=a37_0x58c9,_0x15f6db=_0x4cb507();while(!![]){try{const _0x108d7e=-parseInt(_0x588be1(0x7b))/0x1*(-parseInt(_0x588be1(0x7e))/0x2)+parseInt(_0x588be1(0x80))/0x3*(parseInt(_0x588be1(0x83))/0x4)+parseInt(_0x588be1(0x76))/0x5*(parseInt(_0x588be1(0x78))/0x6)+parseInt(_0x588be1(0x7f))/0x7+-parseInt(_0x588be1(0x7c))/0x8+-parseInt(_0x588be1(0x84))/0x9*(parseInt(_0x588be1(0x75))/0xa)+-parseInt(_0x588be1(0x79))/0xb*(parseInt(_0x588be1(0x73))/0xc);if(_0x108d7e===_0x557022)break;else _0x15f6db['push'](_0x15f6db['shift']());}catch(_0x2921a9){_0x15f6db['push'](_0x15f6db['shift']());}}}(a37_0x490e,0x88d4f));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a37_0x490e(){const _0x4c03b0=['bff','23954UQNxtg','3388861dnQVja','9585lnMIIO','read','appCode','300CHsnkQ','1660221ouKZHo','no-imports','codegen','bool','sdk','string','sql','sqlName','8436fbKtai','str','30mciQVp','587255fzjWou','boolean','54IoHAxG','16423cUWlaz','target','44hMHUdF','1154768khONrr'];a37_0x490e=function(){return _0x4c03b0;};return a37_0x490e();}export const codegenSql={'service':a37_0xba18c6(0x86),'command':a37_0xba18c6(0x71),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a37_0xba18c6(0x81),'flags':[SQLCODE_FLAG,{'name':a37_0xba18c6(0x7a),'type':a37_0xba18c6(0x70),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a37_0xba18c6(0x6f),'enum':[a37_0xba18c6(0x6f),a37_0xba18c6(0x7d)]},{'name':a37_0xba18c6(0x85),'type':a37_0xba18c6(0x77),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x5c9337){const _0x45afb9=a37_0xba18c6,_0x574709=await getSqlQueryInfo(_0x5c9337[_0x45afb9(0x82)],_0x5c9337[_0x45afb9(0x74)]('sqlcode')),_0x44097b=_0x5c9337[_0x45afb9(0x74)](_0x45afb9(0x7a))||_0x45afb9(0x6f),_0x483f5e=generateSqlCodeTemplate(_0x574709,{'target':_0x44097b,'includeImports':!_0x5c9337[_0x45afb9(0x6e)](_0x45afb9(0x85))});return{'ok':!![],'data':{'sqlCode':_0x574709['sqlCode'],'sqlName':_0x574709[_0x45afb9(0x72)],'target':_0x44097b,'code':_0x483f5e}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22aa79,_0x7af59c){const _0x5e4830=a38_0x59ba,_0x5884cb=_0x22aa79();while(!![]){try{const _0x5c0039=-parseInt(_0x5e4830(0x10d))/0x1*(parseInt(_0x5e4830(0x102))/0x2)+parseInt(_0x5e4830(0x10e))/0x3+-parseInt(_0x5e4830(0x104))/0x4*(parseInt(_0x5e4830(0x10b))/0x5)+parseInt(_0x5e4830(0xf9))/0x6*(-parseInt(_0x5e4830(0xfb))/0x7)+parseInt(_0x5e4830(0xfe))/0x8+-parseInt(_0x5e4830(0x10c))/0x9*(parseInt(_0x5e4830(0x106))/0xa)+-parseInt(_0x5e4830(0x117))/0xb*(-parseInt(_0x5e4830(0x114))/0xc);if(_0x5c0039===_0x7af59c)break;else _0x5884cb['push'](_0x5884cb['shift']());}catch(_0x1bf689){_0x5884cb['push'](_0x5884cb['shift']());}}}(a38_0x59ac,0x5d807));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x5b30fd from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a38_0x59ac(){const _0x56e0e8=['无法获取远程应用列表,请手动输入。','map','\x0a未找到可用应用。','528ngKsIr','\x0a无法获取远程应用列表,请手动输入。','gray','190234nFUrDt','valid','正在获取可用应用列表...','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','\x20\x20(','custom','30inPYWW','✎\x20自定义输入\x20appcode','348607fcNwGF','appCode','manual','4031080sbRXTW','yellow','skip','请输入\x20App\x20Code:','2ZOyiPX','length','8828SLePmd','cyan','20tghacm','获取到\x20','find','未找到可用应用。','请选择要绑定的应用:','365apuYPk','2433456roeaQG','254873vjJlQD','971757evmtJE','trim','message'];a38_0x59ac=function(){return _0x56e0e8;};return a38_0x59ac();}import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a38_0x59ba(_0x40c081,_0x23fe14){_0x40c081=_0x40c081-0xf9;const _0x59ac48=a38_0x59ac();let _0x59ba8b=_0x59ac48[_0x40c081];return _0x59ba8b;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x31c62b=a38_0x59ba,_0x44a506=await input({'message':_0x31c62b(0x101),'validate':_0x589f33=>{const _0x40715e=_0x31c62b,_0x31bf0a=validateAppcode(_0x589f33[_0x40715e(0x10f)]());return _0x31bf0a[_0x40715e(0x118)]||_0x31bf0a['message']||'Invalid\x20App\x20Code';}});return _0x44a506[_0x31c62b(0x10f)]();}export async function promptAppSelection(_0x119c15){const _0x233aae=a38_0x59ba,_0x118e21=[{'name':a38_0x5b30fd[_0x233aae(0xff)](_0x233aae(0xfa)),'value':-0x1},..._0x119c15[_0x233aae(0x112)]((_0x18d9bc,_0x4cff5e)=>({'name':_0x18d9bc['appName']+'\x20\x20'+a38_0x5b30fd[_0x233aae(0x116)]('('+_0x18d9bc[_0x233aae(0xfc)]+')'),'value':_0x4cff5e}))],_0x2513ea=await checkbox({'message':_0x233aae(0x107)+a38_0x5b30fd[_0x233aae(0x105)](_0x119c15['length'])+_0x233aae(0x11a),'choices':_0x118e21,'loop':![]});if(_0x2513ea['includes'](-0x1))return _0x233aae(0x11d);if(_0x2513ea[_0x233aae(0x103)]===0x0)return _0x233aae(0x11d);return _0x2513ea[_0x233aae(0x112)](_0x1a36f8=>_0x119c15[_0x1a36f8]);}export async function promptSingleAppSelection(_0x62cd05){const _0x5b9000=a38_0x59ba,_0x145edf=[{'name':a38_0x5b30fd[_0x5b9000(0x116)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x5b9000(0x100)},{'name':a38_0x5b30fd[_0x5b9000(0xff)]('✎\x20自定义输入\x20appcode'),'value':_0x5b9000(0x11d)},..._0x62cd05[_0x5b9000(0x112)](_0x5aa513=>({'name':_0x5aa513['appName']+'\x20\x20'+a38_0x5b30fd[_0x5b9000(0x116)]('('+_0x5aa513[_0x5b9000(0xfc)]+')'),'value':_0x5aa513[_0x5b9000(0xfc)]}))],_0x325fd6=await select({'message':_0x5b9000(0x10a),'choices':_0x145edf});if(_0x325fd6===_0x5b9000(0x100))return _0x5b9000(0x100);if(_0x325fd6==='custom')return _0x5b9000(0x11d);return _0x62cd05[_0x5b9000(0x108)](_0x37f527=>_0x37f527[_0x5b9000(0xfc)]===_0x325fd6);}export async function selectSingleAppcode(_0x4ad4bb){const _0x1028ba=a38_0x59ba;if(!_0x4ad4bb)return writeCliSideChannelLine(a38_0x5b30fd[_0x1028ba(0x116)](_0x1028ba(0x11b))),_fallbackOrSkip();writeCliSideChannelLine(_0x1028ba(0x119));let _0x4f44ee;try{_0x4f44ee=await withActiveCookie(_0x4ad4bb,()=>listRemoteApps());}catch(_0x1b5e57){writeCliSideChannelLine(a38_0x5b30fd[_0x1028ba(0xff)](_0x1028ba(0x111)));if(_0x1b5e57 instanceof Error)writeCliSideChannelLine(a38_0x5b30fd[_0x1028ba(0x116)](_0x1028ba(0x11c)+_0x1b5e57[_0x1028ba(0x110)]+')'));return _fallbackOrSkip();}if(_0x4f44ee[_0x1028ba(0x103)]===0x0)return writeCliSideChannelLine(a38_0x5b30fd[_0x1028ba(0xff)](_0x1028ba(0x109))),_fallbackOrSkip();const _0x3e8b57=await promptSingleAppSelection(_0x4f44ee);if(_0x3e8b57===_0x1028ba(0x100))return'';if(_0x3e8b57===_0x1028ba(0x11d))return promptCustomAppcode();return _0x3e8b57[_0x1028ba(0xfc)];}export async function selectMultipleApps(_0x15c7b1){const _0x4f27e2=a38_0x59ba;writeCliSideChannelLine('正在获取可用应用列表...');let _0x48dcbc;try{_0x48dcbc=await withActiveCookie(_0x15c7b1,()=>listRemoteApps());}catch(_0x1d97de){writeCliSideChannelLine(_0x4f27e2(0x115));if(_0x1d97de instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x1d97de[_0x4f27e2(0x110)]+')');return'custom';}if(_0x48dcbc['length']===0x0)return writeCliSideChannelLine(_0x4f27e2(0x113)),'custom';return promptAppSelection(_0x48dcbc);}async function _fallbackOrSkip(){const _0x13bbdb=a38_0x59ba,_0x4a01e9=await select({'message':'App\x20Code:','choices':[{'name':a38_0x5b30fd[_0x13bbdb(0x116)]('(跳过,稍后配置)'),'value':'skip'},{'name':a38_0x5b30fd[_0x13bbdb(0xff)]('✎\x20手动输入'),'value':_0x13bbdb(0xfd)}]});if(_0x4a01e9===_0x13bbdb(0x100))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x28e96b=a39_0x1992;(function(_0x5be558,_0x8a74d0){const _0x591091=a39_0x1992,_0x5e9185=_0x5be558();while(!![]){try{const _0x32bfaa=-parseInt(_0x591091(0x1e6))/0x1+-parseInt(_0x591091(0x1e7))/0x2*(-parseInt(_0x591091(0x1f1))/0x3)+parseInt(_0x591091(0x1e8))/0x4*(-parseInt(_0x591091(0x1e9))/0x5)+-parseInt(_0x591091(0x1eb))/0x6+-parseInt(_0x591091(0x1fa))/0x7*(parseInt(_0x591091(0x1f9))/0x8)+-parseInt(_0x591091(0x1f4))/0x9+parseInt(_0x591091(0x1f6))/0xa*(parseInt(_0x591091(0x1ee))/0xb);if(_0x32bfaa===_0x8a74d0)break;else _0x5e9185['push'](_0x5e9185['shift']());}catch(_0x528fda){_0x5e9185['push'](_0x5e9185['shift']());}}}(a39_0x2fa5,0x644a8));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a39_0x28e96b(0x1f8)};function a39_0x1992(_0x1ba982,_0x3bc0d1){_0x1ba982=_0x1ba982-0x1e6;const _0x2fa5c7=a39_0x2fa5();let _0x1992e5=_0x2fa5c7[_0x1ba982];return _0x1992e5;}export const CODE_FLAG={'name':a39_0x28e96b(0x1ed),'type':a39_0x28e96b(0x1f3),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};function a39_0x2fa5(){const _0x20fabc=['SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','string','4046274wKpcKk','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','5752000boPDhd','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','1096hFmoGY','38549NEDqvP','667201OUDzmL','83696BurNvB','16hEWZaA','907105pFHNhv','Dataset\x20code\x20(32-char\x20hex\x20UUID)','3478164bNmcjb','Database\x20product\x20type','code','55GnVWWM','datasetcode','dbtype','51rHgjJJ'];a39_0x2fa5=function(){return _0x20fabc;};return a39_0x2fa5();}export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a39_0x28e96b(0x1ef),'description':a39_0x28e96b(0x1ea)};export const SQLCODE_FLAG={'name':'sqlcode','type':a39_0x28e96b(0x1f3),'required':!![],'description':a39_0x28e96b(0x1f2),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x28e96b(0x1f5)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a39_0x28e96b(0x1f3),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a39_0x28e96b(0x1f7)};export const DB_TYPE_FLAG={'name':a39_0x28e96b(0x1f0),'type':a39_0x28e96b(0x1f3),'required':!![],'description':a39_0x28e96b(0x1ec),'enum':['MYSQL','POSTGRESQL']};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a40_0x4b49(_0x336398,_0x6a7a18){_0x336398=_0x336398-0x89;const _0x3013b0=a40_0x3013();let _0x4b4904=_0x3013b0[_0x336398];return _0x4b4904;}(function(_0x184370,_0x4d3278){const _0x9e1667=a40_0x4b49,_0x155dba=_0x184370();while(!![]){try{const _0x165338=-parseInt(_0x9e1667(0x98))/0x1+-parseInt(_0x9e1667(0x94))/0x2*(-parseInt(_0x9e1667(0x96))/0x3)+-parseInt(_0x9e1667(0x89))/0x4+-parseInt(_0x9e1667(0x8e))/0x5*(-parseInt(_0x9e1667(0x8b))/0x6)+parseInt(_0x9e1667(0x8f))/0x7+-parseInt(_0x9e1667(0x95))/0x8+parseInt(_0x9e1667(0x97))/0x9*(parseInt(_0x9e1667(0x91))/0xa);if(_0x165338===_0x4d3278)break;else _0x155dba['push'](_0x155dba['shift']());}catch(_0x5c6616){_0x155dba['push'](_0x155dba['shift']());}}}(a40_0x3013,0xe960c));function a40_0x3013(){const _0x326c43=['3446820sQzzLB','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','30tHhpTz','test','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1187455uSPwXt','3304651YxWppm','length','10zPkRmq','App\x20Code\x20cannot\x20be\x20empty','trim','377702sLjjAU','9615864TPiVOx','6oEAXyb','11478546GRnmTz','293040UhEjuL'];a40_0x3013=function(){return _0x326c43;};return a40_0x3013();}export function validateAppcode(_0x28a589){const _0x33f715=a40_0x4b49,_0x1df159=_0x28a589[_0x33f715(0x93)]();if(!_0x1df159)return{'valid':![],'message':_0x33f715(0x92)};if(_0x1df159[_0x33f715(0x90)]>0x64)return{'valid':![],'message':_0x33f715(0x8d)};if(!/^[A-Za-z0-9_-]+$/[_0x33f715(0x8c)](_0x1df159))return{'valid':![],'message':_0x33f715(0x8a)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a41_0x729793=a41_0x1cf3;(function(_0x5cc445,_0x5af513){const _0x22a387=a41_0x1cf3,_0x58219c=_0x5cc445();while(!![]){try{const _0x1adb1=-parseInt(_0x22a387(0x162))/0x1+parseInt(_0x22a387(0x15a))/0x2+-parseInt(_0x22a387(0x15d))/0x3+parseInt(_0x22a387(0x15e))/0x4*(parseInt(_0x22a387(0x157))/0x5)+parseInt(_0x22a387(0x152))/0x6*(parseInt(_0x22a387(0x158))/0x7)+-parseInt(_0x22a387(0x154))/0x8+parseInt(_0x22a387(0x156))/0x9*(parseInt(_0x22a387(0x161))/0xa);if(_0x1adb1===_0x5af513)break;else _0x58219c['push'](_0x58219c['shift']());}catch(_0x49affa){_0x58219c['push'](_0x58219c['shift']());}}}(a41_0x6d8e,0xbcb32));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';function a41_0x6d8e(){const _0x39fece=['10SGLWth','21434QAxkwN','appcode','object','get','Usage:\x20','8055726HSqRAH','config','2023104oEmQtj','validation','2221983gBtOii','5ERkbaH','7uPtVcK','app','973054FzAGOn','Missing\x20key.','\x20config\x20get\x20--key\x20<key>','3213474BUOPkC','169436arCpBf','key','Get\x20a\x20config\x20value\x20by\x20key'];a41_0x6d8e=function(){return _0x39fece;};return a41_0x6d8e();}async function execute(_0x18848e){const _0x47bb18=a41_0x1cf3,_0x331cc8=_0x18848e['str'](_0x47bb18(0x15f));if(!_0x331cc8)throw CliErrors[_0x47bb18(0x155)](_0x47bb18(0x15b),_0x47bb18(0x151)+CLI_BIN_NAME+_0x47bb18(0x15c));const _0x3c840e=readConfig(),_0x527b7=_0x331cc8===_0x47bb18(0x159)?_0x47bb18(0x163):_0x331cc8,_0x344c19=_0x3c840e[_0x527b7];if(_0x344c19===undefined)throw CliErrors[_0x47bb18(0x155)]('Key\x20not\x20found:\x20'+_0x331cc8);return{'ok':!![],'data':typeof _0x344c19===_0x47bb18(0x164)?_0x344c19:{[_0x527b7]:_0x344c19},'message':typeof _0x344c19===_0x47bb18(0x164)?undefined:String(_0x344c19)};}function a41_0x1cf3(_0x224b21,_0x41544e){_0x224b21=_0x224b21-0x151;const _0x6d8e4=a41_0x6d8e();let _0x1cf3b3=_0x6d8e4[_0x224b21];return _0x1cf3b3;}export const configGetDefinition={'service':a41_0x729793(0x153),'command':a41_0x729793(0x165),'description':a41_0x729793(0x160),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x729793(0x15f),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a42_0x5ae6(){const _0x4409e5=['447kWKMzU','115790QgWNid','66lJtGFK','23028tySmfU','22WilHrI','208ESomWx','99LqbMkz','5631468UpoDTm','90995gzWsja','170XdapSj','52LoHRDM','5225122Jjylga','11879yCdWwG','2106kODcVS'];a42_0x5ae6=function(){return _0x4409e5;};return a42_0x5ae6();}(function(_0x48c13d,_0x2bcbb4){const _0x5352df=a42_0x528a,_0x1ea1a3=_0x48c13d();while(!![]){try{const _0x126ef4=-parseInt(_0x5352df(0xdf))/0x1*(-parseInt(_0x5352df(0xe3))/0x2)+parseInt(_0x5352df(0xe4))/0x3*(parseInt(_0x5352df(0xe7))/0x4)+parseInt(_0x5352df(0xde))/0x5*(parseInt(_0x5352df(0xe6))/0x6)+-parseInt(_0x5352df(0xe2))/0x7*(parseInt(_0x5352df(0xe9))/0x8)+-parseInt(_0x5352df(0xea))/0x9*(parseInt(_0x5352df(0xe5))/0xa)+parseInt(_0x5352df(0xe8))/0xb*(parseInt(_0x5352df(0xdd))/0xc)+-parseInt(_0x5352df(0xe0))/0xd*(parseInt(_0x5352df(0xe1))/0xe);if(_0x126ef4===_0x2bcbb4)break;else _0x1ea1a3['push'](_0x1ea1a3['shift']());}catch(_0xe0ce51){_0x1ea1a3['push'](_0x1ea1a3['shift']());}}}(a42_0x5ae6,0x7ccd3));function a42_0x528a(_0x3a3e87,_0x2fb203){_0x3a3e87=_0x3a3e87-0xdd;const _0x5ae601=a42_0x5ae6();let _0x528ad1=_0x5ae601[_0x3a3e87];return _0x528ad1;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x1e9666=a43_0x6fdb;(function(_0x2f5531,_0x5d3e7d){const _0x248a79=a43_0x6fdb,_0x206d70=_0x2f5531();while(!![]){try{const _0x5e8c43=-parseInt(_0x248a79(0xe5))/0x1*(-parseInt(_0x248a79(0xe3))/0x2)+parseInt(_0x248a79(0xdf))/0x3*(-parseInt(_0x248a79(0xd7))/0x4)+-parseInt(_0x248a79(0xe1))/0x5*(-parseInt(_0x248a79(0xde))/0x6)+parseInt(_0x248a79(0xe7))/0x7*(-parseInt(_0x248a79(0xdd))/0x8)+parseInt(_0x248a79(0xe6))/0x9*(-parseInt(_0x248a79(0xe8))/0xa)+-parseInt(_0x248a79(0xdb))/0xb*(-parseInt(_0x248a79(0xd8))/0xc)+parseInt(_0x248a79(0xdc))/0xd;if(_0x5e8c43===_0x5d3e7d)break;else _0x206d70['push'](_0x206d70['shift']());}catch(_0x592174){_0x206d70['push'](_0x206d70['shift']());}}}(a43_0x32b0,0x90c81));import{readScopedConfig}from'../../commands/config/shared.js';function a43_0x32b0(){const _0x45c09c=['List\x20all\x20config\x20values','global','bool','1553404AGUisT','1450236SSlYXf','config','read','11MwUrUO','27967875WQnUpI','24qestXU','72042SvAVWt','3wzEZVU','list','5PbECaJ','boolean','1934HFwdcs','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','531snemrK','63yPIUJG','2444603DCyzxV','1098070zDyBER'];a43_0x32b0=function(){return _0x45c09c;};return a43_0x32b0();}function a43_0x6fdb(_0x36c51b,_0x3ccc80){_0x36c51b=_0x36c51b-0xd4;const _0x32b05c=a43_0x32b0();let _0x6fdbc7=_0x32b05c[_0x36c51b];return _0x6fdbc7;}import{readConfig}from'../../utils/config.js';async function execute(_0xabd3bc){const _0x4e0e7a=a43_0x6fdb,_0x724dbc=_0xabd3bc[_0x4e0e7a(0xd6)](_0x4e0e7a(0xd5))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x724dbc};}export const configListDefinition={'service':a43_0x1e9666(0xd9),'command':a43_0x1e9666(0xe0),'description':a43_0x1e9666(0xd4),'risk':a43_0x1e9666(0xda),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x1e9666(0xd5),'type':a43_0x1e9666(0xe2),'description':a43_0x1e9666(0xe4),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a44_0xb2b0ab=a44_0x43af;function a44_0x43af(_0x290b4e,_0x1034ef){_0x290b4e=_0x290b4e-0x12c;const _0x7d88be=a44_0x7d88();let _0x43af38=_0x7d88be[_0x290b4e];return _0x43af38;}(function(_0xd0e94,_0x618a3b){const _0x157522=a44_0x43af,_0x5ee750=_0xd0e94();while(!![]){try{const _0x5b795d=-parseInt(_0x157522(0x139))/0x1*(parseInt(_0x157522(0x153))/0x2)+parseInt(_0x157522(0x135))/0x3*(-parseInt(_0x157522(0x14e))/0x4)+parseInt(_0x157522(0x12e))/0x5*(-parseInt(_0x157522(0x15a))/0x6)+parseInt(_0x157522(0x12c))/0x7*(-parseInt(_0x157522(0x14c))/0x8)+-parseInt(_0x157522(0x130))/0x9+parseInt(_0x157522(0x159))/0xa*(parseInt(_0x157522(0x13b))/0xb)+parseInt(_0x157522(0x13d))/0xc;if(_0x5b795d===_0x618a3b)break;else _0x5ee750['push'](_0x5ee750['shift']());}catch(_0x298a7e){_0x5ee750['push'](_0x5ee750['shift']());}}}(a44_0x7d88,0xae1df));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a44_0x7d88(){const _0x2c8913=['length','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','6vEXFGu','Settable\x20top-level\x20keys:\x20','2444321dUQRKh','Invalid\x20locale\x20value.','32174520IXGmxV','Project','env','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Missing\x20key.','app','`,\x20`','appcode','string','key','\x20app\x20add\x20<name>\x20--appcode\x20','apps','\x22.\x20Allowed:\x20','config','234568svSgcr','global','4680140YGgRqp','locale','riskLevel','value','Use\x20`','32726AQmZNW','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Config\x20value','validation','\x22\x20is\x20not\x20settable.','Usage:\x20','60nIUMxv','193074JRyAIA','keys','includes','join','boolean','object','63eqWuYU','write','80hCFImF','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','11288943QFsecJ','str','Set\x20a\x20config\x20value','Global','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','3EiPfcv','bool'];a44_0x7d88=function(){return _0x2c8913;};return a44_0x7d88();}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x397c49){const _0x4d1bf5=a44_0x43af,_0x1d9147=_0x397c49[_0x4d1bf5(0x131)](_0x4d1bf5(0x147)),_0x4c07eb=_0x397c49[_0x4d1bf5(0x131)](_0x4d1bf5(0x151));if(!_0x1d9147)throw CliErrors[_0x4d1bf5(0x156)](_0x4d1bf5(0x142),_0x4d1bf5(0x158)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x4c07eb===undefined||_0x4c07eb==='')throw CliErrors[_0x4d1bf5(0x156)]('Missing\x20value.','Usage:\x20'+CLI_BIN_NAME+_0x4d1bf5(0x154));if(_0x4c07eb['length']>0x1f4)throw CliErrors['validation'](_0x4d1bf5(0x140));if(!isTopLevelConfigKey(_0x1d9147))throw CliErrors[_0x4d1bf5(0x156)]('Top-level\x20key\x20\x22'+_0x1d9147+_0x4d1bf5(0x157),_0x4d1bf5(0x13a)+getTopLevelConfigKeySummary());if(_0x1d9147===_0x4d1bf5(0x150))throw CliErrors[_0x4d1bf5(0x156)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x1d9147]&&!CONFIG_ENUM_VALUES[_0x1d9147][_0x4d1bf5(0x15c)](_0x4c07eb))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x1d9147+_0x4d1bf5(0x14a)+CONFIG_ENUM_VALUES[_0x1d9147][_0x4d1bf5(0x15d)](',\x20'));if(_0x1d9147===_0x4d1bf5(0x14f)&&!normalizeLocale(_0x4c07eb))throw CliErrors['validation'](_0x4d1bf5(0x13c),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0x4edfb4={'global':_0x397c49[_0x4d1bf5(0x136)](_0x4d1bf5(0x14d))},_0x45c53a=resolveWriteScope(_0x4edfb4),_0x3c489a=readScopedConfig(_0x45c53a);let _0x1a3337=_0x1d9147,_0x1f9e29=_0x4c07eb;_0x1d9147===_0x4d1bf5(0x143)&&(_0x1a3337='appcode',delete _0x3c489a[_0x4d1bf5(0x143)]);_0x1d9147===_0x4d1bf5(0x14f)&&(_0x1f9e29=normalizeLocale(_0x4c07eb));if(_0x1d9147===_0x4d1bf5(0x13f)){_0x1f9e29=normalizeEnv(_0x4c07eb);if(!isProduction(_0x1f9e29)&&!isDaily(_0x1f9e29))throw CliErrors[_0x4d1bf5(0x156)](_0x4d1bf5(0x138),_0x4d1bf5(0x141));}if(_0x1d9147===_0x4d1bf5(0x145)){const _0x27134c=_0x3c489a[_0x4d1bf5(0x149)]&&typeof _0x3c489a[_0x4d1bf5(0x149)]===_0x4d1bf5(0x15f)?Object[_0x4d1bf5(0x15b)](_0x3c489a[_0x4d1bf5(0x149)]):[];if(_0x27134c[_0x4d1bf5(0x137)]>0x0)throw CliErrors[_0x4d1bf5(0x156)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x4d1bf5(0x152)+CLI_BIN_NAME+_0x4d1bf5(0x148)+_0x1f9e29+_0x4d1bf5(0x144)+CLI_BIN_NAME+_0x4d1bf5(0x134));const _0x388f9e=buildCanonicalProjectConfig({..._0x3c489a},{'appCodes':[_0x1f9e29],'env':typeof _0x3c489a[_0x4d1bf5(0x13f)]===_0x4d1bf5(0x146)?_0x3c489a['env']:undefined});writeScopedConfig(_0x388f9e,_0x45c53a);const _0x3e3412=_0x45c53a===_0x4d1bf5(0x14d)?_0x4d1bf5(0x133):'Project';return{'ok':!![],'message':'✓\x20'+_0x3e3412+'\x20appcode\x20set\x20to:\x20'+_0x1f9e29+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x3c489a[_0x1a3337]=_0x1f9e29,writeScopedConfig(_0x3c489a,_0x45c53a);const _0x1a4061=_0x45c53a===_0x4d1bf5(0x14d)?_0x4d1bf5(0x133):_0x4d1bf5(0x13e);return{'ok':!![],'message':'✓\x20'+_0x1a4061+'\x20'+_0x1a3337+'\x20set\x20to:\x20'+_0x1f9e29};}export const configSetDefinition={'service':a44_0xb2b0ab(0x14b),'command':'set','description':a44_0xb2b0ab(0x132),'risk':a44_0xb2b0ab(0x12d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a44_0xb2b0ab(0x146),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0xb2b0ab(0x151),'type':a44_0xb2b0ab(0x146),'description':a44_0xb2b0ab(0x155),'required':!![]},{'name':a44_0xb2b0ab(0x14d),'type':a44_0xb2b0ab(0x15e),'description':a44_0xb2b0ab(0x12f),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5bfa80,_0x342a9d){var _0x202c68=a45_0x3819,_0x55dc40=_0x5bfa80();while(!![]){try{var _0x1f4836=parseInt(_0x202c68(0xfc))/0x1+parseInt(_0x202c68(0xf1))/0x2+-parseInt(_0x202c68(0xfe))/0x3*(parseInt(_0x202c68(0xf7))/0x4)+-parseInt(_0x202c68(0xf3))/0x5*(parseInt(_0x202c68(0xfd))/0x6)+-parseInt(_0x202c68(0xf4))/0x7+parseInt(_0x202c68(0xf5))/0x8+parseInt(_0x202c68(0xf9))/0x9;if(_0x1f4836===_0x342a9d)break;else _0x55dc40['push'](_0x55dc40['shift']());}catch(_0x402215){_0x55dc40['push'](_0x55dc40['shift']());}}}(a45_0x4c56,0x97602));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';function a45_0x4c56(){var _0xfcb037=['3738kiPZjF','3dJZFzh','validation','258662WXmxVU','global','8570LPvimh','4207350LfgbBy','6616096JiuaYN','\x20init`\x20first.','4797544cjnASE','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','20053926cvFEjn','project','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','303735EcQpCG'];a45_0x4c56=function(){return _0xfcb037;};return a45_0x4c56();}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};function a45_0x3819(_0x36f02f,_0x26b4e3){_0x36f02f=_0x36f02f-0xf0;var _0x4c56e3=a45_0x4c56();var _0x381919=_0x4c56e3[_0x36f02f];return _0x381919;}export function resolveWriteScope(_0x29fbb7){var _0x1ce66e=a45_0x3819;if(_0x29fbb7[_0x1ce66e(0xf2)])return _0x1ce66e(0xf2);if(!isInProject())throw CliErrors[_0x1ce66e(0xf0)](_0x1ce66e(0xfb),_0x1ce66e(0xf8)+CLI_BIN_NAME+_0x1ce66e(0xf6));return _0x1ce66e(0xfa);}export function readScopedConfig(_0x5d8e7a){return readConfigFile(resolveWriteConfigPath(_0x5d8e7a));}export function writeScopedConfig(_0x2b0565,_0x2a7217){writeConfigFile(resolveWriteConfigPath(_0x2a7217),_0x2b0565);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a46_0x2fb6b9=a46_0x1254;function a46_0x3524(){const _0x30dac3=['2329610NQwTNm','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','8036856PwhvNt','167672UzxdAQ','10426402OZCSLT','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','2312475uyBxiV','Filter\x20dataset\x20records\x20with\x20query\x20conditions','95165UJZrmk','join','438ompjeA','2182959DYDxex','8yNJsrx','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','143OSeAnr','filter','16evJwGR'];a46_0x3524=function(){return _0x30dac3;};return a46_0x3524();}function a46_0x1254(_0x361e97,_0x512f6f){_0x361e97=_0x361e97-0x161;const _0x35240d=a46_0x3524();let _0x1254b1=_0x35240d[_0x361e97];return _0x1254b1;}(function(_0xf91320,_0x47781d){const _0x49a003=a46_0x1254,_0x335e5b=_0xf91320();while(!![]){try{const _0x4ced26=-parseInt(_0x49a003(0x16f))/0x1*(-parseInt(_0x49a003(0x16b))/0x2)+parseInt(_0x49a003(0x161))/0x3*(-parseInt(_0x49a003(0x167))/0x4)+-parseInt(_0x49a003(0x163))/0x5*(-parseInt(_0x49a003(0x165))/0x6)+parseInt(_0x49a003(0x170))/0x7+parseInt(_0x49a003(0x16e))/0x8+parseInt(_0x49a003(0x166))/0x9+parseInt(_0x49a003(0x16c))/0xa*(-parseInt(_0x49a003(0x169))/0xb);if(_0x4ced26===_0x47781d)break;else _0x335e5b['push'](_0x335e5b['shift']());}catch(_0x244f85){_0x335e5b['push'](_0x335e5b['shift']());}}}(a46_0x3524,0xdb106));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a46_0x2fb6b9(0x16a),'operation':a46_0x2fb6b9(0x16a),'description':a46_0x2fb6b9(0x162),'paramsRequired':![],'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a46_0x2fb6b9(0x171),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a46_0x2fb6b9(0x168),a46_0x2fb6b9(0x16d)][a46_0x2fb6b9(0x164)]('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x811759=a47_0x5cbe;(function(_0x53c87d,_0x7329c2){const _0x7eaed=a47_0x5cbe,_0x403f0f=_0x53c87d();while(!![]){try{const _0xcba81b=-parseInt(_0x7eaed(0xe6))/0x1+parseInt(_0x7eaed(0xea))/0x2+parseInt(_0x7eaed(0xe7))/0x3+-parseInt(_0x7eaed(0xe5))/0x4+-parseInt(_0x7eaed(0xe8))/0x5*(parseInt(_0x7eaed(0xe2))/0x6)+parseInt(_0x7eaed(0xec))/0x7+parseInt(_0x7eaed(0xeb))/0x8*(parseInt(_0x7eaed(0xe4))/0x9);if(_0xcba81b===_0x7329c2)break;else _0x403f0f['push'](_0x403f0f['shift']());}catch(_0x51d3a5){_0x403f0f['push'](_0x403f0f['shift']());}}}(a47_0x184f,0xf172a));function a47_0x184f(){const _0x42c140=['1060782PDnJub','getOne','9351udzTeD','7153828NvzSYK','981440OxIgWy','1205124pPpvPZ','30beYJPn','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','223412WEFDSX','27624ACJsJL','5029976lIsdDO'];a47_0x184f=function(){return _0x42c140;};return a47_0x184f();}import{buildDataCommand}from'../../commands/data/shared.js';function a47_0x5cbe(_0x1d00b0,_0x10eb5f){_0x1d00b0=_0x1d00b0-0xe2;const _0x184f3f=a47_0x184f();let _0x5cbedf=_0x184f3f[_0x1d00b0];return _0x5cbedf;}export const dataGetOne=buildDataCommand({'command':a47_0x811759(0xe3),'operation':'getOne','description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsRequired':!![],'paramsHint':a47_0x811759(0xe9)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3c78ad,_0x174c78){const _0x2abc80=a48_0x23b2,_0x5b1bf4=_0x3c78ad();while(!![]){try{const _0xc88bd=parseInt(_0x2abc80(0x1ac))/0x1+-parseInt(_0x2abc80(0x1a6))/0x2*(parseInt(_0x2abc80(0x1a5))/0x3)+parseInt(_0x2abc80(0x1aa))/0x4*(-parseInt(_0x2abc80(0x1a4))/0x5)+-parseInt(_0x2abc80(0x1ad))/0x6*(parseInt(_0x2abc80(0x1a8))/0x7)+-parseInt(_0x2abc80(0x1ae))/0x8+-parseInt(_0x2abc80(0x1a7))/0x9*(parseInt(_0x2abc80(0x1ab))/0xa)+parseInt(_0x2abc80(0x1a9))/0xb;if(_0xc88bd===_0x174c78)break;else _0x5b1bf4['push'](_0x5b1bf4['shift']());}catch(_0x4136b9){_0x5b1bf4['push'](_0x5b1bf4['shift']());}}}(a48_0x2a63,0x4f838));import{dataFilter}from'../../commands/data/filter.js';function a48_0x2a63(){const _0x4c61c6=['636609kUMTuf','2UPYDUO','1853649QyyyLc','1967nzXcyw','11288068ujJcpj','1033624YDdDWb','10OlBElt','236596DVXnqB','36XUXSHG','3472EaLkuQ','10AjhEfn'];a48_0x2a63=function(){return _0x4c61c6;};return a48_0x2a63();}import{dataGetOne}from'../../commands/data/getOne.js';function a48_0x23b2(_0x14bfdb,_0x25714c){_0x14bfdb=_0x14bfdb-0x1a4;const _0x2a6301=a48_0x2a63();let _0x23b284=_0x2a6301[_0x14bfdb];return _0x23b284;}export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3199e7,_0x5397d1){const _0x239faa=a49_0x358a,_0x464d72=_0x3199e7();while(!![]){try{const _0x3aff65=parseInt(_0x239faa(0xf5))/0x1+-parseInt(_0x239faa(0xeb))/0x2*(-parseInt(_0x239faa(0xee))/0x3)+-parseInt(_0x239faa(0xef))/0x4*(parseInt(_0x239faa(0xfb))/0x5)+-parseInt(_0x239faa(0xf3))/0x6*(parseInt(_0x239faa(0xf8))/0x7)+parseInt(_0x239faa(0x103))/0x8+-parseInt(_0x239faa(0x101))/0x9+parseInt(_0x239faa(0xf7))/0xa*(parseInt(_0x239faa(0xea))/0xb);if(_0x3aff65===_0x5397d1)break;else _0x464d72['push'](_0x464d72['shift']());}catch(_0x7fcae0){_0x464d72['push'](_0x464d72['shift']());}}}(a49_0x5446,0x33006));function a49_0x5446(){const _0x52b10d=['str','operation','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','\x20completed\x20in\x20','data','22374GsvQwz','393398ugHCPV','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','now','3EoiuNq','26684SnwhJN','description','data\x20','appCode','54IfGSBn','getOne','415916NpKsvH','command','80MfLOIZ','204904FWbrZm','paramsHint','code','155UUyXjS','helpExtra','alias','validation','params','read','266364UfKBCr','flagMissing','638880jZqNYH','string','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params'];a49_0x5446=function(){return _0x52b10d;};return a49_0x5446();}import{executeDatasetDataOperation}from'../../core/api-client.js';function a49_0x358a(_0x5167ab,_0x4b4873){_0x5167ab=_0x5167ab-0xe9;const _0x5446e0=a49_0x5446();let _0x358a8d=_0x5446e0[_0x5167ab];return _0x358a8d;}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x2eab23){const _0x2a06d9=a49_0x358a;if(!_0x2eab23)throw CliErrors[_0x2a06d9(0x102)](_0x2a06d9(0xff),_0x2a06d9(0xec));const _0x432f94=_0x2eab23['id'];if(_0x432f94===undefined||_0x432f94===null||_0x432f94==='')throw CliErrors[_0x2a06d9(0xfe)](_0x2a06d9(0x105),_0x2a06d9(0x108));}function parseCommandParams(_0x5a512f){return parseJsonParams(_0x5a512f)??{};}export function buildDataCommand(_0x53b82f){const _0x18e054=a49_0x358a,_0x1fd20a='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':_0x18e054(0xe9),'command':_0x53b82f[_0x18e054(0xf6)],'description':_0x53b82f[_0x18e054(0xf0)],'risk':_0x18e054(0x100),'defaultOutputFormat':'compress','helpExtra':_0x53b82f[_0x18e054(0xfc)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x18e054(0xfd),'type':_0x18e054(0x104),'description':_0x1fd20a},{'name':'params','type':_0x18e054(0x104),'description':_0x53b82f[_0x18e054(0xf9)]}],async 'validate'(_0x5bb484){const _0x477e6f=_0x18e054,_0x338ee8=_0x5bb484['str'](_0x477e6f(0xff));if(_0x53b82f['paramsRequired']&&!_0x338ee8)throw CliErrors[_0x477e6f(0x102)](_0x477e6f(0xff),_0x53b82f[_0x477e6f(0xf9)]);const _0x1ac53d=parseJsonParams(_0x338ee8);_0x53b82f[_0x477e6f(0x107)]===_0x477e6f(0xf4)&&assertGetOneId(_0x1ac53d);},async 'execute'(_0x58478c){const _0x18c375=_0x18e054,_0x23636f=parseCommandParams(_0x58478c[_0x18c375(0x106)]('params')),_0x5314ec=Date[_0x18c375(0xed)](),_0x4b9271=await executeDatasetDataOperation(_0x58478c[_0x18c375(0xf2)],_0x58478c[_0x18c375(0x106)](_0x18c375(0xfa)),_0x53b82f['operation'],_0x23636f),_0x53fa0d=Date['now']()-_0x5314ec;return{'ok':!![],'data':{'result':_0x4b9271,'elapsed':_0x53fa0d},'message':_0x18c375(0xf1)+_0x53b82f[_0x18c375(0xf6)]+_0x18c375(0x109)+_0x53fa0d+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x399f07=a50_0x1f11;(function(_0x320a8f,_0x14487c){const _0x377fa8=a50_0x1f11,_0x1d22f0=_0x320a8f();while(!![]){try{const _0x306247=-parseInt(_0x377fa8(0x1de))/0x1*(parseInt(_0x377fa8(0x1ca))/0x2)+parseInt(_0x377fa8(0x1e4))/0x3+parseInt(_0x377fa8(0x1cb))/0x4+parseInt(_0x377fa8(0x1c0))/0x5*(parseInt(_0x377fa8(0x1e7))/0x6)+-parseInt(_0x377fa8(0x1d7))/0x7+-parseInt(_0x377fa8(0x1b7))/0x8+parseInt(_0x377fa8(0x1be))/0x9;if(_0x306247===_0x14487c)break;else _0x1d22f0['push'](_0x1d22f0['shift']());}catch(_0x3c5353){_0x1d22f0['push'](_0x1d22f0['shift']());}}}(a50_0x5521,0x2acc3));import{deleteDataset,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a50_0x1f11(_0x49876a,_0x2b6d52){_0x49876a=_0x49876a-0x1b4;const _0x5521c1=a50_0x5521();let _0x1f1110=_0x5521c1[_0x49876a];return _0x1f1110;}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a50_0x399f07(0x1da),'description':a50_0x399f07(0x1b9)},DBID_FLAG={'name':'dbid','type':a50_0x399f07(0x1da),'description':a50_0x399f07(0x1e1)},CONFIRM_FLAG={'name':'confirm','type':'boolean','description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a50_0x399f07(0x1da),'description':a50_0x399f07(0x1dd)};export const datasetDelete={'service':a50_0x399f07(0x1c8),'command':'delete','description':a50_0x399f07(0x1cf),'risk':a50_0x399f07(0x1b8),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x52782b){const _0x42fbe9=a50_0x399f07,_0x468889=_0x52782b[_0x42fbe9(0x1d9)]('id'),_0x44b31b=_0x52782b[_0x42fbe9(0x1e6)](_0x42fbe9(0x1c5)),_0x2b69fd=_0x52782b[_0x42fbe9(0x1d9)](_0x42fbe9(0x1d2)),_0x57946d=[_0x468889>0x0,Boolean(_0x44b31b),_0x2b69fd>0x0]['filter'](Boolean);if(_0x57946d[_0x42fbe9(0x1cc)]===0x0)throw CliErrors[_0x42fbe9(0x1b5)](_0x42fbe9(0x1d3));if(_0x57946d[_0x42fbe9(0x1cc)]>0x1)throw CliErrors[_0x42fbe9(0x1b5)](_0x42fbe9(0x1c3));},async 'dryRun'(_0x4d6a43){const _0x442e1d=a50_0x399f07,_0x19eda3=await resolveTargets(_0x4d6a43);return{'method':_0x442e1d(0x1bc),'url':'/smartapi/dataset/delete-dataset','body':{'appCode':_0x4d6a43[_0x442e1d(0x1e2)],'count':_0x19eda3[_0x442e1d(0x1cc)],'datasets':_0x19eda3},'description':_0x442e1d(0x1bd)+_0x19eda3[_0x442e1d(0x1cc)]+_0x442e1d(0x1e5)};},async 'execute'(_0x14bd22){const _0xbbacc=a50_0x399f07;if(!_0x14bd22[_0xbbacc(0x1c7)]('confirm'))throw CliErrors[_0xbbacc(0x1b5)](_0xbbacc(0x1e3),_0xbbacc(0x1bf));const _0x1fc126=await resolveTargets(_0x14bd22),_0x335aae=[],_0x459e70=[];for(const _0x29a64f of _0x1fc126){try{await deleteDataset(_0x14bd22[_0xbbacc(0x1e2)],_0x29a64f['id']),_0x335aae[_0xbbacc(0x1c9)](_0x29a64f);}catch(_0x57b384){_0x459e70['push']({..._0x29a64f,'error':_0x57b384 instanceof Error?_0x57b384[_0xbbacc(0x1c1)]:String(_0x57b384)});}}if(_0x459e70['length']>0x0)return{'ok':![],'data':{'requested':_0x1fc126[_0xbbacc(0x1cc)],'deletedCount':_0x335aae[_0xbbacc(0x1cc)],'failedCount':_0x459e70[_0xbbacc(0x1cc)],'deleted':_0x335aae,'failed':_0x459e70},'message':_0xbbacc(0x1bb)+_0x335aae[_0xbbacc(0x1cc)]+'/'+_0x1fc126[_0xbbacc(0x1cc)]+_0xbbacc(0x1c6)+_0x459e70[_0xbbacc(0x1cc)]+_0xbbacc(0x1d4)};return{'ok':!![],'data':{'requested':_0x1fc126['length'],'deletedCount':_0x335aae[_0xbbacc(0x1cc)],'deleted':_0x335aae},'message':'Deleted\x20'+_0x335aae[_0xbbacc(0x1cc)]+_0xbbacc(0x1b4)};}};function a50_0x5521(){const _0xdb1106=['Deleted\x20','POST','Would\x20delete\x20','2172168jczrmv','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','1174655LOWzOB','message','expected-count','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','filter','code','\x20dataset(s);\x20','bool','dataset','push','78nseAtz','46712IEfEIS','length','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','isArray','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','tableName','description','dbid','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','\x20failed','dbId','No\x20undeleted\x20dataset\x20found\x20for\x20','1911693HhgyKa','id=','num','number','relationPages','Matched\x20','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','1772ClwLxx','dbName','map','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','appCode','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','418923swrByb','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','str','6WaUNtR','\x20dataset(s)','validation','name','880768dNAuzN','high-risk-write','Dataset\x20id','dbid='];a50_0x5521=function(){return _0xdb1106;};return a50_0x5521();}async function resolveTargets(_0x267490){const _0x2c5259=a50_0x399f07,_0x4ba3ba=_0x267490[_0x2c5259(0x1d9)]('id'),_0x20d121=_0x267490[_0x2c5259(0x1e6)](_0x2c5259(0x1c5)),_0x378417=_0x267490['num']('dbid');let _0x599829;_0x20d121?(_0x599829=await listDatasets(_0x267490['appCode'],{'code':_0x20d121}),_0x599829=_0x599829['filter'](_0x2f8093=>_0x2f8093[_0x2c5259(0x1c5)]===_0x20d121)):(_0x599829=await listDatasets(_0x267490[_0x2c5259(0x1e2)]),_0x4ba3ba>0x0&&(_0x599829=_0x599829[_0x2c5259(0x1c4)](_0x528974=>_0x528974['id']===_0x4ba3ba)),_0x378417>0x0&&(_0x599829=_0x599829[_0x2c5259(0x1c4)](_0x32975a=>_0x32975a['dbtableConfig']?.[_0x2c5259(0x1d5)]===_0x378417)));const _0x211d2e=_0x599829[_0x2c5259(0x1e0)](normalizeTarget);if(_0x211d2e[_0x2c5259(0x1cc)]===0x0){const _0x4aca36=_0x20d121||(_0x4ba3ba>0x0?_0x2c5259(0x1d8)+_0x4ba3ba:_0x2c5259(0x1ba)+_0x378417);throw CliErrors['validation'](_0x2c5259(0x1d6)+_0x4aca36+'.');}const _0x14edd6=_0x267490[_0x2c5259(0x1d9)](_0x2c5259(0x1c2));if(_0x14edd6>0x0&&_0x211d2e[_0x2c5259(0x1cc)]!==_0x14edd6)throw CliErrors[_0x2c5259(0x1b5)](_0x2c5259(0x1dc)+_0x211d2e[_0x2c5259(0x1cc)]+_0x2c5259(0x1cd)+_0x14edd6+'.');return _0x211d2e;}function normalizeTarget(_0x2c2fd2){const _0xa07fa4=a50_0x399f07,_0xfd70b3=_0x2c2fd2['dbtableConfig']??{};return{'id':_0x2c2fd2['id'],'code':_0x2c2fd2[_0xa07fa4(0x1c5)],'name':_0x2c2fd2[_0xa07fa4(0x1b6)],'description':_0x2c2fd2[_0xa07fa4(0x1d1)],'source':_0x2c2fd2['source'],'dbId':_0xfd70b3[_0xa07fa4(0x1d5)],'dbName':_0xfd70b3[_0xa07fa4(0x1df)],'tableName':_0xfd70b3[_0xa07fa4(0x1d0)],'relatedPageCount':Array[_0xa07fa4(0x1ce)](_0x2c2fd2[_0xa07fa4(0x1db)])?_0x2c2fd2[_0xa07fa4(0x1db)][_0xa07fa4(0x1cc)]:undefined};}
|