@tachybase/plugin-workflow-test 1.3.21 → 1.3.23

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.
@@ -1,10 +1,7 @@
1
1
  module.exports = {
2
- "@tachybase/client": "1.3.21",
3
- "@tachybase/utils": "1.3.21",
2
+ "@tachybase/client": "1.3.23",
3
+ "dayjs": "1.11.13",
4
4
  "lodash": "4.17.21",
5
- "@tachybase/test": "1.3.21",
6
- "@tachybase/data-source": "1.3.21",
7
- "@tachybase/resourcer": "1.3.21",
8
- "@tachybase/server": "1.3.21",
9
- "@tachybase/database": "1.3.21"
5
+ "@tachybase/test": "1.3.43",
6
+ "@tego/server": "1.3.43"
10
7
  };
@@ -1,3 +1,3 @@
1
- import { CollectionOptions } from '@tachybase/database';
1
+ import { CollectionOptions } from '@tego/server';
2
2
  declare const _default: CollectionOptions;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { CollectionOptions } from '@tachybase/database';
1
+ import { CollectionOptions } from '@tego/server';
2
2
  declare const _default: CollectionOptions;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { CollectionOptions } from '@tachybase/database';
1
+ import { CollectionOptions } from '@tego/server';
2
2
  declare const _default: CollectionOptions;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { CollectionOptions } from '@tachybase/database';
1
+ import { CollectionOptions } from '@tego/server';
2
2
  declare const _default: CollectionOptions;
3
3
  export default _default;
@@ -1,5 +1,5 @@
1
- import { ApplicationOptions, Plugin } from '@tachybase/server';
2
1
  import { MockServer } from '@tachybase/test';
2
+ import { ApplicationOptions, Plugin } from '@tego/server';
3
3
  export interface MockServerOptions extends ApplicationOptions {
4
4
  collectionsPath?: string;
5
5
  }
@@ -32,11 +32,9 @@ __export(server_exports, {
32
32
  sleep: () => sleep
33
33
  });
34
34
  module.exports = __toCommonJS(server_exports);
35
- var import_path = __toESM(require("path"));
36
- var import_data_source = require("@tachybase/data-source");
37
- var import_server = require("@tachybase/server");
35
+ var import_node_path = __toESM(require("node:path"));
38
36
  var import_test = require("@tachybase/test");
39
- var import_utils = require("@tachybase/utils");
37
+ var import_server = require("@tego/server");
40
38
  var import_functions = __toESM(require("./functions"));
41
39
  var import_instructions = __toESM(require("./instructions"));
42
40
  var import_triggers = __toESM(require("./triggers"));
@@ -71,11 +69,11 @@ async function getApp(options = {}) {
71
69
  ]
72
70
  });
