@flink-app/contentone-plugin 0.11.14 → 0.12.1-alpha.1

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.
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { FlinkPlugin } from "@flink-app/flink";
2
- export declare type ContentOneCollectionOptions = {
2
+ export type ContentOneCollectionOptions = {
3
3
  id: string;
4
4
  client: ContentOneClient;
5
5
  };
6
- export declare type ContentOneOptions = {
6
+ export type ContentOneOptions = {
7
7
  /**
8
8
  * Path for request
9
9
  */
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
25
25
  function verb(n) { return function (v) { return step([n, v]); }; }
26
26
  function step(op) {
27
27
  if (f) throw new TypeError("Generator is already executing.");
28
- while (_) try {
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
29
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
30
  if (y = 0, t) op = [op[0] & 2, t.value];
31
31
  switch (op[0]) {
@@ -86,24 +86,24 @@ var ContentOneClient = /** @class */ (function () {
86
86
  });
87
87
  };
88
88
  ContentOneClient.prototype.doRequest = function (_a) {
89
- var contentOneOperation = _a.contentOneOperation, _b = _a.id, id = _b === void 0 ? "" : _b, _c = _a.query, query = _c === void 0 ? {} : _c, _d = _a.options, options = _d === void 0 ? {} : _d;
90
- return __awaiter(this, void 0, void 0, function () {
89
+ return __awaiter(this, arguments, void 0, function (_b) {
91
90
  var data, response, error_1;
92
- return __generator(this, function (_e) {
93
- switch (_e.label) {
91
+ var contentOneOperation = _b.contentOneOperation, _c = _b.id, id = _c === void 0 ? "" : _c, _d = _b.query, query = _d === void 0 ? {} : _d, _e = _b.options, options = _e === void 0 ? {} : _e;
92
+ return __generator(this, function (_f) {
93
+ switch (_f.label) {
94
94
  case 0:
95
- _e.trys.push([0, 2, , 3]);
95
+ _f.trys.push([0, 2, , 3]);
96
96
  data = __assign(__assign(__assign({}, query), options), { token: this.token });
97
- return [4 /*yield*/, got_1.default.post(baseUrl + "/" + contentOneOperation + "/" + this.collection + "/" + id, {
97
+ return [4 /*yield*/, got_1.default.post("".concat(baseUrl, "/").concat(contentOneOperation, "/").concat(this.collection, "/").concat(id), {
98
98
  json: true,
99
99
  body: data,
100
100
  })];
101
101
  case 1:
102
- response = _e.sent();
102
+ response = _f.sent();
103
103
  this.logResponse(response);
104
104
  return [2 /*return*/, response.body];
105
105
  case 2:
106
- error_1 = _e.sent();
106
+ error_1 = _f.sent();
107
107
  flink_1.log.error(error_1);
108
108
  return [3 /*break*/, 3];
109
109
  case 3: return [2 /*return*/];
@@ -176,7 +176,7 @@ var ContentOneManagementClient = /** @class */ (function () {
176
176
  APIKEY: apikey,
177
177
  Arguments: args
178
178
  };
179
- return [4 /*yield*/, got_1.default.post(managementBaseUrl + "/action/execute", {
179
+ return [4 /*yield*/, got_1.default.post("".concat(managementBaseUrl, "/action/execute"), {
180
180
  json: true,
181
181
  body: data,
182
182
  })];
@@ -211,9 +211,9 @@ var ContentOneCDNClient = /** @class */ (function () {
211
211
  function ContentOneCDNClient() {
212
212
  }
213
213
  ContentOneCDNClient.prototype.upload = function (path, token, options) {
214
- var _a;
215
214
  return __awaiter(this, void 0, void 0, function () {
216
215
  var form, response, body;
216
+ var _a;
217
217
  return __generator(this, function (_b) {
218
218
  switch (_b.label) {
219
219
  case 0:
package/package.json CHANGED
@@ -1,28 +1,28 @@
1
1
  {
2
- "name": "@flink-app/contentone-plugin",
3
- "version": "0.11.14",
4
- "description": "Flink plugin that enables easy to use communication with content one",
5
- "scripts": {
6
- "test": "echo \"Error: no test specified\"",
7
- "prepublish": "tsc"
8
- },
9
- "author": "johan@frost.se",
10
- "publishConfig": {
11
- "access": "public"
12
- },
13
- "license": "MIT",
14
- "types": "dist/index.d.ts",
15
- "main": "dist/index.js",
16
- "dependencies": {
17
- "form-data": "^2.5.1",
18
- "got": "^9.6.0"
19
- },
20
- "devDependencies": {
21
- "@flink-app/flink": "^0.11.14",
22
- "@types/got": "^9.6.0",
23
- "@types/node": "^15.6.2",
24
- "ts-node": "^9.1.1",
25
- "typescript": "^4.2.4"
26
- },
27
- "gitHead": "8172291cf7330d13c7958d170100fe9771fd7dfb"
2
+ "name": "@flink-app/contentone-plugin",
3
+ "version": "0.12.1-alpha.1",
4
+ "description": "Flink plugin that enables easy to use communication with content one",
5
+ "scripts": {
6
+ "test": "echo \"Error: no test specified\"",
7
+ "prepublish": "tsc"
8
+ },
9
+ "author": "johan@frost.se",
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "license": "MIT",
14
+ "types": "dist/index.d.ts",
15
+ "main": "dist/index.js",
16
+ "dependencies": {
17
+ "form-data": "^2.5.1",
18
+ "got": "^9.6.0"
19
+ },
20
+ "devDependencies": {
21
+ "@flink-app/flink": "^0.12.1-alpha.1",
22
+ "@types/got": "^9.6.0",
23
+ "@types/node": "22.13.10",
24
+ "ts-node": "^9.1.1",
25
+ "typescript": "5.4.5"
26
+ },
27
+ "gitHead": "040e670be372c0cc47d9c7106bed55780910cf39"
28
28
  }