@byted-apaas/server-sdk-node 0.0.2-beta.1 → 0.0.2-beta.3

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.
Files changed (163) hide show
  1. package/LICENSE +7 -0
  2. package/NOTICE +3 -0
  3. package/application/application.js +0 -1
  4. package/application/function/function.js +0 -1
  5. package/application/impl/common.js +0 -1
  6. package/application/impl/impl.js +2 -2
  7. package/constants/constants.js +2 -1
  8. package/context/context.js +2 -1
  9. package/context/db/db.js +2 -1
  10. package/context/db/impl/IObject.js +2 -1
  11. package/context/db/impl/db.js +0 -1
  12. package/context/db/impl/object.js +2 -1
  13. package/context/db/impl/oql/ioql.js +2 -1
  14. package/context/db/impl/oql/oql.js +2 -1
  15. package/context/db/impl/order.js +2 -1
  16. package/context/db/impl/propertiesStore.js +2 -1
  17. package/context/db/impl/queryBuilder.js +2 -1
  18. package/context/db/impl/transaction/index.js +2 -1
  19. package/context/db/impl/transaction/operation.js +0 -1
  20. package/context/db/impl/transaction.js +2 -1
  21. package/context/globalConfig/globalConfig.js +2 -1
  22. package/context/metadata/components/common.js +2 -1
  23. package/context/metadata/components/components.js +2 -1
  24. package/context/metadata/components/desktop/list.js +0 -1
  25. package/context/metadata/components/desktop/recordDetail.js +2 -1
  26. package/context/metadata/components/mobile/list.js +2 -1
  27. package/context/metadata/metadata.js +2 -1
  28. package/context/metadata/objects/fields.js +2 -1
  29. package/context/metadata/objects/fields.util.js +0 -1
  30. package/context/metadata/objects/objects.js +2 -1
  31. package/context/metadata/types/common.js +2 -1
  32. package/context/metadata/types/components.js +2 -1
  33. package/context/metadata/types/objects.js +2 -1
  34. package/context/msg/msg.js +2 -1
  35. package/context/resources/IResources.js +0 -1
  36. package/context/resources/impl/resources.js +2 -1
  37. package/context/tasks/tasks.js +0 -1
  38. package/data/index.js +0 -1
  39. package/hooks/api.js +0 -1
  40. package/hooks/hooks.js +0 -1
  41. package/kunlun/kunlun.js +2 -1
  42. package/kunlun/operator/IOperator.js +2 -1
  43. package/kunlun/operator/impl/expression.js +2 -1
  44. package/kunlun/operator/impl/logic.js +2 -1
  45. package/kunlun/operator/impl/logicV2.js +0 -1
  46. package/kunlun/operator/impl/operator.js +2 -1
  47. package/kunlun/operator/impl/operatorV2.js +0 -1
  48. package/lib/core.js +2 -1
  49. package/package.json +2 -13
  50. package/request/common.js +0 -1
  51. package/request/constants.js +0 -1
  52. package/request/faasinfra.js +0 -1
  53. package/request/innerapi.js +2 -1
  54. package/request/interface.js +2 -1
  55. package/request/openapi.js +2 -1
  56. package/types/types.js +2 -1
  57. package/LICENSE.md +0 -0
  58. package/application/application.js.map +0 -1
  59. package/application/application.ts +0 -40
  60. package/application/function/function.js.map +0 -1
  61. package/application/function/function.ts +0 -37
  62. package/application/impl/common.js.map +0 -1
  63. package/application/impl/common.ts +0 -50
  64. package/application/impl/impl.js.map +0 -1
  65. package/application/impl/impl.ts +0 -48
  66. package/constants/constants.js.map +0 -1
  67. package/constants/constants.ts +0 -12
  68. package/context/context.js.map +0 -1
  69. package/context/context.ts +0 -127
  70. package/context/db/db.js.map +0 -1
  71. package/context/db/db.ts +0 -77
  72. package/context/db/impl/IObject.js.map +0 -1
  73. package/context/db/impl/IObject.ts +0 -244
  74. package/context/db/impl/db.js.map +0 -1
  75. package/context/db/impl/db.ts +0 -95
  76. package/context/db/impl/object.js.map +0 -1
  77. package/context/db/impl/object.ts +0 -628
  78. package/context/db/impl/oql/ioql.js.map +0 -1
  79. package/context/db/impl/oql/ioql.ts +0 -6
  80. package/context/db/impl/oql/oql.js.map +0 -1
  81. package/context/db/impl/oql/oql.ts +0 -22
  82. package/context/db/impl/order.js.map +0 -1
  83. package/context/db/impl/order.ts +0 -16
  84. package/context/db/impl/propertiesStore.js.map +0 -1
  85. package/context/db/impl/propertiesStore.ts +0 -28
  86. package/context/db/impl/queryBuilder.js.map +0 -1
  87. package/context/db/impl/queryBuilder.ts +0 -103
  88. package/context/db/impl/transaction/index.js.map +0 -1
  89. package/context/db/impl/transaction/index.ts +0 -337
  90. package/context/db/impl/transaction/operation.js.map +0 -1
  91. package/context/db/impl/transaction/operation.ts +0 -72
  92. package/context/db/impl/transaction.js.map +0 -1
  93. package/context/db/impl/transaction.ts +0 -76
  94. package/context/globalConfig/globalConfig.js.map +0 -1
  95. package/context/globalConfig/globalConfig.ts +0 -11
  96. package/context/metadata/components/common.js.map +0 -1
  97. package/context/metadata/components/common.ts +0 -19
  98. package/context/metadata/components/components.js.map +0 -1
  99. package/context/metadata/components/components.ts +0 -19
  100. package/context/metadata/components/desktop/list.js.map +0 -1
  101. package/context/metadata/components/desktop/list.ts +0 -457
  102. package/context/metadata/components/desktop/recordDetail.js.map +0 -1
  103. package/context/metadata/components/desktop/recordDetail.ts +0 -64
  104. package/context/metadata/components/mobile/list.js.map +0 -1
  105. package/context/metadata/components/mobile/list.ts +0 -176
  106. package/context/metadata/metadata.js.map +0 -1
  107. package/context/metadata/metadata.ts +0 -175
  108. package/context/metadata/objects/fields.js.map +0 -1
  109. package/context/metadata/objects/fields.ts +0 -454
  110. package/context/metadata/objects/fields.util.js.map +0 -1
  111. package/context/metadata/objects/fields.util.ts +0 -360
  112. package/context/metadata/objects/objects.js.map +0 -1
  113. package/context/metadata/objects/objects.ts +0 -27
  114. package/context/metadata/types/common.js.map +0 -1
  115. package/context/metadata/types/common.ts +0 -10
  116. package/context/metadata/types/components.js.map +0 -1
  117. package/context/metadata/types/components.ts +0 -105
  118. package/context/metadata/types/objects.js.map +0 -1
  119. package/context/metadata/types/objects.ts +0 -251
  120. package/context/msg/msg.js.map +0 -1
  121. package/context/msg/msg.ts +0 -49
  122. package/context/resources/IResources.js.map +0 -1
  123. package/context/resources/IResources.ts +0 -73
  124. package/context/resources/impl/resources.js.map +0 -1
  125. package/context/resources/impl/resources.ts +0 -170
  126. package/context/tasks/tasks.js.map +0 -1
  127. package/context/tasks/tasks.ts +0 -159
  128. package/data/index.js.map +0 -1
  129. package/data/index.ts +0 -30
  130. package/hooks/api.js.map +0 -1
  131. package/hooks/api.ts +0 -341
  132. package/hooks/hooks.js.map +0 -1
  133. package/hooks/hooks.ts +0 -100
  134. package/kunlun/kunlun.js.map +0 -1
  135. package/kunlun/kunlun.ts +0 -69
  136. package/kunlun/operator/IOperator.js.map +0 -1
  137. package/kunlun/operator/IOperator.ts +0 -163
  138. package/kunlun/operator/impl/expression.js.map +0 -1
  139. package/kunlun/operator/impl/expression.ts +0 -71
  140. package/kunlun/operator/impl/logic.js.map +0 -1
  141. package/kunlun/operator/impl/logic.ts +0 -595
  142. package/kunlun/operator/impl/logicV2.js.map +0 -1
  143. package/kunlun/operator/impl/logicV2.ts +0 -254
  144. package/kunlun/operator/impl/operator.js.map +0 -1
  145. package/kunlun/operator/impl/operator.ts +0 -255
  146. package/kunlun/operator/impl/operatorV2.js.map +0 -1
  147. package/kunlun/operator/impl/operatorV2.ts +0 -249
  148. package/lib/core.js.map +0 -1
  149. package/lib/core.ts +0 -4
  150. package/request/common.js.map +0 -1
  151. package/request/common.ts +0 -91
  152. package/request/constants.js.map +0 -1
  153. package/request/constants.ts +0 -25
  154. package/request/faasinfra.js.map +0 -1
  155. package/request/faasinfra.ts +0 -393
  156. package/request/innerapi.js.map +0 -1
  157. package/request/innerapi.ts +0 -1645
  158. package/request/interface.js.map +0 -1
  159. package/request/interface.ts +0 -166
  160. package/request/openapi.js.map +0 -1
  161. package/request/openapi.ts +0 -1220
  162. package/types/types.js.map +0 -1
  163. package/types/types.ts +0 -105
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright © 2022 byted-apaas authors.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,3 @@
1
+ Authors:
2
+
3
+ ByteDance Ltd. and/or its affiliates
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=application.js.map
@@ -19,4 +19,3 @@ class Function {
19
19
  }
