@aloma.io/integration-sdk 3.0.1-9 → 3.0.1
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 +15 -2
- package/package.json +1 -1
- package/src/cli.mts +19 -2
- package/template/connector/package.json +1 -1
- package/build/cli.d.ts +0 -1
- package/build/cli.js +0 -2
package/build/cli.mjs
CHANGED
@@ -67,14 +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 ...');
|
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`);
|
72
84
|
});
|
73
85
|
program
|
74
86
|
.command("build")
|
75
87
|
.description("Build the current connector project")
|
76
88
|
.action(async (str, options) => {
|
77
|
-
|
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;`);
|
90
|
+
if (stdout)
|
91
|
+
console.log(stdout);
|
79
92
|
});
|
80
93
|
program.parse();
|
package/package.json
CHANGED
package/src/cli.mts
CHANGED
@@ -90,16 +90,33 @@ 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 ...');
|
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`)
|
95
111
|
});
|
96
112
|
|
97
113
|
program
|
98
114
|
.command("build")
|
99
115
|
.description("Build the current connector project")
|
100
116
|
.action(async (str, options) => {
|
101
|
-
|
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;`);
|
118
|
+
|
119
|
+
if (stdout) console.log(stdout);
|
103
120
|
});
|
104
121
|
|
105
122
|
program.parse();
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"scripts": {
|
10
10
|
"start": "node build/index.mjs",
|
11
11
|
"dev": "./node_modules/typescript/bin/tsc --watch",
|
12
|
-
"build": "
|
12
|
+
"build": "./node_modules/@aloma.io/integration-sdk/build/cli.mjs build; ./node_modules/typescript/bin/tsc",
|
13
13
|
"test": "./node_modules/mocha/bin/_mocha --recursive",
|
14
14
|
"format": "yarn prettier --write src/"
|
15
15
|
},
|
package/build/cli.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
package/build/cli.js
DELETED