blokctl 0.2.7 → 0.2.9
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.
|
@@ -16,7 +16,7 @@ const exec = util.promisify(child_process.exec);
|
|
|
16
16
|
const HOME_DIR = `${os.homedir()}/.blok`;
|
|
17
17
|
const GITHUB_REPO_LOCAL = `${HOME_DIR}/blok`;
|
|
18
18
|
const GITHUB_REPO_REMOTE = "https://github.com/well-prado/blok.git";
|
|
19
|
-
const GITHUB_REPO_RELEASE_TAG = "v0.2.
|
|
19
|
+
const GITHUB_REPO_RELEASE_TAG = "v0.2.2";
|
|
20
20
|
fsExtra.ensureDirSync(HOME_DIR);
|
|
21
21
|
const options = {
|
|
22
22
|
baseDir: HOME_DIR,
|
|
@@ -859,7 +859,7 @@ function updatePubSubProvider(triggerDestDir, provider) {
|
|
|
859
859
|
const config = adapterConfigs[provider];
|
|
860
860
|
if (!config)
|
|
861
861
|
return;
|
|
862
|
-
content = content.replace(/import \{
|
|
862
|
+
content = content.replace(/import \{ (\w+), (\w+) \} from ["']@blokjs\/trigger-pubsub["'];/, `import { ${config.importName}, PubSubTrigger } from "@blokjs/trigger-pubsub";`);
|
|
863
863
|
content = content.replace(/(export default class \w+ extends PubSubTrigger \{[\s\S]*?)\n\tprotected adapter = new \w+\(\{[\s\S]*?\}\);/, `$1\n\tprotected adapter = ${config.init};`);
|
|
864
864
|
fsExtra.writeFileSync(serverPath, content);
|
|
865
865
|
}
|
|
@@ -899,14 +899,14 @@ function updateQueueProvider(triggerDestDir, provider) {
|
|
|
899
899
|
const config = adapterConfigs[provider];
|
|
900
900
|
if (!config)
|
|
901
901
|
return;
|
|
902
|
-
content = content.replace(/import \{
|
|
902
|
+
content = content.replace(/import \{ (\w+), (\w+) \} from ["']@blokjs\/trigger-queue["'];/, `import { ${config.importName}, QueueTrigger } from "@blokjs/trigger-queue";`);
|
|
903
903
|
content = content.replace(/(export default class \w+ extends QueueTrigger \{[\s\S]*?)\n\tprotected adapter = new \w+\(\{[\s\S]*?\}\);/, `$1\n\tprotected adapter = ${config.init};`);
|
|
904
904
|
fsExtra.writeFileSync(serverPath, content);
|
|
905
905
|
}
|
|
906
906
|
function getProviderDependencies(triggers, pubsubProvider, queueProvider) {
|
|
907
907
|
const deps = {};
|
|
908
908
|
const pubsubProviderDeps = {
|
|
909
|
-
gcp: { "@google-cloud/pubsub": "^
|
|
909
|
+
gcp: { "@google-cloud/pubsub": "^5.0.0" },
|
|
910
910
|
aws: { "@aws-sdk/client-sns": "^3.980.0", "@aws-sdk/client-sqs": "^3.980.0" },
|
|
911
911
|
azure: { "@azure/service-bus": "^7.9.5" },
|
|
912
912
|
};
|