20
20
  }
21
21
  exports.Function = Function;
22
- //# sourceMappingURL=function.js.map
@@ -48,4 +48,3 @@ async function runCtxForOpenSDK(appCtx, promise) {
48
48
  return await promise();
49
49
  }
50
50
  exports.runCtxForOpenSDK = runCtxForOpenSDK;
51
- //# sourceMappingURL=common.js.map
@@ -7,12 +7,13 @@ const tool_1 = require("@byted-apaas/server-common-node/kunlun/tool/impl/tool");
7
7
  const function_1 = require("../function/function");
8
8
  const common_1 = require("../../request/common");
9
9
  const resources_1 = require("../../context/resources/impl/resources");
10
+ const constants_1 = require("@byted-apaas/server-common-node/constants/constants");
10
11
  class Application {
11
12
  constructor(clientID, clientSecret) {
12
13
  this.appCtx = {
13
14
  mode: "openSDK",
14
15
  credential: new credential_1.AppCredential(clientID, clientSecret),
15
- debugType: "0",
16
+ debugType: constants_1.DefaultDebugType ? constants_1.DefaultDebugType : "2",
16
17
  env: "online"
17
18
  };
18
19
  this.data = new db_1.ApplicationDB(this.appCtx);
@@ -36,4 +37,3 @@ class Application {
36
37
  }
37
38
  }
38
39
  exports.Application = Application;
39
- //# sourceMappingURL=impl.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.httpStatusCodes = exports.httpHeaderKeys = exports.notifyModel = void 0;
4
6
  exports.notifyModel = {
@@ -11,4 +13,3 @@ exports.httpHeaderKeys = {
11
13
  exports.httpStatusCodes = {
12
14
  redirect: 302,
13
15
  };
14
- //# sourceMappingURL=constants.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.Context = void 0;
4
6
  const server_common_node_1 = require("@byted-apaas/server-common-node");
@@ -21,4 +23,3 @@ class Context extends server_common_node_1.Context {
21
23
  ;
22
24
  }
23
25
  exports.Context = Context;
24
- //# sourceMappingURL=context.js.map
package/context/db/db.js CHANGED
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=db.js.map
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  ;
4
- //# sourceMappingURL=IObject.js.map
@@ -84,4 +84,3 @@ class ApplicationDB {
84
84
  }
85
85
  }
86
86
  exports.ApplicationDB = ApplicationDB;
87
- //# sourceMappingURL=db.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports._KApplicationObject = exports._KObject = void 0;
4
6
  const queryBuilder_1 = require("./queryBuilder");
@@ -520,4 +522,3 @@ function applyMixins(derivedCtor, constructors) {
520
522
  }
521
523
  applyMixins(_KObject, [_KObjectSync, _KObjectAsync, _KObjectQuery]);
522
524
  applyMixins(_KApplicationObject, [_KObjectSync, _KObjectQuery]);
523
- //# sourceMappingURL=object.js.map
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ioql.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.Oql = void 0;
4
6
  const Request = require("../../../../request/interface");
@@ -17,4 +19,3 @@ class Oql {
17
19
  }
18
20
  }
19
21
  exports.Oql = Oql;
20
- //# sourceMappingURL=oql.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.Order = exports.DESC = exports.ASC = void 0;
4
6
  exports.ASC = 'asc';
@@ -11,4 +13,3 @@ class Order {
11
13
  }
12
14
  }
