n8n-nodes-pb 1.0.0 → 1.0.2

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.
@@ -8,40 +8,40 @@ class PocketBaseApi {
8
8
  this.documentationUrl = 'https://pocketbase.io/docs';
9
9
  this.properties = [
10
10
  {
11
- displayName: 'PocketBase URL',
11
+ displayName: 'PocketBase 地址',
12
12
  name: 'url',
13
13
  type: 'string',
14
14
  default: 'http://127.0.0.1:8090',
15
15
  placeholder: 'https://your-pocketbase.com',
16
- description: 'The URL of your PocketBase instance',
16
+ description: 'PocketBase 服务器的 URL 地址',
17
17
  required: true,
18
18
  },
19
19
  {
20
- displayName: 'Email',
20
+ displayName: '邮箱',
21
21
  name: 'email',
22
22
  type: 'string',
23
23
  default: '',
24
24
  placeholder: 'admin@example.com',
25
- description: 'Admin or user email for authentication',
25
+ description: '管理员或用户邮箱',
26
26
  required: true,
27
27
  },
28
28
  {
29
- displayName: 'Password',
29
+ displayName: '密码',
30
30
  name: 'password',
31
31
  type: 'string',
32
32
  typeOptions: {
33
33
  password: true,
34
34
  },
35
35
  default: '',
36
- description: 'Password for authentication',
36
+ description: '账户密码',
37
37
  required: true,
38
38
  },
39
39
  {
40
- displayName: 'Auth Collection',
40
+ displayName: '认证集合',
41
41
  name: 'authCollection',
42
42
  type: 'string',
43
43
  default: '_superusers',
44
- description: 'The auth collection to authenticate against (e.g., _superusers, users)',
44
+ description: '用于认证的集合名称(如 _superusers, users',
45
45
  },
46
46
  ];
47
47
  this.authenticate = {
Binary file
@@ -8,13 +8,13 @@ const FileDescription_1 = require("./descriptions/FileDescription");
8
8
  class PocketBase {
9
9
  constructor() {
10
10
  this.description = {
11
- displayName: 'PocketBase',
11
+ displayName: 'PocketBase 数据库',
12
12
  name: 'pocketBase',
13
- icon: 'file:pocketbase.svg',
13
+ icon: 'file:pocketbase.png',
14
14
  group: ['transform'],
15
15
  version: 1,
16
16
  subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
17
- description: 'Interact with PocketBase API',
17
+ description: ' PocketBase 数据库进行交互',
18
18
  defaults: {
19
19
  name: 'PocketBase',
20
20
  },
@@ -28,36 +28,36 @@ class PocketBase {
28
28
  ],
29
29
  properties: [
30
30
  {
31
- displayName: 'Resource',
31
+ displayName: '资源',
32
32
  name: 'resource',
33
33
  type: 'options',
34
34
  noDataExpression: true,
35
35
  options: [
36
36
  {
37
- name: 'Record',
37
+ name: '📄 记录',
38
38
  value: 'record',
39
- description: 'Work with records in a collection',
39
+ description: '操作数据库中的记录',
40
40
  },
41
41
  {
42
- name: 'Collection',
42
+ name: '📁 集合',
43
43
  value: 'collection',
44
- description: 'Work with collections',
44
+ description: '管理数据集合',
45
45
  },
46
46
  {
47
- name: 'File',
47
+ name: '📎 文件',
48
48
  value: 'file',
49
- description: 'Work with files',
49
+ description: '管理文件和附件',
50
50
  },
51
51
  {
52
- name: 'Health',
52
+ name: '💚 健康检查',
53
53
  value: 'health',
54
- description: 'Check server health',
54
+ description: '检查服务器状态',
55
55
  },
56
56
  ],
57
57
  default: 'record',
58
58
  },
59
59
  {
60
- displayName: 'Operation',
60
+ displayName: '操作',
61
61
  name: 'operation',
62
62
  type: 'options',
63
63
  noDataExpression: true,
@@ -68,10 +68,10 @@ class PocketBase {
68
68
  },
69
69
  options: [
70
70
  {
71
- name: 'Check',
71
+ name: '检查状态',
72
72
  value: 'check',
73
- description: 'Check server health status',
74
- action: 'Check health',
73
+ description: '检查服务器健康状态',
74
+ action: '检查服务器状态',
75
75
  },
76
76
  ],
77
77
  default: 'check',
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.collectionFields = exports.collectionOperations = void 0;
4
4
  exports.collectionOperations = [
5
5
  {
6
- displayName: 'Operation',
6
+ displayName: '操作',
7
7
  name: 'operation',
8
8
  type: 'options',
9
9
  noDataExpression: true,
@@ -14,16 +14,16 @@ exports.collectionOperations = [
14
14
  },
15
15
  options: [
16
16
  {
17
- name: 'Get Many',
17
+ name: '📋 获取所有集合',
18
18
  value: 'getMany',
19
- description: 'Get all collections',
20
- action: 'Get many collections',
19
+ description: '获取所有数据集合',
20
+ action: '获取所有集合',
21
21
  },
22
22
  {
23
- name: 'Get',
23
+ name: '🔍 获取集合详情',
24
24
  value: 'get',
25
- description: 'Get a collection by ID or name',
26
- action: 'Get a collection',
25
+ description: '通过 ID 或名称获取集合详情',
26
+ action: '获取集合详情',
27
27
  },
28
28
  ],
29
29
  default: 'getMany',
@@ -31,13 +31,13 @@ exports.collectionOperations = [
31
31
  ];
32
32
  exports.collectionFields = [
33
33
  {
34
- displayName: 'Collection ID or Name',
34
+ displayName: '集合 ID 或名称',
35
35
  name: 'collectionId',
36
36
  type: 'string',
37
37
  required: true,
38
38
  default: '',
39
39
  placeholder: 'notes',
40
- description: 'ID or name of the collection',
40
+ description: '集合的 ID 或名称',
41
41
  displayOptions: {
42
42
  show: {
43
43
  resource: ['collection'],
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fileFields = exports.fileOperations = void 0;
4
4
  exports.fileOperations = [
5
5
  {
6
- displayName: 'Operation',
6
+ displayName: '操作',
7
7
  name: 'operation',
8
8
  type: 'options',
9
9
  noDataExpression: true,
@@ -14,16 +14,16 @@ exports.fileOperations = [
14
14
  },
15
15
  options: [
16
16
  {
17
- name: 'Get URL',
17
+ name: '🔗 获取文件链接',
18
18
  value: 'getUrl',
19
- description: 'Get the URL of a file',
20
- action: 'Get file URL',
19
+ description: '获取文件的下载链接',
20
+ action: '获取文件链接',
21
21
  },
22
22
  {
23
- name: 'Get Token',
23
+ name: '🔑 获取访问令牌',
24
24
  value: 'getToken',
25
- description: 'Get a token for accessing protected files',
26
- action: 'Get file token',
25
+ description: '获取受保护文件的访问令牌',
26
+ action: '获取文件访问令牌',
27
27
  },
28
28
  ],
29
29
  default: 'getUrl',
@@ -31,13 +31,13 @@ exports.fileOperations = [
31
31
  ];
32
32
  exports.fileFields = [
33
33
  {
34
- displayName: 'Collection Name',
34
+ displayName: '集合名称',
35
35
  name: 'collection',
36
36
  type: 'string',
37
37
  required: true,
38
38
  default: '',
39
39
  placeholder: 'notes',
40
- description: 'Name of the collection',
40
+ description: '文件所属的集合名称',
41
41
  displayOptions: {
42
42
  show: {
43
43
  resource: ['file'],
@@ -46,13 +46,13 @@ exports.fileFields = [
46
46
  },
47
47
  },
48
48
  {
49
- displayName: 'Record ID',
49
+ displayName: '记录 ID',
50
50
  name: 'recordId',
51
51
  type: 'string',
52
52
  required: true,
53
53
  default: '',
54
54
  placeholder: 'abc123xyz',
55
- description: 'ID of the record',
55
+ description: '文件所属的记录 ID',
56
56
  displayOptions: {
57
57
  show: {
58
58
  resource: ['file'],
@@ -61,13 +61,13 @@ exports.fileFields = [
61
61
  },
62
62
  },
63
63
  {
64
- displayName: 'Filename',
64
+ displayName: '文件名',
65
65
  name: 'filename',
66
66
  type: 'string',
67
67
  required: true,
68
68
  default: '',
69
69
  placeholder: 'image.jpg',
70
- description: 'Name of the file',
70
+ description: '文件的名称',
71
71
  displayOptions: {
72
72
  show: {
73
73
  resource: ['file'],
@@ -76,10 +76,10 @@ exports.fileFields = [
76
76
  },
77
77
  },
78
78
  {
79
- displayName: 'Options',
79
+ displayName: '高级选项',
80
80
  name: 'options',
81
81
  type: 'collection',
82
- placeholder: 'Add Option',
82
+ placeholder: '添加选项',
83
83
  default: {},
84
84
  displayOptions: {
85
85
  show: {
@@ -89,12 +89,12 @@ exports.fileFields = [
89
89
  },
90
90
  options: [
91
91
  {
92
- displayName: 'Thumb',
92
+ displayName: '缩略图尺寸',
93
93
  name: 'thumb',
94
94
  type: 'string',
95
95
  default: '',
96
96
  placeholder: '100x100',
97
- description: 'Thumbnail size (e.g., 100x100, 0x300)',
97
+ description: '缩略图尺寸(如 100x100, 0x300',
98
98
  },
99
99
  ],
100
100
  },
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.recordFields = exports.recordOperations = void 0;
4
4
  exports.recordOperations = [
5
5
  {
6
- displayName: 'Operation',
6
+ displayName: '操作',
7
7
  name: 'operation',
8
8
  type: 'options',
9
9
  noDataExpression: true,
@@ -14,34 +14,34 @@ exports.recordOperations = [
14
14
  },
15
15
  options: [
16
16
  {
17
- name: 'Create',
17
+ name: '➕ 创建记录',
18
18
  value: 'create',
19
- description: 'Create a new record',
20
- action: 'Create a record',
19
+ description: '创建一条新记录',
20
+ action: '创建一条记录',
21
21
  },
22
22
  {
23
- name: 'Delete',
23
+ name: '🗑️ 删除记录',
24
24
  value: 'delete',
25
- description: 'Delete a record',
26
- action: 'Delete a record',
25
+ description: '删除一条记录',
26
+ action: '删除一条记录',
27
27
  },
28
28
  {
29
- name: 'Get',
29
+ name: '🔍 获取单条记录',
30
30
  value: 'get',
31
- description: 'Get a record by ID',
32
- action: 'Get a record',
31
+ description: '通过 ID 获取一条记录',
32
+ action: '获取一条记录',
33
33
  },
34
34
  {
35
- name: 'Get Many',
35
+ name: '📋 获取多条记录',
36
36
  value: 'getMany',
37
- description: 'Get many records',
38
- action: 'Get many records',
37
+ description: '获取多条记录(支持筛选)',
38
+ action: '获取多条记录',
39
39
  },
40
40
  {
41
- name: 'Update',
41
+ name: '✏️ 更新记录',
42
42
  value: 'update',
43
- description: 'Update a record',
44
- action: 'Update a record',
43
+ description: '更新一条记录',
44
+ action: '更新一条记录',
45
45
  },
46
46
  ],
47
47
  default: 'getMany',
@@ -49,13 +49,13 @@ exports.recordOperations = [
49
49
  ];
50
50
  exports.recordFields = [
51
51
  {
52
- displayName: 'Collection Name',
52
+ displayName: '集合名称',
53
53
  name: 'collection',
54
54
  type: 'string',
55
55
  required: true,
56
56
  default: '',
57
57
  placeholder: 'notes',
58
- description: 'Name of the collection to operate on',
58
+ description: '要操作的数据集合名称',
59
59
  displayOptions: {
60
60
  show: {
61
61
  resource: ['record'],
@@ -63,13 +63,13 @@ exports.recordFields = [
63
63
  },
64
64
  },
65
65
  {
66
- displayName: 'Record ID',
66
+ displayName: '记录 ID',
67
67
  name: 'recordId',
68
68
  type: 'string',
69
69
  required: true,
70
70
  default: '',
71
71
  placeholder: 'abc123xyz',
72
- description: 'ID of the record',
72
+ description: '记录的唯一标识符',
73
73
  displayOptions: {
74
74
  show: {
75
75
  resource: ['record'],
@@ -78,15 +78,15 @@ exports.recordFields = [
78
78
  },
79
79
  },
80
80
  {
81
- displayName: 'Fields',
81
+ displayName: '字段列表',
82
82
  name: 'fields',
83
83
  type: 'fixedCollection',
84
84
  typeOptions: {
85
85
  multipleValues: true,
86
86
  },
87
87
  default: {},
88
- placeholder: 'Add Field',
89
- description: 'Fields to set on the record',
88
+ placeholder: '添加字段',
89
+ description: '要设置的字段',
90
90
  displayOptions: {
91
91
  show: {
92
92
  resource: ['record'],
@@ -96,34 +96,34 @@ exports.recordFields = [
96
96
  options: [
97
97
  {
98
98
  name: 'field',
99
- displayName: 'Field',
99
+ displayName: '字段',
100
100
  values: [
101
101
  {
102
- displayName: 'Field Name',
102
+ displayName: '字段名',
103
103
  name: 'name',
104
104
  type: 'string',
105
105
  default: '',
106
106
  placeholder: 'title',
107
- description: 'Name of the field',
107
+ description: '字段的名称',
108
108
  },
109
109
  {
110
- displayName: 'Field Value',
110
+ displayName: '字段值',
111
111
  name: 'value',
112
112
  type: 'string',
113
113
  default: '',
114
- placeholder: 'My Title',
115
- description: 'Value of the field',
114
+ placeholder: '我的标题',
115
+ description: '字段的值',
116
116
  },
117
117
  ],
118
118
  },
119
119
  ],
120
120
  },
121
121
  {
122
- displayName: 'Return All',
122
+ displayName: '返回全部',
123
123
  name: 'returnAll',
124
124
  type: 'boolean',
125
125
  default: false,
126
- description: 'Whether to return all results or only up to a given limit',
126
+ description: '是否返回所有结果',
127
127
  displayOptions: {
128
128
  show: {
129
129
  resource: ['record'],
@@ -132,7 +132,7 @@ exports.recordFields = [
132
132
  },
133
133
  },
134
134
  {
135
- displayName: 'Limit',
135
+ displayName: '返回数量限制',
136
136
  name: 'limit',
137
137
  type: 'number',
138
138
  default: 50,
@@ -140,7 +140,7 @@ exports.recordFields = [
140
140
  minValue: 1,
141
141
  maxValue: 500,
142
142
  },
143
- description: 'Max number of results to return',
143
+ description: '最多返回的记录数量',
144
144
  displayOptions: {
145
145
  show: {
146
146
  resource: ['record'],
@@ -150,10 +150,10 @@ exports.recordFields = [
150
150
  },
151
151
  },
152
152
  {
153
- displayName: 'Options',
153
+ displayName: '高级选项',
154
154
  name: 'options',
155
155
  type: 'collection',
156
- placeholder: 'Add Option',
156
+ placeholder: '添加选项',
157
157
  default: {},
158
158
  displayOptions: {
159
159
  show: {
@@ -163,44 +163,44 @@ exports.recordFields = [
163
163
  },
164
164
  options: [
165
165
  {
166
- displayName: 'Filter',
166
+ displayName: '筛选条件',
167
167
  name: 'filter',
168
168
  type: 'string',
169
169
  default: '',
170
170
  placeholder: "status = 'active' && created > '2024-01-01'",
171
- description: 'Filter expression to apply',
171
+ description: '过滤表达式',
172
172
  },
173
173
  {
174
- displayName: 'Sort',
174
+ displayName: '排序方式',
175
175
  name: 'sort',
176
176
  type: 'string',
177
177
  default: '',
178
178
  placeholder: '-created,title',
179
- description: 'Sort order (use - for descending)',
179
+ description: '排序字段(使用 - 表示降序)',
180
180
  },
181
181
  {
182
- displayName: 'Expand',
182
+ displayName: '展开关联',
183
183
  name: 'expand',
184
184
  type: 'string',
185
185
  default: '',
186
186
  placeholder: 'author,tags',
187
- description: 'Comma-separated list of relations to expand',
187
+ description: '要展开的关联字段(逗号分隔)',
188
188
  },
189
189
  {
190
- displayName: 'Fields',
190
+ displayName: '返回字段',
191
191
  name: 'fields',
192
192
  type: 'string',
193
193
  default: '',
194
194
  placeholder: 'id,title,created',
195
- description: 'Comma-separated list of fields to return',
195
+ description: '要返回的字段(逗号分隔)',
196
196
  },
197
197
  ],
198
198
  },
199
199
  {
200
- displayName: 'Options',
200
+ displayName: '高级选项',
201
201
  name: 'options',
202
202
  type: 'collection',
203
- placeholder: 'Add Option',
203
+ placeholder: '添加选项',
204
204
  default: {},
205
205
  displayOptions: {
206
206
  show: {
@@ -210,12 +210,12 @@ exports.recordFields = [
210
210
  },
211
211
  options: [
212
212
  {
213
- displayName: 'Expand',
213
+ displayName: '展开关联',
214
214
  name: 'expand',
215
215
  type: 'string',
216
216
  default: '',
217
217
  placeholder: 'author,tags',
218
- description: 'Comma-separated list of relations to expand',
218
+ description: '要展开的关联字段(逗号分隔)',
219
219
  },
220
220
  ],
221
221
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-pb",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "n8n community node for PocketBase - Open Source backend with realtime database, authentication, and file storage",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",