Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 27, 2023
2 parents 14a6027 + 48c6fd0 commit 1cfa34c
Show file tree
Hide file tree
Showing 115 changed files with 1,137 additions and 482 deletions.
10 changes: 5 additions & 5 deletions ee/sso-oidc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@steedos/ee_sso-oidc",
"version": "2.5.17-beta.8",
"version": "2.5.17-beta.9",
"main": "package.service.js",
"scripts": {
"build": "tsc"
Expand All @@ -11,14 +11,14 @@
"access": "public"
},
"dependencies": {
"@steedos/accounts": "2.5.17-beta.8",
"@steedos/objectql": "2.5.17-beta.8",
"@steedos/service-package-loader": "2.5.17-beta.8",
"@steedos/accounts": "2.5.17-beta.9",
"@steedos/objectql": "2.5.17-beta.9",
"@steedos/service-package-loader": "2.5.17-beta.9",
"@techpass/passport-openidconnect": "^0.3.2",
"express": "4.18.1",
"node-fetch": "^2.6.7",
"passport": "^0.6.0",
"request-ip": "^2.2.0"
},
"gitHead": "a4bfc7089af2c007f24f6a2c50e39248968be149"
"gitHead": "a7e9f116971d37d386d71bc8ed84e15dcc5d7946"
}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
],
"useWorkspaces": true,
"npmClient": "yarn",
"version": "2.5.17-beta.8"
"version": "2.5.17-beta.9"
}
12 changes: 6 additions & 6 deletions packages/accounts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@steedos/accounts",
"private": false,
"version": "2.5.17-beta.8",
"version": "2.5.17-beta.9",
"main": "lib/index.js",
"files": [
"/package.json",
Expand Down Expand Up @@ -55,20 +55,20 @@
"validator": "^13.6.0"
},
"devDependencies": {
"@steedos/auth": "2.5.17-beta.8",
"@steedos/meteor-bundle-runner": "2.5.17-beta.8",
"@steedos/objectql": "2.5.17-beta.8",
"@steedos/auth": "2.5.17-beta.9",
"@steedos/meteor-bundle-runner": "2.5.17-beta.9",
"@steedos/objectql": "2.5.17-beta.9",
"@types/dotenv-flow": "^3.0.0",
"@types/node": "12.6.8",
"cross-env": "^7.0.3",
"dotenv": "^8.2.0",
"dotenv-flow": "^3.1.0",
"nodemon": "^2.0.19",
"steedos-server": "2.5.17-beta.8",
"steedos-server": "2.5.17-beta.9",
"typescript": "4.6.3"
},
"publishConfig": {
"access": "public"
},
"gitHead": "a4bfc7089af2c007f24f6a2c50e39248968be149"
"gitHead": "a7e9f116971d37d386d71bc8ed84e15dcc5d7946"
}
8 changes: 4 additions & 4 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@steedos/auth",
"private": false,
"version": "2.5.17-beta.8",
"version": "2.5.17-beta.9",
"main": "lib/index.js",
"scripts": {
"watch": "tsc --watch",
Expand All @@ -13,8 +13,8 @@
"access": "public"
},
"dependencies": {
"@steedos/cachers": "2.5.17-beta.8",
"@steedos/objectql": "2.5.17-beta.8",
"@steedos/cachers": "2.5.17-beta.9",
"@steedos/objectql": "2.5.17-beta.9",
"cookies": "^0.8.0",
"express": "^4.16.4",
"ismobilejs": "^1.1.1",
Expand All @@ -25,5 +25,5 @@
"devDependencies": {
"typescript": "4.6.3"
},
"gitHead": "a4bfc7089af2c007f24f6a2c50e39248968be149"
"gitHead": "a7e9f116971d37d386d71bc8ed84e15dcc5d7946"
}
4 changes: 2 additions & 2 deletions packages/cachers/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@steedos/cachers",
"private": false,
"version": "2.5.17-beta.8",
"version": "2.5.17-beta.9",
"description": "",
"main": "lib/index.js",
"scripts": {
Expand All @@ -19,5 +19,5 @@
"publishConfig": {
"access": "public"
},
"gitHead": "a4bfc7089af2c007f24f6a2c50e39248968be149"
"gitHead": "a7e9f116971d37d386d71bc8ed84e15dcc5d7946"
}
8 changes: 4 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "steedos-cli",
"version": "2.5.17-beta.8",
"version": "2.5.17-beta.9",
"description": "Develop and run your enterprise apps in miniutes",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -38,8 +38,8 @@
"@oclif/command": "^1.8.16",
"@oclif/config": "^1.8.3",
"@oclif/plugin-help": "^5.1.12",
"@steedos/metadata-core": "2.5.17-beta.8",
"@steedos/metadata-registrar": "2.5.17-beta.8",
"@steedos/metadata-core": "2.5.17-beta.9",
"@steedos/metadata-registrar": "2.5.17-beta.9",
"archiver": "^5.0.2",
"chalk": "2.4.2",
"change-case": "^3.1.0",
Expand Down Expand Up @@ -82,5 +82,5 @@
"publishConfig": {
"access": "public"
},
"gitHead": "a4bfc7089af2c007f24f6a2c50e39248968be149"
"gitHead": "a7e9f116971d37d386d71bc8ed84e15dcc5d7946"
}
6 changes: 3 additions & 3 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": false,
"name": "@steedos/client",
"version": "2.5.17-beta.8",
"version": "2.5.17-beta.9",
"description": "client lib for steedos",
"main": "lib/index.js",
"scripts": {
Expand All @@ -17,8 +17,8 @@
},
"license": "MIT",
"dependencies": {
"@steedos/filters": "2.5.17-beta.8",
"@steedos/filters": "2.5.17-beta.9",
"node-fetch": "^2.6.7"
},
"gitHead": "a4bfc7089af2c007f24f6a2c50e39248968be149"
"gitHead": "a7e9f116971d37d386d71bc8ed84e15dcc5d7946"
}
24 changes: 12 additions & 12 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@steedos/core",
"private": false,
"version": "2.5.17-beta.8",
"version": "2.5.17-beta.9",
"description": "",
"main": "lib/index.js",
"scripts": {
Expand All @@ -14,15 +14,15 @@
"author": "",
"license": "ISC",
"dependencies": {
"@steedos/auth": "2.5.17-beta.8",
"@steedos/filters": "2.5.17-beta.8",
"@steedos/i18n": "2.5.17-beta.8",
"@steedos/metadata-core": "2.5.17-beta.8",
"@steedos/migrate": "2.5.17-beta.8",
"@steedos/objectql": "2.5.17-beta.8",
"@steedos/odata-v4-mongodb": "2.5.17-beta.8",
"@steedos/process": "2.5.17-beta.8",
"@steedos/standard-objects": "2.5.17-beta.8",
"@steedos/auth": "2.5.17-beta.9",
"@steedos/filters": "2.5.17-beta.9",
"@steedos/i18n": "2.5.17-beta.9",
"@steedos/metadata-core": "2.5.17-beta.9",
"@steedos/migrate": "2.5.17-beta.9",
"@steedos/objectql": "2.5.17-beta.9",
"@steedos/odata-v4-mongodb": "2.5.17-beta.9",
"@steedos/process": "2.5.17-beta.9",
"@steedos/standard-objects": "2.5.17-beta.9",
"body-parser": "^1.18.1",
"bunyan-sfdx-no-dtrace": "^1.8.2",
"clone": "^2.1.2",
Expand All @@ -45,7 +45,7 @@
"devDependencies": {
"@salesforce/kit": "1.0.4",
"@salesforce/ts-types": "1.1.2",
"@steedos/meteor-bundle-runner": "2.5.17-beta.8",
"@steedos/meteor-bundle-runner": "2.5.17-beta.9",
"@types/express": "^4.16.1",
"@types/node": "^11.10.4",
"@types/underscore": "^1.8.13",
Expand All @@ -57,5 +57,5 @@
"publishConfig": {
"access": "public"
},
"gitHead": "a4bfc7089af2c007f24f6a2c50e39248968be149"
"gitHead": "a7e9f116971d37d386d71bc8ed84e15dcc5d7946"
}
8 changes: 4 additions & 4 deletions packages/create-steedos-app/create-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ export async function createApp({
* Default dependencies.
*/
const dependencies = [
'@steedos/service-package-loader',
'dotenv-flow',
'moleculer-repl'
'@steedos/service-package-loader'
]
/**
* Default devDependencies.
*/
const devDependencies = []
const devDependencies = [
'moleculer-repl'
]
/**
* TypeScript projects will have type definitions and other devDependencies.
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/create-steedos-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-steedos-app",
"version": "2.5.17-beta.8",
"version": "2.5.17-beta.9",
"keywords": [
"react",
"steedos"
Expand Down Expand Up @@ -49,5 +49,5 @@
"engines": {
"node": ">=12.22.0"
},
"gitHead": "a4bfc7089af2c007f24f6a2c50e39248968be149"
"gitHead": "a7e9f116971d37d386d71bc8ed84e15dcc5d7946"
}
1 change: 1 addition & 0 deletions packages/create-steedos-app/templates/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"@steedos/service-package-loader": "^2.5"
},
"devDependencies": {
"moleculer-repl": "^0.7.4"
}
}
4 changes: 2 additions & 2 deletions packages/create-steedos-package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-steedos-package",
"version": "2.5.17-beta.8",
"version": "2.5.17-beta.9",
"keywords": [
"steedos"
],
Expand Down Expand Up @@ -39,5 +39,5 @@
"publishConfig": {
"access": "public"
},
"gitHead": "a4bfc7089af2c007f24f6a2c50e39248968be149"
"gitHead": "a7e9f116971d37d386d71bc8ed84e15dcc5d7946"
}
100 changes: 79 additions & 21 deletions packages/data-import/README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,105 @@
<!--
* @Author: [email protected]
* @Date: 2021-10-21 09:57:01
* @LastEditors: sunhaolin@hotoa.com
* @LastEditTime: 2022-07-15 14:18:13
* @LastEditors: 孙浩林 sunhaolin@steedos.com
* @LastEditTime: 2023-10-27 12:55:47
* @Description:
-->
## 功能说明
- 此包是系统设置中的数据导入功能,可通过excel导入对象数据

### 提供importData函数支持导入.data.json、.data.csv、.flow.json数据
### 提供importData action 支持导入{objectname}.data.json、{objectname}.data.csv、{flowApiname}.flow.data.json数据

- 比如在自定义的软件包package.service.js中监听系统初始化事件或者服务启动时调用importData导入软件包中的数据
- 比如在自定义的软件包package.service.js中监听系统初始化事件调用importData导入软件包中的数据

```js
const { importData } = require('@steedos/data-import')
const path = require('path')

module.exports = {
/**
* Events
*/
events: {
// 系统初始化成功
'service-cloud-init.succeeded': async function (ctx) {
await importData(path.join(__dirname, 'main', 'default', 'data'));
await this.broker.call("~packages-@steedos/data-import.importData", {
data: {
"csv": csvData,
"json": jsonData,
"flow": flowData,
},
spaceId,
onlyInsert: true,
})
}
},
/**
* Service started lifecycle event handler
*/
async started() {
await importData(path.join(__dirname, 'main', 'default', 'data'));
},
};
```

- importData 函数参数说明
- importData action 参数说明
```js
/**
*
* @param {*} filePath 要导入数据的文件夹路径
* @param {*} onlyInsert 仅导入,在导入数据之前先检查,如果存在任意一条记录,则不执行导入,默认true,如果是false, 则如果存在则执行更新操作。
*/
export async function importData(filePath: string, onlyInsert: boolean = true) {
// 函数体
* 参数示例:
{
data: {
"csv": [{ objectName: 'warehouse', records: [ [Object] ]],
"json": [{ objectName: 'house', records: [ [Object] ]],
"flow": { flowApiName1: {}, flowApiName2: {} },
},
spaceId,
onlyInsert: true,
}
*/
"importData": {
params: {
data: {
type: "object",
props: {
csv: {
type: "array",
items: {
type: "object",
props: {
objectName: { type: "string" },
records: { type: "array", items: "object" },
}
},
optional: true,
},
json: {
type: "array",
items: {
type: "object",
props: {
objectName: { type: "string" },
records: { type: "array", items: "object" },
}
},
optional: true,
},
flow: {
type: "object",
optional: true,
},
}
},
spaceId: { type: "string" },
onlyInsert: { type: "boolean", optional: true, default: true }, // 仅新增,在导入数据之前先检查,如果存在任意一条记录,则不执行导入,默认true,如果是false, 则如果存在则执行更新操作。
},
async handler(ctx) {

}
}
```
```
## 使用mongodb cli 导出演示数据
- json: 使用命令导出。例如: `mongoexport --uri="mongodb://192.168.3.31:27017/steedos-apps" --jsonArray --collection=contract_types --out=contract_types.data.json`
- csv: 使用命令导出。例如: `mongoexport --uri="mongodb://192.168.3.31:27017/steedos-apps" --collection=contract_types --type=csv --fields=name,code --out=contract_types.data.csv`

## 编码要求
json、csv中文件请使用`utf-8`编码

## 示例,导出合同模块数据, 进入`main\default\data`文件夹后执行以下命令
```
mongoexport --uri="mongodb://192.168.3.31:27017/steedos-apps" --collection=contract_types --type=csv --fields=name,code --out=contract_types.data.csv
mongoexport --uri="mongodb://192.168.3.31:27017/steedos-apps" --jsonArray --collection=contracts --out=contracts.data.json
```
Loading

0 comments on commit 1cfa34c

Please sign in to comment.