blokctl 0.6.5 → 0.6.6
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.
|
@@ -17,7 +17,7 @@ const exec = util.promisify(child_process.exec);
|
|
|
17
17
|
const HOME_DIR = `${os.homedir()}/.blok`;
|
|
18
18
|
const GITHUB_REPO_LOCAL = `${HOME_DIR}/blok`;
|
|
19
19
|
const GITHUB_REPO_REMOTE = "https://github.com/well-prado/blok.git";
|
|
20
|
-
const GITHUB_REPO_RELEASE_TAG = "v0.6.
|
|
20
|
+
const GITHUB_REPO_RELEASE_TAG = "v0.6.6";
|
|
21
21
|
fsExtra.ensureDirSync(HOME_DIR);
|
|
22
22
|
const options = {
|
|
23
23
|
baseDir: HOME_DIR,
|
|
@@ -403,6 +403,12 @@ export async function createProject(opts, version, currentPath = false, localRep
|
|
|
403
403
|
fsExtra.copySync(triggerNodesDir, `${dirPath}/src/nodes`);
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
+
if (examples && !selectedTriggers.includes("http")) {
|
|
407
|
+
const httpNodesDir = `${repoSource}/triggers/http/src/nodes`;
|
|
408
|
+
if (fsExtra.existsSync(httpNodesDir)) {
|
|
409
|
+
fsExtra.copySync(httpNodesDir, `${dirPath}/src/nodes`);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
406
412
|
if (!skipPrompts) {
|
|
407
413
|
s.message("Installing example workflows and nodes");
|
|
408
414
|
}
|
|
@@ -437,7 +443,13 @@ export async function createProject(opts, version, currentPath = false, localRep
|
|
|
437
443
|
fsExtra.ensureDirSync(`${dirPath}/infra/milvus`);
|
|
438
444
|
fsExtra.copySync(`${repoSource}/infra/development`, `${dirPath}/infra/postgresql`);
|
|
439
445
|
fsExtra.copySync(`${repoSource}/infra/milvus`, `${dirPath}/infra/milvus`);
|
|
440
|
-
|
|
446
|
+
const needsHelpers = selectedTriggers.includes("sse") || selectedTriggers.includes("websocket");
|
|
447
|
+
const examplesNodesContent = needsHelpers
|
|
448
|
+
? node_file
|
|
449
|
+
.replace(`import type { NodeBase } from "@blokjs/shared";`, `import type { NodeBase } from "@blokjs/shared";\nimport { HELPER_NODES } from "@blokjs/helpers";`)
|
|
450
|
+
.replace(`} = {\n\t"@blokjs/api-call": ApiCall,`, `} = {\n\t...HELPER_NODES,\n\t"@blokjs/api-call": ApiCall,`)
|
|
451
|
+
: node_file;
|
|
452
|
+
fsExtra.writeFileSync(`${dirPath}/src/Nodes.ts`, examplesNodesContent);
|
|
441
453
|
fsExtra.copySync(`${repoSource}/sdk`, `${dirPath}/public/sdk`);
|
|
442
454
|
}
|
|
443
455
|
const envExample = `${dirPath}/.env.example`;
|
|
@@ -466,7 +478,7 @@ export async function createProject(opts, version, currentPath = false, localRep
|
|
|
466
478
|
"@blokjs/trigger-websocket": "triggers/websocket",
|
|
467
479
|
"@blokjs/trigger-worker": "triggers/worker",
|
|
468
480
|
};
|
|
469
|
-
const BLOKJS_DEP_RANGE = "^0.6.
|
|
481
|
+
const BLOKJS_DEP_RANGE = "^0.6.6";
|
|
470
482
|
for (const depGroup of ["dependencies", "devDependencies", "peerDependencies"]) {
|
|
471
483
|
const deps = packageJsonContent[depGroup];
|
|
472
484
|
if (!deps)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blokctl",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"author": "Deskree Technologies Inc.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "cli for blok",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"keywords": ["blokctl", "cli", "blok", "blok"],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@ai-sdk/openai": "^1.3.22",
|
|
33
|
-
"@blokjs/runner": "^0.6.
|
|
33
|
+
"@blokjs/runner": "^0.6.6",
|
|
34
34
|
"@clack/prompts": "^1.0.0",
|
|
35
35
|
"ai": "^4.3.16",
|
|
36
36
|
"better-sqlite3": "^12.6.2",
|