credvault 0.9.0 → 0.10.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/LICENSE.md +61 -0
- package/README.md +26 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/owner.d.ts +39 -0
- package/dist/owner.js +67 -0
- package/dist/owner.js.map +1 -0
- package/package.json +5 -3
- package/LICENSE +0 -21
package/LICENSE.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# PolyForm Strict License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/strict/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
8
|
+
|
|
9
|
+
## Copyright License
|
|
10
|
+
|
|
11
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose, other than distributing the software or making changes or new works based on the software.
|
|
12
|
+
|
|
13
|
+
## Patent License
|
|
14
|
+
|
|
15
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
16
|
+
|
|
17
|
+
## Noncommercial Purposes
|
|
18
|
+
|
|
19
|
+
Any noncommercial purpose is a permitted purpose.
|
|
20
|
+
|
|
21
|
+
## Personal Uses
|
|
22
|
+
|
|
23
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
24
|
+
|
|
25
|
+
## Noncommercial Organizations
|
|
26
|
+
|
|
27
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
28
|
+
|
|
29
|
+
## Fair Use
|
|
30
|
+
|
|
31
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
32
|
+
|
|
33
|
+
## No Other Rights
|
|
34
|
+
|
|
35
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
36
|
+
|
|
37
|
+
## Patent Defense
|
|
38
|
+
|
|
39
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
40
|
+
|
|
41
|
+
## Violations
|
|
42
|
+
|
|
43
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
44
|
+
|
|
45
|
+
## No Liability
|
|
46
|
+
|
|
47
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
48
|
+
|
|
49
|
+
## Definitions
|
|
50
|
+
|
|
51
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
52
|
+
|
|
53
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
54
|
+
|
|
55
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
56
|
+
|
|
57
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
58
|
+
|
|
59
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
|
60
|
+
|
|
61
|
+
Required Notice: Copyright 2026 William Jin (https://wrenautomation.com)
|
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ npm install credvault
|
|
|
26
26
|
| `canaryStore(store)` | Reading a tripwire credential records it, tells a person, and throws. |
|
|
27
27
|
| `totp(seed)` | The current code from a TOTP seed. `findTotpSecret(pageText)` finds the seed on an enrollment page. |
|
|
28
28
|
| `newPassword()` | 24 characters, every class, no look-alikes. |
|
|
29
|
+
| `ownerCredentials({ roleArn, owner, region })` | One app, many owners: an AWS session tagged `owner=<owner>` from one shared role, renewed before it ends. `ownerSsmClient` wraps it; `ownerPath("/myapp", "acme")` = `/myapp/owners/acme`. |
|
|
29
30
|
|
|
30
31
|
## Example
|
|
31
32
|
|
|
@@ -42,11 +43,34 @@ await keys.put("NPM_TOKEN", token, { expiresAt: "2026-12-21T00:00:00Z" });
|
|
|
42
43
|
const soon = expiring(await keys.list(), 14 * 86_400_000);
|
|
43
44
|
```
|
|
44
45
|
|
|
46
|
+
## Owners
|
|
47
|
+
|
|
48
|
+
One role serves every owner. Its policy names the session tag, so a session
|
|
49
|
+
reaches only its owner's path, and a session without the tag reaches nothing:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"Effect": "Allow",
|
|
54
|
+
"Action": ["ssm:GetParameter", "ssm:GetParameters", "ssm:GetParametersByPath", "ssm:PutParameter", "ssm:DeleteParameter"],
|
|
55
|
+
"Resource": [
|
|
56
|
+
"arn:aws:ssm:*:*:parameter/myapp/owners/${aws:PrincipalTag/owner}",
|
|
57
|
+
"arn:aws:ssm:*:*:parameter/myapp/owners/${aws:PrincipalTag/owner}/*"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Its trust policy allows `sts:AssumeRole` and `sts:TagSession`, with the
|
|
63
|
+
`owner` tag required. Add `kms:Decrypt`/`Encrypt` on the SSM key, and
|
|
64
|
+
`ssm:DescribeParameters` on `*` (it cannot be scoped: names show, values
|
|
65
|
+
never). `ownerSsmClient({ roleArn, owner: "acme", region })` then hands
|
|
66
|
+
`ssmEnvStore(ssm, ownerPath("/myapp", "acme") + "/config")` a client that
|
|
67
|
+
cannot read another owner.
|
|
68
|
+
|
|
45
69
|
## Rules it keeps
|
|
46
70
|
|
|
47
71
|
- Values never go into argv, logs or error messages. `list` returns names only.
|
|
48
72
|
- A sealed file opened without its key fails loudly. It never fails as a parse error.
|
|
49
73
|
- A wrong write is undone from history. A push that cannot keep the old state writes nothing.
|
|
50
|
-
- Each app has its own Keychain item, SSM path and env prefix, so two apps never share a secret by accident.
|
|
74
|
+
- Each app has its own Keychain item, SSM path and env prefix, so two apps never share a secret by accident. Each owner of an app has its own path and an AWS session that reaches only it.
|
|
51
75
|
|
|
52
|
-
|
|
76
|
+
PolyForm Strict 1.0.0: read and personal use only; no commercial use, changes or redistribution. See LICENSE.md.
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { aesGcmCipher, type Cipher, isSealed, type KeychainItem, keychainKey, pl
|
|
|
5
5
|
export { CREDENTIAL_ENV_FIELDS, type Credential, type CredentialEnvStore, type CredentialInput, type CredentialStore, credentialEnv, credentialEnvName, credentialSchema, type EnvNaming, envCredentials, fileCredentials, layeredCredentials, memoryCredentials, type PushOptions, pullCredentials, pushCredentials, type SeenVersions, type SharedCredentialStore, type SyncOptions, syncedCredentials, versionsFile, } from "./credentials.js";
|
|
6
6
|
export { ENV_KEY, type EnvEntry, type EnvListing, type EnvStore, envFileStore, expiring, memoryEnvStore, type PutOptions, parseDotenv, ssmEnvStore, syncedEnvStore, toDotenv, toExports, upsertDotenv, } from "./env-store.js";
|
|
7
7
|
export { type CredentialHistory, type CredentialVersion, changedFields, memoryCredentialHistory, ssmCredentialHistory, } from "./history.js";
|
|
8
|
+
export { type AwsCredentials, checkOwner, OWNER_NAME, type OwnerSession, ownerCredentials, ownerPath, ownerSsmClient, } from "./owner.js";
|
|
8
9
|
export { newPassword } from "./passwords.js";
|
|
9
10
|
export { envSecrets, memorySecrets, type SecretSource, type TrackingSecrets, trackingSecrets, } from "./secrets.js";
|
|
10
11
|
export { tailJson, tailLines } from "./tail.js";
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { aesGcmCipher, isSealed, keychainKey, plainCipher, trustKeychainKey, } f
|
|
|
5
5
|
export { CREDENTIAL_ENV_FIELDS, credentialEnv, credentialEnvName, credentialSchema, envCredentials, fileCredentials, layeredCredentials, memoryCredentials, pullCredentials, pushCredentials, syncedCredentials, versionsFile, } from "./credentials.js";
|
|
6
6
|
export { ENV_KEY, envFileStore, expiring, memoryEnvStore, parseDotenv, ssmEnvStore, syncedEnvStore, toDotenv, toExports, upsertDotenv, } from "./env-store.js";
|
|
7
7
|
export { changedFields, memoryCredentialHistory, ssmCredentialHistory, } from "./history.js";
|
|
8
|
+
export { checkOwner, OWNER_NAME, ownerCredentials, ownerPath, ownerSsmClient, } from "./owner.js";
|
|
8
9
|
export { newPassword } from "./passwords.js";
|
|
9
10
|
export { envSecrets, memorySecrets, trackingSecrets, } from "./secrets.js";
|
|
10
11
|
export { tailJson, tailLines } from "./tail.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAoC,MAAM,YAAY,CAAC;AACtF,OAAO,EAEL,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,QAAQ,GACT,MAAM,aAAa,CAAC;AACrB,OAAO,EAGL,WAAW,EACX,OAAO,EAEP,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,YAAY,EAEZ,QAAQ,EAER,WAAW,EACX,WAAW,EACX,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB,EAKrB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAEhB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EAEjB,eAAe,EACf,eAAe,EAIf,iBAAiB,EACjB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,OAAO,EAIP,YAAY,EACZ,QAAQ,EACR,cAAc,EAEd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AM,cAAc,CAAC;AACtB,OAAO,EAEL,UAAU,EACV,UAAU,EAEV,gBAAgB,EAChB,SAAS,EACT,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACL,UAAU,EACV,aAAa,EAGb,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,YAAY,EAIZ,IAAI,EACJ,eAAe,GAChB,MAAM,WAAW,CAAC"}
|
package/dist/owner.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Owners: one app, several tenants. Each owner has its own SSM path
|
|
3
|
+
* (`/myapp/owners/<owner>/…`) and an AWS session that reaches only that
|
|
4
|
+
* path: one shared role, scoped by the session tag `owner`
|
|
5
|
+
* (`${aws:PrincipalTag/owner}` in its policy). A session without the tag
|
|
6
|
+
* reaches nothing. The role's shape is in the README.
|
|
7
|
+
*/
|
|
8
|
+
import { SSMClient } from "@aws-sdk/client-ssm";
|
|
9
|
+
import { STSClient } from "@aws-sdk/client-sts";
|
|
10
|
+
/** An owner's name: lowercase letters, digits and `_`, starting with a letter. Safe in a path, a tag and a session name. */
|
|
11
|
+
export declare const OWNER_NAME: RegExp;
|
|
12
|
+
export declare function checkOwner(owner: string): string;
|
|
13
|
+
/** An owner's path under an app's root: `ownerPath("/myapp", "acme")` = `/myapp/owners/acme`. */
|
|
14
|
+
export declare function ownerPath(root: string, owner: string): string;
|
|
15
|
+
export interface AwsCredentials {
|
|
16
|
+
accessKeyId: string;
|
|
17
|
+
secretAccessKey: string;
|
|
18
|
+
sessionToken?: string;
|
|
19
|
+
expiration?: Date;
|
|
20
|
+
}
|
|
21
|
+
export interface OwnerSession {
|
|
22
|
+
/** The shared owners role. */
|
|
23
|
+
roleArn: string;
|
|
24
|
+
owner: string;
|
|
25
|
+
region: string;
|
|
26
|
+
/** How long a session lasts, in seconds (default 3600). */
|
|
27
|
+
durationSeconds?: number;
|
|
28
|
+
/** Default: an STS client on the process's own credentials. */
|
|
29
|
+
sts?: Pick<STSClient, "send">;
|
|
30
|
+
now?: () => number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The owner's credentials, for any AWS client (`credentials:`): one
|
|
34
|
+
* AssumeRole with the tag `owner=<owner>`, reused until 5 minutes before it
|
|
35
|
+
* ends. Callers at the same moment share one request.
|
|
36
|
+
*/
|
|
37
|
+
export declare function ownerCredentials(o: OwnerSession): () => Promise<AwsCredentials>;
|
|
38
|
+
/** An SSM client that acts as the owner. */
|
|
39
|
+
export declare function ownerSsmClient(o: OwnerSession): SSMClient;
|
package/dist/owner.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Owners: one app, several tenants. Each owner has its own SSM path
|
|
3
|
+
* (`/myapp/owners/<owner>/…`) and an AWS session that reaches only that
|
|
4
|
+
* path: one shared role, scoped by the session tag `owner`
|
|
5
|
+
* (`${aws:PrincipalTag/owner}` in its policy). A session without the tag
|
|
6
|
+
* reaches nothing. The role's shape is in the README.
|
|
7
|
+
*/
|
|
8
|
+
import { SSMClient } from "@aws-sdk/client-ssm";
|
|
9
|
+
import { AssumeRoleCommand, STSClient } from "@aws-sdk/client-sts";
|
|
10
|
+
/** An owner's name: lowercase letters, digits and `_`, starting with a letter. Safe in a path, a tag and a session name. */
|
|
11
|
+
export const OWNER_NAME = /^[a-z][a-z0-9_]{0,39}$/;
|
|
12
|
+
export function checkOwner(owner) {
|
|
13
|
+
if (!OWNER_NAME.test(owner))
|
|
14
|
+
throw new Error(`owner "${owner}": lowercase letters, digits and _, starting with a letter, 40 at most`);
|
|
15
|
+
return owner;
|
|
16
|
+
}
|
|
17
|
+
/** An owner's path under an app's root: `ownerPath("/myapp", "acme")` = `/myapp/owners/acme`. */
|
|
18
|
+
export function ownerPath(root, owner) {
|
|
19
|
+
return `${root.replace(/\/+$/, "")}/owners/${checkOwner(owner)}`;
|
|
20
|
+
}
|
|
21
|
+
/** Renew this long before a session ends, so no call carries a dying token. */
|
|
22
|
+
const RENEW_MS = 5 * 60_000;
|
|
23
|
+
/**
|
|
24
|
+
* The owner's credentials, for any AWS client (`credentials:`): one
|
|
25
|
+
* AssumeRole with the tag `owner=<owner>`, reused until 5 minutes before it
|
|
26
|
+
* ends. Callers at the same moment share one request.
|
|
27
|
+
*/
|
|
28
|
+
export function ownerCredentials(o) {
|
|
29
|
+
const owner = checkOwner(o.owner);
|
|
30
|
+
const sts = o.sts ?? new STSClient({ region: o.region });
|
|
31
|
+
const now = o.now ?? Date.now;
|
|
32
|
+
let current;
|
|
33
|
+
let pending;
|
|
34
|
+
const fresh = (c) => c.expiration === undefined || c.expiration.getTime() - now() > RENEW_MS;
|
|
35
|
+
return () => {
|
|
36
|
+
if (current && fresh(current))
|
|
37
|
+
return Promise.resolve(current);
|
|
38
|
+
pending ??= sts
|
|
39
|
+
.send(new AssumeRoleCommand({
|
|
40
|
+
RoleArn: o.roleArn,
|
|
41
|
+
RoleSessionName: `owner-${owner}`,
|
|
42
|
+
DurationSeconds: o.durationSeconds ?? 3600,
|
|
43
|
+
Tags: [{ Key: "owner", Value: owner }],
|
|
44
|
+
}))
|
|
45
|
+
.then((out) => {
|
|
46
|
+
const c = out.Credentials;
|
|
47
|
+
if (!c?.AccessKeyId || !c.SecretAccessKey)
|
|
48
|
+
throw new Error(`owner ${owner}: STS answered without credentials`);
|
|
49
|
+
current = {
|
|
50
|
+
accessKeyId: c.AccessKeyId,
|
|
51
|
+
secretAccessKey: c.SecretAccessKey,
|
|
52
|
+
...(c.SessionToken ? { sessionToken: c.SessionToken } : {}),
|
|
53
|
+
...(c.Expiration ? { expiration: c.Expiration } : {}),
|
|
54
|
+
};
|
|
55
|
+
return current;
|
|
56
|
+
})
|
|
57
|
+
.finally(() => {
|
|
58
|
+
pending = undefined;
|
|
59
|
+
});
|
|
60
|
+
return pending;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/** An SSM client that acts as the owner. */
|
|
64
|
+
export function ownerSsmClient(o) {
|
|
65
|
+
return new SSMClient({ region: o.region, credentials: ownerCredentials(o) });
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=owner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owner.js","sourceRoot":"","sources":["../src/owner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEnE,4HAA4H;AAC5H,MAAM,CAAC,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAEnD,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,UAAU,KAAK,wEAAwE,CACxF,CAAC;IACJ,OAAO,KAAK,CAAC;AACf,CAAC;AAED,iGAAiG;AACjG,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;AACnE,CAAC;AAqBD,+EAA+E;AAC/E,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC;AAE5B;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,CAAe;IAC9C,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,IAAI,IAAI,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACzD,MAAM,GAAG,GAAG,CAAC,CAAC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C;aACtD,CAAC;YACF,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC;aACD,OAAO,CAAC,GAAG,EAAE;YACZ,OAAO,GAAG,SAAS,CAAC;QACtB,CAAC,CAAC,CAAC;QACL,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;AACJ,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,cAAc,CAAC,CAAe;IAC5C,OAAO,IAAI,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAC/E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "credvault",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
|
+
"license": "PolyForm-Strict-1.0.0",
|
|
4
5
|
"packageManager": "pnpm@9.15.0",
|
|
5
6
|
"description": "Keep the credentials an automation signs in with: sealed at rest, shared through SSM, every use audited, expiries watched.",
|
|
6
7
|
"type": "module",
|
|
7
|
-
"license": "MIT",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"exports": {
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|
|
18
|
-
"README.md"
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE.md"
|
|
19
20
|
],
|
|
20
21
|
"engines": {
|
|
21
22
|
"node": ">=22"
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
33
|
"@aws-sdk/client-ssm": "3.1136.0",
|
|
34
|
+
"@aws-sdk/client-sts": "3.1136.0",
|
|
33
35
|
"zod": "4.6.5"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Wren Automation
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|