sipgate-mcp 0.3.0 → 0.3.1
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/CHANGELOG.md +9 -0
- package/README.md +7 -1
- package/SKILL.md +9 -5
- package/dist/credentials.d.ts +1 -1
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +11 -5
- package/dist/credentials.js.map +1 -1
- package/dist/setup.d.ts +4 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +28 -13
- package/dist/setup.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.1 - 2026-08-30
|
|
4
|
+
|
|
5
|
+
- Fix Claude Code registration by using its unambiguous `mcp add-json` command
|
|
6
|
+
instead of the variadic `--env` parser.
|
|
7
|
+
- Clearly map macOS Keychain's generic `password data` prompts to sipgate's
|
|
8
|
+
PAT-ID and PAT labels.
|
|
9
|
+
- Reuse existing Keychain credentials on repeated setup runs and add
|
|
10
|
+
`--replace-credentials` for deliberate rotation.
|
|
11
|
+
|
|
3
12
|
## 0.3.0 - 2026-08-30
|
|
4
13
|
|
|
5
14
|
- Add `sipgate-mcp setup` for interactive PAT storage in macOS Keychain.
|
package/README.md
CHANGED
|
@@ -50,7 +50,13 @@ not run as a daemon and does not need to be started manually.
|
|
|
50
50
|
Use `sipgate-mcp setup --client codex` or `--client claude` to configure only
|
|
51
51
|
one client. Add `--allow-writes` only when agent-initiated account changes are
|
|
52
52
|
deliberately wanted. `--dry-run` prints the secret-free registration commands
|
|
53
|
-
without changing the Keychain or client configuration.
|
|
53
|
+
without changing the Keychain or client configuration. Repeated setup runs
|
|
54
|
+
reuse existing Keychain credentials; use `--replace-credentials` only to rotate
|
|
55
|
+
the stored PAT-ID and PAT.
|
|
56
|
+
|
|
57
|
+
During first setup, macOS calls both secure inputs `password data`. The setup
|
|
58
|
+
labels the steps explicitly: enter the sipgate **PAT-ID** twice in step 1, then
|
|
59
|
+
the sipgate **PAT** twice in step 2. Input remains hidden while typing.
|
|
54
60
|
|
|
55
61
|
Secure interactive storage currently supports macOS. Environment variables
|
|
56
62
|
remain available for Linux, Windows, containers, CI, and password-manager
|
package/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: sipgate-mcp
|
|
3
3
|
description: Install and securely configure the sipgate MCP server when a user asks to set up or connect a sipgate account to Codex or Claude. Do not use for ordinary sipgate product questions.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.3.
|
|
5
|
+
version: "0.3.1"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Set up sipgate MCP
|
|
@@ -10,19 +10,19 @@ metadata:
|
|
|
10
10
|
Install the matching CLI version with one available package manager:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
vp install -g sipgate-mcp@0.3.
|
|
13
|
+
vp install -g sipgate-mcp@0.3.1
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm install -g sipgate-mcp@0.3.
|
|
17
|
+
npm install -g sipgate-mcp@0.3.1
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
pnpm add -g sipgate-mcp@0.3.
|
|
21
|
+
pnpm add -g sipgate-mcp@0.3.1
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
Run only one install command. Confirm that `sipgate-mcp --version` reports
|
|
25
|
-
`0.3.
|
|
25
|
+
`0.3.1` before continuing.
|
|
26
26
|
|
|
27
27
|
## Security boundary
|
|
28
28
|
|
|
@@ -57,6 +57,10 @@ setup delegates PAT entry directly to macOS Keychain and registers a
|
|
|
57
57
|
user-scoped, read-only stdio server. The client starts and stops that process;
|
|
58
58
|
do not launch `sipgate-mcp` as a daemon.
|
|
59
59
|
|
|
60
|
+
When credentials already exist in Keychain, setup reuses them without another
|
|
61
|
+
prompt. Use `--replace-credentials` only when the user explicitly wants to
|
|
62
|
+
rotate or replace the stored PAT-ID and PAT.
|
|
63
|
+
|
|
60
64
|
If the Keychain prompt cannot be presented in the current environment, ask the
|
|
61
65
|
user to run the setup command in their local interactive terminal. Do not ask
|
|
62
66
|
them to provide the credential to the agent instead. On Linux or Windows,
|
package/dist/credentials.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const MACOS_KEYCHAIN_SERVICE = "sipgate-mcp";
|
|
|
6
6
|
export declare const MACOS_KEYCHAIN_TOKEN_ID_ACCOUNT = "pat-token-id";
|
|
7
7
|
export declare const MACOS_KEYCHAIN_TOKEN_ACCOUNT = "pat-token";
|
|
8
8
|
type KeychainReader = (account: string) => string;
|
|
9
|
-
type KeychainWriter = (account: string) => void;
|
|
9
|
+
type KeychainWriter = (account: string, label: string) => void;
|
|
10
10
|
export declare function loadStoredCredentials(platform?: NodeJS.Platform, readKeychain?: KeychainReader): SipgateCredentials | undefined;
|
|
11
11
|
export declare function storeCredentialsInteractively(platform?: NodeJS.Platform, writeKeychain?: KeychainWriter, output?: Pick<NodeJS.WriteStream, "write">): void;
|
|
12
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,sBAAsB,gBAAgB,CAAC;AACpD,eAAO,MAAM,+BAA+B,iBAAiB,CAAC;AAC9D,eAAO,MAAM,4BAA4B,cAAc,CAAC;AAExD,KAAK,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;AAClD,KAAK,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,sBAAsB,gBAAgB,CAAC;AACpD,eAAO,MAAM,+BAA+B,iBAAiB,CAAC;AAC9D,eAAO,MAAM,4BAA4B,cAAc,CAAC;AAExD,KAAK,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;AAClD,KAAK,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AA0C/D,wBAAgB,qBAAqB,CACnC,QAAQ,GAAE,MAAM,CAAC,QAA2B,EAC5C,YAAY,GAAE,cAAsC,GACnD,kBAAkB,GAAG,SAAS,CAehC;AAED,wBAAgB,6BAA6B,CAC3C,QAAQ,GAAE,MAAM,CAAC,QAA2B,EAC5C,aAAa,GAAE,cAAsC,EACrD,MAAM,GAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAkB,GACzD,IAAI,CAmBN"}
|
package/dist/credentials.js
CHANGED
|
@@ -15,13 +15,15 @@ function defaultKeychainReader(account) {
|
|
|
15
15
|
stdio: ["ignore", "pipe", "ignore"],
|
|
16
16
|
}).trim();
|
|
17
17
|
}
|
|
18
|
-
function defaultKeychainWriter(account) {
|
|
18
|
+
function defaultKeychainWriter(account, label) {
|
|
19
19
|
const result = spawnSync("/usr/bin/security", [
|
|
20
20
|
"add-generic-password",
|
|
21
21
|
"-a",
|
|
22
22
|
account,
|
|
23
23
|
"-s",
|
|
24
24
|
MACOS_KEYCHAIN_SERVICE,
|
|
25
|
+
"-l",
|
|
26
|
+
label,
|
|
25
27
|
"-U",
|
|
26
28
|
"-w",
|
|
27
29
|
], { stdio: "inherit" });
|
|
@@ -49,9 +51,13 @@ export function storeCredentialsInteractively(platform = process.platform, write
|
|
|
49
51
|
if (platform !== "darwin") {
|
|
50
52
|
throw new Error("Secure interactive setup currently supports macOS Keychain only. Use SIPGATE_TOKEN_ID and SIPGATE_TOKEN on this platform.");
|
|
51
53
|
}
|
|
52
|
-
output.write("
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
writeKeychain(
|
|
54
|
+
output.write("\n[1/2] sipgate PAT-ID\n" +
|
|
55
|
+
"The following macOS Keychain prompt calls this value 'password data'.\n" +
|
|
56
|
+
"Enter the PAT-ID twice. Input is hidden while typing.\n");
|
|
57
|
+
writeKeychain(MACOS_KEYCHAIN_TOKEN_ID_ACCOUNT, "sipgate PAT-ID");
|
|
58
|
+
output.write("\n[2/2] sipgate PAT\n" +
|
|
59
|
+
"The following macOS Keychain prompt again calls this value 'password data'.\n" +
|
|
60
|
+
"Enter the PAT twice. Input is hidden while typing.\n");
|
|
61
|
+
writeKeychain(MACOS_KEYCHAIN_TOKEN_ACCOUNT, "sipgate PAT");
|
|
56
62
|
}
|
|
57
63
|
//# sourceMappingURL=credentials.js.map
|
package/dist/credentials.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAO7D,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CAAC;AACpD,MAAM,CAAC,MAAM,+BAA+B,GAAG,cAAc,CAAC;AAC9D,MAAM,CAAC,MAAM,4BAA4B,GAAG,WAAW,CAAC;AAKxD,SAAS,qBAAqB,CAAC,OAAe;IAC5C,OAAO,YAAY,CACjB,mBAAmB,EACnB;QACE,uBAAuB;QACvB,IAAI;QACJ,sBAAsB;QACtB,IAAI;QACJ,OAAO;QACP,IAAI;KACL,EACD;QACE,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;KACpC,CACF,CAAC,IAAI,EAAE,CAAC;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AM,OAAO,GAAG,YAAY,CAAC,+BAA+B,CAAC,CAAC,IAAI,EAAE,CAAC;QACrE,MAAM,KAAK,GAAG,YAAY,CAAC,4BAA4B,CAAC,CAAC,IAAI,EAAE,CAAC;QAChE,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC;YACvB,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,QAAQ,GAAoB,OAAO,CAAC,QAAQ,EAC5C,aAAa,GAAmB,qBAAqB,EACrD,MAAM,GAAsC,OAAO,CAAC,MAAM;IAE1D,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,2HAA2H,CAC5H,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK,CACV,0BAA0B;QAC1B,yEAAyE;QACzE,yDAAyD,CAC1D,CAAC;IACF,aAAa,CAAC,+BAA+B,EAAE,gBAAgB,CAAC,CAAC;IACjE,MAAM,CAAC,KAAK,CACV,uBAAuB;QACvB,+EAA+E;QAC/E,sDAAsD,CACvD,CAAC;IACF,aAAa,CAAC,4BAA4B,EAAE,aAAa,CAAC,CAAC;AAC7D,CAAC"}
|
package/dist/setup.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { type SipgateCredentials } from "./credentials.js";
|
|
1
2
|
export type SetupClient = "codex" | "claude";
|
|
2
3
|
export interface SetupOptions {
|
|
3
4
|
allowWrites: boolean;
|
|
4
5
|
clients: SetupClient[];
|
|
5
6
|
dryRun: boolean;
|
|
7
|
+
replaceCredentials: boolean;
|
|
6
8
|
}
|
|
7
9
|
export interface ClientCommand {
|
|
8
10
|
command: string;
|
|
@@ -12,6 +14,7 @@ export declare class SetupError extends Error {
|
|
|
12
14
|
}
|
|
13
15
|
export declare function parseSetupArgs(args: string[]): SetupOptions;
|
|
14
16
|
export declare function buildRegistrationCommand(client: SetupClient, nodeExecutable: string, entrypoint: string, allowWrites: boolean): ClientCommand;
|
|
17
|
+
export declare function ensureStoredCredentials(replaceCredentials: boolean, loadCredentials?: () => SipgateCredentials | undefined, storeCredentials?: () => void, output?: Pick<NodeJS.WriteStream, "write">): void;
|
|
15
18
|
export declare function runSetup(args: string[], entrypointArgument?: string | undefined): void;
|
|
16
|
-
export declare const SETUP_HELP = "Usage:\n sipgate-mcp Start the MCP stdio server\n sipgate-mcp setup [options] Store credentials and register MCP clients\n sipgate-mcp --version Print the installed version\n\nSetup options:\n --client codex|claude Register only this client (repeatable)\n --allow-writes Register write tools; default is read-only\n --dry-run Print registration commands without changing anything\n";
|
|
19
|
+
export declare const SETUP_HELP = "Usage:\n sipgate-mcp Start the MCP stdio server\n sipgate-mcp setup [options] Store credentials and register MCP clients\n sipgate-mcp --version Print the installed version\n\nSetup options:\n --client codex|claude Register only this client (repeatable)\n --allow-writes Register write tools; default is read-only\n --replace-credentials Replace an existing PAT-ID and PAT in Keychain\n --dry-run Print registration commands without changing anything\n";
|
|
17
20
|
//# sourceMappingURL=setup.d.ts.map
|
package/dist/setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE7C,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,qBAAa,UAAW,SAAQ,KAAK;CAAG;AAExC,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,YAAY,CAwC3D;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,WAAW,EACnB,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,OAAO,GACnB,aAAa,CA4Cf;AAED,wBAAgB,uBAAuB,CACrC,kBAAkB,EAAE,OAAO,EAC3B,eAAe,GAAE,MAAM,kBAAkB,GAAG,SAAiC,EAC7E,gBAAgB,GAAE,MAAM,IAAoC,EAC5D,MAAM,GAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAkB,GACzD,IAAI,CAQN;AAoBD,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EAAE,EACd,kBAAkB,GAAE,MAAM,GAAG,SAA2B,GACvD,IAAI,CA+DN;AAED,eAAO,MAAM,UAAU,siBAUtB,CAAC"}
|
package/dist/setup.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { spawnSync } from "node:child_process";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
|
-
import { storeCredentialsInteractively } from "./credentials.js";
|
|
3
|
+
import { loadStoredCredentials, storeCredentialsInteractively, } from "./credentials.js";
|
|
4
4
|
export class SetupError extends Error {
|
|
5
5
|
}
|
|
6
6
|
export function parseSetupArgs(args) {
|
|
7
7
|
const clients = [];
|
|
8
8
|
let allowWrites = false;
|
|
9
9
|
let dryRun = false;
|
|
10
|
+
let replaceCredentials = false;
|
|
10
11
|
for (let index = 0; index < args.length; index += 1) {
|
|
11
12
|
const argument = args[index];
|
|
12
13
|
if (argument === "--allow-writes") {
|
|
@@ -17,6 +18,10 @@ export function parseSetupArgs(args) {
|
|
|
17
18
|
dryRun = true;
|
|
18
19
|
continue;
|
|
19
20
|
}
|
|
21
|
+
if (argument === "--replace-credentials") {
|
|
22
|
+
replaceCredentials = true;
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
20
25
|
if (argument === "--client") {
|
|
21
26
|
const client = args[index + 1];
|
|
22
27
|
if (client !== "codex" && client !== "claude") {
|
|
@@ -34,6 +39,7 @@ export function parseSetupArgs(args) {
|
|
|
34
39
|
allowWrites,
|
|
35
40
|
clients: clients.length > 0 ? clients : ["codex", "claude"],
|
|
36
41
|
dryRun,
|
|
42
|
+
replaceCredentials,
|
|
37
43
|
};
|
|
38
44
|
}
|
|
39
45
|
export function buildRegistrationCommand(client, nodeExecutable, entrypoint, allowWrites) {
|
|
@@ -58,26 +64,34 @@ export function buildRegistrationCommand(client, nodeExecutable, entrypoint, all
|
|
|
58
64
|
],
|
|
59
65
|
};
|
|
60
66
|
}
|
|
67
|
+
const configuration = {
|
|
68
|
+
type: "stdio",
|
|
69
|
+
command: nodeExecutable,
|
|
70
|
+
args: [entrypoint],
|
|
71
|
+
env: {
|
|
72
|
+
SIPGATE_MCP_SCOPE: "user",
|
|
73
|
+
SIPGATE_MCP_READONLY: allowWrites ? "0" : "1",
|
|
74
|
+
},
|
|
75
|
+
};
|
|
61
76
|
return {
|
|
62
77
|
command: "claude",
|
|
63
78
|
args: [
|
|
64
79
|
"mcp",
|
|
65
|
-
"add",
|
|
66
|
-
"--transport",
|
|
67
|
-
"stdio",
|
|
80
|
+
"add-json",
|
|
68
81
|
"--scope",
|
|
69
82
|
"user",
|
|
70
|
-
"--env",
|
|
71
|
-
modeEnvironment[0],
|
|
72
|
-
"--env",
|
|
73
|
-
modeEnvironment[1],
|
|
74
83
|
"sipgate",
|
|
75
|
-
|
|
76
|
-
nodeExecutable,
|
|
77
|
-
entrypoint,
|
|
84
|
+
JSON.stringify(configuration),
|
|
78
85
|
],
|
|
79
86
|
};
|
|
80
87
|
}
|
|
88
|
+
export function ensureStoredCredentials(replaceCredentials, loadCredentials = loadStoredCredentials, storeCredentials = storeCredentialsInteractively, output = process.stderr) {
|
|
89
|
+
if (!replaceCredentials && loadCredentials()) {
|
|
90
|
+
output.write("Using the existing sipgate PAT-ID and PAT from macOS Keychain.\n");
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
storeCredentials();
|
|
94
|
+
}
|
|
81
95
|
function isCommandAvailable(command) {
|
|
82
96
|
const result = spawnSync(command, ["--version"], { stdio: "ignore" });
|
|
83
97
|
return !result.error && result.status === 0;
|
|
@@ -110,9 +124,9 @@ export function runSetup(args, entrypointArgument = process.argv[1]) {
|
|
|
110
124
|
}
|
|
111
125
|
return;
|
|
112
126
|
}
|
|
113
|
-
process.stderr.write("sipgate-mcp
|
|
127
|
+
process.stderr.write("sipgate-mcp stores the PAT-ID and PAT in macOS Keychain. Secret values are not written to MCP configuration or shell history.\n");
|
|
114
128
|
try {
|
|
115
|
-
|
|
129
|
+
ensureStoredCredentials(options.replaceCredentials);
|
|
116
130
|
}
|
|
117
131
|
catch (error) {
|
|
118
132
|
const message = error instanceof Error
|
|
@@ -147,6 +161,7 @@ export const SETUP_HELP = `Usage:
|
|
|
147
161
|
Setup options:
|
|
148
162
|
--client codex|claude Register only this client (repeatable)
|
|
149
163
|
--allow-writes Register write tools; default is read-only
|
|
164
|
+
--replace-credentials Replace an existing PAT-ID and PAT in Keychain
|
|
150
165
|
--dry-run Print registration commands without changing anything
|
|
151
166
|
`;
|
|
152
167
|
//# sourceMappingURL=setup.js.map
|
package/dist/setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"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C,MAAM,CAAC,KAAK,CAAC,YAAY,MAAM,wBAAwB,CAAC,CAAC;YACjE,SAAS;QACX,CAAC;QACD,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC;YAChC,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,YAAY,MAAM,yGAAyG,CAC5H,CAAC;YACF,SAAS;QACX,CAAC;QAED,MAAM,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,IAAI,EAAE;YAChE,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,UAAU,CAAC,uCAAuC,MAAM,GAAG,CAAC,CAAC;QACzE,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,+BAA+B,MAAM,mBAAmB,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,WAAW,MAAM,CACnH,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,gGAAgG,CACjG,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;CAUzB,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.3.
|
|
1
|
+
export declare const VERSION = "0.3.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "0.3.
|
|
1
|
+
export const VERSION = "0.3.1";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|