safeword 0.6.3 → 0.6.5
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/{check-PECCGHEA.js → check-OYYSYHFP.js} +41 -23
- package/dist/check-OYYSYHFP.js.map +1 -0
- package/dist/chunk-LNSEDZIW.js +454 -0
- package/dist/chunk-LNSEDZIW.js.map +1 -0
- package/dist/chunk-ZS3Z3Q37.js +729 -0
- package/dist/chunk-ZS3Z3Q37.js.map +1 -0
- package/dist/cli.js +7 -7
- package/dist/cli.js.map +1 -1
- package/dist/diff-325TIZ63.js +168 -0
- package/dist/diff-325TIZ63.js.map +1 -0
- package/dist/reset-ZGJIKMUW.js +74 -0
- package/dist/reset-ZGJIKMUW.js.map +1 -0
- package/dist/setup-GAMXTFM2.js +103 -0
- package/dist/setup-GAMXTFM2.js.map +1 -0
- package/dist/{sync-4XBMKLXS.js → sync-BFMXZEHM.js} +33 -32
- package/dist/sync-BFMXZEHM.js.map +1 -0
- package/dist/upgrade-X4GREJXN.js +73 -0
- package/dist/upgrade-X4GREJXN.js.map +1 -0
- package/package.json +15 -14
- package/templates/SAFEWORD.md +101 -689
- package/templates/guides/architecture-guide.md +1 -1
- package/templates/guides/cli-reference.md +35 -0
- package/templates/guides/code-philosophy.md +22 -19
- package/templates/guides/context-files-guide.md +2 -2
- package/templates/guides/data-architecture-guide.md +1 -1
- package/templates/guides/design-doc-guide.md +1 -1
- package/templates/guides/{testing-methodology.md → development-workflow.md} +1 -1
- package/templates/guides/learning-extraction.md +1 -1
- package/templates/guides/{llm-instruction-design.md → llm-guide.md} +93 -29
- package/templates/guides/tdd-best-practices.md +2 -2
- package/templates/guides/test-definitions-guide.md +1 -1
- package/templates/guides/user-story-guide.md +1 -1
- package/templates/guides/zombie-process-cleanup.md +1 -1
- package/dist/check-PECCGHEA.js.map +0 -1
- package/dist/chunk-6CVTH67L.js +0 -43
- package/dist/chunk-6CVTH67L.js.map +0 -1
- package/dist/chunk-75FKNZUM.js +0 -15
- package/dist/chunk-75FKNZUM.js.map +0 -1
- package/dist/chunk-ARIAOK2F.js +0 -110
- package/dist/chunk-ARIAOK2F.js.map +0 -1
- package/dist/chunk-FRPJITGG.js +0 -35
- package/dist/chunk-FRPJITGG.js.map +0 -1
- package/dist/chunk-IWWBZVHT.js +0 -274
- package/dist/chunk-IWWBZVHT.js.map +0 -1
- package/dist/diff-ZACVJKOU.js +0 -171
- package/dist/diff-ZACVJKOU.js.map +0 -1
- package/dist/reset-5SRM3P6J.js +0 -145
- package/dist/reset-5SRM3P6J.js.map +0 -1
- package/dist/setup-65EVU5OT.js +0 -437
- package/dist/setup-65EVU5OT.js.map +0 -1
- package/dist/sync-4XBMKLXS.js.map +0 -1
- package/dist/upgrade-P3WX3ODU.js +0 -153
- package/dist/upgrade-P3WX3ODU.js.map +0 -1
- package/templates/guides/llm-prompting.md +0 -102
- /package/templates/prompts/{review.md → quality-review.md} +0 -0
|
@@ -1,49 +1,50 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
2
|
+
SAFEWORD_SCHEMA,
|
|
3
|
+
detectProjectType,
|
|
5
4
|
exists,
|
|
6
5
|
readJson
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZS3Z3Q37.js";
|
|
7
|
+
import "./chunk-ORQHKDT2.js";
|
|
8
8
|
|
|
9
9
|
// src/commands/sync.ts
|
|
10
10
|
import { join } from "path";
|
|
11
11
|
import { execSync } from "child_process";
|
|
12
|
+
var BASE_ESLINT_PACKAGES = [
|
|
13
|
+
"eslint",
|
|
14
|
+
"@eslint/js",
|
|
15
|
+
"eslint-plugin-import-x",
|
|
16
|
+
"eslint-plugin-sonarjs",
|
|
17
|
+
"@microsoft/eslint-plugin-sdl",
|
|
18
|
+
"eslint-config-prettier",
|
|
19
|
+
"eslint-plugin-boundaries",
|
|
20
|
+
"eslint-plugin-playwright"
|
|
21
|
+
];
|
|
12
22
|
function getRequiredPlugins(projectType) {
|
|
13
|
-
const plugins = [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"eslint-plugin-import-x",
|
|
18
|
-
"eslint-plugin-sonarjs",
|
|
19
|
-
"@microsoft/eslint-plugin-sdl",
|
|
20
|
-
"eslint-config-prettier",
|
|
21
|
-
"eslint-plugin-boundaries",
|
|
22
|
-
"eslint-plugin-playwright"
|
|
23
|
-
];
|
|
24
|
-
if (projectType.typescript) {
|
|
25
|
-
plugins.push("typescript-eslint");
|
|
23
|
+
const plugins = [...BASE_ESLINT_PACKAGES];
|
|
24
|
+
const { conditional } = SAFEWORD_SCHEMA.packages;
|
|
25
|
+
if (projectType.typescript && conditional.typescript) {
|
|
26
|
+
plugins.push(...conditional.typescript);
|
|
26
27
|
}
|
|
27
|
-
if (projectType.react || projectType.nextjs) {
|
|
28
|
-
plugins.push(
|
|
28
|
+
if ((projectType.react || projectType.nextjs) && conditional.react) {
|
|
29
|
+
plugins.push(...conditional.react);
|
|
29
30
|
}
|
|
30
|
-
if (projectType.nextjs) {
|
|
31
|
-
plugins.push(
|
|
31
|
+
if (projectType.nextjs && conditional.nextjs) {
|
|
32
|
+
plugins.push(...conditional.nextjs);
|
|
32
33
|
}
|
|
33
|
-
if (projectType.astro) {
|
|
34
|
-
plugins.push(
|
|
34
|
+
if (projectType.astro && conditional.astro) {
|
|
35
|
+
plugins.push(...conditional.astro);
|
|
35
36
|
}
|
|
36
|
-
if (projectType.vue) {
|
|
37
|
-
plugins.push(
|
|
37
|
+
if (projectType.vue && conditional.vue) {
|
|
38
|
+
plugins.push(...conditional.vue);
|
|
38
39
|
}
|
|
39
|
-
if (projectType.svelte) {
|
|
40
|
-
plugins.push(
|
|
40
|
+
if (projectType.svelte && conditional.svelte) {
|
|
41
|
+
plugins.push(...conditional.svelte);
|
|
41
42
|
}
|
|
42
|
-
if (projectType.electron) {
|
|
43
|
-
plugins.push(
|
|
43
|
+
if (projectType.electron && conditional.electron) {
|
|
44
|
+
plugins.push(...conditional.electron);
|
|
44
45
|
}
|
|
45
|
-
if (projectType.vitest) {
|
|
46
|
-
plugins.push(
|
|
46
|
+
if (projectType.vitest && conditional.vitest) {
|
|
47
|
+
plugins.push(...conditional.vitest);
|
|
47
48
|
}
|
|
48
49
|
return plugins;
|
|
49
50
|
}
|
|
@@ -113,4 +114,4 @@ Run manually when online:`);
|
|
|
113
114
|
export {
|
|
114
115
|
sync
|
|
115
116
|
};
|
|
116
|
-
//# sourceMappingURL=sync-
|
|
117
|
+
//# sourceMappingURL=sync-BFMXZEHM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/sync.ts"],"sourcesContent":["/**\n * Sync command - Keep linting plugins in sync with project dependencies\n *\n * Detects frameworks in package.json and ensures the corresponding ESLint plugins\n * are installed. Designed to be called from Husky pre-commit hook.\n *\n * Behavior:\n * - Fast exit when nothing needs to change\n * - Installs missing plugins\n * - Optionally stages modified files (--stage flag for pre-commit)\n * - Clear error message if installation fails\n */\n\nimport { join } from 'node:path';\nimport { execSync } from 'node:child_process';\nimport { exists, readJson } from '../utils/fs.js';\nimport {\n detectProjectType,\n type PackageJson,\n type ProjectType,\n} from '../utils/project-detector.js';\nimport { SAFEWORD_SCHEMA } from '../schema.js';\n\nexport interface SyncOptions {\n quiet?: boolean;\n stage?: boolean;\n}\n\n/**\n * Base ESLint packages always required for linting.\n * Explicit list for clarity - sync only cares about ESLint plugins.\n *\n * NOTE: This is a subset of SAFEWORD_SCHEMA.packages.base (which includes\n * prettier, markdownlint-cli2, husky, lint-staged, knip). When adding new\n * ESLint packages to schema.ts, also add them here if they should be\n * auto-installed on pre-commit.\n */\nconst BASE_ESLINT_PACKAGES = [\n 'eslint',\n '@eslint/js',\n 'eslint-plugin-import-x',\n 'eslint-plugin-sonarjs',\n '@microsoft/eslint-plugin-sdl',\n 'eslint-config-prettier',\n 'eslint-plugin-boundaries',\n 'eslint-plugin-playwright',\n];\n\n/**\n * Get required ESLint packages based on project type.\n * Uses explicit base list + SAFEWORD_SCHEMA.packages.conditional for frameworks.\n */\nfunction getRequiredPlugins(projectType: ProjectType): string[] {\n const plugins: string[] = [...BASE_ESLINT_PACKAGES];\n\n // Add conditional packages from schema based on detected project type\n const { conditional } = SAFEWORD_SCHEMA.packages;\n\n if (projectType.typescript && conditional.typescript) {\n plugins.push(...conditional.typescript);\n }\n if ((projectType.react || projectType.nextjs) && conditional.react) {\n plugins.push(...conditional.react);\n }\n if (projectType.nextjs && conditional.nextjs) {\n plugins.push(...conditional.nextjs);\n }\n if (projectType.astro && conditional.astro) {\n plugins.push(...conditional.astro);\n }\n if (projectType.vue && conditional.vue) {\n plugins.push(...conditional.vue);\n }\n if (projectType.svelte && conditional.svelte) {\n plugins.push(...conditional.svelte);\n }\n if (projectType.electron && conditional.electron) {\n plugins.push(...conditional.electron);\n }\n if (projectType.vitest && conditional.vitest) {\n plugins.push(...conditional.vitest);\n }\n\n return plugins;\n}\n\n/**\n * Check which packages are missing from devDependencies\n */\nfunction getMissingPackages(required: string[], installed: Record<string, string>): string[] {\n return required.filter(pkg => !(pkg in installed));\n}\n\n/**\n * Sync linting configuration with current project dependencies\n */\nexport async function sync(options: SyncOptions = {}): Promise<void> {\n const cwd = process.cwd();\n const safewordDir = join(cwd, '.safeword');\n const packageJsonPath = join(cwd, 'package.json');\n\n // Must be in a safeword project\n if (!exists(safewordDir)) {\n if (!options.quiet) {\n console.error('Not a safeword project. Run `safeword setup` first.');\n }\n process.exit(1);\n }\n\n if (!exists(packageJsonPath)) {\n if (!options.quiet) {\n console.error('No package.json found.');\n }\n process.exit(1);\n }\n\n const packageJson = readJson<PackageJson>(packageJsonPath);\n if (!packageJson) {\n process.exit(1);\n }\n\n // Detect current project type\n const projectType = detectProjectType(packageJson);\n const devDeps = packageJson.devDependencies || {};\n\n // Check for missing plugins\n const requiredPlugins = getRequiredPlugins(projectType);\n const missingPlugins = getMissingPackages(requiredPlugins, devDeps);\n\n // Fast exit if nothing to install\n if (missingPlugins.length === 0) {\n return;\n }\n\n // Install missing plugins\n if (!options.quiet) {\n console.log(`Installing missing ESLint plugins: ${missingPlugins.join(', ')}`);\n }\n\n try {\n execSync(`npm install -D ${missingPlugins.join(' ')}`, {\n cwd,\n stdio: options.quiet ? 'pipe' : 'inherit',\n });\n } catch (error) {\n // Clear error message for network/install failures\n const pluginList = missingPlugins.join(' ');\n console.error(`\\n✗ Failed to install ESLint plugins\\n`);\n console.error(`Your project needs: ${pluginList}`);\n console.error(`\\nRun manually when online:`);\n console.error(` npm install -D ${pluginList}\\n`);\n process.exit(1);\n }\n\n // Stage modified files if --stage flag is set (for pre-commit hook)\n if (options.stage) {\n try {\n execSync('git add package.json package-lock.json', {\n cwd,\n stdio: 'pipe',\n });\n } catch {\n // Not in a git repo or git add failed - ignore\n }\n }\n\n if (!options.quiet) {\n console.log(`✓ Installed ${missingPlugins.length} ESLint plugin(s)`);\n }\n}\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
compareVersions
|
|
3
|
+
} from "./chunk-W66Z3C5H.js";
|
|
4
|
+
import {
|
|
5
|
+
createProjectContext,
|
|
6
|
+
error,
|
|
7
|
+
header,
|
|
8
|
+
info,
|
|
9
|
+
listItem,
|
|
10
|
+
reconcile,
|
|
11
|
+
success
|
|
12
|
+
} from "./chunk-LNSEDZIW.js";
|
|
13
|
+
import {
|
|
14
|
+
SAFEWORD_SCHEMA,
|
|
15
|
+
exists,
|
|
16
|
+
readFileSafe
|
|
17
|
+
} from "./chunk-ZS3Z3Q37.js";
|
|
18
|
+
import {
|
|
19
|
+
VERSION
|
|
20
|
+
} from "./chunk-ORQHKDT2.js";
|
|
21
|
+
|
|
22
|
+
// src/commands/upgrade.ts
|
|
23
|
+
import { join } from "path";
|
|
24
|
+
async function upgrade() {
|
|
25
|
+
const cwd = process.cwd();
|
|
26
|
+
const safewordDir = join(cwd, ".safeword");
|
|
27
|
+
if (!exists(safewordDir)) {
|
|
28
|
+
error("Not configured. Run `safeword setup` first.");
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
const versionPath = join(safewordDir, "version");
|
|
32
|
+
const projectVersion = readFileSafe(versionPath)?.trim() ?? "0.0.0";
|
|
33
|
+
if (compareVersions(VERSION, projectVersion) < 0) {
|
|
34
|
+
error(`CLI v${VERSION} is older than project v${projectVersion}.`);
|
|
35
|
+
error("Update the CLI first: npm install -g safeword");
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
header("Safeword Upgrade");
|
|
39
|
+
info(`Upgrading from v${projectVersion} to v${VERSION}`);
|
|
40
|
+
try {
|
|
41
|
+
const ctx = createProjectContext(cwd);
|
|
42
|
+
const result = await reconcile(SAFEWORD_SCHEMA, "upgrade", ctx);
|
|
43
|
+
header("Upgrade Complete");
|
|
44
|
+
info(`
|
|
45
|
+
Version: v${projectVersion} \u2192 v${VERSION}`);
|
|
46
|
+
if (result.created.length > 0) {
|
|
47
|
+
info("\nCreated:");
|
|
48
|
+
for (const file of result.created) {
|
|
49
|
+
listItem(file);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (result.updated.length > 0) {
|
|
53
|
+
info("\nUpdated:");
|
|
54
|
+
for (const file of result.updated) {
|
|
55
|
+
listItem(file);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (result.packagesToInstall.length > 0) {
|
|
59
|
+
info(`
|
|
60
|
+
Packages to install: ${result.packagesToInstall.length}`);
|
|
61
|
+
info("Run `safeword sync` to install missing packages");
|
|
62
|
+
}
|
|
63
|
+
success(`
|
|
64
|
+
Safeword upgraded to v${VERSION}`);
|
|
65
|
+
} catch (err) {
|
|
66
|
+
error(`Upgrade failed: ${err instanceof Error ? err.message : "Unknown error"}`);
|
|
67
|
+
process.exit(1);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
upgrade
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=upgrade-X4GREJXN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/upgrade.ts"],"sourcesContent":["/**\n * Upgrade command - Update safeword configuration to latest version\n *\n * Uses reconcile() with mode='upgrade' to update all managed files.\n */\n\nimport { join } from 'node:path';\nimport { VERSION } from '../version.js';\nimport { exists, readFileSafe } from '../utils/fs.js';\nimport { info, success, error, header, listItem } from '../utils/output.js';\nimport { compareVersions } from '../utils/version.js';\nimport { createProjectContext } from '../utils/context.js';\nimport { reconcile } from '../reconcile.js';\nimport { SAFEWORD_SCHEMA } from '../schema.js';\n\nexport async function upgrade(): Promise<void> {\n const cwd = process.cwd();\n const safewordDir = join(cwd, '.safeword');\n\n // Check if configured\n if (!exists(safewordDir)) {\n error('Not configured. Run `safeword setup` first.');\n process.exit(1);\n }\n\n // Read project version\n const versionPath = join(safewordDir, 'version');\n const projectVersion = readFileSafe(versionPath)?.trim() ?? '0.0.0';\n\n // Check for downgrade\n if (compareVersions(VERSION, projectVersion) < 0) {\n error(`CLI v${VERSION} is older than project v${projectVersion}.`);\n error('Update the CLI first: npm install -g safeword');\n process.exit(1);\n }\n\n header('Safeword Upgrade');\n info(`Upgrading from v${projectVersion} to v${VERSION}`);\n\n try {\n // Use reconcile with mode='upgrade' to update all managed files\n const ctx = createProjectContext(cwd);\n const result = await reconcile(SAFEWORD_SCHEMA, 'upgrade', ctx);\n\n // Print summary\n header('Upgrade Complete');\n\n info(`\\nVersion: v${projectVersion} → v${VERSION}`);\n\n if (result.created.length > 0) {\n info('\\nCreated:');\n for (const file of result.created) {\n listItem(file);\n }\n }\n\n if (result.updated.length > 0) {\n info('\\nUpdated:');\n for (const file of result.updated) {\n listItem(file);\n }\n }\n\n // Report packages that need installation\n if (result.packagesToInstall.length > 0) {\n info(`\\nPackages to install: ${result.packagesToInstall.length}`);\n info('Run `safeword sync` to install missing packages');\n }\n\n success(`\\nSafeword upgraded to v${VERSION}`);\n } catch (err) {\n error(`Upgrade failed: ${err instanceof Error ? err.message : 'Unknown error'}`);\n process.exit(1);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,SAAS,YAAY;AASrB,eAAsB,UAAyB;AAC7C,QAAM,MAAM,QAAQ,IAAI;AACxB,QAAM,cAAc,KAAK,KAAK,WAAW;AAGzC,MAAI,CAAC,OAAO,WAAW,GAAG;AACxB,UAAM,6CAA6C;AACnD,YAAQ,KAAK,CAAC;AAAA,EAChB;AAGA,QAAM,cAAc,KAAK,aAAa,SAAS;AAC/C,QAAM,iBAAiB,aAAa,WAAW,GAAG,KAAK,KAAK;AAG5D,MAAI,gBAAgB,SAAS,cAAc,IAAI,GAAG;AAChD,UAAM,QAAQ,OAAO,2BAA2B,cAAc,GAAG;AACjE,UAAM,+CAA+C;AACrD,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,SAAO,kBAAkB;AACzB,OAAK,mBAAmB,cAAc,QAAQ,OAAO,EAAE;AAEvD,MAAI;AAEF,UAAM,MAAM,qBAAqB,GAAG;AACpC,UAAM,SAAS,MAAM,UAAU,iBAAiB,WAAW,GAAG;AAG9D,WAAO,kBAAkB;AAEzB,SAAK;AAAA,YAAe,cAAc,YAAO,OAAO,EAAE;AAElD,QAAI,OAAO,QAAQ,SAAS,GAAG;AAC7B,WAAK,YAAY;AACjB,iBAAW,QAAQ,OAAO,SAAS;AACjC,iBAAS,IAAI;AAAA,MACf;AAAA,IACF;AAEA,QAAI,OAAO,QAAQ,SAAS,GAAG;AAC7B,WAAK,YAAY;AACjB,iBAAW,QAAQ,OAAO,SAAS;AACjC,iBAAS,IAAI;AAAA,MACf;AAAA,IACF;AAGA,QAAI,OAAO,kBAAkB,SAAS,GAAG;AACvC,WAAK;AAAA,uBAA0B,OAAO,kBAAkB,MAAM,EAAE;AAChE,WAAK,iDAAiD;AAAA,IACxD;AAEA,YAAQ;AAAA,wBAA2B,OAAO,EAAE;AAAA,EAC9C,SAAS,KAAK;AACZ,UAAM,mBAAmB,eAAe,QAAQ,IAAI,UAAU,eAAe,EAAE;AAC/E,YAAQ,KAAK,CAAC;AAAA,EAChB;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "safeword",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "CLI for setting up and managing safeword development environments",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,6 +19,18 @@
|
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=18"
|
|
21
21
|
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsup",
|
|
24
|
+
"dev": "tsup --watch",
|
|
25
|
+
"test": "vitest run",
|
|
26
|
+
"test:e2e": "vitest run tests/e2e/",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
|
+
"test:coverage": "vitest run --coverage",
|
|
29
|
+
"typecheck": "tsc --noEmit",
|
|
30
|
+
"lint": "eslint src tests",
|
|
31
|
+
"clean": "rm -rf dist",
|
|
32
|
+
"prepublishOnly": "npm audit --audit-level=high && npm run build && npm test"
|
|
33
|
+
},
|
|
22
34
|
"dependencies": {
|
|
23
35
|
"commander": "^12.1.0"
|
|
24
36
|
},
|
|
@@ -36,16 +48,5 @@
|
|
|
36
48
|
"claude-code"
|
|
37
49
|
],
|
|
38
50
|
"author": "",
|
|
39
|
-
"license": "MIT"
|
|
40
|
-
|
|
41
|
-
"build": "tsup",
|
|
42
|
-
"dev": "tsup --watch",
|
|
43
|
-
"test": "vitest run",
|
|
44
|
-
"test:e2e": "vitest run tests/e2e/",
|
|
45
|
-
"test:watch": "vitest",
|
|
46
|
-
"test:coverage": "vitest run --coverage",
|
|
47
|
-
"typecheck": "tsc --noEmit",
|
|
48
|
-
"lint": "eslint src tests",
|
|
49
|
-
"clean": "rm -rf dist"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
51
|
+
"license": "MIT"
|
|
52
|
+
}
|