@codyswann/lisa 2.132.7 → 2.133.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/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +10 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/setup-project.d.ts +26 -0
- package/dist/cli/setup-project.d.ts.map +1 -0
- package/dist/cli/setup-project.js +138 -0
- package/dist/cli/setup-project.js.map +1 -0
- package/dist/cli/starters.d.ts +27 -0
- package/dist/cli/starters.d.ts.map +1 -0
- package/dist/cli/starters.js +43 -0
- package/dist/cli/starters.js.map +1 -0
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { runApply } from "./apply.js";
|
|
3
3
|
import { printUpdateWarning } from "./print-update-warning.js";
|
|
4
|
+
import { runSetupProject } from "./setup-project.js";
|
|
4
5
|
import { runUpdateCheck } from "./update-check.js";
|
|
5
6
|
/**
|
|
6
7
|
* Injectable collaborators for {@link createProgram}. Defaults wire the real
|
|
@@ -10,6 +11,8 @@ import { runUpdateCheck } from "./update-check.js";
|
|
|
10
11
|
export interface ProgramDependencies {
|
|
11
12
|
/** Applies Lisa to a destination (defaults to the real {@link runApply}). */
|
|
12
13
|
runApply: typeof runApply;
|
|
14
|
+
/** Creates a starter-backed project and applies Lisa overlays. */
|
|
15
|
+
runSetupProject: typeof runSetupProject;
|
|
13
16
|
/** Runs the non-fatal npm update check (defaults to {@link runUpdateCheck}). */
|
|
14
17
|
runUpdateCheck: typeof runUpdateCheck;
|
|
15
18
|
/** Prints the update warning (defaults to {@link printUpdateWarning}). */
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,QAAQ,EAAE,OAAO,QAAQ,CAAC;IAC1B,kEAAkE;IAClE,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,gFAAgF;IAChF,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,0EAA0E;IAC1E,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;CAC/C;AASD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,YAAY,GAAE,OAAO,CAAC,mBAAmB,CAAM,GAC9C,OAAO,CA0DT;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { runApply } from "./apply.js";
|
|
3
3
|
import { printUpdateWarning } from "./print-update-warning.js";
|
|
4
|
+
import { runSetupProject } from "./setup-project.js";
|
|
4
5
|
import { addSharedOptions } from "./shared-options.js";
|
|
6
|
+
import { SETUP_TYPES } from "./starters.js";
|
|
5
7
|
import { runUpdateCheck } from "./update-check.js";
|
|
6
8
|
import { getPackageVersion } from "./version.js";
|
|
7
9
|
const DEFAULT_DEPENDENCIES = {
|
|
8
10
|
runApply,
|
|
11
|
+
runSetupProject,
|
|
9
12
|
runUpdateCheck,
|
|
10
13
|
printUpdateWarning,
|
|
11
14
|
};
|
|
@@ -51,6 +54,13 @@ export function createProgram(dependencies = {}) {
|
|
|
51
54
|
.argument("[destination]", "Path to the project directory")).action(async (destination, options) => {
|
|
52
55
|
await deps.runApply(destination, options);
|
|
53
56
|
});
|
|
57
|
+
addSharedOptions(program
|
|
58
|
+
.command("setup-project")
|
|
59
|
+
.description("Create a new Lisa-managed project from a starter repo")
|
|
60
|
+
.requiredOption("--type <type>", `Project type: ${SETUP_TYPES.join(" | ")}`)
|
|
61
|
+
.argument("[destination]", "Project name or path (default: ./<type>-app)")).action(async (destination, options) => {
|
|
62
|
+
await deps.runSetupProject(destination, options);
|
|
63
|
+
});
|
|
54
64
|
return program;
|
|
55
65
|
}
|
|
56
66
|
export { createPrompter } from "./prompts.js";
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAkBjD,MAAM,oBAAoB,GAAwB;IAChD,QAAQ;IACR,eAAe;IACf,cAAc;IACd,kBAAkB;CACnB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAC3B,eAA6C,EAAE;IAE/C,MAAM,IAAI,GAAwB;QAChC,GAAG,oBAAoB;QACvB,GAAG,YAAY;KAChB,CAAC;IACF,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9B,OAAO;SACJ,IAAI,CAAC,MAAM,CAAC;SACZ,WAAW,CACV,0FA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AACjB,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type CLIOptions } from "./shared-options.js";
|
|
2
|
+
/**
|
|
3
|
+
* Parsed options for the setup-project command.
|
|
4
|
+
*/
|
|
5
|
+
export interface SetupProjectOptions extends CLIOptions {
|
|
6
|
+
type?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Injectable collaborators for setup-project.
|
|
10
|
+
*/
|
|
11
|
+
export interface SetupProjectDependencies {
|
|
12
|
+
runApply: (destination: string | undefined, options: CLIOptions) => Promise<void>;
|
|
13
|
+
runCommand: (command: string, args: readonly string[], options?: {
|
|
14
|
+
cwd?: string;
|
|
15
|
+
}) => Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare const DEFAULT_SETUP_PROJECT_DEPENDENCIES: SetupProjectDependencies;
|
|
18
|
+
/**
|
|
19
|
+
* Create a Lisa-managed project from a starter and then apply overlays.
|
|
20
|
+
* @param destination - Optional project name or path
|
|
21
|
+
* @param options - Parsed setup-project options
|
|
22
|
+
* @param dependencies - Injectable collaborators
|
|
23
|
+
* @returns Promise that resolves after setup and apply complete
|
|
24
|
+
*/
|
|
25
|
+
export declare function runSetupProject(destination: string | undefined, options: SetupProjectOptions, dependencies?: SetupProjectDependencies): Promise<void>;
|
|
26
|
+
//# sourceMappingURL=setup-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-project.d.ts","sourceRoot":"","sources":["../../src/cli/setup-project.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,CACR,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,OAAO,EAAE,UAAU,KAChB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,UAAU,EAAE,CACV,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,KACvB,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAmBD,eAAO,MAAM,kCAAkC,EAAE,wBAKhD,CAAC;AA6GF;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,OAAO,EAAE,mBAAmB,EAC5B,YAAY,GAAE,wBAA6D,GAC1E,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { readdir, rm } from "node:fs/promises";
|
|
4
|
+
import * as path from "node:path";
|
|
5
|
+
import { isSetupType, resolveStarter, SETUP_TYPES } from "./starters.js";
|
|
6
|
+
/**
|
|
7
|
+
* Remove setup-project-only fields from the options forwarded to apply.
|
|
8
|
+
* @param options - Parsed setup-project options
|
|
9
|
+
* @returns Shared apply options without undefined optional properties
|
|
10
|
+
*/
|
|
11
|
+
function toCliOptions(options) {
|
|
12
|
+
return {
|
|
13
|
+
...(options.dryRun !== undefined ? { dryRun: options.dryRun } : {}),
|
|
14
|
+
...(options.yes !== undefined ? { yes: options.yes } : {}),
|
|
15
|
+
...(options.validate !== undefined ? { validate: options.validate } : {}),
|
|
16
|
+
...(options.skipGitCheck !== undefined
|
|
17
|
+
? { skipGitCheck: options.skipGitCheck }
|
|
18
|
+
: {}),
|
|
19
|
+
...(options.harness !== undefined ? { harness: options.harness } : {}),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export const DEFAULT_SETUP_PROJECT_DEPENDENCIES = {
|
|
23
|
+
runApply: async () => {
|
|
24
|
+
throw new Error("runApply dependency was not configured");
|
|
25
|
+
},
|
|
26
|
+
runCommand,
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Run a command as a child process and reject on non-zero exit.
|
|
30
|
+
* @param command - Executable name
|
|
31
|
+
* @param args - Command arguments
|
|
32
|
+
* @param options - Spawn options
|
|
33
|
+
* @param options.cwd - Optional working directory for the command
|
|
34
|
+
* @returns Promise that resolves when the command exits successfully
|
|
35
|
+
*/
|
|
36
|
+
async function runCommand(command, args, options = {}) {
|
|
37
|
+
await new Promise((resolve, reject) => {
|
|
38
|
+
const child = spawn(command, args, {
|
|
39
|
+
cwd: options.cwd,
|
|
40
|
+
stdio: "inherit",
|
|
41
|
+
});
|
|
42
|
+
child.once("error", reject);
|
|
43
|
+
child.once("exit", code => {
|
|
44
|
+
if (code === 0) {
|
|
45
|
+
resolve();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
reject(new Error(`${command} ${args.join(" ")} exited ${code ?? 1}`));
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Check whether a destination exists and contains files.
|
|
54
|
+
* @param destination - Project destination path
|
|
55
|
+
* @returns True when the destination directory is non-empty
|
|
56
|
+
*/
|
|
57
|
+
async function directoryIsNonEmpty(destination) {
|
|
58
|
+
if (!existsSync(destination)) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
return (await readdir(destination)).length > 0;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Detect whether the GitHub CLI is authenticated.
|
|
65
|
+
* @param deps - Injectable setup-project dependencies
|
|
66
|
+
* @returns True when `gh auth status` succeeds
|
|
67
|
+
*/
|
|
68
|
+
async function ghIsAuthenticated(deps) {
|
|
69
|
+
try {
|
|
70
|
+
await deps.runCommand("gh", ["auth", "status"]);
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Clone or create the starter project for a setup type.
|
|
79
|
+
* @param type - Lisa setup type
|
|
80
|
+
* @param destination - Project destination path
|
|
81
|
+
* @param deps - Injectable setup-project dependencies
|
|
82
|
+
* @returns Promise that resolves after the starter is available locally
|
|
83
|
+
*/
|
|
84
|
+
async function cloneStarter(type, destination, deps) {
|
|
85
|
+
if (!isSetupType(type)) {
|
|
86
|
+
throw new Error(`Unknown setup type ${JSON.stringify(type)}. Valid types: ${SETUP_TYPES.join(", ")}`);
|
|
87
|
+
}
|
|
88
|
+
const starter = resolveStarter(type);
|
|
89
|
+
const parentDir = path.dirname(destination);
|
|
90
|
+
const projectName = path.basename(destination);
|
|
91
|
+
const starterRef = `${starter.owner}/${starter.repo}`;
|
|
92
|
+
if (await ghIsAuthenticated(deps)) {
|
|
93
|
+
await deps.runCommand("gh", [
|
|
94
|
+
"repo",
|
|
95
|
+
"create",
|
|
96
|
+
projectName,
|
|
97
|
+
"--template",
|
|
98
|
+
starterRef,
|
|
99
|
+
"--public",
|
|
100
|
+
"--clone",
|
|
101
|
+
], { cwd: parentDir });
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
await deps.runCommand("git", [
|
|
105
|
+
"clone",
|
|
106
|
+
"--depth=1",
|
|
107
|
+
`https://github.com/${starterRef}.git`,
|
|
108
|
+
destination,
|
|
109
|
+
]);
|
|
110
|
+
await rm(path.join(destination, ".git"), { recursive: true, force: true });
|
|
111
|
+
await deps.runCommand("git", ["init", "-b", "main"], { cwd: destination });
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Create a Lisa-managed project from a starter and then apply overlays.
|
|
115
|
+
* @param destination - Optional project name or path
|
|
116
|
+
* @param options - Parsed setup-project options
|
|
117
|
+
* @param dependencies - Injectable collaborators
|
|
118
|
+
* @returns Promise that resolves after setup and apply complete
|
|
119
|
+
*/
|
|
120
|
+
export async function runSetupProject(destination, options, dependencies = DEFAULT_SETUP_PROJECT_DEPENDENCIES) {
|
|
121
|
+
if (!options.type) {
|
|
122
|
+
throw new Error(`Missing required --type. Valid types: ${SETUP_TYPES.join(", ")}`);
|
|
123
|
+
}
|
|
124
|
+
if (!isSetupType(options.type)) {
|
|
125
|
+
throw new Error(`Unknown setup type ${JSON.stringify(options.type)}. Valid types: ${SETUP_TYPES.join(", ")}`);
|
|
126
|
+
}
|
|
127
|
+
const resolvedDestination = path.resolve(destination ?? `./${options.type}-app`);
|
|
128
|
+
if (!(await directoryIsNonEmpty(resolvedDestination))) {
|
|
129
|
+
if (options.dryRun || options.validate) {
|
|
130
|
+
console.log(`Would create ${resolvedDestination} from ${resolveStarter(options.type).owner}/${resolveStarter(options.type).repo}`);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
await cloneStarter(options.type, resolvedDestination, dependencies);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
await dependencies.runApply(resolvedDestination, toCliOptions(options));
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=setup-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-project.js","sourceRoot":"","sources":["../../src/cli/setup-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAwBzE;;;;GAIG;AACH,SAAS,YAAY,CAAC,OAA4B;IAChD,OAAO;QACL,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC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AAO,CACtC,WAAW,IAAI,KAAK,OAAO,CAAC,IAAI,MAAM,CACvC,CAAC;IAEF,IAAI,CAAC,CAAC,MAAM,mBAAmB,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC;QACtD,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;YACvC,OAAO,CAAC,GAAG,CACT,gBAAgB,mBAAmB,SAAS,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CACtH,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,mBAAmB,EAAE,YAAY,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;IAED,MAAM,YAAY,CAAC,QAAQ,CAAC,mBAAmB,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const SETUP_TYPES: readonly ["rails", "typescript", "expo", "nestjs", "cdk", "wiki", "harper-wiki"];
|
|
2
|
+
/**
|
|
3
|
+
* Supported starter-backed project setup types.
|
|
4
|
+
*/
|
|
5
|
+
export type SetupType = (typeof SETUP_TYPES)[number];
|
|
6
|
+
/**
|
|
7
|
+
* Metadata for a starter repository used by setup-project.
|
|
8
|
+
*/
|
|
9
|
+
export interface Starter {
|
|
10
|
+
readonly owner: string;
|
|
11
|
+
readonly repo: string;
|
|
12
|
+
readonly template: true;
|
|
13
|
+
}
|
|
14
|
+
export declare const STARTERS: Record<SetupType, Starter>;
|
|
15
|
+
/**
|
|
16
|
+
* Check whether a raw string is a supported setup type.
|
|
17
|
+
* @param value - Raw setup type value
|
|
18
|
+
* @returns True when value is a supported setup type
|
|
19
|
+
*/
|
|
20
|
+
export declare function isSetupType(value: string): value is SetupType;
|
|
21
|
+
/**
|
|
22
|
+
* Resolve the configured starter template for a setup type.
|
|
23
|
+
* @param type - Valid Lisa setup type
|
|
24
|
+
* @returns Starter repository metadata
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveStarter(type: SetupType): Starter;
|
|
27
|
+
//# sourceMappingURL=starters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starters.d.ts","sourceRoot":"","sources":["../../src/cli/starters.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,kFAQd,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;CACzB;AAED,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAgB/C,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,SAAS,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAEvD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export const SETUP_TYPES = [
|
|
2
|
+
"rails",
|
|
3
|
+
"typescript",
|
|
4
|
+
"expo",
|
|
5
|
+
"nestjs",
|
|
6
|
+
"cdk",
|
|
7
|
+
"wiki",
|
|
8
|
+
"harper-wiki",
|
|
9
|
+
];
|
|
10
|
+
export const STARTERS = {
|
|
11
|
+
rails: { owner: "CodySwannGT", repo: "railsstarter", template: true },
|
|
12
|
+
typescript: {
|
|
13
|
+
owner: "CodySwannGT",
|
|
14
|
+
repo: "typescriptstarter",
|
|
15
|
+
template: true,
|
|
16
|
+
},
|
|
17
|
+
expo: { owner: "CodySwannGT", repo: "expostarter", template: true },
|
|
18
|
+
nestjs: { owner: "CodySwannGT", repo: "nestjsstarter", template: true },
|
|
19
|
+
cdk: { owner: "CodySwannGT", repo: "cdkstarter", template: true },
|
|
20
|
+
wiki: { owner: "CodySwannGT", repo: "wikistarter", template: true },
|
|
21
|
+
"harper-wiki": {
|
|
22
|
+
owner: "CodySwannGT",
|
|
23
|
+
repo: "harperwikistarter",
|
|
24
|
+
template: true,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Check whether a raw string is a supported setup type.
|
|
29
|
+
* @param value - Raw setup type value
|
|
30
|
+
* @returns True when value is a supported setup type
|
|
31
|
+
*/
|
|
32
|
+
export function isSetupType(value) {
|
|
33
|
+
return SETUP_TYPES.includes(value);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Resolve the configured starter template for a setup type.
|
|
37
|
+
* @param type - Valid Lisa setup type
|
|
38
|
+
* @returns Starter repository metadata
|
|
39
|
+
*/
|
|
40
|
+
export function resolveStarter(type) {
|
|
41
|
+
return STARTERS[type];
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=starters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starters.js","sourceRoot":"","sources":["../../src/cli/starters.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,OAAO;IACP,YAAY;IACZ,MAAM;IACN,QAAQ;IACR,KAAK;IACL,MAAM;IACN,aAAa;CACL,CAAC;AAgBX,MAAM,CAAC,MAAM,QAAQ,GAA+B;IAClD,KAAK,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE;IACrE,UAAU,EAAE;QACV,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;IACnE,MAAM,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE;IACvE,GAAG,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE;IACjE,IAAI,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE;IACnE,aAAa,EAAE;QACb,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,OAAO,WAAW,CAAC,QAAQ,CAAC,KAAkB,CAAC,CAAC;AAClD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,IAAe;IAC5C,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"lodash": ">=4.18.1"
|
|
84
84
|
},
|
|
85
85
|
"name": "@codyswann/lisa",
|
|
86
|
-
"version": "2.
|
|
86
|
+
"version": "2.133.0",
|
|
87
87
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
88
88
|
"main": "dist/index.js",
|
|
89
89
|
"exports": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.133.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.133.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.133.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.133.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.133.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|