13
15
  exports.Order = Order;
14
- //# sourceMappingURL=order.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  class PropertiesStore {
4
6
  constructor() {
@@ -25,4 +27,3 @@ class PropertiesStore {
25
27
  }
26
28
  }
27
29
  exports.default = PropertiesStore;
28
- //# sourceMappingURL=propertiesStore.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.QueryBuilder = exports.maxLimit = void 0;
4
6
  const order_1 = require("./order");
@@ -74,4 +76,3 @@ class QueryBuilder {
74
76
  }
75
77
  }
76
78
  exports.QueryBuilder = QueryBuilder;
77
- //# sourceMappingURL=queryBuilder.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.Transaction = void 0;
4
6
  const server_common_node_1 = require("@byted-apaas/server-common-node");
@@ -273,4 +275,3 @@ function deepEqual(left, right) {
273
275
  }
274
276
  return true;
275
277
  }
276
- //# sourceMappingURL=index.js.map
@@ -67,4 +67,3 @@ class BatchUpdateSameValueOperation extends TransactionOperation {
67
67
  }
68
68
  }
69
69
  exports.BatchUpdateSameValueOperation = BatchUpdateSameValueOperation;
70
- //# sourceMappingURL=operation.js.map
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=transaction.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.GlobalConfig = void 0;
4
6
  const Request = require("../../request/interface");
