@amplicode/create-amplicode
Advanced tools
Comparing version 0.10.5 to 0.10.6
@@ -1531,3 +1531,3 @@ #!/usr/bin/env node | ||
module.exports = JSON.parse('{"name":"@amplicode/create-amplicode","version":"0.10.5","description":"Create amplicode app","keywords":["code","typescript","react","generate"],"bin":{"create-amplicode":"dist/index.js"},"files":["dist/*","templates/*"],"dependencies":{"ejs":"^3.1.9","minimist":"^1.2.8"},"devDependencies":{"@types/ejs":"^3.1.5","@types/minimist":"^1.2.5","@types/node":"^20.11.2","copy-webpack-plugin":"^12.0.1","ts-loader":"^9.5.1","typescript":"^5.2.2","webpack":"^5.89.0","webpack-cli":"^5.1.4"},"scripts":{"build":"webpack","watch":"webpack --watch","generate:ra":"npm run build && node ./dist/index.js --appName ra-test --template react-admin --serverUrl localhost:8080 --restBasePath /rest --schema \'[{\\"entity\\":\\"owners\\",\\"screens\\":[\\"list\\",\\"edit\\"]}]\' --targetDir ../test-ra-app","test":"echo \\"Error: no test specified\\" && exit 1"},"publishConfig":{"access":"public"},"repository":"https://github.com/Amplicode/amplicode-create-app","author":"Amplicode","license":"Apache-2.0"}'); | ||
module.exports = JSON.parse('{"name":"@amplicode/create-amplicode","version":"0.10.6","description":"Create amplicode app","keywords":["code","typescript","react","generate"],"bin":{"create-amplicode":"dist/index.js"},"files":["dist/*","templates/*"],"dependencies":{"ejs":"^3.1.9","minimist":"^1.2.8"},"devDependencies":{"@types/ejs":"^3.1.5","@types/minimist":"^1.2.5","@types/node":"^20.11.2","copy-webpack-plugin":"^12.0.1","ts-loader":"^9.5.1","typescript":"^5.2.2","webpack":"^5.89.0","webpack-cli":"^5.1.4"},"scripts":{"build":"webpack","watch":"webpack --watch","generate:ra":"npm run build && node ./dist/index.js --appName ra-test --template react-admin --serverUrl localhost:8080 --restBasePath /rest --schema \'[{\\"entity\\":\\"owners\\",\\"screens\\":[\\"list\\",\\"edit\\"]}]\' --targetDir ../test-ra-app","test":"echo \\"Error: no test specified\\" && exit 1"},"publishConfig":{"access":"public"},"repository":"https://github.com/Amplicode/amplicode-create-app","author":"Amplicode","license":"Apache-2.0"}'); | ||
@@ -1534,0 +1534,0 @@ /***/ }) |
{ | ||
"name": "@amplicode/create-amplicode", | ||
"version": "0.10.5", | ||
"version": "0.10.6", | ||
"description": "Create amplicode app", | ||
@@ -5,0 +5,0 @@ "keywords": ["code", "typescript", "react", "generate"], |
@@ -87,4 +87,3 @@ import { stringify } from "query-string"; | ||
if (json.content !== undefined) { | ||
// Page | ||
let total: number; | ||
let total: number | undefined; | ||
if (json.totalElements !== undefined){ | ||
@@ -94,8 +93,10 @@ total = json.totalElements | ||
total = json.page.totalElements; | ||
} else { | ||
throw new Error("Unsupported getList() response: " + Object.keys(json)); | ||
} | ||
return { | ||
data: json.content, | ||
total, | ||
pageInfo: 'last' in json ? { | ||
hasNextPage: !json.last | ||
} : undefined, | ||
}; | ||
@@ -102,0 +103,0 @@ } else if (Array.isArray(json)) { |
115840