73
71
  await app.dataSourceManager.add(
74
- new import_data_source.SequelizeDataSource({
72
+ new import_server.SequelizeDataSource({
75
73
  name: "another",
76
74
  collectionManager: {
77
75
  database: (0, import_test.mockDatabase)({
78
- tablePrefix: `t${(0, import_utils.uid)(5)}`
76
+ tablePrefix: `t${(0, import_server.uid)(5)}`
79
77
  })
80
78
  },
81
79
  resourceManager: {}
@@ -84,7 +82,7 @@ async function getApp(options = {}) {
84
82
  const another = app.dataSourceManager.dataSources.get("another");
85
83
  const anotherDB = another.collectionManager.db;
86
84
  await anotherDB.import({
87
- directory: import_path.default.resolve(__dirname, "collections")
85
+ directory: import_node_path.default.resolve(__dirname, "collections")
88
86
  });
89
87
  await anotherDB.sync();
90
88
  another.acl.allow("*", "*");
@@ -92,7 +90,7 @@ async function getApp(options = {}) {
92
90
  }
93
91
  class WorkflowTestPlugin extends import_server.Plugin {
94
92
  async load() {
95
- await this.importCollections(import_path.default.resolve(__dirname, "collections"));
93
+ await this.importCollections(import_node_path.default.resolve(__dirname, "collections"));
96
94
  }
97
95
  }
98
96
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,6 +1,8 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __export = (target, all) => {
6
8
  for (var name in all)
@@ -14,19 +16,27 @@ var __copyProps = (to, from, except, desc) => {
14
16
  }
15
17
  return to;
16
18
  };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
17
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
28
  var instructions_exports = {};
19
29
  __export(instructions_exports, {
20
30
  default: () => instructions_default
21
31
  });
22
32
  module.exports = __toCommonJS(instructions_exports);
23
- var import_utils = require("@tachybase/utils");
33
+ var import_lodash = __toESM(require("lodash"));
24
34
  var instructions_default = {
25
35
  echo: {
26
36
  run({ config = {} }, { result }, processor) {
27
37
  return {
28
38
  status: 1,
29
- result: config.path == null ? result : import_utils.lodash.get(result, config.path)
39
+ result: config.path == null ? result : import_lodash.default.get(result, config.path)
30
40
  };
31
41
  }
32
42
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/plugin-workflow-test",
3
3
  "displayName": "Workflow: test kit",
4
- "version": "1.3.21",
4
+ "version": "1.3.23",
5
5
  "description": "Workflow Test Toolkit",
6
6
  "keywords": [
7
7
  "Workflow"
@@ -9,22 +9,14 @@
9
9
  "license": "Apache-2.0",
10
10
  "main": "dist/server/index.js",
11
11
  "types": "./dist/server/index.d.ts",
12
- "dependencies": {},
13
12
  "devDependencies": {
14
- "lodash": "4.17.21"
15
- },
16
- "peerDependencies": {
17
- "@tachybase/client": "1.3.21",
18
- "@tachybase/resourcer": "1.3.21",
19
- "@tachybase/data-source": "1.3.21",
20
- "@tachybase/server": "1.3.21",
21
- "@tachybase/database": "1.3.21",
22
- "@tachybase/test": "1.3.21",
23
- "@tachybase/utils": "1.3.21"
13
+ "@tachybase/test": "^1.3.43",
14
+ "@tego/client": "^1.3.43",
15
+ "@tego/server": "^1.3.43",
16
+ "dayjs": "^1.11.13",
17
+ "lodash": "4.17.21",
18
+ "@tachybase/client": "1.3.23"
24
19
  },
25
20
  "description.zh-CN": "工作流测试工具包",
26
- "displayName.zh-CN": "工作流:测试工具包",
27
- "scripts": {
28
- "build": "tachybase-build --no-dts @tachybase/plugin-workflow-test"
29
- }
21
+ "displayName.zh-CN": "工作流:测试工具包"
30
22
  }
@@ -1,5 +1,4 @@
1
- import { dayjs } from '@tachybase/utils';
2
-
1
+ import dayjs from 'dayjs';
3
2
  import { lowerCase } from 'lodash';
4
3
 
5
4
  /**
@@ -1,4 +1,4 @@
1
- import { CollectionOptions } from '@tachybase/database';
1
+ import { CollectionOptions } from '@tego/server';
2
2
 
3
3
  export default {
4
4
  name: 'categories',
@@ -1,4 +1,4 @@
1
- import { CollectionOptions } from '@tachybase/database';
1
+ import { CollectionOptions } from '@tego/server';
2
2
 
3
3
  export default {
4
4
  name: 'comments',
@@ -1,4 +1,4 @@
1
- import { CollectionOptions } from '@tachybase/database';
1
+ import { CollectionOptions } from '@tego/server';
2
2
 
3
3
  export default {
4
4
  name: 'posts',
@@ -1,4 +1,4 @@
1
- import { CollectionOptions } from '@tachybase/database';
1
+ import { CollectionOptions } from '@tego/server';
2
2
 
3
3
  export default {
4
4
  name: 'tags',
@@ -1,9 +1,7 @@
1
- import path from 'path';
2
- import { SequelizeDataSource } from '@tachybase/data-source';
3
- import { Resourcer } from '@tachybase/resourcer';
4
- import { ApplicationOptions, Plugin } from '@tachybase/server';
1
+ import path from 'node:path';
5
2
  import { createMockServer, mockDatabase, MockServer } from '@tachybase/test';
6
- import { uid } from '@tachybase/utils';
3
+
4
+ import { ApplicationOptions, Plugin, Resourcer, SequelizeDataSource, uid } from '@tego/server';
7
5
 
8
6
  import functions from './functions';
9
7
  import instructions from './instructions';
@@ -1,4 +1,4 @@
1
- import { lodash } from '@tachybase/utils';
1
+ import lodash from 'lodash';
2
2
 
3
3
  export default {
4
4
  echo: {