@@ -12,4 +14,3 @@ class GlobalConfig {
12
14
  }
13
15
  }
14
16
  exports.GlobalConfig = GlobalConfig;
15
- //# sourceMappingURL=globalConfig.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.componentTypes = exports.Component = void 0;
4
6
  const componentTypes = {
@@ -13,4 +15,3 @@ class Component {
13
15
  }
14
16
  }
15
17
  exports.Component = Component;
16
- //# sourceMappingURL=common.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.mobile = exports.desktop = exports.Component = void 0;
4
6
  const common_1 = require("./common");
@@ -15,4 +17,3 @@ const mobile = {
15
17
  List: list_2.List,
16
18
  };
17
19
  exports.mobile = mobile;
18
- //# sourceMappingURL=components.js.map
@@ -400,4 +400,3 @@ function parseConcatenate(element) {
400
400
  }
401
401
  return null;
402
402
  }
403
- //# sourceMappingURL=list.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.RecordDetail = void 0;
4
6
  const common_1 = require("../common");
@@ -49,4 +51,3 @@ function getSelectedFields(input) {
49
51
  }
50
52
  return selectedFields;
51
53
  }
52
- //# sourceMappingURL=recordDetail.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.List = void 0;
4
6
  const common_1 = require("../../types/common");
@@ -141,4 +143,3 @@ function getFilter(input) {
141
143
  return {};
142
144
  }
143
145
  }
144
- //# sourceMappingURL=list.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.metaType = exports.metadata = exports.MetaData = void 0;
4
6
  const components = require("./components/components");
@@ -99,4 +101,3 @@ function metaType() {
99
101
  };
100
102
  }
101
103
  exports.metaType = metaType;
