Compare commits
11 Commits
multimodul
...
eslint-fla
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce3aaa778f | ||
|
|
2861c80e16 | ||
|
|
b2c26278b5 | ||
|
|
11b43a924d | ||
|
|
48173c75ed | ||
|
|
b59997aa47 | ||
|
|
a30cfefd88 | ||
|
|
8887c614d8 | ||
|
|
3f78e8249f | ||
|
|
b584de02a3 | ||
|
|
6a6b498d9a |
@@ -1,43 +0,0 @@
|
||||
_schema-version: '3.1'
|
||||
ID: capire.bookstore
|
||||
version: 1.0.0
|
||||
description: "A simple CAP project."
|
||||
parameters:
|
||||
enable-parallel-deployments: true
|
||||
build-parameters:
|
||||
before-all:
|
||||
- builder: custom
|
||||
commands:
|
||||
- npm ci
|
||||
- npx cds build --production
|
||||
modules:
|
||||
- name: bookstore-srv
|
||||
type: nodejs
|
||||
path: gen/srv
|
||||
parameters:
|
||||
buildpack: nodejs_buildpack
|
||||
readiness-health-check-type: http
|
||||
readiness-health-check-http-endpoint: /health
|
||||
build-parameters:
|
||||
builder: npm
|
||||
provides:
|
||||
- name: srv-api # required by consumers of CAP services (e.g. approuter)
|
||||
properties:
|
||||
srv-url: ${default-url}
|
||||
requires:
|
||||
- name: bookstore-destination
|
||||
- name: bookstore-messaging
|
||||
- name: samples-db
|
||||
|
||||
resources:
|
||||
- name: bookstore-destination
|
||||
type: org.cloudfoundry.managed-service
|
||||
parameters:
|
||||
service: destination
|
||||
service-plan: lite
|
||||
- name: bookstore-messaging
|
||||
type: org.cloudfoundry.managed-service
|
||||
parameters:
|
||||
service: enterprise-messaging
|
||||
service-plan: default
|
||||
path: ./event-mesh.json
|
||||
@@ -21,32 +21,14 @@
|
||||
"model": "@capire/orders"
|
||||
},
|
||||
"messaging": {
|
||||
"[development]": {
|
||||
"kind": "file-based-messaging"
|
||||
},
|
||||
"[hybrid]": {
|
||||
"kind": "enterprise-messaging-shared"
|
||||
},
|
||||
"[production]": {
|
||||
"kind": "enterprise-messaging"
|
||||
}
|
||||
"[development]": { "kind": "file-based-messaging" },
|
||||
"[hybrid]": { "kind": "enterprise-messaging-shared" },
|
||||
"[production]": { "kind": "enterprise-messaging" }
|
||||
},
|
||||
"db": { "kind": "sql" },
|
||||
"[multimodule]": {
|
||||
"db": {
|
||||
"kind": "sqlite",
|
||||
"impl": "@cap-js/sqlite",
|
||||
"credentials": {
|
||||
"url": "../db.sqlite"
|
||||
}
|
||||
}
|
||||
"db": {
|
||||
"kind": "sql"
|
||||
}
|
||||
},
|
||||
"log": {
|
||||
"service": true
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sap/cds-dk": "^7"
|
||||
"log": { "service": true }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
using from '@capire/bookstore';
|
||||
using from '@capire/common';
|
||||
using from '@capire/orders';
|
||||
using from '@capire/reviews';
|
||||
using from '@capire/fiori';
|
||||
27
eslint.config.js
Normal file
27
eslint.config.js
Normal file
@@ -0,0 +1,27 @@
|
||||
const globals = require("globals");
|
||||
const js = require('@eslint/js');
|
||||
const cds = require('@sap/eslint-plugin-cds');
|
||||
|
||||
module.exports = [
|
||||
cds.configs.recommended,
|
||||
{
|
||||
"files": ["**/*.js"],
|
||||
...js.configs.recommended,
|
||||
"languageOptions": {
|
||||
"globals": {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
...globals.jest,
|
||||
...globals.mocha,
|
||||
"es2022": true
|
||||
},
|
||||
},
|
||||
"rules": {
|
||||
...js.configs.recommended.rules,
|
||||
"no-console": "off",
|
||||
"require-atomic-updates": "off",
|
||||
"require-await": "warn",
|
||||
"no-unused-vars": ["warn", { "argsIgnorePattern": "_" }]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "approuter",
|
||||
"dependencies": {
|
||||
"@sap/approuter": "^16.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node node_modules/@sap/approuter/approuter.js"
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"welcomeFile": "app/index.html",
|
||||
"routes": [
|
||||
{
|
||||
"source": "^/app/(.*)$",
|
||||
"target": "$1",
|
||||
"localDir": ".",
|
||||
"cacheControl": "no-cache, no-store, must-revalidate"
|
||||
},
|
||||
{
|
||||
"source": "^/appconfig/",
|
||||
"localDir": ".",
|
||||
"cacheControl": "no-cache, no-store, must-revalidate"
|
||||
},
|
||||
{
|
||||
"source": "^/(.*)$",
|
||||
"target": "$1",
|
||||
"destination": "srv-api",
|
||||
"csrfProtection": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,2 +1 @@
|
||||
using from './db/common';
|
||||
using from './app/services';
|
||||
@@ -1,69 +0,0 @@
|
||||
_schema-version: '3.1'
|
||||
ID: capire.fiori
|
||||
version: 1.0.0
|
||||
description: "A simple CAP project."
|
||||
parameters:
|
||||
enable-parallel-deployments: true
|
||||
build-parameters:
|
||||
before-all:
|
||||
- builder: custom
|
||||
commands:
|
||||
- npm ci
|
||||
- npx cds build --production
|
||||
modules:
|
||||
- name: fiori-srv
|
||||
type: nodejs
|
||||
path: gen/srv
|
||||
parameters:
|
||||
buildpack: nodejs_buildpack
|
||||
readiness-health-check-type: http
|
||||
readiness-health-check-http-endpoint: /health
|
||||
build-parameters:
|
||||
builder: npm
|
||||
provides:
|
||||
- name: srv-api # required by consumers of CAP services (e.g. approuter)
|
||||
properties:
|
||||
srv-url: ${default-url}
|
||||
requires:
|
||||
- name: fiori-auth
|
||||
- name: fiori-destination
|
||||
- name: fiori-messaging
|
||||
- name: samples-db
|
||||
|
||||
- name: fiori
|
||||
type: approuter.nodejs
|
||||
path: app/router
|
||||
parameters:
|
||||
keep-existing-routes: true
|
||||
disk-quota: 256M
|
||||
memory: 256M
|
||||
requires:
|
||||
- name: srv-api
|
||||
group: destinations
|
||||
properties:
|
||||
name: srv-api # must be used in xs-app.json as well
|
||||
url: ~{srv-url}
|
||||
forwardAuthToken: true
|
||||
- name: fiori-auth
|
||||
|
||||
resources:
|
||||
- name: fiori-auth
|
||||
type: org.cloudfoundry.managed-service
|
||||
parameters:
|
||||
service: xsuaa
|
||||
service-plan: application
|
||||
path: ./xs-security.json
|
||||
config:
|
||||
xsappname: fiori-${org}-${space}
|
||||
tenant-mode: dedicated
|
||||
- name: fiori-destination
|
||||
type: org.cloudfoundry.managed-service
|
||||
parameters:
|
||||
service: destination
|
||||
service-plan: lite
|
||||
- name: fiori-messaging
|
||||
type: org.cloudfoundry.managed-service
|
||||
parameters:
|
||||
service: enterprise-messaging
|
||||
service-plan: default
|
||||
path: ./event-mesh.json
|
||||
@@ -38,15 +38,6 @@
|
||||
"db": {
|
||||
"kind": "sql"
|
||||
},
|
||||
"[multimodule]": {
|
||||
"db": {
|
||||
"kind": "sqlite",
|
||||
"impl": "@cap-js/sqlite",
|
||||
"credentials": {
|
||||
"url": "../db.sqlite"
|
||||
}
|
||||
}
|
||||
},
|
||||
"db-ext": {
|
||||
"[development]": {
|
||||
"model": "db/sqlite"
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"scopes": [
|
||||
{
|
||||
"name": "$XSAPPNAME.emcallback",
|
||||
"description": "Enterprise-Messaging Callback Access",
|
||||
"grant-as-authority-to-apps": [
|
||||
"$XSSERVICENAME(fiori-messaging)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "$XSAPPNAME.emmanagement",
|
||||
"description": "Enterprise-Messaging Management Access"
|
||||
}
|
||||
],
|
||||
"attributes": [],
|
||||
"role-templates": [],
|
||||
"authorities-inheritance": false,
|
||||
"authorities": [
|
||||
"$XSAPPNAME.emmanagement",
|
||||
"$XSAPPNAME.mtcallback"
|
||||
]
|
||||
}
|
||||
27
mta.yaml
27
mta.yaml
@@ -1,27 +0,0 @@
|
||||
_schema-version: '3.1'
|
||||
ID: capire.samples
|
||||
version: 2.0.0
|
||||
description: "A monorepo with several samples for CAP."
|
||||
parameters:
|
||||
enable-parallel-deployments: true
|
||||
build-parameters:
|
||||
before-all:
|
||||
- builder: custom
|
||||
commands:
|
||||
- npm ci
|
||||
- npx cds build --production --ws
|
||||
modules:
|
||||
- name: samples-db-deployer
|
||||
type: hdb
|
||||
path: gen/db
|
||||
parameters:
|
||||
buildpack: nodejs_buildpack
|
||||
requires:
|
||||
- name: samples-db
|
||||
|
||||
resources:
|
||||
- name: samples-db
|
||||
type: com.sap.xs.hdi-container
|
||||
parameters:
|
||||
service: hana
|
||||
service-plan: hdi-shared
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "approuter",
|
||||
"dependencies": {
|
||||
"@sap/approuter": "^16.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node node_modules/@sap/approuter/approuter.js"
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"welcomeFile": "app/index.html",
|
||||
"routes": [
|
||||
{
|
||||
"source": "^/app/(.*)$",
|
||||
"target": "$1",
|
||||
"localDir": ".",
|
||||
"cacheControl": "no-cache, no-store, must-revalidate"
|
||||
},
|
||||
{
|
||||
"source": "^/appconfig/",
|
||||
"localDir": ".",
|
||||
"cacheControl": "no-cache, no-store, must-revalidate"
|
||||
},
|
||||
{
|
||||
"source": "^/(.*)$",
|
||||
"target": "$1",
|
||||
"destination": "srv-api",
|
||||
"csrfProtection": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
_schema-version: '3.1'
|
||||
ID: capire.orders
|
||||
version: 1.0.0
|
||||
description: "A simple CAP project."
|
||||
parameters:
|
||||
enable-parallel-deployments: true
|
||||
build-parameters:
|
||||
before-all:
|
||||
- builder: custom
|
||||
commands:
|
||||
- npm ci
|
||||
- npx cds build --production
|
||||
modules:
|
||||
- name: orders-srv
|
||||
type: nodejs
|
||||
path: gen/srv
|
||||
parameters:
|
||||
buildpack: nodejs_buildpack
|
||||
readiness-health-check-type: http
|
||||
readiness-health-check-http-endpoint: /health
|
||||
build-parameters:
|
||||
builder: npm
|
||||
provides:
|
||||
- name: srv-api # required by consumers of CAP services (e.g. approuter)
|
||||
properties:
|
||||
srv-url: ${default-url}
|
||||
requires:
|
||||
- name: orders-auth
|
||||
|
||||
- name: orders
|
||||
type: approuter.nodejs
|
||||
path: app/router
|
||||
parameters:
|
||||
keep-existing-routes: true
|
||||
disk-quota: 256M
|
||||
memory: 256M
|
||||
requires:
|
||||
- name: srv-api
|
||||
group: destinations
|
||||
properties:
|
||||
name: srv-api # must be used in xs-app.json as well
|
||||
url: ~{srv-url}
|
||||
forwardAuthToken: true
|
||||
- name: orders-auth
|
||||
|
||||
resources:
|
||||
- name: orders-auth
|
||||
type: org.cloudfoundry.managed-service
|
||||
parameters:
|
||||
service: xsuaa
|
||||
service-plan: application
|
||||
path: ./xs-security.json
|
||||
config:
|
||||
xsappname: orders-${org}-${space}
|
||||
tenant-mode: dedicated
|
||||
@@ -4,19 +4,5 @@
|
||||
"dependencies": {
|
||||
"@capire/common": "*",
|
||||
"@sap/cds": ">=5"
|
||||
},
|
||||
"cds": {
|
||||
"requires": {
|
||||
"db": { "kind": "sql" },
|
||||
"[multimodule]": {
|
||||
"db": {
|
||||
"kind": "sqlite",
|
||||
"impl": "@cap-js/sqlite",
|
||||
"credentials": {
|
||||
"url": "../db.sqlite"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"scopes": [],
|
||||
"attributes": [],
|
||||
"role-templates": []
|
||||
}
|
||||
447
package-lock.json
generated
447
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@@ -5,7 +5,6 @@
|
||||
"repository": "https://github.com/sap-samples/cloud-cap-samples.git",
|
||||
"author": "daniel.hutzel@sap.com",
|
||||
"dependencies": {
|
||||
"@sap-cloud-sdk/resilience": "^3.14.0",
|
||||
"@sap/cds": ">=7"
|
||||
},
|
||||
"workspaces": [
|
||||
@@ -22,12 +21,12 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@cap-js/sqlite": "^1",
|
||||
"@sap/cds-dk": "^7",
|
||||
"@sap/eslint-plugin-cds": "^2.6.1",
|
||||
"@sap/eslint-plugin-cds": "^3",
|
||||
"axios": "^1",
|
||||
"chai": "^4.3.4",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
"chai-subset": "^1.6.0",
|
||||
"eslint": "^9",
|
||||
"semver": "^7"
|
||||
},
|
||||
"scripts": {
|
||||
@@ -53,16 +52,6 @@
|
||||
"parallel": true,
|
||||
"timeout": 6666
|
||||
},
|
||||
"cds": {
|
||||
"requires": {
|
||||
"db": {
|
||||
"kind": "sql",
|
||||
"[development]": {
|
||||
"model": "db/sqlite"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"private": true
|
||||
}
|
||||
|
||||
@@ -17,17 +17,7 @@
|
||||
"[hybrid]": { "kind": "enterprise-messaging-shared" },
|
||||
"[production]": { "kind": "enterprise-messaging" }
|
||||
},
|
||||
|
||||
"db": { "kind": "sql" },
|
||||
"[multimodule]": {
|
||||
"db": {
|
||||
"kind": "sqlite",
|
||||
"impl": "@cap-js/sqlite",
|
||||
"credentials": {
|
||||
"url": "../db.sqlite"
|
||||
}
|
||||
}
|
||||
}
|
||||
"db": { "kind": "sql" }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user