@amykit/plugin-slack 0.5.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 +61 -0
- package/dist/SlackApi.d.ts +67 -0
- package/dist/SlackApi.d.ts.map +1 -0
- package/dist/SlackApi.js +143 -0
- package/dist/SlackApi.js.map +1 -0
- package/dist/SlackConversation.d.ts +111 -0
- package/dist/SlackConversation.d.ts.map +1 -0
- package/dist/SlackConversation.js +504 -0
- package/dist/SlackConversation.js.map +1 -0
- package/dist/ThreadMap.d.ts +150 -0
- package/dist/ThreadMap.d.ts.map +1 -0
- package/dist/ThreadMap.js +444 -0
- package/dist/ThreadMap.js.map +1 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +44 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +3 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +43 -0
- package/dist/plugin.js.map +1 -0
- package/dist/secret.d.ts +13 -0
- package/dist/secret.d.ts.map +1 -0
- package/dist/secret.js +56 -0
- package/dist/secret.js.map +1 -0
- package/package.json +36 -0
package/dist/config.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DEFAULT_RATE_LIMIT_RETRIES, DEFAULT_RETRY_AFTER_S } from "./SlackApi.js";
|
|
2
|
+
import { DEFAULT_RETENTION_DAYS } from "./SlackConversation.js";
|
|
3
|
+
/** What this plugin needs told to it, and nothing more. */
|
|
4
|
+
export const configSchema = {
|
|
5
|
+
channel: {
|
|
6
|
+
type: "string",
|
|
7
|
+
required: true,
|
|
8
|
+
description: "the channel id every work thread opens in, such as C0XXXXXXX — an id, not a name",
|
|
9
|
+
example: "C0XXXXXXX",
|
|
10
|
+
},
|
|
11
|
+
token: {
|
|
12
|
+
type: "string",
|
|
13
|
+
required: true,
|
|
14
|
+
description: "where the bot token lives: `env:SLACK_BOT_TOKEN` or `file:<path>#<KEY>`, never the token itself",
|
|
15
|
+
example: "env:SLACK_BOT_TOKEN",
|
|
16
|
+
},
|
|
17
|
+
operator: {
|
|
18
|
+
type: "string",
|
|
19
|
+
required: true,
|
|
20
|
+
description: "the user id, such as U0XXXXXXX, whose replies are answers; everybody else's are ignored",
|
|
21
|
+
example: "U0XXXXXXX",
|
|
22
|
+
},
|
|
23
|
+
maxRateLimitRetries: {
|
|
24
|
+
type: "number",
|
|
25
|
+
description: "how many times a call Slack rate limits (HTTP 429) is waited out and tried again before it fails",
|
|
26
|
+
default: DEFAULT_RATE_LIMIT_RETRIES,
|
|
27
|
+
},
|
|
28
|
+
defaultRetryAfterSeconds: {
|
|
29
|
+
type: "number",
|
|
30
|
+
description: "how long to wait after a 429 that carries no Retry-After; one names its own wait, and that wins",
|
|
31
|
+
default: DEFAULT_RETRY_AFTER_S,
|
|
32
|
+
},
|
|
33
|
+
directory: {
|
|
34
|
+
type: "string",
|
|
35
|
+
description: "where each work item's thread is remembered, relative to the state directory",
|
|
36
|
+
default: "slack",
|
|
37
|
+
},
|
|
38
|
+
retentionDays: {
|
|
39
|
+
type: "number",
|
|
40
|
+
description: "days a downloaded file or a thread's memory stays unused before it is pruned, 0 to keep everything. A pruned file is fetched again when its reply is read; a pruned thread means the next question opens a new one",
|
|
41
|
+
default: DEFAULT_RETENTION_DAYS,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,2DAA2D;AAC3D,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,OAAO,EAAE;QACP,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,kFAAkF;QAC/F,OAAO,EAAE,WAAW;KACrB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,iGAAiG;QAC9G,OAAO,EAAE,qBAAqB;KAC/B;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,yFAAyF;QACtG,OAAO,EAAE,WAAW;KACrB;IACD,mBAAmB,EAAE;QACnB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,kGAAkG;QAC/G,OAAO,EAAE,0BAA0B;KACpC;IACD,wBAAwB,EAAE;QACxB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,iGAAiG;QAC9G,OAAO,EAAE,qBAAqB;KAC/B;IACD,SAAS,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,8EAA8E;QAC3F,OAAO,EAAE,OAAO;KACjB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,oNAAoN;QACtN,OAAO,EAAE,sBAAsB;KAChC;CACF,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { plugin } from "./plugin.js";
|
|
2
|
+
export { configSchema } from "./config.js";
|
|
3
|
+
export { DEFAULT_RETENTION_DAYS, SlackConversation } from "./SlackConversation.js";
|
|
4
|
+
export type { SlackCheck, SlackConversationOptions } from "./SlackConversation.js";
|
|
5
|
+
export { DEFAULT_RATE_LIMIT_RETRIES, DEFAULT_RETRY_AFTER_S, SLACK_API, SlackApi, TooLarge, fetchTransport } from "./SlackApi.js";
|
|
6
|
+
export type { HttpRequest, HttpResponse, HttpTransport, SlackAnswer, SlackApiOptions } from "./SlackApi.js";
|
|
7
|
+
export { resolveToken } from "./secret.js";
|
|
8
|
+
export type { SecretSources } from "./secret.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACnF,YAAY,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACjI,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { plugin } from "./plugin.js";
|
|
2
|
+
export { configSchema } from "./config.js";
|
|
3
|
+
export { DEFAULT_RETENTION_DAYS, SlackConversation } from "./SlackConversation.js";
|
|
4
|
+
export { DEFAULT_RATE_LIMIT_RETRIES, DEFAULT_RETRY_AFTER_S, SLACK_API, SlackApi, TooLarge, fetchTransport } from "./SlackApi.js";
|
|
5
|
+
export { resolveToken } from "./secret.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEjI,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAMtC,eAAO,MAAM,MAAM,EAAE,MAyCpB,CAAC"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { configSchema } from "./config.js";
|
|
3
|
+
import { resolveToken } from "./secret.js";
|
|
4
|
+
import { DEFAULT_RATE_LIMIT_RETRIES, DEFAULT_RETRY_AFTER_S, SlackApi } from "./SlackApi.js";
|
|
5
|
+
import { DEFAULT_RETENTION_DAYS, SlackConversation } from "./SlackConversation.js";
|
|
6
|
+
export const plugin = {
|
|
7
|
+
name: "@amykit/plugin-slack",
|
|
8
|
+
version: "0.1.0",
|
|
9
|
+
configSchema,
|
|
10
|
+
register(registry, ctx) {
|
|
11
|
+
const channel = ctx.config.channel;
|
|
12
|
+
const operator = ctx.config.operator;
|
|
13
|
+
// Refused at mount, naming the setting: a name where an id belongs is a
|
|
14
|
+
// thread posted nowhere, found only by waiting for an answer.
|
|
15
|
+
if (!/^[CG][A-Z0-9]+$/.test(channel)) {
|
|
16
|
+
throw new Error(`@amykit/plugin-slack: \`channel\` must be a channel id such as C0XXXXXXX, got ${channel}`);
|
|
17
|
+
}
|
|
18
|
+
if (!/^[UW][A-Z0-9]+$/.test(operator)) {
|
|
19
|
+
throw new Error(`@amykit/plugin-slack: \`operator\` must be a user id such as U0XXXXXXX, got ${operator}`);
|
|
20
|
+
}
|
|
21
|
+
// The host applies the schema's defaults; a caller that did not still mounts the same thing.
|
|
22
|
+
const retries = ctx.config.maxRateLimitRetries ?? DEFAULT_RATE_LIMIT_RETRIES;
|
|
23
|
+
const fallback = ctx.config.defaultRetryAfterSeconds ?? DEFAULT_RETRY_AFTER_S;
|
|
24
|
+
const retentionDays = ctx.config.retentionDays ?? DEFAULT_RETENTION_DAYS;
|
|
25
|
+
for (const [name, value] of Object.entries({ maxRateLimitRetries: retries, defaultRetryAfterSeconds: fallback, retentionDays })) {
|
|
26
|
+
if (!Number.isFinite(value) || value < 0) {
|
|
27
|
+
throw new Error(`@amykit/plugin-slack: \`${name}\` must be zero or more, got ${value}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const api = new SlackApi(resolveToken(ctx.config.token), {
|
|
31
|
+
maxRateLimitRetries: Math.floor(retries),
|
|
32
|
+
defaultRetryAfterSeconds: fallback,
|
|
33
|
+
});
|
|
34
|
+
registry.port("conversation", new SlackConversation(api, {
|
|
35
|
+
channel,
|
|
36
|
+
operator,
|
|
37
|
+
directory: path.join(ctx.paths.state, ctx.config.directory ?? "slack"),
|
|
38
|
+
retentionDays,
|
|
39
|
+
now: ctx.now,
|
|
40
|
+
}));
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAA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,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,KAAe,CAAC,EAAE;YACjE,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;YACxC,wBAAwB,EAAE,QAAQ;SACnC,CAAC,CAAC;QACH,QAAQ,CAAC,IAAI,CACX,cAAc,EACd,IAAI,iBAAiB,CAAC,GAAG,EAAE;YACzB,OAAO;YACP,QAAQ;YACR,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAG,GAAG,CAAC,MAAM,CAAC,SAAgC,IAAI,OAAO,CAAC;YAC9F,aAAa;YACb,GAAG,EAAE,GAAG,CAAC,GAAG;SACb,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC"}
|
package/dist/secret.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface SecretSources {
|
|
2
|
+
env: NodeJS.ProcessEnv;
|
|
3
|
+
readFile: (file: string) => string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The bot token, from where the config says it lives.
|
|
7
|
+
*
|
|
8
|
+
* `env:<NAME>` or `file:<path>#<KEY>`, and nothing else. A token written into
|
|
9
|
+
* `config.yaml` itself is refused rather than used, because that file is the
|
|
10
|
+
* one people paste into an issue when something breaks.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveToken(ref: string, sources?: SecretSources): string;
|
|
13
|
+
//# sourceMappingURL=secret.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret.d.ts","sourceRoot":"","sources":["../src/secret.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC;AAOD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,aAAyB,GAAG,MAAM,CAsBpF"}
|
package/dist/secret.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
const FROM_DISK = {
|
|
5
|
+
env: process.env,
|
|
6
|
+
readFile: (file) => fs.readFileSync(file, "utf8"),
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The bot token, from where the config says it lives.
|
|
10
|
+
*
|
|
11
|
+
* `env:<NAME>` or `file:<path>#<KEY>`, and nothing else. A token written into
|
|
12
|
+
* `config.yaml` itself is refused rather than used, because that file is the
|
|
13
|
+
* one people paste into an issue when something breaks.
|
|
14
|
+
*/
|
|
15
|
+
export function resolveToken(ref, sources = FROM_DISK) {
|
|
16
|
+
if (ref.startsWith("env:")) {
|
|
17
|
+
const name = ref.slice("env:".length);
|
|
18
|
+
const value = sources.env[name];
|
|
19
|
+
if (!value)
|
|
20
|
+
throw new Error(`@amykit/plugin-slack: \`token\` names ${name}, which is not set`);
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
if (ref.startsWith("file:")) {
|
|
24
|
+
const [file = "", key = ""] = ref.slice("file:".length).split("#");
|
|
25
|
+
if (!file || !key) {
|
|
26
|
+
throw new Error("@amykit/plugin-slack: `token` must be `file:<path>#<KEY>`, naming the key inside the file");
|
|
27
|
+
}
|
|
28
|
+
const value = keyIn(sources.readFile(expandHome(file)), key);
|
|
29
|
+
if (!value)
|
|
30
|
+
throw new Error(`@amykit/plugin-slack: ${file} has no ${key}`);
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
throw new Error("@amykit/plugin-slack: `token` must say where the token lives — `env:SLACK_BOT_TOKEN` or " +
|
|
34
|
+
"`file:<path>#<KEY>` — and is never written into the config itself");
|
|
35
|
+
}
|
|
36
|
+
/** One `KEY=value` line of a dotenv-shaped file, quotes stripped. */
|
|
37
|
+
function keyIn(text, key) {
|
|
38
|
+
for (const line of text.split(/\r?\n/)) {
|
|
39
|
+
const equals = line.indexOf("=");
|
|
40
|
+
if (equals === -1)
|
|
41
|
+
continue;
|
|
42
|
+
const name = line.slice(0, equals).trim().replace(/^export\s+/, "");
|
|
43
|
+
if (name !== key)
|
|
44
|
+
continue;
|
|
45
|
+
return unquote(line.slice(equals + 1).trim());
|
|
46
|
+
}
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
function unquote(value) {
|
|
50
|
+
const quote = value[0];
|
|
51
|
+
return (quote === '"' || quote === "'") && value.length > 1 && value.endsWith(quote) ? value.slice(1, -1) : value;
|
|
52
|
+
}
|
|
53
|
+
function expandHome(file) {
|
|
54
|
+
return file === "~" || file.startsWith("~/") ? path.join(os.homedir(), file.slice(1)) : file;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=secret.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret.js","sourceRoot":"","sources":["../src/secret.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAO7B,MAAM,SAAS,GAAkB;IAC/B,GAAG,EAAE,OAAO,CAAC,GAAG;IAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC;CAClD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,UAAyB,SAAS;IAC1E,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACtC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,KAAK;YAAE,MAAM,IAAI,KA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AAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,OAAO,CAAC,KAAa;IAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACvB,OAAO,CAAC,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACpH,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/F,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@amykit/plugin-slack",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "A Slack thread per piece of work, over the Web API, as the conversation port.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Nicolas Melo",
|
|
8
|
+
"homepage": "https://github.com/nicolasmelo1/amy#readme",
|
|
9
|
+
"bugs": "https://github.com/nicolasmelo1/amy/issues",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/nicolasmelo1/amy.git",
|
|
13
|
+
"directory": "plugins/slack"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public",
|
|
17
|
+
"registry": "https://registry.npmjs.org"
|
|
18
|
+
},
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@amykit/core": "^0.5.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@amykit/test-fixtures": "^0.1.0"
|
|
35
|
+
}
|
|
36
|
+
}
|