102
- //# sourceMappingURL=metadata.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.getFieldClass = exports.parseField = exports.parseFields = exports.RichText = exports.ExtractSingleRecord = exports.CompositeType = exports.BackLookup = exports.File = exports.ReferenceField = exports.AutoID = exports.Formula = exports.Lookup = exports.AvatarOrLogo = exports.Boolean = exports.MobileNumber = exports.Email = exports.Option = exports.DateTime = exports.Date = exports.Number = exports.Multilingual = exports.Text = void 0;
4
6
  const fieldsUtil = require("./fields.util");
@@ -330,4 +332,3 @@ const fieldTypeMap = {
330
332
  "extractSingleRecord": "compositeType",
331
333
  "richText": "richText",
332
334
  };
333
- //# sourceMappingURL=fields.js.map
@@ -317,4 +317,3 @@ function getRecordPosition(field) {
317
317
  return pos;
318
318
  }
319
319
  exports.getRecordPosition = getRecordPosition;
320
- //# sourceMappingURL=fields.util.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.Object = void 0;
4
6
  const fields = require("./fields");
@@ -16,4 +18,3 @@ class Objects {
16
18
  }
17
19
  }
18
20
  exports.Object = Objects;
19
- //# sourceMappingURL=objects.js.map
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.isNullOrUndefined = void 0;
4
6
  function isNullOrUndefined(param) {
5
7
  return param === null || param === undefined;
6
8
  }
7
9
  exports.isNullOrUndefined = isNullOrUndefined;
8
- //# sourceMappingURL=common.js.map
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=components.js.map
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=objects.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.Message = exports._NotifyCenter = void 0;
4
6
  const Request = require("../../request/interface");
@@ -31,4 +33,3 @@ class Message {
31
33
  }
32
34
  }
33
35
  exports.Message = Message;
34
- //# sourceMappingURL=msg.js.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IResources.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports._Resources = exports._OpenSDKResources = exports._KunlunFile = exports._KunlunOpenSDKFile = void 0;
4
6
  const stream_1 = require("stream");
@@ -146,4 +148,3 @@ class _Resources {
146
148
  }
147
149
  }
148
150
  exports._Resources = _Resources;
149
- //# sourceMappingURL=resources.js.map
@@ -137,4 +137,3 @@ class Tasks {
137
137
  ;
138
138
  }
139
139
  exports.Tasks = Tasks;
140
- //# sourceMappingURL=tasks.js.map
package/data/index.js CHANGED
@@ -2,4 +2,3 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  ;
4
4
  ;
5
- //# sourceMappingURL=index.js.map
package/hooks/api.js CHANGED
@@ -325,4 +325,3 @@ exports.workflow = {
325
325
  exports.metaData = new metadata_1.MetaData(null);
326
326
  var impl_1 = require("../application/impl/impl");
327
327
  Object.defineProperty(exports, "Application", { enumerable: true, get: function () { return impl_1.Application; } });
328
- //# sourceMappingURL=api.js.map
package/hooks/hooks.js CHANGED
@@ -86,4 +86,3 @@ function mountContext(context, logger, requireFunc) {
86
86
  module.exports = {
87
87
  pre,
88
88
  };
89
- //# sourceMappingURL=hooks.js.map
package/kunlun/kunlun.js CHANGED
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.kunlun = void 0;
4
6
  const timeZone_1 = require("@byted-apaas/server-common-node/constants/timeZone");
@@ -54,4 +56,3 @@ var kunlun;
54
56
  */
55
57
  kunlun.operator = new operator_1.Operator();
56
58
  })(kunlun = exports.kunlun || (exports.kunlun = {}));
57
- //# sourceMappingURL=kunlun.js.map
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IOperator.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.MetadataExpressionField = exports.ConstantExpressionField = exports.Expression = void 0;
4
6
  class Expression {
@@ -52,4 +54,3 @@ class MetadataExpressionField extends ExpressionField {
52
54
  }
53
55
  }
54
56
  exports.MetadataExpressionField = MetadataExpressionField;
55
- //# sourceMappingURL=expression.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.handleCriterion = exports.buildLogic = exports.Logic = exports.buildExpression = exports.buildCriterion = exports.Condition = void 0;
4
6
  const expression_1 = require("./expression");
