@sap/cds-dk 8.7.2 → 8.8.0
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/CHANGELOG.md +39 -3
- package/bin/bind.js +7 -8
- package/bin/cds.js +2 -4
- package/bin/compile/index.js +2 -1
- package/bin/deploy/index.js +10 -5
- package/bin/lint.js +10 -4
- package/bin/watch.js +48 -7
- package/lib/bind/{cfKeyProvider.js → cf.js} +43 -53
- package/lib/bind/k8s.js +138 -0
- package/lib/bind/plugin.js +48 -0
- package/lib/bind/shared.js +267 -0
- package/lib/build/buildTaskEngine.js +1 -1
- package/lib/build/plugins/helm/files/subcharts/content-deployment/Chart.yaml +0 -2
- package/lib/build/plugins/helm/files/subcharts/web-application/Chart.yaml +1 -3
- package/lib/build/plugins/helm/files/subcharts/web-application/templates/service-binding.yaml +3 -0
- package/lib/build/plugins/helm/files/subcharts/web-application/values.schema.json +3 -0
- package/lib/build/plugins/helm/files/subcharts/web-application/values.yaml +2 -1
- package/lib/build/util.js +1 -1
- package/lib/compile/to-mermaid.js +1 -2
- package/lib/deploy/to-hana/hana.js +4 -4
- package/lib/deploy/to-hana/mtaUtil.js +0 -13
- package/lib/import/common.js +6 -7
- package/lib/init/constants.js +1 -1
- package/lib/init/merge.js +42 -33
- package/lib/init/projectReader.js +15 -7
- package/lib/init/registries/mta.js +9 -3
- package/lib/init/template/approuter/files/mta.yaml.hbs +2 -2
- package/lib/init/template/approuter/files/package.json +1 -1
- package/lib/init/template/approuter/files/xs-app.json.hbs +0 -11
- package/lib/init/template/approuter/index.js +2 -2
- package/lib/init/template/cloud-logging/files/package.json.hbs +12 -1
- package/lib/init/template/cloud-logging/files/values.yaml.hbs +0 -2
- package/lib/init/template/cloud-logging/index.js +8 -15
- package/lib/init/template/destination/files/values.yaml +4 -4
- package/lib/init/template/destination/index.js +1 -1
- package/lib/init/template/html5-repo/files/app-package.json.hbs +0 -2
- package/lib/init/template/html5-repo/files/containerize.yaml.hbs +25 -0
- package/lib/init/template/html5-repo/files/mta.yaml.hbs +1 -2
- package/lib/init/template/html5-repo/files/package.json.hbs +1 -1
- package/lib/init/template/html5-repo/files/ui-resources/package.json.hbs +11 -0
- package/lib/init/template/html5-repo/files/ui5-deploy.yaml.hbs +4 -7
- package/lib/init/template/html5-repo/files/values.yaml.hbs +6 -4
- package/lib/init/template/html5-repo/index.js +22 -10
- package/lib/init/template/http/index.js +1 -1
- package/lib/init/template/ias/files/mta.yaml.hbs +1 -1
- package/lib/init/template/ias/files/sidecar.package.json.hbs +12 -0
- package/lib/init/template/ias/index.js +1 -3
- package/lib/init/template/multitenancy/files/mta.yaml.hbs +8 -10
- package/lib/init/template/multitenancy/index.js +1 -1
- package/lib/init/template/portal/files/mta.yaml.hbs +9 -0
- package/lib/init/template/portal/index.js +3 -1
- package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +119 -119
- package/lib/init/template/sample/files/app/browse/webapp/manifest.json +1 -1
- package/lib/init/template/telemetry/index.js +0 -13
- package/lib/init/template/typer/files/package.json +3 -0
- package/lib/init/template/workzone-standard/files/cdm.json.hbs +97 -0
- package/lib/init/template/workzone-standard/files/mta.yaml.hbs +23 -0
- package/lib/init/template/workzone-standard/index.js +70 -39
- package/lib/init/template/xsuaa/files/mta.yaml.hbs +2 -2
- package/lib/init/template/xsuaa/files/values.yaml.hbs +0 -2
- package/lib/init/template/xsuaa/index.js +22 -10
- package/lib/lint/Linter.js +242 -201
- package/lib/lint/io.js +4 -7
- package/lib/mtx/util/cf.js +1 -2
- package/lib/util/cf.js +104 -84
- package/lib/util/command.js +1 -2
- package/lib/util/git.js +1 -1
- package/npm-shrinkwrap.json +60 -43
- package/package.json +1 -1
- package/bin/deploy/to-cf.js +0 -0
- package/bin/deploy/via-mta.js +0 -0
- package/lib/bind/KubernetesApiAccessor.js +0 -81
- package/lib/bind/bindingManager.js +0 -89
- package/lib/bind/bindingResolver.js +0 -54
- package/lib/bind/bindingUtil.js +0 -129
- package/lib/bind/index.js +0 -127
- package/lib/bind/kubernetesCredentialsProvider.js +0 -84
- package/lib/bind/userCdsrcJsonStorageProvider.js +0 -92
- package/lib/init/template/destination/files/package.sidecar.json +0 -7
- package/lib/init/template/html5-repo/files/package.sidecar.json +0 -7
- package/lib/init/template/telemetry/files/package.json.hbs +0 -18
package/lib/mtx/util/cf.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const os = require('os');
|
|
2
1
|
const { execFile } = require('child_process');
|
|
3
2
|
|
|
4
3
|
const cds = require('../../cds');
|
|
@@ -139,7 +138,7 @@ async function getSubdomain(appName) {
|
|
|
139
138
|
return resolve(errorResult(getErrorMessage(error, stdout)));
|
|
140
139
|
}
|
|
141
140
|
|
|
142
|
-
const nl = os.EOL;
|
|
141
|
+
const nl = '\r?\n'; //more robust than os.EOL;
|
|
143
142
|
const match = new RegExp(`^System-Provided:${nl}(?:\\{${nl}((.|${nl})*?)^}|((.|${nl})*?^}))`, 'm').exec(stdout);
|
|
144
143
|
if (!match) {
|
|
145
144
|
return resolve(errorResult(`CF reports no system-provided environment for app '${appName}'`));
|
package/lib/util/cf.js
CHANGED
|
@@ -32,7 +32,6 @@ const CF_CLIENT_MINIMUM_VERSION = 8;
|
|
|
32
32
|
const ENCODED_COMMA = encodeURIComponent(',');
|
|
33
33
|
|
|
34
34
|
module.exports = new class CfUtil {
|
|
35
|
-
spaceInfo;
|
|
36
35
|
|
|
37
36
|
async _sleep(ms) {
|
|
38
37
|
return new Promise((resolve) => {
|
|
@@ -68,11 +67,11 @@ module.exports = new class CfUtil {
|
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
async
|
|
72
|
-
const url = this.
|
|
70
|
+
async curl(urlPath, queryObj, bodyObj) {
|
|
71
|
+
const url = this.#target.apiEndpoint + urlPath;
|
|
73
72
|
|
|
74
73
|
const options = {
|
|
75
|
-
headers: { 'Authorization': this.
|
|
74
|
+
headers: { 'Authorization': this.#target.token }
|
|
76
75
|
};
|
|
77
76
|
|
|
78
77
|
if (queryObj && Object.keys(queryObj).length > 0) {
|
|
@@ -96,8 +95,6 @@ module.exports = new class CfUtil {
|
|
|
96
95
|
LOG.debug(`POST ${url}\n${JSON.stringify(options, null, 4)}\n${JSON.stringify(response.data, null, 4)}`);
|
|
97
96
|
}
|
|
98
97
|
|
|
99
|
-
// require('../../test/testUtil/recorder').record(urlPath, options.params, response.data, 'cf.json');
|
|
100
|
-
|
|
101
98
|
return response.data;
|
|
102
99
|
} catch (err) {
|
|
103
100
|
if (err instanceof axios.AxiosError) {
|
|
@@ -134,111 +131,113 @@ module.exports = new class CfUtil {
|
|
|
134
131
|
}
|
|
135
132
|
}
|
|
136
133
|
|
|
134
|
+
#cfTargetPromise
|
|
137
135
|
async _getCfTargetFromCli() {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
136
|
+
if (this.#cfTargetPromise) return this.#cfTargetPromise
|
|
137
|
+
this.#cfTargetPromise = (async () => {
|
|
138
|
+
const result = await this.cfRun('target')
|
|
139
|
+
if (result?.stdout) {
|
|
140
|
+
return {
|
|
141
|
+
apiEndpoint: this._extract(result.stdout, /api endpoint\s*:\s*([^\s]+)/i, `CF API endpoint is missing. Use 'cf login' to login.`),
|
|
142
|
+
user: this._extract(result.stdout, /user\s*:\s*(.+)/i, `CF user is missing. Use 'cf login' to login.`),
|
|
143
|
+
org: this._extract(result.stdout, /org\s*:\s*(.+)/i, `CF org is missing. Use 'cf target -o <ORG>' to specify.`),
|
|
144
|
+
space: this._extract(result.stdout, /space\s*:\s*(.+)/i, `CF space is missing. Use 'cf target -s <SPACE>' to specify.`),
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
})()
|
|
148
|
+
return this.#cfTargetPromise
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
#token
|
|
150
|
-
|
|
152
|
+
#tokenPromise
|
|
153
|
+
async _token() {
|
|
151
154
|
if (this.#token) return this.#token
|
|
152
|
-
if (!this
|
|
153
|
-
this
|
|
155
|
+
if (!this.#tokenPromise) {
|
|
156
|
+
this.#tokenPromise = this.cfRun('oauth-token')
|
|
154
157
|
.then(result => {
|
|
155
158
|
this.#token = result.stdout
|
|
156
159
|
return this.#token
|
|
157
160
|
})
|
|
158
161
|
.catch(err => {
|
|
159
|
-
this
|
|
162
|
+
this.#tokenPromise = null
|
|
160
163
|
throw err.message
|
|
161
164
|
})
|
|
162
165
|
}
|
|
163
|
-
return this
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
async getCfTarget() {
|
|
167
|
-
await this._checkCliVersion();
|
|
168
|
-
const token = await this._getCfAuthorization();
|
|
169
|
-
const target = await this._getCfTargetFromConfigFile() || await this._getCfTargetFromCli();
|
|
170
|
-
target.token = token;
|
|
171
|
-
return target;
|
|
166
|
+
return this.#tokenPromise
|
|
172
167
|
}
|
|
173
168
|
|
|
174
|
-
#
|
|
169
|
+
#cfVersionPromise
|
|
175
170
|
async _checkCliVersion() {
|
|
176
|
-
if (this.#
|
|
177
|
-
this.#
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
[Warning] You are using Cloud Foundry client version ${version[1]}. We recommend version ${CF_CLIENT_MINIMUM_VERSION} or higher.
|
|
183
|
-
Deployment will stop in the near future for Cloud Foundry client versions < ${CF_CLIENT_MINIMUM_VERSION}.
|
|
184
|
-
`))
|
|
185
|
-
|
|
171
|
+
if (this.#cfVersionPromise) return this.#cfVersionPromise
|
|
172
|
+
this.#cfVersionPromise = (async () => {
|
|
173
|
+
const result = await this.cfRun('-v');
|
|
174
|
+
const version = result?.stdout?.match(/version.*(\d+\.\d+\.\d+)/i);
|
|
175
|
+
if (parseInt(version?.[1]) < CF_CLIENT_MINIMUM_VERSION) {
|
|
176
|
+
console.log(warn(`
|
|
177
|
+
[Warning] You are using Cloud Foundry client version ${version[1]}. We recommend version ${CF_CLIENT_MINIMUM_VERSION} or higher.
|
|
178
|
+
Deployment will stop in the near future for Cloud Foundry client versions < ${CF_CLIENT_MINIMUM_VERSION}.
|
|
179
|
+
`))
|
|
180
|
+
}
|
|
181
|
+
})()
|
|
182
|
+
return this.#cfVersionPromise
|
|
186
183
|
}
|
|
187
184
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
185
|
+
#target
|
|
186
|
+
async target() {
|
|
187
|
+
if (!this.#target) {
|
|
188
|
+
await this._checkCliVersion();
|
|
189
|
+
const token = await this._token();
|
|
190
|
+
const target = await this._getCfTargetFromConfigFile() || await this._getCfTargetFromCli();
|
|
191
|
+
target.token = token;
|
|
192
|
+
this.#target = target;
|
|
191
193
|
|
|
192
|
-
const target = await this.getCfTarget();
|
|
193
|
-
this.spaceInfo = target;
|
|
194
194
|
const { org, space } = target;
|
|
195
|
-
const orgs = await this.
|
|
195
|
+
const orgs = await this.curl('/v3/organizations', { names: org });
|
|
196
196
|
if (!orgs?.resources?.length) {
|
|
197
197
|
throw `CF org ${bold(org)} not found!`;
|
|
198
198
|
}
|
|
199
|
-
|
|
200
199
|
const orgGuid = orgs.resources[0].guid;
|
|
201
|
-
|
|
200
|
+
|
|
201
|
+
const spaces = await this.curl('/v3/spaces', { names: space, organization_guids: orgGuid });
|
|
202
202
|
if (!spaces?.resources?.length) {
|
|
203
203
|
throw `CF space ${bold(space)} not found in org ${bold(org)}!`;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
const spaceGuid = spaces.resources[0].guid;
|
|
207
207
|
|
|
208
|
-
this
|
|
208
|
+
this.#target = {
|
|
209
209
|
...target,
|
|
210
210
|
orgGuid,
|
|
211
211
|
spaceGuid
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
return this
|
|
215
|
+
return this.#target;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
async
|
|
219
|
-
const env = await this.
|
|
218
|
+
async services(app) {
|
|
219
|
+
const env = await this.env(app)
|
|
220
220
|
return Object.values(env.system_env_json.VCAP_SERVICES).flat();
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
async
|
|
224
|
-
const { spaceGuid: space_guids, orgGuid: organization_guids } = await this.
|
|
225
|
-
const apps = await this.
|
|
223
|
+
async env(app) {
|
|
224
|
+
const { spaceGuid: space_guids, orgGuid: organization_guids } = await this.target();
|
|
225
|
+
const apps = await this.curl('/v3/apps', { space_guids, organization_guids, names: app });
|
|
226
226
|
if (apps.resources.length < 1) throw `Cannot find app with name '${app}'`
|
|
227
227
|
const guid = apps.resources[0].guid;
|
|
228
|
-
return await this.
|
|
228
|
+
return await this.curl('/v3/apps/' + guid + '/env', { space_guids, organization_guids, names: app });
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
async
|
|
232
|
-
|
|
233
|
-
const spaceInfo = await this.getCfSpaceInfo();
|
|
231
|
+
async service(serviceName) {
|
|
232
|
+
const target = await this.target();
|
|
234
233
|
|
|
235
234
|
let counter = POLL_COUNTER;
|
|
236
235
|
while (counter > 0) {
|
|
237
236
|
counter--;
|
|
238
|
-
const serviceInstances = await this.
|
|
237
|
+
const serviceInstances = await this.curl('/v3/service_instances', {
|
|
239
238
|
names: serviceName,
|
|
240
|
-
space_guids:
|
|
241
|
-
organization_guids:
|
|
239
|
+
space_guids: target.spaceGuid,
|
|
240
|
+
organization_guids: target.orgGuid
|
|
242
241
|
});
|
|
243
242
|
if (!serviceInstances?.resources?.length) {
|
|
244
243
|
return null;
|
|
@@ -269,10 +268,8 @@ Deployment will stop in the near future for Cloud Foundry client versions < ${CF
|
|
|
269
268
|
throw `Timeout occurred while getting service ${bold(serviceName)}`;
|
|
270
269
|
}
|
|
271
270
|
|
|
272
|
-
|
|
273
271
|
async getOrCreateService(serviceOfferingName, planName, serviceName, options) {
|
|
274
|
-
|
|
275
|
-
const probeService = await this.getService(serviceName, false);
|
|
272
|
+
const probeService = await this.service(serviceName);
|
|
276
273
|
if (probeService) {
|
|
277
274
|
console.log(`getting service ${bold(serviceName)}`);
|
|
278
275
|
return probeService;
|
|
@@ -280,12 +277,12 @@ Deployment will stop in the near future for Cloud Foundry client versions < ${CF
|
|
|
280
277
|
|
|
281
278
|
console.log(`Creating service ${bold(serviceName)} - please be patient...`);
|
|
282
279
|
|
|
283
|
-
const
|
|
280
|
+
const target = await this.target();
|
|
284
281
|
|
|
285
|
-
const servicePlan = await this.
|
|
282
|
+
const servicePlan = await this.curl(`/v3/service_plans`, {
|
|
286
283
|
names: planName,
|
|
287
|
-
space_guids:
|
|
288
|
-
organization_guids:
|
|
284
|
+
space_guids: target.spaceGuid,
|
|
285
|
+
organization_guids: target.orgGuid,
|
|
289
286
|
service_offering_names: serviceOfferingName
|
|
290
287
|
});
|
|
291
288
|
|
|
@@ -300,7 +297,7 @@ Deployment will stop in the near future for Cloud Foundry client versions < ${CF
|
|
|
300
297
|
relationships: {
|
|
301
298
|
space: {
|
|
302
299
|
data: {
|
|
303
|
-
guid:
|
|
300
|
+
guid: target.spaceGuid
|
|
304
301
|
}
|
|
305
302
|
},
|
|
306
303
|
service_plan: {
|
|
@@ -315,12 +312,12 @@ Deployment will stop in the near future for Cloud Foundry client versions < ${CF
|
|
|
315
312
|
body.parameters = { ...options };
|
|
316
313
|
}
|
|
317
314
|
|
|
318
|
-
const postResult = await this.
|
|
315
|
+
const postResult = await this.curl('/v3/service_instances', undefined, body);
|
|
319
316
|
if (postResult?.errors) {
|
|
320
317
|
throw postResult.errors[0].detail;
|
|
321
318
|
}
|
|
322
319
|
|
|
323
|
-
const newService = await this.
|
|
320
|
+
const newService = await this.service(serviceName);
|
|
324
321
|
if (newService) {
|
|
325
322
|
return newService;
|
|
326
323
|
}
|
|
@@ -328,13 +325,11 @@ Deployment will stop in the near future for Cloud Foundry client versions < ${CF
|
|
|
328
325
|
throw `Could not create service ${bold(serviceName)}`;
|
|
329
326
|
}
|
|
330
327
|
|
|
331
|
-
async _getServiceKey(serviceInstance, serviceKeyName
|
|
332
|
-
showMessage && console.log(`getting service key ${bold(serviceKeyName)}`);
|
|
333
|
-
|
|
328
|
+
async _getServiceKey(serviceInstance, serviceKeyName) {
|
|
334
329
|
let counter = POLL_COUNTER;
|
|
335
330
|
while (counter > 0) {
|
|
336
331
|
counter--;
|
|
337
|
-
const bindings = await this.
|
|
332
|
+
const bindings = await this.curl(`/v3/service_credential_bindings`, { names: serviceKeyName, service_instance_guids: serviceInstance.guid });
|
|
338
333
|
if (!bindings?.resources?.length) {
|
|
339
334
|
return null;
|
|
340
335
|
}
|
|
@@ -347,7 +342,7 @@ Deployment will stop in the near future for Cloud Foundry client versions < ${CF
|
|
|
347
342
|
break;
|
|
348
343
|
|
|
349
344
|
case OPERATION_STATE_SUCCEEDED: {
|
|
350
|
-
const keyDetails = await this.
|
|
345
|
+
const keyDetails = await this.curl(`/v3/service_credential_bindings/${encodeURIComponent(binding.guid)}/details`);
|
|
351
346
|
return keyDetails.credentials;
|
|
352
347
|
}
|
|
353
348
|
|
|
@@ -366,14 +361,14 @@ Deployment will stop in the near future for Cloud Foundry client versions < ${CF
|
|
|
366
361
|
throw `Timeout occurred while getting service key ${bold(serviceKeyName)}`;
|
|
367
362
|
}
|
|
368
363
|
|
|
369
|
-
async getOrCreateServiceKey(serviceInstance, serviceKeyName, parameters, { silent = false
|
|
370
|
-
const serviceKey = await this._getServiceKey(serviceInstance, serviceKeyName
|
|
371
|
-
if (serviceKey
|
|
372
|
-
|
|
364
|
+
async getOrCreateServiceKey(serviceInstance, serviceKeyName, parameters, { silent = false } = {}) {
|
|
365
|
+
const serviceKey = await this._getServiceKey(serviceInstance, serviceKeyName);
|
|
366
|
+
if (serviceKey) {
|
|
367
|
+
DEBUG?.(`getting service key ${bold(serviceKeyName)}`)
|
|
373
368
|
return serviceKey;
|
|
374
369
|
}
|
|
375
370
|
|
|
376
|
-
if (!silent) console.log(`
|
|
371
|
+
if (!silent) console.log(`creating service key ${bold(serviceKeyName)} - please be patient...`);
|
|
377
372
|
|
|
378
373
|
const body = {
|
|
379
374
|
type: 'key',
|
|
@@ -388,16 +383,41 @@ Deployment will stop in the near future for Cloud Foundry client versions < ${CF
|
|
|
388
383
|
parameters
|
|
389
384
|
}
|
|
390
385
|
|
|
391
|
-
const postResult = await this.
|
|
386
|
+
const postResult = await this.curl('/v3/service_credential_bindings', undefined, body);
|
|
392
387
|
if (postResult?.errors) {
|
|
393
388
|
throw postResult.errors[0].detail;
|
|
394
389
|
}
|
|
395
390
|
|
|
396
|
-
const newServiceKey = await this._getServiceKey(serviceInstance, serviceKeyName
|
|
391
|
+
const newServiceKey = await this._getServiceKey(serviceInstance, serviceKeyName);
|
|
397
392
|
if (newServiceKey) {
|
|
398
393
|
return newServiceKey;
|
|
399
394
|
}
|
|
400
395
|
|
|
401
|
-
throw `
|
|
396
|
+
throw `could not create service key ${bold(serviceKeyName)}`;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
async org(orgName) {
|
|
400
|
+
const result = await this.curl('/v3/organizations', { names: orgName })
|
|
401
|
+
return result?.resources?.[0]
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
async space(orgGuid, spaceName) {
|
|
405
|
+
const result = await this.curl('/v3/spaces', { names: spaceName, organization_guids: orgGuid })
|
|
406
|
+
return result?.resources?.find(r => r.relationships.organization.data.guid === orgGuid)
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
async instance(spaceGuid, instanceName) {
|
|
410
|
+
const result = await this.curl('/v3/service_instances', { names: instanceName, space_guids: spaceGuid })
|
|
411
|
+
return result?.resources?.find(r => !!r.relationships.space.data.guid)
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
async plan(planGuid) {
|
|
415
|
+
const result = await this.curl('/v3/service_plans', { guids: planGuid })
|
|
416
|
+
return result?.resources?.[0]
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
async offering(offeringGuid) {
|
|
420
|
+
const result = await this.curl('/v3/service_offerings', { guids: offeringGuid })
|
|
421
|
+
return result?.resources?.[0]
|
|
402
422
|
}
|
|
403
423
|
}
|
package/lib/util/command.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const cp = require('child_process');
|
|
2
|
-
const os = require('os');
|
|
3
2
|
const cds = require('../cds');
|
|
4
3
|
const LOG = cds.log('cli'), DEBUG = cds.debug('cli');
|
|
5
4
|
|
|
@@ -102,7 +101,7 @@ class LogBuffer {
|
|
|
102
101
|
this.result = this.result + chunkStr;
|
|
103
102
|
}
|
|
104
103
|
|
|
105
|
-
const seq = chunkStr.split(os.EOL
|
|
104
|
+
const seq = chunkStr.split(/\r?\n/); // more robust than os.EOL
|
|
106
105
|
this.buffer = this.buffer + seq.shift();
|
|
107
106
|
for (const line of seq) {
|
|
108
107
|
this.flush();
|
package/lib/util/git.js
CHANGED
|
@@ -35,7 +35,7 @@ class GitUtil {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
console.log(`
|
|
38
|
+
console.log(`adding entry '${file}' to ${GIT_IGNORE_FILE}.`);
|
|
39
39
|
let gitignore = await this.readFileSafely(gitIgnorePath);
|
|
40
40
|
gitignore = gitignore + `${os.EOL}# added by cds${os.EOL}${file}${os.EOL}`;
|
|
41
41
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds-dk",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.8.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sap/cds-dk",
|
|
9
|
-
"version": "8.
|
|
9
|
+
"version": "8.8.0",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@cap-js/asyncapi": "^1.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"node_modules/@cap-js/openapi": {
|
|
57
|
-
"version": "1.
|
|
57
|
+
"version": "1.2.0",
|
|
58
58
|
"license": "SEE LICENSE IN LICENSE",
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"pluralize": "^8.0.0"
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
"node_modules/@eslint/core": {
|
|
124
|
-
"version": "0.
|
|
124
|
+
"version": "0.12.0",
|
|
125
125
|
"license": "Apache-2.0",
|
|
126
126
|
"dependencies": {
|
|
127
127
|
"@types/json-schema": "^7.0.15"
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
"node_modules/@eslint/eslintrc": {
|
|
134
|
-
"version": "3.
|
|
134
|
+
"version": "3.3.0",
|
|
135
135
|
"license": "MIT",
|
|
136
136
|
"dependencies": {
|
|
137
137
|
"ajv": "^6.12.4",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
154
|
"node_modules/@eslint/js": {
|
|
155
|
-
"version": "9.
|
|
155
|
+
"version": "9.21.0",
|
|
156
156
|
"license": "MIT",
|
|
157
157
|
"engines": {
|
|
158
158
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
@@ -166,26 +166,16 @@
|
|
|
166
166
|
}
|
|
167
167
|
},
|
|
168
168
|
"node_modules/@eslint/plugin-kit": {
|
|
169
|
-
"version": "0.2.
|
|
169
|
+
"version": "0.2.7",
|
|
170
170
|
"license": "Apache-2.0",
|
|
171
171
|
"dependencies": {
|
|
172
|
-
"@eslint/core": "^0.
|
|
172
|
+
"@eslint/core": "^0.12.0",
|
|
173
173
|
"levn": "^0.4.1"
|
|
174
174
|
},
|
|
175
175
|
"engines": {
|
|
176
176
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
|
-
"node_modules/@eslint/plugin-kit/node_modules/@eslint/core": {
|
|
180
|
-
"version": "0.10.0",
|
|
181
|
-
"license": "Apache-2.0",
|
|
182
|
-
"dependencies": {
|
|
183
|
-
"@types/json-schema": "^7.0.15"
|
|
184
|
-
},
|
|
185
|
-
"engines": {
|
|
186
|
-
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
179
|
"node_modules/@humanfs/core": {
|
|
190
180
|
"version": "0.19.1",
|
|
191
181
|
"license": "Apache-2.0",
|
|
@@ -227,7 +217,7 @@
|
|
|
227
217
|
}
|
|
228
218
|
},
|
|
229
219
|
"node_modules/@humanwhocodes/retry": {
|
|
230
|
-
"version": "0.4.
|
|
220
|
+
"version": "0.4.2",
|
|
231
221
|
"license": "Apache-2.0",
|
|
232
222
|
"engines": {
|
|
233
223
|
"node": ">=18.18"
|
|
@@ -238,7 +228,7 @@
|
|
|
238
228
|
}
|
|
239
229
|
},
|
|
240
230
|
"node_modules/@sap/cds": {
|
|
241
|
-
"version": "8.
|
|
231
|
+
"version": "8.8.0",
|
|
242
232
|
"license": "SEE LICENSE IN LICENSE",
|
|
243
233
|
"dependencies": {
|
|
244
234
|
"@sap/cds-compiler": ">=5.1",
|
|
@@ -268,7 +258,7 @@
|
|
|
268
258
|
}
|
|
269
259
|
},
|
|
270
260
|
"node_modules/@sap/cds-compiler": {
|
|
271
|
-
"version": "5.
|
|
261
|
+
"version": "5.8.0",
|
|
272
262
|
"license": "SEE LICENSE IN LICENSE",
|
|
273
263
|
"dependencies": {
|
|
274
264
|
"antlr4": "4.9.3"
|
|
@@ -283,7 +273,7 @@
|
|
|
283
273
|
}
|
|
284
274
|
},
|
|
285
275
|
"node_modules/@sap/cds-fiori": {
|
|
286
|
-
"version": "1.
|
|
276
|
+
"version": "1.4.0",
|
|
287
277
|
"license": "SEE LICENSE IN LICENSE",
|
|
288
278
|
"peerDependencies": {
|
|
289
279
|
"@sap/cds": ">=7.6",
|
|
@@ -304,7 +294,7 @@
|
|
|
304
294
|
}
|
|
305
295
|
},
|
|
306
296
|
"node_modules/@sap/cds-mtxs": {
|
|
307
|
-
"version": "2.
|
|
297
|
+
"version": "2.6.0",
|
|
308
298
|
"license": "SEE LICENSE IN LICENSE",
|
|
309
299
|
"dependencies": {
|
|
310
300
|
"@sap/hdi-deploy": ">=4",
|
|
@@ -316,11 +306,11 @@
|
|
|
316
306
|
}
|
|
317
307
|
},
|
|
318
308
|
"node_modules/@sap/eslint-plugin-cds": {
|
|
319
|
-
"version": "3.
|
|
309
|
+
"version": "3.2.0",
|
|
320
310
|
"license": "See LICENSE file",
|
|
321
311
|
"dependencies": {
|
|
322
312
|
"@sap/cds": ">=7",
|
|
323
|
-
"semver": "^7.
|
|
313
|
+
"semver": "^7.7.1"
|
|
324
314
|
},
|
|
325
315
|
"engines": {
|
|
326
316
|
"node": ">=18"
|
|
@@ -352,10 +342,10 @@
|
|
|
352
342
|
}
|
|
353
343
|
},
|
|
354
344
|
"node_modules/@sap/hdi-deploy": {
|
|
355
|
-
"version": "5.
|
|
345
|
+
"version": "5.4.1",
|
|
356
346
|
"license": "See LICENSE file",
|
|
357
347
|
"dependencies": {
|
|
358
|
-
"@sap/hdi": "^4.
|
|
348
|
+
"@sap/hdi": "^4.7.0",
|
|
359
349
|
"@sap/xsenv": "^5.2.0",
|
|
360
350
|
"async": "^3.2.6",
|
|
361
351
|
"dotenv": "^16.4.5",
|
|
@@ -363,7 +353,7 @@
|
|
|
363
353
|
"micromatch": "^4.0.8"
|
|
364
354
|
},
|
|
365
355
|
"engines": {
|
|
366
|
-
"node": "
|
|
356
|
+
"node": ">=18.x"
|
|
367
357
|
},
|
|
368
358
|
"peerDependencies": {
|
|
369
359
|
"@sap/hana-client": "^2 >= 2.6",
|
|
@@ -484,7 +474,7 @@
|
|
|
484
474
|
"license": "MIT"
|
|
485
475
|
},
|
|
486
476
|
"node_modules/axios": {
|
|
487
|
-
"version": "1.
|
|
477
|
+
"version": "1.8.1",
|
|
488
478
|
"license": "MIT",
|
|
489
479
|
"dependencies": {
|
|
490
480
|
"follow-redirects": "^1.15.6",
|
|
@@ -901,6 +891,19 @@
|
|
|
901
891
|
"node": ">= 0.4"
|
|
902
892
|
}
|
|
903
893
|
},
|
|
894
|
+
"node_modules/es-set-tostringtag": {
|
|
895
|
+
"version": "2.1.0",
|
|
896
|
+
"license": "MIT",
|
|
897
|
+
"dependencies": {
|
|
898
|
+
"es-errors": "^1.3.0",
|
|
899
|
+
"get-intrinsic": "^1.2.6",
|
|
900
|
+
"has-tostringtag": "^1.0.2",
|
|
901
|
+
"hasown": "^2.0.2"
|
|
902
|
+
},
|
|
903
|
+
"engines": {
|
|
904
|
+
"node": ">= 0.4"
|
|
905
|
+
}
|
|
906
|
+
},
|
|
904
907
|
"node_modules/escape-html": {
|
|
905
908
|
"version": "1.0.3",
|
|
906
909
|
"license": "MIT"
|
|
@@ -916,19 +919,19 @@
|
|
|
916
919
|
}
|
|
917
920
|
},
|
|
918
921
|
"node_modules/eslint": {
|
|
919
|
-
"version": "9.
|
|
922
|
+
"version": "9.21.0",
|
|
920
923
|
"license": "MIT",
|
|
921
924
|
"dependencies": {
|
|
922
925
|
"@eslint-community/eslint-utils": "^4.2.0",
|
|
923
926
|
"@eslint-community/regexpp": "^4.12.1",
|
|
924
|
-
"@eslint/config-array": "^0.19.
|
|
925
|
-
"@eslint/core": "^0.
|
|
926
|
-
"@eslint/eslintrc": "^3.
|
|
927
|
-
"@eslint/js": "9.
|
|
928
|
-
"@eslint/plugin-kit": "^0.2.
|
|
927
|
+
"@eslint/config-array": "^0.19.2",
|
|
928
|
+
"@eslint/core": "^0.12.0",
|
|
929
|
+
"@eslint/eslintrc": "^3.3.0",
|
|
930
|
+
"@eslint/js": "9.21.0",
|
|
931
|
+
"@eslint/plugin-kit": "^0.2.7",
|
|
929
932
|
"@humanfs/node": "^0.16.6",
|
|
930
933
|
"@humanwhocodes/module-importer": "^1.0.1",
|
|
931
|
-
"@humanwhocodes/retry": "^0.4.
|
|
934
|
+
"@humanwhocodes/retry": "^0.4.2",
|
|
932
935
|
"@types/estree": "^1.0.6",
|
|
933
936
|
"@types/json-schema": "^7.0.15",
|
|
934
937
|
"ajv": "^6.12.4",
|
|
@@ -1212,7 +1215,7 @@
|
|
|
1212
1215
|
}
|
|
1213
1216
|
},
|
|
1214
1217
|
"node_modules/flatted": {
|
|
1215
|
-
"version": "3.3.
|
|
1218
|
+
"version": "3.3.3",
|
|
1216
1219
|
"license": "ISC"
|
|
1217
1220
|
},
|
|
1218
1221
|
"node_modules/follow-redirects": {
|
|
@@ -1234,11 +1237,12 @@
|
|
|
1234
1237
|
}
|
|
1235
1238
|
},
|
|
1236
1239
|
"node_modules/form-data": {
|
|
1237
|
-
"version": "4.0.
|
|
1240
|
+
"version": "4.0.2",
|
|
1238
1241
|
"license": "MIT",
|
|
1239
1242
|
"dependencies": {
|
|
1240
1243
|
"asynckit": "^0.4.0",
|
|
1241
1244
|
"combined-stream": "^1.0.8",
|
|
1245
|
+
"es-set-tostringtag": "^2.1.0",
|
|
1242
1246
|
"mime-types": "^2.1.12"
|
|
1243
1247
|
},
|
|
1244
1248
|
"engines": {
|
|
@@ -1279,15 +1283,15 @@
|
|
|
1279
1283
|
}
|
|
1280
1284
|
},
|
|
1281
1285
|
"node_modules/get-intrinsic": {
|
|
1282
|
-
"version": "1.
|
|
1286
|
+
"version": "1.3.0",
|
|
1283
1287
|
"license": "MIT",
|
|
1284
1288
|
"dependencies": {
|
|
1285
|
-
"call-bind-apply-helpers": "^1.0.
|
|
1289
|
+
"call-bind-apply-helpers": "^1.0.2",
|
|
1286
1290
|
"es-define-property": "^1.0.1",
|
|
1287
1291
|
"es-errors": "^1.3.0",
|
|
1288
|
-
"es-object-atoms": "^1.
|
|
1292
|
+
"es-object-atoms": "^1.1.1",
|
|
1289
1293
|
"function-bind": "^1.1.2",
|
|
1290
|
-
"get-proto": "^1.0.
|
|
1294
|
+
"get-proto": "^1.0.1",
|
|
1291
1295
|
"gopd": "^1.2.0",
|
|
1292
1296
|
"has-symbols": "^1.1.0",
|
|
1293
1297
|
"hasown": "^2.0.2",
|
|
@@ -1382,6 +1386,19 @@
|
|
|
1382
1386
|
"url": "https://github.com/sponsors/ljharb"
|
|
1383
1387
|
}
|
|
1384
1388
|
},
|
|
1389
|
+
"node_modules/has-tostringtag": {
|
|
1390
|
+
"version": "1.0.2",
|
|
1391
|
+
"license": "MIT",
|
|
1392
|
+
"dependencies": {
|
|
1393
|
+
"has-symbols": "^1.0.3"
|
|
1394
|
+
},
|
|
1395
|
+
"engines": {
|
|
1396
|
+
"node": ">= 0.4"
|
|
1397
|
+
},
|
|
1398
|
+
"funding": {
|
|
1399
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1385
1402
|
"node_modules/hasown": {
|
|
1386
1403
|
"version": "2.0.2",
|
|
1387
1404
|
"license": "MIT",
|
|
@@ -2415,7 +2432,7 @@
|
|
|
2415
2432
|
"optional": true
|
|
2416
2433
|
},
|
|
2417
2434
|
"node_modules/ws": {
|
|
2418
|
-
"version": "8.18.
|
|
2435
|
+
"version": "8.18.1",
|
|
2419
2436
|
"license": "MIT",
|
|
2420
2437
|
"engines": {
|
|
2421
2438
|
"node": ">=10.0.0"
|