@lovrabet/rabetbase-cli 2.2.4-beta.1 → 2.2.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -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/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a157_0x41b335=a157_0x3d58;function a157_0x3d58(_0x1a674f,_0x53c98a){_0x1a674f=_0x1a674f-0x128;const _0x296e1f=a157_0x296e();let _0x3d5814=_0x296e1f[_0x1a674f];return _0x3d5814;}(function(_0x2eb918,_0x1cd541){const _0x172b4f=a157_0x3d58,_0x3e7de6=_0x2eb918();while(!![]){try{const _0x4abbbe=parseInt(_0x172b4f(0x137))/0x1*(-parseInt(_0x172b4f(0x12b))/0x2)+-parseInt(_0x172b4f(0x131))/0x3+parseInt(_0x172b4f(0x12d))/0x4*(-parseInt(_0x172b4f(0x133))/0x5)+-parseInt(_0x172b4f(0x12c))/0x6*(-parseInt(_0x172b4f(0x138))/0x7)+parseInt(_0x172b4f(0x12e))/0x8*(parseInt(_0x172b4f(0x129))/0x9)+-parseInt(_0x172b4f(0x130))/0xa*(-parseInt(_0x172b4f(0x132))/0xb)+parseInt(_0x172b4f(0x12f))/0xc*(parseInt(_0x172b4f(0x135))/0xd);if(_0x4abbbe===_0x1cd541)break;else _0x3e7de6['push'](_0x3e7de6['shift']());}catch(_0x1e486e){_0x3e7de6['push'](_0x3e7de6['shift']());}}}(a157_0x296e,0x57517));function a157_0x296e(){const _0x29ae47=['sql','52259peNxZz','151739OSqhkF','sql-trash','9fPEBjC','/sql','2jcDGoA','96CqhIjs','8FWWWiL','2574552SxRzJz','372VxFLqR','10CGSrAm','805533BFgOsf','1473307FCrcIq','1716335LwFdCQ','sql.lock.json','235833oomOBf'];a157_0x296e=function(){return _0x29ae47;};return a157_0x296e();}import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR='.rabetbase',LOCK_FILE_NAME=a157_0x41b335(0x134),TRASH_DIR_NAME=a157_0x41b335(0x128);export function loadSqlProjectConfig(_0x2f8bda,_0x3db15d){const _0x5bbe99=a157_0x41b335,_0x32e0f9=resolve(_0x3db15d??findProjectRootDirectory()),_0x3c88ac=DOT_DIR+_0x5bbe99(0x12a),_0x299d99=_0x3c88ac+'/'+_0x2f8bda;return{'projectRoot':_0x32e0f9,'appCode':_0x2f8bda,'sqlWorkspaceRoot':_0x3c88ac,'sqlRoot':_0x299d99,'sqlRootDir':resolve(_0x32e0f9,DOT_DIR,_0x5bbe99(0x136),_0x2f8bda),'lockFilePath':resolve(_0x32e0f9,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x32e0f9,DOT_DIR,TRASH_DIR_NAME)};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xbc1a30,_0x342922){const _0x5435e0=a158_0x1f33,_0x2f211f=_0xbc1a30();while(!![]){try{const _0x5db056=parseInt(_0x5435e0(0x1f4))/0x1+-parseInt(_0x5435e0(0x1f7))/0x2*(-parseInt(_0x5435e0(0x1fa))/0x3)+parseInt(_0x5435e0(0x1fc))/0x4+parseInt(_0x5435e0(0x202))/0x5*(-parseInt(_0x5435e0(0x200))/0x6)+parseInt(_0x5435e0(0x209))/0x7*(-parseInt(_0x5435e0(0x20c))/0x8)+parseInt(_0x5435e0(0x204))/0x9+parseInt(_0x5435e0(0x203))/0xa;if(_0x5db056===_0x342922)break;else _0x2f211f['push'](_0x2f211f['shift']());}catch(_0x589502){_0x2f211f['push'](_0x2f211f['shift']());}}}(a158_0x347c,0xd3482));function a158_0x1f33(_0x1b1c36,_0x4f6bfb){_0x1b1c36=_0x1b1c36-0x1ef;const _0x347c43=a158_0x347c();let _0x1f333f=_0x347c43[_0x1b1c36];return _0x1f333f;}import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function a158_0x347c(){const _0x172d56=['replace','sqlCode','toLowerCase','sql','indexOf','296409hjCKwj','test','mode','298GVEHoc','isFile','push','1635ghhMrT','isDirectory','3281820XBSPVL','name','sqlName','ENOENT','18tzeirj','.xml','2205195PvMyuv','8314800RTHOsq','9115182WsmUXd','length','code','path','.sql','14rQGLfA','dbId','sqlRootDir','3415280zfdUQL','slice'];a158_0x347c=function(){return _0x172d56;};return a158_0x347c();}function extensionToMode(_0x5150b7){const _0x43b252=a158_0x1f33;if(_0x5150b7===_0x43b252(0x208))return'sql';if(_0x5150b7===_0x43b252(0x201))return'mybatisXml';return undefined;}async function scanSqlFilesRecursively(_0x2f1343,_0x5caacf){const _0x1bee51=a158_0x1f33,_0xc6b8e3=[];try{const _0x408288=await readdir(_0x2f1343,{'withFileTypes':!![]});for(const _0x5a0ead of _0x408288){const _0x10877f=join(_0x2f1343,_0x5a0ead[_0x1bee51(0x1fd)]);if(_0x5a0ead['isDirectory']()){_0xc6b8e3[_0x1bee51(0x1f9)](...await scanSqlFilesRecursively(_0x10877f,_0x5caacf));continue;}if(!_0x5a0ead[_0x1bee51(0x1f8)]())continue;const _0x54a4fd=extname(_0x5a0ead['name'])[_0x1bee51(0x1f1)](),_0x323a90=extensionToMode(_0x54a4fd);if(!_0x323a90)continue;const _0x59b35b=relative(_0x5caacf,_0x10877f)[_0x1bee51(0x1ef)](/\\/g,'/'),_0x2f32f8=_0x59b35b['split']('/')['filter'](Boolean),_0x18053f=parseSqlPath(_0x2f32f8,_0x5a0ead[_0x1bee51(0x1fd)],_0x54a4fd);if(!_0x18053f)continue;_0xc6b8e3['push']({'sqlCode':_0x18053f['sqlCode'],'sqlName':_0x18053f['sqlName'],'dbDirectory':_0x2f32f8[0x0],'filePath':_0x10877f,'relativePath':_0x59b35b,'lockKey':_0x18053f[_0x1bee51(0x1f0)],'mode':_0x323a90});}}catch(_0x2be4d9){if(_0x2be4d9[_0x1bee51(0x206)]!==_0x1bee51(0x1ff))throw _0x2be4d9;}return _0xc6b8e3;}export async function scanLocalSqlQueries(_0x22de49){const _0x392541=a158_0x1f33;return scanSqlFilesRecursively(_0x22de49[_0x392541(0x20b)],_0x22de49[_0x392541(0x20b)]);}export function resolveLocalSqlFilePath(_0xc4c3ea,_0x59c1cf,_0x26973d){const _0x14dd9e=a158_0x1f33,_0x292676=_0x26973d?.[_0x14dd9e(0x207)]||(_0x26973d?.[_0x14dd9e(0x1fe)]||_0x26973d?.['dbName']?buildSqlRelativePath(_0x59c1cf,_0x26973d?.['sqlName'],_0x26973d?.['dbName'],_0x26973d?.[_0x14dd9e(0x1f6)]||_0x14dd9e(0x1f2),_0x26973d?.[_0x14dd9e(0x20a)]):buildDefaultSqlFileName(_0x59c1cf,_0x26973d?.[_0x14dd9e(0x1f6)]||_0x14dd9e(0x1f2)));return join(_0xc4c3ea['sqlRootDir'],_0x292676);}export async function directoryExists(_0x9ced36){const _0x4a0758=a158_0x1f33;try{const _0x3f9980=await stat(_0x9ced36);return _0x3f9980[_0x4a0758(0x1fb)]();}catch{return![];}}function parseSqlPath(_0x412177,_0x3f7029,_0x5c64d6){const _0x90a4fa=a158_0x1f33,_0x2cd994=_0x3f7029['slice'](0x0,-_0x5c64d6['length']);if(_0x412177[_0x90a4fa(0x205)]<0x2)return null;const _0x421174=_0x2cd994[_0x90a4fa(0x1f3)]('_');if(_0x421174<=0x0||_0x421174>=_0x2cd994['length']-0x1)return null;const _0x799990=_0x2cd994[_0x90a4fa(0x20d)](0x0,_0x421174);if(!isLikelySqlCode(_0x799990))return null;return{'sqlCode':_0x799990,'sqlName':_0x2cd994['slice'](_0x421174+0x1)};}function isLikelySqlCode(_0xbb8aa0){const _0x1ec1f2=a158_0x1f33;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x1ec1f2(0x1f5)](_0xbb8aa0);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x44fd58,_0x12bfb3){const _0x237c56=a159_0x2b44,_0x515057=_0x44fd58();while(!![]){try{const _0x133fd7=-parseInt(_0x237c56(0x1fd))/0x1*(parseInt(_0x237c56(0x1f4))/0x2)+parseInt(_0x237c56(0x1ee))/0x3*(parseInt(_0x237c56(0x1f7))/0x4)+-parseInt(_0x237c56(0x1f1))/0x5*(-parseInt(_0x237c56(0x1f9))/0x6)+parseInt(_0x237c56(0x1f5))/0x7*(-parseInt(_0x237c56(0x200))/0x8)+-parseInt(_0x237c56(0x201))/0x9*(parseInt(_0x237c56(0x1fb))/0xa)+-parseInt(_0x237c56(0x1ef))/0xb*(parseInt(_0x237c56(0x1f6))/0xc)+parseInt(_0x237c56(0x1f0))/0xd*(parseInt(_0x237c56(0x1f3))/0xe);if(_0x133fd7===_0x12bfb3)break;else _0x515057['push'](_0x515057['shift']());}catch(_0x12985f){_0x515057['push'](_0x515057['shift']());}}}(a159_0x2020,0xddf00));import{readFile}from'node:fs/promises';import a159_0x153734 from'node:crypto';function a159_0x2020(){const _0xe9264d=['189340bMKrIm','createHash','6302HrQZex','digest','md5','1352UtnTMt','432HNQbFd','3vhqXlE','330330gbRgCR','4069wzKrhZ','495005irQOOW','utf8','68292kNmrpl','2iaDoGz','63763HDmOxv','156TZNIvQ','5344712VTQgNG','hex','54gZfflW','update'];a159_0x2020=function(){return _0xe9264d;};return a159_0x2020();}function a159_0x2b44(_0x4a799c,_0x3ffcd0){_0x4a799c=_0x4a799c-0x1ee;const _0x2020f5=a159_0x2020();let _0x2b44b9=_0x2020f5[_0x4a799c];return _0x2b44b9;}export function computeSqlContentHash(_0x1b29a0){const _0x206d76=a159_0x2b44;return a159_0x153734[_0x206d76(0x1fc)](_0x206d76(0x1ff))[_0x206d76(0x1fa)](_0x1b29a0)[_0x206d76(0x1fe)](_0x206d76(0x1f8));}export async function computeSqlFileHash(_0x39c188){const _0x1e911a=a159_0x2b44,_0x4dee50=await readFile(_0x39c188,_0x1e911a(0x1f2));return computeSqlContentHash(_0x4dee50);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30e580,_0x5ed51e){const _0x5d3d58=a160_0x47d8,_0x4e7189=_0x30e580();while(!![]){try{const _0x3fd48f=parseInt(_0x5d3d58(0x76))/0x1+parseInt(_0x5d3d58(0x74))/0x2+-parseInt(_0x5d3d58(0x6a))/0x3*(parseInt(_0x5d3d58(0x68))/0x4)+parseInt(_0x5d3d58(0x75))/0x5+-parseInt(_0x5d3d58(0x78))/0x6+-parseInt(_0x5d3d58(0x72))/0x7*(-parseInt(_0x5d3d58(0x6d))/0x8)+parseInt(_0x5d3d58(0x66))/0x9;if(_0x3fd48f===_0x5ed51e)break;else _0x4e7189['push'](_0x4e7189['shift']());}catch(_0x188dc6){_0x4e7189['push'](_0x4e7189['shift']());}}}(a160_0x5e42,0x90cff));import{mkdir,readFile,writeFile}from'node:fs/promises';function a160_0x5e42(){const _0x5cc373=['84256DQKACY','3431895cplqiz','333877ZGEAds','sqlRoot','6368556KatbOB','12444597cgQkSD','\x22.\x20','113944ViBlUE','ENOENT','120rwpvvi','code','lastSync','40eSLvkY','apps',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','stringify','\x22\x20vs\x20lock\x20\x22','488460cUxchM','sqls'];a160_0x5e42=function(){return _0x5cc373;};return a160_0x5e42();}import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}function a160_0x47d8(_0x4bfc53,_0x424e37){_0x4bfc53=_0x4bfc53-0x66;const _0x5e42ca=a160_0x5e42();let _0x47d850=_0x5e42ca[_0x4bfc53];return _0x47d850;}export function ensureSqlLockScope(_0x1aa481,_0x109c0e,_0x5eb24f,_0x428538){const _0x6472d5=a160_0x47d8,_0x4a1a71=_0x1aa481??createEmptySqlLock();let _0x1b323d=_0x4a1a71[_0x6472d5(0x6e)][_0x109c0e];if(!_0x1b323d)return _0x1b323d={'sqlRoot':_0x5eb24f,'lastSync':'','sqls':{}},_0x4a1a71['apps'][_0x109c0e]=_0x1b323d,{'lockData':_0x4a1a71,'appLock':_0x1b323d};if(!_0x1b323d[_0x6472d5(0x77)])_0x1b323d[_0x6472d5(0x77)]=_0x5eb24f;else{if(_0x1b323d['sqlRoot']!==_0x5eb24f)throw new Error(_0x428538+_0x6472d5(0x6f)+_0x5eb24f+_0x6472d5(0x71)+_0x1b323d[_0x6472d5(0x77)]+_0x6472d5(0x67)+'Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x1b323d[_0x6472d5(0x73)]&&(_0x1b323d['sqls']={}),!_0x1b323d[_0x6472d5(0x6c)]&&(_0x1b323d[_0x6472d5(0x6c)]=''),{'lockData':_0x4a1a71,'appLock':_0x1b323d};}export async function readSqlLockFile(_0x507181){const _0x38e488=a160_0x47d8;try{const _0x2c5c29=await readFile(_0x507181,'utf8');return JSON['parse'](_0x2c5c29);}catch(_0x537530){if(_0x537530[_0x38e488(0x6b)]===_0x38e488(0x69))return null;throw new Error('Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20'+String(_0x537530));}}export async function writeSqlLockFile(_0x2486db,_0x11d282){const _0x54230a=a160_0x47d8;await mkdir(dirname(_0x2486db),{'recursive':!![]}),await writeFile(_0x2486db,JSON[_0x54230a(0x70)](_0x11d282,null,0x2),'utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x591714,_0x3697d2){const _0x2be662=a162_0x1402,_0x23e331=_0x591714();while(!![]){try{const _0x18d509=-parseInt(_0x2be662(0x136))/0x1*(-parseInt(_0x2be662(0x13f))/0x2)+parseInt(_0x2be662(0x13c))/0x3+-parseInt(_0x2be662(0x133))/0x4*(-parseInt(_0x2be662(0x12e))/0x5)+-parseInt(_0x2be662(0x12b))/0x6+-parseInt(_0x2be662(0x12f))/0x7*(parseInt(_0x2be662(0x12a))/0x8)+parseInt(_0x2be662(0x13b))/0x9*(-parseInt(_0x2be662(0x139))/0xa)+-parseInt(_0x2be662(0x12c))/0xb*(-parseInt(_0x2be662(0x13e))/0xc);if(_0x18d509===_0x3697d2)break;else _0x23e331['push'](_0x23e331['shift']());}catch(_0x2c4a51){_0x23e331['push'](_0x23e331['shift']());}}}(a162_0x1609,0xe17f6));export function detectSqlMode(_0x19c6e4){const _0x5b7bb3=a162_0x1402,_0x39d714=_0x19c6e4[_0x5b7bb3(0x12d)]();if(/^<(select|insert|update|delete)\b/i[_0x5b7bb3(0x130)](_0x39d714))return _0x5b7bb3(0x135);return _0x5b7bb3(0x137);}function a162_0x1609(){const _0x349949=['63lxQArb','2714967tMXUIH','.sql','20865132CknINJ','2534594YMeSEH','3584OxrzWk','6872802MqvaUP','11hoLNld','trimStart','694615xmxLFf','24304swfBhZ','test','unknown-sql','replace','12rBfGnS','trim','mybatisXml','1LwFtjl','sql','db-','1004650HGHRXJ','.xml'];a162_0x1609=function(){return _0x349949;};return a162_0x1609();}export function getSqlFileExtension(_0xc621e){const _0x591185=a162_0x1402;return _0xc621e==='mybatisXml'?_0x591185(0x13a):_0x591185(0x13d);}export function buildDefaultSqlFileName(_0x38b675,_0x4c3719){return''+_0x38b675+getSqlFileExtension(_0x4c3719);}export function sanitizeSqlPathSegment(_0x267f75,_0x1e3256){const _0x57ffe6=a162_0x1402,_0x2f41a7=String(_0x267f75??'')[_0x57ffe6(0x134)](),_0x7907af=_0x2f41a7[_0x57ffe6(0x132)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x57ffe6(0x132)](/\s+/g,'-')[_0x57ffe6(0x132)](/-+/g,'-')[_0x57ffe6(0x132)](/^\.+/,'')[_0x57ffe6(0x132)](/\.+$/,'')['replace'](/^-+/,'')['replace'](/-+$/,'');return _0x7907af||_0x1e3256;}function a162_0x1402(_0x36c8a8,_0x36171d){_0x36c8a8=_0x36c8a8-0x12a;const _0x1609f9=a162_0x1609();let _0x1402bd=_0x1609f9[_0x36c8a8];return _0x1402bd;}export function buildDbDirectoryName(_0x5171e5,_0x289a80){const _0x3d842f=a162_0x1402;return sanitizeSqlPathSegment(_0x5171e5,_0x289a80!=null?_0x3d842f(0x138)+_0x289a80:'unknown-db');}export function buildSqlRelativePath(_0x32d662,_0x324e6a,_0xf346fb,_0x3cf97e,_0x1fc920){const _0x5c7844=a162_0x1402,_0x22cffe=buildDbDirectoryName(_0xf346fb,_0x1fc920),_0x13a3c3=sanitizeSqlPathSegment(_0x32d662,_0x5c7844(0x131)),_0x59cf58=sanitizeSqlPathSegment(_0x324e6a,_0x13a3c3);return _0x22cffe+'/'+_0x13a3c3+'_'+_0x59cf58+getSqlFileExtension(_0x3cf97e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a163_0x343f(){const _0x209df8=['WITH','465MZSHpX','split','length','133636mdjEVk','replace','54mopPRD','push','896072gemadm','4254060ZENUSJ','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','\x20with\x20parameters:\x20','227409ohcPTv','add','DELETE','join','type','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','57DnoUdk','includes','UPDATE','SELECT','11627InshuI','51FOpMtp','reason','match','\x20query\x20targeting\x20','7428YWYYsw','startsWith','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','14466BQYeAY','INSERT','test','DDL','UNKNOWN','matchAll','from','trim','14942AtKClL','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','unknown\x20table(s)'];a163_0x343f=function(){return _0x209df8;};return a163_0x343f();}(function(_0x36bf0e,_0x4e94af){const _0xbedd1=a163_0x250a,_0x2ea319=_0x36bf0e();while(!![]){try{const _0x5d82fe=-parseInt(_0xbedd1(0x1a6))/0x1*(-parseInt(_0xbedd1(0x18c))/0x2)+-parseInt(_0xbedd1(0x1a1))/0x3*(-parseInt(_0xbedd1(0x193))/0x4)+parseInt(_0xbedd1(0x190))/0x5*(-parseInt(_0xbedd1(0x184))/0x6)+parseInt(_0xbedd1(0x19b))/0x7+-parseInt(_0xbedd1(0x197))/0x8*(-parseInt(_0xbedd1(0x195))/0x9)+-parseInt(_0xbedd1(0x198))/0xa+-parseInt(_0xbedd1(0x1a5))/0xb*(parseInt(_0xbedd1(0x1aa))/0xc);if(_0x5d82fe===_0x4e94af)break;else _0x2ea319['push'](_0x2ea319['shift']());}catch(_0x220128){_0x2ea319['push'](_0x2ea319['shift']());}}}(a163_0x343f,0x65aa5));function a163_0x250a(_0x42e671,_0x5ae99f){_0x42e671=_0x42e671-0x183;const _0x343f57=a163_0x343f();let _0x250a5f=_0x343f57[_0x42e671];return _0x250a5f;}export function detectSqlType(_0x5c5f63){const _0x3acab9=a163_0x250a;if(!_0x5c5f63?.[_0x3acab9(0x18b)]())return{'type':_0x3acab9(0x188),'isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x5c723d=_0x5c5f63[_0x3acab9(0x194)](/#\{[^}]*\}/g,'?')[_0x3acab9(0x194)](/\$\{[^}]*\}/g,'?')[_0x3acab9(0x194)](/@[^(\s]+(\([^)]*\))?/g,'')['replace'](/\/\*[\s\S]*?\*\//g,'')[_0x3acab9(0x18b)](),_0x2171f0=_0x5c723d[_0x3acab9(0x191)]('\x0a');let _0x29579f='';for(const _0x31ca96 of _0x2171f0){const _0x42fb3a=_0x31ca96[_0x3acab9(0x18b)]();if(!_0x42fb3a||_0x42fb3a[_0x3acab9(0x1ab)]('--')||_0x42fb3a[_0x3acab9(0x1ab)]('/*'))continue;_0x29579f=_0x42fb3a;break;}const _0x20f2fe=_0x29579f['toUpperCase']();if(_0x20f2fe['startsWith'](_0x3acab9(0x1a4))||_0x20f2fe['startsWith'](_0x3acab9(0x18f))){const _0x4ee7a4=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i['test'](_0x5c723d);return{'type':_0x3acab9(0x1a4),'isSelectOnly':!_0x4ee7a4,'isDangerous':_0x4ee7a4,'reason':_0x4ee7a4?_0x3acab9(0x183):undefined};}if(_0x20f2fe[_0x3acab9(0x1ab)](_0x3acab9(0x185)))return{'type':_0x3acab9(0x185),'isSelectOnly':![],'isDangerous':![]};if(_0x20f2fe['startsWith'](_0x3acab9(0x1a3)))return{'type':_0x3acab9(0x1a3),'isSelectOnly':![],'isDangerous':![]};if(_0x20f2fe[_0x3acab9(0x1ab)](_0x3acab9(0x19d)))return{'type':'DELETE','isSelectOnly':![],'isDangerous':!![],'reason':_0x3acab9(0x1a0)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x3acab9(0x186)](_0x20f2fe))return{'type':_0x3acab9(0x187),'isSelectOnly':![],'isDangerous':!![],'reason':'DDL\x20statements\x20are\x20blocked\x20from\x20auto-save'};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function extractTables(_0xb092a1){const _0x445eff=a163_0x250a,_0x52377d=_0xb092a1[_0x445eff(0x194)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x445eff(0x194)](/'[^']*'/g,'\x27\x27')[_0x445eff(0x194)](/--.*$/gm,'')['replace'](/\/\*[\s\S]*?\*\//g,''),_0x19aabf=[],_0x1a6ce6=_0x52377d['match'](/FROM\s+([^\s,)(]+)/i);if(_0x1a6ce6?.[0x1])_0x19aabf[_0x445eff(0x196)](_0x1a6ce6[0x1]['replace'](/[`"]/g,''));for(const _0x3fb37c of _0x52377d[_0x445eff(0x189)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x2264a1=_0x3fb37c[0x1]?.[_0x445eff(0x194)](/[`"]/g,'');if(_0x2264a1&&!_0x19aabf[_0x445eff(0x1a2)](_0x2264a1))_0x19aabf[_0x445eff(0x196)](_0x2264a1);}const _0x2f26f1=_0x52377d[_0x445eff(0x1a8)](/INTO\s+([^\s(]+)/i);if(_0x2f26f1?.[0x1]){const _0x5b5ba9=_0x2f26f1[0x1]['replace'](/[`"]/g,'');if(!_0x19aabf[_0x445eff(0x1a2)](_0x5b5ba9))_0x19aabf['push'](_0x5b5ba9);}const _0x1e3cd0=_0x52377d[_0x445eff(0x1a8)](/UPDATE\s+([^\s,)(]+)/i);if(_0x1e3cd0?.[0x1]){const _0xe1680e=_0x1e3cd0[0x1][_0x445eff(0x194)](/[`"]/g,'');if(!_0x19aabf['includes'](_0xe1680e))_0x19aabf[_0x445eff(0x196)](_0xe1680e);}return _0x19aabf;}function extractParameters(_0x547e24){const _0x5f1b05=a163_0x250a,_0x5a2e48=new Set();for(const _0x4abe5c of _0x547e24['matchAll'](/#\{(\w+)\}/g))if(_0x4abe5c[0x1])_0x5a2e48[_0x5f1b05(0x19c)](_0x4abe5c[0x1]);for(const _0x3cd016 of _0x547e24[_0x5f1b05(0x189)](/\$\{(\w+)\}/g))if(_0x3cd016[0x1])_0x5a2e48[_0x5f1b05(0x19c)](_0x3cd016[0x1]);return Array[_0x5f1b05(0x18a)](_0x5a2e48);}export function validateSql(_0xf0f6b1){const _0x252b34=a163_0x250a,_0x58f1cf=detectSqlType(_0xf0f6b1),_0x4e8232=extractTables(_0xf0f6b1),_0x289aac=extractParameters(_0xf0f6b1);if(_0x58f1cf['isDangerous'])return{'valid':![],'sqlType':_0x58f1cf,'tables':_0x4e8232,'parameters':_0x289aac,'message':_0x58f1cf[_0x252b34(0x1a7)]||_0x58f1cf['type']+_0x252b34(0x199)};if(_0x58f1cf[_0x252b34(0x19f)]===_0x252b34(0x188))return{'valid':![],'sqlType':_0x58f1cf,'tables':_0x4e8232,'parameters':_0x289aac,'message':_0x252b34(0x18d)};return{'valid':!![],'sqlType':_0x58f1cf,'tables':_0x4e8232,'parameters':_0x289aac,'message':_0x58f1cf['type']+_0x252b34(0x1a9)+(_0x4e8232[_0x252b34(0x192)]?_0x4e8232[_0x252b34(0x19e)](',\x20'):_0x252b34(0x18e))+(_0x289aac[_0x252b34(0x192)]?_0x252b34(0x19a)+_0x289aac[_0x252b34(0x19e)](',\x20'):'')};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a164_0x5cea6f=a164_0x4519;(function(_0x4047f0,_0x20c9cf){const _0x80b72=a164_0x4519,_0x3c40d9=_0x4047f0();while(!![]){try{const _0x489f41=-parseInt(_0x80b72(0x1b5))/0x1*(parseInt(_0x80b72(0x1b6))/0x2)+-parseInt(_0x80b72(0x1c3))/0x3*(-parseInt(_0x80b72(0x1be))/0x4)+-parseInt(_0x80b72(0x1bd))/0x5*(-parseInt(_0x80b72(0x1b9))/0x6)+-parseInt(_0x80b72(0x1b8))/0x7+parseInt(_0x80b72(0x1b2))/0x8+-parseInt(_0x80b72(0x1ba))/0x9+parseInt(_0x80b72(0x1bc))/0xa*(parseInt(_0x80b72(0x1c1))/0xb);if(_0x489f41===_0x20c9cf)break;else _0x3c40d9['push'](_0x3c40d9['shift']());}catch(_0x8dad5b){_0x3c40d9['push'](_0x3c40d9['shift']());}}}(a164_0x3901,0xc73b6));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a164_0x4519(_0x30dd13,_0x2ad028){_0x30dd13=_0x30dd13-0x1b2;const _0x39010d=a164_0x3901();let _0x4519b0=_0x39010d[_0x30dd13];return _0x4519b0;}export{CliError};function a164_0x3901(){const _0xd6709c=['\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','203019EjzvCL','8844872aysplG','Tip:\x20`','join','1IBOgJM','3242156QFQCWz','Run\x20`','10422832REbZbT','352542UWFHFz','12130524mUnkIF','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','169060tsHMRD','100oDVFtx','68nsXPvh','\x20auth`\x20to\x20login\x20first.','Set\x20appcode\x20via\x20`','1199UoqLbE'];a164_0x3901=function(){return _0xd6709c;};return a164_0x3901();}export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a164_0x5cea6f(0x1b7)+CLI_BIN_NAME+a164_0x5cea6f(0x1bf),'configMissingHint':[a164_0x5cea6f(0x1c0)+CLI_BIN_NAME+a164_0x5cea6f(0x1c2),a164_0x5cea6f(0x1b3)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.'][a164_0x5cea6f(0x1b4)]('\x0a\x20\x20\x20\x20\x20\x20\x20'),'notInProjectHint':a164_0x5cea6f(0x1bb)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4bffd1,_0x3562ab){var _0x5f2baf=a165_0x284d,_0x513db3=_0x4bffd1();while(!![]){try{var _0x19dc99=parseInt(_0x5f2baf(0xbe))/0x1+parseInt(_0x5f2baf(0xc3))/0x2+-parseInt(_0x5f2baf(0xc2))/0x3+-parseInt(_0x5f2baf(0xbf))/0x4*(-parseInt(_0x5f2baf(0xc1))/0x5)+-parseInt(_0x5f2baf(0xbc))/0x6+-parseInt(_0x5f2baf(0xc0))/0x7+parseInt(_0x5f2baf(0xbd))/0x8;if(_0x19dc99===_0x3562ab)break;else _0x513db3['push'](_0x513db3['shift']());}catch(_0x4edfa0){_0x513db3['push'](_0x513db3['shift']());}}}(a165_0x4e78,0x647e2));function a165_0x284d(_0x1a0a1e,_0x3cf506){_0x1a0a1e=_0x1a0a1e-0xbc;var _0x4e7822=a165_0x4e78();var _0x284d0d=_0x4e7822[_0x1a0a1e];return _0x284d0d;}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a165_0x32c8e5}from'@lovrabet/cli-framework';export function buildAllFlags(_0xee4ff9){return a165_0x32c8e5(_0xee4ff9,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}function a165_0x4e78(){var _0x613584=['5HoyJpN','1526847pruYKb','1349802ircslN','577842uHQCTW','1908480RSWssc','72625aOZzpm','2783612PHROCx','4655805woJYoz'];a165_0x4e78=function(){return _0x613584;};return a165_0x4e78();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a166_0x2f9407=a166_0x1d85;(function(_0x4c99c0,_0x1856b9){const _0x3843af=a166_0x1d85,_0x1bbe94=_0x4c99c0();while(!![]){try{const _0x56da7f=parseInt(_0x3843af(0x1cd))/0x1+-parseInt(_0x3843af(0x1cf))/0x2*(-parseInt(_0x3843af(0x1ca))/0x3)+-parseInt(_0x3843af(0x1cb))/0x4+parseInt(_0x3843af(0x1c9))/0x5+parseInt(_0x3843af(0x1d5))/0x6*(-parseInt(_0x3843af(0x1ce))/0x7)+parseInt(_0x3843af(0x1d3))/0x8*(-parseInt(_0x3843af(0x1d1))/0x9)+parseInt(_0x3843af(0x1d4))/0xa*(parseInt(_0x3843af(0x1d0))/0xb);if(_0x56da7f===_0x1856b9)break;else _0x1bbe94['push'](_0x1bbe94['shift']());}catch(_0x123af0){_0x1bbe94['push'](_0x1bbe94['shift']());}}}(a166_0xc00f,0x3a6b6));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a166_0x2f9407(0x1d2)];function a166_0x1d85(_0xec4aee,_0x2cd491){_0xec4aee=_0xec4aee-0x1c9;const _0xc00fc3=a166_0xc00f();let _0x1d85c2=_0xc00fc3[_0xec4aee];return _0x1d85c2;}export const validateFlags=helpers[a166_0x2f9407(0x1cc)];function a166_0xc00f(){const _0x28010d=['2790447RMssgV','758457TOdsjf','parseFlags','32bhywiF','10bTuKkL','6UvPzWU','2209110SlACiI','286737ynNQxM','1514612PCQRwm','validateFlags','299710thuItu','950299OeJQfm','2kbchhE'];a166_0xc00f=function(){return _0x28010d;};return a166_0xc00f();}
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a167_0x3281d2=a167_0x1819;(function(_0x335614,_0x4a5452){const _0x664a5c=a167_0x1819,_0x3364a7=_0x335614();while(!![]){try{const _0x2e967a=parseInt(_0x664a5c(0x19d))/0x1+-parseInt(_0x664a5c(0x19f))/0x2+parseInt(_0x664a5c(0x1a2))/0x3*(-parseInt(_0x664a5c(0x1a4))/0x4)+parseInt(_0x664a5c(0x19b))/0x5+-parseInt(_0x664a5c(0x1a7))/0x6*(-parseInt(_0x664a5c(0x1a3))/0x7)+parseInt(_0x664a5c(0x1a5))/0x8+-parseInt(_0x664a5c(0x1a8))/0x9;if(_0x2e967a===_0x4a5452)break;else _0x3364a7['push'](_0x3364a7['shift']());}catch(_0x392f26){_0x3364a7['push'](_0x3364a7['shift']());}}}(a167_0x25b0,0x9e569));import{createHelpGenerators}from'@lovrabet/cli-framework';function a167_0x25b0(){const _0x420d9a=['\x20project\x20init`\x20or\x20--appcode).','181968YWbCvy','generateCommandHelp','306918HGQuGv','\x20[args]\x20[flags]','generateServiceHelp','27nZFWEn','7cMEyzs','275124nwBIRb','5880168QbpVcC','Requires\x20appcode\x20(set\x20via\x20`','5637810IEXxIt','13165875PtXpDF','generateFullHelp','5136460hbMvjv'];a167_0x25b0=function(){return _0x420d9a;};return a167_0x25b0();}import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x37464b=>serviceGroups['get'](_0x37464b),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a167_0x3281d2(0x1a6)+CLI_BIN_NAME+a167_0x3281d2(0x19c),'serviceUsageSuffix':a167_0x3281d2(0x1a0),'includeWildcardExtraInFullHelp':!![]});export function generateCommandHelp(_0x4360c5){const _0x261bd5=a167_0x3281d2;return generators[_0x261bd5(0x19e)](_0x4360c5);}function a167_0x1819(_0x1e9724,_0x62943){_0x1e9724=_0x1e9724-0x19a;const _0x25b01e=a167_0x25b0();let _0x1819a9=_0x25b01e[_0x1e9724];return _0x1819a9;}export const generateServiceHelp=generators[a167_0x3281d2(0x1a1)];export const generateFullHelp=generators[a167_0x3281d2(0x19a)];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e71e5,_0x1f5a3b){var _0x287a8e=a168_0x53ed,_0x1a2b30=_0x5e71e5();while(!![]){try{var _0x1e47ed=-parseInt(_0x287a8e(0x1d9))/0x1+parseInt(_0x287a8e(0x1db))/0x2+parseInt(_0x287a8e(0x1da))/0x3*(parseInt(_0x287a8e(0x1d5))/0x4)+parseInt(_0x287a8e(0x1d4))/0x5+-parseInt(_0x287a8e(0x1d6))/0x6*(parseInt(_0x287a8e(0x1d8))/0x7)+-parseInt(_0x287a8e(0x1d7))/0x8+parseInt(_0x287a8e(0x1d3))/0x9;if(_0x1e47ed===_0x1f5a3b)break;else _0x1a2b30['push'](_0x1a2b30['shift']());}catch(_0x590d49){_0x1a2b30['push'](_0x1a2b30['shift']());}}}(a168_0x3067,0x6a59c));function a168_0x3067(){var _0xbd907b=['2099575YKfuPQ','4OodkWe','1461288yRtMgG','3306184uUNQdZ','21qBtdhC','98305ebdBzQ','792108PumOqy','1312476HTUyVp','3038805sEvUzA'];a168_0x3067=function(){return _0xbd907b;};return a168_0x3067();}export{runCommand}from'../framework/runner.js';function a168_0x53ed(_0x537409,_0xd8f931){_0x537409=_0x537409-0x1d3;var _0x3067a4=a168_0x3067();var _0x53ed29=_0x3067a4[_0x537409];return _0x53ed29;}export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x583357,_0x510fad){const _0x196d3e=a169_0x3495,_0x4eba79=_0x583357();while(!![]){try{const _0x4c02cf=parseInt(_0x196d3e(0x13f))/0x1*(-parseInt(_0x196d3e(0x142))/0x2)+-parseInt(_0x196d3e(0x13b))/0x3+-parseInt(_0x196d3e(0x135))/0x4*(parseInt(_0x196d3e(0x141))/0x5)+-parseInt(_0x196d3e(0x13d))/0x6+-parseInt(_0x196d3e(0x138))/0x7+-parseInt(_0x196d3e(0x139))/0x8*(parseInt(_0x196d3e(0x136))/0x9)+parseInt(_0x196d3e(0x13c))/0xa;if(_0x4c02cf===_0x510fad)break;else _0x4eba79['push'](_0x4eba79['shift']());}catch(_0x5774de){_0x4eba79['push'](_0x4eba79['shift']());}}}(a169_0x1af8,0xca1fe));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a169_0x3495(_0x261136,_0x35dbb1){_0x261136=_0x261136-0x135;const _0x1af8e0=a169_0x1af8();let _0x34954f=_0x1af8e0[_0x261136];return _0x34954f;}const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x29406b,_0x5ae4d7){const _0x527980=a169_0x3495,_0x192488=_0x29406b[_0x527980(0x145)],{_notice:_0x5657c1,..._0x3064f1}=_0x29406b;void _0x5657c1,baseFormatOutput(_0x3064f1,_0x5ae4d7),_0x5ae4d7[_0x527980(0x144)]===_0x527980(0x143)&&printPrettyNotice(_0x192488);}function a169_0x1af8(){const _0x345cb4=['url','10568erAWfX','update','8525VHFNaL','230zygqEp','pretty','format','_notice','1720XMfqFi','369Iiyfus','error','5415403uNcbkw','302792BaSkea','message','1546956jrZSHE','70974690pJrIuZ','8880042HkkdQS'];a169_0x1af8=function(){return _0x345cb4;};return a169_0x1af8();}function printPrettyNotice(_0x14e4d9){const _0x11d340=a169_0x3495;if(!_0x14e4d9?.[_0x11d340(0x140)])return;console[_0x11d340(0x137)](_0x14e4d9[_0x11d340(0x140)][_0x11d340(0x13a)]+'\x20('+_0x14e4d9[_0x11d340(0x140)][_0x11d340(0x13e)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x191d61,_0x541fdd){var _0x4d6f7b=a170_0x58b4,_0x213224=_0x191d61();while(!![]){try{var _0x7c4dd=-parseInt(_0x4d6f7b(0x126))/0x1+parseInt(_0x4d6f7b(0x12c))/0x2+-parseInt(_0x4d6f7b(0x128))/0x3*(-parseInt(_0x4d6f7b(0x127))/0x4)+-parseInt(_0x4d6f7b(0x12a))/0x5*(parseInt(_0x4d6f7b(0x12b))/0x6)+-parseInt(_0x4d6f7b(0x129))/0x7+parseInt(_0x4d6f7b(0x12d))/0x8+-parseInt(_0x4d6f7b(0x125))/0x9;if(_0x7c4dd===_0x541fdd)break;else _0x213224['push'](_0x213224['shift']());}catch(_0x343584){_0x213224['push'](_0x213224['shift']());}}}(a170_0x5971,0x40ad1));export{extractList,extractPaging}from'@lovrabet/cli-framework';function a170_0x58b4(_0x3e00db,_0x4776d3){_0x3e00db=_0x3e00db-0x125;var _0x59710=a170_0x5971();var _0x58b47a=_0x59710[_0x3e00db];return _0x58b47a;}function a170_0x5971(){var _0x2395e5=['4cvwqSE','799242GXzlkm','1193409qOOknf','500IicCXb','25302HOHKKY','1036484JrWROK','3514576YnfIdc','2764305YEvgOB','59733zmTlxs'];a170_0x5971=function(){return _0x2395e5;};return a170_0x5971();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ed1e8,_0x1abc2b){const _0x1d3f02=a171_0xa663,_0x1b472c=_0x3ed1e8();while(!![]){try{const _0x14ad75=parseInt(_0x1d3f02(0x19c))/0x1*(-parseInt(_0x1d3f02(0x194))/0x2)+parseInt(_0x1d3f02(0x196))/0x3+parseInt(_0x1d3f02(0x19a))/0x4*(-parseInt(_0x1d3f02(0x1a1))/0x5)+parseInt(_0x1d3f02(0x19d))/0x6+parseInt(_0x1d3f02(0x188))/0x7*(-parseInt(_0x1d3f02(0x193))/0x8)+-parseInt(_0x1d3f02(0x1a2))/0x9*(parseInt(_0x1d3f02(0x19b))/0xa)+-parseInt(_0x1d3f02(0x190))/0xb*(-parseInt(_0x1d3f02(0x187))/0xc);if(_0x14ad75===_0x1abc2b)break;else _0x1b472c['push'](_0x1b472c['shift']());}catch(_0x3f1a5d){_0x1b472c['push'](_0x1b472c['shift']());}}}(a171_0x4374,0xb889c));import{CliErrors}from'../errors.js';function a171_0x4374(){const _0x143030=['8431910LKypiq','89RBVpZX','305658EigDhI','type','map','.\x20Run\x20`','45mxqdxV','9qpVOJJ','432vnVPJf','56ZTAuZg','\x20api\x20pull`\x20first.','length','\x22.\x20','name','some','Available\x20aliases:\x20','code','1058860WWOzjE','alias','validation','1107680gyEbnw','19146naXiLJ','`\x20requires\x20either\x20--code\x20or\x20--alias.','2496252fhiJGs','No\x20api.ts\x20found\x20in\x20','string','Unknown\x20alias\x20\x22','350956SYlsPy'];a171_0x4374=function(){return _0x143030;};return a171_0x4374();}function a171_0xa663(_0x4e893f,_0x1d23b3){_0x4e893f=_0x4e893f-0x187;const _0x437457=a171_0x4374();let _0xa663cd=_0x437457[_0x4e893f];return _0xa663cd;}import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function resolveAliasToCode(_0x21f96f,_0x463ddd,_0x28f30f,_0x3e251a){const _0x535504=a171_0xa663,_0x4241f3=_0x21f96f['flags'][_0x535504(0x18d)](_0x5b702c=>_0x5b702c[_0x535504(0x18c)]===_0x535504(0x18f)&&_0x5b702c[_0x535504(0x19e)]==='string'),_0x1a97c9=_0x21f96f['flags'][_0x535504(0x18d)](_0x153bf4=>_0x153bf4[_0x535504(0x18c)]===_0x535504(0x191)&&_0x153bf4[_0x535504(0x19e)]===_0x535504(0x198));if(!_0x4241f3||!_0x1a97c9)return;const _0x36b745=_0x463ddd[_0x535504(0x18f)]?String(_0x463ddd[_0x535504(0x18f)]):'',_0x2418b4=_0x463ddd[_0x535504(0x191)]?String(_0x463ddd['alias']):'';if(!_0x36b745&&!_0x2418b4)throw CliErrors[_0x535504(0x192)]('`'+_0x3e251a+_0x535504(0x195));if(_0x2418b4&&!_0x36b745){const _0xee4ba=resolveAlias(_0x28f30f,_0x2418b4);if(!_0xee4ba){const _0x562a59=listAliases(_0x28f30f)[_0x535504(0x19f)](_0x57951d=>_0x57951d[_0x535504(0x191)]),_0x4c36f2=_0x562a59[_0x535504(0x18a)]?_0x535504(0x18e)+_0x562a59['join'](',\x20'):_0x535504(0x197)+_0x28f30f+_0x535504(0x1a0)+CLI_BIN_NAME+_0x535504(0x189);throw CliErrors[_0x535504(0x192)](_0x535504(0x199)+_0x2418b4+_0x535504(0x18b)+_0x4c36f2);}_0x463ddd[_0x535504(0x18f)]=_0xee4ba;}}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a172_0x2754(_0x3cdcd5,_0x274f75){_0x3cdcd5=_0x3cdcd5-0x9d;const _0x4fd605=a172_0x4fd6();let _0x27548e=_0x4fd605[_0x3cdcd5];return _0x27548e;}const a172_0x8d8bc4=a172_0x2754;(function(_0x40d3de,_0x41adf3){const _0x10d7f2=a172_0x2754,_0x54f366=_0x40d3de();while(!![]){try{const _0x1874b8=parseInt(_0x10d7f2(0xba))/0x1*(parseInt(_0x10d7f2(0x9d))/0x2)+-parseInt(_0x10d7f2(0xd1))/0x3+-parseInt(_0x10d7f2(0xbb))/0x4*(parseInt(_0x10d7f2(0xd4))/0x5)+parseInt(_0x10d7f2(0xa4))/0x6+parseInt(_0x10d7f2(0xb8))/0x7*(parseInt(_0x10d7f2(0xb0))/0x8)+parseInt(_0x10d7f2(0xac))/0x9*(-parseInt(_0x10d7f2(0xc8))/0xa)+parseInt(_0x10d7f2(0xb6))/0xb*(parseInt(_0x10d7f2(0xd7))/0xc);if(_0x1874b8===_0x41adf3)break;else _0x54f366['push'](_0x54f366['shift']());}catch(_0x1aa865){_0x54f366['push'](_0x54f366['shift']());}}}(a172_0x4fd6,0x9ba5a));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{DEFAULT_API_DIR}from'../constant/paths.js';import{isNonInteractive as a172_0x59a6a0}from'../utils/is-non-interactive.js';import{resolveAliasToCode}from'../framework/runner-alias.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function stringFlag(_0x21ea4a){const _0xcb731=a172_0x2754;return typeof _0x21ea4a==='string'&&_0x21ea4a[_0xcb731(0xa6)]()?_0x21ea4a['trim']():undefined;}function resolveEnvAppCode(){const _0x2b257f=a172_0x2754,_0x56f289=stringFlag(process.env.RABETBASE_APPCODE);if(_0x56f289)return{'name':'RABETBASE_APPCODE','value':_0x56f289};const _0x99492b=stringFlag(process.env.LOVRABET_APPCODE);if(_0x99492b)return{'name':_0x2b257f(0xad),'value':_0x99492b};return undefined;}function a172_0x4fd6(){const _0x577f91=['33RqmTOC','defaultVerbose','1292011IcjBhD','resolveApiDomain','1lcdXGx','2944044WBnTjZ','command','format','isNonInteractive','resolveAppCode','selectedAppName','map','schema','configMissing','rawFlags','appcode','No\x20appcode\x20is\x20resolved\x20from\x20--appcode,\x20project\x20config,\x20or\x20global\x20config.','object','391670zowHmh','update','cookie','mergedCli','apps','../core/api-client.js','value','pageSize','doctor','2852661GSqEnC','apiDir','Current\x20resolved\x20appcode\x20is\x20\x22','5LejFJi','appCode','_notice','685428couUNQ','execute','\x20is\x20not\x20used\x20as\x20appcode\x20automatically.\x20','validation','filter','\x20\x20\x20Continue?\x20[y/N]\x20','defaultPageSize','name','2211302wwSXmC','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','includes','Set\x20appcode\x20via\x20`','has','pretty','High-risk\x20operation\x20`','1519908sFjAep','resolve','trim','cancelled','riskLevel','explicitAppName','⚠\x20\x20High-risk\x20operation:\x20','requiresAuth','72uGKbIT','LOVRABET_APPCODE','service','catch','48cJvMlh','currentApp','defaultApp','To\x20use\x20this\x20environment\x20variable,\x20pass\x20--appcode\x20\x22$','requiresAppCode','nonInteractive'];a172_0x4fd6=function(){return _0x577f91;};return a172_0x4fd6();}function hasExplicitAppCode(_0x302be8,_0x350be5){const _0x527329=a172_0x2754;return!!(stringFlag(_0x302be8[_0x527329(0xc5)])||stringFlag(_0x350be5[_0x527329(0xc5)]));}function assertEnvAppCodeNotIgnored(_0x188b7e,_0x4f3700,_0xb74889){const _0x2b5cbb=a172_0x2754;if(!_0x4f3700||_0xb74889||_0x188b7e===_0x4f3700[_0x2b5cbb(0xce)])return;const _0x5f4e40=_0x188b7e?_0x2b5cbb(0xd3)+_0x188b7e+'\x22.':_0x2b5cbb(0xc6);throw CliErrors['validation'](_0x4f3700[_0x2b5cbb(0xde)]+'='+_0x4f3700[_0x2b5cbb(0xce)]+_0x2b5cbb(0xd9)+_0x5f4e40+'\x20'+(_0x2b5cbb(0xb3)+_0x4f3700[_0x2b5cbb(0xde)]+'\x22.'));}export function createPipelineEnv(_0x30de0b,_0x5b3aa7,_0x50ecf2=[]){const _0x4791b6=a172_0x2754;return{'rawFlags':_0x5b3aa7,'args':_0x50ecf2,'resolveAppCode':()=>_0x30de0b[_0x4791b6(0xd5)],'resolveCookie':()=>_0x30de0b[_0x4791b6(0xca)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a172_0x59a6a0(_0x5b3aa7),'defaultFormat':_0x30de0b['format'],'defaultPageSize':_0x30de0b[_0x4791b6(0xcf)],'defaultVerbose':_0x30de0b['verbose'],'apiDir':_0x30de0b[_0x4791b6(0xd2)],'riskLevel':_0x30de0b[_0x4791b6(0xa8)],'selectedAppName':_0x30de0b[_0x4791b6(0xa9)],'mergedCli':{'defaultApp':_0x30de0b[_0x4791b6(0xb2)],'currentApp':_0x30de0b[_0x4791b6(0xb1)],'appCode':_0x30de0b[_0x4791b6(0xd5)],'apps':_0x30de0b[_0x4791b6(0xcc)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a172_0x8d8bc4(0xdb)](_0x4ce573=>PIPELINE_FLAG_NAMES[a172_0x8d8bc4(0xa1)](_0x4ce573[a172_0x8d8bc4(0xde)]))[a172_0x8d8bc4(0xc1)](({name:_0x5576ae,type:_0x476c52,description:_0x51d3b0})=>({'name':_0x5576ae,'type':_0x476c52,'description':_0x51d3b0})),'formatOutput':formatOutput,'getCommandLabel'(_0x2dd101){const _0x411f73=a172_0x8d8bc4;return CLI_BIN_NAME+'\x20'+_0x2dd101[_0x411f73(0xae)]+'\x20'+_0x2dd101[_0x411f73(0xbc)];},'riskPolicy':{'skipWhenDryRun':!![],'createError'(_0x445ee3){const _0x275501=a172_0x8d8bc4;return CliErrors[_0x275501(0xda)](_0x445ee3);}},async 'prepare'(_0x56e7b6,_0x43433a,_0x2afb56,_0x1b4753){const _0x51b536=a172_0x8d8bc4,_0x34e475=_0x43433a[_0x51b536(0xd2)]||DEFAULT_API_DIR;resolveAliasToCode(_0x56e7b6,_0x2afb56,_0x34e475,_0x1b4753);let _0x57a6e5='';if(_0x56e7b6[_0x51b536(0xab)]!==![]){_0x57a6e5=_0x43433a['resolveCookie']();if(!_0x57a6e5)throw CliErrors['authRequired']();const {setActiveCookie:_0x2ff385}=await import(_0x51b536(0xcd));_0x2ff385(_0x57a6e5);}const _0x19bb49=_0x43433a[_0x51b536(0xbf)]()??'';if(_0x56e7b6[_0x51b536(0xb4)]!==![]){assertEnvAppCodeNotIgnored(_0x19bb49,resolveEnvAppCode(),hasExplicitAppCode(_0x2afb56,_0x43433a[_0x51b536(0xc4)]));if(!_0x19bb49)throw CliErrors[_0x51b536(0xc3)](_0x51b536(0xa0)+CLI_BIN_NAME+_0x51b536(0x9e));}return{'defaults':{'booleans':{'verbose':_0x43433a[_0x51b536(0xb7)]},'numbers':{'pagesize':_0x43433a[_0x51b536(0xdd)]}},'extras':{'appCode':_0x19bb49,'cookie':_0x57a6e5,'apiDomain':_0x43433a[_0x51b536(0xb9)](),'apiDir':_0x34e475,'selectedAppName':_0x43433a[_0x51b536(0xc0)],'mergedCli':_0x43433a[_0x51b536(0xcb)]}};},async 'confirmHighRisk'({env:_0x207aa9,commandLabel:_0x441900}){const _0x595937=a172_0x8d8bc4;if(_0x207aa9[_0x595937(0xbe)])throw CliErrors[_0x595937(0xda)](_0x595937(0xa3)+_0x441900+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.');await requireConfirmationPrompt({'lines':[_0x595937(0xaa)+_0x441900,_0x595937(0xdc)],'createCancelledError':_0x8ad922=>CliErrors[_0x595937(0xa7)](_0x8ad922)});},async 'finalize'(){const _0x24b5ce=a172_0x8d8bc4,{clearActiveCookie:_0x25800b}=await import(_0x24b5ce(0xcd));_0x25800b();}};export async function runCommand(_0xaa6b09,_0x599bcb){await runCommandWithAdapter(shouldAttachUpdateNotice(_0xaa6b09)?withUpdateNotice(_0xaa6b09):_0xaa6b09,_0x599bcb,runnerAdapter);}function shouldAttachUpdateNotice(_0x3e19e6){const _0x8046a=a172_0x8d8bc4;if(_0x3e19e6['hasFormat']===![])return![];return![_0x8046a(0xc9),_0x8046a(0xc2),_0x8046a(0xd0)][_0x8046a(0x9f)](_0x3e19e6[_0x8046a(0xae)]);}function withUpdateNotice(_0xaed200){return{..._0xaed200,async 'execute'(_0xad604f){const _0x251deb=a172_0x2754,_0x119072=shouldResolveUpdateNotice(_0xad604f)?resolveLatestUpdateNotice()[_0x251deb(0xaf)](()=>null):Promise[_0x251deb(0xa5)](null),_0x4bb403=await _0xaed200[_0x251deb(0xd8)](_0xad604f);return attachUpdateNotice(_0x4bb403,await _0x119072);}};}function shouldResolveUpdateNotice(_0x24f2e2){const _0x1a8d9e=a172_0x8d8bc4;return _0x24f2e2[_0x1a8d9e(0xbd)]===_0x1a8d9e(0xa2)&&!_0x24f2e2[_0x1a8d9e(0xb5)];}function attachUpdateNotice(_0x3bf0f2,_0x34f9fd){const _0x19ea15=a172_0x8d8bc4;if(!_0x34f9fd||!_0x3bf0f2||typeof _0x3bf0f2!=='object')return _0x3bf0f2;const _0x1b069b=_0x3bf0f2,_0x52dea0=typeof _0x1b069b[_0x19ea15(0xd6)]===_0x19ea15(0xc7)&&_0x1b069b[_0x19ea15(0xd6)]!==null?_0x1b069b[_0x19ea15(0xd6)]:{};return{..._0x1b069b,'_notice':{..._0x52dea0,'update':_0x34f9fd}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16fdf9,_0x66e0ce){const _0x553d5e=a173_0x12fc,_0x55cfd0=_0x16fdf9();while(!![]){try{const _0x4e42f0=parseInt(_0x553d5e(0x87))/0x1+-parseInt(_0x553d5e(0x82))/0x2+parseInt(_0x553d5e(0x88))/0x3*(parseInt(_0x553d5e(0x83))/0x4)+parseInt(_0x553d5e(0x84))/0x5+parseInt(_0x553d5e(0x89))/0x6*(parseInt(_0x553d5e(0x80))/0x7)+-parseInt(_0x553d5e(0x86))/0x8+parseInt(_0x553d5e(0x85))/0x9*(parseInt(_0x553d5e(0x81))/0xa);if(_0x4e42f0===_0x66e0ce)break;else _0x55cfd0['push'](_0x55cfd0['shift']());}catch(_0x1509e0){_0x55cfd0['push'](_0x55cfd0['shift']());}}}(a173_0x3151,0xc8d12));import{buildSchemaPayload as a173_0x30a53c}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a173_0x12fc(_0x50b800,_0x488f8c){_0x50b800=_0x50b800-0x80;const _0x3151ad=a173_0x3151();let _0x12fc05=_0x3151ad[_0x50b800];return _0x12fc05;}function a173_0x3151(){const _0x487a9c=['6xPFgXI','../commands/registry.js','4339111DHfXUv','290IUjUxU','2050612DPjXZn','524iXtUbJ','4084195sLacPw','184167QJwarC','9272120MaBWup','546262iuzpEh','9858zJLknx'];a173_0x3151=function(){return _0x487a9c;};return a173_0x3151();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x436679=a173_0x12fc,{serviceRegistry:_0x5df5ae,findDefinition:_0x36b099}=await import(_0x436679(0x8a));return a173_0x30a53c({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x5df5ae,'buildAllFlags':buildAllFlags,'findDefinition':_0x36b099});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x53dcb7,_0x1e9646){var _0x37fe0c=a174_0x69af,_0xdb63e4=_0x53dcb7();while(!![]){try{var _0x1643f4=parseInt(_0x37fe0c(0x129))/0x1*(parseInt(_0x37fe0c(0x128))/0x2)+-parseInt(_0x37fe0c(0x12f))/0x3+-parseInt(_0x37fe0c(0x124))/0x4*(parseInt(_0x37fe0c(0x12d))/0x5)+-parseInt(_0x37fe0c(0x12c))/0x6*(-parseInt(_0x37fe0c(0x125))/0x7)+-parseInt(_0x37fe0c(0x12a))/0x8+-parseInt(_0x37fe0c(0x12e))/0x9*(parseInt(_0x37fe0c(0x127))/0xa)+-parseInt(_0x37fe0c(0x126))/0xb*(-parseInt(_0x37fe0c(0x12b))/0xc);if(_0x1643f4===_0x1e9646)break;else _0xdb63e4['push'](_0xdb63e4['shift']());}catch(_0x407be1){_0xdb63e4['push'](_0xdb63e4['shift']());}}}(a174_0x34f5,0xdd669));function a174_0x34f5(){var _0x312800=['9410wKYCHA','2458341VxOTPi','1911960vwYZZg','2272XGoiZO','926765oBZDCh','55XwFLWR','50mTyqSd','704PJGIes','2798skuJac','4998024ywSuRZ','5507532QrElGq','60wjOarY'];a174_0x34f5=function(){return _0x312800;};return a174_0x34f5();}function a174_0x69af(_0x283995,_0x4a43c3){_0x283995=_0x283995-0x124;var _0x34f546=a174_0x34f5();var _0x69af73=_0x34f546[_0x283995];return _0x69af73;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a175_0x31e87f=a175_0x4b7f;(function(_0x443ca0,_0x1f54fe){const _0x215f63=a175_0x4b7f,_0x18c59b=_0x443ca0();while(!![]){try{const _0x588de1=-parseInt(_0x215f63(0x186))/0x1+-parseInt(_0x215f63(0x17e))/0x2*(parseInt(_0x215f63(0x185))/0x3)+-parseInt(_0x215f63(0x181))/0x4*(parseInt(_0x215f63(0x17f))/0x5)+parseInt(_0x215f63(0x183))/0x6+-parseInt(_0x215f63(0x188))/0x7*(-parseInt(_0x215f63(0x17c))/0x8)+parseInt(_0x215f63(0x184))/0x9*(-parseInt(_0x215f63(0x189))/0xa)+parseInt(_0x215f63(0x187))/0xb;if(_0x588de1===_0x1f54fe)break;else _0x18c59b['push'](_0x18c59b['shift']());}catch(_0x3549ab){_0x18c59b['push'](_0x18c59b['shift']());}}}(a175_0xc9b3,0x2c6f9));function a175_0x4b7f(_0x2c8762,_0x4ed997){_0x2c8762=_0x2c8762-0x17c;const _0xc9b332=a175_0xc9b3();let _0x4b7f83=_0xc9b332[_0x2c8762];return _0x4b7f83;}export const VERSION=a175_0x31e87f(0x17d);export const GIT_TAG=a175_0x31e87f(0x182);export const GIT_COMMIT=a175_0x31e87f(0x180);function a175_0xc9b3(){const _0x15ca87=['v2.2.4-beta.1','154710SQBBuD','18zuECSp','3NGwRxM','214449OGQRzD','7838600jIidNM','970151bARkdl','1345870LUWvLr','16ccTicw','2.2.4-beta.2','78094JITdet','10CFwngz','24c5df7','621784rCYqau'];a175_0xc9b3=function(){return _0x15ca87;};return a175_0xc9b3();}export const BUILD_TIME='2026-06-18T09:37:50.150Z';
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c9b64,_0x4a622d){var _0x33862d=a176_0x3491,_0x48869c=_0x4c9b64();while(!![]){try{var _0x5033bf=-parseInt(_0x33862d(0x128))/0x1*(parseInt(_0x33862d(0x121))/0x2)+parseInt(_0x33862d(0x125))/0x3+parseInt(_0x33862d(0x12a))/0x4+-parseInt(_0x33862d(0x129))/0x5+parseInt(_0x33862d(0x123))/0x6+-parseInt(_0x33862d(0x11f))/0x7*(-parseInt(_0x33862d(0x124))/0x8)+-parseInt(_0x33862d(0x12c))/0x9;if(_0x5033bf===_0x4a622d)break;else _0x48869c['push'](_0x48869c['shift']());}catch(_0x2929ea){_0x48869c['push'](_0x48869c['shift']());}}}(a176_0xf593,0x958f2));import a176_0x3efd3c from'chalk';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a176_0xf593(){var _0x2526ca=['2XQSzLl','\x20to\x20view\x20available\x20commands.','6858108dgSSaN','8SWsido','878139vfzPbX','green','\x20--help','78170zFoaVc','3249365DnkRlY','3454048doeeKJ','log','10585827XBAbuf','1523179JVnjwi','bold'];a176_0xf593=function(){return _0x2526ca;};return a176_0xf593();}function a176_0x3491(_0x5b5fbb,_0x3c492){_0x5b5fbb=_0x5b5fbb-0x11f;var _0xf59324=a176_0xf593();var _0x34918a=_0xf59324[_0x5b5fbb];return _0x34918a;}export function showHelp(){var _0x5dc2cb=a176_0x3491;console[_0x5dc2cb(0x12b)](),console[_0x5dc2cb(0x12b)](a176_0x3efd3c[_0x5dc2cb(0x126)][_0x5dc2cb(0x120)]('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x5dc2cb(0x12b)](),console[_0x5dc2cb(0x12b)]('\x20\x20Use\x20'+a176_0x3efd3c['green'][_0x5dc2cb(0x120)](CLI_BIN_NAME+_0x5dc2cb(0x127))+_0x5dc2cb(0x122)),console[_0x5dc2cb(0x12b)]();}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a177_0x210d(){const _0x3df05=['267242TKxCAJ','includes','argv','from','\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','321590TUJaAZ','setLogPath','skill','276qDewfI','\x20skill\x20--help\x0a\x20\x20','add','startsWith','--help','8049402NJUfNJ','Equivalent\x20command:\x20','toLowerCase','enable-bff-save','\x0aAvailable\x20commands:','exit','64ZLSmDS','121foKAkN','84qBfzhw','Error:\x20Unsupported\x20command:\x20','1vQrCrk','4020796OXeeKk','1150310BEQQfO','error','replace','slice','67345umszVU','\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20','push','has','\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation','3506144EVEMrf','3rmGUDL','log','help'];a177_0x210d=function(){return _0x3df05;};return a177_0x210d();}(function(_0x25a535,_0x37cf75){const _0x4e65f5=a177_0x2e11,_0x2bfe53=_0x25a535();while(!![]){try{const _0x4b13ba=parseInt(_0x4e65f5(0x1b1))/0x1*(parseInt(_0x4e65f5(0x1c0))/0x2)+parseInt(_0x4e65f5(0x1bd))/0x3*(parseInt(_0x4e65f5(0x1bc))/0x4)+parseInt(_0x4e65f5(0x1b7))/0x5*(-parseInt(_0x4e65f5(0x1a2))/0x6)+parseInt(_0x4e65f5(0x1b3))/0x7*(-parseInt(_0x4e65f5(0x1ad))/0x8)+-parseInt(_0x4e65f5(0x1a7))/0x9+parseInt(_0x4e65f5(0x19f))/0xa*(parseInt(_0x4e65f5(0x1ae))/0xb)+parseInt(_0x4e65f5(0x1af))/0xc*(parseInt(_0x4e65f5(0x1b2))/0xd);if(_0x4b13ba===_0x37cf75)break;else _0x2bfe53['push'](_0x2bfe53['shift']());}catch(_0x48b52a){_0x2bfe53['push'](_0x2bfe53['shift']());}}}(a177_0x210d,0xaafc6));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a177_0x2e11(_0x2edd60,_0x40938d){_0x2edd60=_0x2edd60-0x19d;const _0x210d5c=a177_0x210d();let _0x2e118b=_0x210d5c[_0x2edd60];return _0x2e118b;}import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x398de4){const _0x1a19bd=a177_0x2e11,_0x45efc2=[];for(const [_0x32abdb,_0x45d321]of Object['entries'](_0x398de4)){if(_0x45d321===!![]){const _0x37e330=_0x32abdb[_0x1a19bd(0x1b5)](/([A-Z])/g,'-$1')[_0x1a19bd(0x1a9)]();_0x45efc2[_0x1a19bd(0x1b9)](_0x37e330);}}return _0x45efc2;}export function parseDynamicFlags(){const _0x641198=a177_0x2e11,_0x26d30a=[];for(let _0x557323=0x3;_0x557323<process[_0x641198(0x1c2)]['length'];_0x557323++){const _0x21ab7a=process[_0x641198(0x1c2)][_0x557323];if(_0x21ab7a&&_0x21ab7a[_0x641198(0x1a5)]('--')){const _0x212f5d=_0x21ab7a[_0x641198(0x1b6)](0x2);_0x212f5d&&!_0x212f5d[_0x641198(0x1c1)]('=')&&_0x26d30a[_0x641198(0x1b9)](_0x212f5d);}}return _0x26d30a;}export function getAllProvidedFlags(_0x1d2ac3){const _0x587733=a177_0x2e11,_0x10f0b6=camelCaseFlagsToKebab(_0x1d2ac3),_0x1bc719=parseDynamicFlags(),_0x4feb4c=new Set([..._0x10f0b6,..._0x1bc719]);return Array[_0x587733(0x19d)](_0x4feb4c);}export function normalizeLegacyBffSaveFlags(_0x11698d){const _0x2fe47b=a177_0x2e11,_0x53b4d9=new Set(_0x11698d);return _0x53b4d9[_0x2fe47b(0x1ba)]('dangerously-bff-save')&&_0x53b4d9[_0x2fe47b(0x1a4)](_0x2fe47b(0x1aa)),Array[_0x2fe47b(0x19d)](_0x53b4d9);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x8770e1,_0x19e226,_0x375199){const _0x59ae41=a177_0x2e11;logger[_0x59ae41(0x1a0)](process['cwd']());if(_0x375199?.[_0x59ae41(0x1bf)]||_0x8770e1===_0x59ae41(0x1a6)){showHelp();return;}console[_0x59ae41(0x1b4)](_0x59ae41(0x1b0)+(_0x8770e1||'(empty)')),console['log'](_0x59ae41(0x1ab)),console[_0x59ae41(0x1be)]('\x20\x20'+CLI_BIN_NAME+_0x59ae41(0x1bb)),console['log']('\x20\x20'+CLI_BIN_NAME+_0x59ae41(0x19e)),console[_0x59ae41(0x1be)](''),console[_0x59ae41(0x1be)](_0x59ae41(0x1a8)+SKILLS_INSTALL_COMMAND_LINE),logger['error'](_0x59ae41(0x1a1),'不支持的命令:\x20'+_0x8770e1),process[_0x59ae41(0x1ac)](0x1);}function showHelp(){const _0x1cfa31=a177_0x2e11;console[_0x1cfa31(0x1be)]('\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20'+CLI_BIN_NAME+_0x1cfa31(0x1a3)+CLI_BIN_NAME+_0x1cfa31(0x1b8)+SKILLS_INSTALL_COMMAND_LINE+'\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/rabetbase/guides/.\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a178_0x1a51(_0x3e32f2,_0x49057a){_0x3e32f2=_0x3e32f2-0x1bd;const _0x175622=a178_0x1756();let _0x1a51e4=_0x175622[_0x3e32f2];return _0x1a51e4;}const a178_0x2b2183=a178_0x1a51;(function(_0x9b122b,_0xed1771){const _0x2d6eb4=a178_0x1a51,_0x1a8d21=_0x9b122b();while(!![]){try{const _0x22627d=-parseInt(_0x2d6eb4(0x1cc))/0x1+parseInt(_0x2d6eb4(0x1c6))/0x2*(parseInt(_0x2d6eb4(0x1c9))/0x3)+parseInt(_0x2d6eb4(0x1d4))/0x4*(parseInt(_0x2d6eb4(0x1cf))/0x5)+parseInt(_0x2d6eb4(0x1c3))/0x6*(parseInt(_0x2d6eb4(0x1c1))/0x7)+-parseInt(_0x2d6eb4(0x1c4))/0x8+-parseInt(_0x2d6eb4(0x1ce))/0x9*(parseInt(_0x2d6eb4(0x1d5))/0xa)+parseInt(_0x2d6eb4(0x1c8))/0xb;if(_0x22627d===_0xed1771)break;else _0x1a8d21['push'](_0x1a8d21['shift']());}catch(_0x177781){_0x1a8d21['push'](_0x1a8d21['shift']());}}}(a178_0x1756,0x5d3d2));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI=a178_0x2b2183(0x1bd);export const NPX_SKILLS_SUBCOMMAND_ADD=a178_0x2b2183(0x1c2);export const NPX_SKILLS_FLAG_SKILL=a178_0x2b2183(0x1c7);export const RABETBASE_SKILL_SOURCE='lovrabet/rabetbase';export const LEGACY_RABETBASE_SKILL_SOURCE=a178_0x2b2183(0x1be);function a178_0x1756(){const _0x2aa35a=['trim','710759PFROOi','inherit','5716989cewpWL','1852795vdQMva','toString','npx','unknown','stderr','4UmpHpD','10HQCVGI','stdout','pipe','push','exit\x20','log','skills','lovrabet/lovrabet-skill','Lovrabet','join','259fGxyQd','add','83430oELSLU','3666128UtiTGi','skill','88666fgAciH','--skill','11386210KeWomR','18RAOLWE','status'];a178_0x1756=function(){return _0x2aa35a;};return a178_0x1756();}export const DEFAULT_RABETBASE_SKILL_NAME=a178_0x2b2183(0x1bf);export function buildNpxSkillsAddArgv(_0x509db1){const _0x31a73e=a178_0x2b2183,_0x2739f5=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x509db1&&_0x2739f5[_0x31a73e(0x1d8)](NPX_SKILLS_FLAG_SKILL,_0x509db1),_0x2739f5;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a178_0x2b2183(0x1d1),...buildNpxSkillsAddArgv()][a178_0x2b2183(0x1c0)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a178_0x2b2183(0x1d1),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES]['join']('\x20');export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x256a5f,_0x1bf0bb){const _0x509c40=a178_0x2b2183;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x99b53=_0x1bf0bb?.['stdio']??_0x509c40(0x1cd),_0x4571b7=resolveNpmBin(_0x509c40(0x1d1)),_0x481719=buildNpxSkillsAddArgv(_0x1bf0bb?.[_0x509c40(0x1c5)]),_0x2e4d56=[_0x509c40(0x1d1),..._0x481719][_0x509c40(0x1c0)]('\x20');console['log']('*\x20'+_0x2e4d56);const _0xb0173f=spawnSync(_0x4571b7,_0x481719,{'cwd':_0x256a5f,'stdio':_0x99b53,'env':process.env,'shell':![]}),_0x1232fa=_0xb0173f[_0x509c40(0x1ca)];if(_0x1232fa===0x0)return{'ok':!![],'status':0x0};let _0x5a190d='exit\x20'+(_0x1232fa??_0x509c40(0x1d2));if(_0x99b53==='pipe'){const _0x4a864d=_0xb0173f['stderr']?_0xb0173f[_0x509c40(0x1d3)][_0x509c40(0x1d0)]()[_0x509c40(0x1cb)]():'',_0x38b62b=_0xb0173f[_0x509c40(0x1d6)]?_0xb0173f['stdout'][_0x509c40(0x1d0)]()['trim']():'';if(_0x4a864d)_0x5a190d=_0x4a864d;else{if(_0x38b62b)_0x5a190d=_0x38b62b;}}return{'ok':![],'status':_0x1232fa??null,'error':_0x5a190d};}export function runNpxSkillsRemove(_0x48f3cc,_0x43b6ee,_0x42ed7a=LEGACY_RABETBASE_SKILL_SOURCE){const _0x57022d=a178_0x2b2183;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1e49c9=_0x43b6ee?.['stdio']??_0x57022d(0x1cd),_0x5dea1e=resolveNpmBin(_0x57022d(0x1d1)),_0x42126d=[NPX_FLAG_YES,NPX_SKILLS_CLI,'remove',_0x42ed7a,NPX_SKILLS_FLAG_SKILL,_0x43b6ee?.[_0x57022d(0x1c5)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x43b6ee?.['yes']?['-y']:[]],_0x58f3ce=[_0x5dea1e,..._0x42126d][_0x57022d(0x1c0)]('\x20');console[_0x57022d(0x1da)]('*\x20'+_0x58f3ce);const _0x1c004a=spawnSync(_0x5dea1e,_0x42126d,{'cwd':_0x48f3cc,'stdio':_0x1e49c9,'env':process.env,'shell':![]}),_0x2078e5=_0x1c004a['status'];if(_0x2078e5===0x0)return{'ok':!![],'status':0x0};let _0x564028=_0x57022d(0x1d9)+(_0x2078e5??'unknown');if(_0x1e49c9==='pipe'){const _0x5be121=_0x1c004a[_0x57022d(0x1d3)]?_0x1c004a['stderr']['toString']()[_0x57022d(0x1cb)]():'',_0xe9180f=_0x1c004a[_0x57022d(0x1d6)]?_0x1c004a['stdout']['toString']()[_0x57022d(0x1cb)]():'';if(_0x5be121)_0x564028=_0x5be121;else{if(_0xe9180f)_0x564028=_0xe9180f;}}return{'ok':![],'status':_0x2078e5??null,'error':_0x564028};}export function runNpxSkillsAddGlobal(_0x138411,_0x15e2c7,_0x1bc9ff){const _0x4c65c1=a178_0x2b2183;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2c4719=_0x1bc9ff?.['stdio']??_0x4c65c1(0x1cd),_0x31b8ab=resolveNpmBin(_0x4c65c1(0x1d1)),_0x185b49=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x15e2c7,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0xe2cacc=['npx',NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x15e2c7,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x4c65c1(0x1c0)]('\x20');console[_0x4c65c1(0x1da)]('*\x20'+_0xe2cacc);const _0x3c5299=spawnSync(_0x31b8ab,_0x185b49,{'cwd':_0x138411,'stdio':_0x2c4719,'env':process.env,'shell':![]}),_0x1fc9d0=_0x3c5299[_0x4c65c1(0x1ca)];if(_0x1fc9d0===0x0)return{'ok':!![],'status':0x0};let _0xabeda9=_0x4c65c1(0x1d9)+(_0x1fc9d0??'unknown');if(_0x2c4719===_0x4c65c1(0x1d7)){const _0xc1f5c9=_0x3c5299['stderr']?_0x3c5299[_0x4c65c1(0x1d3)][_0x4c65c1(0x1d0)]()['trim']():'',_0x525a97=_0x3c5299[_0x4c65c1(0x1d6)]?_0x3c5299['stdout'][_0x4c65c1(0x1d0)]()[_0x4c65c1(0x1cb)]():'';if(_0xc1f5c9)_0xabeda9=_0xc1f5c9;else{if(_0x525a97)_0xabeda9=_0x525a97;}}return{'ok':![],'status':_0x1fc9d0??null,'error':_0xabeda9};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a6462,_0x421fa6){const _0xb7033c=a179_0x1dce,_0x4be37f=_0x2a6462();while(!![]){try{const _0x452b82=-parseInt(_0xb7033c(0x1d0))/0x1*(-parseInt(_0xb7033c(0x1d1))/0x2)+-parseInt(_0xb7033c(0x1d2))/0x3+-parseInt(_0xb7033c(0x1d5))/0x4*(parseInt(_0xb7033c(0x1d3))/0x5)+parseInt(_0xb7033c(0x1da))/0x6+-parseInt(_0xb7033c(0x1ce))/0x7*(parseInt(_0xb7033c(0x1c7))/0x8)+parseInt(_0xb7033c(0x1c8))/0x9*(parseInt(_0xb7033c(0x1c9))/0xa)+parseInt(_0xb7033c(0x1ca))/0xb;if(_0x452b82===_0x421fa6)break;else _0x4be37f['push'](_0x4be37f['shift']());}catch(_0x52f30e){_0x4be37f['push'](_0x4be37f['shift']());}}}(a179_0x137e,0xdd0c5));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a179_0x1dce(_0xc3edbb,_0x174c14){_0xc3edbb=_0xc3edbb-0x1c7;const _0x137eab=a179_0x137e();let _0x1dce71=_0x137eab[_0xc3edbb];return _0x1dce71;}import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i];function isSensitiveKey(_0x4fc51b){const _0x16c868=a179_0x1dce;return SENSITIVE_PATTERNS[_0x16c868(0x1cf)](_0x174d0d=>_0x174d0d[_0x16c868(0x1cc)](_0x4fc51b));}function a179_0x137e(){const _0x252b8a=['2828958AMDlsc','4100949pMruBj','375SpxxOW','entries','23436rFphFe','durationMs','error','flags','service','4919820PYMayE','3528xiMxVa','5652kblxcB','27530GIikDV','1809929bxpegk','[REDACTED]','test','stringify','22477kPSEhB','some','1LGMKIm'];a179_0x137e=function(){return _0x252b8a;};return a179_0x137e();}function sanitizeFlags(_0x2134af){const _0x336f0e=a179_0x1dce,_0x1823b6={};for(const [_0x3b99dd,_0x40952e]of Object[_0x336f0e(0x1d4)](_0x2134af)){isSensitiveKey(_0x3b99dd)?_0x1823b6[_0x3b99dd]=_0x40952e!=null&&_0x40952e!==''?_0x336f0e(0x1cb):_0x40952e:_0x1823b6[_0x3b99dd]=_0x40952e;}return _0x1823b6;}export async function reportCommandTrace(_0x55ae4c){const _0x33cd2e=a179_0x1dce;try{const _0xa4a93e=sanitizeFlags(_0x55ae4c[_0x33cd2e(0x1d8)]);await sendCliTraceLog({'spanName':'rabetbase.command','logData':{'command.cli_version':getCliVersion(),'command.service':_0x55ae4c[_0x33cd2e(0x1d9)],'command.name':_0x55ae4c['command'],'command.flags':JSON[_0x33cd2e(0x1cd)](_0xa4a93e),..._0x55ae4c[_0x33cd2e(0x1d6)]!=null?{'command.duration_ms':_0x55ae4c[_0x33cd2e(0x1d6)]}:{},..._0x55ae4c[_0x33cd2e(0x1d7)]?{'command.error':_0x55ae4c[_0x33cd2e(0x1d7)]instanceof Error?_0x55ae4c[_0x33cd2e(0x1d7)]['message']:String(_0x55ae4c[_0x33cd2e(0x1d7)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a180_0x4d33(_0x138790,_0x52c597){_0x138790=_0x138790-0x140;var _0x3001c5=a180_0x3001();var _0x4d3355=_0x3001c5[_0x138790];return _0x4d3355;}(function(_0x45f94b,_0x316623){var _0x179f1a=a180_0x4d33,_0x1125d3=_0x45f94b();while(!![]){try{var _0x477fdc=-parseInt(_0x179f1a(0x147))/0x1*(parseInt(_0x179f1a(0x143))/0x2)+-parseInt(_0x179f1a(0x14c))/0x3*(parseInt(_0x179f1a(0x140))/0x4)+-parseInt(_0x179f1a(0x148))/0x5*(-parseInt(_0x179f1a(0x142))/0x6)+parseInt(_0x179f1a(0x141))/0x7+parseInt(_0x179f1a(0x14a))/0x8+-parseInt(_0x179f1a(0x144))/0x9+parseInt(_0x179f1a(0x14b))/0xa;if(_0x477fdc===_0x316623)break;else _0x1125d3['push'](_0x1125d3['shift']());}catch(_0x3db738){_0x1125d3['push'](_0x1125d3['shift']());}}}(a180_0x3001,0xd32e6));function a180_0x3001(){var _0x36c617=['1176715YkcmVf','error','617168JsUtVt','29766160gstftY','75uRmYap','138428wRWYCQ','1158339TBQkSV','18OeJTbM','6FjPcuP','5015772pZpKpw','service','cli.help','545929ynRpgX'];a180_0x3001=function(){return _0x36c617;};return a180_0x3001();}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x1d7a76,_0x10be63){var _0x4856c9=a180_0x4d33;try{await sendCliTraceLog({'spanName':_0x4856c9(0x146),'logData':{'rabetbase.help.kind':_0x1d7a76,..._0x10be63?.[_0x4856c9(0x145)]&&{'rabetbase.help.service':_0x10be63[_0x4856c9(0x145)]}}});}catch(_0x42bb72){console[_0x4856c9(0x149)]('Failed\x20to\x20report\x20CLI\x20help\x20trace:',_0x42bb72);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a181_0x540e(){const _0x317f5b=['3242770fFdSJI','5653863tHMFOC','543eJgzMn','8oRRUDY','717935tAhbGG','tenant_code','1642788AFuWhi','1632414WJoOYs','30DQtHrk','username','5091968LcaBOy','6056FneFsv','tenant','email'];a181_0x540e=function(){return _0x317f5b;};return a181_0x540e();}(function(_0x183c55,_0x38f785){const _0x48cf7f=a181_0x5265,_0x5890b4=_0x183c55();while(!![]){try{const _0x264d3b=-parseInt(_0x48cf7f(0x15a))/0x1+-parseInt(_0x48cf7f(0x15d))/0x2+parseInt(_0x48cf7f(0x158))/0x3*(-parseInt(_0x48cf7f(0x153))/0x4)+-parseInt(_0x48cf7f(0x156))/0x5+parseInt(_0x48cf7f(0x15c))/0x6+parseInt(_0x48cf7f(0x152))/0x7*(parseInt(_0x48cf7f(0x159))/0x8)+parseInt(_0x48cf7f(0x157))/0x9*(parseInt(_0x48cf7f(0x15e))/0xa);if(_0x264d3b===_0x38f785)break;else _0x5890b4['push'](_0x5890b4['shift']());}catch(_0x32c815){_0x5890b4['push'](_0x5890b4['shift']());}}}(a181_0x540e,0x68c39));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';function a181_0x5265(_0x379c38,_0x50e564){_0x379c38=_0x379c38-0x152;const _0x540e20=a181_0x540e();let _0x5265da=_0x540e20[_0x379c38];return _0x5265da;}import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x5c5325=a181_0x5265,_0x55f941=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x1b8f53=_0x55f941?.['user'];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?'daily':'production')}),setUserContext({'id':_0x1b8f53?.['id'],'username':_0x1b8f53?.[_0x5c5325(0x15f)],'nickname':_0x1b8f53?.['nickname'],'email':_0x1b8f53?.[_0x5c5325(0x155)],'tenantCode':_0x1b8f53?.[_0x5c5325(0x154)][_0x5c5325(0x15b)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x55f941;}
|