lua-cli 3.7.0 → 3.7.3
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/api/ai.api.service.d.ts +20 -0
- package/dist/api/ai.api.service.d.ts.map +1 -0
- package/dist/api/ai.api.service.js +38 -0
- package/dist/api/ai.api.service.js.map +1 -0
- package/dist/api/lazy-instances.d.ts +4 -4
- package/dist/api/lazy-instances.d.ts.map +1 -1
- package/dist/api/lazy-instances.js +9 -9
- package/dist/api/lazy-instances.js.map +1 -1
- package/dist/api-exports.d.ts +28 -30
- package/dist/api-exports.d.ts.map +1 -1
- package/dist/api-exports.js +6 -59
- package/dist/api-exports.js.map +1 -1
- package/dist/cli/command-definitions.d.ts.map +1 -1
- package/dist/cli/command-definitions.js +1 -0
- package/dist/cli/command-definitions.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +6 -6
- package/dist/commands/init.js.map +1 -1
- package/dist/interfaces/agent.d.ts +7 -0
- package/dist/interfaces/agent.d.ts.map +1 -1
- package/dist/services/auth.d.ts.map +1 -1
- package/dist/services/auth.js +11 -3
- package/dist/services/auth.js.map +1 -1
- package/dist/utils/init-agent.d.ts +1 -1
- package/dist/utils/init-agent.d.ts.map +1 -1
- package/dist/utils/init-agent.js +7 -2
- package/dist/utils/init-agent.js.map +1 -1
- package/dist/utils/keytar-loader.d.ts +20 -0
- package/dist/utils/keytar-loader.d.ts.map +1 -0
- package/dist/utils/keytar-loader.js +28 -0
- package/dist/utils/keytar-loader.js.map +1 -0
- package/dist/utils/sandbox-storage.d.ts.map +1 -1
- package/dist/utils/sandbox-storage.js +19 -1
- package/dist/utils/sandbox-storage.js.map +1 -1
- package/dist/utils/sandbox.d.ts.map +1 -1
- package/dist/utils/sandbox.js +6 -17
- package/dist/utils/sandbox.js.map +1 -1
- package/docs/README.md +1 -1
- package/docs/api/AI.md +157 -640
- package/node_modules/@lua/shared-types/dist/index.d.mts +92 -0
- package/node_modules/@lua/shared-types/dist/index.d.ts +92 -0
- package/node_modules/@lua/shared-types/dist/index.js +104 -0
- package/node_modules/@lua/shared-types/dist/index.mjs +79 -0
- package/node_modules/@lua/shared-types/package.json +26 -0
- package/node_modules/@lua/shared-types/src/ai-generate.types.ts +79 -0
- package/node_modules/@lua/shared-types/src/ai-generate.utils.ts +19 -0
- package/node_modules/@lua/shared-types/src/channel.type.ts +21 -0
- package/node_modules/@lua/shared-types/src/index.ts +4 -0
- package/node_modules/@lua/shared-types/src/unstructured-types.ts +58 -0
- package/node_modules/@lua/shared-types/tsconfig.json +12 -0
- package/node_modules/@lua/shared-types/tsup.config.ts +9 -0
- package/package.json +19 -10
- package/scripts/resolve-workspace-deps.cjs +61 -0
- package/template/.gitignore +0 -21
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pre-pack script: resolves workspace:* references in package.json
|
|
3
|
+
* before npm creates the tarball.
|
|
4
|
+
*
|
|
5
|
+
* pnpm does this automatically during `pnpm publish`, but `npm publish`
|
|
6
|
+
* does not. This script bridges the gap so both work.
|
|
7
|
+
*
|
|
8
|
+
* Usage: Called automatically via the "prepack" lifecycle hook.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
|
|
14
|
+
const pkgPath = path.join(__dirname, '..', 'package.json');
|
|
15
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
16
|
+
|
|
17
|
+
let changed = false;
|
|
18
|
+
|
|
19
|
+
for (const depType of ['dependencies', 'devDependencies', 'optionalDependencies', 'peerDependencies']) {
|
|
20
|
+
const deps = pkg[depType];
|
|
21
|
+
if (!deps) continue;
|
|
22
|
+
|
|
23
|
+
for (const [name, version] of Object.entries(deps)) {
|
|
24
|
+
if (typeof version === 'string' && version.startsWith('workspace:')) {
|
|
25
|
+
// Extract the modifier after "workspace:" (e.g., *, ^, ~)
|
|
26
|
+
const modifier = version.slice('workspace:'.length);
|
|
27
|
+
|
|
28
|
+
// Resolve the actual version from the workspace package
|
|
29
|
+
const possiblePaths = [
|
|
30
|
+
path.join(__dirname, '..', '..', name.replace('@lua/', ''), 'package.json'),
|
|
31
|
+
path.join(__dirname, '..', '..', name.split('/').pop(), 'package.json'),
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
let resolved = false;
|
|
35
|
+
for (const depPkgPath of possiblePaths) {
|
|
36
|
+
if (fs.existsSync(depPkgPath)) {
|
|
37
|
+
const depPkg = JSON.parse(fs.readFileSync(depPkgPath, 'utf8'));
|
|
38
|
+
// Preserve pnpm workspace modifiers: ^ → ^version, ~ → ~version, * → version
|
|
39
|
+
const prefix = modifier === '^' ? '^' : modifier === '~' ? '~' : '';
|
|
40
|
+
deps[name] = prefix + depPkg.version;
|
|
41
|
+
console.log(` Resolved ${name}: ${version} → ${deps[name]}`);
|
|
42
|
+
resolved = true;
|
|
43
|
+
changed = true;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!resolved) {
|
|
49
|
+
console.error(` Error: Could not resolve workspace dependency ${name}`);
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (changed) {
|
|
57
|
+
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
|
|
58
|
+
console.log('Workspace dependencies resolved for publishing.');
|
|
59
|
+
} else {
|
|
60
|
+
console.log('No workspace dependencies found.');
|
|
61
|
+
}
|
package/template/.gitignore
DELETED