@aloma.io/integration-sdk 3.0.1-11 → 3.0.1-13
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/build/cli.mjs +13 -1
- package/package.json +1 -1
- package/src/cli.mts +16 -1
package/build/cli.mjs
CHANGED
@@ -67,15 +67,27 @@ program
|
|
67
67
|
throw new Error("name is empty");
|
68
68
|
const target = `${process.cwd()}/${name}`;
|
69
69
|
fs.mkdirSync(target);
|
70
|
+
console.log('Creating connector ...');
|
70
71
|
extract({ ...options, target, name });
|
72
|
+
console.log('Generating keys ...');
|
71
73
|
await generateKeys({ target });
|
74
|
+
console.log('Installing dependencies ...');
|
72
75
|
await exec(`cd ${target}; yarn`);
|
76
|
+
console.log('Building ...');
|
77
|
+
await exec(`cd ${target}; yarn build`);
|
78
|
+
console.log(`
|
79
|
+
Success!
|
80
|
+
|
81
|
+
1.) Add the connector to a workspace
|
82
|
+
2.) Edit ./${name}/.env and insert the registration token
|
83
|
+
3.) Start the connector with cd ./${name}/; yarn start`);
|
73
84
|
});
|
74
85
|
program
|
75
86
|
.command("build")
|
76
87
|
.description("Build the current connector project")
|
77
88
|
.action(async (str, options) => {
|
78
89
|
const { stdout, stderr } = await exec(`rm -rf build; mkdir -p build/controller; cp ./src/controller/index.mts ./build/controller/.controller-for-types.mts;`);
|
79
|
-
|
90
|
+
if (stdout)
|
91
|
+
console.log(stdout);
|
80
92
|
});
|
81
93
|
program.parse();
|
package/package.json
CHANGED
package/src/cli.mts
CHANGED
@@ -90,9 +90,24 @@ program
|
|
90
90
|
|
91
91
|
fs.mkdirSync(target);
|
92
92
|
|
93
|
+
console.log('Creating connector ...');
|
93
94
|
extract({ ...options, target, name });
|
95
|
+
|
96
|
+
console.log('Generating keys ...');
|
94
97
|
await generateKeys({target});
|
98
|
+
|
99
|
+
console.log('Installing dependencies ...');
|
95
100
|
await exec(`cd ${target}; yarn`);
|
101
|
+
|
102
|
+
console.log('Building ...');
|
103
|
+
await exec(`cd ${target}; yarn build`);
|
104
|
+
|
105
|
+
console.log(`
|
106
|
+
Success!
|
107
|
+
|
108
|
+
1.) Add the connector to a workspace
|
109
|
+
2.) Edit ./${name}/.env and insert the registration token
|
110
|
+
3.) Start the connector with cd ./${name}/; yarn start`)
|
96
111
|
});
|
97
112
|
|
98
113
|
program
|
@@ -101,7 +116,7 @@ program
|
|
101
116
|
.action(async (str, options) => {
|
102
117
|
const {stdout, stderr} = await exec(`rm -rf build; mkdir -p build/controller; cp ./src/controller/index.mts ./build/controller/.controller-for-types.mts;`);
|
103
118
|
|
104
|
-
console.log(stdout);
|
119
|
+
if (stdout) console.log(stdout);
|
105
120
|
});
|
106
121
|
|
107
122
|
program.parse();
|