nebula-starter-kit 0.0.6 → 0.0.8
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/dist/utils/addService.js
CHANGED
|
@@ -145,6 +145,7 @@ plugins:
|
|
|
145
145
|
};
|
|
146
146
|
exports.serverlessTemplate = serverlessTemplate;
|
|
147
147
|
async function addService(serviceName, selectedServices, appName) {
|
|
148
|
+
console.log('Adding service:', serviceName);
|
|
148
149
|
const ROOT = process.cwd();
|
|
149
150
|
const nebulaPath = path_1.default.join(ROOT, 'nebula.json');
|
|
150
151
|
if (!fs_extra_1.default.existsSync(nebulaPath)) {
|
|
@@ -159,7 +160,7 @@ async function addService(serviceName, selectedServices, appName) {
|
|
|
159
160
|
const serviceDir = path_1.default.join(ROOT, 'services', serviceName);
|
|
160
161
|
await fs_extra_1.default.ensureDir(serviceDir);
|
|
161
162
|
// copy base nest template
|
|
162
|
-
fs_extra_1.default.copySync(path_1.default.
|
|
163
|
+
fs_extra_1.default.copySync(path_1.default.resolve(__dirname, '../../templates/service'), serviceDir);
|
|
163
164
|
// update service names
|
|
164
165
|
await (0, replaceServiceNames_1.replaceServiceNames)(serviceDir, serviceName, appName);
|
|
165
166
|
// Generate serverless.yml per service
|
|
@@ -276,7 +276,8 @@ const generateServerlessFiles = async (selectedServices, ROOT, OUTPUT, appNamePl
|
|
|
276
276
|
const serviceOutput = path.join(OUTPUT, 'services', service);
|
|
277
277
|
await fs.ensureDir(serviceOutput);
|
|
278
278
|
// copy base nest template
|
|
279
|
-
|
|
279
|
+
console.log(path.resolve(__dirname, '../../templates/service'));
|
|
280
|
+
fs.copySync(path.resolve(__dirname, '../../templates/service'), serviceOutput);
|
|
280
281
|
// update service names
|
|
281
282
|
await (0, replaceServiceNames_1.replaceServiceNames)(serviceOutput, service, appNamePlaceHolder);
|
|
282
283
|
console.log(`✅ Service ${service} created\n`);
|