@treasuredata/tdx 2026.3.30 → 2026.3.32
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/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.d.ts +2 -2
- package/dist/cli-categories.d.ts.map +1 -1
- package/dist/cli-categories.js +1 -1
- package/dist/cli-categories.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/api-command.js.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.d.ts +55 -0
- package/dist/commands/cas-command.d.ts.map +1 -0
- package/dist/commands/cas-command.js +1 -0
- package/dist/commands/cas-command.js.map +1 -0
- package/dist/commands/cas-segment-command.d.ts +18 -0
- package/dist/commands/cas-segment-command.d.ts.map +1 -0
- package/dist/commands/cas-segment-command.js +1 -0
- package/dist/commands/cas-segment-command.js.map +1 -0
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.d.ts.map +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/unset-command.js.map +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.d.ts.map +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/use-command.js.map +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.d.ts +36 -0
- package/dist/commands/work-command.d.ts.map +1 -0
- package/dist/commands/work-command.js +1 -0
- package/dist/commands/work-command.js.map +1 -0
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.d.ts +1 -0
- package/dist/core/global-context.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.d.ts +2 -0
- package/dist/core/project-config.d.ts.map +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/project-config.js.map +1 -1
- package/dist/core/session.d.ts +2 -1
- package/dist/core/session.d.ts.map +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/session.js.map +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.d.ts +77 -0
- package/dist/sdk/cas/cas-api-client.d.ts.map +1 -0
- package/dist/sdk/cas/cas-api-client.js +1 -0
- package/dist/sdk/cas/cas-api-client.js.map +1 -0
- package/dist/sdk/cas/cas-audience-yaml.d.ts +32 -0
- package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -0
- package/dist/sdk/cas/cas-audience-yaml.js +1 -0
- package/dist/sdk/cas/cas-audience-yaml.js.map +1 -0
- package/dist/sdk/cas/cas-segment-yaml.d.ts +38 -0
- package/dist/sdk/cas/cas-segment-yaml.d.ts.map +1 -0
- package/dist/sdk/cas/cas-segment-yaml.js +1 -0
- package/dist/sdk/cas/cas-segment-yaml.js.map +1 -0
- package/dist/sdk/cas/index.d.ts +61 -0
- package/dist/sdk/cas/index.d.ts.map +1 -0
- package/dist/sdk/cas/index.js +1 -0
- package/dist/sdk/cas/index.js.map +1 -0
- package/dist/sdk/cas/pull-workflow.d.ts +53 -0
- package/dist/sdk/cas/pull-workflow.d.ts.map +1 -0
- package/dist/sdk/cas/pull-workflow.js +1 -0
- package/dist/sdk/cas/pull-workflow.js.map +1 -0
- package/dist/sdk/cas/push-workflow.d.ts +50 -0
- package/dist/sdk/cas/push-workflow.d.ts.map +1 -0
- package/dist/sdk/cas/push-workflow.js +1 -0
- package/dist/sdk/cas/push-workflow.js.map +1 -0
- package/dist/sdk/cas/types.d.ts +115 -0
- package/dist/sdk/cas/types.d.ts.map +1 -0
- package/dist/sdk/cas/types.js +1 -0
- package/dist/sdk/cas/types.js.map +1 -0
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.d.ts +4 -0
- package/dist/sdk/client/endpoints.d.ts.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.d.ts +7 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/cas.d.ts +242 -0
- package/dist/sdk/types/cas.d.ts.map +1 -0
- package/dist/sdk/types/cas.js +1 -0
- package/dist/sdk/types/cas.js.map +1 -0
- package/dist/sdk/types/index.d.ts +5 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.d.ts +146 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -0
- package/dist/sdk/types/workspace.js +1 -0
- package/dist/sdk/types/workspace.js.map +1 -0
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.d.ts +28 -0
- package/dist/sdk/workspace/frontmatter.d.ts.map +1 -0
- package/dist/sdk/workspace/frontmatter.js +1 -0
- package/dist/sdk/workspace/frontmatter.js.map +1 -0
- package/dist/sdk/workspace/git.d.ts +55 -0
- package/dist/sdk/workspace/git.d.ts.map +1 -0
- package/dist/sdk/workspace/git.js +1 -0
- package/dist/sdk/workspace/git.js.map +1 -0
- package/dist/sdk/workspace/index.d.ts +149 -0
- package/dist/sdk/workspace/index.d.ts.map +1 -0
- package/dist/sdk/workspace/index.js +1 -0
- package/dist/sdk/workspace/index.js.map +1 -0
- package/dist/sdk/workspace/skills.d.ts +34 -0
- package/dist/sdk/workspace/skills.d.ts.map +1 -0
- package/dist/sdk/workspace/skills.js +1 -0
- package/dist/sdk/workspace/skills.js.map +1 -0
- package/dist/sdk/workspace/templates.d.ts +17 -0
- package/dist/sdk/workspace/templates.d.ts.map +1 -0
- package/dist/sdk/workspace/templates.js +1 -0
- package/dist/sdk/workspace/templates.js.map +1 -0
- package/dist/sdk/workspace/wikilinks.d.ts +44 -0
- package/dist/sdk/workspace/wikilinks.d.ts.map +1 -0
- package/dist/sdk/workspace/wikilinks.js +1 -0
- package/dist/sdk/workspace/wikilinks.js.map +1 -0
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a230_0x41d1(_0x1a712d,_0x165e88){_0x1a712d=_0x1a712d-0xbf;const _0x2cceaa=a230_0x2cce();let _0x41d16a=_0x2cceaa[_0x1a712d];return _0x41d16a;}(function(_0x2c5f2d,_0x31b385){const _0x56a84d=a230_0x41d1,_0x57a623=_0x2c5f2d();while(!![]){try{const _0xfd4e66=parseInt(_0x56a84d(0xd6))/0x1*(-parseInt(_0x56a84d(0xc1))/0x2)+parseInt(_0x56a84d(0xcf))/0x3+-parseInt(_0x56a84d(0xc9))/0x4+-parseInt(_0x56a84d(0xce))/0x5*(-parseInt(_0x56a84d(0xd5))/0x6)+-parseInt(_0x56a84d(0xd3))/0x7+parseInt(_0x56a84d(0xcb))/0x8*(-parseInt(_0x56a84d(0xc0))/0x9)+parseInt(_0x56a84d(0xbf))/0xa;if(_0xfd4e66===_0x31b385)break;else _0x57a623['push'](_0x57a623['shift']());}catch(_0x4cc376){_0x57a623['push'](_0x57a623['shift']());}}}(a230_0x2cce,0x8e045));function a230_0x2cce(){const _0x5bed22=['27770xXFypx','762042QmTqUi','[LLM\x20API\x20SSE]\x20','Response\x20body\x20is\x20null','pop','2894129aAQHlC','event','342rWBUhs','16lCoDlo','indexOf','18256280RUogqi','1442592SkwwcQ','34072IvRzFj','trim','decode','body','split','read','startsWith','debug','3872832CefAIB','data','8myCzIg','slice','releaseLock'];a230_0x2cce=function(){return _0x5bed22;};return a230_0x2cce();}export async function*parseSSEStream(_0x5ecc6f,_0x114ab5){const _0x330c31=a230_0x41d1;if(!_0x5ecc6f[_0x330c31(0xc4)])throw new Error(_0x330c31(0xd1));const _0x296d60=_0x5ecc6f['body']['getReader'](),_0x4b625c=new TextDecoder();let _0x7b75c9='',_0x3311ba={};try{while(!![]){const {done:_0x424efd,value:_0x4b4845}=await _0x296d60[_0x330c31(0xc6)]();if(_0x424efd){if(_0x3311ba['data']){_0x114ab5?.['debug'](_0x330c31(0xd0)+_0x3311ba['data']);const _0x357d2b=parseSSEData(_0x3311ba[_0x330c31(0xca)]);yield _0x357d2b;}break;}_0x7b75c9+=_0x4b625c[_0x330c31(0xc3)](_0x4b4845,{'stream':!![]});const _0x24e49a=_0x7b75c9[_0x330c31(0xc5)]('\x0a');_0x7b75c9=_0x24e49a[_0x330c31(0xd2)]()||'';for(const _0x370df1 of _0x24e49a){if(_0x370df1[_0x330c31(0xc2)]()===''){if(_0x3311ba['data']){_0x114ab5?.[_0x330c31(0xc8)](_0x330c31(0xd0)+_0x3311ba[_0x330c31(0xca)]);const _0x29515f=parseSSEData(_0x3311ba[_0x330c31(0xca)]);yield _0x29515f,_0x3311ba={};}continue;}if(_0x370df1[_0x330c31(0xc7)](':'))continue;const _0x5772a3=_0x370df1[_0x330c31(0xd7)](':');if(_0x5772a3===-0x1)continue;const _0x412be0=_0x370df1[_0x330c31(0xcc)](0x0,_0x5772a3);let _0x1e12c3=_0x370df1[_0x330c31(0xcc)](_0x5772a3+0x1);_0x1e12c3[_0x330c31(0xc7)]('\x20')&&(_0x1e12c3=_0x1e12c3['slice'](0x1));switch(_0x412be0){case _0x330c31(0xd4):_0x3311ba[_0x330c31(0xd4)]=_0x1e12c3;break;case _0x330c31(0xca):_0x3311ba[_0x330c31(0xca)]=_0x3311ba[_0x330c31(0xca)]?_0x3311ba['data']+'\x0a'+_0x1e12c3:_0x1e12c3;break;case'id':_0x3311ba['id']=_0x1e12c3;break;}}}}finally{_0x296d60[_0x330c31(0xcd)]();}}function parseSSEData(_0x1d1c7){try{return JSON['parse'](_0x1d1c7);}catch(_0x41f5fb){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0x1d1c7,{'cause':_0x41f5fb});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x383ac7,_0x91d236){const _0x1c2365=a231_0x2936,_0x46d16c=_0x383ac7();while(!![]){try{const _0xcb006f=-parseInt(_0x1c2365(0x154))/0x1*(parseInt(_0x1c2365(0x151))/0x2)+parseInt(_0x1c2365(0x15e))/0x3*(parseInt(_0x1c2365(0x157))/0x4)+-parseInt(_0x1c2365(0x15f))/0x5*(parseInt(_0x1c2365(0x150))/0x6)+-parseInt(_0x1c2365(0x164))/0x7+-parseInt(_0x1c2365(0x160))/0x8*(parseInt(_0x1c2365(0x15b))/0x9)+parseInt(_0x1c2365(0x162))/0xa*(parseInt(_0x1c2365(0x15a))/0xb)+-parseInt(_0x1c2365(0x158))/0xc*(-parseInt(_0x1c2365(0x165))/0xd);if(_0xcb006f===_0x91d236)break;else _0x46d16c['push'](_0x46d16c['shift']());}catch(_0x3026a6){_0x46d16c['push'](_0x46d16c['shift']());}}}(a231_0x4c5b,0x6e4c5));import a231_0x28f44c from'string-width';export function stringWidth(_0x4b01d0){return a231_0x28f44c(_0x4b01d0);}export function padEnd(_0x188352,_0x10bd93){const _0x4c709d=a231_0x2936,_0x30bd09=stringWidth(_0x188352);if(_0x30bd09>=_0x10bd93)return _0x188352;return _0x188352+'\x20'[_0x4c709d(0x14d)](_0x10bd93-_0x30bd09);}export function padStart(_0xe6c917,_0x1ff20d){const _0x8e36c8=a231_0x2936,_0xb64c3e=stringWidth(_0xe6c917);if(_0xb64c3e>=_0x1ff20d)return _0xe6c917;return'\x20'[_0x8e36c8(0x14d)](_0x1ff20d-_0xb64c3e)+_0xe6c917;}export function centerAlign(_0x304b66,_0x38e7c6){const _0x351099=a231_0x2936,_0x4996d3=stringWidth(_0x304b66);if(_0x4996d3>_0x38e7c6){if(_0x38e7c6<=0x1)return'…'[_0x351099(0x159)](0x0,_0x38e7c6);let _0x2dea7d=_0x304b66;while(stringWidth(_0x2dea7d+'…')>_0x38e7c6){_0x2dea7d=_0x2dea7d[_0x351099(0x14f)](0x0,-0x1);}return _0x2dea7d+'…';}if(_0x4996d3===_0x38e7c6)return _0x304b66;const _0x58df7f=_0x38e7c6-_0x4996d3,_0x34fae3=Math[_0x351099(0x152)](_0x58df7f/0x2),_0x3cd128=_0x58df7f-_0x34fae3;return'\x20'[_0x351099(0x14d)](_0x34fae3)+_0x304b66+'\x20'[_0x351099(0x14d)](_0x3cd128);}function a231_0x4c5b(){const _0x4adef8=['143vKAtBJ','toString','\x5c$&','random','repeat','unknown','slice','150228zCmfQm','988YRajfO','floor','test','893qyVmMA','toLowerCase','length','4YTBWcw','1352508nREECW','substring','40117enTCWv','333SLfXNb','padStart','replace','2337714raMWVJ','180OqlyJq','37144xXryje','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','500vpJjIZ','trim','1647135UERpno'];a231_0x4c5b=function(){return _0x4adef8;};return a231_0x4c5b();}export function escapeStringLiteral(_0xff694c){const _0x503fb6=a231_0x2936;if(!_0xff694c||_0xff694c[_0x503fb6(0x163)]()[_0x503fb6(0x156)]===0x0)throw new Error('Cannot\x20escape\x20empty\x20string\x20literal');const _0x254012=_0xff694c[_0x503fb6(0x15d)](/'/g,'\x27\x27');return'\x27'+_0x254012+'\x27';}export function globToLike(_0x512901){const _0x12aa22=a231_0x2936;let _0x3495b8=_0x512901['replace'](/\\/g,'\x5c\x5c')[_0x12aa22(0x15d)](/%/g,'\x5c%')[_0x12aa22(0x15d)](/_/g,'\x5c_');return _0x3495b8=_0x3495b8[_0x12aa22(0x15d)](/\*/g,'%')['replace'](/\?/g,'_'),_0x3495b8;}export function buildLikePattern(_0x4da5e1){const _0x5ccd46=a231_0x2936;if(!_0x4da5e1||_0x4da5e1[_0x5ccd46(0x163)]()[_0x5ccd46(0x156)]===0x0)throw new Error(_0x5ccd46(0x161));const _0x30cacf=globToLike(_0x4da5e1),_0x3f4f1e=_0x30cacf[_0x5ccd46(0x15d)](/'/g,'\x27\x27');return'\x27'+_0x3f4f1e+'\x27';}export function matchGlobPattern(_0x58f841,_0x487dee){const _0x2bd800=a231_0x2936,_0x11bfe3=_0x487dee[_0x2bd800(0x15d)](/[.+^${}()|[\]\\]/g,_0x2bd800(0x167))[_0x2bd800(0x15d)](/\*/g,'.*')[_0x2bd800(0x15d)](/\?/g,'.'),_0x4a48df=new RegExp('^'+_0x11bfe3+'$');return _0x4a48df[_0x2bd800(0x153)](_0x58f841);}function a231_0x2936(_0x253f21,_0xdd9fbb){_0x253f21=_0x253f21-0x14d;const _0x4c5baf=a231_0x4c5b();let _0x2936a3=_0x4c5baf[_0x253f21];return _0x2936a3;}export function getSanitizedUsername(){const _0x223de1=a231_0x2936,_0x58ebe2=process.env.USER||process.env.USERNAME||_0x223de1(0x14e);return _0x58ebe2[_0x223de1(0x15d)](/[^a-zA-Z0-9]/g,'')[_0x223de1(0x155)]();}export function generateRandomHex(){const _0x27e169=a231_0x2936,_0x23a8f5=Math[_0x27e169(0x152)](Math[_0x27e169(0x168)]()*0xfffff);return _0x23a8f5[_0x27e169(0x166)](0x10)[_0x27e169(0x15c)](0x5,'0');}export function sanitizeFileName(_0x4f90d9){const _0x5b063e=a231_0x2936;return _0x4f90d9[_0x5b063e(0x155)]()[_0x5b063e(0x15d)](/[/\\:*?"<>|]/g,'-')[_0x5b063e(0x15d)](/\s+/g,'-')['replace'](/-+/g,'-')[_0x5b063e(0x15d)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a232_0x6a09(){const _0x1156e8=['push','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','includes','1192722EYGHYJ','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','join','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','trim','3546968KeBBjL','187811YXdTDq','catalog','table','281342NBqRpN','Pattern\x20cannot\x20be\x20just\x20a\x20dot','66fjzCjw','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','13852WTTVTe','1619219kUgoDu','database','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','length','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','658625WWSqLf','split'];a232_0x6a09=function(){return _0x1156e8;};return a232_0x6a09();}(function(_0x44bf7c,_0x175a6b){const _0x59c6eb=a232_0x2230,_0x35c81a=_0x44bf7c();while(!![]){try{const _0x3a3562=parseInt(_0x59c6eb(0xe9))/0x1+-parseInt(_0x59c6eb(0xec))/0x2+-parseInt(_0x59c6eb(0xee))/0x3*(parseInt(_0x59c6eb(0xd8))/0x4)+parseInt(_0x59c6eb(0xde))/0x5+-parseInt(_0x59c6eb(0xe3))/0x6+-parseInt(_0x59c6eb(0xd9))/0x7+parseInt(_0x59c6eb(0xe8))/0x8;if(_0x3a3562===_0x175a6b)break;else _0x35c81a['push'](_0x35c81a['shift']());}catch(_0x452d47){_0x35c81a['push'](_0x35c81a['shift']());}}}(a232_0x6a09,0x1c4ea));function hasWildcard(_0x3a3cd2){const _0xe3147e=a232_0x2230;return _0x3a3cd2[_0xe3147e(0xe2)]('*')||_0x3a3cd2[_0xe3147e(0xe2)]('?');}export function parseTableReference(_0x1d4d9c){const _0x4e8f7c=a232_0x2230;if(!_0x1d4d9c||_0x1d4d9c[_0x4e8f7c(0xe7)]()[_0x4e8f7c(0xdc)]===0x0)throw new Error(_0x4e8f7c(0xe6));const _0x42ba14=_0x1d4d9c[_0x4e8f7c(0xe7)](),_0x2bbd6b={'original':_0x42ba14},_0xa0e84e=_0x42ba14[_0x4e8f7c(0xdf)]('.');if(_0xa0e84e['length']===0x1){const _0x18e185=_0xa0e84e[0x0];if(!_0x18e185)throw new Error(_0x4e8f7c(0xed));_0x2bbd6b[_0x4e8f7c(0xeb)]=_0x18e185;}else{if(_0xa0e84e[_0x4e8f7c(0xdc)]===0x2){const [_0x54a812,_0x66b694]=_0xa0e84e;if(!_0x54a812)throw new Error(_0x4e8f7c(0xe4));if(!_0x66b694)throw new Error('Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)');_0x2bbd6b[_0x4e8f7c(0xda)]=_0x54a812,_0x2bbd6b[_0x4e8f7c(0xeb)]=_0x66b694;}else{if(_0xa0e84e[_0x4e8f7c(0xdc)]===0x3){const [_0x17380b,_0x1f7019,_0x58efd0]=_0xa0e84e;if(!_0x17380b||!_0x1f7019||!_0x58efd0)throw new Error(_0x4e8f7c(0xe1));_0x2bbd6b[_0x4e8f7c(0xea)]=_0x17380b,_0x2bbd6b[_0x4e8f7c(0xda)]=_0x1f7019,_0x2bbd6b[_0x4e8f7c(0xeb)]=_0x58efd0;}else throw new Error(_0x4e8f7c(0xdd));}}return _0x2bbd6b;}export function formatTableReference(_0x537b52){const _0x22e694=a232_0x2230,_0x243612=[];return _0x537b52[_0x22e694(0xea)]&&_0x243612[_0x22e694(0xe0)](_0x537b52[_0x22e694(0xea)]),_0x537b52[_0x22e694(0xda)]&&_0x243612['push'](_0x537b52[_0x22e694(0xda)]),_0x537b52[_0x22e694(0xeb)]&&_0x243612[_0x22e694(0xe0)](_0x537b52['table']),_0x243612[_0x22e694(0xe5)]('.');}function a232_0x2230(_0x32fc34,_0x26d728){_0x32fc34=_0x32fc34-0xd8;const _0x6a09f6=a232_0x6a09();let _0x223074=_0x6a09f6[_0x32fc34];return _0x223074;}export function validateTableListReference(_0x3a594f){return undefined;}export function validateTableDescribeReference(_0x30a5ff){const _0x2de0e0=a232_0x2230;if(!_0x30a5ff[_0x2de0e0(0xeb)])return'Table\x20name\x20is\x20required\x20for\x20describe\x20operation';if(_0x30a5ff[_0x2de0e0(0xda)]&&hasWildcard(_0x30a5ff[_0x2de0e0(0xda)]))return _0x2de0e0(0xef);if(hasWildcard(_0x30a5ff['table']))return _0x2de0e0(0xdb);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a233_0x4c6e87=a233_0x5df3;(function(_0x333bc0,_0x36e1b4){const _0xfae83=a233_0x5df3,_0x4aef65=_0x333bc0();while(!![]){try{const _0x2ac9ea=-parseInt(_0xfae83(0x19d))/0x1+parseInt(_0xfae83(0x1a9))/0x2+parseInt(_0xfae83(0x1a8))/0x3*(-parseInt(_0xfae83(0x1a7))/0x4)+parseInt(_0xfae83(0x1a4))/0x5+parseInt(_0xfae83(0x1aa))/0x6+-parseInt(_0xfae83(0x1b0))/0x7+parseInt(_0xfae83(0x1a3))/0x8*(parseInt(_0xfae83(0x1ae))/0x9);if(_0x2ac9ea===_0x36e1b4)break;else _0x4aef65['push'](_0x4aef65['shift']());}catch(_0x1e5bfb){_0x4aef65['push'](_0x4aef65['shift']());}}}(a233_0xda00,0xb16a4));import{join}from'path';function a233_0x5df3(_0x2529ff,_0x2e752c){_0x2529ff=_0x2529ff-0x192;const _0xda0072=a233_0xda00();let _0x5df399=_0xda0072[_0x2529ff];return _0x5df399;}function a233_0xda00(){const _0x38e3ae=['logFileName','Session\x20ended','7470AGbUsY','isInitialized','3669694qZfnGa','init','INFO','logs','logger','logDir','debug','fileHandler','tdx','consoleHandler','fileOnly','warn','tdx.log','1076668GLNQhV','logLevel','addHandler','shutdown','getLogPath','info','17808cfFjKz','4084545fjbsXl','error','trace','2696mdwMxH','3984eJAnLG','254290ylItqy','2586240UbGZKH','push'];a233_0xda00=function(){return _0x38e3ae;};return a233_0xda00();}import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';import{getGlobalCacheDir}from'./global-cache.js';export{LogLevel}from'./logger/index.js';export class TDXLogger{[a233_0x4c6e87(0x19e)];[a233_0x4c6e87(0x19a)];[a233_0x4c6e87(0x195)];[a233_0x4c6e87(0x1ac)];['logger'];[a233_0x4c6e87(0x197)]=null;[a233_0x4c6e87(0x199)]=null;constructor(_0x1a411a=LogLevel[a233_0x4c6e87(0x192)],_0x246669=![],_0x4a86a7,_0x35c429=a233_0x4c6e87(0x19c)){const _0x402447=a233_0x4c6e87;this[_0x402447(0x19e)]=_0x1a411a,this[_0x402447(0x19a)]=_0x246669,this[_0x402447(0x195)]=_0x4a86a7||join(getGlobalCacheDir(),_0x402447(0x193)),this[_0x402447(0x1ac)]=_0x35c429,this['logger']=Logger['of'](_0x402447(0x198));}async[a233_0x4c6e87(0x1b1)](){const _0x11da35=a233_0x4c6e87,_0x16df48=join(this[_0x11da35(0x195)],this[_0x11da35(0x1ac)]);if(Logger[_0x11da35(0x1af)]()){!this[_0x11da35(0x19a)]&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel[_0x11da35(0x192)],'colors':!![]}),Logger[_0x11da35(0x19f)](this['consoleHandler']));return;}this[_0x11da35(0x197)]=new FileHandler({'filePath':_0x16df48});const _0x283db6=[this[_0x11da35(0x197)]];!this[_0x11da35(0x19a)]&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel[_0x11da35(0x192)],'colors':!![]}),_0x283db6[_0x11da35(0x1ab)](this['consoleHandler'])),await Logger[_0x11da35(0x1b1)]({'defaultLevel':this['logLevel'],'handlers':_0x283db6,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a233_0x4c6e87(0x196)](..._0x21b030){const _0x43e50e=a233_0x4c6e87;this[_0x43e50e(0x194)]['debug'](..._0x21b030);}[a233_0x4c6e87(0x1a6)](..._0x45ca0d){const _0x3f0de4=a233_0x4c6e87;this[_0x3f0de4(0x194)]['trace'](..._0x45ca0d);}['info'](..._0x7bcd6){const _0x59aebe=a233_0x4c6e87;this['logger'][_0x59aebe(0x1a2)](..._0x7bcd6);}[a233_0x4c6e87(0x19b)](..._0x1940dc){const _0x578a04=a233_0x4c6e87;this['logger'][_0x578a04(0x19b)](..._0x1940dc);}[a233_0x4c6e87(0x1a5)](..._0x1508ad){const _0x502972=a233_0x4c6e87;this[_0x502972(0x194)][_0x502972(0x1a5)](..._0x1508ad);}async['close'](){const _0x2240c6=a233_0x4c6e87;this['logger']['info'](_0x2240c6(0x1ad)),await Logger[_0x2240c6(0x1a0)]();}[a233_0x4c6e87(0x1a1)](){const _0x257ada=a233_0x4c6e87;return join(this[_0x257ada(0x195)],this['logFileName']);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a234_0xa894bc=a234_0x41ab;(function(_0x199441,_0x1f09ae){const _0x1b224f=a234_0x41ab,_0xec1110=_0x199441();while(!![]){try{const _0x38fad5=parseInt(_0x1b224f(0x19d))/0x1*(parseInt(_0x1b224f(0x1b4))/0x2)+-parseInt(_0x1b224f(0x197))/0x3+parseInt(_0x1b224f(0x1b8))/0x4+parseInt(_0x1b224f(0x1ae))/0x5+-parseInt(_0x1b224f(0x19c))/0x6*(parseInt(_0x1b224f(0x1a5))/0x7)+-parseInt(_0x1b224f(0x1c0))/0x8+-parseInt(_0x1b224f(0x199))/0x9*(-parseInt(_0x1b224f(0x19b))/0xa);if(_0x38fad5===_0x1f09ae)break;else _0xec1110['push'](_0xec1110['shift']());}catch(_0x4ab8ec){_0xec1110['push'](_0xec1110['shift']());}}}(a234_0x5312,0x8ab03));import{get}from'https';function a234_0x41ab(_0x30c332,_0x4c72df){_0x30c332=_0x30c332-0x196;const _0x53124c=a234_0x5312();let _0x41abec=_0x53124c[_0x30c332];return _0x41abec;}import{gt,valid}from'semver';import a234_0x377239 from'chalk';import{createGlobalCache}from'./global-cache.js';function a234_0x5312(){const _0x36626c=['HTTP\x20','green','stderr','isTTY','tdx\x20upgrade\x20--next','write','\x0aRun:\x20','1553041XnyhPr','end','latest','\x0aUpdate\x20available:\x20','lastCheck','next','Request\x20timeout','unref','destroy','2022100dxLjUq','statusCode','gray','latestVersion','Invalid\x20version\x20format','stable','13676mzEabU','channel','cyan','parse','2866512MJobCZ','currentVersion','updateAvailable','tdx\x20upgrade','Run:','read','getTime','last_version_check_next','8720856gYNggF','socket','dim','version','yellow','utils/version-check-next','2863074TGvZzH','https://registry.npmjs.org/@treasuredata/tdx','18RpIEHL','Update\x20available:','7556270OJJLHS','12FSbJrq','62GrzMUT'];a234_0x5312=function(){return _0x36626c;};return a234_0x5312();}const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a234_0xa894bc(0x198),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache('last_version_check','utils/version-check'),nextVersionCache=createGlobalCache(a234_0xa894bc(0x1bf),a234_0xa894bc(0x196));function getCacheForChannel(_0x4b3735){return _0x4b3735==='next'?nextVersionCache:stableVersionCache;}function readCache(_0x7c1e23){const _0x3b4a26=a234_0xa894bc;return getCacheForChannel(_0x7c1e23)[_0x3b4a26(0x1bd)]()??null;}function writeCache(_0x3f1d32,_0x472533){const _0xa8e96c=a234_0xa894bc;try{getCacheForChannel(_0x472533)[_0xa8e96c(0x1a3)]({'lastCheck':new Date()['toISOString'](),'latestVersion':_0x3f1d32});}catch{}}function isCacheValid(_0x5825d5){const _0x49ceec=a234_0xa894bc;if(!_0x5825d5)return![];const _0x719a43=new Date(_0x5825d5[_0x49ceec(0x1a9)])[_0x49ceec(0x1be)](),_0x2924a7=Date['now']();return _0x2924a7-_0x719a43<CACHE_DURATION_MS;}export function fetchLatestVersion(_0x4145e9=a234_0xa894bc(0x1b3)){const _0x1dbb05=a234_0xa894bc,_0x508cbe=_0x4145e9===_0x1dbb05(0x1aa)?'next':_0x1dbb05(0x1a7),_0x19d4dc=NPM_REGISTRY_BASE+'/'+_0x508cbe;return new Promise((_0x507ad0,_0x44a3dc)=>{const _0x304faa=_0x1dbb05,_0x259d5a=get(_0x19d4dc,{'timeout':TIMEOUT_MS},_0x4e18bf=>{const _0x42acc9=a234_0x41ab;if(_0x4e18bf['statusCode']!==0xc8){clearTimeout(_0x2ca3be),_0x44a3dc(new Error(_0x42acc9(0x19e)+_0x4e18bf[_0x42acc9(0x1af)]));return;}let _0x57f0d5='';_0x4e18bf['on']('data',_0x3848c7=>{_0x57f0d5+=_0x3848c7;}),_0x4e18bf['on'](_0x42acc9(0x1a6),()=>{const _0x168793=_0x42acc9;clearTimeout(_0x2ca3be);try{const _0x339aa5=JSON[_0x168793(0x1b7)](_0x57f0d5);if(!valid(_0x339aa5[_0x168793(0x1c3)])){_0x44a3dc(new Error(_0x168793(0x1b2)));return;}_0x507ad0(_0x339aa5[_0x168793(0x1c3)]);}catch(_0x2d4c6c){_0x44a3dc(_0x2d4c6c);}});})['on']('error',_0x415132=>{clearTimeout(_0x2ca3be),_0x44a3dc(_0x415132);});_0x259d5a['on'](_0x304faa(0x1c1),_0x26f56f=>{const _0x3fec6b=_0x304faa;_0x26f56f[_0x3fec6b(0x1ac)]();});const _0x2ca3be=setTimeout(()=>{const _0x589803=_0x304faa;_0x259d5a[_0x589803(0x1ad)](),_0x44a3dc(new Error(_0x589803(0x1ab)));},TIMEOUT_MS);_0x2ca3be[_0x304faa(0x1ac)]();});}export async function checkForUpdate(_0x205c63,_0x5d8bec='stable'){const _0x3b36bd=a234_0xa894bc;try{const _0x3d0282=readCache(_0x5d8bec);if(isCacheValid(_0x3d0282)){const _0x2db06b=gt(_0x3d0282[_0x3b36bd(0x1b1)],_0x205c63);return{'updateAvailable':_0x2db06b,'currentVersion':_0x205c63,'latestVersion':_0x3d0282[_0x3b36bd(0x1b1)],'channel':_0x5d8bec};}const _0x30b5e6=await fetchLatestVersion(_0x5d8bec);writeCache(_0x30b5e6,_0x5d8bec);const _0x59293d=gt(_0x30b5e6,_0x205c63);return{'updateAvailable':_0x59293d,'currentVersion':_0x205c63,'latestVersion':_0x30b5e6,'channel':_0x5d8bec};}catch{return null;}}export function displayUpdateNotification(_0x512099){const _0x3993b0=a234_0xa894bc;if(!_0x512099[_0x3993b0(0x1ba)])return;const _0x1ca9e7=_0x512099[_0x3993b0(0x1b5)]===_0x3993b0(0x1aa)?_0x3993b0(0x1a2):_0x3993b0(0x1bb),_0x22dfb3=process[_0x3993b0(0x1a0)][_0x3993b0(0x1a1)]&&!process.env.NO_COLOR,_0x4a6e40=_0x22dfb3?a234_0x377239[_0x3993b0(0x1b0)]('→'):'→',_0x314983=_0x22dfb3?a234_0x377239['dim'](_0x512099[_0x3993b0(0x1b9)]):_0x512099[_0x3993b0(0x1b9)],_0x25c18e=_0x22dfb3?a234_0x377239[_0x3993b0(0x19f)](_0x512099[_0x3993b0(0x1b1)]):_0x512099['latestVersion'],_0x4329e3=_0x22dfb3?a234_0x377239[_0x3993b0(0x1b6)](_0x1ca9e7):_0x1ca9e7,_0x506ec6=_0x22dfb3?'\x0a'+a234_0x377239[_0x3993b0(0x1c4)](_0x3993b0(0x19a))+'\x20'+_0x314983+'\x20'+_0x4a6e40+'\x20'+_0x25c18e+'\x0a'+a234_0x377239[_0x3993b0(0x1c2)](_0x3993b0(0x1bc))+'\x20'+_0x4329e3+'\x0a':_0x3993b0(0x1a8)+_0x314983+'\x20'+_0x4a6e40+'\x20'+_0x25c18e+_0x3993b0(0x1a4)+_0x4329e3+'\x0a';process[_0x3993b0(0x1a0)][_0x3993b0(0x1a3)](_0x506ec6);}
|