Merge pull request 'fix: resolve prompt files from package root instead of dist' (#74) from fix/prompt-path into main
fix: resolve prompt files from package root, suppress ExperimentalWarning in tests (#74)
This commit was merged in pull request #74.
This commit is contained in:
@@ -14,6 +14,10 @@
|
||||
"bin": {
|
||||
"ocas": "dist/index.js"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"prompts"
|
||||
],
|
||||
"dependencies": {
|
||||
"@ocas/core": "workspace:*",
|
||||
"@ocas/fs": "workspace:*"
|
||||
|
||||
@@ -1234,7 +1234,7 @@ switch (cmd) {
|
||||
switch (sub) {
|
||||
case "usage": {
|
||||
const content = readFileSync(
|
||||
join(__dirname, "prompts", "usage.md"),
|
||||
join(__dirname, "..", "prompts", "usage.md"),
|
||||
"utf-8",
|
||||
);
|
||||
process.stdout.write(content);
|
||||
@@ -1242,7 +1242,7 @@ switch (cmd) {
|
||||
}
|
||||
case "setup": {
|
||||
const content = readFileSync(
|
||||
join(__dirname, "prompts", "setup.md"),
|
||||
join(__dirname, "..", "prompts", "setup.md"),
|
||||
"utf-8",
|
||||
);
|
||||
process.stdout.write(content);
|
||||
|
||||
@@ -466,5 +466,5 @@ Flags:
|
||||
--epsilon <n> Cutoff threshold for render (default: 0.01)
|
||||
--pipe, -p Read from stdin (put/hash: raw JSON payload; render: { type, value } envelope)
|
||||
|
||||
Agent: If you have not installed the ocas skill for this version (0.3.0), run \`ocas prompt setup\` and follow the instructions."
|
||||
Agent: If you have not installed the ocas skill for this version (0.3.1), run \`ocas prompt setup\` and follow the instructions."
|
||||
`;
|
||||
|
||||
@@ -52,6 +52,7 @@ describe("Phase 7: Edge Cases", () => {
|
||||
{
|
||||
encoding: "utf-8",
|
||||
timeout: 10000,
|
||||
env: { ...process.env, NODE_NO_WARNINGS: "1" },
|
||||
},
|
||||
);
|
||||
return { stdout: stdout.trim(), stderr: "", exitCode: 0 };
|
||||
@@ -177,6 +178,7 @@ describe("Phase 3: Variable System", () => {
|
||||
{
|
||||
encoding: "utf-8",
|
||||
timeout: 10000,
|
||||
env: { ...process.env, NODE_NO_WARNINGS: "1" },
|
||||
},
|
||||
);
|
||||
return { stdout: stdout.trim(), stderr: "", exitCode: 0 };
|
||||
@@ -379,6 +381,7 @@ describe("Phase 4: Template System", () => {
|
||||
{
|
||||
encoding: "utf-8",
|
||||
timeout: 10000,
|
||||
env: { ...process.env, NODE_NO_WARNINGS: "1" },
|
||||
},
|
||||
);
|
||||
return { stdout: stdout.trim(), stderr: "", exitCode: 0 };
|
||||
|
||||
@@ -610,6 +610,7 @@ describe("Phase 2: Schema Validation", () => {
|
||||
{
|
||||
encoding: "utf-8",
|
||||
timeout: 10000,
|
||||
env: { ...process.env, NODE_NO_WARNINGS: "1" },
|
||||
},
|
||||
).trim();
|
||||
} catch (e: unknown) {
|
||||
@@ -635,6 +636,7 @@ describe("Phase 2: Schema Validation", () => {
|
||||
{
|
||||
encoding: "utf-8",
|
||||
timeout: 10000,
|
||||
env: { ...process.env, NODE_NO_WARNINGS: "1" },
|
||||
},
|
||||
);
|
||||
} catch (e: unknown) {
|
||||
|
||||
Reference in New Issue
Block a user