@lovrabet/rabetbase-cli 2.1.7-beta.5 → 2.1.7-beta.7
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
- package/templates/projects/sub-app-react-demo/README.md +1 -1
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x5ea976=a0_0x5009;(function(_0x30249d,_0x554af2){const _0x1c6140=a0_0x5009,_0x503344=_0x30249d();while(!![]){try{const _0x41c278=-parseInt(_0x1c6140(0x1de))/0x1+parseInt(_0x1c6140(0x1f8))/0x2*(parseInt(_0x1c6140(0x1f4))/0x3)+parseInt(_0x1c6140(0x1ea))/0x4+parseInt(_0x1c6140(0x1e0))/0x5+-parseInt(_0x1c6140(0x1f2))/0x6+parseInt(_0x1c6140(0x1f6))/0x7*(parseInt(_0x1c6140(0x1ee))/0x8)+parseInt(_0x1c6140(0x1f9))/0x9;if(_0x41c278===_0x554af2)break;else _0x503344['push'](_0x503344['shift']());}catch(_0x545de9){_0x503344['push'](_0x503344['shift']());}}}(a0_0x3d93,0x85bab));function a0_0x3d93(){const _0xdcdec1=['Invalid\x20response\x20format\x20(','353861QZSCql','markdown','1307380rsWOAf','./docs','生成文档成功:\x20','log','api-doc','join','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','Waiting\x203\x20seconds...\x0a','datasetCode','/api/node-toolbox/api-doc-generator','33252vtRmin','tableName','push','length','8WZMNeg','✓\x20Generated:\x20','error','name','5563818DlxFuQ','.md','62151bKzBsj','string','4812493XoTkOQ','utf8','42vGAiCR','3929166SNBxlb','success','Fetch\x20doc\x20(','.md\x20(','POST'];a0_0x3d93=function(){return _0xdcdec1;};return a0_0x3d93();}import{mkdirSync,writeFileSync}from'node:fs';import a0_0x5049e9 from'node:path';import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0x5b32e0){const _0x3987cc=a0_0x5009,{appCode:_0x3c9266,cookie:_0x2508e0,datasetCode:_0x5f077d,datasetId:_0x46ea64,extraParams:_0x170da8}=_0x5b32e0,_0x38631e=getApiDomain()+_0x3987cc(0x1e9),_0x31adf6=await platformFetch(_0x38631e,{'method':_0x3987cc(0x1fd),'body':{'appCode':_0x3c9266,'datasetCode':_0x5f077d,'datasetId':_0x46ea64,..._0x170da8||{}},'cookie':_0x2508e0,'label':_0x3987cc(0x1fb)+_0x5f077d+')'});if(!_0x31adf6||typeof _0x31adf6[_0x3987cc(0x1df)]!==_0x3987cc(0x1f5))throw new Error(_0x3987cc(0x1dd)+_0x5f077d+'):\x20missing\x20data.markdown\x20field');return _0x31adf6[_0x3987cc(0x1df)];}function delay(_0x4a8ec3){return new Promise(_0x1828e0=>setTimeout(_0x1828e0,_0x4a8ec3));}function a0_0x5009(_0x58275a,_0x3a083c){_0x58275a=_0x58275a-0x1dd;const _0x3d93ce=a0_0x3d93();let _0x50092a=_0x3d93ce[_0x58275a];return _0x50092a;}export async function generateDatasetDocs(_0x3d7852,_0x4563f9,_0x11c2b8,_0x2464bd=a0_0x5ea976(0x1e1),_0x5cd736,_0x169dcd){const _0x13398c=a0_0x5ea976;mkdirSync(_0x2464bd,{'recursive':!![]});const _0x592622=[],_0x19c7b7=_0x3d7852['length'];console['log']('\x0a'+_0x19c7b7+_0x13398c(0x1e6));for(let _0x3e68b1=0x0;_0x3e68b1<_0x3d7852[_0x13398c(0x1ed)];_0x3e68b1++){const _0x543696=_0x3d7852[_0x3e68b1],_0xf71570=_0x3e68b1+0x1,_0xd8447a=_0x543696[_0x13398c(0x1eb)];try{console[_0x13398c(0x1e3)]('['+_0xf71570+'/'+_0x19c7b7+']\x20Generating:\x20'+_0xd8447a+_0x13398c(0x1fc)+_0x543696[_0x13398c(0x1f1)]+')');if(_0x5cd736)_0x5cd736(_0xf71570,_0x19c7b7,_0xd8447a);const _0x3d6ec1=await fetchDatasetDoc({'appCode':_0x4563f9,'cookie':_0x11c2b8,'datasetCode':_0x543696['datasetCode'],'datasetId':_0x543696['id'],'enableAI':![],'extraParams':_0x169dcd}),_0x57d6b5=a0_0x5049e9[_0x13398c(0x1e5)](_0x2464bd,_0xd8447a+_0x13398c(0x1f3));writeFileSync(_0x57d6b5,_0x3d6ec1,{'encoding':_0x13398c(0x1f7)}),console[_0x13398c(0x1e3)](_0x13398c(0x1ef)+_0xd8447a+'.md'),logger[_0x13398c(0x1fa)](_0x13398c(0x1e4),_0x13398c(0x1e2)+_0xd8447a,undefined,{'datasetCode':_0x543696[_0x13398c(0x1e8)],'datasetName':_0x543696[_0x13398c(0x1f1)],'filePath':_0x57d6b5,'progress':_0xf71570+'/'+_0x19c7b7}),_0x592622[_0x13398c(0x1ec)]({'datasetCode':_0x543696[_0x13398c(0x1e8)],'datasetName':_0x543696[_0x13398c(0x1f1)],'filePath':_0x57d6b5,'success':!![]});if(_0xf71570<_0x19c7b7)await delay(0x1388);}catch(_0x3487b8){const _0xcfe9a3=_0x3487b8 instanceof Error?_0x3487b8['message']:String(_0x3487b8);console[_0x13398c(0x1e3)]('✗\x20Failed:\x20'+_0xd8447a+'.md\x20-\x20'+_0xcfe9a3),logger[_0x13398c(0x1f0)](_0x13398c(0x1e4),'生成文档失败:\x20'+_0x543696[_0x13398c(0x1e8)],{'datasetCode':_0x543696[_0x13398c(0x1e8)],'datasetName':_0x543696[_0x13398c(0x1f1)],'error':_0xcfe9a3,'progress':_0xf71570+'/'+_0x19c7b7}),_0x592622['push']({'datasetCode':_0x543696[_0x13398c(0x1e8)],'datasetName':_0x543696['name'],'filePath':'','success':![],'error':_0xcfe9a3}),_0xf71570<_0x19c7b7&&(console[_0x13398c(0x1e3)](_0x13398c(0x1e7)),await delay(0xbb8));}}return _0x592622;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27e8a2,_0x1adf6e){const _0x27f5ec=a1_0x3a71,_0x118ae9=_0x27e8a2();while(!![]){try{const _0x35d5bf=parseInt(_0x27f5ec(0x1da))/0x1*(-parseInt(_0x27f5ec(0x1d1))/0x2)+parseInt(_0x27f5ec(0x1d3))/0x3+parseInt(_0x27f5ec(0x1d4))/0x4*(-parseInt(_0x27f5ec(0x1cd))/0x5)+parseInt(_0x27f5ec(0x1ca))/0x6+parseInt(_0x27f5ec(0x1db))/0x7*(-parseInt(_0x27f5ec(0x1dc))/0x8)+parseInt(_0x27f5ec(0x1d2))/0x9+-parseInt(_0x27f5ec(0x1cf))/0xa*(-parseInt(_0x27f5ec(0x1d8))/0xb);if(_0x35d5bf===_0x1adf6e)break;else _0x118ae9['push'](_0x118ae9['shift']());}catch(_0x5956d8){_0x118ae9['push'](_0x118ae9['shift']());}}}(a1_0x2cf9,0xa51a3));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';import{platformFetch}from'../core/api-client.js';function cleanNewlines(_0x87f9af){return _0x87f9af['replace'](/[\r\n]+/g,'\x20')['trim']();}function a1_0x3a71(_0x54266a,_0x34f60f){_0x54266a=_0x54266a-0x1ca;const _0x2cf991=a1_0x2cf9();let _0x3a71b3=_0x2cf991[_0x54266a];return _0x3a71b3;}function cleanDatasetName(_0x4dcc27){const _0x1c3977=a1_0x3a71;if(!_0x4dcc27[_0x1c3977(0x1cc)])return _0x4dcc27;return{..._0x4dcc27,'name':cleanNewlines(_0x4dcc27['name'])};}function a1_0x2cf9(){const _0x2d35ac=['3269097MgJDNq','460076NWMnpC','Fetch\x20datasets','正在从服务器拉取模型列表...\x20(环境:\x20','/api/node-toolbox/dataset/model-list?appcode=','11FwWaoR','fetch-model-list','7BcQDZQ','99694bRmsVw','40jQIDzm','info','632358RKhPls','map','name','55uomZjO','&otype=array','5975090kiMLLZ','length','104626NrhhUM','5276412PeTUkR'];a1_0x2cf9=function(){return _0x2d35ac;};return a1_0x2cf9();}export async function fetchModelList(_0x2ee0e6,_0x3267fa){const _0x2e4d99=a1_0x3a71,_0x130564=getEnv(),_0xc96f1a=getApiDomain()+_0x2e4d99(0x1d7)+_0x2ee0e6+_0x2e4d99(0x1ce);logger[_0x2e4d99(0x1dd)](_0x2e4d99(0x1d9),_0x2e4d99(0x1d6)+_0x130564+')',{'apiUrl':_0xc96f1a});const _0x21f33f=await platformFetch(_0xc96f1a,{'cookie':_0x3267fa,'label':_0x2e4d99(0x1d5)}),_0x12ad79=(_0x21f33f['configArray']??[])[_0x2e4d99(0x1cb)](cleanDatasetName);return{'configArray':_0x12ad79,'count':_0x12ad79[_0x2e4d99(0x1d0)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33db74,_0x4b0940){const _0x704c5c=a2_0x2942,_0x1a6b56=_0x33db74();while(!![]){try{const _0x5e0bd9=parseInt(_0x704c5c(0x87))/0x1+-parseInt(_0x704c5c(0x75))/0x2+-parseInt(_0x704c5c(0x6c))/0x3+parseInt(_0x704c5c(0x8c))/0x4+parseInt(_0x704c5c(0x6e))/0x5*(-parseInt(_0x704c5c(0x7a))/0x6)+-parseInt(_0x704c5c(0x82))/0x7*(-parseInt(_0x704c5c(0x8b))/0x8)+parseInt(_0x704c5c(0x71))/0x9*(-parseInt(_0x704c5c(0x6a))/0xa);if(_0x5e0bd9===_0x4b0940)break;else _0x1a6b56['push'](_0x1a6b56['shift']());}catch(_0x2c499e){_0x1a6b56['push'](_0x1a6b56['shift']());}}}(a2_0x1a48,0x8bdf0));import a2_0x4af691 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x1fb621 from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';function a2_0x1a48(){const _0x2f4e50=['.ts','3941iaWhem','LOVRABET','-api','\x20config\x20set\x20app\x20<value>`',',\x20env:\x20\x22','1071271lFQrVT','push','client','../..','8728lDyVBk','4545248iRaVyF','utf8','CONFIG_NAMES.DEFAULT','replace','resolve','replaceApiContent','forEach','toUpperCase','9543070yqZqAK','datasetCode','1199082omttMs','length','199145QwaGVK','success','typescript','9tbjSOt','{\x20apiConfigName:\x20\x22','dirname','API\x20文件生成成功!','754252KMIhMg','test','init-api','key','format','78UMFZrB','\x22\x20}','api.ts.tpl','join','alias','Please\x20configure\x20app\x20code\x20first\x20via\x20`','api'];a2_0x1a48=function(){return _0x2f4e50;};return a2_0x1a48();}import{CLI_BIN_NAME}from'../constant/cli.js';function a2_0x2942(_0xb4afd4,_0x3ab61f){_0xb4afd4=_0xb4afd4-0x69;const _0x1a4877=a2_0x1a48();let _0x29424c=_0x1a4877[_0xb4afd4];return _0x29424c;}import{logger}from'../utils/logger.js';import{isProduction}from'../constant/env.js';export async function generateApiFile(_0x2ff7f1,_0x166cbe,_0x4829ad,_0x3808fc,_0x19ab0c,_0x1286b0,_0x3b8518){const _0x4ca81e=a2_0x2942;if(!_0x4829ad)throw new Error(_0x4ca81e(0x7f)+CLI_BIN_NAME+_0x4ca81e(0x85));const _0x7dc898=_0x3808fc&&!_0x3b8518,_0x3f625a=_0x3b8518||_0x4829ad,_0x505d66=_0x7dc898?_0x4ca81e(0x8e):'\x22'+_0x3f625a+'\x22',_0x4ef2ed=!isProduction(_0x19ab0c);let _0x4ce4b0;if(_0x7dc898)_0x4ef2ed?_0x4ce4b0='{\x20apiConfigName:\x20'+_0x505d66+_0x4ca81e(0x86)+_0x19ab0c+_0x4ca81e(0x7b):_0x4ce4b0='';else{const _0x12ab8b=_0x4ef2ed?',\x20env:\x20\x22'+_0x19ab0c+'\x22':'';_0x4ce4b0=_0x4ca81e(0x72)+_0x3f625a+'\x22'+_0x12ab8b+'\x20}';}const _0x47e419=_0x166cbe?_0x166cbe+_0x4ca81e(0x84):_0x4ca81e(0x80),_0x1b4218=_0x166cbe?_0x166cbe+'-client':_0x4ca81e(0x89),_0x190014=_0x166cbe&&!/^app-[a-f0-9]+$/i[_0x4ca81e(0x76)](_0x166cbe)?_0x166cbe[_0x4ca81e(0x8f)](/-/g,'_')[_0x4ca81e(0x69)]():_0x4ca81e(0x83),_0x229d89=[];_0x2ff7f1[_0x4ca81e(0x92)](_0x40587a=>{const _0x3934e5=_0x4ca81e;_0x229d89[_0x3934e5(0x88)]({'datasetCode':_0x40587a[_0x3934e5(0x6b)],'tableName':_0x40587a['tableName'],'name':_0x40587a['name']||'','alias':_0x40587a[_0x3934e5(0x7e)]||_0x40587a[_0x3934e5(0x78)]});});const _0xcd8cdb=fileURLToPath(import.meta.url),_0x1a4e60=a2_0x1fb621[_0x4ca81e(0x90)](a2_0x1fb621[_0x4ca81e(0x73)](_0xcd8cdb),_0x4ca81e(0x8a)),_0x532cab=a2_0x1fb621['join'](_0x1a4e60,'templates/generate-api'),_0x457e4f=a2_0x1fb621[_0x4ca81e(0x7d)](_0x532cab,_0x4ca81e(0x7c)),_0x3bb794=a2_0x1fb621[_0x4ca81e(0x7d)](_0x532cab,'client.ts.tpl'),_0xc68692=_0x1286b0;mkdirSync(_0xc68692,{'recursive':!![]});const _0x2e096d=_0x229d89[0x0]?.[_0x4ca81e(0x7e)],_0x5577f5=readFileSync(_0x457e4f,_0x4ca81e(0x8d)),_0x2149da=TemplateReplacer[_0x4ca81e(0x91)](_0x5577f5,_0x4829ad,_0x229d89,_0x2e096d,_0x47e419,_0x505d66,undefined,_0x190014),_0x371867=await a2_0x4af691[_0x4ca81e(0x79)](_0x2149da,{'parser':_0x4ca81e(0x70)}),_0x4f9289=a2_0x1fb621[_0x4ca81e(0x7d)](_0xc68692,_0x47e419+_0x4ca81e(0x81));writeFileSync(_0x4f9289,_0x371867,{'encoding':_0x4ca81e(0x8d)});const _0x5e5870=readFileSync(_0x3bb794,'utf8'),_0x2ef778=TemplateReplacer['replaceApiContent'](_0x5e5870,_0x4829ad,_0x229d89,_0x2e096d,_0x47e419,_0x505d66,_0x4ce4b0,_0x190014),_0x1a681e=await a2_0x4af691[_0x4ca81e(0x79)](_0x2ef778,{'parser':_0x4ca81e(0x70)}),_0x58a4fa=a2_0x1fb621[_0x4ca81e(0x7d)](_0xc68692,_0x1b4218+'.ts');writeFileSync(_0x58a4fa,_0x1a681e,{'encoding':_0x4ca81e(0x8d)});const _0x586017=_0x229d89[_0x4ca81e(0x6d)];return logger[_0x4ca81e(0x6f)](_0x4ca81e(0x77),_0x4ca81e(0x74),undefined,{'apiFile':_0x4f9289,'clientFile':_0x58a4fa,'modelCount':_0x586017,'configName':_0x505d66}),{'modelCount':_0x586017,'apiFilePath':_0x4f9289,'clientFilePath':_0x58a4fa,'configName':_0x505d66};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9ce27d,_0x3e2e7b){const _0x294203=a3_0x5096,_0x296568=_0x9ce27d();while(!![]){try{const _0xe6f26f=-parseInt(_0x294203(0x1c7))/0x1*(parseInt(_0x294203(0x1be))/0x2)+-parseInt(_0x294203(0x1c4))/0x3+-parseInt(_0x294203(0x1c0))/0x4+parseInt(_0x294203(0x1c6))/0x5*(-parseInt(_0x294203(0x1c3))/0x6)+-parseInt(_0x294203(0x1bc))/0x7+parseInt(_0x294203(0x1bd))/0x8*(parseInt(_0x294203(0x1c8))/0x9)+parseInt(_0x294203(0x1c1))/0xa;if(_0xe6f26f===_0x3e2e7b)break;else _0x296568['push'](_0x296568['shift']());}catch(_0x2525ab){_0x296568['push'](_0x296568['shift']());}}}(a3_0x9d11,0x757d4));import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a3_0x9d11(){const _0x49edd1=['log','45nQgygR','1WGQuIE','372663oDWdmy','validation','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','stop','start','\x20auth\x20login\x20--yes`\x20in\x20an\x20interactive\x20terminal.','!\x20Login\x20failed.','Run\x20`','2709280exRcNs','136CTcyRn','50746mOJPyo','*\x20Login\x20successful!','1453868peySTO','6140880pGBmhj','No\x20valid\x20session.\x20Login\x20now?','9522owNrZk','139824GJvfXu'];a3_0x9d11=function(){return _0x49edd1;};return a3_0x9d11();}import{CLI_BIN_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{confirm}from'@inquirer/prompts';function a3_0x5096(_0x161861,_0x1db282){_0x161861=_0x161861-0x1ba;const _0x9d113f=a3_0x9d11();let _0x5096d1=_0x9d113f[_0x161861];return _0x5096d1;}import a3_0x2ff6fc from'ora';export async function runAuthServer(_0x1e42c0){const _0x4484c9=a3_0x5096,_0x4a1e65=await getIsSessionValid();if(_0x4a1e65){console[_0x4484c9(0x1c5)](_0x4484c9(0x1ca));return;}if(_0x1e42c0?.['nonInteractive'])throw CliErrors[_0x4484c9(0x1c9)]('Browser\x20login\x20cannot\x20run\x20in\x20non-interactive\x20mode.',_0x4484c9(0x1bb)+CLI_BIN_NAME+_0x4484c9(0x1cd));const _0x26fff1=_0x1e42c0?.['autoYes']?!![]:await confirm({'message':_0x4484c9(0x1c2),'default':!![]});if(!_0x26fff1)return;const _0x1959f2=a3_0x2ff6fc('Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.')[_0x4484c9(0x1cc)](),_0x4d5e24=await authServer({'silent':!![]});_0x1959f2[_0x4484c9(0x1cb)](),_0x4d5e24?console[_0x4484c9(0x1c5)](_0x4484c9(0x1bf)):console[_0x4484c9(0x1c5)](_0x4484c9(0x1ba));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x4ef158=a4_0x1073;(function(_0x8ae020,_0x529f19){const _0x12b6b4=a4_0x1073,_0x431247=_0x8ae020();while(!![]){try{const _0x5ae615=-parseInt(_0x12b6b4(0x126))/0x1+parseInt(_0x12b6b4(0x121))/0x2+-parseInt(_0x12b6b4(0x129))/0x3+-parseInt(_0x12b6b4(0x10e))/0x4*(-parseInt(_0x12b6b4(0x115))/0x5)+-parseInt(_0x12b6b4(0x118))/0x6+parseInt(_0x12b6b4(0x10d))/0x7+-parseInt(_0x12b6b4(0x10a))/0x8*(-parseInt(_0x12b6b4(0x11a))/0x9);if(_0x5ae615===_0x529f19)break;else _0x431247['push'](_0x431247['shift']());}catch(_0x5ec7b0){_0x431247['push'](_0x431247['shift']());}}}(a4_0x4785,0x23856));import{writeFileSync}from'node:fs';import a4_0x1936d2 from'node:https';function a4_0x4785(){const _0x24b8bf=['451818fgSZao','xdg-open\x20\x22','16263jXcUpU','address','utf-8','error','text/html;\x20charset=utf-8','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','open\x20\x22','97536AdUwsA','🔐\x20Starting\x20login\x20service...','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','end','/api/auth/get-session','167017RQrYBB','writeHead','listen','370005fgQPwJ','port','log','cmd\x20/c\x20start\x20\x22\x22\x20\x22','catch','session','silent','https://g.yuntooai.com/cert/lovrabet-dev.json','user','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','json','504FfSscV','close','win32','1065043ubzVfn','52TwagWm','127.0.0.1','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','headers','platform','https://dev.lovrabet.com:','object','75535QOEMIO','createServer','isAuth'];a4_0x4785=function(){return _0x24b8bf;};return a4_0x4785();}import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';function a4_0x1073(_0x35751b,_0x4728f3){_0x35751b=_0x35751b-0x103;const _0x4785f8=a4_0x4785();let _0x107303=_0x4785f8[_0x35751b];return _0x107303;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{cookieFile}from'../auth/constant.js';import{buildLoginSuccessHtml}from'../auth/login-success-html.js';export async function authServer(_0x7959c1){const _0x5b75eb=a4_0x1073,_0x36ad5c=_0x7959c1?.[_0x5b75eb(0x105)]||![];if(await getIsSessionValid())return!![];const _0x436253=await(await fetch(_0x5b75eb(0x106)))['json']();return new Promise(async(_0x198cc0,_0x239ce6)=>{const _0x3244cd=_0x5b75eb;let _0x15be53=0x0;const _0xde190=a4_0x1936d2[_0x3244cd(0x116)](_0x436253,async(_0x3d0a53,_0x14eb7b)=>{const _0x27f9d2=_0x3244cd,_0x272fd0=getUserDomain(),_0x249b6d=_0x3d0a53[_0x27f9d2(0x111)]['cookie']||'',_0x27bb79=await fetch(_0x272fd0+_0x27f9d2(0x125),{'headers':{'cookie':_0x249b6d}})['then'](_0x39888f=>_0x39888f[_0x27f9d2(0x109)]()),_0x40c8bf=_0x27bb79&&_0x27bb79[_0x27f9d2(0x104)]&&_0x27bb79[_0x27f9d2(0x107)];if(_0x40c8bf){writeFileSync(cookieFile,_0x249b6d,_0x27f9d2(0x11c)),_0x198cc0(!![]);const _0x92750d=buildLoginSuccessHtml();_0x14eb7b[_0x27f9d2(0x127)](0xc8,{'Content-Type':_0x27f9d2(0x11e)}),_0x14eb7b[_0x27f9d2(0x124)](_0x92750d),_0xde190[_0x27f9d2(0x10b)]();}else{const _0x1487e8=''+encodeURIComponent(_0x27f9d2(0x113)+_0x15be53);_0x14eb7b[_0x27f9d2(0x127)](0x12e,{'location':_0x272fd0+'/sign-in?redirect='+_0x1487e8}),_0x14eb7b[_0x27f9d2(0x124)]();return;}});_0xde190[_0x3244cd(0x128)](0x0,_0x3244cd(0x10f),()=>{const _0x14b5e8=_0x3244cd,_0xac8c7e=_0xde190[_0x14b5e8(0x11b)]();_0x15be53=typeof _0xac8c7e===_0x14b5e8(0x114)&&_0xac8c7e?_0xac8c7e[_0x14b5e8(0x12a)]:Number(_0xac8c7e);const _0x193bee=_0x14b5e8(0x113)+_0x15be53;!_0x36ad5c&&(console[_0x14b5e8(0x12b)](_0x14b5e8(0x122)),console[_0x14b5e8(0x12b)]('📍\x20Login\x20URL:',_0x193bee),console[_0x14b5e8(0x12b)](_0x14b5e8(0x108)),console[_0x14b5e8(0x12b)](''),console[_0x14b5e8(0x12b)](_0x14b5e8(0x11f)),console[_0x14b5e8(0x12b)]('')),openInBrowser(_0x193bee)['then'](_0xd928ac=>{const _0x225795=_0x14b5e8;!_0x36ad5c&&(_0xd928ac?console['log']('✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.'):(console['log'](_0x225795(0x110)),console[_0x225795(0x12b)](_0x225795(0x123),_0x193bee)),console[_0x225795(0x12b)](''));})[_0x14b5e8(0x103)](()=>{const _0x47b79b=_0x14b5e8;!_0x36ad5c&&(console[_0x47b79b(0x12b)](_0x47b79b(0x110)),console[_0x47b79b(0x12b)](_0x47b79b(0x123),_0x193bee),console[_0x47b79b(0x12b)](''));});}),_0xde190['on'](_0x3244cd(0x11d),_0xe26f0c=>{const _0x569ed3=_0x3244cd;!_0x36ad5c&&console[_0x569ed3(0x11d)]('Auth\x20server\x20error:',_0xe26f0c),_0x239ce6(_0xe26f0c);});});}function openInBrowser(_0x3f243f){return new Promise(_0x8142d5=>{const _0x25ba07=a4_0x1073,_0xb3bc28=process[_0x25ba07(0x112)];let _0x4dfd4f;if(_0xb3bc28===_0x25ba07(0x10c))_0x4dfd4f=_0x25ba07(0x12c)+_0x3f243f+'\x22';else _0xb3bc28==='darwin'?_0x4dfd4f=_0x25ba07(0x120)+_0x3f243f+'\x22':_0x4dfd4f=_0x25ba07(0x119)+_0x3f243f+'\x22';exec(_0x4dfd4f,_0x28850f=>{_0x28850f?_0x8142d5(![]):_0x8142d5(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a4_0x4ef158(0x12b)](a4_0x4ef158(0x117),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a5_0x4c23(){const _0x38dfde=['12gvcYqO','1906776KzEOlJ','647829OTdfnO','95538RtSeLw','10bASWbM','8OmSZbD','4219410OjFVuQ','.lovrabet','10522391xzdDsE','cookie','611826WIwMKI','19426KDxnyw','16zhgPuz'];a5_0x4c23=function(){return _0x38dfde;};return a5_0x4c23();}const a5_0x1ff85a=a5_0x1776;(function(_0x39087f,_0x1d15ef){const _0x2d12ee=a5_0x1776,_0x381842=_0x39087f();while(!![]){try{const _0x73dbf4=-parseInt(_0x2d12ee(0x122))/0x1*(-parseInt(_0x2d12ee(0x124))/0x2)+-parseInt(_0x2d12ee(0x121))/0x3*(-parseInt(_0x2d12ee(0x129))/0x4)+parseInt(_0x2d12ee(0x128))/0x5*(-parseInt(_0x2d12ee(0x127))/0x6)+-parseInt(_0x2d12ee(0x126))/0x7+parseInt(_0x2d12ee(0x123))/0x8*(parseInt(_0x2d12ee(0x125))/0x9)+parseInt(_0x2d12ee(0x12a))/0xa+-parseInt(_0x2d12ee(0x12c))/0xb;if(_0x73dbf4===_0x1d15ef)break;else _0x381842['push'](_0x381842['shift']());}catch(_0x2f9d99){_0x381842['push'](_0x381842['shift']());}}}(a5_0x4c23,0x4696f));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a5_0x1ff85a(0x12b));function a5_0x1776(_0x2822c9,_0x1b1d27){_0x2822c9=_0x2822c9-0x120;const _0x4c2386=a5_0x4c23();let _0x1776ca=_0x4c2386[_0x2822c9];return _0x1776ca;}export const cookieFile=join(configDir,a5_0x1ff85a(0x120));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17f8cb,_0x3c0746){var _0x55f739=a6_0x38e6,_0x7ee755=_0x17f8cb();while(!![]){try{var _0x40a807=parseInt(_0x55f739(0x104))/0x1+parseInt(_0x55f739(0x103))/0x2+-parseInt(_0x55f739(0x106))/0x3+-parseInt(_0x55f739(0x109))/0x4+-parseInt(_0x55f739(0x10b))/0x5+-parseInt(_0x55f739(0x107))/0x6+parseInt(_0x55f739(0x105))/0x7*(parseInt(_0x55f739(0x108))/0x8);if(_0x40a807===_0x3c0746)break;else _0x7ee755['push'](_0x7ee755['shift']());}catch(_0x46cce5){_0x7ee755['push'](_0x7ee755['shift']());}}}(a6_0x5956,0xbbd9d));function a6_0x38e6(_0x8555fc,_0x20d96f){_0x8555fc=_0x8555fc-0x103;var _0x595679=a6_0x5956();var _0x38e642=_0x595679[_0x8555fc];return _0x38e642;}import{readFileSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function getCookie(){var _0x2eed9f=a6_0x38e6;try{return readFileSync(cookieFile,_0x2eed9f(0x10a));}catch{}return'';}function a6_0x5956(){var _0x28ac02=['64CheBTu','345408YbORXC','utf-8','2091350QRsohM','1177238nRTqhY','1267348zLXNPd','1632617HXbbJl','3441522YFcScq','7803492gDGijs'];a6_0x5956=function(){return _0x28ac02;};return a6_0x5956();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a7_0x4919(_0x3844f7,_0x2f97da){_0x3844f7=_0x3844f7-0x1d3;const _0x3b2dc5=a7_0x3b2d();let _0x49193f=_0x3b2dc5[_0x3844f7];return _0x49193f;}function a7_0x3b2d(){const _0x3d46df=['4RQcNfP','4599KESZsC','user','19521zUxeNA','591642aeDNEd','294KUXyRy','1321656cAJTGA','1583104youRHe','session','/api/auth/get-session','862806OxWSiN','6250oakELx','50375coLIdi'];a7_0x3b2d=function(){return _0x3d46df;};return a7_0x3b2d();}(function(_0x34bf1d,_0x1ce328){const _0x771676=a7_0x4919,_0x413d66=_0x34bf1d();while(!![]){try{const _0x346881=-parseInt(_0x771676(0x1d3))/0x1+parseInt(_0x771676(0x1d6))/0x2+-parseInt(_0x771676(0x1d4))/0x3*(-parseInt(_0x771676(0x1dd))/0x4)+parseInt(_0x771676(0x1dc))/0x5*(-parseInt(_0x771676(0x1d5))/0x6)+parseInt(_0x771676(0x1da))/0x7+parseInt(_0x771676(0x1d7))/0x8+parseInt(_0x771676(0x1de))/0x9*(-parseInt(_0x771676(0x1db))/0xa);if(_0x346881===_0x1ce328)break;else _0x413d66['push'](_0x413d66['shift']());}catch(_0x3e3c71){_0x413d66['push'](_0x413d66['shift']());}}}(a7_0x3b2d,0x549f9));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getSessionUserInfo(){const _0x3a3d17=a7_0x4919;try{if(!existsSync(cookieFile))return null;const _0x499695=readFileSync(cookieFile,'utf-8'),_0xe1ab7f=await fetch(getUserDomain()+_0x3a3d17(0x1d9),{'headers':{'cookie':_0x499695}});if(!_0xe1ab7f['ok'])return null;const _0x38e287=await _0xe1ab7f['json']();if(!_0x38e287[_0x3a3d17(0x1d8)]||!_0x38e287[_0x3a3d17(0x1df)])return null;return _0x38e287;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a8_0x127a(){const _0x2783b5=['3726527yyJltk','595184QZAGOm','json','9215720goQjkO','1764528afbrQr','38782jpuNNO','8GvUppS','61188eVOmWA','652455FcBAPN'];a8_0x127a=function(){return _0x2783b5;};return a8_0x127a();}(function(_0x1246b0,_0x58013f){const _0x142f04=a8_0x2bf8,_0x5960a2=_0x1246b0();while(!![]){try{const _0x4a8048=-parseInt(_0x142f04(0xf2))/0x1+parseInt(_0x142f04(0xee))/0x2+parseInt(_0x142f04(0xf4))/0x3*(parseInt(_0x142f04(0xf3))/0x4)+-parseInt(_0x142f04(0xec))/0x5+-parseInt(_0x142f04(0xf1))/0x6+-parseInt(_0x142f04(0xed))/0x7+parseInt(_0x142f04(0xf0))/0x8;if(_0x4a8048===_0x58013f)break;else _0x5960a2['push'](_0x5960a2['shift']());}catch(_0x2690df){_0x5960a2['push'](_0x5960a2['shift']());}}}(a8_0x127a,0x78c23));import{existsSync,readFileSync}from'node:fs';function a8_0x2bf8(_0x201766,_0x51e564){_0x201766=_0x201766-0xec;const _0x127aed=a8_0x127a();let _0x2bf80e=_0x127aed[_0x201766];return _0x2bf80e;}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'../auth/constant.js';export async function getIsSessionValid(){const _0x366c15=a8_0x2bf8;try{if(!existsSync(cookieFile))return![];const _0x4d6ffe=readFileSync(cookieFile,'utf-8'),_0x31daaa=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x4d6ffe}})['then'](_0xbfd6d1=>_0xbfd6d1[_0x366c15(0xef)]());return _0x31daaa&&_0x31daaa['session']&&_0x31daaa['user'];}catch{}return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a9_0x2699(){const _0x34477a=['280RslQTP','578112Vzjsuy','219320LwYgul','9VTGLNf','114107dfDllx','1186544gcfvdw','393132hZtlGL','3329330BdQVFG','4fdnjRC','42ZkMVwE','<!doctype\x20html>\x0a<html\x20lang=\x22en\x22>\x0a<head>\x0a\x20\x20<meta\x20charset=\x22utf-8\x22>\x0a\x20\x20<meta\x20name=\x22viewport\x22\x20content=\x22width=device-width,\x20initial-scale=1\x22>\x0a\x20\x20<title>Login\x20successful\x20·\x20Rabetbase\x20CLI</title>\x0a\x20\x20<style>\x0a\x20\x20\x20\x20:root\x20{\x0a\x20\x20\x20\x20\x20\x20--bg0:\x20#0f1419;\x0a\x20\x20\x20\x20\x20\x20--bg1:\x20#1a2332;\x0a\x20\x20\x20\x20\x20\x20--card:\x20#ffffff;\x0a\x20\x20\x20\x20\x20\x20--text:\x20#1c2128;\x0a\x20\x20\x20\x20\x20\x20--muted:\x20#5c6570;\x0a\x20\x20\x20\x20\x20\x20--accent:\x20#2563eb;\x0a\x20\x20\x20\x20\x20\x20--accent-soft:\x20#eff6ff;\x0a\x20\x20\x20\x20\x20\x20--success:\x20#059669;\x0a\x20\x20\x20\x20\x20\x20--radius:\x2016px;\x0a\x20\x20\x20\x20\x20\x20--shadow:\x200\x2025px\x2050px\x20-12px\x20rgba(15,\x2020,\x2025,\x200.35);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20*\x20{\x20box-sizing:\x20border-box;\x20}\x0a\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20min-height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20padding:\x2024px;\x0a\x20\x20\x20\x20\x20\x20font-family:\x20ui-sans-serif,\x20system-ui,\x20-apple-system,\x20\x22Segoe\x20UI\x22,\x20Roboto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22Helvetica\x20Neue\x22,\x20Arial,\x20\x22Noto\x20Sans\x22,\x20\x22PingFang\x20SC\x22,\x20\x22Microsoft\x20YaHei\x22,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20background:\x20linear-gradient(160deg,\x20var(--bg0)\x200%,\x20var(--bg1)\x2045%,\x20#243047\x20100%);\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--text);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.card\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20\x20\x20max-width:\x20420px;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--card);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20var(--radius);\x0a\x20\x20\x20\x20\x20\x20box-shadow:\x20var(--shadow);\x0a\x20\x20\x20\x20\x20\x20padding:\x2040px\x2036px\x2032px;\x0a\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20{\x0a\x20\x20\x20\x20\x20\x20width:\x2064px;\x0a\x20\x20\x20\x20\x20\x20height:\x2064px;\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x20auto\x2020px;\x0a\x20\x20\x20\x20\x20\x20border-radius:\x2050%;\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.icon\x20svg\x20{\x20width:\x2036px;\x20height:\x2036px;\x20}\x0a\x20\x20\x20\x20h1\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x2012px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x201.375rem;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20600;\x0a\x20\x20\x20\x20\x20\x20letter-spacing:\x20-0.02em;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20p.lead\x20{\x0a\x20\x20\x20\x20\x20\x20margin:\x200\x200\x208px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.9375rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--muted);\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.55;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.countdown\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20inline-flex;\x0a\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20gap:\x206px;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2016px;\x0a\x20\x20\x20\x20\x20\x20padding:\x208px\x2014px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.875rem;\x0a\x20\x20\x20\x20\x20\x20font-variant-numeric:\x20tabular-nums;\x0a\x20\x20\x20\x20\x20\x20color:\x20var(--accent);\x0a\x20\x20\x20\x20\x20\x20background:\x20var(--accent-soft);\x0a\x20\x20\x20\x20\x20\x20border-radius:\x20999px;\x0a\x20\x20\x20\x20\x20\x20font-weight:\x20500;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20#manualMsg\x20{\x0a\x20\x20\x20\x20\x20\x20display:\x20none;\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2020px;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.8125rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#b91c1c;\x0a\x20\x20\x20\x20\x20\x20line-height:\x201.45;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20.cli-hint\x20{\x0a\x20\x20\x20\x20\x20\x20margin-top:\x2028px;\x0a\x20\x20\x20\x20\x20\x20padding-top:\x2024px;\x0a\x20\x20\x20\x20\x20\x20border-top:\x201px\x20solid\x20#e8ecf0;\x0a\x20\x20\x20\x20\x20\x20font-size:\x200.75rem;\x0a\x20\x20\x20\x20\x20\x20color:\x20#8b949e;\x0a\x20\x20\x20\x20}\x0a\x20\x20</style>\x0a</head>\x0a<body>\x0a\x20\x20<div\x20class=\x22card\x22\x20role=\x22status\x22\x20aria-live=\x22polite\x22>\x0a\x20\x20\x20\x20<div\x20class=\x22icon\x22\x20aria-hidden=\x22true\x22>\x0a\x20\x20\x20\x20\x20\x20<svg\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20fill=\x22none\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M8\x2012.5l2.5\x202.5L16\x209\x22\x20stroke=\x22#059669\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<h1>Login\x20successful</h1>\x0a\x20\x20\x20\x20<p\x20class=\x22lead\x22>You\x20can\x20return\x20to\x20the\x20terminal\x20to\x20continue.\x20This\x20window\x20will\x20try\x20to\x20close\x20automatically.</p>\x0a\x20\x20\x20\x20<div\x20class=\x22countdown\x22>\x0a\x20\x20\x20\x20\x20\x20Closing\x20in\x20<span\x20id=\x22t\x22>5</span>s\x0a\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20<div\x20id=\x22manualMsg\x22>','545944NPOGBJ','55SwNVzS'];a9_0x2699=function(){return _0x34477a;};return a9_0x2699();}function a9_0x1ae0(_0x4ebc8a,_0x594703){_0x4ebc8a=_0x4ebc8a-0xdb;const _0x2699f3=a9_0x2699();let _0x1ae09b=_0x2699f3[_0x4ebc8a];return _0x1ae09b;}(function(_0x1e3dac,_0x5d9668){const _0x2c4886=a9_0x1ae0,_0x388cf8=_0x1e3dac();while(!![]){try{const _0x5a70ed=-parseInt(_0x2c4886(0xdc))/0x1+-parseInt(_0x2c4886(0xe6))/0x2*(-parseInt(_0x2c4886(0xdf))/0x3)+parseInt(_0x2c4886(0xe3))/0x4+parseInt(_0x2c4886(0xe0))/0x5*(parseInt(_0x2c4886(0xe7))/0x6)+parseInt(_0x2c4886(0xe2))/0x7*(-parseInt(_0x2c4886(0xde))/0x8)+parseInt(_0x2c4886(0xe1))/0x9*(parseInt(_0x2c4886(0xe5))/0xa)+parseInt(_0x2c4886(0xdd))/0xb*(parseInt(_0x2c4886(0xe4))/0xc);if(_0x5a70ed===_0x5d9668)break;else _0x388cf8['push'](_0x388cf8['shift']());}catch(_0x3eabb8){_0x388cf8['push'](_0x388cf8['shift']());}}}(a9_0x2699,0x5a2c7));export function buildLoginSuccessHtml(){const _0x4a5f9b=a9_0x1ae0,_0x4aa203='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.';return _0x4a5f9b(0xdb)+_0x4aa203+'</div>\x0a\x20\x20\x20\x20<p\x20class=\x22cli-hint\x22>Rabetbase\x20CLI\x20·\x20session\x20saved\x20locally</p>\x0a\x20\x20</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x8bdff4,_0x5886e3){var _0x4298f=a10_0x18d0,_0x4a0510=_0x8bdff4();while(!![]){try{var _0x3fc4f1=-parseInt(_0x4298f(0x75))/0x1*(parseInt(_0x4298f(0x6f))/0x2)+parseInt(_0x4298f(0x6e))/0x3+parseInt(_0x4298f(0x70))/0x4*(-parseInt(_0x4298f(0x73))/0x5)+-parseInt(_0x4298f(0x6b))/0x6+parseInt(_0x4298f(0x6d))/0x7+parseInt(_0x4298f(0x72))/0x8+parseInt(_0x4298f(0x6c))/0x9;if(_0x3fc4f1===_0x5886e3)break;else _0x4a0510['push'](_0x4a0510['shift']());}catch(_0x4d69b3){_0x4a0510['push'](_0x4a0510['shift']());}}}(a10_0x143c,0x256ae));function a10_0x18d0(_0x1eab1f,_0x350899){_0x1eab1f=_0x1eab1f-0x6b;var _0x143c64=a10_0x143c();var _0x18d0ab=_0x143c64[_0x1eab1f];return _0x18d0ab;}function a10_0x143c(){var _0x132468=['log','2gmYMjm','386988gkGgQq','713214HFXgNS','411236EfHSZy','491178SvUmJe','92754msrlfL','975692HgOuLf','!\x20Not\x20logged\x20in','2021736juvTbv','5LhqVdC'];a10_0x143c=function(){return _0x132468;};return a10_0x143c();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../auth/constant.js';export function logout(){var _0x103f14=a10_0x18d0;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x103f14(0x74)]('✓\x20Logged\x20out')):console[_0x103f14(0x74)](_0x103f14(0x71));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a11_0x1281(_0x26a41c,_0x4ccafe){_0x26a41c=_0x26a41c-0x1ca;const _0x4b2ac8=a11_0x4b2a();let _0x128123=_0x4b2ac8[_0x26a41c];return _0x128123;}(function(_0x418539,_0x242a54){const _0x219c58=a11_0x1281,_0x293ea7=_0x418539();while(!![]){try{const _0x15c8b8=parseInt(_0x219c58(0x1d2))/0x1+-parseInt(_0x219c58(0x1d0))/0x2+-parseInt(_0x219c58(0x1ca))/0x3*(-parseInt(_0x219c58(0x1ce))/0x4)+-parseInt(_0x219c58(0x1cf))/0x5+parseInt(_0x219c58(0x1d1))/0x6*(-parseInt(_0x219c58(0x1cd))/0x7)+-parseInt(_0x219c58(0x1cc))/0x8+-parseInt(_0x219c58(0x1cb))/0x9*(-parseInt(_0x219c58(0x1d3))/0xa);if(_0x15c8b8===_0x242a54)break;else _0x293ea7['push'](_0x293ea7['shift']());}catch(_0x23c0de){_0x293ea7['push'](_0x293ea7['shift']());}}}(a11_0x4b2a,0xb8318));function a11_0x4b2a(){const _0x72a2ba=['1903041UFEfnG','4348688wyejyS','7eqlpRa','44RdoLhF','6642610KLWSlh','467306kUMlFK','2244678XipLkG','246400zHKluc','110gcIPzg','180543PMFKxC'];a11_0x4b2a=function(){return _0x72a2ba;};return a11_0x4b2a();}export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a12_0x536ba1=a12_0x533b;(function(_0x5ebe91,_0x55ffd1){const _0x2fe560=a12_0x533b,_0x448334=_0x5ebe91();while(!![]){try{const _0x48b037=-parseInt(_0x2fe560(0x163))/0x1+-parseInt(_0x2fe560(0x154))/0x2*(-parseInt(_0x2fe560(0x171))/0x3)+parseInt(_0x2fe560(0x175))/0x4*(-parseInt(_0x2fe560(0x16f))/0x5)+-parseInt(_0x2fe560(0x149))/0x6*(parseInt(_0x2fe560(0x14b))/0x7)+parseInt(_0x2fe560(0x146))/0x8+-parseInt(_0x2fe560(0x152))/0x9+parseInt(_0x2fe560(0x15f))/0xa*(parseInt(_0x2fe560(0x174))/0xb);if(_0x48b037===_0x55ffd1)break;else _0x448334['push'](_0x448334['shift']());}catch(_0x1f4632){_0x448334['push'](_0x448334['shift']());}}}(a12_0x4c10,0x3caa4));import a12_0x360c54 from'meow';import{showHelp}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,deprecatedAliases,resolveDeprecatedSubcommand}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'./generated/build-info.js';import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';let dynamicCliFlags=null;function a12_0x4c10(){const _0x59aea4=['./constant/domain.js','userDomain','input','1908784xJGJyr','error','Hint:\x20','642wrsOaI','exitCode','8449fCUyLk','unknown','string','ExitPromptError','env','message','wildcardDef','26091TJhVSD','./constant/env.js','10VMyERv','log','code','apiDomain','raw','`\x20is\x20an\x20alias\x20of\x20`','runtimeDomain','flags','command','stderr','service','26920nOVyvk','`\x20in\x20v2.0.\x0a','./cli-flags.js','hint','225280IjvlZk','Error:\x20','unknownCommand','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','defaultCommand','./context.js','write','`\x20has\x20been\x20moved\x20to\x20`','slice','dynamicCliFlags','now','global','5105kKDBQz','cancelled','112473GHtcsQ','\x0aCancelled.\x0a','⚠\x20`','2541sOQnrK','1732KsSmmh','help'];a12_0x4c10=function(){return _0x59aea4;};return a12_0x4c10();}function a12_0x533b(_0x437fea,_0x2d1ce8){_0x437fea=_0x437fea-0x146;const _0x4c1082=a12_0x4c10();let _0x533b26=_0x4c1082[_0x437fea];return _0x533b26;}try{dynamicCliFlags=(await import(a12_0x536ba1(0x161)))[a12_0x536ba1(0x16c)];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a12_0x536ba1(0x14c)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a12_0x536ba1(0x16b)](0x0,0xa)+')':VERSION,cli=a12_0x360c54(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0xac7b20=a12_0x536ba1;let _0x54fffc=cli[_0xac7b20(0x179)][0x0],_0x552195=cli['input'][0x1];const _0x5386c5=cli[_0xac7b20(0x15b)];if(!_0x54fffc){await reportCliHelpTrace(_0xac7b20(0x16e)),showHelp();return;}const _0xf58b3a=deprecatedAliases[_0x54fffc];if(_0xf58b3a&&!isKnownService(_0x54fffc)){const _0x479c8c=_0x552195?CLI_BIN_NAME+'\x20'+_0x54fffc+'\x20'+_0x552195:CLI_BIN_NAME+'\x20'+_0x54fffc,_0x169443=CLI_BIN_NAME+'\x20'+_0xf58b3a[_0xac7b20(0x15e)]+'\x20'+_0xf58b3a[_0xac7b20(0x15c)];console['error'](_0xac7b20(0x173)+_0x479c8c+_0xac7b20(0x16a)+_0x169443+_0xac7b20(0x160)+_0xac7b20(0x166)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x54fffc)){await reportCliHelpTrace('unknown_service',{'service':_0x54fffc}),showHelp();return;}const _0x3d7ab2=getServiceEntry(_0x54fffc);if(_0x5386c5[_0xac7b20(0x14f)]&&typeof _0x5386c5[_0xac7b20(0x14f)]===_0xac7b20(0x14d)){const {initEnv:_0xd88703}=await import(_0xac7b20(0x153));_0xd88703(_0x5386c5[_0xac7b20(0x14f)]);}const {buildConfigFromFlags:_0x118b7f}=await import(_0xac7b20(0x168)),_0x1d31be=_0x118b7f(_0x5386c5);if(!_0x5386c5[_0xac7b20(0x14f)]&&_0x1d31be[_0xac7b20(0x14f)]){const {initEnv:_0x308c22}=await import('./constant/env.js');_0x308c22(_0x1d31be[_0xac7b20(0x14f)]);}if(_0x1d31be[_0xac7b20(0x158)]?.[_0xac7b20(0x157)]||_0x1d31be[_0xac7b20(0x158)]?.['userDomain']||_0x1d31be[_0xac7b20(0x158)]?.[_0xac7b20(0x15a)]){const {initDomains:_0x37f842}=await import(_0xac7b20(0x177));_0x37f842({'apiDomain':_0x1d31be[_0xac7b20(0x158)]['apiDomain']||undefined,'userDomain':_0x1d31be[_0xac7b20(0x158)][_0xac7b20(0x178)]||undefined,'runtimeDomain':_0x1d31be[_0xac7b20(0x158)]['runtimeDomain']||undefined});}if(!_0x552195){if(_0x5386c5[_0xac7b20(0x176)]){printServiceHelp(_0x54fffc);return;}if(_0x3d7ab2[_0xac7b20(0x167)])_0x552195=_0x3d7ab2['defaultCommand'];else{if(_0x3d7ab2[_0xac7b20(0x151)]){await dispatchDeclarative(_0x3d7ab2[_0xac7b20(0x151)],_0x54fffc,'',[],_0x5386c5,_0x1d31be);return;}else{printServiceHelp(_0x54fffc);return;}}}const _0x19beaa=resolveDeprecatedSubcommand(_0x54fffc,_0x552195);if(_0x19beaa){const _0x452e99=CLI_BIN_NAME+'\x20'+_0x54fffc+'\x20'+_0x552195,_0x2b89be=CLI_BIN_NAME+'\x20'+_0x54fffc+'\x20'+_0x19beaa;console[_0xac7b20(0x147)](_0xac7b20(0x173)+_0x452e99+_0xac7b20(0x159)+_0x2b89be+'`;\x20prefer\x20`'+_0x2b89be+'`\x20in\x20new\x20scripts.\x0a'),_0x552195=_0x19beaa;}if(_0x5386c5[_0xac7b20(0x176)]&&!findDefinition(_0x54fffc,_0x552195)){printServiceHelp(_0x54fffc);return;}{let _0x2ab244=findDefinition(_0x54fffc,_0x552195),_0x176c4c=cli[_0xac7b20(0x179)][_0xac7b20(0x16b)](0x2);if(!_0x2ab244){if(_0x3d7ab2[_0xac7b20(0x151)]){if(_0x5386c5['help']){console[_0xac7b20(0x155)](generateCommandHelp(_0x3d7ab2[_0xac7b20(0x151)]));return;}_0x2ab244=_0x3d7ab2[_0xac7b20(0x151)],_0x176c4c=[_0x552195,...cli['input'][_0xac7b20(0x16b)](0x2)];}else{printServiceHelp(_0x54fffc),await handleErrorAsync(CliErrors[_0xac7b20(0x165)](_0x54fffc+'\x20'+_0x552195));return;}}if(_0x5386c5[_0xac7b20(0x176)]){console[_0xac7b20(0x155)](generateCommandHelp(_0x2ab244));return;}await dispatchDeclarative(_0x2ab244,_0x54fffc,_0x552195,_0x176c4c,_0x5386c5,_0x1d31be);}}async function dispatchDeclarative(_0x54d20f,_0x598b6a,_0x4a5803,_0x2aeba3,_0x46dded,_0x15921b){const _0x3277f2=a12_0x536ba1,_0x4cca4b=Date[_0x3277f2(0x16d)]();let _0x18a860;try{await runCommand(_0x54d20f,createPipelineEnv(_0x15921b,_0x46dded,_0x2aeba3));}catch(_0x49df56){_0x18a860=_0x49df56;}await reportCommandTrace({'service':_0x598b6a,'command':_0x4a5803,'flags':_0x46dded,'durationMs':Date[_0x3277f2(0x16d)]()-_0x4cca4b,'error':_0x18a860});if(_0x18a860)await handleErrorAsync(_0x18a860);}function printServiceHelp(_0x3fb09a){const _0x517983=a12_0x536ba1;console[_0x517983(0x155)](generateServiceHelp(_0x3fb09a));}async function handleErrorAsync(_0x4bcc2c){const _0x5c6069=a12_0x536ba1;if(_0x4bcc2c instanceof Error&&_0x4bcc2c['name']===_0x5c6069(0x14e))return process[_0x5c6069(0x15d)][_0x5c6069(0x169)](_0x5c6069(0x172)),await exitWithOtelShutdown(0x0);if(_0x4bcc2c instanceof CliError){if(_0x4bcc2c[_0x5c6069(0x156)]===_0x5c6069(0x170))return process['stderr'][_0x5c6069(0x169)]('\x0a'+_0x4bcc2c[_0x5c6069(0x150)]+'\x0a'),await exitWithOtelShutdown(0x0);console[_0x5c6069(0x147)](_0x5c6069(0x164)+_0x4bcc2c[_0x5c6069(0x150)]);if(_0x4bcc2c[_0x5c6069(0x162)])console[_0x5c6069(0x147)](_0x5c6069(0x148)+_0x4bcc2c['hint']);return await exitWithOtelShutdown(_0x4bcc2c[_0x5c6069(0x14a)]);}return console[_0x5c6069(0x147)]('Unexpected\x20error:',_0x4bcc2c),await exitWithOtelShutdown(0x1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x4026ea=a13_0x2168;(function(_0x1c9985,_0x12b912){const _0x30286c=a13_0x2168,_0x3dc105=_0x1c9985();while(!![]){try{const _0x49522e=parseInt(_0x30286c(0x1f1))/0x1+-parseInt(_0x30286c(0x1f9))/0x2+parseInt(_0x30286c(0x205))/0x3*(parseInt(_0x30286c(0x1ea))/0x4)+-parseInt(_0x30286c(0x200))/0x5*(parseInt(_0x30286c(0x1e6))/0x6)+parseInt(_0x30286c(0x1ff))/0x7*(parseInt(_0x30286c(0x1de))/0x8)+-parseInt(_0x30286c(0x1dd))/0x9+-parseInt(_0x30286c(0x1d3))/0xa;if(_0x49522e===_0x12b912)break;else _0x3dc105['push'](_0x3dc105['shift']());}catch(_0x4a9e5e){_0x3dc105['push'](_0x3dc105['shift']());}}}(a13_0xdf9a,0xdd400));import a13_0x5710ad from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a13_0xdf9a(){const _0x27130c=['length','\x20dataset(s)','string','285674VAMESr','start','\x20doc(s)\x20in\x20','error','filter','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','175kMerIV','15sGWhMJ','cookie','stdout','has','map','9KZEmoz','datasetcode','Doc\x20generation\x20complete:\x20','\x20failed','\x0d\x20\x20[','fail','...','message','8610230ezZBPo','split','parse','str','\x20of\x20','write','\x20doc(s)\x20failed','generate','--datasetcode\x20cannot\x20be\x20empty.','success','10630935RFHERx','200424IOgzcc','\x1b[0m','params','some','appCode','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','Output\x20directory\x20(default:\x20./docs)','isArray','1016346CoobQG','\x1b[90m*\x20Filtered\x20','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','\x20dataset(s)\x1b[0m','2383380HbJrtk','padStart','Fetching\x20dataset\x20list\x20for\x20','output','object','datasetCode','join','1185628lNaQEx','\x20succeeded,\x20','validation','\x1b[90m*\x20Generating\x20docs\x20for:\x20','Doc\x20generation:\x20'];a13_0xdf9a=function(){return _0x27130c;};return a13_0xdf9a();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a13_0x2168(_0x39f22a,_0x1b4592){_0x39f22a=_0x39f22a-0x1d2;const _0xdf9a1=a13_0xdf9a();let _0x216838=_0xdf9a1[_0x39f22a];return _0x216838;}export const apiGenerate={'service':'api','command':a13_0x4026ea(0x1da),'description':'Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','risk':a13_0x4026ea(0x1d8),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a13_0x4026ea(0x1ed),'type':a13_0x4026ea(0x1f8),'description':a13_0x4026ea(0x1e4)},{'name':'datasetcode','type':'string','description':'Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for'},{'name':a13_0x4026ea(0x1e0),'type':'string','description':a13_0x4026ea(0x1fe)}],async 'execute'(_0x572520){const _0x42e894=a13_0x4026ea,_0x83402a=_0x572520[_0x42e894(0x1d6)](_0x42e894(0x1ed))||'./docs',_0x4728c7=_0x572520[_0x42e894(0x1d6)](_0x42e894(0x206)),_0x22014a=_0x572520['str'](_0x42e894(0x1e0));let _0x16af68;if(_0x22014a)try{_0x16af68=JSON[_0x42e894(0x1d5)](_0x22014a);if(typeof _0x16af68!==_0x42e894(0x1ee)||_0x16af68===null||Array[_0x42e894(0x1e5)](_0x16af68))throw new Error('must\x20be\x20a\x20JSON\x20object');}catch(_0x3738a4){throw CliErrors['validation']('Invalid\x20--params:\x20'+(_0x3738a4 instanceof Error?_0x3738a4[_0x42e894(0x1d2)]:String(_0x3738a4)),'Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27');}let _0x476794;if(_0x4728c7){const _0x17e075=_0x4728c7[_0x42e894(0x1d4)](',')[_0x42e894(0x204)](_0xf8b09f=>_0xf8b09f['trim']())['filter'](_0x2f5d1c=>_0x2f5d1c[_0x42e894(0x1f6)]>0x0);if(_0x17e075[_0x42e894(0x1f6)]===0x0)throw CliErrors[_0x42e894(0x1f3)](_0x42e894(0x1db));_0x476794=new Set(_0x17e075),writeCliSideChannelLine(_0x42e894(0x1f4)+_0x17e075[_0x42e894(0x1f0)](',\x20')+'\x1b[0m');}const _0x20114c=a13_0x5710ad(_0x42e894(0x1ec)+_0x572520[_0x42e894(0x1e2)]+_0x42e894(0x20b))[_0x42e894(0x1fa)]();let _0x3984d0;try{({configArray:_0x3984d0}=await fetchModelList(_0x572520['appCode'],_0x572520[_0x42e894(0x201)]),_0x20114c['succeed']('Fetched\x20'+_0x3984d0[_0x42e894(0x1f6)]+_0x42e894(0x1f7)));}catch(_0x1dd498){_0x20114c[_0x42e894(0x20a)]('Failed\x20to\x20fetch\x20datasets');throw _0x1dd498;}if(_0x3984d0[_0x42e894(0x1f6)]===0x0)return writeCliSideChannelLine('!\x20No\x20datasets\x20found.'),{'ok':!![]};let _0x47a606=_0x3984d0;if(_0x476794){_0x47a606=_0x3984d0[_0x42e894(0x1fd)](_0x2c1715=>_0x476794[_0x42e894(0x203)](_0x2c1715[_0x42e894(0x1ef)]));const _0x5dd549=[..._0x476794][_0x42e894(0x1fd)](_0x4fdd5b=>!_0x3984d0[_0x42e894(0x1e1)](_0x2d22b6=>_0x2d22b6[_0x42e894(0x1ef)]===_0x4fdd5b));_0x5dd549[_0x42e894(0x1f6)]>0x0&&writeCliSideChannelLine(_0x42e894(0x1e8)+_0x5dd549[_0x42e894(0x1f0)](',\x20')+_0x42e894(0x1df));if(_0x47a606['length']===0x0)throw CliErrors['validation'](_0x42e894(0x1e3)+[..._0x476794]['join'](',\x20'));writeCliSideChannelLine(_0x42e894(0x1e7)+_0x47a606['length']+_0x42e894(0x1d7)+_0x3984d0['length']+_0x42e894(0x1e9));}let _0x2ed5a6=0x0;const _0x2a51a6=await generateDatasetDocs(_0x47a606,_0x572520[_0x42e894(0x1e2)],_0x572520[_0x42e894(0x201)],_0x83402a,(_0xe80302,_0x593750,_0x3117c8)=>{const _0x5d3a15=_0x42e894;_0x2ed5a6=_0xe80302,process['stdout']['write'](_0x5d3a15(0x209)+String(_0xe80302)[_0x5d3a15(0x1eb)](String(_0x593750)[_0x5d3a15(0x1f6)])+'/'+_0x593750+']\x20'+_0x3117c8+'.md');},_0x16af68);if(_0x2ed5a6>0x0)process[_0x42e894(0x202)][_0x42e894(0x1d8)]('\x0a');const _0x4d63f5=_0x2a51a6[_0x42e894(0x1fd)](_0x4217c4=>_0x4217c4[_0x42e894(0x1dc)])[_0x42e894(0x1f6)],_0x3c511d=_0x2a51a6[_0x42e894(0x1fd)](_0x42e196=>!_0x42e196['success'])[_0x42e894(0x1f6)];writeCliSideChannelLine(''),writeCliSideChannelLine('✓\x20Generated\x20'+_0x4d63f5+_0x42e894(0x1fb)+_0x83402a);if(_0x3c511d>0x0){writeCliSideChannelLine('!\x20'+_0x3c511d+_0x42e894(0x1d9));for(const _0x3ed6e3 of _0x2a51a6[_0x42e894(0x1fd)](_0xfe7045=>!_0xfe7045[_0x42e894(0x1dc)])){writeCliSideChannelLine('\x20\x20•\x20'+_0x3ed6e3['datasetName']+'\x20('+_0x3ed6e3[_0x42e894(0x1ef)]+'):\x20'+_0x3ed6e3[_0x42e894(0x1fc)]);}}return{'ok':_0x3c511d===0x0,'message':_0x3c511d>0x0?_0x42e894(0x1f5)+_0x4d63f5+_0x42e894(0x1f2)+_0x3c511d+_0x42e894(0x208):_0x42e894(0x207)+_0x4d63f5+'\x20file(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xbbaf6b,_0x159c09){const _0x1766d2=a14_0x5b20,_0x57da85=_0xbbaf6b();while(!![]){try{const _0x7921a3=-parseInt(_0x1766d2(0x7e))/0x1+parseInt(_0x1766d2(0x87))/0x2*(parseInt(_0x1766d2(0x84))/0x3)+parseInt(_0x1766d2(0x86))/0x4*(-parseInt(_0x1766d2(0x7f))/0x5)+parseInt(_0x1766d2(0x83))/0x6*(parseInt(_0x1766d2(0x82))/0x7)+parseInt(_0x1766d2(0x80))/0x8*(parseInt(_0x1766d2(0x7d))/0x9)+parseInt(_0x1766d2(0x85))/0xa+-parseInt(_0x1766d2(0x81))/0xb;if(_0x7921a3===_0x159c09)break;else _0x57da85['push'](_0x57da85['shift']());}catch(_0x5f105c){_0x57da85['push'](_0x57da85['shift']());}}}(a14_0x31e7,0xe295e));import{apiList}from'../../commands/api/list.js';import{apiPull}from'../../commands/api/pull.js';import{apiGenerate}from'../../commands/api/generate.js';function a14_0x5b20(_0x722475,_0x341377){_0x722475=_0x722475-0x7d;const _0x31e7dc=a14_0x31e7();let _0x5b2084=_0x31e7dc[_0x722475];return _0x5b2084;}export const apiDefinitions=[apiList,apiPull,apiGenerate];function a14_0x31e7(){const _0x5238f4=['1561RwJkox','22434SjrQNE','24puYdzp','11503710MifXQE','4416YBlMwm','18210LDmNPN','639OMfbtl','1158613IPgoue','7340zzbJNH','206680qlApXr','2023054pYTWDF'];a14_0x31e7=function(){return _0x5238f4;};return a14_0x31e7();}
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x3645df=a15_0x529c;(function(_0xb8f1b2,_0x5231a9){const _0x5d8f76=a15_0x529c,_0x16dfff=_0xb8f1b2();while(!![]){try{const _0x151c3f=-parseInt(_0x5d8f76(0x1ac))/0x1+parseInt(_0x5d8f76(0x1af))/0x2*(parseInt(_0x5d8f76(0x1a4))/0x3)+parseInt(_0x5d8f76(0x1aa))/0x4+parseInt(_0x5d8f76(0x1b1))/0x5+-parseInt(_0x5d8f76(0x1ad))/0x6+-parseInt(_0x5d8f76(0x1b3))/0x7*(-parseInt(_0x5d8f76(0x1a8))/0x8)+parseInt(_0x5d8f76(0x1a9))/0x9*(-parseInt(_0x5d8f76(0x1a1))/0xa);if(_0x151c3f===_0x5231a9)break;else _0x16dfff['push'](_0x16dfff['shift']());}catch(_0xb0ec08){_0x16dfff['push'](_0x16dfff['shift']());}}}(a15_0x4caa,0x5a073));function a15_0x4caa(){const _0x2ec26c=['List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','push','appcode','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','production','appCode','1404010FEARVR','isDefault','map','31467vMKXxb','cookie','list','read','1456PbukYI','9LwTVZS','765496EzmtoC','global','534022wZfMEo','332754gRhSHE','rawFlags','28wVGdxO','api','2539915QnwGMN','name','9709asYGZY'];a15_0x4caa=function(){return _0x2ec26c;};return a15_0x4caa();}import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a15_0x529c(_0x394ca7,_0x235094){_0x394ca7=_0x394ca7-0x1a0;const _0x4caab8=a15_0x4caa();let _0x529cbc=_0x4caab8[_0x394ca7];return _0x529cbc;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveTargetApps}from'../../commands/api/shared.js';export const apiList={'service':a15_0x3645df(0x1b0),'command':a15_0x3645df(0x1a6),'description':a15_0x3645df(0x1b4),'risk':a15_0x3645df(0x1a7),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x3645df(0x1ab),'type':'boolean','description':a15_0x3645df(0x1b7),'default':![]}],async 'execute'(_0xb455bf){const _0x4b24c0=a15_0x3645df,_0x4d6e86=_0xb455bf[_0x4b24c0(0x1ae)][_0x4b24c0(0x1b6)]?String(_0xb455bf[_0x4b24c0(0x1ae)][_0x4b24c0(0x1b6)]):undefined,_0x8febc6=resolveTargetApps(_0xb455bf,_0x4d6e86);if(_0x8febc6){const _0x5d62d1=[];for(const _0x486d0f of _0x8febc6){const _0x261598=_0x486d0f[_0x4b24c0(0x1a5)]||_0xb455bf[_0x4b24c0(0x1a5)],_0x5aab37=_0x486d0f['env']||_0x4b24c0(0x1b8);initEnv(_0x5aab37);const {configArray:_0x2f2dbb}=await fetchModelList(_0x486d0f['appcode'],_0x261598);_0x5d62d1[_0x4b24c0(0x1b5)](..._0x2f2dbb[_0x4b24c0(0x1a3)](_0x1e4b0e=>({..._0x1e4b0e,'_appName':_0x486d0f[_0x4b24c0(0x1b2)],'_appCode':_0x486d0f[_0x4b24c0(0x1b6)],'_env':_0x5aab37,'_isDefault':_0x486d0f[_0x4b24c0(0x1a2)]})));}return{'ok':!![],'data':_0x5d62d1};}const {configArray:_0x5bdcc9}=await fetchModelList(_0xb455bf[_0x4b24c0(0x1a0)],_0xb455bf['cookie']);return{'ok':!![],'data':_0x5bdcc9};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x214d38=a16_0x4ed2;(function(_0x4251e9,_0x5552d1){const _0x193e7a=a16_0x4ed2,_0x449812=_0x4251e9();while(!![]){try{const _0x40d678=-parseInt(_0x193e7a(0x176))/0x1+-parseInt(_0x193e7a(0x17a))/0x2*(-parseInt(_0x193e7a(0x15f))/0x3)+parseInt(_0x193e7a(0x171))/0x4+-parseInt(_0x193e7a(0x179))/0x5*(-parseInt(_0x193e7a(0x166))/0x6)+-parseInt(_0x193e7a(0x15e))/0x7*(-parseInt(_0x193e7a(0x156))/0x8)+-parseInt(_0x193e7a(0x173))/0x9+parseInt(_0x193e7a(0x153))/0xa*(-parseInt(_0x193e7a(0x165))/0xb);if(_0x40d678===_0x5552d1)break;else _0x449812['push'](_0x449812['shift']());}catch(_0x4683fe){_0x449812['push'](_0x449812['shift']());}}}(a16_0x57fa,0x2099d));import a16_0x44ac6f from'ora';import a16_0x5aca7c from'node:path';import{initEnv,getEnv}from'../../constant/env.js';function a16_0x57fa(){const _0x58eddd=['fail','write','apiDir','name','appcode','str','api','95990nJAMUQ','split','\x20failed','913144fLBzqw','Done:\x20','.ts','length','apiFilePath','Pulling\x20','join','clientFilePath','7HFjSWe','686598iQFpVz',')...','Output\x20directory\x20(default:\x20','cookie','\x20app(s)\x20failed','modelCount','154IjrpWZ','229638kEwXwu','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(','client','appCode','\x20model(s)','start','production','includes','rawFlags','\x20dataset(s),\x20generated\x20','isDefault','943536PZmUHv','env','755856IAUJzP','\x20\x20•\x20','string','265263SjcGqH','succeed','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','5qKJxrh','2TUVKvf','global','output'];a16_0x57fa=function(){return _0x58eddd;};return a16_0x57fa();}import{fetchModelList}from'../../api/fetch-model-list.js';import{generateApiFile}from'../../api/generate-api-file.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{DEFAULT_API_DIR}from'../../constant/paths.js';import{resolveTargetApps}from'../../commands/api/shared.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a16_0x4ed2(_0x318889,_0x144bca){_0x318889=_0x318889-0x14a;const _0x57fa79=a16_0x57fa();let _0x4ed225=_0x57fa79[_0x318889];return _0x4ed225;}export const apiPull={'service':'api','command':'pull','description':a16_0x214d38(0x167)+DEFAULT_API_DIR+'/)','risk':a16_0x214d38(0x14d),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a16_0x214d38(0x14b),'type':a16_0x214d38(0x175),'description':a16_0x214d38(0x161)+DEFAULT_API_DIR+'/)'},{'name':a16_0x214d38(0x14a),'type':'boolean','description':a16_0x214d38(0x178),'default':![]}],async 'execute'(_0x5d3387){const _0x1455ee=a16_0x214d38,_0x2a5b62=_0x5d3387[_0x1455ee(0x16e)]['appcode']?String(_0x5d3387[_0x1455ee(0x16e)][_0x1455ee(0x150)]):undefined,_0x552195=_0x5d3387[_0x1455ee(0x151)]('output')||undefined,_0x28405b=resolveTargetApps(_0x5d3387,_0x2a5b62);if(_0x28405b){let _0x45f3f9=0x0,_0x2631f9=0x0;for(const _0x3aea62 of _0x28405b){const _0x34a674=_0x3aea62[_0x1455ee(0x162)]||_0x5d3387['cookie'],_0x538f07=_0x3aea62[_0x1455ee(0x172)]||_0x1455ee(0x16c);initEnv(_0x538f07);const _0x4be065=_0x3aea62[_0x1455ee(0x14e)]||_0x552195||_0x5d3387['apiDir']||DEFAULT_API_DIR,_0x5cd7d3=_0x3aea62['isDefault']?'':_0x3aea62['name']||_0x3aea62[_0x1455ee(0x150)],_0x1b88be=a16_0x44ac6f(_0x1455ee(0x15b)+_0x3aea62[_0x1455ee(0x14f)]+'\x20('+_0x3aea62[_0x1455ee(0x150)]+_0x1455ee(0x160))[_0x1455ee(0x16b)]();try{const {configArray:_0x5a4d0b}=await fetchModelList(_0x3aea62[_0x1455ee(0x150)],_0x34a674),_0x29b193=await generateApiFile(_0x5a4d0b,_0x5cd7d3,_0x3aea62[_0x1455ee(0x150)],_0x3aea62[_0x1455ee(0x170)],_0x538f07,_0x4be065,_0x3aea62[_0x1455ee(0x14f)]);_0x1b88be[_0x1455ee(0x177)](_0x3aea62[_0x1455ee(0x14f)]+':\x20'+_0x5a4d0b[_0x1455ee(0x159)]+'\x20dataset(s)\x20→\x20'+_0x29b193['modelCount']+'\x20model(s)'),writeCliSideChannelLine(_0x1455ee(0x174)+_0x29b193[_0x1455ee(0x15a)]),writeCliSideChannelLine(_0x1455ee(0x174)+_0x29b193[_0x1455ee(0x15d)]),_0x45f3f9++;}catch(_0x38a199){_0x1b88be[_0x1455ee(0x14c)](_0x3aea62[_0x1455ee(0x14f)]+':\x20'+(_0x38a199 instanceof Error?_0x38a199['message']:String(_0x38a199))),_0x2631f9++;}}writeCliSideChannelLine('');if(_0x2631f9>0x0)writeCliSideChannelLine('!\x20'+_0x2631f9+_0x1455ee(0x163));return{'ok':_0x2631f9===0x0,'message':_0x1455ee(0x157)+_0x45f3f9+'\x20succeeded,\x20'+_0x2631f9+_0x1455ee(0x155)};}const _0x25db70=_0x2a5b62&&_0x2a5b62[_0x1455ee(0x16d)]('-')?_0x2a5b62[_0x1455ee(0x154)]('-')['slice'](0x1)[_0x1455ee(0x15c)]('-'):'',_0x5bae9e=_0x552195||_0x5d3387[_0x1455ee(0x14e)]||DEFAULT_API_DIR,_0x4aab64=!_0x2a5b62,_0x1b1f94=a16_0x44ac6f('Pulling\x20API\x20config\x20for\x20'+_0x5d3387[_0x1455ee(0x169)]+'...')[_0x1455ee(0x16b)]();try{const {configArray:_0x935eb8}=await fetchModelList(_0x5d3387[_0x1455ee(0x169)],_0x5d3387[_0x1455ee(0x162)]),_0x558834=await generateApiFile(_0x935eb8,_0x25db70,_0x5d3387[_0x1455ee(0x169)],_0x4aab64,getEnv(),_0x5bae9e);_0x1b1f94['succeed']('Pulled\x20'+_0x935eb8[_0x1455ee(0x159)]+_0x1455ee(0x16f)+_0x558834[_0x1455ee(0x164)]+_0x1455ee(0x16a));const _0x301bb5=_0x25db70?_0x25db70+'-api':_0x1455ee(0x152),_0x41bf6f=_0x25db70?_0x25db70+'-client':_0x1455ee(0x168);return writeCliSideChannelLine('\x20\x20•\x20'+a16_0x5aca7c[_0x1455ee(0x15c)](_0x5bae9e,_0x301bb5+_0x1455ee(0x158))),writeCliSideChannelLine(_0x1455ee(0x174)+a16_0x5aca7c[_0x1455ee(0x15c)](_0x5bae9e,_0x41bf6f+'.ts')),{'ok':!![],'data':{'datasetCount':_0x935eb8['length'],'modelCount':_0x558834['modelCount']}};}catch(_0x1d9c12){_0x1b1f94[_0x1455ee(0x14c)]('Failed:\x20'+(_0x1d9c12 instanceof Error?_0x1d9c12['message']:String(_0x1d9c12)));throw _0x1d9c12;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1da1fe,_0x9437a0){const _0x3ad2a2=a17_0x44e4,_0x32f29c=_0x1da1fe();while(!![]){try{const _0x1cffc4=-parseInt(_0x3ad2a2(0xd2))/0x1*(parseInt(_0x3ad2a2(0xcc))/0x2)+-parseInt(_0x3ad2a2(0xcf))/0x3*(parseInt(_0x3ad2a2(0xd1))/0x4)+-parseInt(_0x3ad2a2(0xce))/0x5*(-parseInt(_0x3ad2a2(0xd9))/0x6)+parseInt(_0x3ad2a2(0xdc))/0x7*(-parseInt(_0x3ad2a2(0xd6))/0x8)+parseInt(_0x3ad2a2(0xe1))/0x9*(parseInt(_0x3ad2a2(0xd0))/0xa)+parseInt(_0x3ad2a2(0xcd))/0xb+parseInt(_0x3ad2a2(0xe5))/0xc*(parseInt(_0x3ad2a2(0xde))/0xd);if(_0x1cffc4===_0x9437a0)break;else _0x32f29c['push'](_0x32f29c['shift']());}catch(_0x4c49fd){_0x32f29c['push'](_0x32f29c['shift']());}}}(a17_0x2620,0x696cd));function a17_0x44e4(_0x5ba369,_0x3115f2){_0x5ba369=_0x5ba369-0xcc;const _0x262050=a17_0x2620();let _0x44e4dd=_0x262050[_0x5ba369];return _0x44e4dd;}import{getMultiAppConfigs}from'../../utils/config.js';function a17_0x2620(){const _0x4c4da6=['global','84HNTQnc','join','585sxeKvs','App\x20\x22','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','207FQatma','filter','length','selectedAppName','38004RYANRL','1525214mmQLud','5356593xkDdzb','215kUHFgo','12TuWxQT','229570fdIolT','551456oxNYbM','1OrxOHV','map','validation','project','116656YtPNty','merged','name','106518GDOrKC','bool'];a17_0x2620=function(){return _0x4c4da6;};return a17_0x2620();}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0xd402ca,_0x1a1bac){const _0xa70fab=a17_0x44e4;if(_0x1a1bac)return null;const _0x4313b1=_0xd402ca[_0xa70fab(0xda)](_0xa70fab(0xdb))?_0xa70fab(0xd7):_0xa70fab(0xd5);let _0x51113a=getMultiAppConfigs(_0x4313b1);if(!_0x51113a||_0x51113a[_0xa70fab(0xe3)]===0x0)return null;if(_0xd402ca[_0xa70fab(0xe4)]){const _0x463de1=_0x51113a[_0xa70fab(0xe2)](_0x5b881b=>_0x5b881b[_0xa70fab(0xd8)]===_0xd402ca[_0xa70fab(0xe4)]);if(_0x463de1['length']===0x0){const _0x3814d2=_0x51113a[_0xa70fab(0xd3)](_0x172588=>_0x172588[_0xa70fab(0xd8)])[_0xa70fab(0xdd)](',\x20');throw CliErrors[_0xa70fab(0xd4)](_0xa70fab(0xdf)+_0xd402ca[_0xa70fab(0xe4)]+_0xa70fab(0xe0)+_0x3814d2);}_0x51113a=_0x463de1;}return _0x51113a;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a18_0x4e0e3a=a18_0x4006;(function(_0x1a5a36,_0x103136){const _0x3d6aeb=a18_0x4006,_0xaecf44=_0x1a5a36();while(!![]){try{const _0x554760=-parseInt(_0x3d6aeb(0x1ed))/0x1+parseInt(_0x3d6aeb(0x1f9))/0x2+parseInt(_0x3d6aeb(0x1e7))/0x3*(-parseInt(_0x3d6aeb(0x1ec))/0x4)+-parseInt(_0x3d6aeb(0x1fd))/0x5*(parseInt(_0x3d6aeb(0x1f8))/0x6)+-parseInt(_0x3d6aeb(0x1ff))/0x7+-parseInt(_0x3d6aeb(0x201))/0x8*(-parseInt(_0x3d6aeb(0x1eb))/0x9)+parseInt(_0x3d6aeb(0x1ee))/0xa*(parseInt(_0x3d6aeb(0x1f3))/0xb);if(_0x554760===_0x103136)break;else _0xaecf44['push'](_0xaecf44['shift']());}catch(_0x20aafc){_0xaecf44['push'](_0xaecf44['shift']());}}}(a18_0x1845,0xb7c9d));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readConfig,writeConfig,scopeLabel}from'../../commands/app/shared.js';function a18_0x1845(){const _0x11e4ac=['99DiceTu','660hxZLwd','1433914qzLtOu','10LjpeVr','Usage:\x20','appcode','App\x20code','Added','19381274MJgpFa','str','trim','\x20Set\x20as\x20default\x20app.','add','863094ssDVff','1249886UwkhpZ','write','Updated','apps','5MkPtlX','Missing\x20app\x20name.','5101383ClcHtu','\x20app\x20add\x20<name>\x20--appcode\x20<code>','552056ZonOIk','defaultApp','validation','args','1575kILSMt','name','Add\x20or\x20update\x20an\x20app\x20in\x20config','app'];a18_0x1845=function(){return _0x11e4ac;};return a18_0x1845();}async function validateArgs(_0x5045dd){const _0xc5457=a18_0x4006,_0x14e693=_0x5045dd[_0xc5457(0x204)][0x0]?.[_0xc5457(0x1f5)]();if(!_0x14e693)throw CliErrors['validation']('Missing\x20app\x20name.',_0xc5457(0x1ef)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>');}function a18_0x4006(_0x295719,_0x332368){_0x295719=_0x295719-0x1e7;const _0x18459e=a18_0x1845();let _0x40068d=_0x18459e[_0x295719];return _0x40068d;}async function execute(_0x62faec){const _0x5336b3=a18_0x4006,_0x2945d4=_0x62faec[_0x5336b3(0x204)][0x0]?.['trim']();if(!_0x2945d4)throw CliErrors[_0x5336b3(0x203)](_0x5336b3(0x1fe),_0x5336b3(0x1ef)+CLI_BIN_NAME+_0x5336b3(0x200));const _0x38c859=_0x62faec[_0x5336b3(0x1f4)](_0x5336b3(0x1f0));if(!_0x38c859)throw CliErrors['flagMissing']('appcode',_0x5336b3(0x1ef)+CLI_BIN_NAME+_0x5336b3(0x200));const _0x1443ec={'global':_0x62faec['bool']('global')},_0x20f014=readConfig(_0x1443ec);if(!_0x20f014[_0x5336b3(0x1fc)])_0x20f014[_0x5336b3(0x1fc)]={};const _0x57ddaa={'appcode':_0x38c859,...collectAppProfileOverrides(_0x36d800=>_0x62faec[_0x5336b3(0x1f4)](_0x36d800))},_0xe42bb1=_0x20f014[_0x5336b3(0x1fc)],_0x103a25=!!_0xe42bb1[_0x2945d4];_0xe42bb1[_0x2945d4]=_0x57ddaa;if(!_0x20f014['defaultApp'])_0x20f014[_0x5336b3(0x202)]=_0x2945d4;writeConfig(_0x20f014,_0x1443ec);const _0x465d08=!_0x103a25&&_0x20f014['defaultApp']===_0x2945d4?_0x5336b3(0x1f6):'',_0x45311f=(_0x103a25?_0x5336b3(0x1fb):_0x5336b3(0x1f2))+'\x20app\x20\x22'+_0x2945d4+'\x22\x20(appcode:\x20'+_0x38c859+')'+scopeLabel(_0x1443ec)+'.'+_0x465d08;return{'ok':!![],'message':_0x45311f};}export const appAddDefinition={'service':a18_0x4e0e3a(0x1ea),'command':a18_0x4e0e3a(0x1f7),'description':a18_0x4e0e3a(0x1e9),'risk':a18_0x4e0e3a(0x1fa),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a18_0x4e0e3a(0x1e8),'description':'App\x20profile\x20name','required':!![]}],'flags':[{'name':'appcode','type':'string','description':a18_0x4e0e3a(0x1f1),'required':!![]},{'name':'global','type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()],'validate':validateArgs,'execute':execute};
|