lua-cli 3.12.2 ā 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -13
- package/dist/api/agent.api.service.d.ts +20 -20
- package/dist/api/agent.api.service.d.ts.map +1 -1
- package/dist/api/agent.api.service.js +1 -1
- package/dist/api/agent.api.service.js.map +1 -1
- package/dist/api/agents.api.service.d.ts +3 -3
- package/dist/api/agents.api.service.d.ts.map +1 -1
- package/dist/api/agents.api.service.js +11 -9
- package/dist/api/agents.api.service.js.map +1 -1
- package/dist/api/ai.api.service.d.ts +4 -4
- package/dist/api/ai.api.service.d.ts.map +1 -1
- package/dist/api/ai.api.service.js +10 -8
- package/dist/api/ai.api.service.js.map +1 -1
- package/dist/api/auth.api.service.d.ts +3 -3
- package/dist/api/auth.api.service.d.ts.map +1 -1
- package/dist/api/auth.api.service.js +1 -1
- package/dist/api/auth.api.service.js.map +1 -1
- package/dist/api/backup.api.service.d.ts.map +1 -1
- package/dist/api/backup.api.service.js +21 -7
- package/dist/api/backup.api.service.js.map +1 -1
- package/dist/api/basket.api.service.d.ts +5 -5
- package/dist/api/basket.api.service.d.ts.map +1 -1
- package/dist/api/basket.api.service.js +4 -4
- package/dist/api/basket.api.service.js.map +1 -1
- package/dist/api/cdn.api.service.d.ts +1 -1
- package/dist/api/cdn.api.service.js +3 -3
- package/dist/api/cdn.api.service.js.map +1 -1
- package/dist/api/chat.api.service.d.ts +4 -4
- package/dist/api/chat.api.service.js +3 -3
- package/dist/api/chat.api.service.js.map +1 -1
- package/dist/api/credentials.js +3 -3
- package/dist/api/custom.data.api.service.d.ts +4 -4
- package/dist/api/custom.data.api.service.d.ts.map +1 -1
- package/dist/api/custom.data.api.service.js +2 -2
- package/dist/api/custom.data.api.service.js.map +1 -1
- package/dist/api/developer.api.service.d.ts +3 -3
- package/dist/api/developer.api.service.d.ts.map +1 -1
- package/dist/api/developer.api.service.js +7 -3
- package/dist/api/developer.api.service.js.map +1 -1
- package/dist/api/device-trigger.api.service.d.ts +3 -3
- package/dist/api/device-trigger.api.service.d.ts.map +1 -1
- package/dist/api/device-trigger.api.service.js +1 -1
- package/dist/api/device-trigger.api.service.js.map +1 -1
- package/dist/api/device.api.service.d.ts +3 -3
- package/dist/api/device.api.service.d.ts.map +1 -1
- package/dist/api/device.api.service.js +1 -1
- package/dist/api/device.api.service.js.map +1 -1
- package/dist/api/http.client.d.ts +1 -1
- package/dist/api/http.client.d.ts.map +1 -1
- package/dist/api/http.client.js +6 -6
- package/dist/api/http.client.js.map +1 -1
- package/dist/api/job.api.service.d.ts +13 -14
- package/dist/api/job.api.service.d.ts.map +1 -1
- package/dist/api/job.api.service.js +12 -20
- package/dist/api/job.api.service.js.map +1 -1
- package/dist/api/lazy-instances.d.ts +12 -12
- package/dist/api/lazy-instances.js +14 -14
- package/dist/api/logs.api.service.d.ts +9 -6
- package/dist/api/logs.api.service.d.ts.map +1 -1
- package/dist/api/logs.api.service.js +12 -11
- package/dist/api/logs.api.service.js.map +1 -1
- package/dist/api/marketplace.api.service.d.ts +1 -1
- package/dist/api/marketplace.api.service.d.ts.map +1 -1
- package/dist/api/marketplace.api.service.js +18 -18
- package/dist/api/marketplace.api.service.js.map +1 -1
- package/dist/api/order.api.service.d.ts +4 -4
- package/dist/api/order.api.service.d.ts.map +1 -1
- package/dist/api/order.api.service.js +2 -2
- package/dist/api/order.api.service.js.map +1 -1
- package/dist/api/persona.api.service.d.ts +3 -3
- package/dist/api/persona.api.service.d.ts.map +1 -1
- package/dist/api/persona.api.service.js +2 -2
- package/dist/api/persona.api.service.js.map +1 -1
- package/dist/api/postprocessor.api.service.d.ts +8 -9
- package/dist/api/postprocessor.api.service.d.ts.map +1 -1
- package/dist/api/postprocessor.api.service.js +1 -2
- package/dist/api/postprocessor.api.service.js.map +1 -1
- package/dist/api/preprocessor.api.service.d.ts +8 -9
- package/dist/api/preprocessor.api.service.d.ts.map +1 -1
- package/dist/api/preprocessor.api.service.js +1 -2
- package/dist/api/preprocessor.api.service.js.map +1 -1
- package/dist/api/products.api.service.d.ts +9 -9
- package/dist/api/products.api.service.d.ts.map +1 -1
- package/dist/api/products.api.service.js +10 -10
- package/dist/api/products.api.service.js.map +1 -1
- package/dist/api/resource.api.service.d.ts +2 -2
- package/dist/api/resource.api.service.js +1 -1
- package/dist/api/skills.api.service.d.ts +4 -4
- package/dist/api/skills.api.service.d.ts.map +1 -1
- package/dist/api/skills.api.service.js +1 -1
- package/dist/api/skills.api.service.js.map +1 -1
- package/dist/api/tool.api.service.d.ts +2 -2
- package/dist/api/tool.api.service.js +1 -1
- package/dist/api/unifiedto.api.service.d.ts +3 -3
- package/dist/api/unifiedto.api.service.d.ts.map +1 -1
- package/dist/api/unifiedto.api.service.js +28 -10
- package/dist/api/unifiedto.api.service.js.map +1 -1
- package/dist/api/user.data.api.service.d.ts +6 -6
- package/dist/api/user.data.api.service.d.ts.map +1 -1
- package/dist/api/user.data.api.service.js +5 -5
- package/dist/api/user.data.api.service.js.map +1 -1
- package/dist/api/webhook.api.service.d.ts +3 -3
- package/dist/api/webhook.api.service.d.ts.map +1 -1
- package/dist/api/webhook.api.service.js +1 -1
- package/dist/api/webhook.api.service.js.map +1 -1
- package/dist/api/whatsapp-templates.api.service.d.ts +3 -3
- package/dist/api/whatsapp-templates.api.service.js +1 -1
- package/dist/api-exports.d.ts +25 -25
- package/dist/api-exports.d.ts.map +1 -1
- package/dist/api-exports.js +26 -26
- package/dist/api-exports.js.map +1 -1
- package/dist/cli/command-definitions.d.ts +1 -1
- package/dist/cli/command-definitions.d.ts.map +1 -1
- package/dist/cli/command-definitions.js +209 -196
- package/dist/cli/command-definitions.js.map +1 -1
- package/dist/commands/agents.js +2 -2
- package/dist/commands/apiKey.js +12 -12
- package/dist/commands/channels.d.ts.map +1 -1
- package/dist/commands/channels.js +165 -174
- package/dist/commands/channels.js.map +1 -1
- package/dist/commands/chat-log-probe.d.ts +59 -0
- package/dist/commands/chat-log-probe.d.ts.map +1 -0
- package/dist/commands/chat-log-probe.js +87 -0
- package/dist/commands/chat-log-probe.js.map +1 -0
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +143 -40
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/chatClear.d.ts.map +1 -1
- package/dist/commands/chatClear.js +10 -6
- package/dist/commands/chatClear.js.map +1 -1
- package/dist/commands/compile.d.ts +7 -0
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +49 -12
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +8 -9
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/configure.js +5 -5
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +132 -35
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/destroy.d.ts.map +1 -1
- package/dist/commands/destroy.js +27 -17
- package/dist/commands/destroy.js.map +1 -1
- package/dist/commands/devices.d.ts.map +1 -1
- package/dist/commands/devices.js +4 -5
- package/dist/commands/devices.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +101 -80
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/features.d.ts.map +1 -1
- package/dist/commands/features.js +71 -82
- package/dist/commands/features.js.map +1 -1
- package/dist/commands/governance.d.ts.map +1 -1
- package/dist/commands/governance.js +17 -15
- package/dist/commands/governance.js.map +1 -1
- package/dist/commands/index.d.ts +37 -36
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +37 -36
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +80 -70
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/integrations.d.ts.map +1 -1
- package/dist/commands/integrations.js +373 -341
- package/dist/commands/integrations.js.map +1 -1
- package/dist/commands/jobs.d.ts.map +1 -1
- package/dist/commands/jobs.js +110 -78
- package/dist/commands/jobs.js.map +1 -1
- package/dist/commands/log-tip.d.ts +79 -0
- package/dist/commands/log-tip.d.ts.map +1 -0
- package/dist/commands/log-tip.js +83 -0
- package/dist/commands/log-tip.js.map +1 -0
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +166 -198
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/marketplace.d.ts.map +1 -1
- package/dist/commands/marketplace.js +381 -427
- package/dist/commands/marketplace.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +54 -56
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/models.d.ts.map +1 -1
- package/dist/commands/models.js +4 -3
- package/dist/commands/models.js.map +1 -1
- package/dist/commands/persona.d.ts.map +1 -1
- package/dist/commands/persona.js +100 -126
- package/dist/commands/persona.js.map +1 -1
- package/dist/commands/postprocessors.d.ts.map +1 -1
- package/dist/commands/postprocessors.js +87 -61
- package/dist/commands/postprocessors.js.map +1 -1
- package/dist/commands/preprocessors.d.ts.map +1 -1
- package/dist/commands/preprocessors.js +87 -61
- package/dist/commands/preprocessors.js.map +1 -1
- package/dist/commands/production.d.ts.map +1 -1
- package/dist/commands/production.js +101 -113
- package/dist/commands/production.js.map +1 -1
- package/dist/commands/push-helpers.d.ts +42 -0
- package/dist/commands/push-helpers.d.ts.map +1 -0
- package/dist/commands/push-helpers.js +48 -0
- package/dist/commands/push-helpers.js.map +1 -0
- package/dist/commands/push.d.ts +2 -0
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +388 -124
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/pushBackup.d.ts.map +1 -1
- package/dist/commands/pushBackup.js +8 -4
- package/dist/commands/pushBackup.js.map +1 -1
- package/dist/commands/resources.d.ts.map +1 -1
- package/dist/commands/resources.js +47 -60
- package/dist/commands/resources.js.map +1 -1
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +117 -89
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/status.d.ts +14 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +731 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +70 -30
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/telemetry.d.ts.map +1 -1
- package/dist/commands/telemetry.js +4 -0
- package/dist/commands/telemetry.js.map +1 -1
- package/dist/commands/test-output.helpers.d.ts +24 -0
- package/dist/commands/test-output.helpers.d.ts.map +1 -0
- package/dist/commands/test-output.helpers.js +62 -0
- package/dist/commands/test-output.helpers.js.map +1 -0
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +291 -121
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +15 -3
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/webhooks.d.ts.map +1 -1
- package/dist/commands/webhooks.js +94 -87
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/compiler/agent-traverser.d.ts +50 -14
- package/dist/compiler/agent-traverser.d.ts.map +1 -1
- package/dist/compiler/agent-traverser.js +189 -86
- package/dist/compiler/agent-traverser.js.map +1 -1
- package/dist/compiler/bundler.d.ts.map +1 -1
- package/dist/compiler/bundler.js +5 -5
- package/dist/compiler/bundler.js.map +1 -1
- package/dist/compiler/compiler.d.ts +32 -0
- package/dist/compiler/compiler.d.ts.map +1 -1
- package/dist/compiler/compiler.js +154 -28
- package/dist/compiler/compiler.js.map +1 -1
- package/dist/compiler/index.d.ts +3 -3
- package/dist/compiler/index.d.ts.map +1 -1
- package/dist/compiler/index.js +3 -3
- package/dist/compiler/index.js.map +1 -1
- package/dist/compiler/plugins/agent.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/agent.plugin.js +2 -4
- package/dist/compiler/plugins/agent.plugin.js.map +1 -1
- package/dist/compiler/plugins/base.d.ts +21 -0
- package/dist/compiler/plugins/base.d.ts.map +1 -1
- package/dist/compiler/plugins/base.js +13 -3
- package/dist/compiler/plugins/base.js.map +1 -1
- package/dist/compiler/plugins/device-trigger.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/device-trigger.plugin.js +8 -4
- package/dist/compiler/plugins/device-trigger.plugin.js.map +1 -1
- package/dist/compiler/plugins/device.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/device.plugin.js +4 -4
- package/dist/compiler/plugins/device.plugin.js.map +1 -1
- package/dist/compiler/plugins/job.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/job.plugin.js +15 -11
- package/dist/compiler/plugins/job.plugin.js.map +1 -1
- package/dist/compiler/plugins/mcp-server.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/mcp-server.plugin.js +10 -4
- package/dist/compiler/plugins/mcp-server.plugin.js.map +1 -1
- package/dist/compiler/plugins/registry.js +2 -2
- package/dist/compiler/plugins/registry.js.map +1 -1
- package/dist/compiler/plugins/skill.plugin.d.ts +35 -9
- package/dist/compiler/plugins/skill.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/skill.plugin.js +129 -87
- package/dist/compiler/plugins/skill.plugin.js.map +1 -1
- package/dist/compiler/plugins/tool.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/tool.plugin.js +13 -9
- package/dist/compiler/plugins/tool.plugin.js.map +1 -1
- package/dist/compiler/plugins/webhook.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/webhook.plugin.js +7 -5
- package/dist/compiler/plugins/webhook.plugin.js.map +1 -1
- package/dist/compiler/source-writer.d.ts.map +1 -1
- package/dist/compiler/source-writer.js +2 -4
- package/dist/compiler/source-writer.js.map +1 -1
- package/dist/compiler/types.d.ts +33 -0
- package/dist/compiler/types.d.ts.map +1 -1
- package/dist/compiler/types.js.map +1 -1
- package/dist/compiler/utils/ast-helpers.d.ts +1 -16
- package/dist/compiler/utils/ast-helpers.d.ts.map +1 -1
- package/dist/compiler/utils/ast-helpers.js +14 -38
- package/dist/compiler/utils/ast-helpers.js.map +1 -1
- package/dist/compiler/utils/common.d.ts +14 -0
- package/dist/compiler/utils/common.d.ts.map +1 -1
- package/dist/compiler/utils/common.js +39 -11
- package/dist/compiler/utils/common.js.map +1 -1
- package/dist/compiler/utils/file-discovery.d.ts.map +1 -1
- package/dist/compiler/utils/file-discovery.js +2 -10
- package/dist/compiler/utils/file-discovery.js.map +1 -1
- package/dist/compiler/utils/path-resolver.d.ts +67 -10
- package/dist/compiler/utils/path-resolver.d.ts.map +1 -1
- package/dist/compiler/utils/path-resolver.js +120 -24
- package/dist/compiler/utils/path-resolver.js.map +1 -1
- package/dist/compiler/utils/reference-resolver.d.ts +196 -0
- package/dist/compiler/utils/reference-resolver.d.ts.map +1 -0
- package/dist/compiler/utils/reference-resolver.js +1026 -0
- package/dist/compiler/utils/reference-resolver.js.map +1 -0
- package/dist/compiler/utils/schema-converter.d.ts +25 -0
- package/dist/compiler/utils/schema-converter.d.ts.map +1 -1
- package/dist/compiler/utils/schema-converter.js +80 -4
- package/dist/compiler/utils/schema-converter.js.map +1 -1
- package/dist/compiler/utils/workspace.d.ts +35 -0
- package/dist/compiler/utils/workspace.d.ts.map +1 -0
- package/dist/compiler/utils/workspace.js +121 -0
- package/dist/compiler/utils/workspace.js.map +1 -0
- package/dist/compiler/utils/zod-runtime.mjs +5334 -0
- package/dist/config/compile.constants.d.ts.map +1 -1
- package/dist/config/compile.constants.js +3 -1
- package/dist/config/compile.constants.js.map +1 -1
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +1 -5
- package/dist/config/constants.js.map +1 -1
- package/dist/errors/auth.error.d.ts.map +1 -1
- package/dist/errors/auth.error.js +3 -5
- package/dist/errors/auth.error.js.map +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/instances/basket.instance.d.ts +3 -3
- package/dist/instances/basket.instance.d.ts.map +1 -1
- package/dist/instances/basket.instance.js +26 -8
- package/dist/instances/basket.instance.js.map +1 -1
- package/dist/instances/data.entry.instance.d.ts +2 -2
- package/dist/instances/data.entry.instance.d.ts.map +1 -1
- package/dist/instances/data.entry.instance.js +5 -5
- package/dist/instances/data.entry.instance.js.map +1 -1
- package/dist/instances/order.instance.d.ts +2 -2
- package/dist/instances/order.instance.d.ts.map +1 -1
- package/dist/instances/order.instance.js +20 -9
- package/dist/instances/order.instance.js.map +1 -1
- package/dist/instances/product.instance.d.ts +1 -1
- package/dist/instances/product.instance.d.ts.map +1 -1
- package/dist/instances/product.instance.js +3 -3
- package/dist/instances/product.instance.js.map +1 -1
- package/dist/instances/product.pagination.instance.d.ts +2 -2
- package/dist/instances/product.pagination.instance.d.ts.map +1 -1
- package/dist/instances/product.pagination.instance.js +6 -7
- package/dist/instances/product.pagination.instance.js.map +1 -1
- package/dist/instances/product.search.instance.d.ts +3 -3
- package/dist/instances/product.search.instance.d.ts.map +1 -1
- package/dist/instances/product.search.instance.js +3 -4
- package/dist/instances/product.search.instance.js.map +1 -1
- package/dist/instances/user.instance.d.ts +3 -3
- package/dist/instances/user.instance.d.ts.map +1 -1
- package/dist/instances/user.instance.js +19 -36
- package/dist/instances/user.instance.js.map +1 -1
- package/dist/interfaces/agent.d.ts +8 -8
- package/dist/interfaces/agent.d.ts.map +1 -1
- package/dist/interfaces/backup.d.ts +19 -1
- package/dist/interfaces/backup.d.ts.map +1 -1
- package/dist/interfaces/device-triggers.d.ts +0 -2
- package/dist/interfaces/device-triggers.d.ts.map +1 -1
- package/dist/interfaces/devices.d.ts +0 -1
- package/dist/interfaces/devices.d.ts.map +1 -1
- package/dist/interfaces/index.d.ts +8 -8
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/jobs.d.ts +2 -3
- package/dist/interfaces/jobs.d.ts.map +1 -1
- package/dist/interfaces/logs.d.ts +7 -4
- package/dist/interfaces/logs.d.ts.map +1 -1
- package/dist/interfaces/message.d.ts +3 -3
- package/dist/interfaces/message.d.ts.map +1 -1
- package/dist/interfaces/orders.d.ts +1 -1
- package/dist/interfaces/webhooks.d.ts +2 -2
- package/dist/interfaces/webhooks.d.ts.map +1 -1
- package/dist/primitives/agent.handler.d.ts.map +1 -1
- package/dist/primitives/agent.handler.js +1 -1
- package/dist/primitives/agent.handler.js.map +1 -1
- package/dist/primitives/base.handler.d.ts +12 -2
- package/dist/primitives/base.handler.d.ts.map +1 -1
- package/dist/primitives/base.handler.js +104 -73
- package/dist/primitives/base.handler.js.map +1 -1
- package/dist/primitives/device-trigger.handler.d.ts +1 -1
- package/dist/primitives/device-trigger.handler.d.ts.map +1 -1
- package/dist/primitives/device-trigger.handler.js +2 -3
- package/dist/primitives/device-trigger.handler.js.map +1 -1
- package/dist/primitives/device.handler.d.ts +1 -1
- package/dist/primitives/device.handler.d.ts.map +1 -1
- package/dist/primitives/device.handler.js +2 -3
- package/dist/primitives/device.handler.js.map +1 -1
- package/dist/primitives/index.d.ts +1 -1
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +2 -3
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/job.handler.d.ts +6 -1
- package/dist/primitives/job.handler.d.ts.map +1 -1
- package/dist/primitives/job.handler.js +9 -3
- package/dist/primitives/job.handler.js.map +1 -1
- package/dist/primitives/mcp-server.handler.d.ts.map +1 -1
- package/dist/primitives/mcp-server.handler.js +2 -2
- package/dist/primitives/mcp-server.handler.js.map +1 -1
- package/dist/primitives/postprocessor.handler.d.ts.map +1 -1
- package/dist/primitives/postprocessor.handler.js.map +1 -1
- package/dist/primitives/preprocessor.handler.d.ts +1 -1
- package/dist/primitives/preprocessor.handler.d.ts.map +1 -1
- package/dist/primitives/preprocessor.handler.js +2 -3
- package/dist/primitives/preprocessor.handler.js.map +1 -1
- package/dist/primitives/skill.handler.d.ts +1 -1
- package/dist/primitives/skill.handler.d.ts.map +1 -1
- package/dist/primitives/skill.handler.js +34 -13
- package/dist/primitives/skill.handler.js.map +1 -1
- package/dist/primitives/types.d.ts +1 -1
- package/dist/primitives/types.d.ts.map +1 -1
- package/dist/primitives/types.js.map +1 -1
- package/dist/primitives/webhook.handler.d.ts +3 -2
- package/dist/primitives/webhook.handler.d.ts.map +1 -1
- package/dist/primitives/webhook.handler.js +9 -4
- package/dist/primitives/webhook.handler.js.map +1 -1
- package/dist/services/analytics.d.ts.map +1 -1
- package/dist/services/analytics.js +4 -5
- package/dist/services/analytics.js.map +1 -1
- package/dist/services/auth.d.ts +9 -1
- package/dist/services/auth.d.ts.map +1 -1
- package/dist/services/auth.js +26 -7
- package/dist/services/auth.js.map +1 -1
- package/dist/services/sandbox.service.d.ts.map +1 -1
- package/dist/services/sandbox.service.js +132 -80
- package/dist/services/sandbox.service.js.map +1 -1
- package/dist/types/api-contracts.d.ts +4 -4
- package/dist/types/api-contracts.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/skill.d.ts +7 -7
- package/dist/types/skill.d.ts.map +1 -1
- package/dist/types/skill.js +2 -2
- package/dist/types/skill.js.map +1 -1
- package/dist/types/tool-validation.js.map +1 -1
- package/dist/types/yaml.types.js +0 -1
- package/dist/types/yaml.types.js.map +1 -1
- package/dist/utils/aliases.d.ts +7 -0
- package/dist/utils/aliases.d.ts.map +1 -0
- package/dist/utils/aliases.js +492 -0
- package/dist/utils/aliases.js.map +1 -0
- package/dist/utils/artifact-loader.d.ts +9 -0
- package/dist/utils/artifact-loader.d.ts.map +1 -1
- package/dist/utils/artifact-loader.js +16 -6
- package/dist/utils/artifact-loader.js.map +1 -1
- package/dist/utils/auth-flows.d.ts.map +1 -1
- package/dist/utils/auth-flows.js +54 -54
- package/dist/utils/auth-flows.js.map +1 -1
- package/dist/utils/backup-helpers.d.ts +24 -0
- package/dist/utils/backup-helpers.d.ts.map +1 -1
- package/dist/utils/backup-helpers.js +102 -22
- package/dist/utils/backup-helpers.js.map +1 -1
- package/dist/utils/bundle-upload.d.ts +42 -0
- package/dist/utils/bundle-upload.d.ts.map +1 -0
- package/dist/utils/bundle-upload.js +90 -0
- package/dist/utils/bundle-upload.js.map +1 -0
- package/dist/utils/chat-attachments.js +1 -1
- package/dist/utils/chat-attachments.js.map +1 -1
- package/dist/utils/cli.d.ts +24 -6
- package/dist/utils/cli.d.ts.map +1 -1
- package/dist/utils/cli.js +26 -14
- package/dist/utils/cli.js.map +1 -1
- package/dist/utils/command-utils.d.ts.map +1 -1
- package/dist/utils/command-utils.js +4 -4
- package/dist/utils/command-utils.js.map +1 -1
- package/dist/utils/deploy-helpers.d.ts.map +1 -1
- package/dist/utils/deploy-helpers.js +13 -13
- package/dist/utils/deploy-helpers.js.map +1 -1
- package/dist/utils/env-loader.utils.d.ts +1 -1
- package/dist/utils/env-loader.utils.d.ts.map +1 -1
- package/dist/utils/env-loader.utils.js +15 -22
- package/dist/utils/env-loader.utils.js.map +1 -1
- package/dist/utils/files.d.ts.map +1 -1
- package/dist/utils/files.js +23 -13
- package/dist/utils/files.js.map +1 -1
- package/dist/utils/hints.d.ts +81 -0
- package/dist/utils/hints.d.ts.map +1 -0
- package/dist/utils/hints.js +81 -0
- package/dist/utils/hints.js.map +1 -0
- package/dist/utils/init-agent.d.ts.map +1 -1
- package/dist/utils/init-agent.js +18 -20
- package/dist/utils/init-agent.js.map +1 -1
- package/dist/utils/init-helpers.d.ts.map +1 -1
- package/dist/utils/init-helpers.js +11 -11
- package/dist/utils/init-helpers.js.map +1 -1
- package/dist/utils/init-prompts.d.ts.map +1 -1
- package/dist/utils/init-prompts.js +34 -36
- package/dist/utils/init-prompts.js.map +1 -1
- package/dist/utils/prompt-handler.js +1 -1
- package/dist/utils/prompt-handler.js.map +1 -1
- package/dist/utils/sandbox-storage.d.ts.map +1 -1
- package/dist/utils/sandbox-storage.js.map +1 -1
- package/dist/utils/sandbox.d.ts +1 -1
- package/dist/utils/sandbox.d.ts.map +1 -1
- package/dist/utils/sandbox.js +107 -106
- package/dist/utils/sandbox.js.map +1 -1
- package/dist/utils/semver.js +1 -1
- package/dist/utils/semver.js.map +1 -1
- package/dist/utils/suggest.d.ts +3 -0
- package/dist/utils/suggest.d.ts.map +1 -0
- package/dist/utils/suggest.js +32 -0
- package/dist/utils/suggest.js.map +1 -0
- package/dist/utils/sync-display.d.ts.map +1 -1
- package/dist/utils/sync-display.js +15 -13
- package/dist/utils/sync-display.js.map +1 -1
- package/dist/utils/sync-fetch.d.ts.map +1 -1
- package/dist/utils/sync-fetch.js +33 -24
- package/dist/utils/sync-fetch.js.map +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/write-info.d.ts +9 -0
- package/dist/utils/write-info.d.ts.map +1 -0
- package/dist/utils/write-info.js +11 -0
- package/dist/utils/write-info.js.map +1 -0
- package/docs/README.md +1 -1
- package/node_modules/@lua/shared-types/dist/index.d.mts +76 -2
- package/node_modules/@lua/shared-types/dist/index.d.ts +76 -2
- package/node_modules/@lua/shared-types/dist/index.js +27 -0
- package/node_modules/@lua/shared-types/dist/index.mjs +24 -0
- package/node_modules/@lua/shared-types/src/ai-generate.types.ts +1 -6
- package/node_modules/@lua/shared-types/src/ai-generate.utils.ts +1 -4
- package/node_modules/@lua/shared-types/src/channel.type.ts +1 -0
- package/node_modules/@lua/shared-types/src/chat-stream.types.ts +11 -0
- package/node_modules/@lua/shared-types/src/client-tools.types.ts +47 -0
- package/node_modules/@lua/shared-types/src/device.types.ts +6 -6
- package/node_modules/@lua/shared-types/src/index.ts +3 -0
- package/node_modules/@lua/shared-types/src/sandbox-contract.ts +26 -5
- package/node_modules/@lua/shared-types/src/vm-execution-log.types.ts +41 -0
- package/package.json +10 -6
- package/scripts/build-vendor.mjs +53 -0
- package/scripts/vendor-entry.mjs +11 -0
- package/template/QUICKSTART.md +33 -33
- package/template/README.md +35 -34
- package/template/examples/README.md +44 -38
- package/template/examples/jobs/AbandonedBasketProcessorJob.ts +30 -31
- package/template/examples/jobs/DailyCleanupJob.ts +17 -18
- package/template/examples/jobs/DataMigrationJob.ts +18 -23
- package/template/examples/jobs/HealthCheckJob.ts +13 -14
- package/template/examples/postprocessors/modifyResponse.ts +14 -15
- package/template/examples/preprocessors/messageMatching.ts +28 -29
- package/template/examples/services/ApiService.ts +68 -64
- package/template/examples/services/GetWeather.ts +39 -33
- package/template/examples/skills/basket.skill.ts +27 -7
- package/template/examples/skills/product.skill.ts +21 -8
- package/template/examples/skills/tools/BasketTool.ts +97 -98
- package/template/examples/skills/tools/CreateInlineJob.ts +38 -36
- package/template/examples/skills/tools/CreatePostTool.ts +27 -28
- package/template/examples/skills/tools/CustomDataTool.ts +72 -67
- package/template/examples/skills/tools/GameScoreTrackerTool.ts +72 -78
- package/template/examples/skills/tools/GetWeatherTool.ts +43 -45
- package/template/examples/skills/tools/OrderTool.ts +58 -58
- package/template/examples/skills/tools/PaymentTool.ts +43 -43
- package/template/examples/skills/tools/PremiumFeatureTool.ts +81 -79
- package/template/examples/skills/tools/ProductsTool.ts +68 -69
- package/template/examples/skills/tools/SmartBasketTool.ts +43 -44
- package/template/examples/skills/tools/UserDataTool.ts +97 -98
- package/template/examples/skills/user.skill.ts +7 -8
- package/template/examples/webhooks/FileUploadWebhook.ts +38 -31
- package/template/examples/webhooks/PaymentWebhook.ts +23 -22
- package/template/examples/webhooks/UserEventWebhook.ts +16 -19
- package/template/lua.skill.yaml +2 -2
- package/template/package.json +1 -1
- package/template/src/index.ts +28 -28
package/dist/commands/compile.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Compile Command
|
|
3
3
|
* Uses the plugin-based compiler to compile all primitives
|
|
4
4
|
*/
|
|
5
|
-
import path from
|
|
6
|
-
import { withErrorHandling, writeProgress, writeSuccess, writeError, writeInfo } from
|
|
5
|
+
import path from 'path';
|
|
6
|
+
import { withErrorHandling, writeProgress, writeSuccess, writeError, writeInfo, writeNextStep, writeHintBlock, } from '../utils/cli.js';
|
|
7
7
|
import { readYamlConfig, ensureGitignored } from '../utils/files.js';
|
|
8
8
|
import { getToken } from '../services/auth.js';
|
|
9
9
|
import { runSyncCheck } from './sync.js';
|
|
@@ -41,6 +41,12 @@ import { trackEvent } from '../services/analytics.js';
|
|
|
41
41
|
* @param options.debug - Enable debug mode (preserves temp files, verbose esbuild)
|
|
42
42
|
* @param options.verbose - Show detailed progress output
|
|
43
43
|
* @param options.sync - Run drift detection check before compiling (default: off)
|
|
44
|
+
* @param options.topLevel - When true, emit a post-compile next-step hint.
|
|
45
|
+
* Sub-invocations (from `lua push`, `lua chat`, `lua test`) must pass
|
|
46
|
+
* `topLevel: false` (or omit ā it defaults to false) so the hint is
|
|
47
|
+
* suppressed; otherwise users see a spurious "run `lua test`" suggestion
|
|
48
|
+
* mid-flow during `lua push` or, worse, mid `lua test` itself.
|
|
49
|
+
* The hint fires only when the user explicitly runs `lua compile`.
|
|
44
50
|
*/
|
|
45
51
|
export async function compileCommand(options) {
|
|
46
52
|
return withErrorHandling(async () => {
|
|
@@ -59,7 +65,9 @@ export async function compileCommand(options) {
|
|
|
59
65
|
try {
|
|
60
66
|
apiKey = getToken();
|
|
61
67
|
}
|
|
62
|
-
catch {
|
|
68
|
+
catch {
|
|
69
|
+
/* no key ā skip sync */
|
|
70
|
+
}
|
|
63
71
|
if (apiKey && agentId) {
|
|
64
72
|
const shouldContinue = await runSyncCheck(apiKey, agentId);
|
|
65
73
|
if (!shouldContinue) {
|
|
@@ -73,7 +81,7 @@ export async function compileCommand(options) {
|
|
|
73
81
|
}
|
|
74
82
|
}
|
|
75
83
|
}
|
|
76
|
-
writeProgress(
|
|
84
|
+
writeProgress('šØ Compiling...');
|
|
77
85
|
// Step 1: Run the compiler
|
|
78
86
|
const rootDir = process.cwd();
|
|
79
87
|
const outDir = path.join(rootDir, 'dist-v2');
|
|
@@ -102,7 +110,20 @@ export async function compileCommand(options) {
|
|
|
102
110
|
first_error: result.errors[0]?.message?.substring(0, 200) || null,
|
|
103
111
|
debug_mode: debugMode,
|
|
104
112
|
});
|
|
105
|
-
|
|
113
|
+
// B12: only show the compile-specific debug hint when this is a top-level
|
|
114
|
+
// `lua compile` invocation. Sub-invocations from lua push/chat/test should
|
|
115
|
+
// not tell users to run `lua compile --verbose` mid-flow.
|
|
116
|
+
if (options?.topLevel) {
|
|
117
|
+
writeHintBlock({
|
|
118
|
+
headline: 'Compilation failed. Debug options:',
|
|
119
|
+
lines: [
|
|
120
|
+
{ label: 'More context:', command: 'lua compile --verbose' },
|
|
121
|
+
{ label: 'Full esbuild output:', command: 'lua compile --debug' },
|
|
122
|
+
],
|
|
123
|
+
when: 'error',
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
throw new Error('Compilation failed ā see errors above.');
|
|
106
127
|
}
|
|
107
128
|
// Ensure dist-v2/ is in .gitignore
|
|
108
129
|
ensureGitignored(rootDir, 'dist-v2/', 'dist/');
|
|
@@ -113,7 +134,7 @@ export async function compileCommand(options) {
|
|
|
113
134
|
}
|
|
114
135
|
}
|
|
115
136
|
// Step 4: Sync YAML with manifest (all versioned primitives)
|
|
116
|
-
writeProgress(
|
|
137
|
+
writeProgress('š Syncing YAML with manifest...');
|
|
117
138
|
let config = readYamlConfig();
|
|
118
139
|
for (const handler of versionedHandlers) {
|
|
119
140
|
handler.syncYamlWithManifest(result.manifest, config);
|
|
@@ -124,23 +145,28 @@ export async function compileCommand(options) {
|
|
|
124
145
|
try {
|
|
125
146
|
apiKey = getToken();
|
|
126
147
|
}
|
|
127
|
-
catch {
|
|
148
|
+
catch {
|
|
149
|
+
/* no key ā skip server sync */
|
|
150
|
+
}
|
|
128
151
|
let syncConfig = readYamlConfig();
|
|
129
152
|
const agentId = syncConfig?.agent?.agentId;
|
|
130
153
|
if (apiKey && agentId) {
|
|
131
|
-
writeProgress(
|
|
154
|
+
writeProgress('š Syncing with server...');
|
|
132
155
|
// Phase 1: Fetch all server state in parallel (6 HTTP calls at once)
|
|
133
|
-
const fetchResults = await Promise.all(syncableHandlers.map(h => h.fetchServerState(apiKey, agentId)));
|
|
156
|
+
const fetchResults = await Promise.all(syncableHandlers.map((h) => h.fetchServerState(apiKey, agentId)));
|
|
134
157
|
// Phase 2: Apply YAML changes sequentially (each handler writes to its own YAML key)
|
|
135
158
|
for (let i = 0; i < syncableHandlers.length; i++) {
|
|
136
|
-
const applyResult = await syncableHandlers[i].applySyncToYaml(fetchResults[i], syncConfig, result.manifest, {
|
|
159
|
+
const applyResult = await syncableHandlers[i].applySyncToYaml(fetchResults[i], syncConfig, result.manifest, {
|
|
160
|
+
apiKey,
|
|
161
|
+
agentId,
|
|
162
|
+
});
|
|
137
163
|
if (applyResult.yamlUpdated) {
|
|
138
164
|
syncConfig = readYamlConfig(); // Re-read only if changed
|
|
139
165
|
}
|
|
140
166
|
}
|
|
141
167
|
}
|
|
142
168
|
else {
|
|
143
|
-
console.log(
|
|
169
|
+
console.log('ā ļø Skipping server sync (no API key or agent ID configured)');
|
|
144
170
|
}
|
|
145
171
|
// Step 6: Print summary
|
|
146
172
|
const { stats } = result;
|
|
@@ -148,6 +174,17 @@ export async function compileCommand(options) {
|
|
|
148
174
|
.map(([kind, count]) => `${count} ${kind}${count > 1 ? 's' : ''}`)
|
|
149
175
|
.join(', ');
|
|
150
176
|
writeSuccess(`ā
Compiled ${stats.totalPrimitives} primitives (${parts}) in ${stats.duration}ms`);
|
|
177
|
+
// Emit next-step hint only when called as a top-level `lua compile`
|
|
178
|
+
// invocation. Sub-invocations from `lua push`, `lua chat`, and `lua test`
|
|
179
|
+
// must not print "run `lua test`" mid-flow ā especially not during
|
|
180
|
+
// `lua test` itself. Fixes Bugbot issue f45d2169.
|
|
181
|
+
if (options?.topLevel) {
|
|
182
|
+
writeNextStep({
|
|
183
|
+
command: 'lua test',
|
|
184
|
+
rationale: 'to verify your tools work locally before pushing',
|
|
185
|
+
when: 'success',
|
|
186
|
+
});
|
|
187
|
+
}
|
|
151
188
|
if (debugMode) {
|
|
152
189
|
console.log(`š Output: ${outDir}`);
|
|
153
190
|
console.log(` Total size: ${(stats.totalSize / 1024).toFixed(1)}KB`);
|
|
@@ -174,6 +211,6 @@ export async function compileCommand(options) {
|
|
|
174
211
|
server_sync_performed: !!(apiKey && agentId),
|
|
175
212
|
backup_out_of_sync: backupOutOfSync,
|
|
176
213
|
});
|
|
177
|
-
},
|
|
214
|
+
}, 'compilation');
|
|
178
215
|
}
|
|
179
216
|
//# sourceMappingURL=compile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../src/commands/compile.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../src/commands/compile.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,SAAS,EACT,aAAa,EACb,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAKpC;IACC,OAAO,iBAAiB,CAAC,KAAK,IAAI,EAAE;QAClC,MAAM,SAAS,GAAG,OAAO,EAAE,KAAK,IAAI,OAA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C;AACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgKH;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+CrE"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { withErrorHandling } from '../utils/cli.js';
|
|
6
6
|
import { trackEvent } from '../services/analytics.js';
|
|
7
|
+
import { validateOrSuggest } from '../utils/aliases.js';
|
|
7
8
|
/**
|
|
8
9
|
* Bash completion script
|
|
9
10
|
*/
|
|
@@ -15,7 +16,7 @@ _lua_completion() {
|
|
|
15
16
|
prev="\${COMP_WORDS[COMP_CWORD-1]}"
|
|
16
17
|
|
|
17
18
|
# Main commands
|
|
18
|
-
commands="auth
|
|
19
|
+
commands="admin auth channels chat compile completion deploy describe docs env features init logs persona production push resources skills status test"
|
|
19
20
|
|
|
20
21
|
# Subcommands
|
|
21
22
|
case "\${prev}" in
|
|
@@ -66,7 +67,7 @@ _lua() {
|
|
|
66
67
|
local line state
|
|
67
68
|
|
|
68
69
|
_arguments -C \\
|
|
69
|
-
"1: :(auth
|
|
70
|
+
"1: :(admin auth channels chat compile completion deploy describe docs env features init logs persona production push resources skills status test)" \\
|
|
70
71
|
"*::arg:->args"
|
|
71
72
|
|
|
72
73
|
case $line[1] in
|
|
@@ -119,6 +120,8 @@ complete -c lua -f -n "__fish_use_subcommand" -a "channels" -d "Manage channels"
|
|
|
119
120
|
complete -c lua -f -n "__fish_use_subcommand" -a "logs" -d "View logs"
|
|
120
121
|
complete -c lua -f -n "__fish_use_subcommand" -a "skills" -d "Manage skills"
|
|
121
122
|
complete -c lua -f -n "__fish_use_subcommand" -a "features" -d "Manage agent features"
|
|
123
|
+
complete -c lua -f -n "__fish_use_subcommand" -a "status" -d "Show project status"
|
|
124
|
+
complete -c lua -f -n "__fish_use_subcommand" -a "describe" -d "Describe project state"
|
|
122
125
|
complete -c lua -f -n "__fish_use_subcommand" -a "completion" -d "Generate completion script"
|
|
123
126
|
|
|
124
127
|
# Auth subcommands
|
|
@@ -189,13 +192,9 @@ Then follow the instructions above to add it to your shell configuration.
|
|
|
189
192
|
return;
|
|
190
193
|
}
|
|
191
194
|
// Validate shell type
|
|
192
|
-
|
|
193
|
-
if (!validShells.includes(shell.toLowerCase())) {
|
|
194
|
-
console.error(`ā Invalid shell: "${shell}". Must be one of: ${validShells.join(', ')}`);
|
|
195
|
-
throw new Error("Invalid shell:");
|
|
196
|
-
}
|
|
195
|
+
shell = validateOrSuggest('completion.shell', shell);
|
|
197
196
|
// Output the appropriate completion script
|
|
198
|
-
switch (shell
|
|
197
|
+
switch (shell) {
|
|
199
198
|
case 'bash':
|
|
200
199
|
console.log(BASH_COMPLETION);
|
|
201
200
|
break;
|
|
@@ -207,6 +206,6 @@ Then follow the instructions above to add it to your shell configuration.
|
|
|
207
206
|
break;
|
|
208
207
|
}
|
|
209
208
|
trackEvent('cli_completion_generated', { shell_type: shell || null });
|
|
210
|
-
},
|
|
209
|
+
}, 'completion');
|
|
211
210
|
}
|
|
212
211
|
//# sourceMappingURL=completion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MA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|
|
2
2
|
* Configure Command
|
|
3
3
|
* Orchestrates the authentication setup process
|
|
4
4
|
*/
|
|
5
|
-
import { withErrorHandling, clearPromptLines } from
|
|
6
|
-
import { promptAuthMethod, handleApiKeyAuth, handleEmailAuth, handleApiKeyAuthNonInteractive, handleEmailOtpRequest, handleEmailOtpVerify, } from
|
|
5
|
+
import { withErrorHandling, clearPromptLines } from '../utils/cli.js';
|
|
6
|
+
import { promptAuthMethod, handleApiKeyAuth, handleEmailAuth, handleApiKeyAuthNonInteractive, handleEmailOtpRequest, handleEmailOtpVerify, } from '../utils/auth-flows.js';
|
|
7
7
|
import { trackEvent } from '../services/analytics.js';
|
|
8
8
|
/**
|
|
9
9
|
* Main configure command - sets up authentication credentials.
|
|
@@ -59,10 +59,10 @@ export async function configureCommand(options = {}) {
|
|
|
59
59
|
// Interactive mode: Prompt for auth method
|
|
60
60
|
authMethod = await promptAuthMethod();
|
|
61
61
|
clearPromptLines(2);
|
|
62
|
-
if (authMethod ===
|
|
62
|
+
if (authMethod === 'api-key') {
|
|
63
63
|
await handleApiKeyAuth();
|
|
64
64
|
}
|
|
65
|
-
else if (authMethod ===
|
|
65
|
+
else if (authMethod === 'email') {
|
|
66
66
|
await handleEmailAuth();
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -71,6 +71,6 @@ export async function configureCommand(options = {}) {
|
|
|
71
71
|
non_interactive_mode: nonInteractive,
|
|
72
72
|
otp_step: email ? (otp ? 'verify' : 'request') : null,
|
|
73
73
|
});
|
|
74
|
-
},
|
|
74
|
+
}, 'configuration');
|
|
75
75
|
}
|
|
76
76
|
//# sourceMappingURL=configure.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqIH;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CA0H9E"}
|
package/dist/commands/deploy.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { readYamlConfig, validateSkillConfig } from '../utils/files.js';
|
|
6
6
|
import { skillHandler, webhookHandler, jobHandler, preprocessorHandler, postprocessorHandler, } from '../primitives/index.js';
|
|
7
|
-
import { withErrorHandling, writeProgress, writeSuccess, writeInfo, clearPromptLines } from '../utils/cli.js';
|
|
7
|
+
import { withErrorHandling, writeProgress, writeSuccess, writeInfo, clearPromptLines, writeNextStep, writeHintBlock, writeTip, } from '../utils/cli.js';
|
|
8
8
|
import { requireAuthOrExit } from '../utils/command-utils.js';
|
|
9
9
|
import { safePrompt } from '../utils/prompt-handler.js';
|
|
10
|
-
import { sortVersionsByDate, promptVersionSelection, confirmDeployment
|
|
10
|
+
import { sortVersionsByDate, promptVersionSelection, confirmDeployment } from '../utils/deploy-helpers.js';
|
|
11
11
|
import { BASE_URLS } from '../config/constants.js';
|
|
12
12
|
import SkillApi from '../api/skills.api.service.js';
|
|
13
13
|
import WebhookApi from '../api/webhook.api.service.js';
|
|
@@ -15,7 +15,9 @@ import JobApi from '../api/job.api.service.js';
|
|
|
15
15
|
import PreProcessorApi from '../api/preprocessor.api.service.js';
|
|
16
16
|
import PostProcessorApi from '../api/postprocessor.api.service.js';
|
|
17
17
|
import PersonaApi from '../api/persona.api.service.js';
|
|
18
|
+
import { buildLogsCommand } from './log-tip.js';
|
|
18
19
|
import { trackEvent } from '../services/analytics.js';
|
|
20
|
+
import { validateOrSuggest } from '../utils/aliases.js';
|
|
19
21
|
/**
|
|
20
22
|
* Normalize a server version object to the VersionInfo shape expected by
|
|
21
23
|
* sortVersionsByDate / promptVersionSelection / formatVersionChoice.
|
|
@@ -116,6 +118,10 @@ export async function deployCommand(type, cmdObj) {
|
|
|
116
118
|
if (!type && (cmdObj?.skillName || cmdObj?.skillVersion)) {
|
|
117
119
|
type = 'skill';
|
|
118
120
|
}
|
|
121
|
+
// Normalize alias first (e.g. 'everything' ā 'all') so the guard below can catch it
|
|
122
|
+
if (type) {
|
|
123
|
+
type = validateOrSuggest('deploy.type', type, { allowAll: true });
|
|
124
|
+
}
|
|
119
125
|
// Handle 'all' (requires --force, like `lua push all`)
|
|
120
126
|
if (type === 'all') {
|
|
121
127
|
if (!options.force) {
|
|
@@ -128,25 +134,13 @@ export async function deployCommand(type, cmdObj) {
|
|
|
128
134
|
const config = readYamlConfig();
|
|
129
135
|
validateSkillConfig(config);
|
|
130
136
|
const agentId = config.agent.agentId;
|
|
131
|
-
const validTypes = ['skill', 'webhook', 'job', 'preprocessor', 'postprocessor', 'persona'];
|
|
132
137
|
let selectedType;
|
|
133
138
|
if (type) {
|
|
134
|
-
if (!validTypes.includes(type)) {
|
|
135
|
-
console.log('\nUsage:');
|
|
136
|
-
console.log(' lua deploy Interactive selection');
|
|
137
|
-
console.log(' lua deploy skill Deploy a skill version');
|
|
138
|
-
console.log(' lua deploy webhook Deploy a webhook version');
|
|
139
|
-
console.log(' lua deploy job Deploy a job version');
|
|
140
|
-
console.log(' lua deploy preprocessor Deploy a preprocessor version');
|
|
141
|
-
console.log(' lua deploy postprocessor Deploy a postprocessor version');
|
|
142
|
-
console.log(' lua deploy persona Deploy a persona version');
|
|
143
|
-
console.log(' lua deploy all --force Deploy latest version of all');
|
|
144
|
-
throw new Error(`Invalid type: "${type}". Must be one of: ${validTypes.join(', ')}, or "all".`);
|
|
145
|
-
}
|
|
146
139
|
selectedType = type;
|
|
147
140
|
}
|
|
148
141
|
else {
|
|
149
|
-
const answer = await safePrompt([
|
|
142
|
+
const answer = await safePrompt([
|
|
143
|
+
{
|
|
150
144
|
type: 'list',
|
|
151
145
|
name: 'type',
|
|
152
146
|
message: 'What would you like to deploy?',
|
|
@@ -158,7 +152,8 @@ export async function deployCommand(type, cmdObj) {
|
|
|
158
152
|
{ name: 'š¤ PostProcessor', value: 'postprocessor' },
|
|
159
153
|
{ name: 'š¤ Persona', value: 'persona' },
|
|
160
154
|
],
|
|
161
|
-
}
|
|
155
|
+
},
|
|
156
|
+
]);
|
|
162
157
|
if (!answer) {
|
|
163
158
|
console.log('Deployment cancelled.');
|
|
164
159
|
return;
|
|
@@ -166,12 +161,14 @@ export async function deployCommand(type, cmdObj) {
|
|
|
166
161
|
selectedType = answer.type;
|
|
167
162
|
}
|
|
168
163
|
const apiKey = await requireAuthOrExit();
|
|
164
|
+
let personaDeployed = false;
|
|
165
|
+
let versionedOutcome = null;
|
|
169
166
|
if (selectedType === 'persona') {
|
|
170
|
-
await deployPersonaVersion(apiKey, agentId, options);
|
|
167
|
+
personaDeployed = await deployPersonaVersion(apiKey, agentId, options);
|
|
171
168
|
}
|
|
172
169
|
else {
|
|
173
|
-
const deployConfig = VERSIONED_DEPLOY_TYPES.find(dt => dt.type === selectedType);
|
|
174
|
-
await deployVersionedPrimitive(deployConfig, config, apiKey, agentId, options);
|
|
170
|
+
const deployConfig = VERSIONED_DEPLOY_TYPES.find((dt) => dt.type === selectedType);
|
|
171
|
+
versionedOutcome = await deployVersionedPrimitive(deployConfig, config, apiKey, agentId, options);
|
|
175
172
|
}
|
|
176
173
|
trackEvent('cli_deploy_completed', {
|
|
177
174
|
primitive_type: selectedType,
|
|
@@ -179,6 +176,47 @@ export async function deployCommand(type, cmdObj) {
|
|
|
179
176
|
entity_selected_by_name: !!options.name,
|
|
180
177
|
version_selected_by_flag: !!options.version,
|
|
181
178
|
});
|
|
179
|
+
const deployed = selectedType === 'persona' ? personaDeployed : (versionedOutcome?.deployed ?? false);
|
|
180
|
+
const hintPrintedAlready = selectedType !== 'persona' && !!versionedOutcome?.hintPrinted;
|
|
181
|
+
if (!deployed) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
if (selectedType === 'webhook') {
|
|
185
|
+
// B8: use the resolved entity name (available for both --name and interactive selections)
|
|
186
|
+
const webhookNameToken = versionedOutcome?.entityName || options.name?.trim() || '<webhook-name>';
|
|
187
|
+
writeHintBlock({
|
|
188
|
+
headline: 'Webhook is live. Trigger it, then inspect logs:',
|
|
189
|
+
lines: [
|
|
190
|
+
{ label: 'Find URL:', command: `lua webhooks view --webhook-name ${webhookNameToken}` },
|
|
191
|
+
{ label: 'Trigger:', command: 'curl -X POST <URL from above>' },
|
|
192
|
+
{
|
|
193
|
+
label: 'Inspect:',
|
|
194
|
+
command: buildLogsCommand({
|
|
195
|
+
primitiveType: 'webhook',
|
|
196
|
+
name: webhookNameToken !== '<webhook-name>' ? webhookNameToken : undefined,
|
|
197
|
+
}),
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
when: 'success',
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
else if (selectedType === 'persona') {
|
|
204
|
+
writeNextStep({
|
|
205
|
+
command: 'lua chat -e production -m "test"',
|
|
206
|
+
rationale: 'to verify the new persona responds correctly',
|
|
207
|
+
when: 'success',
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
else if (!hintPrintedAlready) {
|
|
211
|
+
writeHintBlock({
|
|
212
|
+
headline: 'Version is live. Generate traffic first, then inspect:',
|
|
213
|
+
lines: [
|
|
214
|
+
{ label: 'Test:', command: `lua chat -e production -m "your test message"` },
|
|
215
|
+
{ label: 'Inspect:', command: buildLogsCommand({ primitiveType: selectedType }) },
|
|
216
|
+
],
|
|
217
|
+
when: 'success',
|
|
218
|
+
});
|
|
219
|
+
}
|
|
182
220
|
}, 'deployment');
|
|
183
221
|
}
|
|
184
222
|
/**
|
|
@@ -188,7 +226,7 @@ async function deployVersionedPrimitive(deployConfig, config, apiKey, agentId, o
|
|
|
188
226
|
const entities = deployConfig.handler.getFromYaml(config);
|
|
189
227
|
if (entities.length === 0) {
|
|
190
228
|
writeInfo(`ā¹ļø No ${deployConfig.label}s found in configuration. Nothing to deploy.`);
|
|
191
|
-
return;
|
|
229
|
+
return { deployed: false, hintPrinted: false, entityName: '' };
|
|
192
230
|
}
|
|
193
231
|
// Select entity
|
|
194
232
|
let selectedEntity;
|
|
@@ -204,15 +242,17 @@ async function deployVersionedPrimitive(deployConfig, config, apiKey, agentId, o
|
|
|
204
242
|
selectedEntity = entities[0];
|
|
205
243
|
}
|
|
206
244
|
else {
|
|
207
|
-
const answer = await safePrompt([
|
|
245
|
+
const answer = await safePrompt([
|
|
246
|
+
{
|
|
208
247
|
type: 'list',
|
|
209
248
|
name: 'entity',
|
|
210
249
|
message: `Select a ${deployConfig.label} to deploy:`,
|
|
211
250
|
choices: entities.map((e) => ({ name: `${e.name} (v${e.version})`, value: e })),
|
|
212
|
-
}
|
|
251
|
+
},
|
|
252
|
+
]);
|
|
213
253
|
if (!answer) {
|
|
214
254
|
console.log('Deployment cancelled.');
|
|
215
|
-
return;
|
|
255
|
+
return { deployed: false, hintPrinted: false, entityName: '' };
|
|
216
256
|
}
|
|
217
257
|
clearPromptLines(2);
|
|
218
258
|
selectedEntity = answer.entity;
|
|
@@ -236,10 +276,10 @@ async function deployVersionedPrimitive(deployConfig, config, apiKey, agentId, o
|
|
|
236
276
|
selectedVersion = sortedVersions[0].version;
|
|
237
277
|
}
|
|
238
278
|
else {
|
|
239
|
-
const exists = sortedVersions.some(v => v.version === options.version);
|
|
279
|
+
const exists = sortedVersions.some((v) => v.version === options.version);
|
|
240
280
|
if (!exists) {
|
|
241
281
|
console.log('\nAvailable versions:');
|
|
242
|
-
sortedVersions.slice(0, 5).forEach(v => console.log(` - ${v.version}`));
|
|
282
|
+
sortedVersions.slice(0, 5).forEach((v) => console.log(` - ${v.version}`));
|
|
243
283
|
if (sortedVersions.length > 5)
|
|
244
284
|
console.log(` ... and ${sortedVersions.length - 5} more`);
|
|
245
285
|
throw new Error(`Version "${options.version}" not found.`);
|
|
@@ -263,14 +303,30 @@ async function deployVersionedPrimitive(deployConfig, config, apiKey, agentId, o
|
|
|
263
303
|
writeProgress('š Publishing version...');
|
|
264
304
|
const result = await deployConfig.handler.publishVersion(apiKey, agentId, entityId, selectedVersion);
|
|
265
305
|
if (!result.success) {
|
|
306
|
+
// Publish is a management operation ā no execution logs exist for a failed publish.
|
|
307
|
+
// The error reason is already on screen.
|
|
266
308
|
throw new Error(`Failed to deploy: ${result.error || 'Unknown error'}`);
|
|
267
309
|
}
|
|
268
310
|
writeSuccess(`ā
${deployConfig.label} "${selectedEntity.name}" v${selectedVersion} deployed successfully`);
|
|
269
|
-
//
|
|
311
|
+
// B11: consolidate YAML update to a single location (applies to all types including job).
|
|
270
312
|
if (selectedVersion !== selectedEntity.version) {
|
|
271
313
|
writeInfo(`š Updating YAML with deployed version: ${selectedVersion}`);
|
|
272
314
|
deployConfig.handler.updateVersionInYaml(selectedEntity.name, selectedVersion);
|
|
273
315
|
}
|
|
316
|
+
// B6: job prints its own hint block; set hintPrinted so the outer deployCommand
|
|
317
|
+
// skips the generic "Version is live" block (avoiding duplicate hints).
|
|
318
|
+
if (deployConfig.type === 'job') {
|
|
319
|
+
writeHintBlock({
|
|
320
|
+
headline: 'Job is live. Trigger or wait for schedule, then inspect logs:',
|
|
321
|
+
lines: [
|
|
322
|
+
{ label: 'Manual trigger:', command: `lua jobs trigger --job-name ${selectedEntity.name}` },
|
|
323
|
+
{ label: 'Inspect:', command: buildLogsCommand({ primitiveType: 'job', name: selectedEntity.name }) },
|
|
324
|
+
],
|
|
325
|
+
when: 'success',
|
|
326
|
+
});
|
|
327
|
+
return { deployed: true, hintPrinted: true, entityName: selectedEntity.name };
|
|
328
|
+
}
|
|
329
|
+
return { deployed: true, hintPrinted: false, entityName: selectedEntity.name };
|
|
274
330
|
}
|
|
275
331
|
/**
|
|
276
332
|
* Deploy a persona version. Persona uses integer version IDs (not semver).
|
|
@@ -296,25 +352,27 @@ async function deployPersonaVersion(apiKey, agentId, options) {
|
|
|
296
352
|
if (isNaN(v)) {
|
|
297
353
|
throw new Error(`Invalid persona version: "${options.version}". Must be a number or 'latest'.`);
|
|
298
354
|
}
|
|
299
|
-
if (!sortedVersions.some(pv => pv.version === v)) {
|
|
355
|
+
if (!sortedVersions.some((pv) => pv.version === v)) {
|
|
300
356
|
throw new Error(`Persona version ${v} not found.`);
|
|
301
357
|
}
|
|
302
358
|
selectedVersion = v;
|
|
303
359
|
}
|
|
304
360
|
}
|
|
305
361
|
else {
|
|
306
|
-
const answer = await safePrompt([
|
|
362
|
+
const answer = await safePrompt([
|
|
363
|
+
{
|
|
307
364
|
type: 'list',
|
|
308
365
|
name: 'version',
|
|
309
366
|
message: 'Select a persona version to deploy:',
|
|
310
|
-
choices: sortedVersions.map(v => ({
|
|
367
|
+
choices: sortedVersions.map((v) => ({
|
|
311
368
|
name: `v${v.version}${v.isCurrent ? ' (CURRENT)' : ''} ā ${new Date(v.createdDate).toLocaleDateString()}`,
|
|
312
369
|
value: v.version,
|
|
313
370
|
})),
|
|
314
|
-
}
|
|
371
|
+
},
|
|
372
|
+
]);
|
|
315
373
|
if (!answer) {
|
|
316
374
|
console.log('Deployment cancelled.');
|
|
317
|
-
return;
|
|
375
|
+
return false;
|
|
318
376
|
}
|
|
319
377
|
clearPromptLines(2);
|
|
320
378
|
selectedVersion = answer.version;
|
|
@@ -330,9 +388,11 @@ async function deployPersonaVersion(apiKey, agentId, options) {
|
|
|
330
388
|
writeProgress('š Deploying persona...');
|
|
331
389
|
const deployResult = await personaApi.deployVersion(selectedVersion);
|
|
332
390
|
if (!deployResult.success) {
|
|
391
|
+
// Persona deploy is a management operation ā no execution logs exist.
|
|
333
392
|
throw new Error(`Failed to deploy persona: ${deployResult.error?.message || 'Unknown error'}`);
|
|
334
393
|
}
|
|
335
394
|
writeSuccess(`ā
Persona v${selectedVersion} deployed successfully`);
|
|
395
|
+
return true;
|
|
336
396
|
}
|
|
337
397
|
/**
|
|
338
398
|
* Deploy latest version of every primitive ā mirrors `lua push all --force --auto-deploy`.
|
|
@@ -344,6 +404,7 @@ async function deployAllCommand(_options) {
|
|
|
344
404
|
const agentId = config.agent.agentId;
|
|
345
405
|
let deployedCount = 0;
|
|
346
406
|
let failedCount = 0;
|
|
407
|
+
const failedItems = [];
|
|
347
408
|
console.log('\nš Deploying latest versions of all primitives...\n');
|
|
348
409
|
// Deploy all versioned primitives
|
|
349
410
|
for (const deployConfig of VERSIONED_DEPLOY_TYPES) {
|
|
@@ -371,11 +432,13 @@ async function deployAllCommand(_options) {
|
|
|
371
432
|
}
|
|
372
433
|
else {
|
|
373
434
|
console.warn(` ā ļø Failed to deploy ${deployConfig.label} "${entity.name}": ${result.error}`);
|
|
435
|
+
failedItems.push({ kind: deployConfig.type, name: entity.name, error: result.error || 'Unknown error' });
|
|
374
436
|
failedCount++;
|
|
375
437
|
}
|
|
376
438
|
}
|
|
377
439
|
catch (e) {
|
|
378
440
|
console.warn(` ā ļø Error deploying ${deployConfig.label} "${entity.name}": ${e.message}`);
|
|
441
|
+
failedItems.push({ kind: deployConfig.type, name: entity.name, error: e.message });
|
|
379
442
|
failedCount++;
|
|
380
443
|
}
|
|
381
444
|
}
|
|
@@ -392,29 +455,63 @@ async function deployAllCommand(_options) {
|
|
|
392
455
|
}
|
|
393
456
|
else {
|
|
394
457
|
console.warn(' ā ļø Failed to deploy persona');
|
|
458
|
+
failedItems.push({
|
|
459
|
+
kind: 'persona',
|
|
460
|
+
name: 'persona',
|
|
461
|
+
error: deployResult.error?.message || 'Unknown error',
|
|
462
|
+
});
|
|
395
463
|
failedCount++;
|
|
396
464
|
}
|
|
397
465
|
}
|
|
398
466
|
}
|
|
399
467
|
catch (e) {
|
|
400
468
|
console.warn(` ā ļø Error deploying persona: ${e.message}`);
|
|
469
|
+
failedItems.push({ kind: 'persona', name: 'persona', error: e.message });
|
|
401
470
|
failedCount++;
|
|
402
471
|
}
|
|
403
472
|
console.log();
|
|
404
473
|
if (deployedCount > 0) {
|
|
405
474
|
writeSuccess(`ā
Deployed ${deployedCount} primitive${deployedCount !== 1 ? 's' : ''} successfully`);
|
|
406
475
|
}
|
|
407
|
-
if (failedCount > 0) {
|
|
408
|
-
console.warn(`ā ļø ${failedCount} deployment${failedCount !== 1 ? 's' : ''} failed`);
|
|
409
|
-
}
|
|
410
476
|
if (deployedCount === 0 && failedCount === 0) {
|
|
411
477
|
writeInfo('ā¹ļø No primitives found to deploy.');
|
|
412
478
|
}
|
|
479
|
+
// Aggregate failure block. Deploy failures are management-plane ā no execution logs
|
|
480
|
+
// exist for them. Suggest retrying rather than checking logs.
|
|
481
|
+
if (failedItems.length > 0) {
|
|
482
|
+
console.warn(`\nā ļø ${failedItems.length} deployment${failedItems.length !== 1 ? 's' : ''} failed:`);
|
|
483
|
+
for (const item of failedItems) {
|
|
484
|
+
console.warn(` ${item.kind} "${item.name}": ${item.error}`);
|
|
485
|
+
}
|
|
486
|
+
writeTip('Re-deploy failed items with: lua deploy all --force');
|
|
487
|
+
}
|
|
413
488
|
trackEvent('cli_deploy_completed', {
|
|
414
489
|
primitive_type: 'all',
|
|
415
490
|
force_mode: true,
|
|
416
491
|
deployed_count: deployedCount,
|
|
417
492
|
failed_count: failedCount,
|
|
418
493
|
});
|
|
494
|
+
if (deployedCount > 0 && failedCount === 0) {
|
|
495
|
+
writeHintBlock({
|
|
496
|
+
headline: 'All deployed. Generate traffic first, then inspect:',
|
|
497
|
+
lines: [
|
|
498
|
+
{ label: 'Test:', command: 'lua chat -e production -m "your test message"' },
|
|
499
|
+
{ label: 'Inspect:', command: buildLogsCommand({ limit: 10 }) },
|
|
500
|
+
],
|
|
501
|
+
when: 'success',
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
else if (deployedCount > 0 && failedCount > 0) {
|
|
505
|
+
// Some succeeded ā remind them to test what's live, and retry failures.
|
|
506
|
+
writeHintBlock({
|
|
507
|
+
headline: 'Partial deploy. Test what is live and re-deploy failures:',
|
|
508
|
+
lines: [
|
|
509
|
+
{ label: 'Test live:', command: 'lua chat -e production -m "your test message"' },
|
|
510
|
+
{ label: 'Re-deploy:', command: 'lua deploy all --force' },
|
|
511
|
+
],
|
|
512
|
+
when: 'partial',
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
// Total failure: no hint ā errors already shown above.
|
|
419
516
|
}
|
|
420
517
|
//# sourceMappingURL=deploy.js.map
|