@ai-support-agent/cli 0.1.35-beta.0 → 0.1.35
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/api-client.d.ts +1 -6
- package/dist/api-client.d.ts.map +1 -1
- package/dist/api-client.js +0 -9
- package/dist/api-client.js.map +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +0 -44
- package/dist/commands/index.js.map +1 -1
- package/dist/constants.d.ts +0 -30
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -37
- package/dist/constants.js.map +1 -1
- package/dist/index.js +1 -17
- package/dist/index.js.map +1 -1
- package/dist/locales/en.json +0 -18
- package/dist/locales/ja.json +0 -18
- package/dist/project-agent.d.ts.map +1 -1
- package/dist/project-agent.js +1 -13
- package/dist/project-agent.js.map +1 -1
- package/dist/types/command.d.ts +1 -8
- package/dist/types/command.d.ts.map +1 -1
- package/dist/types/command.js.map +1 -1
- package/dist/types/config.d.ts +0 -6
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -1
- package/dist/types/index.js.map +1 -1
- package/docker/entrypoint.sh +0 -9
- package/package.json +1 -6
- package/dist/cli/ecs-publish-command.d.ts +0 -49
- package/dist/cli/ecs-publish-command.d.ts.map +0 -1
- package/dist/cli/ecs-publish-command.js +0 -214
- package/dist/cli/ecs-publish-command.js.map +0 -1
- package/dist/ecs/aws-arn.d.ts +0 -30
- package/dist/ecs/aws-arn.d.ts.map +0 -1
- package/dist/ecs/aws-arn.js +0 -36
- package/dist/ecs/aws-arn.js.map +0 -1
- package/dist/ecs/ecr-publisher.d.ts +0 -49
- package/dist/ecs/ecr-publisher.d.ts.map +0 -1
- package/dist/ecs/ecr-publisher.js +0 -118
- package/dist/ecs/ecr-publisher.js.map +0 -1
- package/dist/ecs/ecs-launcher.d.ts +0 -25
- package/dist/ecs/ecs-launcher.d.ts.map +0 -1
- package/dist/ecs/ecs-launcher.js +0 -157
- package/dist/ecs/ecs-launcher.js.map +0 -1
- package/dist/ecs/launcher-capability.d.ts +0 -26
- package/dist/ecs/launcher-capability.d.ts.map +0 -1
- package/dist/ecs/launcher-capability.js +0 -86
- package/dist/ecs/launcher-capability.js.map +0 -1
- package/dist/ecs/task-definition-registrar.d.ts +0 -39
- package/dist/ecs/task-definition-registrar.d.ts.map +0 -1
- package/dist/ecs/task-definition-registrar.js +0 -80
- package/dist/ecs/task-definition-registrar.js.map +0 -1
- package/dist/oneshot-runner.d.ts +0 -38
- package/dist/oneshot-runner.d.ts.map +0 -1
- package/dist/oneshot-runner.js +0 -166
- package/dist/oneshot-runner.js.map +0 -1
- package/dist/types/ecs.d.ts +0 -71
- package/dist/types/ecs.d.ts.map +0 -1
- package/dist/types/ecs.js +0 -12
- package/dist/types/ecs.js.map +0 -1
package/dist/oneshot-runner.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Oneshot runner (ECS container mode).
|
|
4
|
-
*
|
|
5
|
-
* When the CLI starts with AGENT_MODE=oneshot (set via containerOverrides at
|
|
6
|
-
* ECS RunTask time), it does NOT run the resident agent flow. Instead it:
|
|
7
|
-
* getCommand(COMMAND_ID) -> executeCommand -> submitResult -> exit
|
|
8
|
-
*
|
|
9
|
-
* There is no AppSync subscription, no heartbeat, and no register call.
|
|
10
|
-
* Authentication uses the short-lived oneshot token (AGENT_ONESHOT_TOKEN)
|
|
11
|
-
* scoped to the single COMMAND_ID. The token value is never logged.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.readOneshotEnv = readOneshotEnv;
|
|
15
|
-
exports.runOneshot = runOneshot;
|
|
16
|
-
exports.runOneshotFromEnv = runOneshotFromEnv;
|
|
17
|
-
const api_client_1 = require("./api-client");
|
|
18
|
-
const commands_1 = require("./commands");
|
|
19
|
-
const constants_1 = require("./constants");
|
|
20
|
-
const logger_1 = require("./logger");
|
|
21
|
-
const types_1 = require("./types");
|
|
22
|
-
const utils_1 = require("./utils");
|
|
23
|
-
/**
|
|
24
|
-
* Command types the ECS oneshot runner is allowed to execute (Phase 1).
|
|
25
|
-
* The API only dispatches `execute_command` to ECS execution agents, but the
|
|
26
|
-
* runner enforces the same allowlist defensively: a mis-dispatched `chat` /
|
|
27
|
-
* `e2e_test` / `file_*` would otherwise run with a near-empty execution
|
|
28
|
-
* context (no projectDir/mcpConfigPath/serverConfig/browser callbacks) and
|
|
29
|
-
* silently misbehave. Anything outside this set is rejected up front.
|
|
30
|
-
*/
|
|
31
|
-
const ONESHOT_SUPPORTED_COMMAND_TYPES = new Set([
|
|
32
|
-
'execute_command',
|
|
33
|
-
]);
|
|
34
|
-
/**
|
|
35
|
-
* Working directory for `execute_command` in the container. The ECS image
|
|
36
|
-
* sets WORKDIR /workspace; fall back to that when the shell executor would
|
|
37
|
-
* otherwise default to an undefined cwd.
|
|
38
|
-
*/
|
|
39
|
-
const ONESHOT_DEFAULT_CWD = '/workspace';
|
|
40
|
-
const REQUIRED_ENV_KEYS = [
|
|
41
|
-
constants_1.ONESHOT_ENV_VARS.COMMAND_ID,
|
|
42
|
-
constants_1.ONESHOT_ENV_VARS.AGENT_ID,
|
|
43
|
-
constants_1.ONESHOT_ENV_VARS.TENANT_CODE,
|
|
44
|
-
constants_1.ONESHOT_ENV_VARS.PROJECT_CODE,
|
|
45
|
-
constants_1.ONESHOT_ENV_VARS.API_BASE_URL,
|
|
46
|
-
constants_1.ONESHOT_ENV_VARS.AGENT_ONESHOT_TOKEN,
|
|
47
|
-
];
|
|
48
|
-
/**
|
|
49
|
-
* Read and validate the oneshot environment.
|
|
50
|
-
* Missing variables are a clear fatal error (no fallback).
|
|
51
|
-
*/
|
|
52
|
-
function readOneshotEnv(env = process.env) {
|
|
53
|
-
const missing = REQUIRED_ENV_KEYS.filter((key) => !env[key]);
|
|
54
|
-
if (missing.length > 0) {
|
|
55
|
-
throw new Error(`Oneshot mode requires environment variables: ${missing.join(', ')}`);
|
|
56
|
-
}
|
|
57
|
-
return {
|
|
58
|
-
commandId: env[constants_1.ONESHOT_ENV_VARS.COMMAND_ID],
|
|
59
|
-
agentId: env[constants_1.ONESHOT_ENV_VARS.AGENT_ID],
|
|
60
|
-
tenantCode: env[constants_1.ONESHOT_ENV_VARS.TENANT_CODE],
|
|
61
|
-
projectCode: env[constants_1.ONESHOT_ENV_VARS.PROJECT_CODE],
|
|
62
|
-
apiBaseUrl: env[constants_1.ONESHOT_ENV_VARS.API_BASE_URL],
|
|
63
|
-
token: env[constants_1.ONESHOT_ENV_VARS.AGENT_ONESHOT_TOKEN],
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Run exactly one command and return the process exit code
|
|
68
|
-
* (0 = executed and submitted successfully, 1 = any failure).
|
|
69
|
-
*/
|
|
70
|
-
async function runOneshot(env = process.env) {
|
|
71
|
-
let oneshotEnv;
|
|
72
|
-
try {
|
|
73
|
-
oneshotEnv = readOneshotEnv(env);
|
|
74
|
-
}
|
|
75
|
-
catch (error) {
|
|
76
|
-
logger_1.logger.error(`[oneshot] ${(0, utils_1.getErrorMessage)(error)}`);
|
|
77
|
-
return 1;
|
|
78
|
-
}
|
|
79
|
-
const { commandId, agentId, tenantCode, projectCode, apiBaseUrl } = oneshotEnv;
|
|
80
|
-
logger_1.logger.info(`[oneshot] Starting oneshot execution: commandId=${commandId} agentId=${agentId}`);
|
|
81
|
-
let client;
|
|
82
|
-
try {
|
|
83
|
-
client = new api_client_1.ApiClient(apiBaseUrl, oneshotEnv.token);
|
|
84
|
-
}
|
|
85
|
-
catch (error) {
|
|
86
|
-
logger_1.logger.error(`[oneshot] Failed to initialize API client: ${(0, utils_1.getErrorMessage)(error)}`);
|
|
87
|
-
return 1;
|
|
88
|
-
}
|
|
89
|
-
// The oneshot token uses the same "{tenantCode}:{tokenId}:{secret}" format
|
|
90
|
-
// as resident agent tokens, so the ApiClient constructor already derives a
|
|
91
|
-
// tenant code from it. TENANT_CODE from the environment is still applied
|
|
92
|
-
// explicitly as the authoritative value (dispatch injects both together).
|
|
93
|
-
client.setTenantCode(tenantCode);
|
|
94
|
-
client.setProjectCode(projectCode);
|
|
95
|
-
const submit = async (result) => {
|
|
96
|
-
try {
|
|
97
|
-
await client.submitResult(commandId, result, agentId);
|
|
98
|
-
return true;
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
logger_1.logger.error(`[oneshot] Failed to submit result: ${(0, utils_1.getErrorMessage)(error)}`);
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
let command;
|
|
106
|
-
try {
|
|
107
|
-
command = await client.getCommand(commandId, agentId);
|
|
108
|
-
}
|
|
109
|
-
catch (error) {
|
|
110
|
-
const message = `Failed to fetch command ${commandId}: ${(0, utils_1.getErrorMessage)(error)}`;
|
|
111
|
-
logger_1.logger.error(`[oneshot] ${message}`);
|
|
112
|
-
// Best effort: let the API mark the work command as failed right away
|
|
113
|
-
// instead of waiting for the timeout sweep.
|
|
114
|
-
await submit((0, types_1.errorResult)(message));
|
|
115
|
-
return 1;
|
|
116
|
-
}
|
|
117
|
-
if (!ONESHOT_SUPPORTED_COMMAND_TYPES.has(command.type)) {
|
|
118
|
-
const supported = [...ONESHOT_SUPPORTED_COMMAND_TYPES].join(', ');
|
|
119
|
-
const message = `Command type "${command.type}" is not supported in ECS oneshot mode (supported: ${supported})`;
|
|
120
|
-
logger_1.logger.error(`[oneshot] ${message}`);
|
|
121
|
-
// Submit as a visible failure rather than running with an incomplete
|
|
122
|
-
// execution context and misbehaving silently.
|
|
123
|
-
await submit((0, types_1.errorResult)(message));
|
|
124
|
-
return 1;
|
|
125
|
-
}
|
|
126
|
-
// execute_command's shell executor falls back to os.homedir() when cwd is
|
|
127
|
-
// absent; pin it to the container's working dir for predictable behavior.
|
|
128
|
-
const payload = { ...command.payload };
|
|
129
|
-
if (payload.cwd === undefined || payload.cwd === null || payload.cwd === '') {
|
|
130
|
-
payload.cwd = ONESHOT_DEFAULT_CWD;
|
|
131
|
-
}
|
|
132
|
-
logger_1.logger.info(`[oneshot] Executing command: type=${command.type}`);
|
|
133
|
-
const result = await (0, commands_1.executeCommand)(command.type, payload, {
|
|
134
|
-
commandId,
|
|
135
|
-
client,
|
|
136
|
-
agentId,
|
|
137
|
-
tenantCode,
|
|
138
|
-
});
|
|
139
|
-
const submitted = await submit(result);
|
|
140
|
-
if (!submitted)
|
|
141
|
-
return 1;
|
|
142
|
-
if (!result.success) {
|
|
143
|
-
logger_1.logger.error('[oneshot] Command execution failed; result submitted');
|
|
144
|
-
return 1;
|
|
145
|
-
}
|
|
146
|
-
logger_1.logger.success('[oneshot] Command executed and result submitted');
|
|
147
|
-
return 0;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Entry-point wrapper used by src/index.ts: runs the oneshot flow and exits
|
|
151
|
-
* the process with the resulting code. Any unexpected rejection is converted
|
|
152
|
-
* into exit code 1 — a container that never exits would only be reclaimed by
|
|
153
|
-
* the slow timeout sweep. The runner is injectable for tests.
|
|
154
|
-
*/
|
|
155
|
-
async function runOneshotFromEnv(runner = runOneshot) {
|
|
156
|
-
let exitCode = 1;
|
|
157
|
-
try {
|
|
158
|
-
exitCode = await runner();
|
|
159
|
-
}
|
|
160
|
-
catch (error) {
|
|
161
|
-
logger_1.logger.error(`[oneshot] Fatal error: ${(0, utils_1.getErrorMessage)(error)}`);
|
|
162
|
-
exitCode = 1;
|
|
163
|
-
}
|
|
164
|
-
process.exit(exitCode);
|
|
165
|
-
}
|
|
166
|
-
//# sourceMappingURL=oneshot-runner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oneshot-runner.js","sourceRoot":"","sources":["../src/oneshot-runner.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAkDH,wCAaC;AAMD,gCAkFC;A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AC,CAAA;IAChE,MAAM,MAAM,GAAG,MAAM,IAAA,yBAAc,EAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE;QACzD,SAAS;QACT,MAAM;QACN,OAAO;QACP,UAAU;KACX,CAAC,CAAA;IAEF,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAA;IACtC,IAAI,CAAC,SAAS;QAAE,OAAO,CAAC,CAAA;IAExB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,eAAM,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACpE,OAAO,CAAC,CAAA;IACV,CAAC;IACD,eAAM,CAAC,OAAO,CAAC,iDAAiD,CAAC,CAAA;IACjE,OAAO,CAAC,CAAA;AACV,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,iBAAiB,CAAC,SAAgC,UAAU;IAChF,IAAI,QAAQ,GAAG,CAAC,CAAA;IAChB,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,MAAM,EAAE,CAAA;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CAAC,0BAA0B,IAAA,uBAAe,EAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAChE,QAAQ,GAAG,CAAC,CAAA;IACd,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;AACxB,CAAC"}
|
package/dist/types/ecs.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ECS execution agent types (launcher-agent architecture).
|
|
3
|
-
*
|
|
4
|
-
* An ECS execution agent is an on-demand execution target: a container is
|
|
5
|
-
* started via ECS RunTask, executes exactly one command (oneshot), submits
|
|
6
|
-
* the result, and exits. The RunTask/StopTask calls are performed by a
|
|
7
|
-
* resident agent (the "launcher agent") using its local AWS credentials;
|
|
8
|
-
* the API never calls AWS directly.
|
|
9
|
-
*/
|
|
10
|
-
/** ecsConfig registered with the API for an ECS execution agent */
|
|
11
|
-
export interface EcsAgentConfig {
|
|
12
|
-
/** Image URI pinned by digest (`<repo>@sha256:...`) */
|
|
13
|
-
imageUri: string;
|
|
14
|
-
/** Tag used at publish time (display purposes) */
|
|
15
|
-
imageTag: string;
|
|
16
|
-
/** Image digest (`sha256:...`) */
|
|
17
|
-
imageDigest: string;
|
|
18
|
-
/** ECS task size */
|
|
19
|
-
cpu: number;
|
|
20
|
-
memory: number;
|
|
21
|
-
/** Task definition registered by the publisher (launcher-side RegisterTaskDefinition) */
|
|
22
|
-
taskDefinitionArn: string;
|
|
23
|
-
taskDefinitionFamily: string;
|
|
24
|
-
/** Target cluster and awsvpc network settings */
|
|
25
|
-
clusterArn: string;
|
|
26
|
-
subnetIds: string[];
|
|
27
|
-
securityGroupIds: string[];
|
|
28
|
-
assignPublicIp?: boolean;
|
|
29
|
-
/** awslogs log group the container writes to */
|
|
30
|
-
logGroupName: string;
|
|
31
|
-
/** Resident agent in charge of RunTask (auto-selected by capability when omitted) */
|
|
32
|
-
launcherAgentId?: string;
|
|
33
|
-
/** Publisher agent id and timestamp */
|
|
34
|
-
registeredBy: string;
|
|
35
|
-
registeredAt: string;
|
|
36
|
-
}
|
|
37
|
-
/** Request body for POST /api/:tenantCode/agent/ecs-agents */
|
|
38
|
-
export interface EcsAgentRegistration {
|
|
39
|
-
agentId: string;
|
|
40
|
-
displayName: string;
|
|
41
|
-
capabilities: string[];
|
|
42
|
-
ecsConfig: EcsAgentConfig;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Environment variables injected into the oneshot container at RunTask time
|
|
46
|
-
* via containerOverrides (never stored in the task definition).
|
|
47
|
-
*/
|
|
48
|
-
export interface OneshotContainerEnv {
|
|
49
|
-
AGENT_MODE: string;
|
|
50
|
-
COMMAND_ID: string;
|
|
51
|
-
AGENT_ID: string;
|
|
52
|
-
TENANT_CODE: string;
|
|
53
|
-
PROJECT_CODE: string;
|
|
54
|
-
API_BASE_URL: string;
|
|
55
|
-
AGENT_ONESHOT_TOKEN: string;
|
|
56
|
-
}
|
|
57
|
-
/** Payload of the `ecs_launch` launcher command */
|
|
58
|
-
export interface EcsLaunchPayload {
|
|
59
|
-
taskDefinitionArn?: unknown;
|
|
60
|
-
clusterArn?: unknown;
|
|
61
|
-
subnetIds?: unknown;
|
|
62
|
-
securityGroupIds?: unknown;
|
|
63
|
-
assignPublicIp?: unknown;
|
|
64
|
-
containerEnv?: unknown;
|
|
65
|
-
}
|
|
66
|
-
/** Payload of the `ecs_stop` launcher command */
|
|
67
|
-
export interface EcsStopPayload {
|
|
68
|
-
clusterArn?: unknown;
|
|
69
|
-
taskArn?: unknown;
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=ecs.d.ts.map
|
package/dist/types/ecs.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ecs.d.ts","sourceRoot":"","sources":["../../src/types/ecs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,mEAAmE;AACnE,MAAM,WAAW,cAAc;IAC7B,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAA;IAChB,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAA;IAChB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,oBAAoB;IACpB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,yFAAyF;IACzF,iBAAiB,EAAE,MAAM,CAAA;IACzB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gDAAgD;IAChD,YAAY,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,8DAA8D;AAC9D,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,SAAS,EAAE,cAAc,CAAA;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,mBAAmB,EAAE,MAAM,CAAA;CAC5B;AAED,mDAAmD;AACnD,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,iDAAiD;AACjD,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
|
package/dist/types/ecs.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* ECS execution agent types (launcher-agent architecture).
|
|
4
|
-
*
|
|
5
|
-
* An ECS execution agent is an on-demand execution target: a container is
|
|
6
|
-
* started via ECS RunTask, executes exactly one command (oneshot), submits
|
|
7
|
-
* the result, and exits. The RunTask/StopTask calls are performed by a
|
|
8
|
-
* resident agent (the "launcher agent") using its local AWS credentials;
|
|
9
|
-
* the API never calls AWS directly.
|
|
10
|
-
*/
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
//# sourceMappingURL=ecs.js.map
|
package/dist/types/ecs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ecs.js","sourceRoot":"","sources":["../../src/types/ecs.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
|