@@ -505,4 +507,3 @@ function dateAdd(date, num) {
505
507
  return date;
506
508
  }
507
509
  }
508
- //# sourceMappingURL=logic.js.map
@@ -198,4 +198,3 @@ function buildCriterionV2(filter) {
198
198
  return conditions;
199
199
  }
200
200
  exports.buildCriterionV2 = buildCriterionV2;
201
- //# sourceMappingURL=logicV2.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.Operator = exports.operates = void 0;
4
6
  const server_common_node_1 = require("@byted-apaas/server-common-node");
@@ -218,4 +220,3 @@ class Operator {
218
220
  ;
219
221
  }
220
222
  exports.Operator = Operator;
221
- //# sourceMappingURL=operator.js.map
@@ -214,4 +214,3 @@ class OperatorV2 {
214
214
  ;
215
215
  }
216
216
  exports.OperatorV2 = OperatorV2;
217
- //# sourceMappingURL=operatorV2.js.map
package/lib/core.js CHANGED
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.Application = exports.metaData = exports.workflow = exports.microservice = exports.cloudfunction = exports.tasks = exports.msg = exports.resources = exports.db = exports.kunlun = exports.isNewSystemProxyFunc = exports.hooks = void 0;
4
6
  exports.hooks = require("../hooks/hooks");
@@ -15,4 +17,3 @@ Object.defineProperty(exports, "microservice", { enumerable: true, get: function
15
17
  Object.defineProperty(exports, "workflow", { enumerable: true, get: function () { return api_1.workflow; } });
16
18
  Object.defineProperty(exports, "metaData", { enumerable: true, get: function () { return api_1.metaData; } });
17
19
  Object.defineProperty(exports, "Application", { enumerable: true, get: function () { return api_1.Application; } });
18
- //# sourceMappingURL=core.js.map
package/package.json CHANGED
@@ -1,29 +1,18 @@
1
1
  {
2
2
  "name": "@byted-apaas/server-sdk-node",
3
- "version": "0.0.2-beta.1",
3
+ "version": "0.0.2-beta.3",
4
4
  "description": "aPaaS Server SDK",
5
5
  "author": "zhouwexin <zhouwexin@bytedance.com>",
6
6
  "homepage": "",
7
7
  "license": "MIT",
8
8
  "main": "lib/core.js",
9
- "files": [
10
- "constants",
11
- "context",
12
- "data",
13
- "hooks",
14
- "request",
15
- "kunlun",
16
- "lib",
17
- "types",
18
- "application"
19
- ],
20
9
  "scripts": {
21
10
  "compile": "tsc -d",
22
11
  "compile.local": "tsc -d --sourceMap",
23
12
  "pre-build": "rm -rf build && tsc"
24
13
  },
25
14
  "dependencies": {
26
- "@byted-apaas/server-common-node": "0.0.2-beta.1",
15
+ "@byted-apaas/server-common-node": "0.0.2-beta.3",
27
16
  "@jorgeferrero/stream-to-buffer": "^2.0.6",
28
17
  "dayjs": "^1.9.6",
29
18
  "form-data": "^3.0.0",
package/request/common.js CHANGED
@@ -85,4 +85,3 @@ async function getNamespaceForOpenAndFaaSSDK() {
85
85
  return utils.getNamespaceFromCtx();
86
86
  }
87
87
  exports.getNamespaceForOpenAndFaaSSDK = getNamespaceForOpenAndFaaSSDK;
88
- //# sourceMappingURL=common.js.map
@@ -23,4 +23,3 @@ exports.openapiHttpPath = {
23
23
  revokeExecution: new config_1.PostHttpConfig(`/api/flow/v1/namespaces/${constants_1.replaceKeys.namespace}/executions/${constants_1.replaceKeys.id}/revoke`, exports.metricsMethodKeys.revokeExecution),
24
24
  getExecutionInfo: new config_1.GetHttpConfig(`/api/flow/v1/namespaces/${constants_1.replaceKeys.namespace}/executions/${constants_1.replaceKeys.id}/detail`, exports.metricsMethodKeys.getExecutionInfo),
25
25
  };
26
- //# sourceMappingURL=constants.js.map
@@ -356,4 +356,3 @@ async function invokeMicroservice(apiName: string, path: string, method: string,
356
356
  return await faasinfra.doRequest(null, urlPath, options);
357
357
  }
358
358
  */
359
- //# sourceMappingURL=faasinfra.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.getExecutionUserTaskInfo = exports.getExecutionInfo = exports.revokeExecution = exports.RequestRpc = void 0;
4
6
  const common = require("@byted-apaas/server-common-node");
@@ -1408,4 +1410,3 @@ async function createAsyncTaskV2(APIName, params) {
1408
1410
  post(resp.BaseResp);
1409
1411
  return Number(resp.TaskID);
1410
1412
  }
1411
- //# sourceMappingURL=innerapi.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.GetFaaSInfraInstance = exports.GetInstance = void 0;
4
6
  const openapi_1 = require("./openapi");
@@ -37,4 +39,3 @@ function GetFaaSInfraInstance() {
37
39
  }
38
40
  exports.GetFaaSInfraInstance = GetFaaSInfraInstance;
39
41
  ;
40
- //# sourceMappingURL=interface.js.map
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.getExecutionInfo = exports.revokeExecution = exports.executeFlow = exports.getExecutionUserTaskInfo = exports.RequestHttp = exports.updateWorkflowVariables = void 0;
4
6
  const FormData = require("form-data");
@@ -1010,4 +1012,3 @@ async function getExecutionInfo(executionId) {
1010
1012
  };
1011
1013
  }
1012
1014
  exports.getExecutionInfo = getExecutionInfo;
1013
- //# sourceMappingURL=openapi.js.map
package/types/types.js CHANGED
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
package/LICENSE.md DELETED
File without changes
@@ -1 +0,0 @@
1
- {"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":""}
@@ -1,40 +0,0 @@
1
- import {_IOpenSDKResources} from "../context/resources/IResources";
2
- import {ITool, IToolsExtra} from "@byted-apaas/server-common-node/kunlun/tool/Itool";
3
- import {AppCredential} from "@byted-apaas/server-common-node/credential/credential";
4
- import {IDBSync} from "../context/db/db";
5
- import {IFunction} from "./function/function";
6
- import {PlatformEnvType} from "@byted-apaas/server-common-node/constants/constants";
7
-
8
- /**
9
- * IApplication 为 OpenSDK 能力的核心接口
10
- * - data: 元数据相关能力
11
- * - resource: 资源相关能力
12
- * - tools: 工具相关能力
13
- */
14
- export interface IApplication {
15
- // data 相关能力
16
- data: IDBSync;
17
- // resource 相关能力
18
- resources: _IOpenSDKResources;
19
- // tools 相关能力
20
- tools: ITool & IToolsExtra;
21
-
22
- // 调用云函数能力
23
- cloudfunction(funcName: string): IFunction;
24
-
25
- // 设置平台环境类型
26
- env(platformEnvType: PlatformEnvType): IApplication;
27
-
28
- // 设置本地调试模式
29
- localDebugMode(): IApplication;
30
- }
31
-
32
- export type AppMode = 'openSDK' | 'faasSDK';
33
-
34
- export interface AppCtx {
35
- mode: AppMode
36
- env?: PlatformEnvType
37
- credential: AppCredential
38
- debugType?: "0" | "2"
39
- }
40
-
@@ -1 +0,0 @@
1
- {"version":3,"file":"function.js","sourceRoot":"","sources":["function.ts"],"names":[],"mappings":";;;AAEA,uDAAmD;AAKnD,2CAAgD;AAEhD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;AAUhC,MAAa,QAAQ;IAIjB,YAAY,MAAc,EAAE,OAAe;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAA2B;QACpC,OAAO,MAAM,IAAA,yBAAgB,EAAC,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,EAAE;YAClD,OAAO,MAAM,IAAA,uBAAW,GAAE,CAAC,kBAAkB,CAAC;gBAC1C,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,iBAAiB,EAAE,IAAI;aAC1B,EAAE,MAAM,CAAC,CAAC;QACf,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAjBD,4BAiBC"}